# Impulse Response of Discrete Time System | MATLAB Tutorial

#### Impulse Response of Discrete Time System:

Discrete Time System is an algorithm, which operates on a discrete time signal called as input signal according to some well-defined rules/operation. Impulse Response of a system is the reaction to any discrete time system in response to some external changes. Impulse Response is generally denoted as h(t) or h[n]. The output y[n] of any discrete LTI system is depended on the input (i.e. x(n)) and system’s response to unit impulse (i.e. h[n]). Illustrated in Figure 1.

Figure 1

Figure 2

We can determine the systems output y[n], if we know system’s impulse response, h[n], and the input, x[n]. To find the impulse response of the system we provide a Unit impulse to the input x[n]. Illustrated in Figure 2.

To Find a Impulse Response, we first solve the difference equation of the system and then use Z transform.

#### EXAMPLE:

• Consider a system having transfer function as

Find the impulse response of Discrete Signal.

Solution:

Given Equation,

Now multiply both numerator and denominator by , we get

Rearranging terms,

By partial fractions,

on simplifying we get A= 0.4 and B= 1,

Taking inverse Z transform,

[Obtained by using the property ]

We now put n= 0,1,2,3,….. in equation 1 to get values of h(n) and compute them in the following table:

 n 0 1 2 3 4 5 6 7 8 9 10 h(n) 1 0.8 0.48 0.256 0.128 0.0614 0.02867 0.0131 0.00589 0.002621 0.00119

Plotting these values shall give us the Impulse Response of given Discrete Time System. Figure 3 illustrates the plot(at the end).

#### PSEUDO CODE:

• Create symbolic variables n and z and assume that they are integers.
• Compute inverse z-transform of H.
• Get the impulse response of system using command ‘impz(b,a,N)’ where ‘b’ is numerator coefficients, ‘a’is denominator coefficients and Number of Samples is ‘N’.
• Plot discrete sequence data.

#### MATLAB Code:

```syms n z
%Take the equation of H
H=1/(1-0.18*z^(-1)+0.16*(z^(-2)));
disp('Impulse response h(n) is,');
% Compute Inverse Z-transform
h=iztrans(H)
% Simplify the fractions
simplify(h);
N=15;
% Numerator Coefficients
b=[0 0 1]
% Denominator Coefficients
a=[1 -0.8 0.16]
%Generate Impulse Response
[H,n]=impz(b,a,N)
% Plot the response
stem(n,H)
xlabel('n')
ylabel('h(n)')
title('Impulse Response of Discrete Time System')
```

#### OUTPUT:

Impulse response h(n) is,
h =
2*(2/5)^n + (2/5)^n*(n – 1)
b =
0     0     1
a =
1.0000   -0.8000    0.1600
H =
0
0
1.0000
0.8000
0.4800
0.2560
0.1280
0.0614
0.0287
0.0131
0.0059
0.0026
0.0012
0.0005
0.0002

#### OUTPUT PLOT:

Figure 3

Pursuing Bachelor's Degree in Electronics and Telecommunication Engineering from K. J. Somaiya Institute of Engineering and Information Technology, Mumbai University.

### Recommended Posts

##### Test Post

17 Feb 2018 - Tutorial

##### Counters using conditionally executed subsystems | Simulink Tutorial

16 Feb 2018 - Simulink, Tutorial

##### Regulating drum boiler pressure

16 Feb 2018 - Simulink, Tutorial