Chapter Contents


10.0 Digital Signal Processing


10.1 Digital Filters

10.1.1 Difference Equations

10.1.2 Z Transforms

10.1.3 FIR Filters

10.1.4 Impulse Response Design

10.1.5 Windowing

10.1.6 IIR Filters

10.1.7 Laplace Transform

10.1.8 Impulse Response

10.1.9 Higher Order Filters

10.1.10 Design by Synthesis:


10.2 Convolution

10.2.1 Zero Forcing Equalizer


Review Questions


For Further Research





10.0 Digital Signal Processing



This section will:

·         Review some basic digital filter theory

·         Examine FIR filters

·         Examine IIR filters

·         Show how to design a digital filter using the impulse response

·         Introduce convolution


The first demonstration of a simple DSP device was in the 1930’s, but the first commercial programmable device didn’t come on the market until 1979. Since then DSP has revolutionized communications systems design and applications.

DSP has several significant advantages over traditional analog technology:

·         Size and cost of digital ICs is falling

·         Compatible with other digital technologies: transmission, switching, computers

·         Can be programmable

·         Stable and accurate

·         Increased functionality

There are however some disadvantages. Since DSPs can perform more complex functions than other techniques, circuit designers need a good grasp of mathematics. Unfortunately, there are relatively few user-friendly development and debugging tools.

A Simple DSP System

From the above diagram, it should be evident that a telephony PCM codec is a DSP system.

In order to run real time applications, the DSP processor must be able to execute all of its functions within one sampling period of the input filters. Some applications, such as real time video processing are beyond the state of current technology. However, there are slow scan or stop motion video applications, which are receiving a great deal of attention.

Applications can be categorized by the time it takes to produce a useful result. Real time applications such as telephony, require the processing to take milliseconds or less. Near real-time applications may take seconds to respond, while others may take minutes, hours or even days.

Run Time


Real Time

Telephony [codecs, cellular phones]

Consumer audio [CDs, DAT, toys]

Medical [ECG]

Multimedia [video compression]

Radar signal processing

Near Real Time

Adaptive equalizers

Medical [CAT scan]

Cruse missile guidance

Voice & pattern recognition [machine vision]

Long Time

Satellite & deep space imaging


10.1   Digital Filters


Digital filters may be realized in hardware, software, or more often in firmware. Except for the most complex applications, they tend to be more expensive than analog filters, but they may be able to do things that analog filters cannot. Digital filters can be classified according to a wide range of characteristics, not all of which are mutually exclusive.



Impulse Response




Serial or cascade









First, second, etc.


Analog filters are most often categorized by their frequency response, while digital filters are generally categorized by their time response, specifically, their impulse response.

When a FIR filter is excited by an impulse, it generates a finite number of output values. This means that the output eventually decays to zero when the input is removed.

When an IIR filter is excited by an impulse, it produces an infinite number of output values. This means that the output may not decay to zero when the input is removed.

This division is based on the circuit response to an impulse and is quite mathematical in nature. A more familiar division, for analog filter designers, is whether the filter has any feedback elements. FIR filters don’t.

10.1.1  Difference Equations

An nth order linear difference equation with constant coefficients can be written as:

The difference equation is normalized by setting b0 equal to one [b0 = 1]. In closed form the equation when solved for the output y(k) is written:

These terms can be interpreted as follows:

bj y(k - j) is the output at any given instant in time

aj x(k - j) is the input at any given instant in time

The coefficient a and b represent the amplitudes

The notation (k - j) represents the next sampling instant. This can also be interpreted as a delay equal to the sample period.

In the most general case, there is no need to assume that there will be an equal number of a and b coefficients.

10.1.2  Z Transforms

Another notation, which is used to describe a unit delay, is z-1. This notation forms the bases of Z or discrete time transforms. Most texts use small letters to describe signals in the discrete time domain, and capital letters to describe them in the Z domain.

The Z transform of the open form difference equation is:

The closed forms are given by:

Solving for the transfer function:

Z transformed expressions in this form can be directly implemented as digital filters. Terms in the numerator correspond to zeros and those in the denominator to poles.

