Digital Low Pass filter

Hello,

I’m trying to implement a digital low pass filter, which should be pretty straightforward, but for some reason it is not working. The output changes to the input value in a single step, regardless of the parameters of the filter. This is my implementation:


lowpassfilter.plecs (11.3 KB)

any ideas? I’m new to PLECs so I’m probably doing something wrong, just can’t spot it.

You should replace the Zero-Order Hold (ZOH) block in the feedback loop with a Delay block. Be sure to set the Sample Time for the Delay block appropriately. The ZOH block samples the input signal, resulting in an algebraic loop, while the Delay delays the input signal by N sample periods, i.e. z^-N, storing N previous values.

1 Like

awesome, that worked, thanks!