# How to tune PID parameters to track a family of reference signals?

I have a system that is controlled by a PID controller. I tune the controller to track a reference signal that is a unit step function. Is there a way to extend the obtained results to be able to track any step function with arbitrary start end end value that occurs at an arbitrary time instant?

• Welcome to DSP.SE! Provided your DC gain is correct and there are no nonlinearities to contend with, having a good response to a unit step should mean arbitrary step functions with arbitrary DC offsets should track well also. Is there are a reason you believe otherwise? – Peter K. Nov 30 '15 at 18:50
• OK. And what should you do in the case of a nonlinear system? Use gain scheduling (different PID constants for local linearizations around different equilibrium points)? – Karlo Dec 1 '15 at 8:13

As already mentioned, a linear system that tracks a step reference, will track it for arbitrary values and time of application. Due to the internal model principle, in a feedback control system, if the denominator of the product $$C(s) P(s)$$ contains a pole at $s = 0$, then it will robustly track a step function. The control law $$C(s) = \frac{k_{d} s^{2} + k_{p} s + k_{i}}{s}$$ has a pole at $s = 0$. If the plant $P(s)$ does not have a zero at $s = 0$, then your system will track an arbitrary step function $R(s) = \frac{A}{s}$, if it is closed-loop stable.
Since the complementary transfer-function, from reference to output, is $Y(s)/R(s) = T(s)$, and $$T(s) = \frac{C(s) P(s)}{1 + C(s) P(s)} = \frac{\frac{1}{s} \bar{C}(s) P(s)}{1 + \frac{1}{s} \bar{C}(s) P(s)} = \frac{\bar{C}(s) P(s)}{s + \bar{C}(s) P(s)} ,$$ this can be seen by using the final value theorem: $$\lim_{t \rightarrow \infty} y(t) = \lim_{s \rightarrow 0} s \frac{A}{s}\frac{\bar{C}(s) P(s)}{s + \bar{C}(s) P(s)} = A$$