![數(shù)字信號(hào)處理實(shí)驗(yàn)二(共16頁)_第1頁](http://file4.renrendoc.com/view/980b2de39a26af62f5031a707baa9bb0/980b2de39a26af62f5031a707baa9bb01.gif)
![數(shù)字信號(hào)處理實(shí)驗(yàn)二(共16頁)_第2頁](http://file4.renrendoc.com/view/980b2de39a26af62f5031a707baa9bb0/980b2de39a26af62f5031a707baa9bb02.gif)
![數(shù)字信號(hào)處理實(shí)驗(yàn)二(共16頁)_第3頁](http://file4.renrendoc.com/view/980b2de39a26af62f5031a707baa9bb0/980b2de39a26af62f5031a707baa9bb03.gif)
![數(shù)字信號(hào)處理實(shí)驗(yàn)二(共16頁)_第4頁](http://file4.renrendoc.com/view/980b2de39a26af62f5031a707baa9bb0/980b2de39a26af62f5031a707baa9bb04.gif)
![數(shù)字信號(hào)處理實(shí)驗(yàn)二(共16頁)_第5頁](http://file4.renrendoc.com/view/980b2de39a26af62f5031a707baa9bb0/980b2de39a26af62f5031a707baa9bb05.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、Student Number:20111060021Laboratory Exercise 2DISCRETE-TIME SYSTEMS: TIME-DOMAIN REPRESENTATION2.1SIMULATION OF DISCRETE-TIME SYSTEMSProject 2.1The Moving Average System A copy of Program P2_1 is given below:%程序(chngx)P2.1%一個(gè)M點(diǎn)滑動(dòng)(hudng)平均濾波器的仿真%產(chǎn)生(chnshng)輸入信號(hào)clf;n=0:100;s1=cos(2*pi*0.05*n);%一個(gè)低頻正弦
2、s2=cos(2*pi*0.47*n);%一個(gè)高頻正弦x=s1+s2;%滑動(dòng)平均濾波器的實(shí)現(xiàn)M=input(濾波器所需的長度= );num=ones(1,M);y=filter(num,1,x)/M;%顯示輸入和輸出信號(hào)subplot(2,2,1);plot(n,s1);axis(0,100,-2,2);xlabel(時(shí)間序號(hào) n);ylabel(振幅);title(信號(hào)#1);subplot(2,2,2);plot(n,s2);axis(0,100,-2,2);xlabel(時(shí)間序號(hào) n);ylabel(振幅);title(信號(hào)#2);subplot(2,2,3);plot(n,x);axi
3、s(0,100,-2,2);xlabel(時(shí)間序號(hào) n);ylabel(振幅);title(輸入(shr)信號(hào));subplot(2,2,4);plot(n,y);axis(0,100,-2,2);xlabel(時(shí)間(shjin)序號(hào) n);ylabel(振幅(zhnf);title(輸出信號(hào));axis;Answers:Q2.1 The output sequence generated by running the above program for M = 2 with xn = s1n+s2n as the input is shown below. The component of
4、the input xn suppressed by the discrete-time system simulated by this program is -Signal#2,thehighfrequencyone(itisalowpassfilter). Q2.2 Program P2_1 is modified to simulate the LTI system yn = 0.5(xnxn1) and process the input xn = s1n+s2n resulting in the output sequence shown below:n=0:100;s1=cos(
5、2*pi*0.05*n);s2=cos(2*pi*0.47*n);x=s1+s2;M=input(濾波器所需的長度(chngd)= );num=(-1).0:M-1;y=filter(num,1,x)/M;clf;subplot(2,2,1);plot(n,s1);axis(0,100,-2,2);xlabel(時(shí)間(shjin)序號(hào) n);ylabel(振幅(zhnf);title(信號(hào)#1);subplot(2,2,2);plot(n,s2);axis(0,100,-2,2);xlabel(時(shí)間序號(hào) n);ylabel(振幅);title(信號(hào)#2);subplot(2,2,3);plot
6、(n,x);axis(0,100,-2,2);xlabel(時(shí)間序號(hào) n);ylabel(振幅);title(輸入信號(hào));subplot(2,2,4);plot(n,y);xlabel(時(shí)間序號(hào) n);ylabel(振幅);title(輸出信號(hào));axis;The effect of changing the LTI system on the input is -Thesystemisnowahighpassfilter.Itpassesthehighfrequencyinputcomponents2insteadofthelowfrequencyinputcomponents1.Q2.4
7、The required modifications to Program P2_1 by changing the input sequence to a swept-frequency sinusoidal signal (length 101, minimum frequency 0, and a maximum frequency 0.5) as the input signal (see Program P1_7) are listed below:n=0:100;a=pi/200;b=0;arg=a*n.*n+b*n;x=cos(arg);M=input(濾波器所需的長度(chng
8、d)= );num=ones(1,M);y=filter(num,1,x)/M;clf;subplot(2,1,1);plot(n,x);axis(0,100,-1.5,1.5);xlabel(時(shí)間(shjin)序號(hào) n);ylabel(振幅(zhnf);title(輸入信號(hào));subplot(2,1,2);plot(n,y);axis(0,100,-1.5,1.5);xlabel(時(shí)間(shjin)序號(hào) n);ylabel(振幅(zhnf);title(輸出(shch)信號(hào));axis;The output signal generated by running this program i
9、s plotted below. The results of Questions Q2.1 and Q2.2 from the response of this system to the swept-frequency signal can be explained as follows:weseeagainthatthissystemisalowpassfilter.Attheleftofthegraphs,theinputsignalisalowfrequencysinusoidthatispassedtotheoutputwithoutattenuation.Asnincreases
10、,thefrequencyoftheinputrises,andincreasingattenuationisseenattheoutput.InQ2.1,theinputwasasumoftwosinusoidss1ands2withf1=0.05andf2=0.47.ThesweptfrequencyinputofQ2.4reachesafrequencyof0.05atn=10,wherethereisvirtuallynoattenuationintheoutputshownabove.This“explains”whys1waspassedbythesysteminQ2.1.Thes
11、weptfrequencyinputofQ2.4reachesafrequencyof0.47atapproximatelyn=94,wheretheattenuationofthesystemissubstantial.This“explains”whys2wasalmostcompletelysuppressedintheoutputinQ2.1.ThereisnodirectrelationshipbetweentheresultshownaboveforQ2.4andtheresultobtainedinQ2.2.However,usingfrequencydomainconcepts
12、(Chapter3)wecanreasonthat,ifthesweptfrequencysignalwasinputtothesystemyn=0.5(xnxn-1),wewouldseearesultoppositetowhatisshownabove.Sincethesystemwouldthenbeahighpassfilter,therewouldbesubstantialattenuationoftheoutputattheleftsideofthegraphandvirtuallynoattenuationattherightsideofthegraph.This“explain
13、s”whyinQ2.2thelowfrequencycomponents1wassuppressedinthesystemoutput,whereasthehighfrequencycomponents2waspassed.Project 2.3Linear and Nonlinear SystemsA copy of Program P2_3 is given below:%程序(chngx)P2.3%生成(shn chn)輸入序列clf;n=0:40;a=2;b=-3;x1=cos(2*pi*0.1*n);x2=cos(2*pi*0.4*n);x=a*x1+b*x2;num=2.2403
14、2.4908 2.2403;den=1 -0.4 0.75;ic=0 0;%設(shè)置(shzh)零初始條件y1=filter(num,den,x1,ic);%計(jì)算輸出y1ny2=filter(num,den,x2,ic);%計(jì)算輸出y2ny=filter(num,den,x,ic);%計(jì)算輸出ynyt=a*y1+b*y2;d=y-yt;%計(jì)算差值輸出dn%畫出輸出和差信號(hào)subplot(3,1,1)stem(n,y);ylabel(振幅);title(加權(quán)輸入:acdot x_1n+bcdot x_2n的輸出);subplot(3,1,2)stem(n,yt);ylabel(振幅);title(加
15、權(quán)輸入:acdot y_1n+bcdot y_2n的輸出);subplot(3,1,3)stem(n,d)xlabel(時(shí)間序號(hào)n);ylabel(振幅);title(差信號(hào)(xnho);Answers:Q2.7The outputs yn, obtained with weighted input, and ytn, obtained by combining the two outputs y1n and y2n with the same weights, are shown below along with the difference between the two signals:
16、The two sequences are - The same up to numerical roundoff. The system is - Linear.Project 2.4Time-invariant and Time-varying SystemsA copy of Program P2_4 is given below:%程序(chngx)P2.4%生成(shn chn)輸入序列clf;n=0:40;D=10;a=3;b=-2;x=a*cos(2*pi*0.1*n)+b*cos(2*pi*0.4*n);xd=zeros(1,D) x;num=2.2403 2.4908 2.2
17、403;den=1 -0.4 0.75;ic=0 0;%設(shè)置(shzh)零初始條件%計(jì)算(j sun)輸出yny=filter(num,den,x,ic);%計(jì)算(j sun)輸出ydnyd=filter(num,den,xd,ic);%計(jì)算差值輸出dnd=y-yd(1+D:41+D);%畫出輸出subplot(3,1,1)stem(n,y);ylabel(振幅);title(輸出yn);grid;subplot(3,1,2)stem(n,yd(1:41);ylabel(振幅);title(延時(shí)輸出);grid;subplot(3,1,3)stem(n,d);xlabel(時(shí)間序號(hào) n);yl
18、abel(振幅);title(差值信號(hào));grid;Answers:Q2.12 The output sequences yn and ydn-10 generated by running Program P2_4 are shown below - These two sequences are related as follows - yn-10=ydnThe system is - Time Invariant2.2LINEAR TIME-INVARIANT DISCRETE-TIME SYSTEMSProject 2.5Computation of Impulse Responses
19、 of LTI SystemsA copy of Program P2_5 is shown below:%程序(chngx)P2.5%計(jì)算(j sun)沖激響應(yīng)yclf;N=40;num=2.2403 2.4908 2.2403;den=1 -0.4 0.75;y=impz(num,den,N);%畫出沖激響應(yīng)stem(y);xlabel(時(shí)間(shjin)序號(hào)n);ylabel(振幅);title(沖激響應(yīng));grid;Answers:Q2.19 The first 41 samples of the impulse response of the discrete-time system
20、 of Project 2.3 generated by running Program P2_5 is given below:Q2.20 The required modifications to Program P2_5 to generate the impulse response of the following causal LTI system:yn + 0.71yn-1 0.46yn-2 0.62yn-3= 0.9xn 0.45xn-1 + 0.35xn-2 + 0.002xn-3are given below:clf;N=45;num=0.9 -0.45 0.35 0.00
21、2;den=1.0 0.71 -0.46 -0.62;y=impz(num,den,N);stem(y);xlabel(時(shí)間(shjin)序號(hào)n);ylabel(振幅(zhnf);title(沖激響應(yīng));grid;The first 45 samples of the impulse response of this discrete-time system generated by running the modified is given below:Project 2.6Cascade of LTI SystemsA copy of Program P2_6 is given below
22、:%程序(chngx)P2.6%級(jí)聯(lián)實(shí)現(xiàn)(shxin)clf;x=1 zeros(1,40);%生成(shn chn)輸入n=0:40;%四階系統(tǒng)的系數(shù)den=1 1.6 2.28 1.325 0.68;num=0.06 -0.19 0.27 -0.26 0.12;%計(jì)算四階系統(tǒng)的輸出y=filter(num,den,x);%兩個(gè)二階系統(tǒng)的系數(shù)num1=0.3 -0.2 0.4;den1=1 0.9 0.8;num2=0.2 -0.5 0.3;den2=1 0.7 0.85;%級(jí)聯(lián)第一級(jí)的輸出(shch)y1ny1=filter(num1,den1,x);%級(jí)聯(lián)第二級(jí)的輸出(shch)y2ny
23、2=filter(num2,den2,y1);%y和y2n之間的差d=y-y2;%畫出輸出(shch)和差值信號(hào)subplot(3,1,1);stem(n,y);ylabel(振幅);title(四階實(shí)現(xiàn)的輸出);grid;subplot(3,1,2);stem(n,y2);ylabel(振幅);title(級(jí)聯(lián)實(shí)現(xiàn)的輸出);grid;subplot(3,1,3);stem(n,d);xlabel(時(shí)間序號(hào) n);ylabel(振幅);title(差值信號(hào));grid; Q2.23 The output sequences yn, y2n, and the difference signal
24、dn generated by running Program P2_6 are indicated below: The relation between yn and y2n is - They are the same up to numerical roundoffProject 2.7ConvolutionA copy of Program P2_7 is reproduced below:%程序(chngx)P2.7clf;h=3 2 1 -2 1 0 -4 0 3;%沖激(chn j)x=1 -2 3 -4 3 2 1;%輸入(shr)序列y=conv(h,x);n=0:14;s
25、ubplot(2,1,1);stem(n,y);xlabel(時(shí)間序號(hào)n);ylabel(振幅);title(用卷積得到的輸出);grid;x1=x zeros(1,8);y1=filter(h,1,x1);subplot(2,1,2);stem(n,y1);xlabel(時(shí)間序號(hào)n);ylabel(振幅(zhnf);title(用濾波器生成(shn chn)的輸出);grid;Answers:Q2.28 The sequences yn and y1n generated by running Program P2_7 are shown below:The difference betwe
26、en yn and y1n is - They are the same.The reason for using x1n as the input, obtained by zero-padding xn, for generating y1n is - FortwosequencesoflengthN1andN2,convreturnstheresultingsequenceoflengthN1+N2-1.Bycontrast,filteracceptsaninputsignalandasystemspecification.Thereturnedresultisthesamelengthastheinputsignal.Therefore,toobtaindirectlycomparableresultsfromconvandfilt,itisnecessarytosupplyfiltwithaninputthathasbeenzeropaddedouttolengthlength(x)+length(h)-1.Project 2.8Stability of LTI SystemsA copy of Program
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度商場餐飲品牌授權(quán)許可合同
- 服裝鞋帽居間合同模板
- 眼鏡店改造維修合同
- 居家裝修設(shè)計(jì)合同模板范本
- 二零二五年度企業(yè)核心辦公室文員職責(zé)合同
- 高端半導(dǎo)體制造廠房租賃合同樣本(二零二五年度)
- 小型機(jī)動(dòng)車輛抵押合同年
- 水產(chǎn)養(yǎng)殖管理操作手冊
- 高分子材料與工程塑料作業(yè)指導(dǎo)書
- 移動(dòng)應(yīng)用開發(fā)實(shí)戰(zhàn)作業(yè)指導(dǎo)書
- 二零二五年度電梯安裝工程監(jiān)理合同4篇
- 2025年中國儲(chǔ)備棉管理有限公司招聘筆試參考題庫含答案解析
- 2025年華能新能源股份有限公司招聘筆試參考題庫含答案解析
- 開展課外讀物負(fù)面清單管理的具體實(shí)施舉措方案
- 《中國心力衰竭診斷和治療指南(2024)》解讀完整版
- 初中教學(xué)常規(guī)培訓(xùn)
- 2024-2030年中國兒童室內(nèi)游樂園產(chǎn)業(yè)競爭格局展望及投資策略分析報(bào)告
- PCCP安裝與水壓試驗(yàn)
- 招標(biāo)工作手冊
- 信訪事項(xiàng)聽證程序流程圖
- 2018年青海省西寧市中考物理試卷(含解析)
評論
0/150
提交評論