Skip to content

Commit e353a5e

Browse files
feat: comprehensive content improvements across all chapters (EN + ZH)
- Add poles/zeros intro in Ch2 DSP before first use, with forward reference to Ch3 for full treatment - Add notch filter subsection in Ch2 with transfer function, pole-zero interpretation, and discrete implementation - Add inline definitions for 12 technical terms at first occurrence: transfer function, phase margin, IMU, root locus, DAC, ISR, GPIO, spectral leakage, impulse invariance, canonical forms, Jacobian, under-damped step response - Expand Ch7 outlook with Koopman operator theory, adaptive control (MRAC/L1), Neural ODEs/PINNs, diffusion policies, foundation models (VLAs), and event-triggered control - Add clickable arXiv links for 16 key papers throughout Ch7 - Add "Further Reading" reference section at end of Ch7 - Update method comparison table from 10 to 15 entries
1 parent 06bfb44 commit e353a5e

16 files changed

Lines changed: 483 additions & 47 deletions

build/Control_Theory_Note.pdf

77.6 KB
Binary file not shown.

build/Control_Theory_Note_cn.pdf

55.6 KB
Binary file not shown.

sections/00_two_numbers.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ \subsection*{$\pi$\,: The Heartbeat of Periodicity}
2626
\begin{itemize}[nosep]
2727
\item The vibration of a mechanical structure,
2828
\item The AC voltage from a power supply,
29-
\item The oscillation of an under-damped step response,
29+
\item The oscillation of an under-damped step response (when a system overshoots its target and rings back and forth before settling---we will study this in detail later),
3030
\item The sampling clock of your microcontroller.
3131
\end{itemize}
3232

sections/02_digital_signal_processing.tex

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ \section{Digital Signal Processing}
44

55
You might be wondering: ``I signed up for control theory, why are we starting with signal processing?'' Great question. Here is the answer: \textbf{garbage in, garbage out.}
66

7-
Your controller is only as good as the data it receives. If your IMU reading is bouncing around like a caffeinated squirrel, no amount of PID tuning will save you. So before we learn to control systems, we learn to clean up their signals.
7+
Your controller is only as good as the data it receives. If your IMU (Inertial Measurement Unit---the small chip that combines accelerometers and gyroscopes to measure orientation and motion) reading is bouncing around like a caffeinated squirrel, no amount of PID tuning will save you. So before we learn to control systems, we learn to clean up their signals.
88

99
\subsection{Understanding the Frequency Domain}
1010

