系统建模与仿真作业 下载本文

plot(i,w2);

function y=qumo(x1,x2)%对两路信号进行取模运算合成一路信号 [M,N]=size(x1); for i=1:N

y(1:M,i)=sqrt(x1(1:M,i).^2+x2(1:M,i).^2); end w=y(:)';

i=0:length(w)-1; plot(i,abs(w));

function y=jilei(x)%做积累 [M,N]=size(x); N1=N/10; y=zeros(M,N1); for i=1:N1 for j=1:10

y(1:M,i)=y(1:M,i)+x(1:M,i*j); end end w=y(:)';

i=0:length(w)-1; plot(i,w);

function y=CFAR(x)%作恒虚警处理 n=length(x); for i=1:n

if(x(i)>=10^3) y(i)=x(i); else y(i)=0; end end w=y(:); i=1:length(w); plot(i,w);

function y=u(n)%发射信号包络函数 if (n>=0) y=1; elsey=0; end

function h=wide(w,M) a=(M-1)/2; n=[0:1:(M-1)]; m=n-a+eps;

h=sin(w*m)./(pi*m);

function leidaxitong%总的雷达系统仿真 figure(1);

[h,s1,g,f0,fs,f1]=huibo;%,title('目标回波'); figure(2);

y1=gaofang(s1,f0,fs,f1);%,title('高放'); figure(3);

y2=hunpin(y1,f0,fs,f1);%,title('混频');

figure(4);

y3=zhongfang(y2,f0,fs,f1);%,title('中放'); figure(5);

[I,Q]=xiangganjianbo(y3,fs,f0,f1);%,title('相干检波'); [x4,y4]=AD(I,Q); figure(6);

[I1,Q1]=maichongyasuo(x4,y4,h);%,title('脉冲压缩'); figure(7);

[y5,y6]=MTI(I1,Q1);%,title('MTI'); figure(8);

y7=qumo(y5,y6),title('取模'); figure(9);

y8=jilei(y7),title('脉冲积累'); figure(10);

y9=CFAR(y8),title('恒虚警');