1 Non-symmetrc membershp functon for Fuzzy-based vsual servong onboard a UAV. M. A. Olvares-Méndez* and P. Campoy and C. Martínez and I. F. Mondragón B. Computer Vson Group, DISAM, Unversdad Poltécnca de Madrd, Madrd, Span * E-mal: mguelangel. olvaresúupm. es www. dsam.upm. es/colbrí Ths paper presents Fuzzy Logc controllers for a pan & tlt vsón platform onboard an Unmanned Aeral Vehcle. Ths mplementaton allows the UAV to follow objects n the envronment by usng Lucas-Kanade vsual tracker, n spte of the arcraft vbratons, and the movements of the objects and the arcraft. The mprovement of the present work s focused n the deflnton of non-symmetrc membershp functons for the Fuzzy controllers. Ths update has been tested n real flghts wth an unmanned helcopter of the Computer Vson Group at the UPM, wth a very successfully results, attanng a consderable reducton of the error durng the trackng tests. Keywords: Unmanned Aeral Vehcles, Non-Symmetrc membershp functon, Fuzzy Control, Vsual servong, pan-tlt vsual platform. 1. Introducton The unmanned aeral vehcle (UAV) has made ts way quckly and decsvely to the forefront of avaton technology. Opportuntes exst n a broadenng number of ñelds for the applcaton of UAV systems as the components of these systems become ncreasngly lghter and more powerful. UAVs provde a cheap, and safe alternatve to manned systems and often provde a far greater magntude of capablty. Vsual sensng can provde a source of data for relatve poston estmaton, stuaton awareness, and a UAVs nteracton wth the physcal world. It, probably, represents a preferable technology for these purposes than ether GPS or INS. In several UAV projects, computer vsón plays the most mportant role n the envronmental sensng accomplshed by UAVs. Some applcatons of vsón for UAVs nclude, obstacle avodance 1, the works of Rathnam et al. 2 and Campoy 3 for nspecton and montorng of ol-gas
2 ppelnes, roads, brdges, power generaton grds, and other cvlan tasks, the uses of natural Landmarks for Navgaton and Safe Landng 4, the works of Mondragon wth an omndrectonal camera for atttude estmaton of UAVs 5, among others. A VTOL-UAV (Vertcal Take Off and Landng-UAV) has more nonlneartes states that a ñxed wnds UAV, because t can change ts poston wth a fast movements, and can remand n hover poston for a long tme, been affected, just, by the envronment perturbatons. The objectve of ths work s to develop an actve vsual-based system for object trackng on realtme onboard the UAV modelng the non-lneartes states of ths knd of UAV. For trackng objects the well know Lucas-Kanade-Tomas tracker has been used 6, 7 Ths vsual-based object trackng s mplemented usng a pan & tlt vsón platform, controlled by Fuzzy controllers. A non-symmetrc membershp functons mplementaton usng the MOFS (Mguel Olvares' Fuzzy Software) have been used for the deñnton of the nputs and output varables of the Fuzzy controllers, n order to ñt better to the hgh non-lnear system and mprovng the results of prevous works 8, 9 Ths s the prncpal reason for what the non-symmetrc membershp functons are mplemented for ths work, For a better comprehenson, the paper s dvded n the followng sectons. In Secton 2 we show a descrpton about the UAV used n ths work. Secton 3 wll show the Mguel Olvares' Fuzzy Software deñnton and the conñguraton of the dfferent fuzzy controllers. The presentaton of some results obtaned for ths work are shown n the Secton 4 and fnally, we present the conclusons and future works n Secton 5. 2. UAV System Descrpton The Colbrí project has three totally operatve UAV platforms. One electrc helcopter, and two gas powered helcopters. The COLIBRÍ testbeds, 3 are equpped wth an xscale-based flght computer augmented wth sensors (GPS, IMU, Magnetometer, fused wth a Kalman ñlter for state estmaton). For ths work, the UAV system used was an electrc SR20 of "Rotomoton", shown n Fg. 1. It ncludes a two axs pan-tlt vdeo-platform powered by two servomotors, wth an acton range of 180 degrees. For the control of the platform we send poston commands to the servos through the helcopter controller, based on the vsual nformaton acqured. To perform vsón processng, t has a VIA nano-itx 1.5 GHz onboard computer wth 1 Gb RAM-DDR2.
3 Fg. 1. COLIBRÍ III Electrc helcopter. 3. Vsual servong usng Fuzzy controllers 3.1. Fuzzy Software Implementaton The MOFS has been desgned by the defnton of one class for each part of the fuzzy-logc envronment (varables, rules, membershp functons and defuzzfcaton modes) n order to facltates the future updates and makes easer work wth t. Actually, 3 díferent knd of membershp functon have been mplemented, those are the pyramdal, trapezodal and gaussan. Furthermore, the two nference models for the fuzzfcaton that have been mplemented are the máxmum and product, also for the defuzzfcaton s used the Heght weght method. More detals about the structure of ths software s possble see at the. 10 There are some díference between ths fuzzy software and others. One s the learnng algorthm based on the dea of the synaptc weghts of the neurons, but for ths work ths mprovement s not used, n 11, 12 s possble to see how t works. The other mprovement of ths software s the possblty to defne non-symmetrc membershp functon for each fuzzy varables. Ths dea consst n the defnton of díferent szes for the díferent parts of the membershp functon as s shown n the central parts of the fgures 2. Wth ths mprovement the system has a more adaptve response to the nonlnear model of ths system that represent the helcopter movements and the díferent perturbatons of the envronment that can aífect to the UAV. It must be consdered that the helcopter can change t poston wth fast movements (more than 0.4 m/s) or slow movements (less than 0.4 m/s) n for there dsplacements (x, y,and z) and one rotaton (the headng). Also, can remand n hover poston for a long tme, been aífected, ts poston, just for the envronment perturbatons. Some of these díferent changes of the helcopter wll be explan wth fgures n the next sub-secton. The defnton of the díferent sub-sets of each varables s based on the
4 result of more than 20 dfferent test. Those test have been made n the laboratory and onboard the UAV n real flghts. 3.2. Fuzzy Controllers To develop the vsual servong task n a vsón pan & tlt platform on board the UAV, two fuzzy controllers have been mplemented usng the MOFS. They are workng n parallel, one for the pan axs of the vsón platform and the other one for the tlt axs. The purpose of ths mplementaton s to keep n the center of the mage the trackng object, n spte of the helcopter vbratons and the movements of the object and the UAV. The two controllers are desgn usng trangular membershp functon, the product nference model for the fuzzñcaton and the Heght Weght operaton method for the defuzzñcaton of the output (Eq. 1). s P, now)) y= ^M, T^^- (1) J2fíll(^(y 1 )) In Fg. 2(a) and 2(b) are shown the ñrst nput of each controller and n Fg. 2(c) the second nput of them. The Fg. 2(d) shows the deñnton of the output for each controller. In those fgures, t s possble to notce the deñnton of the non-symmetrc membershp functons. yaw error 11I.1XOO0CKX ll C LR = E -140-120-100-80 -60 40-20 0 20 40 60 80 100 120 140 txxxxxx ptch error LL c LR E -120-100 -80-60 -40-20 0 20 40 60 80 100 120 (a) Frst nput varable of the Yaw con- (b) Frst nput Varable of the Ptch troller. controller. yaw& ptch derívate of the tl^^xxxxx VBN BN LN Z Il;p><o><M><>< ; E -120-100 -80-60 40-20 0 2D 40 50,0 ncremental mowement n degretí (c) Second nput of the Yaw and Ptch (d) Output of the Yaw and Ptch Con- Controllers. trollers. Fg. 2. Input and Output Varables for the Ptch and Yaw controllers. 4. Experments In ths secton we present a result of the performance of the two controllers usng the new deñned membershp functons on a real test onboard the
5 UAV. Here a real flght test were carred out. In fgure 3, t s shown a 3D reconstructon of the flght usng the GPS and the IMU data. UAV. EastPoston Local Plañe (m) 6-12 " 10 U.A.V. North Posltlon Local Plañe (m> Fg. 3. 3D flght reconstructon usng the GPS and the IMU data from the UAV. Where, the 'X' axs represents the NORTH axs of the surface of the tangent of the earth, the 'Y' axs represents the EAST axs of the earth, the 'Z' s the alttude of the helcopter and the red arrows show the ptch angle of the helcopter. In ths fgure, t s possble to see the trajectory of the UAV durng the trackng task. In order to ncrease the dffcult of the test, the selecton of the object to track was made durng the flght at the start pont. At ñrst, some rapd movements were made at the three axs (Fgures 4(a), 4(b) and 4(c), before frame 180-200), makng bg changes to the dfferent angles of the helcopter, cls 9X6 shown n Fgures 4(d), 4(e) and 4(f). Then a sde movement wth a ncreasng velocty was made (from O.Om/s to more than lm/s), as s shown n Fgure 4(c) from frame 180 to frame 300. Later a rapd descend wth a máxmum of lm/s was made, whch s possble to see from frame 300 to frame 450 at the fgure 4(a) and 4(d). The manual landng affected wth bg changes n all the angles when the helcopter was next to the floor. The test ñnalze wth the vbratons of the helcopter when t was n contact wth the terran at the End Pont. Ths flght s faster than the presented n the prevous works, n order to ncrease the dffcult of the acton to follow the tracked object. In fgure 5, s possble to see the error n the two axs. Also, s possble
6 (a) Velocty changes n Z axs (alttude). (b) Velocty changes n X axs (Forward). ~ o (c) Velocty changes n Y axs (Sde). (d) Ptch angles changes. (e) Yaw angles changes. (f) Roll angles changes. Fg. 4. Changes of the UAV n velocty and n degrees. to see that there are not peak of error durng the flght, obtanng a very good response of the controller. Furthermore, the results show the correct control trackng besdes the ncrease of the movements, and the veloctes n comparson wth prevous works. So, based n these results and the behavor of the controllers s possble to say that the mprovement at the membershp functons have a successful behavor to overeóme the vbratons problems and the hgh non-lnearty of the VTOL-UAV. 1UU 75 50 25-0 -25-50 -75 100 D 1( DO 200 300 400 frames 500 6C DO ptch I yaw 700 Fg. 5. Error between center of the mage and center of the object to track. 5. Conclusons and Future Works Ths work presents fuzzy controllers wth non-symmetrc membershp functons on the defnton of the nput varables defnton. These controllers
7 are used for followng objects by controllng a pan and tlt vdeo platform on board a UAV. A Lucas-Kanade-Tomass tracker s used. The controllers have a excellent behavor followng the objects, obtanng better results than the prevous results obtaned wthout the non-symmetrc membershp functon deñnton. The uses of the pan and tlt vsual platform gve to the helcopter a freedom of movements, as well as, a faster response when followng movng objects, beng the other mplementatons of vsual servong on UAV (wthout pan and tlt platform) more lmted and slower than the platform servos response. The prncpal and mmedate future work s to mplement controllers for all the possble movements of the UAV (Forward, Sde, alttude and headng) usng velocty or poston commands, n order to make a total control of the UAV and platform, n order to followng objects wthout any restrcton. It s possble to vew the test vdeos and more on the web www.dsam.upm.es/colbr. Acknowledgments Ths work s the product of several research stages at the Computer Vson Group Unversdad Poltécnca de Madrd. Has been sponsored by the Spansh Scence and Technology Mnstry under grants CICYT DPI2004-06624, CICYT DPI2000-1561-C02-02 and MICYT DPI2007-66156. References 1. Z. He, R. Iyer and P. Chandler, Vson-based uav flght control and obstacle avodance, n Amercan Control Conference, 2006, June 2006. 2. S. Rathnam, Z. Km, A. Soghkan and R. Sengupta, Vson based followng of locally lnear structures usng an unmanned aeral vehcle, n Decsón and Control, 2005 and 2005 European Control Conference. CDC-ECC '05. J h J h th IEEE Conference on, Dec. 2005. 3. P. Campoy, J. Correa, I. Mondragon, C. Martínez, M. Olvares, L. Mejas and J. Arteda, Journal of Intellgent and Robotc Systems (2008). 4. A. Cesett, E. Fronton, A. Mancn, P. Zngarett and S. Longh, J Intell. Robotcs Syst. 57, 233 (2010). 5. I. F. Mondragon, P. Campoy, C. Martínez and M. Olvares, Robotcs and Autonomous Systems In Press, Corrected Proof (2010). 6. B. D. Lucas and T. Kanade, An teratve mage regstraton technque wth an applcaton to stereo vsón (jca), n Proceedngs of the 7th Internatonal Jont Conference on Artfcal Intellgence (IJCAI '81), Aprl 1981. 7. C. Tomas and T. Kanade, Detecton and Trackng of Pont Features, tech. rep., Internatonal Journal of Computer Vson (1991). 8. M. Olvares-Méndez, P. Campoy, C. Martínez and I. Mondragon, Eurofuse workshop 09, Preference modellng and decsón analyss (Sept. 2009).
8 9. M. Olvares-Méndez, P. Campoy, C. Martnez and I. Mondragon, A pan-tlt camera íuzzy vsón controller on an unmanned aeral vehcle, n Intellgent Robots and Systems, 2009. IROS 2009. IEEE/RSJ Internatonal Conference on, Oct. 2009. 10. I. F. Mondragon, M. A. Olvares-Méndez, P. Campoy and C. Martnez, Autonomous Robots In Press, Corrected Proof (2010). 11. M. Olvares and J. Madrgal, Intellgent Sgnal Processng, 2007. WISP 2007. IEEE Internatonal Symposum on, l(oct. 2007). 12. M. Olvares, P. Campoy, J. Correa, C. Martnez and I. Mondragon, Fuzzy control system navgaton usng prorty áreas, n Proceedngs of the 8th Internatonal FLINS Conference, (Madrd,Span, 2008).