資源簡介
自己編寫的music算法,仿真了3個到達角測量
代碼片段和文件信息
clc
clear
close?all
%?MUSIC?algorithm
%?standar
c?=?3e8;
f0?=?24.15e9;
lambda?=?c/f0;
d?=?lambda*0.5;
N_t?=?3;
theta_t?=?[-7?-3.5?0?3.5];
P?=?8;
N?=?128;
p?=?0:P-1;
%?amp?=?randn(1N_t);
%?phi?=?rand(1N_t);
%?s?=?(amp‘.*exp(1i*phi‘))?*?exp(-1i*2*pi*0.1*(0:N-1));
s?=?randn(N_tN);
%?n?=?(randn(PN)?+?1i*randn(PN));
A?=?exp(-1i*2*pi*f0/c*p‘*d*sind(theta_t(1:N_t)));
X?=?A*s;
X?=?awgn(X33‘measured‘);
Rx?=?(X*X‘)/N;
[EVD]?=?eig(Rx);
Un?=?EV(:1:P-N_t);
%?G?=?Rx(:1:N_t);
%?H?=?Rx(:N_t+1?:?end);
%?P1?=?inv(G‘*G)*G‘*H;
%?Q?=?([P1‘?eye(P-N_t)])‘;
%?Un?=?Q;
ang?=?-30:0.5:30;
A?=?exp(-1i*2*pi*f0*p‘*d*sind(ang)/c);
P?=?1./diag(A‘*Un*Un‘*A);
plot(angdb(abs(P)))
%?smooth?music
%?c?=?3e8;
%?
%?f0?=?24.15e9;
%?lambda?=?c/f0;
%?d?=?lambda*0.5;
%?
%?N_t?=?4;
%?theta_t?=?[-7?-3.5?0?3.5];
%?P1?=?128;
%?
%?N?=?128;
%?p1?=?0:P1-1;
%?
%?P?=?8;
%?p?=?0:P-1;
%?
%?amp?=?randn(1N_t);
%?phi?=?rand(1N_t);
%?s?=?(amp‘.*exp(1i*phi‘))?*?exp(-1i*2*pi*0.1*(0:N-1));
%?%?s?=?randn(N_tN);
%?%?n?=?(randn(PN)?+?1i*randn(PN));
%?A?=?exp(-1i*2*pi*f0/c*p1‘*d*sind(theta_t(1:N_t)));
%?
評論
共有 條評論