Click here to return to the Filters page
The General (2nd-Order)Slew Ext block gives access to a wide variety of 2nd-order (biquad)filter algorithms. The Slew time can be input to the module using the external control pin in seconds (0-1) to slew from the initial set of coefficients to the target value when any filter parameter is changed.
The slewing functionality is added for smooth transition from one set of filter coefficients to another when the filter parameters are changed. The slewing takes place approximately in the slew time set by the user.
The slew time can be set by providing the value to the control pin. The parameter determines the slew rate. Upon growing the number of filter stages, a new control pin is added to the module for
value for each stage. The slew computation is always performed in single precision.
To open the filter control window, click on the icon button:
Select the desired filter type from the drop-down combo-box list. The filter controls and the icon button image will change to reflect the selected filter type.
This block's algorithms use biquad filter designs (Direct Form I) based on Robert Bristow-Johnson's work in this field.
Note that the b0 and b2 coefficients for the high pass filter below are inverted from what is stored in RAM. The correct equations for b0, b1, and b2 for a high pass filter are as follows:
b0 = -(1 + cos(ω0)) * gainLinear / 2
b1 = -(1 + cos(ω0)) * gainLinear
b2 = -(1 + cos(ω0)) * gainLinear / 2
Note that the minus signs on b0 and b2 values are erroneous for the Butterworth HP and Bessel HP. They should not be included. See http://ez.analog.com/message/4769
The above slewing function implements RC slewing. The parameter is calculated based on the slewing time constant. The computations for slewing of filter coefficients is done on the DSP.
For all of the above filters, the coefficients are divided by a0, normalizing them and making a0 = 1 so that only 5 coefficients must be stored. In the actual implementation on the DSP, when the coefficients are stored in parameter RAM, a1 and a2 need to be inverted. This is done automatically, in software, before the parameters are written to memory.
The Q is shown with the value adjusted (from the classical EE definition) so that a boost of N dB followed by a cut of N dB for identical Q and f0/Fs results in a precisely flat unity gain filter or “wire”. This is equal to A*Q, where A = 10^(dBgain/40).
Note: Some of the General 2nd order filters (those in the Type2 tree) are based on the Direct Form II implementation, which is used in the following HW ADSP-215xx & SC5xx. Please see the image below.