%% 远距离支援干扰仿真 dread=pi/180; %角度转弧度 radeg=180/pi; %弧度转角度 Pt=1000e3; %%雷达发射功率w Gt=40; %%雷达天线主瓣方向上的增益db Gt_coef=10^(Gt/10); Pj=2000; %%干扰机发射功率w Gj=20; %%干扰机天线主瓣方向上的增益db Gj_coef=10^(Gj/10); gamaj=0.5; %%干扰信号对雷达天线的极化损失 sigma=5; %%被掩护目标的雷达有效反射面积 H=8e3; %%干扰机的天线与雷达的高度差m h=8e3; %%被保护目标相对干扰机高度m Dj=300e3; %%干扰机的天线与雷达的水平距离m Kj=10; dfjddfr=2; %%△fj和△fr分别干扰信号和雷达接收机的中频带宽 theta_mid=5; k=0.1; A=sqrt((Pt*Gt_coef*sigma*Kj*dfjddfr)/(4*pi*Pj*Gj_coef*gamaj)); Ht=H-h; Dt0=zeros(1,360); for i=1:length(Dj) Rj=sqrt(Dj(i)^2+H^2); for theta=-179:1:180 if(0<=abs(theta)&&abs(theta)<=theta_mid/2) Dt0(:,theta+180)=sqrt(A*Rj-Ht^2); elseif(theta_mid/2<abs(theta)&& abs(theta)<=90) Dt0(:,theta+180)=sqrt((A*Rj/(sqrt(k)*theta_mid))*abs(theta)-Ht^2); else Dt0(:,theta+180)=sqrt(90*(A*Rj/(sqrt(k)*theta_mid))-Ht^2); end end figure theta=(-179:1:180)*dread; polarplot(theta,Dt0); rticks(50e3:50e3:200e3); rticklabels({'r = 50km','r = 100km','r = 150km'}) end sigma1=[5 10 20 30 40]; figure for i=1:length(sigma1) A=sqrt((Pt*Gt_coef*sigma1(i)*Kj*dfjddfr)/(4*pi*Pj*Gj_coef*gamaj)); Djj=(50:10:600)*1e3; Rmax=zeros(1,length(Djj)); for j=1:length(Djj) Rj=sqrt(Djj(j)^2+H^2); Rmax(:,j)=sqrt(90*(A*Rj/(sqrt(k)*theta_mid))-Ht^2); end scatter(Djj/1e3,Rmax/1e3); hold on end title('干扰机雷达水平距离与最大探测距离的关系'); xlabel('干扰机距雷达水平距离/km');ylabel('雷达最大探测距离/km') xlim([50,600]) legend('5','10','20','30','40') %%% fig 5 hh=0:0.2:8; Rmax1=zeros(1,length(hh)); for l=1:length(hh) Ht=H-hh(l)*1e3; Rmax1(:,l)=sqrt(90*(A*Rj/(sqrt(k)*theta_mid))-Ht^2); end figure scatter(hh,Rmax1/1e3)转换成C代码
时间: 2024-04-10 18:29:12 浏览: 101
#include <stdio.h>
#include <math.h>
#define PI 3.59265358979323846int main()
{
double dread = / 180; //度转弧度
double radeg 180 / PI; //弧度转角度 double Pt = 1000e3 //雷达发射率w
double Gt = 40; //雷达天线主瓣方向上的增益db
double Gt_coef = pow(10, Gt / 10);
double Pj = 2000; //干扰机发射功率w
double Gj = 20; //干扰机天线主瓣方向上的增益db
double Gj_coef = pow(10, Gj / 10);
double gamaj = 0.5; //干扰信号对雷达天线的极化损失
double sigma = 5; //被掩护目标的雷达有效反射面积
double H = 8e3; //干扰机的天线与雷达的高度差m
double h = 8e3; //被保护目标相对干扰机高度m
double Dj = 300e3; //干扰机的天线与雷达的水平距离m
double Kj = 10;
double dfjddfr = 2; //△fj和△fr分别干扰信号和雷达接收机的中频带宽
double theta_mid = 5;
double k = 0.1;
double A = sqrt((Pt * Gt_coef * sigma * Kj * dfjddfr) / (4 * PI * Pj * Gj_coef * gamaj));
double Ht = H - h;
double Dt0[360];
for (int i = 0; i < 360; i++)
{
double theta = (i - 179) * dread;
if (0 <= fabs(theta) && fabs(theta) <= theta_mid / 2)
{
Dt0[i] = sqrt(A * Rj - pow(Ht, 2));
}
else if (theta_mid / 2 < fabs(theta) && fabs(theta) <= 90)
{
Dt0[i] = sqrt((A * Rj / (sqrt(k) * theta_mid)) * fabs(theta) - pow(Ht, 2));
}
else
{
Dt0[i] = sqrt(90 * (A * Rj / (sqrt(k) * theta_mid)) - pow(Ht, 2));
}
}
for (int i = 0; i < 360; i++)
{
double theta = (i - 179) * dread;
printf("theta: %.2f, Dt0: %f\n", theta, Dt0[i]);
}
return 0;
}
阅读全文