# Default \[extruder\] smooth\_time is too long causing temperature oscillations

**URL:** <https://klipper.discourse.group/t/default-extruder-smooth-time-is-too-long-causing-temperature-oscillations/699>\
**Category:** General Discussion\
**Created:** [August 13, 2021, 3:05pm UTC](https://klipper.discourse.group/t/default-extruder-smooth-time-is-too-long-causing-temperature-oscillations/699 "2021-08-13T15:05:04Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [September 1, 2021, 9:20pm UTC](https://klipper.discourse.group/t/default-extruder-smooth-time-is-too-long-causing-temperature-oscillations/699/21 "2021-09-01T21:20:21Z")

</div>

> [@ReXT3D](#):
>
> Derivative smoothing / filtering would be very important in a mechanical system in order to avoid unnecessary wear on actuators caused by wild swings in the PID controller output command driven by raw derivative noise.

FWIW, the goal of `smooth_time` is to avoid oscillations due to a derivative response to noise. That is, if the actual temperature is 200 and a noisy reading returns 195, we want to avoid having the PID turn the heater full on to account for that massive (not real) change in temperature - turning the heater full on could lead to later high temperatures which then cause the inverse to occur and thus results in oscillations.

It does seem, however, that many boards have a relatively clean temperature signal and thus the downsides to smoothing (slower response) outweigh the advantages.

> [@ReXT3D](#):
>
> I think, however, it is useful to retain the filter code in Klipper even if the decision is made to remove it.

I don’t have any plans to remove the smoothing code. I think there may be a better default (in particular, a default of no smoothing).

Thanks.  
-Kevin

---

<div class="post-metadata">

**Author:** ![koconnor](https://avatars.discourse-cdn.com/v4/letter/k/aca169/32.png) [@koconnor](https://klipper.discourse.group/u/koconnor)\
**Post date:** [September 1, 2021, 9:31pm UTC](https://klipper.discourse.group/t/default-extruder-smooth-time-is-too-long-causing-temperature-oscillations/699/22 "2021-09-01T21:31:17Z")

</div>

> [@Piezo](#):
>
> ```auto
> SAMPLE_TIME = REPORT_TIME / (SAMPLE_COUNT + 1)
> 
> ```

At a high-level, that is what Marlin does. I don’t think that’s a good choice. It delays the PID response (each temperature is behind by up to 300ms). I also find it confusing - I’d like to know the temperature at a given time - it seems odd to me to report an average temperature over an extended time period. Sampling over extended periods may reduce some noise due to averaging out of low-frequency harmonics, but I’d be surprised it would be significant.

> [@Piezo](#):
>
> `REPORT_TIME = 0.100`

That does two things - it increases the PID update frequency and it reduces the time the host has to respond to a PID update. The latter would make “timer too close” errors more likely. I’m not sure the former has a significant gain. It shouldn’t be necessary to change heater rates 10 times a second - 3 times a second should be fine - heck once every 2-3 seconds should be fine.

Cheers,  
-Kevin

---

<div class="post-metadata">

**Author:** ![ReXT3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/rext3d/32/200_2.png) [@ReXT3D](https://klipper.discourse.group/u/ReXT3D)\
**Post date:** [September 4, 2021, 10:31pm UTC](https://klipper.discourse.group/t/default-extruder-smooth-time-is-too-long-causing-temperature-oscillations/699/23 "2021-09-04T22:31:20Z")

</div>

For the sake of keeping all the information together, this is an example of some of the information I was going through when experimenting with the PID and derivative filtering:

[Signal filtering: Why and how](https://www.controlglobal.com/assets/digital_edition/2019/July/filtering.pdf)

Among other things, it provides good insight into how a moving average filter performs. Note that is also suggests that the rolling average filter is preferential to the more commonly used first order filter.

Peter.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [July 5, 2026, 11:50am UTC](https://klipper.discourse.group/t/default-extruder-smooth-time-is-too-long-causing-temperature-oscillations/699/24 "2026-07-05T11:50:50Z")

</div>

Closed on July 5, 2026, 11:50am UTC



[Previous page](https://klipper.discourse.group/t/default-extruder-smooth-time-is-too-long-causing-temperature-oscillations/699.md?page=1)
