Description
Problem 4.1
Consider a digital FIR filter whose input π₯[π] and output π¦[π] are related by the following
difference equation:
(a) Draw a flowgraph for this filter. How many multiplications per output sample does this
filter implementation (as represented by your flowgraph) require? What amount of
memory access is needed per output sample for this filter implementation. Justify your
answers.
(b) Write the algebraic expression for the system function π»(π§) for this filter.
(c) Draw the magnitude of the frequency response of this filter.
(d) Is this filter stable? Justify your answer.
Problem 4.2
Consider a digital IIR filter whose input π₯[π] and output π¦[π] are related by the following
difference equation:
(a) Draw a flowgraph for this filter. How many multiplications per output sample does this
filter implementation (as represented by your flowgraph) require? What amount of
memory retrieval is needed for this filter implementation. Justify your answers.
(b) Write the algebraic expression for the system function π»(π§) for this filter.
(c) Give your reasoning for why this filter is stable.
(d) Determine all the values of π for which it is guaranteed that π»,π./0 = 0.
y[n] = x[n]+ x[n β1]+ x[n β 2]+ x[n β3]+ x[n β 4]
y[n] = β0.125y[n β 2]+ 0.75y[n β1]+ x[n]
Problem 4.3
Consider a causal digital filter whose input π₯[π]and output π¦[π] are related through the
following difference equation:
π¦[π] β 1
2 π¦[π β 1] = π₯[π] β 1
4 π₯[π β 2]
(a) Draw the flowgraph corresponding to the above difference equation.
(b) Show that the same filter can be implemented using a non-recursive difference equation
(HINT: Figure out the System Function π»(π§) for the filter, simplify it by cancelling any
common factors between the numerator and denominator, and go back to the difference
equation in the time domain).
(c) Draw a flowgraph corresponding to the non-recursive difference equation.
(d) How does the computational complexity of the flowgraph you obtained in part (a) of this
problem compare to the computational complexity of the flowgraph you obtained in part
(c) of this problem?
Problem 4.4
Consider a second order section with the system function:
π»(π§) = 1
(1 β 0.9π
.9
: π§;<)(1 β 0.9π;.9
: π§;<)
(a) Determine a difference equation relating the input and output of this second order
section?
(b) Is it true that if the input signal to this filter is real-valued, the output signal from this
section is also guaranteed to be real? Explain your answer.
(c) Draw a Direct Form flowgraph for this second order section and specify the number of
multiplications per output sample by stored coefficients and the number memory
retrievals per output sample for this implementation. Are the stored coefficients all real
valued? Are the intermediate signals in the flowgraph also guaranteed to be real as long
as the input signal to the second order section is real? Explain your answers.
(d) Sketch the pole-zero plot for the system function for this second order section.
(e) Draw by hand an approximation to the magnitude of the frequency response of this
second order section. Is the magnitude of the frequency response zero at any frequency?
Experiential DSP Exercise 04
Approximating an Ideal Low Pass Filter by a FIR filter
In this assignment, we will investigate one way of approximating an ideal low-pass filter as a FIR
filter in MATLAB. Our goal is to examine FIR filters with 9-point and a 65-point impulse
responses as approximations to an ideal lowpass filter and then to compare their frequency
responses. The impulse response of an ideal low-pass filter is the sinc function which, as we know,
is the impulse response of a filter that is not practically implementable as a FIR or IIR filter. If the
ideal lowpass filter has cutoff frequency π= = 9
> rad/sec (or equivalently, π= = /G
>9 = 0.25 π»π§), its
impulse response is
JKL(
MN
O )
9P . We can approximate this ideal impulse response by a π-point impulse
response of a FIR filter by shifting the ideal impulse response by (π β 1)/2 and multiplying it by
the βwindowβ specified as: π’[π] β π’[π β π].
1) Set N = 9, fc = 0.25, n = 0:N-1, alpha = (N-1)/2.
2) Create the 9-point FIR impulse response using the MATLAB sinc function: h =
sinc(2*fc(n-alpha)).
3) To ensure that the gain of the frequency response of the FIR filter is 0 dB gain at π = 0,
we normalize the impulse response: h_normalized = h/sum(h). Please explain
why this normalization ensures 0 dB gain at π = 0.
4) Set N_fft = 512 and create H = fft(h_normalized, N_fft). As we learned
in Assignment 02, here we are taking 512 uniform samples of the frequency response from
π = 0 to π = 2π.
5) Set f = (0:N_fft β 1) / (N_ftt). Plot the magnitude of the frequency response
in decibels (dB) scale using plot(f, 20*log10(abs(H))). Save the figure as
Figure 1.
6) Repeat steps 1-5 for N = 65 and save the final figure as Figure 2.
7) Compare Figure 1 and Figure 2 and explain the differences. Pay particular attention to how
βsloppyβ the transition is from the passband of the filter (0 dB gain) to the stopband of the
filter.
8) For each of the two filters (9-point FIR filter and the 65-point FIR filter), how many
multiplications are required per output sample if each filter is implemented in direct form?
Explain how you arrived at your answers.

