数字信号处理实验报告2

上传人:第*** 文档编号:31421015 上传时间:2018-02-07 格式:DOC 页数:17 大小:769.50KB
返回 下载 相关 举报
数字信号处理实验报告2_第1页
第1页 / 共17页
数字信号处理实验报告2_第2页
第2页 / 共17页
数字信号处理实验报告2_第3页
第3页 / 共17页
数字信号处理实验报告2_第4页
第4页 / 共17页
数字信号处理实验报告2_第5页
第5页 / 共17页
点击查看更多>>
资源描述

《数字信号处理实验报告2》由会员分享,可在线阅读,更多相关《数字信号处理实验报告2(17页珍藏版)》请在金锄头文库上搜索。

1、1Name:Section:Laboratory Exercise 2DISCRETE-TIME SYSTEMS: TIME-DOMAIN REPRESENTATION2.1 SIMULATION OF DISCRETE-TIME SYSTEMSProject 2.1 The Moving Average System A copy of Program P2_1 is given below:% Program P2_1% Simulation of an M-point Moving Average Filter% Generate the input signaln = 0:100;s1

2、 = cos(2*pi*0.05*n); % A low-frequency sinusoids2 = cos(2*pi*0.47*n); % A high frequency sinusoidx = s1+s2;% Implementation of the moving average filterM = input(Desired length of the filter = );num = ones(1,M);y = filter(num,1,x)/M;% Display the input and output signalsclf;subplot(2,2,1);plot(n, s1

3、);axis(0, 100, -2, 2);xlabel(Time index n); ylabel(Amplitude);title(Signal #1);subplot(2,2,2);plot(n, s2);axis(0, 100, -2, 2);xlabel(Time index n); ylabel(Amplitude);title(Signal #2);subplot(2,2,3);plot(n, x);axis(0, 100, -2, 2);xlabel(Time index n); ylabel(Amplitude);title(Input Signal);subplot(2,2

4、,4);plot(n, y);axis(0, 100, -2, 2);xlabel(Time index n); ylabel(Amplitude);title(Output Signal); 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. 2The component of the input xn suppressed by the discrete-time system

5、 simulated by this program is s2Q2.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:s3=cos(2*pi*0.05*(n-1);s4= cos(2*pi*0.47*(n-1);z=s3+s4;y = 0.5*(x-z);3The effect of changing the LTI system on the

6、input is - Project 2.2 (Optional) A Simple Nonlinear Discrete-Time SystemA copy of Program P2_2 is given below:% Program P2_2% Generate a sinusoidal input signalclf;n = 0:200;x = cos(2*pi*0.05*n);% Compute the output signalx1 = x 0 0; % x1n = xn+1 x2 = 0 x 0; % x2n = xnx3 = 0 0 x; % x3n = xn-1y = x2

7、.*x2-x1.*x3;y = y(2:202);% Plot the input and output signalssubplot(2,1,1)plot(n, x)xlabel(Time index n);ylabel(Amplitude);title(Input Signal)subplot(2,1,2)plot(n,y)xlabel(Time index n);ylabel(Amplitude);title(Output signal);4Answers:Q2.5 The sinusoidal signals with the following frequencies as the

8、input signals were used to generate the output signals:The output signals generated for each of the above input signals are displayed below: The output signals depend on the frequencies of the input signal according to the following rules: This observation can be explained mathematically as follows:

9、Project 2.3 Linear and Nonlinear SystemsA copy of Program P2_3 is given below:% Program P2_3% Generate the input sequencesclf;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 2.4908 2.2403;5den = 1 -0.4 0.75;ic = 0 0; % Set zero initial conditionsy1 = filt

10、er(num,den,x1,ic); % Compute the output y1ny2 = filter(num,den,x2,ic); % Compute the output y2ny = filter(num,den,x,ic); % Compute the output ynyt = a*y1 + b*y2; d = y - yt; % Compute the difference output dn% Plot the outputs and the difference signalsubplot(3,1,1)stem(n,y);ylabel(Amplitude);title(

11、Output Due to Weighted Input: a cdot x_1n + b cdot x_2n);subplot(3,1,2)stem(n,yt);ylabel(Amplitude);title(Weighted Output: a cdot y_1n + b cdot y_2n);subplot(3,1,3)stem(n,d);xlabel(Time index n);ylabel(Amplitude);title(Difference Signal);Answers:Q2.7 The outputs yn, obtained with weighted input, and

12、 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:6The two sequences are same ;we can regard 10(-15) as 0The system is a liner systemQ2.9 Program 2_3 was run with the following non-zero initial conditions

13、- ic = 2 2;The plots generated are shown below - Based on these plots we can conclude that the system with nonzero initial conditions is as same as the zero initial condition with the time goneProject 2.4 Time-invariant and Time-varying SystemsA copy of Program P2_4 is given below:% Program P2_4% Ge

14、nerate the input sequencesclf;n = 0:40; D = 10;a = 3.0;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.2403;den = 1 -0.4 0.75;7ic = 0 0; % Set initial conditions% Compute the output yny = filter(num,den,x,ic);% Compute the output ydnyd = filter(num,den,xd,ic)

15、;% Compute the difference output dnd = y - yd(1+D:41+D);% Plot the outputssubplot(3,1,1)stem(n,y);ylabel(Amplitude); title(Output yn); grid;subplot(3,1,2)stem(n,yd(1:41);ylabel(Amplitude);title(Output due to Delayed Input xn ?, num2str(D),); grid;subplot(3,1,3)stem(n,d);xlabel(Time index n); ylabel(Amplitude);title(Difference Signal); 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 same, the output dont change with the time8The system is -

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号