Electronic – Should the error term of PID be normalized

control systemcontrol theorypid controllersignal-theorytheory

By "normalized", I mean +/-1 ~= the maximum error the system can reasonably be expected to experience, or divided by the setpoint.

Background: I am working on a PID controller for an SSR heater which is very responsive (5°C/s up, 0.5-1°C/s cooldown). The setpoint is in the range 100-400°C. In code, this is implemented as:

$$u(t) = K_pe(t) + K_i\sum_{t}e(t) dt + K_d[e(t)-e(t_{-1})]dt^{-1} + K_k$$

(Summation is just an accumulator and Kk is a small steady-state correction)

This form is pretty common in a lot of the open-source PID code out there. However, it occurred to me that if I were to switch to °F, suddenly my K terms would be off by 1.8. This does not feel very mathematically "pure" to me. Furthermore, I found when trying to Ziegler-Nichols tune it, my critical oscillation is ~24s, but when I put this as Ki, I got wild fluctuations. After some digging, I found the equation listed as

$$u(t) = K_c\left( e(t) + \frac{1}{T_i}\sum_{t}e(t) dt + {T_d}\Delta e(t)dt^{-1} + K_k \right)$$

And I had a lightbulb moment. Is this the more "pure" form to use? This makes more sense when dealing with transfer function analysis and the like.

Best Answer

If e(t) and u(t) are nondimensionalized then Kp is unitless, Ki has units of time^-1 and Kd has units of time. Otherwise they have units from the process.

In the second formulation you've made a mistake. This is the one to use.

$$u(t) = K_c\left( e(t) + \frac{1}{T_i}\sum_{t}e(t) dt + T_d\Delta e(t)dt^{-1}\right) + K_k $$

Then Kc has units from the process and Ti and Td have units of time. This is good because Ti and Td are on the same scale and only Kc has process units. e(t) and u(t) do not need to be normalized because just Kc relates their units.