FB_FirstOrderDigitalFilter

 Function Block - Defined to filter an Analog signal.

Inputs

Input

Data Type

Range

Unit

Default

Description

EN

BOOL

No range

N/A

No default

Enables execution.

Used in the FFLD editor only.

AnalogInput

INT

No range

N/A

No default

Analog Input from transducer.

FilterGain

REAL

1 - 0.05

N/A

No default

Filter gain.

Outputs

Output

Data Type

Range

Unit

Description

OK

BOOL

0 to 1

N/A

Execution successful.

FilterOutput

REAL

0 to 1

N/A

Filtered analog input value.

Remarks

In any control system with an analog feedback signal present, there is the risk of unwanted noise and jitter that can compromise the signal integrity yielding a less the desirable system.

  • This Kollmorgen UDFB provides a digital first order filter of an analog feedback signal from an LVDT, tension transducer, potentiometer, encoder, resolver, or some other like device.
  • The amount of filtering is based on a gain value and can provide no filter to full filter conditioning.

This image shows the function or function block I/O.

Figure 1: CBS First Order Digital Filter

Usage

When using this UDFB, the Enable (EN) input should always be energized to provide the desired filtering.

  • The AnalogInput input is the unfiltered analog feedback signal from an LVDT, tension transducer, potentiometer, or some other like device.
  • The FilterGain defines the amount of filtering to be used.
    • The range of the gain is from 1.0 or no filtering to 0.05 or the maximum filtering.
  • The FilterOutput is the filtered analog input.
    • It is used as an input to some other function block or UDFB that has an analog input (e.g., the MCFB_GearedWebTension UDFB).
  • The implementation of the digital first order filter is for PLCopen.
  • The equation is defined as: Input*Gain+Output*(1-Gain) = Output.
  • The steady state filter delay with a gain of 0.8 is shown in the Filter Input Delay table.

Filter Input Delay

Filter Delay Tn

In this table:

  • The numbers of filter delays for a steady state analog input at a given gain are listed.
  • The range of the filter gain is between 1.00 and 0.05.
  • For a filter gain of 0.8 there is a delay of 15 time constants with a time constant defined as the rate the UDFB is scanned or executed in the application.
    • Example: If the UDFB was executed every millisecond a gain of 0.8 would provide a filter delay of 15ms.
    • Conversely a gain of 1.00 provides zero filtering and the output signal follows the input signal, and a gain of 0.05 provides the most filtering for 463 ms.

Example: Filter Input Lag - Random Input

A real world analog input is most always a varying feedback signal.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//Filter analog input signal with a gain of 0.8 to remove noise
FilteredOutput:= Inst_FB_FirstOrderDigitalFilter( AnalogInput1Value, 0.8 );