




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(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%一個M點滑動(hudng)平均濾波器的仿真%產(chǎn)生(chnshng)輸入信號clf;n=0:100;s1=cos(2*pi*0.05*n);%一個低頻正弦
2、s2=cos(2*pi*0.47*n);%一個高頻正弦x=s1+s2;%滑動平均濾波器的實現(xiàn)M=input(濾波器所需的長度= );num=ones(1,M);y=filter(num,1,x)/M;%顯示輸入和輸出信號subplot(2,2,1);plot(n,s1);axis(0,100,-2,2);xlabel(時間序號 n);ylabel(振幅);title(信號#1);subplot(2,2,2);plot(n,s2);axis(0,100,-2,2);xlabel(時間序號 n);ylabel(振幅);title(信號#2);subplot(2,2,3);plot(n,x);axi
3、s(0,100,-2,2);xlabel(時間序號 n);ylabel(振幅);title(輸入(shr)信號);subplot(2,2,4);plot(n,y);axis(0,100,-2,2);xlabel(時間(shjin)序號 n);ylabel(振幅(zhnf);title(輸出信號);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(時間(shjin)序號 n);ylabel(振幅(zhnf);title(信號#1);subplot(2,2,2);plot(n,s2);axis(0,100,-2,2);xlabel(時間序號 n);ylabel(振幅);title(信號#2);subplot(2,2,3);plot
6、(n,x);axis(0,100,-2,2);xlabel(時間序號 n);ylabel(振幅);title(輸入信號);subplot(2,2,4);plot(n,y);xlabel(時間序號 n);ylabel(振幅);title(輸出信號);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(時間(shjin)序號 n);ylabel(振幅(zhnf);title(輸入信號);subplot(2,1,2);plot(n,y);axis(0,100,-1.5,1.5);xlabel(時間(shjin)序號 n);ylabel(振幅(zhnf);title(輸出(shch)信號);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);%計算輸出y1ny2=filter(num,den,x2,ic);%計算輸出y2ny=filter(num,den,x,ic);%計算輸出ynyt=a*y1+b*y2;d=y-yt;%計算差值輸出dn%畫出輸出和差信號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(時間序號n);ylabel(振幅);title(差信號(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 sun)輸出yny=filter(num,den,x,ic);%計算(j sun)輸出ydnyd=filter(num,den,xd,ic);%計算差值輸出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(延時輸出);grid;subplot(3,1,3)stem(n,d);xlabel(時間序號 n);yl
18、abel(振幅);title(差值信號);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 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(時間(shjin)序號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(時間(shjin)序號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%級聯(lián)實現(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;%計算四階系統(tǒng)的輸出y=filter(num,den,x);%兩個二階系統(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;%級聯(lián)第一級的輸出(shch)y1ny1=filter(num1,den1,x);%級聯(lián)第二級的輸出(shch)y2ny
23、2=filter(num2,den2,y1);%y和y2n之間的差d=y-y2;%畫出輸出(shch)和差值信號subplot(3,1,1);stem(n,y);ylabel(振幅);title(四階實現(xiàn)的輸出);grid;subplot(3,1,2);stem(n,y2);ylabel(振幅);title(級聯(lián)實現(xiàn)的輸出);grid;subplot(3,1,3);stem(n,d);xlabel(時間序號 n);ylabel(振幅);title(差值信號);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(時間序號n);ylabel(振幅);title(用卷積得到的輸出);grid;x1=x zeros(1,8);y1=filter(h,1,x1);subplot(2,1,2);stem(n,y1);xlabel(時間序號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)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 江蘇省東臺市第三教育聯(lián)盟重點名校2025年初三下學(xué)期七校聯(lián)合交流生物試題含解析
- 吉林工程技術(shù)師范學(xué)院《亞洲電影文化與藝術(shù)》2023-2024學(xué)年第一學(xué)期期末試卷
- 山西省忻州一中、臨汾一中、精英中學(xué)2024-2025學(xué)年高三下學(xué)期一輪質(zhì)量檢測試題數(shù)學(xué)試題含解析
- 山東省青島市市南區(qū)統(tǒng)考市級名校2025年初三下學(xué)期8月開學(xué)語文試題含解析
- 南寧理工學(xué)院《科技文獻檢索與寫作》2023-2024學(xué)年第二學(xué)期期末試卷
- 湛江市遂溪縣2025屆五年級數(shù)學(xué)第二學(xué)期期末調(diào)研模擬試題含答案
- 山東省德州市2025屆高三下學(xué)期統(tǒng)練(4)化學(xué)試題含解析
- 云南藝術(shù)學(xué)院文華學(xué)院《級科學(xué)道德與學(xué)術(shù)誠信》2023-2024學(xué)年第二學(xué)期期末試卷
- 遼陽市白塔區(qū)2025年三年級數(shù)學(xué)第二學(xué)期期末聯(lián)考試題含解析
- 南京機電職業(yè)技術(shù)學(xué)院《工程地震與結(jié)構(gòu)抗震》2023-2024學(xué)年第二學(xué)期期末試卷
- 2025年浙江長征職業(yè)技術(shù)學(xué)院單招綜合素質(zhì)考試題庫及答案1套
- 湖南新高考教學(xué)教研聯(lián)盟暨長郡二十校聯(lián)盟2025屆高三年級第二次聯(lián)考?xì)v史試題及答案
- (二模)東北三省三校2025年高三第二次聯(lián)合模擬考試 英語試卷(含答案解析)
- 2025年甘肅西北永新集團招聘11人筆試參考題庫附帶答案詳解
- 雨水泵站機電設(shè)備安裝工程施工方案52719
- 2025年吉林交通職業(yè)技術(shù)學(xué)院單招職業(yè)技能考試題庫新版
- 2025 保健品行業(yè)專題報告:保健品藍帽子九問九答
- 鋼絲繩理論重量計算方式
- 國家開放大學(xué)《計算機應(yīng)用基礎(chǔ)》終結(jié)性考試操作題
- 滸墅關(guān)鎮(zhèn)社區(qū)家長學(xué)校工作臺帳(模板)
- 電子科技大學(xué)自主招生軟件工程碩士招生簡章 —校外培養(yǎng)點
評論
0/150
提交評論