Chapter 1: Control Prerequisites for Robotics
Lesson 5: Performance Specs (overshoot, settling, tracking error, energy)
This lesson formalizes quantitative performance specifications for robot joint and task-space servo loops. We derive classical time-domain measures (overshoot, rise time, settling time, steady-state tracking error), connect them to closed-loop poles of linearized robot dynamics, and introduce energy-based indices such as integral error and control effort. We then implement these metrics in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica for simple robot joint models.
1. Why Performance Specs Matter in Robotics
In previous lessons you saw that a robot joint or end-effector coordinate can often be approximated (after linearization and feedback) by a stable linear time-invariant (LTI) system with input (reference or torque command) and output (joint angle or task coordinate). Performance specifications formalize how good this closed-loop behavior must be. Typical requirements are:
- Fast convergence to commanded trajectories without excessive oscillation.
- Small steady-state tracking error for step or ramp references.
- Limited overshoot to avoid collisions or mechanical stress.
- Bounded control energy to respect actuator limits and heating constraints.
For a scalar joint variable with reference signal \( r(t) \) and output \( y(t) \), the tracking error is \( e(t) = r(t) - y(t) \). A performance specification is any quantitative condition imposed on \( e(t) \) and on the control input \( u(t) \), such as \( \sup_{t \ge 0} |e(t)| \), \( \int_0^{\infty} e^2(t)\,\mathrm{d}t \), or \( \int_0^{\infty} u^2(t)\,\mathrm{d}t \).
flowchart TD
R["Task requirement (joint / ee)"] --> S["Translate to specs: overshoot, settling, error, energy"]
S --> P["Choose desired pole region (zeta, omega_n)"]
P --> C["Design controller gains (e.g. PD)"]
C --> SIM["Simulate response"]
SIM --> CHECK["Compute performance indices"]
CHECK --> SAT["Specs satisfied?"]
SAT -->|yes| DONE["Accept controller"]
SAT -->|no| ADJ["Retune gains or redesign"]
ADJ --> C
In this lesson we treat performance specs primarily for SISO LTI approximations to each joint, which is standard in early joint-space control design. Later chapters will generalize to multivariable and constrained settings.
2. Second-Order Approximation of a Robot Joint
Consider a single robot joint that has been linearized around an operating configuration and closed around a simple PD controller (gravity and coupling effects are compensated by feedforward terms or by the operating point choice). Under standard assumptions the closed-loop dynamics for the tracking error \( e(t) \) can often be approximated by a second-order LTI system of the form
\[ \ddot{e}(t) + 2\zeta\omega_n \dot{e}(t) + \omega_n^2 e(t) = 0, \]
where \( \zeta \) is the damping ratio and \( \omega_n \) is the natural frequency. For a unit step reference \( r(t) = H(t) \) and output \( y(t) \), the transfer function from \( r \) to \( y \) is
\[ G(s) = \frac{Y(s)}{R(s)} = \frac{\omega_n^2}{s^2 + 2\zeta\omega_n s + \omega_n^2}. \]
For \( 0 < \zeta < 1 \) (underdamped case, common in practice for acceptable speed), the unit-step time response is
\[ y(t) = 1 - \frac{1}{\sqrt{1-\zeta^2}} \exp(-\zeta\omega_n t)\, \sin\!\big(\omega_d t + \phi\big),\quad \omega_d = \omega_n\sqrt{1-\zeta^2},\quad \phi = \arctan\!\frac{\sqrt{1-\zeta^2}}{\zeta}, \]
which is the basis for the standard closed-form formulas for overshoot and settling time.
3. Time-Domain Specs: Overshoot, Rise Time, Settling Time
Let \( y(t) \) be the unit-step response of a stable unity-feedback robot joint loop. The classical time-domain performance measures are defined as follows.
3.1 Peak time and overshoot
The peak time \( T_p \) is the first time at which \( y(t) \) attains its maximum value \( y_{\max} \). The percent overshoot is
\[ M_p = 100 \cdot \frac{y_{\max} - y(\infty)}{y(\infty)} \quad [\%]. \]
For the standard second-order step response above with final value \( y(\infty) = 1 \) and \( 0 < \zeta < 1 \), one can show:
\[ T_p = \frac{\pi}{\omega_d} = \frac{\pi}{\omega_n\sqrt{1-\zeta^2}}, \]
\[ M_p = 100 \exp\!\left( -\frac{\pi \zeta}{\sqrt{1-\zeta^2}} \right). \]
Sketch of derivation. Differentiating \( y(t) \) and setting \( \dot{y}(t) = 0 \) yields \( \omega_d t + \phi = \pi \) for the first extremum, so \( T_p = (\pi - \phi)/\omega_d \). Using the specific form of \( \phi \) above simplifies to the formula given. Substituting \( t = T_p \) into \( y(t) \), and then normalizing by \( y(\infty) = 1 \), yields the overshoot expression.
3.2 Rise time
The rise time \( T_r \) is the time for \( y(t) \) to rise from a small fraction (e.g. \( 10\% \)) to a large fraction (e.g. \( 90\% \)) of its final value. There is no universal closed form; a standard approximation for underdamped second-order systems is
\[ T_r \approx \frac{1.8}{\omega_n} \quad \text{for } 0.4 \le \zeta \le 0.8. \]
3.3 Settling time
For a chosen tolerance \( \delta \in (0,1) \), the settling time \( T_s(\delta) \) is defined by
\[ T_s(\delta) = \inf \left\{ t \ge 0 \;:\; |y(\tau) - y(\infty)| \le \delta |y(\infty)| \;\;\forall \tau \ge t \right\}. \]
For the standard second-order unit-step response with \( y(\infty)=1 \), one typically uses the dominant exponential envelope \( \exp(-\zeta\omega_n t) \), giving the approximation
\[ T_s(\delta) \approx -\frac{1}{\zeta\omega_n}\ln \delta. \]
For the common engineering choice \( \delta = 0.02 \) (2% band) this yields
\[ T_s \approx \frac{4}{\zeta\omega_n}. \]
In joint-level robot specifications, one may require for example \( M_p \le 5\% \) and \( T_s \le 0.3\;\text{s} \) for individual joints to avoid overshoot into obstacles while still achieving high speed.
4. Steady-State Tracking Error and Error Constants
Let \( G(s) \) be the transfer function of the plant and \( C(s) \) that of the controller, with unity feedback. The closed-loop transfer function is
\[ T(s) = \frac{C(s)G(s)}{1 + C(s)G(s)}. \]
The tracking error in the Laplace domain for reference \( R(s) \) is
\[ E(s) = R(s) - Y(s) = R(s) - T(s)R(s) = \frac{1}{1 + C(s)G(s)} R(s). \]
The steady-state error (if it exists) is \( e_{\mathrm{ss}} = \lim_{t \,→\, \infty} e(t) \). By the final value theorem, if \( sE(s) \) has no poles in the closed right-half plane except possibly at the origin,
\[ e_{\mathrm{ss}} = \lim_{t \,→\, \infty} e(t) = \lim_{s \,→\, 0} sE(s) = \lim_{s \,→\, 0} s \frac{1}{1 + C(s)G(s)} R(s). \]
4.1 Standard position/velocity/acceleration error constants
For standard test inputs, \( r(t) = H(t) \) (step), \( r(t) = t H(t) \) (ramp), \( r(t) = \tfrac{1}{2}t^2 H(t) \) (parabolic), we define the error constants (assuming unity feedback) as
\[ K_p = \lim_{s \,→\, 0} C(s)G(s), \]
\[ K_v = \lim_{s \,→\, 0} s C(s)G(s), \]
\[ K_a = \lim_{s \,→\, 0} s^2 C(s)G(s). \]
Provided the limits exist and are finite, the resulting steady-state errors are
\[ \begin{aligned} e_{\mathrm{ss}}^{\text{step}} &= \lim_{s \,→\, 0} s \frac{1}{1 + C(s)G(s)} \cdot \frac{1}{s} = \frac{1}{1 + K_p}, \\ e_{\mathrm{ss}}^{\text{ramp}} &= \lim_{s \,→\, 0} s \frac{1}{1 + C(s)G(s)} \cdot \frac{1}{s^2} = \frac{1}{K_v}, \\ e_{\mathrm{ss}}^{\text{parabolic}} &= \lim_{s \,→\, 0} s \frac{1}{1 + C(s)G(s)} \cdot \frac{1}{s^3} = \frac{1}{K_a}. \end{aligned} \]
Robot joint controllers are typically designed to achieve zero steady-state error to step inputs (position commands), which requires \( K_p = \infty \), i.e. at least one integrator in the open-loop transfer function \( C(s)G(s) \).
5. Energy-Based and Integral Performance Indices
Time-domain specs like overshoot and settling time capture transient envelope behavior, but in robotics we also care about overall tracking accuracy and actuator usage over a task horizon. This motivates functional performance indices of the form
\[ J = \int_0^{\infty} \ell\big(e(t), u(t)\big)\,\mathrm{d}t, \]
where \( \ell \) is a nonnegative loss density. Important special cases are:
-
Integral squared error (ISE):
\[ J_{\mathrm{ISE}} = \int_0^{\infty} e^2(t)\,\mathrm{d}t. \]
-
Integral absolute error (IAE):
\[ J_{\mathrm{IAE}} = \int_0^{\infty} |e(t)|\,\mathrm{d}t. \]
-
Integral time-weighted absolute error (ITAE), which penalizes late
errors:
\[ J_{\mathrm{ITAE}} = \int_0^{\infty} t\,|e(t)|\,\mathrm{d}t. \]
-
Control energy:
\[ J_u = \int_0^{\infty} u^2(t)\,\mathrm{d}t. \]
From a functional analysis viewpoint, \( J_{\mathrm{ISE}} \) is the squared \( \mathcal{L}_2 \)-norm of the error:
\[ J_{\mathrm{ISE}} = \|e\|_2^2,\quad \|e\|_2 = \left(\int_0^{\infty} e^2(t)\,\mathrm{d}t\right)^{1/2}. \]
Similarly, \( J_u = \|u\|_2^2 \) measures the energy delivered by actuators. Minimizing these integrals is a precursor to optimal control formulations studied in later chapters.
6. Pole Location and Performance Regions
For a general LTI closed-loop joint model with transfer function \( T(s) \), the dominant complex conjugate pole pair \( s_{1,2} = -\zeta\omega_n \pm \mathrm{j}\omega_d \) largely determines time-domain performance when the remaining poles are significantly faster (more negative real part). In the complex plane, lines of constant damping ratio and natural frequency are given by
\[ \zeta = -\frac{\Re(s)}{|s|}, \quad \omega_n = |s|. \]
Given bounds on overshoot and settling time, one can invert the formulas of Section 3 to derive acceptable regions for pole locations. For example, if we require \( M_p \le M_p^{\star} \), then we need
\[ \exp\!\left( -\frac{\pi \zeta}{\sqrt{1-\zeta^2}} \right) \le \frac{M_p^{\star}}{100}, \]
which can be solved numerically for a minimum allowable damping ratio \( \zeta_{\min} \). Combining with a constraint \( T_s \le T_s^{\star} \) using \( T_s \approx 4/(\zeta\omega_n) \) yields a minimum natural frequency \( \omega_n \ge 4/(\zeta T_s^{\star}) \).
flowchart TD
G["Spec: Mp_max, Ts_max"] --> Z["Compute min damping zeta_min"]
Z --> W["Compute min natural frequency omega_n_min"]
W --> R1["Define region of admissible poles"]
R1 --> D1["Place closed-loop poles (e.g. via PD gains)"]
D1 --> V1["Verify via simulation & metrics"]
For robot joint PD control, these pole locations are directly related to the proportional and derivative gains and the joint inertia. Thus, performance specs impose quantitative constraints on admissible gains.
7. Python Implementation of Performance Metrics
We now implement basic performance metrics for a second-order joint
model in Python, using
numpy and scipy.signal. The same logic applies
to more realistic joint models obtained from a robotics library such as
python-control or robot simulators like
pinocchio or drake.
import numpy as np
from dataclasses import dataclass
from typing import Tuple
from scipy import signal
@dataclass
class SecondOrderSpecs:
zeta: float
omega_n: float
@dataclass
class StepMetrics:
Mp: float # percent overshoot
Ts: float # settling time (2 percent band)
Tr: float # rise time (10-90 percent)
ess: float # steady-state error
J_ise: float # integral squared error
J_u: float # control energy (for simple PD u)
def second_order_tf(specs: SecondOrderSpecs) -> signal.TransferFunction:
zeta = specs.zeta
wn = specs.omega_n
num = [wn**2]
den = [1.0, 2.0 * zeta * wn, wn**2]
return signal.TransferFunction(num, den)
def simulate_step(specs: SecondOrderSpecs, t_final: float = 10.0, dt: float = 1e-3
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
sys = second_order_tf(specs)
t = np.arange(0.0, t_final, dt)
tout, y = signal.step(sys, T=t)
r = np.ones_like(tout) # unit step reference
return tout, r, y
def compute_step_metrics(t: np.ndarray, r: np.ndarray, y: np.ndarray,
zeta: float, omega_n: float) -> StepMetrics:
# Percent overshoot
y_inf = y[-1]
y_max = np.max(y)
Mp = 100.0 * max(0.0, (y_max - y_inf) / max(1e-9, y_inf))
# Settling time: first time after which response stays within 2 percent
tol = 0.02 * abs(y_inf)
Ts = t[-1]
for k in range(len(t)):
if np.all(np.abs(y[k:] - y_inf) <= tol):
Ts = t[k]
break
# Rise time 10-90 percent
y10 = 0.1 * y_inf
y90 = 0.9 * y_inf
t10 = t[0]
t90 = t[-1]
for k in range(len(t)):
if y[k] >= y10:
t10 = t[k]
break
for k in range(len(t)):
if y[k] >= y90:
t90 = t[k]
break
Tr = t90 - t10
# Steady-state error
ess = r[-1] - y_inf
# Integral squared error
e = r - y
J_ise = np.trapz(e * e, t)
# Simple PD model: u = Kp * e + Kd * de/dt with gains chosen
# to match zeta and omega_n for a unit-inertia joint: J = 1
# Then Kp = omega_n**2, Kd = 2*zeta*omega_n
Kp = omega_n**2
Kd = 2.0 * zeta * omega_n
de = np.gradient(e, t)
u = Kp * e + Kd * de
J_u = np.trapz(u * u, t)
return StepMetrics(Mp=Mp, Ts=Ts, Tr=Tr, ess=ess, J_ise=J_ise, J_u=J_u)
if __name__ == "__main__":
specs = SecondOrderSpecs(zeta=0.7, omega_n=8.0)
t, r, y = simulate_step(specs, t_final=5.0, dt=1e-3)
metrics = compute_step_metrics(t, r, y, specs.zeta, specs.omega_n)
print(metrics)
In a robotics context, the second-order approximation parameters \( \zeta \) and \( \omega_n \) can be obtained from the closed-loop eigenvalues of the linearized joint dynamics with your PD gains.
8. C++ Implementation with Eigen for a Single Joint
In C++, joint-space controllers are frequently implemented in ROS or
other real-time frameworks, using Eigen for linear algebra.
Below is a minimal example that simulates the same second-order system
using forward Euler integration and computes overshoot and settling
time.
#include <iostream>
#include <cmath>
struct SecondOrderSpecs {
double zeta;
double omega_n;
};
struct StepMetrics {
double Mp;
double Ts;
};
StepMetrics simulateAndMetrics(const SecondOrderSpecs& specs,
double dt, double t_final) {
double zeta = specs.zeta;
double wn = specs.omega_n;
// State x = [y; ydot]
double y = 0.0;
double ydot = 0.0;
double r = 1.0;
double y_inf = 1.0;
double y_max = y;
double Ts = t_final;
double tol = 0.02 * std::fabs(y_inf);
bool settled = false;
int n_steps = static_cast<int>(t_final / dt);
for (int k = 0; k < n_steps; ++k) {
double t = k * dt;
// Dynamics: yddot + 2 zeta wn ydot + wn^2 y = wn^2 r
double yddot = -2.0 * zeta * wn * ydot - wn * wn * y + wn * wn * r;
// Forward Euler integration
ydot += dt * yddot;
y += dt * ydot;
if (y > y_max) y_max = y;
// Check settling (2 percent band)
if (!settled) {
if (std::fabs(y - y_inf) <= tol) {
// Tentatively mark time, but require it to stay within band
bool ok = true;
double y_temp = y;
double ydot_temp = ydot;
for (int j = k + 1; j < n_steps; ++j) {
double t2 = j * dt;
double yddot2 = -2.0 * zeta * wn * ydot_temp
- wn * wn * y_temp + wn * wn * r;
ydot_temp += dt * yddot2;
y_temp += dt * ydot_temp;
if (std::fabs(y_temp - y_inf) > tol) {
ok = false;
break;
}
}
if (ok) {
Ts = t;
settled = true;
}
}
}
}
double Mp = 0.0;
if (y_inf != 0.0) {
Mp = 100.0 * (y_max - y_inf) / std::fabs(y_inf);
if (Mp < 0.0) Mp = 0.0;
}
StepMetrics metrics;
metrics.Mp = Mp;
metrics.Ts = Ts;
return metrics;
}
int main() {
SecondOrderSpecs specs{0.7, 8.0};
StepMetrics m = simulateAndMetrics(specs, 1e-3, 5.0);
std::cout << "Mp = " << m.Mp << " percent\n";
std::cout << "Ts = " << m.Ts << " s\n";
return 0;
}
In a multi-joint robot controller, this logic would be applied per joint, often on filtered measured trajectories, and performance metrics would be logged for validation.
9. Java Implementation with EJML
Java is less common for low-level robot control but can be used for simulation and analysis, for example with the EJML linear algebra library. Below is a simple Java class that evaluates step response metrics similar to the Python code.
public class SecondOrderStepMetrics {
public static class Specs {
public double zeta;
public double omegaN;
public Specs(double zeta, double omegaN) {
this.zeta = zeta;
this.omegaN = omegaN;
}
}
public static class Metrics {
public double Mp;
public double Ts;
public double Tr;
public double ess;
}
public static Metrics compute(Specs s, double dt, double tFinal) {
int n = (int) (tFinal / dt);
double[] t = new double[n];
double[] y = new double[n];
double[] r = new double[n];
// Build transfer function in discrete-time via simple Euler approximation
double zeta = s.zeta;
double wn = s.omegaN;
double yk = 0.0, ydotk = 0.0;
double yInf = 1.0;
for (int k = 0; k < n; ++k) {
t[k] = k * dt;
r[k] = 1.0;
double yddot = -2.0 * zeta * wn * ydotk - wn * wn * yk + wn * wn * r[k];
ydotk += dt * yddot;
yk += dt * ydotk;
y[k] = yk;
}
Metrics m = new Metrics();
// Mp
double yMax = y[0];
for (int k = 1; k < n; ++k) {
if (y[k] > yMax) yMax = y[k];
}
m.Mp = 100.0 * Math.max(0.0, (yMax - yInf) / Math.abs(yInf));
// Ts (2 percent)
double tol = 0.02 * Math.abs(yInf);
m.Ts = t[n - 1];
outer:
for (int k = 0; k < n; ++k) {
boolean ok = true;
for (int j = k; j < n; ++j) {
if (Math.abs(y[j] - yInf) > tol) {
ok = false;
break;
}
}
if (ok) {
m.Ts = t[k];
break outer;
}
}
// ess
m.ess = r[n - 1] - y[n - 1];
// Simple rise time 10-90 percent
double y10 = 0.1 * yInf;
double y90 = 0.9 * yInf;
double t10 = t[0];
double t90 = t[n - 1];
boolean found10 = false, found90 = false;
for (int k = 0; k < n; ++k) {
if (!found10 && y[k] >= y10) {
t10 = t[k];
found10 = true;
}
if (!found90 && y[k] >= y90) {
t90 = t[k];
found90 = true;
}
}
m.Tr = t90 - t10;
return m;
}
public static void main(String[] args) {
Specs s = new Specs(0.7, 8.0);
Metrics m = compute(s, 1e-3, 5.0);
System.out.println("Mp = " + m.Mp + " percent");
System.out.println("Ts = " + m.Ts + " s");
System.out.println("Tr = " + m.Tr + " s");
System.out.println("ess = " + m.ess);
}
}
Integration with a Java-based robotics framework would primarily affect how the underlying dynamics are simulated or measured; the metric computation remains conceptually identical.
10. MATLAB/Simulink and Wolfram Mathematica Implementations
10.1 MATLAB/Simulink
MATLAB with the Control System Toolbox and Simulink is widely used in robotics for controller prototyping. Below is a script that defines a second-order model and computes classical step response metrics.
zeta = 0.7;
wn = 8.0;
num = [wn^2];
den = [1, 2*zeta*wn, wn^2];
sys = tf(num, den);
info = stepinfo(sys); % contains RiseTime, SettlingTime, Overshoot, etc.
disp(info);
% Compute steady-state error and energy-based metrics numerically
t = 0:1e-3:5;
[y, t] = step(sys, t);
r = ones(size(t));
e = r - y;
ess = e(end);
J_ise = trapz(t, e.^2);
% Simple PD control energy for unit inertia
Kp = wn^2;
Kd = 2*zeta*wn;
de = gradient(e, t);
u = Kp*e + Kd*de;
J_u = trapz(t, u.^2);
fprintf('ess = %g\n', ess);
fprintf('J_ise = %g\n', J_ise);
fprintf('J_u = %g\n', J_u);
% In Simulink, you would build a block diagram:
% - Second-order plant G(s)
% - Step input
% - Scope blocks to log y(t), e(t), u(t)
% and then post-process using the same formulas.
10.2 Wolfram Mathematica
Wolfram Mathematica provides symbolic and numeric tools for analyzing performance specs. The snippet below defines the step response, computes overshoot and settling time, and evaluates integral performance indices.
zeta = 0.7;
wn = 8.0;
wd = wn*Sqrt[1 - zeta^2];
y[t_] := 1 - 1/Sqrt[1 - zeta^2]*
Exp[-zeta*wn*t]*Sin[wd*t + ArcTan[Sqrt[1 - zeta^2]/zeta]];
(* Analytical overshoot and Mp *)
MpFormula = 100*Exp[-Pi*zeta/Sqrt[1 - zeta^2]] // N;
(* Numerical overshoot from y(t) *)
tmax = N[Pi/(wd)];
ymax = y[tmax];
MpNum = 100*(ymax - 1);
(* Settling time approximation (2 percent) *)
TsApprox = 4/(zeta*wn) // N;
(* Integral squared error (numerical) *)
e[t_] := 1 - y[t];
Jise = NIntegrate[e[t]^2, {t, 0, Infinity},
Method -> {"GlobalAdaptive", "SymbolicProcessing" -> 0},
MaxRecursion -> 10];
Print["Mp (formula) = ", MpFormula];
Print["Mp (numeric) = ", MpNum];
Print["Ts approx = ", TsApprox];
Print["J_ise = ", Jise];
For more complex joint models, Mathematica can derive the symbolic step response directly from a state-space model and then evaluate performance indices symbolically or numerically.
11. Problems and Solutions
Problem 1 (Overshoot constraint): A robot joint is approximated by a second-order closed-loop model with damping ratio \( \zeta \) and natural frequency \( \omega_n \). Require that the percent overshoot for a unit step is at most \( 10\% \). Derive an inequality constraint on \( \zeta \).
Solution: For a standard second-order step response,
\[ M_p = 100 \exp\!\left( -\frac{\pi \zeta}{\sqrt{1-\zeta^2}} \right). \]
The requirement \( M_p \le 10 \) is equivalent to
\[ \exp\!\left( -\frac{\pi \zeta}{\sqrt{1-\zeta^2}} \right) \le 0.1. \]
Taking natural logarithms (the exponential is positive) gives
\[ -\frac{\pi \zeta}{\sqrt{1-\zeta^2}} \le \ln(0.1) = -\ln 10. \]
Multiplying both sides by \( -1 \) reverses the inequality:
\[ \frac{\pi \zeta}{\sqrt{1-\zeta^2}} \ge \ln 10. \]
This inequality can be solved numerically, yielding \( \zeta \gtrsim 0.59 \).
Problem 2 (Settling time and bandwidth): Assume a second-order approximation is valid and the desired settling time (2 percent) is \( T_s^{\star} = 0.25\;\text{s} \) with damping ratio \( \zeta = 0.7 \). Compute the minimum natural frequency \( \omega_n \) that satisfies this constraint.
Solution: For the 2 percent criterion,
\[ T_s \approx \frac{4}{\zeta\omega_n}. \]
The requirement \( T_s \le T_s^{\star} \) implies
\[ \frac{4}{\zeta\omega_n} \le T_s^{\star} \quad \Longrightarrow \quad \omega_n \ge \frac{4}{\zeta T_s^{\star}}. \]
Substituting \( \zeta = 0.7 \) and \( T_s^{\star} = 0.25 \) yields
\[ \omega_n \ge \frac{4}{0.7 \cdot 0.25} \approx 22.86 \;\text{rad/s}. \]
Problem 3 (Steady-state step error for a robot joint): A robot joint is controlled by a proportional controller \( C(s) = K_p \) with plant \( G(s) = \frac{1}{Js^2 + bs} \). Assume unity feedback. Determine the steady-state error to a unit step command \( r(t) = H(t) \).
Solution: The open-loop transfer function is \( C(s)G(s) = \frac{K_p}{Js^2 + bs} \). We can write
\[ C(s)G(s) = \frac{K_p}{s} \cdot \frac{1}{Js + b}. \]
As \( s \,→\, 0 \), the factor \( 1/(Js + b) \) tends to \( 1/b \), so the position error constant is
\[ K_p^{(\text{pos})} = \lim_{s \,→\, 0} C(s)G(s) = \lim_{s \,→\, 0} \frac{K_p}{Js^2 + bs} = \infty, \]
because the open-loop has an integrator (a factor \( 1/s \)). Therefore,
\[ e_{\mathrm{ss}}^{\text{step}} = \frac{1}{1 + K_p^{(\text{pos})}} = 0. \]
Thus a proportional controller for a double-integrator robot joint with viscous friction achieves zero steady-state step error, consistent with the intuition that at steady state the torque balances friction.
Problem 4 (ISE of a first-order system): For comparison, consider a first-order stable plant \( G(s) = 1/(Ts + 1) \) with unit feedback. For a unit step input, compute the integral squared error \( J_{\mathrm{ISE}} \) in closed form.
Solution: The step response is \( y(t) = 1 - \exp(-t/T) \), so the error is \( e(t) = \exp(-t/T) \). Then
\[ J_{\mathrm{ISE}} = \int_0^{\infty} e^2(t)\,\mathrm{d}t = \int_0^{\infty} \exp\!\big(-2t/T\big)\,\mathrm{d}t = \left[-\frac{T}{2}\exp\!\big(-2t/T\big)\right]_0^{\infty} = \frac{T}{2}. \]
Thus for first-order dynamics \( J_{\mathrm{ISE}} \) scales linearly with the time constant \( T \).
Problem 5 (Qualitative design flow): A joint-space PD controller is to be tuned such that: \( M_p \le 5\% \), \( T_s \le 0.3\;\text{s} \), and the control energy \( J_u \) is not excessively high. Describe a qualitative iterative tuning procedure in terms of the parameters \( \zeta \) and \( \omega_n \).
Solution: A typical approach is:
- Choose a target damping ratio \( \zeta \) slightly larger than the minimum satisfying \( M_p \le 5\% \) (e.g. \( \zeta \approx 0.7 \)).
- Use \( T_s \approx 4/(\zeta\omega_n) \) to compute a minimum \( \omega_n \).
- Map \( \zeta \), \( \omega_n \) to PD gains using the joint inertia model (for a unit inertia approximation, \( K_p = \omega_n^2 \), \( K_d = 2\zeta\omega_n \)).
- Simulate the closed loop, compute \( M_p \), \( T_s \), and \( J_u \).
- If \( J_u \) is too large (e.g. torque saturations are hit often), slightly decrease \( \omega_n \) and re-tune, trading speed against energy.
This iterative process is exactly what you will implement in later lab sessions with full robot models.
12. Summary
In this lesson we formalized quantitative performance metrics for robot joint and task-space controllers. For second-order approximations we derived closed-form expressions for overshoot, peak time, rise time, and settling time in terms of the damping ratio and natural frequency. We used the final value theorem to define steady-state tracking error and introduced position, velocity, and acceleration error constants. Energy-based indices such as ISE, ITAE, and control energy were presented as integral functionals over error and control signals. Finally, we implemented these metrics across Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica, preparing the ground for systematic controller tuning in subsequent chapters.
13. References
- Ziegler, J. G., & Nichols, N. B. (1942). Optimum settings for automatic controllers. Transactions of the ASME, 64(11), 759–768.
- Bryson, A. E., & Ho, Y. C. (1969). Applied optimal control: Optimization, estimation, and control. Journal of Optimization Theory and Applications, related articles on quadratic performance indices.
- Zames, G. (1966). On the input-output stability of time-varying nonlinear feedback systems. IEEE Transactions on Automatic Control, 11(2), 228–238.
- Åström, K. J., & Hägglund, T. (1984). Automatic tuning of simple regulators with specifications on phase and amplitude margins. Automatica, 20(5), 645–651.
- Dorf, R. C., & Bishop, R. H. (various editions). Analysis and design of feedback control systems. Numerous journal-style excerpts on time-domain specifications.
- Franklin, G. F., Powell, J. D., & Emami-Naeini, A. (1981 onward). Design of control systems based on performance indices. Various journal publications associated with the textbook.
- Anderson, B. D. O., & Moore, J. B. (1971). Linear optimal control. Prentice-Hall, with accompanying journal papers on quadratic cost functionals.
- Goodwin, G. C., Graebe, S. F., & Salgado, M. E. (1992). Robust control and performance measures. Automatica, 28(6), 1145–1157.
- Middleton, R. H., & Goodwin, G. C. (1988). Digital control and estimation: A unified approach. International Journal of Control, related articles on sampling and performance.
- Maciejowski, J. M. (1989). Multivariable feedback design using modern control theory. IEE Proceedings, papers connecting energy norms with time-domain performance.