0% found this document useful (0 votes)
15 views5 pages

Vehicle Speed Control For Autonomous Vehicle Using

This document presents a project on vehicle speed control for autonomous vehicles using a Proportional Integral Derivative (PID) controller. The system utilizes a Raspberry Pi microcontroller and an incremental encoder to ensure the vehicle's output speed matches the desired input speed, demonstrating stability and precision in speed control. The study highlights the advantages of PID controllers in industrial applications and discusses the tuning process and performance metrics of the control system.

Uploaded by

iwansofanalinux
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Vehicle Speed Control For Autonomous Vehicle Using

This document presents a project on vehicle speed control for autonomous vehicles using a Proportional Integral Derivative (PID) controller. The system utilizes a Raspberry Pi microcontroller and an incremental encoder to ensure the vehicle's output speed matches the desired input speed, demonstrating stability and precision in speed control. The study highlights the advantages of PID controllers in industrial applications and discusses the tuning process and performance metrics of the control system.

Uploaded by

iwansofanalinux
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

International Journal of Recent Technology and Engineering (IJRTE)

ISSN: 2277-3878, Volume-8 Issue-4, November 2019

Vehicle Speed Control for Autonomous Vehicle


using PID Controller
Hidayatusherlina Razali, Mahanijah Md Kamal, Noorfadzli Abdul Razak

 must have the equal speed as the desired speed. Under other
