ST_FTR_Notch

Configuration structure for the function block FB_FTR_Notch.

Syntax

Definition:

TYPE ST_FTR_Notch :
STRUCT
    fNotchFrequency    : LREAL;
    fQ                 : LREAL;
    fSamplingRate      : LREAL;
    nOversamples       : UDINT;
    nChannels          : UDINT;
    pInitialValues     : POINTER TO LREAL;
    nInitialValuesSize : UDINT;
END_STRUCT
END_TYPE

Parameter

Name

Type

Description

fNotchFrequency

LREAL

Notch frequency in Hz (greater than 0 and less than fSamplingRate/2)

fQ

LREAL

Q-factor = fNotchFrequency/bandwidth (greater than zero)

fSamplingRate

LREAL

Sampling rate fs in Hz (greater than zero)

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)

Configuration example

For example, you want to create a notch filter that strongly attenuates the frequency 100 Hz. In doing so, you allow a one-sided bandwidth of 10 Hz around these 100 Hz, i.e. you expect the -3 dB limit at 90 Hz and 110 Hz. Define for this:

fNotchFrequency := 100;
fQ := 10; (* B = fNotchFrequency/fQ = 10 Hz *)