Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:sigmastudio:toolbox:filters:generaleq2ndorderslew [29 Nov 2016 11:16] Mazher Khanresources:tools-software:sigmastudio:toolbox:filters:generaleq2ndorderslew [09 Mar 2018 08:12] (current) Prasad Kamath
Line 5: Line 5:
        
 {{:resources:tools-software:sigmastudio:toolbox:filters:generaleqslew1.png?100|}}\\ {{:resources:tools-software:sigmastudio:toolbox:filters:generaleqslew1.png?100|}}\\
-The General (2nd-Order) block gives access to wide variety of 2nd-order (biquad)filter algorithms. The Slew time can be entered in seconds (0-1) to slew from the initial set of coefficients to the target value+The General (2nd-Order) filter is variant of a second order bi quad filter which enables smooth transition of the filter parameters when filter parameters are changed, this is done by slewing from the current filter parameters(coefficientsto the one being set. The slewing takes place approximately in the time set by the user in the GUI. The slew time can be entered in the GUI slew Text box, or open the filter control window by clicking on the icon button and enter the slew time in the slew text box or by using the slew slider. The slew time range is limited between (0 to 1 second).  
 +\\ 
 +<m>Slew function:</m> 
 +\\ 
 +<m>lambda= e^{-1/{timeconstant*F_s}}</m> 
 +\\ 
 +<m>Current Coefficient= Current Coffcicient* lambda + Target Coefficient * (1-lambda</m> 
 +\\ 
 + 
 +The above slewing function implements RC slewing. The parameter <m>lambda</m> is calculated based on the slewing time constant. The computations for slewing of filter coefficients is done on the DSP. 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.\\ 
 +\\ 
 +{{{{:resources:tools-software:sigmastudio:toolbox:filters:generaleqslew2-form.png?300|}}\\ 
 +\\ 
 +  
 +=====Configuration===== 
 + 
 +^GUI Control Name^Default Value^Range^Function Description^ 
 +|Enable/Bypass |Enabled |True/False |Enabling or disabling of filter. On bypass, the input signal is passed through without any processing. | 
 +|Phase |In-Phase|True/False|Enabling the button, will invert the filter phase.| 
 +|Frequency |1000 Hz|0 - 96k Hz|Center frequency of the filter| 
 +|Slew|0s|0 - 1 seconds|Set the time to slew from one set of coefficients to another.
 +\\
  
-  * The available filter types are:+This block gives access to a wide variety of 2nd-order (biquad)filter algorithms. The blend factor can be entered(0-1) or changed using the slider. The Slew time can be entered in seconds (0-1) to slew from the initial blend factor to the target value. 
 + The available filter types are:
   * Parametric   * Parametric
   * Shelving   * Shelving
Line 17: Line 42:
   * Bessel Low-Pass / High-Pass   * Bessel Low-Pass / High-Pass
   * Tone Control   * Tone Control
-  * [[resources:tools-software:sigmastudio:toolbox:filters:general2ndorder:iircoefficient|IIR Coefficient (direct coefficient entry)]]+  * IIR Coefficient (direct coefficient entry)
   * 1st-Order Low-Pass / High-Pass   * 1st-Order Low-Pass / High-Pass
   * All-pass   * All-pass
Line 24: Line 49:
   * Chebyshev Low-Pass / High-Pass   * Chebyshev Low-Pass / High-Pass
  
-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 time set by the user in the GUI.  +====Shelving==== 
-The slew time can be entered in the GUI slew Text box, or open the filter control window by clicking on the icon button and enter the slew time in the slew text box or by using the slew sliderThe slew time range is limited between (to second). +{{ :resources:tools-software:sigmastudio:toolbox:filters:ShelvingSettings2.png?nolink |}} 
 +^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 - 15 dB|dB gain of the filter coefficients| 
 +|Q|1.41|0-16|Q Factor for filter calculations| 
 +|Slope|1|0-2|Slope| 
 +\\
  
 +----
  
-**To open the filter control window, click on the icon button:** +====General====  
-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.\\ +{{ :resources:tools-software:sigmastudio:toolbox:filters:GeneralFiltSettings2.png?nolink |}} 
-\\ +^GUI Control Name^Default Value^Range^Function Description^ 
-{{{{:resources:tools-software:sigmastudio:toolbox:filters:generaleqslew2-form.png?300|}}\\ +|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 - 15 dB|dB gain of the filter coefficients| 
 +|Q|1.41|0-16|Q Factor for filter calculations|
  
---------------------------------------------------------------------------------+----
  
-This block's algorithms use biquad filter designs ([[http://ez.analog.com/message/16011#16011|Direct Form II]]) based on Robert Bristow-Johnson's work in this field.\\ +====Butterworth/Bessel==== 
-\\ +{{ :resources:tools-software:sigmastudio:toolbox:filters:ButterwothSettings2.png?nolink |}} 
-<m>H(z)={b_0 + b_1 z^-1 + b_2 z^-2}/{1 + a_1 z^-1 + a_2 z^-2}</m> +^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 - 15 dB|dB gain of the filter coefficients|
  
-common variables: +----
-  * <m>omega_0 = {2 pi f_0}/{F_s}</m> +
-  * <m>gainLinear = 10^{gain/20}</m> +
-\\ +
-{{general2ndpic4.png}}\\+
  
-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:\\ +====Tone Control==== 
-b0 = -(1 + cos(ω0)) * gainLinear / 2\\ +{{ :resources:tools-software:sigmastudio:toolbox:filters:ToneControlSettings2.png?nolink |}} 
-b1 = -(1 + cos(ω0)) * gainLinear\\ +^GUI Control Name^Default Value^Range^Function Description^ 
-b2 = -(1 + cos(ω0)) * gainLinear / 2\\+|Treble Frequency|1000Hz|0-96kHz|Treble Cut off frequency of the filter| 
 +|Treble Gain|0dB|-15 - 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 - 15 dB|Bass dB gain of the filter coefficients|
  
-{{general2ndpic5.png}}\\+----
  
-**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**+====IIR Coefficient==== 
 +{{ :resources:tools-software:sigmastudio:toolbox:filters:iirSettings2.png?nolink |}} 
 +^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|
  
 +----
 +
 +====First Order Filters====
 +{{ :resources:tools-software:sigmastudio:toolbox:filters:FirstOrderSettings2.png?nolink |}}
 +^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 - 15 dB|dB gain of the filter coefficients|
 +|Q|1.41|0-16|Q Factor for filter calculations|
 +
 +----
 +
 +====All Pass,Peaking,Notch====
 +{{ :resources:tools-software:sigmastudio:toolbox:filters:AllPasssettings2.png?nolink |}}
 +^GUI Control Name^Default Value^Range^Function Description^
 +|Frequency|1000Hz|0-96kHz|Cut off frequency of the filter|
 +|Gain|0dB|-15 - 15 dB|dB gain of the filter coefficients|
 +|Q|1.41|0-16|Q Factor for filter calculations|
 +
 +----
 +
 +====Chebyshev====
 +{{ :resources:tools-software:sigmastudio:toolbox:filters:Chebysettings2.png?nolink |}}
 +^GUI Control Name^Default Value^Range^Function Description^
 +|Frequency|1000Hz|0-96kHz|Cut off frequency of the filter|
 +|Gain|0dB|-15 - 15 dB|dB gain of the filter coefficients|
 +|Ripple|0.1|0-10|Ripple Factor for filter calculations|
 +
 +----
  
-{{general2ndpic6.png}}\\ 
 \\ \\
-<m>Slew function:</m> 
-\\ 
-<m>lambda= e^{-1/{timeconstant*F_s}}</m> 
-\\ 
-<m>Current Coefficient= Current Coffcicient* lambda + Target Coefficient * (1-lambda) </m> 
 \\ \\
 +===== DSP Parameter Information =====
  
-The above slewing function implements RC slewing. The parameter <m>lambda</mis calculated based on the slewing time constant. The computations for slewing of filter coefficients is done on the DSP. The slew computation is always performed in single precision. +^GUI Control Name^Compiler Name^Function Description^ 
-\\+|Targ_B2_|<fc #008000>EQS300MultiSpSlewAlg</fc><fc #ff0000>1</fc><fc #000080>Targ_B2_</fc><fc #800000>1</fc>|Bi-quad filter coefficient B2 for filter 1| 
 +|Targ_B1_|<fc #008000>EQS300MultiSpSlewAlg</fc><fc #ff0000>1</fc><fc #000080>Targ_B1_</fc><fc #800000>1</fc>|Bi-quad filter coefficient B1 for filter 1| 
 +|Targ_B0_|<fc #008000>EQS300MultiSpSlewAlg</fc><fc #ff0000>1</fc><fc #000080>Targ_B0_</fc><fc #800000>1</fc>|Bi-quad filter coefficient B0 for filter 1| 
 +|Targ_A2_|<fc #008000>EQS300MultiSpSlewAlg</fc><fc #ff0000>1</fc><fc #000080>Targ_A2_</fc><fc #800000>1</fc>|Bi-quad filter coefficient A2 for filter 1| 
 +|Targ_A1_|<fc #008000>EQS300MultiSpSlewAlg</fc><fc #ff0000>1</fc><fc #000080>Targ_A1_</fc><fc #800000>1</fc>|Bi-quad filter coefficient A1 for filter 1| 
 +|lambda_|<fc #008000>EQS300MultiSpSlewAlg</fc><fc #ff0000>1</fc><fc #000080>lambda_</fc><fc #800000>1</fc>|Bi-quad Slewing parameter lambda|
  
-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).+\\ Here,  
 +     * <fc #008000> Green</fc> - Algorithm Name 
 +     * <fc #ff0000> Red</fc> - Instance Number (Changes for each instance) 
 +     * <fc #000080> Blue</fc> - Parameter Name 
 +     <fc #800000> Brown</fc> - Stage number
  
  
 +==== Supported ICs ====
 +  - ADAU145x
 +
 +\\
 **NOTE: Due to fixed point operations, the filter coefficients do not slew exactly in the set slew time.  **NOTE: Due to fixed point operations, the filter coefficients do not slew exactly in the set slew time. 
 ** **
  
  
resources/tools-software/sigmastudio/toolbox/filters/generaleq2ndorderslew.txt · Last modified: 09 Mar 2018 08:12 by Prasad Kamath