@@ -71,7 +71,29 @@ \subsubsection{Laplace Transform}
7171
\[
7272
\mathcal{L}\{e^{-at}\} = \int_0^{\infty} e^{-at} e^{-st} \, dt = \int_0^{\infty} e^{-(s+a)t} \, dt = \frac{1}{s+a}
7373
\]
74-
This is why a first-order system with pole at $s = -a$ has a time response of $e^{-at}$---the pole location \textit{is} the decay rate.
74+
Notice that $F(s) = \frac{1}{s+a}$ ``blows up'' when $s = -a$. That special value of $s$ is called a \textbf{pole}---we will define it properly in a moment.
75+
76+
\subsubsection{A First Look at Poles and Zeros}
77+
78+
We just saw that $\mathcal{L}\{e^{-at}\} = \frac{1}{s+a}$. The denominator becomes zero at $s = -a$, which means $F(s)$ shoots to infinity there. That point is called a \textbf{pole}.
79+
80+
In general, for any rational function in $s$---and most \textbf{transfer functions} (the ratio of a system's output to its input in the $s$-domain, which we will derive properly in the next chapter) are rational---we write:
81+
\[
82+
G(s) = \frac{N(s)}{D(s)} = \frac{(s - z_1)(s - z_2) \cdots}{(s - p_1)(s - p_2) \cdots}
83+
\]
84+
\begin{itemize}[nosep]
85+
\item \textbf{Poles} ($p_i$): roots of the denominator $D(s)$. These are the values of $s$ where $G(s) \to \infty$.
86+
\item \textbf{Zeros} ($z_i$): roots of the numerator $N(s)$. These are the values of $s$ where $G(s) = 0$.
87+
\end{itemize}
88+
89+
\textbf{Why should you care right now?} Because the pole location tells you the time-domain behavior directly:
90+
\begin{itemize}[nosep]
91+
\item A pole at $s = -a$ (negative real) produces $e^{-at}$---exponential decay. The more negative $a$ is, the faster the decay.
92+
\item A pole at $s = +a$ (positive real) produces $e^{+at}$---exponential growth. The system is unstable.
93+
\item A pair of complex poles $s = -\sigma \pm j\omega$ produces $e^{-\sigma t}\cos(\omega t)$---a decaying oscillation. (This should look familiar from the $e$ and $\pi$ section!)
94+
\end{itemize}
95+
96+
In short: \textbf{poles tell you what exponential and oscillatory modes are hiding inside a system.} Every time we design a filter in this chapter, we are really choosing where to put poles and zeros. We will revisit poles and zeros more rigorously in Section~\ref{sec:system_analysis_tf}, where we connect them to stability, speed, and overall system performance.
7597

7698
The \textbf{ramp} $t \cdot u(t)$:
7799
\[
@@ -116,7 +138,7 @@ \subsubsection{Frequency Spectrum}
116138
\item \textbf{Phase spectrum} $\angle F(j\omega)$: The time shift of each frequency component.
117139
\end{itemize}
118140

119-
For filter design, we mostly care about the magnitude spectrum. Phase becomes important later when we analyze control loop stability (phase margin).
141+
For filter design, we mostly care about the magnitude spectrum. Phase becomes important later when we analyze control loop stability (\textit{phase margin}---how much extra phase lag the system can tolerate before it becomes unstable; see the Classical Control chapter).
120142

121143
\begin{figure}[H]
122144
\centering
@@ -257,13 +279,40 @@ \subsubsection{High-Pass Filter}
257279

258280
\textbf{Practical note:} A complementary filter (commonly used for IMU sensor fusion) is just a low-pass filter on one sensor and a high-pass filter on another, with their cutoff frequencies matched so the gains add up to 1. The accelerometer gets low-passed (trust it for slow/static orientation) and the gyroscope gets high-passed (trust it for fast rotations). Simple, elegant, and surprisingly effective.
259281

282+
\subsubsection{Notch Filter (Band-Reject Filter)}
283+
284+
A notch filter is the opposite of a band-pass filter: it \emph{removes} a narrow band of frequencies while leaving everything else untouched. It is your surgical tool for killing a single problematic frequency---a structural resonance, a 50/60 Hz power-line hum, or a motor cogging frequency.
285+
286+
\textbf{Second-order notch filter:}
287+
\begin{equation}
288+
H(s) = \frac{s^2 + \omega_0^2}{s^2 + \frac{\omega_0}{Q}\,s + \omega_0^2}
289+
\end{equation}
290+
291+
where $\omega_0$ is the frequency to reject and $Q$ is the quality factor (higher $Q$ = narrower notch). At $s = j\omega_0$, the numerator evaluates to zero, so the gain drops to zero at exactly $\omega_0$. The denominator keeps the filter stable and controls the width of the rejection band.
292+
293+
\textbf{Pole-zero interpretation:} The numerator places a pair of \textit{zeros} on the imaginary axis at $s = \pm j\omega_0$---these create the ``notch'' by driving the gain to zero. The denominator places a pair of \textit{poles} slightly to the left of those zeros---these keep the filter stable and determine how quickly the gain recovers on either side. This is a textbook example of poles and zeros doing exactly what we described in Section 2.2: zeros kill frequencies, poles shape the surrounding response.
294+
295+
\textbf{When to use:}
296+
\begin{itemize}[nosep]
297+
\item A structural resonance is causing oscillation in your control loop (see the mecanum wheel case study earlier in this chapter).
298+
\item Power-line interference (50 or 60 Hz) is corrupting a sensor signal.
299+
\item A motor's cogging torque at a known frequency is visible in the velocity measurement.
300+
\end{itemize}
301+
302+
\textbf{Practical tip:} Getting $\omega_0$ wrong by even a few Hz can make the notch miss the target entirely. Always identify the exact resonance frequency from an FFT of your sensor data \textit{before} designing the filter. If the resonance frequency shifts with operating conditions (e.g., with speed or load), consider an \textbf{adaptive notch filter} that tracks $\omega_0$ in real time.
303+
304+
\textbf{Discrete-time implementation:} Like all filters in this chapter, the notch filter is implemented as a biquad (second-order section). The bilinear transform with pre-warping at $\omega_0$ converts $H(s)$ to $H(z)$ without shifting the notch frequency:
305+
\[
306+
s = \frac{\omega_0}{\tan(\omega_0 T_s / 2)} \cdot \frac{z - 1}{z + 1}.
307+
\]
308+
260309
\subsubsection{Filter Type Selection and Parameter Tuning}
261310

262311
Choosing the right filter comes down to answering three questions:
263312
\begin{enumerate}
264-
\item \textbf{What frequencies do I want to keep?} This determines the filter type (low-pass, high-pass, band-pass).
265-
\item \textbf{Where is the boundary?} This determines the cutoff frequency $f_c$.
266-
\item \textbf{How sharp should the transition be?} This determines the filter order.
313+
\item \textbf{What frequencies do I want to keep?} This determines the filter type (low-pass, high-pass, band-pass, or notch).
314+
\item \textbf{Where is the boundary?} This determines the cutoff frequency $f_c$ (or the rejection frequency $f_0$ for a notch).
315+
\item \textbf{How sharp should the transition be?} This determines the filter order (or $Q$ for a notch).
267316
\end{enumerate}
268317

269318
\textbf{Rules of thumb:}

sections/03_system_description.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ \subsubsection{State-Space Representation}
131131
\textbf{The trade-off:} State-space is more powerful but more abstract. Transfer functions give you better physical intuition for SISO systems. Good engineers are fluent in both.
132132

133133
\subsection{System Analysis via Transfer Functions}
134+
\label{sec:system_analysis_tf}
134135

135136
Given a transfer function $G(s)$, we can extract a wealth of information about the system.
136137

137-
\textbf{Poles and zeros.} Write $G(s) = \frac{N(s)}{D(s)}$. The roots of $N(s)$ are the \textbf{zeros}; the roots of $D(s)$ are the \textbf{poles}.
138+
\textbf{Poles and zeros revisited.} We introduced poles and zeros informally in the DSP chapter. Now let us be precise. Write $G(s) = \frac{N(s)}{D(s)}$. The roots of $N(s)$ are the \textbf{zeros}; the roots of $D(s)$ are the \textbf{poles}.
138139

139140
\begin{itemize}
140141
\item \textbf{Poles determine stability.} If all poles have negative real parts (i.e., they are in the left half of the complex plane), the system is stable. If any pole has a positive real part, the system is unstable and will blow up. Poles on the imaginary axis mean the system is marginally stable (perpetual oscillation).

sections/04_classical_control.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ \subsection{Controller Design via Transfer Functions}
129129

130130
The game of classical controller design is: given a plant $G(s)$, choose a controller $C(s)$ such that the closed-loop system $\frac{C(s)G(s)}{1+C(s)G(s)}$ meets your performance specifications.
131131

132-
There are many approaches (root locus, frequency response shaping, pole placement), but for competition robotics, the most practical approach is:
132+
There are many approaches---root locus (a graphical method that plots how the system's poles move in the complex plane as you sweep the controller gain), frequency response shaping (sculpting the Bode plot to meet specs), pole placement (directly choosing where the closed-loop poles should be)---but for competition robotics, the most practical approach is:
133133

134134
\begin{enumerate}
135135
\item Start with a PID controller (next section).

sections/05_discretization.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ \subsection{From Continuous to Discrete}
1010

1111
\subsubsection{Zero-Order Hold (ZOH)}
1212

13-
The ZOH method assumes the input is held constant between samples (which is exactly what a DAC does). It is the most physically accurate discretization method.
13+
The ZOH method assumes the input is held constant between samples (which is exactly what a DAC---Digital-to-Analog Converter, the chip that turns your microcontroller's digital number into a voltage---does). It is the most physically accurate discretization method.
1414

1515
\textbf{The idea:} Between sampling instants, the control signal is constant. We compute exactly what the continuous system would do under this piecewise-constant input.
1616

@@ -103,7 +103,7 @@ \subsubsection{FIR (Finite Impulse Response)}
103103
\textbf{Common FIR design methods:}
104104
\begin{itemize}
105105
\item \textbf{Window method}---truncate the ideal impulse response and apply a
106-
window function (Hamming, Blackman, Kaiser) to reduce spectral leakage.
106+
window function (Hamming, Blackman, Kaiser) to reduce spectral leakage (energy ``spilling'' from one frequency bin into neighboring bins due to the abrupt truncation of the impulse response).
107107
\item \textbf{Frequency sampling}---specify the desired magnitude response at
108108
DFT sample points and inverse-transform.
109109
\item \textbf{Parks--McClellan (Remez)}---an optimal algorithm that minimizes
@@ -152,7 +152,7 @@ \subsubsection{IIR (Infinite Impulse Response)}
152152
everywhere.
153153
\end{itemize}
154154

155-
Note that the bilinear transform and impulse invariance methods described in the
155+
Note that the bilinear transform and impulse invariance (a method that samples the analog filter's impulse response at the discrete time instants, preserving the time-domain shape but risking aliasing at high frequencies) methods described in the
156156
previous subsection are precisely the tools used to convert these analog prototypes
157157
into discrete IIR filters.
158158

@@ -285,7 +285,7 @@ \subsection{Fixed-Point vs Floating-Point Arithmetic}
285285
\item \textbf{Cascading failure:} In a cascaded architecture, if the inner loop overruns, the outer loop receives stale velocity data. The outer loop's response degrades, and disturbance rejection---the primary reason for using cascaded control---is compromised.
286286
\end{itemize}
287287

288-
\textbf{Practical diagnostics.} Toggle a GPIO pin at the start and end of your ISR, and observe the pulse width on an oscilloscope. If the pulse width is close to $T_s$, you are in danger. If it ever exceeds $T_s$, you have a deadline violation that \textit{must} be fixed before tuning.
288+
\textbf{Practical diagnostics.} Toggle a GPIO pin (General-Purpose Input/Output---a digital pin you can set high or low from code) at the start and end of your ISR (Interrupt Service Routine---the function the hardware calls automatically at each timer tick), and observe the pulse width on an oscilloscope. If the pulse width is close to $T_s$, you are in danger. If it ever exceeds $T_s$, you have a deadline violation that \textit{must} be fixed before tuning.
289289

290290
\textbf{What to do when computation is too slow:}
291291
\begin{enumerate}[nosep]

sections/06_modern_control.tex

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ \subsection{Relationship Between State-Space and Transfer Functions}
2222
G(s) = C(sI - A)^{-1}B + D
2323
\end{equation}
2424

25-
\textbf{Transfer function to state-space:} Not unique---many different state-space realizations can give the same transfer function. Common forms include controllable canonical form and observable canonical form.
25+
\textbf{Transfer function to state-space:} Not unique---many different state-space realizations can give the same transfer function. Common forms include \textit{controllable canonical form} (the denominator coefficients appear directly in the last row of $A$, making it easy to verify controllability) and \textit{observable canonical form} (the denominator coefficients appear in the last column of $A$, making observability transparent). In practice, MATLAB's \texttt{tf2ss} gives you one realization; which canonical form you use matters mainly for hand analysis.
2626

2727
\textbf{The key difference:} Transfer functions describe the input-output behavior. State-space describes the internal dynamics. A system can have identical transfer functions but different internal structures---the state-space representation captures this extra information.
2828

@@ -605,6 +605,18 @@ \subsubsection{Extended Kalman Filter (EKF)}
605605
\mathbf{y}_k &= h(\mathbf{x}_k) + \mathbf{v}_k \quad \text{(nonlinear measurement)}
606606
\end{align}
607607

608+
\textbf{The Jacobian matrix --- what it is and why we need it.}\;The Kalman filter's covariance propagation ($P_{k|k-1} = A P_{k-1|k-1} A^T + Q$) requires a \emph{matrix} $A$. But for a nonlinear system, there is no single matrix $A$---the ``slope'' of $f$ changes everywhere. The solution is to use the \textbf{Jacobian matrix}, which is simply the multivariable generalization of the derivative.
609+
610+
Recall from calculus: for a scalar function $y = f(x)$, the derivative $f'(x_0)$ tells you the best linear approximation near $x_0$: $f(x) \approx f(x_0) + f'(x_0)(x - x_0)$. The Jacobian does the same thing for a \emph{vector-valued} function of \emph{multiple variables}. If $\mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m$, the Jacobian is the $m \times n$ matrix of all partial derivatives:
611+
\[
612+
F = \frac{\partial \mathbf{f}}{\partial \mathbf{x}} = \begin{bmatrix}
613+
\frac{\partial f_1}{\partial x_1} & \cdots & \frac{\partial f_1}{\partial x_n} \\
614+
\vdots & \ddots & \vdots \\
615+
\frac{\partial f_m}{\partial x_1} & \cdots & \frac{\partial f_m}{\partial x_n}
616+
\end{bmatrix}.
617+
\]
618+
Each row tells you how one output component changes with respect to all inputs. Evaluated at a specific point $\mathbf{x}_0$, the Jacobian gives the best local linear approximation: $\mathbf{f}(\mathbf{x}) \approx \mathbf{f}(\mathbf{x}_0) + F(\mathbf{x} - \mathbf{x}_0)$---exactly the ``pretend the system is locally linear'' step the EKF needs.
619+
608620
\textbf{EKF algorithm:}
609621

610622
\textit{Predict:}

0 commit comments

Comments
 (0)