Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

Genetic Fuzzy Control for Path-Tracking of an Autonomous Robotic Bicycle* Chih-Keng CHEN** and Thanh-Son DAO*** ** Dept. of Mechanical and Automatic Engineering, Da-Yeh University 112 Shan-Jiau Rd., Changhua, Taiwan 51505 ROC E-mail: [email protected] *** Dept. of Mechanical Engineering, University of Waterloo 200 University Ave West, Waterloo, ON, Canada N2L 3G1 E-mail: [email protected]

Abstract Due to its non-holonomic constraints and a highly unstable nature, the autonomous bicycle is difficult to be controlled for tracking a target path while retaining its balance. As a result of the non-holonomic constraint conditions, the instantaneous velocity of the vehicle is limited to certain directions. Constraints of this kind occur under the no-slip condition. In this study, the problem of optimization of fuzzy logic controllers (FLCs) for path-tracking of an autonomous robotic bicycle using genetic algorithm (GA) is focused. In order to implement path-tracking algorithm, strategies for balancing and tracking a given roll-angle are also addressed. The proposed strategy optimizes FLCs by keeping the rule-table fixed and tuning their membership functions by introducing the scaling factors (SFs) and deforming coefficients (DCs). The numerical simualtions prove the effectiveness of the proposed structure of the genetic fuzzy controller for the developed bicycle system. Key words: Fuzzy System, Motion Control, Genetic Algorithm, Stability, Bicycle

1. Introduction

*Received 5 Feb., 2007 (No. 07-0076) [DOI: 10.1299/jsdd.1.536]

The bicycle is a very common and efficient mean of transportation and is known to be a highly nonlinear system which has interesting non-trivial behaviors. Anyone who has ridden a bicycle has had some practical experience in bicycle stability. Knowledge of bicycle dynamics is of interest to many people. Though controlling a bicycle by human-power is possible for almost everyone, yet dealing with an autonomous bicycle proves to be rather demanding. The challenges in fully understanding bicycle dynamics and control have been attracting considerable attention from a number of researchers in the fields of dynamics, automation and control. To understand the nature of the dynamics and stability of a bicycle, Jones (1970) did a variety of investigations on his bicycle model. He pointed out that, in order to balance a ridden bicycle, an enough centrifugal force should be generated to correct its fall by steering the fork into the direction of the fall. This theory is confirmed by our bicycle riding experience. Control efforts for autonomous bicycles have also been addressed in previous studies by Beznos et al. (1988), Han et al. (2001), Yavin (1999), and Getz et al. (1995). Most previous studies have dealt with simplified mathematical bicycle models, which were subsequently used to implement simulations, analysis and experiments. However, due to their simplicity, the mathematical models were incapable of presenting all of the dynamic motions of the system in certain situations. With that in mind, we approach the problem by modeling the bicycle as an eleven-parameter system in three-dimensional space using

536

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

Lagrange’s equations for quasi-coordinates. The constraint conditions between the two wheels and ground are also considered. This study investigates the dynamics governing a bicycle and then designs controllers for path-tracking problem. With the developed dynamic equations of motion, the FLCs for self-stabilization, roll-angle tracking and path-tracking are designed and their parameters are optimized using a genetic algorithm. FLC optimization using GAs was discussed extensively by a number of researchers such as Lee et al. (2003) for path-tracking of a mobile robot that are used in the micro robot soccer tournament and Lee et al. (2002) for path-following control of autonomous ground vehicles. However, due to a large number of parameters needed to be optimized, their algorithms usually found a well-performed FLC in hundreds or even thousands of generations. In this study, the introduction of the SFs and DCs reduces the learning efforts for GA computation. Moreover, the control strategy proposed in this study solves the difficulty in path-tracking control of an autonomous bicycle while retaining its balance. Implementation of this research draws upon several areas of dynamic systems and control engineering: holonomic and non-holonomic constraints, unstable system analysis, fuzzy controller design, and GA.

