23/01/17 /BMGC
University of Manchester
Department of Computer Science
First Semester Year 3 Examination Paper
CS3291: Digital Signal Processing
Date of Examination: January 2006
Answer THREE questions out of the five given.
Time allowed TWO HOURS
(Each question is marked out of 20). Electronic calculators may be used.
_____________________________________________________________________________
1
(a) Briefly outline four of the main advantages and one disadvantage of digital signal processing
(DSP) as opposed to analogue signal processing.
[5 marks]
(b)
Define each of the following terms as applied to discrete time signal processing systems:
(i) linearity
(ii) timeinvariance
(iii) causality
(iv) stability
[4 marks]
(a) Given the impulseresponse {h[n]} of a discrete time LTI system, show that the response to
any other input signal {x[n]} is {y[n]} where:
y[n]
h[m] x[n m]
Hence express the system function H(z) in terms of {h[n]} for values of z with z 1.
How is the frequencyresponse derived from H(z)?
[8 marks]
(b) Explain how the poles and zeros of H(z) affect the stability and the gainresponse of the
system. Give H(z) for a DSP system with the following difference equation:
y[n] = x[n] + 1.21x[n2]  0.8 y[n1]
Plot its poles and zeros on the zplane, determine whether it is causal and stable and sketch its
gainresponse.
[9 marks]
(c) If the input signal to a digital filter with frequencyresponse
H(ej) = (1 + 2cos(2) )e 2j
is {x[n]} with x[n] = 2 cos( 0.5 n) for all n, what is the output signal?
[3 marks]
23/01/17 /BMGC
3.
(a) With the aid of phaseresponse graphs, explain what is meant by the terms 'linear
phase' and phase delay.
Explain why having linear phase is a desirable property for analogue and digital filters.
Is it true that all linear timeinvariant DSP systems have linear phase?
[5 marks]
(b) Use the windowing method with a rectangular window to design a fourth order "lowpass"
FIR digital filter whose cutoff frequency is 2.5 kHz and whose phaseresponse is linear phase
in the passband. The sampling frequency is 30 kHz.
Give the digital filters system function.
Give a signalflowgraph for the digital filter.
State whether the 4th order FIR digital filter is exactly linear phase or only approximately so.
[8 marks]
(c) Explain how the gainresponse of this digital filter could be improved by:
(i)
increasing the order and
(ii)
imposing a nonrectangular window?
How would these improvements affect the phaseresponse?
[4 marks]
(d) Why is the Remez exchange algorithm generally considered superior to the windowing
method as a design technique for FIR digital filters?
[3 marks]
4
(a) Briefly state the advantages and disadvantages of infinite impulseresponse (IIR) digital
filters as compared with finite impulseresponse (FIR) types.
[5 marks]
(b) A second order IIR notch digital filter is required to eliminate an unwanted sinusoidal
component of a digitised signal, sampled at 3 kHz, without affecting the magnitudes of other
frequency components too severely. The frequency of the unwanted sinusoid is 250 Hz and the
3 dB bandwidth of the notch should be approximately 38.2 Hz.
Design the notch filter by pole and zero placement.
Give its transfer function, H(z).
Sketch the gain response of the notch filter.
[9 marks]
(c) Give a direct form II signal flow graph for the notch filter and a program or flow diagram
to indicate how the filter would be implemented on a microprocessor with 16bit integer
arithmetic only available.
[6 marks]
23/01/17 /BMGC
5
(a) Define the Discrete Fourier Transform (DFT) and explain how it is related to the Discrete
Time Fourier Transform (DTFT).
[4 marks]
(b) Explain why analogue signals are generally lowpass filtered before they are converted to
digital form.
With the aid of simple diagrams, explain how aliasing distortion could arise if such filtering
were not applied.
Explain why increasing the sampling rate simplifies the analogue filters required. [7 marks]
(c) In the absence of an antialiasing input filter, what would be the result of sampling an 8 kHz
sinewave at (i) 10 kHz, (ii) 6 kHz and (iii) 4 kHz
[3 marks]
(d)
Explain the term quantisation noise A DSP system, with a 16bit uniformly quantising
analoguetodigital converter and a sampling rate of 20 kHz, is used to process analogue signals
bandlimited to the frequency range 0 Hz to 5 kHz. Estimate the maximum achievable signaltoquantisation noise ratio (SQNR) for sinusoidal input signals, and state what assumptions it is
reasonable to make about the statistical and spectral properties of the quantisation noise.
[6 marks]
___________________________________________________________________________
23/01/17 /BMGC
Solutions
1. (a)
Advantages of digital as opposed to analogue signal processing include the following
( choose 4 ) :
More and more signals are being transmitted and /or stored in digital form so it makes sense
to process them in digital form also.
DSP systems can be designed and tested in simulation using universally available
computing equipment ( e.g. PCs with sound and vision cards ).
Guaranteed accuracy, as predetermined by wordlength and sampling rate.
Perfect reproducibility. Every copy of a DSP system will perform identically.
The characteristics of the system will not drift with temperature or ageing.
Advantage can be taken of the availability of advanced semiconductor VLSI technology.
DSP systems are flexible in that they can be reprogrammed to modify their operation without
changing the hardware. Products can be distributed / sold and updated via Internet.
Digital VLSI technology is now so powerful that DSP systems can now perform functions
that would be extremely difficult or impossible in analogue form. Two examples of such
functions are :(i) adaptive filtering ( where the parameters of a digital filter are variable and
must be adapted to the characteristics of the input signal) and, (ii) speech recognition which
is again based on information obtained from speech by digital filtering.
 h[n] 
