1. Field of the Invention
The present invention relates to electronically-controlled motorcycle steering and maneuverability systems based on soft computing.
2. Description of the Related Art
Feedback control systems are widely used to maintain the output of a dynamic system at a desired value in spite of external disturbances that would displace it from the desired value. For example, a household space-heating furnace, controlled by a thermostat, is an example of a feedback control system. The thermostat continuously measures the air temperature inside the house, and when the temperature falls below a desired minimum temperature the thermostat turns the furnace on. When the interior temperature reaches the desired minimum temperature, the thermostat turns the furnace off. The thermostat-furnace system maintains the household temperature at a substantially constant value in spite of external disturbances such as a drop in the outside temperature. Similar types of feedback controls are used in many applications.
A central component in a feedback control system is a controlled object, a machine or a process that can be defined as a “plant”, whose output variable is to be controlled. In the above example, the “plant” is the house, the output variable is the interior air temperature in the house and the disturbance is the flow of heat (dispersion) through the walls of the house. The plant is controlled by a control system. In the above example, the control system is the thermostat in combination with the furnace. The thermostat-furnace system uses simple on-off feedback control system to maintain the temperature of the house. In many control environments, such as motor shaft position or motor speed control systems, simple on-off feedback control is insufficient. More advanced control systems rely on combinations of proportional feedback control, integral feedback control, and derivative feedback control. A feedback control based on a sum of proportional, plus integral, plus derivative feedback is often referred as a linear control. Similarly, Proportional feedback control is often referred to as P control, and Proportional plus Derivative feedback is often referred to as P(D) control, and Proportional plus Integral feedback is referred as P(I) control.
A linear control system (e.g., P, P(I), P(D), P(I)D, etc.) is based on a linear model of the plant. In classical control systems, a linear model is obtained in the form of ordinary differential equations. The plant is assumed to be relatively linear, time invariant, and stable. However, many real-world plants are time varying, highly non-linear, and unstable. For example, the dynamic model may contain parameters (e.g., masses, inductance, aerodynamics coefficients, etc.), which are either only approximately known or depend on a changing environment. If the parameter variation is small and the dynamic model is stable, then the linear controller may be satisfactory. However, if the parameter variation is large or if the dynamic model is unstable, then it is common to add Adaptive or Intelligent (AI) control functions to the linear control system.
AI control systems use an optimizer, typically a non-linear optimizer, to program the operation of the linear controller and thereby improve the overall operation of the control system.
Classical advanced control theory is based on the assumption that all controlled “plants” can be approximated as linear systems near equilibrium points. Unfortunately, this assumption is rarely true in the real world. Most plants are highly nonlinear, and often do not have simple control algorithms. In order to meet these needs for a nonlinear control, systems have been developed that use Soft Computing (SC) concepts such Fuzzy Neural Networks (FNN), Fuzzy Controllers (FC), and the like. By these techniques, the control system evolves (changes) in time to adapt itself to changes that may occur in the controlled “plant” and/or in the operating environment.
Control systems based on SC typically use a Knowledge Base (KB) to contain the knowledge of the FC system. The KB typically has many rules that describe how the SC determines control parameters during operation. Thus, the performance of an SC controller depends on the quality of the KB and the knowledge represented by the KB. Increasing the number of rules in the KB generally increases (very often with redundancy) the knowledge represented by the KB but at a cost of more storage and more computational complexity. Thus, design of a SC system typically involves tradeoffs regarding the size of the KB, the number of rules, the types of rules. etc. Unfortunately, the prior art methods for selecting KB parameters such as the number and types of rules are based on ad hoc procedures using intuition and trial-and-error approaches.
Steering and/or maneuverability control of a motorcycle using soft computing is particularly difficult because of the difficulty in obtaining a sufficiently optimal knowledge base (KB). If the KB does not coontain enough knowledge about the dynamics of the motorcycle-rider system, then the soft computing controller will not be able to steer and/or maneuver the motorcycle in a satisfactory manner. At one level, increasing the knowledge conatined in the KB generally produces an increase in the size of the KB. A large KB is difficult to store and requires relatively large amounts of computational reasources in the soft computing controller. What is missing from the prior art is a system and method for controlling a motorcycle using a reduced-size KB that provides sufficient knowledge to provide good control.
The present invention solves these and other problems by providing a SC optimizer for designing a globally-optimized KB to be used in a SC system for an electronically-controlled motorcycle. In one embodiment, the SC optimizer includes a fuzzy inference engine. In one embodiment, the fuzzy inference engine includes a Fuzzy Neural Network (FNN). In one embodiment, the SC Optimizer provides Fuzzy Inference System (FIS) structure selection, FIS structure optimization method selection, and teaching signal selection.
In one embodiment, the user makes the selection of fuzzy model, including one or more of: the number of input and/or output variables; the type of fuzzy inference model (e.g., Mamdani, Sugeno, Tsukamoto, etc.); and the preliminary type of membership functions.
In one embodiment, a Genetic Algorithm (GA) is used to optimize linguistic variable parameters and the input-output training patterns. In one embodiment, a GA is used to optimize the rule base, using the fuzzy model, optimal linguistic variable parameters, and a teaching signal.
One embodiment, includes optimization of the FIS structure by using a GA with a fitness function based on a response of a model of motorcycle and rider system.
One embodiment, includes optimization of the FIS structure by a GA with a fitness function based on a response of the actual motorcycle/rider system.
The result is a specification of an FIS structure that specifies parameters of the optimal FC according to desired requirements.
The above and other aspects, features, and advantages of the present invention will be more apparent from the following description thereof presented in connection with the following drawings.
FIGS. 8A-B show tire modeling using a JARI tire, including tire data (A), and tire model (B).
FIGS. 15A-B show geometrical parameters of a rider model and course, including reference roll angle (A), and length of reference and deviation (B).
FIGS. 17A-G show examples of the data during fitness function evaluation simulation.
FIGS. 18A-C show example results of the optimized parameters for different initial conditions, including Kp1 (A), Kp2 (B), and Kd2 (C).
FIGS. 22A-B show the map of the actual test course and simulated course.
FIGS. 23A-F show the results of the simulation with the fuzzy controller (without excitation).
FIGS. 24A-E show the results of the simulation with fuzzy controller (with excitation).
FIGS. 25A-D show simulation results with different transport delay.
Using a set of inputs, and a fitness function in block 104, the GA in block 105 works in a manner similar to an evolutionary process to arrive at a solution, which is, hopefully, optimal. The GA in block 105 generates sets of “chromosomes” (that is, possible solutions) and then sorts the chromosomes by evaluating each solution using the fitness function in block 104. The fitness function in block 104 determines where each solution ranks on a fitness scale. Chromosomes (solutions), which are more fit, are those, which correspond to solutions that rate high on the fitness scale. Chromosomes, which are less fit, are those, which correspond to solutions that rate low on the fitness scale.
Chromosomes that are more fit are kept (survive) and chromosomes that are less fit are discarded (die). New chromosomes are created to replace the discarded chromosomes. The new chromosomes are created by crossing pieces of existing chromosomes and by introducing mutations.
The motorcycle/rider model 102 is controlled by a linear P(D) controller 101. In one embodiment, the controller 100 uses both a PD controller 1012 and a P controller 1011 to control different aspects of the motorcycle system. The P(D) controller 101 has a linear transfer function and thus is based upon a linearized equation of motion for the control object in block 102. Prior art GAs used to program P(D) controllers typically use simple fitness function and thus do not solve the problem of poor controllability typically seen in linearization models. As is the case with most optimizers, the success or failure of the optimization often ultimately depends on the selection of the performance (fitness) function.
Evaluating the motion characteristics of a nonlinear plant is often difficult, in part due to the lack of a general analysis method. Conventionally, when controlling a plant with nonlinear motion characteristics, it is common to find certain equilibrium points of the plant and the motion characteristics of the plant are linearized in a vicinity near an equilibrium point. Control is then based on evaluating the pseudo (linearized) motion characteristics near the equilibrium point.
Computation of optimal control based on soft computing includes the GA in block 105 as the first step of global search for optimal solution on a fixed space of solutions. The GA searches for a set of control weights for the plant. Firstly the weight vector K={k1, . . . , kn} is used by a conventional P(D) controller in block 101 in the generation of a signal δ(K) which is applied to the plant. The entropy S(δ(K)) associated with the behavior of the plant on this signal is assumed as a fitness function to be minimized. The GA is repeated several times with regular time intervals in order to produce a set of weight vectors. The vectors generated by the GA in block 105 are then provided to a FNN and the output of the FNN to a fuzzy controller in block 109. The output of the fuzzy controller in block 109 is a collection of gain schedules for the linear controllers in block 101 that control the motorcycle 102.
So in summary, designing the intelligent control system includes two stages. Stage 1 involves finding a teaching signal (also referred to as teaching patterns). Stage 2 involves approximation of optimal control.
Finding teaching patterns (input-output pairs) of optimal control by using the GA are aspects of the SSCQ 242, based on the mathematical model of the controlled motorcycle and a physical criteria of minimum of entropy production rate.
Approximation of the optimal control (from Stage 1) by the corresponding Fuzzy Controller (FC). This FC is referred to as the optimal Fuzzy Controller.
The first stage is the acquisition of a robust teaching signal of optimal control without the loss of information. The output of first stage is the robust teaching signal, which contains information about the controlled object behavior and corresponding behavior of the control system.
The second stage is the approximation of the teaching signal by building of a fuzzy inference system. The output of the second stage is the knowledge base (KB) 108 for the FC 109.
The design of the optimal KB 108 includes specifying the optimal numbers of input-output membership functions, their optimal shapes and parameters, and a set of optimal fuzzy rules.
In one embodiment for the Stage 2 realization, the optimal FC 109 is obtained using a FNN with the learning method based on the error back-propagation algorithm. The error back-propagation algorithm is based on the application of the gradient descent method to the structure of the FNN. The error is calculated as a difference between the desired output of the FNN and an actual output of the FNN. Then the error is “back propagated” through the layers of the FNN, and parameters of each neuron of each layer are modified towards the direction of the minimum of the propagated error.
However, back-propagation algorithm has a few disadvantages. In order to apply back-propagation approach it is necessary to know the complete structure of the FNN prior to the training optimization. The back-propagation algorithm cannot be applied to a network with an unknown number of layers or an unknown number nodes. The back-propagation process cannot automatically modify the types of the membership functions. Usually, the initial state of the coefficients for back-propagation algorithm is set up randomly, and as a result, the back-propagation algorithm often finds only a “local” optimum close to the initial state.
In spite of the above disadvantages, the error back-propagation algorithm is commonly used in practice. For example, the Adaptive Fuzzy Modeler (AFM) provided by STMicroelectronics Inc. creates Sugeno 0 order fuzzy inference systems using the error back-propagation algorithm.
The algorithm used in the AFM is based on the following two steps. In the first step, a user specifies the parameters of a future FNN such as the numbers of inputs and outputs and the number of fuzzy sets for each input/output. The AFM “optimizes” the rule base, using a so-called “let the best rule win” (LBRW) technique. During this phase, the membership functions are fixed as uniformly distributed among the universe of discourse, and AFM calculates the firing strength of the each rule, eliminating the rules with zero firing strength, and adjusting centers of the consequents of the rules with nonzero firing strength. It is possible during optimization of the rule base specify the learning rate parameter, depending on the current problem. In AFM there is also an option to build the rule base manually. In this case, user can specify the centroids of the input fuzzy sets, and then according to the specification, the system builds the rule base automatically.
In the second step, the AFM builds the membership functions. The user can specify the shape factors of the input membership functions. Shape factors supported by AFM are: Gaussian, Isosceles Triangular, and Scalene Triangular. The user must also specify the type of fuzzy operation in Sugeno model: supported methods are Product and Minimum.
After specifying the membership function shape and Sugeno inference method, the AFM starts optimization of the membership function shapes, using the structure of the rules, developed during Step 1. There are also some optional parameters to control optimization rate such as a target error and the number of iterations, the network should make. The termination condition on the optimization is reaching of the number of iterations, or when the error reaches its target value.
AFM inherits the weakness of the back-propagation algorithm described above, and the same limitations. The user must specify types of membership functions, number of membership functions for each linguistic variable and so on. The rule number optimizer in the AFM is called before membership functions optimization, and as a result the system often becomes unstable during membership function optimization phase.
However, some of the weakness of system such as the AFM can be ameliorated by optimizing the structure of the KB before training the KB.
In
In one embodiment, the models describe the stability of the MC during a straight line run. The model descriptions of the MC in this approache is provided by conventional straight-line modeling techniques. Such straight-line models typically do not include a steering model but do typically inlcude a passive rider model (e.g., a hands on and hands off model).
In one embodiment, the model is similar to a model constructed using the propular DADS modeling program from LMS International. In this model, the forward velocity is fixed. The rider steering models structure is similar to the fuzzy controller model, but the parameters of the rider model use fixed values which can be selected by trial and error.
In one embodiment, the MC model is constructed using DADS, with a rider steering model based on a look-forward model. The parameters are fixed for each course. Lane change simulation and sine course simulation are shown.
In one embodiment, the control behaviour of motorcycle and rider is described. The motorcycle model of the simulation is substantially simialr to the model described above. The rider model is a look-forward model. The parameters were fixec for each course. Lane change simulation is shown.
In one embodiment, various driving maneuvres such as cornering and double lane change with a driver control algorithm are used with a motorcycle model using the ADAMS program available from MSC Software Corporation. The driver control model has two parts: a velocity control model and a steering control model. In this steering control model, the desired camber angle is estimated and depends on the driving maneuvre. The parameters for the controller can be fixed.
In one embodiment, the stability control of a motorcycle/rider system based on fuzzy control in conjunction with a GA and an auto-tuning method is used. The model used in simulation need not be a true motorcycle model. For example, an inverted pendulum hinged to a rotating disk can be used as a representative model of the motorcycle.
One embodiment provides an autonomous two-wheeled vehicle and simulation results. The rider model can be divided into two parts: standing control and directional control. The control algorithm of standing stability is based on feedback control with gain parameters that depend on velocity. Directional control is the target roll angle, which can be determined by predicted course error. In one embodiment a spring-damper is connected between the steering bar and the actuator for steering to stabilize the motorcycle (which makes the control method relatively more complex).
The effect on the perception of riding comfort issue for changing mass center position, total weight on the MC, the wheelbase, the front fork rake angle and the front wheel trail distance of the MC is discussed. The tire model is described in connectin with
Table 1 shows the model notations and parameter definitions.
The MC plant model includes:
In the present disclosure, results from a MC simulation model are compared with results from an actual demonstration model. The differences between the MC model developed and the demonstration model are:
As mentioned above, blocks 3020 and 3021 represented the linear tire model. Tire properties are an important determinant of MC maneuverability and stability, and tire models are thus important to behavior simulations employing a mechanical analysis.
θ=−arc tan(xr/yr) (5-1)
γ=arc sin(zr/{square root}{square root over ((xr2+yr2+zr2))}) (5-2)
vxt=vx cos θ+vy sin θ (5-3)
vyt=−vx sin θ+vy cos θ (5-4)
vzt=vz (5-5)
te=h/cos γ (5-6)
κ=−(vxt−te·ωs)/vxt (5-7)
α=vyt/vxt (5-8)
FZct=(K(tr−te)−Dte)(1+dFz) (5-9)
FXct=CtκKZct (5-10)
FYct 0=(Cy1α+Cy3γ)(1+dFy) (5-11)
TZct 0=(Cz1α+Cz3γ)(1+dTz) (5-12)
TXct 0=Cx1α+Cx3γ(1+dTx) (5-13)
Cy1=Cy11FZct 0+Cy12 (5-14)
Cy3=Cy31FZct 0+Cy32 (5-15)
Cz3=Cz31FZct 0+Cz32 (5-17)
Cx1=Cx11FZct 0+Cx12 (5-18)
Cx3=Cx31FZct 0+Cx32 (5-19)
σ=σ1FZct+σ2 (5-20)
Mroll=TZct sin γ−FXct·te (5-24)
FX=FXct cos θ−FYct sin θ (5-25)
FY=Xct sin θ+FYct cos θ (5-26)
FZ=FZct (5-27)
TXt=TXct+FYct·te cos γ+FZct·te sin γ (5-28)
Tyt=−TZct cos γ sin γ (5-29)
TX=TXt cos θ−TYt sin θ (5-30)
TY=TXt sin θ+TYt cos θ (5-31)
TZ=TZct cos2 γ (5-32)
Inputs for the tire model in block 6001 are tire spin velocity in-block 6002 and the data of tire axis in block 6003. The data of the tire axis in block 6003 contain the height h of tire center and vector of tire axis (xr,yr,zr) and velocity vector of tire center (vx,vy,vz). From these data, tire yaw angle, camber angle, velocity vector of tire center in tire force coordinate, tire effective radius, rolling slip, and lateral slip are calculated by Eqs (5-1)-(5-8) (see
Static tire forces and moments at contact point in tire force coordinate are calculated by Eqs (5-9)-(5-20). Noise signals in block 6004 can be added to the tire model during these calculations. Output data from the tire model 6001 include: vertical force, driving force, static side force, static self aligning torque, static overturning torque at the contact point, and relaxation length. Conversion from static force and moments to dynamic moments is provided by Eqs (5-21)˜(5-23).
The rolling moment in block 6005 for tire can be split by Eq. (5-24). The conversion from forces and moments at contact point to that at the shaft of tires in global coordinate system in block 6006 is provided by Eqs (5-25)-(5-32).
The tire data for a desired tire can be measured or obtained, for example, from organizations such as the Japan Automobile Research Institute (JARI). In one embodiment, tires of the same specification can be used for the front and rear.
In one embodiment, input data from a JARI tire model are vertical force, camber angle, and slip angle. Output data are side force, self aligning torque, overturning torque, and relaxation length.
The model of the MC in SimMechanics is a complicated numerical simulation model that predicts the operation of the motorcycle system. In one embodiment, Eigenvalue analysis is used in connection with the numerical model to extract and explore various characteristics of the MC model produced by the simulation.
For eigenvalue analysis, linearization of the model in the straight balanced running model can be used. The model has 12 degrees of freedom and adding differentiation to those 12 degrees, gives are 24 degrees of freedom. Moreover, there are six degrees of freedom that originated in the feedback model of the relaxation length used in order to take the dynamic character of a tire into consideration. As a result of linearization of the model, a 30×30 matrix representation of the system is obtained, correspdingly, 30 eigenvalues and 30 eigenvectors are calculated. The characteristics of the motion of the model are determined by a relatively few modes among the 30 modes. The MC weave modes and wobble modes can be unstable, and the corredponding eigenvalues and eigenvectors are relatively large.
The results of simulation by the rider models were both stable. Robustness of the controllers was confirmed by simulation taking into acount the transmission delay of the response of actuator and noises in tire forces (as described below).
In one embodiment, Stage 2 (defining the structure of the KB) is realized using a new structure based on Soft Computing (SC) techniques. The structure of the intelligent control system is based on the SC optimizer shown in
The SC optimizer generates a KB of Fuzzy Inference System (FIS) from the digital in-out data. The SC optimizer provides GA based FNN learning, including rule extraction and KB optimization. In one embodiment, the SC optimizer can use as a teaching signal both pattern file and the model (control object) output.
In Stage 1, the user selects a fuzzy model by selection one of parameters such as, for example, the number of input and output variables, the type of fuzzy inference model (Mamdani, Sugeno, Tsukamoto, etc.), source of the teaching signal.
In Stage 2, a first GA (GA1) optimizes linguistic variable parameters, using the information obtained in Stage 1 about the general system configuration, and the input-output training patterns, obtained from the training signal as an input-output tables.
In Stage 3 a precedent part of the rule base is created and rules are ranked according to their firing strength. Rules with high firing strength are kept, whereas weak rules with small firing strength are eliminated.
In Stage 4, a second GA (GA2) optimizes a rule base, using the fuzzy model obtained in Stage 1, optimal linguistic variable parameters obtained in Stage 2, selected set of rules obtained in Stage 3 and the teaching signal.
In Stage 5, the structure of FNN is further optimized. In order to reach the optimal structure, the classical derivative-based optimization procedures can be used, with a combination of initial conditions for back propagation, obtained from previous optimization stages. The result of Stage 5 is a specification of fuzzy inference structure that is optimal for the plant 120. Stage 5 is optional and can be bypassed. If Stage 5 is bypassed, then the FIS structure obtained with the GAs of Stages 2 and 4 is used.
In one embodiment the teaching signal, representing one or more input signals and one or more output signals, is divided into input and output parts. Each of the parts is divided into one or more signals. Thus, in each time point of the teaching signal there is a correspondence between the input and output parts.
Each component of the teaching signal (input or output) is assigned to a corresponding linguistic variable, in order to explain the signal characteristics using linguistic terms. Each linguistic variable is described by some unknown number of membership functions, like “Large”, “Medium”, “Small”, etc.
“Vertical relations” represent the explicitness of the linguistic representation of the concrete signal, e.g. how the membership functions is related to the concrete linguistic variable. Increasing the number of vertical relations will increase the number of membership functions, and as a result will increase the correspondence between possible states of the original signal, and its linguistic representation. An infinite number of vertical relations would provide an exact correspondence between signal and its linguistic representation, because to each possible value of the signal would be assigned a membership function, but in this case the situations as “over learning” may occur. Smaller number of vertical relations will increase the robustness, since some small variations of the signal will not affect much the linguistic representation. The balance between robustness and precision is a very important moment in design of the intelligent systems, and usually this task is solved by Human expert.
“Horizontal relations” represent the relationships between different linguistic variables. Selected horizontal relations can be used to form components of the linguistic rules.
To define the “horizontal” and “vertical” relations mathematically, consider a teaching signal:
[x(t),y(t)],
Where:
Define the linguistic variables for each of the components. A linguistic variable is usually defined as a quintuple: (x,T(x),U,G,M), where x is the name of the variable, T(x) is a term set of the x, that is the set of the names of the linguistic values of x, with a fuzzy set defined in U as a value, G is a syntax rule for the generation of the names of the values of the x and M is a semantic rule for the association of each value with its meaning. In the present case, x is associated with the signal name from x or y, term set τ(x) is defined using vertical relations, U is a signal range. In some cases one can use normalized teaching signals, then the range of U is [0,1]. The syntax rule G in the linguistic variable optimization can be omitted, and replaced by indexing of the corresponding variables and their fuzzy sets.
Semantic rule M varies depending on the structure of the FIS, and on the choice of the fuzzy model. For the representation of all signals in the system, it is necessary to define m+n linguistic variables:
Let [X,Y], X=(X1, . . . , Xm), Y=(Y1, . . . , Yn) be the set of the linguistic variables associated with the input and output signals correspondingly. Then for each linguistic variable one can define a certain number of fuzzy sets to represent the variable:
Where
Usually, at this stage of the definition of the KB, the parameters of the fuzzy sets are unknown, and it may be difficult to judge how many membership functions are necessary to describe a signal. In this case, the number of membership functions (power of term set), lX
Knowing the number of membership functions, it is possible to introduce a constraint on the possibility of activation of each fuzzy set, denoted as pX
One of the possible constraints can be introduced as:
This constraint will cluster the signal into the regions with equal probability, which is equal to division of the signal's histogram into curvilinear trapezoids of the same surface area. Supports of the fuzzy sets in this case are equal or greater to the base of the corresponding trapezoid. How much greater the support of the fuzzy set should be, can be defined from an overlap parameter. For example, the overlap parameter takes zero, when there is no overlap between two attached trapezoids. If it is greater than zero then there is some overlap. The areas with higher probability will have in this case “sharper” membership functions. Thus, the overlap parameter is another candidate for the GA1 search. The fuzzy sets obtained in this case will have uniform possibility of activation.
Modal values of the fuzzy sets can be selected as points of the highest possibility, if the membership function has unsymmetrical shape, and as a middle of the corresponding trapezoid base in the case of symmetric shape. Thus one can set the type of the membership functions for each signal as a third parameter for the GA1.
The relation between the possibility of the fuzzy set and its membership function shape can also be found. The possibility of activation of each membership function is calculated as follows:
Mutual possibility of activation of different membership functions can be defined from a geometrical view point as:
where * denotes selected T-norm (Fuzzy AND) operation;
In fuzzy logic literature, T-norm, denoted as * is a two-place function from [0,1]×[0,1] to [0,1]. It represents a fuzzy intersection operation and can be interpreted as minimum operation, or algebraic product, or bounded product or drastic product. S-conorm, denoted by {dot over (+)}, is a two-place function, from [0,1]×[0,1] to [0,1]. It represents a fuzzy union operation and can be interpreted as algebraic sum, or bounded sum and drastic sum. Typical T-norm and S-conorm operators are presented in Table 3.
If i=k, and j≠1, then equation (6.2) defines “vertical relations”; and if i≠k, then equation (6.2) defines “horizontal relations”. The measure of the “vertical” and of the “horizontal” relations is a mutual possibility of the occurrence of the membership functions, connected to the correspondent relation.
The set of the linguistic variables is considered as optimal, when the total measure of “horizontal relations” is maximized, subject to the minimum of the “vertical relations”.
Hence, one can define a fitness function for the GA1 which will optimize the number and shape of membership functions as a maximum of the quantity, defined by equation (6.2), with minimum of the quantity, defined by equation (6.1).
The chromosomes of the GA1 for optimization of linguistic variables according to Equations (6.1) and (6.2) have the following structure:
Where:
TX(Y)
Another approach to the fitness function calculation is based on the Shannon information entropy. In this case instead of the equations (6.1) and (6.2), for the fitness function representation one can use the following information quantity taken from the analogy with information theory:
In this case, GA1 will maximize the quantity of mutual information (6.2a), subject to the minimum of the information about each signal (6.1a). In one embodiment the combination of information and probabilistic approach can also be used.
In case of the optimization of number and shapes of membership functions in Sugeno—type FIS, it is enough to include into GA chromosomes only the input linguistic variables. The detailed fitness functions for the different types of fuzzy models will be presented in the following sections, since it is more related with the optimization of the structure of the rules.
In one embodiment, a rules pre-selection algorithm selects the number of optimal rules and their premise structure prior optimization of the consequent part. Consider the structure of the first fuzzy rule of the rule base
R1(t)=IF x1(t) is μ11(x1) AND xl
THEN
y1(t) is μm+1{l
Where:
Consider the antecedent part of the rule:
RIN1(t)=IF x1(t) is μ11(x1) AND xl
The firing strength of the rule R1 in the moment t is calculated as follows:
Rfs1(t)=min[μ11(x1(t)), μ2(x2(t)), . . . , μm1(xm(t))]
for the case of the min-max fuzzy inference, and as
Rfs1(t)=π[μ11(x1(t)), μ21(x2(t)), . . . , μm(xm(t))]
for the case of product-max fuzzy inference.
In general case, here can be used any of the T-norm operations.
The total firing strength Rfs1 of the rule, the quantity Rfs1(t) can be calculated as follows:
for a continuous case, and:
for a discrete case.
In a similar manner the firing strength of each s-th rule is calculated as:
where
is a linear rule index
In one embodiment the local firing strength of the rule can be calculated in this case instead of integration, the maximum operation is taken in equation (6.3):
In this case, the total strength of all rules will be:
where:
Number of rules in complete rule base
Quantity Rfs is important since it shows in a single value the integral characteristic of the rule base. This value can be used as a fitness function which optimizes the shape parameters of the membership functions of the input linguistic variables, and its maximum guaranties that antecedent part of the KB describes well the mutual behavior of the input signals. Note that this quantity coincides with the “horizontal relations,” introduced in the previous section, thus it is optimized automatically by GA1.
Alternatively, if the structure of the input membership functions is already fixed, the quantities Rfss can be used for selection of the certain number of fuzzy rules. Many hardware implementations of FCs have limits that constrain, in one embodiment, the total possible number of rules. In this case, knowing the hardware limit L of a certain hardware implementation of the FC, the algorithm can select L≦L0 of rules according to a descending order of the quantities Rfss. Rules with zero firing strength can be omitted.
It is generally advantageous to calculate the history of membership functions activation prior to the calculation of the rule firing strength, since the same fuzzy sets are participating in different rules. In order to reduce the total computational complexity, the membership function calculation is called in the moment t only if its argument x(t) is within its support. For Gaussian-type membership functions, support can be taken as the square root of the variance value σ2.
In one embodiment, a rule pre-selection algorithm is based on a firing strength of the rules. The threshold level can be selected based on the maximum number of rules desired, based on user inputs, based on statistical data and/or based on other considerations. Rules with relatively high firing strength will be kept, and the remaining rules are eliminated. Rules with zero firing strength can be eliminated by default. In one embodiment, the presence of the rules with zero firing strength may indicate the explicitness of the linguistic variables (linguistic variables contain too many membership functions). The total number of the rules with zero firing strength can be reduced during membership functions construction of the input variables. This minimization is equal to the minimization of the “vertical relations.”
This algorithm produces an optimal configuration of the antecedent part of the rules prior to the optimization of the rules. Optimization of the consequential part of KB can be applied directly to the optimal rules only, without unnecessary calculations of the “un-optimal rules”. This process can also be used to define a search space for the GA (GA2), which finds the output (consequential) part of the rule.
A chromosome for the GA2 which specifies the structure of the output part of the rules can be defined as:
[I1, . . . , IM], Ii=[I1, . . . , In], Ik={1, . . . , lY
where:
In one embodiment the history of the activation of the rules can be associated with the history of the activations of membership functions of output variables or with some intervals of the output signal in the Sugeno fuzzy inference case. Thus, it is possible to define which output membership functions can possibly be activated by the certain rule. This allows reduction of the alphabet for the indexes of the output variable membership functions from {{1, . . . , lY
{lminY
Thus the total search space of the GA is reduced. In cases where only one output membership function is activated by some rule, such a rule can be defined automatically, without GA2 optimization.
In one embodiment in case of Sugeno 0 order FIS, instead of indexes of output membership functions, corresponding intervals of the output signals can be taken as a search space.
For some combinations of the input-output pairs of the teaching signal, the same rules and the same membership functions are activated. Such combinations are uninteresting from the rule optimization view point, and hence can be removed from the teaching signal, reducing the number of input-output pairs, and as a result total number of calculations. The total number of points in the teaching signal (t) in this case will be equal to the number of rules plus the number of conflicting points (points when the same inputs result in different output values).
The previous section described optimization of the FIS, without the details into the type of FIS selection. In one embodiment, the fitness function used in the GA2 depends, at least in part, on the type of the optimized FIS. Examples of fitness functions for the Mamdani, Sugeno and/or Tsukamoto FIS models are described herein. One of ordinary skill in the art will recognize that other fuzzy models can be used as well.
Define error Ep as a difference between the output part of teaching signal and the FIS output as:
where x1p, x2p, . . . , xnp and dp are values of input and output variables in the p training pair, respectively. The function F(x1p, x2p, . . . , xnp) is defined according to the chosen FIS model.
For the Mamdani model, the function F(x1p, x2p, . . . , xnp) is defined as:
where
is the point of maximum value (called also as a central value) of μyl(y), π denotes the selected T-norm operation.
Typical rules in the Sugeno fuzzy model can be expressed as follows:
IF x1 is μ(l)j
where l=1,2, . . . , M—the number of fuzzy rules M defined as {number of membership functions of x1 input variable}×{number of membership functions of x2 input variable}× . . . ×{number of membership functions of xn input variable}.
The output of Sugeno FIS is calculated as follows:
Typical rules in the first-order Sugeno fuzzy model can be expressed as follows:
IF x1 is μ(l)j
(Output variables described by some polynomial functions.)
The output of Sugeno FIS is calculated according equation (6.6).
Typical rules in the zero-order Sugeno FIS can be expressed as follows:
IF x1 is μ(l)j
The output of zero-order Sugeno FIS is calculated as follows
The typical rule in the Tsukamoto FIS is:
IF x1 is μ(l)j
The output of the Tsukamoto FIS is calculated as follows:
Stage 4 described above generates a KB with required robustness and performance for many practical control system design applications. If performance of the KB generated in Stage 4 is, for some reasons, insufficient, then the KB refinement algorithm of Stage 5 can be applied.
In one embodiment, the Stage 5 refinement process of the KB structure is realized as another GA (GA3), with the search space from the parameters of the linguistic variables. In one embodiment the chromosome of GA3 can have the following structure:
{[Δ1,Δ2,Δ3]}L; Δiε[−prmij,1−prmij]; i=1,2,3; j=1,2, . . . , L,
where L is the total number of the membership functions in the system
In this case the quantities Ai are modifiers of the parameters of the corresponding fuzzy set, and the GA3 finds these modifiers according to the fitness function as a minimum of the fuzzy inference error. In such an embodiment, the refined KB has the parameters of the membership functions obtained from the original KB parameters by adding the modifiers prmnewi=prmi+Δi.
Different fuzzy membership function can have the same number of parameters, for example Gaussian membership functions have two parameters, as a modal value and variance. Iso-scalene triangular membership functions also have two parameters. In this case, it is advantageous to introduce classification of the membership functions regarding the number of parameters, and to introduce to GA3 the possibility to modify not only parameters of the membership functions, but also the type of the membership functions, form the same class.
GA3 improves fuzzy inference quality in terms of the approximation error, but may cause over learning, making the KB too sensitive to the input. In one embodiment a fitness function for rule base optimization is used. In one embodiment, an information-based fitness function is used. In another embodiment the fitness function used for membership function optimization in GA1 is used. To reduce the search space, the refinement algorithm can be applied only to some selected parameters of the KB. In one embodiment refinement algorithm can be applied to selected linguistic variables only.
The structure realizing evaluation procedure of GA2 or GA3 is shown in
In one embodiment evaluation function calculation block 12104 calculates approximation error as a weighted sum of the outputs of the adder 12103.
In one embodiment evaluation function calculation block 12104 calculates the information entropy of the normalized approximation error.
In one embodiment of Stages 4 and 5 the fitness function of GA can be represented as some external function Fitness=ƒ(KB), which accepts as a parameter the KB and as output provides KB performance. In one embodiment, the function ƒ includes the model of an actual plant controlled by the system with FC. In this embodiment, the plant model in addition to plant dynamics provides for the evaluation function.
In one embodiment function ƒ might be an actual plant controlled by an adaptive LINEAR controller with coefficient gains scheduled by FC and measurement system provides as an output some performance index of the KB.
In one embodiment the output of the plant provides data for calculation of the entropy production rate of the plant and of the control system while the plant is controlled by the FC with the structure from the KB.
In one embodiment, the evaluation function is not necessarily related to the mechanical characteristics of the motion of the plant (such as, for example, in one embodiment control error) but it may reflect requirements from the other viewpoints such as, for example, entropy produced by the system, or harshness and or bad feelings of the operator expressed in terms of the frequency characteristics of the plant dynamic motion and so on.
In one embodiment, the evaluation function calculation block 12307 forms evaluation function as a minimum of the entropy production rate of the plant 12303 and of the linear controller 12302.
In one embodiment, the evaluation function calculation block 12307 applies Fast Fourier Transformation on one or more outputs of the measurement system 12305, to extract one or more frequency characteristics of the plant output for the evaluation.
In one embodiment, the KB evaluation system based on plant dynamics 12300 uses a nonlinear model of the plant 12303. In one embodiment, the KB evaluation system based on plant dynamics 12300 is realized as an actual plant with one or more parameters controlled by the adaptive linear controller 12302 with control gains scheduled by the FC 12301. In one embodiment plant 12303 is a stable plant. In one embodiment plant 12303 is an unstable plant. The output of the SC optimizer 12201 is an optimal KB 12202.
In
In stage 1 (13100), several combinations of reference velocities and roll angles are set, which are also used as initial velocities and roll angles. The plant model of motorcycle 13101 (as shown in
Optimized parameters are stored in the KB 13002. Data for the KB 13002 are transformed into fuzzy rule form for the KB 13003 by the SCO 13001. The same plant model of MC 13201 and PD controller for steering 13203 and P controller for driving 13204 are embedded into the structure of Stage 2 (13200). The calculation for the controllers 13203, 13204 is based on equations (7-1)-(7-2). In this stage, the gain parameters for the PD controller for steering 13203 and P controller for driving 13204 are provided by the FC 13206 using the KB of the fuzzy rule 13003. Input data for the P controller for driving 13204 is the difference between forward velocity and reference velocity. Input data for the PD controller for steering 13203 are the difference between roll angle and reference roll angle, which is calculated by φref calculator 13207. Input data for the calculator 13207 are LR 13208, course data 13212 and position and yaw of the plant model of the MC 13201. The calculation is based on equations (7-3)-(7-5).
FF=(v−vref)2×0.2+(φ−φref)2+{dot over (φ)}2+τd2×0.0001+τs2×0.0005 (7-6)
In Stage 1 (14100), several reference velocities are set. The reference velocities are also used as initial velocities. Several radius of circle course 14112 and several LR 14108 are used. As combination of several reference velocities and several radius of circle course 14112 and several LR 14108, many cases of simulation must be executed. The plant model of the motorcycle 14101, the PD controller for steering 14103, and the P controller for driving 14104 are embedded into the structure of Stage 1 (14100). The calculation for controllers 14103, 14104 is based on equation (7-1)-(7-2). The P gain parameter for PD controller for steering 14103 and P controller for driving 14104 are fixed. The D parameter for PD controller for steering 14103 are provided by a GA 14102. The GA 14102 feeds the value of φcol 14109 and τhold 14110. φcol 14109 is used as input for φref calc. 14107. Other input data of the calculator 14107 are LR 14108 and course data (a circular course is used here) 14112 and position and yaw of the plant model of the motorcycle 14101. The calculation 14107 is based on equations (7-7)-(7-111). The value τhold 14110 is added to the output of the PD controller for steering 14103. By using the GA 14102, the optimization of the parameters is executed through the evaluation of the value of the Fitness Function 14105 for each desired condition. The calculation of Fitness Function 14105 is based on equation (7-12). Optimized parameters of φcol 14109 and τhold 14110 are stored in the KB 14001.
The data of KB 14001 are used in the Look up table 14211 in Stage 2 (14200). The Look up table 14211 brings optimized φcol 14209 and τhold 14210 according to LR 14208 and reference roll angle calculated by φref calc. 14107 and forward velocity of the plant model of the motorcycle 14201. In stage 2 (14200), several reference velocities are set, which are also used as initial velocities. The plant model of the motorcycle 14201, the PD controller for steering 14203, and the P controller for driving 14204 are embedded into the structure of Stage 2 (14200). The calculation for controllers 14203, 14204 is based on equations (7-1)-(7-2). The gain parameters for P controller for driving 14204 are fixed. In this stage, the gain parameters for the PD controller for steering 14203 are provided by a GA 14202. The LR 14208 is also provided by the GA 14202. The LR 14208, course data (lane change course which is shown in
The data of the KB 14002 are used in the Look-up table 14311 in Stage 3 (14300). The Look-up table 14311 brings optimized φcol 14309 and τhold 14310 and the gain parameters for the PD controller for steering 14303 and LR 14308 according to reference roll angle calculated by φref calc 14107 and forward velocity of the plant model of motorcycle 14301. The plant model of the motorcycle 14301, the PD controller for steering 14303, and the P controller for driving 14304 are embedded into the structure of Stage 3 (14300). The calculation for controllers 14303, 14304 is based on equations (7-1)-(7-2).
The gain parameters for the P controller for driving 14304 are fixed. In this stage, the gain parameters for the PD controller for steering 14303 are provided by the Look-up table 14311 as mentioned above. The LR 14308, arbitrary course data 14312, and the position and yaw of the plant model of the motorcycle 14301 and optimized φcol 14309 are used as inputs for φref calc 14307. The calculation 14307 is based on equation (7-7)-(7-11). The value τhold 14310 is added to the output of the PD controller for steering 14303.
The optimized KB defines the optimal fuzzy control sytem to realize a robust rider model, which can drive the motorcycle (plant model) passing through an arbitrary course trace with arbitrary velocity without fall down, and within the desired control error tolerance and control quality.
In one embodiment, the rider model presented is a combination model of look-forward a model and an ideal roll control model. To calculate steering torque, using deviation at length of reference is from look-forward model and using roll rate is from ideal roll control model (see
The equations for controller torque are:
τd=−Kp1(v−vref) (9-1)
τs=−KP2(φ−φref)−Kd2φ (9-2)
The equations for reference roll angle are:
The equations for steer torque and body movement controller are:
τs=Kφsφ+Kysy (9-6)
τ1=Kττs (9-7)
τ2=Kφ2φ+Ky2y (9-8)
The reference roll angle is given by course radius:
τd=Kp1(vref−v) (9-9)
τs=Kp(φref−φ)+Kl∫(φref−φ)dt+KD(φref−φ) (9-10)
To obtain the teaching signal, the Soft Computing Optimizer uses a program mexGA, a MATLAB program script.m a MATLAB program fitness.m and the MC model. The structure is shown in
As a next step, the SC optimizer computes the optimum structure of the KB for the fuzzy controller. The input for the SC optimizer is the teaching signal. The membership functions for the KB are set to make the input data of fuzzy operation from the input data of the fuzzy controller, such as velocity and roll angle. The SC optimizer determines functions and makes fuzzy rules and optimizes them by the teaching signals using GA.
In
The test course assigned here and the simulation are shown in
FIGS. 23B-E show the resulting data of simulation and corresponding measured data. At the 10 meter J-turn R10 in the second circle (in time scale 70 sec), the simulation data vibrates strongly compared to experiment data. The reason lies in the torque of the front tire around the steering axis. When it is about to go into a regular circle, the calculated control torque approaches 0. If the torque of the front tire around the steering axis is 0, the regular circle revolution would be kept. But the torque is not 0, so the vibration is provoked.
To evaluate the robustness of the controller, a simulation with disturbance in tire load was carried out as shown in FIGS. 24A-E. The effect is relatively small as the frequency of the weave mode, which is the dominant mode of MC at researched velocity range, is about 0.5 Hz. So the high frequency noise effect is small. If the velocity range was different and the high frequency modes were dominant, the influence of the tire noise would be more important.
The other tests for the robustness was simulations assuming the transport delay of the actuator. As shown in FIGS. 25A-D, until 0.04 sec of delay is introduced, the result did not change much. However, when assuming a 0.05 sec delay, the vibration of the MC diverged and the simulation became unstable.
In optimization of control of a motorcycle, stabilizing roll angle goes together with steering the desired course (see
Accordingly, a circular course was used for the simulation and the circular course was run while computing a reference roll angle, and optimization of the parameter by the SC optimizer was used during the simulation (see
In this method velocity control gain was fixed. The equations for controller torque are:
τd=−Kp1(v−vref) (9-12)
τs=−Kp2( −φref)−Kd2φ+τoffset (9-13)
The equations for reference roll angle are:
To construct the feedforward rider model, simulation of the circular course controlled by SC optimizer was done under several conditions. The holding torque and the correction value of the reference roll angle were optimized and the converged roll angle were obtained in each condition. Gain parameters Kp1 and Kp2 were fixed (Kp1=1000, Kp2=80). The gain parameter Kd2 was added to the optimization.
The results of the simulation are shown in
It is difficult to optimize the controllability of transient response by circle course. The lane change simulation (see
Holding torque was computed by interpolation of input data as a function of the computed reference roll angle. (assuming velocity as constant) Correction of reference roll angle was computed by interpolation of input matrix data as function of LR and computed reference roll angle. (assuming velocity as constant).
The feedforward rider model (see
The tests for the robustness in the simulation are provided by assuming the transport delay of the steering actuator. As shown in FIGS. 33A-D, until 0.05 sec of delay is introduced, the control result does not change substantially. Introducing a 0.07 sec delay causes vibration of the MC and instability in the simulation.