# Control theory
Control theory develops models and algorithms that apply inputs to a [[Dynamical_system|dynamical system]] so as to drive it toward desired states while minimizing error, delay, overshoot, and instability. [[Feedback|Feedback]] (closed-loop), feedforward, PID, optimal, robust, adaptive, and intelligent controllers exploit controllability, observability, and stability criteria (Lyapunov, Nyquist, Bode) for engineered and natural processes.
<!-- LEGACYSIM:BEGIN v1.5 — generated by g03_mint_wave.py; three.js first; do not hand-edit inside -->
## Microsims (promoted from legacy — three.js first)
### MicroSim spec
### Parameters (tunable controls)
- `Kp (proportional)` · 0–10 · stiffness of the proportional response
- `Kd (derivative)` · 0–5 · [[Damping|damping]] that reacts to error rate
- `Setpoint` · 0–100 · target the controlled state should track
### What animates
A step response curve rises, overshoots, and settles depending on the gains.
### Learning objective
Show how PID-style gains shape the transient response of a [[Dynamical_system|dynamical system]].
### MicroSim spec
- **Recommended sim type:** [[Control_system|control system]]
- **Microsimmability score:** 88/100
- **Layout:** drawing region (canvas) on top; control region (sliders/buttons) below.
### Parameters (tunable controls)
- `Setpoint`
- `Proportional gain`
- `Integral gain`
### What animates
A controlled output overshoots, settles, or oscillates as the controller gains are tuned.
### Learning objective
Show how controller gains shape a system's response to its setpoint.
### MicroSim spec
- **Recommended sim type:** control-system [[Block_diagram|block diagram]]
- **Microsimmability score:** 100/100
- **Layout:** controller-plant block diagram on top with a response plot; sliders below.
### Parameters (tunable controls)
- `Proportional gain Kp`
- `Integral gain Ki`
- `Setpoint`
### What animates
A controller drives a plant toward the setpoint; the error trace and step response update live as the gains change.
### Learning objective
Relate controller gains to rise time, overshoot, and steady-state error.
### MicroSim spec
- **Recommended sim type:** [[Control_system|control system]]
- **Microsimmability score:** 90/100
- **Layout:** drawing region (canvas) on top; control region (sliders/buttons) below.
### Parameters (tunable controls)
- `Setpoint`
- `Gain`
- `System lag`
### What animates
A controller drives a plant's output toward a setpoint and you watch the error shrink or oscillate.
### Learning objective
Relate controller gain and [[System|system]] lag to closed-loop stability and tracking.
<!-- LEGACYSIM:END -->
<!-- MICROSIMGEN:BEGIN v1.7 — generated by g08_place_microsims.py; three.js first (§15); do not hand-edit inside -->
## Microsims — p5.js
### Control theory (p5.js) · `feedback`
<div class="microsim-player">
<iframe src="https://editor.p5js.org/sciencenibber/full/DtAoGXBbj" width="100%" height="480" frameborder="0" loading="lazy" sandbox="allow-scripts allow-same-origin" title="Control theory — p5.js microsim"></iframe>
</div>
*The mathematics of steering a system to a desired state despite disturbances.*
**Open in the editor:** [▶ fork this sketch](https://editor.p5js.org/sciencenibber/sketches/DtAoGXBbj) · movement *VI · Control theory & estimation* · library `p5js`
### Related microsims
Live sims on neighbouring articles — 6 of them inside this article's own Wikipedia link tree:
- [[Analog_signal]] *(in tree)*
- [[Autocorrelation]] *(in tree)*
- [[Bifurcation_theory]] *(in tree)*
- [[Calculus]] *(in tree)*
- [[Chaos_theory]] *(in tree)*
- [[Communication_channel]] *(in tree)*
*Sim hosted off-article; the article owns the reference, not the runtime (WIKI_RULES §10.4). Placed by `g08_place_microsims.py`.*
<!-- MICROSIMGEN:END -->
<!-- GIFPLATE:BEGIN v1.0 g16 — Commons hotlink; do not hand-edit inside -->
## Images
<figure class="wt-gifplate">
<img src="https://commons.wikimedia.org/wiki/Special:FilePath/Buck_switching_regulator_with_feedback_control.gif" alt="Feedback Regulation" loading="lazy" decoding="async">
<figcaption><strong>Feedback Regulation</strong> — Watch voltage oscillate around a target value, correcting itself. This is negative feedback.<br>
<span class="wt-credit">Wikimedia Commons · <strong>licence pending verification</strong> (run <code>g17_gif_verify.py</code> on a networked lane) · <a href="https://commons.wikimedia.org/wiki/File:Buck_switching_regulator_with_feedback_control.gif">Details</a></span></figcaption>
</figure>
*The hub concept of [[PORTAL_Control_theory]]. Still companion to the 1 live microsim above — §15 keeps the player first, the plate sits in the image slot.*
<!-- GIFPLATE:END -->
## Reveal
%%REVEAL:p5%%
%%REVEAL:svg%%
---
*Concept aligned with [Wikipedia](https://en.wikipedia.org/wiki/Control_theory); adapted text, where present, is licensed [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).*
## Overview
The regulation story is [[Cybernetics|cybernetics]] made rigorous: [[Norbert_Wiener|Norbert Wiener]]'s circular causality, [[W._Ross_Ashby|W. Ross Ashby]]'s requisite variety, and [[Stafford_Beer|Stafford Beer]]'s management cybernetics all read as control loops, and homeostasis in an [[Ecosystem|ecosystem]] or organism reads the same way through [[Systems_biology|systems biology]]. Design mathematics leans on [[Statistics|statistics]], optimization shared with [[Operations_research|operations research]] and [[Decision_theory|decision theory]], and structure from [[Graph_theory|graph theory]] and [[Information_theory|information theory]].
Modern practice extends through [[Multi-agent_system|multi-agent systems]], [[Game_theory|game-theoretic]] control, [[Neural_network_(machine_learning)|neural-network]] and [[Machine_learning|learning-based]] controllers inside [[Artificial_intelligence|artificial intelligence]], and system-level integration in [[Systems_engineering|systems engineering]], with behavior-over-time intuition borrowed from [[System_dynamics|system dynamics]] and [[Systems_thinking|systems thinking]].
<!-- CRAFT-LINK:START g12 -->
*Built to the [[WT!P5_js_Microsim_Master_Class|p5.js Master Class]].*
<!-- CRAFT-LINK:END -->
## Wikipedia : Wikitube
**Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Control_theory) : [Wikitube](https://en.wikitube.io/wiki/Control_theory)
## Previous hub tags
Hubs: `Systems`. Portals: [[PORTAL_Systems]], [[PORTAL_Control_theory]].