0 for stability
23/01/17 /BMGC
(c) SFGs
x[n]
z1
z1
0.5
0.5
y[n]
+
+
{y[n]}
{x[n]}
z
z1
1
0.5
x[n]
0
1
0.5
0.5
0
0
etc.
x[n1]
0
0
1
0.5
0.5
0
y[n1]
0
0
1
2
1
0
y[n]
0
1
2
1
0
0
{h[n]} = { , 0, 1, 2, 1, 0, .., 0 }
By otherwise: For (i) system function is H1(z) = 1 + 0.5 z1  0.5 z2 = (1  0.5z1)(1+z1)
For (ii) H2(z) = (1+z1)/(10.5z1)
Tranfser fn of (i) & (ii) is H1(z)H2(z) = (1  0.5z1)(1+z1)(1+z1)/(10.5z1)
= (1+z1)(1+z1) = 1 + 2z1 + z2
Impulse response of H1(z) H2(z) = {, 0, , 0, 1, 2, 1, 0, , 0, )
23/01/17 /BMGC
x[k ]{d [n k ]}
x[k ]{h[n k ]}
is
Now
1: n k
0:n k
Now let m = nk. When k = then m=. When k =  then m=.It follows that:
y[n]
h[m]x[n m]
h[ m] z n m z n
h[m]z
z n H ( z ) where H ( z )
h[m]z
H ( z)
1 1.21z 2
z 2 1.21 ( z 1.1 j )( z 1.1 j )
z ( z 0.8)
z ( z 0.8)
1 0.8 z 1
23/01/17 /BMGC
Zero at z=1.1j
0.8
Pole
Real(z)
Pole
Zero at z=1.1j
0
/4
/2
3/4
Gain estimate
1.25
0.6
0.26
1.8
11.25
3 dB points : Assuming negligible changes to pole distances and distance to zero at z = 1.1j,
the gain may be estimated to increase by 3 dB at = /2 0.1 from its value at = /2. This is
because the zero is at a distance 0.1 from the unit circle.
Similarly gain may be estimated to fall by 3dB at = 0.2 radians per sample because the pole
is also at distance 0.2 from the unit circle.
Hence sketch gain response:
G()
10
2(c)
Response is {2 G() cos(0.5n + ()} with = 0.5
G() = (1+2cos(2)) and ()=2
Response is 2(1+2cos(1))cos(0.5 n  1) } = 2(2.08)cos(0.5 n  1) }
i.e. {4.16 cos(0.5n  1) }
23/01/17 /BMGC
23/01/17 /BMGC
3(a)
Expressing the frequencyresponse H(ej) = G()exp(j()), a digital filter with phase response
() is linear phase if the phasedelay () / is constant for all . A linear phase response
graph is as follows:
()
1
2
G ()e jn d
1
2
/6
e jn d
/6
=
1 1 jn
e
2 jn
/6
/ 6
1
e j / 6 e j / 6
2jn
1
2
/6
 /6
