Final Exam February 2nd, 2013 Signals & Systems (151-0575-01) Prof. R. D Andrea Solutions Exam Duration: 150 minutes Number of Problems: 10 Permitted aids: One double-sided A4 sheet. Questions can be answered in English or German. Use only the prepared sheets for your solutions. Additional paper is available from the supervisors.
Page 2 Final Exam Signals & Systems Problem 1 A linear, time-invariant (LTI) system is described by the following difference equation y[n] = x[n]+α 2 x[n 2]+2βy[n 1] β 2 y[n 2], with α and β real numbers. a) Write down the transfer function H(z): (2 points) H(z) = Y(z) X(z). b) Under what conditions is the system bounded input, bounded output (BIBO) stable? (3 points) Solution 1 a) Take the z-transform of the difference equation to get: Y(z) = X(z)+α 2 X(z)z 2 +2βY(z)z 1 β 2 Y(z)z 2. Then rearrange to get the transfer function: H(z) = Y(z) X(z) = 1+α 2 z 2 1 2βz 1 +β 2 z 2. b) First, we calculate the poles of the transfer function, which can be immediately seen to be z = β. Furthermore, no pole-zero cancellations are possible. The system is stable if the region of convergence contains the unit circle, so that the difference equation has a stable interpretation if β 1. Aside: this implies that there are two conditions under which the system is stable; either I) the system is causal AND β < 1, OR II) the system is anti-causal AND β > 1.
Final Exam Signals & Systems Page 3 Problem 2 You are given an audio signal to analyse, five seconds long. You capture this signal on a computer, sampling it at 1000Hz, to yield the real signal x[k], with the signal magnitude constrained to ±1, such that 1 x[k] 1, k {0,1,...,4999}. You use the Discrete Fourier Transform to get the coefficients X[k], where X[k] = N 1 x[n]w kn N. a) What is the highest frequency, in Hz, which we can observe in the sampled audio signal without aliasing? b) What is the largest possible magnitude that one of the coefficients X[k] can have? c) To what continuous time frequency, in Hz, does X[10] correspond? (1 point) (1 point) (1 point) Let the signal y[k] be defined as the first four entries of the x[k], such that y[k] = {0,1,0,1}. d) Calculate the Discrete Fourier Transform Y[k] of the signal y[k]. (2 points) Solution 2 a) We sample the signal at f s = 1000Hz. All signals up to the Nyquist frequency can be sampled without aliasing, i.e. the highest frequency observable without aliasing is f max = 1 2 f s = 500Hz. b) If all the energy were concentrated at one frequency, the corresponding Fourier spectrum would have a magnitude of 5000, since there are 5000 elements in the signal x[k] and the magnitude of x[k] is constrained to one.
Page 4 Final Exam Signals & Systems We can calculate a bound on the coefficients as follows: 4999 4999 X[k] = x[n]wn kn x[n]w kn N 4999 4999 x[n] 1 = 5000. This bound can be shown to be tight by considering a constant signal: x[k] = 1 k {0,1,...,4999} 4999 X[0] = 4999 = 1 = 5000. x[n]w 0 n N 10 c) X[10] corresponds to a continuous time frequency of 5000 1000 = 2Hz. d) Applying the formula: Y[k] = = 3 y[n]w kn 4 3 y[n]e j2π 4 kn = e j π 2 k +e j 3π 2 k From this follows Y[0] = 2 Y[1] = 0 Y[2] = 2 Y[3] = 0.
Final Exam Signals & Systems Page 5 Problem 3 Consider the following continuous-time, linear, time-invariant system q(t) = q(t)+αx(t) y(t) = βq(t), with all values scalar. Assume that the input x(t) is piece-wise constant over intervals of T s such that x(t) = x[k], kt s t < (k +1)T s. The system is to be discretized such that where q[k +1] = A D q[k]+b D x[k] y[k] = C D q[k]+d D x[k], q[k] = q(kt s ), y[k] = y(kt s ). a) Compute the values A D, B D, C D and D D. (4 points) b) For what values of α and β is the discretized system controllable? (1 point) Solution 3 a) We ll calculate this with the matrix exponential. First, we assemble the matrix M: [ ] 1 α M =, 0 0 and then we take its matrix exponential to get the values for A D and B D. Notice that for this particularm is idempotent, that is M k = M for k 1. [ ] AD B D M k Ts k = exp(m) = k! k=0 Ts k = I +M k! k=1
Page 6 Final Exam Signals & Systems From this we get that and A D = 1+ B D = α k=1 k=1 T k s k! = et s T k s k! = αet s α, C D = β, D D = 0. b) The controllabilitymatrix consists only of B D, such that the discretized system is controllable if or α 0. α ( e T s 1 ) 0,
Final Exam Signals & Systems Page 7 Problem 4 Design a finite impulse response (FIR) filter of the form y[n] = αx[n]+βx[n 1]+γx[n 2] that fulfils the following requirements: 1. for a constant input signal x 1 [n] = 1, the output is y 1 [n] = 0, 2. for an input signal x 2 [n] = cos(πn), the output is y 2 [n] = cos(πn), 3. for an input signal x 3 [n] = cos(πn/2), the output is phase-shifted by π/2. Solution 4 First, we calculate the system s frequency response: H(Ω) = α+βe jω +γe 2jΩ Then we transform the requirements into frequency domain specifications: the first requirementisthath(0) = 0, whilethe second requirementis that H(π) = 1. The final requirement is on the phase at Ω = π/2, i.e. the real part of H(π/2) must be zero, and the imaginary part must be positive. The first two requirements imply that The response at Ω = π/2 is from which we get that H(0) = α+β +γ = 0 (1) H(π) = α β +γ = 1. (2) H(π/2) = α jβ γ, α γ = 0 (3) β < 0. (4)
Page 8 Final Exam Signals & Systems If we combine (1), (2) and (3) we solve for α = 1 4 Note that this satisfies (4) too. Our filter is thus β = 1 2 γ = 1 4. y[n] = 1 4 x[n] 1 2 x[n 1]+ 1 4 x[n 2].
Final Exam Signals & Systems Page 9 Problem 5 Consider a system with an unknown transfer function, of which you have experimentally measured the output to an input, as given below. The experiment started with the system at rest. n 0 1 2 x[n] 1-1 0 y meas [n] 1 0-0.5 You have assumed that the system can be described by a difference equation of the following form: M y[n] = b k x[n k] k=0 a) If there were no noise in the system, what would be the allowable range of M? Briefly explain. b) Assume that the system is corrupted by noise, which enters as in the autoregressive with exogenous input (ARX) model. Calculate the best fit values for b k in the least squares sense for M = 1. (2 points) (3 points) Solution 5 a) Because the system is assumed to be noise-free, and we know that the third element of the input was zero, the impulse response must have at least two elements, i.e. b 1 0. By inspection, we notice that we cannot solve the system with M = 1, but we can for M = 2. Furthermore, it is possible that the impulse response continues beyond n = 1, so that for a noise-free system. M 2
Page 10 Final Exam Signals & Systems b) First we define the matrices D, Θ and Y such that 1 0 D = 1 1 0 1 Y = [ 1 0 0.5 ] T Θ = [ b 0 b 1 ] T. The optimal parameter set Θ, in the least squares sense and using the ARX model is then so that Θ = (D T D) 1 D T Y [ ] 1 [ ] 2 1 1 1 0 = 1 0 1 2 0 1 1 1 = [ 5 6 2 3 ], b 0 = 5 6 b 1 = 2 3
Final Exam Signals & Systems Page 11 Problem 6 The auto-correlation function R xx [k] = E(x[n]x[n k]) of a zero-mean, wide sense stationary signal x[n] is specified as: 0, k 3 1 4 R xx [k] =, k = 2 1, k = 1 2, k = 0. a) Determine the power spectral density S xx (Ω) of the signal. (2 points) b) Design a finite impulse response filter (FIR) of the form (3 points) y[n] = bx[n]+bx[n 1], such that the expected power of the signal y[n] equals E[y[n] 2 ] = 1 3 E[x[n]2 ]. Solution 6 a) The power spectral density can be computed from S xx (Ω) = R xx [k]e jωk k= = 1 4 ej2ω +e jω +2+e jω + 1 4 e j2ω = 1 2 cos2ω+2cosω+2. b) The expected power of the signal x[n] can be drawn from the provided auto-correlation function E[x[n] 2 ] = R xx [0] = 2, and therefore E[y[n] 2 ] = 2 3.
Page 12 Final Exam Signals & Systems The expected power of the signal y[n] itself is dependent on the filter coefficient as well as the auto correlation function of x[n] and reads as E[y[n] 2 ] = E [ (bx[n]+bx[n 1]) 2] = E [ b 2 x[n] 2 +2b 2 x[n]x[n 1]+b 2 x[n 1] 2] = 2b 2( E [ x[n] 2] +E[x[n]x[n 1]] ) = 2b 2 (R xx [0]+R xx [1]). From this the filter coefficient becomes b 2 = = 1 9, E[y[n] 2 ] 2(R xx [0]+R xx [1]) or b = 1 3.
Final Exam Signals & Systems Page 13 Problem 7 The step response s[n] of a linear, time-invariant (LTI) system T is given as s[n] = {...,0,1,2,1,1,1,1,...}. a) Is the system causal? (1 point) b) Compute the impulse response h[n] = T{δ[n]}. (1 point) c) What is the output y[n] = T{x[n]} for the input (3 points) x[n] = {...,0,0,1,0,2,0,0,...}? Solution 7 a) The system is causal because the step response is zero for all time smaller than zero. b) The impulse response of the system can be computed as follows: h[n] = s[n] s[n 1] = {...,0,1,1, 1,0,0,0,...}. c) The input to the system can be expressed as x[n] = δ[n 1]+2δ[n 3]. Therefore employing the linear nature of the system the output is nothing but y[n] = h[n 1]+2h[n 3], which equals y[n] = {0,1,1,1,2, 2,0...}.
Page 14 Final Exam Signals & Systems Problem 8 The transfer function of a causal, linear, time-invariant (LTI) system was determined to be 1 2 H(z) = 1+ 1 2 z 1 + 1 4 z 2. a) Determine a state space representation of the system. (2 points) b) Determine the initial state q[0] of the state space representation in a) for zero input and measured (2 points) output y[0] = 1, y[1] = 1 2. c) Comment on the stability of the system. (1 point) Solution 8 a) The difference equation of the system reads as y[n] = 1 2 y[n 1] 1 4 y[n 2]+ 1 2 x[n]. Introducing the states q 1 [n] = y[n 2] and q 2 [n] = y[n 1], we get [ ] [ ][ ] ] q1 [n+1] 0 1 q1 [n] 0 = +[ q 2 [n+1] 1 4 1 2 }{{, 1 x[n] q 2 [n] 2 } A y[n] = [ [ ] ] 1 4 1 q1 [n] 2 + 1 }{{} q 2 [n] 2 x[n]. C b) The initial state can be computed from [ ] [ ] 1 [ ] q1 [0] C y[0] = q 2 [0] CA y[1] [ ] 1 = 4 1 1 [ ] 2 1 1 1 0 8 2 [ ] 4 = 4
Final Exam Signals & Systems Page 15 c) The Eigenvalues of the system matrix equal λ 1/2 = 1 4 ±j1 3. 4 The system is stable, as their magnitude λ 1/2 = 1 2 < 1.
Page 16 Final Exam Signals & Systems Problem 9 The transfer function of an infinite impulse response (IIR) filter is H(z) = 1 3 1 2 3 z 1. a) Determine the magnitude response of the filter H(Ω) for Ω = 0. b) Show that the phase response of the filter can only reside (3 in the range π 2 < H(Ω) π for 0 Ω < π. (2 points) points) Solution 9 a) The frequency response of the filter is H(Ω) = b 0 1+a 1 e jω, with b 0 = 1 3 and a 1 = 2 3. Evaluated at Ω = 0 yields H(0) = 1. b) The phase response of the filter equals ( H(Ω) = 1 ) 3 }{{} π (1 23 e jω ). (5) Evaluating the second term yields ( 23 ) e jω = 1 2 3 cos(ω) +j 2 }{{} 3 sin(ω), }{{} >0 0 which willreside in [0, π 2 ) as the realpart of thisterm is strictlygreater thanzeroandtheimaginarypartisgreaterorequalzeroforωin[0,π). From (5), the phase response can thus only reside in the range ( π 2,π].
Final Exam Signals & Systems Page 17 Problem 10 A causal, linear, time-invariant (LTI) system is governed by the difference equation y[n] = y[n 1]+x[n] x[n 1]. AcolleaguefromEPFLclaimsthatthesystemisstableasthestepresponse is bounded. a) Verify that the step response is bounded. (1 point) b) Disprove the claim that the system is stable. (2 points) c) Determine a bounded input for which the output grows (2 points) unbounded. Solution 10 a) The response equals where s[n] 1. s[n] = {...,0,1, 1,1, 1,1}, (6) b) The impulse response h[n] = {...,0,1, 2,2, 2,2,...} is not absolutely summable; therefore the system is unstable. c) The frequency response H(Ω) = 1 e jω 1+e Ω has a pole at Ω = π, so a signal with this frequency content will cause the system to grow unbounded. An example of a bounded input with this frequency content is x[n] = {...,0, 1,1, 1,1,...}, for which the output grows unbounded: y[n] = {...,0, 1,3, 5,7,...}.