I. Signals & Sinusoids [p. 3] Signal definition Sinusoidal signal Plotting a sinusoid [p. 12] Signal operations Time shifting Time scaling Time reversal Combining time shifting & scaling [p. 17] Trigonometric identities and complex number properties [p. 20] Euler s formula [p. 24] Polar form properties [p. 25] Examples [p. 30]Combining different tones [p. 35] Periodic signal [p. 36] Harmonic signal [p. 40] Frequency analysis spectrogram [p. 45] Time-varying frequency signals [p. 46] Instantaneous Frequency (IF) [p. 48] Chirps 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 1
Signals What s a signal? It s a function of time, x(t) in the mathematical sense 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 3
Sinusoidal signal A cos( ω t + ϕ ) FREQUENCY Radians/sec Hertz (cycles/sec) ω =( 2π ) f PERIOD (in sec) T 1 2π = = f ω AMPLITUDE Magnitude A PHASE ϕ 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 4
The cosine signal is periodic x( t) = Acos( t + ϕ + 2 π) = Acos( t + ϕ) Period is 2π Thus adding any multiple of 2π leaves x(t) unchanged xt () = Acos( ωt+ ϕ) What is the period for x(t)? 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 5
Sinusoidal signals A cos(2 π t ) Asin(2 πt) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 6
Plotting a cosine function Generic form Acos( ω t+ ϕ) 0 Example: 5cos(0.3 π t) A = ω = ϕ = 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 7
5cos( t + π /3) A = ω = ϕ = 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 8
2sin(4 πt + π /7) A = ω = ϕ = 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 9
Caution: phase is ambiguous Acos( ω t + ϕ + 2π ) = Acos( ωt + ϕ ) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 10
Speech example Spoken word: bat (BAT.WAV) Nearly Periodic in Vowel a Waveform x(t) is NOT a Sinusoid However, theory tells us x(t) is composed of a sum of sinusoids at different frequencies analysis done via FOURIER ANALYSIS- Break x(t) into its sinusoidal components Called the FREQUENCY SPECTRUM 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 11
Signal Operation: Time shift 2,0 t t 1/2 s() t = (4 2)/3,1/2 t t 2 0, ow s () t = s ( t 2) 1 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 12
Generic Time Shift s () t = st ( T) 1 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 13
Signal Operation: Time scaling s () t = s( at) 1 a < 1 a > 1 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 14
Signal Operation: Time reversal s () t = s( t) 1 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 15
Combining time shifting & scaling st () = sat ( b), a& b> 0 1 ( ( / )) = sat ba 1. Scale with a 2. Shift right by b/a 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 16
Basic Trigonometric equalities sin 2 (θ) + cos 2 (θ) = 1 cos(2θ) = cos 2 (θ) sin 2 (θ) sin(2θ) = 2 sin(θ)cos(θ) sin(α±β) = sin(α)cos(β)± cos(α)sin(β) cos(α±β) = cos(α)cos(β) Complex Numbers To solve: z 2 = -1 z = j Math and Physics use z = i Complex number: z = x + j y sin(α)sin(β) y x z 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 17
Plot Complex Numbers 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 18
Combine Complex Numbers 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 19
Euler s FORMULA Complex Exponential Real part is cosine Imaginary part is sine Magnitude is one θ e j = cos( θ ) + j sin( θ ) θ re j = r cos( θ ) + jr sin( θ ) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 20
Using Euler s FORMULA Allows to write sin/cos in terms of Complex Exponentials Recall θ e j = cos( θ ) + j sin( θ ) jω t e = cos( ωt) + jsin( ωt) jω t e = cos( ωt) jsin( ωt) Solve for cosine and sine 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 21
Evaluate the complex numbers z = e ; z = 2e jπ/2 jπ/3 1 2 z = 2 e ; z = 6e z j3 π/2 jπ/7 3 4 5 4 = k= 0 e jk π /2 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 22
06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 23
POLAR FORM for exp(jθ) Vector Form Length =1 Angle = θ POLAR < --> RECTANGULAR transformation Relate (x,y) to (r,θ) x y r θ 2 = = = = r r x Tan cos sin 2 + θ θ 1 y 2 ( y ) x r θ x y 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 24
Real Part Example Acos( ωt + ϕ) = Re { j ϕ t } Ae e j ω Evaluate x( t) =Re { j ω t } 3je 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 25
Imaginary Part Example { ϕ ω } Asin( ωt+ ϕ) = Im Ae j e j t Evaluate { je ω } xt () = Im 3 j t 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 26
Example: A sinusoidal signal x(t) is defined by: { je π } xt () = Re(1 + ) j t A maximum value of x(t) is be located at: (a) t = 0 sec. (b) t =1/4 sec. (c) t= 1 sec. (d) t =7/4 sec. (e) none of the above 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 27
Example: rewrite the cosine function using complex exponentials A cos(7 t ) = 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 28
Example: Determine the amplitude A and phase ϕ of the sinusoid that is the sum of the following three sinusoids: xt ( ) = cos( π + π/ 2) + cos( πt+ π/ 4)... a) A= 0 θ = 0 b) A= 1 θ = π/2 c) A= 1+ 2 θ = 0 d) A= 1+ 2 θ = π /2 e) A= 3 θ = π/2 + cos( πt + 3 π/4) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 29
How to combine different tones Most signals may be represented as Sinusoids with DIFFERENT Frequencies SYNTHESIZE by Adding Sinusoids N xt () = Akcos(2 πft k + ϕk) + A k= 1 Two-sided SPECTRUM Representation Graphical Form shows amplitude at DIFFERENT Frequencies (derived using complex exponentials) 4 10 j π / 3 j π / 3 7 e 7 e jπ / 2 e jπ 4 e / 2 0 250 100 0 100 250 f (in Hz) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 30
06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 31 + = R z z z e 2 1 2 1 } { Frequency k j k k k X A e f ϕ = = { } = R + = N k t f j k k e X e X t x 1 2 0 ) ( π { } = + + = N k t f j k t f j k k k e X X e X t x 1 2 2 1 2 2 1 0 ) ( π π = + + = N k k k k t f A A t x 1 0 ) 2 cos( ) ( ϕ π
4 7 e j π / 3 10 7 e j π jπ /2 e 4e jπ / 2 / 3 250 100 0 100 250 f (in Hz) x(t)= 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 32
Example: rewrite the cosine function using complex exponentials and plot the two-sided spectrum A sin(7 t ) = f (in Hz) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 33
Speech Signal: BAT Nearly Periodic in the Vowel Region Period is (Approximately) T = 0.0065 sec 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 34
Periodic Signals Repeat every T secs Definition x ( t) = x( t + T ) Example: x ( t) = cos 2 (3t) T = Speech can be quasi-periodic Period of Complex Exponential xt () = e jω t xt ( + T) = xt ( )? 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 35
Harmonic Signal Spectrum N period x( t) = A + A cos(2 π kf t + ϕ ) x( t) N xt () = Akcos(2 πft k + ϕk) + A k= 1 Periodic signal can only have : 0 k 0 k = 1 X 0 k = X + + N = k = 1 A e k jϕ k 0 f k = k 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 36 f 0 Fundamental frequency T=1/f 0 fundamental k
Example: Harmonic Signal (3 Frequencies) What is the fundamental frequency (f 0 )? What are the harmonics (kf 0 )? 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 37
Example: Irrational Spectrum We need a SPECIAL RELATIONSHIP to get a PERIODIC SIGNAL Signal 1 Signal 2 Are Signal1 and Signal2 periodic? 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 38
NON-Harmonic Signal 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 39
Frequency analysis This is a much HARDER problem Given a recording of a song, have the computer write the music Can a machine extract frequencies? Yes, if we COMPUTE the spectrum for x(t) during short intervals How to compute the frequency information using MATLAB spectrogram.m ANALYSIS program Takes x(t) as input & Produces spectrum values X k Breaks x(t) into SHORT TIME SEGMENTS Then uses a fast implementation of the Fourier Transform) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 40
Plotting spectrograms using MATLAB The MATLAB function spectrogram.m plots the spectrogram S = SPECTROGRAM(X,WL,NOVERLAP,NFFT,Fs) WL: divides data X into segments of length equal to WL, and then windows each segment with a rectangular window of length WL. NOVERLAP: number of samples each segment of X overlaps. NOVERLAP must be an integer smaller than WL NFFT: specifies the number of frequency points used to calculate the Fourier transforms. Fs: sampling frequency 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 41
Spectrogram Example Two Constant Frequencies xt ( ) = cos(2 π(660) t)sin(2 π(12) t) = 0 f (in Hz) 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 42
What is the fundamental frequency? 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 43
Example: Stepped frequencies C-major SCALE: successive sinusoids Frequency is constant for each note IDEAL Note: ARTIFACTS at frequency transitions 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 44
Time-Varying Frequency signals Frequency can change continuously Examples: (1) FREQUENCY MODULATION (FM) x( t) = cos( 2π fc t + v( t)) (2) CHIRP SIGNALS x Linear Frequency Modulation (LFM) 2 ( 0 t) = Acos( α t + 2π f t + ϕ) Phase change is quadratic Frequency changes LINEARLY vs. time 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 45
Instantaneous Frequency (IF) definition Definition x ( t ) = A cos( ψ ( t )) ω i ( t ) = ψ ( t ) d dt Example: Sinusoidal signal xt () = Acos(2 π ft+ ϕ ) ψ () t = 0 Derivative of the phase d ω () t = ψ () t = i dt 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 46
Example: x t π t t 2 () = 2cos(2 (30 30 + 0.1)) Derive the expression for the instantaneous frequency 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 47
Chirp waveform 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 48
Linear Chirp Spectrogram 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 49
How to determine the equation for a specific linear chirp Assume x(t) sweeps from f 1 =5000Hz at T 1 =0s to f 2 =1000Hz at T 2 =2s, find its equation and plot its spectrogram 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 50
Other types of CHIRPS ψ(t) can be anything: x( t) = A cos( α cos( β t) + ϕ ) d dt ω ( t) = ψ ( t) = i Example: Sinewave frequency modulation (FM) Additional examples in the CD-ROM Demos in Chapter 3 06/09/10 2003rws/jMc-modif SuFY10 (MPF)-Textbook Sections II & III 51