JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Feedback and a First Look at Control

Every model so far has run free, with no one steering. This capstone asks the opposite question: what if a system watches its own output and adjusts? That single idea — feedback — turns a thermostat, a cruise control, and a drug-dosing pump into the same differential equation, and it is where ODEs stop describing the world and start governing it.

From Describing to Steering

Look back at the four models of this rung. The predator-prey system cycles on its own, the SIR epidemic burns through a population and stops, the pendulum swings, and a drug spreads through the compartments of the body. In every case we wrote down an ODE and then *watched* what it did. Nobody was at the controls. This last guide flips that stance: instead of asking "what will this system do?", we ask "how do I make it do what I want?". The bridge between those two questions is one idea — feedback — and it is the doorway from describing nature to engineering it.

Here is the picture in one breath. A plant is the thing you want to manage — a room whose temperature is y(t), a car whose speed is y(t), the drug level in the blood. It obeys some ODE you already know how to write. A controller watches y(t), compares it to a target value r (the setpoint), forms the error e(t) = r - y(t), and pushes the plant with an input u(t) chosen to shrink that error. The loop closes because u depends on y, which depends on u. That circular dependence is what the word feedback names, and it is exactly a coupled input-output system of ODEs.

The Simplest Loop: Proportional Control

Take the most familiar plant in this whole ladder: a cooling room. By Newton's law of cooling, the temperature y obeys y' = -k(y - y_out), a first-order linear equation you solved long ago — left alone it drifts to the outside temperature y_out. Now add a heater whose power is our input u, so y' = -k(y - y_out) + u. The plainest possible controller says: push in proportion to how wrong you are. That is proportional control, u = K_p * e = K_p (r - y), with a single knob K_p called the gain.

Substitute the control law back into the plant and the magic of feedback appears as algebra. We get y' = -k(y - y_out) + K_p(r - y) = -(k + K_p) y + (k*y_out + K_p*r). This is *still* a first-order linear ODE, but its decay rate is now k + K_p instead of k — the feedback has made the room respond faster — and its steady state (set y' = 0) sits at y_inf = (k*y_out + K_p*r) / (k + K_p). Crank the gain K_p up and y_inf marches toward the setpoint r, because the K_p*r term dominates. The loop genuinely steers the room.

PID: Three Terms That Run the Modern World

The PID controller is the workhorse of industry — it governs cruise control, drone stabilizers, 3D-printer heaters, and chemical reactors — and it is nothing more than three readings of the same error e(t) added together. The Proportional term reacts to the error *now*. The Integral term, K_i * (integral of e dt), accumulates *past* error, so even a tiny persistent offset keeps building until it forces the output onto target — this term is what erases the steady-state error we just met. The Derivative term, K_d * e', anticipates the *future* by reacting to how fast the error is changing, which damps overshoot and calms the approach.

u(t) = K_p * e(t)  +  K_i * integral(e dt)  +  K_d * e'(t)
          |                  |                      |
        PRESENT            PAST                  FUTURE
     react to error    erase steady          damp overshoot,
        right now       offset over          anticipate the
                          time                  trend

   e(t) = r - y(t)        (r = setpoint,  y = measured output)
The whole PID law on one line: present, past, and future of the error, each with its own gain. Tuning a PID controller is the art of choosing K_p, K_i, K_d so the closed loop settles fast without oscillating.

Here is the lovely part, and why this belongs in an ODE course at all. Feed PID into a second-order plant and the closed loop becomes a second-order linear ODE you already know how to read: m*y'' + c*y' + (k + K_p) y + (integral and derivative corrections) = K_p*r + ... The integral term effectively adds a dimension, raising the order by one; the derivative term adds to the *damping* coefficient. So tuning the gains is literally moving the coefficients of a differential equation — and you have spent this whole ladder learning what those coefficients mean. A bigger K_d means more damping; too little and the response rings, too much and it crawls.

Poles, Stability, and Why Feedback Can Bite

To see whether a tuned loop settles or blows up, engineers reach for the Laplace transform — the very tool from the earlier Laplace rung. Transforming the loop's ODE turns calculus into algebra and packs the whole plant into one transfer function G(s), a ratio of polynomials. The roots of its *denominator* are the poles of the closed-loop system, and these poles are exactly the exponents of the natural responses, e^(s t), that the loop produces on its own. Real, negative pole means a decaying mode; a complex pair means a damped oscillation; a pole in the right half-plane means a growing e^(s t) — the loop is unstable.

So the entire question "is my controller stable?" collapses to "are all the closed-loop poles in the left half of the complex plane?" — the same left-half-plane condition that decided stability for every linear ODE on this ladder. And now the danger of feedback shows its teeth. As you raise the gain to track the setpoint harder, you *move the poles*. Push them too far and a complex pair crosses into the right half-plane: the once-calm loop begins to oscillate with growing amplitude. This is feedback-induced instability, and it is a cousin of resonance — but note the honest subtlety, that you do not need zero damping to get a violent response, only poles that have wandered to the wrong side.

Feedback Was Hiding in Every Model All Along

Once you have the feedback lens, look back and the whole rung rearranges itself. The logistic equation is negative feedback wearing a biologist's coat: the crowding term -y^2 is the population pushing back on its own growth, which is exactly why it settles at carrying capacity instead of exploding. The SIR model feeds the infected count back into the rate of new infections; herd immunity is that loop running out of fuel. Predator-prey is feedback too, but with a *delay* baked in — predators respond to prey numbers a generation behind, and that lag is what turns simple regulation into the endless cycling you saw, the same lag-makes-oscillation lesson the control engineer learns about delay.

This is the quiet payoff of the whole ladder. The integrating factor, the eigenvalue method, the Laplace transform, the phase plane, stability of equilibria — they were never separate tricks. They are facets of one craft: writing down how a quantity's *rate of change* depends on its *current state*, then reading the consequences. Feedback is simply the case where you, the engineer, get to *design* part of that dependence. The same e^(s t) modes, the same left-half-plane stability test, the same steady-state-versus-transient split that you met in a bare first-order equation are what tell you whether your cruise control will hold the speed or surge and brake forever.

And this is genuinely just a first look. Real control theory goes on to state-space models (your input-output system rewritten as a first-order vector system x' = Ax + Bu, governed by the eigenvalues of A), to optimal control that *minimizes* a cost over the whole trajectory, to nonlinear and adaptive and robust control that face the messiness an honest model admits. But the seed is everything you now hold: an ODE for the plant, a rule that closes the loop, and the poles that decide its fate. From here, the differential equation is no longer something the world does to you — it is something you can shape.