... | @@ -134,17 +134,21 @@ By raising the gyroscope and manually tuning the PID parameters and turns the LE |
... | @@ -134,17 +134,21 @@ By raising the gyroscope and manually tuning the PID parameters and turns the LE |
|
|
|
|
|
![Problems on the way back](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson8/Images/DirectMotorControlProblem.jpg)
|
|
![Problems on the way back](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson8/Images/DirectMotorControlProblem.jpg)
|
|
|
|
|
|
|
|
It is assumed that the cause of this is found in the direct motor control implementation. Without any motor regulation the LEGO car quickly gains too much speed when driving down wards the track and the PID regulator cannot cope with this.
|
|
|
|
|
|
## Converting to regulated motor control
|
|
The differential pilot seemed to be too high an abstraction level and the direct motor control was too low. Therefore a middle ground is chosen for the motor control which is the NXTRegulatedMotor class.
|
|
|
|
|
|
### Setup
|
|
## Final setup
|
|
|
|
|
|
### Results
|
|
It turned out that substituting the direct control of the motors with regulated control had a significantly impact on the performance. After additional tuning of the PID parameters and turn values to the new motor control class the LEGO car was able to travel all the way from the bottom to the top and back again. This is shown in Video 1 in the references section where the car completes the track in 30.3 seconds. By increasing the default speed we were able to push the completion time down to 27.9 seconds. This is shown in Video 2.
|
|
|
|
|
|
|
|
The final construction is shown in the following figure.
|
|
|
|
|
|
|
|
![Final constructionn](https://gitlab.au.dk/rene2014/lego/raw/master/Lesson8/Images/FinalCar.JPG)
|
|
|
|
|
|
## Conclusion
|
|
A link to the final code is also found in the references section.
|
|
|
|
|
|
|
|
## Conclusion
|
|
|
|
|
|
|
|
|
|
## References
|
|
## References
|
... | @@ -160,8 +164,8 @@ By raising the gyroscope and manually tuning the PID parameters and turns the LE |
... | @@ -160,8 +164,8 @@ By raising the gyroscope and manually tuning the PID parameters and turns the LE |
|
|
|
|
|
### Video
|
|
### Video
|
|
|
|
|
|
[video 1] https://youtu.be/1nBVg6PvZxc
|
|
[Video 1] https://youtu.be/1nBVg6PvZxc
|
|
[video 2] https://youtu.be/71Zc0LbbZtQ
|
|
[Video 2] https://youtu.be/71Zc0LbbZtQ
|
|
|
|
|
|
### Code
|
|
### Code
|
|
|
|
|
... | | ... | |