Chapter 1: Introduction to Linear Control Systems
Lesson 1: What is a Control System?
This lesson introduces control systems from a rigorous, mathematical perspective suitable for linear control and robotics. We formalize the notions of signals, systems, and control objectives (regulation, tracking, disturbance rejection), and we illustrate basic feedback structures and simple dynamic models that will be analyzed in depth in later chapters.
1. Intuitive Notion of a Control System
Informally, a control system is an interconnection of components that automatically manipulates inputs to a physical process so that its outputs behave according to specified objectives. Classical examples include:
- Temperature regulation in a room (thermostat and heater).
- Speed regulation of a DC motor in a robotic joint.
- Attitude control of a quadrotor drone.
In each case there is a physical process (the plant) whose behavior is described by differential equations; there are controllable inputs (e.g., motor voltages), measurable outputs (e.g., angular position), and desired trajectories called references. The control system measures the output, compares it with the reference, and computes an input that attempts to reduce the difference over time.
At a high level, a (possibly feedback) control system is designed to shape the dynamic mapping \( r(\cdot), d(\cdot) \mapsto y(\cdot) \), where \( r(\cdot) \) is a reference signal, \( d(\cdot) \) represents disturbances, and \( y(\cdot) \) is the controlled output.
2. Signals, Systems, and Control Objectives
Let us formalize the main objects in control engineering. We consider real-valued, time-varying signals defined on \( t \in \mathbb{R} \) (typically \( t \ge 0 \)):
- Input (control) signal \( u(t) \in \mathbb{R}^m \): quantities we can manipulate (actuator commands, voltages, forces).
- Output (controlled) signal \( y(t) \in \mathbb{R}^p \): quantities we care about (positions, speeds, temperatures).
- Reference signal \( r(t) \in \mathbb{R}^p \): desired trajectories (setpoints, paths).
- Disturbance signal \( d(t) \in \mathbb{R}^q \): unmeasured external influences (wind, load changes, friction).
A general (possibly nonlinear, time-varying) dynamic system can be viewed as an operator \( \mathcal{G} \) that maps input and disturbance histories into output histories:
\[ y(t) = \mathcal{G}\big[u(\cdot), d(\cdot)\big](t), \quad t \ge 0. \]
For feedback control, we define the tracking error:
\[ e(t) = r(t) - y(t). \]
A control system is designed so that \( e(t) \) becomes small (in some sense) despite the dynamics of the plant and the disturbances. Typical objectives are:
- Regulation: drive \( y(t) \) to a constant reference (often \( r(t) \equiv 0 \)).
- Tracking: make \( y(t) \) follow a time-varying \( r(t) \).
- Disturbance rejection: attenuate the effect of \( d(t) \) on \( y(t) \).
In linear control we will mostly restrict attention to systems whose dynamics can be described by linear differential equations and for which the superposition principle holds. This restriction is powerful enough to cover a large class of robotic and mechatronic systems around nominal operating points.
3. Mathematical Description of a Dynamic Plant
A broad and classical model for a single-input, single-output (SISO) linear time-invariant (LTI) plant is the linear differential equation
\[ \frac{d^n y(t)}{dt^n} + a_{n-1} \frac{d^{n-1} y(t)}{dt^{n-1}} + \dots + a_0 y(t) = b_m \frac{d^m u(t)}{dt^m} + \dots + b_0 u(t), \]
where the coefficients \( a_i, b_j \in \mathbb{R} \) are (for now) constant parameters of the physical system. Such equations arise from Newtonian mechanics, Kirchhoff's laws, etc., combined with the assumption of linear elements (springs, dampers, resistors, inductors, etc.).
As a simple example consider the first-order plant
\[ \dot{y}(t) = -a\,y(t) + b\,u(t), \quad a > 0,\; b > 0. \]
If we apply a constant input \( u(t) = u_0 \) and assume \( y(0) = y_0 \), then solving this linear differential equation yields
\[ y(t) = \frac{b}{a} u_0 + \Bigl( y_0 - \frac{b}{a} u_0 \Bigr) e^{-a t}, \quad t \ge 0. \]
The output exponentially approaches the steady-state value \( y_{\text{ss}} = \tfrac{b}{a} u_0 \). In this purely open-loop scenario the steady-state depends directly on the chosen input \( u_0 \) and on the plant parameters \( a, b \). If the plant model is inaccurate or the load changes, the actual steady-state will deviate from the desired target. Feedback control compensates for these uncertainties by continuously adjusting \( u(t) \) based on the observed output.
4. Feedback Structure and Basic Equations
Conceptually, a basic feedback loop for a SISO plant consists of:
- A reference generator producing \( r(t) \).
- A device computing the error \( e(t) = r(t) - y(t) \).
- A controller, which computes the control input \( u(t) \) from \( e(t) \) (and possibly other signals).
- The plant, which produces \( y(t) \) from \( u(t) \).
- A sensor that measures (an approximation of) \( y(t) \).
A simple linear static controller (proportional control) has the form
\[ u(t) = K\,e(t) = K\bigl(r(t) - y(t)\bigr), \]
where \( K \in \mathbb{R} \) is a gain to be chosen. Interconnecting this controller with the first-order plant of the previous section gives
\[ \dot{y}(t) = -a\,y(t) + b\,K \bigl(r(t) - y(t)\bigr) = -(a + bK)\,y(t) + bK\,r(t). \]
For a constant reference \( r(t) \equiv r_0 \) we obtain, with initial condition \( y(0) = y_0 \),
\[ y(t) = \frac{bK}{a + bK} r_0 + \Bigl( y_0 - \frac{bK}{a + bK} r_0 \Bigr) e^{-(a + bK)t}, \quad t \ge 0. \]
This gives an explicit expression for the closed-loop behavior. The steady-state value is \( y_{\text{ss}} = \tfrac{bK}{a + bK} r_0 \), and the transient term decays exponentially at a rate determined by \( a + bK \). Later chapters will analyze stability and performance of such closed-loop systems in much greater detail.
flowchart TD
R["Reference r(t)"] --> E["Error computation e(t) = r(t) - y(t)"]
Y["Measured output y(t)"] --> E
E --> C["Controller: u(t) = K * e(t)"]
C --> U["Actuator signal u(t)"]
U --> P["Physical plant (robot joint, motor, etc.)"]
P --> Y
5. Programming Lab — Simulating a Simple Control Loop
We now implement a numerical simulation of the first-order closed-loop system
\[ \dot{y}(t) = -(a + bK)\,y(t) + bK\,r_0 \]
using a simple explicit Euler discretization. We discretize time with a step \( h > 0 \) and approximate
\[ y_{k+1} \approx y_k + h\Bigl( -(a + bK) y_k + bK r_0 \Bigr), \quad k = 0,1,2,\dots \]
Such simulations are at the core of how robotic control software is tested before deployment. In real robots, similar loops run inside middleware such as ROS control (C++) or on embedded controllers.
5.1 Python Implementation (Robotics-Oriented)
Python is widely used for prototyping in control and robotics. Libraries
such as numpy and scipy provide numerical
tools, while python-control and
roboticstoolbox-python offer higher-level abstractions for
linear systems and robot models. Below is a from-scratch Euler
simulation of the closed-loop system:
import numpy as np
import matplotlib.pyplot as plt
# Plant and controller parameters
a = 1.0 # plant parameter > 0
b = 2.0 # plant parameter > 0
K = 3.0 # proportional gain
r0 = 1.0 # constant reference
# Simulation settings
h = 0.001 # time step
t_final = 2.0
N = int(t_final / h)
t = np.linspace(0.0, t_final, N + 1)
y = np.zeros(N + 1)
u = np.zeros(N + 1)
# Initial condition
y[0] = 0.0
for k in range(N):
e_k = r0 - y[k]
u[k] = K * e_k
dy = -(a + b * K) * y[k] + b * K * r0
y[k + 1] = y[k] + h * dy
u[-1] = u[-2]
plt.figure()
plt.plot(t, y, label="y(t)")
plt.axhline(r0, linestyle="--", label="reference r0")
plt.xlabel("time [s]")
plt.ylabel("output")
plt.legend()
plt.title("First-order closed-loop response (Python simulation)")
plt.show()
# Note:
# For more advanced work with robotics models, see:
# - python-control: https://python-control.readthedocs.io
# - roboticstoolbox-python: https://github.com/petercorke/robotics-toolbox-python
5.2 C++ Implementation (Embedded / ROS Control Loop)
C++ is prevalent in real-time robotic control, often in conjunction with
Eigen for linear algebra and ROS control for interfacing
with hardware. A minimal Euler simulation loop in C++ might look like:
#include <iostream>
#include <vector>
int main() {
double a = 1.0;
double b = 2.0;
double K = 3.0;
double r0 = 1.0;
double h = 0.001;
double t_final = 2.0;
int N = static_cast<int>(t_final / h);
std::vector<double> y(N + 1, 0.0);
std::vector<double> u(N + 1, 0.0);
y[0] = 0.0;
for (int k = 0; k < N; ++k) {
double e_k = r0 - y[k];
u[k] = K * e_k;
double dy = -(a + b * K) * y[k] + b * K * r0;
y[k + 1] = y[k] + h * dy;
}
u[N] = u[N - 1];
std::cout << "Final output y(T) = " << y[N] << std::endl;
return 0;
}
/*
In a robotic joint controller using ROS control, similar logic would be
implemented inside an update() method, using Eigen for vector/matrix
computations and hardware interfaces for reading joint states and
writing commands.
*/
5.3 Java Implementation (Simulation Services)
Java is less common in low-level control loops but used in higher-level
simulation and coordination layers, sometimes combined with matrix
libraries like EJML. A simple implementation is:
public class SimpleClosedLoop {
public static void main(String[] args) {
double a = 1.0;
double b = 2.0;
double K = 3.0;
double r0 = 1.0;
double h = 0.001;
double tFinal = 2.0;
int N = (int) (tFinal / h);
double[] y = new double[N + 1];
double[] u = new double[N + 1];
y[0] = 0.0;
for (int k = 0; k < N; k++) {
double e = r0 - y[k];
u[k] = K * e;
double dy = -(a + b * K) * y[k] + b * K * r0;
y[k + 1] = y[k] + h * dy;
}
u[N] = u[N - 1];
System.out.println("Final output y(T) = " + y[N]);
}
}
/*
For robotics in Java, frameworks such as ROSJava provide interfaces to
ROS-based robot middleware, enabling Java-based supervisory controllers
to interact with lower-level C++ control loops.
*/
5.4 MATLAB / Simulink Implementation
MATLAB, together with Control System Toolbox and Robotics System Toolbox, is a standard tool in control engineering. Below is a simple script using Euler integration (without yet using transfer functions or state-space objects, which will appear in later chapters):
a = 1.0;
b = 2.0;
K = 3.0;
r0 = 1.0;
h = 0.001;
t_final = 2.0;
N = floor(t_final / h);
t = linspace(0.0, t_final, N + 1);
y = zeros(1, N + 1);
u = zeros(1, N + 1);
y(1) = 0.0;
for k = 1:N
e_k = r0 - y(k);
u(k) = K * e_k;
dy = -(a + b * K) * y(k) + b * K * r0;
y(k + 1) = y(k) + h * dy;
end
u(N + 1) = u(N);
plot(t, y, 'LineWidth', 1.5); hold on;
y_ref = r0 * ones(size(t));
plot(t, y_ref, '--', 'LineWidth', 1.0);
xlabel('time [s]');
ylabel('output');
legend('y(t)', 'reference');
title('First-order closed-loop response (MATLAB simulation)');
grid on;
% In Simulink, one can build an equivalent diagram using:
% - A Step block for r(t)
% - A Sum block computing e(t) = r(t) - y(t)
% - A Gain block with gain K
% - A first-order plant implemented via Transfer Fcn or State-Space
% These blocks can be connected to mimic the feedback loop drawn earlier.
5.5 Wolfram Mathematica Implementation
Wolfram Mathematica includes symbolic and numerical tools for control.
Here we use NDSolve to integrate the closed-loop ODE:
a = 1.0;
b = 2.0;
K = 3.0;
r0 = 1.0;
eq = y'[t] == -(a + b*K)*y[t] + b*K*r0;
ic = y[0] == 0.0;
sol = NDSolve[{eq, ic}, y, {t, 0, 2.0}];
Plot[{Evaluate[y[t] /. sol], r0}, {t, 0, 2.0},
PlotLegends -> {"y(t)", "reference"},
AxesLabel -> {"t", "output"},
PlotLabel -> "First-order closed-loop response"];
Mathematica also provides higher-level constructs like
StateSpaceModel and visualization tools that we will
connect to linear control concepts later in the course.
6. Workflow of a Control Engineer
Even in this introductory lesson, it is useful to see how the abstract idea of a control system fits into an engineering workflow. The general cycle is:
- Model the plant using physics and linearization.
- Specify control objectives quantitatively.
- Design a controller (initially simple proportional control).
- Simulate and verify on software (Python, MATLAB, etc.).
- Implement on the robot or physical system.
flowchart TD
P["Physical system (robot, motor, etc.)"]
M["Mathematical model (ODE)"]
S["Simulation (Python, MATLAB, Mathematica)"]
D["Controller design (choose structure, gains)"]
I["Implementation on hardware"]
V["Validation and refinement"]
P --> M
M --> S
S --> D
D --> S
D --> I
I --> V
V --> M
The rest of this course formalizes each arrow in this diagram for linear systems, starting from differential equations, then introducing transfer functions, stability, performance metrics, and systematic design methods.
7. Problems and Solutions
Problem 1 (Open-loop response of a first-order plant). Consider the first-order plant \( \dot{y}(t) = -a\,y(t) + b\,u(t) \) with constants \( a > 0, b > 0 \). Assume that for \( t \ge 0 \) the input is constant, \( u(t) = u_0 \), and the initial condition is \( y(0) = y_0 \). Derive the explicit solution \( y(t) \) and identify the steady-state value.
Solution: The ODE is linear with constant coefficients:
\[ \dot{y}(t) + a\,y(t) = b\,u_0. \]
The homogeneous solution satisfies \( \dot{y}_h + a y_h = 0 \), giving \( y_h(t) = C e^{-a t} \). A particular solution \( y_p \) can be chosen constant: let \( y_p(t) \equiv y_p \). Then
\[ 0 + a y_p = b u_0 \quad \Rightarrow \quad y_p = \frac{b}{a} u_0. \]
The general solution is \( y(t) = y_h(t) + y_p \), i.e.
\[ y(t) = C e^{-a t} + \frac{b}{a} u_0. \]
Imposing \( y(0) = y_0 \) gives \( y_0 = C + \tfrac{b}{a} u_0 \), hence \( C = y_0 - \tfrac{b}{a} u_0 \). Thus
\[ y(t) = \frac{b}{a} u_0 + \Bigl( y_0 - \frac{b}{a} u_0 \Bigr) e^{-a t}. \]
The steady-state value is obtained by taking \( t \to \infty \), yielding \( y_{\text{ss}} = \tfrac{b}{a} u_0 \).
Problem 2 (Closed-loop equilibrium under proportional control).
Consider the same plant, \( \dot{y}(t) = -a\,y(t) + b\,u(t) \),
interconnected with the proportional controller \( u(t) = K\bigl(r_0 -
y(t)\bigr) \), where \( r_0 \) is a constant reference and \( K \in
\mathbb{R} \).
(a) Derive the closed-loop differential equation.
(b) Assuming \( a + bK \ne 0 \), find the closed-loop steady-state output
\( y_{\text{ss}} \).
Solution: (a) Substituting the controller into the plant:
\[ \dot{y}(t) = -a\,y(t) + b\,K\bigl(r_0 - y(t)\bigr) = -(a + bK)\,y(t) + bK r_0. \]
(b) At steady-state \( \dot{y}(t) = 0 \), so
\[ 0 = -(a + bK)\,y_{\text{ss}} + bK r_0, \quad \text{with } a + bK \ne 0. \]
Solving for \( y_{\text{ss}} \) gives
\[ y_{\text{ss}} = \frac{bK}{a + bK} r_0. \]
As \( K \) increases (keeping \( a + bK > 0 \)), this steady-state value approaches \( r_0 \), illustrating how feedback can improve tracking accuracy.
Problem 3 (Error signal and control objectives).
For a general SISO feedback loop with reference \( r(t) \), output \( y(t)
\), and error \( e(t) = r(t) - y(t) \), suppose we define the performance
objective
\( J = \int_0^{\infty} e^2(t)\,dt \).
(a) Explain qualitatively what it means for a controller to be
better in terms of this cost.
(b) Explain why minimizing \( J \) simultaneously encourages accurate
tracking and fast decay of transients.
Solution: (a) For two controllers applied to the same plant and reference, the one with smaller \( J \) produces an error signal \( e(t) \) whose squared magnitude is smaller on average over time. This means the output is, in an aggregate sense, closer to the reference.
(b) The integrand \( e^2(t) \) penalizes both large errors and errors that persist for a long time. If the controller creates a transient that decays quickly, the contribution to \( J \) is limited to a small time interval. Conversely, slow decay or steady offsets cause a large integral. Thus, minimizing \( J \) encourages both (i) small steady-state error and (ii) fast transient response. Quantitative optimization of such costs is a central topic in optimal control; here we simply use it as a conceptual measure of feedback quality.
Problem 4 (Conceptual classification of control systems). List three axes along which control systems can be classified (for example, open-loop vs closed-loop). For each axis, briefly describe what the extremes mean in terms of information usage.
Solution:
- Open-loop vs closed-loop: In open-loop control the input \( u(t) \) is generated without using measurements of \( y(t) \); it is purely precomputed from the reference and time. In closed-loop control the input is computed from the error \( e(t) = r(t) - y(t) \), so it uses real-time feedback about the plant output.
- Manual vs automatic: In manual control a human operator reads sensors and decides on control actions; information processing occurs in the human. In automatic control, algorithms implement this mapping on a computer or analog circuitry.
- SISO vs MIMO: A SISO system has one input and one output; information flows along a single chain. A multi-input, multi-output (MIMO) system has vector inputs and outputs, and the controller uses information from multiple sensors to compute coordinated actuator commands (e.g., multi-joint robot arms).
8. Summary
In this lesson we gave a rigorous yet introductory answer to What is a control system? We defined input, output, reference, disturbance, and error signals, and we formalized a plant as an operator mapping signals to outputs, with linear differential equations as a key model class. We introduced the basic feedback loop structure and analyzed a simple first-order plant with proportional control, deriving explicit time-domain solutions for open-loop and closed-loop dynamics.
We also illustrated how these concepts are realized in software, using simple Euler simulations in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica, and we connected them to common robotics frameworks. Subsequent lessons in this chapter will refine the distinction between open-loop and closed-loop systems, detail the elements of a feedback control system, and begin to quantify stability and performance for linear systems.
9. References
- Maxwell, J.C. (1868). On governors. Proceedings of the Royal Society of London, 16, 270–283.
- Minorsky, N. (1922). Directional stability of automatically steered bodies. Journal of the American Society of Naval Engineers, 34(2), 280–309.
- Nyquist, H. (1932). Regeneration theory. Bell System Technical Journal, 11(1), 126–147.
- Bode, H.W. (1945). Network analysis and feedback amplifier design. Bell System Technical Journal, 24, 1–24 (and related papers).
- Wiener, N. (1949). Time series, harmonic analysis and generalized harmonic analysis. Proceedings of the National Academy of Sciences of the United States of America, 34(2), 97–109.
- Zames, G. (1981). Feedback and optimal sensitivity: Model reference transformations, multiplicative seminorms, and approximate inverses. IEEE Transactions on Automatic Control, 26(2), 301–320.
- Doyle, J.C., Francis, B.A., & Tannenbaum, A.R. (1992). Feedback Control Theory (various journal precursors).
- Åström, K.J. (2006). Introduction to stochastic control theory (early foundational works in feedback theory across several journal articles).