matlab实现矩量法求解Hallen方程一、条件和计算目标已知:对称振子天线长为L,半径为a,且天线长度与波长的关系为5.0L,aLa,,设1,半径a=0.0000001,因此波数为2/2k。目标:用Hallen方程算出半波振子、全波振子以及不同/L值的对应参数值。求:(1)电流分布(2)E面方向图(二维),H面方向图(二维),半波振子空间方向性图(三维)二、对称振子放置图图1半波振子的电流分布半波振子天线平行于z轴放置,在x轴和y轴上的分量都为零,坐标选取方式有两种形式,一般选取图1的空间放置方式。图1给出了天线的电流分布情况,由图可知,当天线很细时,电流分布近似正弦分布。三、Hallen方程的解题思路210''''12,cossinsin'zzizzzzizkzGzzdzckzckzEkzzdzj对于中心馈电的偶极子,Hallen方程为22'1222('),'cossinsin,2LLiLLVizGzzdzckzckzkzzj脉冲函数展开和点选配,得到1121,''cossinsin,1,2,,2nnNzinmmmmznVIGzzdzckzckzkzmNj上式可以写成1122,1,2,,NnmnmmmnIpcqcstmN矩阵形式为xyl/2l/2馈电端~电流分布NNNNNNNNNNNttttccIIIsqpppsqpppsqppp121211321,322,21,223221,11,11312,,,,,,,,,,,,,四、结果图与程序MATLAB程序:clc;clearallclf;tic;%计时lambda=1;N=31;a=0.0000001;%已知天线和半径ii=1;forh=0.2:0.1:0.9L=h*lambda;len=L/N;%将线分成奇数段,注意首末两端的电流为0e0=8.854e-012;u0=4*pi*10^(-7);k=2*pi/lambda;c=3e+008;w=2*pi*c;%光速,角频率ata=sqrt(u0/e0);z(1)=-L/2+len/2;forn=2:Nz(n)=z(n-1)+len;endform=1:Nforn=1:Nif(m==n)p(m,n)=log(len/a)/(2*pi)-j*k*len/4/pi;elser(m,n)=sqrt((z(m)-z(n))^2+a^2);p(m,n)=len*exp(-j*k*r(m,n))/(4*pi*r(m,n));endendendform=1:Nq(m)=cos(k*z(m));s(m)=sin(k*z(m));t(m)=sin(k*abs(z(m)))/(j*2*ata);endpp=p(N+1:N^2-N);pp=reshape(pp,N,N-2);mat=[pp,q',s'];%构造矩阵I=mat\t';II=[0;I(1:N-2);0];%加上两端零电流Current=abs(II);x=linspace(-L/2,L/2,N);figure(1);string=['b','g','r','y','c','k','m','r'];string1=['ko','bo','yo','co','mo','ro','go','bo'];plot(x,Current,string(ii),'linewidth',1.3);xlabel('L/\lambda'),ylabel('电流分布');gridonholdon%legend('L=0.1\lambda','L=0.2\lambda','L=0.3\lambda','L=0.4\lambda','L=0.5\lambda','L=0.6\lambda','L=0.7\lambda','L=0.8\lambda','L=0.9\lambda','L=1\lambda')legend('L=0.1\lambda','L=0.3\lambda','L=0.5\lambda','L=0.7\lambda','L=0.9\lambda','L=1.1\lambda','L=1.3\lambda','L=1.5\lambda')Zmn=1/I((N+1)/2);%%%%%%V=1vtheta=linspace(0,2*pi,360);form=1:360forn=1:NF1(m,n)=II(n).*exp(j*k*z(n)*cos(m*pi/180))*len*sin(m*pi/180);endendF2=-sum(F1');F=F2/max(F2);%%%归一化figure(2);polar(theta,abs(F),string(ii));title('E面归一化方向图')view(90,-90)%legend('L=h\lambda','L=0.3\lambda','L=0.3\lambda','L=0.4\lambda','L=0.5\lambda','L=0.6\lambda','L=0.7\lambda','L=0.8\lambda','L=0.9\lambda','L=1\lambda')legend('L=0.1\lambda','L=0.3\lambda','L=0.5\lambda','L=0.7\lambda','L=0.9\lambda','L=1.1\lambda','L=1.3\lambda','L=1.5\lambda')holdonfigure(3)kk=1;forphi=0:pi/180:2*piforn=1:NFF(n)=II(n)*len*exp(i*k*len*n*cos(pi/2))*sin(pi/2);end;FFF(kk)=sum(FF);kk=kk+1;end;phi=0:pi/180:2*pi;polar(phi,FFF/max(abs(FFF)),string(ii));title('不同L/\lambdaH-planepattern,F({\theta},{\phi}),\theta=90');legend('L=0.1\lambda','L=0.3\lambda','L=0.5\lambda','L=0.7\lambda','L=0.9\lambda','L=1.1\lambda','L=1.3\lambda','L=1.5\lambda')holdonfigure(4)polar(phi,FFF/max((FFF)),string(ii));title(‘归一化H-planepattern,F({\theta},{\phi}),\theta=90');holdonfigure(5)mm=1;fortheta=0:0.01*pi:pi;forn=1:NE(1,n)=2*pi*c*u0*len/(4*pi*1)*(exp(-i*k*1)*exp(i*k*len*n*cos(theta))*sin(theta));endEE=E*II;G(mm)=(4*pi*1^2)/ata/abs(II((N-1)/2+1))^2/(-real(Zmn))*abs(EE)^2;mm=mm+1;endendtoc