Joural of Computatios & Modellig, vol.1, o.1, 2011, 115-130 ISSN: 1792-7625 prit, 1792-8850 olie Iteratioal Scietific Press, 2011 Laiiotis filter implemetatio via Chadrasehar type algorithm Nicholas Assimais 1 ad Maria Adam 2 Abstract A implemetatio of the time ivariat Laiiotis filter usig a Chadrasehar type algorithm is preseted ad compared to the classical oe. he size of model determies which algorithm is faster; a method is proposed to a-priori decide, which implemetatio is faster. I the ifiite measuremet oise case, the proposed method is always faster tha the classical oe. Mathematics Subject Classificatio : 93E11, 93C55, 68Q25 Keywords: Laiiotis filter, Chadrasehar algorithm 1 Itroductio Estimatio plays a importat role i may fields of sciece. he estimatio problem has bee solved by meas of a recursive algorithm based o Riccati 1 Departmet of Electroics, echological Educatioal Istitute of Lamia, Lamia 35100, Greece, e-mail: assimais@teilam.gr 2 Departmet of Computer Sciece ad Biomedical Iformatics, Uiversity of Cetral Greece, Lamia 35100, Greece, e-mail: madam@ucg.gr Article Ifo: Revised : July 14, 2011. Published olie : August 31, 2011
116 Laiiotis filter implemetatio via Chadrasehar type algorithm type differece equatios. I the last decades, several authors have proposed faster algorithms to solve the estimatio problems by substitutig the Riccati equatios by a set of Chadrasehar type differece equatios [1, 5, 7, 8, 9]. he discrete time Laiiotis filter [6] is a well ow algorithm that solves the estimatio/filterig problem. I this paper, we propose a implemetatio of the time ivariat Laiiotis filter usig Chadrasehar type recursive algorithm to solve the estimatio/filterig problem. It is established that the classical ad the proposed implemetatios are equivalet with respect to their behavior. It is also developed a method to a-priori before the Laiiotis filter s implemetatio decide which implemetatio is faster. his is very importat due to the fact that, i most real-time applicatios, it is essetial to obtai the estimate i the shortest possible time. he paper is orgaized as follows: I Sectio 2 the classical implemetatio of Laiiotis filter is preseted. I Sectio 3 the Chadrasehar type algorithm is preseted ad the proposed implemetatio of Laiiotis filter via Chadrasehar type algorithm is itroduced. I Sectio 4 the computatioal requiremets both implemetatios of Laiiotis filter are established ad comparisos are carried out. It is poited out that the proposed implemetatio may be faster tha the classical oe. I additio, a rule is established i order to decide which implemetatio is faster. 2 Classical Implemetatio of Laiiotis filter he estimatio problem arises i liear estimatio ad is associated with time ivariat systems described for 0 by the followig state space equatios: x +1 = F x + w z = Hx + v where x is the 1 state vector at time, z is the m 1 measuremet vector, F is the system trasitio matrix, H is the m output matrix, {w } ad {v } are idepedet Gaussia zero-mea white ad ucorrelated radom processes, respectively, Q is the plat oise covariace matrix, R is the m m measuremet oise covariace matrix ad x 0 is a Gaussia
N. Assimais ad M. Adam 117 radom process with mea x 0 ad covariace P 0. I the sequel, cosider that Q, R are positive defiite matrices ad deote Q, R > O. he filterig problem is to produce a estimate at time L of the state vector usig measuremets till time L, i.e. the aim is to use the measuremets set {z 1, z 2,..., z L } i order to calculate a estimate value x L L of the state vector x L. he discrete time Laiiotis filter [6] is a well ow algorithm that solves the filterig problem. he estimatio x ad the correspodig estimatio error covariace matrix P at time are computed by the followig equatios, cosistig the Laiiotis filter, [ ] P +1 +1 = P + F I + P O P F 1 [ ] x +1 +1 = F I + P O x + [ ] + K + F I + P O P K m z +1 2 for 0, with iitial coditios P 0 0 = P 0 ad x 0 0 = x 0, where the followig costat matrices are calculated off-lie: A = [ HQH + R ] 3 K = QH A 4 K m = F H A 5 P = Q K HQ = Q QH AHQ 6 F = F K HF = F QH AHF 7 O = K m HF = F H AHF 8 with F is a matrix, while K, K m are m matrices. he matrices P ad O are symmetric. Also, the m m matrix HQH + R is osigular, sice R > O, which meas that o measuremet is exact; this is reasoable i physical problems. Moreover, sice Q, R > O, A is a well defied m m symmetric ad positive defiite matrix as well as O is positive defiite. Furthermore, sice Q > O usig the matrix iversio Lemma 3 ad substitutig the matrix A by 3 i 6 we may rewrite P as P = Q QH [ HQH + R ] HQ = [ Q + H R H ] 9 3 Let A, C be osigular matrices, the holds: A + BCD = A A BC + DA B DA
118 Laiiotis filter implemetatio via Chadrasehar type algorithm from which it is clear that the symmetric P is a positive defiite matrix. Equatio 1 is the Riccati equatio emaatig from Laiiotis filter. I the case of ifiite measuremet oise R, we have A = O, K = O, K m = O, P = Q, F = F, O = O ad the Laiiotis filter becomes: P +1 +1 = P + F P F = Q + F P F 10 x +1 +1 = F x = F x 11 Equatio 10 is the Lyapuov equatio emaatig from Laiiotis filter. 3 Implemetatio of Laiiotis filter via Chadrasehar type algorithm For time ivariat systems, it is well ow [2] that if the sigal process model is asymptotically stable i.e. all eigevalues of F lie iside the uit circle, the there exists a steady state value P of the estimatio error covariace matrix. he steady state solutio P is calculated by recursively implemetig the Riccati equatio emaatig from Laiiotis filter 1 for = 0, 1,..., with iitial coditio P 0 0 = P 0. he steady state or limitig solutio of the Riccati equatio is idepedet of the iitial coditio [2]. he discrete time Riccati equatio emaatig from the Laiiotis filter equatios has attracted eormous attetio. I view of the importace of the Riccati equatio, there exists cosiderable literature o its recursive solutios [4, 7], cocerig per step or doublig algorithms. he Chadrasehar type algorithm has bee used [7, 8] to solve the Riccati equatio 1. he Chadrasehar type algorithm cosists of the recursio P +1 +1 = P + Y S Y usig recursios for the suitable quatities Y ad S. Hece, the algorithm is based o the idea of defiig the differece equatio ad its factorizatio δp = P +1 +1 P, 12 δp = Y S Y, 13
N. Assimais ad M. Adam 119 where Y is a r matrix ad S is a r r matrix, with For every = 0, 1,..., deotig 0 r = raδp 0. O = P + 14 we ote that O is a symmetric ad positive defiite matrix due to the presece of O, recallig that O i 8 is a positive defiite matrix ad P is a positive semidefiite as estimatio error covariace matrix. Also, sice O is a osigular matrix for every = 0, 1,..., the equatio 14 may be writte: P = I O 15 Usig the above otatios ad substitutig the equatios of the Laiiotis filter by a set of Chadrasehar type differece equatios, a recursive filterig algorithm is proposed, as established i the followig theorem, which presets computatioal advatage compared to the classical filterig algorithm, see 4 ad 5 statemets i the ext Sectio 4. heorem 3.1. Let the measuremet oise R be a positive defiite matrix, the plat oise Q be a positive defiite matrix ad P is a osigular matrix, for every = 0, 1, 2,... he set of the followig recursive equatios compose the ew algorithm for the solutio of the discrete time Laiiotis filter, O +1 = O + Y S Y 16 Y +1 = F O Y 17 S +1 = S S Y +1 Y S 18 P +1 +1 = P + Y S Y 19 x +1 +1 = F with iitial coditios: x + K + F P K m z+1, 20 P 0 0 = P 0 x 0 0 = x 0 O 0 = P 0 + 21 Y 0 S 0 Y 0 = P + F [I + P 0 O ] P 0 F P 0 22 where F, O, K, K m, P are the matrices i 3-8.
120 Laiiotis filter implemetatio via Chadrasehar type algorithm Proof. Combiig 14 ad 12 we write O +1 = P +1 +1 + = P +1 +1 + O P = O + δp, i.e., for every = 0, 1, 2,..., holds δp = O +1 O, 23 i which substitutig δp by 13 the recursio equatio i 16 is obvious. Moreover, usig elemetary algebraic operatios ad properties we may write M + N = NM + N M, M N = N N MM, 24 whe M, N are osigular matrices, as well as [ I + P O ] P = [ ] P P + O P = [P + O ], 25 due to the osigularity of P for every = 0, 1,.... Combiig 12, 1, 25, the first equality i 24, 14 ad 15, we derive: δp +1 = P +2 +2 P +1 +1 = F [I + P+1 +1 O ] P +1 +1 [I + P O ] P F = F [P +1 +1 + O ] [P + O ] F [ ] [ = F O P +1 +1 + O P +1 +1 O P + O = F P+1 +1 [P +1 +1 + O ] O P [P + = F P+1 +1 [P +1 +1 + O ] P [P + O ] O = F P+1 +1 +1 P O F = F O +1 O F P ] ] O F Usig the secod equality of 24 ad 23 the last equatio may be writte as: δp +1 = F = F = F = F +1 O +1 O O O O +1 δp O +1 δp δp O O F O F +1 δp F F O F F δp +1 δp F O F
N. Assimais ad M. Adam 121 From 13 the last equatio yields δp +1 = F Y S Y O F F i which settig the matrix Y +1 = F Y S Y +1 Y S Y Y by 17 immediately arises O F δp +1 = Y +1 S Y +1 Y +1 S Y +1 Y S Y +1. 26 By 13 we have δp +1 formulated as : = Y +1 S +1 Y+1, thus the equatio i 26 may be Y +1 S +1 Y +1 = Y +1 S S Y +1 Y S Y +1 Multiplyig with Y +1 o the left ad Y +1 o the right the last equality the recursio equatio i 18 is derived. Furthermore, rewritig x +1 +1 i 2 with differet way ad due to 14 we coclude [ ] x +1 +1 = F O I + P O x + [ ] + K + F O I + P O P K m z +1 [ ] = F O I + P O O x + [ ] + K + F O I + P O O P K m = F = F [ P + showig thus the equatio 20. ] x + K + F x + K + F P K m z+1 z +1 [ P + ] P K m z +1 Moreover, P 0 0 = P 0 ad x 0 0 = x 0 are give as the iitial coditios of the problem; by 14 O 0 is computed for = 0 ad the matrices Y 0, S 0 are computed by the factorizatio of the matrix P + F [I + P 0 O ] P 0 F P 0 i 22 i order to used as iitial coditios. Remar 3.1. 1. For the boudary values of r = raδp 0 we ote that: If r = 0, the, from 12 arises that the estimatio covariace matrix remais costat, i.e. P = P 0, ad equatio 23 yields O = O 0, for every = 0, 1, 2,... hus the algorithm of heorem 3.1 computes iteratively oly the estimatio x +1 +1 taig the form: x +1 +1 = F O O0 x + K + F O 0 P 0 K m z+1
122 Laiiotis filter implemetatio via Chadrasehar type algorithm If r = ad P 0 0 = P 0 = O, the we are able to use the iitial coditios Y 0 = I ad S 0 = P. 2. For the zero iitial coditio P 0 0 = P 0 = O, by 1 we derive P 1 1 = P ; recallig that by 9 holds P > O, it is evidet that for every = 1, 2,... arises P > O, that guaratees P be a osigular matrix. Hece heorem 3.1 is applicable for iitial coditio P 0 0 = P 0 = O; i this case by 21-22 we are able to use the followig iitial coditios: O 0 = ad Y 0 S 0 Y 0 = P. 3.1 Ifiite measuremet oise R I the followig, the special case of ifiite measuremet oise is preseted. I this case P = Q, F = F ad O = O, the the Riccati equatio 1 becomes the Lyapuov equatio 10. Usig 12 ad combiig 10 with 13 we have δp +1 = P +2 +2 P +1 +1 = F P +1 +1 P F = F δp F = F Y S Y F, where settig Y +1 = F Y the above equality is formulated Y +1 S +1 Y δp +1 = Y +1 S Y+1 ad after some algebra arises : S +1 = S +1 = Sice the last equality of the matrices holds for every = 1, 2,..., without loss of geerality, we cosider a arbitrary r r symmetric matrix S = S, 27 with ras = r ad 0 < r. hus, usig 19, 11 ad 27 the followig filterig algorithm, which is based o the Chadrasehar type algorithm, is established. ad with iitial coditios: Y +1 = F Y P +1 +1 = P + Y SY x +1 +1 = F x, P 0 0 = P 0, x 0 0 = x 0, Y 0 SY 0 = Q + F P 0 F P 0
N. Assimais ad M. Adam 123 Sice i 27 the matrix S ca be arbitrarily chose, we propose as S the r r idetity matrix; thus we are able to establish the proposed algorithm, which is formulated i the ext theorem. heorem 3.2. Let R be the ifiite measuremet oise R, the plat oise Q be a positive defiite matrix ad F be a trasitio matrix. he set of the followig recursive equatios compose the algorithm for the solutio of the discrete time Laiiotis filter, for = 1, 2,..., with iitial coditios: Y +1 = F Y 28 P +1 +1 = P + Y Y 29 x +1 +1 = F x, 30 P 0 0 = P 0, x 0 0 = x 0, Y 0 Y 0 = Q + F P 0 F P 0 31 Remar 3.2. I the special case P 0 0 = P 0 = O, the equatio 31 becomes Y 0 Y 0 = Q. 4 Computatioal compariso of algorithms he two implemetatios of the Laiiotis filter preseted above are equivalet with respect to their behavior: they calculate theoretically the same estimates, due to the fact that equatios 1-2 are equivalet to equatios i heorem 3.1 i.e. 16-20 ad equatios 10-11 are equivalet to equatios 28-30 for the case of ifiite measuremet oise. he, it is reasoable to assume that both implemetatios of the Laiiotis filter compute the estimate value x L L of the state vector x L, executig the same umber of recursios. hus, i order to compare the algorithms, we have to compare their per recursio calculatio burde required for the o-lie calculatios; the calculatio burde of the off-lie calculatios iitializatio process is ot tae ito accout. he computatioal aalysis is based o the aalysis i [3]: scalar operatios are ivolved i matrix maipulatio operatios, which are eeded for the implemetatio of the filterig algorithms. able 1 summarizes the calculatio burde of eeded matrix operatios.
124 Laiiotis filter implemetatio via Chadrasehar type algorithm able 1. Calculatio burde of matrix operatios Matrix Operatio Calculatio Burde A m + B m = C m m A + B = S S : symmetric 1 2 2 + I + A = B I : idetity A m Bm = C 2m A m Bm = S S : symmetric 2 m + m 1 2 2 + [A ] = B 1 6 163 3 2 he per recursio calculatio burde of the Laiiotis filter implemetatios are summarized i able 2. he details are give i the Appedix. able 2. Per recursio calculatio burde of algorithms Implemetatio Noise Per recursio calculatio burde Classical R > O CB c,1 = 1 6 643 4 + 2 2 m + 2m Classical R CB c,2 = 3 3 + 2 2 Proposed R > O CB p,1 = 1 6 563 3 2 5 + 3r 2 Proposed R CB p,2 = 3 2 r + 2 2 From able 2, we derive the followig coclusios: 2r + 7 2 r + 2 2 m + 2m 1. he per recursio calculatio burde of the classical implemetatio depeds o the state vector dimesio. 2. he per recursio calculatio burde of the proposed implemetatio depeds o the state vector dimesio ad o r = raδp 0. 3. Cocerig the o-ifiite measuremet oise case R > O ad defiig q, r = CB c,1 CB p,1, from able 2 the respective calculatio burdes yield the relatio: q, r = 1 6 83 + 3 2 + 3r 2 + 2r 7 2 r 32 From Remar 3.1 the case r = 0 gives degeerated algorithm; thus cosider r 1 we ivestigate two cases : a r =, ad b r <. a 1 r =. I this case, it is obvious that q, = 1 6 523 + 15 2 + ad sice q, is a decreasig fuctio, we compute q, q1, 1 = 6 < 0. Hece, if r =, the the classical implemetatio is faster tha the proposed oe.
N. Assimais ad M. Adam 125 b 1 r <. I this case, we rewrite the equality i 32 as q, r = 6 8r2 + 42 + 12r + 8 2 + 3 + 1 = fr,,33 6 with fr, = 8r 2 + 42+12r+8 2 +3+1. he discrimiat of fr, is ad its zeros are : = 2340 2 792 + 216 > 0, r 1 = 42 + 12 36, r 2 = 42 + 12 + 34 36 Hece, the factorizatio of fr, is fr, = 8r r 1 r r 2, thus, the equality of q, r i 33 ca bee writte as q, r = 3r r 1 r r 2. 35 Also, it is easily proved that for = 1, 2,... holds > 42 12, from which immediately arises r 1 < 0 ad r 2 > 0; thus, due to the fact r 1, it is obvious r r 1 > 0. Cosequetly, i 35 the sig of q, r depeds o the sig of r r 2, with r 2 i 34, i.e., the choice of implemetatio of the suitable algorithm is related to the compariso of quatities r, r 2 ; if r > r 2 q, r < 0, thus the classical implemetatio is faster tha the proposed oe. if r < r 2 q, r > 0, thus the proposed implemetatio is faster tha the classical oe. 4. Figure 1 depicts the relatio betwee ad r that may hold i order to decide, which implemetatio is faster. I fact r is plotted as fuctio of usig r 2 i 34. he, we are able to establish the followig Rule of humb: the proposed Laiiotis filter implemetatio via Chadrasehar type algorithm is faster tha the classical implemetatio if the followig relatio holds: r < 0.18 36
126 Laiiotis filter implemetatio via Chadrasehar type algorithm Figure 1: Proposed algorithm may be faster tha the classical oe. hus, we are able to choose i advace the implemetatio of the faster algorithm comparig oly the quatities r ad by 36. 5. Cocerig the ifiite measuremet oise case R, the calculatio burde of the classical implemetatio is greater tha or equal to the calculatio burde of the proposed implemetatio; the equality holds for r =. hus, the proposed implemetatio is faster tha the classical oe. ACKNOWLEDGEMENS. he authors are deeply grateful to referees for suggestios that have cosiderably improved the quality of the paper. Refereces [1] Abdelhaim Aouche ad Fayçal Hamdi, Calculatig the autocovariaces ad the lielihood for periodic V ARMA models, Joural of Statistical Computatio ad Simulatio, 793, 2009, 227-239. [2] B.D.O. Aderso, J.B. Moore, Optimal Filterig, Pretice Hall ic., 1979. [3] N. Assimais, M. Adam, Discrete time Kalma ad Laiiotis filters compariso, It. Joural of Mathematical Aalysis IJMA, 113-16, 2007, 635-659. [4] N.D. Assimais, D.G. Laiiotis, S.K. Katsias, F.L. Saida, A survey of recursive algorithms for the solutio of the discrete time Riccati equatio, Noliear Aalysis, heory, Methods ad Applicatios, 30, 1997, 2409-2420. [5] J.S. Baras ad D.G. Laiiotis, Chadrasehar algorithms for liear time varyig distributed systems, Iformatio Scieces, 172, 1979, 153-167. [6] D.G. Laiiotis, Discrete Riccati Equatio Solutios: Partitioed Algorithms, IEEE rasactios o AC, AC-20, 1975, 555-556.
N. Assimais ad M. Adam 127 [7] D.G. Laiiotis, N.D. Assimais, S.K. Katsias, A ew computatioally effective algorithm for solvig the discrete Riccati equatio, Joural of Mathematical Aalysis ad Applicatios, 1863, 1994, 868-895. [8] S. Naamori, A. Hermoso-Carazo, J. Jiméez-López ad J. Liares-Pérez, Chadrasehar-type filter for a wide-sese statioary sigal from ucertai observatios usig covariace iformatio, Applied Mathematics ad Computatio, 151, 2004, 315-325. [9] S. Naamori, Chadrasehar-type recursive Wieer estimatio techique i liear discrete-time stochastic systems, Applied Mathematics ad Computatio, 1882, 2007, 1656-1665.
128 Laiiotis filter implemetatio via Chadrasehar type algorithm Appedix Calculatio burdes of algorithms A Measuremet oise is a positive defiite matrix R > O A.1 Classical implemetatio of Laiiotis filter Matrix Operatio Matrix Dimesios Calculatio Burde P O 2 3 2 I + P O + [I + P O ] 1 6 163 3 2 [I + P O ] P 3 + 1 2 2 F [I + P O ] P 2 3 2 F [I + P O ] P F 3 + 1 2 2 P +1 +1 = P + F [I + P O ] P F + 1 2 2 + F [I + P O ] P K m m 2 2 m m K + F [I + P O ] P K m m + m m K + F [I + P O ] P K m z+1 m m 1 2m F [I + P O ] 2 3 2 F [I + P O ] x 1 2 2 x +1 +1 = F [I + P O ] x + + K + F [I + P O ] P K m z+1 1 + 1 otal I idetity matrix symmetric matrix CB c,1 = 1 6 643 4 + 2 2 m + 2m
N. Assimais ad M. Adam 129 A.2 Proposed implemetatio via Chadrasehar type algorithm Matrix Operatio Matrix Dimesios Calculatio Burde Y S r r r 2r 2 r Y S Y r r 2 r + r 1 2 2 + O +1 = O + Y S Y + 1 2 2 + 1 6 163 3 2 Y r 2 2 r r Y +1 = F O Y r 2 2 r r 1 +1 6 163 3 2 +1 Y S r 2 2 r r S Y O +1 Y S r r r 2 + r 1 2 r2 + r S +1 = S S Y +1 Y S r r + r r 1 2 r2 + r P +1 +1 = P + Y S Y + 1 2 2 + F O 2 3 2 F O x 1 2 2 F O P 2 3 2 F O P K m m 2 2 m m K + F O P K m m + m m K + F O P K m z+1 m m 1 2m x +1 +1 = F x + + K + F O P 1 + 1 K m z+1 otal CB p,1 = 1 6 563 3 2 5 + 3r 2 2r + 7 2 r + 2 2 m + 2m symmetric matrix
130 Laiiotis filter implemetatio via Chadrasehar type algorithm B Ifiite measuremet oise R B.1 Classical implemetatio of Laiiotis filter Matrix Operatio Matrix Dimesios Calculatio Burde F P 2 3 2 F P F 3 + 1 2 2 P +1 +1 = Q + F P F + 1 2 2 + x +1 +1 = F x 1 2 2 otal CB c,2 = 3 3 + 2 2 symmetric matrix B.2 Proposed implemetatio via Chadrasehar type algorithm Matrix Operatio Matrix Dimesios Calculatio Burde Y +1 = F Y r 2 2 r r Y Y r r 2 r + r 1 2 2 + P +1 +1 = P + Y Y + 1 2 2 + x +1 +1 = F x 1 2 2 symmetric matrix otal CB p,2 = 3 2 r + 2 2