Sie sind auf Seite 1von 3

Name:

Section:

Laboratory Exercise 2
DISCRETE-TIME SYSTEMS: TIME-DOMAIN REPRESENTATION

LINEAR TIME-INVARIANT DISCRETE-TIME SYSTEMS

Project 2.1 Computation of Impulse Responses of LTI Systems

In order to simulate a LTI system with input-output relation described as constant


coefficient linear differential equation:
N M

∑a k y (n − k ) = ∑br x(n − r )
k =0 r =0

we can use y=filter (num,den,x) command to generate output vector y with the
same dimensions as input vector x and previous condition ic=0. Here,

num= [ b0 b1 … bM ] and den = [ a0 a1 … aN ]

We can use y=filter (num,den,x,ic) in which ic =[ y(-1) y(-2) … y(-N)] is the


previous condition vetor.

y=impz(num,den,N) command is use to compute N first samples of impulse


response of LTI system.

Answers:

Q2.1 Write a program of computing output vector y[n] of a discrete-time


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]

With input vector x[n] is any value.

Q2.2 Modify the above program to generate 45 first samples of the impulse
response.

Q2.3 Write a MATLAB program to generate the impulse response of the


given LTI system using the filter command .

Project 2.2 Cascade of LTI Systems

In reality, a high-level LTI system is operated in the form of cascade of many low-
level LTI systems. For example, a 4th-order system as following:

y[n] + 1.6y[n-1] + 2.28y[n-2] + 1.325y[n-3] + 0.68y[n-4]

1
= 0.06x[n] – 0.19x[n-1] + 0.27x[n-2] - 0.26x[n-3] + 0.12x[n-4]

can be built of the two 2nd-order systems:

y1[n] + 0.9y1[n-1] + 0.8y1[n-2] = 0.3x[n] – 0.3x[n-1] + 0.4x[n-2]

and

y2[n] + 0.7y2[n-1] + 0.85y2[n-2]=0.2y1[n] – 0.5y1[n-1] + 0.3y1[n-2]

Answers:

Q2.4 Write a MATLAB program of generating the output sequences y[n], y2[n],
and the difference signal d[n]= y[n]-y2[n]with the input vector in a sinusoidal
function and non-zero initial condition vectors.

Q2.5 Modify the above program with the two 2nd-order systems in reverse order
and with zero initial conditions
The relation between y[n] and y2[n] in this case is –

Project 2.3 Convolution

Given a pair of sequences, use discrete convolution to find the response to the
input x[n] of the linear time-invariant system with impulse response h[n].

For example,
h = [3 2 1 -2 1 0 -4 0 3]
x = [1 2 3 4 3 2 1]

Answers:

Q2.6 Compute the convolution by hand, use MATLAB to plot the results.

Q2.7 Write a MATLAB function to compute the convolution of the two finite-length
sequences and plot the results.
y ( n) = h( n) ⊗x ( n)
Y (k ) = H (k ) × X (k )

Program code:

function [return value R1, R2,…]=name(argument A1, A2, …)

(body)

end.

Q2.8 Use CONV command to verify the results from the previous question.
Project 2.4 Stability of LTI Systems

2
Stability of a LTI system can only be obtained by the sum of the absolute values of
the impulse response samples. From that, the condition of a IIR system’s stability
is that the impulse response decreases to zero with increase of n.

Answers:

Q2.9 Write a simple MATLAB program to compute the sum of the absolute values
of the impulse response samples of a IIF system.

y ( n) +1.5 y (n −1) + 0.9 y (n − 2) = x (n) − 0.8 x (n −1)

Direction:
k
- Compute the sum S (k ) = ∑ h( n) with K gradually increases.
n =0
- Check the value of h(k ) after each step.
- If h(k ) is less than ε = 10 −6 , we can conclude that the sum S(k) is
convergent and close to S( ∞ ).

Program code:
for k = 1:N+1;
sum = sum + abs(h(k));
if abs(h(k)) < 10^(-6),
break,
end
end.

Q2.10 The purpose of the for command is –

The purpose of the end command is -

The purpose of the break command is -

Q2.11 From this value and the shape of the impulse response we can conclude
that the system is -

By running the above program with a larger value of N the new value of |
h(K)| is -

From this value we can conclude that the system is -

Q2.12 Write a similar program as above for the following system:

y(n) = x(n) - 4x(n-1) + 3x(n-2) + 1.7y(n-1) - y(n-2)

-------------------------------------------------------

Date: Signature:

Das könnte Ihnen auch gefallen