Click here to return to the Filters page
——————————————————————————————————
The General (2nd-Order) block gives access to a wide variety of 2nd-order (biquad)filter algorithms.The coefficient calculations happen in the controller.
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 II) based on Robert Bristow-Johnson's work in this field.
common variables:
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
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.
By default, 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).
The “Classic EQ” version of Q can optionally be shown by clicking the small circular button next to the Q control.
The General (2nd-Order) filter is a variant of a second order bi-quad filter which enables a smooth transition of the filter parameters when filter parameters are changed, this is done by slewing from the current filter parameters(coefficients) to the one being set.
The slew type and slew time can be set by the user in GUI as shown below. Right click on the General 2nd Order filter module
On click on the Custom, the “Set Slew Mode” form will open as shown below
The algorithm supports three slew types
1. Linear Slew 2. RC Slew 3. Exponential Slew
This block gives access to a wide variety of 2nd-order (biquad)filter algorithms. he available filter types are:
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Shelf type | Low Shelf | Low Shelf/High Shelf | Shelving type for the filter |
Frequency | 1000Hz | 0-96kHz | Cut off frequency of the filter |
Gain | 0dB | -15 to +15 dB | dB gain of the filter coefficients |
Q | 1.41 | 0-16 | Q Factor for filter calculations |
Slope | 1 | 0-2 | Slope |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Type | Low Pass Filter | Low Pass/High Pass/BandPass/BandStop | General filter type |
Frequency | 1000Hz | 0-96kHz | Cut off frequency of the filter |
Gain | 0dB | -15 to +15 dB | dB gain of the filter coefficients |
Q | 1.41 | 0-16 | Q Factor for filter calculations |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Type | Bessel Low Pass | Bessel Low Pass/Bessel High Pass/Butterworth Low Pass/Butterworth High Pass | Filter type |
Frequency | 1000Hz | 0-96kHz | Cut off frequency of the filter |
Gain | 0dB | -15 to +15 dB | dB gain of the filter coefficients |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Treble Frequency | 1000Hz | 0-96kHz | Treble Cut off frequency of the filter |
Treble Gain | 0dB | -15 to +15 dB | Treble dB gain of the filter coefficients |
Bass Frequency | 1000Hz | 0-96kHz | Bass Cut off frequency of the filter |
Bass Gain | 0dB | -15 to +15 dB | Bass dB gain of the filter coefficients |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
b0 | 1 | -100 to 100 | B0 coefficient for the filter |
b1 | 0 | -100 to 100 | B1 coefficient for the filter |
b2 | 0 | -100 to 100 | B2 coefficient for the filter |
a1 | 0 | -100 to 100 | A1 coefficient for the filter |
a2 | 0 | -100 to 100 | A2 coefficient for the filter |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Filter Frequency | 1000Hz | 0-96kHz | Cut off frequency of the filter |
Active | Checked | Checked/Unchecked | Indicates whether the filter is active |
Type | High for 1st filter,Low - for second filter | Low/High/All pass | Type of the filter |
Gain | 0dB | -15 to +15 dB | dB gain of the filter coefficients |
Q | 1.41 | 0-16 | Q Factor for filter calculations |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Frequency | 1000Hz | 0-96kHz | Cut off frequency of the filter |
Gain | 0dB | -15 to +15 dB | dB gain of the filter coefficients |
Q | 1.41 | 0-16 | Q Factor for filter calculations |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Frequency | 1000Hz | 0-96kHz | Cut off frequency of the filter |
Gain | 0dB | -15 to +15 dB | dB gain of the filter coefficients |
Ripple | 0.1 | 0-10 | Ripple Factor for filter calculations |
GUI Control Name | Compiler Name | Function Description |
---|---|---|
Targ_B2_ | EQS300MultiSpHWSlewAlg1Targ_B2_1 | Bi-quad filter coefficient B2 for filter 1 |
Targ_B1_ | EQS300MultiSpHWSlewAlg1Targ_B1_1 | Bi-quad filter coefficient B1 for filter 1 |
Targ_B0_ | EQS300MultiSpHWSlewAlg1Targ_B0_1 | Bi-quad filter coefficient B0 for filter 1 |
Targ_A2_ | EQS300MultiSpHWSlewAlg1Targ_A2_1 | Bi-quad filter coefficient A2 for filter 1 |
Targ_A1_ | EQS300MultiSpHWSlewAlg1Targ_A1_1 | Bi-quad filter coefficient A1 for filter 1 |
_slewmode | EQS300MultiSpSlewAlg1_slewmode1 | Bi-quad slew mode |
Here,
The General (2nd-Order) block gives access to a wide variety of 2nd-order (biquad)filter algorithms.The coefficient calculations happen in the controller.
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.
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Filter Type | Lowpass | LowPass/Highpass/BandPass/BandStop | Type of the filter |
Frequency | 1000 Hz | 0-96000 Hz | The cut off frequency of the filter |
Gain | 0 dB | -15 to 15 | Filter Gain |
Q Factor | 0 | 0 to 16 | Q Factor of the filter |
Enable | 1 | 0 t0 1 | Enable or disable filter |
Phase Shift | 0 | 0 to 1 | Phase shift by 180 deg |
GUI Control Name | Compiler Name | Function Description |
---|---|---|
Frequency | FREQ_DSP_CALC0_ _ | The cut off frequency of the filter |
Gain | GAIN_DSP_CALC0_ _ | Filter Gain |
Q Factor | Q_DSP_CALC0_ _ | Q Factor of the filter |
Filter Type | FILTER_TYPE0_ _ | Type of the filter |
NA | INVERT__ | Negate the Coefficients corresponding to the input |
NA | ONE_BY_FS_DSP_CALC0_ _ | 1/ Sample Rate |
NA | ADDRESS_DSP_CALC0_ _ | Starting Address of the filter coefficients. |
NA | MEM_SELECTION_DSP_CALC0_ _ | Memory section the filter coefficients are located (DM0/DM1) |
It is possible to selectively disable filters which are not going to be used.To select only those filters to be used, right click on the module and select Configure Supported Filters and select only those filters which might be used.