2. Problem Formulation In this section, the compact equations of motion with nine degrees of freedom are developed to describe the dynamics of the bicycle. The equations discussed here are developed by Lagrange’s equations for quasi-coordinates. The pure rolling constraints between the ground and the wheels are considered in the dynamic equations of the bicycle system. 2.1. Coordinate Systems The schematic bicycle model is shown in Figure 1. Let the uppercase letters A , B , D and F represent the vehicle body, the rear wheel, the front wheel and the fork, respectively, while the lowercase ones a , b , d , and f are used to designate the center of mass of each part. Reference point c is located between the saddle and the vehicle body; e is a point between the vehicle body and the front fork; o ' and s are the contact points between the ground and the rear and front wheels, respectively. δ

θ

e c Γc i c jc kc A a

b

B

o'

Γo

Γe i e ke

je

F

f

D

d

s

I

o

J

K

Figure 1 Schematic of a bicycle.

There are three SAE-standard coordinate systems used in the bicycle model: (1) an inertial frame Γ o ( I, J, K ) fixed on the ground, (2) a reference frame Γ c ( i c , jc , k c ) mounted on the model at point c , and (3) a frame Γ e ( i e , je , k e ) placed on the front fork at point e . The coordinate Γ e is obtained by rotating about Γ c a rake and a steering angle as shown in Figure 1. In this paper the dynamics of the bicycle is described by the motion of the reference point c . Six coordinate variables are used to signify the positions and orientations of point c . The other three coordinate variables are the steering angle of

537

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

the front fork and the rotating angles of the front and rear wheels. According to the foregoing definitions, the generalized coordinates q ∈ \ 9 can be written as

q = [X where

( X ,Y , Z )

Z ψ

Y

φ θ δ φr φ f ]T ,

(1)

are the position parameters and (ψ , φ ,θ ) are the Euler angles, which

describe the relative position and orientation between the coordinates Γ c and Γ o ; δ ∈ \ is the steering angle; φ f and φr ∈ \ are the rotating angles of the front and rear wheels, respectively. The velocity vector u ∈ \ 9 is

u = vx

vy

vz

T

ω x ω y ω z δ φr φf  ,

(2)

the components of which are quasi-velocities (generalized speeds). 2.2 Dynamics of the Bicycle Model For simplicity, the position vector, the velocity and angular velocity of body M in frame Γ n will be denoted by rMn , v nM and ω nM , respectively.

The total kinetic energy is obtained by summing all the kinetic energy of all the parts 1 T = TA + TB + TF + TD = uT Ju, 2 (3) where J ∈ \ 9×9 is the inertia matrix of the system. The potential energy V ∈ \ has the form

(

where g 3 = [ 0 0 g ]

T

)

V = −gT3 ma rao + mb rbo + m f r fo + md rdo ,

(4)

and rao , rbo , r fo , and rdo are the position vectors of points

a,

b , f and d in frame Γ o . The generalized velocities q are related to the quasi-velocities u by u = Yq , or q = Wu, where Y and W ∈ \

and q = [ X

Y

(5)

9×9

are transform matrices defined by  RT 0 R 0 0  Y =  0 S 0  , W = Y −1 =  0 S −1  0  0 0 I  0  Z ψ φ θ δ φr φf ]T .

0  0 , I 

(6)

Lagrange’s equations for quasi-coordinates (See Baruh (1999)) can be formulated as d  ∂T  ∂T ∂T ∂V (7) + ∆− W+ W = UTnc , dt  ∂u  ∂u ∂q ∂q where U nc ∈ \ 9 are the non-conservative forces. The coefficient matrix ∆ ∈ \ 9×9 is

  ∂u   d ∂u ∂u  − − ∆ = Y W =   W, ∂ q    dt ∂q ∂q 

(8)

∂u  ∂u ∂u  9× 9 = ,..., ∈\ . ∂q  ∂q1 ∂q9  ∂T d  ∂T  = uT J and By the relations, = u T J + uT J , one can rewrite Eq. (7) in the dt  ∂u  ∂u standard form of differential equations as Ju = Q, (9) where

T

 − ∆T Ju + WT  ∂T  − WT where Q = −Ju    ∂q 

T

 ∂V    + U nc .  ∂q 

2.3. Constraint Conditions for Wheels By considering that the front and rear wheels of the bicycle roll without slipping, eight

