Chapter 8: Steady-State Error and Accuracy

Lesson 1: Error Signals and Standard Test Inputs

In this lesson we formally define the error signal in feedback control systems and introduce the standard input signals used to test tracking accuracy: step, ramp, parabolic, impulse, and sinusoidal inputs. We work in both the time domain and Laplace domain, and we connect error signals to the notion of steady-state error that will be developed systematically in subsequent lessons.

1. Error Signal in Feedback Control

Consider a single-input single-output (SISO) feedback control system with reference (command) input \( r(t) \) and measured output \( y(t) \). The error signal \( e(t) \) is defined as

\[ e(t) = r(t) - y(t). \]

The sign convention is chosen so that \( e(t) > 0 \) when the output is smaller than the reference. In unity-feedback systems the error signal is generated by summing the reference and the negative of the measured output.

In a standard unity-feedback configuration with controller transfer function \( C(s) \) and plant transfer function \( G(s) \), the Laplace transforms of the signals satisfy

\[ E(s) = R(s) - Y(s), \qquad U(s) = C(s)E(s), \qquad Y(s) = G(s)U(s), \]

where \( U(s) \) is the control input to the plant. Eliminating \( U(s) \) gives the closed-loop relationships between \( R(s) \), \( Y(s) \), and \( E(s) \).

flowchart TD
  R["Reference r(t)"] --> SUM["Summing junction"]
  Y["Output y(t)"] --> FB["Sensor / feedback"]
  FB --> SUM
  SUM --> E["Error e(t)"]
  E --> C["Controller C(s)"]
  C --> G["Plant G(s)"]
  G --> Y
        

The error signal is the central quantity expressing how well the closed-loop system tracks the reference or rejects disturbances. Steady-state accuracy will be quantified via the behavior of \( e(t) \) as \( t \to \infty \), using standard test inputs introduced later in this lesson.

2. Error Transfer Function in the Laplace Domain

2.1 Unity feedback

For a unity-feedback loop, the algebraic relations in the Laplace domain are

\[ E(s) = R(s) - Y(s), \qquad Y(s) = G(s)C(s)E(s). \]

Substituting the second equation into the first:

\[ E(s) = R(s) - G(s)C(s)E(s) \quad \Longrightarrow \quad \bigl(1 + G(s)C(s)\bigr)E(s) = R(s). \]

Hence the error transfer function from reference to error is

\[ \frac{E(s)}{R(s)} = \frac{1}{1 + G(s)C(s)}. \]

The closed-loop transfer function from reference to output, already studied in earlier chapters, is

\[ \frac{Y(s)}{R(s)} = \frac{G(s)C(s)}{1 + G(s)C(s)}. \]

2.2 Non-unity feedback with a sensor/feedback transfer function

In many practical systems (for example, robot joint position control) the measured feedback signal is not exactly the output but a transformed version, e.g., due to a sensor gain or filtering. Denote the feedback transfer function by \( H(s) \). Then

\[ E(s) = R(s) - H(s)Y(s), \qquad Y(s) = G(s)C(s)E(s). \]

Substitution yields

\[ E(s) = R(s) - H(s)G(s)C(s)E(s) \quad \Longrightarrow \quad \bigl(1 + H(s)G(s)C(s)\bigr)E(s) = R(s), \]

and therefore

\[ \frac{E(s)}{R(s)} = \frac{1}{1 + H(s)G(s)C(s)}, \qquad \frac{Y(s)}{R(s)} = \frac{G(s)C(s)}{1 + H(s)G(s)C(s)}. \]

In this lesson we mostly assume unity feedback (\( H(s)=1 \)) for simplicity, but the notion of error signal extends directly to general \( H(s) \).

3. Standard Test Inputs for Tracking Accuracy

To compare different control systems and controllers, it is common to test their tracking performance with a set of standard reference inputs. These inputs are simple, analytically tractable, and have clear physical interpretations in motion-control problems (such as robot joints or mobile robots).

3.1 Unit step input

The unit step represents a sudden change in the desired value (e.g., desired angle jumping from 0 to 1 rad):

\[ r(t) = A\,u(t), \]

