THE UNIT IMPULSE RESPONSE h[n]
3.7 THE UNIT IMPULSE RESPONSE h[n]
Consider an nth-order system specified by the equation
or
The unit impulse response h[n] is the solution of this equation for the input δ[n] with all the initial conditions zero; that is, subject to initial conditions
Equation (3.43) can be solved to determine h[n] iteratively or in a closed form. The following example demonstrates the iterative solution.
EXAMPLE 3.11: (Iterative Determination of h[n])
Find h[n], the unit impulse response of a system described by the equation
To determine the unit impulse response, we let the input x[n] = δ[n] and the output y[n] = h[n] in Eq. (3.45) to obtain
subject to zero initial state; that is, h[ −1] = h[−2] = 0. Setting n = 0 in this equation yields
Next, setting n = 1 in Eq. (3.46) and using h[0] = 5, we obtain Continuing this way, we can determine any number of terms of h[n]. Unfortunately, such a solution does not yield a closed-form expression for h[n].
Nevertheless, determining a few values of h[n] can be useful in determining the closed-form solution, as the following development shows.
THE CLOSED-FORM SOLUTION OF h[n]
Recall that h[n] is the system response to input δ[n], which is zero for n > 0. We know that when the input is zero, only the characteristic modes can be sustained by the system. Therefore, h[n] must be made up of characteristic modes for n > 0. At n = 0, it may have some nonzero value A 0 ,
so that a general form of h[n] can be expressed as [ † ] so that a general form of h[n] can be expressed as [ † ]
Setting n = 0 in this equation and using the fact that δ[m] = 0 for all m ≠ 0, and δ[0] = 1, we obtain
Hence [ ‡ ]
The N unknown coefficients in y c [n] (on the right-hand side) can be determined from a knowledge of N values of h[n]. Fortunately, it is a straightforward task to determine values of h[n] iteratively, as demonstrated in Example 3.11 . We compute N values h[0], h[1], h[2],..., h[N - 1] iteratively. Now, setting n = 0,1,2,..., N − 1 in Eq. (3.49) , we can determine the N unknowns in y c [n]. This point will become clear in the following example.
EXAMPLE 3.12
Determine the unit impulse response h[n] for a system in Example 3.11 specified by the equation This equation can be expressed in the advance operator form as
or
The characteristic polynomial is The characteristic modes are ( −0.2) n and (0.8) n . Therefore
Also, from Eq. (3.51) , we have a N = −0.16 and b N = 0. Therefore, according to Eq. (3.49)
To determine c 1 and c 2 , we need to find two values of h[n] iteratively. This step is already taken in Example 3.11 , where we determined that h[0] = 5 and h[1] = 3. Now, setting n = 0 and 1 in Eq. (3.53) and using the fact that h[0] = 5 and h[1] = 3, we obtain
Therefore
COMPUTER EXAMPLE C3.5
Use MATLAB to solve Example 3.12 . There are several ways to find the impulse response using MATLAB. In this method, we first specify the input as a unit impulse function. Vectors a
and b are created to specify the system. The filter command is then used to determine the impulse response. In fact, this method can be used to determine the zero-state response for any input.
>> n = (0: 19); x = inline ('n==0'); >> a = [1 -0.6 -0.16]; b = [5 0 0]; >> h = filter (b,a,x(n)); >> clf; stem(n,h,'k'); xlabel ('n'); ylabel('h[n]');
Figure C3.5
Comment. Although it is relatively simple to determine the impulse response h[n] by using the procedure in this section, in Chapter 5 we shall discuss the much simpler method of the z −transform.
EXERCISE E3.14
Find h[n], the unit impulse response of the LTID systems specified by the following equations:
a. y[n + 1] − y[n] = x[n] b. y[n] − 5y[n − 1] + 6y[n − 2] = 8x[n − 1] − 19x[n − 2] c. y[n + 2] − 4y[n + 1] + 4y[n] = 2x[n + 2] − 2x[n + 1]
d. y[n] = 2x[n] − 2x[n − 1]
Answers
a. h[n] = u[n − 1] b.
c. h[n] = (2 + n)2 n u[n] d. h[n] = 2 δ[n] − 2δ[n − 1]
[ † ] We assumed that the term y c [n] consists of characteristic modes for n > 0 only. To reflect this behavior, the characteristic terms should be expressed in the form γ n j u[n − 1]. But because u[n − 1] = u[n] − δ[n], c j γ n j u[n − 1] = c j γ n j u[n] −c j δ[n], and y c [n] can be expressed in terms of
exponentials δ n j u[n] (which start at n = 0), plus an impulse at n = 0. [ ‡ ] If a N = 0, then A 0 cannot be determined by Eq. (3.48) . In such a case, we show in Section 3.12 that h[n] is of the form A 0 δ[n] + A 1 δ[n − 1] +
y c [n]u[n]. We have here N + 2 unknowns, which can be determined from N + 2 values h[0], h[1],..., h[N + 1] found iteratively.