// 04 · Process control systems

Dynamics & Process Control

Simulate PID controllers with step response, tune Kc, τI and τD parameters, analyze first and second order system dynamics, and visualize Bode frequency response diagrams.

Setpoint r(t) Σ + e(t) PID Kc, τI, τD Kc=2.0 u(t) Process G(s) Kp/(τs+1) y(t) Feedback Sensor H(s) Overshoot 12% Settling time 8.2s Steady-state error 0.0% System stable — closed-loop poles in left half-plane
PID: u(t) = Kc·[e(t) + (1/τI)·∫e dt + τD·de/dt]
Closed-loop: Y/R = GcG / (1 + GcGH)
Ziegler-Nichols: Kc = 0.6·Ku  |  τI = Pu/2  |  τD = Pu/8
SP tr ts OS% y(t) t (s) Order 2nd ζ (damping) 0.70 ωn (rad/s) 1.00 Regime Underdamped
1st order: G(s) = Kp/(τs+1) → y(t) = Kp·(1-e^(-t/τ))·u(t)
2nd order: G(s) = ωn²/(s²+2ζωns+ωn²)
Performance: OS = e^(-πζ/√(1-ζ²)) · 100%  |  ts ≈ 4/(ζ·ωn)
Magnitude (dB) 0 -3 dB GM Phase (°) -180° -90° PM 0.01 0.1 1 10 ω Gain Margin ∞ dB Phase Margin 90°
Transfer function: G(s) = Kp·e^(-θs) / (τs+1)
Gain margin: GM = 1/|G(jω_pc)|  |  Phase margin: PM = 180° + ∠G(jω_gc)
Stability: GM > 1 (0 dB)  &&  PM > 0° → stable closed-loop
Dynamic response analysis
PID step response · Closed-loop poles
Step response — PID closed-loop
Step response
Root locus / Pole-zero map
Root locus