You are on page 1of 6

2015 IEEE International Conference on Systems, Man, and Cybernetics

Cruise Control Design Using Fuzzy Logic


Controller
Hassan Asere∗ , Chengwei Lei† , Ruting Jia∗
∗ Department of Electrical and Computer Engineering, California State University Northridge
Northridge, California, USA
Email:hassan.asere.638@my.csun.edu, ruting.jia@csun.edu
† Electrical Engineering and Computer Science Department
McNeese State University
Lake Charles, Louisiana, USA
Email:clei@mcneese.edu

Abstract—In todays automobile industry, the cruise control Fuzzy controller in term of controller’s specifications. There
is one of the most critical aspects that require a well-designed is still room for improvement that will be shared in this paper.
controller that can accommodate the new development in technol-
ogy. In this paper, we have designed a cruise controller using the
Fuzzy logic rules and a developed MATLAB code to simulate the II. M ATHEMATICAL M ODELING
car’s engine mechanism. Fuzzy logic has expanded substantially
in the field of nonlinear systems as it provides a very simplified To represent the physics and dynamics of the system, we
approach to design controllers that can provide an optimum will start with the Newton’s 2nd law of motion which is stated
results. Hence, this paper will present a fuzzy controller that can as follow:
be used to study the performance between the conventional PID 
controller and fuzzy controller and provide a platform that can F =m×a (1)
help to identify whether fuzzy logic will help to maximize the
performance or there might be rooms for improvement to reach
the targeted results. where F represents the total force, m is the body mass and
Keywords—Cruise control ; Fuzzy logic ; Nonlinear control finally a which is the acceleration. This equation will be
expanded to represents the dynamics of the car as well as
I. I NTRODUCTION the disturbances.
The cruise control objective is to regulate the speed of Since we are concerned with the velocity to be calculated,
the vehicle based on the desired speed. The speed will be then we will replace the acceleration in eq. (1) with the rate
measured using speed sensor, then the error and the change of change of velocity v which is the acceleration a. Then eq.
of the error will be calculated in order to adjust the speed. (1) will become as follow:
Adjusting the speed is to control the throttle position which is  dv
proportionally related to the fuel injection to the engine. This F =m× . (2)
will provide the driving force that will move the car according dt
to the Newton”s law of motion. Below is a figure that can describe the major dynamics of the
With the uncertainty and complexity, Fuzzy control is car based on the Newton’s motion’s law. Now F which is the
being able to provide a method that wouldn’t need a detailed
mathematical algorithms to base on, it is basically based on the
experience and the logic behind the process itself with a simple
understanding to the dynamics it contained. In this project, we
use the Mamdani model, the most commonly method used due
to its simplicity and coherency. For consistency, we begin the
paper with the mathematical modeling followed by a detailed
explanation of the Fuzzy logic design and approach and finally
a bried about he MATLAB simulink design and simulation
with the results. Fig. 1: This is just a simple description of how the dynamics
This paper will provide an insight and comparison between of the car representation looks like
the controller’s performance of a normal linear PID controller
and a Fuzzy controller that has two inputs and one output. total force, will have many components that need to be mod-
The strategy we implement is to perform the test using three eled in details to emulate the system, therefore, we will divide
different loads, 1000, 2200 and 3000 kg which considers the the force into two parts, the engine force and disturbance. Both
car’s mass. Significant results have been noticed with the will be modeled in the following subsections.

978-1-4799-8697-2/15 $31.00 © 2015 IEEE 2210


DOI 10.1109/SMC.2015.386
A. Engine Force III. F UZZY L OGIC D ESIGN A PPROACH
Engine force will be created by burning the proper amount It is the most challenging part as it requires a knowledge
of fuel that injected in it which will create the energy to as well as experience in order to come up with the appropriate
move the car. Here, this mechanism will be represented as number of membership functions, getting the right inputs and
the torque in the following equations: outputs, generating the rules and adjusting the ranges with the
  2  each membership function.
