Simulation of Car System with Cruise Control 1Ihedioha Ahmed C
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Trend in Research and Development, Volume 3(1), ISSN: 2394-9333 www.ijtrd.com Simulation of Car System with Cruise Control 1Ihedioha Ahmed C. and 2Iroegbu Chibuisi, 1Enugu State University of Science and Technology Enugu, Nigeria 2Michael Okpara University of Agriculture, Umudike, Abia State, Nigeria Abstract: In this paper, simulation of car system which influences the throttle and thus the force with cruise control is presented. The purpose of generated by the engine [2]. cruise control is to keep the velocity of a car A schematic picture is shown in Figure 1 constant. The driver drives the car at the desired speed, the cruise control system is activated by pushing a button and the system then keeps the speed constant. The result of the Simulation of a car with cruise control for a step change in the slope of the road with relative damping 휏 =1 and 휔0 =0.05 (dotted), 휔0 =0.1 (full) and 휔0 =0.2 (dashed) shows a velocity error when the slope of the road is suddenly increased by 4%. Keywords: Car System, Cruise Control, Damping, Velocity Error. I. INTRODUCTION Science has traditionally been concerned with describing nature using mathematical symbols and Figure 1: Schematic diagram of a Car on a Sloping equations. Applied mathematicians have Road traditionally been studying the sort of equations of interest to scientists. More recently, engineers have II. MODELING come onto the scene with the aim of manipulating or controlling various processes. They introduce We will start by developing a mathematical model of (additional) control variables and adjustable the system. The mathematical model should tell how parameters to the mathematical models. In this way, the velocity of the car is influenced by the throttle they go beyond the traditions of science and and the slope of the road. mathematics, yet use the tools of science and The model of the system is by a momentum balance mathematics and, indeed, provide challenges for the [3]. The major part of the momentum is the product next generation of mathematicians and scientists [1]. of the velocity v and the mass m of the car. There are The purpose of cruise control is to keep the velocity also momenta stored in the engine, in terms of the of a car constant. The driver drives the car at the rotation of the crank shaft and the velocities of the desired speed, the cruise control system is activated cylinders, but these are much smaller than mv. A by pushing a button and the system then keeps the block diagram of the system is shown in Figure 2. speed constant. The major disturbance comes from changes of the slope of the road which generates Let 휃 denote the slope of the road, the momentum forces on the car due to gravity. There are also balance can be written as disturbances due to air and rolling resistance. The 푑푣 cruise control system measures the difference 푚푑푡 +cv = F - mg 휃 ……………………(1) between the desired and the actual velocity and where the term cv describes the momentum loss due generates a feedback signal which attempts to keep to air resistance and rolling and F is the force the error small in spite of changes in the slope of the generated by the engine. The retarding force due to road. The feedback signal is sent to an actuator the slope of the road should similarly be proportional to the sine of the angle but we have approximated IJTRD | Jan - Feb 2016 Available [email protected] 46 International Journal of Trend in Research and Development, Volume 3(1), ISSN: 2394-9333 www.ijtrd.com sin휃 ≈ 휃 . The consequence of the approximations It is convenient to differentiate (3) to avoid dealing will be discussed later. It is also assumed that the both with integrals and derivatives. Differentiating force F developed by the engine is proportional to the process model (2) the term du/dt can be the signal u sent to the throttle [5]. eliminated and we find the following equation that describes the closed loop system 푑2푣 푑푒 푑휃 + (0.02 +k) + k1e = 10 ………….(4) 푑푡2 푑푡 푑푡 We can first observe that if q and e are constant the error is zero. This is no surprise since the controller has integral action [7]. To understand the effects of the controller parameters k and ki we can make an analogy between (4) and the differential equation for a mass spring damper system 푑2푥 푑푥 푀 2 + 퐷 +퐾푥 = 0 푑푡 푑푡 Figure 2: Block Diagram of a Car with Cruise We can thus conclude that parameter k influences Control [4] damping and that ki influences stiffness. Introducing parameters for a particular car, an Audi The closed loop system (4) is of second order and it in fourth gear, the model becomes has the characteristic polynomial 2 푑푣 푠 + (0.02 + k)s +푘푖 …………………………(5) +0.02v = u - 10 휃 ……………………….(2) 푑푡 We can immediately conclude that the roots of this polynomial can be given arbitrary values by where the control signal is normalized to be in the choosing the controller parameters properly. To find interval 0≤ u≤1, where u=1 corresponds to full reasonable values we compare the characteristic throttle. The model implies that with full throttle in polynomial with the characteristic polynomial of the fourth gear the car cannot climb a road that is steeper normalized second order polynomial than 10%, and that the maximum speed in 4th gear 2 2 on a horizontal road is v =1/0.02 = 50 m/s (180 푠 + 2휏휔0 + 휔0 ……………………………..(6) km/hour). where 휏 denotes relative damping and 휔0 is the Since it is desirable that the controller should be able undamped natural frequency. to maintain constant speed during stationary The parameter 휔0 gives response speed, and 휏 conditions it is natural to choose a controller with determines the shape of the response [8]. Comparing integral action. A PI controller is a reasonable the coefficients of the closed loop characteristic choice. Such a controller can be described by polynomial (5) with the standard second order 푡 polynomial (6) we find that the controller parameters U = k(vr – v) + ki (푣 − 푣 휏 푑휏 …………….(3) 0 푟 are given by: To understand how the cruise control system works 푘 = 2휏휔 − 0.02 ……………………………(7) we will derive the equations for the closed loop 0 2 systems described by Equations (2) and (3) Since the 푘푖 = 휔0 effect of the slope on the velocity is of primary interest we will derive an equation that tells how the III. RESULT AND DISCUSSION velocity error e = v − v depends on the slope of the r A. Result road [6]. Assuming that vr is constant we find that The result of the Simulation of a car with cruise control for a step change in the slope of the road is 푑푣 푑푒 푑2푣 푑2푒 = - , = - shown in figures 3 and 4. 푑푡 푑푡 푑푡2 푑푡2 IJTRD | Jan - Feb 2016 Available [email protected] 47 International Journal of Trend in Research and Development, Volume 3(1), ISSN: 2394-9333 www.ijtrd.com there is only one parameter 휔0 that has to be determined. The selection of this parameter is a compromise between response speed and control actions. This is illustrated in Figure 4 which shows the velocity error and the control signal for a simulation where the slope of the road suddenly changes by 4%. Notice that the largest velocity error decreases with increasing 휔0, but also that the control signal increases more rapidly. In the simple model (1) it was assumed that the force responded instantaneously to the throttle. For rapid changes there may be additional dynamics that has to be accounted for. There are also physical limitations to the rate of change of the force. These limitations, which are not accounted for in the simple model (1), limit the admissible value of 휔0. Figure 3 shows the velocity error and the control signal for a few values of 휔0. A reasonable choice of 휔0 is in the range of 0.1 to 0.2. The performance of the cruise control system can be evaluated by comparing the behaviors of cars with and without Figure 3: Simulation of a car with cruise control for cruise control. This is done in Figure 4 which shows a step change in the slope of the road. The the velocity error when the slope of the road is controllers are designed with relative damping 휏 =1 suddenly increased by 4%. Notice the drastic and 휔0 =0.05 (dotted), 휔0 =0.1 (full) and 휔0 =0.2 difference between the open and closed loop (dashed). systems. CONCLUSION A cruise control system contains much more than an implementation of the PI controller given by (3). The human machine interface is particularly important because the driver must be able to activate and deactivate the system and to change the desired velocity. With the chosen parameters 휔0 =0.2 and 휏 =1 we have 2 휏휔0= 0.2 and it follows from (7) that the parameter c = 0.02 has little influence on the behavior of the closed loop system since it is an order of magnitude smaller than 2 휏휔0. Therefore it is not necessary to have a very precise value of this Figure 4: Simulation of a car with (solid line) and parameter. This is an illustration of an important and without cruise control (dashed Line) for a step surprising property of feedback, namely that change of 4% in the slope of the road. The controller feedback systems can be designed based on is designed for 휔0 =0.1 and 휏 =1.