538

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

constraint equations, including four holonomic and four non-holonomic ones, can be found (See our previous report at Chen et al. (2005)). For the rear wheel, there are two holonomic constraints, which are (10) Z − sin φ ( xb − r sin α r ) + cos φ cos θ ( zb + r cos α r ) = 0, and

cos φ cos θ sin α r − sin φ cos α r = 0;

(11)

and two non-holonomic constraints, which are

vo ' x ( cos ψ cos φ ) + vo ' y ( cosψ sin φ sin θ − sin ψ cos θ ) + vo ' z ( cosψ sin φ cos θ + sin ψ sin θ ) = 0, (12)

and

vo ' x ( sin ψ cos φ ) + vo ' y ( sin ψ sin φ sin θ + cosψ cos θ ) + vo ' z ( sin ψ sin φ cos θ − cosψ sin θ ) = 0;

(13)

where α r ∈ \ is the included angle between R r ∈ \ 3 , the position vector of the contact point o ' relative to the center of mass b of the wheel, and vector k c ∈ \3 as shown in Figure 2; r ∈ \ is the radius of the two wheels. Similarly, for the front wheel, there are also two holonomic constraints formulated by Z − xe sin φ + ze cos φ cos θ + zd ( − sin φ sin ε + cos φ cos θ cos ε ) + xd ( − sin φ cos δ cos ε + cos φ sin θ sin δ − cos φ cos θ cos δ sin ε ) + r sin α f ( − cos φ sin θ sin δ + cos φ cos θ cos δ sin ε + sin φ cos δ cos ε ) + r cos α f ( − sin φ sin ε + cos φ cos θ cos ε ) = 0, (14) and

( cos φ sin θ sin δ − cos φ cosθ cos δ sin ε − sin φ cos δ cos ε ) cos α f + ( cos φ cos θ cos ε − sin φ sin ε ) sin α f = 0;

(15)

and two non-holonomic constraints defined by vsx cosψ cos φ + vsy ( cosψ sin φ sin θ − sinψ cos θ ) + vsz ( cosψ sin φ cos θ + sinψ sin θ ) = 0, and

(16)

vsx sinψ cos φ + vsy ( sinψ sin φ sin θ + cosψ cos θ ) + vsz ( sinψ sin φ cos θ − cosψ sin θ ) = 0;

(17)

where α f ∈ \ is the included angle between R f ∈ \ , the position vector of the contact 3

point s relative to the center of mass d , and vector k e ∈ \ 3 as shown in Figure 3. θ c Γc i c jc

kc

o Γo I J K

Rr α r

o ' pr

Figure 2 Schematic of rear wheel. θ c Γc i c jc

kc

o Γo I J K

Γe je

ke

δ

ie

Rf

αf pf

Figure 3 Schematic of front wheel.

More detailed discussions were reported in our previous work at Chen et al. (2005).

539

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

3. Optimization of FLC via GA In our study, the fuzzy rules were determined heuristically in advance. The role of GA is to tune the input and output membership functions. For all input and output variables, the membership functions are assumed to be symmetric with respect to the origins. Therefore, the fuzzy sets for each variable can be described using two sets of real numbers: scaling factors (SFs) and deforming coefficients (DCs). The effect of the SFs is obtained by simply multiplying all points of the universe of discourse of FLCs by the SFs. The DCs, as illustrated in Figure 4, are introduced to ‘deform’ the membership functions within an universe of discourse so that they are redistributed. Due to the symmetry of membership functions with respect to the origins, one only needs to calculate those on one side, say the right side, and then takes symmetrization to yield the other side. The membership functions are deformed by multiplying all points of the universe of discourse by the exponent of points linearly equally spaced between 1, 1/ DC  . Let the number of characteristic   points of the membership functions on the right side, excluding the zero origin, be n . Assume that the linear space is shown in Figure 4a. Multiplying all points of the universe of discourse by the exponent of this linear space and then rescaling each one by e −1/ DC , the equally distributed membership functions in Figure 4b are transmuted into Figure 4c without changing the maximum limit η n . 1

(1 + t )

(1 + 4t )

(1 + 3t )

(1 + 2t )

