Numerix Corporate Details  

Introduction To
Digital Signal Processing

  SigLib Library   Digital Filter Plus

Home Page | SigLib™ DSP Library | DFPlus™ Filter Designer | Applications Notes | DSP Technology Page

Digital Signal Processing (DSP) is the processing of real world (analog) signals with microprocessors. It is essentially the real-time execution of mathematical algorithms and is one of the fastest growing fields of technology and computer science in the world, with typically a growth rate in excess of 30%. The growth of the computer industry has affected every corner of daily life and everyone is aware of this effect. In today's western world almost everyone uses DSPs in their everyday life, but unlike users of PCs almost no one knows that they are using DSPs. Digital Signal Processors (DSPs) are special purpose microprocessors and they are used in every form of electronic product, from mobile phones, modems and CD players to the automotive industry; medical imaging systems to the electronic battlefield and from dishwashers to satellites.   Download this tutorial as PDF
This Tutorial

In order to be able to process real world signals they need to be converted to a format that the computers can understand (digital) this process is called analog to digital conversion and the reverse process is called digital to analog conversion. Although there is no definitive DSP system, the following diagram shows the configuration of a typical DSP system.

The following diagram shows the analog to digital conversion process, with the "real-world" analog signal being shown in blue and the digital representation shown in red. You will notice that the red line only matches the blue line at discrete points and these are called the sampling points. It is very important to take enough samples of the input so that it can be faithfully represented. The number of samples taken in one second is referred to as the sampling rate and a good rule-of-thumb is "the higher the sampling rate, the higher the cost of the system".

There are many reasons why we process these analog signals in the digital world (or domain) but these can all be reduced to two primary reasons, which are :

Cost - DSP systems are almost always cheaper than analog.
Functionality - DSP systems can perform many operations that are impossible in the analog world.

DSPs are used in many common consumer items, including :

ADSL Modems
Mobile phones
Medical Instrumentats
Hi-Fi Audio Equipment
Engine and Machine Management Systems

One of the most important algorithms for processing signals is the convolution operator, which is also known as the Finite Impulse Response (FIR) filter. Filters reduce (or attenuate) certain frequency bands within a signal and they are typically classified into four types : low-pass, high-pass, band-pass and band-stop (notch). Digital filters are used for a wide range of tasks, including :

Removing mains hum from a signal using a band stop filter
Equalizing the frequency response of a communications channel (e.g. telephone line)
Removing an echo from a communications channel (e.g. telephone line)
Enhancing medical images

The fundamental operations for the convolution operation are the multiplication and the accumulation (MAC) and these are the fundamental operations for all DSP operations. The operation is described mathematically by the following equation :

This is equivalent to the following flow diagram :

This flow diagram shows more clearly how the MAC operations are used together to produce the output. The digital input values are placed into the filter in the top left hand corner where they are multiplied by the first coefficient h0 and then all of the products (between data and coefficient values) are added together (accumulated) to generate the output. On subsequent sample periods the samples move down the delay line from left to right and then the next sequence of multiplications and accumulations (MACs) is performed. The blocks shown as z-1 delay each sample by one sample period so the overall delay is equal to the number of delay operators.

The ability to efficiently execute the MAC operator is another differentiator between a DSP and a general purpose micro-processor although the latter are used in many DSP applications.

The structure described above uses, what is described as, a feedforward structure. It is also possible to implement a similar structure with both feedforward and feedback data paths. When the filter includes feedback then it is referred to as an Infinite Impulse Response (IIR) filter i.e. even with the most basic input signal, the system will reverberate for ever. The end result of using feedback is that the output is dependent on all previous input values, where as the output of an FIR filter is only dependent on N coefficients, where N is the number of coefficients in the filter.

The mathematical equation and the structure of an IIR are shown in the following diagram :

Comparing FIR filters to IIR filters we see that FIR filters can have linear phase linear phase (in real-time), which means that all of the frequencies in a signal are delayed by a fixed number of cycles. Non-linear phase in feedback filters means that all of the different frequencies are delayed by different amounts, which can cause problems in certain applications. FIR filters also have low noise levels because the feedback in IIR filters will also feedback any quantisation noise, which leads to IIR filters potentially being unstable. The primary benefit of IIR filters is that, due to the effects of feedback, they typically provide sharper transition between the pass-band and stop-band and they can also provider higher levels of attenuation in the stop-band - for a given number of MAC cycles.

Before being able to use a digital filter, either FIR or IIR, it is necessary to design the coefficients for the filter. There are many tools for designing the coefficients and with most of these packages the user specifies the desired filter performance and the tools will generate a best fit coefficients a specified filter lentgh. The diagram below shows the requirements for specifying a low-pass filter and the criteria include :

The pass-band cut-off frequency (in Hz)
Stop-band cut-off frequency (in Hz)
The pass-band ripple (in dB)
The stop-band attenuation (in dB)

The number of coefficients (MACs) is dependent on the steepness of the roll-off between the pass-band and the stop-band and also the magnitudes of the ripple and the attenuation in the appropriate bands. The basic rule of digital filters is the more stringent the requirements, the more CPU MAC cycles will be required.

Frequency Domain Signal Processing

In many applications it is necessary to transform the signals from the time domain into the frequency domain so that the individual frequencies can be analyzed. The concept relies on the fact that any continuous waveform can be represented by the sum of a series of sine waves. This process is shown in the following diagram where the signal on the left is the sum of the two signals on the right hand side.

The algorithm for performing this task is called the Fourier transform, for which the continuous Fourier equation is shown below :

Through this equation, the time signal x(t) is transformed into the frequency domain coefficients X(w). Fourier has also defined a (very similar) reverse form, which transfers signals from the frequency domain back to the time domain.

While the continuous Fourier equation describes the operation, we need to translate it into a discrete (digital) equivalent that integrates over a finite numerical sequence, rather than an infinite sequence and will also give us a finite number of output frequencies, rather than an infinite number. The discrete equation replaces the continuous variable t with the discrete variable nT, where T is the sampling interval. The resulting discrete Fourier transform (DFT) is shown in the following diagram :

While this equation will provide the information that we are looking for, unfortunately, it is not very efficient to calculate. The solution is to use the fast Fourier transform (FFT) algorithm. You can read more about the Fourier transform and the fast Fourier transform in our Introduction To Frequency Domain Signal Processing.

This was a very quick overview of the DSP field, it is one of the most exciting and fastest moving fields in industry and Sigma Numerix Ltd.. is a world leader in supplying this technology. If you would like to know more then please contact us and we will be more than happy to assist you.

For those who are looking for an intensive training course in the subject then we thoroughly recommend the University of Oxford Summer Engineering Program For Industry. For further reading on the subject of DSP, the complete The Scientist and Engineer's Guide to Digital Signal Processing is available on-line. For those who are looking to learn DSP through hands-on programming with almost any ANSI C compiler then the SigLib DSP Library is a great place to start. For more details about digital filters then the following introduction is a great place to start :

Return To Home Page | SigLib DSP Library | DFPlus™ Filter Designer | Applications Notes | DSP Technology Page

If you have any comments or questions please email Numerix :
Copyright 2018, Sigma Numerix Ltd.. Permission is granted to create WWW pointers to this document. All other rights reserved. All trademarks acknowledged.