F110 Spktrala transformr för Mdia Solutions to Stiglitz, Chaptr 1 Prfac This documnt contains solutions to slctd problms from Kn Stiglitz s book: A Digital Signal Procssing Primr publishd by Addison-Wsly. Rfr to th book for th problm txt. This work coms undr th trms of th Crativ Commons BY-SA.0 licns 1.5 http://crativcommons.org/licnss/by-sa/.0/ Th first rason is that our haring is abl to stimat th position of a sound sourc. If th two tuning forks ar in diffrnt positions with rspct of th listnr, sh might b abl to discriminat btwn thm. Scond, vn if th forks ar markd as bing tund to th sam frquncy, thr might b small diffrncs that can gnrat bats (s sction 9 in th book). Third: vn if two objcts ar tund to produc th sam fundamntal frquncy, thy can hav diffrnt timbrs dpnding on thir shap/dimnsions/matrial. 1.10 W look for th nvlop of th xprssion y(t) = cos(ωt) + a cos ( (ω + δ)t ) wavform and nvlop 1.5 l 1 1 l a a sin() 0.5 0 a cos() 0.5 1 1.5 0 100 00 300 00 500 600 700 800 900 1000 tim (sc) Figur 1. Schmatic phasor rprsntation (lft) and wavform with nvlop (right) 1 (5) F110 Spktrala transformr för Mdia Hösttrminn 005
If w considr th phasor form of th xprssion 9. in th book: jωt + a j(ω+δ)t and w plot it in Figur 1, w s that th nvlop is th lngth of th vctor obtaind as th sum of th two trms. Using Pythagoras thorm: (a1 E(t) = l 1 + l = + a cos(δt) ) + a sin (δt) = a 1 + a cos (δt) + a sin (δt) +a }{{} 1 a cos(δt) = a 1 + a + a cos(δt) a 1.11 As can b sn in Figur 1 (right), for t = 0, for xampl, cos(ωt) = cos(δt) = cos ( (ω + δ)t ) = 1, and E(0) = + a + a = + a = y(0) proving that, at last in on point th nvlop touchs th curv. 1.1 Th quation w sarch is obtaind by imposing that y(t) E(t) = 0, or, quivalntly, y(t) = E(t): cos(ωt) + a cos ( (ω + δ)t ) = + a + a cos(δt) Taking th squar: cos (ωt) + a cos ( (ω + δ)t ) + a cos(ωt) cos ( (ω + δ)t ) = = + a + a cos(δt) (1) Grouping with rspct to, a and a, 1 cos (ωt) ] + a 1 cos ( (ω + δ)t )] + Now w rcall that: thus: + a cos(δt) cos(ωt) cos ( (ω + δ)t )] = 0 () cos (α) + sin (α) = 1 (3) cos(α β) = cos(α) cos(β) + sin(α) sin(β) () 1 cos (ωt) = sin (ωt) 1 cos ( (ω + δ)t ) = sin ( (ω + δ)t ) cos(ωt) cos ( (ω + δ)t ) = cos(δt) sin(ωt) sin ( (ω + δ)t ) Th first two ar obtaind from Equation 3, th last from Equation, imposing α = ωt and β = (ω + δ)t. Substituting into Equation w obtain: (5) sin (ωt) ] + a sin ( (ω + δ)t )] + a sin(ωt) sin ( (ω + δ)t )] = 0 F110 Spktrala transformr för Mdia Hösttrminn 005
That is clarly a squar: a1 sin(ωt) + a sin ( (ω + δ)t )] = 0 That is qual to zro if and only if its argumnt is zro: sin(ωt) + a sin ( (ω + δ)t ) = 0 Not that, this quation is similar but not th sam w would obtain by imposing that th first drivativ of y(t) b zro, indicating that th solutions ar clos, but not coincidnt with th maxima of y(t). This quation dos not hav an analytic solution. 1.13 W want to find th analytical xprssion for th phas of th function y(t). W can writ th xprssion using phasors as in quation 9.3 in th book: jωt + a jδt] Thn w rcall that th phas of th product of two complx numbrs is th sum of th rspctiv phass: φ(t) = { jωt } + { + a jδt } Th first trm is just wt th scond can b computd as th arctan of th ratio btwn th ral and imaginary part of th xprssion: ( ) a sin(δt) φ(t) = ωt + arctan + a cos(δt) Th instantanous frquncy is th drivativ of this xprssion with rspct to tim: F (t) = dφ = ω + d arctan f(t) (5) whr w namd f(t) th xprssion in parnthsis. W rcall that th drivativ of a composit function g (f(x)) can b obtaind as: d g (f(x)) = g (f(x)) f (x) and that th drivativ of arctan(x) is 1 1+x. Thn, d arctan f(t) = f (t) 1 + f (t) Now w hav to comput f (t): w call: g(t) = a sin(δt) h(t) = + a cos(δt) such that f(t) = g(t) h(t). Using th rul of drivativ of a multiplication of functions: f (t) = d(g(t)/h(t)) = g (t)h(t) h (t)g(t) h (t) 3 (5) F110 Spktrala transformr för Mdia Hösttrminn 005
0.33 instantanous frquncy 0.3 0.31 0.3 F(t) 0.9 0.8 0.7 0.6 0 100 00 300 00 500 600 700 800 900 1000 tim (sc) Figur. Plot of th solution for ω = 0.3157, = 1, a = 0.7 and δ = 0.0. Th dashd lin is th avrag of th istantanous frquncy that is qual to ω And finally: f (t) 1 + f (t) = g (t)h(t) h (t)g(t) h (t) 1 + g (t) h (t) = g (t)h(t) h (t)g(t) h (t) h (t)+g (t) h (t) = g (t)h(t) h (t)g(t) h (t) + g (t) with: g (t) = a δ cos(δt) h (t) = a δ sin(δt) Substituting and simplifying (and adding th trm ω from Equation 5): F (t) = ω + a δ + a δ cos(δt) + a + a cos(δt) (6) That is th solution to th problm. Figur plots th function in Equation 6 for th valus of th paramtrs spcifid in th txt book at pag 15. 1.17 Th quantity δ in radiants pr scond (rad/s) corrsponds to πf whr f is th frquncy in Hz, that is 1/s. Th priod of th oscillation is th invrs of th frquncy: 1.18 T = 1 f = π δ 6.8 rad 0.0 rad/s = 31 s W can solv th problm using phasors. Bcaus w ar considring a nonlinar opration, w hav to b carfull. Infact if w hav two sinusoidal signals s 1 (t) = cos(ω 1 t) and s (t) = (5) F110 Spktrala transformr för Mdia Hösttrminn 005
a cos(ω t), and w rprsnt thm with th corrsponding phasors, w hav: s 1 (t) = R { jω 1t } s (t) = R { a jω t } But, if s(t) is th squar of th sum of th two signals s(t) = (s 1 (t) + s (t)), w cannot obtain this by first summing and squaring th phasors and thn taking th ral part. Infact: R { (x + y) } (R{x} + R{y}) On way to ovrcom this problm is to us Eulr s formula: ( jω 1 t + jω ) 1t s 1 (t) = ( jω t + jω ) t s (t) = a Thn th rsulting singal is: s(t) = ( jω 1 t + jω 1t ) a ( + jω t + jω t ) a ( + jω 1 t + jω 1t ) ( jωt + jω t ) = ( jω 1 t + jω1t + ) + a ( jω t + jωt + ) + a ( ) j(ω 1+ω )t + j(ω 1+ω )t + j(ω 1 ω )t + j(ω 1 ω )t = cos ω 1t + a cos ω t + a cos(ω 1 + ω )t + a cos(ω 1 ω )t + + a Thus th frquncis ar ω 1, ω, ω 1 + ω, ω 1 ω, and th DC componnt with proportions indicatd by th cofficints in Equation 7 (7) 5 (5) F110 Spktrala transformr för Mdia Hösttrminn 005