where \( u(t) \) is the Heaviside step function and \( A > 0 \) is the step amplitude. Its Laplace transform is

\[ R(s) = \frac{A}{s}. \]

3.2 Ramp input

A ramp represents a linearly increasing reference (e.g., constant-velocity motion in robotics):

\[ r(t) = a t\,u(t), \qquad a > 0, \]

with Laplace transform

\[ R(s) = \frac{a}{s^{2}}. \]

3.3 Parabolic (quadratic) input

A parabolic input corresponds to constant acceleration in motion-control systems:

\[ r(t) = \frac{b}{2}t^{2}u(t), \qquad b > 0, \]

with Laplace transform

\[ R(s) = \frac{b}{s^{3}}. \]

3.4 Impulse and sinusoidal inputs

The unit impulse \( \delta(t) \) represents an idealized instantaneous kick, useful for characterizing system dynamics:

\[ r(t) = A \delta(t) \quad \Longrightarrow \quad R(s) = A. \]

For sinusoidal steady-state behavior, we often use

\[ r(t) = A \sin(\omega t)\,u(t) \quad \Longrightarrow \quad R(s) = \frac{A\omega}{s^{2} + \omega^{2}}. \]

flowchart TD
  R0["Reference signal r(t)"] --> P1["Constant signals"]
  R0 --> P2["Polynomial signals"]
  R0 --> P3["Sinusoidal signals"]
  P1 --> S1["Step: \nA * u(t)"]
  P2 --> S2["Ramp: \na * t * u(t)"]
  P2 --> S3["Parabolic: \n(b/2) * t^2 * u(t)"]
  P3 --> S4["Sine: \nA * sin(omega * t) * u(t)"]
        

In this chapter, step, ramp, and parabolic references are particularly important because they are polynomials in time and lead to simple expressions for steady-state error in terms of low-frequency properties of \( G(s)C(s) \).

4. Steady-State Error and the Final Value Theorem

For a given closed-loop system and reference input, the steady-state error (if it exists) is defined as

\[ e_{\mathrm{ss}} = \lim_{t \to \infty} e(t). \]

Using Laplace transforms and the final value theorem, under suitable stability assumptions, we can write

\[ e_{\mathrm{ss}} = \lim_{t \to \infty} e(t) = \lim_{s \to 0} s E(s), \]

provided that all poles of \( sE(s) \) lie strictly in the open left half-plane. For a unity-feedback system with \( E(s)/R(s) = 1/\bigl(1+G(s)C(s)\bigr) \) this becomes

\[ e_{\mathrm{ss}} = \lim_{s \to 0} s \frac{E(s)}{R(s)} R(s) = \lim_{s \to 0} \frac{s}{1 + G(s)C(s)}\,R(s). \]

The dependence of \( e_{\mathrm{ss}} \) on the input type comes from \( R(s) \), while the dependence on the controller and plant comes from \( G(s)C(s) \). Subsequent lessons will introduce static error constants that summarize this dependence in a compact way.

5. Analytical Examples with Step and Ramp Inputs

5.1 First-order plant without integral action

Consider a unity-feedback system with no explicit controller (\( C(s)=1 \)) and plant

\[ G(s) = \frac{K}{s + 1}, \qquad K > 0. \]

For a unit step reference \( r(t)=u(t) \) we have \( R(s) = 1/s \). The error transfer function gives

\[ E(s) = \frac{1}{1 + G(s)}R(s) = \frac{1}{1 + \dfrac{K}{s+1}}\cdot \frac{1}{s} = \frac{s+1}{s+1+K}\cdot\frac{1}{s}. \]

The steady-state error is

\[ e_{\mathrm{ss}} = \lim_{s \to 0} s E(s) = \lim_{s \to 0} \frac{s+1}{s+1+K} = \frac{1}{1+K}. \]

Thus a larger loop gain \( K \) reduces the steady-state step error but cannot make it exactly zero for finite \( K \) in this configuration.

5.2 Plant with an integrator

Now consider a plant with an integrator, typical for robot joint position control with torque input:

\[ G(s) = \frac{K}{s(s+1)}, \qquad K > 0. \]

For the same step input \( R(s)=1/s \),

