Introduction to Digital Signal Processing

Total Page:16

File Type:pdf, Size:1020Kb

Introduction to Digital Signal Processing An introduction to Digital Signal Processing Felix Donkers © Felix Donkers Outline • Introduction ◦ Definition Digital Signal Processing ◦ Application areas • DSP systems ◦ Analog versus digital ◦ Sensors ◦ AD / DA conversion • DSP theory ◦ Time domain versus frequency domain ◦ Nyquist / Shannon sampling theorem ◦ Digital filters ◦ Quantisation noise and dynamic range • Practical exercises ◦ DTMF detection ◦ Digital reverb • Further reading 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 2 Title of Presentation Outline • Introduction ◦ Definition Digital Signal Processing ◦ Application areas • DSP systems ◦ Analog versus digital ◦ Sensors ◦ AD / DA conversion • DSP theory ◦ Time domain versus frequency domain ◦ Nyquist / Shannon sampling theorem ◦ Digital filters ◦ Quantisation noise and dynamic range • Practical exercises ◦ DTMF detection ◦ Digital reverb • Further reading 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 3 Digital Signal Processing – definition (Digital) Signal Processing [source: WikipediA ] DSP is the analysis, interpretation , and manipulation of signals (in the digital domain) . Signals of interest include sound, images, radar, biological signals such as ECG , and many others . Processing of such signals includes storage, reconstruction , transmission, separation of information from noise , compression, feature extraction, etc . 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 4 Title of Presentation Digital Signal Processing – definition Signal improvement Signal feature extraction - beats per minute DSP (music) DSP - color (ambilight) Signal acquisition Signal synthesis ACQ SYN Signal compression Signal transmission ENC DEC TR REC 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 5 Digital Signal Processing – application fields Sensor signal processing is still hot & high tech 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 6 Title of Presentation Digital Signal Processing – another example Mic electronics: • Amplifier • Pre-filtering (conditioning) •Noise filter •Anti-aliasing ADC DSP DAC PA electronics: • Post filtering • Smooting filter • Rendering • Power amplifier • Loud speakers 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 7 Digital Signal Processing – application examples Etc, etc, etc 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 8 Title of Presentation Outline • Introduction ◦ Definition Digital Signal Processing Application areas • DSP systems ◦ Analog versus digital ◦ Sensors ◦ AD / DA conversion • DSP theory ◦ Time domain versus frequency domain ◦ Nyquist / Shannon sampling theorem ◦ Digital filters ◦ Quantisation noise and dynamic range • Practical exercises ◦ DTMF detection ◦ Digital reverb • Further reading 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 9 Analoge versus digital signals • Signals: – Representation of time variant physical measures – E.g. temperature, humidity, speed, weight, light intensity, sound, ..., … A Analogue signal • Analogue signals: Digital signal – Continuous (often electrical) representation of physical signals. – Amplitude and time continuous • Digital signals: t – Discrete representations (numbers) of physical signals – Amplitude discrete (vertical grid) and time discrete (horizontal grid) 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 10 Title of Presentation Sensors (some examples) Microphone Temperature Magnetic field Pressure Accelero- Strain gauge LDR sensor (Hall) sensor sensor meter Biosensor Photocell CCD Ultrasone sensor Interferro- sensor 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 11 When to use DSP? • In general: • When you run into the boundaries of the performance of your sensors, actuators and/or overall system. • Example: temperature measurement • If you’re only interested in rough figures (e.g. +/- 10 °C) • Just use the sensor as is • If you’re interested in fair accuracy (e.g. +/- 1 °C ) • Calibrate the sensor (offset / gain) • If you need accurate figures (e.g. +/- 0.1 °C) • Average multiple measurements (which is already a simple form of DSP) 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 12 Title of Presentation Example : DSP in cell phones • RF demodulation & channel EQ (for optimal ISI) (GSM, EDGE, GPRS, UMTS, WCDMA, HSDPA, DVB-T, DAB, FM, GPS, …) • Clock extraction & bit detection • Error detection & correction • Audio & video coding (speech, mp3, JPG, MPG, … (de-)compression) • Error concealment (i.e. what to do if error correction fails) • Midi-synthesis (e.g. ringtone) • TTS synthesis (e.g. caller-ID) • Auto – DJ (incl. feature extraction) • Image scaling & enhancements • Audio enhancement (e.g. EQ, virtual surround) • GPS decoding • DTMF synthesis • …… • Typical mobile phone platform : – DSP for RF demodulation (200MHz) – ARM7 / ARM9 / ARM11 for base band processing (400MHz) 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 13 AD / DA conversion • Resistor network DACs • 8 – 10 bit resolutions • Up to 10 MHz sampling rates Ruit U U U U = −R (* MSB + ... + LSB ) uit uit R 2* R 4* R 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 14 Title of Presentation AD / DA conversion • Resistor network DACs • 8 – 14 bit resolutions • Up to 10 MHz sampling rates • R-2R network is the mostly used DAC architecture for various applications 2R D D D D D V −= ( 0 + 1 + 2 + 3 + 4 +......) out R 2 4 8 16 32 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 15 AD / DA conversion • Successive Approximation ADC • 8 – 14 bit resolutions • Up to 100 kHz sampling rates • Requires S&H to ‘freeze’ input signal • Often used: • in Measurement & Instrumentation environments • as function block inside microcontrollers step SAR Vin > Action Vdac ? 1 1000 No 2 0000 Reset 3 0100 Yes 4 0100 Keep 5 0110 Yes 6 0110 Keep 7 0111 No 8 0110 Reset 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 16 Title of Presentation AD / DA conversion • Resistor network ADCs • 6 – 10 bit resolutions • Up to 10 MHz sampling rates • Often used for video capturing Comparator XOR Binary Output Output Output 1111111 1000000 111 0111111 0100000 110 0011111 0010000 101 0001111 0001000 100 0000111 0000100 011 0000011 0000010 010 0000001 0000001 001 0000000 0000000 000 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 17 AD / DA conversion • Delta-sigma ADC • 14-20 resolutions • From < 1Hz up to 100 kHz sampling rates • Often used: • in Measurement & Instrumentation environments • Audio conversion Digital filter 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 18 Title of Presentation Outline • Introduction ◦ Definition Digital Signal Processing ◦ Application areas • DSP systems ◦ Analog versus digital ◦ Sensors ◦ AD / DA conversion • DSP theory ◦ Time domain versus frequency domain ◦ Nyquist / Shannon sampling theorem ◦ Digital filters ◦ Quantisation noise and dynamic range • Practical exercises ◦ DTMF detection ◦ Digital reverb • Further reading 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 19 Time domain versus frequency domain N = ω +ϕ f() t ∑ An *sin( n *t n ) = n=1 + = ω +ϕ f() t A1 *sin( 1 *t 1) + ω +ϕ A2 *sin( 2 *t 2 ) + ω +ϕ A3 *sin( 3 *t 3 ) + ω +ϕ A4 *sin( 4 *t 4 ) + ω +ϕ A5 *sin( 5 *t 5 ) 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 20 Title of Presentation Time domain versus frequency domain • Test signal • Music 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 21 Discrete Fourier Transform (DFT) • To transform a Time Domain Signal into the Frequency Domain (and v.v.) DFT = Discrete Fourier Transform “1” Σ * e− ωtj Σ * + e− ωtjN Σ * 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 22 Title of Presentation Fast Fourier Transform (FFT) Fast Fourier Transform (FFT): 2 – is a computation efficient implementation of the DFT ( N*log 2(N) instead of N cycles ) – is available in various of-the-shelf math libraries for numerous platforms (PC, DSP, etc) – often assumes a signal length with a power-of-2 (#samples), e.g. 1024 FFT 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 23 Nyquist / Shannon Theory time domain A Aliasing t • According to Nyquist and Shannon, the sampling frequency should be a least twice the highest frequency of the input signal: ◦ fsampling > 2 * finput 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 24 Title of Presentation Nyquist / Shannon Theory frequency domain remember basic trigonomet rics : 1 1 cos( α *) cos( β ) = *cos( α − β ) + *cos( α + β ) fin 2 2 f f f fin, mirror in, mirror LPF in, mirror in, mirror aliasing !! fs > 2* f max fs, nok fs, ok fs, ok 5 10 15 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 25 Digital Filters (FIR) x[n-1] x[n-2] x[n-3] x[n-i] x[n-M] x[n] T T T T T a0 a1 a2 a3 ai aM * * * * * * y[n] + + + + + + M tap = Y() z = −n H() z ∑ an * z X() z n=0 = + −1 + −2 + −3 +K+ −M • FIR filters: H() z a0 a1 * z a2 * z a3 * z aM * z – Have an Finite Impulse Response – Have many “filter taps”, implying relatively high computational load – Can not become unstable Do #255 – Can have linear phase response (tranversal filters) Mac x0, y0, a x(R0+N0), x0 y(R4+), y0 End Macr x0, y0, a 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 26 Title of Presentation Digital Filters (FIR) 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No. 27 Digital Filters for image processing (2D-FIR) X0,0 ……X0,j ……X0,J ……………… … ………………… Xi,0 ……Xi,j …… Xi,J = ………………… ……………… … ? XI,0 ……XI,j ……XI,J C0,0 C0,m C0,M Cn,0 Cn,m Cn,M CN,0 CN, CN,M m Yi,j = Xi-1,j-1 * C n-1,m-1 + X i,j-1* C n,m-1 + X i+1,j-1 * C n+1,m-1 + X i-1,j * C n-1,m + X i,j * C n,m + X i+1,j * C n+1,m + X i-1,j+1 * C n-1,m+1 + X i,j+1 * C n,m+1 + X i+1,j+1 * C n+1,m+1 16 May 2010 An introduction to Digital Signal Processing – Felix Donkers No.
Recommended publications
  • Digital Signal Processing 10EC52
    Digital Signal Processing 10EC52 DIGITAL SIGNAL PROCESSING SUBJECT CODE : 10EC52 IA MARKS : 25 NO. OF LECTURE HRS /WEEK : 04 EXAM HOURS : 03 TOTAL NO . OF LECTURE HRS . : 52 EXAM MARKS : 100 UNIT - 1 DISCRETE FOURIER TRANSFORMS (DFT): FREQUENCY DOMAIN SAMPLING AND RECONSTRUCTION OF DISCRETE TIME SIGNALS . DFT AS A LINEAR TRANSFORMATION , ITS RELATIONSHIP WITH OTHER TRANSFORMS . 6 HRS UNIT - 2 PROPERTIES OF DFT, MULTIPLICATION OF TWO DFT S- THE CIRCULAR CONVOLUTION , ADDITIONAL DFT PROPERTIES . 6 HRS UNIT - 3 USE OF DFT IN LINEAR FILTERING , OVERLAP -SAVE AND OVERLAP -ADD METHOD . DIRECT COMPUTATION OF DFT, NEED FOR EFFICIENT COMPUTATION OF THE DFT (FFT ALGORITHMS ). 7 HRS UNIT - 4 RADIX -2 FFT ALGORITHM FOR THE COMPUTATION OF DFT AND IDFT–DECIMATIONIN - TIME AND DECIMATION -IN -FREQUENCY ALGORITHMS . GOERTZEL ALGORITHM , AND CHIRP -Z TRANSFORM . 7 HRS UNIT - 5 IIR FILTER DESIGN : CHARACTERISTICS OF COMMONLY USED ANALOG FILTERS – BUTTERWORTH AND CHEBYSHEVE FILTERS , ANALOG TO ANALOG FREQUENCY TRANSFORMATIONS . 6 HRS UNIT - 6 IMPLEMENTATION OF DISCRETE -TIME SYSTEMS : STRUCTURES FOR IIR AND FIR SYSTEMS DIRECT FORM I AND DIRECT FORM II SYSTEMS , CASCADE , LATTICE AND PARALLEL REALIZATION . 7 HRS UNIT - 7 FIR FILTER DESIGN : INTRODUCTION TO FIR FILTERS , DESIGN OF FIR FILTERS USING - RECTANGULAR , HAMMING , BARTLET AND KAISER WINDOWS , FIR FILTER DESIGN USING FREQUENCY SAMPLING TECHNIQUE . 6 HRS UNIT - 8 DESIGN OF IIR FILTERS FROM ANALOG FILTERS (B UTTERWORTH AND CHEBYSHEV ) - IMPULSE INVARIANCE METHOD . MAPPING OF TRANSFER FUNCTIONS : APPROXIMATION OF DERIVATIVE (BACKWARD DIFFERENCE AND BILINEAR TRANSFORMATION ) METHOD , MATCHED Z TRANSFORMS , VERIFICATION FOR STABILITY AND LINEARITY DURING MAPPING 7 HRS Digital Signal Processing 10EC52 TEXT BOOK: 1.
    [Show full text]
  • Implementation of a Power-Efficient DFT Based Demodulator for BFSK
    1 Implementation of a power-efficient DFT based demodulator for BFSK Giovanni Meciani M.Sc. Thesis December 2018 Committee: dr. ir. A. B. J. Kokkeler. S. Safapurhajari M.Sc. dr. ir. R. A. R. van der Zee Computer Architecture for Embedded Systems Group Faculty of Electrical Engineering, Mathematics and Computer Science 2 Abstract In wireless communication, the frequency offset is a problem that hinders the communication. It arises from the discrepancy between the frequencies of the oscillator of the transmitter and the one of the receiver. To solve this problem, oscillators with high frequency stability can be employed, at the expense of higher power requirements. As a consequence, this solution can be problematic in Wireless Sensors Network (WSN), where sensor nodes have limited power resources. Another solution is to correct the frequency offset within the demodulation algorithm, thus making it possible to use less power-hungry oscillators. This thesis focuses on the hardware implementation of an existing offset tolerant demodu- lation algorithm for BFSK modulation. Particular attention was posed in making the demod- ulator as power efficient as possible, given its usage in a WSN. To reach this goal, the two Discrete Fourier Transforms were optimised for zero-padding, which is an operation used in the algorithm. These two modifications allowed to save power when compared with the standard radix-2 FFT. Fixed-point is the chosen data representation. As the word length of the representation is a critical aspect that affects power consumption, an appropriate size was determined by using a procedure that makes use of MATLAB. The complete demodulator is implemented in VHDL and is used to characterise the system, when an FPGA is used in the synthesis process.
    [Show full text]
  • Goertzel Algorithm - Wikipedia
    Goertzel algorithm - Wikipedia https://en.wikipedia.org/wiki/Goertzel_algorithm Goertzel algorithm The Goertzel algorithm is a technique in digital signal processing (DSP) for efficient evaluation of the individual terms of the discrete Fourier transform (DFT). It is useful in certain practical applications, such as recognition of dual-tone multi-frequency signaling (DT!F) tones produced " the push buttons of the keypad of a traditional analog telephone. The algorithm $as first described by Gerald Goertzel in 1958.+', Like the DFT, the Goertzel algorithm analyses one selectable frequenc component from a discrete signal.+.,+/,+0, 1nlike direct DFT calculations, the Goertzel algorithm applies a single real-valued coefficient at each iteration, using real-valued arithmetic for real-valued input sequences. For covering a full spectrum, the Goertzel algorithm has a higher order of complexity than fast Fourier transform (FFT) algorithms, but for computing a small number of selected frequency components, it is more numerically efficient. The simple structure of the %oertzel algorithm makes it well suited to small processors and embedded applications. The Goert&el algorithm can also be used "in reverse" as a sinusoid synthesis function, which requires only 1 multiplication and 1 subtraction per generated sample.+), Contents The algorithm Numerical stability DFT computations Applications Power-spectrum terms Single DFT term with real-valued arithmetic Phase detection Complex signals in real arithmetic Computational complexity See also References Further reading External links The algorithm The main calculation in the Goertzel algorithm has the form of a digital filter, and for this reason the algorithm is often called a Goertzel filter. The filter operates on an input sequence in a cascade of two stages with a parameter , giving the frequency to be analysed, normalised to radians per sample.
    [Show full text]
  • Lecture Notes on Discrete-Time Signal Processing
    A. Enis Cetin Lecture Notes on Discrete-Time Signal Processing EE424 Course @ Bilkent University May 7, 2015 BILKENT Foreword This is version 1 of my EE 424 Lecture Notes. I am not a native English speaker. Therefore the language of this set of lecture notes will be Globish. I will later (hope- fully) revise this version and make it English with the help of my native English speaker son Sinan. I have been studying, teaching contributing to the field of Discrete-time Signal Processing for more than 25 years. I tought this course at Bilkent University, Uni- versity of Toronto and Sabanci University in Istanbul. My treatment of filter design is different from most textbooks and I only include material that can be covered in a single semester course. The notes are organized according to lectures and I have X lectures. We assume that the student took a Signals and Systems course and he or she is familier with Continuous Fourier Transform and Discrete-time Fourier Transform. There may be typos in the notes. So be careful! I also thank Berk Ozer for his contributions to this set of lecture notes. Ankara, October 2011 A. Enis Cetin v Contents 1 Introduction, Sampling Theorem and Notation .................... 1 1.1 Shannon’s Sampling Theorem . .1 1.2 Aliasing . .6 1.3 Relation between the DTFT and CTFT. .8 1.4 Continuous-Time Fourier Transform of xp(t) ...................9 1.5 Inverse DTFT . 11 1.6 Inverse CTFT . 11 1.7 Filtering Analog Signals in Discrete-time Domain . 12 1.8 Exercises . 12 2 Multirate Signal Processing ....................................
    [Show full text]
  • The Sliding DFT
    Eric Jacobsen and Richard Lyons The Sliding DFT he standard method well as review the process of fre- filter’s structure is readily available in for spectrum analysis quency-domain convolution to ac- the literature [5]-[7]. in digital signal pro- complish time-domain windowing. The z-domain transfer function of cessing (DSP) is the Finally, a modified sliding DFT struc- the Goertzel filter is discrete Fourier ture is proposed that provides im- transform (DFT), typically imple- proved computational efficiency. HzG () Tmented using a fast Fourier transform − −−jkN21π / = 1 ez (FFT) algorithm. However, there are −− 12−+cos( 2πkNz / ) 12 z applications that require spectrum Goertzel Algorithm analysis only over a subset of the N (2) center frequencies of an N-point DFT. The Goertzel algorithm, used in A popular, as well as efficient, tech- dual-tone multifrequency decoding with a single z-domain zero located at = − jkN2 π / nique for computing sparse DFT re- and phase-shift keying/frequency-shift ze and conjugate poles at = ± jkN2 π / sultsistheGoertzelalgorithmthat keying modem implementations, is ze as shown in Figure 2(a). = − jkN2 π / computes a single complex DFT spec- commonly used to compute DFT The pole/zero pair at ze can- tral bin value for every N input time spectra [1]-[4]. The algorithm is im- cels each other. The frequency magni- samples. This article describes a sliding plemented in the form of a second-or- tude response, provided in Figure DFT process whose spectral bin out- der infinite impulse response (IIR) 2(b), shows resonance centered at a π put rate is equal to the input data rate, filter as shown in Figure 1.
    [Show full text]
  • AN219: Using Microcontrollers in Digital Signal Processing Applications
    AN219 Using Microcontrollers in Digital Signal Processing Applications 1. Introduction Digital signal processing algorithms are powerful tools that provide algorithmic solutions to common problems. For example, digital filters provide several benefits over their analog counterparts. These algorithms are traditionally implemented using dedicated digital signal processing (DSP) chips, FPGAs, or RISC processors. While these solutions are very efficient at their purpose, they only perform one function in the system and can be both expensive and large. This application note discusses an alternative solution using a Silicon Labs microcontroller to implement DSP algorithms in less space and still have plenty of CPU bandwidth available for other tasks. This application note discusses the implementation of three DSP solutions on the C8051F12x and C8051F36x family of microcontrollers: FIR filters Goertzel Algorithm used for DTMF decoding FFT algorithm For each of these topics, we introduce the algorithm, discuss the implementation of these algorithms on the DSP- enabled MCUs using the multiply and accumulate (MAC) engine, and provide a list of the CPU bandwidth and memory usage. 1.1. Key Points The 100 peak MIPS CPU, 2-cycle 16x16 MAC engine and on-chip ADC and DAC make the C8051F12x and C8051F36x well suited to DSP applications. Using these resources on a C8051F36x microcontroller, a 5x5 mm 8-bit MCU can process data in real-time for FIR filters and Goertzel Algorithms for DTMF decoding and implement a full FFT. 2. Digital FIR Filters Filters have many applications, including narrowing the input waveform to a band of interest and notching out undesired noise. Digital filters have some benefits over their analog counterparts.
    [Show full text]