系统建模与仿真作业

内容发布更新时间 : 2024/12/23 4:08:25星期一 下面是文章的全部内容请认真阅读。

end for n=1:N

y(1:M,n)=gaussian(M)';%系统噪声服从高斯分布 end for n=1:N

z(1:M,n)=swerling2pu(M)'; %地物杂波服从swerling2型分布 end s=v+g+y+z; [m,n]=size(s); x=zeros(1,m*n); q=zeros(1,m*n); x=s(:)'; q=g(:)'; p=x;

i=0:length(p)-1; subplot(2,1,1);

plot(i,x),title('目标回波信号'); %目标回波信号x subplot(2,1,2); l=canshu(x); b=x-l(1);

plotpu(b),title('目标回波频谱');

function y=gaofang(s,f0,fs,f1)%高频放大器 [M,N]=size(s);

Vgain=3; %高放增益 w1=(f0-4*f1/3)*2*pi/fs; %w1=26pi/45 w3=(f0-f1/3)*2*pi/fs; %w3=29pi/45

w2=(f0+7*f1/3)*2*pi/fs; %w2=37pi/45 w4=(f0+4*f1/3)*2*pi/fs; %w4=34pi/45

th=min((w3-w1),(w2-w4));%w3-w1=pi/15,w2-w4=pi/15 M1=ceil(6.6*pi/th)+1; %M1=99

w5=(w1+w3)/2;w6=(w4+w2)/2;%w5=11pi/18,w6=71pi/90 h=wide(w6,M1)-wide(w5,M1); w=(hamming(M1))'; h=h.*w; L=length(h); s=Vgain*s; z=zeros(M+L-1,N); y=zeros(M,N); K=ceil(L/2); for i=1:N for j=1:10

z(1+(j-1)*M/10:j*M/10+L-1,i)=conv(h,s(1+(j-1)*M/10:j*M/10,i)')';

y(1+(j-1)*M/10:j*M/10,i)=z(1+(j-1)*M/10+K:j*M/10+K,i); end end w=y(:)'; subplot(3,1,1); i=0:length(w)-1; plot(i,w),title('高放'); subplot(3,1,2);

plotpu(w),title('频谱'); subplot(3,1,3);

plotpu(h),title('幅频特性');

function y=hunpin(s,f0,fs,f1)%进行混频,输出为中频信号 [M,N]=size(s); i=0:M-1;

z1=cos(2*pi*2*f0*i/3/fs); y1=zeros(M,N); for i=1:N

y1(1:M,i)=(z1.*s(1:M,i)')'; end

w1=(f0-5*f1)*2*pi/(3*fs);%w1=pi/9 w3=(f0-2*f1)*2*pi/(3*fs);%w3=1.6pi/9 w2=(f0+8*f1)*2*pi/(3*fs);%w2=0.4pi w4=(f0+5*f1)*2*pi/(3*fs);%w4=pi/3

th=min((w3-w1),(w2-w4)); %w3-w1=0.2pi/3,w2-w4=0.2pi/3 M1=ceil(6.6*pi/th)+1; %M1=99

w5=(w1+w3)/2;w6=(w4+w2)/2;%w5=1.3pi/9,w6=1.1pi/3 h=wide(w6,M1)-wide(w5,M1); wth=(hamming(M1))'; h=h.*wth; L=length(h); z=zeros(M+L-1,N); y=zeros(M,N); K=ceil(L/2); for i=1:N for j=1:10

z(1+(j-1)*M/10:j*M/10+L-1,i)=conv(h,s(1+(j-1)*M/10:

j*M/10,i)')';

y(1+(j-1)*M/10:j*M/10,i)=z(1+(j-1)*M/10+K:j*M/10+K,i); end end w=y(:)'; v=y1(:)'; subplot(4,1,1); i=0:length(w)-1; plot(i,w),title('混频'); subplot(4,1,2);

plotpu(v),title('频谱'); subplot(4,1,3); plotpu(w); subplot(4,1,4);

plotpu(h),title('幅频特性');

function y=zhongfang(s,f0,fs,f1)%中频放大器 [M,N]=size(s);

Vgain=5; %中放增益 w1=(f0-5*f1)*2*pi/(3*fs);%w1=pi/9 w3=(f0-2*f1)*2*pi/(3*fs);%w3=1.6pi/9 w2=(f0+8*f1)*2*pi/(3*fs);%w2=0.4pi w4=(f0+5*f1)*2*pi/(3*fs);%w4=pi/3

th=min((w3-w1),(w2-w4)); %w3-w1=0.2pi/3,w2-w4=0.2pi/3 M1=ceil(6.6*pi/th)+1; %M1=99

w5=(w1+w3)/2;w6=(w4+w2)/2;%w5=1.3pi/9,w6=1.1pi/3 h=wide(w6,M1)-wide(w5,M1);

w=(hamming(M1))'; h=h.*w; L=length(h); s=Vgain*s; z=zeros(M+L-1,N); y=zeros(M,N); K=ceil(L/2); for i=1:N for j=1:10

z(1+(j-1)*M/10:j*M/10+L-1,i)=conv(h,s(1+(j-1)*M/10:j*M/10,i)')';

y(1+(j-1)*M/10:j*M/10,i)=z(1+(j-1)*M/10+K:j*M/10+K,i); end end w=y(:)'; subplot(3,1,1); i=0:length(w)-1; plot(i,w),title('中放'); subplot(3,1,2);

plotpu(w),title('频谱'); subplot(3,1,3);

plotpu(h),title('幅频特性');

function [I,Q]=xiangganjianbo(s,fs,f0,f1)%相位相干检波 [M,N]=size(s); i=0:M-1;

z1=cos(2*pi*f0*i/(3*fs));

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4 ceshi