LinuxCNC Documentation

SYNOPSIS

loadrt biquad [count=N|names=name1[,name2…​]]

DESCRIPTION

Biquad IIR filter. Implements the following transfer function: H(z) = (n0 + n1z-1 + n2z-2) / (1 + d1z-1 + d2z-2)

FUNCTIONS

biquad.N

PINS

biquad.N.in real in

Filter input.

biquad.N.out real out

Filter output.

biquad.N.enable bool in (default: 0)

Filter enable. When false, the in pin is passed to the out pin without any filtering. A transition from false to true causes filter coefficients to be calculated according to the current type and the describing pin and parameter settings

biquad.N.valid bool out (default: 0)

When false, indicates an error occurred when calculating filter coefficients (require 2>Q>0.5 and f0>sampleRate/2)

biquad.N.type- ui32 in (default: 0)

Filter type determines the type of filter coefficients calculated. When 0, coefficients must be loaded directly from the n0,n1,n2,d1 params. When 1, a low pass filter is created specified by the f0,Q pins. When 2, a notch filter is created specified by the f0,Q pins.

biquad.N.f0 real in (default: 250.0)

The corner frequency of the filter.

biquad.N.Q real in (default: 0.7071)

The Q of the filter.

biquad.N.s1 real out (default: 0.0)

1st-delayed internal state (for debug only)

biquad.N.s2 real out (default: 0.0)

2nd-delayed internal state (for debug only)

PARAMETERS

biquad.N.d1 real rw (default: 0.0)

1st-delayed denominator coef

biquad.N.d2 real rw (default: 0.0)

2nd-delayed denominator coef

biquad.N.n0 real rw (default: 1.0)

non-delayed numerator coef

biquad.N.n1 real rw (default: 0.0)

1st-delayed numerator coef

biquad.N.n2 real rw (default: 0.0)

2nd-delayed numerator coef

AUTHOR

Peter G. Vavaroutsos

LICENSE

GPL