... | ... | @@ -9,10 +9,12 @@ __Activity duration:__ 8 hours |
|
|
|
|
|
__Results from class exercises__
|
|
|
|
|
|
|
|
|
__Exercise 1__
|
|
|
|
|
|
The goal is to compare the results from the ultrasonic sensor with measured distance to different objects/material.
|
|
|
|
|
|
|
|
|
Plan
|
|
|
|
|
|
![Screen Shot 2015-02-24 at 13.00.05](http://gitlab.au.dk/uploads/u4099/legolabtimadala/6b3f51652a/Screen_Shot_2015-02-24_at_13.00.05.png)
|
... | ... | @@ -21,26 +23,32 @@ The plan is to compare the distance to different objects made of two different m |
|
|
|
|
|
setup: to measure the distance between the object and the car and how different materials affects the sensor, we started to measure 30 cm away from the object and then moved further away until we reach a value of 255. Below is our measurements.
|
|
|
|
|
|
|
|
|
Result
|
|
|
|
|
|
![Screen Shot 2015-02-24 at 13.01.36](http://gitlab.au.dk/uploads/u4099/legolabtimadala/477d5fd686/Screen_Shot_2015-02-24_at_13.01.36.png)
|
|
|
|
|
|
|
|
|
Conclusion
|
|
|
|
|
|
As the table shows the values from the sensor, when measuring the distance to a wooden wall, results in a very low variation from the actual value. When comparing the distance values to the fabric (soft pillow) you see that the max distance the sensor could measure was 131 cm. Our first thought it that it seems like the pillow absorbs the sound waves, causing them not to return to the sensor. However this might not be the case because you only see a little variation in regards to the actual value.
|
|
|
|
|
|
|
|
|
__Exercise 2__
|
|
|
|
|
|
In this exercise, we try to change the sample interval between readings to see how it affects readings from the sensor.
|
|
|
|
|
|
|
|
|
Plan
|
|
|
|
|
|
The plan is to measure the a steady distance in different sample intervals, respectively; 0 ms, 50 ms, 100 ms, 300 ms, 1000ms
|
|
|
|
|
|
|
|
|
Result
|
|
|
|
|
|
![Screen Shot 2015-02-24 at 13.03.18](http://gitlab.au.dk/uploads/u4099/legolabtimadala/20cc7ad20f/Screen_Shot_2015-02-24_at_13.03.18.png)
|
|
|
|
|
|
|
|
|
Conclusion
|
|
|
|
|
|
It looks like that the necessary minimum sample interval (300 ms) from the Alfa_03 is not a present requirement in the distance measured. We are not quite sure why this is, it could be a result of optimised code meaning it can read an echo quicker.
|
... | ... | @@ -50,12 +58,14 @@ __Exercise 3__ |
|
|
|
|
|
In this exercise we test if the sensor can measure an object 254cm away and under what conditions it is possible. Furthermore we discuss if the time limit for measurement and if it limits the sensor in anyway.
|
|
|
|
|
|
|
|
|
Plan
|
|
|
|
|
|
We setup the sensor in front of the object, in this case a wooden wall, and moves it graduatly away until we reach the point where the interface displays 255. we use a sample interval of 1000 ms and 15 ms.
|
|
|
|
|
|
![Screen Shot 2015-02-24 at 13.15.04](http://gitlab.au.dk/uploads/u4099/legolabtimadala/2e9061d612/Screen_Shot_2015-02-24_at_13.15.04.png)
|
|
|
|
|
|
|
|
|
Result
|
|
|
|
|
|
Sound travels with the speed of 340.29 m / s = 34.02900 cm / ms. This means that it takes 34.02900 / 254 = 7,4642216933 ms for the sound to travel a distance of 254 cm. However, in our case, this needs to be multiplied by 2, hence the sound travels forth and back. We therefore get a minimum thread sleep of 7,4642216933 * 2 = 14,928443387 ms to measure a distance of 254 cm.
|
... | ... | @@ -66,10 +76,12 @@ Context 2 - 15 ms : 254 cm |
|
|
|
|
|
![Screen Shot 2015-02-24 at 13.15.40](http://gitlab.au.dk/uploads/u4099/legolabtimadala/8eb5467804/Screen_Shot_2015-02-24_at_13.15.40.png)
|
|
|
|
|
|
|
|
|
Conclusion
|
|
|
|
|
|
The max distance we got with a sample interval at 1000 ms was 248. Under other conditions, such as using a different object as reference or trying to direct the sensor echo using a screen to filter out noise from the surroundings that could impact the measured distance in a wrong way. When lowering the sample interval to 15 ms and choosing a different context, we got the sensor to measure the distance of 254 cm (see picture below). The ideal would be that we had tested using the same sample interval in the two different contexts.
|
|
|
|
|
|
|
|
|
__Exercise 4__
|
|
|
|
|
|
In this exercise we describe the behaviour of the car and what is the setpoint, process variable and manipiulated variable of the controller?
|
... | ... | @@ -78,6 +90,7 @@ To find out what the controller does to the cars behaviour, we implement the tra |
|
|
|
|
|
The implemented tracker tester and the cars behaviour is shown in this video:
|
|
|
|
|
|
|
|
|
Result/Conclusion
|
|
|
|
|
|
What kind of controller has been implemented in this control loop ?
|
... | ... | @@ -94,37 +107,45 @@ __Exercise 5__ |
|
|
|
|
|
In this exercise we experiment with different values of minPower and Pgain in the program RCparamTracker.java so the car will wildly oscillate around a distance from a given object.
|
|
|
|
|
|
|
|
|
Plan
|
|
|
|
|
|
The plan is to experiment with different values for minPower and the Pgain to make the robot oscillate wildly and furthermore to see how each of these two variables impacts the behaviour of the car.
|
|
|
|
|
|
|
|
|
Result
|
|
|
|
|
|
With a minPower of 50 and gain of 20 the robot oscillated as shown in the video, link:
|
|
|
|
|
|
https://drive.google.com/file/d/0B9cMMqmYdJxCandQbEt0RUtpajg/view?usp=sharing.
|
|
|
|
|
|
|
|
|
Conclusion
|
|
|
|
|
|
By increasing the minPower og Pgain it gets wilder. When increasing the gain too much, the robot tries to correct the errors, and this results in oscillation and overshoot.
|
|
|
|
|
|
|
|
|
__Exercise 6__
|
|
|
|
|
|
In this exercise we use the program of Philippe Houdain to create a similar program that makes the car follow a wall. Then we compare the NQC algorithms with other suggestions.
|
|
|
|
|
|
|
|
|
Plan
|
|
|
|
|
|
Write the NQC (“not quite c”) program to a similar java program and the compare the algorith with ones suggested in the exercises from the book.
|
|
|
|
|
|
|
|
|
Result/Conclusion
|
|
|
Writing a program in Java that had similarities to the NQC program resulted in some issue. We had a hard time writing the java, and only achieved a three-state solution. This wasn’t efficient enough for the robot to turn corners properly and follow the wall again. Furthermore, this was caused because of the constant turns, if we could have done the algorithm correctly we would achieve different and sensitive turns according to the distance to the wall.
|
|
|
|
|
|
**Comparison of the NQC to the different algorithms from the book:**
|
|
|
1.Using this suggestion results in the issues as mentioned above
|
|
|
|
|
|
2.The second suggestion uses hard and gentle turns, to make cornering easier, furthermore it helps the robot to stay closer to the wall, however it lacks the state of going straight
|
|
|
*Comparison of the NQC to the different algorithms from the book:*
|
|
|
|
|
|
- 1.Using this suggestion results in the issues as mentioned above
|
|
|
|
|
|
- 2.The second suggestion uses hard and gentle turns, to make cornering easier, furthermore it helps the robot to stay closer to the wall, however it lacks the state of going straight
|
|
|
|
|
|
3.This suggestion uses the former two suggestions and looks very familiar to NQC algorithm in theory, however we can’t compare them with a graph.
|
|
|
- 3.This suggestion uses the former two suggestions and looks very familiar to NQC algorithm in theory, however we can’t compare them with a graph.
|
|
|
|
|
|
|
|
|
__References__
|
... | ... | |