1 = (1 + nt ) DC

1 + ( n − 1) t 

(a)

η1

0

η2

ηn −1

η3

ηn

(b)

0 η1

e1+t e

1 DC

η2

e1+2t e

1 DC

η3

e1+ 3t e

1 DC

ηn−1

1+ ( n −1)t

e

e

1 DC

ηn

e1+ nt e

1 DC

= ηn

(c) Figure 4 (a) Linearly equally space, (b) equally arranged membership functions and (c) deformed membership functions.

With the introduction of the SFs and DCs, only six parameters are needed to encode an FLC of two inputs and one output in the form of a chromosome for GA as follows (18) [ SF1 SF2 SF3 DC1 DC2 DC3 ] , where

( SF1 , DC1 ) , ( SF2 , DC2 )

and

( SF3 , DC3 )

are used for fuzzy input 1, 2 and output,

respectively. In the initial phase, the population consists of randomly generated heterogeneous chromosomes. Then all chromosomes go through three principal parts: evaluation module, selection module and reproduction module. The population will be

540

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

improved as fitter offspring replace parents. The procedure is repeated until either a maximum number of generations is reached or an optimal solution is obtained, whichever is earlier. In this study, we repeat the search procedure until a controller satisfying our criteria is found. The learning scheme for a population of n individuals is given in Figure 5. Reproduction

Reference Signal

+

FLC

Performance Evaluation

Plant

Generation Selection



Best Solution

Figure 5 FLC optimization using GA.

4. Balancing and Roll-Angle Tracking Control 4.1. Balancing Control Before the path-tracking strategies can be applied, one first needs to design controllers for balancing the bicycle and tracking a desired roll-angle. With the developed dynamic equations of motion in section 2, the autonomous bicycle can be balanced by using the scheme given in Figure 6. Our bicycle riding experience shows that, the bicycle can be balanced by generating an appropriate steering torque to steer the fork into the direction of fall which was also proposed by Tanaka et al. (2004). In Figure 6, this steering torque is denoted by τ s ∈ \ . The only PID controller in this diagram is to generate the steering

torque based on the difference between the desired steering angle δ ref and the measured steering angle δ . To generate appropriate reference steering angle δ ref , an FLC (designated by FISδ ) is used. The controller FISδ uses two inputs: the measured roll-angle θ and its change ∆θ to regulate the steering angle until the bicycle turns to the up-right position. This control strategy is verified by simulation results and our bicycle riding experience. Assume that one is facing the heading direction of the bicycle; thus, θ is negative when the bicycle leans to the left and positive to the right. In considering the bicycle in the following three typical situations, the corresponding rules are discussed: If θ is negative large (NL) and ∆θ is NL, then δ ref is NL. If θ is zero (Z) and ∆θ is Z, then δ ref is Z. If θ is positive large (PL) and ∆θ is PL, then δ ref is PL. Using the above approach, one could continue to formulate rules for all possible cases heuristically as shown in Table 1. eθ

θ ref + −

1 − z −1

∆eθ FISδ a

δa

θ 1− z

−1

∆θ

+

FISδ

+

δ ref + −

PID

τs

Plant

δ θ

Figure 6 Balancing and roll-angle tracking scheme.

541

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

Table 1 Rule-base for balancing FLC. θ

NL

NM

NS

Z

PS

PM

PL

NL

NL

NL

NL

NM

NM

NS

Z

NM

NL

NL

NM

NM

NS

Z

PS

NS

NL

NM

NM

NS

Z

PS

PM

Z

NM

NM

NS

Z

PS

PM

PM

PS

NM

NS

Z

PS

PM

PM

PL

PM

NS

Z

PS

PM

PM

PL

PL

PL

Z

PS

PM

PM

PL

PL

PL

∆θ

The role of GA is to tune the input and output membership functions which are originally distributed equally within intervals θ ∈ [ −4, 4] , ∆θ ∈ [ −15, 15] and

δ ref ∈ [ −2, 2] , respectively. As mentioned above, the controller FISδ for balancing control

