# Digital Filter Design: Easy way to solve problems Well, while learning about digital filters, we should be able to handle the problem of digital filter design. Given a problem, we should be able to solve it without sophisticated digital design techniques but if the specification for a particular design is very tight i.e. For instance, δp = 0.1dB and δs = 120dB. Therefore the order of the filter design has to be high and it may not be possible to build by cascading of the first.

So, in this case, we are to know what the order is and how to go about designing the digital filter. But in practical situations, design engineers still do synthesis by analysis i.e. They cascade some second-order filter and check the response using a program. However, if it does not meet the design specification, they change some factors or coefficients in the design (trial and error). However, there are ways of designing a digital filter in a more sophisticated manner without using trial and error.

Table of Contents

## Digital Filter Design Specification

Given digital filter specification i.e δp, δs, ωp, and ωs. These specifications are expressed as vectors because they may vary. For instance, if we take a bandpass or bandstop filter the passband edges as well as stopband edges ωp1, ωp2 and ωs1, ωs2 respectively. Also for a single digital filter the tolerances δp, δs, may differ for one stop band to another. From the specifications, the design engineer’s job is to find the transfer function H(z).

The specifications we are discussing are the magnitude specification. Usually we as design engineers do not design digital filters to satisfy phase specifications. Although there are situations where phase specifications are met. Our objective in digital design as far as phase is concerned is linearity, we want a linear phase digital filter.

With Finite Impulse Response design, a linear phase is guaranteed without a doubt but we cannot obtain it with an Infinite Impulse Response design. However, even with that, we do design to meet the specifications. What we do is design the digital filter to meet the magnitude specifications and accept whatever phase specification that appears. Which we try to compensate for the nonlinearity by cascading all-pass filters.

All pass filters are therefore everywhere in Digital Signal Processing (DSP). So the transfer function H(z) meeting the desired magnitude specifications have to be found, and afterward either write a program or use a programmable chip or carry out hardware realization.

## Infinite Impulse Response and Finite Impulse Response design

The Infinite Impulse Response and Finite Impulse Response design follow entirely different rules and they are very different from each other. Infinite Impulse Response design usually can be made with a degree of confidence but it is not the same for Finite Impulse Response.

Finite Impulse Response, as we know, is advantageous for linear phase consideration and stability consideration (because Finite impulse response filters are conditionally stable). The advantage of Infinite impulse response is that one can use much lower orders to realize tighter specifications i.e. The hardware complexity or software complexity is much lower than that of the Finite Impulse Filter.

Well, another advantage is that Infinite impulse response usually can be designed analytically to the given specifications exactly. Meanwhile, except for word-length errors from using finite no of bits. So, Infinite Impulse Response can be designed analytical but the degree of confidence is much lower (the filter that one design may or may not satisfy the given specifications).

## Digital Filter Design: IIR and FIR

What one does after one completes the design in Finite Impulse response is to compute its performance. Thereafter, find out if the design satisfies the specification or not and then make the necessary changes. So, it is an iterative process. This is not the same as that of an Infinite Impulse Response design. This is because Infinite impulse specifications can be transformed into analog filter specifications by using a transformation ω to Ω.

This makes the process of Infinite Impulse Response design a one-step process or non-iterative process. Meanwhile, from the analog filter specifications, one can design an analog filter Ha(s) to satisfy the given Infinite Impulse Response specifications. Usually, this is done by transforming the analog filter to a normalized analog low pass filter and then we reverse the transformation.

Although, the steps include transforming the Infinite Impulse Response specifications to analog filter specifications. Then the analog filter specifications are used to design a normalized analog low pass filter which finally gets transformed to the digital filter domain in z- plane.

## Digital Filter Design: Process

One might ask in this age of computers where very large capability computers are available. Why should we go through analytical techniques at all?. Why can’t we take a very blind approach i.e. Given the specifications one estimates the order of which one has to find coefficients of the numerator and denominator polynomials?

One guesses the coefficients at first and watches the response and obviously since it is a blind guess so many blindness is combined such that the specification is not satisfied at first. So, one goes on changing and repeating the process until the specification is specified. However, this process is very tedious as one does not know if it will converge or diverge.

In the initial stages of development, the Bell lab engineers did exactly the same, they went through blind designs. However, at the present time, sophisticated programs are available for IIR or FIR digital filter design. But they are not free. There are some open programs available such as the filter design tool in GNU radio but if one can design it analytically.

There is a level of confidence that cannot be matched with any other filter design. Fortunately, since analytical designs are available, we shall use a computer-aided design algorithm only if we have to.

#### Design Process

