| ... | ... | @@ -44,15 +44,12 @@ The native constants of Brian Bagnall's PID, didn't work that well in our settin |
|
|
|
This forces the robot to correct its errors fast enough, and avoid tilting over as often as the native values.
|
|
|
|
|
|
|
|
**Integral = 20**
|
|
|
|
|
|
|
|
This handles accumulating errors by increasing the error value for each consecutive error.
|
|
|
|
|
|
|
|
**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.
|
|
|
|
|
|
|
|
**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 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).
|
| ... | ... | |