... | ... | @@ -25,9 +25,9 @@ We have built the robot using the guide created by Nathanael Wilson [3] and used |
|
|
|
|
|
We have tried to fulfill the advice given by Phill on environmental conditions as far as possible:
|
|
|
|
|
|
As little light interference as possible: We used a room only lit by fluorescent light (no light didn’t make that big of a difference, but made filming the result harder).
|
|
|
Clear non-uniform surface: We used a table with a little texture and a smooth surface.
|
|
|
NXTway must be perfectly balanced at button press: This is quite tricky, but makes a big difference. We have tried our best to balance the robot and made a countdown until we read the offset so that the button press would not skew the results. Once we read the result we took an average of 20 measurements in order to avoid noise.
|
|
|
- As little light interference as possible: We used a room only lit by fluorescent light (no light didn’t make that big of a difference, but made filming the result harder).
|
|
|
- Clear non-uniform surface: We used a table with a little texture and a smooth surface.
|
|
|
- NXTway must be perfectly balanced at button press: This is quite tricky, but makes a big difference. We have tried our best to balance the robot and made a countdown until we read the offset so that the button press would not skew the results. Once we read the result we took an average of 20 measurements in order to avoid noise.
|
|
|
|
|
|
These considerations resulted in us making the Sejway.java program, which is built around the Sejway.java file from [2]. We also implemented a data logger in DataLogger.java where we implemented a function for saving an array of values in a csv-file in order to watch how the three different errors in the PID controller changed over time and as a result of the measurements. We quickly realized, however, that logging 4 different variables in every iteration of the control loop was much too taxing on the robot and it slowed down the PID loop a lot. As the PID loop was slowed down it became unreliable and the robot fell over practically immediately. If we removed the data logger write calls, the robot did slightly better and actually attempted to balance.
|
|
|
We solved this problem by saving the first 1000 data points locally in an array and then we wrote them to a file in the shutdown method instead. This enabled us to log the data we needed to make the error plots shown in figure 2 while still not slowing the control loop down to a halt. A plot of the light sensor values is shown in figure 3 and a video of the attempt can be seen in [6].
|
... | ... | |