cvf06035 created page: home authored by Ida Larsen-Ledet's avatar Ida Larsen-Ledet
...@@ -142,9 +142,7 @@ To find the best possible setpoint we decided to use the PID values of Bagnalls ...@@ -142,9 +142,7 @@ To find the best possible setpoint we decided to use the PID values of Bagnalls
*Table 1: Observations for the effect of various setpoint values for the balancing robot* *Table 1: Observations for the effect of various setpoint values for the balancing robot*
##### Grid search ##### Grid-inspired search and extrema exploration
##### Extrema exploration
(Camilla og Nicolai nåede hertil - for nu) (Camilla og Nicolai nåede hertil - for nu)
NOTE: Planen for resten af dette afsnit er: NOTE: Planen for resten af dette afsnit er:
...@@ -156,9 +154,6 @@ NOTE: Planen for resten af dette afsnit er: ...@@ -156,9 +154,6 @@ NOTE: Planen for resten af dette afsnit er:
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. 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.
We tried to change the i-value - which was 4 initialy We tried to change the i-value - which was 4 initialy
...@@ -167,10 +162,10 @@ We tried to change the i-value - which was 4 initialy ...@@ -167,10 +162,10 @@ We tried to change the i-value - which was 4 initialy
7: - maybe better 7: - maybe better
8: poorer 8: poorer
*Setpoint:* 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 tried a form of grid search on the value of the 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 1000-something). 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. We then started narrowing in between 600 and 550, ending at a value of 577.
NB: The robot was casting shade, depending on the direction that the light was coming from, which affected the light readings. *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.
*P value:* *P value:*
Was originally 28, in the code that we used as basis for our own. Was originally 28, in the code that we used as basis for our own.
...@@ -269,3 +264,5 @@ We observed that changes in the angle reflected less strongly in the readings of ...@@ -269,3 +264,5 @@ We observed that changes in the angle reflected less strongly in the readings of
[3] Construction tutorial, step by step with parts listed: [NXTway building instructions](http://www.philohome.com/nxtway/bi_nxtway.htm) [3] Construction tutorial, step by step with parts listed: [NXTway building instructions](http://www.philohome.com/nxtway/bi_nxtway.htm)
[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)
\ No newline at end of file