| ... | @@ -28,7 +28,7 @@ To make it balance, we adopted Brian Bagnall's control system, [Sejway.java](htt |
... | @@ -28,7 +28,7 @@ To make it balance, we adopted Brian Bagnall's control system, [Sejway.java](htt |
|
|
#### Control
|
|
#### Control
|
|
|
For our initial control experiment we simply used Phillippe Hurbain's robot [1] with Brian Bagnall's control system [2], without any alterations.
|
|
For our initial control experiment we simply used Phillippe Hurbain's robot [1] with Brian Bagnall's control system [2], without any alterations.
|
|
|
|
|
|
|
|
We were able to make it balance for a few seconds 1-4, depending on the initial calibration, which was the biggest challenge. It was especially challenging, because the balance point of the robot is very hard to find, because it is top heavy.
|
|
We were able to make it balance for a few seconds 1-4, depending on the initial calibration, which was the biggest challenge. It was especially challenging, because the balance point of the robot is very hard to find, which we will explore later.
|
|
|
|
|
|
|
|
The performance can be seen in this video: [Self-balancing robot with light sensor - Control](http://1drv.ms/1EFIphV)
|
|
The performance can be seen in this video: [Self-balancing robot with light sensor - Control](http://1drv.ms/1EFIphV)
|
|
|
|
|
|
| ... | @@ -38,33 +38,50 @@ We noticed that if the robot titled forward all the way, it had no chance of rec |
... | @@ -38,33 +38,50 @@ We noticed that if the robot titled forward all the way, it had no chance of rec |
|
|
Challenging the advice Phillippe Hurbain we tried to change the surface on which we are sensing (see image 6 in the above gallery). As expected, the performance was even worse and the robot showed very aggressive corrections, which may indicate that the light sensor may have zeroed on something. This behavior can be seen in this video: [Self-balancing robot with light sensor - Control](http://1drv.ms/1EFIGRZ)
|
|
Challenging the advice Phillippe Hurbain we tried to change the surface on which we are sensing (see image 6 in the above gallery). As expected, the performance was even worse and the robot showed very aggressive corrections, which may indicate that the light sensor may have zeroed on something. This behavior can be seen in this video: [Self-balancing robot with light sensor - Control](http://1drv.ms/1EFIGRZ)
|
|
|
|
|
|
|
|
#### 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, 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**
|
|
**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 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 still not satisfying.
|
|
|
|
|
|
|
|
|
#### Physical Enhancements - Balance Bar
|
|
|
|
Instead of focusing solely on the software parameters of the configuration we tried altering the physical properties of the robot by adding a balance bar. This was an attempt to move the balancepoint up and easier to locate. We used the native software setup (PID factors) to see the direct influence of the balance bar compared to the control.
|
|
|
|
|
|
|
|
|
The performance can be seen in this video: [Self-balancing robot with light sensor - Balance Bar](http://1drv.ms/1NfFO2W)
|
|
|
|
|
|
|
|
#### Physical Enhancements - Balance Bar
|
|
It's clear that the performance is still not significantly improved, but qualitatively, the balance point was easier to locate and the robot seemed to be more steady. We hope that by combining the balance bar with optimized PID constants, we can imporve the balance time.
|
|
|
|
|
|
|
|
Native constants.
|
|
#### Balance Bar and Optimized PID Constants
|
|
|
|
In this experiment we combine the above two experiments in an attempt to increase performance. Through trial-and-error we experimented with different values by editing the Java class, compiling it, and transfering it to the robot.
|
|
|
|
|
|
|
|
#### Physical Enhancements +
|
|
Finally, we made it balance for a whole 17 seconds! In this case, we used the balance-bar, the light setting shown in image 1 above, and the following PID constants:
|
|
|
|
|
|
|
|
## Choice of parameters on-the-fly
|
|
**Power = 40**
|
|
|
### Setup & Approach
|
|
|
|
|
|
**Integral = 20**
|
|
|
|
|
|
|
|
**Differential = 40**
|
|
|
|
|
|
|
|
**Scale = 18**
|
|
|
|
|
|
|
|
This performance can be seen in this video: [Self-balancing robot with light sensor - Balance Bar + Optimized PID Constants](http://1drv.ms/1EFRebE)
|
|
|
|
|
|
|
|
|
To sum up, we can conclude that the balance bar made it easier to find the balance point and that playing around with the PID constants plausibly increased performance. However, the significant improvement was introduced by combining these sources of improvement, which resulted in a best-case test of 17 seconds of self-balancing. Nonetheless, there are still many more physical aspects to explore, e.g. lowering the balance point, adding more weight instead of the wheels, using bigger wheels, etc.. Further experiments with the PID constants could also improve performance.
|
|
|
|
|
|
|
|
## Self-balancing robots with color sensor
|
|
## Self-balancing robots with color sensor
|
|
|
### Setup & Approach
|
|
### Setup & Approach
|
| ... | | ... | |