Duration of activity: 6hrs and 30min
Group members participating: Aleanxer Rasmussen 20106538 and Søren Ditlev 20116323
Exercise 1
Goal
To measure if there is a difference between actual distance and the ultrasonic detected distance.
Plan
Measuring distance to object different at distance and using various object with different surfaces to see how the surface of an object influence and the distance to an object affect the USW’s ability to detected the correct distance
Result
Sample 300ms
| ||
Surface
|
MeasuredDist
|
SonicDistance
|
Straight
|
30cm
|
31cm
|
Straight
|
90cm
|
92cm
|
Corner
|
31cm
|
31cm
|
Corner
|
60cm
|
40cm
|
Concaved
|
60cm
|
255cm/max
|
Conclusion
The system is accurate within an error margin of a few cm when the object which it measures its distance to is a flat surface.
If the object becomes more complex the system will fail to detect the correct distances especially at larger distances.
Exercise 2
Goal
To see if different sample intervals will affect the distance measured by the USW sensor
Plan
Gradually increasing sample rate while making a few measurements at each sample rate.
Result
Sample 100ms
| ||
Surface
|
MeasuredDist
|
SonicDistance
|
Straight
|
50cm
|
52cm
|
Straight
|
30cm
|
31cm
|
Sample 10ms
| ||
Surface
|
MeasuredDist
|
SonicDistance
|
Straight
|
10cm
|
15cm
|
Straight
|
30cm
|
31cm
|
Straight
|
50cm
|
53cm
|
Sample 1ms
| ||
Surface
|
MeasuredDist
|
SonicDistance
|
Straight
|
10cm
|
15-21cm
|
Straight
|
30cm
|
22cm
|
Straight
|
50cm
|
51cm
|
Conclusion
As evident by the table above the system will begin to fail detecting the right distance at very high sampling rate. Sample rate at 1ms gives errors at short distances to the object.
Exercise 3
Goal
To detect the maximum distance at which the USW sensor is able to detect an object and afterwards calculate the time whic it take for the SW to travel that distance.
Plan
Place the system at 254cm form a wall and slowly move the system forward until it detects the wall. When the max distance is detect use mathematics to calculate max travel time.
Result
Max distance
At 254cm the system was unable to detect the object. Slowly moving the system forward, it was found that the system able to detect the object at a distance of 180cm. everything above showed 255.
Update
The max distance of USW sensor can detect is 180 cm. The sound has to travel that distance twice, forth and back, which is 360cm or 3,6m. Sound travels at a speed of 340.29 ms. 
Conclusion
It takes approximately 10ms to travel max distance. The update rate should not limit the system as long as it above the limit of 10ms and since we operate at update rate of 300ms the update rate is not a factor.
Exercise 4
Goal
To observe the systems behaviour and describe it . Following change variable and see how the system reacts.
Plan
Step 1: Place the system on the floor and observe. Step 2: change variables and repeat step 1
Results
Initial system test
The system will accelerate until it detects an object at distance > 120cm. After this detection the system decelerate. The system will start to back when it reaches a distance < 34cm and start to move forward when the distance > 36cm.
Changing variable
If minPower is decreased to 30 the system stops before the it reaches the target distance, and stands completely still at distance of 42cm.
(the reason it stops completely is possibly because there is not enough power to start moce
If minPower is increased to 80 the system will overshoot it target distance and start to oscillate between 25cm and 43cm.
Conclusions
The no object variable will ensure that the system runs at max power when if it fails to detect and object.. This explain why we saw a deceleration in the initial test, the system began to detect an object 120cm distance and thus slowed down and fits fairly well with the max detection found in exercise 3 .
The program is a P controller since it only uses proportional calculations to control the system.
Exercise 5
Goal
Construct a PID controller what that would allow the system to stop completely at a distance of 35cm.
Plan
Used the pseudo code provided in the exercise to create a PID algorithm, then following table to change the values of kp, ki kd
Result
With the following values the system would stop completely at distance 32cm
kp 1.3
ki 0.02
kd 1
Conclusion
We were not able to detect the right kp, ki, kd values to hit the target spot of 35cm. However 32 is reasonably close
Exercise 6
Goal
Goal to make a system that uses the USW sensor follow a wall
Plan
Translate the wallFollower NQC code made by Philippe Hurbain[1], into java[2] and testhow well the algorithm behaves.
Results
To make the algorithm work we had to make subtle changes to the algorithm, first off we changed the distance values so that they were consistent with the output in centimeters that we got from the the nxt sensor.
Also instead of setting motors to full speed forward in each loop, we set the left motor to forward and adjusted speed of right motor to turn left, and did it the other way around for left turning.
A video of the wallFollower working can be found on vimeo[3].
Conclusion
We are able to construct a Wallflowing system that could follow a straight wall. However if the system is not aligned with the wall to begin with it was unable to drive straight forward until it located a wall, instead it would just turn in place.
[1] Philippe Hurbain, WallFollower
Ingen kommentarer:
Send en kommentar