# Digital Low Pass filter

**URL:** <https://forum.plexim.com/t/digital-low-pass-filter/1679>\
**Category:** PLECS\
**Tags:** filters\
**Created:** [January 14, 2025, 4:45pm UTC](https://forum.plexim.com/t/digital-low-pass-filter/1679 "2025-01-14T16:45:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![javiervara](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@javiervara](https://forum.plexim.com/u/javiervara)\
**Post date:** [January 14, 2025, 4:45pm UTC](https://forum.plexim.com/t/digital-low-pass-filter/1679/1 "2025-01-14T16:45:41Z")

</div>

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:

 ![image](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/9/9800a63b316779ef920a1d8c600e03687ba1e487.png)  
[lowpassfilter.plecs](https://forum.plexim.com/uploads/short-url/d8hmPNYVw0pCGM40cQuc66ONzJN.plecs) (11.3 KB)

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

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [January 16, 2025, 7:50pm UTC](https://forum.plexim.com/t/digital-low-pass-filter/1679/2 "2025-01-16T19:50:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![javiervara](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@javiervara](https://forum.plexim.com/u/javiervara)\
**Post date:** [January 17, 2025, 10:50am UTC](https://forum.plexim.com/t/digital-low-pass-filter/1679/3 "2025-01-17T10:50:37Z")

</div>

awesome, that worked, thanks!
