I suppose this is the first time programing topic came up on this blog. Probably not the last time, since this is what I do most of the time.
- computes P-term
- computes I-term
- computes D-term
- has output limiting
- has I-term accumulator limiting
Without further ado
In the example above, PID controller was configured with following settings:
- Target value: 1.5
- Gains: P = 16, I = 6, D = 4
- Output limited at 0 and 97
- I-term accumulator limited at 0 and 90
Then, to compute controller output
Remark: this is negative feedback output PID controller. That means, its output should me used as dampening factor for the system. It acts like a brake. To work as positive feedback, it’s output should be reversed.