Table of Contents

Preface
Chapter 1 Introduction to Real-Time Digital Signal Processing
1.1 Basic Elements of Real-Time DSP Systems
1.2 Analog Interface
1.2.1 Sampling
1.2.2 Quantization and Encoding
1.2.3 Smoothing Filters
1.2.4 Data Converters
1.3 DSP Hardware
1.3.1 DSP Hardware Options
1.3.2 DSP Processors
1.3.3 Fixed- and Floating-Point Processors
1.3.4 Real-Time Constraints
1.4 DSP System Design
1.4.1 Algorithm Development
1.4.2 Selection of DSP Processors
1.4.3 Software Development
1.4.4 High-Level Software Development Tools
1.5 Introduction to DSP Development Tools
1.5.1 C Compiler
1.5.2 Assembler
1.5.3 Linker
1.5.4 Other Development Tools
1.6 Experiments and Program Examples
1.6.1 Experiments of Using CCS and DSK
1.6.2 Debugging Programs Using CCS and DSK
1.6.3 File I/O Using Probe Point
1.6.4 File I/O Using C File System Functions
1.6.5 Code Efficiency Analysis Using Profiler
1.6.6 Real-Time Experiments Using DSK
1.6.7 Sampling Theory
1.6.8 Quantization in Analog-to-Digital Converters
References
Exercises

Chapter 2 Introduction to TMS320C55x Digital Signal Processor
2.1 Introduction
2.2 TMS320C55x Architecture
2.2.1 Architecture Overview
2.2.2 Buses
2.2.3 On-Chip Memories
2.2.4 Memory-Mapped Registers
2.2.5 Interrupts and Interrupt Vector
2.3 TMS320C55x Peripherals
2.3.1 External Memory Interface
2.3.2 Direct Memory Access
2.3.3 Enhanced Host-Port Interface
2.3.4 Multi-Channel Buffered Serial Ports
2.3.5 Clock Generator and Timers
2.3.6 General Purpose Input/Output Port
2.4 TMS320C55x Addressing Modes
2.4.1 Direct Addressing Modes
2.4.2 Indirect Addressing Modes
2.4.3 Absolute Addressing Modes
2.4.4 Memory-Mapped Register Addressing Mode
2.4.5 Register Bits Addressing Mode
2.4.6 Circular Addressing Mode
2.5 Pipeline and Parallelism
2.5.1 TMS320C55x Pipeline
2.5.2 Parallel Execution
2.6 TMS320C55x Instruction Set
2.6.1 Arithmetic Instructions
2.6.2 Logic and Bit Manipulation Instructions
2.6.3 Move Instruction
2.6.4 Program Flow Control Instructions
2.7 TMS320C55x Assembly Language Programming
2.7.1 Assembly Directives
2.7.2 Assembly Statement Syntax
2.8 C Language Programming for TMS320C55x
2.8.1 Data Types
2.8.2 Assembly Code Generation by C Compiler
2.8.3 Compiler Keywords and Pragma Directives

2.9 Mixed C-and-Assembly Language Programming
2.10 Experiments and Program Examples
2.10.1 Interfacing C with Assembly Code
2.10.2 Addressing Modes Using Assembly Programming
2.10.3 Phase-Locked Loop and Timers
2.10.4 EMIF Configuration for Using SDRAM
2.10.5 Programming Flash Memory Devices
2.10.6 Using McBSP
2.10.7 AIC23 Configurations
2.10.8 Direct Memory Access
References
Exercises

Chapter 3 DSP Fundamentals and Implementation Considerations
3.1 Digital Signals and Systems
3.1.1 Elementary Digital Signals
3.1.2 Block Diagram Representation of Digital Systems
3.2 System Concepts
3.2.1 Linear Time-Invariant Systems
3.2.2 The z-Transform
3.2.3 Transfer Functions
3.2.4 Poles and Zeros
3.2.5 Frequency Responses
3.2.6 Discrete Fourier Transform
3.3 Introduction to Random Variables
3.3.1 Review of Random Variables
3.3.2 Operations of Random Variables
3.4 Fixed-Point Representations and Quantization Effects
3.4.1 Fixed-Point Formats
3.4.2 Quantization Errors
3.4.3 Signal Quantization
3.4.4 Coefficient Quantization
3.4.5 Roundoff Noise
3.4.6 Fixed-Point Toolbox
3.5 Overflow and Solutions
3.5.1 Saturation Arithmetic
3.5.2 Overflow Handling
3.5.3 Scaling of Signals
3.5.4 Guard Bits
3.6 Experiments and Program Examples
3.6.1 Quantization of Sinusoidal Signals
3.6.2 Quantization of Audio Signals
3.6.3 Quantization of Coefficients
3.6.4 Overflow and Saturation Arithmetic
3.6.5 Function Approximations
3.6.5.1 Floating-Point C Implementation
3.6.5.2 Fixed-Point C Implementation
3.6.5.3 C55x Assembly Implementation
3.6.5.4 Practical Applications
3.6.6 Real-Time Digital Signal Generator Using DSK
3.6.6.1 Tone Generation Using Floating-Point C
3.6.6.2 Tone Generation Using Fixed-Point C
3.6.6.3 Random Number Generation Using Fixed-Point C
3.6.6.4 Random Number Generation Using C55x Assembly Language
3.6.6.5 Signal Generation Using C55x Assembly Language
References
Exercises

Chapter 4 Design and Implementation of FIR Filters
4.1 Introduction to FIR Filters
4.1.1 Filter Characteristics
4.1.2 Filter Types
4.1.3 Filter Specifications
4.1.4 Linear Phase FIR Filters
4.1.5 Realization of FIR Filters
4.2 Design of FIR Filters
4.2.1 Fourier Series Method
4.2.2 Gibbs Phenomenon
4.2.3 Window Functions
4.2.4 Design of FIR Filters Using MATLAB
4.2.5 Design of FIR Filters Using FDATool
4.3 Implementation Considerations
4.3.1 Quantization Effects in FIR Filters
4.3.2 MATLAB Implementations
4.3.3 Floating-Point C Implementations
4.3.4 Fixed-Point C Implementations
4.4 Applications: Interpolation and Decimation Filters
4.4.1 Interpolation
4.4.2 Decimation
4.4.3 Sampling Rate Conversion
4.4.4 MATLAB Implementations
4.5 Experiments and Program Examples
4.5.1 Implementation of FIR Filters Using Fixed-Point C
4.5.2 Implementation of FIR Filter Using C55x Assembly Language
4.5.3 Optimization for Symmetric FIR Filters
4.5.4 Optimization Using Dual-MAC Architecture
4.5.5 Implementation of Decimation
4.5.6 Implementation of Interpolation
4.5.7 Sample Rate Conversion
4.5.8 Real-Time Sample Rate Conversion Using DSP/BIOS and DSK
References
Exercises

Chapter 5 Design and Implementation of IIR Filters
5.1 Introduction
5.1.1 Analog Systems
5.1.2 Mapping Properties
5.1.3 Characteristics of Analog Filters
5.1.4 Frequency Transforms
5.2 Design of IIR Filters
5.2.1 Bilinear Transform
5.2.2 Filter Design Using Bilinear Transform
5.3 Realization of IIR Filters
5.3.1 Direct Forms
5.3.2 Cascade Forms
5.3.3 Parallel Forms
5.3.4 Realization of IIR Filters Using MATLAB
5.4 Design of IIR Filters Using MATLAB
5.4.1 Filter Design Using MATLAB
5.4.2 Frequency Transforms Using MATLAB
5.4.3 Design and Realization Using FDATool
5.5 Implementation Considerations
5.5.1 Stability
5.5.2 Finite-Precision Effects and Solutions
5.5.3 MATLAB Implementations
5.6 Practical Applications
5.6.1 Recursive Resonators
5.6.2 Recursive Quadrature Oscillators
5.6.3 Parametric Equalizers
5.7 Experiments and Program Examples
5.7.1 Floating-Point Direct-Form I IIR Filter
5.7.2 Fixed-Point Direct-Form I IIR Filter
5.7.3 Fixed-Point Direct-Form II Cascade IIR Filter
5.7.4 Implementation Using DSP Intrinsics
5.7.5 Implementation Using Assembly Language
5.7.6 Real-Time Experiments Using DSP/BIOS
5.7.7 Implementation of Parametric Equalizer
5.7.8 Real-Time Two-Band Equalizer Using DSP/BIOS
References
Exercises

