AIpplying Genetic Search Techniques to Drivetrain Modeling D. Maclay a n d R. Dorey W ork has been carried eling work carried out during an investigation into the tuning and control of driveline torsional oscillation. The model is based on a transfer function and state space description that is simple, but which allows inclusion of nonlinear effects associated, for example, with the operation of the clutch and with transmission backlash. The model has been used to help in identifying important component characteristics to adjust the stiffness and damping of the drive system. Test data for the work was acquired from a development vehicle and this comprised measurements of engine crank velocity, throttle position, vehicle speed, and acceleration. Maneuvers were carried out at a variety of engine and vehicle speeds, and in low gear ratios, to stimulate longitudinal oscillation. out to identify a nonlinear model of a vehicle engine and drivetrain. A hybrid approach ha: been adopted which combines 30th physical modeling and parameter optimization using gen-tic algorithm (GA) search techniques. The resulting models which cover a range of operating conditions have allowed the sensitivity to variation of key pari.meters to be assessed and have been used to help optimize the o\.erall response of the vehicle drivetrain. A comparison has bem made between the GA search and a gradient based method M hich highlights the "intelligent" nature of the fornier appro ich. Background Advan:es that have been made to iniprovc. the economy and emis>ions of powertrains have increased efficiencies and lowcred frictional losses. bringing reducd powertrain daniping and a greater sensitivity to driveline torsional disturbances. With light, responsive engines, rapid throi tle movements made by the driver can excite a low frequency torsional vibration felt by the occupants as a sudden and undesirable longitudinal oscillation. This oscillation is most significant in low gear ratios. A systems approach to the synthesis of the vehicle engine and drivetrain allows examination of the key contributors to this important physical behavior. This article describes recent mod- Presented at the 1992 IEEE International Symposium on Intelligent Control. D. Maclay is with Cambridge Control Ltd., The Jeffreys Bitilding, Cowley Road, Cambridge CB4 4WS, U.K. R. Dorey is Mith Powertrain Research, Ford Motor Company Ltd., Research and Engineering Centre, Laindon, Basildon. Essex SS15 6EE U.K. 50 Model Structure A drivetrain model structure Stock Market: Simon has been developed which incl u d es engine dynamics, drivetrain dynamics, and dynamics arising from longitudinal compliance in the suspension. The equations for this model are written in terms of physical parameter values. Some of these parameter values were obtained by direct measurement; the others have been identified by matching the model response to corresponding test data using the GA search techniques described below. The approach of developing a model structure and using (not necessarily GA) optimization methods to identify the physical parameter values, has already been shown to work successfully - see for example [ I]. While the main objective of this work was to investigate the acceleration response of the vehicle to changes in throttle position, it was important to model the internal behavior of the engine and drivetrain in order that nonlinear effects, in particular backlash in the drive, could be incorporatcd. This requirement pre- 0212- 1108/93I$O3.OOO1993IEEE I I IEEE Contt-ol Systems - . ..... cluded the identification of a “black box” type model andwas the reason why the model structure described here has been used. Based on previous work, the engine dynamics from throttle - - as: bs + 1 ____ e-sT where u(t) is the throttle input, x ( t ) = [xix2 ~ 3 x 4 x6]’ ~ 5 is the state vector, y ( t ) = bi y2 y3] is the output vector and -ba2+b2a2 -ba2 k d - le - 1 0 O O + x5 + X x4 x2 In order to obtain a simplified model of drivetrain dynamics, the drivetrain was represented as three inertias linked by flexible couplings and dampers as shown in Fig. 1. The inertia lerepresents the engine and flywheel inertia, Id represents the inertia of the gearbox components, wheels and sub-frame and Zv is an equivalent inertia representing the mass of the vehicle. Note that in order to simplify them, all the equations of motion have been referred to the engine crankshaft. By transforming the engine transfer function to state space form and combining this with a state space model of the drivetrain dynamics,the overall systemcan be written as (a detaileddescription of variables used here and throughout appears in the Appendix): 0 x3 + 0 1 0 0 0 0 C= 0 0 0 1 0 0 This model structure provides three outputs which are engine crank speed, roadwheel speed, and vehicle accelerationand these correspond to measurementsfrom tests carried out on the vehicle. Note that at this stage, we still have a linear model structure. However, since the internal structure of the drivetrain has been modeled (as opposed to using a black box approach) this can be extended to incorporate nonlinear effects such as backlash which are embedded within the system between the engine flywheel and the roadwheels: details of how this was done are given later. The model structure which has been derived incorporates a number of physical parameters: accurate estimates are available for some of these, and for others, less accurate estimates are available. Following some initial experimentationit was decided to use these fixed values for each of the inertia parameters and to apply the GA optimization techniques to search over the parameter set O I 1 0 While the choice of this parameter set may appear somewhat arbitrary, it yielded good results and this issue is given further consideration below. 0 A= Parameter Identification Using Genetic Algorithms 0 0 L 0 cs - - Ivg2 The first thorough treatment of the the use of GASwas given in [2] and a more up to date description of the theory and application of GA methods may be found in [3]. The use of GAS extends across many fields including pattern recognition, structure optimization and network optimization;examples of the use of GAS in control applications are given in [4]-[6]. A description of the basic GA is now given as well as an explanation of how the algorithms described in [3] have been adapted in order to deal the problem in hand. The algorithm described here has been implemented using MATLAB [7] and is ks -cS+cw] lvg2 Ivg2 B = [ l b 0 0 0 0IT 51 June 1Y93 1 - - I Parents ,1 0 1 0 , O1 1 1 0 Offspring 0 1 0 00 10 1 1 * 1 o 1 0 '01 o 1 1 ' Fig. 2. Crossover: being considered for inclusion in a future release of the Optimization Toolbox [8]. The General Scheme As suggested by the name, the inspiration for GASarose from the study of evolutionary and biological processes which enable a species to adapt over many generations to become better suited to its environment. The GA owes its existence to ideas borrowed from the study of these processes and the following description of a basic CiA explains how these ideas have been adapted into a form which is suitable for computer implementation: 1) Initialization: an initial population is set up consisting of individuals whose (randomly chosen) characteristics are represented by a string of ones and zeros. 2 ) Evaluate Fitness: for each individual within the population a fitness value is calculated which is based upon a suitable performance criterion. 3) Selection: pairs of individuals for breeding are chosen on a probabilistic basis, individuals with a high fitness value being more likely to be chosen than those with a lower fitness value. 4 ) CrosJover: in this stage the binary coding of each parent is divided into two and segments from each parent are then combined to give an offspring which has inherited part of its coding from each parent (illustrated in Fig. 2 ) . 5 ) Mutation: inversion of bits in coding of the offspring with probability of perhaps one in a thousand. 6) Retum to step 2. The following sectionsconsiderhow each of these stageshas been implemented with respect to the drivetrain identification problem. Initialization of the Population A population was initialized by setting up a random distribution of parameter vectors. The individual parameter values were set up with a uniform distributionacross the allowable range. For most of the runs, a population of size 80 was used, however, good results were obtained with populations as small as 20. BinaryCoding of the Parameter Set Before proceeding, it is necessary to consider how a vector of values from the parameters P is converted to a binary representation. Take as an example the parameter c ; anaccurate estimate was not available for this parameter, however, from physical considerations it was expected to lie between 0.01 and 1. By taking 16 logarithmically spaced values across this range the parameter cv can be mapped onto a 4-bit binary number. It is important in this case to use a logarithmic rather than a linear spacing since the linear spacing would give very poor resolution at the lower end of the range. It is true that using 16 points to cover a range from 0.01 to 1 gives a fairly coarse resolution: clearly the resolution may be increased either by increasing the number of points or by narrowing the range. It is questionnablehow far the resolution may profitably be increased, in this work for example, an error of say 21% on any of the parameter values would be considered very satisfactory. Evaluation and Scaling of the Fitness Function For each individual in the population it is necessary to evaluate a measure of fitnessfix) which will be used to generate a probability with which the individual in question will be selected for breeding. A natural way to gauge the relative performance of different sets of parameter values is to simulate the response of the model with each of the sets of parameter values and calculate the least squared error (denote this g(x)) between this simulated response and the test data acquired under corresponding conditions. As pointed out in [3], however, the least squared error function g(x) cannot be used directly as a fitness function, since it does not fit the necessary conditions that it should be i) non-negative, and ii) increasing with increasing performance of the parameter vector. Goldberg suggests a mapping from g(x) tofix) given by = {Oc,, Cmax - g ( x ) when otherwise (4) which requires a suitable value to be chosen for Cma, A further problem is that at the start of the GA run, it is common to have a few individuals of extraordinary fitness and it is important that these individuals should not dominate the population after a single generation. To overcome this Goldberg suggests a linear scaling method which itself may require modification to prevent negative values of fitness. In this work a simpler approach to mapping g(x) ontofix) has been adopted: the cost function g(x) for each individual is evaluated and the results are used to rank each individual in the population from highest to lowest performance; thus for a population of 10 individuals, the highest performing individual is given a fitness of 10 and the lowest performing is given a fitness of 1. This satisfies requirements i) and ii) above and makes the scaling process unnecessary. Selection,Crossover, and Mutation These steps are performed in a standard manner: individuals are selected for breeding with a probability proportional to their fitness; crossover is performed with the crossover point being chosen randomly and mutation on an individual bit is performed with probability of one in a thousand. Performance of the Genetic Algorithms A discussion will be given here of the performance indicators used during the search and consideration will be given to determining why GA search techniques worked well, whereas difficulties were experienced with applying quadratic,gradient based methods. Performance Indicators For each generation, a number of performance measures are displayed in order to indicate the progress of the search. These performance measures are: 1) Average least squared error for all members of the population. 2 ) Least squared error for the fittest member of the population. IEEE Control Systems 52 I I Test 13: simulated (solid) and measured (dashed) acceleration 1- - o c I -20 J - 02 04 Fig. 4. Dead-zonefunction used within the nonlinear equations for modeling backlash. ___ 06 08 1 12 time in seconds Test 13. simulated (solid) and measured (dashed) crank velocity 9or- ] /' / I /' , ~ ,.,' ,' 0 -~ 0.2 06 0.4 0.8 1 1.2 time in seconds Fig. 3. Comparison of simulated and measured data Wle I Method Comparison Charicteristics of M-L method I Charicteristics of GA method Search oker parameter T requires interpolation routine to allow noninteger numbers of samples Search over T is easily accomplished by mapping to binary coding corresponding to integer number of samples If it can get stuck in a local optimum, it will often do so Generally robust against becoming stuck in local optima When the global optimum is found, Good at getting close to the the accuracy of the solution may be optimum-for high accuracy it may be worth continuing with M-L chosen arbitrarily Very efficient when starting point does lead to global optimum ~. Always requires a large number of function evaluations 3) Normalized variance of each of the physical parameters across the whole population. All of these performance indicators can be used to decide when the optimization should be terminated. In particular, when the average least squared error is equal or nearly equal to the least squared error from the fittest individual,then no further improvement is likely. In practice, with the setup that was used, the least squared error for the fittest individual reached a minimum in about half the number of generations it took for the whole population to achieve this value. For each generation, the variance of each parameter across the population was calculated and normalized such that values between and 0 and 1 were possible. This indicator provided considerable insight into the relative importance of the the different parameters:in general, the parameters Tand kd and cw were the first to converge, whereas cs, ks and cv converged last. This observation has implications regarding the choice of a minimal parameter set, i.e., what is the largest set of parameters for which the data is rich enough to identify a unique value for each parameter. This is of particular importance when non-genetic search techniques, for example quadratic, gradient based methods such as the Levenberg-Marquartd (M-L) method (see [9]) are employed. Comparison with a QuadraticGradient Based Method Initial attempts to apply the Levenberg-Marquartdmethod to this problem were unsuccessful; however, the performance of this method depends critically upon the initial guess used as the starting point for the search. Once a solution vector had been obtained (using the GA search method), some tests were performed in order to gauge the relative performance of the GA and M-L methods. To this end a GA search was perfomed with an initial population based on randomly chosen parameter vectors as described above. The number of function evaluations required to obtain the best fit solution was then noted. For the M-L search a number of runs were performed using as initial guesses the same parameter vectors which were used in the GA search as the initial population. The total number of function evaluations was noted as was whether each of the searches had approached the global optimum or become stuck in a local optimum. 53 June 1593 I - I I For both search methods, the main computational burden arose from evaluating the least squared error function so the total number of function evalutions provides a useful performance indicator.A difficulty remains however with the choice of termination criteria - for the GA search the process was continued until the fitness of the fittest individual had not improved for 10 generations, and for the M-L search the process was continued until either criteria relating to the accuracy of the objective function and parameter vector were satisfied, or 900 function evaluations were reached. In order to make the comparison more meaningful, a wider range of parameter values for the initial population was used than for the final results; a population of size 80 was used for the GA search with a 5-bit representation for each of the parameters. The termination criterion was satisfied after 60 generations and the resulting parameter vector gave a good fit for both crank velocity and vehicle acceleration. For the M-L method ten runs were performed using the first ten parameter vectors from the GA’s initial population as starting points. In each case, the termination criteria were satisfied only when 900 function evaluations were reached and out of the ten searches only one arrived at a solution which gave a good fit for both crankshaft velocity and vehicle acceleration. Thus, in total, the GA search required 4800 function evaluations whereas the M-L method required 9000 function evaluations to reach an acceptable solution. Clearly this is only a rough comparison, and the results would be expected to vary widely depending on the initial conditions, termination criteria and search parameters. Table I makes some comparisons of a more general nature for the two methods applied to this problem. Note, in particular,that for a gradient based method it is necessary to be able to obtain partial denvatives of the objective function with respect to the search parameters: this requires some customization of the algorithm to deal with the time delay parameter which is most conveniently represented as a discrete number of samples. The relative ease with which the GA handles this parameterhighlights 0 0.2 04 0.6 0.8 I 1.2 1.4 time in seconds m--- Test 3, madel no. 16 crank velocity response . the “intelligent” nature of the algorithm: the fact that the GA is based on discretely varying parameters means that it can even be applied to problems where the model structure itself is included in the search. Results A number of models of the engine and drivetrain system have successfullybeen identifiedfor a range of differentengine speeds in each of first, second and third gears. Fig. 3 shows an example of the identifiedand measured responsesto a step input on throttle starting from cruise at 15 km/h in first gear. This shows that a good fit has been obtained for both the vehicle acceleration and the engine crank velocity. Note that with the step input being applied starting from cruise, the backlash in the drive plays no part in the response and the system is assumed to behave linearly. In contrast when the step input is applied from a deceleration initial condition, the backlash in the drive must first be taken up before the vehicle itself can start to accelerate. As mentioned earlier, it was possible to model the effect of backlash between the flywheel and the roadwheels. This was done by replacing x3 (differencebetween the angular displacementof the inertiasleand I&*) on the right hand side of the state space equations (1) with B(x3) where B(x3) is the dead-zone function shown in Fig. 4. This alters the equations for X2 and i 4 which become X 2 = (-ba2 + b2a2)xl - ba2x2 + -B(x3) kd 1, By making this alteration the model accurately represents the nonlinear behavior of the drivetrain which effectivelybehaves as two decoupled systems whenever the backlash is active. Fig. 5 shows three traces which illustrate the effect of the backlash. The dashed trace shows measured data from a test where the vehicle was initially decelerating at 15 km/h in first gear; the dotted trace shows the response of the model identified at the same operating point but without backlash; the solid trace shows the response of the same model but with backlash included (the amount of backlash was determined by direct measurement).The difference between the solid and dotted traces shows that the backlash results in a significantly greater amplitude of oscillation during acceleration. The close match between the solid and dashed responses shows that by incorporating the nonlinear effect of backlash into the identified model, an accuraterepresentationof the vehiclebehaviour with backlash active is obtained. I Successful Application of GA Search Techniques Fig. 5. Comparison of simulated data (with and without backlash) and measured data. Solid-simulated response with backlash. Dotted-simulated response without backlash. Dashed-measured data from vehicle. GA search techniques have been successfully applied here to the identification of vehicle drivetrain dynamics. Of particular note regarding the GA search technique itself are the robustness and ease of application which this method offers. This article outlines the circumstances under which the GA search method has been found to be most appropriate as applied to the drivetrain identification problem and suggests how it may be used in conjunction with a quadratic method to give a particularly powerful combination. IEEE Control Systems 54 r -- I ’ I ’ It was shown that the modeling problem considered in this article was in fact amenable to being solved by traditional optimization methods; however, the flexibility and robustness of the genetic algorithm approach was noted and with regard to the “intelligent’ nature of the algorithm, the ease with which discretely varying parameters such as a time delay or even a choice of model structures may be incorporatedin the search was found to be an important consideration. Appendix: Notation longitudinal damping between sub-frame and body referred to engine crankshaft in “/(rads) damping coefficient to represent wheel slip and viscous damping within the gearbox referred to engine crankshaft in “/(rads) damping coeffient to represent wind resistance referred to engine crankshaft in “/(rads) gear box ratio combined engine, flywheel and clutch inertia in kgm2 combined equivalent inertia of transmission,road wheels and vehicle sub-frame referred to road wheels in kgm2 overall stiffness of components between clutch and subframe, referred to engine crankshaft in “/rad overall stiffness of longitudinal suspension referred to gine crankshaft, in “/rad model state associated with engine dynamics model state: crank angular velocity in rads model state: difference between road wheel angular position referred to crank and crank angular position in rad model state: road wheel angular velocity referred to crank in rads model state: difference between vehicle equivalent angular position referred to crank and road wheel angular position referred to crank in rad model state: vehicle equivalent angular velocity referred to crank in rads model output: crank angular velocity in rads model output: road wheel angular velocity referred to crank in rads model output: vehicle e uivalent angular acceleration referred to crank in rads 92 References [ l ] R. Stanway and J. E. Mottershead, “Identification of combined viscous and Coulomb friction - A numerical comparison of least-squares algorithms,” Trans. Znst. MC, Jan. 1986. [21 J. H. Holland, Adaptution in Natural and Artijicial Systems. Ann Arbor, MI: Univ. of Michigan Press, 1975. [3] D. E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning. Reading, MA: Addison-Wesley, 1989. [4] D. M. Etter, M. J. Hicks, and K. H. Cho, “Recursive adaptive filter design using an adaptive genetic algorithm,” in Proc. IEEE Inr. Conj Acoustics, Speech, and Signal Processing, 1992, vol. 2, pp. 635-638. [51 J.R. and M.A. Keane, “Cart centering and broom balancing by genetically breeding populations of control strategy programs,” in Proc. Int. Joint Con5 Neural Nefworks, 1990, pp. 198-20 I . [6] D.R. McGregor, M.O. Odetayo and D. Dasgupta, “Adaptive control of a dynamic system using genetic-based methods,” in Proc. IEEE Int. Symp. Intelligent Control 1992, pp. 521-525. [7] MATLAB User Guide, The Mathworks Inc., 24 Prime Park Way, Natick, MA, 1990. [8] A. Grace, Optimization Toolboxfor Use with MATLAB. The Mathworks Inc., 24 Prime Park Way, Natick, MA, 1990. [9] D.G. Luenberger, Linear and Nonlinear Programming. Reading, MA: Addison-Wesley, 1984. David Maclay is a Senior Engineer with Cambndge Control Ltd., a U.K. based company which provides control engineering design services. He graduated from Cambridge University with a degree in electronic and information sciences having spent two years studying mathematics before switching to engineering. While working at Cambridge Control he has built up experience, primanly in the automotive and aerospace industnes, and his work has extended to the development of a full envelope helicopter flight control system designed using multivanable techmques. In the automotive field, his expenence includes engine modeling and development of an idle speed control system. Robert E. Dorey was awarded the Ph.D. degree in 1983 by the University of Bath, U.K., for work on the design and modeling of vehicle transmission systems. He continued this work as a Lecturer in Mechanical Engineering at Bath, where he developed complementary interests in microprocessor systems and digital control. He joined Ford Motor Company in 1990 where he is a Technical Specialist in Powertrain Control Systems. He has published approximately thirty papers in the automotive field. 55 June I993 I --
© Copyright 2025 Paperzz