Digital Filter Design & Simulation
 

Home
DISPRO Background
DISPRO Features
DISPRO User Manual
DISPRO Download
Merged-Biquad
StoZ Background
StoZ User Guide
StoZ Download
Contact Me
Consulting
Guest Book
Win7 Operation

 

StoZ Transfer Function Conversion

The application STOZXFR.EXE was initially conceived as a tool for adjusting the poles and zeros of a z-domain transfer function in order to obtain a frequency response with either a desired magnitude response, a desired phase characteristic, or a desired delay characteristic.  Because of the interaction between magnitude and phase it is not possible to achieve arbitrary magnitude and arbitrary phase simultaneously.  The starting point could be a filter designed by DISPRO, or any z-domain transfer function, up to order 10.  STOZXFR was then expanded to include the conversion of an s-domain transfer function to a z-domain transfer function.  By adjusting the poles and/or zeros of the resulting z-domain transfer function, a closer match can be obtained to the s-domain frequency response.

In DISPRO the conversion from s-plane biquads to z-plane biquads is done with the bilinear-z mapping. If s = σ + jω represents the complex variable for the analog transfer function, and s' the complex variable for the warped analog transfer function, then s = 2/T tanh(s'T/2), where T = 1/FS with FS the sampling frequency.  To obtain a good approximation to the analog filter FS/2 should be much greater than any of the poles of the analog filter.  When s and s' are real-valued, then tanh(x) differs little from x for x .25, which corresponds to σ FS /2. Thus, real-valued poles and zeros are not materially affected by the bilinear-z mapping. For s = jω we have ω = tan(ω'T/2) which shows what we know, namely that this mapping warps the frequency axis, converting the infinite range in the s plane to the finite range of ±FS /2 in the s' and z planes. This bilinear-z mapping is most appropriately applied to standard filter designs, simply because the classical filters with pass and stop bands depend upon corner frequency specifications; the pole and zero values for the analog prototypes are a function of these corner frequencies. In this case, pre-warping of the corner frequencies works very well in achieving a z-plane design which corresponds accurately to the s-plane prototype, as in DISPRO.

It is a different story when we are considering the conversion to the z-plane of an arbitrary transfer function, which we will consider as just a set of cascaded biquad sections. Now we have no unifying set of parameters—such as the corner frequencies—which can be pre-warped.  The usual bilinear-z mapping  may suffice for biquads whose singularities span a narrow frequency range, but it is entirely inadequate for biquads with complex- conjugate poles and zeros that are widely separated in frequency.  I have tackled this problem by using a procedure which determines if the biquad has a complex-conjugate (CC) pole and/or zero, pre-warps the frequency associated with any such CC pole/zero, and attempts to equalize the gains of the original s-plane biquad and its pre-warped equivalent by matching the magnitude response of both biquads at the peak value of the magnitude response of the original biquad.  This empirical approach produces far better results than simply selecting a single critical frequency, especially for biquads with a significant spread of the pole and zero frequencies. My experience with STOZXFR.EXE is that the peak region of the magnitude response can be off by 0.1 to 0.5 dB.  The tools available in STOZXFR.EXE for adjusting the z-domain poles and zeros, and normalizing the gain at the frequency-response peak (or at d-c, if that's more appropriate) are usually sufficient to achieve an excellent match between s- and z-domain characteristics.

Installation for Windows® 7

After making some modifications and compiling with Visual BASIC 5 the current version of STOZXFR.EXE now runs in Win7, both 32-bit and 64-bit.  In order to run STOZXFR.EXE in Win7 you will have to perform a few extra steps in addition to downloading the files.  Details are provided on the StoZ Download page.

Home ] DISPRO Background ] DISPRO Features ] DISPRO User Manual ] DISPRO Download ] Merged-Biquad ] [ StoZ Background ] StoZ User Guide ] StoZ Download ] Contact Me ] Consulting ] Guest Book ] Win7 Operation ]

[This is the personal web site of Dr. John O'Donnell]