Steady-state tracking error (source code)

= Steady-state tracking error
{title2=$e_{\mathrm{ss}}=\lim_{t\to\infty}e(t)$}

The <steady-state tracking error> is
$$
e_{\mathrm{ss}}=\lim_{t\to\infty}e(t),
$$
when this finite <limit> exists. A finite <steady-state tracking error> does not require the <reference signal>, the <plant output>, or the <control input> to become constant: all can grow while their difference settles. If the <tracking error> grows without bound or keeps oscillating, report that behavior rather than assigning a finite <steady-state tracking error>. Eventual accuracy and <asymptotic stability> are different questions.

For the <first-order low-pass filter> $\tau\dot y+y=Ku+d$ introduced in <reference signal>, assume exact measurement, constant <control disturbance> $d$, and no <actuator saturation> or <feedback delay>. Under <proportional control> $u=k_p(r-y)$ with $k_p>0$, a constant <reference signal> $r=R$ gives
$$
\tau\dot y+(1+Kk_p)y=Kk_pR+d,\qquad e_{\mathrm{ss}}=\frac{R-d}{1+Kk_p}.
$$
The decaying homogeneous solution has rate $(1+Kk_p)/\tau>0$, so this <equilibrium point> is approached from any finite <initial condition>. A nonzero <tracking error> is needed to maintain the <control input> that balances the model's tendency to relax toward $y=d$. This differs from the accumulating <controlled plant> $\dot x=u+w$, for which <proportional control> already tracks a constant <reference signal> exactly when $w=0$. The presence or absence of a step offset depends on both the <controlled plant> and the <controller>.

For a <ramp reference signal> $r=vt$, the same <proportional control> gives
$$
\tau\dot e+(1+Kk_p)e=\tau v+vt-d.
$$
Its long-time particular solution grows with slope $v/(1+Kk_p)$ when $v\ne0$. Thus the <controlled plant> and homogeneous closed-loop response are stable, but the <tracking error> has no finite <steady-state tracking error>. A changing goal requires a different performance test from a fixed destination.

Now use <proportional-integral control> $u=k_pe+k_i z$, $\dot z=e$, with $k_i>0$. For the same <controlled plant>, differentiate the error equation on intervals where the inputs are smooth:
$$
\tau\ddot e+(1+Kk_p)\dot e+Kk_i e=\tau\ddot r+\dot r-\dot d.
$$
The <characteristic polynomial> $\tau\lambda^2+(1+Kk_p)\lambda+Kk_i$ has both <roots of a polynomial> in the open left half-plane: real roots have negative sum and positive product, and a nonreal <complex conjugate> pair has negative real part. This proves decay of the homogeneous error for this model. It does not prove stability of an arbitrary <controlled plant> controlled by positive gains. At a reference jump, use the original <ordinary differential equations> to set the new <initial conditions>, rather than treating the reference as smooth at that jump.

With a constant <reference signal> and constant <control disturbance>, <proportional-integral control> therefore gives $e_{\mathrm{ss}}=0$. At its <equilibrium point>, $y_*=R$, $u_*=(R-d)/K$, and $z_*=(R-d)/(Kk_i)$. The stored <integral> maintains the required command while the current <tracking error> vanishes. For a <ramp reference signal>, however, the forcing above is $v$, and
$$
e_{\mathrm{ss}}=\frac{v}{Kk_i}.
$$
The <tracking error> settles even though the accumulated <integral> and the required <control input> grow. This finite offset is the error needed to keep increasing that command. For $r=at^2/2$ with $a\ne0$, the forcing is $\tau a+at$ and even this <proportional-integral control> leaves a <tracking error> growing with slope $a/(Kk_i)$. <Integral action> is therefore a precise mechanism for selected input classes, not a promise of perfect tracking for every <reference signal>. https://www.fbswiki.org/wiki/index.php/PID_Control[Åström and Murray, Feedback Systems, Chapter 11: integral action and actuator limits]{ref}

Here are completely explicit synthetic examples with $y(0)=z(0)=0$, $d=0$, and no <sensor bias>. Choose $\tau=2\,\mathrm s$, $K=1\,{}^\circ\mathrm C$ per percentage point, $k_p=1$ percentage point per degree, and $k_i=0.5$ percentage points per degree-second. Thus $Kk_p=1$ is <dimensionless>, and $Kk_i=0.5\,\mathrm s^{-1}$. In the following formulas, $t$ denotes the numerical time in seconds and $y,e,r$ denote numerical <temperature> rises in degrees. For the unit-step <reference signal> $r=1$, <proportional control> and <proportional-integral control> respectively give
$$
y_P(t)=\tfrac12(1-e^{-t}),\quad e_P(t)=\tfrac12(1+e^{-t}),\quad u_P(t)=e_P(t);
$$
$$
y_{PI}(t)=1-e^{-t/2},\quad e_{PI}(t)=e^{-t/2},\quad u_{PI}(t)=1.
$$
For the <ramp reference signal> $r=0.2t$, the corresponding solutions are
$$
y_P(t)=0.1(t-1+e^{-t}),\quad e_P(t)=0.1(t+1-e^{-t}),\quad u_P(t)=e_P(t);
$$
$$
y_{PI}(t)=0.2(t-2+2e^{-t/2}),\quad e_{PI}(t)=0.4(1-e^{-t/2}),\quad u_{PI}(t)=0.2t.
$$
The <control inputs> here are numerical heater-command percentage points. Substitution into $2\dot y+y=u$ and into the <controller> equations checks these solutions without invoking an unverified limiting rule. The <proportional control> step offset is $0.5$ degrees; the <proportional-integral control> step offset is zero. The <proportional control> ramp error grows; the <proportional-integral control> ramp offset is $0.4$ degrees, exactly $v/(Kk_i)$.

\Image[/tracking-reference-errors-responses.png]
{title=Synthetic step and ramp tracking of one stable <first-order low-pass filter>}
{description=Original analytical model curves, not measurements or fits to the temperature laboratory. Columns compare <plant output> with <reference signal>, signed <tracking error>, and <control input>; rows use a unit step and a ramp of $0.2$ degrees per second. Both designs have decaying homogeneous responses. <Proportional-integral control> removes the step offset but leaves the ramp offset $0.4$ degrees; <proportional control> has an increasing ramp error. Heater-command percentage points and output degrees use separate axes.}

The conclusions have specific limits. With constant <sensor bias> $b$, stable <proportional-integral control> for a feasible constant <reference signal> drives the measured <tracking error> to zero but leaves the physical discrepancy $\varepsilon_{\mathrm{ss}}=b$. Under <proportional control>, the measured offset instead becomes $(R-b-d)/(1+Kk_p)$. If <actuator saturation> prevents the required <control input>, zero step offset is not achievable by these formulas. A changing <control disturbance> contributes $-\dot d$ to the error equation, while <feedback delay> can change stability; neither is covered by the constant-disturbance result. These restrictions are what make <steady-state tracking error> useful: it identifies the input, measurement convention, and model for which an accuracy claim is actually justified.