αn v In this project, since we are designing a controller that
T (αn v) = Tm 1 − β −1 (3)
ωm controls the speed of a vehicle, we will need to have two
inputs, the error and the rate of change of the error. The two
and engine angular speed that will obtain the torque is related
inputs have the same number of membership functions, which
proportionally to the velocity ω = αn v. Where T is the toque,
are five, as after many experimental trials we found that it gives
Tm is the maximum torque, αn is th gear to the wheel radius
the best results and performance. Neither 7 nor 3 membership
ratio and the ωm is the engine angular maximum speed and
functions had shown a better performance than 5 during the
β is a torque coefficient. Below is the typical values for some
testing.
of the constants, also the values for some of the parameters
The output will be only one output that controls the throttle
used in this project for simulation purposes
position in order to control the amount of fuel injection into
Tm = 190 N.m the engine and thus controlling the speed of the vehicle. The
ωm = 420 rad/s output will also have five membership functions ranges from
αn = 25 0 → 1.
β = 0.4 .
Now the driving force can become to the following equation A. Inputs Membership Functions
We will start with the fuzzy inputs. As mentioned earlier
Fe = αn uT (αn v) (4) that we have two inputs, error and rate of the change of the
where u is the control signal which control the throttle position error, each has five membership functions. The five member-
proportionally related to the fuel injection rate. The value of ship functions consist of three triangles and two trapezoids.
the control signal is limited between 0 to 1, 0 means the For a better low errors and optimum results, the range for the
minimum speed and 1 the maximum speed. error is set to be between -0.5 → 0.5.
For the rate of the change of error, the range is set to be
B. Disturbance Forces
between -1 → 1. The linguistic variables for both is denoted
The disturbance forces that will reduce the car’s speed as follow: LN , SN , ZR, SP and LP [1]
consists of three major components, the aerodynamics drag,
rolling road friction and gravitational force due to road slope.
In this project, we consider the first two forces to build the
fuzzy controller design and expand on that to include the
gravitational force as well in the future work.
1) aerodynamic drag force Fa is basically the force that the
air will produce to act against the car’s movement. This
natural phenomena is related to the air density ρ , and
car’s front area A , the vehicle’s speed v and finally the
drag coefficient Cd . Thus, the drag force can be then
written as follow:
1
Fa = ρCd Av 2 . (5)
2
2) rolling friction force Fr is the natural force generated due
to the wheels friction with the road. It can be described
mathematically under the following equation:
Fig. 2: The membership functions for Input e(t)
Fr = mgCr sgn(v) . (6)
where m denotes the car’s mass, g is the gravitational constant B. Output Membership Functions
9.8 m/s2 , Cr is the friction coefficient and sgn is the sign For the output fuzzy control, the fuzzy range set to be
function. Here is the typical values for some of the constants between -0.1 → 1 which is the control input signal to the
that we use in this project for the simulation system. As a generic fuzzy start, we will use the triangles
ρ = 1.3 mk3 linguistic variables with evenly distribution for between the
Cd = 0.32 specified range. The linguistic variables for the fuzzy output
Cr = 0.01 control are V eryM in, M in, M id, High and V eryHigh
A = 2.4 m2 . speeds.

2211
Fig. 5: Normal controller response characteristic

de(t)
Fig. 3: The membership functions for Input dt

Fig. 6: Summary for the fuzzy rules

• The reference and feedback signal


Fig. 4: The Fuzzy output membership functions to the control • The controller part
signal Speed • The plant or the system
In Fig.8 you can find the general look of the model. Following,
you find the detailed for each subsystem or math functions
C. Methodology Of Setting The Rules
used in this model for clarification. For the controller part, as
Since we are using Mamdani rules, then the most generic we can see that we use a saturation blocks to limit the inputs
approach of setting the rules is by considering the normal into the fuzzy logic, for the error it was between -0.5 → 0.5,
control step response and identify the regions that needed to and for the rate of the change it is between -1 → 1.
be considered in generating the rules. Fig.5 shows that we For the subsystem called EngineF orce, it has the torque
have 4 main regions that we need to base our rules upon in equation which mentioned in section (II) eq.(3).
order to have a reasonable control response [1]. The following For Subsystem DisturbanceF orce, it includes the aerody-
is the definition for each region: namics force as well as the road friction force, both equations
• When the error is positive and rate of change is positive (5) and (6) were embedded in the subsystem using the normal
• When the error is negative and rate of change is positive math function.
• When the error is negative and rate of change is negative
• When the error is positive and rate of change is negative B. Simulation and Results
So, according to the aforementioned design criteria, we can
adjust the output of the fuzzy controller to accommodate these For the simulation part, we have tested the system to include
situations with the proper actions. Fig.6 is a summary of the the different level of speeds, so we added the modified model
rules in a very simpler and common form, also you can find that will dynamically change the gear selection based on a
the surface generated out of these rules. simple graph shown in Fig. 11 Thus, the speed changes the
gear location according to the speed based on this graph.
IV. S IMULATION AND R ESULTS Hence, we set several testing scenario for different weights
A. MATLAB Simulink Model and compare the results with the PI controller.
The software used in this project is the MATLAB, we use 1) When m = 3000 Kg, and initial speed is 25 mph, the step
the simulink to build the model. The model consists of three response of the system as well as the amount of force
major parts: response are shown in the following Fig.12 and Fig.13

2212
Fig. 9: The Controller Parts of the model

Fig. 7: This is the surface generated based on the fuzzy rules,


inputs and outputs variables

Fig. 10: The Disturbance subsystem which have both Fa and


Fr equations

Fig. 8: The MATLAB Simulink model

2) When m = 2200 Kg, and initial speed is 25 mph, the


