filterDesigner | erip |
This is part of the DSP System Toolbox, so you must have that toolbox installed to run filterDesigner
Also, if you want to design an FIR filter, the signal processing toolbox is also required
(because it uses the firpm.m (Parks-McClellan) function which is part of that
toolbox. |
This is part of the pltSig toolbox and you don't need any other toolboxes to run it.
(Note the limitation mentioned above when using Unix-based operating systems.)
|
filterDesigner is primarily for the design of filters that fit into one of the 4 standard types
(lowpass, highpass, bandpass, and bandstop). It is also capable of designing filters that don't
fit into one of those categories (i.e. arbitrary magnitude response), but to do so you must
specify the desired response by typing in the values of 4 vectors (Frequency, Edges, Magnitude, & Weight)
but that process is anything but intuitive. Once you enter those vectors, filterDesigner doesn't
produce any graphical representation of the shape that you specified making it difficult to know
if you entered these vectors correctly. |
erip allows you to enter a magnitude response graphically which is usually much easier.
You may also enter these values numerically, but the response is always shown graphically as well
so there will never be confusion about the design specification. |
For the four standard filter types as well as when using an arbitrary magnitude response, you must
specify the response in linear units. However, the frequency response of the filter that results from
your specifications can't be displayed in linear units (it's always in dB). This makes it
difficult to see how well the design spec was met, and for arbitrary magnitude specifications,
it offers little feedback about whether the 4 vectors were typed in properly. |
erip allows you to display the magnitude response of the design result in linear or logarithmic
units (or both simultaneously). As an example of how important this is, look at the design result
of the differentiator example with the linear result (trace 2) turned off and observe how difficult
it is to see how faithfully the design result follows the specification as the filter order is varied. |
A pole/zero editor is included which can be a powerful tool to help you gain an understanding of how
the pole/zero locations affect the frequency response. However, the pole/zero plot occupies a small
fraction of the figure window making the unit circle so small it is somewhat frustrating to use.
Also, you can't precisely drag a zero onto the unit circle since mouse control doesn't offer enough
precision for such a task. (Being exactly on the unit circle is often important because it allows
the polynomial to be symmetric.) |
erip displays the pole/zero editor in a separate resizable figure window, providing a much more
useable editor. Additionally, erip displays only the top half of the unit circle, allowing this
half circle to fill the figure window. This again makes the radius larger, making the editor more
comfortable to use. And finally, erip provides an adjustable "snap-to" region around the unit circle
making it easy to move a zero to the unit circle. erip provides another snap-to region around the
x-axis allowing you to drag a root exactly onto the x-axis, turning a complex conjugate pair of
roots into just a single root (another impossible task with filterDesigner). |
A window is provided allowing you to view the filter coefficients, but it is so small that even with
simple filters you need to use the scroll bar to see all the coefficients. Also, it is
awkward that you can't view the coefficient window at the same time as the magnitude response or
the pole/zero locations. So for example, after changing a filter design parameter, you can see how
this affects the coefficients, the magnitude response, or the pole/zero positions, but you can't
see all three (or even two) of these effects at the same time. |
erip has separate figure windows for showing the filter coefficients, the magnitude/phase response,
and the pole/zero locations. So after a design change, you can see the effects in all three windows
simultaneously. Also, the coefficient window shows the coefficients more compactly, and the
window is large enough to show all the coefficients without scrolling for even quite complex filters.
Another advantage of erip's coefficient window is that it allows you to constrain the coefficients
to fixed point precision with any desired number of bits. |
Line 1 | Name
| The name of the filter design (ignoring the asterisks) as it appears in the saved filters popup.
|
Line 2 | Fs
| The sample rate.
|
Line 3 | f
| A list of frequency breakpoints for defining the desired filter shape and weighting function. This must
be an increasing sequence of numbers between 0 and Fs/2.
|
Line 4 | des
| The desired filter shape. It must be the same size as f.
plt(f,des) plots the desired filter shape.
|
Line 5 | wt
| The filter shape weighting function. (Higher weights indicate a region of more importance).
plt(f,wt) plots the filter shape weighting function.
|
Line 6 | tran
| Identifies which bands are transition regions. In this example, the value "2" indicates that the
band between frequencies f(2) and f(3) is a transition region. This can contain multiple elements
when the filter specification includes multiple transition bands.
|
Line 7 | grid
| The value of the grid pseudo edit box (grid density)
|
Line 8 | rad
| The value of the radius edit box (which limits how close poles can approach the unit circle)
|
Line 9 | b
| The numerator polynomial (May be different than the optimal solution after clicking "run", if the values
have been quantized or edited numerically or if the zeros have been moved on the pole/zero chart.)
|
Line 10 | a
| The denominator polynomial (May be different than the optimal solution after clicking "run", if the values
have been quantized or edited numerically or if the poles have been moved on the pole/zero chart.)
|
Line 11 | Qba
| The two values from the Qb and Qa edit boxes (numerator and denominator quantization values respectively)
|