Skip to content

Commit

Permalink
Encoding fix + more experiments.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriswmz committed Apr 26, 2018
1 parent 18a232c commit b6db773
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 8 deletions.
4 changes: 2 additions & 2 deletions array/mra_1d.m
Expand Up @@ -10,9 +10,9 @@
% design - An array design struct.
%References:
% [1] M. Ishiguro, "Minimum redundancy linear arrays for a large number
% of antennas," Radio Sci., vol. 15, no. 6, pp. 11631170, Nov. 1980.
% of antennas," Radio Sci., vol. 15, no. 6, pp. 1163-1170, Nov. 1980.
% [2] A. Moffet, "Minimum-redundancy linear arrays," IEEE Transactions
% on Antennas and Propagation, vol. 16, no. 2, pp. 172175,
% on Antennas and Propagation, vol. 16, no. 2, pp. 172-175,
% Mar. 1968.

if d <= 0 || ~isreal(d)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion estimator/music_1d.m
Expand Up @@ -30,7 +30,7 @@
%Reference:
% [1] R. Schmidt, "Multiple emitter location and signal parameter
% estimation," IEEE Transactions on Antennas and Propagation,
% vol. 34, no. 3, pp. 276280, Mar. 1986.
% vol. 34, no. 3, pp. 276-280, Mar. 1986.
unit = 'radian';
refine_estimates = false;
for ii = 1:2:nargin-5
Expand Down
2 changes: 1 addition & 1 deletion estimator/sn_sorte.m
Expand Up @@ -7,7 +7,7 @@
%Reference:
% [1] Z. He, A. Cichocke, S. Xie, and K. Choi, "Detecting the number of
% clusters in n-way probabilistic clustering," IEEE Trans. Pattern
% Anal. Mach. Intell., vol. 32, pp. 20062021, Nov. 2010.
% Anal. Mach. Intell., vol. 32, pp. 2006-2021, Nov. 2010.
n = length(l);
if l < 2
error('At least two eigenvalues required.');
Expand Down
66 changes: 66 additions & 0 deletions examples/experiments/coarrays_music_crb/sim_mse_same_coarray.m
@@ -0,0 +1,66 @@
% This script demonstrate that even if several sparse linear arrays
% share the same virtual ULA, they exhibit different performances under
% different SNR settings and different numbers of sources.
% This script will produce results similar to Fig. 1 in the following
% paper:
% * M. Wang, Z. Zhang, and A. Nehorai, "Performance analysis of
% coarray-based MUSIC and the Cramér-Rao bound," in 2017 IEEE
% International Conference on Acoustics, Speech and Signal Processing
% (ICASSP), 2017, pp. 3061-3065.


clear(); close all;

wavelength = 1; % normalized wavelength
d_0 = wavelength / 2;
designs = {...
design_array_1d('nested', [5 6], d_0, 'Nested (5, 6)') ...
design_array_1d('nested', [2 12], d_0, 'Nested (2, 12)') ...
design_array_1d('nested', [3 9], d_0, 'Nested (3, 9)') ...
design_array_1d('nested', [1 18], d_0, 'Nested (1, 18)') ...
};
n_designs = length(designs);

power_source = 1;
n_snaphots = 1000;

n_grid = 20;
SNRs = linspace(-10, 20, n_grid);

doas1 = linspace(-pi/3, pi/3, 8);

MSEs_SNR_ana1 = zeros(n_designs, n_grid);
for dd = 1:n_designs
design = designs{dd};
A = steering_matrix(design, wavelength, doas1);
for ii = 1:n_grid
power_noise = power_source*10^(-SNRs(ii)/10);
MSEs_SNR_ana1(dd, ii) = mean(ecov_coarray_music_1d(design, wavelength, ...
doas1, power_source, power_noise, n_snaphots, 'DiagonalsOnly'));
end
end

doas2 = linspace(-pi/3, pi/3, 20);

MSEs_SNR_ana2 = zeros(n_designs, n_grid);
for dd = 1:n_designs
design = designs{dd};
A = steering_matrix(design, wavelength, doas2);
for ii = 1:n_grid
power_noise = power_source*10^(-SNRs(ii)/10);
MSEs_SNR_ana2(dd, ii) = mean(ecov_coarray_music_1d(design, wavelength, ...
doas2, power_source, power_noise, n_snaphots, 'DiagonalsOnly'));
end
end

figure;
subplot(1,2,1);
semilogy(SNRs, rad2deg(sqrt(MSEs_SNR_ana1)));
xlabel('SNR (dB)'); ylabel('RMSE (deg)'); grid on;
legend(arrayfun(@(x) x{1}.name, designs, 'UniformOutput', false));
title(sprintf('K = %d', length(doas1)));
subplot(1,2,2);
semilogy(SNRs, rad2deg(sqrt(MSEs_SNR_ana2)));
xlabel('SNR (dB)'); ylabel('RMSE (deg)'); grid on;
legend(arrayfun(@(x) x{1}.name, designs, 'UniformOutput', false));
title(sprintf('K = %d', length(doas2)));
2 changes: 1 addition & 1 deletion performance/crb_general_det_1d.m
Expand Up @@ -13,7 +13,7 @@
% [1] P. Stoica and A. Nehorai, "Performance study of conditional and
% unconditional direction-of-arrival estimation," IEEE Transactions
% on Acoustics, Speech and Signal Processing, vol. 38, no. 10,
% pp. 17831795, Oct. 1990.
% pp. 1783-1795, Oct. 1990.
if design.dim ~= 1
error('1D array expected.');
end
Expand Down
2 changes: 1 addition & 1 deletion performance/crb_general_sto_1d.m
Expand Up @@ -15,7 +15,7 @@
% [1] P. Stoica and A. Nehorai, "Performance study of conditional and
% unconditional direction-of-arrival estimation," IEEE Transactions on
% Acoustics, Speech and Signal Processing, vol. 38, no. 10,
% pp. 17831795, Oct. 1990.
% pp. 1783-1795, Oct. 1990.
if design.dim ~= 1
error('1D array expected.');
end
Expand Down
4 changes: 2 additions & 2 deletions performance/ecov_music_1d.m
Expand Up @@ -19,10 +19,10 @@
% [1] P. Stoica and A. Nehorai, "MUSIC, maximum likelihood, and
% Cramer-Rao bound: further results and comparisons," IEEE
% Transactions on Acoustics, Speech and Signal Processing, vol. 38,
% no. 12, pp. 21402150, Dec. 1990.
% no. 12, pp. 2140-2150, Dec. 1990.
% [2] P. Stoica and A. Nehorai, "MUSIC, maximum likelihood, and
% Cramer-Rao bound," IEEE Transactions on Acoustics, Speech and
% Signal Processing, vol. 37, no. 5, pp. 720741, May 1989.
% Signal Processing, vol. 37, no. 5, pp. 720-741, May 1989.
if design.dim ~= 1
error('1D array expected.');
end
Expand Down
14 changes: 14 additions & 0 deletions utils/logdeth.m
@@ -0,0 +1,14 @@
function v = logdeth(A, force_hermitian)
%LOGDETH Log-determinant function for Hermitian symmetric matrices. This
%function uses Cholesky decomposition. If the decomposition fails, inf will be
%returned. This input matrix is assumed Hermitian.
if nargin == 1 || force_hermitian
A = 0.5*(A+A');
end
[R, p] = chol(A);
if p > 0
v = inf;
else
v = sum(log(diag(R))) * 2;
end
end

0 comments on commit b6db773

Please sign in to comment.