For the sake of analysis, the sampling rate can be normalized with respect to the incoming analog signal. Consequently, digital filter coefficients are functions of normalized frequencies and only the number of coefficients in a given period is important. Thus by changing the sampling rate in a digital filter, its frequency response characteristics can be shifted, thus supporting zooming and multirate filtering.

10.1.3  FIR Filters

The general expression for a FIR filter output is:


This filter does not employ feedback in the traditional sense, does not contain any poles and cannot oscillate. When an impulse is applied at the input, there are a finite number of output values. It is also known as a non-recursive filter. Some of its chief characteristics are:

·         High stability

·         Low round-off noise

·         Can have linear phase

·         Can be adaptive

·         Use more components than IIR filters

·         May be easy to understand, design, and implement   Direct Form

The direct form is the simplest of the FIR filters. It has no poles, and is stable.

The series Z-1 elements are often implemented as shift registers or memory locations. The balance of the circuit is a multiplying accumulator.

A sort of feedback can be incorporated to make this filter adaptive. The output can be compared to a reference pattern and used to generate an error signal. This is can be used to modify the filter coefficients dynamically. An example of such a device is the zero forcing equalizer. Note that using coefficient feedback does not convert this FIR filter into an IIR filter.

Digital filters are often designed by converting either an existing analog circuit of transfer function into the time or Z domain. Alternatively, one may start from the desired passband. Starting from an analog circuit is somewhat difficult, since analog filters have poles whereas a FIR filter does not.   Moving Average Filter

The RC integrator is a simple low pass filter, which requires recursive techniques to be implemented digitally. However, there are similar functions that can be performed by non-recursive methods. One of these is a moving average filter, which is a type of integrator or LPF. To average n events or samples, n - 1 delays and a multiplier is required.  Since each coefficient in this example is the same, only one multiplier need be used. The multiplier coefficient is set to 1/n.

Example 10-1:        A 7-day moving average FIR filter.

Since all of the coefficients in this filter are the same, the multiplier can be places after the summer. Thus only one multiplication need be performed.

This device might, sample the maximum temperature for each day of the week and calculate the average over the past 7 days. Alternatively, it may be clocked at a high rate and used to reduce the effects of some random noise in a signal.

If the input is set to 1, the transfer function of this filter can easily be written in the Z domain:

From math tables, we note that this result can be transformed into the S domain by the relation:


From here it is possible to obtain the frequency response by letting s = jw  and plotting the magnitude of the result over the interval . The result is a low pass filter as might be expected.

MathCAD Moving Average Simulation

The low pass characteristic is more readily observed when zooming in on the response.

10.1.4  Impulse Response Design

Ideal low pass filters are impossible to fabricate, but a reasonable approximation can be made for some applications.

To design this type of filter:

·         Determine the desired frequency response

·         Calculate the impulse time response by taking the real part of the inverse Fourier transform of the frequency response

·         Select the desired number of time delay taps [the more taps, the more faithful the reproduction]

·         Use the calculated values as the FIR filter coefficients

Example 10-2:        an ideal low pass filter

The passband response resembles:

The impulse response is found by taking the inverse Fourier transform.

This can be simplified by applying Euler’s identity:


The real part of the result is given by:

If we recognize  , and normalize the frequency to 1, we obtain:

MathCAD Sinc Pulse Simulation


Since this function is normalized, when time = 1:          

To exactly reproduce this response with a FIR filter, an infinite number of coefficients and delay elements would be needed since the function stretches to infinity. Using an infinite number of delays also implies that the output signal would never emerge! So compromises must be made.

For the sake of this example, we’ll arbitrarily choose 10 delay elements in the interval -1 < t < 1, then 11 values of the function must be determined [5 on either side of the center]. The delay element is therefore  seconds. The values of f(t) become the coefficients for the FIR filter.





- 0.1892


- 0.1559












- 0.1559


- 0.1892




This can be implemented as:

Note that this is a particularly poor implementation, since both the first and last coefficients are exactly zero and could therefore be dispensed with. The impulse response for this circuit is:

This is a crude approximation of the desired response. Nevertheless, since the impulse response is the somewhat the same, the frequency response is similar:

MathCAD FIR Filter Response

In order to improve the spectral response of this type of filter, windowing techniques are often employed.

10.1.5  Windowing

Applications Notes\ADC DAC\Windowed Sampling.pdf

