Imperial College London: EE4-12 EE9-AO2 EE9-SC1
Imperial College London: EE4-12 EE9-AO2 EE9-SC1
Imperial College London: EE4-12 EE9-AO2 EE9-SC1
ExamHeader:
MSc and EEE/EIE PART IV: MEng and ACGI
Question 1 is worth 40% of the marks and other questions are worth 30%
Notation
• All signals and filter coefficients are real-valued unless explicitly noted otherwise.
• Unless otherwise specified, upper and lower case letters are used for sequences and their z-transforms
respectively. The signal at a block diagram node V is v[n] and its z-transform is V (z).
• x[n] = [a, b, c, d, e, f ] means that x[0] = a, . . . x[5] = f and that x[n] = 0 outside this range.
• ℜ(z), ℑ(z), z∗ , |z| and ∠z denote respectively the real part, imaginary part, complex conjugate,
magnitude and argument of a complex number z.
Abbreviations
Standard Sequences
Geometric Progression
− jωn 1
´π
DTFT: X(e jω ) = ∑∞
−∞ x[n]e x[n] = 2π −π X(e
jω )e jωn dω
kn kn
DFT: X[k] = ∑N−1
0 x[n]e− j2π N x[n] = 1
N ∑0N−1 X[k]e j2π N
2π(2n+1)k
DCT: X[k] = ∑N−1
n=0 x[n] cos 4N x[n] = X[0]
N
N−1
+ N2 ∑n=1 X[k] cos 2π(2n+1)k
4N
2π(2n+1+N)(2k+1) 2π(2n+1+N)(2k+1)
MDCT: X[k] = ∑2N−1
n=0 x[n] cos 8N y[n] = 1
N ∑N−1
0 X[k] cos 8N
Convolution
V e jω = X e jω Y e jω
DTFT: v[n] = x[n] ∗ y[n] , ∑∞
r=−∞ x[r]y[n − r] ⇔
1 1
´π
V e jω = e jθ Y e j(ω−θ ) dθ
e jω ~Y e jω =
v[n] = x[n]y[n] ⇔ 2π X 2π −π X
N−1
v[n] = x[n]y[n] ⇔ V [k] = N1 X[k] ~N Y [k] , 1
N ∑r=0 X[r]Y [(k − r) mod N ]
Group Delay
F (nh[n])
jω )
The group delay of a filter, H(z), is τH (e jω ) = − d∠H(e =ℜ −z dH(z)
=ℜ where
dω H(z) dz
z=e jω F (h[n])
F ( ) denotes the DTFT.
Three increasingly sophisticated formulae for estimating the minimum order of an FIR filter with unity
gain passbands:
a
1. M ≈ 3.5∆ ω
a−8
2. M ≈ 2.2∆ ω
a−1.2−20 log10 b
3. M ≈ 4.6∆ ω
where a =stop band attenuation in dB, b = peak-to-peak passband ripple in dB and ∆ ω = width of
smallest transition band in normalized rad/s.
A lowpass filter, H(z), with cutoff frequency ω0 may be transformed into the filter H(ẑ) as follows:
b) A filter, with input x[n] and output y[n], is defined by the difference equation
c) Figure 1.1 shows the block diagram of a filter implementation comprising two
delays, five multipliers with real-valued coefficients c1 , · · · , c5 and four adder
elements.
Y (z) c3 +c4 z−1 +c5 z−2
i) Show that transfer function X(z) = 1−c1 z−1 −c2 z−2
. [3]
ii) Suppose that each multiplier introduces independent additive white
noise at its output with power spectral density S(ω) = S0 and that
the noise signals are uncorrelated with x[n]. Show that the combined
effect of the five noise sources is equivalent to two additive white
noise signals at x[n] and y[n] respectively. Hence determine the over-
all power spectral density, N(ω), of the noise at y[n]. [3]
Figure 1.1
e) Figure 1.2 shows the analysis and synthesis sections of a subband processing
system. The input and output signals are x[n] and y[n] respectively and the
intermediate signals are vm [n], um [r] and wm [n] where m = 0 or 1 according to
the subband. The corresponding z-transforms are X(z), Y (z) etc.
i) Show that it is possible to express
the overall
transfer function in the
X(z)
form Y (z) = T (z) A(z) and determine expressions
X(−z)
for T (z) and A(z).
You may assume without proof that for m = 0 or 1, [3]
1 n 1 1 o
Um (z) = Vm z 2 +Vm −z 2
2
Wm (z) = Um z2 .
Figure 1.2
Give expressions for the energy and average power of y[r] in terms
of Ex and Px . [2]
iii) Figure 1.4 shows the power spectral density of x[n] which comprises
white noise of unit magnitude together with a bandpass signal com-
ponent occupying the range 0.5 < |ω| < 1. Sketch the power spectral
density of y[r] when K = 3 and give the magnitude of its white noise
component and the magnitude and frequency range of all bandpass
components. [3]
iv) The diagram of Fig. 1.3 is followed by a lowpass filter to remove
spectral images. If K = 3 and x[n] is as specified in part iii) above,
determine the transition bandwidth and transition band centre fre-
quency of a suitable lowpass filter and explain the reasons for your
choices.
[2]
6
Power Spectral Density
0
-3 -2 -1 0 1 2 3
Frequency (rad/samp)
Explain the relative advantages of the two error measures and explain the pur-
pose of the real-valued non-negative weighting functions WS (ω) and WE (ω).
[2]
d) Suppose that 0 ≤ ω1 < ω2 < . . . < ωK ≤ π is a set of K frequencies and that
A(z) = 1 + [z−1 z−2 · · · z−N ]a and B(z) = [1 z−1 z−2 · · · z−M ]b where a and b
are real-valued coefficient column vectors.
i) Show that it is possible to express the equations EE (ωk ) = 0 for
1≤k ≤ K as a set of K simultaneous linear equations in the form
a
(P Q) = d.
b
State the dimensions of the matrices P and Q and of the vector d and
derive expressions for the elements of P, Q and d. [4]
ii) Explain how, by separating the real and imaginary parts of P, Q and
d,
it ispossible to obtain a set of simultaneous linear equations for
a
in which all coefficients are real-valued. Explain the circum-
b
stances under which some of the resultant equations will necessarily
have all-zero coefficients. [4]
iii) Explain why it may be desirable to apply the transformation of part
b) after obtaining the solution to the equations of part d) ii). [2]
iv) Assuming that ω1 = 0 and ωK = π, determine the minimum value of
K to ensure that the equations of part d) ii) are not underdetermined.
[4]
b
π
e) Suppose now that H(z) = 1+az −1 , that K = 3, that ωk = 0, 2 , π , that
(
2 for ω ≤ 0.25π
D(ω) = .
1 for ω > 0.25π
WE (ω) ≡ 1
Determine the numerical values of the elements of P, Q and d and hence deter-
mine the numerical values of a and b that minimize ∑k |EE (ωk )|2 . [6]
You may assume without proof that the least squares solution to an overdeter-
−1 T
mined set of real-valued linear equations, Rx = q, is given by x = RT R R q
assuming that R has full column rank.
b) The filter H(z) is now implemented as a polyphase filter as shown in Fig. 3.2.
The filter implementation uses a single set of delays and multipliers with com-
mutated coefficients.
i) State the length of the filter impulse response h0 [n] in terms of M, P
and/or Q and give an expression for the coefficients h0 [n] in terms of
h[r]. [2]
ii) If x[n] = 0 for n < 0, give expressions for v[0], v[1], v[2P+1] in terms
of the input x[n] and the coefficients h p [n]. [2]
iii) Explain how it is possible to eliminate the output decimator by chang-
ing both the sequence and rate at which the coefficient sets, h p [n] are
accessed.
Determine the new coefficient set order for the case P = 5 and Q = 7.
[3]
iv) Determine the number of multiplications per input sample for the
system of part b) iii) and the number of distinct coefficients that must
be stored. You may assume that M + 1 is a multiple of P. [2]
c) Suppose now that the sample rate of the input, x[n], is 18 kHz and that the
system is implemented as in part b) iii) with the values of a and ∆ ω as given in
part a) i).
Determine the values of P, Q and M when the sample rate of the output, y[m],
is (i) 10 kHz and (ii) 10.1 kHz [note that 101 is a prime number].
For each of these cases estimate the number of multiplications per input sample
and the number of distinct coefficients that must be stored. [5]
c) Figure 4.1 shows a block diagram that implements the equation of part b) in
discrete time. Complex-valued signals are shown as bold lines and are repre-
sented using their real and imaginary parts. The block labelled “Conj” takes the
complex conjugate of its input. The differentiation block, D(z), is designed as
an FIR filter using the window method with a target response
(
jcω for |ω| ≤ ω1
D(e jω ) =
0 otherwise
Notation
• All signals and filter coefficients are real-valued unless explicitly noted otherwise.
• Unless otherwise specified, upper and lower case letters are used for sequences and their z-transforms
respectively. The signal at a block diagram node V is v[n] and its z-transform is V (z).
• x[n] = [a, b, c, d, e, f ] means that x[0] = a, . . . x[5] = f and that x[n] = 0 outside this range.
• ℜ(z), ℑ(z), z∗ , |z| and ∠z denote respectively the real part, imaginary part, complex conjugate,
magnitude and argument of a complex number z.
Abbreviations
Standard Sequences
Geometric Progression
− jωn 1
´π
DTFT: X(e jω ) = ∑∞
−∞ x[n]e x[n] = 2π −π X(e
jω )e jωn dω
kn kn
DFT: X[k] = ∑N−1
0 x[n]e− j2π N x[n] = 1
N ∑0N−1 X[k]e j2π N
2π(2n+1)k
DCT: X[k] = ∑N−1
n=0 x[n] cos 4N x[n] = X[0]
N
N−1
+ N2 ∑n=1 X[k] cos 2π(2n+1)k
4N
2π(2n+1+N)(2k+1) 2π(2n+1+N)(2k+1)
MDCT: X[k] = ∑2N−1
n=0 x[n] cos 8N y[n] = 1
N ∑N−1
0 X[k] cos 8N
Convolution
V e jω = X e jω Y e jω
DTFT: v[n] = x[n] ∗ y[n] , ∑∞
r=−∞ x[r]y[n − r] ⇔
1 1
´π
V e jω = e jθ Y e j(ω−θ ) dθ
e jω ~Y e jω =
v[n] = x[n]y[n] ⇔ 2π X 2π −π X
N−1
v[n] = x[n]y[n] ⇔ V [k] = N1 X[k] ~N Y [k] , 1
N ∑r=0 X[r]Y [(k − r) mod N ]
Group Delay
F (nh[n])
jω )
The group delay of a filter, H(z), is τH (e jω ) = − d∠H(e =ℜ −z dH(z)
=ℜ where
dω H(z) dz
z=e jω F (h[n])
F ( ) denotes the DTFT.
Three increasingly sophisticated formulae for estimating the minimum order of an FIR filter with unity
gain passbands:
a
1. M ≈ 3.5∆ ω
a−8
2. M ≈ 2.2∆ ω
a−1.2−20 log10 b
3. M ≈ 4.6∆ ω
where a =stop band attenuation in dB, b = peak-to-peak passband ripple in dB and ∆ ω = width of
smallest transition band in normalized rad/s.
A lowpass filter, H(z), with cutoff frequency ω0 may be transformed into the filter H(ẑ) as follows:
Suppose that x[n] is any bounded sequence with |x[n]| < B < ∞ ∀n.
We need to show that the output, y[n] = ∑∞
r=−∞ h[r]x[n − r] is also
bounded. We have
∞
|y[n]| = ∑ h[r]x[n − r]
r=−∞
∞
≤ ∑ |h[r]x[n − r]|
r=−∞
∞
= ∑ |h[r]| |x[n − r]|
r=−∞
∞
< B ∑ |h[r]| = BS
r=−∞
Many people proved the converse of what was asked in the question:
i.e. BIBO ⇒ ∑∞ n=−∞ |h[n]| < ∞ . If you need to show something is
true for any input x[n], you cannot start by assuming one particular
x[n].
We have H(z) = ∑∞ −n
n=−∞ h[n]z . If |z| = 1 we can write
∞
|H(z)| = ∑ h[n]z−n
n=−∞
∞
|h[n]| z−n
≤ ∑
n=−∞
∞
= ∑ |h[n]| = S
n=−∞
b) A filter, with input x[n] and output y[n], is defined by the difference equation
y[n] = αy[n − 1] + (1 − α)x[n]
where 0 < α < 1 is a real constant.
i) Determine the system function of the filter, H(z), and the impulse
response, h[n], for n = −1, 0, 1, 2. [2]
1−α (1−α)z
The system function is H(z) = 1−αz−1
= z−α . This has a pole at
z = α and a zero at z = 0.
The zero at z = 0 is easily overlooked. It is easiest to find all the
poles and zeros if you express the transfer function as a rational
polynomial in z rather than in z−1 . Even when H(z) is written in the
1−α
form H(z) = 1−αz −1 , it can easily be seen that H(0) = 0.
2
We want H(e jω ) = H(e jω ) × H ∗ (e jω ) = 0.5 . Thus
1−α 1−α
0.5 = − jω
×
1 − αe 1 − αe jω
(1 − α)2
=
1 − 2α cos ω + α 2
2 2 (1−α)2
From this, cosω = 1+α−2(1−α) 4α−1−α 2
2α =
2α = 1 − 2α and so
−1 4α−1−α 2 −1 (1−α)2
ω3dB = cos 2α = cos 1 − 2α .
Quite
a few √ people wrote down an equation with modulus signs:
H(e jω ) = 0.5 but did not known how to solve it. The stan-
dard procedure is to multiply both sides by the complex conjugate
as we do above. Some people just quietly ignored the modulus signs
instead and consequently got an imaginary √ value for ω. Several
thought −3 dB meant a gain of
√0.5 instead
of 0.5.
Several took the
jω j0
) = 0.5 × H(e ); Luckily for them,
question to mean H(e
3dB
H(e j0 ) = 1 in this case.
iv) If the sample frequency is fs , show that, for n ≥ 0, the impulse re-
t
sponse, h[n], is equal to a sampled version of g(t) = Ae− τ and deter-
mine the values of the constants A and τ. [2]
1
α = e− τ fs . Rearranging the later equation gives τ = −1
fs ln α .
Surprisingly many people couldn’t do this. It really just involves
making the substitution t = nT = fns and then matching the coeffi-
cients of the resultant expressions. Some said t = n fs instead; this is
1
not dimensionally consistent since fs has dimensions time .
c) Figure 1.1 shows the block diagram of a filter implementation comprising two
delays, five multipliers with real-valued coefficients c1 , · · · , c5 and four adder
elements.
Y (z) c3 +c4 z−1 +c5 z−2
i) Show that transfer function X(z) = 1−c1 z−1 −c2 z−2
. [3]
The two delay elements form a shift register whose input is u[n].
Hence the inputs to the c1 and c2 multipliers are u[n − 1] and u[n − 2]
respectively. It follows directly from the diagram that u[n] = x[n] +
c1 u[n − 1] + c2 u[n − 2]. Taking z-transforms gives U(z) = X(z) +
Most got this right. A few had sign errors in the coefficients c1 and/or
c2 even thought the correct answer was given in the question. Some
just stated that it was a Direct Form II implementation of B(z)/A(z);
this does not constitute a proof.
Note that the expression in the first line gets full marks.
Some mixed up the time domain and z-transform domain: you never
get x[n] and z in the same equation. Some just assumed the input
noise was multiplied by c3 instead of by H(e jω ) and most people
forgot that the noise power spectrum was multiplied by the gain
squared.
Figure 1.1
M+1
The right side is the absolute value of the sum of 2 sine waves as
required.
If M is even, there is an odd number of coefficients but the central
coefficient, h[0.5M], must be zero since h[0.5M] = −h[M − 0.5M] =
−h[0.5M]. Hence
M
2 −1 M
−n M −0.5M
H(z) = ∑ h[n]z +h z + ∑ h[n]z−n
n=0 2 n= M +1 2
M−2
2
z−n − zn−M
= 0+ ∑ h[n]
n=0
M−2
2
jω
⇒ H(e ) = ∑ 2h[n] sin ((n − 0.5M) ω)
n=0
The derivation is identical to that for odd M except for the upper
summation limit. The right side is the absolute value of the sum of
M
2 sine waves as required.
The coefficients, h[n] go from n = 0 to n = M and so if M is odd,
there is an even number of coefficients. Many got the summation
limits slightly wrong, sometimes because they assumed there were M
coefficients rather than M + 1 and sometimes because they assumed
iii) Derive an expression for the phase response, ∠H(e jω ), and deter-
jω )
mine the group delay, τH e jω = − d∠H(e
dω . [2]
jω )
Differentiating this gives τH e jω = − d∠H(e
dω = 0.5M. Note that
the sgn() function is piecewise constant and so its derivative is zero.
Almost everyone omitted the π2 (sgn( ) − 1) term completely and many
omitted the −0.5π term arising from the factor − j. Somejωtried
jω
to derive τH e from the formula sheet expression τH e =
−z dH(z)
ℜ H(z) dz jω which, although correct, is not a good approach.
z=e
Hence
where T (z) = 21 (G0 (z)H0 (z) + G1 (z)H1 (z)) and A(z) = 21 (G0 (z)H0 (−z) + G1 (z)H1 (−z)).
Most people got this right.
iii) Suppose that H0 (z) = H1 (−z) = G0 (z) = −G1 (−z). Show that in
this case A(z) = 0 and explain how the frequency responses H1 (e jω ),
From the relations given, we can express all the blocks in terms of
H0 (z) to obtain
A(z) = G0 (z)H0 (−z)+G1 (z)H1 (−z) = H0 (z)H0 (−z)−H0 (−z)H0 (z) =
0.
Our no-alias condition is therefore met.
Some people correctly derived A(z) = G0 (z)H0 (−z) − G0 (−z)H0 (z)
but went on to say that this must be zero because, they wrongly as-
serted, G0 (−z) = G0 (z) and H0 (z) = H0 (−z). This is the wrong
pairing: in fact G0 (−z) = H0 (−z) and H0 (z) = G0 (z).
Clearly G0 (e jω ) is identical to H0 (e jω ).
H1 (e jω ) = H0 (−e jω ) = H0 (e j(ω−π) ) = H0∗ (e j(π−ω) ).
H1 (e jω ) is therefore the frequency response of H0 (e jω ) but conju-
gated and reflected around ω = π2 .
G1 (e jω ) is the same as H1 (e jω ) but negated or, equivalently, with π
added onto the phase response.
Some people only discussed the magnitude responses.
Figure 1.2
−r −r −nK = ∞
−n
Y (z) = ∑∞ ∞
r=−∞ y[r]z = ∑{r:K|r} y[r]z = ∑n=−∞ y[nK]z ∑n=−∞ x[n] zK =
X zK .
ii) The energy and average power of x[n] are defined respectively as
∞
Ex = ∑ |x[n]|2
n=−∞
N
1
Px = lim
N→∞ 2N + 1
∑ |x[n]|2 .
n=−N
Give expressions for the energy and average power of y[r] in terms
of Ex and Px . [2]
The non-zero samples of y[n] are identical to the samples of x[n] and
so the energy of the two signals is the same: EY = EX . However y[n]
has K times as many samples, so its power is PY = K1 PX .
To show this algebraically (rather laborious), we write
N
1
Px , lim
N→∞ 2N + 1
∑ |x[n]|2
n=−N
N
1
= lim
N→∞ 2N + 1
∑ |y[Kn]|2
n=−N
KN
2KN + 1 1
= lim ∑ |y[m]|2
N→∞ 2N + 1 2KN + 1 m=−KN
!
KN
K −1 1 2
= lim K +
N→∞ 2N + 1
× lim
N→∞ 2KN + 1
∑ |y[m]|
m=−KN
= K × Py .
iii) Figure 1.4 shows the power spectral density of x[n] which comprises
white noise of unit magnitude together with a bandpass signal com-
ponent occupying the range 0.5 < |ω| < 1. Sketch the power spectral
density of y[r] when K = 3 and give the magnitude of its white noise
component and the magnitude and frequency range of all bandpass
components. [3]
1.5
0.5
0
-3 -2 -1 0 1 2 3
Frequency (rad/samp)
Thus the magnitude of the white component will be 0.33 and that of
the bandpass components will be 2.
The frequency ranges of the bandpass components will be
2π
− 3 , 0, 2π
1 1 2π 2π
1 1
3 ± 4 ± 12 = − 3 , 0, 3 ± 6 , 3 .
That is, each will be of width 16 and centered ± 14 either side of the
image centre. The band edges are therefore at
ω = ± {0.167, 0.333, 1.761, 1.928, 2.261, 2.428}.
Most people got the overall spectrum shape correct although a few
expanded the spectrum horizontally by a factor of 3 instead of com-
pressing it. Often the precise limits of the bandpass components
were incorrectly calculated. Some made the bandpass regions even
spaced apart. Very few reduced the magnitude by a factor of 3 even
those that correctly said that Py = K −1 Px in the previous part.
1.428. The centre of the transition band is the average of these two
values and corresponds to the old Nyquist frequency, i.e. π3 = 1.047.
1.5
0.5
0
-3 -2 -1 0 1 2 3
Frequency (rad/samp)
Mostly OK.
0
-3 -2 -1 0 1 2 3
Frequency (rad/samp)
= p−1 z pz−1 − 1
= 1 − pz−1 − p∗ z + pp∗
= 1 − (q∗ )−1 z−1 − q−1 z + (qq∗ )−1
= (qq∗ )−1 qq∗ − qz−1 − q∗ z + 1
q
from which α = |q|−2 = |q|−1 = |p|.
The question proved much harder than I expected; in part this was because of
numerous algebraic errors involving complex numbers. Many people had diffi-
culty with the algebra because of the modulus signs; some people just omitted
the modulus signs completely which gives easy algebra but the wrong answer.
Equations containing modulus signs are fine if you restrict yourself to multi-
plication and conjugation (as in the first method above) since |xy| = |x| |y| and
|x∗ | = |x|. Alternatively, as in the second method, it can be a good idea to
eliminate modulus signs from algebraic equations by squaring them (i.e. mul-
tiplying by the
p complex conjugate). This is usually a much better idea than
using |x| = ℜ(x)2 + ℑ(x)2 which is inevitably very messy. Some people de-
composed z = e jω = cos ω + j sin ω and/or decomposed p = a + jb which led
to lots of algebra and occasionally the right answer. Several implicitly assumed
q
−1 = (1 − p cos ω)2 + p2 sin2 ω.
p was real by writing 1 − pz
−1 −2
b) H1jω(z) = 4 + 14zjω − 8z . Determine the coefficients of H2 (z)
Suppose that
such that H1 (e ) = H2 (e ) for all ω and that all the zeros of H2 (z) lie
inside the unit circle. [4]
z−1 or else
To find the roots of H1 (z) you can either treat it as a polynomial in √
142 +128
treat z2 H(z) as a polynomial in z. These alternatives give z−1 = −14± −16 =
√
−14±18 −14± 142 +128 −14±18
−16 = {2, −0.25} or else z = 8 = 8 = {0.5, −0.4}. The
jω )
c) When designing an IIR filter H(e jω ) = B(e
A(e jω )
to approximate a complex target
response D(ω) two error measures that may be used are the weighted solution
error, ES (ω), and the weighted equation error, EE (ω), defined respectively by
B(e jω )
ES (ω) = WS (ω) − D(ω)
A(e jω )
EE (ω) = WE (ω) B(e jω ) − D(ω)A(e jω ) .
Explain the relative advantages of the two error measures and explain the pur-
pose of the real-valued non-negative weighting functions WS (ω) and WE (ω).
[2]
The solution error is a direct measure of the error in the frequency response
but has the disadvantage that it gives rise to a set of non-linear simultane-
ous equations which do not have a closed form solution. Although the equa-
tion error gives rise to a set of linear equations which are straightforward to
solve, it multiplies the true frequency response errors by A(e jω ) and so, un-
less WE (ω)
isjωadjusted
accordingly, gives a higher weight to spectral regions
in which A(e ) is large. Although the two errors are equivalent if there hap-
pens to be a solution that makes them zero, minimizing the equation error will
not generally give the same solution as minimizing the solution error.
The weighting functions, WS (ω) and WE (ω) are used to control the relative
importance of errors in different parts of the spectrum. A high weight will
result in a lower error.
Most understood the benefit of the equation error over the solution error. How-
ever, many people did not understand that the weighting functions allow you
to decide that you would like higher accuracy in one part of the spectrum than
another. For example, you might well want lower errors in the stop band than
in the pass band.
a
pTk qTk
Rearranging this equation gives = WE (ωk )D(ωk )
b
where pTk = −WE (ωk )D(ωk )[e− jωk e− j2ωk · · · e− jNωk ]
and qTk = WE (ωk )[1 e− jωk e− j2ωk · · · e− jMωk ]. Note that there are
M + 1 coefficients in b but only N coefficients in a because the first
coefficient of A(z) is always equal to 1.
Thus the dimensions of P, Q and d are K × N, K × (M + 1) and
K × 1. and their kth rows are pTk , qTk and WE (ωk )D(ωk ) respectively.
Note that finding a least squares solution to an equation is different
from finding an exact solution. Thus if f (x)g(x) = 0 has an exact
solution, it must satisfy f (x) = 0 or g(x) = 0. However, if the original
equation has no exact solution, its least-squares solution is not the
same as the least squares solution to either f(x)=0 or g(x)=0. Thus
jω jω
in the equation WE (ωk ) B(e ) − D(ωk )A(e ) = 0, you cannot
k k
just ignore the WE (ωk ) term even if it is non-zero (several people did
this). Many people got the dimensions wrong; some used M instead
of M + 1 and others said the number of columns of P and/or Q was
max (M, N) or something similar. The total number of columns of
of P and Q must equal the number of unknowns (N + M + 1) and
the number of rows of P, Q and d must be equal to the number of
equations (K). Some assumed k = 0, · · · , K even though the question
says k = 1, · · · , K.
ii) Explain how, by separating the real and imaginary parts of P, Q and
d,
it ispossible to obtain a set of simultaneous linear equations for
a
in which all coefficients are real-valued. Explain the circum-
b
stances under which some of the resultant equations will necessarily
have all-zero coefficients. [4]
To obtain a stable filter, the zeros of A(z) must lie inside the unit cir-
cle. There is no guarantee that the solutions of the equations will
meet this requirement so the transformation of part b) may be ap-
plied to A(z) to enforce stability. This will change the phase response
but not the magnitude response of the resultant filter.
Some suggested that the transformation should also be applied to
B(z) in order to make it minimum phase. This is a possible goal but
is not nearly as important as ensuring a stable filter.
b
e) Suppose now that H(z) = that K = 3, that ωk = 0, π2 , π , that
1+az−1
,
(
2 for ω ≤ 0.25π
D(ω) = .
1 for ω > 0.25π
WE (ω) ≡ 1
Determine the numerical values of the elements of P, Q and d and hence deter-
mine the numerical values of a and b that minimize ∑k |EE (ωk )|2 . [6]
You may assume without proof that the least squares solution to an overdeter-
−1 T
mined set of real-valued linear equations, Rx = q, is given by x = RT R R q
assuming that R has full column rank.
Where, in the last line, we have used the formula for the inverse of a 2 × 2
−1
p q 1 s −q
matrix , = ps−rq .
r s −r p
From this a = −0.294 and b = 1.235.
Equivalently, you can just solve the simultaneous equations 6a − b = 3 and
−a + 3b = 4.
Surprisingly, many people did not convert the 3 complex-valued equations into
4 real-valued equations despite having given a correct answer to part (ii). As a
result, they ended up with complex values for a and b.
The lowpass filter must eliminate the images introduced by the up-
sampler and the alias components introduced by the down sampler
and must therefore eliminate all frequencies above the lower of the
input and output Nyquist frequencies. Since Q > P,the output Nyquist
frequency is Qπ . The normalized cutoff frequency is therefore ω0 =
π π
max(P, Q) = Q .
60 60Q
We have M = 3.5×0.1ω0 = 3.5×0.1π = 54.6Q.
Most correctly said that the filter cutoff should be the lower of the two
Nyquist frequencies but several people calculated its value incor-
rectly. Some gave the Nyquist frequency as 2π Q , some used min(P, Q)
instead of max(P, Q), and some normalized ω0 by the input sample
rate of x[n] rather than by the sample rate of v[r] to get πP
Q . The cutoff
frequency of a filter is always normalized by the sampling frequency
at the input and output of the filter itself. Some left the answer as
π
ω0 = max(P, Q) even though the question explicitly said that Q > P;
this makes the answers to the remaining parts of the question much
messier.
ii) Using the value of M from part a) i), estimate the average number
of multiplications per input sample, x[n], needed to implement the
system in the form of Figure 3.1. [2]
We can also write this as g[r] = ωπ0 sinc ((r − 0.5M) ω0 ) where sinc(x) =
sin(x)
x .
Many people omitted the offset of 0.5M. Instead of calculating it ex-
plicitly, some just stated g[r] = ω0 sinc(rω0 ) which is correct except
for the offset and the factor of π1 .
(
1 |r| < ω0
A few people said that g[r] = which mixes up the
0 otherwise
time and frequency domains.
´ jωr A few wrote the correct
´ integral but
were unable to integrate e dω; converting it to (cos ωr + j sin ωr) dω
makes the integral slightly harder if anything. Quite a few people
tried to calculate H(e jω ) instead of g[r] which was what the ques-
tion asked for.
b) The filter H(z) is now implemented as a polyphase filter as shown in Fig. 3.2.
The filter implementation uses a single set of delays and multipliers with com-
mutated coefficients.
i) State the length of the filter impulse response h0 [n] in terms of M, P
and/or Q and give an expression for the coefficients h0 [n] in terms of
h[r]. [2]
ii) If x[n] = 0 for n < 0, give expressions for v[0], v[1], v[2P+1] in terms
of the input x[n] and the coefficients h p [n]. [2]
The output decimator selects every Qth sample of v[r] and discards
the others. Therefore if we access the coefficient sets in the order
p = (mQ) mod P for m = 0, 1, · · · and reduce the rate by a factor
of Q will will generate only the wanted output samples.
For the specific values P = 5 and Q = 7, so the coefficient set se-
quence becomes
h0 [n], h7 mod 5 [n], h14 mod 5 [n], h21 mod 5 [n], h28 mod 5 [n]
iv) Determine the number of multiplications per input sample for the
system of part b) iii) and the number of distinct coefficients that must
be stored. You may assume that M + 1 is a multiple of P. [2]
c) Suppose now that the sample rate of the input, x[n], is 18 kHz and that the
system is implemented as in part b) iii) with the values of a and ∆ ω as given in
part a) i).
Determine the values of P, Q and M when the sample rate of the output, y[m],
is (i) 10 kHz and (ii) 10.1 kHz [note that 101 is a prime number].
For each of these cases estimate the number of multiplications per input sample
and the number of distinct coefficients that must be stored. [5]
The M+1
P polynomials f n (t) each require K = 6 coefficients, so we
require a total of 6(M+1)
P coefficients. For the two cases, this gives
(i) 5 = 590 (somewhat larger than before) and (ii) 6×9823
6×492
101 = 584
(much less than before).
Very few attempted this part.
From Carson’s rule, B = 180 kHz. This bandwidth includes both sidebands, so
90 kHz
ω0 = 2π × 400 kHz = 0.45π = 1.41 rad/samp.
Mostly correct. A few people did not divide by 400 kHz which gave an answer
of 5.7 × 105 rad/samp; except for very rare circumstances, frequencies in units
of rad/samp always lie in the range ±π.
b) Show that m(t) = k−1 a−2 (t)ℑ x∗ (t) dx(t)
dt where ℑ ( ) denotes the imaginary
part. [4]
da jφ (t)
+ ja(t) dφ jφ (t) from which (since a(t) is real-valued), x∗ (t) dx(t) = a(t) da +
dt e dt e dt dt
dx(t) dx(t)
ja2 (t) dφ ∗
dt and hence ℑ x (t) dt = a2 (t) dφ −1 −2 ∗
dt . It follows that k a (t)ℑ x (t) dt =
m(t) as required.
Note that since x(t) = a(t)e jφ (t) , we could alternatively ∗ − jφ (t) =
write x (t) = a(t)e
dx(t)
a2 (t)x−1 (t) which results in m(t) = k−1 ℑ x−1 (t) dt . However this expres-
sion is harder to implement because it involves taking the reciprocal, x−1 (t), of
a rapidly varying complex number instead of the reciprocal, a−2 (t), of a slowly
varying real number whose value is always close to 1.
Some people derived instead the alternative expression involving x−1 (t) by dif-
ferentiating log x(t). Several assumed that a(t) ≡ 1 ∀t which stronger than the
statement in the question.
c) Figure 4.1 shows a block diagram that implements the equation of part b) in
discrete time. Complex-valued signals are shown as bold lines and are repre-
sented using their real and imaginary parts. The block labelled “Conj” takes the
complex conjugate of its input. The differentiation block, D(z), is designed as
an FIR filter using the window method with a target response
(
jω jcω for |ω| ≤ ω1
D(e ) =
0 otherwise
¯
For interest only, the above formula gives d[−5 : 5] = [−0.07, 0.18, −0.19, −0.02, 0.71, 0, −0
This is fairly similar to the simplest zero-phase differentiator which
¯
would be d[−1 : 1] = [0.5, 0, −0.5].
Some tried to use the inverse z-transform instead of the inverse DTFT
but not everyone who chose this method realized that the inverse z-
transform involves a contour integration in the complex plane. To
use it, you have to choose an integration contour; if you choose the
unit circle as your contour (a sensible choice), then the inverse z-
transform is identical to the inverse DTFT.
2
1
Magnitude/c
Phase (rad)
1.5
0
1
0.5 -1
0
-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3
Frequency (rad/samp) Frequency (rad/samp)
Surprisingly
a large number of people made the magnitude gain,
D(e jω ), negative for ω < 0. Some thought that the phase too was
∝ ω or that it was always + π2 .
iii) Assume that the DTFT of the window function used when designing
18
D(z) has a main lobe width of ω = ± M+1 for a window of length
iv) Stating any assumptions, determine the maximum value of c that will
ensure |s[n]| ≤ 1 where s[n] is the output of the differentiation block,
D(z), as shown in Figure 4.1. [4]
2
1
Magnitude/c
Phase (rad)
1.5
0
1
0.5 -1
0
-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3
Frequency (rad/samp) Frequency (rad/samp)
Again, quite a few people made the magnitude gain negative for ω <
0.
ii) e jω )
Outline the relative advantages and disadvantages of using D(e
e jω ) is a continuous function of ω
The advantage is that since the D(e
it will not be affected by Gibbs phenomenon and the coefficients will
decay ∝ n−2 instead of ∝ n−1 . For any given filter length, M + 1, the
e jω ) than for D(e jω ).
errors will be much smaller for D(e
The disadvantage is that the gain is no longer approximately zero
for frequencies above ω1 and so it may be necessary to include ad-
ditional filtering in the channel selection process in order to remove
frequency components between ω0 and π.
Many people said correctly that a smooth target response was good,
but few were precise about why this was so.
If we write f (v) = v−1 ,we can write f (v) = f (1)+(v−1) f 0 (1)+ 2!1 (v−1)2 f 00 (1)+
. . . = 1 + (v − 1) × −1 + 2!1 (v − 1)2 × 2 + . . . The Taylor series can also be ob-
tained easily from the geometric progression formula by writing w = 1 − v.
Then v−1 = (1 − w)−1 = 1 + w + w2 + w3 + . . . = 1 + (1 − v) + (1 − v)2 + . . ..
(i) Linear case: f (v) = 1 + (1 − v) = 2 − v. Thus we multiply by 2 − a2 instead
of a−2 . The error is therefore found by substituting a = 1.1 in the ratio of the
2
actual gain (2−a2 ) to the ideal gain (a−2 ) to obtain 2−a
a−2
= 0.959 = −0.392 dB.
(ii) Quadratic case: f (v) = 1 + (1 − v) + (1 − v)2 = 3 − 3v + v2 . The er-
2 +a4
ror is therefore found by substituting a = 1.1 in the ratio 3−3a
a−2
= 1.009 =
+0.0801 dB.
Few attempted this part. Many of those who did attempt it, had difficulty in
writing down the Taylor series even for the linear case.