收藏 分销(赏)

MATLAb连续时间傅里叶变换优秀PPT.ppt

上传人:a199****6536 文档编号:10239232 上传时间:2025-04-29 格式:PPT 页数:113 大小:3.31MB
下载 相关 举报
MATLAb连续时间傅里叶变换优秀PPT.ppt_第1页
第1页 / 共113页
MATLAb连续时间傅里叶变换优秀PPT.ppt_第2页
第2页 / 共113页
点击查看更多>>
资源描述
Click to edit Master title style,Click to edit Master text styles,Second level,Third level,Fourth level,Fifth level,*,Signals and Systems,EE BUPT,EE of BUPT,MATLAB,在信号与系统课程中的应用,第八章 连续时间傅里叶变换,1,连续时间傅里叶变换(,CTFT,),将连续时间,傅里叶级数,(CTFS),推广到既能对,周期,连续时间信号,又能对,非周期,连续时间信号进行频谱分析。这是一种重要而强有力的方法,因为有很多信号当从时域来看时呈现出很复杂的结构,但,从频域来看却很简单,。另外,许多,LTI,系统的特性行为在频域要比在时域容易理解得多。为了更有效地应用频域方法,重要的是要将信号的时域特性是如何与它的频域特性,联系,起来的建立,直观的认识,。,2,频谱计算中的问题,连续,离散(抽样,抽样间隔如何选取?),无穷积分,有限长(截断),3,8.1,连续时间傅里叶变换的数值近似,4,傅里叶变换的近似表示,5,8.2,连续时间信号的采样,6,8.3,理想抽样信号的傅里叶变换(利用卷积定理),7,冲激抽样信号的频谱,8,说明,9,抽样定理,10,8.4 DTFT,的引出(利用时移性质),DTFT:Discrete-time Fourier transform,为研究离散时间系统的频率响应作准备,从抽样信号的傅里叶变换引出:,11,离散时间信号的傅里叶变换,DTFT,就是抽样信号的傅立叶变换。,12,比较,13,利用快速傅里叶变换计算频谱,14,fft,函数,FFT Discrete Fourier transform.,FFT(X),is the discrete Fourier transform(DFT)of vector X.For matrices,the FFT operation is applied to each,column,.For N-D arrays,the FFT operation operates on the first non-singleton dimension.,FFT(X,N),is the N-point FFT,padded with zeros if X has less than N points and truncated if it has more.,FFT,实现的是,DTFT,的一个周期的抽样,实际的频谱近似为,15,fft,函数的使用说明,16,补充说明,17,例题,解:,18,19,画图(利用解析式),%ss8_2.m and double_side_exp_spectrum.m,Ts=,0.05,;t=-5:Ts:5;,x=,exp(-2*abs(t),;subplot(2,1,1);,h=plot(t,x);set(h,linewidth,2);,xlabel(t/s);ylabel(exp(-2|t|);,N=256;,w=-pi/Ts+(0:N-1)/N*(2*pi/Ts),;,X=,4./(w.*w+4),;,subplot(2,1,2);h=plot(w,X);,set(h,linewidth,2);,xlabel(,omega,rad/s);ylabel(X(jomega);,20,抽样间隔如何选取?,21,(b),%exe4_2_bcde.m,clear;,T=10;Ts=0.01;,t=(-T/2):Ts,:(T/2-Ts),;,N,=length(t);,x=exp(-2*abs(t);,22,X=,fft,(x,N);,X=Ts*,fftshift,(X);,w=-pi/Ts+(0:N-1)/N*(2*pi/Ts);,23,SEMILOGY Semi-log scale plot.,SEMILOGY(.)is the same as PLOT(.),except a,logarithmic(base 10)scale is used for the Y-axis.,24,abs_X=4./(4+w.*w),;,subplot(2,1,1);h=,semilogy,(w,abs(X);,set(h,linewidth,2);,xlabel,(omega,rad/s);,ylabel(,log_1_0(|X(jomega)|),);,hold on,semilogy(w,abs_X,r:);,legend(fft,real);,subplot(2,1,2);h=plot(w,unwrap,(,angle,(X);,set(h,linewidth,1);,xlabel(omega rad/s);ylabel(phi(omega);,25,26,8.5,连续时间傅里叶变换性质,目的:直观、深刻地理解傅里叶变换的性质;,主要内容:,奇偶虚实性;信号的幅度谱与相位谱,尺度变换特性,频移性质和调制定理;,抽样信号的重建,27,方法,28,sound,函数,SOUND Play vector as sound.,SOUND(Y,FS)sends the signal in vector Y(with sample frequency,FS)out to the speaker on platforms that support sound.Values in,Y are assumed to be in the range-1.0=y 1);,将大于,1,的部分置为,1,:,y2(position)=1;,43,8.6,幅度调制和连续时间傅里叶变换,本地载波,解调,44,举例,45,莫尔斯电报编码,A .-,H .,O -,V -,B -,I .,P .-.,W .-,C -.-.,J .-,Q -.-,X -.-,D -.,K -.-,R .-.,Y-.-,E .,L .-.,S ,Z -.,F .-.,M -,T -,G -.,N -.,U .-,46,(a),%exe4_6_a.m,clear;,load ctftmod.mat,Z=,dash dash dot dot,;,plot(t,Z,r);,47,(b),freqs(bf,af);,48,freqs,FREQS Laplace-transform(s-domain)frequency response.,H=FREQS(B,A,W),returns the complex frequency response vector H of the filter B/A:,given the numerator and denominator coefficients in vectors B and A.,The frequency response is evaluated at the points specified in vector W(in rad/s).The magnitude and phase can be graphed by calling FREQS(B,A,W)with,no output arguments,.,49,传输函数,nb-1 nb-2,B(s)b(1)s +b(2)s +.+b(nb),H(s)=-=-,na-1 na-2,A(s)a(1)s +a(2)s +.+a(na),50,B,A,矩阵的写法,51,例题,52,运行结果,53,其他用法,H,W=FREQS(B,A),automatically picks a set of,200,frequencies W on which the frequency response is computed.FREQS(B,A,N,)picks N frequencies.,See also logspace,polyval,invfreqs,and freqz,(离散系统),.,54,(c),55,56,分析,57,(d),58,59,(e),60,相干接收,需要使用本地载波(接收端),同步解调:本地载波与发送端载波同频同相,正交调制技术简介,61,第一种情况:本地载波与调制载波同频同相,高频信号,恢复出的原始信号,62,第二种情况:本地载波与调制载波同频不同相,只有高频信号,经过低通滤波器后被滤除?,63,第三种情况:本地载波与调制载波不同频,差拍信号,高频信号,64,y=x.*,cos(2*pi*f1*t);,D -.,65,y=x.*,sin(2*pi*f1*t),;,P .-.,66,y=x.*,cos(2*pi*f2*t),;,67,y=x.*,sin(2*pi*f2*t),;,S .,68,总结,本地载波,69,8.7,由欠采样引起的混叠,70,基本题,71,MATLAB,实现,%exe7_1_a.m,T=1/8192;,n=0:8191;,t=n*T;,f0=1000;,x=sin(2*pi*f0*t);,72,(b),取前,50,个样本:,x(1:50),73,(c),%exe7_1_c.m,74,fs=8192;,T=1/fs;,f0=800;,W=2*pi*f0*T;,n=0:fs;,x=sin(W*n);,sound(x,fs);,X=fft(x,56);,stem(abs(X);,75,(d),提示:,通过修改,exe7_1_c.m,中的数据来实现,76,77,深入题,78,79,%exe7_1_g.m,fs=8192;,T=1/fs;,n=0:fs*10;,t=n*T;,%f0=3000/2/pi;,%bate=2000;,f0=100;,bate=5000;,x=,sin(2*pi*f0*t+bate*t.*t/2),;,80,sound(x);,specgram(x,8192);,81,SPECTROGRAM,SPECTROGRAM Spectrogram using a,Short-Time Fourier Transform(STFT,短时傅里叶变换,),.,S=SPECTROGRAM(X)returns the spectrogram of the signal specified by vector X in the matrix S.By default,X is divided into eight segments with 50%overlap,each segment is windowed with a Hamming window.The number of frequency points used to calculate the discrete Fourier,transforms is equal to the maximum of 256 or the next power of two greater than the length of each segment of X.,82,8.7,由样本重建信号,零阶保持,一阶保持,抽样函数,83,demo,9sam_inversesam_inverse.m,84,Sa,函数作为内插函数(理想化),85,Sa,函数作为内插函数(理想化),86,Sa,函数作为内插函数(理想化),87,sinc,函数内插,88,sinc,函数内插的,MATLAB,实现,分析:在各抽样值处插入一个,sinc,函数,大小与抽样值成正比,定义域为全时域(或给定定义域)。,时间矩阵:,tt=ones(length(n),1)*t-Ts*n*ones(1,length(t),内插函数矩阵:,sinc(fs*tt),函数内插:,x*sinc(tt)%x,为样值函数,89,内插函数矩阵,90,spline:,三次样条内插函数,SPLINE Cubic spline data interpolation.,PP=SPLINE(X,Y)provides the piecewise polynomial form of the cubic spline interpolant to the data values Y at the data sites X,for use with the evaluator PPVAL and the spline utility UNMKPP.,X must be a vector.,If Y is a vector,then Y(j)is taken as the value to be matched at X(j),hence Y must be of the same length as X -see below for an exception to this.,If Y is a matrix or ND array,then Y(:,.,:,j)is taken as the value to be matched at X(j),hence the last dimension of Y must equal length(X)-,see below for an exception to this.,YY=SPLINE(X,Y,XX)is the same as YY=PVAL(SPLINE(X,Y),XX),thus providing,in YY,the values of the interpolant at XX.For information regarding the size of YY see PPVAL.,91,举例,clear,Ts=1;Fs=1/Ts;,n=0:10;x=sin(n);,t=0:.25:10;,x_spline=,spline(n,x,t),;,plot(t,x_spline,b);,nTs=0:10;,tt=ones(length(n),1)*t-nTs*ones(1,length(t);,x_sinc=x*sinc(Fs*tt),;,hold on;plot(t,x_sinc,r);,legend(spline,sinc);,hold on,;,stem(n,x,m);,hh=findobj(0,type,line);set(hh,linewidth,2);,92,结果图形,93,8.8,连续时间傅里叶变换的符号计算,x1=sym(1/2)*exp(-2*t)*,heaviside,(t);,x2=sym(exp(-4*t)*heaviside(t);,94,heaviside,:单位阶跃函数,help heaviside,HEAVISIDE Unit Step function,f=Heaviside(t)returns a vector f the same size as,the input vector,where each element of f is 1 if the,corresponding element of t is greater than zero.,举例:,syms t;,y=cos(t)*(heaviside(t+0.5*pi)-heaviside(t-0.5*pi);,ezplot(y);,95,96,解:,97,主要代码,%exe4_7_a.m,clear;,x1=sym(1/2)*exp(-2*t)*,heaviside(t),);,x2=sym(exp(-4*t)*,heaviside(t),);,subplot(2,1,1);,ezplot(x1,0,2);,legend(x1);,axis(0 2 0 1);,subplot(2,1,2);,ezplot(x2,0,2);,legend(x2);,axis(0 2 0 1);,98,99,fourier,函数,FOURIER Fourier integral transform.,F=FOURIER(f)is the Fourier transform of the sym scalar f,with default independent variable x.,F(w)=int(f(x)*,exp(-i*w*x),x,-inf,inf,),See also sym/ifourier,sym/laplace,sym/ztrans.,100,主要代码,%exe4_7_a.m,x1=sym(1/2)*exp(-2*t)*heaviside(t);,x2=sym(exp(-4*t)*heaviside(t);,X1=,fourier,(x1);,X2=,fourier,(x2);,subplot(2,1,1);,ezplot(abs(X1),-20,20);legend(|X1|),axis(-20 20 0 0.3);,subplot(2,1,2);,ezplot(abs(X2),-20,20);legend(|X2|),axis(-20 20 0 0.3);,101,102,练习,1,close,all,;clear,all,;,syms,t,a,u,%exersice 1:Fourier transform of exp(-abs(t),x1=exp(-abs(t);,X1=,fourier,(x1),ezplot,(X1,-10,10);axis(-10,10 0 2.1);,x11=,ifourier,(X1,w,),figure;,x111=,simple,(x11),ezplot(x111,-10,10);axis(-10,10 0 1.1);,103,运行结果,1,X1=2/(w2+1),x11=,(2*pi*exp(-w)*heaviside(w)+2*pi*heaviside(-w)*exp(w)/(2*pi),x111=exp(-w)*heaviside(w)+heaviside(-w)*exp(w),104,练习,2,%exersice 2:Fourier transform of,%exp(-a*t)*heaviside(t),x2=exp(-a*t)*,heaviside,(t);,X2=,fourier,(x2);,a=2;,X22=,subs,(X2),x22=,ifourier,(X22),figure;,subplot(2,1,1);ezplot(abs(X22),-10 10);,subplot(2,1,2);ezplot(angle(X22),-10 10);,105,运行结果,2,X22=,1/(w*i+2),x22=,exp(-2*x)*heaviside(x),H31=,2/5-i/5,106,练习,3,%exersice 3:sinusoidal signals pass the RC low pass filter,x3=sin(t)+sin(3*t);,H31=subs(X22,w,1),H33=subs(X22,w,3),x33=abs(H31)*sin(t+angle(H31)+abs(H33)*sin(3*t+angle(H33);,figure;,subplot(2,1,1);ezplot(x3,-10 10);,subplot(2,1,2);ezplot(x33,-10 10);,107,运行结果,3,H31=,2/5-i/5,H33=,2/13-(3*i)/13,108,练习,4,%exersice 4:Ideal low pass filter,x4=x3;,H4=heaviside(u+2)-heaviside(u-2);,H41=subs(H4,u,1);,H43=subs(H4,u,3);,x44=abs(H41)*sin(t+angle(H41)+abs(H43)*sin(3*t+angle(H43);,figure,subplot(2,1,1);ezplot(x4,-10 10);,subplot(2,1,2);ezplot(x44,-10 10);,109,运行结果,4,110,练习,5,%exersice 5:Hilbert transform,x5=sin(t);,H5=-i*sign(u);,H51=subs(H5,u,1);,x55=abs(H51)*sin(t+angle(H51);,figure,subplot(2,1,1);,ezplot(x5,-10 10);,subplot(2,1,2);,ezplot(x55,-10 10);,111,运行结果,5,112,函数总结,sound,load,sinc,spline,fft/ifft,fftshift,freqs,semilogy,conj,abs,angle,fourier/ifourier,dirac,heaviside,113,
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服