LOWPASS(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– LOWPASS(9) πŸ’–

okay bestie, so this is lowpass β€” a HAL component, aka a Low-pass filter. yes it's giving very "smooth out the chaos" and honestly? iconic. it lets the chill frequencies through and tells the spiky ones to take a nap. πŸ¦‹


✨ NAME ✨

lowpass β€” Low-pass filter πŸ’…


🌸 SYNOPSIS 🌸

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

like, that's it. that's the whole vibe. load it with count=N if you just want N copies, or names=name1[,name2...] if you're a name-your-children type. no cap. πŸŽ€


πŸ”₯ FUNCTIONS πŸ”₯

  • lowpass.N β€” this one requires a floating-point thread fr fr, don't try to run it anywhere else, it will simply not eat.

πŸ’œ PINS πŸ’œ

  • lowpass.N.in float in β€” the input, the raw tea coming in β˜•
  • lowpass.N.out float out β€” the output, all smoothed and demure:
out += (in - out) * gain
  • lowpass.N.load bit in β€” when this is TRUE, it just copies in to out instead of applying the filter equation. so it's like "skip the math, we're going direct." 🫢

πŸŽ€ PARAMETERS πŸŽ€

  • lowpass.N.gain float rw β€” the gain, read-write, the little number that decides how much smoothing happens. you control the vibe here. πŸ‘‘

🧚 NOTES 🧚

gain pin setting

so the way this digital filter works? it's 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. periodt.

for a pole at -a (radians/seconds), the corresponding continuous-time lowpass filter LaPlace transfer function is:

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

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

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

where

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

(that's the mathematical constant, bestie, not your ex.)

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

see how the gain gets smaller as the bandwidth drops? that's the whole point ✨ narrower bandwidth = more smoothing = teenier gain. it's giving math but make it fashion.


πŸ‘‘ AUTHOR πŸ‘‘

Jeff Epler


🌈 LICENSE 🌈

GPL


okay that's the whole page, hope that slayed for you πŸ’– this little cutie is part of the LinuxCNC Documentation, dated 2026-03-17, and it lives in the HAL Component section as LOWPASS(9). go forth and filter, my love πŸ¦‹πŸŽ€βœ¨

πŸ“¦ where this page comes from