EECS Signals & Systems University of California, Berkeley: Fall 7 Ramchandran September, 7 Homework 3 Solutions (Send your grades to ee.gsi@gmail.com. Check the course website for details) Review Problem (Orthogonality.) (i) In order to find an orthormal basis, we follow the Gram-Schmidt algorithm. Since we have four vectors, we will have at most four basis vectors. Lets call them β, β, β 3, and β. β v v v 6 [.7.5898.99.737] v ( β v β ) β v ( [.3.696.733.6637] v β ) β v3 ( β v 3 β ) β ( v 3 β ) β 3 v 3 ( v 3 β ) β ( [.9.9 v 3 β ) β.95.35] v ( β v β3 ) β 3 ( v β ) β ( v β ) β v ( v β3 ) β 3 ( v β ) β ( [ ] v β ) β herefore, we have only three basis vectors for S (not surprising since v v + v ). (ii) v w β + w β + w 3 β3 ( v β ) β + ( v β ) β + ( v β3 ) β 3 6 β v w β + w β + w 3 β3 ( v β ) β + ( v β ) β + ( v β3 ) β 3 6.96 β + 6.68 β v3 w 3 β + w 3 β + w 33 β3 ( v 3 β ) β + ( v 3 β ) β + ( v 3 β3 ) β 3.9 β +.6 β + 9.6386 β 3 v w β + w β + w 3 β3 ( v β ) β + ( v β ) β + ( v β3 ) β 3 9.675 β + 3.365 β Note: the answer to this problem is not unique. However, all answers must satisfy the following: β i β j δ[i j] i,j,,3 vi w i β w i β w i3 β3 i,,3, where w ij v i βj Also, if you are using matlab, you probably won t be getting the answers to be exactly what you expect due to finite precision.
Review Problem (Frequency responses.) he output of an LI system when the input is a linear combination of complex exponentials has a simple form: e jωt h(t) H(jω)e jω, H(jω) (a) H(jω) jω,x(t) ejt cos( πt) e jt ejπt e jπt h(t)e jωt dt y(t) x(t) y(t) H(j)e jt H(jπ) ejπt H( jπ)e jπt j ejt jπ ejπt + jπ e jπt j ejt π sin(πt) (b) In order to take advantage of the Eigenfunction property, we need to write x(t) as a linear combination of complex exponentials (Fourier Series expansion). x(t) is periodic with fundamental period s. ω π a k a k ω d x(t) π 6.8 k a k e jkωt x(t)e jkωt dt ω π e jkωt jkπ t d t d e jkωt dt π if k otherwise e jkω π d jkπ e jk jkπ Notice that a k a k, which is what we expect because x(t) is a real signal. Also, H(jω) rejects all frequencies ω.5 5 rad/s. herefore, all harmonics k > will be gone. 8( ω H(jω) 5 ) if ω 5 otherwise y(t) a H( jω )e jωt + a H( jω )e jωt + a H(j) + a H(jω )e jωt + a H(jω )e jωt H(j) 8, H( jω ) H(jω ).69, H( jω ) H(jω ).98 a, a π ( j) π e j π, a ( + j) π π ej π, a j π, a j π y(t) a H(j) + H(jω )(a e jωt + a e jωt ) + H(jω )(a e jωt + a e jωt ) y(t) + 3.5 π cos(ω t π ) +.59 π sin(ω t) (c) h[n] ( )n u[n],x[n] 3e j π (n ) sin( 5π n). First we need to find the frequency response H(ejω ): H(e jω ) k h[k]e jkω ( )k e jkω ( e jω ) k e jω k k
x[n] 3e j π e j π n + j ej 5π n j e j 5π n j( 3e j π n + ej 5π n e j 5π n ) 3 y[n] j(( )e j π e j π n + ( )e j 5π e j 5π n ( )e j 5π ej 5π n ) 3 j(( )e j π e j π n + ( + )e j 5π e j π n ( + )e j 5π ej π n ) Problem (Noise suppression system for airplanes, continued.) (a) From Homework, the impulse response of the noise suppression filter is g[n] 3 δ[n] + 3δ[n ] + δ[n ]. hus the frequency response is: 3 G(e jω ) n g[n]e jωn 3 + 3 e jω + 3 e jω. (b) See Figure. H(e jω ) is a better filter. Looking at the graph of the frequency responses, the magnitude of H(e jω ) decreases from ω to ω π thereby reducing the high frequency input of the system; whereas 3 G(ejω ) decreases and then increases back to.5 in that same interval. One could also compute the SNR for both systems and see that for the speech and noise given in Homework, the SNR is lower for H(e jω ) than for G(e jω )..9 Normalized Frequency Response Magnitudes of Noise Suppression Filters.5 H(w).75 G(w).8.7.6.5..3. 3 3 Figure : Problem b. Problem (Continuous-time Fourier series.) 3
(a) x(t) is periodic with period 3 and fundamental frequency ω π is defined as, < t x(t), < t., < t 3 he Fourier series coefficients of x(t) are and for k, a k a x(t)e jkωt dt e jk π 3 t dt + 3 3 jkπ jkπ jkπ x(t)dt 3 (e jk π 3 ) + ((e jk π 3 ) + 3 e jk π 3 t dt x(t)dt, ( ) e jk π 3 e jk π 3 jkπ )) (e jk π 3 ( e jk ( ) π 3 e jk π 3 e jk π 3 + e jk π 3 e jkπ/3 sin(kπ/3) + e jkπ/3 sin(kπ/3). kπ π 3 ( )) e jk π 3 e jk π 3, and over one period Now y(t).5x(t ) is periodic with 3. By the linearity and time shifting properties of the CFS, y(t) has FS coefficients b k.5e jkω a k.5e jk π 3 a k. (b) Let x(t) be a periodic signal with fundamental period and FS coefficients a k. By the time shifting property of the CFS, the FS coefficients of x(t t ) are b k a k e jk π t. Similarly, the FS coefficients of x(t + t ) are c k a k e jk π t. herefore, the FS coefficients of x(t t ) + x(t + t ) are ) d k b k + c k (e jk π t + e jk π t a k cos(kπt /)a k. Problem 3 (CFS Properties.) OWN 3. From () and (), x(t) k a ke jkωt, ω π π 3, From (3), x(t) a e jωt + a e jωt + a e jωt + a e jωt. a k a k From (), x(t) a e jωt + a e jωt + a e jωt + a e jωt x(t 3) a e jωt a e jωt + a e jωt + a e jωt x(t 3) x(t) a a x(t) a e jωt + a e jωt
From (5) and (6), x(t) x(t)x (t) (a e jωt +a e jωt )(a e jωt +a e jωt ) a +a e jωt + a e jωt. When we integrate over a period, the last two terms will disappear. x(t) dt 3 a dt a 6 3 a Since a is real and positive, a a. x(t) (ej π 3 t + e j π 3 t ) cos( π 3 t) A, B π 3, C Problem (CFS Properties.) y (t) x(t ) has Fourier series coefficients b k. From the time-shifting property, we know that b k a k e jkω a k e jkπ a k ( ) k. y (t) Oddy(t)} y(t) y( t) has Fourier series coefficients c k. From the properties of Fourier series, we know that c k jimb k } j( ) k Ima k }. However, this property only holds when the signal is real. he question did not specify x(t) to be real. If we assume that x(t) is complex, we can still use the ime Reversal property. y (t) Oddy(t)} y(t) y( t) c k b k b k a k( ) k a k ( ) k ( )k (a k a k ) Notice that when x(t) is real, a k a k, which leads to a k a k a k a k jima k}. Problem 5 (DFS/Frequency responses.) OWN 3.6 (a) x [n] ( ) n e jπn. he output y [n] (x h)[n], since H(e jπ ). (b) x [n] +sin( 3π 8 n+ π ). he DC component en disappears while the remaining part sin( 3π 8 n+ π ) passes without any distortion. herefore, y [n] (x h)[n] sin( 3π 8 n + π ). (c) x 3 [n] k ( )n k u[n k] k x 3 [n l] k ( )n l k u[n l k] ( )n (k+l) u[n (k + l)] (replace k by m k + l ) m herefore, x 3 [n] is periodic with period N. ( )n m u[n m] x 3 [n] 5
x 3 [n] 3 k a k e jkn π a + a e j nπ + a e jnπ + a 3 e jn 3π However, notice that H(e j ), H(e j π ), H(e jπ ), H(e j 3π ). herefore, y 3 [n] (x 3 h)[n] (we don t need to compute the Fourier series coefficients). Problem 6 (Discrete-time Fourier series.) OWN 3.8 (b) Let s first write x[n] as a sum of exponentials. By doing so, we will easily be able to determine the Fourier series coefficients. x[n] sin(πn/3)cos(πn/) (e jπn 3 e jπn 3 )(e jπn + e jπn ) j ejπn( 3 + ) e jπn( 3 ) e jπn( 3 + ) + e jπn( 3 ) j ejπn( 7 6 ) e jπn( 6 ) e jπn( 7 6 ) + e jπn( 6 ) j j (ejπn( 7 6 ) e jπn( 6 ) e jπn( 7 6 ) + e jπn( 6 ) ) he above signal is periodic with period. Since the Fourier series coefficients repeat every period, we know: x[n] π jk a k e n a k e jk π 6 n For k, k<n> k<n> a j/,a 7 a 5 j/,a 7 j/,a a j/ a k if k,5,7, otherwise π if k 5, π Phase(a k ) if k,7 otherwise Problem 7 (Parseval s Relation.) First let s consider the periodic signal x(t) n f(t n) and derive its Fourier series coefficients a k. We will then derive the Fourier series coefficients of y(t) using the convolution property. x(t) is periodic with fundamental period. herefore, ω π π. a k x(t) k a k e jkωt f(t)e jkωt dt e jkωt dt e jkωt / jkω / (e jk ω e jk ω ) jkω 6
.5 Magnitude..5..5 6 8 Phase 6 8 k Figure : Problem 6. ( ω kω j (ejk e jk ω sin(k ω )) ) sin(k π ) kω kπ a k if k otherwise sin(k π ) kπ Let b k be the Fourier series coefficients of y(t). Since y(t) is periodic with fundamental period, then we know from the convolution property that b k a k. y(t) k b k e jkωt, b k if k sin (k π ) (kπ) otherwise he power of the signal y(t) is defined as y(t) dt. From Parseval s Relation, we know that y(t) dt k b k. herefore, in order to approximate y(t) as a finite linear sum of complex exponentials, we need to retain the coefficients that contain most of the power. We also know that the Fourier series coefficients b k are real, positive and even and strictly decreasing as k increases. P y ŷ(t) M k M b k e jkωt y(t) dt g(t) dt + ) (t dt (t + ) 3 t t 3 6 herefore, we need to choose M and M such that M k M b k.9 6.5. b 6.65, b b ( π )., b b ( (π) ). Notice that b + b + b + b.5. Also, this sum is minimum (i.e. if we remove any of the terms, the inequaltiy no longer holds). 7
ŷ(t) b + b e jωt + b e jωt + b e jωt b + b cos(ω t) + b e jωt Problem 8 (CFS for LI systems.) (a) x(t) is periodic with period π. hus, x(t) x(t+k/). o show that y(t) is periodic with period /, we must show that y(t) y(t + k/). y(t) π y(t + k/) x(t τ)h(τ)dτ e jπ(t+k/ τ) h(τ)dτ e jπ(t τ) h(τ)dτ x(t + k/ τ)h(τ)dτ e jπ(t τ) h(τ)dτ y(t) e jπk e jπ(t τ) h(τ)dτ We could also write this for an arbitrary h(t) and periodic x(t) with period as follows. y(t + k) x(t + k τ)h(τ)dτ x(t τ)h(τ)dτ y(t) (b) Since y(t) is periodic with period /, we can write y(t) k b ke jkωt k b ke jkπt. e jπt y(t) x(t) h(t) he Fourier series coefficients of x(t) are a k e jπ(t τ) e τ u(τ)dτ e τ(jπ+) dτ ejπt ( ) jπ + jπ + x(t) if k otherwise By the linearity property the Fourier series coefficients for y(t) are b k ejπt jπ + jπ+ if k otherwise if k (c) In this case, c k b k since a k Again, we could solve this for an arbitrary h(t) otherwise and peridic x(t) with period and discover the following: where y(t) x(t) h(t) k k x(t τ)h(τ)dτ a k e jkω(t τ) h(τ)dτ a k e jkωt h(τ)e jkωτ dτ h(τ)e jkωτ dτ is just a complex function of k equal to c k 8
Problem 9 (Fourier Series and Gibbs phenomenon - Matlab.) (a) c k / jπk e jπk jπk p(t)e jπkt dt e jπkt dt e jπkt dt / ( e jπk e jπk + e jπk) c (b) he following Matlab code generates Figure 3. function [] gibbs(); [t, p, y] FS(); [t, p, y] FS(); [t, p, y] FS(); p(t)dt figure; plot(t,y, g- ); hold on; stairs(t,p, k-- ); plot(t,y, k- ); plot(t,y, b- ); title( Fourier series convergence and Gibbs phenomenon ); xlabel( t ); ylabel( p N(t) ); function [t, p, y] FS(N) k (-N:N); t linspace(-.5,.5,*n+); p (t>); p.*p - ; c ( - exp(-j*pi.*k))./(j*pi.*k); c(n+) ; % c k at k y zeros(size(t)); for i:length(c) y y + c(i)*exp(j**pi*k(i).*t); end y real(y); he partial sum approximations at t are p N (), which does not agree with the value of the function p(). 9
.5 Fourier series convergence and Gibbs phenomenon.5 p N(t).5.5.5..3.....3..5 t Figure 3: Problem 9b. (c) he maximum overshoot stays constant as the number of terms in the partial sum approximation increases, max p(t) p N (t).8. (d) As the number of terms in the partial sum approximation increases, the time-locations of the maximum overshoot gets closer and closer to the points of discontinuity at t, ±.5.