MATLAb连续时间傅里叶变换课件_第1页
MATLAb连续时间傅里叶变换课件_第2页
MATLAb连续时间傅里叶变换课件_第3页
MATLAb连续时间傅里叶变换课件_第4页
MATLAb连续时间傅里叶变换课件_第5页
已阅读5页,还剩106页未读 继续免费阅读

VIP免费下载

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

MATLAb连续时间傅里叶变换将连续时间傅里叶级数(CTFS)推广到既能对周期连续时间信号,又能对非周期连续时间信号进行频谱分析。这是一种重要而强有力的方法,因为有很多信号当从时域来看时呈现出很复杂的结构,但从频域来看却很简单。另外,许多LTI系统的特性行为在频域要比在时域容易理解得多。为了更有效地应用频域方法,重要的是要将信号的时域特性是如何与它的频域特性联系起来的建立直观的认识。MATLAB在信号与系统课程中的应用EE

of

BUPT频谱计算中的问题连续→离散(抽样,抽样间隔如何选取?)无穷积分→有限长(截断)nnMATLAB在信号与系统课程中的应用EE

of

BUPT8.1连续时间傅里叶变换的数值近似MATLAB在信号与系统课程中的应用EE

of

BUPT傅里叶变换的近似表示MATLAB在信号与系统课程中的应用EE

of

BUPT8.2连续时间信号的采样MATLAB在信号与系统课程中的应用EE

of

BUPT8.3理想抽样信号的傅里叶变换(利用卷积定理)MATLAB在信号与系统课程中的应用EE

of

BUPT冲激抽样信号的频谱MATLAB在信号与系统课程中的应用EE

of

BUPT说明MATLAB在信号与系统课程中的应用EE

of

BUPT抽样定理MATLAB在信号与系统课程中的应用EE

of

BUPT8.4DTFT的引出(利用时移性质)DTFT:Discrete-timeFouriertransform为研究离散时间系统的频率响应作准备,从抽样信号的傅里叶变换引出:MATLAB在信号与系统课程中的应用EE

of

BUPT离散时间信号的傅里叶变换DTFT就是抽样信号的傅立叶变换。MATLAB在信号与系统课程中的应用EE

of

BUPT比较MATLAB在信号与系统课程中的应用EE

of

BUPT利用快速傅里叶变换计算频谱MATLAB在信号与系统课程中的应用EE

of

BUPTfft函数FFTDiscreteFouriertransform.FFT(X)isthediscreteFouriertransform(DFT)ofvectorX.

Formatrices,theFFToperationisappliedtoeach

column.ForN-Darrays,theFFToperationoperatesonthefirstnon-singletondimension.FFT(X,N)

istheN-pointFFT,paddedwithzerosifXhaslessthanNpointsandtruncatedifithasmore.FFT实现的是DTFT的一个周期的抽样,实际的频谱近似为MATLAB在信号与系统课程中的应用EE

of

BUPTfft函数的使用说明MATLAB在信号与系统课程中的应用EE

of

BUPT补充说明MATLAB在信号与系统课程中的应用EE

of

BUPT例题解:MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT画图(利用解析式)%ss8_2.manddouble_side_exp_spectrum.mTs=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(j\omega)');MATLAB在信号与系统课程中的应用EE

of

BUPT抽样间隔如何选取?MATLAB在信号与系统课程中的应用EE

of

BUPT(b)%

exe4_2_bcde.mclear;T=10;Ts=0.01;t=(-T/2):Ts:(T/2-Ts);N=length(t);x=exp(-2*abs(t));MATLAB在信号与系统课程中的应用EE

of

BUPTX=fft(x,N);X=Ts*fftshift(X);w=-pi/Ts+(0:N-1)/N*(2*pi/Ts);MATLAB在信号与系统课程中的应用EE

of

BUPTSEMILOGY

Semi-log

scale

plot.SEMILOGY(...)

is

the

same

as

PLOT(...),

except

alogarithmic

(base

10)

scale

is

used

for

the

Y-axis.MATLAB在信号与系统课程中的应用EE

of

BUPTabs_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(j\omega)|)');hold