\[ E(s) = \frac{1}{1 + \dfrac{K}{s(s+1)}}\cdot\frac{1}{s} = \frac{s(s+1)}{s(s+1)+K}\cdot\frac{1}{s} = \frac{s+1}{s(s+1)+K}. \]

Then

\[ e_{\mathrm{ss}} = \lim_{s \to 0} s E(s) = \lim_{s \to 0} \frac{s(s+1)}{s(s+1)+K} = 0. \]

In contrast to the previous system, the integrator in \( G(s) \) eliminates the steady-state error to a step input (for stable closed-loop). This pattern will be generalized in Lesson 2.

5.3 Ramp input with integrator

Using the same plant \( G(s)=K/(s(s+1)) \) and unity feedback, consider a unit ramp reference \( r(t) = t\,u(t) \) with \( R(s) = 1/s^{2} \). We obtain

\[ E(s) = \frac{1}{1 + \dfrac{K}{s(s+1)}}\cdot\frac{1}{s^{2}} = \frac{s(s+1)}{s(s+1)+K}\cdot\frac{1}{s^{2}} = \frac{s+1}{s\bigl(s(s+1)+K\bigr)}. \]

Hence

\[ e_{\mathrm{ss}} = \lim_{s \to 0} s E(s) = \lim_{s \to 0} \frac{s+1}{s(s+1)+K} = \frac{1}{K}. \]

The ramp tracking error is finite and inversely proportional to \( K \). In motion control this corresponds to a constant steady-state velocity tracking error when using only one integrator in the loop.

6. Computational Experiments: Error Signals for Step and Ramp Inputs

We now simulate the error signal for the plant \( G(s)=K/(s(s+1)) \) with unity feedback and \( K=5 \), under step and ramp references. This model is a simplified representation of a robot joint with torque input and viscous damping.

6.1 Python implementation (with python-control and robotics context)


import numpy as np
import matplotlib.pyplot as plt
import control  # python-control library

# Plant G(s) = K / (s (s + 1))
K = 5.0
num = [K]
den = [1.0, 1.0, 0.0]  # s^2 + s + 0 = s (s + 1)
G = control.TransferFunction(num, den)

# Unity feedback closed loop
sys_cl = control.feedback(G, 1)  # 1 stands for unity feedback

# Time grid
t = np.linspace(0.0, 10.0, 2000)

# STEP INPUT: r(t) = 1
t_step, y_step = control.step_response(sys_cl, T=t)
r_step = np.ones_like(t_step)
e_step = r_step - y_step

# RAMP INPUT: r(t) = t
r_ramp = t
t_ramp, y_ramp, _ = control.forced_response(sys_cl, T=t, U=r_ramp)
e_ramp = r_ramp - y_ramp

plt.figure()
plt.plot(t_step, e_step, label="e_step(t)")
plt.plot(t_ramp, e_ramp, label="e_ramp(t)")
plt.xlabel("t [s]")
plt.ylabel("error")
plt.title("Error signals for step and ramp references")
plt.grid(True)
plt.legend()
plt.show()

# Robotics remark:
# In a ROS-based robot controller, the same logic is used inside a control loop:
# r(t) is the commanded joint trajectory, y(t) is read from joint encoders,
# and e(t) = r(t) - y(t) is passed to a controller (e.g., PID) implemented
# with rospy or ros_control.
      

6.2 C++ implementation (Euler integration, suitable for embedded/robotic controllers)

We simulate the same closed-loop dynamics in discrete time by approximating the continuous plant with a first-order state-space realization of \( G(s)=K/(s(s+1)) \) and applying step and ramp inputs.


#include <iostream>
#include <vector>

