Multistage Multirate Filter Design Express VI

Digital Filter Design VIs and Functions

Multistage Multirate Filter Design Express VI

Owning Palette: Multirate Filter Design VIs

Installed With: Digital Filter Design Toolkit

Creates a multistage multirate filter.

Dialog Box Options
Block Diagram Outputs
 Place on the block diagram  Find on the Functions palette

Dialog Box Options

ParameterDescription
Magnitude ResponseContains the plot of the magnitude response. You can drag the cursors in the plot to change the specifications. The color you specify in Passband represents the passband response and the passband edge frequency. The color you specify in Stopband represents the stopband attenuation and the stopband edge frequency. The color you specify in Stopband limit represents the stopband limit. The color you specify in Nyquist represents the half sampling frequency, also known as the Nyquist frequency.
  • Magnitude in dB—Specifies whether this Express VI uses decibels or a linear scale to express the magnitude response. If you place a checkmark in the checkbox, this Express VI converts a linear magnitude response to decibels. This Express VI uses decibels by default.
  • Nyquist—Specifies the color of the line in the magnitude plot that represents the Nyquist frequency. The default is green.
  • Passband—Specifies the color of the lines in the magnitude plot that represent the passband response and the passband edge frequency. The default is blue.
  • Stopband limit—Specifies the color of the line in the magnitude plot that represents the maximum stopband edge frequency. The default is yellow.
  • Stopband—Specifies the color of the lines in the magnitude plot that represent the stopband attenuation and the stopband edge frequency. The default is red.
  • Response selection—Specifies the stage for which you want to check the magnitude response.
Flow DiagramReturns the flow diagram of the multirate filter you specify in Filter type.
Filter CoefficientsReturns the coefficients of the multirate filter according to the settings you specify on the Floating-Point Design page.
  • Filter order—Displays the order of the multirate filter you design. The value of Filter order+1 equals the number of coefficients.
  • Coefficients selection—Specifies the stage for which you want to check the filter coefficients.
Main SettingsContains the following options:
  • Filter type—Specifies the type of multirate filter that this VI creates. The valid values include No Rate Change, Interpolation, and Decimation. The default is Decimation.
  • Filter factor—Specifies the sampling frequency conversion factor of the multirate filter. If you set Filter type to No Rate Change, the value of this input must be an integer greater than or equal to 1. The default is 1. If you set Filter type to Decimation or Interpolation, the value of this input must be an integer greater than or equal to 2. The default then is 2.
  • Number of stages—Specifies the number of stages of the multirate filter that this VI creates. The valid value of Number of stages is an integer between 1 and 3. Within this range, the value of Number of stages must be less than or equal to the number of elements in the prime factorization of Filter factor.
  • Using CIC—Specifies if you want to use the cascaded integrator comb (CIC) filter design method to design one stage of the multistage multirate filters. This option is available only if Filter factor is greater than 4 and divisible by 4. The default is FALSE, which means this Express VI does not use the CIC filter design method. If the value is TRUE, this Express VI uses the CIC filter design method to design the first stage of the filter when you set filtering mode to Decimation, or the last stage of the filter when you set filtering mode to Interpolation.
  • Subfactors—Specifies the factors of each stage of the multirate filter. Contains the following options:
    • Subfactor 1—Specifies the sampling frequency conversion factor of the first stage of the multirate filter. This option is available only if Number of stages is equal to or greater than 2 and Filter factor is not a prime number.
    • Subfactor 2—Specifies the sampling frequency conversion factor of the second stage of the multirate filter. This option is available only if Number of stages is equal to or greater than 2 and if the number of elements in the prime factorization of Filter factor is equal to or greater than 2.
    • Subfactor 3—Specifies the sampling frequency conversion factor of the third stage of the multirate filter. This option is available only if Number of stages is equal to 3 and if the number of elements in the prime factorization of Filter factor is greater than 2.
