cvf06035 created page: home authored by Ida Larsen-Ledet's avatar Ida Larsen-Ledet
...@@ -162,13 +162,13 @@ We tried to change the i-value - which was 4 initialy ...@@ -162,13 +162,13 @@ We tried to change the i-value - which was 4 initialy
7: - maybe better 7: - maybe better
8: poorer 8: poorer
We decided to test the effect of different values for the parameters using a technique inspired by grid search: We selected a range of values to try out for each parameter (*setpoint*, *p*, *i*, and *d*) and then varied one parameter while keeping the others fixed. We decided to test the effect of different values for the parameters using a technique inspired by grid search: We selected a range of values to try out for each parameter (*setpoint*, *p*, *i*, and *d*) and then varied one parameter while keeping the others fixed. We began by testing different values with rather large intervals in between, including extreme values (values far away) on either side of the value provided in the code used as inspiration. According to which values gave the best results we then made the search around these values more fine-grained.
*Setpoint:* *Setpoint:*
Noting that the value measured by the robot initially was around 580, we started with a value of 500 to see the effect. We then tried a value of 750 (simply to try something somewhat in the middle between 500 and the highest possible value of 1023). Seeing how poorly both of these affected the robot's performance, we then tried a value of 600 which made the robot perform a lot better. After this, we started narrowing in between 600 and 550, ending at a value of 577. After a while of testing, we noticed that the robot was casting a shade depending on the direction that the light was coming from. This has most likely affected the light readings, but we have not taken this further into account except for th awareness that the accuracy of our measurements need to be taken with a grain of salt. Repeated experiments could alleviate the problem. Noting that the value measured by the robot initially was around 580, we started with a value of 500 to see the effect. We then tried a value of 750 (simply to try something somewhat in the middle between 500 and the highest possible value of 1023). Seeing how poorly both of these affected the robot's performance, we then tried a value of 600 which made the robot perform a lot better. After this, we started narrowing in between 600 and 550, ending at a value of 577. After a while of testing, we noticed that the robot was casting a shade depending on the direction that the light was coming from. This has most likely affected the light readings, but we have not taken this further into account except for th awareness that the accuracy of our measurements need to be taken with a grain of salt. Repeated experiments could alleviate the problem.
*P value:* *P value:*
Was originally 28, in the code that we used as basis for our own. In the code that we used as basis for our own, ***p*** was 28.
Using the grid search approach again, we first tried with 40 (robot falling forward a lot) and 10 (robot corrects too slowly but simply falls forward right away). We then tried 70, in which case the robot also kept falling a lot, but the corrections seemed more aggressive (which makes sense), causing it to oscillate violently. Using the grid search approach again, we first tried with 40 (robot falling forward a lot) and 10 (robot corrects too slowly but simply falls forward right away). We then tried 70, in which case the robot also kept falling a lot, but the corrections seemed more aggressive (which makes sense), causing it to oscillate violently.
We changed the setpoint to 585 and tried values of p between 40 and 70. As before, 70 caused violent oscillations and instability. Both 55 and 40 seemed more stable. We decided to continue testing with a value of 40. We changed the setpoint to 585 and tried values of p between 40 and 70. As before, 70 caused violent oscillations and instability. Both 55 and 40 seemed more stable. We decided to continue testing with a value of 40.
...@@ -265,4 +265,4 @@ We observed that changes in the angle reflected less strongly in the readings of ...@@ -265,4 +265,4 @@ We observed that changes in the angle reflected less strongly in the readings of
[4] GUI for establishing a Bluetooth connection to an and setting parameters for the robot's control program in real-time: [TrackerController.java](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson2.dir/Lesson2programs/TrackerController.java) [4] GUI for establishing a Bluetooth connection to an and setting parameters for the robot's control program in real-time: [TrackerController.java](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson2.dir/Lesson2programs/TrackerController.java)
[5] Wikipedia article with information on grid search, [hyperparameter optimization] (https://en.wikipedia.org/wiki/Hyperparameter_optimization#Grid_search) [5] Wikipedia article with information on grid search, [Hyperparameter optimization (grid search)] (https://en.wikipedia.org/wiki/Hyperparameter_optimization#Grid_search)
\ No newline at end of file \ No newline at end of file