// Simple state-space realization for G(s) = K / (s (s + 1))
// x_dot = A x + B u,  y = C x
// One possible realization:
//   x = [x1; x2]
//   x1_dot = x2
//   x2_dot = -x2 + K * u
//   y = x1
int main() {
    double K = 5.0;
    double dt = 0.001;
    double t_end = 10.0;
    int N = static_cast<int>(t_end / dt);

    double x1 = 0.0;  // position-like state
    double x2 = 0.0;  // velocity-like state

    std::vector<double> t_vec, e_step, e_ramp;

    // STEP input r(t) = 1
    x1 = 0.0;
    x2 = 0.0;
    for (int k = 0; k < N; ++k) {
        double t = k * dt;
        double r = 1.0;        // step
        double y = x1;
        double e = r - y;
        double u = e;          // C(s) = 1 (unity controller)

        // Euler integration of the plant
        double x1_dot = x2;
        double x2_dot = -x2 + K * u;

        x1 += dt * x1_dot;
        x2 += dt * x2_dot;

        t_vec.push_back(t);
        e_step.push_back(e);
    }

    // RAMP input r(t) = t
    x1 = 0.0;
    x2 = 0.0;
    e_ramp.resize(N);
    for (int k = 0; k < N; ++k) {
        double t = k * dt;
        double r = t;          // ramp
        double y = x1;
        double e = r - y;
        double u = e;

        double x1_dot = x2;
        double x2_dot = -x2 + K * u;

        x1 += dt * x1_dot;
        x2 += dt * x2_dot;

        e_ramp[k] = e;
    }

    std::cout << "# t  e_step  e_ramp\n";
    for (int k = 0; k < N; ++k) {
        std::cout << t_vec[k] << " "
                  << e_step[k] << " "
                  << e_ramp[k] << "\n";
    }

    // In a real robot controller using ROS, a similar loop runs at a fixed
    // control period dt on a joint_state callback, computing the error e and
    // sending the control input u via ros_control interfaces.
    return 0;
}
      

6.3 Java implementation (discrete simulation, relevant for robotics frameworks such as WPILib)


public class ErrorSignalSimulation {
    public static void main(String[] args) {
        double K = 5.0;
        double dt = 0.001;
        double tEnd = 10.0;
        int N = (int) (tEnd / dt);

        double x1 = 0.0;
        double x2 = 0.0;

        double[] eStep = new double[N];
        double[] eRamp = new double[N];

        // STEP input r(t) = 1
        x1 = 0.0;
        x2 = 0.0;
        for (int k = 0; k < N; ++k) {
            double t = k * dt;
            double r = 1.0;
            double y = x1;
            double e = r - y;
            double u = e;

            double x1Dot = x2;
            double x2Dot = -x2 + K * u;

            x1 += dt * x1Dot;
            x2 += dt * x2Dot;

            eStep[k] = e;
        }

        // RAMP input r(t) = t
        x1 = 0.0;
        x2 = 0.0;
        for (int k = 0; k < N; ++k) {
            double t = k * dt;
            double r = t;
            double y = x1;
            double e = r - y;
            double u = e;

            double x1Dot = x2;
            double x2Dot = -x2 + K * u;

            x1 += dt * x1Dot;
            x2 += dt * x2Dot;

            eRamp[k] = e;
        }

        System.out.println("# k  eStep  eRamp");
        for (int k = 0; k < N; ++k) {
            System.out.println(k + " " + eStep[k] + " " + eRamp[k]);
        }

        // In Java-based robotics libraries such as WPILib, the error e is
        // computed similarly and passed to PID controllers for motor commands.
    }
}
      

6.4 MATLAB/Simulink implementation (with Robotics System Toolbox context)


% Plant G(s) = K / (s (s + 1))
K = 5;
num = K;
den = [1 1 0];   % s^2 + s = s (s + 1)
G = tf(num, den);

% Unity feedback closed loop
sys_cl = feedback(G, 1);

% Time vector
t = 0:0.01:10;

% STEP input
[r_step, ~] = gensig("step", 10, 10, 0.01); %#ok<ASGLU>
r_step = ones(size(t));
[y_step, ~] = step(sys_cl, t);
e_step = r_step - y_step;

% RAMP input: r(t) = t
r_ramp = t;
[y_ramp, ~] = lsim(sys_cl, r_ramp, t);
e_ramp = r_ramp - y_ramp;

figure;
plot(t, e_step, t, e_ramp);
grid on;
legend("e\_step(t)", "e\_ramp(t)");
xlabel("t [s]");
ylabel("error");
title("Error signals for step and ramp references");

