9.4 One-Sided Z-Transform 529nExample 9.7
Consider computing the output of an FIR filter,y[n]=1
2
(
x[n]+x[n−1]+x[n−2])
for an inputx[n]=u[n]−u[n−4] using the convolution sum, analytically and graphically, and
the Z-transform.SolutionThe impulse response ish[n]=0.5(δ[n]+δ[n−1]+δ[n−2]), so that h[0], h[1], h[2] are,
respectively, 0.5, 0.5, and 0.5, andh[n] is zero otherwise.Convolution sum formula:The equationy[n]=∑nk= 0h[k]x[n−k]=x[0]h[n]+x[1]h[n−1]+···+x[n]h[0] n≥ 0with the condition that in each entry the arguments ofx[.] andh[.] add ton≥0, givesy[0]=x[0]h[0]=0.5
y[1]=x[0]h[1]+x[1]h[0]= 1
y[2]=x[0]h[2]+x[1]h[1]+x[2]h[0]=1.5
y[3]=x[0]h[3]+x[1]h[2]+x[2]h[1]+x[3]h[0]=x[1]h[2]+x[2]h[1]+x[3]h[0]=1.5
y[4]=x[0]h[4]+x[1]h[3]+x[2]h[2]+x[3]h[1]+x[4]h[0]=x[2]h[2]+x[3]h[1]= 1
y[5]=x[0]h[5]+x[1]h[4]+x[2]h[3]+x[3]h[2]+x[4]h[1]+x[5]h[0]=x[3]h[2]=0.5and the rest are zero. In the above computations, we notice that the length ofy[n] is 4+ 3 − 1 =
6 since the length ofx[n] is 4 and that ofh[n] is 3.Graphical approach:The convolution sum is given by eithery[n]=∑nk= 0x[k]h[n−k]=
∑nk= 0h[k]x[n−k]Choosing one of these equations, let’s say the first one, we needx[k] andh[n−k], as functions
ofk, for different values ofn. Multiply them and then add the nonzero values. For instance, for
n=0 the sequenceh[−k] is the reflection ofh[k]; multiplyingx[k] byh[−k] gives only one value
different from zero atk=0, ory[0]= 1 /2. Forn=1, the sequenceh[1−k], as a function ofk,