onsemilogy(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)');MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT8.5连续时间傅里叶变换性质目的:直观、深刻地理解傅里叶变换的性质;nn主要内容:奇偶虚实性;信号的幅度谱与相位谱n尺度变换特性n频移性质和调制定理;n抽样信号的重建nMATLAB在信号与系统课程中的应用EE

of

BUPT方法MATLAB在信号与系统课程中的应用EE

of

BUPTsound函数SOUNDPlayvectorassound.SOUND(Y,FS)sendsthesignalinvectorY(withsamplefrequencyFS)outtothespeakeronplatformsthatsupportsound.ValuesinYareassumedtobeintherange-1.0<=y<=1.0.Valuesoutsidethatrangeareclipped.

Stereosoundsareplayed,onplatformsthatsupportit,whenYisanN-by-2matrix.SOUND(Y)playsthesoundatthedefaultsamplerateof8192Hz.SOUND(Y,FS,BITS)playsthesoundusingBITSbits/sampleifpossible.

MostplatformssupportBITS=8or16.MATLAB在信号与系统课程中的应用EE

of

BUPT举例%8\ex4_3_a.mloadsplatN=8192;

y=y(1:N);

fs=8192;sound(y,fs);t=(0:N-1)/fs;

plot(t,y);xlabel('t/s');

ylabel('y');title('waveform');MATLAB在信号与系统课程中的应用EE

of

BUPTTheegglandedonmycheekwitha

splat.鸡蛋啪嚓一声打在我脸上。MATLAB在信号与系统课程中的应用EE

of

BUPT(b)%ex4_3_b.mclear;loadsplatN=length(y);Y=fft(y);Y2=abs(Y);f=(0:N-1)/N*Fs;plot(f,Y2);xlabel('f(Hz)');ylabel('|Y|');y1=ifft(Y);figure;plot(abs(y-y1))MATLAB在信号与系统课程中的应用EE

of

BUPT幅度频谱图MATLAB在信号与系统课程中的应用EE

of

BUPT(c)MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB实现%ex4_3_c.mY=fft(y);%[y,fs]=wavread('hello.wav');

Y1=conj(Y);%loadsplatN=length(y);t=(0:N-1)/fs;subplot(2,1,1);plot(t,y);y1=ifft(Y1);y1=real(y1);sound(y1,fs);subplot(2,1,2);plot(t,y1);%sound(y/max(y),fs);pauseMATLAB在信号与系统课程中的应用EE

of

BUPT此图对应splatMATLAB在信号与系统课程中的应用EE

of

BUPT对应hello.wavMATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT证明(c1)实函数实函数(c2)MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT(d)(e)(f)编程实现Y2=abs(Y);Y3=exp(j*angle(Y));w=[-pi:(2*pi/N):(pi-pi/N)];y2=ifft((Y2));y2=real(y2);y3=ifft((Y3));y3=real(y3);sound(y2/max(y2));pause;sound(y3/max(y3));MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT问题思考题:如何截断y2信号,即将信号幅度大于1的部分置为1,小于-1的部分置为-1?思路:1.选出大于1的成分;2.将大于1的部分置为1。实现:1.选出大于1的成分:position=find(y2>1);2.将大于1的部分置为1:y2(position)=1;MATLAB在信号与系统课程中的应用EE

of

BUPT8.6幅度调制和连续时间傅里叶变换解调本地载波MATLAB在信号与系统课程中的应用EE

of

BUPT举例MATLAB在信号与系统课程中的应用EE

of

BUPT莫尔斯电报编码A

.-H

….

O

---V

…-W

.--B

-…C

-.-.D

-..E

.I

..P

.--.J

.---K

-.-L

.-..M

--N

-.Q

--.-

X

-..-R

.-.S

…T

-Y-.--Z

--..F

..-.G

--.U

..-MATLAB在信号与系统课程中的应用EE

of

BUPT(a)%exe4_6_a.mclear;loadctftmod.matZ=[dashdashdotdot];plot(t,Z,'r');MATLAB在信号与系统课程中的应用EE

of

BUPT(b)freqs(bf,af);MATLAB在信号与系统课程中的应用EE

of

