Docsity

Discrete Time Systems Part 2-Digital Signal Processing-Lab Exercise, Exercises of Digital Signal Processing

Toggle sidebar
bg1
S&S (CIS-312) Lab #2(Report)
4th Semester Spring,2010
Courtesy Dr. M. Tahir Akhtar Page 1 of 5
Due date: 02-04-2010
Name:
Laboratory Exercise 2
DISCRETE-TIME SIGNALS: TIME-DOMAIN REPRESENTATION
2.1 SIMULATION OF DISCRETE-TIME SYSTEMS
Project 2.1 Time Shifting and Multiplication of Sequences
A copy of Program P2_1 is given below:
< Insert program code here. Copy from m-file(s) and paste. >
Answers:
Q2.1 Program P2_1 was run. The plots generated are
< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >
Comment on the output signal.
Q2.2 Change the index to generate only 10 samples of input signal. Stem plot x, x1, x2, x3.
Q2.3 If x2[n] =x[n] then verify that x1[n] = x[n+1] and x3[n] = x[n-1]. If true then Show this graphically
by subplotting stem plots of x[n], x1[n], x2[n] and x3[n]
Project 2.2 Linear and Nonlinear Systems
A copy of Program P2_2, Check Linearity/Non-linearity of Systems (For the system:
num = [2.2403 2.4908 2.2403]; den = [1 -0.4 0.75]; with ic=0.0) is given
below:
< Insert program code here. Copy from m-file(s) and paste. >
Q2.4 Program P2_2 was run for the following three different sets of values of the weighting constants,
a and b, and the following three different sets of input frequencies f1 and f2 (choose yourself):
The plots generated for each of the above three cases are shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >
Based on these plots we can conclude that the system with different weights is -
Q2.5 Program P2_2 was run with the following non-zero initial conditions -
The plots generated are shown below -
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Discrete Time Systems Part 2-Digital Signal Processing-Lab Exercise and more Exercises Digital Signal Processing in PDF only on Docsity!

Courtesy Dr. M. Tahir Akhtar Page 1 of 5

Due date: 02-04-

Name:

Laboratory Exercise 2

DISCRETE-TIME SIGNALS: TIME-DOMAIN REPRESENTATION

2.1 SIMULATION OF DISCRETE-TIME SYSTEMS

Project 2.1 Time Shifting and Multiplication of Sequences

A copy of Program P2_1 is given below:

< Insert program code here. Copy from m-file(s) and paste. >

Answers:

Q2.1 Program P2_1 was run. The plots generated are

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Comment on the output signal.

Q2.2 Change the index to generate only 10 samples of input signal. Stem plot x, x1, x2, x3.

Q2.3 If x2[n] =x[n] then verify that x1[n] = x[n+1] and x3[n] = x[n-1]. If true then Show this graphically by subplotting stem plots of x[n], x1[n], x2[n] and x3[n]

Project 2.2 Linear and Nonlinear Systems

A copy of Program P2_2, Check Linearity/Non-linearity of Systems (For the system: num = [2.2403 2.4908 2.2403]; den = [1 -0.4 0.75]; with ic=0.0) is given

below:

< Insert program code here. Copy from m-file(s) and paste. >

Q2.4 Program P2_2 was run for the following three different sets of values of the weighting constants,

a and b, and the following three different sets of input frequencies f 1 and f 2 (choose yourself):

The plots generated for each of the above three cases are shown below:

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Based on these plots we can conclude that the system with different weights is -

Q2.5 Program P2_2 was run with the following non-zero initial conditions -

The plots generated are shown below -

Courtesy Dr. M. Tahir Akhtar Page 2 of 5

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Based on these plots we can conclude that the system with nonzero initial conditions is -

Q2.6 Program P2_2 was run with nonzero initial conditions and for the following three different sets of

values of the weighting constants, a and b, and the following three different sets of input

frequencies:

The plots generated for each of the above three cases are shown below:

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Based on these plots we can conclude that the system with nonzero initial conditions and

different weights is -

Project 2.2 Time-invariant and Time-varying Systems

A copy of Program P2_2: Checking Time Invariant/Varying Systems (num =

[2.2403 2.4908 2.2403]; den = [1 -0.4 0.75]; ) is given below:

< Insert program code here. Copy from m-file(s) and paste. >

Answers:

Q2.7 The output sequences y[n] and yd[n-10] generated by running Program P2_2 are

shown below -

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

These two sequences are related as follows -

The system is -

Q2.8 The output sequences y[n] and yd[n-D] generated by running Program P2_2 for the

following values of the delay variable D -

are shown below -

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

In each case, these two sequences are related as follows -

The system is -

Q2.9 The output sequences y[n] and yd[n-10] generated by running Program P2_2 for the

following values of the input frequencies -

are shown below -

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Courtesy Dr. M. Tahir Akhtar Page 4 of 5

< Insert program code here. Copy from m-file(s) and paste. >

Answers:

Q2.13 The first 41 samples of the impulse response of the discrete-time system of Project 2. generated by running Program P2_3 is given below:

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Q2.14 The required modifications to Program P2_3 to generate the impulse response of the following

causal LTI system:

y[n] + 0.71y[n-1] – 0.46y[n-2] – 0.62y[n-3]

= 0.9x[n] – 0.45x[n-1] + 0.35x[n-2] + 0.002x[n-3]

are given below:

< Insert program code here. Copy from m-file(s) and paste. >

The first 45 samples of the impulse response of this discrete-time system generated by running

the modified is given below:

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Q2.15 The MATLAB program to generate the impulse response of a causal LTI system of Q2.13 using

the filter command is indicated below:

< Insert program code here. Copy from m-file(s) and paste. >

The first 40 samples of the impulse response generated by this program are shown below:

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Comparing the above response with that obtained in Question Q2.13 we conclude -

Courtesy Dr. M. Tahir Akhtar Page 5 of 5

Project 2.4 Convolution

A copy of Program P2_4: Convolution (y=h*x) is produced below:

< Insert program code here. Copy from m-file(s) and paste. >

Answers:

Q2.16 The sequence y[n] is generated by running Program P2_4 are shown below:

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

Q2.17 Compute the individual outputs y 1 [n] y 2 [n]+… separately for each sample of

x[n] and then superimpose all outputs to find the total output (y[n]= y 1 [n]

y 2 [n]+…).

Project 2.5 Convolution

A copy of Program P2_5: Convolution (y=h*x) & Filtering (y1=filter(h,1,x1); x1=[x,zeros(1,8)] (where h = [3 2 1 -2 1 0 -4 0 3]; x = [1 -2 3 -4 3 2

1];) is reproduced below:

< Insert program code here. Copy from m-file(s) and paste. >

Answers:

Q2.18 The sequences y[n] and y1[n] generated by running Program P2_5 are shown below:

< Insert MATLAB figure(s) here. Copy from figure window(s) and paste. >

The difference between y[n] and y1[n] is -

The reason for using x1[n] as the input, obtained by zero-padding x[n], for generating

y1[n] is -

Q2.19 The length of output sequence y[n] in terms of input sequence x[n] and impulse response

h[n] is-

Q2.20 Explore and find the difference between convolution and filtering if any.

2.3 S & S Labs

Q2.21 Write at least five comments/suggestions about the labs.