Combining Raspberry Pi and Arduino To Form A Low-Cost, Real-Time Autonomous Vehicle Platform
Combining Raspberry Pi and Arduino To Form A Low-Cost, Real-Time Autonomous Vehicle Platform
6629
u v Motor
− controller PWM
serial Drivers
error Reflectance
Raspberry Pi signal Array
(Python) Arduino Zumo Shield
6630
(a) (b)
Fig. 6. Starting and stopping points for the initial condition rotation
test.
input pulse
300
(counts)
250 u1
200
150 u2
100 u3
50
0
0 50 100 150 200
0
error (counts)
−500
Fig. 4. Screen-shot from a completed test using the web interface.
Multiplying the loop count n by the digital control time step dt gives −1000
time in seconds. The error is in counts and measures the line position
on the line sensor reflectance array.
−1500
−2000
−2500
0 50 100 150 200
Loop count n
Fig. 7. Open-loop test results for the initial condition rotation test.
Loop count n times dt gives time in seconds. The error equals zero
when the line is in the center of the reflectance array.
6631
1000 30
Quiz 1
500 Quiz 2
Number of Responses
25
0 Quiz 3
error (counts)
20 Quiz 4
−500
Quiz 5
15 Quiz 6
−1000
−1500 10
Kp = 0.15
Kp = 0.35
−2000 5
Kp = 0.55
−2500
0 10 20 30 40 50 60 70 80 0
Loop count n open-loop closed-loop both neither
Fig. 8. Closed-loop test results for the initial condition rotation test. Fig. 9. Assessment results for pre/post quiz question 2: Which control
approach is affected more by disturbance inputs?
30
Quiz 1
of the demonstrations and lectures was assessed using Quiz 2
Number of Responses
25
a series of pre/post multiple choice quizzes. Quizzes Quiz 3
were administered at the beginning and end of three 20 Quiz 4
lectures. Two of the lectures included demonstrations Quiz 5
15
involving the Zumo robot while the third lecture did not; Quiz 6
it was a traditional lecture/discussion. Quizzes 1 and 2 10
were given before and after the lecture containing the
disturbance rejection demonstration. It is worth noting 5
that the disturbance rejection video that was posted
online was made available to the students after the first 0
open-loop closed-loop both neither
lecture demonstration (in between quizzes 2 and 3).
Quizzes 3 and 4 were given before and after the lecture Fig. 10. Assessment results for pre/post quiz question 3: Which
on how feedback can affect the transient response of a control approach can change the damping coefficient of a system?
system. Quizzes 5 and 6 were given before and after the
traditional lecture that focused on teaching students that
because feedback control can alter system pole locations a system? There is a significant jump in the number
it can also drive stable systems unstable. It should be of correct responses before and after the lecture and
noted that 33 students completed quizzes 1 and 2 while demonstration on this topic (from quiz 3 to quiz 4).
only 29 completed quizzes 3-6. So, for questions that Figure 11 shows the results for quiz question 5: Which
involve all 6 quizzes, it may be more meaningful to approach can change the poles of the system? There is
track the reduction in wrong answers than the increase a significant increase in the number of correct responses
in correct answers. before and after the second lecture/demo covering the
effects of feedback on transient response.
Figure 9 shows the results for quiz question 2: Which
Figure 12 shows the results for quiz question 7:
control approach is affected more by disturbance inputs?
Which approach can drive a system unstable, i.e. cause a
While most students correctly guessed that disturbance
stable system to become unstable? The responses to this
inputs are a bigger problem for open-loop systems even
question show a considerable amount of confusion until
before the demonstration, there is still an increase in the
the final lecture that focuses on the connection between
number of correct answers after the demonstration (from
pole locations and system stability.
quiz 1 to quiz 2). A YouTube video was also posted after
the lecture and some of the students watched the video X. C ONCLUSIONS
before the next lecture. This may explain a reduction A low-cost platform for autonomous vehicle research
in the number of wrong answers between quiz 2 and and feedback controls education has been presented. The
quiz 3. platform costs $215 and is controlled by an Arduino Uno
Figure 10 shows the results for quiz question 3: Which and Raspberry Pi working together. The system is ca-
control approach can change the damping coefficient of pable of hard real-time control with update frequencies
6632
30
[4] Shiakolas, P. and Piyabongkarn, D., “Development of a Real-
Time Digital Control System with a Hardware-in-the-Loop Mag-
Number of Responses
25 netic Levitation Device for Reinforcement of Controls Educa-
Quiz 3 tion,” IEEE Transactions on Education, Vol. 46, No. 1, 2003,
20 Quiz 4 pp. 79–87.
[5] Kamis, Z., Topcu, E., and Yuksel, I., “Computer-Aided Auto-
Quiz 5
15 matic Control Education With a Real-Time Development Sys-
Quiz 6 tem,” Computer Applications in Engineering Education, Vol. 13,
No. 3, 2005, pp. 181–191.
10 [6] Salzmann, C., Gillet, D., and Huguenin, P., “Introduction to Real-
time Control using LabVIEW with an Application to Distance
5 Learning,” Int. J. of Engineering Education, Vol. 16, No. 5, 2000,
pp. 372–384.
[7] Reck, R. M. and Sreenivas, R. S., “Developing an Affordable
0 Laboratory Kit for Undergraduate Controls Education,” ASME
open-loop closed-loop both neither
Dynamic Systems and Controls Conference, 2014. Proceedings
of the 2014, ASME, Oct. 2014.
Fig. 11. Assessment results for pre/post quiz question 5: Which
[8] Reck, R. M. and Sreenivas, R. S., “Developing a new affordable
approach can change the poles of the system?
DC motor laboratory kit for an existing undergraduate controls
course,” American Control Conference (ACC), 2015, IEEE, 2015,
30 pp. 2801–2806.
[9] Reck, R. M., “BYOE: Affordable and Portable Laboratory Kit
for Controls Courses,” 122nd ASEE Annual Conference and
Number of Responses
25
Quiz 3 Exposition, 2015, Paper ID: 13467.
[10] Hill, R., “Hardware-based activities for flipping the system
20 Quiz 4 dynamics and control curriculum,” American Control Conference
Quiz 5 (ACC), 2015, IEEE, 2015, pp. 2777–2782.
15 [11] Jack, H. and Blauch, A., “A Modeling and Controls Course
Quiz 6 using Microcontrollers,” Proceedings of the 2004 ASEE Annual
Conference and Exposition, 2004.
10
[12] Jack, H. and Blauch, A., “A Modeling and Controls Course
using Microcontrollers,” Proceedings of the 2005 ASEE Annual
5 Conference and Exposition, 2005.
[13] Bucher, R. and Dozio, L., “CACSD under RTAI Linux with
0 RTAI-LAB,” Fifth Real-Time Linux Workshop, Valencia, Spain,
open-loop closed-loop both neither 2003.
[14] Dozio, L. and Mantegazza, P., “Real time distributed control
Fig. 12. Assessment results for pre/post quiz question 7: Which systems using RTAI,” Object-Oriented Real-Time Distributed
approach can drive a system unstable, i.e. cause a stable system to Computing, 2003. Sixth IEEE International Symposium on,
become unstable? IEEE, 2003, pp. 11–18.
[15] Bucher, R. and Balemi, S., “Scilab/Scicos and Linux RTAI -
A unified approach,” Control Applications, 2005. CCA 2005.
Proceedings of 2005 IEEE Conference on, IEEE, 2005, pp.
of 100-150 Hz. The system uses only free, open-source 1121–1126.
[16] Krauss, R. W. and Croxell, J. R., “A Low-Cost Microcontroller-
software. Students can run experimental tests using the in-the-Loop Platform for Controls Education,” American Control
platform through a simple web interface without having Conference, 2012. Proceedings of the 2012, IEEE, 2012.
to program the Arduino or the Raspberry Pi. At the [17] Krauss, R. W., “Evaluation of a Low-Cost Microcontroller for
Real-Time Control Education and Prototyping,” ASME Dynamic
conclusion of a test, students can download the real- Systems and Controls Conference, 2014. Proceedings of the
time data for the test. The system has been used in two 2014, ASME, Oct. 2014.
lecture demonstrations during a first course on feedback
controls. Assessment data from pre/post quizzes shows
that students are learning important feedback controls
concepts as a result of the lectures and demonstrations.
R EFERENCES
6633