ST_FTR_IIRSos

Configuration structure for the function block FB_FTR_IIRSos.

Syntax

Definition:

TYPE ST_FTR_IIRSos :
STRUCT
    pCoefficientArrayAdr_Sos  : POINTER TO LREAL;
    nCoefficientArraySize_Sos : UDINT;
    bReset                    : BOOL := TRUE;
    nOversamples              : UDINT;
    nChannels                 : UDINT;
    pInitialValues            : POINTER TO LREAL;
    nInitialValuesSize        : UDINT;
END_STRUCT
END_TYPE

Parameter

Name

Type

Description

pCoefficientArrayAdr_Sos

Pointer to LREAL

Pointer to an array with filter coefficients
[b01, b11, b21,a01, a11, a21, b02, b12, b22,a02, a12, a22, ….
b0M, b1M, b2M,a0M, a1M, a2M]

nCoefficientArraySize_Sos

UDINT

Size of the array with filter coefficients in BYTES

bReset

BOOL

If TRUE, a reset is performed when the filter is configured.
If FALSE, the historical values x[n-k] and y[n-k] are not reset.

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)

An example of a filter with 3 biquads might look like this:

aCoeffs_Sos : ARRAY [1..3] OF ARRAY [1..6] OF LREAL :=            
              [ [1, 1, 1, 1, 1, 1],   // [b01,b11,b21,a01,a11,a21]
              [ [1, 1, 1, 1, 1, 1],   // [b02,b12,b22,a02,a12,a22]
              [ [1, 1, 1, 1, 1, 1]];  // [b03,b13,b23,a03,a13,a23