Classical Filter Design Express VI

Digital Filter Design VIs and Functions

Classical Filter Design Express VI

Owning Palette: Filter Design VIs

Installed With: Digital Filter Design Toolkit

Creates a lowpass, highpass, bandpass, or bandstop filter interactively.

Details  

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

Dialog Box Options

ParameterDescription
Main SettingsContains the following options:
  • Filter type—Specifies the type of filter that this VI creates. The valid values include Lowpass, Highpass, Bandpass, and Bandstop. The default is Lowpass.
  • Filter Specifications—Contains the following options:
    • Sampling frequency—Specifies the sampling frequency of the filter in hertz. This input must contain a value greater than zero. The default is 1k Hz.
    • Passband edge frequency 1—Specifies the first passband edge frequency of the filter in hertz. This input must contain a value greater than zero and less than the Nyquist frequency. If you set Filter type to Lowpass or Bandstop, the default is 100 Hz. If you set Filter type to Highpass or Bandpass, the default is 200 Hz.
    • Passband edge frequency 2—Specifies the second passband edge frequency of the filter in hertz. This input must contain a value greater than Passband edge frequency 1 and less than the Nyquist frequency. This input is not available for lowpass or highpass filters. If you set Filter type to Bandpass, the default is 300 Hz. If you set Filter type to Bandstop, the default is 400 Hz.
    • Passband ripple—Specifies the passband ripple of the filter in units that the Magnitude in dB option determines. If you place a checkmark in the Magnitude in dB checkbox, this input must contain a value greater than zero. The default is 0.1 dB. If you remove the checkmark from the Magnitude in dB checkbox, the valid range of this input is (0, 1). The default then is 0.011447.
    • Stopband edge frequency 1—Specifies the first stopband edge frequency of the filter in hertz. If you set Filter type to Lowpass or Bandstop, this input must contain a value greater than Passband edge frequency 1 and less than the Nyquist frequency. The default is 200 Hz. If you set Filter type to Highpass or Bandpass, this input must contain a value greater than zero and less than Passband edge frequency 1. The default then is 100 Hz.
    • Stopband edge frequency 2—Specifies the second stopband edge frequency of the filter in hertz. If you set Filter type to Bandpass, this input must contain a value greater than Passband edge frequency 2 and less than the Nyquist frequency. The default is 400 Hz. If you set Filter type to Bandstop, this input must contain a value greater than Stopband edge frequency 1 and less than Passband edge frequency 2. The default then is 300 Hz. This input is not available for lowpass or highpass filters.
    • Stopband attenuation—Specifies the stopband attenuation of the filter in units that the Magnitude in dB option determines. If you place a checkmark in the Magnitude in dB checkbox, this input must contain a value greater than zero. The default is 60 dB. If you remove the checkmark from the Magnitude in dB checkbox, the valid range of this input is (0, 1). The default then is 0.001.
  • Design method—Specifies the method that this Express VI uses to design the filter. Options include Butterworth, Chebyshev, Inverse Chebyshev, Elliptic, Kaiser Window, Dolph-Chebyshev Window, and Equi-Ripple FIR. The default is Elliptic.
Design FeedbackContains the following options:
  • Filter order—Returns the order of the designed filter.
  • Error message—Contains details about errors that occur during filter creation.
Magnitude in dBSpecifies 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.
PassbandSpecifies the color of the lines in the magnitude plot that represent the passband response and the passband frequencies. The default is blue. Click the color box next to the parameter name to select a different color.
StopbandSpecifies the color of the lines in the magnitude plot that represent the stopband attenuation and the stopband frequencies. The default is red. Click the color box next to the parameter name to select a different color.
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 frequencies. The color you specify in Stopband represents the stopband attenuation and the stopband frequencies. The green vertical line in the graph represents the half sampling frequency, also known as the Nyquist frequency.
Z-PlaneContains the plot of the zeroes and poles of the filter in the z-plane.

Block Diagram Inputs

ParameterDescription
error in (no error)Describes error conditions that occur before this VI or function runs.

Block Diagram Outputs

ParameterDescription
filter outReturns the new filter.
error outContains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.

Classical Filter Design Details

As you define a filter specification, you must adhere to a set of rules to maintain valid specifications. If any violations to the rules occur, the Error message indicator of the Configure Classical Filter Design dialog box displays a message with suggestions for repositioning the cursors. The rules are as follows:

  • Keep horizontal cursors in the range (0, 1) in a linear scale or (–inf, 0 dB) in a logarithmic scale.
  • Keep the horizontal passband cursor above the horizontal stopband cursor.