-
Notifications
You must be signed in to change notification settings - Fork 20
Home
Welcome to the wiki for the PIDArduino library!
A PID controller is a control loop feedback mechanism.
PIDs are often used in industrial control systems and a variety of other applications requiring continuously modulated control.
Let's say you have a car, and you want it to go as close to 50 mph as possible.
If you're going too slow, then you just depress the accelerator pedal and wait.
You know that it takes time for the car to reach the setpoint at 50 mph.
But maybe you depressed the accelerator pedal a lot, to quickly get the speed you wanted so you so you do not cause other cars to slow down.
Then you know that you have to release the accelerator pedal a little when you're close to your setpoint at 50 mph so you don't overshoot.
And this is exactly what and PID is for, to get to the setpoint (or "goal") as fast as possible without overshooting.
You specify a setpoint, and continuously feed the PID controller with the sensor value, in this case, the speed of the car.
The PID Controller then gives you the optimal output, in this case, how far to depress the accelerator pedal.
But a PID isn't only used for cruise control, it can be used for everything that takes an input, desired value, and an output that accelerates the input.
I.e. [autopilot for planes, ..]
View on arduino.cc