is encoded as a chromosome in the form of (18). In our experiment, we decide upon the population size of 10. The roulette wheel is used as the selection operator for the purpose of forming the mating pool. We employ the single-point crossover operator with the crossover rate of 0.7. The role of mutation operator is to change each element of a chromosome randomly to avoid local optimality. The mutation rate is selected as 0.05. The fitness function is chosen to be the mean square error of the form 1 N Fitness = (19) ∑ E ( k ), 2 N k =1

(

) (

)

where N is the number of samples and E ( k ) = θ ( k ) − θ ref ( k ) + ω x ( k ) − ω xref ( k ) . 2

2

Note that ω x is the roll-rate. For balancing control, our goal is to turn the bicycle to the up-right position, therefore θ ref ( k ) = ω xref ( k ) = 0 . The fitness function then becomes

1 2N

Fitness = NL

1

N

∑ (θ ( k ) + ω ( k ) ). 2

2 x

k =1

NM NS ZPS PM

(20)

PL

0.5 0 -1.86

-1.5

-1

-0.5

0

0.5

1

1.5

1.86

6

7.6

θ (rad) 1

NL

NM

-4

-2

NS Z PS

PM

PL

0

2

4

0.5 0 -7.6

-6

∆θ NL

1

NM

NS

Z

PS

PM

PL

0.5 0 -1.19

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.19

δref (rad)

Figure 7 Input and output membership functions of the best balancing FLC of the 10th generation.

With the search space for SFs from 0.1 to 2 and for DCs from 0.01 to 0.99, the scheme can find out a good controller very fast. After 10 generations, the best value of the fitness function is 0.1516 corresponding to the chromosome (21) [0.46656 0.50731 0.59859 0.10005 0.17089 0.7488]. The membership functions for the input and output variables are shown in Figure 7.

542

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

4.2. Roll-Angle Tracking Control For roll-angle tracking control, another FLC, denoted by FISδ a , is added to the

existing control scheme. This FLC uses two inputs: eθ = θ ref − θ , the difference between the desired and the actual roll-angles; and its change, ∆eθ , to generate appropriate output

δ a which is an additional signal to change the steering angle to lead the bicycle to the desired lean angle. Linguistic quantification used to specify a set of rules for this controller is characterized by the following three typical situations: If eθ is NL and ∆eθ is NL, then δ a is PL. If eθ is Z and ∆eθ is Z, then δ a is Z. If eθ is PL and ∆eθ is PL, then δ a is NL. In a similar fashion, the complete rule-base is constructed as listed in Table 2. The FLC FISδ a for roll-angle tracking is annealed by keeping the balancing FLC fixed and using GA to optimize FISδ a only. Originally, the membership functions of input and output variables are equally arranged within intervals eθ ∈ [−5,5] , ∆eθ ∈ [−15,15] and δ a ∈ [−5,5] , respectively. We again have six parameters to optimize for each chromosome. The fitness function in this case is defined as 1 N 2 Fitness = ∑ eθ (k ). 2 N k =1

(22)

Using the same strategy as with balancing FLC with the same number of individuals in a population, and the same crossover and mutation rates, we obtain an FLC that can track a given roll-angle at the 10th generation as shown in Figure 8 which is equivalent to a chromosome given by (23) [0.77140 0.50082 0.42378 0.23301 0.54436 0.76044] , and the best value of the fitness function is 0.0573. Table 2 Rule-base for roll-angle tracking FLC. e

NL

NM

NS

Z

PS

PM

PL

NL

PL

PL

PL

PM

PM

PS

Z

NM

PL

PL

PM

PM

PS

Z

NS

NS

PL

PM

PM

PS

Z

NS

NM

Z

PM

PM

PS

Z

NS

NM

NM

PS

PM

PS

Z

NS

NM

NM

NL

PM

PS

Z

NS

NM

NM

NL

NL

PL

Z

NS

NM

NM

NL

NL

NL

θ

∆e

θ

NL

1

NM

NS

Z

PS

PM

PL

0.5 0 -3.85

-3

-2

-1

0 e (rad)

1

2

3

3.85

θ

NL

1

NM

NS

Z

PS

PM

PL

0.5 0 -7.51

-6

-4

-2

0

2

4

6

7.51

∆ eθ 1

