Upcoming SlideShare
×
Like this document? Why not share!

Like this? Share it with your network

Share

Dynamic modeling and control of vehicle using fuzzy logic controller 2

• 962 views

• Comment goes here.
Are you sure you want to
Be the first to comment
Be the first to like this

Total Views
962
On Slideshare
962
From Embeds
0
Number of Embeds
0

Shares
15
0
Likes
0

No embeds

Report content

No notes for slide

Transcript

• 1. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 292 DYNAMIC MODELING AND CONTROL OF VEHICLE USING FUZZY LOGIC CONTROLLER Xhevahir Bajramia , Ahmet Shalaa , Rame Likaja a Faculty of Mechanical Engineering, University of Prishtina, Prishtina, Kosovo ABSTRACT This paper presents the design of Fuzzy Logic Controller (FLC) like autopilot with the purpose of improving the steering accuracy of the vehicle for trajectory tracking. The kinematics and dynamics including state variables for the vehicle model are described. The dynamic vehicle model consists by four wheels, two of them steering wheels (front axle). The simulation and control of vehicle dynamic model is carried out through the scheme which is presented in this paper. FLC is used to improve the ability of the vehicle model to follow the trajectory of motion, based on the fundamental theories of control and particularly for FLC. The duty of the FLC is to follow accurately the trajectory - the desired path of the vehicle, holding the position, velocity and acceleration. This paper also presents the results of simulation, through diagrams and tables, of the vehicle model. Simulations are performed by using MATLAB / Simulink. Key words: Vehicle, autopilot, kinematic model, dynamic model, trajectory, fuzzy logic. KINEMATICS MODELING OF THE VEHICLE Analysis of the kinematics model of vehicle derives on the basis of known linear velocity of the vehicle, point B: Bx , By respectively vvB = and steering angle of front wheels: φ respectively φ& . The non–holonomic constraint states that the vehicle can only move in the direction normal to the axis of the driving wheels (rear axle) i.e., the vehicle base satisfies the conditions of pure rolling and non-slipping in matrix form: 0)( =⋅ ssC & .......................................................................................................... (1) INTERNATIONAL JOURNAL OF MECHANICAL ENGINEERING AND TECHNOLOGY (IJMET) ISSN 0976 – 6340 (Print) ISSN 0976 – 6359 (Online) Volume 4, Issue 4, July - August (2013), pp. 292-299 © IAEME: www.iaeme.com/ijmet.asp Journal Impact Factor (2013): 5.7731 (Calculated by GISI) www.jifactor.com IJMET © I A E M E
• 2. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 293 yB xB x Pv1 Pv2 A B E F θ φ a Pv D C θ φ θ θ φ φ φ θ θ& mpa P a b b θ φ v y O Rmin Fig.1. Positional analysis and kinematics model of vehicle DYNAMIC MODELING OF THE VEHICLE The Lagrange formulations are used to derive the dynamic equations of the vehicle: τ= ∂ ∂ −      ∂ ∂ q L q L dt d & ........................................................................................ (2) After the calculation of Lagrange function (kinetic and potential energy), the dynamical equations of the vehicle can be expressed in the matrix form: τ=+⋅ ),()( qqHqqD &&& ........................................................................................ (3) where:       =      =      = d sh M F and H H qqH DD DD qD τ 2 1 2221 1211 ),(,)( & shF - Nominal driving force acting on the rear axle, dM - Nominal torque for steering wheels.            =      ∂ ∂ ∂ ∂ = =      ∂ ∂ ∂ ∂ == ++=      ∂ ∂ ∂ ∂ = 2 )tan( 4 )(tan12 2 22 2 2112 2 11 R m L D b R m v L DD mmm v L v D rr rr perrrpa φφ φ φ φ && &
• 3. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 294         +⋅         ⋅⋅+⋅⋅= +⋅         ⋅+⋅⋅⋅= )1)((tan 2 )tan( )1)((tan 4 )tan(2 2 2 2 2 22 2 1 φφφ φφφφ & && v b R mvmH b R mvmH rrper rrper The final vehicle model - Lagrange equations which describe the movement of the vehicle are: +      ⋅             ++ φ φ φφ && &v R m b R m b R mmmm rrrr rrperrrpa 2 )tan( 4 )tan( 4 )(tan12 22 2 2 +       =               +⋅         ⋅⋅+⋅⋅ +⋅         ⋅+⋅⋅⋅ d sh rrper rrper M F v b R mvm b R mvm )1)((tan 2 )tan( )1)((tan 4 )tan(2 2 2 2 22 2 φφφ φφφφ & && ..... (4) where 1τ denotes the nominal driving force acting on the rear axle and 2τ denotes torque for steering wheels. To be able to follow the sinusoidal trajectory, the vehicle nominal driving force shF (t) (acting on the rear axle CD), and its torque for steering wheels dM (t) (nominally to front wheels E, F) are given at equation (4). a) b) Fig.2. Nominal driving force acting on the rear axle (a) and Steering wheels nominal torque (b) 0 0.5 1 1.5 2 2.5 3 3.5 -8 -6 -4 -2 0 2 4 6 8 x 10 4 Time (Seconds) Vehicle Fsh(t)[N] 0 0.5 1 1.5 2 2.5 3 3.5 -6 -4 -2 0 2 4 6 x 10 5 Time (Seconds) Vehicle Md(t)[Nm]
• 4. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 295 VEHICLE FUZZY LOGIC CONTROLLER DESIGN In case of path following from vehicle, in the open-loop feedback control strategy the velocity and torque are in function of the calculated path and its initial start and end-position. The problem here is the absence of an error-model due to the beforehand calculations. It means that there exists no possibility for error compensation. In the closed loop strategies the velocity and torque are functions of the actual state of the system and not only of the initial and end points. Therefore disturbances and errors causing deviations from the desired path are compensated by the use of the inputs. There are several available closed loop control systems, like, proportional control (P), proportional integral control (PI), proportional integral derivative control (PID), fuzzy logic control (FLC) etc. In this work the Fuzzy logic control is selected for implementation, as so far it is known, for a highly nonlinear vehicle model, the fuzzy logic is one of the easiest approaches for implementation, and is well suited to low-cost implementations based on cheap sensors. As inputs to the Fuzzy Logic Controller are taken: distance error (eq. 5) and angle error (eq. 6). From the trajectory can be obtained the following distance error: 22 )()( xxyyd desireddesirederr −+−±= ......................................................... (5) where: )(xfy = - represents the actual trajectory, )( desireddesired xfy = - represents the desired trajectory of the vehicle at point B. For 1)( =− yysign desired follows yydesired > and 0>errd . For 1)( −=− yysign desired follows yydesired < and 0<errd From the trajectory can be obtained the following vehicle body rotation error (θ): θθ −= de ......................................................................................................... (6) where: dθ - represents the desired angle of the vehicle to the x axis, andθ - represents the actual measured angle First Input to Fuzzy Logic Controller, distance error Fig.3. First Input variable, distance error ’’d’’
• 5. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 296 Second Input to Fuzzy Logic Controller, angle error Fig.4. Second Input variable, angle error ’’e’’ Output from Fuzzy Logic Controller is additional steering angle "DFi" Fig.5. Output – additional steering angle ’’ DFi’’ In addition, due to the experience of many authors [1, 2, 5], the rule basis for the Fuzzy Logic Controller was created as shown in Table 1. Table.1. Proposed rule basis. Distance error Angle error e-NM e-NMe e-Z e-PMe e-PM d-NSM DFi-PSM DFi-PSM DFi-PSM - - d-NM DFi-PM DFi-PM DFi-PM - - d-NMe DFi-PMe DFi-PMe DFi-PMe - - d-NV DFi-PMe DFi-PV DFi-PV - - d-Z DFi-PMe DFi-PV DFi-Z - - d-PV - - DFi-NV DFi-NV DFi-NV d-PMe - - DFi-NMe DFi-NMe DFi-NMe d-PM - - DFi-NM DFi-NM DFi-NM d-PSM - - DFi-NSM DFi-NSM DFi-NSM
• 6. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 297 Figure 6, presents the structure of Fuzzy Logic Controller which is built according to the rules given in Table1. Fig. 6. Structure of Fuzzy Logic Controller SIMULATION RESULTS In the following diagrams are shown the simulation results of vehicle model. In Figure 7 is shown the desired trajectory of the vehicle )(xfy = . Fig. 7. Desired trajectory of the vehicle
• 7. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 298 Fig. 8. Error ''Ex and Ey'' in x y direction Fig. 9. Vehicle body angle error '' Eteta '' and Front wheels steering angle error ’’Efi’’ Fig. 10. Angular velocity error ''Edfi'' of the steering wheels and Vehicle velocity error “Ev” using Fuzzy Logic Controller 0 0.5 1 1.5 2 2.5 3 3.5 -1 0 1 2 3 4 5 x 10 -3 Time (Seconds) Vehicle Ex 0 0.5 1 1.5 2 2.5 3 3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 x 10 -3 Time (Seconds) Vehicle Ey 0 0.5 1 1.5 2 2.5 3 3.5 -1.5 -1 -0.5 0 0.5 1 1.5 x 10 -3 Time (Seconds) Vehicle Eteta 0 0.5 1 1.5 2 2.5 3 3.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 x 10 -3 Time (Seconds) Vehicle Efi 0 0.5 1 1.5 2 2.5 3 3.5 -1 -0.5 0 0.5 1 Time (Seconds) Vehicle Edfi 0 0.5 1 1.5 2 2.5 3 3.5 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 Time (Seconds) Vehicle Ev
• 8. International Journal of Mechanical Engineering and Technology (IJMET), ISSN 0976 – 6340(Print), ISSN 0976 – 6359(Online) Volume 4, Issue 4, July - August (2013) © IAEME 299 CONCLUSIONS Based on the results shown in this paper and due to the comparisons with similar reference results available, can be concluded: The simulation results indicate that Fuzzy Logic Controller (FLC) has followed the desired trajectory very good. The sinusoidal trajectory is chosen because of the fact that many authors [3, 4, 5] considered this as the most difficult to be implemented, especially on its ends. Maximum error for trajectory tracking, in y direction does not exceed [ ]m3 105.1 − ×± and in x direction does not exceed [ ]m3 102 − ×± . Maximum angle error of vehicle body, the angleθ does not exceed the value [ ]rad4 108 − ×± . Maximum angle error of steering wheels φ does not exceed the value [ ]rad3 102.1 − ×± . Maximum error of vehicle velocity (linear velocity) does not exceed the value [ ]sm /02.0± . REFERENCES [1] Zadeh, L.A.; Knowledge representation in fuzzy logic, IEEE Transactions on Knowledge and Data Engineering, Vol. 1, fq. 89-100, 1989. [2] Yager, R. and D. Filev, Generation of Fuzzy Rules by Mountain Clustering, Journal of Intelligent & Fuzzy Systems, Vol. 2, No. 3, pp. 209-219, 1994. [3] R. O. Saber; Nonlinear Control of Under actuated Mechanical Systems with Application to Robotics and Aerospace Vehicles, PhD thesis, Massachusetts Institute of Technology, 2001. [4] E. N. Moret: Dynamic Modeling and Control of a Car-Like Robot, Blacksburg, USA, 2003. [5] A. Shala: “New Fuzzy Neural Network design using Genetic Algorithm for trajectory tracking of mobile robot” MECHROB’04, Aachen, Germany, 2004. [6] Bajrami Xh., Kopacek P., Shala A., Likaj R., Modeling and control of a humanoid robot. Published online March 9, 2013 © Springer Verlag Wien 2013. [7] K. Kishore Kumar, M.Siva Krishna, D.Ravitej and D.Bhavana, “Design of Automatic Guided Vehicles”, International Journal of Mechanical Engineering & Technology (IJMET), Volume 3, Issue 1, 2012, pp. 24 - 32, ISSN Print: 0976 – 6340, ISSN Online: 0976 – 6359. [8] Sanjay H. Sawant and Dr. J. A. Tamboli, “Analysis and Comparison of Vehicle Dynamic System with Nonlinear Parameters Subjected to Actual Random Road Excitations”, International Journal of Mechanical Engineering & Technology (IJMET), Volume 3, Issue 2, 2012, pp. 284 - 299, ISSN Print: 0976 – 6340, ISSN Online: 0976 – 6359.