实验4连续信号与系统的频域分析及MATLAB实现一、实验目的:1.用MATLAB实现非周期连续信号的傅里叶变换,并绘制出幅度谱和相位谱,利用仿真结果进一步加深对理论知识的理解。2.掌握连续信号傅里叶变换的数值近似计算方法,并验证傅里叶变换的各项性质。3.掌握求解连续时间系统的频响函数H(jw)的方法,并绘图分析频响函数的特性。二、实验内容10.1(3):程序:symstvwxphaseimre;f=[sin(2*pi*t)/(2*pi*t)]^2;Fw=fourier(f)subplot(311);ezplot(f)axis([-pipi-12]);title('原图');subplot(312);ezplot(abs(Fw))axis([-66-11]);title('幅度谱');im=imag(Fw)re=real(Fw)phase=atan(im/re)subplot(313);ezplot(phase)axis([-66-11]);title('相位谱');w=1/8/pi*(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w))im=-1/2*i*(1/8/pi*(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w))-1/8/pi*conj(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w)))re=1/16/pi*(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w))+1/16/pi*conj(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w))phase=-i*atanh(1/2*(1/8/pi*(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w))-1/8/pi*conj(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w)))/(1/16/pi*(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w))+1/16/pi*conj(-(-w+4*pi)*heaviside(w-4*pi)-(-w-4*pi)*heaviside(w+4*pi)-2*w*heaviside(w))))10.2(1)程序:symstw;F=8*(sin(w/4))^2/(w)^2;f=ifourier(F,t)ezplot(f);axis([-11-0.31]);title('时域波形')f=(2*t+1)*heaviside(t+1/2)+(2*t-1)*heaviside(t-1/2)-4*t*heaviside(t)10.4程序:dt=0.005;t=-2:dt:2;f1=Heaviside(t+1)-Heaviside(t-1);subplot(2,2,1)plot(t,f1)axis([-2201.5]);title('f1(t)');f=dt*conv(f1,f1)n=-4:dt:4;subplot(2,2,2)plot(n,f)title('f(t)=f1(t)*f1(t)');axis([-4402.5]);W1=2*pi*5;N=200;k=-N:N;W=k*W1/N;F1=f1*exp(-j*t'*W)*dt;F1=abs(F1)F=f*exp(-j*n'*W)*dt;F=abs(F)F=F.*Fsubplot(2,2,3)plot(W,F1)subplot(2,2,4)plot(W,F)axis([-10*pi10*pi010]);axis([-10*pi10*pi020]);10.5程序:b=[002];a=[0.040.42];[h,w]=freqs(b,a,100);h1=abs(h);h2=angle(h);subplot(2,1,1)plot(w,h1)holdonaxis([06001.6]);gridxlabel('角频率');ylabel('幅度');title('幅频特性');subplot(2,1,2)plot(w,h2*180/pi)axis([0150-2500]);gridxlabel('角频率');ylabel('幅度');title('相频特性');实验小结:通过实验我对理论知识有了更深刻的理解,当周期信号的周期无限增大时,周期信号就转换为非周期信号。对于非周期信号T趋于无穷大,由于各次谐波幅度将趋近与无穷小,各谱线之间的间隔也趋近于0。同时掌握连续信号傅里叶变换的数值近似计算方法和求解连续时间系统的频响函数H(jw)的方法,并绘图分析频响函数的特性。