⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smart,antenna.txt

📁 程序是对智能天线算法进行了简单的仿真!希望供大家参考
💻 TXT
字号:
仿真采用均匀直线阵,阵间距离为半波长
clc
clear
A=input('please input the number of element:');
E=input('please input the angle of interesting signal:');
E1=input('please input the angle of interesting signal:');
D=input('please input the number of sampling:');
P=input('please input the signal to noise:');
E=E*pi/180;
H=zeros(1,D);
H=rand(1,D);
[H,H1]=BPSK(H);
X=zeros(D,A);
XX=zeros(D,A);
XX1=zeros(D,A);
for I=1:D
    for J=1:A
        X(I,J)=H(I)*exp(i*pi*(J-1)*cos(E));
    end
    XX1=awgn(X,P);
end
XX=XX1;
R=(XX'*XX)/D;
RR=cov(R);
L=zeros(1,A);
I=1:A;
L=exp(i*pi*(I-1)*cos(E));
W=RR*L';
T=0:pi/100:pi;
O=0;
for I=1:A
    O=O+W(I).*exp(i*pi*(I-1)*cos(T));
 end
O=abs(O);
OO=20*log10(O/max(O));
T=(T*180)/pi;
figure(1);
plot(T,OO,'linewidth',2);grid on;axis([0 180 -70 0]);



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BPSK程序

function [y,x1]=BPSK(x)
L=length(x);
for I=1:L
    if x(I)<0.5
        x1(I)=0; 
        y(I)=cos(2*10^3*pi+pi/3)+i*sin(2*10^3*pi+pi/3);
    else
        x1(I)=1;
        y(I)=cos(2*10^3*pi+pi+pi/3)+i*sin(2*10^3*pi+pi+pi/3);
    end
end



程序对智能天线算法进行了简单的仿真。
希望对大家有用
谢谢

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -