當前位置:吉日网官网 - 傳統節日 - MATLAB程序詳解(關於波束形成)

MATLAB程序詳解(關於波束形成)

這裏有兩個程序。第二個程序和第壹個程序本質上是壹樣的,只是信號和轉向向量的寫法有點不同,這裏就不做評論了。還有,附上壹個自己寫的程序,裏面有SIM算法。G-S正交化算法等。它是基於圓形陣列的,妳的算法是基於線性陣列的。它們在程序上的區別在於導向矢量的不同。我的算法在壹個項目裏,保證行得通。建議學習波束形成技術,註意把程序分塊,比如求導向矢量;最佳重量;波束形成等等。

該過程如下:

四元均勻線陣的自適應波束形成

清楚的

色度控制中心

格式長;

v = 1;

m = 4;

n = 1000;%%%%%個快照

f0=21*10^3;%%%%%%%信號和幹擾頻率

f1=11*10^3;

f2=15*10^3;

omiga0 = 2 * pi * f0%%%%%信號和幹擾角頻率

omiga 1 = 2 * pi * f 1;

omiga2 = 2 * pi * f2

sita0 = 0.8%信號方向

Sita 1 = 0.4;%幹擾方向1

Sita 2 = 2.1;%幹擾方向2

對於t = 1: n%%%%%%信號

ADT(t)= sin(omiga 0 * t/(N * F0));

a 1t(t)= sin(omiga 1 * t/(N * f 1));

a2t(t)= sin(OMI ga 2 * t/(N * F2));

結束

對於I = 1: m%%%%%%信號導向向量:線性陣列形式。

ad(i,1)= exp(j *(I-1)* pi * sin(Sita 0));

a1(i,1)= exp(j *(I-1)* pi * sin(Sita 1));

a2(i,1)= exp(j *(I-1)* pi * sin(Sita 2));

結束

r =零(M,M);

對於t=1:N

x = ADT(t)* ad+a 1t(t)* a 1+a2t(t)* a2;%陣列對信號的完整響應

R = R+x * x’;%信號協方差矩陣

結束

R = R/N;%%%%%%協方差矩陣,所有快照的平均值。

miu = 1/(ad ' * inv(R)* ad);%%%%%這好像是LMS算法的公式,具體的我記不太清楚了。在這裏,我們試圖找到最佳的重量,根據這個公式,然後加權。

w = miu * inv(R)* ad;

%%%%%梁%%%%梁%%%梁%%%梁%%梁%%梁%%梁%%梁%%梁%%梁%%梁%%梁

對於sita=0:pi/100:pi

因為i=1:M

x_(i,1)= exp(j *(I-1)* pi * sin(Sita));

結束

y(1,v)= w ' * x _;%%%%%對信號進行加權以消除幹擾。

v = v+ 1;

結束

y _ max = max(y(:));%%%%%%%%規範化

y _ 1 = y/y _ max;

y _ db = 20 * log(y _ 1);

Sita = 0:pi/100:pi;

plot(sita,y)

Xlabel('sitaa ')

Ylabel(“天線增益db”)

四元均勻線陣的自適應波束形成

目標

清楚的

色度控制中心

格式長;

v = 1;

m = 4;數組元素編號

n = 100;

f0=21*10^3;

omiga0 = 2 * pi * f0

sita0 = 0.6%信號方向

對於t=1:N

ADT(t)= sin(omiga 0 * t/(N * F0));

結束

因為i=1:M

ad(i,1)= exp(j *(I-1)* pi * sin(Sita 0));

結束

r =零(4,4);

r =零(4,1);

對於t=1:N

x = ADT(t)* ad;

R = R+x * x .’;

結束

R = R/N;

miu=1/(ad。* inv(R)* ad);

w = miu * inv(R)* ad;

對於sita=0:pi/100:pi/2

因為i=1:M

a(i,1)= exp(j *(I-1)* pi * sin(Sita));

結束

y(1,v)= w . ' * a;

v = v+ 1;

結束

Sita = 0:pi/100:pi/2;

plot(sita,y)

xlabel('sita ')

Ylabel(“天線增益”)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%我的程序%%%%%%

函數界首信號

%預期信號編號:1

%幹擾信號數量:4

已知信噪比%

已知%幹比

已知%方位角

clc

全部清除;

全部關閉;

%//參數設置= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

www 1 = 0;

www2 = 0;

ww w3 = 0;

rrr的百分比=1:16000

signal _ num = 1;%信號編號

噪聲_數量= 5;%幹擾數

R0 = 0.6%圓的半徑

SP = 2000%樣本數量

n = 8;元素數量百分比

信噪比=-10;信噪比%

sir 1 = 10;%信號幹擾比1

sir 2 = 10;%信號幹擾比2

sir 3 = 10;信號幹擾比%

sir 4 = 10;

sir 5 = 10;

%///= = = = = = = = = = = = = = = = =噪聲功率與信號功率之比= = = = = = = = = = = = = = = = = = = = =

因子_噪聲_1=10。^(-sir1/10);

因子_噪聲_2=10。^(-sir2/10);

因子_噪聲_3=10。^(-sir3/10);

因子_噪聲_4=10。^(-sir4/10);

因子_噪聲_5=10。^(-sir5/10);

factor_noise_targe=10。^(-snr/10);

% //======================== ===============

d 1 = 85 * pi/180;%%幹擾方位角1

D2 = 100 * pi/180;%幹擾2的方位角

D3 = 147 * pi/180;%幹擾3的方位角

D4 = 200 * pi/180;%幹擾4的方位角

D5 = 250 * pi/180;%幹擾5的方位角

D6 = 150 * pi/180;%目標的方位角

e 1 = 15 * pi/180;%%幹擾1的俯仰角

E2 = 25 * pi/180;%幹涉2的俯仰角

E3 = 85 * pi/180;%幹涉3的俯仰角

E4 = 50 * pi/180;%幹涉4的俯仰角

E5 = 70 * pi/180;%幹涉5°的俯仰角

E6 = 85 * pi/180;%目標的俯仰角

%/= = = = = = = = = = = = = =目標信號= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

t = 1:1:SP;

fc = 2e7

ts = 1/(3e 10);

s0 = 5 * cos(2 * pi * fc * t * Ts);%目標信號

對於kk=1:N

phi _ N(kk)= 2 * pi *(kk-1)/N;

結束

%/= = = = = = = = = = = = = = = =操縱向量= = = = = = = = = = = = = = = = = = = = = = = = = = = =

a =[conj(exp(j * 2 * pi * R0 * cos(D6-phi _ n)* sin(E6)));conj(exp(j * 2 * pi * R0 * cos(d 1-phi _ n)* sin(e 1));conj(exp(j * 2 * pi * R0 * cos(D2-phi _ n)* sin(E2));conj(exp(j * 2 * pi * R0 * cos(D3-phi _ n)* sin(E3));conj(exp(j * 2 * pi * R0 * cos(D4-phi _ n)* sin(E4));conj(exp(j * 2 * pi * R0 * cos(D5-phi _ n)* sin(E5)))]';

a 1 =[conj(exp(j * 2 * pi * R0 * cos(d 1-phi _ n)* sin(e 1)));conj(exp(j * 2 * pi * R0 * cos(D2-phi _ n)* sin(E2));conj(exp(j * 2 * pi * R0 * cos(D3-phi _ n)* sin(E3));conj(exp(j * 2 * pi * R0 * cos(D4-phi _ n)* sin(E4));conj(exp(j * 2 * pi * R0 * cos(D5-phi _ n)* sin(E5)))]';

%///= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =幹擾的功率

% //取決於信號功率和SIR

PS 1 = 0;

PS2 = 0;

PS3 = 0;

ps4 = 0;

ps5 = 0;

s 1 =零(1,SP);

S2 =零(1,SP);

S3 =零(1,SP);

S4 =零(1,SP);

S5 =零(1,SP);

ps0 = S0 * S0 '/SP;%信號功率

PS 1 = Ps0 * factor _ noise _ 1;

PS2 = Ps0 * factor _ noise _ 2;

Ps3 = Ps0 *因子_噪聲_ 3;

ps4 = Ps0 * factor _ noise _ 4;

ps5 = Ps0 * factor _ noise _ 5;

%/= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

S1=normrnd(0,sqrt(Ps1/2),1,SP)+j*normrnd(0,sqrt(Ps1/2),1,SP);

S2=normrnd(0,sqrt(Ps2/2),1,SP)+j*normrnd(0,sqrt(Ps2/2),1,SP);

S3=normrnd(0,sqrt(Ps3/2),1,SP)+j*normrnd(0,sqrt(Ps3/2),1,SP);

S4=normrnd(0,sqrt(Ps4/2),1,SP)+j*normrnd(0,sqrt(Ps4/2),1,SP);

S5=normrnd(0,sqrt(Ps5/2),1,SP)+j*normrnd(0,sqrt(Ps5/2),1,SP);

%//

s =[S0;s 1;S2;S3;S4;S5];

ss 1 =[s 1;S2;S3;S4;S5];

x = A * S;%信號加幹擾

XX2 = a 1 * ss 1;接收幹擾百分比

pw _ noise = sqrt(Ps0 * factor _ noise _ targe/2);

a1=randn(N,SP);

a2=randn(N,SP);

a 1 = a 1/範數(a 1);

a2 = a2/norm(a2);

w = Pw _ noise *(a 1+sqrt(-1)* a2);

X = X+W;

%// - SMI算法。

rd = X * S0 '/SP;

r = X * X '/(SP * 1);

Wc_SMI=pinv(R)*Rd。/(Rd ' * pinv(R)* Rd);%權重向量

Wc _ SMI = Wc _ SMI/norm(Wc _ SMI);

y _ SMI = Wc _ SMI ' * X;%SMI算法恢復的信號

%// - GS算法。

m = 1;

因為i=1:400:2000

X2(:,m)=XX2(:,I);

m = m+1;

結束

a =零(1,8);

phi _ n =零(1,8);

phi = 0:pi/180:2 * pi;

θ= 0:pi/180:pi/2;

對於kk=1:8

a(kk)= 1;

phi _ n(kk)= 2 * pi *(kk-1)/8;

結束

x 1 =零(1,8);

x2 =零(1,8);

x3 =零(1,8);

x4 =零(1,8);

x5 =零(1,8);

x1=X2(:,1)';

x2=X2(:,2)';

x3=X2(:,3)';

x4=X2(:,4)';

x5=X2(:,5)';

z 1 = x 1;

z 1 _內部產品=Z1。* conj(z 1);

z 1 _ mode = sqrt(sum(z 1 _ inner _ product));

Y1=Z1。/z 1 _ mode;

內積=總和(x2。* conj(y 1));

z2 = x2-內積* y 1;

Z2 _內積=sum(Z2。* conj(Z2));

Z2 _ mode = sqrt(Z2 _ inner _ product);

Y2=Z2。/Z2 _ mode;

Inner_product1=sum(x3。* conj(y 1));

Inner_product2=sum(x3。* conj(Y2));

z3 = x3-Inner _ product 1 * y 1-Inner _ product 2 * Y2;

Z3 _內積=sum(Z3。* conj(Z3));

Z3 _ mode = sqrt(Z3 _ inner _ product);

Y3=Z3。/Z3 _ mode;

Inner_product1_0=sum(x4。* conj(y 1));

Inner_product2_0=sum(x4。* conj(Y2));

Inner_product3_0=sum(x4。* conj(Y3));

Z4 = x4-Inner _ product 1 _ 0 * y 1-Inner _ product 2 _ 0 * Y2-Inner _ product 3 _ 0 * Y3;

Z4 _內積=sum(Z4。* conj(Z4));

Z4 _ mode = sqrt(Z4 _ inner _ product);

Y4=Z4。/Z4 _ mode;

inner _ product 1 _ 1 = sum(X5。* conj(y 1));

Inner_product2_1=sum(x5。* conj(Y2));

Inner_product3_1=sum(x5。* conj(Y3));

Inner_product4_1=sum(x5。* conj(Y4));

z5 = X5-Inner _ product 1 _ 1 * y 1-Inner _ product 2 _ 1 * Y2-Inner _ product 3 _ 1 * Y3-Inner _ product 4 _ 1 * Y4;

Z5 _內積=sum(Z5。* conj(Z5));

Z5 _ mode = sqrt(Z5 _ inner _ product);

Y5=Z5。/Z5 _ mode;

%Y1

%Y2

%Y3

%Y4

%Y5

w0 =零(1,8);

w =零(1,8);

對於mm = 1:8;

w0(mm)= exp(-j * 2 * pi * R0 * cos(D6-phi _ n(mm))* sin(E6));

結束

dd1=sum(w0。* conj(y 1))* y 1;

dd2 =總和(w0。* conj(Y2))* Y2;

dd3 =總和(w0。* conj(Y3))* Y3;

dd4 =總和(w0。* conj(Y4))* Y4;

dd5 =總和(w0。* conj(Y5))* Y5;

w = w0-DD 1-dd2-dd3-dd4-dd5;

WC _ GS = w;

Wc _ GS = Wc _ GS/(norm(Wc _ GS));

y _ GS = Wc _ GS * X;由%GS算法恢復的圖像

%// - MMSE算法。

rd = X * S0 '/SP;

r = X * X '/(SP * 1);

WC _ MMSE = pinv(R)* Rd;

Wc _ MMSE = Wc _ MMSE/諾姆(Wc _ MMSE);

y _ MMSE = Wc _ MMSE ' * X;用%MMSE算法恢復信號

S0 = S0/norm(S0);

Y _ GS = Y _ GS/norm(Y _ GS);

Y _ SMI = Y _ SMI/norm(Y _ SMI);

Y _ MMSE = Y _ MMSE/諾姆(Y _ MMSE);

%數字(1)

% plot(real(S0));

% title('原始信號');

% xlabel(“采樣的快照數”);

% ylabel(“信號幅度”);

%圖(二)

% plot(real(Y _ SMI));

% title(' SMI算法處理的信號');

% xlabel(“采樣的快照數”);

% ylabel(“信號幅度”);

%圖(三)

% plot(real(Y _ GS));

% title(' G-S算法處理的信號');

% xlabel(“采樣的快照數”);

% ylabel(“信號幅度”);

%圖(4)

% plot(real(Y _ MMSE));

% for i=1:SP

% ss(i)=abs(s0(i)-y_smi(i))^2;

%結束

% q _ 1 =均值(ss);

% for i=1:SP

% ss1(i)=abs(s0(i)-y_gs(i))^2;

%結束

% q _ 2 =均值(ss 1);

% for i=1:SP

% ss2(i)=abs(s0(i)-y_mmse(i))^2;

%結束

% q _ 3 =均值(ss2);

%

% www 1 = www 1+q _ 1;

% www2 = www2+q _ 2;

% ww w3 = ww w3+q _ 3;

%結束

% www1/16000

% www2/16000

% www3/16000

phi = 0:pi/180:2 * pi;

θ= 0:pi/180:pi/2;

%

%// -形成波束。

F_mmse=zeros(91,361);

F_smi=zeros(91,361);

F _ gs =零(91,361);

對於mm=1:91

對於nn=1:361

p 1 = sin(θ(mm));

p2 = cos(phi(nn));

P3 = sin(phi(nn));

q 1 = sin(E6);

Q2 = cos(D6);

Q3 = sin(D6);

對於hh=1:8

w 1 = cos(phi _ n(hh));

w2 = sin(phi _ n(hh));

ZZ 1 = Q2 * w 1+Q3 * w2;

zz2 = p2 * w 1+P3 * w2;

ZZ = zz2 * p 1-ZZ 1 * q 1;

F_mmse(mm,nn)= F_mmse(mm,nn)+conj(Wc _ MMSE(hh))*(exp(j * 2 * pi * R0 *(zz2 * p 1));

F_smi(mm,nn)=F_smi(mm,nn)+conj(Wc _ SMI(hh))*(exp(j * 2 * pi * R0 *(zz2 * p 1));

F_gs(mm,nn)=F_gs(mm,nn)+conj((Wc _ GS(hh))')*(exp(j * 2 * pi * R0 *(zz2 * p 1));

結束

結束

結束

F _ MMSE = ABS(F _ MMSE);

F _ SMI = ABS(F _ SMI);

F _ GS = ABS(F _ GS);

圖(五)

網格(20*log10(F_MMSE))

圖(6)

網格(20*log10(F_SMI))

標題(' SMI算法波束形成');

Xlabel('方位角');

Ylabel('俯仰角');

Zlabel('振幅/dB ');

圖(7)

網格(20*log10(F_GS))

標題(' G-S算法波束形成');

Xlabel('方位角');

Ylabel('俯仰角');

Zlabel('振幅/dB ');

  • 上一篇:四川省達州市大竹縣位於哪個省哪個市
  • 下一篇:海報設計方向怎麽寫?海報設計方案怎麽寫?
  • copyright 2024吉日网官网