Chapter 6 Frequency Analysis and Fast Fourier Transform
6.1 Fourier Series and Transform
6.1.1 Fourier Series
6.1.2 Fourier Transform
6.2 Discrete Fourier Transform
6.2.1 Discrete-Time Fourier Transform
6.2.2 Discrete Fourier Transform
6.2.3 Important Properties
6.3 Fast Fourier Transforms
6.3.1 Decimation-in-Time
6.3.2 Decimation-in-Frequency
6.3.3 Inverse Fast Fourier Transforms
6.4 Implementation Considerations
6.4.1 Computational Issues
6.4.2 Finite-Precision Effects
6.4.3 MATLAB Implementations
6.4.4 Fixed-Point Implementation Using MATLAB
6.5 Practical Applications
6.5.1 Spectral Analysis
6.5.2 Spectral Leakage and Resolution
6.5.3 Power Spectrum Density
6.5.4 Fast Convolution
6.6 Experiments and Program Examples
6.6.1 Floating-Point C Implementation of DFT
6.6.2 C55x Assembly Implementation of DFT
6.6.3 Floating-Point C Implementation of FFT
6.6.4 C55x Intrinsics Implementation of FFT
6.6.5 Assembly Implementation of FFT and inverse FFT
6.6.6 Implementation of Fast Convolution
6.6.7 Real-Time FFT Using DSP/BIOS
6.6.8 Real-Time Fast Convolution
References
Exercises

Chapter 7 Adaptive Filtering
7.1 Introduction to Random Processes
7.2 Adaptive Filters
7.2.1 Introduction to Adaptive Filtering
7.2.2 Performance Function
7.2.3 Method of Steepest Descent
7.2.4 The LMS Algorithm
7.2.5 Modified LMS Algorithms
7.3 Performance Analysis
7.3.1 Stability Constraint
7.3.2 Convergence Speed
7.3.3 Excess Mean-Square Error
7.3.4 Normalized LMS Algorithm
7.4 Implementation Considerations
7.4.1 Computational Issues
7.4.2 Finite-Precision Effects
7.4.3 MATLAB Implementations
7.4.4 C Implementations
7.5 Practical Applications
7.5.1 Adaptive System Identification
7.5.2 Adaptive Linear Prediction
7.5.3 Adaptive Noise Cancellation
7.5.4 Adaptive Notch Filters
7.5.5 Adaptive Channel Equalization
7.6 Experiments and Program Examples
7.6.1 Floating-Point C Implementation
7.6.2 Fixed-Point C Implementation of Leaky LMS Algorithm
7.6.3 ETSI Implementation of Normalized LMS Algorithm
7.6.4 Assembly Language Implementation of Delayed LMS Algorithm
7.6.5 Adaptive System Identification
7.6.6 Adaptive Prediction and Noise Cancellation
7.6.7 Adaptive Channel Equalizer
7.6.8 Real-Time Adaptive Line Enhancer Using DSK
References
Exercises

Chapter 8 Digital Signal Generators
8.1 Sinewave Generators
8.1.1 Lookup-Table Method
8.1.2 Linear Chirp Signal
8.2 Noise Generators
8.2.1 Linear Congruential Sequence Generator
8.2.2 Pseudo-Random Binary Sequence Generator
8.3 Practical Applications
8.3.1 Siren Generators
8.3.2 White Gaussian Noise
8.3.3 DTMF Tone Generator
8.3.4 Comfort Noise in Voice Communication Systems
8.4 Experiments and Program Examples
8.4.1 Sinewave Generator Using C5510 DSK
8.4.2 White Noise Generator Using C5510 DSK
8.4.3 Wail Siren Generator Using C5510 DSK
8.4.4 DTMF Generator Using the C5510 DSK
8.4.5 DTMF Generator Using MATLAB Graphical User Interface
References
Exercises

