MATLAB周期信號(hào)的頻譜分析.ppt_第1頁(yè)
MATLAB周期信號(hào)的頻譜分析.ppt_第2頁(yè)
MATLAB周期信號(hào)的頻譜分析.ppt_第3頁(yè)
MATLAB周期信號(hào)的頻譜分析.ppt_第4頁(yè)
MATLAB周期信號(hào)的頻譜分析.ppt_第5頁(yè)
已閱讀5頁(yè),還剩64頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

第七章周期信號(hào)的頻譜分析 1 7 1引言 本章主要內(nèi)容 周期信號(hào)的傅里葉級(jí)數(shù)的系數(shù) 三角函數(shù)形式 指數(shù)函數(shù)形式 用數(shù)值計(jì)算的方式來(lái)綜合信號(hào) 用符號(hào)函數(shù)表示傅里葉級(jí)數(shù) 2 7 2三角函數(shù)形式的傅里葉級(jí)數(shù) 由積分可知 1 三角函數(shù)集 3 在滿(mǎn)足狄氏條件時(shí) 可展成 直流分量 余弦分量的幅度 正弦分量的幅度 稱(chēng)為三角形式的傅里葉級(jí)數(shù) 其系數(shù) 級(jí)數(shù)形式 4 余弦形式 5 例7 1周期矩形脈沖信號(hào)的頻譜 6 MATLAB實(shí)現(xiàn) Fourieranalysis square wave1 mt 0 0 01 2 pi y sin t y y 4 pi plot t y pausey sin t sin 3 t 3 y y 4 pi plot t y pausey sin t sin 3 t 3 sin 5 t 5 sin 7 t 7 sin 9 t 9 y y 4 pi plot t y pause 7 helppause PAUSEWaitforuserresponse PAUSE n pausesfornsecondsbeforecontinuing wherencanalsobeafraction Theresolutionoftheclockisplatformspecific Fractionalpausesof0 01secondsshouldbesupportedonmostplatforms PAUSEcausesaproceduretostopandwaitfortheusertostrikeanykeybeforecontinuing 8 結(jié)果顯示 9 繪制三維曲線(xiàn)圖 MESH3 Dmeshsurface MESH X Y Z C plotsthecoloredparametricmeshdefinedbyfourmatrixarguments TheviewpointisspecifiedbyVIEW TheaxislabelsaredeterminedbytherangeofX YandZ orbythecurrentsettingofAXIS ThecolorscalingisdeterminedbytherangeofC orbythecurrentsettingofCAXIS ThescaledcolorvaluesareusedasindicesintothecurrentCOLORMAP MESH X Y Z usesC Z socolorisproportionaltomeshheight 10 MATLAB實(shí)現(xiàn) fourieranalysis square wave2 mt 0 0 01 2 pi K 99 maximumharmonicy zeros K 1 2 length t x zeros size t fork 1 2 Kx x sin k t k y k 1 2 x endy y 4 pi 11 figure 1 plot t y grid line 0 pi 0 5 1 1 text pi 0 5 1 1 figure 2 halft ceil length t 2 mesh t 1 halft 1 K 1 2 y 1 halft max y max y K 1 2 gibbs max y 1 2 12 結(jié)果顯示 13 line和text函數(shù) LINE X Y addsthelineinvectorsXandYtothecurrentaxes IfXandYarematricesthesamesize onelinepercolumnisadded TEXT X Y string addsthetextinthequotestolocation X Y onthecurrentaxes where X Y isinunitsfromthecurrentplot IfXandYarevectors TEXTwritesthetextatalllocationsgiven line 1 2 3 4 5 7 text 2 1 4 8 here 14 mesh gibbs 0 0892 15 waterfall waterfall t 1 halft 1 K 1 2 y 1 halft 16 例7 2 求周期鋸齒波的三角函數(shù)形式的傅里葉級(jí)數(shù)展開(kāi)式 周期鋸齒波的傅里葉級(jí)數(shù)展開(kāi)式為 直流 基波 諧波 17 編程綜合鋸齒波信號(hào) t 0 0 01 5 T 2 A 1 w1 2 pi T f zeros 1 length t w1為基波角頻率 增加諧波信號(hào) forn 1 Nf f A power 1 n 1 n pi sin n w1 t end 18 生成鋸齒波信號(hào) t1 0 0 01 0 99 y1 0 5 t1 y2 y1 0 5 y y1y2y1y2y1 ty 0 length y 1 0 01 SAWTOOTHSawtoothandtrianglewavegeneration SAWTOOTH T generatesasawtoothwavewithperiod2 pifortheelementsoftimevectorT SAWTOOTH T islikeSIN T onlyitcreatesasawtoothwavewithpeaksof 1to 1insteadofasinewave SAWTOOTH T WIDTH generatesamodifiedtrianglewavewhereWIDTH ascalarparameterbetween0and1 19 t 10 0 01 10 x sawtooth t plot t x y sawtooth t 1 pi seealso 20 y sawtooth t 0 2 Seealsosquare sin cos chirp diric gauspuls pulstran rectpuls sincandtripuls 21 7 3指數(shù)函數(shù)形式的傅里葉級(jí)數(shù) 1 復(fù)指數(shù)正交函數(shù)集 2 級(jí)數(shù)形式 3 系數(shù) 利用復(fù)變函數(shù)的正交特性 指數(shù)函數(shù)乘除法方便 22 7 4幅頻特性和相頻特性 相頻特性 幅頻特性 23 帕塞瓦爾定理 這是帕斯瓦爾定理在傅里葉級(jí)數(shù)情況下的具體體現(xiàn) 表明 周期信號(hào)平均功率 直流 基波及各次諧波分量有效值的平方和 也就是說(shuō) 時(shí)域和頻域的能量是守恒的 24 7 5用有限項(xiàng)傅里葉級(jí)數(shù)表示周期信號(hào) 誤差函數(shù) 方均誤差 25 例題7 3 26 1 三角函數(shù)形式的譜系數(shù) 27 2 指數(shù)形式的譜系數(shù) 28 程序?qū)崿F(xiàn) exe3 7 a mn 10 10 Fn sinc n 2 Fn 11 0 subplot 2 1 1 h stem n Fn set h linewidth 2 xlabel n ylabel Fn subplot 2 1 2 h stem n power abs Fn 2 set h linewidth 2 xlabel n ylabel Fn 2 SINCSin pi x pi x function 29 30 7 6周期信號(hào)的功率 31 b 解 32 c n 9 9 Fn sinc n 2 Fn 10 0 P sum power abs Fn 2 解 33 d n 99 99 Fn sinc n 2 Fn 100 0 P n 2 power abs Fn 100 199 2 P n 1 0 P evaluation cumsum P n 34 35 例題單位沖激序列的頻譜 分析 狄氏條件是傅里葉級(jí)數(shù)存在的充分條件 根據(jù)沖激信號(hào)的定義和特性 其積分有確定值 傅里葉級(jí)數(shù)存在 即 滿(mǎn)足離散性 諧波性 不滿(mǎn)足收斂性 頻帶無(wú)限寬 36 余弦形式的頻譜圖 37 MATLAB實(shí)現(xiàn) impulse cos m thisprogramisusedtoillustrateimpuseseriescanbeexpandedbycosT 1 w1 2 pi T t 1 2 T 0 01 1 2 T f ones 1 length t T clf plot t f r holdoncolor r g b c y forn 1 5fn cos n w1 t T 2 f f fn plot t fn color mod n 5 1 endh plot t f k set h linewidth 2 38 結(jié)果顯示 N 5 39 結(jié)果顯示 N 21 40 總結(jié) pausemeshwaterfallcumsumsumclfGUIDE回調(diào)函數(shù)編寫(xiě) get set axesnum2strstrcatmod 41 7 7用傅里葉級(jí)數(shù)綜合連續(xù)時(shí)間信號(hào) 42 例題 43 exe3 11 a mclearallsymstTX1X 1X3X 3x1 X 1 exp i 2 pi T t X1 exp i 2 pi T t X 3 exp 3 i 2 pi T t X3 exp 3 i 2 pi T t T 1 X1 5 X 1 5 X3 2 X 3 2 x2 subs x1 x3 simple x2 ezplot x3 0 2 T 44 45 更新參數(shù) T 2 X3 1 X 3 1 x3 subs x1 figure ezplot x3 0 2 T 46 符號(hào)函數(shù) x1 X 1 exp 2 i pi T t X1 exp 2 i pi T t X 3 exp 6 i pi T t X3 exp 6 i pi T t x2 5 exp 2 i pi t 5 exp 2 i pi t 2 exp 6 i pi t 2 exp 6 i pi t x3 5 exp i pi t 5 exp i pi t exp 3 i pi t exp 3 i pi t 47 48 編程實(shí)現(xiàn) exe3 11 b mclear symstTX1X2X3X4X 1X 2X 3X 4x2 1 X 1 exp i 2 pi T t X1 exp i 2 pi T t x2 2 X 2 exp 2 i 2 pi T t X2 exp 2 i 2 pi T t x2 3 X 3 exp 3 i 2 pi T t X3 exp 3 i 2 pi T t x2 4 X 4 exp 4 i 2 pi T t X4 exp 4 i 2 pi T t x2 x2 1 x2 2 x2 3 x2 4 T 2 X1 i X 1 i X2 i 2 X 2 i 2 X3 i 4 X 3 i 4 X4 i 8 X 4 i 8 x2 subs x2 ezplot x2 0 2 T 49 x2 1 4 sin 4 pi t sin 2 pi t 1 2 sin 3 pi t 2 sin pi t 50 例題方波的傅里葉表示 51 方波 這個(gè)練習(xí)將分析該方波的傅里葉級(jí)數(shù)表示 且主要集中在方波中的不連續(xù)點(diǎn)附近 52 目的 用符號(hào)運(yùn)算的方法生成傅里葉級(jí)數(shù)的系數(shù) 一個(gè)積分 用有限項(xiàng)綜合原信號(hào) 53 a 解 54 int函數(shù) INTIntegrate INT S istheindefiniteintegral 不定積分 ofSwithrespecttoitssymbolicvariableasdefinedbyFINDSYM SisaSYM matrixorscalar IfSisaconstant theintegraliswithrespectto x INT S v istheindefiniteintegralofSwithrespecttov 對(duì)v積分 visascalarSYM INT S a b isthedefiniteintegral 定積分 ofSwithrespecttoitssymbolicvariablefroma 下限 tob 上限 aandbareeachdoubleorsymbolicscalars INT S v a b isthedefiniteintegralofSwithrespecttovfromatob 55 編程實(shí)現(xiàn) exe3 12 a mclearall symstxTn x 1 integrand x exp i n 2 pi T t T Xn int integrand t T 4 T 4 T 2 n 10 10 Xn N subs Xn Xn N length n 1 2 0 5 h stem n Xn N set h linewidth 2 被積函數(shù) 56 57 b 分析 上例已得到Xn語(yǔ)句 利用subs給出各系數(shù) 58 產(chǎn)生并畫(huà)出合成后的信號(hào)波形 xN 0 forn 10 10 xN xN Xn N n 11 exp i n 2 pi T t endT 2 subs xN ezplot xN T T 59 思考題 60 例題半波整流信號(hào)的頻譜 exercise halfwave cos mx cos 2 pi T t integrand x exp i n 2 pi T t T 被積函數(shù)Xn int integrand t T 4 T 4 積分 61 結(jié)果顯示 62 分析 63 例題奇諧函數(shù)的頻譜圖 64 代碼 exe zheng 3 7 c mclearall c

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論