Skip to content

Integral contribution starts at upper output limit (possible pilot error) #93

Description

@jerrys987

Hi,
I am trying to use simple-pid for a proportional heating setup. I create the pid, then start it with the following:

        self.pid = PID(Kp, Ki, 0, setpoint=self.setpoint)
        self.pid.time_fn = self.get_update_time
        self.pid.output_limits = (0, 1)

        self.pid.set_auto_mode(True, last_output=last_output)

here is the dump of a couple heating zones:
Zone in control target temp temp delta (+ is above) pid output (0-1) pid Kp pid Ki pid current prop pid current int
mbed_heat True 22.0 -1.7 1.0 0.25 0.0005 0.425 1.000
mbath_heat True 22.0 -1.8 1.0 0.25 0.0005 0.450 1.000

My problem is that no matter how small I make Ki, the integral component of the output is always 1. I would expect it to be very close to 0, given the small Ki. The Kp contribution to the output looks right.
I run my own time function because the pid loop is asynchronous and I want to give it the pid the time of the reading rather than now. I look at the function return time and it seems reasonable.

Running on ubuntu, simple-pid==2.0.1, Python 3.12.3
hope someone can help me understand what is going on.
jerry

Activity

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