Module 01

Mathematical Foundations

A focused refresher on calculus, linear algebra, and differential equations — through the lens of what matters for understanding dynamic systems.

Why This Math Matters for Control

Before we dive in, let's understand why these mathematical tools are essential. Control theory is fundamentally about systems that change over time and how we can influence that change.

The Core Question

Given a system's current state and our desired goal, what inputs should we apply to get there — and will it work?

To answer this, we need:

Part 1: Calculus — The Language of Change

Derivatives: Instantaneous Rate of Change

The derivative tells us how fast something is changing right now. In control, we constantly deal with rates: velocity is the derivative of position, current is the derivative of charge, temperature change rate, etc.

$$\frac{dy}{dt} = \lim_{\Delta t \to 0} \frac{y(t + \Delta t) - y(t)}{\Delta t}$$

Physical Intuition

Think of a car's speedometer. Position $y(t)$ tells you where you are. The derivative $\frac{dy}{dt}$ is your speed — how fast your position is changing. The second derivative $\frac{d^2y}{dt^2}$ is acceleration — how fast your speed is changing.

Interactive: See the Derivative in Action

1.0
Observe: When the blue function (sin) is at its peak, its derivative (green, cos) is zero — it's momentarily not changing. When sin crosses zero, it's changing fastest, so the derivative is at its maximum.

Key Derivative Rules You'll Use

Essential Rules

$$\frac{d}{dt}(e^{at}) = a \cdot e^{at}$$

Exponentials are everywhere in control — they describe natural decay and growth.

$$\frac{d}{dt}\sin(\omega t) = \omega \cos(\omega t)$$

Chain Rule

$$\frac{d}{dt}f(g(t)) = f'(g(t)) \cdot g'(t)$$

When functions are nested, multiply "outside derivative" by "inside derivative".

Integrals: Accumulation Over Time

If derivatives tell us the rate of change, integrals tell us the total accumulation. Position is the integral of velocity. Charge is the integral of current. Total energy is the integral of power.

$$y(t) = \int_0^t v(\tau) \, d\tau + y(0)$$

Physical Intuition

If you know your speed at every moment and your starting position, you can figure out where you end up by "adding up" all the little distance increments. That's integration — continuous accumulation.

Interactive: Integration as Accumulation

1.0
Observe: The orange curve is a rate (like velocity). The purple curve is its integral (like position). When the rate is positive, the accumulated value increases. When negative, it decreases.

Part 2: The Exponential — Nature's Favorite Function

If there's one function you must deeply understand for control theory, it's the exponential. It appears everywhere because it's the solution to the simplest differential equation: the rate of change is proportional to the current value.

$$\frac{dy}{dt} = -\frac{1}{\tau}y \quad \Rightarrow \quad y(t) = y_0 \cdot e^{-t/\tau}$$

The Time Constant τ (tau)

The time constant τ tells you how fast the system responds:

  • At $t = \tau$: the value has dropped to ~37% of initial
  • At $t = 3\tau$: dropped to ~5%
  • At $t = 5\tau$: essentially reached steady state (~0.7%)

Interactive: Exponential Decay and Time Constant

1.5
Key insight: Larger τ means slower decay. A system with τ = 0.5s responds much faster than one with τ = 3s. This concept of "time constant" will reappear throughout control theory.

Why Exponentials Dominate Control Theory

Real systems governed by linear differential equations always have solutions involving exponentials (and sines/cosines, which are related via $e^{i\theta} = \cos\theta + i\sin\theta$). When you see a transfer function's "poles," you're looking at the exponents of these exponentials.

Part 3: Linear Algebra — Multiple Variables at Once

Real systems have multiple interacting variables. A robot arm has positions and velocities for each joint. An electrical circuit has voltages and currents at each node. Linear algebra gives us the tools to handle all these simultaneously.

Vectors: Packaging Multiple Values

Instead of tracking position $x$, velocity $v$, and angle $\theta$ separately, we pack them into a state vector:

$$\mathbf{x} = \begin{bmatrix} x \\ v \\ \theta \end{bmatrix}$$

Matrices: Linear Transformations

A matrix transforms one vector into another. In state-space control, we describe how the state evolves using matrix equations:

$$\dot{\mathbf{x}} = A\mathbf{x} + B\mathbf{u}$$

The matrix $A$ describes how the current state affects the rate of change. The matrix $B$ describes how our control input $\mathbf{u}$ affects it.

Interactive: Visualize Matrix Transformations

Observe: The original square and circle (faded) get transformed by matrix A. The green and orange arrows show where the basis vectors land. When det(A) = 0, everything collapses to a line. Eigenvalues tell you about stretching/rotating.

Eigenvalues: The Key to System Behavior

Eigenvalues are perhaps the most important concept from linear algebra for control. They tell us about stability and the natural modes of a system.

What Eigenvalues Tell Us

For a system $\dot{\mathbf{x}} = A\mathbf{x}$, eigenvalues of $A$ determine behavior:

  • Negative real eigenvalues → Stable decay (good!)
  • Positive real eigenvalues → Unstable growth (bad!)
  • Complex eigenvalues → Oscillation (real part determines if growing/decaying)
  • Zero eigenvalue → Marginally stable / integrator

Part 4: Differential Equations — Modeling Change

Everything comes together here. A differential equation relates a quantity to its rate of change. This is how we model physical systems mathematically.

First-Order Systems

The simplest dynamic system has one "energy storage" element:

$$\tau \frac{dy}{dt} + y = K \cdot u(t)$$

Where $\tau$ is the time constant, $K$ is the gain, and $u(t)$ is the input. This describes countless physical systems: RC circuits, thermal systems, simple mechanical dampers.

Interactive: First-Order System Step Response

1.5
Observe: The system starts from 0 and rises toward 1 (the step input level). The rate of change (dashed) is highest initially and decreases as we approach steady state. After about 3τ, we're within 5% of the final value.

Second-Order Systems

Systems with two energy storage elements (like mass-spring-damper) give us second-order equations:

$$\frac{d^2y}{dt^2} + 2\zeta\omega_n\frac{dy}{dt} + \omega_n^2 y = \omega_n^2 u(t)$$

The Two Key Parameters

  • $\omega_n$ (natural frequency) — How fast the system naturally oscillates
  • $\zeta$ (damping ratio) — How quickly oscillations die out
    • $\zeta < 1$: Underdamped (oscillates)
    • $\zeta = 1$: Critically damped (fastest without overshoot)
    • $\zeta > 1$: Overdamped (sluggish, no oscillation)

Example: Mass-Spring-Damper

Consider a mass $m$ on a spring (stiffness $k$) with damper (coefficient $b$):

$$m\ddot{x} + b\dot{x} + kx = F(t)$$

Dividing by $m$ and comparing with standard form:

  • $\omega_n = \sqrt{k/m}$ — stiffer spring or lighter mass = higher frequency
  • $\zeta = \frac{b}{2\sqrt{km}}$ — more damping = less oscillation

Summary: Your Mathematical Toolkit

Core Concepts

  • Derivatives = instantaneous rate of change
  • Integrals = accumulation over time
  • Exponentials = natural response of linear systems
  • Time constant τ = speed of response
  • Eigenvalues = stability and natural modes

Key Equations

$$y(t) = y_0 e^{-t/\tau}$$
$$\dot{\mathbf{x}} = A\mathbf{x} + B\mathbf{u}$$