Polybench® Reference
First order low pass filter (recursive)

Lowpass Filter

Overview

This is a recursive low-pass filter that supresses signal frequencies higher than the cut-off frequency for all channels at the input seperately.

Operator ports

Input S: Floating point values

Output LP(S): Floating point values

Properties

Find more information about changing properties here: link

CutOffFrequency
type: See description
The cut-off frequency in Hz (must be greater than 0)


TimeConstant
type: See description
The time constant T of the filter in seconds.


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

CutOffFrequency
type: See description
The cut-off frequency in Hz (must be greater than 0)


TimeConstant
type: See description
The time constant T of the filter in seconds.

Details

This filter uses the following formula to supress high frequencies:

y(n) = k * y(n-1) + (1 - k) * x(n)

where k = e ^ ( -1 / ( Fs / (2 * PI * Fc) ) )

with:
Fs is the sample frequency,
PI is 3.1415...,
Fc is the cut-off frequency setting,
x(n) is the input sample value,
y(n) is the output sample value,
y(n-1) is the previous output sample value.


The time constant Tc and the cut-off frequency Fc have the following relation:

Fc = 1 / (2 * PI * Tc)

If the filter setting contains a wrong value (not a number or a wrong number), then the filter symbol will indicate this and will not output a valid signal anymore.

It is not allowed to connect a constant to the input of the filter (since a constant does not have a time component).

Examples

Example: Recursive Filter Demo
Demonstrates the High Pass and Low Pass standard filters
Examples\DF0204020_001_LowpassFilter_Demo.xmc