Chapter 9 Dual-Tone Multi-Frequency Detection
9.1 Introduction
9.2 DTMF Tone Detection
9.2.1 DTMF Decode Specifications
9.2.2 Goertzel Algorithm
9.2.3 Other DTMF Detection Methods
9.2.3.1 DTMF Detection Embedded in Noise Cancellation
      9.2.3.2 All-Pole Modeling Using LPC Coefficients
9.2.4 Implementation Considerations
9.3 Internet Application Issues and Solutions
9.4 Experiments and Program Examples
9.4.1 Implementation of Goertzel Algorithm Using Fixed-Point C
9.4.2 Implementation of Goertzel Algorithm Using C55x Assembly Language
9.4.3 DTMF Detection Using C5510 DSK
9.4.4 DTMF Detection Using All-Pole Modeling
References
Exercises

Chapter 10 Adaptive Echo Cancellation
10.1 Introduction to Line Echoes
10.2 Adaptive Echo Canceller
10.2.1 Principles of Adaptive Echo Cancellation
10.2.2 Performance Evaluation
10.3 Practical Considerations
10.3.1 Pre-Whitening of Signals
10.3.2 Delay Detection
10.4 Double-Talk Effects and Solutions
10.5 Nonlinear Processor
10.5.1 Center Clipper
10.5.2 Comfort Noise
10.6 Acoustic Echo Cancellation
10.6.1 Acoustic Echoes
10.6.2 Acoustic Echo Canceller
10.6.3 Subband Implementations
10.6.4 Delay-Free Structures
10.6.5 Implementation Considerations
10.6.6 Testing Standards
10.7 Experiments and Program Examples
10.7.1 Simulation Models
10.7.2. Acoustic Echo Cancellation Using Floating-Point C
10.7.3 Acoustic Echo Cancellation Using C55x Intrinsics
10.7.4 Experiment of Delay Estimation
References
Exercises

Chapter 11 Speech Coding Techniques
11.1 Introduction to Speech Coding
11.2 Overview of CELP Vocoders
11.2.1 Synthesis Filter
11.2.2 Long-Term Prediction Filter
11.2.3 Perceptual Based Minimization Procedure
11.2.4 Excitation Signal
11.2.5 Algebraic CELP
11.3. Overview of Some Popular CODECs
11.3.1 Overview of G.723.1
11.3.2 Overview of G.729
11.3.3 Overview GSM AMR
11.4 VoIP Applications
11.4.1 Overview of VoIP
11.4.2 Real-Time Transport Protocol and Payload Type
11.4.3 Example of Packing G.729
11.4.4 RTP Data Analysis Using Ethereal Trace
11.4.5 Factors Affect the Overall Voice Quality
11.5 Experiments and Program Examples
11.5.1 Calculating LPC Coefficients Using Floating-Point C
11. 5.2 Calculating LPC Coefficients Using C55x Intrinsics
11.5.3 MATLAB Implementation of Formant Perceptive Weighting Filter
11.5.4 Implementation of Perceptual Weighting Filter Using C55x Intrinsics
References
Exercises

