hlayumi的个人空间 https://blog.eetop.cn/hslogic [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

MSE的MATLAB仿真

已有 11724 次阅读| 2018-10-6 12:13 |系统分类:芯片设计

%MSE
clear all;close all;clc;
c = 3e8;
N = 8;
SN = 2048;
n = 1:1:SN;
thetac = 0;
thetai = 20*pi/180;%干扰方向
f0 = 1e6;
%f0 = 3e9;
fc     = 3e9;
fi     = 2e9;
fs     = 2*fc;
lamdac = c/fc;
lamdai = c/fi;
lamdas = c/fs;
d = lamdac/2;
% L = [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]';
L=[0:N-1]';
xc = exp(j*2*pi*d*sin(thetac)*L/lamdac)*exp(j*2*pi*fc*n*(1/fs));%认为信号包络为1,一次快拍
xi = exp(j*2*pi*d*sin(thetai)*L/lamdai)*exp(j*2*pi*fi*n*(1/fs));%认为没有噪声下的噪声信号
x = xc+xi;
noise=1/sqrt(2)*(randn(N,SN)+j*randn(N,SN));
Rn=noise*noise'/SN;
Rx  = x*x'/64 + Rn;
rxd = x*(sin(2*pi*f0*n*(1/fs)).*exp(j*2*pi*fc*n*(1/fs)))';
Wopt = inv(Rx)*rxd;
m = 0;
for theta = -pi/2:.001:pi/2
    m      = m+1;
    atheta = exp(j*2*pi*d*sin(theta)*L/lamdac);
    p(m)   = abs(Wopt'*atheta);
end
figure
plot((-pi/2:.001:pi/2)*180/pi,20*log10(p/max(p))),hold on
plot(thetac,-70:2:0,'.'),hold on
plot(thetai*180/pi,-70:2:0,'.');grid on;
xlabel('deg');ylabel('dB');title('MSE');
gtext('信号0deg,干扰20deg');




%music method
% [V,D]=eig(Rx);
% plot(diag(D),'r-o');
% xlabel('序号');ylabel('特征值大小');
% title('数据协方差矩阵特征值分布-3个信号');

% Vn=V(:,1:14);
% theta=-pi/2:pi/1000:pi/2;
% for k=1:1:length(theta)
%     atheta=exp(j*2*pi*d*sin(theta(k))*L/lamdai);
%     Stheta(k)=1/abs(atheta'*(Vn*Vn')*atheta);
% end
% figure
% plot((-pi/2:pi/1000:pi/2)*180/pi,20*log10(Stheta/max(Stheta)));grid on;
% xlabel('方位/deg');ylabel('幅度/dB');
% title('Music测向');

点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 5

    粉丝
  • 0

    好友
  • 1

    获赞
  • 16

    评论
  • 5260

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-8 22:25 , Processed in 0.020668 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部