NL

NM

-1.5

-1

NS

Z

PS

PM

0.5

1

PL

0.5 0 -2.11

-0.5

0

1.5

2.11

δa (rad)

Figure 8 Input and output membership functions of the best roll-angle tracking FLC of the 10th generation.

543

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

5. Path-Tracking Controller Design Due to its highly nonlinear non-holonomic dynamics and instability, the autonomous bicycle possesses several properties making it difficult for path-tracking. Unlike other mobile robotic systems, it is unable control the steering angle or change the orientation of the bicycle directly to follow a given path because that makes the vehicle fall down. In this study, a control scheme is proposed to control the steering angle indirectly by changing its roll-angle. By adopting this strategy, one can design an FLC to regulate the angle θ ref while using the balancing and roll-angle tracking FLCs mentioned above to follow the reference roll-angle and maintain the balance of the vehicle. This strategy itself poses challenges in making the steering angle response quickly to the control input. Therefore, designing an FLC for this task by trial-and-error method appears to be rather demanding. However, by using GA, an FLC can be found to follow a given target trajectory with small error. 5.1. Path-Tracking Control Scheme For bicycle path-following control, our goal is to minimize the distance from the reference point c to the target path. Let eL ∈ \ be the shortest distance on the ground

plane from the reference point c to the target path, i.e., eL is the distance between

c ( X , Y ) and H ( X H , YH ) as shown in Figure 9. Distance eL is positive when the target

path is on the right side of the bicycle and vice versa. From our bicycle riding experience, one can realize that the bicycle can be controlled towards the target path by leaning our body to the appropriate side. In Figure 9, in order to reduce eL , one need to lean towards the path, i.e., to the right. Using this strategy, we can design another controller to regulate the roll-angle so that eL is minimized. The magnitude of the roll-angle is dependent on the distance eL . Practice shows that, in order to retain the balance of the bicycle, the value of the roll-angle θ should not be too large and should be restricted within a reasonable range.

Γo

ψ

c ( X ,Y ) eL

ζ H ( X H , YH )

Figure 9 Ground-path tracking strategy.

In order to have smooth approach to the target path, we take the angle of the tangent with the target path at point H , ζ ∈ \ , as shown in Figure 9, into account and let

eζ = ψ − ζ be the difference between the yaw angle and ζ . The control strategy can be described as follows: when the bicycle is still far from the target path, it should turn the heading direction nearly perpendicular to the path so that it can run towards the path as fast as possible. When the bicycle comes closer to the target path, it changes its heading direction gradually to ensure a smooth approach. The block diagram following this strategy is shown in Figure 10. The new FLC is designated by FIS path _ trk which uses two inputs: eL and eζ to create the appropriate reference roll-angle θ ref . The complete rule-base is constructed as listed in Table 3.

544

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

Table 3 Rule table for path-tracking FLC. eζ e

L

FIS path _ trk

θ ref + −

eθ 1− z

−1

∆eθ FISδ a

δa

θ 1 − z −1

∆θ

FISδ

+

δ ref

+

+

PID

τs



θ

eL eζ

Plant

δ

Calculate shortest distance

X ,Y xH , yH

ζ Calculate angular difference

ψ Target path

Figure 10 Block diagram for path-following control using eL and eζ for regulating roll-angle.

5.2. Genetic Evolution Strategy for Path-Tracking Control Due to its non-holonomic dynamic behaviors and the implementation of the two tasks, path-tracking and maintaining balance, simultaneously, it is difficult to control the steady-state error to zero. Our experience shows that the steering angle of the bicycle tends to slightly oscillate about the target path as the vehicle closely approaches it. It appeared that in path-tracking control design, the SFs and DCs constrained the membership functions from becoming a good enough FLC for path-tracking. To reduce the oscillation of the steering angle, we introduce three more parameters for each input/output variable in addition to the SFs and DCs as in the previous two FLCs. The new parameters are local SFs for scaling the bases of the triangular membership functions “0”, “1” and “2”. For example, in Figure 11, the bases of the triangular membership functions “0”, “1” and “2” are scaled by multiplying W1 , W2 and W3 by the corresponding local SFs. Therefore, totally, there

