... | @@ -39,8 +39,16 @@ Note: the light values depend on the light level in the room in general, which m |
... | @@ -39,8 +39,16 @@ Note: the light values depend on the light level in the room in general, which m |
|
The sample interval indicates how often the robot should react to its environment. A large sample interval leads to a slow reaction to color shifts between black and white on the ground. All in all, a small sample interval makes the robot follow the line more precisely, while a large interval makes the movement rough.
|
|
The sample interval indicates how often the robot should react to its environment. A large sample interval leads to a slow reaction to color shifts between black and white on the ground. All in all, a small sample interval makes the robot follow the line more precisely, while a large interval makes the movement rough.
|
|
|
|
|
|
### Exercise 4
|
|
### Exercise 4
|
|
|
|
The following four graphs show the data collected from using 10ms, 50ms, 100ms and 500ms sample intervals respectively. A short sample interval is expected to update the direction of the robot often, while a slow sample interval might allow the robot to drive further away from the black line before its direction is corrected. The graph, which we have created using the DataLogger, illustrate this point well. We see for a 10ms sample rate that we first of all have a lot of data samples, but also that the curve resembles a sinus curve, which oscillates with a fairly high frequency. The same points can be made for 50ms and 100ms, although they oscillate with a lower frequency as expected. The final graph, which modulates 500ms is a special case in that the robot is not able to follow the black line for such a high sample interval. As a result it runs in circles causing the graph to be somewhat chaotic, but still with a low frequency as expected.
|
|
|
|
|
|
### Exercise 5
|
|
### Exercise 5
|
|
|
|
| Color | White | Black | Green | Grey |
|
|
|
|
|------------|-------|-------|-------|------|
|
|
|
|
| Raw Light vale | 450 | 640 | 530 | 443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
From these 4 colors, it becomes apparent that the light percentages calculated using the given formula matches the measured values from exercise 1 very well. However, while the formula is hereby verified, the light percent is not as accurate as possible. The reason for this is that the calculated light percent from the sensor is stored as an integer, which does not take decimal numbers into account. This problem can be alleviated either by using 32-bit floating point numbers, or simply by using the raw values directly.
|
|
|
|
|
|
### Exercise 6
|
|
### Exercise 6
|
|
|
|
|
... | | ... | |