| ... | @@ -40,16 +40,19 @@ Challenging the advice Phillippe Hurbain we tried to change the surface on which |
... | @@ -40,16 +40,19 @@ Challenging the advice Phillippe Hurbain we tried to change the surface on which |
|
|
#### Experimenting with PID Constant Values
|
|
#### Experimenting with PID Constant Values
|
|
|
The native constants of Brian Bagnall's PID, didn't work that well in our setting. Through trial-and-error we've narrowed in on the following constants, which gave us the best performance:
|
|
The native constants of Brian Bagnall's PID, didn't work that well in our setting. Through trial-and-error we've narrowed in on the following constants, which gave us the best performance:
|
|
|
|
|
|
|
|
*Power = 40*
|
|
**Power = 40**
|
|
|
This forces the robot to correct its errors fast enough, and avoid tilting over as often as the native values.
|
|
This forces the robot to correct its errors fast enough, and avoid tilting over as often as the native values.
|
|
|
|
|
|
|
|
*Integral = 20*
|
|
**Integral = 20**
|
|
|
|
|
|
|
This handles accumulating errors by increasing the error value for each consecutive error.
|
|
This handles accumulating errors by increasing the error value for each consecutive error.
|
|
|
|
|
|
|
|
*Differential = 40*
|
|
**Differential = 40**
|
|
|
|
|
|
|
If we are experiencing accelerating errors we correct accordingly. Thus, if we are lowering our error, the acceleration (differential) will be negative and the corrections will get smaller.
|
|
If we are experiencing accelerating errors we correct accordingly. Thus, if we are lowering our error, the acceleration (differential) will be negative and the corrections will get smaller.
|
|
|
|
|
|
|
|
*Scale = 18*
|
|
**Scale = 18**
|
|
|
|
|
|
|
The scale factor is a simple mapping between the sensor values and the output variables, which changes the optimal dimensions of the constants. Thus, if we change the Scale, then we have to adjust the Power, Integral, and Differential factors accordingly.
|
|
The scale factor is a simple mapping between the sensor values and the output variables, which changes the optimal dimensions of the constants. Thus, if we change the Scale, then we have to adjust the Power, Integral, and Differential factors accordingly.
|
|
|
|
|
|
|
|
The robot was able to balance for a few seconds using this configuration. However, it is not yet satisfying. The performance can be seen in this video: [Self-balancing robot with light sensor - PID Constants](http://1drv.ms/1xgumlG).
|
|
The robot was able to balance for a few seconds using this configuration. However, it is not yet satisfying. The performance can be seen in this video: [Self-balancing robot with light sensor - PID Constants](http://1drv.ms/1xgumlG).
|
| ... | | ... | |