ILOWPASS(9)

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

πŸ’– ILOWPASS β€” the low-pass filter with integer ins and integer outs πŸ’–

okay bestie, this is a HAL Component page from the 9 section, and honestly? it's a little icon of a thing. it takes integers in, it takes integers out, and in between it just... vibes. smoothly. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

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

that's it. that's the whole summoning ritual. count=N if you want N of them, or names=name1[,name2...] if you're feeling specific about what you call your babies. πŸŽ€


🌸 DESCRIPTION 🌸

so like, this component could be used for other stuff, but fr fr it was written for one specific glow-up: making motion smoother while you're jogging with an MPG. no cap. πŸ•ΉοΈ

here's the tea β˜• β€” on a machine with high acceleration, a short jog can basically act like a step function. brutal. jumpy. it's giving "why is my machine yelling at me." 😭

the fix? slide the ilowpass component between the MPG encoder counts output and the axis jog-counts input, and suddenly everything is smoothed out. main character energy for your motion. πŸ’…

now pay attention because these two choices actually matter:

  • choose scale conservatively so that during a single session there will never be more than about 2e9/scale pulses seen on the MPG πŸ‘‘
  • choose gain according to the smoothing level you want 🧚

and then β€” and this is the part people forget β€” divide the axis.N.jog-scale values by scale. do not skip that. do not.


πŸ”₯ FUNCTIONS πŸ”₯

ilowpass.N (requires a floating-point thread)

⚠️ bestie it requires a floating-point thread. it's not optional. it will not run in an integer thread. periodt.

Update the output based on the input and parameters. simple as. ✨


πŸŽ€ PINS πŸŽ€

  • ilowpass.N.in s32 in β€” the input. an integer. it arrives. πŸ’Œ
  • ilowpass.N.out s32 out β€” the output. also an integer.

out tracks in*scale through a low-pass filter of gain per period. so it's following the input, but it's doing it chill. it's the friend who doesn't sprint everywhere. πŸ¦‹


πŸ’œ PARAMETERS πŸ’œ

  • ilowpass.N.scale float rw (default: 1024) β€” a scale factor applied to the output value of the low-pass filter. ✨
  • ilowpass.N.gain float rw (default: .5) β€” together with the period, this sets the rate at which the output changes. useful range is between 0 and 1, and higher values make the input value get tracked more quickly. for instance, a setting of 0.9 causes the output value to go 90% of the way towards the input value in each period. she moves fast. πŸƒβ€β™€οΈπŸ’¨
🌈 lowkey the mental model here: gain = how eager out is to catch up to in. 0? it's not moving, it's just existing. 1? instant, no smoothing, why are you even here. pick somewhere in between and enjoy the butter. 🧈

πŸ‘‘ AUTHOR πŸ‘‘

Jeff Epler


πŸ“œ LICENSE πŸ“œ

GPL


okay that's the whole page, bestie, go forth and smooth your jogs πŸ’–πŸ¦‹πŸŒΈβœ¨

this was LinuxCNC Documentation, dated 2026-03-17, and you were reading ILOWPASS(9) β€” slay, thanks for coming to my ted talk, ily πŸ«ΆπŸŽ€
πŸ“¦ where this page comes from