1000 characters left

Digital Filter Module

Feature Comparison Summary

FilterSolutions® and Filter Quick™ are Windows® based software programs for the synthesis and analysis of electronic filter circuits. The modules available in these programs comprise: Passive FilterDistributed FilterActive FilterDigital FilterSwitched Capacitor, and Zmatch™(used for creating impedance matching circuits).  FilterQuick, which is included in FilterSolutions. offers a simplified interface for initiating designs, which are then usable with either FilterQuick or FilterSolutions' advance feature sets. 

Licenses for FilterSolutions can be purchased as "FilterSolutions-PRO™"  which contain all the modules. The modules can each be licensed individually.  

The "PRO" licenses include the Zmatch Impedance Matching Circuit module. The Distributed Element License will include the Distributed Element version of Zmatch, and the Passive Module will include the Lumped Element version of Zmatch.

FilterSolutions and its individual modules are available in Floating License, MAC Address-Locked or "Dongle"-Locked single user licenses.

FilterFree is a Freeware version of FilterSolutions with minimal functionality (DOWNLOAD LINK). FilterFree is limited to 3rd Order Analog designs or to 10 tap FIR designs. All analyses in FilterFree are limited to ideal transfer functions.

Digital Filter Synthesis:
FilterSolutions
      
FilterQuick
Transformations of bi-Linear, Z matched, Impulse or Step Invariant
Yes 
 
Yes
FIR Window Filters of Rectangular, Bartlett, Hanning, Hamming, Blackman, Blackman-Harris, Kaiser, and Dolph-Chebyshev
Yes
 
-
FIR Iterative Remez
Yes
 
-
FIR Arithmetically Symmetric Band Pass Raised Cosine and Root Raised Cosine.
Yes
 
-
FIR Filters: Raised Cosine, Root Raised Cosine, Cosine, Sine, Matched
Yes
 
-
FIR Approximations of all Supported Analog Filters.
Yes
 
Yes
FIR arithmetically symmetric Raised Cosine and Root Raised Cosine filters.
Yes
 
-
Z Transforms in Vector format to Easily Interface With Matlab and Matrix-x.
Yes
 
Yes
Z Transforms in Standard, Cascade, and Parallel Forms.
Yes
 
Yes
Bilinear, Matched Z, Impulse Invariant, and Step Invariant Transformations
Yes
 
Yes
Bilinear Prewarping
Yes
 
Yes
Large Order IIR Synthesis of up to 20 Poles
Yes
 
Yes
Locked or Floating License
Yes
 
Yes
Available Analyses:
FilterSolutions
 
FilterQuick
Auto C-code generation of Digital Filters: user-specified precision and form
Yes
 
Yes
Sin(x)/x sampling correction; 1st, 2nd, or 3rd order approximation options
Yes
 
-
Finite Precision error analysis: effects on frequency or time traces and Pole/Zero Movement
Yes
 
-
Z-Transform outputs and Finite Precision analysis: (Decimal, Signed or Unsigned Floating Point, and Signed or Unsigned Fixed Point)
Yes
 
-
Multi-band:
FilterSolutions
 
FilterQuick
Multi-Band Filter Synthesis*
Yes
-
-

* Multi-Band Filter networks are defined as a cascade of an arbitrary number of passbands and stopbands in a single lumped LC, active or digital IIR filter.

 

Z-Transform Outputs

FilterSolutions and FilterQuick provide several output formats for Z-Transforms. Supported formats include Decimal; unsigned floating binary; signed floating binary; unsigned fixed binary and signed fixed binary.

All binary output formats are encoded in hexadecimal notation. Signed binary numbers are in “twos complement”. The number of significant digits for decimal outputs may be specified; the number of significant bits may be specified for binary formats, and the maximum range may be specified for fixed point.

All formats are supported by finite precision analysis. Z-Transform coefficients may be copied directly into the Windows clipboard, either as shown or formatted for Matlab. Alternatively, the coefficients may be sent directly to the "Custom Filter" text windows.

Examples of Z-Transform Formats:

Bilinear, Matched Z, Impulse Invariant, or Step Invariant