A time domain window is the period during which a given signal is being processed. Since signals can only be observed for finite time intervals, the frequency is distorted by the sinc function associated with the rectangular window.

Applying a time domain window function involves performing a time domain multiplication of the filter function and window. In the frequency domain, this is manifest as a convolution. The essential steps in using windows to design a FIR filter are:

·         Specify the desired filter response in the frequency domain

·         Take the inverse Fourier transform to get the time domain equivalent

·         Apply the window function to obtain the FIR coefficients

·         Apply the Fourier transform to convert back to the frequency domain

·         Check to see if the result is good enough, if not, try again

Choosing the best window function is somewhat of an art, and performing the inverse Fourier transforms is not easy. For these reasons, CAD design tools have been developed to help the filter designer.   CAD Techniques

The Remez exchange algorithm is often used to design filters. The criteria for determining FIR filter coefficients is based on minimizing the maximum errors in the specified pass and stop bands. Several iterations are performed to find the best fit polynomial, using standard Lagrange interpolation techniques.

The key parameters which the designer must provide for such programs includes:

fp - passband cutoff frequency

fs - stopband cutoff frequency

Df - transition width

d1 - passband ripple

d2 - stopband ripple

20 log(1 + d1 ) - passband ripple in dB

20 log(1 + d2 ) - stopband ripple in dB

d1/d2 - ripple ratio

The user can often specify the number of taps or delay elements in the filter, or let the program determine a suitable value.

10.1.6  IIR Filters

The general expression for an IIR filter is given by:

This function can be directly implemented in the following form:

The filter transfer function in the Z domain is given by:

This filter has an infinite number of non-zero outputs when stimulated by an impulse, and is known as a recursive filter. The output value is determined by the present and past values of the input and the past values of the output. Some of its characteristics include:

·         Potential instability

·         May accumulate round-off noise

·         Non-linear phase characteristics

·         Feedback

·         Greater efficiency than FIR filters

IIR filters can be designed by transformation or by CAD. Since the mathematics for all but the simplest filters becomes quite complex, most designs are done by CAD techniques. Never the less, it is beneficial to gain some insight in the manual methods for simple filters.

Invariably one starts with an S domain transfer function, and maps it to the Z domain. There are two popular mapping techniques currently in use:

   Impulse invariant transformation - the impulse response is determined and duplicated.

   Bilinear transformation - the digital filter duplicates the differential equation characterizing the analog filter.   Design by Transformation

The transformation method, requires the following steps:

·         Design an analog filter

·         Derive the Laplace Transform

·         Convert to the Z domain

·         Apply a Z transformation [i.e. a Bilinear Transformation]

·         Solve for the digital coefficients

This approach is good only for very simple filters, and introduces a measure of distortion. Two popular transformations are used to map from the S domain to the Z domain:

·         Impulse invariant transform

·         Bilinear transform

The term mapping is used to describe the process of transforming from one domain to another. This is quite appropriate if we consider the graphical representation of the two planes.   Impulse Invariant Mapping

The left hand side of the S plane maps within the unit circle on the Z plane. A distance of ± fs/2 form the horizontal axis in the S plane, wraps once around the circle in the Z plane.   Bilinear Mapping

The bilinear transform maps the entire left side of the S plane into the unit circle on the Z plane. This is a better way to implement LPFs in the digital domain. Analog filters do not degenerate from aliasing and neither do bilinear mapped LPFs since the mapping is not cyclical.

An RC low pass network is a very simple circuit, and it is quite easy to design a digital equivalent.

The transfer function for this circuit can be written as:

The frequency response can be normalized in terms of the resonant or corner frequency. This allows us to compare the response of any simple network, regardless of the actual component values.

From this we obtain the following response:

10.1.7  Laplace Transform

The Laplace transform allows complex calculus expressions to be reduced to algebraic expressions for easier manipulation. The circuit can be transformed by means of the Laplacian operator, as follows:

The output of this circuit in the S domain is determined by applying the voltage divider rule:

The S domain transfer function is given by:

This expression can be converted to the time domain by taking the Inverse Laplace Transform. From the tables we notice that:


10.1.8  Impulse Response

The impulse response is found by applying a delta [d] function to the input:

