Control Systems
PID Controller Simulator
Analyze closed-loop control system responses. Tune Proportional (Kp), Integral (Ki), and Derivative (Kd) controller gains to stabilize a mass-spring-damper plant on step inputs.
Loop Type
PID Feedback
Continuous-time
Solver
Euler ODE
dt = 0.05s
Output
CSV
Export ready
Parameters
System Preset
Animated transient sweep
Closed-Loop Feedback Physics
PID Control Effort
u(t) = Kp*e(t) + Ki*∫e(τ)dτ + Kd*(de/dt)
Error Definition
e(t) = x_target - x(t)
Dynamic Equation
m*x''(t) + c*x'(t) = u(t)
Controller proportional response (Kp = 150) applies a restorative force directly proportional to displacement error.
Integral gain (Ki = 10) eliminates steady-state offset by accumulating historical tracking errors.
Derivative damping (Kd = 20) acts on the speed of error changes to dampen oscillatory overshoots.
State Mechanical Workspace
Mass-Spring-Damper LoopTime: 0.00 s
Overshoot
24.5%
Settling Time
0.85s
Steady-State Error
1.01mm
Peak Position
249.0mm
Step Response Curve (Position vs. Control Force)
Step-Response Time Series
| Time (s) | Position (mm) | Error (mm) | Net Force (N) |
|---|---|---|---|
| 0.00 | 15.1 | 200.0 | 30100.0 |
| 0.50 | 249.0 | -45.0 | -10069.7 |
| 1.00 | 193.7 | 2.9 | 2584.5 |
| 1.50 | 201.9 | -0.5 | -461.7 |
| 2.00 | 202.4 | -2.8 | 14.4 |
| 2.50 | 201.3 | -1.2 | 32.1 |
| 3.00 | 201.7 | -1.8 | -18.1 |
| 3.50 | 201.5 | -1.5 | 6.2 |
| 4.00 | 201.5 | -1.5 | -1.9 |
| 4.50 | 201.5 | -1.5 | 0.2 |
| 5.00 | 201.4 | -1.4 | -0.2 |
| 5.50 | 201.4 | -1.4 | -0.2 |
| 6.00 | 201.3 | -1.3 | -0.1 |
| 6.50 | 201.3 | -1.3 | -0.1 |
| 7.00 | 201.2 | -1.2 | -0.1 |
| 7.50 | 201.2 | -1.2 | -0.1 |
| 8.00 | 201.2 | -1.1 | -0.1 |
| 8.50 | 201.1 | -1.1 | -0.1 |
| 9.00 | 201.1 | -1.1 | -0.1 |
| 9.50 | 201.0 | -1.0 | -0.1 |