1 d
1
2 j sin( / 6)
2jn
1/6 when n 0
(1/(n)) sin(n/6)
h[n] = 0.1667
when
______________________________
n
0
1
2
h[n]
0.1667
0.160
0.138
when
n=0.
n0
when n 0
10
23/01/17
3
0.106 etc
______________________________
On rectangularly windowing, we obtain the causal finite impulse response:
{h[n]} = { 0, 0.138, 0.16, 0.1667, 0.16 0.138, 0, , 0, }
After delaying by 2 samples to make the impulse response causal,
{h[n]} = { 0, 0, 0.138, 0.16, 0.1667, 0.16, .138, 0, , 0, }
H(z) = 0.138 + 0.16z1 + 0.1667 z2 + 0.16 z3 + 0.138z4
Signalflow graph
x[n]
z1
0.138
z1
z1
z1
0.16
0.16
0.138
y[n
]
Filter is now linear phase with phase delay of 2 sampling intervals (in the passband) .
It will have a well defined stopband decreasing in gain from 0dB at 0 Hz to 6 dB at the cutoff
frequency. The stopband gain will have ripples (illustration useful).
3(c)Increasing the order of the filter would mean that the phase delay would have to increase
also if the filter remains linear phase. The magnitude response would become closer to the ideal
lowpass response with more stopband ripples. If the rectangular window is still used, the
highest stopband ripple would not reduce significantly due to Gibb's Phenomenon.
The use of a Hann or similar raised cosine window would reduce the stopband ripples at the
expense of a less sharp cutoff rate from passband to stopband.
The phase response is not affected by the imposition of a nonrectangular window.
3 (d) The Remez exchange algorithm gives an 'equiripple approximation' to the ideal gain
response required; i.e. equal ripple peaks across passband and stopband.
[1]
With the windowing technique, the peaks of the stopband ripples are not equal in amplitude
and reduce with increasing frequency. The stopband approximation gets better with increasing
frequency .
[1]
By making all ripple peaks equal, Remez minimises the difference between the ideal gain
response and the approximation across the whole of the frequency range. It is a 'minimax'
approximation. Hence the highest stopband ripple peak will be lower than for the windowing
technique.
[1]
4. (a)
11
23/01/17
IIR type digital filters have the advantage of being economical in their use of delays, multipliers
and adders.
[1]
They have the disadvantage of being sensitive to coefficient roundoff inaccuracies and the
effects of overflow in fixed point arithmetic. These effects can lead to instability or serious
distortion.
[1]
Also, an IIR filter cannot be exactly linear phase.
[1]
FIR type digital filters may be realised by nonrecursive structures which are simpler and
more convenient for programming especially on devices specifically designed for digital
signal processing.
These structures are always stable, and because there is no recursion, roundoff and overflow
errors are easily controlled.
A FIR filter can be exactly linear phase.
[1]
The main disadvantage of FIR filters is that large orders can be required to perform fairly simple
filtering tasks.
[1]
4. (b)
H(z) =
(z  0.96 e j / 4) (z  0.96 e  j / 4)
z2  2 cos (/4) z
1.414 z
z2
1.92 z +
0.922
1.414 z  1
+ z2
H(z) =
12
23/01/17
1.92 z  1 +
0.922 z  2
4(b) continued
Difference equation is:
y[n] = x[n]  1.414 x[n1] + x[n2] + 1.92 y[n1]  0.922 y[n2]
Sketch gain response.
G()
0.7
dB
3 dB
/6
/60.04
/6+0.04
W
x[n]
y[n]
z1
1.92
W1
z1
0.922

W2
1.414
13
4(c) continued
% Direct Form II in fixed point arithmetic & shifting.
K=1024;
A0=K; A1=round(1.414*K); A2=K;
B1=round(1.92*K); B2=round(0.922*K);
W1 = 0; W2 = 0;
%For delay boxes
while 1
Input X ;
%Input a sample
W =K*X  B1*W1  B2*W2;
% Recursive part
W =round( W / K);
% By arith shift
Y = W*A0+W1*A1+W2*A2; % Nonrec. part
W2 = W1;
W1 = W;
%For next time
Y = round(Y/K);
%By arith shift
Output Y;
end;
%Back for next sample
23/01/17
14
23/01/17
x n e
 jn
where = / f s T radians/sample
This transforms a (possibly complex) discrete time signal {x[n]} of infinite duration to the
relative frequency () domain.
Defining: X(e j k ) X k , the DFT transforms a finite (possibly complex valued)
sequence {x[n]}0,N1 to the finite complex valued sequence {X[k]}0,N1.
The DFT formula is:N 1
For each k = 0,1, 2, , N1, X[k] is a sample of the spectrum X(e j) at =2k/N. In this case,
X(ej) is the spectrum (DTFT) of an infinite discrete time signal {x[n]} comprising {x[n]} 0,N1
padded out to infinity (in both directions) with zeros.
Therefore is in the range 0 to 2 is and X(ej) is uniformly sampled over this range.
1
T
X a ( j ( n 0 ))
with 0 2 / T
15
23/01/17
16
23/01/17