PID tuning

As explained in the last article on PID control, the aim of the PID regulator is to compute a correction according to the error (the difference between the target speed and the actual speed), its integral and derivative, and 3 chosen coefficients : KP (for proportional correction), KD (for derivative correction) and KI (for integral correction). This week, Xavier and I made some corrections on the software (presented in this article) and choose the coefficients.

Tuning KP

This coefficient was the easiest to choose by following the steps indicated in this article

We took the smallest KP for which the system oscillates (called critical KP) and multiplied it by ⅔.… Read more

Speed control from every angle

Since our previous post last Thursday, Sibille and I have kept working on speed control. It has taken us much longer than we originally thought, but we’re happy with the result. Now that we have a working product, we’ll go back over what all went into making it work:

As mentioned previously we use a Proportional, Integral, Derivative (PID) control scheme to regulate the throttle command given to our ESC so that the motor speed matches the desired speed.

Speed feedback and speed format

If you’ll recall, Vlaya had previously written code to capture the edges of a once-a-rotation interruption (the “period interruption”) from a Hall sensor or an optical sensor and deduce the elapsed time during the rotation, and from there the speed.… Read more

PID control

This past few days, Xavier and I worked on the PID for motor speed control. We haven’t quite finished debugging our code, but here is an update of what we are working on.

A few words about PID controller

Our PID (Proportional, Integral, Derivative) controller is a control loop algorithm using the speed feedback from the optical sensor or the hall sensor to control the motor speed.

The code continuously calculates the error, i.e. the difference between the target speed (the speed at which we want the motor to turn) and the measured speed, its integral, and its derivative. It applies a correction to the command send by the ESC to the motor.… Read more