阵列信号程序1

clc;
ima=sqrt(-1);
esp=0.01;
N=16; %阵元数
d_lamda=0.5;%阵元间距与波长的比值
theta=-90:0.5:90;%搜索范围的确定
theta1=-10;%来波方向1
%theta2=0;%来波方向2
theta3=40;%来波方向3
theta_jam=70;%干扰方向
L=512;%采样点数
%信号形成
for k=1:L
    a1=10*randn(1);%方差为1的正态分布
   % a2=10*randn(1);
    a3=10*randn(1);
    ajam=10*randn(1);
    an=1;
    s(:,k)=a1*exp(ima*2*pi*d_lamda*sin(theta1*pi/180)*[0:N-1]')+...
        +a3*exp(ima*2*pi*d_lamda*sin(theta3*pi/180)*[0:N-1]');
    jam(:,k)=ajam*exp(ima*2*pi*d_lamda*sin(theta_jam*pi/180)*[0:N-1]');
    n(:,k)=an*(randn(N,1)+ima*randn(N,1));
end
%最优权矢量产生
x=s+jam;%求信号的相关矩阵
Rx=1/L*x*x';%相关矩阵求逆
R=pinv(Rx);
a1theta=exp(ima*2*pi*d_lamda*sin(theta1*pi/180)*[0:N-1]');
%a2theta=exp(ima*2*pi*d_lamda*sin(theta2*pi/180)*[0:N-1]');
a3theta=exp(ima*2*pi*d_lamda*sin(theta3*pi/180)*[0:N-1]');
C=[a1theta  a3theta];%方向矩阵
F=[1 1]';
Wopt=R*C*(inv(C'*R*C))*F;
for m=1:length(theta)
    a=exp(ima*2*pi*d_lamda*sin(theta(m)*pi/180)*[0:N-1]');
    y(m)=Wopt'*a;
end
%最优波束形成
Y=20*log10(abs(y)/max(abs(y))+esp);
%作图
plot(theta,Y);hold on;
grid on;
axis([-90 90 -50 0]);
plot(theta1,-30:0,'.');
plot(theta2,-30:0,'.');
plot(theta3,-30:0,'.');
xlabel('\theta/o');
ylabel('Amplitude in dB');
title('LCMV准则下多个方向波束形成');


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值