Is input shaping implemented as a FIR-filter?

Hi everyone,

I’m curious about the implementation details of input shaping.

According to Wikipedia:

Input shaping is implemented by convolving a sequence of impulses, known as an input shaper, with any arbitrary command.

Does it mean that input shaper is just a FIR-filter from the digital signal processing (DSP) world? Or is it more complicated than that?

I guess purely in a “math sense” input shaping in Klipper could be called a “FIR filter” - in that input shaping “filters” the input and it has a “finite response”.

Typically, when I think of a FIR filter, I think of a bunch of multiplication and addition on a discrete set of values. However, the Klipper kinematics works with continuous acceleration and velocity curves. So, Klipper’s input shaper is still a bunch of multiplication and summing, but not over a set of discrete values.

The core implementation is at klipper/klippy/chelper/kin_shaper.c at master · Klipper3d/klipper · GitHub

Cheers,
-Kevin

1 Like