Adaptive euro-fuzzy cotrol of a umaed bicycle A. Shafiekhai, M. J. Mahoob, ad M. Roozegar 3 Ceter for Mechatroics ad Automatio, School of Mechaical Egieerig College of egieerig, Uiversity of Tehra Tehra, Ira shafiekhai@ut.ac.ir, mmahoob@ut.ac.ir, 3 mroozegar@ut.ac.ir Abstract I this work, a adaptive critic-based euro-fuzzy is preseted for a umaed bicycle. The oly iformatio available for the critic aget is the system feedback which is iterpreted as the last actio the cotroller has performed i the previous state. The sigal produced by the critic aget is used alogside the back propagatio of error algorithm to tue olie coclusio parts of the fuzzy iferece rules. Stability ad roll agle trackig cotrols for a umaed bicycle are preseted. The effectiveess of the cotrol schemes is proved by simulatio results. Keywords Adaptive euro-fuzzy cotroller, umaed bicycle, Stability, Roll agle trackig. I. ITRODUCTIO There are several reasos which show the importace of umaed bicycle Stabilizatio, firstly, the bicycle has very complicated dyamic ad oliear differetial equatio with o-holoomic costrai coditios, so it is great to examie the cotroller efficiecy for the similar problems which have the same degree of complexity. Secodly, it s useful for rehabilitatig with bicycle simulator devices which help crippled people. Lastly, it ca be used i bicycle robots ad stabilize it to track a path. Modelig ad cotrol of bicycles became a popular topic for researchers i the late half of the last cetury. Durig the early of th cetury, several authors studied the problems of self-stabilizatio, balacig, ad steerig. Yamakita et al. utilized a iput-output liearizatio method to desig a traectory trackig cotroller for a automatic bicycle [] ad []. H. D. Shara et al. itroduced a itelliget cotroller for stabilizig a autoomous bicycle system. The cotroller was developed by usig fuzzy logic approach which the rule set was desiged by usig of the iheret-characteristic relatioship of lea ad steer preset i a bicycle [3]. C. K. Che ad T.S Doa preseted a steady turig ad roll agle trackig cotrol for umaed bicycle with fuzzy cotroller by fixed parameters ad rules [4]. Later they desiged a Geetic fuzzy cotrol for path trackig of a autoomous bicycle which optimized the membership fuctio parameters with Geetic Algorithm (GA) [5]. A. Fakhrazari ad M Boroushaki preseted a adaptive critic-based euro-fuzzy cotroller for the steam geerator water level [6]. The paper focused o fuzzy critic-based learig ad its reiforcemet learig method is based o dyamic programmig. The proposed cotroller was optimized by gradiet descet Algorithm which shows satisfactory trasiet resposes, disturbace reectio ad robustess to model ucertaity. A. Bicycle Model II. PROBLEM STATEMET The mechaical model of the bicycle cosists of four rigid bodies, viz. the rear frame with the rider rigidly attached to it, the frot frame beig the frot fork ad hadle bar assembly ad the two kife-edge wheels. These bodies are itercoected by revolute higes at the steerig head betwee the rear frame ad the frot frame ad at the two wheel hubs. I the referece cofiguratio, all bodies are symmetric relative to the bicycle mid plae. The cotact betwee the stiff o-slippig wheels ad the flat level surface is modeled by holoomic costraits i the ormal directio ad by oholoomic costraits i the logitudial ad lateral directio. There is o frictio, apart from the idealized frictio betwee the o-slippig wheels ad the surface, with propulsio ad rider cotrol. I the referece positio, the global Cartesia coordiate system is located at the rear-wheel cotact poit O, where the x-axis poits i the logitudial directio of the bicycle ad the z-axis is directed dowwards. Fig. shows the directios of the axes, where the termiology used maily follows the SAE recommeded practice as described i the report SAE-J67e [SAE, ], last revised i 976. The mechaical model of the bicycle has three degrees of freedom: the roll agle φ of the rear frame, the steerig agle δ, ad the rotatio θ r of the rear wheel with respect to the rear frame. The agles are defied as follows. The orietatio of the rear frame with respect to the global referece frame O xyz is give by a sequece of three agular rotatios: a yaw rotatio, ψ, about the z axis, a roll rotatio, φ, about the rotated x axis, ad a pitch rotatio, θ, about the rotated y axis. The steerig agle δ is the rotatio of the frot frame with respect to the rear frame about the steerig axis. The four kiematic coordiates are take here as the Cartesia coordiates x ad y of the rear-wheel cotact poit, the yaw agle ψ of the rear frame, ad the rotatio θ f of the frot wheel with respect to the frot frame. The dimesios ad mechaical properties of the bechmark model are preseted i Table. The system is
symmetric about the vertical logitudial plae ad the wheels are rotatioally symmetric about their axles. The mass momets of iertia are give at the cetre of mass of the idividual bodies ad alog the global xyz-axes. dampig matrix, the costat stiffess matrix ad the stiffess matrix which is proportioal to the square of the forward speed froms: 8.8.33 33.774 M, ().33.3 C.848.77 K 794.9 5.739 76.46, (3) 5.739 8.39 K.675 Table Parameters for the bechmark bicycle Fig.. Bicycle model together with the cordiate system, the degrees of freedom ad the parameters. B. Liearized Equatios of Motio The equatios of motio are obtaied by pecil-ad-paper usig D Alembert s priciple ad liear ad agular mometum balaces. They are expressed i terms of small chages i the degrees of freedom φ, the rear frame roll agle, ad δ, the steerig agle, from the upright straight ahead cofiguratio φ =, δ =, at a forward speed of v R r. The liearized equatios of motio for the bicycle expressed i the degrees of freedom qd=(φ,δ)t have the form: Mq d C. v q d K K. v q d f d () With a costat mass matrix, M, a dampig matrix C. v which is liear i the forward speed, ad a stiffess matrix which is the sum of a costat part, K, ad a part, K.v, which is quadratic i the forward speed. The liearized equatio of motio for the third degree of freedom, the rotatio θ r of the rear wheel, is decoupled from the first two () ad takes o the very simple form of: r. This meas that the forward speed remais costat for small chages i the upright cofiguratio. The forces o the right had side, fd, are the applied forces which are eergetically dual to the degrees of freedom qd. For the bicycle model the first is Mφ, the actio-reactio roll momet betwee the fixed space ad the rear frame. I practice such a torque could be applied by side wid, or by a paret teachig a child to ride. The secod is Mδ, the actio-reactio steerig momet betwee the rear frame ad the frot frame. This is the torque that would be applied by a rider s hads, a steerig sprig damper, or a cotroller. Substitutio of the parameter values from Table results i the followig values for the etries i the mass matrix, the Parameter Value Wheel base. m Trail.8 m Head agle arcta(3) Gravity 9.8 /kg Forward speed Variable m/s Rear wheel Radius.3 m kg momets of iertia (.6,.,.6) kgm Rear frame Positio cetre of mass (.3,,-.9) m 85 kg momets of iertia Frot frame Positio cetre of mass momets of iertia 9..4 kg.m.4.8 (.9,,-.7) m 4 kg 546 6 6 4 * kg.m 6 4 Frot Wheel Radius.35 m 3 kg momets of iertia (.4,.8,.4) kgm III. ADAPTIVE CRITIC-BASED EUROFUZZY COTROLLER A. euro-fuzzy etworks I this subsectio, the priciples of fuzzy systems are itroduced ad the a equivalet architecture that icorporates fuzzy system cocept ito a adaptive eural etwork cocept, is obtaied, hece the ame eurofuzzy. I geeral, a fuzzy system comprises a fuzzificatio uit, a fuzzy rule base, a iferece egie ad a defuzzificatio uit. The fuzzy system ca be viewed as performig a real (ofuzzy) ad oliear mappig from a iput vector X R, m to a output vector y f ( X ) R ( ad m are iput ad output vector dimesios, respectively). The iterfaces betwee real world ad fuzzy world are a fuzzifier ad a defuzzifier; the former maps real iputs to their correspodig fuzzy sets ad the latter performs i the opposite way to map from fuzzy sets of output variables to the correspodig real outputs. There are two types of fuzzy systems that are commoly used; Takagi-Sugeo-Kag (TSK) ad fuzzy
systems with fuzzifier ad defuzzifier. I this work, we used the first type. The fuzzy rule base cosists of fuzzy rules, which use liguistic If-The seteces to describe the relatioship betwee iputs ad outputs. Cosider a Multiple-Iput Sigle-Output (MISO) fuzzy system cosistig of rules as follows: R: If (x is F) ad ad (x is F) The c=g(x) Where =,,,; xi(i=,..,) are the iput variables of the fuzzy system, Fi is characterized by its correspodig membership fuctio μfi(xi), c is the cosequece of the th rule. Fig.. A sample eurofuzzy structure equivalet with a MISO TSK fuzzy iferece system Implemetig a fuzzy iferece system i the framework of a adaptive eural etwork results i a six layer etwork i which each layer serves as oe part of the equivalet fuzzy system. Fig. shows a sample euro-fuzzy system equivalet with a two-iput ad oe-output TSK fuzzy iferece system which has two liguistic labels for each iput ad therefore four rules i its rule base. The first layer odes specified by I, assig iput scalig factors i order to map iputs to [-,+] rage. Each ode i the secod layer deoted by M specifies the degree to which the give iput satisfies the liguistic label, thus calculatig μ Fi (x i ). Third layer odes deoted by T, multiply the icomig sigals ad costitute the atecedet parts of fuzzy rules, μ F (x )...μ F (x ) (multiplicatio implies choosig the productoperator for the t-orm operator). Each ode i the forth layer specified by, calculates the ratio of correspodig firig stregth to the sum of all rules firig stregths, hece the term μ / μ. The fuctio of odes i the fifth layer is performig a liear combiatio o iputs ad addig a costat value, thus calculatig the correspodig rule s cosequet part c. T-S labels o Fig. refer to TSK rules. The coefficiets of these liear combiatios ad that of costat value will be adapted durig the learig stage. Fially, i the last layer, actig as the defuzzifier, the output is obtaied ad is accordig to (5). The atecedet fuzzy set (fuzzy Cartesia product) of each rule F F F, is quatified by the -orm operator which may be defied as (4), the mi-operator or the product operator: mi[ ( x ),, ( x )] F F x,, x or (4) ( x ) ( x ) F F F F The defuzzificatio is performed usig (5), where μ is the firig stregth of the atecedet part of the th rule ad is give by (6) y f X c F F (5) ( x ) ( x ) (6) I TSK fuzzy systems, the cosequet part of rules is give by (7) i i i c a a. x ( 7) Where a ad ais are the coefficiets that should be set at desig stage or tued durig the correspodig learig procedure. Fig. 3. Structure of adaptive critic-based eurofuzzy cotroller(acfc) B. The Cotroller Structure The critic aget assesses the cotroller performace through evaluatio of plat output ad provides appropriate reiforcemet sigal. The sigal produced, cotributes collaboratively for updatig parameters of the euro-fuzzy cotroller. Let defie the error fuctio E as E r (8) The goal of the learig procedure is miimizatio of E, so the tuable parameters should be updated i the opposite directio of E ( is the gradiet operator). This ca be stated as follows: E (9) where ω is the tuable parameter of the euro-fuzzy cotroller. Equatio (9) is i fact the steepest decet law. Applyig the chai rule for calculatig the relative derivative of (9) we have: E E r u r u ()
where u is the cotrol sigal. Let defie the reiforcemet sigal as a liear combiatio of error e=y ref -y, ad derivative of error e as i (9), where y ref ad y are the referece ad actual outputs of the plat uder cotrol, respectively. r k. e k. e () Where k ad k are positive costats. Applyig the chai rule ad usig (9) we ca write r r y r e y y ( k ) () u y u e y u u E ( y r k ) u (3) u I (3), the term y/ u is the gradiet of the system ad shows the log term variatios of the plat output to the cotrol sigal. As i most cases, the system is desiged i such a way that this variatio is a positive costat. Usig (9) ad (3), adaptatio rule of the tuable parameter will be as follows: u r (4) Where η> is the learig rate parameter which embeds the proportioality costat of (9) as well as the costat values of (3). Fig. 4. Structure of ACFC for bicycle For the euro-fuzzy cotroller itroduced i the previous subsectio, the cotrol sigal usig (5) ad (7) has the form as i (5) ( a a. x ) i i i u (5) Hece, i accordig to (4) the update rules for the parameters of the euro-fuzzy cotroller will be give as (6) ad (7) a r a r x i i (6) (7) C. Cotroller desig for the bicycle Structure of the adaptive critic-based euro-fuzzy cotroller (ACFC) used for the stability cotrol of the bicycle is show i Fig. 4. The euro-fuzzy cotroller elemet of ACFC, see Fig., uses roll agle error (e φ ) ad its derivative ( ) as iputs ad has three liguistic variables, i.e., egative (), Zero (Z) ad Positive (P) thus icludes ie rules i its rule base. The membership fuctio of the liguistic variable, Z, is chose as the Gaussia fuctio ad that of liguistic variables ad P are chose as the Sigmoid fuctio. The membership fuctios of the liguistic variables are show i Fig. 5. e.8.6.4. MF for e -5 - -5 5 5 e (deg) Zero Posetive egetive Fig. 5. The membership fuctio of the correspodig liguistic variables As the euro-fuzzy cotroller has error ad derivative of error of the roll agle as iputs ad there are ie rules i the fuzzy rule base, usig (5) ad igorig bias term ( ) the parameters of the euro-fuzzy cotroller will be updated as follows: c a. e a. e (8) a r e,,,..,9 (9) a r e,,,,9 Where η=. IV. SIMULATIO RESULTS () I this sectio, we will preset simulatio results of the proposed adaptive critic-based euro-fuzzy cotroller. As the bicycle is ustable at low velocities, the mai goal is to obtai a cotroller which stabilize bicycle at low velocities. With that i mid, for comparig the euro-fuzzy cotroller performace the PD cotroller was itroduced due to eurofuzzy iputs (error ad error rate) ad it was tued for v=m/s. the performace of bicycle ad cotrollers for iitial coditio (iitial roll agle is about 6 deg) without ay exteral disturbaces were depicted i Fig.6 which shows the eurofuzzy cotroller eeds less cotrol effort tha PD cotroller.
(deg) cotrol effort (.m) (deg) cotrol effort (.m) v= m/s -.5.5.5 3.5.5.5 3 - - eurofuzzy -3 PD Cotroller.5.5.5 3 Fig. 6. Iitial Respose of Bicycle at v=m/s a) Roll agle, b) Steer agle ad c) cotrol effort Accordig to use liearized equatio of motio which is true oly for costat speed, the performace of desiged cotroller should be checked for differet velocities. Fig.7 compare robustess of euro-fuzzy ad PD cotroller. The PD Cotroller which was tued at m/s velocity is used for stabilizig bicycle at 5m/s velocity. From Fig.7 robustess of euro-fuzzy is obvious. (deg) (deg) 5 v=5 m/s -5.5.5.5 3 -.5.5.5 3 5-5 eurof uzzy.5.5.5 3 Fig. 7. Iitial Respose of Bicycle at v=5m/s a) Roll agle, b) Steer agle, c) Cotrol effort Due to its highly oliear o-holoomic dyamics ad istability, the autoomous bicycle possesses several properties makig it difficult for path-trackig. Ulike other mobile robotic systems, it is uable to cotrol the steerig agle or chage the orietatio of the bicycle directly to PD follow a give path because that makes the vehicle fall dow. I this study, a cotrol scheme is proposed to cotrol the steerig agle idirectly by chagig its roll-agle. So for path plaig we eed roll agle trackig. Fig. 8 shows a simulatio i which the bicycle is cotrolled to follow a desired siusoidal roll agle φ(t)=si(.5t). The result idicates the effectiveess of the eurofuzzy for cotrollig the umaed bicycle to follow a time-varyig roll agle. as show i Fig.8 iitial roll agle of bicycle is about 6 which is comes to desired roll agle less tha secods. (deg) 5-5 - v=3 m/s Bicycle(eurofuzzy) Path Bicycle(PD) 4 6 8 Fig. 8. Roll agle Trackig Performace of PD ad eurofuzzy Cotroller V. COCLUSIOS I this study, a liearized dyamic model of a umaed bicycle has bee cosidered. Accordig to this mathematical model, the euro-fuzzy ad PD cotrollers have bee desiged to stabilize the bicycle i its straight ruig motio ad roll agle trackig of a siusoidal path. I compariso of PD cotroller, the euro-fuzzy cotroller had better performace ad robustess ad it followed a desired roll agle much better tha PD. REFERECES [] M. Yamakita ad A. Utao, Automatic Cotrol of Bicycle with Balacer, IEEE/ASME It. Cof. o Ad. Itel. Mechatroics, pp. 45-49, 5. [] M. Yamakita, A. Utao ad K. Sekiguchi, Experimetal Study of Automatic Cotrol of Bicycle with Balacer, IEEE/ASME It. Cof. o Ad. Itel. Mechatroics, pp. 45-49, 5. [3] H. D. Shara ad Umashakar, A Fuzzy Cotroller Desig for a Autoomous Bicycle System, IEEE I-444-457-6/6/, 6. [4] C.K. CHE ad T.S DAO, Fuzzy cotrol for equilibrium ad rollagle trackig of a umaed bicycle, Multibody Sys. Dy., DOI.7 /s44-6-93-7, 6. [5] C.K. CHE ad T.S. DAO, Geetic Fuzzy Cotrol for Path-Trackig of a Autoomous Robotic Bicycle, J. of system Desig ad Dyamics, Vol., o. 3, 7. [6] A. Fakhrazari ad M. Boroushaki, Adaptive Critic-based eurofuzzy Cotroller for the Steam Geerator Water Level, IEEE Trasactio o uclear sciece, VOL.55, O.3, 8. [7] S. Russel ad P. orvig, Artificial Itelligece: A Moder Approach, d ed. Eglewood Cliffs, J: Pretice-Hall, pp. 3 58, 3.