Module3 Part2
Module3 Part2
Module3 Part2
∑ 𝒂𝒌 𝒚[𝒏 − 𝒌] = ∑ 𝒃𝒌 𝒙[𝒏 − 𝒌]
𝒌=𝟎 𝒌=𝟎
Filter requires three input arguments:
a length N+1 vector of feed forward coefficients [bo,b1,b2,…bN]
1|Page
a length N+1 vector of feedback coefficients [ao,a1,a2,…aN] and
an input vector.
Optional 4th argument: initial state of the system should be appropriately inserted
2|Page
O/P ----> 1 2 3 4 3 2 1
Regions of support in time axis is (- 4 ≤ n ≤ 2) (graphically supported)
The region of support for thus obtained output may be comprehended by the width property.
Case 2): In general, the conv command should be carefully used to convolve infinite – duration signals.
Conv command can correctly compute a portion of such infinite duration signals.
By passing the first N samples of each signal, conv command returns a length (2N - 1) sequence. The
first N samples are computed correctly; the remaining N-1 samples are wrong results.
For the difference equation mentioned in the above example, the impulse response (calculated
analytically) of the system is h[n] = {-7 (0.6)n + 8 (0.4)n } u[n], hence by defining the inline function
calling it with n = [0 : 30] ' as:
>> h = inline('(-7*0.6.^n+8*0.4.^n).*(n>=0)','n');
>> x = inline(' n ',' n ');
>> ytc= conv(h(n),x(n));
>> stem ( [0:60] , ytc ,'k') Compare the result with earlier method.
In the result, 0 ≤ n ≤ 30, output samples are correctly computed. The remaining 31 ≤ n ≤ 61 output
sample values are incorrectly computed. Theoretically, the output envelope should continue to grow as
n tends to infinity, not decay. If “conv” command is used to convolve infinite – duration signals,
normally incorrect values should be omitted and are not used for display as:
>> stem(n,ytc(0:30),'k') will be identical to the earlier result.
3|Page
Exercises
For all the following exercises of A) to E), comment (where ever applicable) on the Nature
(characteristic polynomial, characteristic roots, characteristic modes), stability, and find the time
constant (in terms of sample count) of the system. Sketch the output responses and comment on the
nature of the responses (belongs to which class of signal model). Comment on the cut-off frequency
and filtering action (by suitably changing the forcing function frequency). {EXPECTATION IS THAT
HAVING UNDERSTOOD THE SAME IN CONTINUOUS_TIME, SAME CAN BE
INTERPRETED HERE WITH MINOR DIFFERENCE}
A) Solve the following difference equations, to find the Impulse Response, Zero –Input Response,
Zero–State Response and Total Response. Try to get the results iteratively (20 samples) and also
using filter (as applicable) command.
1) y[n+2] –0.6 y[n+1] + 0.16y[n] = 0 with y[-1] = -25 ; y[-2] = 0
2) y[n+2] +3 y[n+1] + 2y[n] = x[n+2] +3x[n+1] +3x[n] with x[n] = (3)nu[n], y[-1] = 3 ; y[-2] = 2
3) y[n] +2 y[n-1] + y[n-2] = 2x[n] -x[n-1] with x[n] = (3)-nu[n], y[-1] = 2 ; y[-2] = 3
4) y[n+3] –1.6 y[n+2] + 0.8y[n+1] +0.02y[n] = x[n] with x[n] = u[n], y[-1] = 1 ; y[-2] = 2 and y[-3] =3
B) Consider the discrete time system y[n] + y[n-1] +0.25 y[n-2] = 3 x[n-8]. Find the zero input
response, if y[-1] = 1 ; y[-2] = 1
C) Find the unit impulse response h[n] and hence find ZSR for the systems specified by the following
difference equations: Try to get the results using graphical convolution (Method 4) AND using
“conv” (method 3) functions and compare.
1) y[n+1] + 2y[n] =x[n] with x[n] = 2n u[n-1]
2) y[n] + 2y[n-1] =x[n] with x[n] = 3n+2u[n+1]
3) (E2-6E+9)y[n] = Ex[n] with x[n] = (3)-nu[n]
4) y[n] - 6 y[n-1] + 25y[n-2] = 2x[n] -4x[n-1] with x[n] = n u[n]
D) Find the zero state response of the LTID system, whose following unit impulse response h[n] and
input x[n].
1) h[n] = (-2)nu[n-1] ; x[n] = e-nu[n+1]
2) h[n] = ½{δ[n-2]-(-2)n+1 }u[n-3] ; x[n] = 3n-1u[n+2]
3) h[n] = {(2)n-2 +3(-5)n+2 }u[n-1] ; x[n] = 3n+2u[n+1]
4) h[n] = 3(n-2)(2)n-3 u[n-4] ; x[n] = 3-n+2 u[n+3]
5) h[n] = (3)n cos n − 0.5 u[n] ; x[n] = 2n u[n-1]
3
E) Use classical method, to solve the equations given in exercise A), and compare the results with the
iterative methods.
4|Page