-
Notifications
You must be signed in to change notification settings - Fork 0
Motor Control Methods
Lecture on PID and Bang-bang.
Example code can be found here.
The PID controller stands for Proportional Integral Derivative Controller. The purpose of the PID controller is to compensate for any error in the movement of the robot and allows it to correct itself without being caught in a loop. The PID controller sets up an equation with which it is able to calculate the robot's margin of error and make up for that. However, the mathematical focus of the PID controller is a double-edged sword. Although it is able to be very accurate due to its use of calculations, the PID is very hard to set up because of how complicated the calculus behind the PID is.
Go to this link for example code.
Bang-Bang control is a binary-central system for regulating motor speed. It uses an if-else loop that checks whether the motor speed is above or below the target speed. If it is higher, it will cut power to the motor and will send power if the current speed is under the target. It is doing this quickly, so it constantly attempts to reach the target speed, and it gets continually more accurate. Shown below is a photograph from a lecture that shows the oscillation of motor in an oven's heater as the program attempts to adjust to the new target heat.
- Paper by Christopher Samuel Harper
- Chief Delphi
- A brief introduction to Take-Back-Half algorithm with temperature control system.
- A java implementation of Take-Back-Half algorithm for FRC by team 751 here.
- A stellar resource that describes the Take-Back-Half method in terms of a robotic ball shooter wheel; found here.
Take-Back-Half is a control method which incrementally corrects the speed based on the error measured from the last time the target speed was reached. Once it has crossed the target speed, it adjusts the current speed by one-half the error. The graph on page 58 of the paper linked to above may help show this process.