Filter SpecificationsContains the following options:
  • Input sampling frequency—Specifies the sampling frequency, in hertz, of an input signal for the multirate filter. This input must contain a value greater than zero. The default is 1k Hz.
  • Passband edge frequency—Specifies the passband edge frequency of the multirate filter. The default is 200 Hz.
  • Stopband edge frequency—Specifies the stopband edge frequency of the multirate filter. The default is 250 Hz.
  • Output sampling frequency—Returns the sampling frequency of the output signal for the multirate filter.
  • Passband ripple—Specifies the passband ripple of the multirate filter in a unit that the Magnitude in dB option determines. If you place a checkmark in the Magnitude in dB checkbox, Passband ripple must be greater than zero. The default is 0.1 dB. If you remove the checkmark from the Magnitude in dB checkbox, the valid range of Passband ripple is (0, 1). The default then is 0.011.
  • Stopband attenuation—Specifies the stopband attenuation of the multirate filter in a unit that the Magnitude in dB option determines. If you place a checkmark in the Magnitude in dB checkbox, Stopband attenuation must be greater than zero. The default is 60 dB. If you remove the checkmark from the Magnitude in dB checkbox, the valid range of Stopband attenuation is (0, 1). The default then is 0.011.
Transition band aliasing allowedSpecifies if you allow frequency aliasing in the transition band.
Quantization SettingsContains the following options:
  • Quantize filter—Specifies if you want to use this Express VI to quantize the floating-point multirate filter you design. If you enter the multirate filter specifications, you can place a checkmark in the Quantize filter checkbox after you click the Update Design button.
  • Coefficients word lengths—Specifies the word lengths, in number of bits, that this Express VI uses to represent the filter coefficients of each stage. Contains the following options:
    • Coefficients word length 1—Specifies the word length of the first stage filter coefficients of the multirate filter. This option is available only if you place a checkmark in the Quantize filter checkbox. The valid range is [1, 32]. The default is 16.
    • Coefficients word length 2—Specifies the word length of the second stage filter coefficients of the multirate filter. This option is available only if Number of stages is equal to or greater than 2 and if you place a checkmark in the Quantize filter checkbox. The valid range is [1, 32]. The default is 16.
    • Coefficients word length 3—Specifies the word length of the third stage filter coefficients of the multirate filter. This option is available only if Number of stages is equal to 3 and if you place a checkmark in the Quantize filter checkbox. The valid range is [1, 32]. The default is 16.
  • Gain word length—Specifies the word length, in number of bits, that this Express VI uses to represent the multirate filter gain if the gain processing occurs on an NI Reconfigurable I/O (RIO) target. This option is available only if you place a checkmark in the Quantize filter checkbox and select On Target from the Gain processing pull-down menu. The valid range is [1, 32]. The default is 16.
  • Coefficients scale type—Specifies how this Express VI scales the multirate filter coefficients. This option is available only if you place a checkmark in the Quantize filter checkbox. The valid values include No Norm, Time Domain-1 Norm, Time Domain-2 Norm, and Time Domain-Inf Norm. The default is Time Domain-1 Norm.
  • Gain processing—Specifies whether the gain processing occurs on a host machine or an NI-RIO target. This option is available only if you place a checkmark in the Quantize filter checkbox.
  • Scale by power of 2—Specifies whether this Express VI scales the multirate filter with the original norm value or the smallest power of 2 value that is greater than the norm value. This option is available only if you place a checkmark in the Quantize filter checkbox. If you place a checkmark in the Scale by power of 2 checkbox, this Express VI scales the multirate filter with the smallest power of 2 value. If you remove the checkmark from the Scale by power of 2 checkbox, this Express VI scales the multirate filter with the original norm value.
  • Postprocessing filter gain—Displays the value of the postprocessing gain. Manually multiply the fixed-point output signal by the postprocessing gain to obtain the floating-point output signal or automatically use the DFD FXP MRate Postprocessing VI to handle the postprocessing gain.
TipsDisplays tips and error messages that help you use this Express VI to design a multirate filter.
Update DesignUpdates the floating-point multirate filter design with the specifications you entered. When you click the Update Design button, you enable the Quantize filter option on the Fixed-Point Quantization page.

Block Diagram Outputs

ParameterDescription
error outDescribes the error status that this VI or function produces.
multirate filters outReturns the new multirate filters.
postprocessing filter gainReturns the value of the postprocessing gain. Manually multiply the fixed-point output signal by the postprocessing gain to obtain the floating-point output signal or automatically use DFD FXP MRate Postprocessing VI to handle the postprocessing gain.