Skip to content

I contribution always at peak, no reaction to Ki setting #116

Closed

Description

@denkmalnach

Hi there,

I just stumpled over a problem with my first PID setup. I activated the diagnostic sensors, to see the contribution of the different parts.

What ever I choose for Ki the I contribution is always 3,0 when there is any error. Even with Ki=0 this behavior is not changing, which should deactivate the I contribution, as far as I understand the PID process.

I got a setup with a temperature sensor in a water boiler, that is heated by 3 x 3 kW electric heater.
I set up the output min / max to 0 / 3, and use an automation to turn the heaters on and off, according to the output.

greetings
Christian

Activity

  1. bvweerd commented on Oct 3, 2025

    @bvweerd
    Owner

    Hi,

    Please start with windup protection off, and very small values for k,i,d as a test.

    Note that if your error is bigger than the boundaries you gave, it's not going anywhere.

    Please upload your diagnostics info if we need to dig deeper.

  2. denkmalnach commented on Oct 5, 2025

    @denkmalnach
    Author

    thx for the hint, i figured it out. the windup protection off was the right clue, so i could see the I contribution reacting better. I also had to increase my sample time, since the process is really slow.
    seems like the option 'windup protection' clips off the I contribution to output max, but internally it can rise much higher, is this so?
    Is there a easy way to restart the controller, so it can start with the desired start mode (for instance Zero Start)? I must confess, that I restarted the hole home assistant to achive this.

  3. bvweerd commented on Oct 6, 2025

    @bvweerd
    Owner

    thx for the hint, i figured it out. the windup protection off was the right clue, so i could see the I contribution reacting better. I also had to increase my sample time, since the process is really slow.

    Great!

    seems like the option 'windup protection' clips off the I contribution to output max, but internally it can rise much higher, is this so?

    No — in the simple-pid library, the windup protection (via output_limits) does not just clip the final output while letting the internal I-term keep rising.

    Instead, when output_limits are set, both the output and the integral term are clamped within those limits. That means the integrator cannot continue to accumulate beyond the defined range — it’s actively constrained to prevent windup.

    More info here: https://simple-pid.readthedocs.io/en/latest/user_guide.html#user-guide

    Is there a easy way to restart the controller, so it can start with the desired start mode (for instance Zero Start)? I must confess, that I restarted the hole home assistant to achive this.

    Yes, set auto-mode to off and on again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions