ST_FTR_IIRSpec

Configuration structure for the function block FB_FTR_IIRSpec.

Syntax

Definition:

TYPE ST_FTR_IIRSpec :
STRUCT
    eFilterName        : E_FTR_Name;
    eFilterType        : E_FTR_Type;
    nFilterOrder       : UDINT;
    fCutoff            : LREAL;
    fBandwidth         : LREAL;
    fPassBandRipple    : LREAL;
    fSamplingRate      : LREAL;
    nOversamples       : UDINT;
    nChannels          : UDINT;
    pInitialValues     : POINTER TO LREAL;
    nInitialValuesSize : UDINT;
END_STRUCT
END_TYPE

Parameters

Name

Type

Description

eFilterName

E_FTR_Name

Describes the filter implementation (Butterworth, Chebyshev, Bessel)

eFilterType

E_FTR_Type

Describes the filter type (high-pass, low-pass, …)

nFilterOrder

UDINT

Filter order (max. 20 for high-pass and low-pass, max. 10 for band-pass and band-stop)

fCutoff

LREAL

Cut-off frequency in Hz (greater than 0 and less than fSamplingRate/2)

fBandwidth

LREAL

Bandwidth in Hz with respect to band-pass and band-stop.

fPassbandRipple

LREAL

Passband ripple of the amplitude response in the passband of the filter in dB (greater than 0)

fSamplingRate

LREAL

Sampling rate fs in Hz

nOversamples

UDINT

Number of oversamples (greater than zero)

nChannels

UDINT

Number of channels (greater than zero and less than 101)

pInitialValues

Pointer to LREAL

Pointer to array with initial values (optional)

nInitialValuesSize

UDINT

Size of the array with initial values in BYTE (optional)

Notes on the influence of the parameters on the Butterworth, Chebyshev and Bessel type filters can be found here: Filter types and parameterization.