Final Exam February 4th, 01 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 Final Exam Signals & Systems Problem 1 5 points Given a system as below: x[n] + Σ q[n] + Σ + + y[n] β z 1 α z 1 a) Calculate the transfer function Y(z) Q(z). b) Calculate the transfer function Q(z) X(z). c) Calculate the system transfer function H(z) Y(z) X(z). d) For what (real) values of α and β is the system bounded input bounded output stable? (1 point) (1 point) (1 point) ( points) Solution 1 a) We begin by writing down the difference equation: y[n] q[n]+αq[n ], from which we have b) q[n] x[n]+βq[n 1]: Y(z) Q(z)(1+αz ) Y(z) Q(z) 1+αz Q(z) X(z) 1 1 βz 1 c) H(z) Y(z) Q(z) Q(z) X(z) 1+αz 1 βz 1 d) The system is stable if all the poles lie inside the unit circle. 1 βz 1 0 z β
Final Exam Signals & Systems Page 3 Therefore the system is stable if β < 1.
Page 4 Final Exam Signals & Systems Problem 5 points You are given a system described by the following difference equation. n y[n] x[k] a) Is the system linear? Prove/disprove this. ( points) b) Is the system time invariant? Prove/disprove this. ( points) c) Using an example, show that the system is not bounded (1 point) input bounded output stable. Solution a) Define y 1 [n] : y [n] : n n Now let x 1 : αx 1 [n]+βx [n], from which y 1 n n x 1 [k] x 1 [k] x [k] (αx 1 [k]+βx [k]) αy 1 [n]+βy [n] The system satisfies the principle of superposition, and is therefore linear. b) Let x[n] : x[n l], and then ȳ[n] n n x[k] x[k l]
Final Exam Signals & Systems Page 5 If we now define m : k l, then we have from which we get k m k n m n l ȳ[n] n l m y[n l]. x[m] This implies that a time shift in the input yields the corresponding time shift in the output. c) Let x[n] u[n], then x[n] 1 < for all n, and y[n] n, from which we have that y[n] grows unbounded.
Page 6 Final Exam Signals & Systems Problem 3 5 points Given a continuous time first-order low-pass filter of the form H(s) 1 τs+1. a) Given a sampling time T s, use the bilinear transformation to convert the continuous time filter to a discrete time filter of the form ( points) H(z) 1+z 1 a 0 +a 1 z 1. b) An impulse is applied to the filter as input and the output is measured. Determine the time constant τ of the continuous time filter given that the first element of the measured impulse response is (3 points) y[0] 1 41 and that the sampling time is T s 0.01. Solution 3 a) The bilinear transformation mapping continuous time to discrete time is defined as s ( ) z 1. T s z +1
Final Exam Signals & Systems Page 7 The transfer function H(z) becomes then H(s ( ) z 1 ) T s z +1 1 ( τ z 1 T s z+1 ) +1 z +1 (1 τ T s )+z(1+ τ 1+z 1 (1+ τ T s )+(1 τ T s )z 1. z +1 τ T s (z 1)+(z +1) T s ) z 1 (z +1) z ((1 1 τ T s )+z(1+ τ b) The difference equation can be derived from the transfer function H(z) and reads as or where a 0 y[n] x[n]+x[n 1] a 1 y[n 1] y[n] 1 a 0 x[n]+ 1 a 0 x[n 1] a 1 a 0 y[n 1]. a 0 1+ τ T s a 1 1 τ T s. Applying an impulse as input, the coefficient a 0 can directly be determined as Thus y[0] 1 41 1 a 0. τ (a 0 1) Ts 0.. T s ) )
Page 8 Final Exam Signals & Systems Problem 4 5 points Design a first-order finite impulse response (FIR) filter of the form y[n] b 0 x[n]+b 1 x[n 1] that simultaneously fulfils the following requirements: 1. When the input of the filter equals the output is x[n] 1 n, lim y[n] 1. n. The 3dB-bandwith of the filter equals π. (Hint: H(Ω 3dB ) 1 H(0) ) Solution 4 The first requirement implies unity gain and imposes following condition on the filter coefficients lim y[n] 1 b 0 1+b 1 1 b 0 +b 1. n The second requirement combined with the fact that the filter has unity gain or H(0) 1 yields or H( π ) 1 1 1 H( π ) 1. The transfer function of the filter equals H(z) b 0 +b 1 z 1 1 b 0 +b 1 z 1.
Final Exam Signals & Systems Page 9 Evaluating the transfer function on the unit circle z e jω yields the frequency response H(Ω) b 0 +b 1 e jω b 0 +b 1 (cos(ω) jsin(ω)) b 0 +b 1 cos(ω) +j( b }{{} 1 sin(ω)). }{{} Re(H(Ω)) Im(H(Ω)) The square magnitude of the frequency response equals H(Ω) Re (H(Ω))+Im (H(Ω)) b 0 +b 0b 1 cos(ω)+b 1 cos (Ω)+b 1 sin (Ω) b 0 +b 0b 1 cos(ω)+b 1. Thus combining the first requirement with the second requirement b 0 1 b 1 yields b 0 +b 0 b 1 cos( π )+b 1 b 0 +b 1 1 (1 b 1 ) +b 1 1 b 1 +b 1 1 or b 1 b 1 + 1 0. The unique solution of this quadratic equation is and therefore b 1 1 b 0 1 b 1 1.
Page 10 Final Exam Signals & Systems Problem 5 5 points You want to identify a linear time invariant system T with input x[n] and output y[n] y[n] T{x[n]} which you assume is causal and has the form H ID (z) b 0 +z 1 1+a 1 z 1. You apply a causal input to the system that has four elements and you measure the noisy output x {x[0],x[1],x[],x[3]} y {y[0],y[1],y[],y[3]}. a) Define Θ [b 0,a 1 ] T. Write a matrix equation (3 points) G FΘ where G and F consist only of known entities. b) Given the input ( points) x {1,0,0,0} and the output y {,3,,} calculatethecoefficientsb 0 anda 1 intheleastsquaressense. Solution 5 a) The difference equation of the system reads as y[n] b 0 x[n]+x[n 1] a 1 y[n 1].
Final Exam Signals & Systems Page 11 Applying a causal input, the output y[n],n 0,1,,3 becomes y[0] b 0 x[0] y[1] b 0 x[1]+x[0] a 1 y[0] y[] b 0 x[]+x[1] a 1 y[1] y[3] b 0 x[3]+x[] a 1 y[] This can be written in a matrix equation where the LHS consists only of known elements independent of the filter coefficients y[0] x[0] 0 [ ] y[1] x[0] y[] x[1] x[1] y[0] b0 x[] y[1]. a 1 y[3] x[] x[3] y[] b) Solving for the vector Θ in the least squares sense results in Θ (F T F) 1 F T G. Setting the elements of F and G according to the given input and output yields G 3 1 0 0 and Thus 1 0 F 0 0 3. 0 [ ] 1 0 0 0 (F T F) 1 F T G ( 0 3 [ ][ ] 1 0 0 1 17 14 [ 14 17 1 0 [ ] 0 1 0 0 0 0 3 ) 1 0 3 0 ] [ ] b0. a 1
Page 1 Final Exam Signals & Systems Problem 6 5 points Given a finite impulse response filter (FIR) of the form y[n] x[n]+4x[n 1]+x[n ] 6 and a zero-mean white noise input signal x[n] with variance σx. a) Determine the frequency response of the filter in polar description ( points) H(Ω) R(Ω)e jφ(ω). b) Using the result of a), determine the power spectral density function S yy (Ω) of the output y[n]. (1 points) c) Using the result of b), calculate the ratio σ y σ x. ( points) (Hint : cos (Ω) 1 (1+cos(Ω))) Solution 6 a) Transforming the difference equation in the z-domain yields Y(z) X(z)+4z 1 X(z)+z X(z). 6 The transfer function therefore equals H(z) Y(z) X(z) 1+4z 1 +z. 6 Evaluating the transfer function on the unit circle z e jω defines the frequency response H(Ω) 1+4e jω +e jω, 6 which can be transformed to polar description in the following way H(Ω) e jω 6 (ejω +4+e jω ) e jω 6 (cos(ω)+jsin(ω)+4+cos(ω) jsin(ω)) (cos(ω)+4) e jω R(Ω)e jφ(ω). 6
Final Exam Signals & Systems Page 13 b) The power spectral density (PSD) of the output depends on the PSD of the input and the square magnitude of the frequency response S yy (Ω) H(Ω) S xx (Ω). The PSD of zero-mean white noise is constant and equals S xx (Ω) σ x. The magnitude of the frequency response equals R(Ω) and therefore the PSD of the output becomes S yy (Ω) R (Ω)σ x 1 36 (4cos (Ω)+16cos(Ω)+16)σ x 1 9 (cos (Ω)+4cos(Ω)+4)σ x. c) The variance σ y of the output can be calculated from the inverse Fourier transform of the PSD S yy (Ω) as following σy R yy [k 0] 1 π 1 π π π σ x 18π σ x 18π π π S yy e jω 0 dω 1 9 (cos (Ω)+4cos(Ω)+4)dΩ σx π π 1 1 π (1+cos(Ω))dΩ+4 π π ( σ x 1 π +4 π 18π Therefore the ratio σ y σ x π π 1dΩ+ 1 cos(ω)dω π }{{} 0 ) σ x. equals 1. cos(ω)dω } {{ } 0 π +4 π π +4 π 1dΩ 1dΩ
Page 14 Final Exam Signals & Systems Problem 7 5 points You are given a signal x[n], below, to analyze. x[n] {1, 1,0,0} a) What is the Discrete Fourier Transform (DFT), X[k]? ( points) You want to isolate the low frequency content of x[n], and keep only frequencies in the range Ω [0, π ], to yield the (real) signal y[n]. b) Write down the DFT Y[k], and from that calculate the (3 points) signal y[n]. Solution 7 a) We have x[n] {1, 1,0,0}, N 4, W N e j π N e j π This gives: X[k] N 1 n0 x[n]w kn N 1e jπ 0k 1e j π 1k 1 e j π k X[0] 0 X[1] 1+j X[] X[3] 1 j b) Because it is a real signal, the DFT containsonly three distinct frequencies: Ω 0 0, Ω 1 π, Ω π. To eliminate the frequencies above π, we set: Y[0] X[0] 0 Y[1] X[1] 1+j Y[] 0 Y[3] Y[N 3] 1 j
Final Exam Signals & Systems Page 15 Note that Y[3] is not zero. If one sets Y[3] 0, but keeps Y[1] 1+j the inverse DFT would yield a signal with imaginary components. The time series y[n] is now calculated using the inverse DFT: N 1 y[n] 1 Y[k]WN kn N k0 1 ( (1+j)e j π n +(1 j)e 3n) jπ 4 y[0] 1 4 ((1+j)+(1 j)) 1 y[1] 1 4 ((1+j)(j)+(1 j)( j)) 1 y[] 1 4 ((1+j)( 1)+(1 j)( 1)) 1 y[3] 1 4 ((1+j)( j)+(1 j)(j)) 1 { } 1 y[n], 1, 1,1
Page 16 Final Exam Signals & Systems Problem 8 5 points Given the linearized motion equation of an inverted pendulum on a cart φ(t) aφ(t)+bu(t). where φ(t) is the deviation of the pendulum from the upper equilibrium and u(t) is the input to the system. The output of the system is the deviation φ(t). a) Discretize the equation using the Euler Method (3 points) φ(t) φ(t) φ(t T s)+φ(t T s ) T s and provide the discrete state space representation with two states. b) Let a 3, b 1 and T s 1. Is the system controllable? (1 point) c) Is the system observable? (1 point) Solution 8 a) Define y[n] φ(t) and u(t) x[n] for t [nt s,(n+1)t s ). Then y[n] y[n 1]+y[n ] T s ay[n]+bx[n] or y[n] T sb x[n]+ 1 ats y[n 1] 1 ats 1 y[n ]. 1 ats Introducing the states [ ] q1 [n] q [n] [ ] y[n ] y[n 1]
Final Exam Signals & Systems Page 17 the state space representation reads as follows [ ] [ ][ ] q1 [n+1] 0 1 q1 [n] 1 + q [n+1] 1 ats 1 at q s [n] [ ] [ ] y[n] 1 q 1 [n] 1 ats 1 at + s q [n] or q[n+1] Aq[n]+Bx[n] y[n] Cq[n]+Dx[n]. b) The system is controllable if the matrix [ B AB ] has full rank. From a) [ ] 0 B 1 [ ][ ] [ ] 0 1 0 1 AB 1 1 1 1. Thus the system is controllable as [ ] [ ] 0 1 B AB 1 1 [ ] 0 Tsb x[n] 1 ats [ T s b 1 at s ] x[n] has full rank. This can readily be seen as the rows are linearly independent. c) Similarly, the system is observable if [ ] C CA has full rank. From a) C [ 1 1 ] CA [ 1 1 ][ ] 0 1 1 [ 1 1 and thus the system is observable as [ ] [ C 1 ] 1 CA 1 has full rank as the rows are linearly independent. 3 ] 3
Page 18 Final Exam Signals & Systems Problem 9 5 points Consider a linear, time-invariant system y[n] T{x[n]}, with transfer function H(z). a) Give an equation for the step response s[n] T{u[n]} as a (1 point) function of the system s impulse response h[n] T{δ[n]}. b) Show that the steady state step response of the system can be calculated by evaluating the transfer function at z 1, i.e. lim n s[n] H(z) z1. (3 points) c) If the system is unstable, we expect lim n s[n] to be unbounded. However, H(z) z1 may still be finite. How is this possible, considering your answer above in b)? (1 point) Solution 9 a) For any input, the output is: y[n] h[n] x[n] h[k]x[n k]. Specifically, for a step input we have s[n] h[k]u[n k]. n h[k]. b) By definition, H(z) h[k]z k H(1) h[k]
Final Exam Signals & Systems Page 19 Using the result for b) above, we have lims[n] lim n n H(1) n h[k] h[k] c) For unstable systems, the unit circle is excluded from the region of convergence, i.e. it is meaningless to evaluate the transfer function at z 1. The transfer function on its own does not contain any information about stability.
Page 0 Final Exam Signals & Systems Problem 10 5 points You are given a continuous time system, of the form q(t) Aq(t)+Bx(t) y(t) Cq(t)+Dx(t) You are to discretize the system over a sample time of T s by using a hold device at the input, such that x(t) x d [n] for t [nt s,(n+1)t s ), to yield a discrete time system of the form q d [n+1] A d q d [n]+b d x d [n] y d [n] C d q d [n]+d d x d [n]. a) Determine the exact discretizationa d, B d, C d and D d using A, B, C and D; such that y d [n] y(nt s ). [ ] 0.5 0.5 For some system you calculate A d, B 0 0.75 d and D d 0. b) What is the system transfer function H(z) Y(z) X(z)? (1 point) [ ] 3, C 3 d [ 0 1 ] ( points) c) Is this system bounded input bounded output stable? Why/why not? ( points) Solution 10 a) We define matrices M and G, and use the sampling time T s, to get [ ] A B M 0 0 [ ] G e MT s Ad B d g 1 g C d C D d D
Final Exam Signals & Systems Page 1 b) There are two ways of approaching this problem: H(z) C(zI A) 1 B +D 1 (z 0.5)(z 0.75) 3(z 0.5) (z 0.5)(z 0.75) 3 z 0.75 Alternatively, we notice that y[n] q [n] from which we can directly write [ 0 1 ] [ z 0.75 0.5 0 z 0.5 0.75q [n 1]+3u[n 1] 0.75y[n 1]+3u[n 1] H(z) 3z 1 1 0.75z 1 ][ ] 3 +0 3 c) The transfer function has a pole at z 0.75, which lies inside the unit circle, so it is BIBO stable. Alternatively, we can directly read off the eigenvalues of A, which are λ 1 0.5 and λ 0.75. Both of these eigenvalues lie inside the unit circle, so the system is stable (states decay to zero), and therefore also BIBO stable.