Chapter 12 Speech Enhancement Techniques
12.1 Introduction to Noise Reduction Techniques
12.2 Spectral Subtraction Techniques
12.2.1 Short-Time Spectrum Estimation
12.2.2 Magnitude Subtraction
12.3 Voice Activity Detection
12.4 Implementation Considerations
12.4.1 Spectral Averaging
12.4.2 Half-Wave Rectification
12.4.3 Residual Noise Reduction
12.5 Combination of AEC with Noise Reduction
12.6 Voice Enhancement and Automatic Level Control
12.6.1 Voice Enhancement Devices
12.6.2 Automatic Level Control
12.7 Experiments and Program Examples
12.7.1 Voice Activity Detection
12.7.2 MATLAB Implementation of Noise Reduction Algorithm
12.7.3 Floating-Point C Implementation of Noise Reduction
12.7.4 Mixed C55x Assembly and Intrinsics
12.7.5 Combining AEC with Noise Reduction
References
Exercises

Chapter 13 Audio Signal Processing
13.1 Introduction
13.2 Basic Principles of Audio Coding
            13.2.1 Auditory Masking Effect for Perceptual Coding
13.2.2 Frequency Domain Coding
13.2.3 Lossless Audio Coding
13.3 Multi-Channel Audio Coding
13.3.1 MP3
13.3.2 Dobby AC-3
13.3.3 MPEG-2 AAC
13.4 Connectivity Processing
13.5 Experiments and Program Examples
13.5.1 Floating-Point Implementation of MDCT
13.5.2 Implementation of MDCT Using C55x Intrinsics
13.5.3 Experiments of Pre-Echo Effects
13.5.4 Floating-Point C Implementation of MP3 Decoding
References
Exercises

Chapter 14 Channel Coding Techniques
14.1 Introduction
14.2 Block Codes
14.2.1 Reed-Solomon Codes
14.2.2 Applications of Reed-Solomon Codes
      14.2.2.1 Compact Disc
      14.2.2.2 Infrared Wireless Audio
14.2.3 Cyclic Redundant Codes
14.3 Convolutional Codes
14.3.1 Convolutional Encoding
14.3.2 Viterbi Decoding
14.3.3 Applications of Viterbi Decoding
14.4 Experiments and Program Examples
14.4.1 Reed-Solomon Coding Using MATLAB
14.4.2 Reed-Solomon Coding Using Simulink
14.4.3 Verification of RS(255, 239) Generation Polynomial
14.4.4 Convolutional Codes
14.4.5 Implementation of Convolutional Codes Using C
14.4.6 Implementation of CRC-32
References
Exercises

Chapter 15 Introduction to Digital Image Processing
15.1 Digital Images and Systems
15.1.1 Digital Images
15.1.2 Digital Image Systems
15.2 RGB Color Spaces and Color Filter Array Interpolation
15.3 Color Spaces
15.3.1 YCbCr and YUV Color Spaces
15.3.2 CYMK Color Space
15.3.3 YIQ Color Space
15.3.4 HSV Color Space
15.4 YCbCr Sub-Sampled Color Spaces
15.5 Color Balance and Correction
15.5.1 Color Balance
15.5.2 Color Adjustment
15.5.3 Gamma Correction
15.6 Image Histogram
15.7 Image Filtering
15.8 Image Filtering Using Fast Convolution
15.9 Practical Applications
15.9.1 JPEG Standard
15.9.2 Two-Dimensional Discrete Cosine Transform
15.10 Experiments and Program Examples
15.10.1 YCbCr to RGB Conversion
15.10.2 Using CCS Link with DSK and Simulator
15.10.3 White Balance
15.10.4 Gamma Correction and Contrast Adjustment
15.10.5 Histogram and Histogram Equalization
15.10.6 2-D Image Filtering
      15.10.6.1 Fixed-Point C Implementation
      15.10.6.2 TMS320C55x Assembly Language Implementation
15.10.7 Implementation of DCT and IDCT
      15.10.7.1 Fixed-Point C Implementation
      15.10.7.2 Assembly Language Implementation
15.10.8 TMS320C55x Image Accelerator for DCT and IDCT
15.10.9 TMS320C55x Hardware Accelerator Image/Video Processing Library
References
Exercises

Appendix A Some Useful Formulas and Definitions
A.1 Trigonometric Identities
A.2 Geometric Series
A.3 Complex Variables
A.4 Units of Power
References

Appendix B Software Organization and List of Experiments

Index