You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: sections/00_two_numbers.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ \subsection*{$\pi$\,: The Heartbeat of Periodicity}
26
26
\begin{itemize}[nosep]
27
27
\item The vibration of a mechanical structure,
28
28
\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),
Copy file name to clipboardExpand all lines: sections/02_digital_signal_processing.tex
+55-6Lines changed: 55 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ \section{Digital Signal Processing}
4
4
5
5
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.}
6
6
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.
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:
\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.
\item\textbf{Phase spectrum} $\angle F(j\omega)$: The time shift of each frequency component.
117
139
\end{itemize}
118
140
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).
\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.
259
281
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.
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:
\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.
132
132
133
133
\subsection{System Analysis via Transfer Functions}
134
+
\label{sec:system_analysis_tf}
134
135
135
136
Given a transfer function $G(s)$, we can extract a wealth of information about the system.
136
137
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}.
138
139
139
140
\begin{itemize}
140
141
\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).
Copy file name to clipboardExpand all lines: sections/04_classical_control.tex
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ \subsection{Controller Design via Transfer Functions}
129
129
130
130
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.
131
131
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:
Copy file name to clipboardExpand all lines: sections/05_discretization.tex
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ \subsection{From Continuous to Discrete}
10
10
11
11
\subsubsection{Zero-Order Hold (ZOH)}
12
12
13
-
The ZOH method assumes the input is held constant between samples (which is exactly what a DACdoes). 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.
14
14
15
15
\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.
\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).
107
107
\item\textbf{Frequency sampling}---specify the desired magnitude response at
108
108
DFT sample points and inverse-transform.
109
109
\item\textbf{Parks--McClellan (Remez)}---an optimal algorithm that minimizes
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
156
156
previous subsection are precisely the tools used to convert these analog prototypes
157
157
into discrete IIR filters.
158
158
@@ -285,7 +285,7 @@ \subsection{Fixed-Point vs Floating-Point Arithmetic}
285
285
\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.
286
286
\end{itemize}
287
287
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.
Copy file name to clipboardExpand all lines: sections/06_modern_control.tex
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ \subsection{Relationship Between State-Space and Transfer Functions}
22
22
G(s) = C(sI - A)^{-1}B + D
23
23
\end{equation}
24
24
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 formand 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.
26
26
27
27
\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.
\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}
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.
0 commit comments