% In Simulink, the same system can be built by connecting:
% - Step or Ramp block (reference)
% - Sum block (for e = r - y)
% - Controller block (here unity gain)
% - Transfer Fcn block for G(s)
% - Scope blocks to observe y(t) and e(t).
% Robotics System Toolbox allows connecting these models to
% ROS topics or to rigid-body robot models.
      

6.5 Wolfram Mathematica implementation


(* Define Laplace variable and transfer function model *)
s = LaplaceTransformVariable;
K = 5;
G = TransferFunctionModel[K/(s (s + 1)), s];

(* Unity feedback closed loop *)
sysCL = SystemsModelFeedback[G, 1];

tmax = 10;

(* STEP input r(t) = 1 *)
stepResp = OutputResponse[sysCL, 1, {t, 0, tmax}];
eStep[t_] := 1 - stepResp[t];

(* RAMP input r(t) = t *)
rampResp = OutputResponse[sysCL, t, {t, 0, tmax}];
eRamp[t_] := t - rampResp[t];

Plot[{eStep[t], eRamp[t]}, {t, 0, tmax},
  PlotLegends -> {"e_step(t)", "e_ramp(t)"},
  AxesLabel -> {"t", "error"},
  PlotLabel -> "Error signals for step and ramp references"
]

(* In robotics applications, TransferFunctionModel and StateSpaceModel
   are used to represent joint or mobile robot dynamics, and error
   signals are computed exactly as above. *)
      

7. Problems and Solutions

The following problems reinforce the definitions of error signals and their computation for standard test inputs using Laplace transform methods.

Problem 1 (Step error for a first-order plant).
Consider a unity-feedback system with \( C(s)=1 \) and \( G(s) = \dfrac{2}{s+3} \). The reference input is a unit step \( r(t)=u(t) \).
(a) Derive \( E(s) \).
(b) Compute the steady-state error \( e_{\mathrm{ss}} \).

Solution.

(a) For unity feedback we have \( E(s)/R(s) = 1/(1+G(s)) \), so

\[ E(s) = \frac{1}{1 + \dfrac{2}{s+3}}\cdot \frac{1}{s} = \frac{s+3}{s+5}\cdot \frac{1}{s}. \]

(b) The steady-state error is

\[ e_{\mathrm{ss}} = \lim_{s \to 0} sE(s) = \lim_{s \to 0} \frac{s+3}{s+5} = \frac{3}{5}. \]

The system exhibits a nonzero steady-state error to a step input, which can be reduced by increasing the loop gain.

Problem 2 (Non-unity feedback with sensor gain).
A position-control system for a robot joint has plant \( G(s) = \dfrac{K}{s(s+4)} \), unity controller \( C(s)=1 \), and sensor gain \( H(s) = 2 \). The reference is a unit step.
(a) Derive the closed-loop transfer function \( Y(s)/R(s) \).
(b) Derive \( E(s)/R(s) \).
(c) Find the steady-state error \( e_{\mathrm{ss}} \) for \( K > 0 \).

Solution.

(a) For non-unity feedback, \( Y(s)/R(s) = G(s)C(s)/(1+H(s)G(s)C(s)) \). Thus

\[ \frac{Y(s)}{R(s)} = \frac{\dfrac{K}{s(s+4)}}{1 + 2 \dfrac{K}{s(s+4)}} = \frac{K}{s(s+4) + 2K}. \]

(b) The error transfer function is \( E(s)/R(s) = 1/(1+H(s)G(s)C(s)) \), hence

\[ \frac{E(s)}{R(s)} = \frac{1}{1 + 2\dfrac{K}{s(s+4)}} = \frac{s(s+4)}{s(s+4) + 2K}. \]

(c) For a unit step \( R(s)=1/s \), we get

\[ E(s) = \frac{s(s+4)}{s(s+4)+2K}\cdot\frac{1}{s} = \frac{s+4}{s(s+4)+2K}. \]

Then

\[ e_{\mathrm{ss}} = \lim_{s \to 0} sE(s) = \lim_{s \to 0} \frac{s(s+4)}{s(s+4)+2K} = 0. \]

The integrator in \( G(s) \) ensures zero steady-state error to step inputs even with a sensor gain different from one.

