Donald S Reay
Digital Signal Processing Using the Arm Cortex M4
Donald S Reay
Digital Signal Processing Using the Arm Cortex M4
- Broschiertes Buch
- Merkliste
- Auf die Merkliste
- Bewerten Bewerten
- Teilen
- Produkt teilen
- Produkterinnerung
- Produkterinnerung
Features inexpensive ARM(r) Cortex(r)-M4 microcontroller development systems available from Texas Instruments and STMicroelectronics. This book presents a hands-on approach to teaching Digital Signal Processing (DSP) with real-time examples using the ARM(r) Cortex(r)-M4 32-bit microprocessor. Real-time examples using analog input and output signals are provided, giving visible (using an oscilloscope) and audible (using a speaker or headphones) results. Signal generators and/or audio sources, e.g. iPods, can be used to provide experimental input signals. The text also covers the fundamental…mehr
Andere Kunden interessierten sich auch für
- Dhananjay V. GadreGetting Started with Tiva ARM Cortex M4 Microcontrollers88,99 €
- John W LeisDigital Signal Processing Using MATLAB for Students and Researchers124,99 €
- Cem ÜnsalanEmbedded System Design with ARM Cortex-M Microcontrollers37,99 €
- Cem ÜnsalanEmbedded System Design with ARM Cortex-M Microcontrollers52,99 €
- Jose Luis Rojo-AlvarezDigital Signal Processing with Kernel Methods147,99 €
- Paul G HurayThe Foundations of Signal Integrity183,99 €
- Feng ZhengDigital Signal Processing for RFID138,99 €
-
-
-
Features inexpensive ARM(r) Cortex(r)-M4 microcontroller development systems available from Texas Instruments and STMicroelectronics. This book presents a hands-on approach to teaching Digital Signal Processing (DSP) with real-time examples using the ARM(r) Cortex(r)-M4 32-bit microprocessor. Real-time examples using analog input and output signals are provided, giving visible (using an oscilloscope) and audible (using a speaker or headphones) results. Signal generators and/or audio sources, e.g. iPods, can be used to provide experimental input signals. The text also covers the fundamental concepts of digital signal processing such as analog-to-digital and digital-to-analog conversion, FIR and IIR filtering, Fourier transforms, and adaptive filtering. Digital Signal Processing Using the ARM(r) Cortex(r)-M4: * Uses a large number of simple example programs illustrating DSP concepts in real-time, in an electrical engineering laboratory setting * Includes examples for both STM32F407 Discovery and the TM4C123 Launchpad, using Keil MDK-ARM, on a companion website * Example programs for the TM4C123 Launchpad using Code Composer Studio version 6 available on companion website Digital Signal Processing Using the ARM(r) Cortex(r)-M4 serves as a teaching aid for university professors wishing to teach DSP using laboratory experiments, and for students or engineers wishing to study DSP using the inexpensive ARM(r) Cortex(r)-M4. Donald Reay is a lecturer in electrical engineering at Heriot-Watt University in Edinburgh, Scotland. He has also taught hands-on DSP, on a number of occasions, as a visiting lecturer at Zhejiang University in Hangzhou, China. He co-authored Digital Signal Processing and Applications with the TMS320C6713 and TMS320C6416 DSK, Second Edition (Wiley 2008) with Rulph Chassaing, and is the author of Digital Signal Processing and Applications with the OMAP-L138 eXperimenter (Wiley 2012).
Hinweis: Dieser Artikel kann nur an eine deutsche Lieferadresse ausgeliefert werden.
Hinweis: Dieser Artikel kann nur an eine deutsche Lieferadresse ausgeliefert werden.
Produktdetails
- Produktdetails
- Verlag: John Wiley & Sons / Wiley
- Seitenzahl: 320
- Erscheinungstermin: 19. Oktober 2015
- Englisch
- Abmessung: 233mm x 154mm x 22mm
- Gewicht: 490g
- ISBN-13: 9781118859049
- ISBN-10: 1118859049
- Artikelnr.: 40054051
- Verlag: John Wiley & Sons / Wiley
- Seitenzahl: 320
- Erscheinungstermin: 19. Oktober 2015
- Englisch
- Abmessung: 233mm x 154mm x 22mm
- Gewicht: 490g
- ISBN-13: 9781118859049
- ISBN-10: 1118859049
- Artikelnr.: 40054051
DONALD S. REAY is lecturer in electrical engineering at Heriot-Watt University in Edinburgh, Scotland. He has also taught hands-on DSP, on a number of occasions, as a visiting lecturer at Zhejiang University in Hangzhou, China. He co-authored Digital Signal Processing and Applications with the TMS320C6713 and TMS320C6416 DSK, Second Edition (Wiley, 2008) with Rulph Chassaing, and is the author of Digital Signal Processing and Applications with the OMAP-L138 eXperimenter (Wiley, 2012).
Preface xi 1 ARM® CORTEX® - M4 Development Systems 1 1.1 Introduction 1
1.1.1 Audio Interfaces 2 1.1.2 Texas Instruments TM4C123 LaunchPad and
STM32F407 Discovery Development Kits 2 1.1.3 Hardware and Software Tools 6
Reference 7 2 Analog Input and Output 9 2.1 Introduction 9 2.1.1 Sampling,
Reconstruction, and Aliasing 9 2.2 TLV320AIC3104 (AIC3104) Stereo Codec for
Audio Input and Output 10 2.3 WM5102 Audio Hub Codec for Audio Input and
Output 12 2.4 Programming Examples 12 2.5 Real-Time Input and Output Using
Polling, Interrupts, and Direct Memory Access (DMA) 12 2.5.1 I2S Emulation
on the TM4C123 15 2.5.2 Program Operation 15 2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16 2.5.5 Changing the
Sampling Frequency 16 2.5.6 Using the Digital MEMS Microphone on the
Wolfson Audio Card 20 2.5.7 Running the Program 21 2.5.8 Running the
Program 23 2.5.9 DMA in the TM4C123 Processor 26 2.5.10 Running the Program
30 2.5.11 Monitoring Program Execution 30 2.5.12 Measuring the Delay
Introduced by DMA-Based I/O 30 2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35 2.5.15 Measuring the Delay Introduced by
DMA-Based I/O 35 2.5.16 Running the Program 46 2.6 Real-Time Waveform
Generation 46 2.6.1 Running the Program 49 2.6.2 Out-of-Band Noise in the
Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49 2.6.3 Running the
Program 53 2.6.4 Running the Program 62 2.6.5 Running the Program 69 2.7
Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72 2.7.2 Programmable
Digital Effects Filters in the AIC3104 Codec 72 2.8 Aliasing 78 2.8.1
Running the Program 83 2.9 Identifying the Frequency Response of the DAC
Using An Adaptive Filter 83 2.9.1 Running the Program 84 2.10 Analog Output
Using the STM32F407'S 12-BIT DAC 91 References 96 3 Finite Impulse Response
Filters 97 3.1 Introduction to Digital Filters 97 3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99 3.1.3 Definition of the
z-Transform 100 3.1.4 Properties of the z-Transform 108 3.1.5 z-Transfer
Functions 111 3.1.6 Mapping from the s-Plane to the z-Plane 111 3.1.7
Difference Equations 112 3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114 3.2 Ideal Filter Response
Classifications: LP, HP, BP, BS 114 3.2.1 Window Method of FIR Filter
Design 114 3.2.2 Window Functions 116 3.2.3 Design of Ideal High-Pass,
Band-Pass, and Band-Stop FIR Filters Using the Window Method 120 3.3
Programming Examples 123 3.3.1 Altering the Coefficients of the Moving
Average Filter 132 3.3.2 Generating FIR Filter Coefficient Header Files
Using MATLAB 137 4 Infinite Impulse Response Filters 163 4.1 Introduction
163 4.2 IIR Filter Structures 164 4.2.1 Direct Form I Structure 164 4.2.2
Direct Form II Structure 165 4.2.3 Direct Form II Transpose 166 4.2.4
Cascade Structure 168 4.2.5 Parallel Form Structure 169 4.3 Impulse
Invariance 171 4.4 Bilinear Transformation 171 4.4.1 Bilinear Transform
Design Procedure 172 4.5 Programming Examples 173 4.5.1 Design of a Simple
IIR Low-Pass Filter 173 Reference 216 5 Fast Fourier Transform 217 5.1
Introduction 217 5.2 Development of the FFT Algorithm with RADIX-2 218 5.3
Decimation-in-Frequency FFT Algorithm with RADIX-2 219 5.4
Decimation-in-Time FFT Algorithm with RADIX-2 222 5.4.1 Reordered Sequences
in the Radix-2 FFT and Bit-Reversed Addressing 224 5.5
Decimation-in-Frequency FFT Algorithm with RADIX-4 226 5.6 Inverse Fast
Fourier Transform 227 5.7 Programming Examples 228 5.7.1 Twiddle Factors
233 5.8 Frame- or Block-Based Programming 239 5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244 5.9 Fast Convolution 252 5.9.1 Running the
Program 256 5.9.2 Execution Time of Fast Convolution Method of FIR Filter
Implementation 256 Reference 261 6 Adaptive Filters 263 6.1 Introduction
263 6.2 Adaptive Filter Configurations 264 6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265 6.2.3 Noise Cancellation
265 6.2.4 Equalization 266 6.3 Performance Function 267 6.3.1 Visualizing
the Performance Function 269 6.4 Searching for the Minimum 270 6.5 Least
Mean Squares Algorithm 270 6.5.1 LMS Variants 272 6.5.2 Normalized LMS
Algorithm 272 6.6 Programming Examples 273 6.6.1 Using CMSIS DSP Function
arm_lms_f32() 280 Index 299
1.1.1 Audio Interfaces 2 1.1.2 Texas Instruments TM4C123 LaunchPad and
STM32F407 Discovery Development Kits 2 1.1.3 Hardware and Software Tools 6
Reference 7 2 Analog Input and Output 9 2.1 Introduction 9 2.1.1 Sampling,
Reconstruction, and Aliasing 9 2.2 TLV320AIC3104 (AIC3104) Stereo Codec for
Audio Input and Output 10 2.3 WM5102 Audio Hub Codec for Audio Input and
Output 12 2.4 Programming Examples 12 2.5 Real-Time Input and Output Using
Polling, Interrupts, and Direct Memory Access (DMA) 12 2.5.1 I2S Emulation
on the TM4C123 15 2.5.2 Program Operation 15 2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16 2.5.5 Changing the
Sampling Frequency 16 2.5.6 Using the Digital MEMS Microphone on the
Wolfson Audio Card 20 2.5.7 Running the Program 21 2.5.8 Running the
Program 23 2.5.9 DMA in the TM4C123 Processor 26 2.5.10 Running the Program
30 2.5.11 Monitoring Program Execution 30 2.5.12 Measuring the Delay
Introduced by DMA-Based I/O 30 2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35 2.5.15 Measuring the Delay Introduced by
DMA-Based I/O 35 2.5.16 Running the Program 46 2.6 Real-Time Waveform
Generation 46 2.6.1 Running the Program 49 2.6.2 Out-of-Band Noise in the
Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49 2.6.3 Running the
Program 53 2.6.4 Running the Program 62 2.6.5 Running the Program 69 2.7
Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72 2.7.2 Programmable
Digital Effects Filters in the AIC3104 Codec 72 2.8 Aliasing 78 2.8.1
Running the Program 83 2.9 Identifying the Frequency Response of the DAC
Using An Adaptive Filter 83 2.9.1 Running the Program 84 2.10 Analog Output
Using the STM32F407'S 12-BIT DAC 91 References 96 3 Finite Impulse Response
Filters 97 3.1 Introduction to Digital Filters 97 3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99 3.1.3 Definition of the
z-Transform 100 3.1.4 Properties of the z-Transform 108 3.1.5 z-Transfer
Functions 111 3.1.6 Mapping from the s-Plane to the z-Plane 111 3.1.7
Difference Equations 112 3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114 3.2 Ideal Filter Response
Classifications: LP, HP, BP, BS 114 3.2.1 Window Method of FIR Filter
Design 114 3.2.2 Window Functions 116 3.2.3 Design of Ideal High-Pass,
Band-Pass, and Band-Stop FIR Filters Using the Window Method 120 3.3
Programming Examples 123 3.3.1 Altering the Coefficients of the Moving
Average Filter 132 3.3.2 Generating FIR Filter Coefficient Header Files
Using MATLAB 137 4 Infinite Impulse Response Filters 163 4.1 Introduction
163 4.2 IIR Filter Structures 164 4.2.1 Direct Form I Structure 164 4.2.2
Direct Form II Structure 165 4.2.3 Direct Form II Transpose 166 4.2.4
Cascade Structure 168 4.2.5 Parallel Form Structure 169 4.3 Impulse
Invariance 171 4.4 Bilinear Transformation 171 4.4.1 Bilinear Transform
Design Procedure 172 4.5 Programming Examples 173 4.5.1 Design of a Simple
IIR Low-Pass Filter 173 Reference 216 5 Fast Fourier Transform 217 5.1
Introduction 217 5.2 Development of the FFT Algorithm with RADIX-2 218 5.3
Decimation-in-Frequency FFT Algorithm with RADIX-2 219 5.4
Decimation-in-Time FFT Algorithm with RADIX-2 222 5.4.1 Reordered Sequences
in the Radix-2 FFT and Bit-Reversed Addressing 224 5.5
Decimation-in-Frequency FFT Algorithm with RADIX-4 226 5.6 Inverse Fast
Fourier Transform 227 5.7 Programming Examples 228 5.7.1 Twiddle Factors
233 5.8 Frame- or Block-Based Programming 239 5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244 5.9 Fast Convolution 252 5.9.1 Running the
Program 256 5.9.2 Execution Time of Fast Convolution Method of FIR Filter
Implementation 256 Reference 261 6 Adaptive Filters 263 6.1 Introduction
263 6.2 Adaptive Filter Configurations 264 6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265 6.2.3 Noise Cancellation
265 6.2.4 Equalization 266 6.3 Performance Function 267 6.3.1 Visualizing
the Performance Function 269 6.4 Searching for the Minimum 270 6.5 Least
Mean Squares Algorithm 270 6.5.1 LMS Variants 272 6.5.2 Normalized LMS
Algorithm 272 6.6 Programming Examples 273 6.6.1 Using CMSIS DSP Function
arm_lms_f32() 280 Index 299
Preface xi
1 ARM® CORTEX® - M4 Development Systems 1
1.1 Introduction 1
1.1.1 Audio Interfaces 2
1.1.2 Texas Instruments TM4C123 LaunchPad and STM32F407 Discovery Development Kits 2
1.1.3 Hardware and Software Tools 6
Reference 7
2 Analog Input and Output 9
2.1 Introduction 9
2.1.1 Sampling, Reconstruction, and Aliasing 9
2.2 TLV320AIC3104 (AIC3104) Stereo Codec for Audio Input and Output 10
2.3 WM5102 Audio Hub Codec for Audio Input and Output 12
2.4 Programming Examples 12
2.5 Real-Time Input and Output Using Polling, Interrupts, and Direct Memory Access (DMA) 12
2.5.1 I2S Emulation on the TM4C123 15
2.5.2 Program Operation 15
2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16
2.5.5 Changing the Sampling Frequency 16
2.5.6 Using the Digital MEMS Microphone on the Wolfson Audio Card 20
2.5.7 Running the Program 21
2.5.8 Running the Program 23
2.5.9 DMA in the TM4C123 Processor 26
2.5.10 Running the Program 30
2.5.11 Monitoring Program Execution 30
2.5.12 Measuring the Delay Introduced by DMA-Based I/O 30
2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35
2.5.15 Measuring the Delay Introduced by DMA-Based I/O 35
2.5.16 Running the Program 46
2.6 Real-Time Waveform Generation 46
2.6.1 Running the Program 49
2.6.2 Out-of-Band Noise in the Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49
2.6.3 Running the Program 53
2.6.4 Running the Program 62
2.6.5 Running the Program 69
2.7 Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72
2.7.2 Programmable Digital Effects Filters in the AIC3104 Codec 72
2.8 Aliasing 78
2.8.1 Running the Program 83
2.9 Identifying the Frequency Response of the DAC Using An Adaptive Filter 83
2.9.1 Running the Program 84
2.10 Analog Output Using the STM32F407’S 12-BIT DAC 91
References 96
3 Finite Impulse Response Filters 97
3.1 Introduction to Digital Filters 97
3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99
3.1.3 Definition of the z-Transform 100
3.1.4 Properties of the z-Transform 108
3.1.5 z-Transfer Functions 111
3.1.6 Mapping from the s-Plane to the z-Plane 111
3.1.7 Difference Equations 112
3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114
3.2 Ideal Filter Response Classifications: LP, HP, BP, BS 114
3.2.1 Window Method of FIR Filter Design 114
3.2.2 Window Functions 116
3.2.3 Design of Ideal High-Pass Band-Pass and Band-Stop FIR Filters Using the Window Method 120
3.3 Programming Examples 123
3.3.1 Altering the Coefficients of the Moving Average Filter 132
3.3.2 Generating FIR Filter Coefficient Header Files Using MATLAB 137
4 Infinite Impulse Response Filters 163
4.1 Introduction 163
4.2 IIR Filter Structures 164
4.2.1 Direct Form I Structure 164
4.2.2 Direct Form II Structure 165
4.2.3 Direct Form II Transpose 166
4.2.4 Cascade Structure 168
4.2.5 Parallel Form Structure 169
4.3 Impulse Invariance 171
4.4 Bilinear Transformation 171
4.4.1 Bilinear Transform Design Procedure 172
4.5 Programming Examples 173
4.5.1 Design of a Simple IIR Low-Pass Filter 173
Reference 216
5 Fast Fourier Transform 217
5.1 Introduction 217
5.2 Development of the FFT Algorithm with RADIX-2 218
5.3 Decimation-in-Frequency FFT Algorithm with RADIX-2 219
5.4 Decimation-in-Time FFT Algorithm with RADIX-2 222
5.4.1 Reordered Sequences in the Radix-2 FFT and Bit-Reversed Addressing 224
5.5 Decimation-in-Frequency FFT Algorithm with RADIX-4 226
5.6 Inverse Fast Fourier Transform 227
5.7 Programming Examples 228
5.7.1 Twiddle Factors 233
5.8 Frame- or Block-Based Programming 239
5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244
5.9 Fast Convolution 252
5.9.1 Running the Program 256
5.9.2 Execution Time of Fast Convolution Method of FIR Filter Implementation 256
Reference 261
6 Adaptive Filters 263
6.1 Introduction 263
6.2 Adaptive Filter Configurations 264
6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265
6.2.3 Noise Cancellation 265
6.2.4 Equalization 266
6.3 Performance Function 267
6.3.1 Visualizing the Performance Function 269
6.4 Searching for the Minimum 270
6.5 Least Mean Squares Algorithm 270
6.5.1 LMS Variants 272
6.5.2 Normalized LMS Algorithm 272
6.6 Programming Examples 273
6.6.1 Using CMSIS DSP Function arm_lms_f32() 280
Index 299
1 ARM® CORTEX® - M4 Development Systems 1
1.1 Introduction 1
1.1.1 Audio Interfaces 2
1.1.2 Texas Instruments TM4C123 LaunchPad and STM32F407 Discovery Development Kits 2
1.1.3 Hardware and Software Tools 6
Reference 7
2 Analog Input and Output 9
2.1 Introduction 9
2.1.1 Sampling, Reconstruction, and Aliasing 9
2.2 TLV320AIC3104 (AIC3104) Stereo Codec for Audio Input and Output 10
2.3 WM5102 Audio Hub Codec for Audio Input and Output 12
2.4 Programming Examples 12
2.5 Real-Time Input and Output Using Polling, Interrupts, and Direct Memory Access (DMA) 12
2.5.1 I2S Emulation on the TM4C123 15
2.5.2 Program Operation 15
2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16
2.5.5 Changing the Sampling Frequency 16
2.5.6 Using the Digital MEMS Microphone on the Wolfson Audio Card 20
2.5.7 Running the Program 21
2.5.8 Running the Program 23
2.5.9 DMA in the TM4C123 Processor 26
2.5.10 Running the Program 30
2.5.11 Monitoring Program Execution 30
2.5.12 Measuring the Delay Introduced by DMA-Based I/O 30
2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35
2.5.15 Measuring the Delay Introduced by DMA-Based I/O 35
2.5.16 Running the Program 46
2.6 Real-Time Waveform Generation 46
2.6.1 Running the Program 49
2.6.2 Out-of-Band Noise in the Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49
2.6.3 Running the Program 53
2.6.4 Running the Program 62
2.6.5 Running the Program 69
2.7 Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72
2.7.2 Programmable Digital Effects Filters in the AIC3104 Codec 72
2.8 Aliasing 78
2.8.1 Running the Program 83
2.9 Identifying the Frequency Response of the DAC Using An Adaptive Filter 83
2.9.1 Running the Program 84
2.10 Analog Output Using the STM32F407’S 12-BIT DAC 91
References 96
3 Finite Impulse Response Filters 97
3.1 Introduction to Digital Filters 97
3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99
3.1.3 Definition of the z-Transform 100
3.1.4 Properties of the z-Transform 108
3.1.5 z-Transfer Functions 111
3.1.6 Mapping from the s-Plane to the z-Plane 111
3.1.7 Difference Equations 112
3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114
3.2 Ideal Filter Response Classifications: LP, HP, BP, BS 114
3.2.1 Window Method of FIR Filter Design 114
3.2.2 Window Functions 116
3.2.3 Design of Ideal High-Pass Band-Pass and Band-Stop FIR Filters Using the Window Method 120
3.3 Programming Examples 123
3.3.1 Altering the Coefficients of the Moving Average Filter 132
3.3.2 Generating FIR Filter Coefficient Header Files Using MATLAB 137
4 Infinite Impulse Response Filters 163
4.1 Introduction 163
4.2 IIR Filter Structures 164
4.2.1 Direct Form I Structure 164
4.2.2 Direct Form II Structure 165
4.2.3 Direct Form II Transpose 166
4.2.4 Cascade Structure 168
4.2.5 Parallel Form Structure 169
4.3 Impulse Invariance 171
4.4 Bilinear Transformation 171
4.4.1 Bilinear Transform Design Procedure 172
4.5 Programming Examples 173
4.5.1 Design of a Simple IIR Low-Pass Filter 173
Reference 216
5 Fast Fourier Transform 217
5.1 Introduction 217
5.2 Development of the FFT Algorithm with RADIX-2 218
5.3 Decimation-in-Frequency FFT Algorithm with RADIX-2 219
5.4 Decimation-in-Time FFT Algorithm with RADIX-2 222
5.4.1 Reordered Sequences in the Radix-2 FFT and Bit-Reversed Addressing 224
5.5 Decimation-in-Frequency FFT Algorithm with RADIX-4 226
5.6 Inverse Fast Fourier Transform 227
5.7 Programming Examples 228
5.7.1 Twiddle Factors 233
5.8 Frame- or Block-Based Programming 239
5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244
5.9 Fast Convolution 252
5.9.1 Running the Program 256
5.9.2 Execution Time of Fast Convolution Method of FIR Filter Implementation 256
Reference 261
6 Adaptive Filters 263
6.1 Introduction 263
6.2 Adaptive Filter Configurations 264
6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265
6.2.3 Noise Cancellation 265
6.2.4 Equalization 266
6.3 Performance Function 267
6.3.1 Visualizing the Performance Function 269
6.4 Searching for the Minimum 270
6.5 Least Mean Squares Algorithm 270
6.5.1 LMS Variants 272
6.5.2 Normalized LMS Algorithm 272
6.6 Programming Examples 273
6.6.1 Using CMSIS DSP Function arm_lms_f32() 280
Index 299
Preface xi 1 ARM® CORTEX® - M4 Development Systems 1 1.1 Introduction 1
1.1.1 Audio Interfaces 2 1.1.2 Texas Instruments TM4C123 LaunchPad and
STM32F407 Discovery Development Kits 2 1.1.3 Hardware and Software Tools 6
Reference 7 2 Analog Input and Output 9 2.1 Introduction 9 2.1.1 Sampling,
Reconstruction, and Aliasing 9 2.2 TLV320AIC3104 (AIC3104) Stereo Codec for
Audio Input and Output 10 2.3 WM5102 Audio Hub Codec for Audio Input and
Output 12 2.4 Programming Examples 12 2.5 Real-Time Input and Output Using
Polling, Interrupts, and Direct Memory Access (DMA) 12 2.5.1 I2S Emulation
on the TM4C123 15 2.5.2 Program Operation 15 2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16 2.5.5 Changing the
Sampling Frequency 16 2.5.6 Using the Digital MEMS Microphone on the
Wolfson Audio Card 20 2.5.7 Running the Program 21 2.5.8 Running the
Program 23 2.5.9 DMA in the TM4C123 Processor 26 2.5.10 Running the Program
30 2.5.11 Monitoring Program Execution 30 2.5.12 Measuring the Delay
Introduced by DMA-Based I/O 30 2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35 2.5.15 Measuring the Delay Introduced by
DMA-Based I/O 35 2.5.16 Running the Program 46 2.6 Real-Time Waveform
Generation 46 2.6.1 Running the Program 49 2.6.2 Out-of-Band Noise in the
Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49 2.6.3 Running the
Program 53 2.6.4 Running the Program 62 2.6.5 Running the Program 69 2.7
Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72 2.7.2 Programmable
Digital Effects Filters in the AIC3104 Codec 72 2.8 Aliasing 78 2.8.1
Running the Program 83 2.9 Identifying the Frequency Response of the DAC
Using An Adaptive Filter 83 2.9.1 Running the Program 84 2.10 Analog Output
Using the STM32F407'S 12-BIT DAC 91 References 96 3 Finite Impulse Response
Filters 97 3.1 Introduction to Digital Filters 97 3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99 3.1.3 Definition of the
z-Transform 100 3.1.4 Properties of the z-Transform 108 3.1.5 z-Transfer
Functions 111 3.1.6 Mapping from the s-Plane to the z-Plane 111 3.1.7
Difference Equations 112 3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114 3.2 Ideal Filter Response
Classifications: LP, HP, BP, BS 114 3.2.1 Window Method of FIR Filter
Design 114 3.2.2 Window Functions 116 3.2.3 Design of Ideal High-Pass,
Band-Pass, and Band-Stop FIR Filters Using the Window Method 120 3.3
Programming Examples 123 3.3.1 Altering the Coefficients of the Moving
Average Filter 132 3.3.2 Generating FIR Filter Coefficient Header Files
Using MATLAB 137 4 Infinite Impulse Response Filters 163 4.1 Introduction
163 4.2 IIR Filter Structures 164 4.2.1 Direct Form I Structure 164 4.2.2
Direct Form II Structure 165 4.2.3 Direct Form II Transpose 166 4.2.4
Cascade Structure 168 4.2.5 Parallel Form Structure 169 4.3 Impulse
Invariance 171 4.4 Bilinear Transformation 171 4.4.1 Bilinear Transform
Design Procedure 172 4.5 Programming Examples 173 4.5.1 Design of a Simple
IIR Low-Pass Filter 173 Reference 216 5 Fast Fourier Transform 217 5.1
Introduction 217 5.2 Development of the FFT Algorithm with RADIX-2 218 5.3
Decimation-in-Frequency FFT Algorithm with RADIX-2 219 5.4
Decimation-in-Time FFT Algorithm with RADIX-2 222 5.4.1 Reordered Sequences
in the Radix-2 FFT and Bit-Reversed Addressing 224 5.5
Decimation-in-Frequency FFT Algorithm with RADIX-4 226 5.6 Inverse Fast
Fourier Transform 227 5.7 Programming Examples 228 5.7.1 Twiddle Factors
233 5.8 Frame- or Block-Based Programming 239 5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244 5.9 Fast Convolution 252 5.9.1 Running the
Program 256 5.9.2 Execution Time of Fast Convolution Method of FIR Filter
Implementation 256 Reference 261 6 Adaptive Filters 263 6.1 Introduction
263 6.2 Adaptive Filter Configurations 264 6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265 6.2.3 Noise Cancellation
265 6.2.4 Equalization 266 6.3 Performance Function 267 6.3.1 Visualizing
the Performance Function 269 6.4 Searching for the Minimum 270 6.5 Least
Mean Squares Algorithm 270 6.5.1 LMS Variants 272 6.5.2 Normalized LMS
Algorithm 272 6.6 Programming Examples 273 6.6.1 Using CMSIS DSP Function
arm_lms_f32() 280 Index 299
1.1.1 Audio Interfaces 2 1.1.2 Texas Instruments TM4C123 LaunchPad and
STM32F407 Discovery Development Kits 2 1.1.3 Hardware and Software Tools 6
Reference 7 2 Analog Input and Output 9 2.1 Introduction 9 2.1.1 Sampling,
Reconstruction, and Aliasing 9 2.2 TLV320AIC3104 (AIC3104) Stereo Codec for
Audio Input and Output 10 2.3 WM5102 Audio Hub Codec for Audio Input and
Output 12 2.4 Programming Examples 12 2.5 Real-Time Input and Output Using
Polling, Interrupts, and Direct Memory Access (DMA) 12 2.5.1 I2S Emulation
on the TM4C123 15 2.5.2 Program Operation 15 2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16 2.5.5 Changing the
Sampling Frequency 16 2.5.6 Using the Digital MEMS Microphone on the
Wolfson Audio Card 20 2.5.7 Running the Program 21 2.5.8 Running the
Program 23 2.5.9 DMA in the TM4C123 Processor 26 2.5.10 Running the Program
30 2.5.11 Monitoring Program Execution 30 2.5.12 Measuring the Delay
Introduced by DMA-Based I/O 30 2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35 2.5.15 Measuring the Delay Introduced by
DMA-Based I/O 35 2.5.16 Running the Program 46 2.6 Real-Time Waveform
Generation 46 2.6.1 Running the Program 49 2.6.2 Out-of-Band Noise in the
Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49 2.6.3 Running the
Program 53 2.6.4 Running the Program 62 2.6.5 Running the Program 69 2.7
Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72 2.7.2 Programmable
Digital Effects Filters in the AIC3104 Codec 72 2.8 Aliasing 78 2.8.1
Running the Program 83 2.9 Identifying the Frequency Response of the DAC
Using An Adaptive Filter 83 2.9.1 Running the Program 84 2.10 Analog Output
Using the STM32F407'S 12-BIT DAC 91 References 96 3 Finite Impulse Response
Filters 97 3.1 Introduction to Digital Filters 97 3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99 3.1.3 Definition of the
z-Transform 100 3.1.4 Properties of the z-Transform 108 3.1.5 z-Transfer
Functions 111 3.1.6 Mapping from the s-Plane to the z-Plane 111 3.1.7
Difference Equations 112 3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114 3.2 Ideal Filter Response
Classifications: LP, HP, BP, BS 114 3.2.1 Window Method of FIR Filter
Design 114 3.2.2 Window Functions 116 3.2.3 Design of Ideal High-Pass,
Band-Pass, and Band-Stop FIR Filters Using the Window Method 120 3.3
Programming Examples 123 3.3.1 Altering the Coefficients of the Moving
Average Filter 132 3.3.2 Generating FIR Filter Coefficient Header Files
Using MATLAB 137 4 Infinite Impulse Response Filters 163 4.1 Introduction
163 4.2 IIR Filter Structures 164 4.2.1 Direct Form I Structure 164 4.2.2
Direct Form II Structure 165 4.2.3 Direct Form II Transpose 166 4.2.4
Cascade Structure 168 4.2.5 Parallel Form Structure 169 4.3 Impulse
Invariance 171 4.4 Bilinear Transformation 171 4.4.1 Bilinear Transform
Design Procedure 172 4.5 Programming Examples 173 4.5.1 Design of a Simple
IIR Low-Pass Filter 173 Reference 216 5 Fast Fourier Transform 217 5.1
Introduction 217 5.2 Development of the FFT Algorithm with RADIX-2 218 5.3
Decimation-in-Frequency FFT Algorithm with RADIX-2 219 5.4
Decimation-in-Time FFT Algorithm with RADIX-2 222 5.4.1 Reordered Sequences
in the Radix-2 FFT and Bit-Reversed Addressing 224 5.5
Decimation-in-Frequency FFT Algorithm with RADIX-4 226 5.6 Inverse Fast
Fourier Transform 227 5.7 Programming Examples 228 5.7.1 Twiddle Factors
233 5.8 Frame- or Block-Based Programming 239 5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244 5.9 Fast Convolution 252 5.9.1 Running the
Program 256 5.9.2 Execution Time of Fast Convolution Method of FIR Filter
Implementation 256 Reference 261 6 Adaptive Filters 263 6.1 Introduction
263 6.2 Adaptive Filter Configurations 264 6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265 6.2.3 Noise Cancellation
265 6.2.4 Equalization 266 6.3 Performance Function 267 6.3.1 Visualizing
the Performance Function 269 6.4 Searching for the Minimum 270 6.5 Least
Mean Squares Algorithm 270 6.5.1 LMS Variants 272 6.5.2 Normalized LMS
Algorithm 272 6.6 Programming Examples 273 6.6.1 Using CMSIS DSP Function
arm_lms_f32() 280 Index 299
Preface xi
1 ARM® CORTEX® - M4 Development Systems 1
1.1 Introduction 1
1.1.1 Audio Interfaces 2
1.1.2 Texas Instruments TM4C123 LaunchPad and STM32F407 Discovery Development Kits 2
1.1.3 Hardware and Software Tools 6
Reference 7
2 Analog Input and Output 9
2.1 Introduction 9
2.1.1 Sampling, Reconstruction, and Aliasing 9
2.2 TLV320AIC3104 (AIC3104) Stereo Codec for Audio Input and Output 10
2.3 WM5102 Audio Hub Codec for Audio Input and Output 12
2.4 Programming Examples 12
2.5 Real-Time Input and Output Using Polling, Interrupts, and Direct Memory Access (DMA) 12
2.5.1 I2S Emulation on the TM4C123 15
2.5.2 Program Operation 15
2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16
2.5.5 Changing the Sampling Frequency 16
2.5.6 Using the Digital MEMS Microphone on the Wolfson Audio Card 20
2.5.7 Running the Program 21
2.5.8 Running the Program 23
2.5.9 DMA in the TM4C123 Processor 26
2.5.10 Running the Program 30
2.5.11 Monitoring Program Execution 30
2.5.12 Measuring the Delay Introduced by DMA-Based I/O 30
2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35
2.5.15 Measuring the Delay Introduced by DMA-Based I/O 35
2.5.16 Running the Program 46
2.6 Real-Time Waveform Generation 46
2.6.1 Running the Program 49
2.6.2 Out-of-Band Noise in the Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49
2.6.3 Running the Program 53
2.6.4 Running the Program 62
2.6.5 Running the Program 69
2.7 Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72
2.7.2 Programmable Digital Effects Filters in the AIC3104 Codec 72
2.8 Aliasing 78
2.8.1 Running the Program 83
2.9 Identifying the Frequency Response of the DAC Using An Adaptive Filter 83
2.9.1 Running the Program 84
2.10 Analog Output Using the STM32F407’S 12-BIT DAC 91
References 96
3 Finite Impulse Response Filters 97
3.1 Introduction to Digital Filters 97
3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99
3.1.3 Definition of the z-Transform 100
3.1.4 Properties of the z-Transform 108
3.1.5 z-Transfer Functions 111
3.1.6 Mapping from the s-Plane to the z-Plane 111
3.1.7 Difference Equations 112
3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114
3.2 Ideal Filter Response Classifications: LP, HP, BP, BS 114
3.2.1 Window Method of FIR Filter Design 114
3.2.2 Window Functions 116
3.2.3 Design of Ideal High-Pass Band-Pass and Band-Stop FIR Filters Using the Window Method 120
3.3 Programming Examples 123
3.3.1 Altering the Coefficients of the Moving Average Filter 132
3.3.2 Generating FIR Filter Coefficient Header Files Using MATLAB 137
4 Infinite Impulse Response Filters 163
4.1 Introduction 163
4.2 IIR Filter Structures 164
4.2.1 Direct Form I Structure 164
4.2.2 Direct Form II Structure 165
4.2.3 Direct Form II Transpose 166
4.2.4 Cascade Structure 168
4.2.5 Parallel Form Structure 169
4.3 Impulse Invariance 171
4.4 Bilinear Transformation 171
4.4.1 Bilinear Transform Design Procedure 172
4.5 Programming Examples 173
4.5.1 Design of a Simple IIR Low-Pass Filter 173
Reference 216
5 Fast Fourier Transform 217
5.1 Introduction 217
5.2 Development of the FFT Algorithm with RADIX-2 218
5.3 Decimation-in-Frequency FFT Algorithm with RADIX-2 219
5.4 Decimation-in-Time FFT Algorithm with RADIX-2 222
5.4.1 Reordered Sequences in the Radix-2 FFT and Bit-Reversed Addressing 224
5.5 Decimation-in-Frequency FFT Algorithm with RADIX-4 226
5.6 Inverse Fast Fourier Transform 227
5.7 Programming Examples 228
5.7.1 Twiddle Factors 233
5.8 Frame- or Block-Based Programming 239
5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244
5.9 Fast Convolution 252
5.9.1 Running the Program 256
5.9.2 Execution Time of Fast Convolution Method of FIR Filter Implementation 256
Reference 261
6 Adaptive Filters 263
6.1 Introduction 263
6.2 Adaptive Filter Configurations 264
6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265
6.2.3 Noise Cancellation 265
6.2.4 Equalization 266
6.3 Performance Function 267
6.3.1 Visualizing the Performance Function 269
6.4 Searching for the Minimum 270
6.5 Least Mean Squares Algorithm 270
6.5.1 LMS Variants 272
6.5.2 Normalized LMS Algorithm 272
6.6 Programming Examples 273
6.6.1 Using CMSIS DSP Function arm_lms_f32() 280
Index 299
1 ARM® CORTEX® - M4 Development Systems 1
1.1 Introduction 1
1.1.1 Audio Interfaces 2
1.1.2 Texas Instruments TM4C123 LaunchPad and STM32F407 Discovery Development Kits 2
1.1.3 Hardware and Software Tools 6
Reference 7
2 Analog Input and Output 9
2.1 Introduction 9
2.1.1 Sampling, Reconstruction, and Aliasing 9
2.2 TLV320AIC3104 (AIC3104) Stereo Codec for Audio Input and Output 10
2.3 WM5102 Audio Hub Codec for Audio Input and Output 12
2.4 Programming Examples 12
2.5 Real-Time Input and Output Using Polling, Interrupts, and Direct Memory Access (DMA) 12
2.5.1 I2S Emulation on the TM4C123 15
2.5.2 Program Operation 15
2.5.3 Running the Program 16
2.5.4 Changing the Input Connection to LINE IN 16
2.5.5 Changing the Sampling Frequency 16
2.5.6 Using the Digital MEMS Microphone on the Wolfson Audio Card 20
2.5.7 Running the Program 21
2.5.8 Running the Program 23
2.5.9 DMA in the TM4C123 Processor 26
2.5.10 Running the Program 30
2.5.11 Monitoring Program Execution 30
2.5.12 Measuring the Delay Introduced by DMA-Based I/O 30
2.5.13 DMA in the STM32F407 Processor 34
2.5.14 Running the Program 35
2.5.15 Measuring the Delay Introduced by DMA-Based I/O 35
2.5.16 Running the Program 46
2.6 Real-Time Waveform Generation 46
2.6.1 Running the Program 49
2.6.2 Out-of-Band Noise in the Output of the AIC3104 Codec (tm4c123_sine48_intr.c). 49
2.6.3 Running the Program 53
2.6.4 Running the Program 62
2.6.5 Running the Program 69
2.7 Identifying the Frequency Response of the DAC Using Pseudorandom Noise 70
2.7.1 Programmable De-Emphasis in the AIC3104 Codec 72
2.7.2 Programmable Digital Effects Filters in the AIC3104 Codec 72
2.8 Aliasing 78
2.8.1 Running the Program 83
2.9 Identifying the Frequency Response of the DAC Using An Adaptive Filter 83
2.9.1 Running the Program 84
2.10 Analog Output Using the STM32F407’S 12-BIT DAC 91
References 96
3 Finite Impulse Response Filters 97
3.1 Introduction to Digital Filters 97
3.1.1 The FIR Filter 97
3.1.2 Introduction to the z-Transform 99
3.1.3 Definition of the z-Transform 100
3.1.4 Properties of the z-Transform 108
3.1.5 z-Transfer Functions 111
3.1.6 Mapping from the s-Plane to the z-Plane 111
3.1.7 Difference Equations 112
3.1.8 Frequency Response and the z-Transform 113
3.1.9 The Inverse z-Transform 114
3.2 Ideal Filter Response Classifications: LP, HP, BP, BS 114
3.2.1 Window Method of FIR Filter Design 114
3.2.2 Window Functions 116
3.2.3 Design of Ideal High-Pass Band-Pass and Band-Stop FIR Filters Using the Window Method 120
3.3 Programming Examples 123
3.3.1 Altering the Coefficients of the Moving Average Filter 132
3.3.2 Generating FIR Filter Coefficient Header Files Using MATLAB 137
4 Infinite Impulse Response Filters 163
4.1 Introduction 163
4.2 IIR Filter Structures 164
4.2.1 Direct Form I Structure 164
4.2.2 Direct Form II Structure 165
4.2.3 Direct Form II Transpose 166
4.2.4 Cascade Structure 168
4.2.5 Parallel Form Structure 169
4.3 Impulse Invariance 171
4.4 Bilinear Transformation 171
4.4.1 Bilinear Transform Design Procedure 172
4.5 Programming Examples 173
4.5.1 Design of a Simple IIR Low-Pass Filter 173
Reference 216
5 Fast Fourier Transform 217
5.1 Introduction 217
5.2 Development of the FFT Algorithm with RADIX-2 218
5.3 Decimation-in-Frequency FFT Algorithm with RADIX-2 219
5.4 Decimation-in-Time FFT Algorithm with RADIX-2 222
5.4.1 Reordered Sequences in the Radix-2 FFT and Bit-Reversed Addressing 224
5.5 Decimation-in-Frequency FFT Algorithm with RADIX-4 226
5.6 Inverse Fast Fourier Transform 227
5.7 Programming Examples 228
5.7.1 Twiddle Factors 233
5.8 Frame- or Block-Based Programming 239
5.8.1 Running the Program 242
5.8.2 Spectral Leakage 244
5.9 Fast Convolution 252
5.9.1 Running the Program 256
5.9.2 Execution Time of Fast Convolution Method of FIR Filter Implementation 256
Reference 261
6 Adaptive Filters 263
6.1 Introduction 263
6.2 Adaptive Filter Configurations 264
6.2.1 Adaptive Prediction 264
6.2.2 System Identification or Direct Modeling 265
6.2.3 Noise Cancellation 265
6.2.4 Equalization 266
6.3 Performance Function 267
6.3.1 Visualizing the Performance Function 269
6.4 Searching for the Minimum 270
6.5 Least Mean Squares Algorithm 270
6.5.1 LMS Variants 272
6.5.2 Normalized LMS Algorithm 272
6.6 Programming Examples 273
6.6.1 Using CMSIS DSP Function arm_lms_f32() 280
Index 299