Control and system dynamics
Transfer functions, feedback, PID control, and state-space models of dynamic systems.
Hold a chemical reactor at 350 °C, a car at 100 km/h, the tip of an atomic force microscope at constant force on a sample, or a patient's blood glucose in range with an insulin pump, and you have the same problem: measure the output and correct the input by how far it is from the setpoint. Correcting in proportion to the error alone falls short. On a first-order process with a loop gain of 4 it settles 20 % below the setpoint, and with a gain of 9 still 10 % below. Add a term that integrates the error and the offset goes to zero, at the price of an approach that can overshoot.
In Python, scipy.signal holds linear time-invariant models as TransferFunction and StateSpace and computes their responses with step, bode, and lsim. python-control adds what a control engineer needs: control.tf and control.ss build models, control.feedback closes a loop, control.step_response and control.bode_plot show the result, and control.margin returns the gain and phase margins. In Julia, ControlSystems.jl covers the same ground with tf, ss, feedback, step, bodeplot, margin, and pid.
Start with the step response of a first-order system and its time constant, then a second-order system, where the damping ratio decides the overshoot: 52.7 % at a damping ratio of 0.2, 4.6 % at 0.7. A transfer function is a linear ODE written in the Laplace domain, so ordinary differential equations are the background. Then come the frequency response and closing the loop with P, PI, and PID control, with stability read from the margins. State-space models and system identification from measured responses come after. Tune a controller on a model before you tune it on the hardware. The model forgives an unstable gain; a reactor does not.
What belongs here
Describing and steering dynamic systems: linear time-invariant models, transfer functions and state space, step and frequency responses, stability, feedback and PID control, and system identification from measured responses, with scipy.signal and python-control in Python and ControlSystems.jl in Julia. Filtering measured signals belongs to signal-processing; nonlinear dynamics without control to dynamical-systems.
0 tutorials by type and language
| Python | Julia | |
|---|---|---|
| Concept | – | – |
| Tool | – | – |
| Recipe | – | – |
| Visualization | – | – |
| Project | – | – |