Submit a ticket at our help desk. Our Support team will find the answer to all your questions.
See our Knowledge base, before you post a ticket - perhaps you'll find the solution to your problem faster.
Libstock is a community website created by mikroElektronika, that allows users to share their projects and libraries. It’s created with aim to provide the community with the right and neccessary infrastructure for this.
This is the place for all your additional questions and suggestions. Our team is ready for all your questions. We will handle everything in a timely manner. Feel free to send your request using the form on the web page.
Use our latest embedded development solutions to experience the rapid prototyping on a whole new level. We bring you the most complete, most innovative, and most reliable development toolchain in the industry, giving you an edge over the competition, greatly reducing the time to market.
Learn more about our rapid development toolchain. A huge number of articles and examples that might inspire you or give you a kickstart. A huge knowledge base will provide you with the guidance you need.
Many practical examples and demonstration applications that you can use as a starting point or reference for your own custom design. Each post offers guidance and explanations not only about the project but also about the used technology.
Digital IIR filters are designed using analog filters. After the frequency scaling and transformation into a desirable type of filter have been performed, it is necessary to transform the resulting analog filter into a digital one. It is done by transforming the analog filter transfer function into a digital one.
The transformation is supposed to:
faithfully approximate the frequency response of analog filter; and
provide that the resulting digital filter is guaranteed to be stable.
This transformation also transforms s plane into z plane.
Analog filter is stable if the poles of the transfer function are located in the left half of s plane, whereas digital filter is stable if the poles are located within the unit circle. For this reason, the transformation must provide that the left half of s plane coincides with the area within the unit circle of z plane, as shown in Figure 3-5-1.
Figure 3-5-1. Transformation of s plane into z plane
One of most commonly used method of transforming analog filters into appropriate IIR filters is known as bilinear transformation. It is defined via expression:
Using the previous expression, the transformation of the analog filter transform function into a digital one can be expressed as:
As seen, the transformation is performed by a simple change of variable s in the expression for the transfer function of the resulting analog filter.
The analog filter transfer function can be expressed as:
H0 is a constant. If s=0 then H(s)=H0 ;
zk is the zero of the analog filter transfer function; and
pk is the pole of the analog filter transfer function.
After transformation, the analog filter transfer function is further transformed into:
Hoz is a constant of the digital IIR filter transfer function
The transfer function of a second-order high-pass analog filter (inverse Chebyshev, fc=2KHz, fs=44100Hz, 60dB) is expressed as:
It is necessary to transform the given analog filter into the appropriate digital filter by bilinear transformation.
The result is the transfer function of a digital high-pass IIR filter. Realization structure is illustrated in Figure 3-5-2 below.
Figure 3-5-2. IIR filter realization
Digital filters designed via bilinear trasnformation are guaranteed to be stable. However, the accurate values of coefficients are obtained immediately after the implementation of bilinear transformation. On filter realization, it is impossible to represent coefficients without an error. In software digital filter realization (implementation), the resulting coefficients are quantized, which also generates a certain error. Any error made during the quantization of coefficients affects more or less the frequency response, which may further cause the stopband attenuation to decrease.
The quantization effect on digital filter stability is much more dangerous. Special care is required when quantizing feedback coefficients as it causes the location of the digital IIR filter transfer function poles to change their location. It is very important to prevent the poles from being located outside the unite circle. However, if it happens, the resulting IIR filter is not stable and is useless therefore.
A disadvantage of the bilinear transformation is a non-linear transformation of the analog filter frequency axis into a digital one. When designing, the cut-off frequencies are defined on the basis of the given specifications and type of a filter. When transforming, these frequencies have appropriate locations, which is not the case with the rest of the frequency axis. Such a non-linear transformation of analog filter frequencies causes the phase characteristic distorsion, so that it is not linear.