资源描述
单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,a,=0.25,,B,b,=2.4,a,=0.5,,B,b,=1.2,a,=1,,B,b,=0.6,a,=2,,B,b,=0.3,高斯滤波器的传输函数,H,(,f,),f=0:0.05:2.5;,y1=exp(-(0.25*f).2);,y2=exp(-(0.5*f).2);,y3=exp(-(f.2);,y4=exp(-(2*f).2);,plot(f,y1,r,f,y2,g,f,y3,b,f,y4,m);,axis(0 2.5 0.7 1);,xlabel(f);ylabel(H(f);,title(Transfer Function of Gaussian Filter);,a,=0.25,a,=0.5,a,=1,a,=2,t=0:0.01:1.5;,y1=sqrt(pi)/0.25*exp(-(pi*t).2)/0.25.2);,y2=sqrt(pi)/0.5*exp(-(pi*t).2)/0.5.2);,y3=sqrt(pi)*exp(-(pi*t).2);,y4=sqrt(pi)/2*exp(-(pi*t).2)/2.2);,plot(t,y1,r,t,y2,g,t,y3,b,t,y4,m);,xlabel(t/T);ylabel(h(t);,title(Impulse Response of Gaussian Filter);,高斯滤波器的冲激响应,h,(,t,),高斯脉冲成形滤波器对矩形脉冲,b,(,t,)的响应波形,g,(,t,),a,=0.25,,B,b,=2.4,a,=0.5,,B,b,=1.2,a,=1,,B,b,=0.6,a,=2,,B,b,=0.3,t1=-1.5:0.01:1.5;,t2=-0.5:0.01:0.5;b1=ones(1,length(t2);,y1=sqrt(pi)/0.25*exp(-(pi*t1).2)/0.25.2);,z1=0.5*(erfc(pi/0.25*(t1-0.5)-erfc(pi/0.25*(t1+0.5);,y2=sqrt(pi)/0.5*exp(-(pi*t1).2)/0.5.2);,z2=0.5*(erfc(pi/0.5*(t1-0.5)-erfc(pi/0.5*(t1+0.5);,y3=sqrt(pi)*exp(-(pi*t1).2);,z3=0.5*(erfc(pi*(t1-0.5)-erfc(pi*(t1+0.5);,y4=sqrt(pi)/2*exp(-(pi*t1).2)/2.2);,z4=0.5*(erfc(pi/2*(t1-0.5)-erfc(pi/2*(t1+0.5);,subplot(3,1,1),plot(t2,b1);axis(-1.5 1.5 0 1.5);xlabel(t/T);ylabel(b(t);,title(rect impulse input of Gaussian pulse shaping filter);,subplot(3,1,2),plot(t1,y1,r,t1,y2,g,t1,y3,b,t1,y4,m);,xlabel(t/T);ylabel(h(t);title(impulse response of Gaussian pulse shaping filter);,subplot(3,1,3),plot(t1,z1,r,t1,z2,g,t1,z3,b,t1,z4,m);xlabel(t/T);ylabel(g(t);,title(output (rect impulse response) of Gaussian pulse shaping filter);,ASK、MSK信号及其功率谱仿真,2、,T,b,=0.1,,f,c,=20时,,比较时域波形和功率谱的情况(差异),注意:,采样频率,f,s,=1000,数据率,R,b,=10,数字角频率=模拟角频率*,T,s,,数字频率=模拟角频率/采样频率=100/1000=0.1,N,为pwelch的谱计算长度,采样数字频率,k,/,N,1、,T,b,=0.1,,f,c,=100时,观察区间,T=,1,功率谱计算方法:, 利用MATLAB的FFT函数, 利用MATLAB的,pwelch,函数,d,(,k,)=1,0,0,01,0,1,1,0,0,采样间隔,T,s,=,0.001,利用MATLAB的FFT函数计算功率谱,t=0.001:0.001:1;Tb=0.1;w0=20*pi/Tb;,c=cos(w0*t);,subplot(7,1,1),plot(t,c);,d=1 -1 -1 -1 1 -1 1 1 -1 -1;,w=d*pi/(2*Tb);,s=2*ones(1,100) zeros(1,100) zeros(1,100) zeros(1,100) ones(1,100) zeros(1,100) ones(1,100) ones(1,100) zeros(1,100) zeros(1,100)-1;,subplot(7,1,2),plot(t,s);,y0=c.*s;,subplot(7,1,3),plot(t,y0);,t1=0.001:0.001:Tb,y1=cos(w0+w(1).*t1);,for i=1:9,z(1)=0,z(i+1)=z(i)+(d(i)-d(i+1)*i*pi/2;,end,y2=cos(w0+w(2).*(t1+Tb)+z(2);,y3=cos(w0+w(3).*(t1+2*Tb)+z(3);,y4=cos(w0+w(4).*(t1+3*Tb)+z(4);,y5=cos(w0+w(5).*(t1+4*Tb)+z(5);,y6=cos(w0+w(6).*(t1+5*Tb)+z(6);,y7=cos(w0+w(7).*(t1+6*Tb)+z(7);,y8=cos(w0+w(8).*(t1+7*Tb)+z(8);,y9=cos(w0+w(9).*(t1+8*Tb)+z(9);,y10=cos(w0+w(10).*(t1+9*Tb)+z(10);,y=y1 y2 y3 y4 y5 y6 y7 y8 y9 y10;,subplot(7,1,4),plot(y);,S=fft(s);,subplot(7,1,5),plot(10*log10(abs(S).2/max(abs(S).2);axis(0 1000 -50 0);,Y0=fft(y0);,subplot(7,1,6),plot(10*log10(abs(Y0).2)/max(abs(Y0).2);axis(0 1000 -50 0);,Y=fft(y);,subplot(7,1,7),plot(10*log10(abs(Y).2/max(abs(Y).2);axis(0 1000 -50 0);,利用MATLAB的pwelch函数计算功率谱,t=0.001:0.001:1;Tb=0.1;w0=10*2*pi/Tb;,c=cos(w0*t);,subplot(7,1,1),plot(t,c);,d=1 -1 -1 -1 1 -1 1 1 -1 -1;,w=d*pi/(2*Tb);,s=2*ones(1,100) zeros(1,100) zeros(1,100) zeros(1,100) ones(1,100) zeros(1,100) ones(1,100) ones(1,100) zeros(1,100) zeros(1,100)-1;,subplot(7,1,2),plot(t,s);,y0=c.*s;,subplot(7,1,3),plot(t,y0);,t1=0.001:0.001:Tb,y1=cos(w0+w(1).*t1);,for i=1:9,z(1)=0,z(i+1)=z(i)+(d(i)-d(i+1)*i*pi/2;,end,y2=cos(w0+w(2).*(t1+Tb)+z(2);,y3=cos(w0+w(3).*(t1+2*Tb)+z(3);,y4=cos(w0+w(4).*(t1+3*Tb)+z(4);,y5=cos(w0+w(5).*(t1+4*Tb)+z(5);,y6=cos(w0+w(6).*(t1+5*Tb)+z(6);,y7=cos(w0+w(7).*(t1+6*Tb)+z(7);,y8=cos(w0+w(8).*(t1+7*Tb)+z(8);,y9=cos(w0+w(9).*(t1+8*Tb)+z(9);,y10=cos(w0+w(10).*(t1+9*Tb)+z(10);,y=y1 y2 y3 y4 y5 y6 y7 y8 y9 y10;,subplot(7,1,4),plot(y);,N=4096;Fn=(-0.5:1/N:0.5-1/N);,Y=pwelch(y,hamming(33),16,N,whole);,Y=10*log10(Y/max(Y)+0.000001);,S=pwelch(s,hamming(33),16,N,whole);,S=10*log10(S/max(S)+0.000001);,Y0=pwelch(y0,hamming(33),16,N,whole);,Y0=10*log10(Y0/max(Y0)+0.000001);,subplot(7,1,5),plot(Fn,fftshift(S);,subplot(7,1,6),plot(Fn,fftshift(Y0);,subplot(7,1,7),plot(Fn,fftshift(Y);,利用MATLAB的pwelch函数计算功率谱,利用MATLAB的pwelch函数计算功率谱,t=0.001:0.001:1;Tb=0.1;w0=10*2*pi/Tb;,c=cos(w0*t);,d=1 -1 -1 -1 1 -1 1 1 -1 -1;,w=d*pi/(2*Tb);,s=2*ones(1,100) zeros(1,100) zeros(1,100) zeros(1,100) ones(1,100) zeros(1,100) ones(1,100) ones(1,100) zeros(1,100) zeros(1,100)-1;,y0=c.*s;,t1=0.001:0.001:Tb,y1=cos(w0+w(1).*t1);,for i=1:9,z(1)=0,z(i+1)=z(i)+(d(i)-d(i+1)*i*pi/2;,end,y2=cos(w0+w(2).*(t1+Tb)+z(2);,y3=cos(w0+w(3).*(t1+2*Tb)+z(3);,y4=cos(w0+w(4).*(t1+3*Tb)+z(4);,y5=cos(w0+w(5).*(t1+4*Tb)+z(5);,y6=cos(w0+w(6).*(t1+5*Tb)+z(6);,y7=cos(w0+w(7).*(t1+6*Tb)+z(7);,y8=cos(w0+w(8).*(t1+7*Tb)+z(8);,y9=cos(w0+w(9).*(t1+8*Tb)+z(9);,y10=cos(w0+w(10).*(t1+9*Tb)+z(10);,y=y1 y2 y3 y4 y5 y6 y7 y8 y9 y10;,N=4096;,Fn=-0.5:1/N:0.5-1/N;,Y=pwelch(y,hamming(33),16,N,whole);,Y=10*log10(Y/max(Y)+0.000001);,S=pwelch(s,hamming(33),16,N,whole);,S=10*log10(S/max(S)+0.000001);,Y0=pwelch(y0,hamming(33),16,N,whole);,Y0=10*log10(Y0/max(Y0)+0.000001);,plot(Fn,fftshift(Y0),g,Fn,fftshift(Y),b,Fn,fftshift(S),r);grid on;,
展开阅读全文