The answer as to which digitization technique to use depends on the application. None of the techniques are perfect, but, in general; the Bilinear Transformation maps the entire frequency response of the desired filter, the Impulse Invariant transformation preserves the impulse time response, and the Step Invariant preserves the step time response.

Therefore, frequency performance, such as filtering a variable in a dynamic frequency sensitive environment is the highest priority. The best approach is to use the Bilinear Transformation. If the priority is performance over time, the best approach is to use the Impulse Invariant or Step Invariant transformation. The matched Z-transform is very basic and has no distinguishing features. The bilinear is the most general application.

To illustrate the time characteristics of these digitization techniques, the following displays show the step and impulse response traces of a first -order, 1 radian/second Butterworth Filter, followed by a Bilinear Transformation, Impulse Invariant transformation, and Step Invariant transformation, sampled at 2 Hz.

Continuous Step Response

The continuous time response is a nice exponential curve starting at zero and decaying asymptomatically to one and zero, as shown above.

Bilinear Step Response

Note the error in the bilinear trace. The signal's first step is 0.2, and the second is 0.3 more. The impulse response is no better. This does not reproduce the desired exponential time response very well.

In the Impulse Invariant transformation example shown above, each sample period exactly matches the impulse response value in the continuous impulse trace. This is a nicely reproduced impulse response for this filter.

Step Invariant Step Response

In the Step Invariant transformation shown above, each sample period exactly matches the step response value in the continuous impulse trace. This is a nicely reproduced step response for this filter.

Bilinear Pre-warping

The discrete sampling of Digital Filters produces aliasing for frequencies at or exceeding half the sample rate. In the case of the bilinear transformation, the entire continuous frequency spectrum is mapped to the discrete unit circle. This transformation produces frequency warping errors throughout the digital frequency response. The error shows up as an incorrect cutoff frequency for low-pass and high-pass filters, and incorrect center frequencies and bandwidths for bandpass and bandstop filters. It is generally a design critical practice to sample at least twice as fast as the highest frequency expected to pass through the filter in order that the effects of frequency warping are minimized.

The following illustration shows the effect of error due to frequency warping, and correction by pre-warping, on a bandpass filter with corner frequencies at 9 and 10Hz. The sampling frequency is 25Hz. First, the continuous response is shown:

Continuous Band Pass Frequency Response

When digitized with a Bilinear Transformation, and sampled at 25Hz, the frequency response exhibits aliasing errors as shown. Note below that the center frequency is now less than 7Hz and the band width is about 1/3Hz. This is quite far from the original 9 and 10Hz corner frequencies!

Discrete Band Pass Aliasing Error

With pre-warping techniques, the original pass band frequency response can be preserved as seen below. Note that the corner frequencies are back at 9 and 10Hz as desired. The sharp frequency roll-off above 10Hz is the expected result of frequency warping.

Discrete Band Pass with Pre-warping

Sin(X)/X Compensation

To compensate for Sin(X)/X errors due to sampling, there is the option of inserting an approximate X/Sin(X) into the IIR or FIR Z-transform to offset the effect of sampling. FilterSolutions and Filter Quick offer 1st, 2nd, and 3rd order compensations that approximate X/Sin(X), valid for frequencies of up to half the sample rate.

The FIR compensator is less accurate than the IIR, but is useful when it is necessary to maintain the FIR characteristic of the filter. We may view the effect of this compensation by viewing the magnitude response of a high pass or band stop filter at half the sample rate. The graph below shows FilterSolutions' 3rd order IIR and FIR compensation compared to the ideal compensation. More detailed information is available in the program's Help sections.

Standard, Cascade, and Parallel Form

With ordinary 64-bit arithmetic, a low pass or high pass filter should work with the standard form if the order is 10 or less. For a bandpass or bandstop filter, the standard form should work if the order is 5 or less. For filters of greater order or with fewer bits of precision available, the Cascade or Parallel form may be necessary.

Although the standard form is simpler and easier to build, it introduces and magnifies rounding errors for large filters. The Cascade and Parallel forms are more complex, but do not introduce as much rounding error. The rounding, or quantization error, increases as the arithmetic precision of the filter decreases. In general, both the Parallel and the Cascade forms provide more stability, due to less pole wandering, than the standard form.