Problem 3 (Ramp tracking error for an integrator plant).
For a unity-feedback system with \( G(s) = \dfrac{K}{s(s+2)} \) and ramp input \( r(t) = t\,u(t) \), derive the steady-state error \( e_{\mathrm{ss}} \) as a function of \( K \).

Solution.

The ramp has Laplace transform \( R(s)=1/s^{2} \). Then

\[ E(s) = \frac{1}{1 + \dfrac{K}{s(s+2)}}\cdot\frac{1}{s^{2}} = \frac{s(s+2)}{s(s+2)+K}\cdot\frac{1}{s^{2}} = \frac{s+2}{s\bigl(s(s+2)+K\bigr)}. \]

Therefore

\[ e_{\mathrm{ss}} = \lim_{s \to 0} sE(s) = \lim_{s \to 0} \frac{s+2}{s(s+2)+K} = \frac{2}{K}. \]

The ramp tracking error is finite and can be reduced by increasing the gain \( K \), but cannot be made zero without modifying the loop structure (for example, adding another integrator).

Problem 4 (Polynomial reference and Laplace transform).
Let the reference be a quadratic polynomial \( r(t) = \tfrac{1}{2} t^{2} u(t) \). Show that its Laplace transform is \( R(s) = 1/s^{3} \), and briefly explain why higher-order polynomials in time correspond to higher powers of \( 1/s \) in the Laplace domain.

Solution.

Using the standard Laplace transform for \( t^{n} u(t) \),

\[ \mathcal{L}\{t^{n}u(t)\} = \frac{n!}{s^{n+1}}, \]

we set \( n=2 \) and multiply by \( 1/2 \):

\[ R(s) = \mathcal{L}\left\{\frac{1}{2}t^{2}u(t)\right\} = \frac{1}{2}\cdot\frac{2!}{s^{3}} = \frac{1}{s^{3}}. \]

In general, a polynomial of degree \( n \) in time produces a Laplace transform that behaves like \( 1/s^{n+1} \) near \( s=0 \). Thus, higher-order polynomial references emphasize lower-frequency behavior and require more low-frequency gain in \( G(s)C(s) \) to maintain small steady-state error.

8. Summary

In this lesson we defined the error signal \( e(t)=r(t)-y(t) \) and derived its Laplace-domain representation for unity and non-unity feedback systems. We introduced the standard test inputs (step, ramp, parabolic, impulse, sinusoidal) and derived their Laplace transforms, emphasizing their importance for assessing tracking performance in motion-control and robotic applications.

We showed how steady-state error can be computed using the final value theorem and illustrated, via examples, how the presence of integrators in \( G(s)C(s) \) can eliminate steady-state error to certain input types while leaving finite or infinite error for others. Finally, we implemented numerical simulations in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica, connecting the mathematical concepts to software patterns commonly used in robotic control systems.

In the next lesson, we will formalize these observations using static error constants and a classification of systems based on their low-frequency behavior, leading to systematic design rules for steady-state accuracy.

9. References

  1. Minorsky, N. (1922). Directional stability of automatically steered bodies. Journal of the American Society for Naval Engineers, 34(2), 280–309.
  2. Hazen, H.L. (1934). Theory of servomechanisms. Journal of the Franklin Institute, 218(2), 145–186.
  3. Bode, H.W. (1945). Network Analysis and Feedback Amplifier Design. Van Nostrand.
  4. Evans, W.R. (1948). Graphical analysis of control systems. Transactions of the AIEE, 67(1), 547–551.
  5. MacColl, L.A. (1945). Fundamental theory of servomechanisms. Bell System Technical Journal, 24(1), 1–32.
  6. Zames, G. (1966). On the input-output stability of time-varying nonlinear feedback systems. Part I: Conditions derived using concepts of loop gain, conicity, and positivity. IEEE Transactions on Automatic Control, 11(2), 228–238.
  7. Truxal, J.G. (1955). Automatic Feedback Control System Synthesis. McGraw–Hill.
  8. Atherton, D.P. (1975). Nonlinear steady-state errors of sampled-data control systems. International Journal of Control, 21(3), 451–464.