www.pudn.com > trackingdemos.zip > MDL_demo3.m


% MDL_demo3.m 
% 
% demo version for obtaining the IRF empirically (without numerical integration) for 
% a one-dimensional detection problem using ML-PDA (cont. called by MDL_demo2.m) 
% The MC runs may take quite a long time depending on the PC system 
 
N = 60;                  % number of scans 
runs = 1000;             % number of MC runs for each scenario 
theta = 0;               % location of the Gaussian signal 
lambda0 = linspace(0.005, 0.075, 10); % expected FAs per unit volume 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
disp('»'); 
disp('The estimation accuracy of ML-PDA is quantified by information'); 
disp('reduction factor (IRF) when false alarms are present.'); 
disp('Assuming the estimator is efficient, IRF can be obtained empirically'); 
disp('without resorting to numerical integration, i.e., q_2() function.'); 
string0 = ['We use ', num2str(N), ' scans so that CLT may hold under one signal case.']; 
disp(string0); 
string1 = ['The location of signal is ', num2str(theta), ' and the false alarm density varies.']; 
disp(string1); 
string2 = [num2str(runs),' MC runs are performed to estimate the variance of the estimator.']; 
disp(string2); 
disp('»'); 
disp('»'); 
disp('pause'); 
pause(5); 
disp('Begin simulations and of course it is quite slow...'); 
 
for k=1:length(lambda0) 
   strings = ['Begin scenario #', num2str(k), ', please wait...']; 
   h = waitbar(0, strings); 
   for i=1:runs 
      for j=1:N 
         Z_H1(j).Z = []; 
         M = poissrnd(2*A*lambda); 
         if M > 0 
            Z_H1(j).Z = [Z_H1(j).Z, 2*A.*(rand(1,M)-.5)]; 
         end 
         if rand < Pd 
            Z_H1(j).Z = [Z_H1(j).Z, theta + sigma.*randn]; 
         end 
      end 
      theta_H1(i) = fminbnd('LLR_Gau_PDA2', -A, A, [], Z_H1, sigma, lambda0(k), Pd, Pg); 
      waitbar(i/runs); 
   end 
   close(h); 
   var_est(k) = var(theta_H1); 
end 
 
expected_FA = [0, lambda0]; 
IRF = [Pd, 1/N./var_est]; 
fig1 = figure('Name', 'Empirical estimate of the information reduction factor'); 
plot(expected_FA, IRF); 
xlabel('Expected number of false alarms per unit volume'); 
ylabel('Information reduction factor'); 
disp('»'); 
disp('As the expected number of FAs increases, more scans are required for the'); 
disp('one signal vs. null testing hypothesis even though ML-PDA is effecient in'); 
disp('estimating the unknown signal location.'); 
disp('»'); 
disp('pause'); 
pause(15); 
close(fig1); 
disp('»'); 
disp('End of the MDL for track initiation demo.'); 
disp('»');