The Laplace transform of the d pulse is 1. Therefore, in the S domain, the input corresponds to:

and the output is the same as the transfer function:

As a result, the time domain response of a transfer function occurs when a delta pulse excites a circuit.

The output when the impulse strikes at t = 0, is the inverse of the RC time constant and is generally quite large. In order to compare the response of various circuits, this output excursion is usually normalized to 1.

The Z domain is the digital equivalent of the time domain. Whereas time domain is continuous, the Z domain is discrete. From the Z transform tables we note that:

As a result, the impulse response in the S domain can be translated into the Z domain:

The output magnitude is dependent upon the ratio 1/RC just as it was in the time domain. Consequently, the output function is normalized. This is generally done by evaluating the transfer function when z = 0 and then dividing the un-normalized transfer function by the result.

For the purposes of explanation, we shall assume some arbitrary component values.

Let’s use as an example:

Analog:          R = 10 KW                             C = .01 µfd

Digital:           100 K samples per Sec         Sampling time T = 10 mSec

The transfer function for this circuit can be written as:

The normalized analog frequency response allows us to compare the response with a normalized digital filter.

Substituting the above values for R, C, and T into the Z domain expression, we obtain:

This can be implemented as:

The term Z-1 corresponds to a unit delay. In this example, the unit delay will be the sampling period of 10 mSec. The output from the digital filter can therefor be calculated by means of the following equation:

The resulting normalized frequency response is:

It would appear that the analog and digital responses are identical however, they are not.

A phenomenon known as wrap around occurs in digital filters when the input frequency approaches the sampling rate. In this particular example, the sampling rate was 100 K samples per second or 628 K radians per second.

A single pole filter using the bilinear transform

MathCAD Bilinear Transform


The bilinear transformation uses the following substitution:

Recall that the circuit transfer function for this example is:

Taking the bilinear transformation, we obtain:

Notice that this expression does not have to be normalized since it equals one when Z = 1.

Plugging in the values for R, C, and T into this expression, we obtain:

This can be implemented as:

Another way to arrive at the same result is by applying Euler’s approximation to rewrite differential equations as difference equations.

A single pole filter by using Euler’s Approximation

This method requires transforming differential equations into difference equations. Difference equations are an algebraic approximation of differential equations.

The current in the capacitor is given by:

Writing Kirchoff’s voltage law around the loop we obtain:

The derivative can be evaluated by using Euler’s differential approximation:

Solving for Vo[n] we obtain:

The transfer function for this circuit can be written in the Z domain as:

For the same values of R, C, and T, we obtain:

These values are very similar to those found in example 3. Consequently, the implementation is the same.

A single pole filter using another transform

The S domain form of the transfer function can also be converted to the Z domain by making the following substitution:

Recall that the z1 term can be interpreted as a delay equal to the sampling period T. Therefore:

Collecting all of the Z terms to the right hand side, we obtain:

Solving for Vo, we obtain:

This expression is identical to the one derived previously.

Alternate Configuration

There are often several ways to implement the same filter response. Another configuration, which emulates a simple RC network, is:

This circuit can easily be characterized by placing a step function at the input.

If the input is a step function starting at n = 1, then:

Since the filter is causal [the output cannot anticipate the input], , then:

If ab<1, then this filter arrangement has a response similar to a simple RC network:

or in terms of a sampled network:

Applying a step function to a simple RC circuit, we obtain:

For the same values of R, C, and T, we obtain the coefficients a & b:



And since ,                 therefor  and

    Consequently  and

These are the coefficients needed to make the filter work.

Creating digital filters by trial and error is quite unsatisfactory, and therefore more rigorous methods have been developed.

10.1.9  Higher Order Filters

The discrete transfer function form:

can be used to implement digital filters directly by inspection.   Direct form 1 implementation:   Direct form 2 implementation:

As the transfer function order increases, the coefficient sensitivity also increases. To overcome this phenomenon, complex transfer functions are often decomposed into series [cascade] or parallel, first and second order segments.

A first order section can be written:

and implemented as:

A second order section can be written:

and implemented as:   Cascade Realizations

It is not practical to design high order filters as a single unit. It is more practical to decompose a complex transfer function into second order sums and products. A complex transfer function can often be decomposed into products:

