What this tool computes
A PID controller generates a control signal from the difference between a desired reference and the
measured output. The proportional term reacts to the present error, the integral term accumulates
past error, and the derivative term reacts to how quickly the error is changing.
\[
u(t)=K_p e(t)+K_i\int_0^t e(\tau)\,d\tau + K_d \frac{de(t)}{dt}
\]
In this playground, the controller acts on a simple second-order plant. The page simulates the closed-loop
response to a step command and reports the key performance measures used in introductory control analysis.
- Rise time
- Peak overshoot
- Settling time
- Steady-state error
- Peak control signal magnitude
- Basic stability indication
Core control theory
Closed-loop idea
A reference signal \(r(t)\) is compared with the system output \(y(t)\). Their difference,
\(e(t)=r(t)-y(t)\), drives the controller. The controller then applies an input \(u(t)\) to the plant.
The goal is to reduce the error and make the output follow the reference.
\[
e(t)=r(t)-y(t)
\]
Plant model used in this tool
The plant is modeled as a standard second-order system:
\[
\ddot y + 2\zeta\omega_n \dot y + \omega_n^2 y = \omega_n^2 u
\]
where \(\omega_n\) is the natural frequency and \(\zeta\) is the damping ratio. This makes the page
useful for learning because it clearly shows how controller gains interact with plant dynamics.
What each gain does
- Proportional gain \(K_p\): increases responsiveness but can also increase overshoot.
- Integral gain \(K_i\): reduces or eliminates steady-state error, but too much may cause oscillation.
- Derivative gain \(K_d\): adds damping and can reduce overshoot by reacting to the trend of the error.
Good tuning is always a trade-off. A controller can be made faster, but excessive gains may create oscillation,
instability, or unnecessarily large control effort.
Interpretation guide
The response plots and metrics should be read together. A fast rise time is attractive, but if it comes with
high overshoot or strong oscillations, the controller may not be desirable in practice. Likewise, removing
steady-state error using the integral term is useful, but aggressive integral action can cause sluggish recovery
or instability.
- If \(K_p\) is too small, the response is slow and weak.
- If \(K_p\) is too large, the system may overshoot or oscillate.
- If \(K_i\) is too small, steady-state error may remain.
- If \(K_i\) is too large, the output may hunt around the target.
- If \(K_d\) is increased moderately, oscillation often decreases.
- If \(K_d\) is too large, the control action can become noisy or overly aggressive.
Why this tool matters
PID control is one of the most widely used feedback strategies in engineering because it is simple,
intuitive, and effective across many applications. In aerospace systems, PID-style loops appear in
attitude control, reaction-wheel regulation, gimbal control, flight stabilization, and actuator command shaping.
This tool connects controller gains to directly visible dynamic behaviour. That makes it valuable for learning
how stability, responsiveness, damping, and control effort compete with one another in real design work.