... | ... | @@ -141,7 +141,7 @@ The video below shows a demonstration of our PID line follower program[7]. In th |
|
|
-
|
|
|
|
|
|
|
|
|
Below you find our implemented code. It is seen that we calibrate the threshold each time the program starts. Our values for the Kp, Ki and Kd are respectively: 2.6, 0.12 and 120. Why tried different values and for that these values worked the best. When increasing and decreasing the values often resulted in oscillation of the robot and weird movement. We tried using the “Tuning A PID Controller Without Complex Math”[2]
|
|
|
Below you find our implemented code. It is seen that we calibrate the threshold each time the program starts. Our values for the Kp, Ki and Kd are respectively: 2.6, 0.12 and 120. We tried different values and found that the mentioned values worked the best. When increasing and decreasing the values often resulted in oscillation of the robot and weird movement. We tried using the “Tuning A PID Controller Without Complex Math”[2]. However, suddenly the robot and the coded acted very weirdly so we couldn’t follow the suggestions on how to tune it. We tried many different values for only Kp and when we found one that was “okay”, it would not work the next time we used it, so after hours of tuning and testing we stopped.
|
|
|
|
|
|
|
|
|
```
|
... | ... | @@ -221,7 +221,8 @@ public class PIDCarController { |
|
|
|
|
|
|
|
|
#### Conclusion
|
|
|
As mentioned the robot in the results, the robot had some troubling following the black line when going from the opposite direction. This could be a result of reflection from the black tape or maybe some problems in the code. However, we going through the code we can’t seem to find where the problems occur. It could also has something to do with P, I and D and the values of these. We tried changing these extensively, but it was hard to reach a middle ground that would solve the problem.
|
|
|
As mentioned in the results, the robot had some troubling following the black line when going from the opposite direction. This could be a result of reflection from the black tape or maybe some problems in the code. However, when going through the code we can’t seem to find where the problems occur. It could has something to do with the P, I and D values. We tried changing these, but it was hard to reach a middle ground that would solve the problem, and this was extensively present when trying to tune it without complex math as suggested in[2].
|
|
|
The next time we look at this exercise, it would be ideal to write the code again from scratch, and again implement small parts of the code to see where the problem arise.
|
|
|
|
|
|
|
|
|
### Exercise 6 - Color Sensor
|
... | ... | |