Now let’s look at why Infinite Impulse Response digital filters are designed from analog filters. This is also historical. It has been found that the complexity associated with Infinite Impulse Response analytical design is so large. Also, complicated and so involved that a better way is to use our huge store of knowledge in analog filter design. Analog filter design as we know usually gives rise to closed-form expression as we have illustrated with Butterworth and Chebyshev.

They are very elegant expressions and one can find the transfer function exactly. Not just that for given specifications except for elliptical filters. Handbooks of filter design are available and so may not have to go through the intermediate steps to determine the transfer function.

Hence with design, all one does is the transformation in order to get the Infinite Impulse Response. If one realizes it, make an analysis and find out whether the specifications are satisfied or not, if not then make incremental adjustments. These incremental adjustments are called tuning.

## Tuning

Tuning is required because of finite word-length requirements, so if infinite word-length was available then our design is okay. So, these are the reasons why analog filter forms the parent filter for Infinite Impulse Response digital filters design. There are various kinds of transformations that are available and the two transformations that are generally used are Impulse Invariant Transformation (IIT) and Bi-Linear Transformation (BLT).

Impulse Invariant Transformation is conceptually very simple but it is always amenable to aliasing distortion. Aliasing cannot be avoided in Impulse Invariant Transformation whereas Bi-Linear Transformation is free from aliasing error. Even then, why we do discuss Impulse Invariant Transformation is because it is very simple conceptually and the calculations are also much simpler.

So if the distortion can be contained to a very reasonable limit then Impulse Invariant Transformation does the job. Most Impulse Invariant Transformation filters for biomedical signal processing. For example, we do not go through the complication of Bi-Linear Transformation. So we simply use Impulse Invariant Transformation and if it works it is good enough.

In Impulse Invariant Transformation, what one does is take a given analog filter obtained from the Impulse Infinite Response specification by using some transformation ω → Ω i.e. Ha(s) and obtains its impulse response ha(t). Then it samples the impulse response i.e. it obtains ha(nT ) which we call h[n] from which we can easily obtain the z transform H(z).

#### Tuning

So the relationship between the analog filter Ha(s) and the digital filter H(z) is that the impulse response remains invariant i.e. The digital filter impulse response is the sampled version of the analog filter impulse response and the sampling theorem has been respected in the process then there should be a one to one representation i.e. give h[n], we should be able to construct ha(t) and from ha(t) we should, of course, obtain h[n].

## Impulse Invariant Transformation

Now how does the problem of aliasing occur? No transfer function, in practice it is band limited and if we want to respect the sampling theorem. The sampling must be such that the sampling frequency is greater than or equal to twice the highest frequency at which Ha(s)is non-zero. There is no transfer function which can stop abruptly at a particular frequency. This is because such a transfer function would disobey the fundamental Payle-Wiener criterion. It would also be noncausal and unrealized. Therefore, there is no transfer function that is band limited which means that some amount of aliasing distortion is bound to occur. So long as we contain this distortion to within a tolerable limit, then Impulse Invariant Transformation can be used.

Therefore, this means that a pole in the left half of the s plane transforms into a pole inside the unit circle in the z-plane. A pole on the imaginary axis of the s plane transforms to a pole on the unit circle and a pole on the right half of the s-plane transforms to a pole outside the unit circle. Hence the first criterion is satisfied, i.e. a stable analog filter will give rise to a stable digital filter.

### Transformation

The weakness of this transformation is that Ha(s) may not be bandlimited. How does it reflect in the transformation?

\sum { \frac { { A }_{ i } }{ s-{ p }_{ i } }}→\sum {\frac{ { A }_{ i } }{ 1-{ e }^{ { p }^{ iT } }{ Z }^{ -1 } } }

We are simply transforming the poles and so we have no control over the zeros of the transfer function. Whatever zeros that come from H(z), we will have to accept and this arises because Ha(s) does not bandlimited. Therefore aliasing distortion is reflected in the zeros of H(z) as it is not retained during the transformation.

So there are two ways of looking at the weakness of Impulse Invariant Transformation; one is the aliasing point of view. While the other is that we do not have any control over the zeros. On the other hand, in bilinear transformation, we transform poles as well as zeros. In the Impulse Invariant Transformation, if one has a normalized first-order analog filter.

Similarly, in the bilinear transformation also, there is no change in the order as we will see. If the impulse response is invariant, does it imply that the response to a unit step is also invariant? In other words is the step response invariant? No , the the step invariant transformation is quite different.

Follow me
Latest posts by Hboiacademy (see all)
Tags:

## 1 thought on “Digital Filter Design: Easy way to solve problems”

1. A fascinating discussion is worth comment. I do believe that you need to publish more on this issue,
it might not be a taboo subject but typically people do not speak about these issues.
To the next! Many thanks!!

Comments are closed.