are fifteen parameters to be optimized, which are [ SFL SFζ SFθ DCL DCζ DCθ SFWL1 SFWL 2 SFWL 3 SFWζ 1 SFWζ 2 SFWζ 3 SFWθ 1 SFWθ 2 SFWθ 3 ],

where

( SFWL1 , SFWL 2 , SFWL3 ) , ( SFWζ 1 , SFWζ 2 , SFWζ 3 )

are for the fuzzy input and output variables eL , eζ

and

(24)

( SFWθ 1 , SFWθ 2 , SFWθ 3 )

and θ ref , respectively. The

membership functions of input and output variables are originally arranged equally within intervals eL ∈ [ −2, 2] , eζ ∈ [ −1, 1] and θ ref ∈ [ −1, 1] , respectively. The number of individuals in a population now is 25. The target path used for training FLC path _ trk is simply a straight line. By using the fitness function

545

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

Fitness =

∑ (e (k ) N

1 2N

k =1

)

+ ∆eL ( k ) ,

2

2

L

(25)

a good FLC found after 15 generations with the crossover rate of 0.7 and mutation rate of 0.05 is as follows [1.2233 0.5873 0.8729 0.7712 0.5199 0.3489 (26) 0.3385 0.6073 0.9605 0.4615 0.6458 0.6001 0.3457 0.9948 0.1025].

0

1

3

2

5

4

6

W2 W3

W1

Figure 11 Base widths of membership functions “0”, “1” and “2”.

The membership functions for input and output variables are shown in Figure 12. The performance of the designed FLC is proved by a number of simulations with different reference trajectories. A simulation in which the vehicle is controlled to follow a sinusoidal path Y = sin(0.05π X ) is shown in Figure 13. In just 4 seconds, the bicycle can follow the target trajectory smoothly, the actual and target trajectories are nearly identical. After the transient response, the maximum error for eL , which happen at the picks of the sinusoidal path, is within the range of ±23 mm. -6

1

-5

-4

-3

-2

-1 0 1

2

3

-0.5

0 eL (m)

0.5

1

-2

-1 0 1

4

5

6

0.5 0 -2.44

1

-2

-1.5

-6

-5

-1

-4

-3

2

1.5

3

2

4

5

0.3

0.4

2.44

6

0.5 0 -0.58 -0.5

-0.4

-0.3

-0.2

-0.1

0 e (rad)

0.1

0.2

0.5

0.58

ζ

-6

1

-5

-4

-3

-2 -1 0 1

2

3

4

5

6

0.5 0 -0.87

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.87

θref (rad)

Figure 12 Input and output membership functions of the best path-tracking FLC of the 15th generation.

3 Target Trajectory Actual Trajectory

Y (m)

2 1 0 -1 -2

0

20

40

60 X (m)

80

100

120

eL (m)

0.5 0

-0.5

-1

0

5

10

15

20 Time (s)

25

30

35

40

Figure 13 Trajectory of the reference point c on ground plane and tracking error for following the sinusoidal path Y = sin(0.05π X ) .

546

Journal of System Design and Dynamics

Vol. 1, No. 3, 2007

6. Conclusion In this study, an eleven-parameter dynamic model of an autonomous bicycle has been developed by using Lagrange’s equations for quasi-coordinates. By considering the kinematic contact relations between the two wheels and the ground plane, the constraint conditions, including four holonomic and four non-holonomic ones, have been derived. According to this mathematical model, the fuzzy and PID controllers have been designed for stabilizing the bicycle in its straight-running motion and for roll-angle tracking while retaining balance. By considering the distance from the reference point c to the target path and the heading direction of the bicycle, a control scheme has been proposed and discussed. All the FLCs in this study were optimized using a GA with the introduction of the parameters SFs and DCs. In this way, the number of parameters to be trained can be reduced to speed up the learning process. The resulting FLCs in the proposed schemes have also been confirmed by numerical tests.

Acknowledgment The authors would like to thank the National Science Council of the Republic of China, Taiwan, for financially supporting this research under project number NSC 94-2212-E-212-005.

References [1] [2]

[3]

[4]

[5]

