@@ -88,7 +88,7 @@ As we now couldn't use the door as a means of a solid standpoint for the robot t
...
@@ -88,7 +88,7 @@ As we now couldn't use the door as a means of a solid standpoint for the robot t


*Figure 3: Using a box to angle the robot for calibration.*
*Figure 3: Using a box to angle the robot for calibration.*
A problem we discovered with this box was that in some places it was casting a shadow over the surface that we were calibrating the robot on, causing the initial calibration value to be vastly incorrect from what it should be, once the box was removed. Therefore we made a conscious effort to always place the box and robot in a position where the box wasn't shadowing the robot.
A problem we discovered with this box was that in some places it was casting a shadow over the surface that we were calibrating the robot on, causing the initial calibration value to differ largely from what it would be once the box was removed. We therefore made a conscious effort to always place the box and robot in a position where the box wasn't shadowing the robot.
Our experiments with this setup once again did not show any noticeable improvements in the balancing ability of the robot, despite the new surface.
Our experiments with this setup once again did not show any noticeable improvements in the balancing ability of the robot, despite the new surface.
...
@@ -122,10 +122,10 @@ As both these programs can't run simultanously on the NXT, we also made the ***N
...
@@ -122,10 +122,10 @@ As both these programs can't run simultanously on the NXT, we also made the ***N
#### Search for good PID parameters
#### Search for good PID parameters
After implementing the programs enabling easy PID parameter search, we started playing around with different values for P, I and D by using a by-hand-calibrated setpoint. We quickly realized that this method didn't enhance our understanding of the different variables and neither the robot's ability to self-balance. We therefore decided to use a more systematic way of testing and deciding on variable values than this approach based on gut feeling and experience (the latter of which we have very little).
After implementing the programs enabling easy PID parameter search, we started playing around with different values for P, I and D by using a by-hand-calibrated setpoint. We quickly realized that this method didn't enhance our understanding of the different variables and neither the robot's ability to self-balance. We therefore decided to use a more systematic way of testing and deciding on variable values than this approach based on gut feeling and experience (the latter of which we have very little).
To systematically observe which values of P, I and D work better for our robot we needed to have a best possible starting point (i.e. the robot being in equilibrium), wherefore we set out to find a good setpoint for the specific weight destribution of our robot.
To systematically observe which values of P, I and D work better for our robot we needed to have a best possible starting point (i.e. the robot being in equilibrium), wherefore we set out to find a good setpoint.
##### Finding a good setpoint
##### Finding a good setpoint
To find the best possible setpoint we decided to use the PID values of Bagnalls initial program ([TODO insert values]) and then trying to narrow our way into the best possible value by starting with a, from our prior experience, low- and high value. This gave the observations seen in table 1.
To find the best possible setpoint we decided to use the PID values of Bagnall's initial program (p = 28, i = 4, d = 33) and then trying to narrow our way into the best possible value by starting with a (from our prior experience) low- and high value. This resulted in the observations presented in table 1.
| Setpoint value | Status | Observation |
| Setpoint value | Status | Observation |
| --- | --- | --- |
| --- | --- | --- |
...
@@ -151,7 +151,6 @@ NOTE: Planen for resten af dette afsnit er:
...
@@ -151,7 +151,6 @@ NOTE: Planen for resten af dette afsnit er:
3. Vis (måske - hvis passende) nogle video eksempler
3. Vis (måske - hvis passende) nogle video eksempler
4. Resultater fra GRID search
4. Resultater fra GRID search
5. konklusioner
5. konklusioner
6. Det giver ikke mening tidsmæssigt at arbejde videre for at finde gode værdier, da det er en tidskrævende process og vi nu har fået forståelse for PIDs virkning.
The robot seemed to fall faster than it corrected - i.e. we need more motorpower as it falls.
The robot seemed to fall faster than it corrected - i.e. we need more motorpower as it falls.
...
@@ -193,10 +192,11 @@ p30, sp585, i4, d33:
...
@@ -193,10 +192,11 @@ p30, sp585, i4, d33:
SE VIDEO
SE VIDEO
We decided to finish up the experiments (long) before having tried all possible combinations of parameters values, as it seemed pointless to go on when seeing no significant improvements to the robot's behaviour - continuing would not improve on our understanding of the effects of the different PID parameters further.
### Self balancing robot with color sensor
### Self balancing robot with color sensor
---
---
...
... INTRO
Changes in the robot's position are reflected less strongly in the readings of the color sensor than those of the light sensor - that is, the same angle seemed to induce less of a change in the color sensor's readings. We therefore speculated that we needed to multiply the error by a larger value in order to adequately correct the robot's position, which means that a larger value of p might result in the robot balancing better as the change in reading would then have a larger effect.
Changes in the robot's position are reflected less strongly in the readings of the color sensor than those of the light sensor - that is, the same angle seemed to induce less of a change in the color sensor's readings. We therefore speculated that we needed to multiply the error by a larger value in order to adequately correct the robot's position, which means that a larger value of p might result in the robot balancing better as the change in reading would then have a larger effect.