For Bilinear transformations, the Cascade form tends to provide better performance than the Parallel form. For Impulse Invariant and Step Invariant transformations, the Parallel tends to provide better performance than the Cascade form.

If the programs’ autocode is being used to synthesize the filter, it is just as easy to build a Parallel or Cascade filter as a standard filter. Since there is no additional computer overhead, we recommend the use of the more complex forms whenever there is a doubt. FIR filters do not have a defined Parallel form. The Cascade form provides marginal improvements in performance. Therefore, for FIR filters the programs support the standard form only.

To illustrate these concepts, a 6th-order bandstop filter step response resulting from a standard form Z-Transform, (64 bit arithmetic), is shown below.

Standard Form Resulting in Quantization Noise

Since, we did not achieve our desired filter effects; we will re-synthesize the same filter in Parallel form:

Parallel Form With no Noise Shown

Filter noise will increase due to higher sampling rates and larger orders. Whenever the standard form does not perform due to quantization, the Parallel or Cascade forms are needed.

Precision and Quantization

Not all processors execute digital filters with the same arithmetic precision as are available on the PC. Therefore, the digital time response from the programs’ control panel may not be the same as achieved by the target processor. The programs provide digital filter test and simulation features to help determine if the digital filter design will execute properly on the target processor. The Z-Transform page Sim function will execute the time response, frequency response, and pole/zero plot of the design using the same form (Standard, Cascade, or Parallel) and arithmetic precision (Sig. Digs entry) that are specified. The precision of the target processor in terms of significant digits or bits of arithmetic execution, must be determined, and entered in the Sig Digs or Sig Bits boxes.

If the synthesized filter is unstable or contains quantization noise, the options are to:

• Increase the precision of the filter (Sig Dig entry), if the target processor can handle it

• Use a more complex form (Cascade or Parallel)

• Decrease the order of the filter

• Decrease the sampling rate

• Use a more precise processor

When the filter study is completed, and is ready to generate code for the filter, the desired number of digits must be set in the Sig Digs (1-16) to display the Z-Transform. (A significant digit setting of 16 is recommended for high precision processors).

Deriving Digital Filters from Z-Transforms

FilterSolutions and FilterQuick provide a Z-Transform to create the digital filter design. The programs offer direct C-Code implementation of the Z-Transform. The creation of a Digital Filter from a Z-Transform is illustrated as follows:

The term "Z" refers to the inverse past value.  Z raised to the -1 power refers to a past value, Z, raised to the -2, refers to two past values, etc. Often, Z-Transforms are written in terms of Z to the -1 rather than Z. This form requires more notation, but makes it easier to visualize the Digital Filter.

The denominator of the Z-Transform refers to the Feedback paths. The numerator refers to the Feed -Forward paths. Feed-Forward paths are positive; while Feedback paths are always negative.

For FIR filters, all the feedback terms in the denominator are zero.

The following table illustrates the conversion of a Z transform from text to graphical representation for the standard, Cascade, and Parallel forms. Computer code may be easily written from the graphical implementations.

Real and Quadruplet Zeros Delay Equalization

Phase angle and group delay may be altered by the presence of dual and quadruplet, off-axis zeros. Unlike All-Pass stages, the mere addition of dual and quadruplet off-axis zeros also affects the passband magnitude response, so additional calculations are needed to adjust the pole locations to restore the pass band.

Delay equalization with real and quadruplet zeros result in a flatter Chebyshev passband and steeper attenuation near the cut-off frequency than a comparable size filter equalized with traditional all-pass stages. This technique may provide a more efficient filter, depending on the specific design requirements.

FilterSolutions, offer a fast and easy approach to real and quadruplet delay equalization for low-pass, high-pass, and bandpass Digital Filters. Poles and group delay are updated in real time in response to the user’s zeros manipulation. The pass band is flattened back into an equiripple (Chebyshev I) or maximally flat (Butterworth) shape. The digital filters are calculated instantly with the positioned zeros.

Quadruplet Zero Equalized Low Pass Chebyshev Passive Filter, Frequency

Response and Pole/Zero Plane