and implemented as:

Each block [H] represents a second order component of the overall function.   Parallel Realizations

In some cases, it is more practical to decompose the complete function into a series of sums.

and implemented as:

One simple application for this type of network is a graphic equalizer. Each functional filter block can be a digital band pass filter designed to respond to a specific frequency band.

10.1.10            Design by Synthesis:

The biquad is the preferred building block used to design digital filters by computer.

·         A CAD method

·         Coefficients and structure are optimized for a specific performance

·         Biquads are the preferred structure due to mathematical considerations [but minimizes the number of biquads]

The transfer function for the biquad if b0 =1 is given by:

To evaluate the frequency response, let . Butterworth LPF Design

Digital Filters can be designed from tables of various coefficients. One of the most common of these is based on the Butterworth function. The Butterworth response is also called maximally flat. The normalized amplitude response of an nth order filter of this type is given by:

Coefficients of Butterworth Polynomials


































































Factors of Butterworth Polynomials


Factored Polynomial




s2+1.4142s +1


(s+1)(s2+s +1)


(s2+0.7654s +1)(s2+1.8478s +1)


(s+1)(s2+0.6180s +1)(s2+1.6180s +1)


(s2+0.5176s +1)(s2+1.4142s +1)(s2+1.9319s +1)


(s+1)(s2+0.4450s +1)(s2+1.2470s +1)(s2+1.8019s +1)


(s2+0.3902s +1)(s2+1.1111s +1)(s2+1.6639s +1)(s2+1.9616s+1)


(s+1)(s2+0.3473s +1)(s2+s +1)(s2+1.5321s +1)(s2+1.8794s +1) 3rd Order Butterworth LPF

Design a Butterworth LPF where the sampling frequency is 15 times the cutoff frequency[1] .


but                         where T is the sampling rate.

If the cutoff frequency is normalized to unity:               


From the table of coefficients, the LPF transfer function can be written as:

Or from the factored polynomial table it can be written as:

In order to transform this expression into the Z domain, it is necessary to write this function in the form:

and then break it up by the process of partial fractions:

It is obvious that: a = 1 and that the b and c terms can be found by using the quadratic formula:


Finding the coefficients A, B, and C is relatively straightforward. The process involves making substitutions for s such that only one coefficient remains in the equation.

To find A, let s = -a:

To find B, let s = -b:

To find C, let s = -c:

Putting it all together, we obtain:

This expression can now readily be converted to the time domain to give the impulse response, or to the Z domain to create a digital filter.

The impulse response can be determined by applying the following Laplace transform:


The S domain function can also be transformed into the Z domain by the following transform:


At this point, the partial fraction expansion must now be converted back to a single fraction in order to be readily implemented as a digital filter. This is a very straightforward but tedious process.

Substituting the calculated values of a, b, c, A, B, C, and T into the above expression yields:

Dividing numerator and denominator by the highest order Z exponent [z3] yields the standard form:

The frequency response of this filter is:

10.2   Convolution

The time and frequency domains are related by the Fourier transform. There is also a correspondence between operations performed in each domain. For example, multiplication performed in one domain corresponds to convolution in the other.

From the above illustration, it is apparent that the frequency content of a gated sinewave or tone burst can be derived by two basic methods:

·         Multiply the two time domain functions together and take the Fourier transform of the result.

·         Convolve the two frequency domain functions

It depends entirely on the application as to whether it is more practical to perform the multiplication or the convolution. It is not possible to perform frequency domain multiplication directly in the digital domain, but it is possible to perform a convolution and then apply the appropriate transform to get back to the right domain.

The term convolution means ‘folding back’. One way to think of the instantaneous response of a system it as a succession of individual responses, each of which is affected by what has happened before.

Since the Fourier Transform of the impulse response of a system completely characterizes the system, it is the ideal function to use as the bases for performing a convolution.

If a system responds to an impulse in some predictable fashion:

Then the response to any arbitrary input is composed of the individual responses:

Each successive input stimulus causes an output response. As successive inputs come closer together, the output responses start to pile up. The total output response becomes the sum of each current response plus whatever response is left over from the previous stimulus. Notice that each successive output interacts with the previous response, backwards. If the input is a continuous function, the output can be determined by summing, or integrating, the product of the input signal and the time reversed impulse response.

