C++ Algorithms for Digital Signal Processing, 2nd edition
Authors: Paul M. Embree, Kimble
Venue:  (1998)

From the Book:PREFACE: Preface This book is written with the conviction that two current trends in engineering and programming will continue in the foreseeable future and will become very closely related. The first trend is the rapidly growing importance of digital signal processing (DSP). Digital techniques have become the method of choice in signal processing as digital computers have increased in power, speed, and convenience and as powerful microprocessors have become more available. Some examples of the applications of DSP to engineering problems are: Radar signal processing such as: Synthetic aperture radar imaging Multitarget tracking Radar classification and identification Ultrasound and sonar signal processing such as: Doppler flow measurement Adaptive beam forming Image display and enhancement Image processing such as: Target recognition Pattern classification Robot vision Image compression and restoration Communications signal processing such as: Frequency hopped signal tracking Spread spectrum signal recovery Signal modulation and demodulation Adaptive equalization Geological signal processing such as: Formation identification Structure velocity estimation Speech signal processing such as: Short-time spectral analysis Speaker independent word recognition Phoneme identification Speech synthesis As DSP has engulfed signal processing, the C language is proving itself tobethe most valuable programming tool for real-time and computationally intensive software tasks. Due to the nature of DSP, this second trend is related in very important ways to the first. There are two broad areas of software applications in DSP: Applications where the software is used to simulate hardware Applications where the software is an end product in itself The C and C++ languages are reasonably high-level languages suitable for either of these areas. They have aspects of high-level languages that make them suitable for simulation work and still allow the engineer to produce code whose efficiency approaches that of assembly language for real-time applications. The C and C++ languages have significant advantages for DSP applications over other languages such as FORTRAN and Pascal. One important reason is the utility of C data structures and C++ objects for signal processing tasks. Also, the inherent modularity of C and C++ is a valuable asset in DSP programming. Digital signal processing repetitively uses a well-defined set of mathematical tools with small parameter variations. The ordering and tailoring of these algorithms to specific applications are the art of DSP. The C and C++ languages are constructed to encourage development of external library routines and objects that can be used as building blocks in the exact way required by DSP. Another reason the C++ language is a good choice for DSP is the popularity and widespread use of this language. Compilers are available for all popular microprocessors including 32-bit designs. In addition, many manufacturers of digital signal processing devices (such as Texas Instruments, AT&T, Motorola, and Analog Devices) provide C compilers for both 16-bit integer and 32-bit floating-point signal processing integrated circuits. The code produced by the best compilers is compact and efficient, and there are sufficient common features among compilers to allow portable code to be written if the standard ANSI C conventions are used. This allows the C code for DSP algorithms to be used directly in embedded real-time signal processing systems. All of the programs in this book are suitable for use with any standard ANSI C compiler on UNIX systems, IBM-PC platforms, and many real-time programming environments. Although C++ has not been the traditional language of real-time embedded systems programmers, it has been growing in popularity for application development and fast prototyping of designs. Not only does C++ allow the programmer to fully encapsulate the data with the methods that operate on the data, its inherent modularity makes it easy to write good code. Just one look at the C++ implementation of complex math operations in Chapter 5 or vectors and matrices in Chapter 6 should give the reader some idea about the power and flexibility the language offers. This book is constructed in such a way that it will be most useful to the professional engineer, student, and hobbyist who is familiar with both digital signal processing and programming but who is not necessarily an expert in both. This book is intended to be the ideal tool to help the reader in developing efficient, compact, and accurate programs for use in a particular DSP application. In addition, any reader who has the need to write DSP programs will be assisted by the combination of theory and actual working programs presented here. The book is useful for students of DSP and fast numerical techniques because of the numerous examples of efficient DSP algorithms and numerous exercises at the end of each chapter. The book can also serve as a quick source of debugged programs for the applications-oriented programmer who wishes to supplement an existing C or C++ library. For readers interested in a complete DSP software library, the programs presented in the text are available in a machine-readable form on the CD-ROM disk included with the book. C language versions of the C++ programs discussed in the text are also included on the CD-ROM for users of microprocessors that do not have C++ compilers available. The text is divided into several sections. Chapters 1 and 2 cover the basic principles to digital signal processing and C++ programming. Readers familiar with these topics may wish to skip one or both chapters. Chapter 3 covers basic use of the DSP programs, the data file formats, and user interface that will be used throughout the text. Chapters 4 and 5 cover basic one-dimensional digital signal processing techniques. Digital filtering is presented in Chapter 4, and frequency domain techniques are discussed in Chapter 5. Chapter 6 describes a C++ implementation of vectors and matrices that can be used for one-dimensional or two-dimensional signal processing. Chapter 7 discusses two-dimensional signal processing using algorithms described in Chapters 1. The CD-ROM disk included with the text contains source code for all of the DSP programs and DSP data associated with the examples discussed in this book. Appendix B and the file README.TXT on the disk provide more information about how to compile and run the programs. The programs are also precompiled and stored on the CD-ROM to allow the reader to try the un-modified examples on an IBM-PC platform without installing a C++ compiler. These programs have been tested using Microsoft Visual C++ version 4.2, 5.0 and 6.0 and on several UNIX platforms, but should work with most modern compilers that adhere to the ANSI C/C++ standards. Paul M. Embree Damon Danieli