Deconvolution Experiment for 1-D Filters

Use the function firfilt( ) to implement the following FIR filter
w [n] =x[n] − 0.9x[n-1]
on the input signal x[n] defined via the MATLAB statement:
xx = 256*(rem(0:100,50)<10);
In MATLAB you must define the vector of filter coefficients bb needed in
firfilt.
(a) Plot both the input and output waveforms x[n] and w[n] on the same
figure, using subplot. Make the discrete-time signal plots with MATLAB’s
stem function, but restrict the horizontal axis to the range 0 ≤ n ≤ 75.
Explain why the output appears the way it does by figuring out
(mathematically) the effect of the filter coefficients in (∗).
(b) Note that w[n] and x[n] are not the same length. Determine the length
of the filtered signal w[n], and explain how its length is related to the
length of x[n] and the length of the FIR filter.



Restoration Filter
The following FIR filter (FIR FILTER-2) [math]y[n]=\sum_{l=0}^{M}r^lw[n-l][/math] can be use to undo the effects of the FIR filter in the previous section.t performs restoration, but it only does this
approximately. Use the following steps to show how well it works when r =
0.9 and M = 22.
(a) Process the signal w[n] from w[n] =x[n] − 0.9x[n-1] with FILTER-2 to obtain the output signal
y[n].
(b) Make stem plots of w[n] and y[n] using a time-index axis n that is the same
for both signals. Put the stem plots in the same window for comparison—using
a two-panel subplot.
(c) Since the objective of the restoration filter is to produce a y[n] that is
almost identical to x[n], make a plot of the error (difference) between x[n] and
y[n] over the range 0 ≤ n < 50.