2.11.9 dfilter(Pro)

Menu Information

Analysis : Signal Processing : IIR Filter

Brief Information

Create and apply an IIR filter

Additional Information

Minimum Origin Version Required: Origin 9.0 SR0

This feature is for OriginPro only.

Command Line Usage

dfilter method:=cheby1 order:=5 sample:=1000 wn:=50 filtfilt:=1 coef:=[<input>]<new>;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Signal iy

Input

XYRange

<active>
Specify the input signal.
Response Type type

Input

int

0
Specify the response type of filter.

Option list:

  • low:Low Pass
    Allow low frequency components to pass.
  • high:High Pass
    Allow high frequency components to pass.
  • bandpass:Band Pass
    Allow frequency components within a specified range to pass.
  • bandstop:Band Stop
    Allow frequency components outside a specified range to pass.
Method method

Input

int

0
Specify the filter design method.

Option list:

  • butter:Butterworth
    Butterworth filter design.
  • cheby1:Chebyshev Type I
    Chebyshev Type I filter design.
  • cheby2:Chebyshev Type II
    Chebyshev Type II filter design.
  • elliptic:Elliptic
    Elliptic filter design.
Filter Order order

Input

double

10
Specify the filter order.
Unit unit

Input

int

0
Specify the unit for the frequency settings.

Option list:

  • hz:Hz
    Use Hz as the unit when specifying the frequency specification.
  • normalize:Normalize to (0,1)
    The specified frequency is normalized to the region from 0 to 1. It is calculated by Frequency(Hz)/(SampleFrequency(Hz)/2), where SampleFrequency(Hz)/2 is the Nyquist frequency.
Sample Frequency (Fs) sample

Input

double

<auto>
Specify the sampling frequency, available when the Unit is Hz.
Cutoff Frequency (Fc) wn

Input

double

<auto>
When Filter Order is specified (not minimum), this variable is used to specify the cutoff frequency for the low pass and high pass.
Cutoff Frequency 1 (Fc1) wn1

Input

double

<auto>
When Filter Order is specified (not minimum), this variable is used to specify the first cutoff frequency for the band pass and band stop.
Cutoff Frequency 2 (Fc2) wn2

Input

double

<auto>
When Filter Order is specified (not minimum), this variable is used to specify the second cutoff frequency for the band pass and band stop.
Pass Frequency wp

Input

double

<auto>
When Filter Order is minimum, this variable is used to specify the pass frequency for the low pass and high pass.
Stop Frequency ws

Input

double

<auto>
When Filter Order is minimum, this variable is used to specify the stop frequency for the low pass and high pass.
Pass Frequency 1 wp1

Input

double

<auto>
When Filter Order is minimum, this variable is used to specify the first pass frequency for the band pass and band stop.
Stop Frequency 1 ws1

Input

double

<auto>
When Filter Order is minimum, this variable is used to specify the first stop frequency for the band pass and band stop.
Pass Frequency 2 wp2

Input

double

<auto>
When Filter Order is minimum, this variable is used to specify the second pass frequency for the band pass and band stop.
Stop Frequency 2 ws2

Input

double

<auto>
When Filter Order is minimum, this variable is used to specify the second stop frequency for the band pass and band stop.
Passband Ripple rp

Input

double

1
Specify the pass band ripples in dB.
Stopband Attenuation rs

Input

double

80
Specify the stop band attenuation in dB.
Forward-Backward Filtering filtfilt

Input

int

0
Specify whether to perform both forward and backward filtering on the input signal.
SOS Matrix sos

Output

ReportData

[<input>]<new>
Output the designed IIR filter as the second order section (SOS) parameters form.
Zeros Poles and Gain zpk

Output

ReportData

[<input>]<new>
Output the designed IIR filter as the zero-pole-gain form.
State-Space Form abcd

Output

ReportData

[<input>]<new>
Output the designed IIR filter as the state-space form.
Coefficients coef

Output

ReportData

[<input>]<new>
Output the designed IIR filter as the numerator coefficients and the denominator coefficients.
Output Signal oy

Output

XYRange

(<input>,<new>)
The output signal after filtering by the designed IIR filter.

Examples

This example will show how to perform high pass with Butterworth method.

  1. Create a new project and import the data file <Origin Installation Directory>\Samples\Signal Processing\EMG Recording.dat.
  2. Highlight column B, and make a line plot by menu Plot: Line: Line.
    IIR Example 1.png
  3. Activate the graph, select menu Analysis: Signal Processing: IIR Filter to open the dialog, and then set the parameters as the following image shows.
    Response Type: High Pass
    Filter Order: 6
    Cutoff Frequency (Fc): 20
    Forward-Backwrad Filtering: checked
    IIR Example 2.png
  4. Click the OK button, the result will plot together with the original signal. Zoom in the graph between about from 12.1 to 13.5. The result is shown in the following image.
    IIR Example 3.png

More Information

For more information, please refer to our User Guide.

Related X-Functions

fft_filters, dfilterfcf


Keywords:infinite impulse response, signal, remove noise