Review of Analog Signals and Sampling • Discrete-Time
Total Page:16
File Type:pdf, Size:1020Kb
Digital Signal Processing Disclaimer Fundamentals with Hands-on Experiments These course notes cover the fundamentals and select applications by of Digital Signal Processing and are intended solely for education. No other use is intended or authorized. No warranty or implied Andreas Spanias, Ph.D. warranty is given that any of the material is fit for a particular purpose, application, or product. Although the author believes that June 24, 2009 the concepts, algorithms, software, and data presented are accurate, School of Electrical, Computer and Energy Engineering he provides no guarantee or implied guarantee that they are free of Arizona State University Tempe, AZ 85287-5706 error. The material presented should not be used without extensive 480 965 1837 verification. If you do not wish to be bound by the above then 480 965 8325 please do not use these notes. DSP Primer – June 24, 2009 Sponsored in part by NSF 0817596 2009 Copyright 2009 ©Andreas Spanias I-1 2009 Copyright 2009 ©Andreas Spanias I-2 Contents • Introduction to DSP - Review of analog Digital Signal Processing (DSP) Introduction signals and sampling • Digital Signal Processing (DSP) is a branch of signal processing • Discrete-time systems and digital filters that emerged from the rapid development of VLSI technology • The z transform in DSP that made feasible real- time digital computation. • Design of FIR digital filters • DSP involves time and amplitude quantization of signals and • Design of IIR digital filters relies on the theory of discrete- time signals and systems. • The discrete and the fast Fourier • DSP emerged as a field in the 1960s. transform • Early applications of off- line DSP include seismic data analysis, • FFT info and applications voice processing research. 2009 Copyright 2009 ©Andreas Spanias I-3 2009 Copyright 2009 ©Andreas Spanias I-4 Digital vs Analog Signal Processing DSP Historical Perspective Advantages of digital over analog signal processing: • Nyquist Theorem 1920's. • flexibility via programmable DSP operations, • Statistical Time Series, PCM 1940's. • storage of signals without loss of fidelity, •off- line processing, • lower sensitivity to hardware tolerances, • Digital Filtering, FFT, Speech Analysis mid 1960s (MIT, Bell • rich media data processing capabilities, Labs, IBM). • opportunities for encryption in communications, • Multimode functionality and opportunities for software radio. • Adaptive Filters, Linear Prediction (Stanford, Bell Labs, Japan 1960s). -Disadvantages : • Digital Spectral Estimation, Speech Coding (1970s). • Large bandwidth and CPU demands 2009 Copyright 2009 ©Andreas Spanias I-5 2009 Copyright 2009 ©Andreas Spanias I-6 DSP Historical Perspective (2) DSP Applications • Military Applications (target tracking, radar, sonar, secure communications, sensors, imagery) • First Generation DSP Chips (Intel microcontroler, TI, AT&T, Motorola, Analog Devices (early 1980s) • Telecommunications (cellular, channel equalization, vocoders, software radioetc) • Low-cost DSPs (late 1980s) • PC and Multimedia Applications (audio/video on demand, streaming data applications, voice synthesis/recognition) • Vocoder Standards for civilian applications (late 1980s) • Entertainment (digital audio/video compression, MPEG, CD, MD, • Migration of DSP technologies in general purpose CPU/Controllers DVD, MP3) "native" DSP (1990s) • Automotive (Active noise cancellation, hands-free communications, • High Complexity Rich Media Applications navigation-GPS, IVHS) • Manufacturing, instrumentation, biomedical, oil exploration, robotics • Low Power (Portable) Applications • Remote sensing, security 2009 Copyright 2009 ©Andreas Spanias I-7 2009 Copyright 2009 ©Andreas Spanias I-8 Typical Digital Signal Processing System Communications and DSP Nowdays LPF and A/D integrated DSP chip • DTMF (use of the FFT and digital oscillators) Digital • Adaptive echo cancellation (Hands-free telephony, Speakerphones) x(t) x`(t)sample x(nT) LPF Signal & A/D • Speech coding (speech coding in cellular phones) Processor f • Modem (data/computer connectivity) s y(nT) Reconstruction Antialiasing • Software radio (multi-mode/multi standard wireless communications) y(t) y`(t) • Channel estimation (equalization) LPF D/A • Antenna beamforming (space division multiple access - SDMA) Nowdays LPF and D/A integrated • CDMA (modulating with random sequences) Remarks: The diagram shows the sampling, processing, and reconstruction of an analog signal. There are applications where processing stops at the digital signal processor, e.g., speech recognition. 2009 Copyright 2009 ©Andreas Spanias I-9 2009 Copyright 2009 ©Andreas Spanias I-10 Symbols and Notation Continuous vs Discrete-time Continuous-time (analog) Signal Discrete-time (digital) signal xa (t) |tnT x(nT) x(n) ;discrete time input x(t) x(n) y(n) ;discrete time output H (.) ;transfer and frequency responsefunctions h(.) ;impulseresponse(systemfunction) 0T2T ... t n n ;discrete timeindex x(t)Q x(n) Remarks: In general and unless otherwise stated lower case symbols will be used for time-domain signals and upper case symbols will be used for Remarks: A continuous-time signal is converted to discrete-time using sampling and transform domain signals. Bold face or underlined face symbols will be quantization. As a result aliasing and quantization noise is introduced. This noise Be generally used for vectors or matrices. can be controlled by properly designing the quantizer and anti-aliasing filter. 2009 Copyright 2009 ©Andreas Spanias I-11 2009 Copyright 2009 ©Andreas Spanias I-12 Quantization Noise Simplest Quantization Scheme - quantized waveform Uniform PCM xq(t) quantization noise Performance in terms of Signal to Noise Ratio (SNR) eq(t) SNRPCM 6.02Rb K1 sampling period xa(t) where Rb is the number of bits and the value of K1 T analog waveform depends on signal statistics. For telephone speech K1 = -10 xq (t) x (t) eq (t) 2009 Copyright 2009 ©Andreas Spanias I-13 2009 Copyright 2009 ©Andreas Spanias I-14 Oversampling / or / Conversion Time vs Frequency Domain tim e-dom ain frequency-domain • Integrated oversampling and 1-bit quantization x(t) |X(f)| ... ... ... • Very compact and inexpensive circuitry (some low power applications as well) 00t f x(t) |X(f)| • Lowers analog circuit complexity with a modest increase in software (DSP MIPS) complexity ... ... ... 00tf • Uses concepts from multirate signal processing and Delta Modulation Remarks: Slowly time-varying signals tend to have low-frequency content • Will be described in the context of multirate signal processing while signals with abrupt changes in their amplitudes have high frequency content. The frequency content of signals can be estimated using Fourier techniques. 2009 Copyright 2009 ©Andreas Spanias I-15 2009 Copyright 2009 ©Andreas Spanias I-16 Example: Time vs Frequency Domain Speech Some Important Signals 1.0 50 Time domain speech segment fundamental TAPE TIME: 8014 frequency Formant Structure 20 0.0 Discrete-time Impulse 1 Amplitude Magnitude (dB) 0 -1.0 -20 0 8 16 24 32 01234 (n) .. .. Time (mS) Frequency (KHz) Periodic waveform gives harmonic spectra 0 n 1.0 40 Time domain speech segment TAPE TIME: 3840 20 0.0 0 Amplitude Magnitude (dB) Magnitude Think of signals as a weighted sum of impulses. -1.0 -30 0 8 16 24 32 01234 Impulses help in analyzing signals and filters Time (mS) Frequency (KHz) 2009 Copyright 2009 ©Andreas Spanias I-17 2009 Copyright 2009 ©Andreas Spanias I-18 Some Important Signals (3) Some Important Signals (4) The sinusoid Period T The sinc function sidelobes mainlobe 2 sin(t) sin( t) sin( t) sinc(t) ... ... T { } t { 0 } 2 π 2π 2 f units: ω(rad/s) f (Hz) T(s) T Sinc functions often appear in signal and filter analysis Sinusoids are used in analyzing or synthesizing acoustic and other signals particularly when considering frequency domain behavior 2009 Copyright 2009 ©Andreas Spanias I-19 2009 Copyright 2009 ©Andreas Spanias I-20 Some Important Signals (5) Representing Periodic Signals with Sinusoids Random noise Fourier series: Trigonometric form: x(t) a 0 a k cos( k o t ) bk sin( k o t ) k 1 k 1 Fourier series: Complex (magnitude/phase) form: jk t Preferred in engineering-- >> o x(t) X k e k Xk are complex F.S. coefficients and provide spectral magnitude and phase info Encountered in communication systems and other application Characterized by their mean and variance jkot and e cos(kot) jsin(kot) 2009 Copyright 2009 ©Andreas Spanias I-21 2009 Copyright 2009 ©Andreas Spanias I-22 Fourier Series Example (2) Fourier Series Analysis Example Harmonic Spectrum Representing a Periodic Pulse Train as a Sum of Harmonic Sinusoids x(t) X k d d 1/ 4 2o T harmonics ... ... 3o 0 T t d / 2 1 d k d ... ... X 1e jk o t dt sinc o k 0 T d / 2 T 2 Remarks: A periodic pulse signal has a discrete F.S. spectrum described by samples that fall on a sinc (sinc(x)=sin(x)/x) function. As the period increases the F.S. components become more dense in frequency and weaker Fundamental frequency in amplitude. If T goes to infinity periodicity is lost and the F.S. vanishes. o 2009 Copyright 2009 ©Andreas Spanias I-23 2009 Copyright 2009 ©Andreas Spanias I-24 Use Sinusoids to synthesize a periodic pulse using the Fourier Series Example (3) Fourier series (only one period shown) d/T=1/5 10 sinusoids 0 1 sinusoid 4π 50 sinusoids 2 sinusoids d/T=1/10 3 sinusoids 0 100 sinusoids 2009 Copyright 2009 ©Andreas Spanias 2π I-25 2009 Copyright 2009 ©Andreas Spanias I-26 Fourier transform of a time-limited pulse The Continuous Fourier Transform (CFT) Equations (Represent a single pulse by sinusoids) Analysis Expression Given the signal The Fourier transform xt X ( ) x (t )e j t dt d ... ... The inverse Fourier transform Synthesis Expression t 0 1 jt x()tXed ( ) d / 2 d 2 j t X ( ) e dt d sinc d / 2 2 A Fourier transform pair is designated by: x (t ) X ( ) Remarks: Note that a time-limited signal has a non-bandlimited CFT spectrum. Remarks: Both time and frequency are continuous variables. The CFT can The sinc function has zero crossings at integer multiples of 2π/d.