• 泰勒综合


      1 %%
      2 % Taylor Taper
      3 
      4 clc;
      5 clear all;
      6 close all;
      7 format long;
      8 
      9 N = 48;
     10 M = 10000;
     11 d = 1/2;
     12 L = (N-1)*d;% antenna length 
     13 theta = 0:pi/M:pi;% 
     14 x = L*cos(theta);
     15 f0 = 1e9;
     16 %lambda = 3e8/f0;
     17 %d = lambda/2;% elements spacing
     18 k =2*pi;% wave constant
     19 R = 25; % amplitude ration between mainbeam and sidelobe , dB
     20 A = acosh(10^(R/20))/pi;
     21 % T = cos(pi*sqrt(x.^2-A^2));
     22 % af = 20*log10(abs(T)/max(T));
     23 % error = 0.001;
     24 % % af=U;
     25 % pos1_3dB = [];
     26 % pos_max = find(max(af)==af);
     27 % while(isempty(pos1_3dB))
     28 %     pos1_3dB = find(abs(((af(1:pos_max)-af(pos_max)))+3) < error);
     29 %     error = error + 0.001;
     30 % end
     31 % error = 0.001;
     32 % pos2_3dB = [];
     33 % while(isempty(pos2_3dB))
     34 %     pos2_3dB = find(abs(((af(pos_max:end)-af(pos_max)))+3) < error);
     35 %     error = error + 0.001;
     36 % end
     37 % BeamWidth= (theta(pos2_3dB(1)+pos_max)-theta(pos1_3dB(end)))/pi*180;
     38 % figure;
     39 % plot(theta,af);
     40 % hold on;
     41 % str = strcat('L=', num2str(L),'lambda, SLL = -',num2str(R) ,'dB ');
     42 % bw = strcat('mainbeam beamwidth=',num2str(BeamWidth),'degree ');
     43 % text(pi*2/3,-5,str,'fontsize',12);
     44 % text(pi*2/3,-8,bw,'fontsize',12);
     45 % title('Radiation Pattern of an Idealized Equvialent Sidelobe Array ');
     46 % xlabel('Phase');
     47 % ylabel('Amplitude');
     48 % ylim([-60 0]);
     49 %%
     50 % Taylor synthesis
     51 % theta = -pi/2:0.01:pi/2;% 
     52 % x = L*cos(theta);
     53 
     54  n1 =ceil(A^2*2+1.5);% the first 3 sidelobes have almost same amplitude
     55 %n1 =3;
     56 sigma = n1/sqrt(A^2+(n1-0.5)^2);
     57 xn = zeros(1,n1-1);
     58 for j = 1:1:n1-1
     59  xn(j) = sigma*sqrt(A^2+(j-0.5)^2);
     60 %  xn(j) = j*sqrt(A^2+(j-0.5).^2)/sqrt(A^2+(n1-0.5).^2);
     61 end
     62 for i = 1:1:length(x)
     63     if x(i) ~= 0
     64         T(i) = sin(pi*x(i))/pi/x(i)*cosh(pi*A);
     65         for j = 1:1:n1-1
     66         T(i) = T(i)*(1-(x(i)/xn(j))^2)/(1-(x(i)/j)^2);
     67         end
     68     else
     69         T(i) = cosh(pi*A);
     70         for j = 1:1:n1-1
     71         T(i) = T(i)*(1-(x(i)/xn(j))^2)/(1-(x(i)/j)^2);
     72         end
     73     end
     74 end
     75 T = T / max(T);
     76 
     77 I =ones(1,N);
     78 % zn = zeros(1,N);
     79 for i = 1:1:N
     80      if mod(N,2) == 1
     81         zn = abs((i-(N+1)/2)*d*2/L);
     82      else
     83         %#zn = (i-(N+1)/2)*d
     84         if i < (N+1)/2
     85             zn = (2*abs((N/2+1)-i)-1)*d/L;
     86         else
     87             zn = (2*abs(i-N/2)-1)*d/L;
     88         end
     89      end
     90     for j = 1:1:n1-1
     91         I(i) = I(i) + 2*T((find( min(abs(x-j))==abs(x-j))))*cos(j*pi*zn);
     92     end
     93 end
     94  I = I/max(I)
     95 af = 20*log10(abs(T));
     96 
     97 error = 0.0001;
     98 % af=U;
     99 pos1_3dB = [];
    100 pos_max = find(max(af)==af);
    101 while(isempty(pos1_3dB))
    102     pos1_3dB = find(abs(((af(1:pos_max)-af(pos_max)))+3) < error);
    103     error = error + 0.0001;
    104 end
    105 error = 0.0001;
    106 pos2_3dB = [];
    107 while(isempty(pos2_3dB))
    108     pos2_3dB = find(abs(((af(pos_max:end)-af(pos_max)))+3) < error);
    109     error = error + 0.0001;
    110 end
    111  HP = 2*asind(sigma/L/pi*sqrt((acosh(10^(R/20)))^2-(acosh(10^(R/20)/sqrt(2)))^2));
    112 
    113 BeamWidth= (theta(pos2_3dB(1)+pos_max)-theta(pos1_3dB(end)))/pi*180;
    114 figure;
    115 plot(theta/pi*180,af);
    116 grid on;
    117 hold on;
    118 str = strcat('L=', num2str(L),'lambda, SLL = -',num2str(R) ,'dB ');
    119  bw = strcat('mainbeam beamwidth=',num2str(BeamWidth),'degree, value in theroy is ',num2str(HP),'degree');
    120 text(pi*2/3,-5,str,'fontsize',12);
    121  text(pi*2/3,-8,bw,'fontsize',12);
    122 title('Radiation Pattern of Taylor Synthesis Array ');
    123 xlabel('Phase');
    124 ylabel('Amplitude');
    125 ylim([-60 0]);
    126 figure;
    127 plot(I);
    128 grid on;
    129 title('激励')
    130 % HP = 2*asind(sigma/L/pi*sqrt((acosh(10^(R/20)))^2-(acosh(10^(R/20)/sqrt(2)))^2));
    131 % HP*L/sigma
    132 % BeamWidth*L/sigma
    133 %%
    134 % 
    135 radiation_pattern(I);
    136 % amp = I;
    137 % af = zeros(1,length(theta));
    138 % a = 0;
    139 % b = 0;
    140 % for j = 1:1:N
    141 %     a= a+amp(j);
    142 %     b = b + power(amp(j),2);
    143 %     af = af+ exp(1i*(j-1)*k*d*cos(theta))*amp(j);
    144 % end
    145 % af = abs(af/max(af) );
    146 % af = 20*log10(abs(af));
    147 
    148 % error = 0.0001;
    149 % % af=U;
    150 % pos1_3dB = [];
    151 % pos_max = find(max(af)==af);
    152 % while(isempty(pos1_3dB))
    153 %     pos1_3dB = find(abs(((af(1:pos_max)-af(pos_max)))+3) < error);
    154 %     error = error + 0.0001;
    155 % end
    156 % error = 0.0001;
    157 % pos2_3dB = [];
    158 % while(isempty(pos2_3dB))
    159 %     pos2_3dB = find(abs(((af(pos_max:end)-af(pos_max)))+3) < error);
    160 %     error = error + 0.0001;
    161 % end
    162 % % HP = 2*asind(sigma/L/pi*sqrt((acosh(10^(R/20)))^2-(acosh(10^(R/20)/sqrt(2)))^2));
    163 % 
    164 % BeamWidth= (theta(pos2_3dB(1)+pos_max)-theta(pos1_3dB(end)))/pi*180;
    165 % figure;
    166 % plot(theta/pi*180,af);
    167 % grid on;
    168 % hold on;
    169 % str = strcat('L=', num2str(L),'lambda, SLL = -',num2str(R) ,'dB ');
    170 %  bw = strcat('mainbeam beamwidth=',num2str(BeamWidth),'degree, value in theroy is ',num2str(HP),'degree');
    171 % text(pi*2/3,-5,str,'fontsize',12);
    172 %  text(pi*2/3,-8,bw,'fontsize',12);
    173 % title('Radiation Pattern of Taylor Synthesis Array ');
    174 % xlabel('Phase');
    175 % ylabel('Amplitude');
    176 % ylim([-60 0]);
    177 %  
    178 % % HP = 2*asind(sigma/L/pi*sqrt((acosh(10^(R/20)))^2-(acosh(10^(R/20)/sqrt(2)))^2));
    179 % % HP*L/sigma
    180 % % BeamWidth*L/sigma

     

  • 相关阅读:
    201911320《信息安全专业导论》第二周学习总结
    20191330自我介绍
    20191218 实验四《Python程序设计》实验报告
    20191218 2019-2020-2 《Python程序设计》实验三报告
    20191218 实验二《Python程序设计》实验报告
    20191218 实验一 《Python程序设计》实验报告
    2019-2020-1学期 20192420《网络空间安全专业导论》第四周读书笔记
    2019-2020第一学期小组讨论--程序设计层6、7章
    20192415 2020-2021-2 《Python程序设计》实验4报告
    20192415 2020-2021-2 《Python程序设计》实验3报告
  • 原文地址:https://www.cnblogs.com/hiramlee0534/p/6804365.html
Copyright © 2020-2023  润新知