| ... | ... | @@ -42,14 +42,12 @@ Challenging the advice Phillippe Hurbain we tried to change the surface on which |
|
|
|
#### Experimenting with PID Constant Values
|
|
|
|
The native constants of Brian Bagnall's PID, allowed the robot to balance for a few seconds, which we didn't find satisfying. Through trial-and-error we've narrowed in on the following constants, which gave us increased performance:
|
|
|
|
|
|
|
|
**Power = 40** (proportional error values).
|
|
|
|
|
|
|
|
**Integral = 10** (accumulating errors)
|
|
|
|
|
|
|
|
**Differential = 40** (change in error over time)
|
|
|
|
|
|
|
|
**Scale = 18** (direct scaling of the entire error value, can be useful with different battery levels)
|
|
|
|
|
|
|
|
````java
|
|
|
|
Power = 40 (proportional error values).
|
|
|
|
Integral = 10 (accumulating errors)
|
|
|
|
Differential = 40 (change in error over time)
|
|
|
|
Scale = 18 (direct scaling of the entire error value, can be useful with different battery levels)
|
|
|
|
````
|
|
|
|
|
|
|
|
**The performance can be seen in this video: [Self-balancing robot with light sensor - PID Constants](http://1drv.ms/1EFIphV).**
|
|
|
|
|
| ... | ... | |