[6] [7]

[8] [9]

[10]

Baruh, H., Analytical Dynamics, McGraw-Hill, Singapore, 1999. Beznos, A. V., Formal’sky, A. M., Gurfinkel, E. V., Jicharev, D. N., Lensky, A. V., Savitsky, K. V., and Tchesalin, L. S., Control of autonomous motion of two-wheeled bicycle with gyroscopic stabilization, IEEE International Conference on Robotics & Automation, vol. 3, pp. 2670-2675, 1988. Chen, C. K., Dao, T. S, and Yang, C. K., Turning dynamics of two-wheeled vehicles, J. of Mechanical Science and Technology, vol. 19-1, (Special Edition) pp 377-387, 2005. Getz, N. H., and Marsden, J. E., Control for an autonomous bicycle, IEEE International Conference on Robotics and Automation, vol. 2, pp. 1397-1402, 1995. Han, S., Han, J., and Ham, W., Control algorithm for stabilization of tilt angle of unmanned electric bicycle, Trans. Control, Automation and Systems Engineering, vol. 3, pp 176-180, 2001. Jones, D. E. H., The stability of the bicycle, Physics Today, vol. 23, pp 34-40, 1970. Lee, T. H., Lam, H. K., Leung, F. H. F., and Tam, P. K. S., A practical fuzzy logic controller for the path tracking of wheeled mobile robots, IEEE Control Systems Magazine, vol. 23, no. 2, pp. 60-65, 2003. Lee, Y. and Zak, S. H., Genetic fuzzy tracking controllers for autonomous ground vehicles, IEEE American Control Conference, vol. 3, pp. 2144-2149, 2002. Tanaka, Y. T., and Murakami, Self sustaining bicycle robot with steering controller, 8th IEEE International Workshop on Advanced Motion Control, AMC’04, pp 193-197, 2004. Yavin, Y., Stabilization and control of the motion of an autonomous bicycle by using a rotor for tilt moment, Compute. Methods Appl. Mech. Engrg., vol. 178, pp 233-243, 1999.

547

Journal of System Design and Dynamics

DCs reduces the learning efforts for GA computation. ... In this section, the compact equations of motion with nine degrees of ...... e is the distance between.

451KB Sizes 2 Downloads 114 Views

Recommend Documents

pdf-1451\system-dynamics-modeling-simulation-and-control-of ...
Try one of the apps below to open or edit this item. pdf-1451\system-dynamics-modeling-simulation-and-control-of-mechatronic-systems-5th-fifth-edition.pdf.

Modeling of Hyper-Redundant Manipulators Dynamics and Design ...
Modeling of Hyper-Redundant Manipulators Dynamics and Design of Fuzzy Controller for the System.pdf. Modeling of Hyper-Redundant Manipulators ...

basics of structural dynamics and aseismic design (S) - Copy.pdf ...
Page 4 of 170. basics of structural dynamics and aseismic design (S) - Copy.pdf. basics of structural dynamics and aseismic design (S) - Copy.pdf. Open. Extract.

basics of structural dynamics and aseismic design (S) - Copy.pdf ...
Page 3 of 3. basics of structural dynamics and aseismic design (S) - Copy.pdf. basics of structural dynamics and aseismic design (S) - Copy.pdf. Open. Extract.

Basics of Dynamics and Asiesmic Design BANK.pdf
Write a short note on Inertia force – Mass matrix [M]. 8. What are the effects of Damping. 9. Write a short note on damping force – Damping force matrix. 10.

basics of structural dynamics and aseismic design (S) - Copy.pdf ...
Page 4 of 170. Page 4 of 170. basics of structural dynamics and aseismic design (S) - Copy.pdf. basics of structural dynamics and aseismic design (S) - Copy.pdf.

System Dynamics Modeling of Stylized Features of Stock Markets
System Dynamics Modeling of. Stylized Features of Stock. Markets. A Thesis Submitted for the Degree of. Doctor of Philosophy in the Faculty of Engineering. By.

Design and Implementation of the Brazilian Information System on ...
archive, and analyze data on spatial and temporal distribution of species along with information about their surrounding environment [1–2]. It is also important to ...