step response of the system as well as the amount of
force response are shown in Fig.14 and Fig.15
3) When m = 1000 Kg, and initial speed is 25 mph, the
step response of the system as well as the amount of
force response are shown in Fig.16 and Fig.17
We can clearly notice that the system response reaches
to the targeted speed faster with the car of less weight.
However, in general the system response for all three cases
indicates no overshoot and by that and with conservation, Fig. 11: The cruise-gear selection curve
we can say the controller design has met the design criteria
which consider by far very challenging for any PID controller.
to the fuzzy controller, the PI takes a little bit longer settling
time to reach the steady state compared to the Fuzzy controller
C. Performance Comparison between Fuzzy & PI Controllers which is quite faster. Also, The Fuzzy controller step response
This is just a comparison between the fuzzy controller and shows a very small fluctuation or hysteresis around 0.6%. This
PI controller to the performance of the same system. This small fluctuation is believed to be due to the membership
would help to identify the gap and areas that need to be studied functions adjustment which requires more improvements.
further for improvements.
For testing purposes, we pick the mass to be m = 1000 kg V. C ONCLUSION
and after tuning the PI controller to the best it could be. The intent of this project is to establish the platform of
We notice from the step response that the performance of the developing an optimum control technique design solution such
PI controller is very stable, and for the force engine, it is stable as the fuzzy controller that can address and resolve some of
as well which means a stable system in reality. In contrary the issues that the conventional PID can’t overcome due to the

2213
Step Response with 3000Kg mass The Total force response for 2200Kg mass
30 2500
Desired Speed
Speed
2000
29

1500
28

Total Force
1000
dSpee

27
500

26
0

25
−500

24 −1000
0 10 20 30 40 50 0 10 20 30 40 50
Time Time

Fig. 12: The system step response for m=3000 Kg Fig. 15: The system step response for the total force needed

The Total force response for 3000Kg mass Step Response 1000Kg mass
2500 31
Total Force

2000 30

Desired Speed
1500 29 Speed
Total Force

1000 28

Speed
500 27

0 26

−500 25

−1000 24
0 10 20 30 40 50 0 10 20 30 40 50
Time Time

Fig. 13: The system step response for the total force needed Fig. 16: The system step response for m=1000 Kg

Step Response with 2200Kg mass The Total force response for 1000Kg mass
30 2500
Total Force
Desired Speed
Speed 2000
29

1500
28
Total Force

1000
Speed

27
500

26
0

25
−500

24 −1000
0 10 20 30 40 50 0 10 20 30 40 50
Time Time

Fig. 14: The system step response for m=2200 Kg Fig. 17: The system step response for the total force needed

nature of linearizion is works upon. In overall, we believe that the system can be improved by
As we noticed from the simulation, the fuzzy controller’s adjusting the fuzzy rules as well as the membership functions
step response time was much better compared to the PI con- to reduce the ripples which causes small fluctuations especially
troller which was taking longer time to reach the steady state, with higher weights. Also, as an insight toward future work,
Fuzzy controller takes around 6sec while the PI controller we see a possibility to combine a controller that consists
takes 21sec. of both the Fuzzy and PID controller to come up with an

2214
[8] C. Qui, ”A Design of Automobile Cruise Control System Based on Fuzzy
Step Response with 1000Kg mass
31
PID”, In nfo. Science, Electronics and Electrical Engineering Int. Conf.,
Desired Speed 2014
Speed
30

29

28
Speed

27

26

25

24
0 10 20 30 40 50
Time

Fig. 18: The system step response for m=1000 Kg using PI


controller

The Total force response for 1000Kg mass


4000

3500

3000

2500
Total Force

2000

1500

1000

500

−500
0 10 20 30 40 50
Time

Fig. 19: The system step response for the total force needed
using PI controller

optimum control design with a better performance that each


has difficulties and limitations in nature.

R EFERENCES
[1] Y. John and L. Reza. Fuzzy Logic Intelligence, Control, And Informa-
tion. Prentice-Hall, New Jersy, 1999
[2] O. Katsuhiko. Modern Control Engineering. Prentice-Hall, New Jersy,
Fourth Edition, 2002
[3] S. Ko, J. Lee, ”Fuzzy logic based adaptive cruise control with guaran-
teed string stability”, In Int. Conf. on Control, Automation and Systems,
Seoul, Korea, 2007
[4] Z. Eizad, L. Vlacic, ”A Control algorithm and vehicle model for stop
and go cruise control”, In IEEE Intelligent Vehicles Symposium, Italy,
2004
[5] S. Ko and J. Lee, ”Fuzzy logic based adaptive cruise control with
guaranteed string stability”, In Int. Conf. on Control, Automation and
Systems, Korea, 2007
[6] W. Pananurak, S. Thanok and M. Parnichkun, ”Adaptive cruise control
for an intelligent vehicle”, In Int. Conf. on Robotics and Biomimetics,
Thailand, 2009
[7] P. Maji, S. Kumar Patra and K. Mahapatra, ”Implementation of FPGA
based Fuzzy PI Approximate Control for Automatic Cruise Control
System”, In Proceedings of Int. Conf. on Circuits, Communication,
Control and Computing, 2014

2215

You might also like