Abstract: This project presents a real time reading of conditions, if the output speed is higher than input speed
Proportional Integral Derivative (PID) controller tuning. The given into the program, the error signal considered negative
system will control the output speed of the vehicle based on the
and the motor speed will be decrease.
given input speed by implementing the PID controller. The
controller helps in ensuring that the output speed achieves the In nowadays technology, majority of control systems in the
same as the input speed given and does not depart. The speed of most industries are operated by using PID controllers. PID
car is controlled by controlling a linear motor that is attached to a controller is usually used widely because of it is works
current sensor and an incremental encoder as a feedback to precisely, easy to tuning and easy to implement in many
calculate speed. The output reading of speed is in km/h. Raspberry processes. The PID controller helps to maintain and reduce
Pi 3B+ is used as microcontroller and python language is used in
order to program the vehicle speed. The vehicle is tested and PID
error in the system [3]. Moreover, DC motor is a nonlinear
parameter are calculated. The system is then run by using PID device. Thus, speed can be varying because of load demand
parameter and it shows that expected PID controller is stable and and disturbances that changing throughout time [4]. By tuning
able to control the car’s speed. all parameters of PID, the error can be improvised in order to
Keywords: Autonomous vehicle, incremental encoder, speed achieve the desired output. PID controller can regulate the
control system, PID
input value based on historical data and it improve the error
produce and make the system more precise and reach a stable
I. INTRODUCTION
system. In order to achieve required output, the parameter of
Autonomous vehicle (AV) is also known as a self-driving PID gain values is adjusted to operate the changing process
vehicle which can be defined as a vehicle that can move variable. The process reaction result is test without PID
independently without human input or control and capable control; after that it will inserted to the program for its tuning
sensing its surrounding. This driverless car would be benefit process. A study by researchers [5] analyze the result of
to people and the environment as it implementing artificial implementation of proportional (P) and proportional and
intelligence and an electric vehicle would help to reduce integral (PI) controller for speed control. The control system
harmful gas emission to the surrounding [1]. Besides, this parameters such as peak time, peak overshoot, settling time,
self-driving car help people with disabilities or even elderly rise time, steady-state error, are used to measure the speed
people who often choose public transport or seek help of response of PI controller and P controller. For the result, PI
others to reach a destination [2]. In this era, intelligent controller has preferred control performance than P controller
vehicles are becoming more crucial due to the famous for all three desired speeds that have been set. Through
technology integrated system. Hence, speed of an observation, P controller has less settling time but steady-state
autonomous vehicle system is important in order to control error arise and higher reading of overshoot in the response
the brake and measured current reading of motor. The speed [6]. Thus, a PI controller is used to lessen the overshoot and
control is needed in every AV. In the process system, there are steady-state error. Based on previous researcher [7], there is
many variables that can change that will be causing the output problem arise with servo motor which is used in order to push
reading do not achieve its desired value. The output speed a rod into speed movement mechanism. The use of servo
motor has an advantage on controlling the angle but servos
have a bad thermal performance. The temperature of servo is
easily rising and it may affect the servo’s lifespan. In addition,
Manuscript published on November 30, 2019.
* Correspondence Author problem is arisen as the motor’s rotor in the servo is
Hidayatulsherlina Razali*, Centre for System Engineering Studies, continuous moving back and forth even when it stop. It
Faculty of Electrical Engineering, Universiti Teknologi MARA, 40450 Shah creates vibration that may affect the movement of rod into the
Alam, Selangor, Malaysia.
Mahanijah Md Kamal*, Centre for System Engineering Studies, speed mechanism. Although the reading of speed can be
Faculty of Electrical Engineering, Universiti Teknologi MARA, Shah Alam, maintained but it can be difficult to maintain them in
Selangor, Malaysia. hazardous environments. Hence, it makes the level of
Noorfadzli Abdul Razak, Centre for System Engineering Studies,
Faculty of Electrical Engineering, Universiti Teknologi MARA, 40450 Shah
robustness is lower compare to linear motor. Therefore, the
Alam, Selangor, Malaysia. aims of this project is to design a speed control of autonomous
car system that able to maintain the input speed given by the
© The Authors. Published by Blue Eyes Intelligence Engineering and controller by using Raspberry Pi controller as well as PID
Sciences Publication (BEIESP). This is an open access article under the
CC-BY-NC-ND license controller.
(http://creativecommons.org/licenses/by-nc-nd/4.0/)

Retrieval Number: D5179118419/2019©BEIESP


Published By:
DOI:10.35940/ijrteD5179.118419
Blue Eyes Intelligence Engineering
Journal Website: www.ijrte.org
6929 & Sciences Publication
Vehicle Speed Control for Autonomous Vehicle using PID Controller

II. METHODOLOGY photodetector or also known as light sensor. It works fine as


its initial counter become to zero every time the program
A. Conceptual Design starts. Hence, the speed can be calculated based on pulses per
Fig. 1 shows a block diagram of speed control system. An rotation. Fig. 3 shows a 3mm thick iron is used to attach the
input speed is set in the program and known as a desired input. encoder to the vehicle’s body. There are steps are being taken
A controller, Raspberry Pi 3B+ will process the given input as to ensure the encoder is mounted neatly into the inner tire
and control movement of linear motor. By using pulse width and being able to rotate smoothly.
modulation, the linear motor can be controlled. Linear motor
is attached to the speed control mechanism. The value of
voltage is sent to the motor controller and it manipulate the
speed of the motor according to value of given set input. An
incremental encoder is used and it is attached on the inner part
of the rear wheel. The incremental encoder will give value of
pulse per rotation which is then will be converted into speed
on the program.

Fig. 1. Block diagram of the speed control


Fig. 3. Encoder and coupling mounted AV
Hardware
Fig. 2 illustrates the hardware connection used in this B. Proportional Integral Derivative Controller
project. The Raspberry Pi is supplied through an The main technique used in this speed control system is by
Uninterruptable Power Source (UPS). A motor driver is applying PID controller to the system. This technique
connected to a 36V of direct current (DC) battery and GPIO provides faster response and more control actions compared
pin of Raspberry Pi. Furthermore, a 10A DC motor driver is to P and PI controller techniques. PID reduces time taken to
used to moves a linear motor and it is supplied with 5V. archive the set point and control reduces the effect of the
Besides, an incremental encoder is supplied with 5V. In order disturbance. The value of gain Kp, Ki and Kd need to be
to protect overflowing current, the UPS flows through a calculate before implementing a tuning process for the
Miniature Circuit Breaker (MCB) before supply to the system. For tuning process, Ziegler Nichols is used as it helps
system. In order to step down power from MCB, a 12V to improve response of PID curve. All the parameters are
switching power supply is used. Next, 12V is converted to 5V calculated by using equation in Table II. Table below shows
by using an adjustable step-down voltage. The DC motor is the Ziegler-Nichols calculation on getting values of
operated with 36V battery by using six 6V lead acid batteries. Proportional Gain, (Kc), Integral Time (TI) and Derivative
For the incremental encoder, two pins signal connection is Time (TD) for each controller type.
used for channel A and B which is connected to pin 38 and 40 Majority of control systems in the most industries are
through 220ohm resistor. operated by using PID controllers [8]. Proportional mode will
speed up the process, dynamic response and makes an
accelerate improvement of the manipulating variable in order
to lessen error. Integral mode achieves zero offset, where
there will be no steady state error. Derivatives mode
contribute a speed alteration refer on the rate of change of
controlled variable. Another researcher stated that overall
system including P term, I term and D term commit in carry
out a minimum overshoot, rapid rise time increase in stability
lessen steady state error [9]. Table I shows the characteristic
changes for each controller.
Table- I: Characteristic changes for each controller
Rise Setting Steady
Fig. 2. Connection wires of Rasberry Pi Term Overshoot
Time Time State Error
Small
In this project, an incremental encoder is used as Proportional Decrease Increase Decrease
changes
feedback speed. Incremental encoder is a device that produce Integral Decrease Increase Increase eliminate
a digital signal output of two squares of 90 ° out of phase. For
speed and distance reading, incremental encoder is an ideal
choice because it consists of rotating disk, a light source and a

Retrieval Number: D5179118419/2019©BEIESP Published By:


DOI:10.35940/ijrteD5179.118419 Blue Eyes Intelligence Engineering
Journal Website: www.ijrte.org 6930 & Sciences Publication
International Journal of Recent Technology and Engineering (IJRTE)
ISSN: 2277-3878, Volume-8 Issue-4, November 2019

Derivative Decrease Decrease Decrease No changes G(s)= (1)

In a research [10], the speed of DC motor is controlled by


PID auto tuning method. The control system is pictured by an The value of incremental encoder is in pulses. Hence,
approximate mathematical model through system description equation below is formula for converting pulses of encoder
when output is measured by precise input signal. PID into actual speed.
controller is implemented and the P, I and D parameters are (2)
gain through auto-tuning method that normally done through
MATLAB. A Simulink model is built to run a PID
closed-loop control for identification system. The PID
(3)
parameters are tuned automatically. As a result, PID
algorithm produce a tolerable stabilize between achievement
and robustness. km/h = (distance*3.6) (4)
A comparative study has been done by using induction
engine speed control for proportional P, PI, PID [11]. The As motor rotates, the encoder will produce pulses. In order
operating principle is three-phase induction engine and it was to get number of encoder pulses in one second, current pulse
precisely combined with the supply frequency which it drives is subtracted with the previous reading. The number of pulses
to identical inverter-fed induction engine in industrial is then divided by 500 which is the encoder’s pulses per
application that approve for a reliable and better equivalent rotation. Hence by using Equation 2, reading of encoder
study. In this research, it can be shown that benefit of P is to pulses per second can be obtained. Next, after getting reading
let 1st order equilibrium of the unstable system. Furthermore,
from encoder, the diameter of the outer and inner wheel is
PI help to lessen large interruption in the process and reduce
calculated in order to know the distance travel and speed of
noises. Last but not least, PID proves that it is the most
car in kilometer as stated in Equation 3. Equation 4 is used in
suitable for higher order capacitive process and the suitable
result related to P and PI controller to control induction motor order to convert the speed from meter per second to kilometer
speed. per hour.
In contrast, starting with the design of the smart car D. Intelligent PID
system, the conflict of PID controller itself cannot overcome.
Another researcher implements an advance PID controller
Normally, traditional control method is PID algorithm [12].
and named as intelligent PID controller in sequence to
Common PID cannot adapt the changing operation conditions
analyzed and control speed of BLDC motor [13]. A classical
controller with fixed parameters even though it has simple
PID controller does not provides a robust performance,
structure and strong robustness.
hence, it not suitable to work with BLDC motor dynamic
C. Software model as it includes uncertainties and nonlinearities. Thus, an
The main technique used in this speed control system is by intelligent PID controller is implement refer on the system
applying PID controller to the system. This technique complexion and understanding of experts. As a result, it
provides faster response and more control actions compared shows intelligent PID simulate a better result in terms of
reference capture and toughness even in existence of
to P and PI controller techniques. PID reduces time taken to
disturbances. The intelligent PID controller eliminates the
archive the set point and control reduces the effect of the
disturbances wonderfully as compared to conventional PID
disturbance. The value of gain Kp, Ki and Kd need to be
controller. It works when the absolute error moves towards
calculate before implementing a tuning process for the becoming constant or smaller value, an input is appointed to
system. For tuning process, Ziegler-Nichols (ZN) is used as it control its value. Whenever absolute error values more
helps to improve response of PID curve. afterwards an extensively small, the PID controller is then
Table- II: Formulation for PID tuning method divert to PI controller. Thus, the static error can be reduced. In
Propotional Integral Derivative such a way, the implementation of intelligent PID Controller
Controller type
Gain (KC) Time (TI) Time (TD)
help to minimize error response for BLDC motor for speed
P-only (1/KP)(τP/t0) - -
control system.
PI (0.9/KP)(τP/t0) 3.33t0 -

PID (1.2/KP)(τP/t0) 2t0 0.5t0 III. RESULT AND DISCUSSION


Fig. 4 shows that the reaction curve of the speed of vehicle
All the parameters are calculated by using equation in when given an input speed of 6 km/h. The system has a
Table II which shows the Ziegler-Nichols calculation on medium response at the beginning as speed increasing at the
getting values of Proportional Gain, (Kc), Integral Time (TI) first 11 seconds. The speed has overshoot and poor stability.
and Derivative Time (TD) for each controller type. It can be observed from reading of speed in Fig. 4 where it
Magnitude of the input change, , magnitude if the steady increasing until 7.76 km/h. Overshoot of this experiment is
state change in output, , and the maximum slope of the 1.76 km/h or 29% of input speed given.
output-versus-time plot, S, are managed to gain from process
reaction curve. Hence, the parameter calculated can be
implement in Equation (1).

Retrieval Number: D5179118419/2019©BEIESP


Published By:
DOI:10.35940/ijrteD5179.118419
Blue Eyes Intelligence Engineering
Journal Website: www.ijrte.org
6931 & Sciences Publication
Vehicle Speed Control for Autonomous Vehicle using PID Controller

The speed is started to decrease after overshoot but it still analysis because it helps to avoid excessive control action and
does not show any balance input speed but it finally stables at it also can be operated within safe constrain. The proportional
the 7.6 km/h. After getting the process reaction curve, the PID controller does helps to reduce the rise time. Furthermore,
parameters is calculated and a transfer function is obtained. integral gain helps to eliminate the offset value that exists by
Table III shows the result obtained when the speed is not proportional controller and last but not least, the derivatives
controlled by PID controller. help to correct value when there are slightly errors during
steady state in the system.

Fig. 4. Reaction curve without PID controller


Fig. 6. Reaction curve with PID controller
Table- III: Result speed without PID-ZN By referring to Table IV, the overshoot of the system is
Parameter Result lowered by 24.1%. The system also produces a better settling
Input speed (km/h) 6 time which is at 6 seconds of the process compared to system
7.76 without PID where it reaches steady value at 27 seconds. The
Peak speed (km/h)
system successfully reaches steady state at 6 km/h with
Settling time (sec) 27 tolerance of 0.02. Last but not least, the stability of the system
Percentage of overshoot 29 is gain faster compared to without PID-ZN. Thus, PID-ZN is
choses for this analysis because it helps to avoid excessive
Steady state error (km/h) 1.5
control action and it also can be operated within safe
The output speed in km/h with an approach of PID is constrain. The proportional controller does help to lessen the
illustrated in Fig. 5. The input given into the system is 6 km/h rise time. Furthermore, integral gain helps to eliminate the
and being tested on vehicle. The speed fluctuated at first but offset value that exists by proportional controller, and last but
increase slowly after five seconds. There is small overshoot not least, the derivatives helps to correct value when there are
occurs at the beginning but it becomes better at stability as the slightly errors during steady state in the system.
speed reach steady state around the set point at 6 km/h. This
response has a small value of overshoot which is 0.27 km/h is Table- IV: The comparison of speed vs controller
4.5% of the input speed. Characteristic With PID Without PID
Input speed (km/h) 6 6

Peak speed (km/h) 6.27 7.76

Settling time (sec) 6 27

Percentage of overshoot 4.9 29

Steady state error (km/h) 0.02 1.5

IV. CONCLUSION
In conclusion, proportional controller, P, helps to generate
a corrective action to the error. The integral term, I, produce
an improvement proportional to the integral of the error.
Integral help to reduced tracking error to zero with
Fig. 5. Reaction curve with PID controller application of a sufficient control effort while the derivative
controller, D, produce a control action corresponding to the
As can be seen in Fig. 6, it shows the difference before and
error range change. It helps to maintain the speed based on the
after implementing PID where it is clearly stable and able to
input given in the system. The process of system with
achieve the target speed that have been programmed into the
implementation of PID gain stability faster compared to
system. The overshoot of the system is lowered to 0.27 km/h
without PID.
and the system reaches steady state earlier compared to
system of without PID. The stability of the system is gain
faster compared to without PID. Thus, PID is choses for

Retrieval Number: D5179118419/2019©BEIESP Published By:


DOI:10.35940/ijrteD5179.118419 Blue Eyes Intelligence Engineering
Journal Website: www.ijrte.org 6932 & Sciences Publication
International Journal of Recent Technology and Engineering (IJRTE)
ISSN: 2277-3878, Volume-8 Issue-4, November 2019

Besides, the overshoot of the system is decreases and the


Mahanijah Md Kamal has a PhD degree in Electrical
given input can be reach using PID system overall system is Engineering specialize in fault diagnosis from
improve in all aspects. By implementation of PID, speed of University Liverpool John Moores, United Kingdom.
autonomous car system is able to maintain. The speed of She joined the Faculty of Electrical Universiti
motor follows the input speed given by raspberry pi controller Teknologi MARA in 2006 and currently as a Senior
Lecturer. Her research interests include artificial
and observed by using incremental encoder. intelligent, fault diagnosis, process control, engineering education and
occupational safety and health.
ACKNOWLEDGMENT
Noorfadzli Abdul Razak received his PhD in
The author would like to express her gratitude to Faculty of Electrical Engineering specialize in Robotic from
Electrical Engineering, Universiti Teknologi MARA Shah Universiti Teknologi MARA. His research interests
include robotic, automation system, unmanned aeriel
Alam Selangor for the support and funding. vehicle and unmanned ground vehicle.

REFERENCES

1. M. Anderson, K. Nidhi, K. D. Stanley, P. Sorensen, C. Samaras, and O.


A. Oluwatola, "Autonomous vehicle technology: A guide for
policymakers". Santa Monica, Rand Corporation, 2016.
2. H. Yu, H. R. Karimi, and X. Zhu, "Research of smart car’s speed control
based on the internal model control," Journal Abstract and Applied
Analysis, vol. 2014, 2014, pp. 1-5.
3. J. P. T. Lemus, G. C. Vélez, and N. J. C. Rodrıguez, "PID Controller
Design for DC Motor", Contemporary Engineering Studies, vol. 11,
2018, pp. 4913-4920.
4. M. B. Nikunj A. Bhagat, "DC Motor Speed Control using PID
Controllers," EE Dept, IIT Bombay, 2009.
5. T. Y. Wang and C. D. Chang, "Hybrid Fuzzy PID Controller Design for
a Mobile Robot," in 2018 IEEE International Conference on Applied
System Invention (ICASI), 2018, pp. 650-653J.
6. H. H. Lwin, and N. M. Seng, "Performance Comparison of P and PI
Controller for Speed Control of Three Phase Brushless DC Motor,"
International Journal of Trend in Research and Development, vol. 5, no.
5, 2018, pp. 358- 360.
7. A. b. A. Malek, "Speed Control System Application Using PID
Controller for Urban Intelligent Mobile Autonomous Vehicle
(Uitm-AV)," Bachelor of Engineering (Hons) Electronics Engineering.,
Faculty of Electrical Engineering, Universiti Teknologi MARA, January
2019.
8. P. N. Dave and J. Patil, "A comparative study of PID and SMC controller
for nonlinear unmanned ground all terrain vehicle," in 2015
International Conference on Trends in Automation, Communications
and Computing Technology (I-TACT-15), 2015, pp. 1-5: IEEE.
9. M. O. Andrea Scherlozer, Sulvane Patole, "Simulation and Numerical
Analysis and Comparative Study of a PID Controller Based on
Ziegler-Nichols and Auto Turning Method," 12th IEEE International
Conference on Control and Automation, 2016. HAL.
10. W.-J. Tang, Z.-T. Liu, and Q. Wang, "Dc motor speed control based on
system identification and pid auto tuning," in 2017 36th Chinese
Control Conference (CCC), 2017, pp. 6420-6423: IEEE.
11. K. S. Rao and R. Mishra, "Comparative study of P, PI and PID controller
for speed control of VSI-fed induction motor," International Journal of
Engineering Development and Research, vol. 2, no. 2, pp. 2740-2744,
2014.
12. Z. Lili and Z. Xiuchun, "PID control of automatic cruise system for
automobiles," Science and Technology Information, vol. 34, p. 776,
2009.
13. A. Ulasyar, H. S. Zad, and A. Zohaib, "Intelligent Speed Controller
Design for Brushless DC Motor," in 2018 International Conference on
Frontiers of Information Technology (FIT), 2018, pp. 19-23: IEEE

AUTHORS PROFILE

Hidayatusherlina Razali received her Bachelor


(Hons.) in Electrical Engineering from Universiti
Teknologi MARA. Her research interests include
robotic, control system, automation and control
systems.

Retrieval Number: D5179118419/2019©BEIESP


Published By:
DOI:10.35940/ijrteD5179.118419
Blue Eyes Intelligence Engineering
Journal Website: www.ijrte.org
6933 & Sciences Publication

You might also like