READING ASSIGNMENTS Signal Processing First This Lecture: Chapter 2, pp. 9-17 LECTURE #1 Sinusoids Appendix A: Complex Numbers Appendix B: MATLAB Chapter 1: Introduction 4/3/2006 CONVERGING FIELDS Math 3 COURSE OBJECTIVE Students will be able to: Understand mathematical descriptions of signal processing algorithms and express those algorithms as computer implementations (MATLAB) Physics EE CmpE Computer Science © 2003-2006, JH McClellan & RW Schafer Applications What are your objectives? BIO 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 4 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 5 WHY USE DSP ? Fourier Everywhere Mathematical abstractions lead to generalization and discovery of new processing techniques Telecommunications Sound & Music CDROM, Digital Video Fourier Optics X-ray Crystallography Protein Structure & DNA Computer implementations are flexible Computerized Tomography Nuclear Magnetic Resonance: MRI Radioastronomy Applications provide a physical context Ref: Prestini, “The Evolution of Applied Harmonic Analysis” 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 6 4/3/2006 © 2003-2006, JH McClellan & RW Schafer LECTURE OBJECTIVES TUNING FORK EXAMPLE Write general formula for a “sinusoidal” waveform, or signal From the formula, plot the sinusoid versus time What’s a signal? CD-ROM demo “A” is at 440 Hertz (Hz) Waveform is a SINUSOIDAL SIGNAL Computer plot looks like a sine wave This should be the mathematical formula: A cos(2π ( 440)t + ϕ ) It’s a function of time, x(t) in the mathematical sense 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 7 8 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 9 TUNING FORK A-440 Waveform T ≈ 8.15 − 5.85 = 2.3 ms Break x(t) into its sinusoidal components f = 1/ T Called the FREQUENCY SPECTRUM = 1000 / 2.3 ≈ 435 Hz More complicated signal (BAT.WAV) Waveform x(t) is NOT a Sinusoid Theory will tell us x(t) is approximately a sum of sinusoids FOURIER ANALYSIS Time (sec) 4/3/2006 SPEECH EXAMPLE © 2003-2006, JH McClellan & RW Schafer 10 4/3/2006 © 2003-2006, JH McClellan & RW Schafer Speech Signal: BAT DIGITIZE the WAVEFORM Nearly Periodic in Vowel Region x[n] is a SAMPLED SINUSOID Period is (Approximately) T = 0.0065 sec 11 A list of numbers stored in memory Sample at 11,025 samples per second Called the SAMPLING RATE of the A/D Time between samples is 1/11025 = 90.7 microsec Output via D/A hardware (at Fsamp) 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 12 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 13 STORING DIGITAL SOUND SINES and COSINES x[n] is a SAMPLED SINUSOID Always use the COSINE FORM A list of numbers stored in memory A cos(2π ( 440)t + ϕ ) CD rate is 44,100 samples per second 16-bit samples Stereo uses 2 channels Number of bytes for 1 minute is Sine is a special case: sin(ω t ) = cos(ω t − π2 ) 2 X (16/8) X 60 X 44100 = 10.584 Mbytes 4/3/2006 14 © 2003-2006, JH McClellan & RW Schafer SINUSOIDAL SIGNAL ω Radians/sec Hertz (cycles/sec) AMPLITUDE Magnitude ω = (2π ) f PERIOD (in sec) T= 4/3/2006 1 2π = f ω PHASE © 2003-2006, JH McClellan & RW Schafer © 2003-2006, JH McClellan & RW Schafer 15 EXAMPLE of SINUSOID A cos(ω t + ϕ ) FREQUENCY 4/3/2006 Given the Formula A Make a plot 5 cos(0.3π t + 1.2π ) ϕ 16 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 17 PLOTTING COSINE SIGNAL from the FORMULA PLOT COSINE SIGNAL 5 cos(0.3π t + 1.2π ) 5cos(0.3π t +12 . π) Determine period: Formula defines A, ω, and φ T = 2π / ω = 2π / 0.3π = 20 / 3 A=5 Determine a peak location by solving ω = 0.3π ϕ = 1.2π 4/3/2006 © 2003-2006, JH McClellan & RW Schafer (ω t + ϕ ) = 0 ⇒ (0.3π t + 1.2π ) = 0 Zero crossing is T/4 before or after Positive & Negative peaks spaced by T/2 18 PLOT the SINUSOID 5 cos(0.3π t + 1.2π ) Use T=20/3 and the peak location at t=-4 ← " 203 " → 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 20 4/3/2006 © 2003-2006, JH McClellan & RW Schafer 19