-
Notifications
You must be signed in to change notification settings - Fork 2
PID Control Simulator Comparisons
All graphs show altitude position (the thick blue line), the target altitude (the straight, thin blue line), and the current throttle value (the thick red line, divided by 100).
When K_p is too small, then the proportional term is not strong enough to make timely corrections to the drone's position, so there are no oscillations, and the graph looks like this:
Target alt = 3.0 m, K_p = 2.0 | Target alt = 3.0 m, K_p = 5.0 |
---|---|
As we start to increase K_p, the output of the loop begins to oscillate smoothly:
Target alt = 10.0 m, K_p = 20.0 | Target alt = 10.0 m, K_p = 30.0 |
---|---|
If K_p is too large, then the graph performs less smooth, more drastic over- and under-corrections, and the graph does not oscillate. |
Target alt = 15.0 m, K_p = 100.0 | Target alt = 15.0 m, K_p = 200.0 |
---|---|
If the bias is too high, then the graph will still reach a steady state, but at an offset that is too high:
Target alt = 3.0 m, Bias = 1500 pwm | Target alt = 3.0 m, Bias = 1600 pwm |
---|---|
If the bias is too low, then the graph will still reach a steady state, but at an offset that is too low:
Target alt = 15.0 m, Bias = 1300 pwm | Target alt = 15.0 m, Bias = 1200 pwm |
---|---|
If the time-step is too large, then the graph will take longer to reach a steady state, and the drone might even crash:
Target alt = 10.0 m, Time-step = 1.0 s | Target alt = 10.0 m, Time-step = 3.0 s |
---|---|