Version:

Last Modified: June 25, 2019

Estimates the Butterworth filter order.

The type of filter that this node estimates.

Name | Description |
---|---|

Lowpass | Estimates a lowpass filter. |

Highpass | Estimates a highpass filter. |

Bandpass | Estimates a bandpass filter. |

Bandstop | Estimates a bandstop filter. |

**Default: **Lowpass

Band edge frequencies of the filter, in Hz.

First passband edge frequency in Hz.

**Default: **0.2

First stopband edge frequency in Hz.

**Default: **0.3

Second passband edge frequency in Hz. The node ignores this input for lowpass and highpass filters.

**Default: **0

Second stopband edge frequency, in Hz. The node ignores this input for lowpass and highpass filters.

**Default: **0

Ripple level in the passband and stopband of the filter.

Ripple level in the passband.

**Default: **0.1

Ripple level in the stopband.

**Default: **60

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

The sampling frequency in Hz.

This value must be greater than zero.

**Default: **1.0 Hz, which is the normalized sampling frequency

Minimum order value that the filter requires to meet the specifications you set.

Low cutoff frequency. The cutoff frequency corresponds to the half-power frequency or the 3 dB frequency.

High cutoff frequency. The cutoff frequency corresponds to the half-power frequency or the 3 dB frequency.

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

This node uses the following equations to estimate the order of a Butterworth filter:

$N=\lceil \frac{\mathrm{ln}({\epsilon}_{s}/{\epsilon}_{p})}{\mathrm{ln}({\mathrm{\Omega}}_{s}/{\mathrm{\Omega}}_{p})}\rceil $

where

*N*is the estimated order*A*_{p}is the passband ripple in dB*A*_{s}is the stopband ripple in dB- $\lceil \rceil $ means Round Toward + Infinity

The following table lists the equations for calculating ${\mathrm{\Omega}}_{p}$ and ${\mathrm{\Omega}}_{s}$ for different types of filters:

Filter Type | Equation |
---|---|

Lowpass filter | ${\mathrm{\Omega}}_{p}={\mathrm{\Omega}}_{p1}$ ${\mathrm{\Omega}}_{s}={\mathrm{\Omega}}_{s1}$ |

Highpass filter | ${\mathrm{\Omega}}_{p}=1/{\mathrm{\Omega}}_{p1}$ ${\mathrm{\Omega}}_{s}={1/\mathrm{\Omega}}_{s1}$ |

Bandpass filter | $\begin{array}{c}{\mathrm{\Omega}}_{p}={\mathrm{\Omega}}_{p2}-{\mathrm{\Omega}}_{p1}\end{array}$ $\begin{array}{c}{\mathrm{\Omega}}_{s}=\mathrm{min}\left(|{\mathrm{\Omega}}_{s1}-\frac{{\mathrm{\Omega}}_{p1}{\mathrm{\Omega}}_{p2}}{{\mathrm{\Omega}}_{s1}}|,|{\mathrm{\Omega}}_{s2}-\frac{{\mathrm{\Omega}}_{p1}{\mathrm{\Omega}}_{p2}}{{\mathrm{\Omega}}_{s2}}|\right)\end{array}$ |

Bandstop filter | $\begin{array}{c}{\mathrm{\Omega}}_{p}=\mathrm{max}\left(\left|\frac{1}{{\mathrm{\Omega}}_{p1}-\frac{{\mathrm{\Omega}}_{s1}{\mathrm{\Omega}}_{s2}}{{\mathrm{\Omega}}_{p1}}}\right|,\left|\frac{1}{{\mathrm{\Omega}}_{p2}-\frac{{\mathrm{\Omega}}_{s1}{\mathrm{\Omega}}_{s2}}{{\mathrm{\Omega}}_{p2}}}\right|\right)\end{array}$ $\begin{array}{c}{\mathrm{\Omega}}_{s}=\frac{1}{{\mathrm{\Omega}}_{s2}-{\mathrm{\Omega}}_{s1}}\end{array}$ |

where the various $\mathrm{\Omega}$ values equal as follows:

${\mathrm{\Omega}}_{p1}=\mathrm{tan}(\pi *\frac{\mathrm{lower\; pass\; frequency}}{\mathrm{sampling\; frequency}})$

${\mathrm{\Omega}}_{p2}=\mathrm{tan}(\pi *\frac{\mathrm{higher\; pass\; frequency}}{\mathrm{sampling\; frequency}})$

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application