Usng Genetc Algorthms n System Identfcaton Ecaterna Vladu Deartment of Electrcal Engneerng and Informaton Technology, Unversty of Oradea, Unverstat, 410087 Oradea, Româna Phone: +40259408435, Fax: +40259408408, e-mal: evladu@rdslnk.ro Abstract: A system dentfcaton roblem can be formulated as an otmzaton task where the objectve s to fnd a model and a set of arameters that mnmze the redcton error between the lant oututs.e., the measured data, and the model outut. The most exstng system dentfcaton aroaches are hghly analytcal and based on mathematcal dervaton of the system s model. As an alternatve to these methods, evolutonary comutaton seems to be a very romsng aroach, because t needs only few knowledge about the roblem and d can be easly combned wth a number of other technques from control engneerng, machne learnng, artfcal ntellgence and so on. Ths aer consders an evolutonary aroach for system dentfcaton and attemts to show how GAs can be aled n system dentfcaton tasks. Some study cases confrm that good erformance can be acheved by ths method. Keywords: system dentfcaton, evolutonary technques, genetc algorthms 1 Introducton System dentfcaton conssts of two tasks. The frst task s structural dentfcaton of the equatons and the second one s an estmaton of the model s arameters. In control engneerng, system dentfcaton s used to fnd a model of the lant to control. In ths context, system models descrbe the behavor of the lant over tme. In the case the structure of the model s known n advance, the needed knowledge reles to the numercal values of a number of arameters. In the followng aragrahs, the exermental estmaton of arameters wll be referred. These methods use the measurements carred out on nut and outut sgnals, havng the goal to fnd the mathematcal models, whch better descrbe, very close to realty, the behavor of the lant.
In order to aly GAs n systems dentfcaton, each ndvdual n the oulaton must reresent a model of the lant and the objectve becomes a qualty measure of the model, by evaluatng ts caacty of redctng the evoluton of the measured oututs. The measured outut redctons, nherent to each ndvdual, s comared wth the measurements made on the real lant. The obtaned error s a functon of the ndvdual s qualty. As less s ths error, as more erformng the ndvdual s.there are many ways n whch the GAs can be used to solve system dentfcaton tasks. The man tendences are descrbed n [1], [2], [3], [5], [7], [8]. 2 Exermental Methods for Parameters Estmaton The hases to be assed for exermental arameters estmaton are resented n Fgure 1 [4]. The descrbed method uses as startng ont an aroxmate lant model. The model s oututs are comared wth the exermental results and an error crtera related to the lant oututs and the mathematcal model oututs s used. The mathematcal model s those arameters are determned whch lead to an outut that fts the best to the lant oututs carred out by exermental measurements. These stages are then contnued untl the error crteron s met. [4] Inut u(t) Plant (hscal system) Suosed mathematcal model Measured oututs Mathematcal model s oututs Comutng the error crtera Adjustg the arameters n the mathematcal model Error crtera s met No Yes The system s comletly dentfed Fgure 1 The exermental arameters estmaton hases
The dentfcaton can be carred out on-lne or off-lne. In the on-lne case, the nut and outut sgnals used are those, whch aear n the usual oeraton of the lant and the model of the system s obtaned n real tme. In the off-lne case, also the sgnals that aear n the usual oeraton of the lant are emloyed, but these sgnals are revously collected, by emloyng laboratory measurements. [4]. In the case the lant structure s not known n advance, the followng hases are to be erformed: - Exermentally nvestgate f the lant has constant or adjustable arameters; - Exermentally dentfy the lnear doman of the lant; - Adot a mathematcal descrbng rncle. Related to the nut u(t) n Fgure 1, the followng assgnaton s necessary: ths sgnal must have a sutable structure n order to unctuate n the reacton of the system all ts characterstcs. Consequently, t can be or a smle sgnal as ste or ram or a comlex sgnal establshed from successve tycal sgnals. Also, n order to obtan accurate resuts, an arorate data management s necessary, as resented n [7]. Regardng the measured lant outut, related to the tye of the model to fnd dscrete tme or contnuous tme the samles must be orented n the ascendng order of tme, they must corresond to the same equdstant moments n the case of dscrete tme systems and arbtrary n case of contnuous tme systems. If the error crteron s of ntegral tye, the ractcal usage conssts n relacng the ntegral by an equvalent sum. For smlcty and consderates of good aroxmaton, the tme moments when the comarson s carred out are consdered equdstant, dsregardng f the models are of dscrete or contnuous tye. 3 Alyng GAs n Systems Identfcaton Ths aragrah resents a method ntended to the estmaton of the lant arameters by usng GAs. The method uses the rncle scheme dected n Fgure 2. In Fgure 2, the bloc named Plant has the unknown arameters, whch are to be found n the genetc search. The bloc Model has adjustable arameters, whch are transmtted from GAs n the evaluaton ste. By comarng the y(t) and y m (t) oututs, a measure of the erformance J s obtaned, on base of whch the ndvdual has assgned the Ftness functon.
u(t) Plant y(t) Adjustable arameters (from GAs). Model y m(t) Comarng the oututs and comutng the erformance J Establshng the Ftness functon Ftness (to GAs) Fgure 2 The rncle scheme for arameters estmaton 3.1 Imlementng the Proosed Method by Smulaton The evaluaton ste for the roosed method s erformed by smulaton. For ths urose, the bloc dagram dected n Fgure 2 s mlemented n a Smulnk model. By erformng a smulaton for the ndvdual, the lant outut y(t) and the model outut y m (t) are obtaned. GAs use ndvduals encoded as real numbers vector, that are the arameters searched n the estmaton rocess. The ndvdual encodng, n the case of estmatng a number of n arameters s showed n Fgure 3. Fgure 4 reresents the outut of a gven lant to a ste nut sgnal. Such a curve s comared wth the outut of the model havng adjustable arameters, at equdstant dt tme moments, belongng to the nterval [0, t max ], where t max s the maxmum smulaton tme. If the model s arameters are dentcal to the lant arameters, that s, f they are correctly estmated, the resonse curve y m (t) of the model comletely overlas the lant outut curve y(t). arameter 1 arameter 2 n arameters arameter n Fgure 3 An ndvdual encodng
y 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 10 20 30 40 50 t t Fgure 4 The outut of a gven lant to a ste nut sgnal Contrary, the two resonse curves dffer and the estmaton error for the ndvdual can be defned by relaton (1). ε ( t) = abs[ y( t) y ( t)] m Addng the both members of the relaton (1) for all the tme moments and denotng: t max t= 0 ε( t) dt J( aram J( aram ) J( aram ) wth, the relaton (2) s obtaned, where ) becomes a erformance crtera for the ndvdual : t = max t= 0 abs[ y ( t) y m ( t)] The sum gven by relaton (2) s consdered to be bult u wth such a small ste, as t can be aroxmated wth an ntegral. The geometrcal nterretaton of the relaton (2) s resented n Fgure 5, where the lant outut s resented relatve to the model s outut. Denotng wth S y and S ym the domans delmted by y(t) curve, resectvely y m (t) and the tme axs, showed hachured n the fgure, due to the non-overlang of the curves, between them a seres of non-overlang surfaces are delmted, whch are those hachured n the same drecton n the Fgure 5. These surfaces can be consdered as erformance crtera for the estmaton qualty: as smaller they are, as better the arameters estmaton s. Ther sum s obtaned wth relaton (2). In the roblems of arameters estmaton, t s not suffcent to use the system s resonse relatve to a unque nut sgnal. In order to obtan estmaton as good as (1) (2)
ossble, a number Ne of test vectors are to be used, corresondng to a number Ne of nut-outut exerments [6], [7], [8]. y Non overlang surface Non overlang surface S ym y y m S y 0 t max t Fgure 5 The lant outut relatve to the model s outut A test vector assocates a lant nut sgnal to an outut sgnal, havng the form (u j, y j ), where u j, s a gven nut sgnal and y j s the corresondng outut sgnal, where j = 1... Ne. By ths way, to the nut of both lant and model, successvely are aled de nut sgnals u j and the oututs y j and y mj are comared. Ths comarson suoses that a smulaton havng the nuts u j s erformed and the value J j s comuted wth relaton (2) on base of the obtaned outut, for each ndvdual. The erformance ndcator becomes the sum of the comuted values of J j for each smulaton. As smaller ths sum s, as better the arameters estmaton s. The evaluaton ste becomes more comlex, as showed n Fgure 6. Ths ste s reeated for each ndvdual, n each generaton of the algorthm. In mathematcal form, the erformance crtera s gven by relaton (3): J( aram ) = t Ne max { abs[ y j ( t) u( t) j = = 1 0 uj( t) y mj ( t)]} dt It has to be noted that, n the exresson (3) the erformance crtera uses equal weghts for all of the nut sgnals only n the cases these sgnals have a comarable amltude. In the case the nut sgnals amltude are very dfferent, weghtng coeffcents can be used n order to comensate these amltude dfferences, as resented n relaton (4). Ne t max J( aram ) = k j{ abs[ y j ( t) ymj ( t)]} dt j= 1 0 u( t) = uj( t) (3) (4)
where the coeffcents k j are choosed by usng aror knowledges, based n the revous analyse of the measurements erformed on the real lant (for examle contrarwse wth the sgnal amltude). The arameters of the ndvdual aram, nut sgnals u j(t) and measured oututs y j(t) where j = 1 Ne Inut from GAs J = 0, j = 1 Aly the sgnal u(t) = u j (t) to the nut Perform a smulaton Comute J j J = J + J j j=j+1 No j=ne Yes Retur J Fgure 6 Evaluaton ste for an ndvdual The Ftness functon s defned by relaton (5). 1 Ftness = 1 + J ( aram ) where the maxmum value of Ftness s 1, ths stuaton corresondng to the comlete achevement of erformance requrements. Ths method was descrbed wth the goal of testng t by smulaton, suosng the system s structure s known n advance, but the arameters are unknown, the goal of alng GAs beng exactly the estmaton of these arameters. (5)
3.2 Imlementng the Proosed Method n the Real Plants In real stuatons, the evaluaton ste s also mlemented by smulaton, unlke the arameters estmaton s carred out off-lne, by usng revously erformed measurements on the real lant. In ths case, the followng elements are suosed to be known: - the lant structure, for examle havng the form of a transfer functon wth unknown arameters; - a number Ne of samle vectors, as ears of nut sgnals u(t) and outut sgnals y(t) obtaned by measurements; - the maxmum recordng tme t max of the sgnals collected from the real lant. By usng ths nut data, the evaluaton of an ndvdual s carred out n a number of Ne hases, usng a Smulnk model for smulaton. The used Smulnk model corresonds to the rncle scheme n Fgure 2, n whch the Model block has the transfer functon wth the same form as the Plant block, but the Model block has adjustable arameters collected from the GAs and the Plant block s relaced by the measurements erformed on the real Plant. 3.3 Possbltes to Extend the Proosed Method to Systems Havng Unknown Structure Although n the revous aragrah GAs were used only to estmate the arameters of systems havng a known structure, ths aroach can be extended to dentfy some systems havng an unknown structure. The rocedure descrbed n 3.2 can be aled to systems havng the transfer functon gven by relaton (6). K H = e τs P T s + 1, (6) Ths transfer functon has a mnmum order for the art wthout delay tme. The coeffcents K, T are τ the unknown arameters, whch are to be estmated. If by alyng GAs n these condtons the obtaned results are not satsfyng, the ratonal art of the transfer functon s comleted wth addtonal zeros and/or oles, untl satsfyng results are obtaned [4]. By ths way, the transfer functon has the form gven by relaton (7), where the values of m and k are gradually enlarged n each ste, and the rocedure descrbed n the aragrah 3.2. s aled.
H P k k 1 aks + ak 1s = K m m b s + b s m m 1 +... + a1s + 1 e τs +... + b s + 1 1 1 In ths stuaton, GAs wll use a oulaton havng a hgh number of ndvduals and they wll evolve for a great number of generatons. Addtonally, GAs need to aly some technques ntended to mantan the oulaton dversty. In the real stuatons, the comutng rocess can be smlfed, snce the coeffcents K and τ can be fnd exermentally wthout dffcultes [4], such as these coeffcents can become constants havng known values, or arameters defned n a small nterval, whch takes n consderaton the exermental dentfcaton errors, as n relaton (8). K τ 1% 1% [ K ex (1 ), K ex (1 )] 100 100, + 1% (1 ), τ 100 2 (1 + )] 100 % [ τ ex ex where K ex and τ ex reresents the exermentally determned coeffcents, and the constants 1 and 2 are establshed deendng on the accuracy of the exermental measurements erformed. 3.4 Case Study The followng roblem of arameters estmaton s consdered: - The system has the transfer functon wth the form of the relaton (6); - The unknown coeffcents K, T and τ have values n the doman [0.1 20]. As nut sgnals u j a number of k = 10 samle sgnals are used, exrmed by a jk,ω jk, ϕ jk relaton (9), where the coeffcents are randomly chosen. u ( t) = k 4 j= 1 a jk sn( ω t + ϕ ) jk jk The roblem s mlemented by smulaton, accordngly to aragrah 2. In the Smulnk scheme, a lant havng the transfer functon (10) s used. H 1,5 = e 10 s P 5s + 1 (7) (8) (9) (10) GAs have to dentfy the coeffcents n the relaton (10) n such a way that, at the end of the algorthm we exect to obtan the solutons:
K = 1,5, T = 5, τ = 10. The block dagram of the Smulnk model s gven n Fgure 7. GAs have the followng arameters: - Poulaton sze N = 50; - Tournament selecton wth the tour sze T=5; - Arthmetc crossover; - Unform mutaton; - Crossover robablty 0,6; - Mutaton robablty 0,1; - Stong crtera 15 generatons. u(t) arameters K, T,τ (from GAs) H P H M Plant 1,5 10s = 5s+ 1 e Model K τs = e T s + 1 y(t) y m (t) Comare oututs and comute erformance J Establshng the Ftness Ftness (to GAs) Fgure 7 The block dagram of the Smulnk model used n the case study By alyng GAs n the manner descrbed n aragrah 3.2, the followng soluton was found: K = 1.4907, T = 4.4977, τ = 9.7982, Ftness = 0.96592 It can be senn that ths soluton aroxmates the searched arameters wth an acuracy of 96%. The genetc evoluton s resented n Fgure 8, where the the average Ftness s denoted M and the standard devaton wth S. In ths fgure t can be seen that the average Ftness keeed ts ascendng charasterstc untl the last generaton. It can conclude that t s ossble to obtan better solutons by ncreasng the number of the generatons. For ths reason, another run of GAs was erformed, ths tme wth 50 generatons. By alyng GAs the followng soluton was found:
K = 1,4999 T = 4,9916 τ = 10,0049 Ftness = 0,9995 It can be seen that ths soluton aroxmates the searched arameters wth an acuracy of 99,9%. M,S 0.9 0.8 0.7 M 0.6 0.5 0.4 0.3 0.2 S 0.1 0 0 5 10 Generaton Fgure 8 The GAs evoluton n 15 generatons The genetc rocess s dected n Fgure 9. By analyzng ths fgure, t can conclude that the GAs arameters were well selected, snce n the fnal generatons a local search was erformed, that lead to obtan an estmaton wth a hgher acuracy. M,S 0.9 0.8 M 0.7 0.6 0.5 0.4 0.3 S 0.2 0.1 0 0 5 10 15 20 25 30 35 40 45 Generaton Fgure 9 The GAs evoluton n 50 generatons
Conclusons Ths aer resented a system dentfcaton method based on an evolutonary strategy. The genetc algorthm aroach has shown to be versatle when aled to arameters estmaton wthout requrng a detaled mathematcal reresentaton of the roblem. The resented method s flexble and alcable n a wde range of roblems. The obtaned results show that GAs can estmate the arameters values wth a hgh accuracy. Ths work can be contnued wth other studes and exerments regardng the nut data management or aroachng other technques, such as genetc rogrammng, neural networks, fuzzy logc and combnatons of the last ones and GAs [9], [10]. References [1] J. Abony, J. Madar, L. Nagy, and F. Szefert, Interactve Evolutonary Comutaton n Identfcaton of Dynamcal Systems, Com.& Chem. Engneerng, Carnege Mellon Unversty, IF: 0.784, 2004 [2] R. Belea, Contrbuton to the system dentfcaton usng genetc algorthms, PhD Thesys, DUNĂREA DE JOS Unversty of Galaţ, 2004 [3] I. Dumtrache, and C. Buu, Genetc Algorthms. Fundamental rnces and alcatons n control system, Ed. Medamra, Cluj-Naoca, 2000 [4] I. Dumtrache, Technques of control, Ed. Ddactc and Pedagogc, Bucureşt, 1980 [5] G. Franco, R. Bett, and H. Lus, Identfcaton of Structural Systems Usng an Evoluton Strategy, Journal of Engneerng Mechancs, 130, 10, 1125-1139, 2004 [6] R. K. Ursem, Models for Evolutonary Algorthms and Ther Alcatons n System Identfcaton and Control Otmzaton PhD Thesys, Faculty of Scence of the Unversty of Aarhus, 2003 [7] E. E. Vladu, Contrbutons n usng genetc algorthms n engneerng, PhD Thess, Poltehnca Unversty of Tmsoara, 2003 [8] E. E. Vladu, T. L. Dragomr, On data management n elementary system dentfcaton aroaches usng Genetc Algorthms, Proceedngs SOFA 2005 [9] A. Zakharov, and S. Halasz, Parameter dentfcaton of a robot arm usng Genetc Algorthms, Perodca Poltehnca Ser. Eng. Vol. 45, No 3-4, 195-209, 2001 [10] Q. Zhao, B. H. Krogh, and P. Hubbard, Generatng test nuts for embedded control systems, IEEE Control Systems Magazne, 49-57, 2003