Monday, 13 July 2015

Poles, Zeros and the Matched z-transform

poles and zeros

If you're familiar with filters then you probably know that the poles and zeros of a digital filter, shown in z-plane plots, represent the roots of the filter's transfer function, H(z). 

You may even know that the distance of those poles and zeros from the unit circle and the angle they make with the x-axis determine the filter's amplitude and phase characteristics - which pretty much completely specifies the filter's frequency response.

All of which implies that digital filters can be designed by simple pole and zero placement on the z-plane. And indeed they can - with similar arguments to be made for analogue filters in the s-plane.

s-plane

The s-plane is a representation of the Laplace Transform belonging to the domain of analogue filters. It can be related, or mapped, to the z-plane of digital filters in a number of different ways - most commonly via the so-called Bilinear Transform (which is a mathematical method of converting s-plane coordinates into z-plane coordinates).

So, if you have to hand some particular analogue filter design, you can convert it into a digital filter design by applying the appropriate transform. 

Figure 1 - Analogue Butterworth filter in the s-plane
Figure 2 - Filter mapped into the z-plane


These transformations are useful because analogue filters have been around for much longer than digital ones, so you can leverage existing designs in the extensive literature on the subject.

It is even possible consciously design new digital filters in the analogue domain with the express intention of later applying some transform into the z-domain. With the Bilinear Transform that can be a mathematically tedious process, but there is another type of transform which lends itself nicely to digital design in the analogue world: the matched z-transform.

matched z-transform

Whilst the Bilinear transform maps the entire negative s-plane to the inside of the z-plane unit circle and the entire positive s-plane to the outside of the z-plane unit circle, the matched z transform maps thin horizontal strips of height 2*pi from the s-plane to the z-plane, as illustrated in the following 2 figures (imagine both figures extending to infinity in both x and y directions).

Figure 3 - Infinitely wide strips of height 2*pi in the s-plane (3 shown).
The highlighted strip jw = -1pi .. 1pi is the primary domain.
Green areas (-sigma) map to the inside of the unit circle (stable poles).
Red areas (+sigma) map to the outside of the unit circle (unstable poles).
Other strips are aliases because they map into the same region as the primary.



Figure 4 - The s-plane strips mapped into the z-plane via the matched z transform.
The mapping is described by the notation z <- exp(s).
The line jω=0 (-pi .. pi) in the s-plane maps to the unit circle in the z-plane.

The mapping is invoked by taking the exponential of any s-plane coordinate to get it's corresponding z-plane coordinate. Not forgetting that this is a complex exponential and so, in general (using Euler's formula):

exp(s) = exp(x + iy) 
       = exp(x) * exp(jy)
       = exp(x) * (cos(y) + jsin(y))

For example, the point:

s = -0.22252 + 0.97493i 

maps to:

z = 0.44926 + 0.66254i

as demonstrated in the Butterworth configuration shown in figures 1 & 2.

We must ensure that any pole/zero designs we make in the s-plane fall within the central strip, or at least be aware that any falling outside the strip will be aliased back inside.

That 2*pi strip thickness is convenient because the unit circle in the z-plane is 2*pi radians around  - i.e. the same as the length of the s-plane y-axis section from which it is mapped under this particular transform. Therefore we avoid the (additional) distortions inherent in the Bilinear Transform method and the associated (albeit necessary) pre-warping calculations.

Of course this comes at the price of invoking the computationally expensive exponential function ... but here at the rawfilter blog we don't worry about such trivialities.

Most filters I make are designed in this way, so this post will hopefully give you some background on some of those to come in which I will demonstrate some useful (or at least educational) designs.

RAW~


No comments:

Post a Comment