This PID control simulator allows you to try out a PID controller interactively by adjusting the tuning parameters in realtime.
To test a PID, click the Test Sequence button. This will give you a general sense of the overshoot of a set of PID tunings, and it will update the overshoot and stability recordings on the right.

Most Recent:
Overshoot: ?
Stabilization: ? s
kP: ? kI: ? kD: ? Icap: ?
Worst Overshoot: Not tested
Worst Stabilization: Not tested s
Model:?








Mathmatical Theory

The math behind PID can be summed up in the equation below:

Where is equal to the output given to the actuator, which in this case is a motor. is the error in the system, which is On the left, you can see the four terms of the equation separately, which will better help you see what components of PID are contributing, and in what ways.
. The P term reacts proportionally to error, the farther desired is from actual, the stronger it will be.
, The I term reacts to the integral of error, it will be persistent component that builds to approach the setpoint, but can very easily get out of hand, so keep in mind to cap it appropriately.
, The D term reacts to the derivative of error, so in appropriate quantities will act as a dampening factor.
Finally, is whatever equation you put in the box below, and is meant to be a fluid way to react to eccentricities in the system itself.

Manual tuning hints
You can adjust the model with the Javascript code below.
Process function (model): control input = function(time, input, output, user):

Process function parameters:
output: control output (PID OUTPUT)
function return value: control input
input: last control input (optional)
user: custom variable to store long-term data (optional)
time: current time (ms) (optional)
Test Sequence Parameters:

Test Sequence parameters:
[TIME]MS, [POS];

Further links This is NOT OF MY CREATION, this is a modification of an amazing program, and you can find that at https://www.grauonline.de/alexwww/ardumower/pid/pid.html. It has been modified by Anshal Jain (pknessness). Credit goes to the original creators, I'm just modifing it to better fit my needs and add features that I think are useful.