BUPTfreqsFREQSLaplace-transform(s-domain)frequencyresponse.H=FREQS(B,A,W)

returnsthecomplexfrequencyresponsevectorH

ofthefilterB/A:giventhenumeratoranddenominatorcoefficientsinvectorsBandA.Thefrequencyresponseisevaluatedatthepointsspecifiedin

vectorW(inrad/s).

Themagnitudeandphasecanbegraphedby

callingFREQS(B,A,W)withnooutputarguments.MATLAB在信号与系统课程中的应用EE

of

BUPT传输函数nb-1nb-2B(s)

b(1)s

+

b(2)s

+...+

b(nb)H(s)=----=-------------------------------------na-1

na-2A(s)

a(1)s

+

a(2)s

+...+

a(na)MATLAB在信号与系统课程中的应用EE

of

BUPTB,A

矩阵的写法MATLAB在信号与系统课程中的应用EE

of

BUPT例题MATLAB在信号与系统课程中的应用EE

of

BUPT运行结果MATLAB在信号与系统课程中的应用EE

of

BUPT其他用法[H,W]=FREQS(B,A)

automaticallypicksasetof

200frequenciesWon

whichthefrequencyresponseiscomputed.

FREQS(B,A,N)picksNfrequencies.Seealsologspace,polyval,invfreqs,andfreqz(离散系统).MATLAB在信号与系统课程中的应用EE

of

BUPT(c)MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT分析MATLAB在信号与系统课程中的应用EE

of

BUPT(d)MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT(e)MATLAB在信号与系统课程中的应用EE

of

BUPT相干接收需要使用本地载波(接收端)nnn同步解调:本地载波与发送端载波同频同相正交调制技术简介MATLAB在信号与系统课程中的应用EE

of

BUPT第一种情况:本地载波与调制载波同频同相恢复出的原始信号高频信号MATLAB在信号与系统课程中的应用EE

of

BUPT第二种情况:本地载波与调制载波同频不同相只有高频信号,经过低通滤波器后被滤除?MATLAB在信号与系统课程中的应用EE

of

BUPT第三种情况:本地载波与调制载波不同频差拍信号高频信号MATLAB在信号与系统课程中的应用EE

of

BUPTy=x.*cos(2*pi*f1*t);D

-..y=x.*sin(2*pi*f1*t);P

.--.y=x.*cos(2*pi*f2*t);y=x.*sin(2*pi*f2*t);S

...总结本地载波MATLAB在信号与系统课程中的应用EE

of

BUPT8.7由欠采样引起的混叠MATLAB在信号与系统课程中的应用EE

of

BUPT基本题MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB实现nnnnnn%exe7_1_a.mT=1/8192;n=[0:8191];t=n*T;f0=1000;x=sin(2*pi*f0*t);MATLAB在信号与系统课程中的应用EE

of

BUPT(b)取前50个样本:x(1:50)MATLAB在信号与系统课程中的应用EE

of

BUPT(c)%exe7_1_c.mMATLAB在信号与系统课程中的应用EE

of

BUPTnnnnnnnnnfs=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));MATLAB在信号与系统课程中的应用EE

of

BUPT(d)提示:通过修改exe7_1_c.m中的数据来实现MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT深入题MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT%exe7_1_g.mfs=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);MATLAB在信号与系统课程中的应用EE

of

BUPTsound(x);specgram(x,[],8192);MATLAB在信号与系统课程中的应用EE

of

BUPTSPECTROGRAMSPECTROGRAMSpectrogramusinga

Short-TimeFourierTransform(STFT,

短时傅里叶变换).S=SPECTROGRAM(X)returnsthespectrogramofthesignalspecifiedbyvectorXinthematrixS.Bydefault,Xisdividedintoeightsegmentswith50%overlap,eachsegmentiswindowedwithaHammingwindow.Thenumberof

frequencypointsusedtocalculatethediscreteFouriertransformsisequaltothemaximumof256orthenextpoweroftwogreaterthanthelengthofeachsegmentofX.MATLAB在信号与系统课程中的应用EE

of

BUPT8.7由样本重建信号零阶保持一阶保持抽样函数MATLAB在信号与系统课程中的应用EE

of