This seems at first to be an indefensible proposition, but perhaps a worked example might illustrate. Let’s say that the impulse response in some system is given by:

A Hypothetical

Impulse Response












If this system gets excited by a pulse:

Each component will initiate this response, and the total output will be the sum of the individual responses. The product of any two signals can be determined by a sample-by-sample multiplication:

The convolution of two signals is found by computing the sum products:

This can be seen in the following illustration:

Notice how the output response is built-up:


















From the above table, we note that the input function X(n) is incrementing in n while H(n) is decrementing in n. It is for this reason, that the convolution is the integral or sum of the product of the forward input function and the reverse of the transfer function.

This means that all filters whether analog or digital, perform time domain convolutions and frequency domain products.

Recall that at the beginning of this discussion, a FIR filter was designed to emulate a brick wall response:

The impulse response of this system is:

A FIR filter approximating this response is:

This filter is performing a convolution. In order to convert the time domain output response back to the frequency domain, it is only necessary to perform the inverse Fourier transform.

A convolution can also be done with an IIR filter by inverting the impulse response and integrating it with the input sequence. This inte­gration process can be implemented as a summer.

This can be implemented as:

Note that the response of this filter is identical to step function response.














































In this implementation requires a single delay element and multiplication thus reducing the throughput delay. However, what was once a constant coefficient has now changed to a sequence of values, thus requiring more memory. It should also be evident that some sort of synchronization is required in order to make any sense of the output.

10.2.1  Zero Forcing Equalizer

One of the main uses for a FIR filter is to restore a distorted received signal to something closer to its original transmitted shape.

Review Questions


Quick Quiz

1.     Give 4 reasons why DSP chips are gaining popularity over traditional analog devices.

a) _______________________________________________________

b) _______________________________________________________

c) _______________________________________________________

d) _______________________________________________________

2.     What two mapping techniques are most commonly used in designing low pass digital filters?

a) _______________________________________________________

b) _______________________________________________________

3.     Identify the following circuit:

Circuit: ____________________________________________________

4.     What is the fundamental difference between direct form 1 and 2 IIR filters?




5.     Multiplication in the time domain corresponds to _______________ in the frequency domain.

Analytical Problems

1.     Design a simple recursive filter using Euler’s Approximation to emulate a single pole network with R = 2.5 KW and C = .01µfd

2.     Given that the impulse response of an RC network in the S domain is:


        Design an equivalent digital filter by applying the bilinear transform.

3.     Given the sketch for the biquad, derive the following transfer function when b0 =1:

Composition Questions

1.     What is a recursive filter?

2.     What are some of the advantages and disadvantages of a digital filter?

3.     What is a FIR filter?

For Further Research


Helgert Hermann J, Integrated Services Digital Networks, Addison-Wesley, New York, (1991)

Higgins Richard J, Digital Signal Processing in VLSI, Prentice-Hall, 1990

Jackson Leland B, Digital Filters and Signal Processing, Kluwer Academic Publishers, Boston, 1986

Lam Harry Y F, Analog and Digital Filters: Design and Realization, Prentice-Hall, 1979

Meade M L, & Dillon C R, Signals and Systems, Chapman & Hall, 1991

Mitra Sanjit K, & Kaiser James F, Handbook for Digital Signal; Processing, John Wiley & Sons, New York, 1993

Oppenheim Alan V, & Schafer Ronald W, Discrete-Time Signal Processing, Prentice-Hall, 1989

Poularikas Alexander D, & Seely Samuel, Signals and Systems, PWS Publishers, Boston, 1985

Rabinier Lawrence R, & Gold Bernard, Theory and Application of Digital Signal Processing, Prentice-Hall, 1975

Taylor Fred J, Digital Filter Design Handbook, Marcel Dekker, New York, 1983

Mixed Signal Design Seminar, Analog Devices, Norwood, MA, 1991

DSP Applications Seminar, Analog Devices, Norwood, MA, 1984

Techniques in Discrete-Time Signal Processing, Interactive Circuits and Systems LTD., March 30, 1982

       Finite Impulse Response

       Infinite Impulse Response

[1]       See MathCad file: 3rd Order Butterworth