Scroll to navigation

LOWPASS(9) HAL Component LOWPASS(9)

NAME

lowpass - Low-pass filter

SYNOPSIS

loadrt lowpass [count=N|names=name1[,name2...]]

FUNCTIONS

PINS



out += (in - out) * gain
When TRUE, copy in to out instead of applying the filter equation.

PARAMETERS

NOTES

gain pin setting

The digital filter implemented is equivalent to a unity-gain continuous-time single-pole low-pass filter that is preceded by a zero-order-hold and sampled at a fixed period. For a pole at -a (radians/seconds) the corresponding continuous-time lowpass filter LaPlace transfer function is:

H(s) = a/(s + a)

For a sampling period T (seconds), the gain for this Hal lowpass component is:

gain = 1 - e^(-a * T)

e = 2.71828 https://en.wikipedia.org/wiki/E_(mathematical_constant)

Examples:
T = 0.001 seconds (typical servo thread period)
a = (2*pi*100) (100Hz bandwidth single pole)
gain = 0.466


T = 0.001 seconds (typical servo thread period)
a = (2*pi*10) ( 10Hz bandwidth single pole)
gain = 0.0609


T = 0.001 seconds (typical servo thread period)
a = (2*pi*1) ( 1Hz bandwidth single pole)
gain = 0.0063

AUTHOR

Jeff Epler

LICENSE

GPL

2024-07-13 LinuxCNC Documentation