BUPTdemo\9\sam_inverse\sam_inverse.mMATLAB在信号与系统课程中的应用EE

of

BUPTSa函数作为内插函数(理想化)MATLAB在信号与系统课程中的应用EE

of

BUPTSa函数作为内插函数(理想化)MATLAB在信号与系统课程中的应用EE

of

BUPTSa函数作为内插函数(理想化)MATLAB在信号与系统课程中的应用EE

of

BUPTsinc函数内插MATLAB在信号与系统课程中的应用EE

of

BUPTsinc函数内插的MATLAB实现分析:在各抽样值处插入一个sinc函数,大小与抽样值成正比,定义域为全时域(或给定定义域)。时间矩阵:tt=ones(length(n),1)*t-nnTs*n'*ones(1,length(t))内插函数矩阵:sinc(fs*tt)nn函数内插:x*sinc(tt)

%x为样值函数MATLAB在信号与系统课程中的应用EE

of

BUPT内插函数矩阵MATLAB在信号与系统课程中的应用EE

of

BUPTspline:

三次样条内插函数SPLINECubicsplinedatainterpolation.PP=SPLINE(X,Y)providesthepiecewisepolynomialformofthecubicsplineinterpolanttothedatavaluesYatthedatasitesX,

forusewiththeevaluatorPPVALandthesplineutilityUNMKPP.Xmustbeavector.IfYisavector,thenY(j)istakenasthevaluetobematchedatX(j),

henceYmustbeofthesamelengthasX

--seebelowforanexceptiontothis.IfYisamatrixorNDarray,thenY(:,...,:,j)istakenasthevaluetobematchedatX(j),

hencethelastdimensionofYmustequallength(X)--seebelowforanexceptiontothis.YY=SPLINE(X,Y,XX)isthesameas

YY=PVAL(SPLINE(X,Y),XX),thusproviding,inYY,thevaluesoftheinterpolantatXX.

ForinformationregardingthesizeofYYseePPVAL.MATLAB在信号与系统课程中的应用EE

of

BUPT举例clearTs=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);holdon;plot(t,x_sinc,'r');legend('spline','sinc');holdon;stem(n,x,'m');hh=findobj(0,'type','line');set(hh,'linewidth',2);MATLAB在信号与系统课程中的应用EE

of

BUPT结果图形MATLAB在信号与系统课程中的应用EE

of

BUPT8.8连续时间傅里叶变换的符号计算x1=sym('(1/2)*exp(-2*t)*heaviside(t)');x2=sym('exp(-4*t)*heaviside(t)');MATLAB在信号与系统课程中的应用EE

of

BUPTheaviside:单位阶跃函数helpheavisideHEAVISIDEUnitStepfunctionf=Heaviside(t)returnsavectorfthesamesizeastheinputvector,whereeachelementoffis1ifthecorrespondingelementoftisgreaterthanzero.举例:symst;y=cos(t)*(heaviside(t+0.5*pi)-heaviside(t-0.5*pi));ezplot(y);MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT解:MATLAB在信号与系统课程中的应用EE

of

BUPT主要代码%exe4_7_a.mclear;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([0201]);subplot(2,1,2);ezplot(x2,[0,2]);legend('x2');axis([0201]);MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPTfourier函数nnFOURIERFourierintegraltransform.F=FOURIER(f)istheFouriertransformofthesymscalarfwithdefaultindependentvariablex.nnF(w)

=

int(f(x)*exp(-i*w*x),x,-inf,inf)Seealsosym/ifourier,sym/laplace,sym/ztrans.MATLAB在信号与系统课程中的应用EE

of

BUPT主要代码%exe4_7_a.mx1=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([-202000.3]);subplot(2,1,2);ezplot(abs(X2),[-20,20]);legend('|X2|')axis([-202000.3]);MATLAB在信号与系统课程中的应用EE

of

BUPTMATLAB在信号与系统课程中的应用EE

of

BUPT练习1close

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]);MATLAB在信号与系统课程中的应用EE

of

BUPT运行结果1X1=2/(w^2+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)MATLAB在信号与系统课程中的应用EE

of

BUPT练习2%

exersice

2:

Fourier

t

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论