Modeling, Identification and Control, Vol. 30, No. 4, 2009, pp. 203–222, ISSN 1890–1328

A Bootstrap Subspace Identification Method: Comparing Methods for Closed Loop Subspace Identification by Monte Carlo

David Di Ruscio

Telemark University College, P.O. Box 203, N-3901 Porsgrunn, Norway

Abstract

A novel promising bootstrap subspace identification algorithm for both open and closed loop is presented. An outline of the SSARX algorithm by Jansson(2003) is given and a modified SSARX algorithm is presented. Some methods which are consistent for closed loop subspace system identification presented in the literature are discussed and compared to a recently published subspace algorithm which works for both open as well as for closed loop , i.e., the DSR e algorithm as well as the new bootstrap subspace method presented in this paper. Experimental comparisons are performed by Monte Carlo simulations.

Keywords: Subspace, Identification, Closed loop, Linear Systems, Kalman filter, Modeling

1. Introduction an optimized version PBSID opt presented. In Chiuso (2007b) the PBSID and PBSID opt methods are fur- Noticing that if the states of a linear dynamic system ther analyzed, and it is shown some asymptotic simi- are known then the problem of finding the model matri- larities with the SSARX and the PBSID algorithms. It ces is a problem, see e.g., Overschee is also shown that the PBSID opt algorithm is a row and de Moor(1996). Some methods for closed loop weighted version of the SSNEW algorithm in Ljung and subspace identification with state estimation along the McKelvey(1995). Furthermore, Chiuso(2007b) stated lines of the higher order ARX model approach pre- that the PBSID opt algorithm is found to be asymp- sented in Ljung and McKelvey(1995) are presented totically efficient on many examples but not in Jansson(2003, 2005) and Chiuso(2007a,b). In this in general. Based on this, it make sense to consider class of algorithms the states are estimated in a prelim- the PBSID opt algorithm and investigate its behavior inary step and then the model matrices are estimated relative to the other algorithms. as a linear regression problem. On the other hand there are subspace methods which In Ljung and McKelvey(1995) a method denoted are based on matrix equations in which the states are SSNEW with MATLAB m-file code is presented. In eliminated and instead based on projections in order Jansson(2003) a method denoted SSARX was pre- to estimate a subspace for the extended observability sented, and in Jansson(2005) a three step method de- matrix and then to estimate the Markov of noted NEW is presented. In Chiuso and Picci(2005) the system. The PARSIM-E (Qin and Ljung(2003), the “whitening filter” algorithm, (in later papers de- Qin et al.(2005) and DSR (Di Ruscio(1996), DSR e noted PBSID), is introduced, which is a variant of (Di Ruscio(2008, 2009)) methods may be viewed as the SSARX algorithm by Jansson(2003). In Chiuso subspace methods of this class which are based on ma- (2007a) the PBSID method is discussed further and trix equations where the states are eliminated from the

doi:10.4173/mic.2009.4.2 c 2009 Norwegian Society of Automatic Control Modeling, Identification and Control problem. rithm, denoted SSARX mod. In this modification The PARSIM-E method was compared against the we exclude an intermediate linear regression step DSR e method in Di Ruscio(2000) and not found to be and instead use one single projection in order to comparable with respect to the low variance estimates compute a basis for the states. This algorithm from DSR e algorithm. also includes one QR and one SVD decomposition. It would be of interest to compare the state Furthermore, observing that the residual of this based subspace algorithms, SSNEW, SSARX and projection is the future innovations, we use the PBSID opt, with the DSR e algorithm, in particular first of these innovations as known and solve the for systems with a low signal to noise ratio. This is one Kalman filter on innovations form for the model of the topics investigated in this paper. The SSNEW matrices, e.g. treat the innovations form model m-file in the original paper by Ljung and McKelvey as a deterministic system in which the predicted (1995) would be a natural starting point in this work. states, the inputs, the innovations and the outputs In the literature on closed loop subspace system iden- are known. This is the same idea as is used in the tification, the methods are usually always investigated DSR e algorithm. by numerical with reference signals equal to a white noise signal, leading to examples of systems • The modified SSARX algorithm denoted with a high signal to noise ratio. Jansson(2005) pre- SSARX mod presented in this paper has been sented an example where the reference signal is white found to produce estimates with lower Gaussian noise with unit variance, the same example is variance than the corresponding estimates from used in Jansson(2003), also with the same white refer- the recently published ARX based subspace ence signal. In Chiuso(2007b) several examples where identification algorithm PBSID opt in Chiuso presented, all with white reference signals. Many meth- (2007b), on some hard examples with a low signal ods perform almost equally well for systems with a high to noise ratio. signal to noise ratio, and where the reference signal is • With the modified SSARX method at hand we white noise. In order to distinguish methods and in propose a new bootstrap subspace identification order to find the most superior of the published meth- algorithm denoted SSARX mb. The first step in ods, one obvious option is to compare the methods on this algorithm is to estimate the model matrices systems with a moderate to low signal to noise ratio, with the SSARX mod algorithm and then perform subject to an informative input . Also most a few bootstrap iterations with the SSARX mb practical input and reference experiments are gener- algorithm. This algorithm results in a supe- ated by binary or pseudo random binary experiments. rior bootstrap subspace algorithm as shown in MATLAB m-file software for DSR e and PBSID opt Section8 of numerical Monte Carlo simulations. are available from the internet. An m-file for the The bootstrap subspace identification algorithm SSNEW algorithm is available in the original paper SSARX mb seems to produce parameter estimates by Ljung and McKelvey(1995), and used with minor with approximately the same variance as the cor- modifications. Software implementation of the SSARX responding estimates from the DSR e algorithm algorithm has not been available so an own Matlab and our Monte Carlo experiments in- m-file function has been implemented, available upon dicate that they are “close” to asymptotic equiv- request. alent. The contributions of this paper are itemized as fol- lows. • Monte Carlo simulation experiments, on two ex- amples, are presented which show that the DSR e • For the closed loop subspace methods where algorithm performs better than the SSNEW, MATLAB m-file software are available, SSNEW, SSARX, PBSID opt and SSARX mod algorithms, PBSID opt and DSR e, we only give a short re- i.e. produce parameter estimates with lower vari- view of the methods with the motivation to give a ance, for closed loop subspace system identifica- presentation of the methods before using them in tion, on two examples with low signal to noise ra- Section8 of numerical Monte Carlo simulations. tios. • Since m-file software is not available for the SSARX algorithm we give a detailed description • From the Monte Carlo simulation experiments we of this algorithm with the motivation of writing illustrate the efficiency of the modified SSARX al- an efficient m-file implementation of it. gorithms, e.g., SSARX mod, and in partiucular the bootstrap method SSARX mb, compared to • After presenting the SSARX algorithm, Jansson the SSARX method in Jansson(2003). The boot- (2003), we present a new modified SSARX algo- strap subspace algorithm, SSARX mb produced

204 Di Ruscio, “A Bootstrap Subspace Identification Method”

parameter estimates close to DSR e and PEM for Note that corresponding to the model defined by closed loop data. eqs. (1-2) on innovations form we may, if the system is not pure deterministic, define the more common • Finally we present a Monte Carlo simulation ex- Kalman filter on innovations form by defining the in- periment with the reference signal equal to a white −1 novations as εk = F ek and then K = CF is the noise signal, resulting in a system with a high sig- Kalman filter gain. Hence, the Kalman filter on inno- nal to noise ratio. For this example the behavior vations form is defined as of the algorithms, SSNEW, SSARX, PBSID opt, SSARX mod and DSR e are about the same. In- xk+1 = Axk + Buk + Kεk, (3) terestingly, for this example the PEM algorithm y = Dx + Eu + ε , (4) in MATLAB has convergence problems and pro- k k k k duced the worst results. where the innovations process εk have ma- T T • Interestingly, the DSR e algorithm is on these two trix E(εkεk ) = FF . examples, i.e on the examples with a low signal to The quintuple system matrices (A, B, C, D, E, F ) noise ratio, shown to give as efficient parameter and the Kalman filter gain K are of appropriate di- estimates as the Prediction Error Method (PEM). mensions. The problem addressed in this paper is to determine these matrices from the known data. Both The contributions in this paper are believed to be of closed and open loop systems are addressed. interest for the search for an optimal subspace identi- One should note that from eqs. (3-4) we find the fication algorithm for open and closed loop systems. Kalman filter prediction model as The rest of this paper is organized as follows. In Sec- tion2 the problem definition is given and some prelim- x = (A − KD)x + (B − KE)u + Ky , (5) inary notations and matrix notations used in the paper k+1 k k k are presented in Section3. In Section4 the higher or- yk = Dxk + Euk + εk. (6) der ARX model identification problem as well as the This Kalman filter prediction model is used in most of SSARX algorithm by Jansson(2003) are investigated the state based subspace identification algorithms. in detail. Based on the review of the SSARX algorithm a modified SSARX algorithm is presented in Section5. A novel bootstrap subspace system identification algo- rithm is presented in Section6. An outline of some 3. Preliminary theory and other subspace algorithms for closed loop systems are definitions presented in Section7. Some numerical Monte Carlo simulation examples are given in Section8 and finally 3.1. Basic matrix definitions some concluding remarks follow in Section9. The special structure of a Hankel matrix as well as some notations, which are frequently used 2. Problem formulation throughout the paper, are defined in the following. Given a vector sequence We consider linear state space dynamic models of the form nr sk ∈ R ∀ k = 0, 1, 2,..., (7)

xk+1 = Axk + Buk + Cek, (1) where nr is the number of rows in sk. yk = Dxk + Euk + F ek, (2) Define integer numbers j, i and nc and define the inr×nc matrix Sj|i ∈ R as follows with x0 as the initial predicted state and where a series of N input and output data vectors u and y ∀ k = k k  s s s ··· s  0, 1,...,N − 1 are known, and where there is possible j j+1 j+2 j+nc−1 def  sj+1 sj+2 sj+3 ··· sj+nc  feedback in the input data. In case of output feedback S =   , j|i  ......  the feed through matrix is zero, i.e. E = 0. Also  . . . . .  for open loop systems the feed through matrix may be sj+i−1 sj+i sj+i+1 ··· sj+i+nc−2 zero. We will include a structure parameter g = 0 in case of feedback data or for open loop systems in which which is defined as a Hankel matrix because of the spe- E = 0, and g = 1 for open loop systems when E is to cial structure. A Hankel matrix is symmetric and the be estimated. Furthermore, for the innovations model, elements are constant across the anti-diagonals. The eqs. (1-2), ek is white with unit , i.e. integer numbers j, i and nc have the following inter- T E(ekek ) = I . pretations:

205 Modeling, Identification and Control

• j is the start index or initial time in the sequence 0m×r denotes the m × r matrix with zeroes. A lower s im×im used to form Sj|i, i.e., sj, is the upper left vector block triangular Toeplitz matrix Hi ∈ R for the element in the Hankel matrix. quadruple (D, A, C, F ) is defined as   • i is the number of nr-block rows in Sj|i. F 0m×m 0m×m ··· 0m×m  DCF 0m×m ··· 0m×m  • nc is the number of columns in the Hankel matrix def   s  DAC DC F ··· 0m×m  S . Hi =   j|i  ......   . . . . .  One should note that this definition of a Hankel ma- DAi−2CDAi−3CDAi−4C ··· F trix Sj|i is slightly different to the notation used in Overschee and de Moor(1996) (pp. 34-35) where the Given two matrices A ∈ Ri×k and B ∈ Rj×k, the subscripts denote the first and last element of the first orthogonal projection of the row space of A onto the column in the block Hankel matrix, i.e. using the nota- row space of B is defined as tion in Overschee and de Moor(1996) a Hankel matrix T T † U0|i is defined by putting u0 in the upper left corner A/B = AB (BB ) B, (11) and u in the lower left corner and hence U would i 0|i where † denotes the More-Penrose pseudo-inverse of a have i + 1 rows. matrix. The following property is used Examples of such vector processes, sk, to be used in the above Hankel-matrix definition, are the measured  A  m A/ = A. (12) process outputs, yk ∈ R , and possibly known inputs, B r uk ∈ R . Some basic matrix definitions used in connection Proof of eq. (12) can be found in e.g., Di Ruscio(1997). with subspace methods are given as follows. The extended observability matrix, Oi, for the pair 3.2. Basic matrix equations (D,A) is defined as The following matrix equation relates the future states,   D XJ|1, to the past data matrices, U0|J and Y0|J , i.e.,  DA  O def=   ∈ im×n, (8)   i  .  R  ˜d ˜s  U0|J J . XJ|1 = CJ CJ + (A − KD) X0|1, (13)   Y0|J DAi−1 where the “future” states are defined as XJ|1 = where the subscript i denotes the number of block rows.  x x ··· x  ˜s s d J J+1 N−(J+L) , where CJ = CJ (A − The reversed extended controllability matrix, Ci , for KD,K) is the reversed extended controllability matrix the pair (A, B) is defined as ˜d d of the pair (A − KD,K), and CJ = CJ (A − KD,B − KE) is the reversed extended controllability matrix of d def  i−1 i−2  n×ir Ci = A BA B ··· B ∈ R , (9) d s the pair (A−KD,B −KE), and where CJ and CJ are defined in eqs. (9-10), respectively. where the subscript i denotes the number of block Notice also the following common matrix equation columns. A reversed extended controllability matrix, s in the theory of subspace system identification, i.e. Ci , for the pair (A, C) is defined similar to eq. (9), i.e., d s YJ|L = OLXJ|1 + HLUJ|L+g−1 + HLEJ|L. (14) s def  i−1 i−2  n×im Ci = A CA C ··· C ∈ R , (10) Eq. (14) is derived from the Kalman filter model on i.e., with B substituted with C in eq. (9). The lower innovations form, eqs. (1-2). A variant of eq. (14) is d im×(i+g−1)r block triangular Toeplitz matrix, Hi ∈ R , found from eqs. (5-6) but then with EJ|L in eq. (14) for the quadruple matrices (D, A, B, E). replaced by the innovations Hankel matrix εJ|L, and s   a Toeplitz matrix HL defined by using A := A − KD, E 0m×r 0m×r ··· 0m×r F := 0m×m and C := K, and the corresponding Hankel  DBE 0m×r ··· 0m×r  matrix Hd defined similarly. This variant of eq. (14) def   L d  DAB DB E ··· 0m×r  Hi =   is used in Jansson(2003) and presented in Section 4.2,  ......   . . . . .  eq. (21). DAi−2BDAi−3BDAi−4B ··· E Eq. (13) was used in Di Ruscio(2003) and may be proven from the Kalman filter state prediction eq. (5). where the subscript i denotes the number of block rows This equation is also used in other state based subspace and i+g−1 is the number of block columns, and where identification methods, e.g. Jansson(2003).

206 Di Ruscio, “A Bootstrap Subspace Identification Method”

J−i 4. On ARX based subspace when J → ∞. This that Ai = D(A−KD) K J−i identification and Bi = D(A − KD) B ∀ i = 1,...,J in this case. This regression problem is effectively solved through a We will in this section first discuss the relationship be- LQ (transpose of QR problem) factorization. tween a general linear state space model on innova- We have some possibilities for computing the actual tions form as in eqs. (3-4), and the relationship be- model matrices, if needed. tween a higher order ARX regression problem and how Notice that the ”multivariate” higher order ARX the Markov parameters of the system, as well as the model eq. (16) may be formulated as a ”univari- system parameters, may be extracted. These estimates ate” ARX model using that stacking each column in are used as a pre-estimation step in e.g., Jansson(2003) the product of three matrices, AXB, (of appropriate and Ljung and McKelvey(1995). Furthermore we will dimensions) onto each other, i.e. using the formula T discuss the SSARX algorithm by Jansson(2003) in vec(AXB) = (B ⊗ A)vec(X), then eq.(16) may be some detail. Based on this a modified SSARX algo- formulated as a ”univariate” OLS problem, i.e., rithm is presented in the next Section5 with an effi- vec(Y T ) = (I ⊗ W T )vec(θT ) + vec(εT ), (19) cient implementation of it, leading to a MATLAB m- J|1 m×m p J|1 file available upon request. or equivalently

T 4.1. Higher order ARX model with model vec(YJ|1) = (Wp ⊗ Im×m)vec(θ) + vec(εJ|1), (20)

reduction where Wp is a concatenated matrix of the ”past” data Hankel matrices Y and U , also defined later on in It is well known that a general linear state space model 0|J 0|J eq. (26). Here ⊗ is the Kronecker product. This means on innovations form may be identified from a higher that the ”optimal” univariate Partial order ARX model followed by model reduction. As a (PLS) algorithm, see e.g., Di Ruscio(2000), may be reference of this we mention a quote from Ljung(1999) used in order to solve the higher order ARX problem on p. 336, “This means that a high order ARX model is in cases when the matrix W W T is ill-conditioned. capable of approximating any linear system arbitrarily p p Option 1: From the parameters in this higher or- well.” der ARX model we may construct a non minimal state A “large” past horizon parameter J is specified such space model of order mJ. Following with model reduc- that (A − KD)J ≈ 0. We then have the input and tion by using Hankel matrix realizations we may find a output ARX model model with the correct system order, 1 ≤ n ≤ mJ. This strategy is the same as used for solving a de- yk = A1yk−J + ··· + AJ yk−1 terministic identification problem in section 6.2 in Di +B1uk−J + ··· + BJ uk−1 + εk = Ruscio(2009), i.e. using J := L in that algorithm. PJ PJ i=1 Aiyk−(J+1−i) + i=1 Biuk−(J+1−i) + εk,(15) A method based on this approach is capable of pro- ducing correct estimates for deterministic systems even m×m m×r where Ai ∈ R and Bi ∈ R ∀ i = 1,...,J are for a relatively small past horizon parameter J, and matrices with system parameters to be estimated. We the reason for this is that the ARX model parameters only consider the case with a delay of one sample, i.e. are used. Using this strategy directly, based on Monte without the direct feed through term (E = 0). Carlo simulation experiments, it is found to give unre- From the observed data and the input output ARX liable estimation results, in particular for systems with model eq. (15), form the higher order Ordinary Least a low signal to noise ratio, and not comparable with Squares (OLS) or ARX regression problem the corresponding results from the DSR e algorithm. Option 2: Another option is to use the estimate  Y  Y = θ 0|J + ε , (16) of the Markov parameters of the Kalman filter predic- J|1 U J|1 0|J tion model, i.e., construct D(A − KD)i−1  BK  ∀ i = 1,...,J from the estimated parameter vector where the parameter matrix, θ ∈ m×J(m+r), is related R θ by using the relationship given by eq. (18). These to the ARX model parameters, as follows Markov parameters (impulse responses) are used in the   SSARX method by Jansson(2003) as a pre-estimation θ = A1 ··· AJ B1 ··· BJ , (17) step for the Markov parameters, in order to overcome and to the Markov parameters of the Kalman filter the correlation problem in closed loop systems, as we prediction model as will illustrate in the next subsection 4.2. It is also possible to use Hankel matrix realization  ˜s ˜d  θ = D CJ CJ , (18) theory, Ho and Kalman(1966), Zeiger and McEwen

207 Modeling, Identification and Control

(1974), with these Markov parameters and then find- the Toeplitz matrices are known one may form the re- ing a realization for the Kalman filter predictor model gression problem matrices A − KD, B, K and D and then finally com- puting A from A − KD with known D and K. In θ˜ z }| {   this strategy the past horizon has to be chosen large ˜ ˜  ˜d ˜s  U0|J YJ|L = OL CJ CJ + εJ|L, (22) in order for (A − KD)J to be negligible, even for a Y0|J deterministic system, and the reason for this is that θ = D  C˜s C˜d  in eq. (18) only when J is large, where the left hand side in the regression problem, J J ˜ i.e. J → ∞. YJ|L, is known and given by In practice, many subspace methods based on the ˜ ˜ d ˜ s higher order ARX approach discussed in this section YJ|L = YJ|L − HLUJ|L+g−1 − HLYJ|L−1. (23) are believed to only work satisfactorily for systems with Eq. (22) is found by using eq. (13) in eq. (21) with J → white noise reference signals or experiments, and for a ∞, and the future states XJ|1 is related to the past relatively “large” past horizon parameter J. Our view   on this is that such methods may not produce efficient  ˜d ˜s  U0|J data Hankel matrices as XJ|1 = CJ CJ . parameter estimates in general. This is also found from Y0|J ˆ numerous simulation experiments, and this approach From this regression problem we find an estimate, θ˜, is out of in comparison with the results from of the matrix both DSR e and PEM, for systems with a relatively ˜ ˜  ˜d ˜s  low signal to noise ratio, and therefore not considered θ = OL CJ CJ . (24) further. For another view and discussion of a similar ap- For the sake of completeness, θ˜ is computed as the OLS proach is the Higher Order ARX (HOARX) strategy estimate in Qin and Ljung(2006), where also two numerical ex- ˜ˆ ˜ T −1 amples with high past horizons J = 10 and J = 20 and θ = YJ|LWp(WpWp ) , (25) white reference signals are presented. where 4.2. The SSARX method  U  W = 0|J . (26) p Y An outline of the SSARX method by Jansson(2003) 0|J is given in the following. However, one should note In Jansson(2003) analysis is used that a variant of SSARX denoted NEW is presented as described in AppendixA. Here we illustrate with in Jansson(2005). The differences with SSARX and SVD and the difference is minor from our simulation NEW is pointed out in Section 4.3. experiments. Following by a SVD of this matrix, i.e., The first step in the SSARX method is to identify a higher order ARX model, i.e., equivalent to the re- ˆ θ˜ = USV T ≈ U S V T , (27) gression problem in eq. (16), and then use the Markov 1 1 1 parameter estimates in eq. (18) to form the Toeplitz where U1 = U(:, 1 : n), S1 = S(1 : n, 1 : n) and matrices H˜ d and H˜ s in the matrix equation L L V1 = V (:, 1 : n). This gives estimates O˜L = U1 and  C˜d C˜s  = S V T if an output normal realization Y = O˜ X + H˜ d U + H˜ s Y + ε . (21) J J 1 1 J|L L J|1 L J|L+g−1 L J|L−1 J|L is chosen. If not known in advance, the system order, n, may be taken as the number of non-zero singular Note that this matrix equation is obtained from the values in S. Kalman filter prediction model, eqs. (5-6). The ex- tended observability matrix of the pair (D,A − KD), Then finally an estimate of the states is constructed as follows i.e. O˜L = OL(A − KD,D), is defined as in eq. (8). The Toeplitz matrices H˜ d = Hd (A − KD,B − KE,D)     L L ˆ  d s  U0|J T U0|J ˜ s s XJ|1 = C˜ C˜ = S1V . (28) and HL = HL(A − KD,K,D) have the same struc- J J Y 1 Y d s 0|J 0|J ture as HL and HL defined in Section 3.1 with matrix definitions, respectively. Note that we use F = 0 and The last part of the SSARX algorithm is to find the E = 0 for closed loop systems, in the definitions of the model matrices A, B, K and D from the Kalman filter Toeplitz matrices. on prediction form, eqs. (3-4), as presented in Jansson One problem in case of closed loop data is that the (2003, 2005), as follows. The output matrix estimate innovations noise term, εJ|L, is correlated with the fu- ˆ T T −1 ture Hankel matrices UJ|L+g−1 and YJ|L−1 but since D = yJ|1XJ|1(XJ|1XJ|1) , (29)

208 Di Ruscio, “A Bootstrap Subspace Identification Method”

and the innovations as the residual of this regression, the first step and finds updated estimates of O˜L and  ˜d ˜s  i.e., CJ CJ . This is described to be equivalent to tak- ing a Newton step. Finally the states are computed. εJ|1 = yJ|1 − yJ|1/XJ|1, (30) This is, as we understand it, the main difference com- pared to the SSARX method, in which H˜ d and H˜ s and A, B and K from the regression problem L L are estimated from the preliminary higher order ARX   problem as is described in Sections 4.2 and 4.1. XJ|1   XJ+1|1 = ABK  uJ|1  . (31) εJ|1 5. Modified SSARX algorithms An assumption in this algorithm is that the past We will in this section discuss an alternative imple- horizon, J, is large so that the term (A−KD)J is neg- mentation of the SSARX method which is found su- ligible. Hence, this algorithm would be biased for finite perior to the SSARX algorithm in Section 4.2. This J. However, the method is producing correct estimates results in a new modified SSARX algorithm, denoted in the deterministic noise free case and it is a nice ex- SSARX mod. ample of an algorithm utilizing a pre-estimation step in ˜ order to formulate the right hand side YJ|L in eqs. (22- 23), i.e. an higher order ARX regression problem is 5.1. Modified SSARX algorithm used, in order to estimate the Markov parameters of If a pre-estimated model or Markov parameters are the Kalman filter on prediction form. not known in advance, we use the same higher or- The SSARX algorithm is found to be asymp- der ARX/OLS regression problem as initially in the totic equivalent with the PBSID algorithm in Chiuso SSARX method by Jansson(2003), i.e., solving the re- (2007b) where also an optimized version, PBSID opt, gression problem eq. (16) with parameters related to algorithm is presented. A short view on this algorithm the Markov parameters as in eq. (18). Hence, pre- is given in Section 7.3. estimated Toeplitz matrices H˜ d and H˜ s are known in Noticing that the regression problem, eqs. (22) and L L advance. (25), for the parameter matrix θ˜ is actually not needed, From eq. (21) we have we propose an alternative more efficient SSARX imple- ˜ mentation in the next Section5. YJ|L z }| { Y − H˜ d U − H˜ s Y = O˜ X + ε . (33) 4.3. Discussion J|L L J|L+g−1 L J|L−1 L J|1 J|L From the higher order ARX regression problem it is From this we find the projection equation possible to find the model matrices A, B, D directly. It ˜ ZJ|L = OLXJ|1, (34) is therefore also possible to form the regression problem where d YJ|L − HLUJ|L−1 =  U    Z = Y˜ / 0|J , (35)  ˜d ˜s  U0|J s J|L J|L OL CJ CJ + HJ EJ|L, (32) Y0|J Y0|J and Y˜ is defined in eq. (23), i.e. the left hand side which may be an alternative to the method in Jansson J|1 of eq. (33). In order to prove this we use that (2003). However, this choice is not found to improve the estimates from Monte Carlo simulations.   U0|J One should note that a variant of SSARX denoted XJ|L = XJ|L/ , (36) Y0|J NEW is presented in Jansson(2005). The algorithm denoted, NEW, is a three step method. Constraints when J → ∞. Notice also eq. (13) in this connec- are included in the 1st step regression problem, i.e. tion. Instead of using an SVD of the “large” basis ma- eq. (21) with the future states taken from eq. (13), is trix, ZJ|L, (which is possible but time consuming), for considered as a linear regression problem in the matri- the states we propose the following LQ decomposition  ˜d ˜s  ˜ d ces OL CJ CJ , and the Toeplitz matrices HL and (transpose of QR decomposition), i.e. ˜ s HL are constrained to be block lower triangular. In the ˜  ˜d ˜s  ZJ|L = RQ. (37) 2nd step initial estimates of OL and CJ CJ , are computed through canonical correlation analysis be- Following by an SVD tween the future and the past, as in AppendixA. In T T the 3rd step one returns to the regression problem in R = USV ≈ U1S1V1 , (38)

209 Modeling, Identification and Control

where U1 = U(:, 1 : n), S1 = S(1 : n, 1 : n) and V1 = 5.3. Discussion V (:, 1 : n). The system order may be taken as the The main differences in the new modified SSARX number of non-zero singular values in S. This gives method, denoted SSARX mod, and the original the following estimate of the states, i.e., SSARX method by Jansson(2003) are itemized as fol- ˆ T lows: XJ|1 = S1V1 Q. (39)

One should here note that the future horizon has to • In the first instance we skip the regression step be chosen such that the system order is bounded by eq. (27) and hence, we do not compute the pa- 1 ≤ n ≤ mL. rameter matrix given by eq. (24). Instead we use The model matrices are found similar to the SSARX a single projection in order to compute a basis for algorithm in Section 4.2, i.e. as in eqs. (29) and the state, eqs. (34-35) and (37). (31). This modified SSARX algorithm is denoted • In Jansson(2003) the output matrix, D, is com- SSARX mod1 and used in the Monte Carlo simulations puted from a regression problem of the output in Section8. equation, as in eq. (29) and the innovations εJ|1 (needed in order to find A, B and K from the state 5.2. Modified SSARX algorithm using the equation) as the residual of this regression, as in innovations eq. (30).

One should now observe that the residual of the projec- Instead we find the future innovations, εJ|L, di- tion problem, eqs. (33-34), gives the following estimate rectly from the residual of the projection described of the future innovations in the first item, i.e. as in eq. (40), and use the first block row, ε as known in the last regression   J|1 ˜ ˜ U0|J problem for the model matrices as in eqs. (41-42). εJ|L = YJ|L − YJ|L/ . (40) Y0|J Remark 5.1 Based on the observations in this section This indicates an alternative implementation of the al- we propose a bootstrapping subspace system identifica- gorithm, i.e., in addition using the innovations as in Di tion algorithm in the next Section6. Observing that Ruscio(2008, 2009). An alternative recursive compu- the initial higher order ARX identification problem for tation procedure for the future innovations is presented the Markov parameters used to define the Toeplitz ma- in Qin and Ljung(2003). ˜ d ˜ s trices HL and HL actually is not needed if the model Instead of computing the model matrices as in Jans- matrices are known or estimated from other algorithms. son(2003, 2005) we also use the innovations, eq. (40), This bootstrapping method seems to converge in a few in addition to the state estimates, eq. (39). Hence, iterations. we propose to solve a deterministic problem, as in the DSR e algorithm. However, here we use the state es- timates and an estimate of the output matrix is taken 6. A novel bootstrap subspace as (when E = 0, i.e. no direct feed-through term) algorithm Dˆ = (y − ε )XT (X XT )−1, (41) J|1 J|1 J|1 J|1 J|1 The higher order ARX regression pre-estimation step used in many subspace identification algorithms, e.g. and the innovation, εJ|1, is taken as the first block row in the innovations estimate, eq. (40). Furthermore A, as in Ljung and McKelvey(1995), Jansson(2003), B and K are computed from the regression problem Chiuso(2007b), for estimating the Markov parame- similar as in the SSARX algorithm eq. (31), i.e., ters (impulse responses) of the Kalman filter predic- tion model may be ill-conditioned, in particular for sys-   tems with a low signal to noise ratio. This may be one XJ|1   reason for the increased in the estimates for XJ+1|1 = ABK  uJ|1  . (42) some colored reference signals used. This is observed εJ|1 from our Monte Carlo simulations, see e.g. the exam- This last modified SSARX algorithm is denoted ples in Section8 and the examples in Di Ruscio(2009) SSARX mod2 and used in the Monte Carlo simulations where one observed “high” variance estimates from the in Section8. The differences in these modified SSARX PARSIM-E algorithm by Qin and Ljung(2003); Qin algorithms and the SSARX algorithm presented in Sec- et al.(2005). tion 4.2 are virtually small, but may be seen as major One idea of this section is to relax the higher or- from the Monte Carlo simulations in Section8. der ARX regression problem and instead start with

210 Di Ruscio, “A Bootstrap Subspace Identification Method” another initial model at hand, e.g. the zero model Step 0: i = 0. A0 = 0, B0 = 0, D0 = 0 and K0 = 0. Then we obtain We suggest two options for initializing the boot- the projection approximate equation (for convenience strap subspace algorithm. Chose one of the follow- with the further presentation, also define a first iterate ing: index i = 1) 1. Find initial estimates of the Toeplitz matri- ˜ ces, H˜ d (i = 0) and H˜ s (i = 0), from e.g. the ZJ|L(i − 1) := OLXJ|1(i), (43) L L higher order ARX/OLS regression problem in where the matrix ZJ|L(i − 1) is obtained by projecting eq. (16) where the ARX model parameter ma- the row space of the “future” Hankel matrix, YJ|L, onto trix, θ, is related to the Markov parameters as the row space of the “past” input and output Hankel in eq. (18). matrices U0|J and Y0|L, respectively, i.e., ˜ d 2. Chose an initial “zero” model, i.e., HL(i =   0) = 0 and H˜ s (i = 0) = 0, i.e., starting from U0|J L ZJ|L(i − 1) := YJ|L/ , (44) a zero model A = 0, B = 0, D = 0 and Y0|J K = 0, or from some other a-priori specified where the projection, “/”, operator is defined in model. eq. (11). Also compute the innovations estimate as Here index i is the bootstrap iteration index. the residual of this projection, i.e. Choosing a few bootstrap iterations, e.g. ib = 2   or i = 3 and the following algorithm seems to U0|J b εJ|L(i − 1) := YJ|L − YJ|L/ . (45) converge rapidly. Put i := 1 and go to Step 2 in Y0|J this algorithm. From eq. (43) we obtain the state estimate Step 1: 1 ≤ i ≤ ib. From some initial known model T XJ|1(i) := S1V1 Q, (46) matrices Ai−1,Bi−1,Di−1,Ki−1 form the Toeplitz matrices where Q is computed from the QR decomposition as in eq. (37) and S and V from the SVD in eq. (38). ˜ d 1 1 HL(i − 1) = From the estimated state sequence in eq. (46) we obtain Hd (A − K D ,B ,D ), (47) a new model, A , B , D and K from the regression L i−1 i−1 i−1 i−1 i−1 i i i i ˜ s problems given by eqs. (41-42). With this new model HL(i − 1) = s at hand the above procedure may be repeated, i.e., HL(Ai−1 − Ki−1Di−1,Ki−1,Di−1), (48) putting i := i + 1 and replace Y in eqs. (44-45) with J|L where Hd and Hs are defined as in Section (3.1). Y˜ (i − 1) given as the left hand side of eq. (33). This L L J|L Note that the last m block column in Hs is skipped illustrates the first iteration for i = 1 in the Algorithm L and that the matrix have 0 blocks on the di- 6.1 to be presented below. m×m agonal. Similarly, the last r block column in Hd It is remarkable that this iterative algorithm has L is skipped when g = 0, i.e. for closed loop system been found, on our Monte Carlo simulation examples in in which the direct feed-through term is zero, and Section8, to converge within a few iterations 1 ≤ i ≤ ib E = 0m×r on the block diagonal in this case. where it seems to be sufficient with ib = 2 or ib = 3 iterations. Other initial models may be used, e.g. the Step 2: Compute from the modified SSARX algo- Toeplitz matrices which are used in the SSARX algo- rithm in Sections 5.1 and 5.2 an updated model rithm by Jansson(2003), or other initial models. This Ai,Bi,Di,Ki, e.g., computed by the SSARX mod2 is further discussed in and after the Algorithm 6.1 be- algorithm, i.e., form the “future” corrected out- low. puts, At each iteration only an orthogonal projection for ˜ a basis for the states, and a least squares regression YJ|L(i − 1) := problem for the model matrices, are computed. We will ˜ d ˜ s YJ|L − HL(i − 1)UJ|L+g−1 − HL(i − 1)YJ|L−(49)1. denote this procedure for a bootstrap subspace identifi- cation method, similar as the presentation of bootstrap and then the projection of the “future” onto the methods in Ljung(1999) p. 334. “past” Based on the above description we propose a novel Z (i − 1) = O˜ (i)X (i), (50) bootstrap subspace identification method with outline J|L L J|1 as in Algorithm 6.1 below. where Algorithm 6.1 (Bootstrap subspace method)   ˜ U0|J ZJ|L(i − 1) := YJ|L(i − 1)/ , (51) Y0|J

211 Modeling, Identification and Control

The rest of this step of the algorithm is as described ilarities with the DSR e algorithm and the parameter by eqs. (37) and (42). estimates are close to the corresponding estimates from DSR e. Monte Carlo simulation experiments indicate Step 3: if i < ib go to Step 1, else A := Aib , also that the SSARX mb and DSR e algorithms are B := Bib , D := Dib and K := Kib and quit. close and possibly asymptotic equivalent. The proposed bootstrap subspace algorithm should This bootstrap subspace identification algorithm is probably (and as proposed in this work) be based on denoted SSARX mb and used in Section8 with number the Kalman filter on prediction form, eqs. (5-6), and its of bootstrap iterations ib = 3 as default. (·) mb stands corresponding Hankel matrix eq. (21) or equivalently for “modified” with “bootstrap” iterations. eq. (33) since the predictor is stable, i.e., A−KD eigen- The main idea of the algorithm is that instead of values inside the unit circle. This is probably the main using the pre-estimation problem in the SSARX al- reason for our observation that this bootstrap iteration gorithm, i.e. instead of using the first higher or- subspace algorithm indeed converges within a few iter- der regression Step 0 in the above algorithm, we in- ations, even for a zero initial model. Also remembering stead use the model estimates Ai−1,Bi−1,Di−1,Ki−1 that the Kalman filter itself and its corresponding con- from the previous Step 2 and perform a few iterations, vergence properties in the sense that the covariance 1 ≤ i ≤ ib, in order to compute the resulting model matrix of the state estimation error is minimized. Fur- matrices A := Aib ,B := Bib ,D := Dib and K := Kib . ther convergence analysis of this bootstrap algorithm The first Step 0 in this algorithm may be skipped should be performed, which is a topic for further re- and an initial model may be taken from other algo- search. rithms, or simply as the “zero” model as commented upon below. This indicates possibilities for variants of Remark 6.1 We have found that we may chose the the algorithm. initial model in Step 0 or Step 1 equal to zero, i.e. On Example8, the algorithm converged to the same choosing an initial model A0 = 0, B0 = 0, D0 = 0 and model, irrespective of initial model. This is good news, K0 = 0 in Step 1 of the bootstrap Algorithm 6.1, seems because an iterative algorithm should preferably con- to give the same model after a sufficiently large number verge to the optimal solution, irrespective of initial val- of bootstrap iterations, ib, for some examples but not ues. This is investigated further in Section8 of exam- in general. ples, see e.g., Tables4 and5. However, it is well known This indicates that the preliminary higher order as described in Ljung(1999) on p.338 that e.g. the it- ARX regression step in some subspace identification erative prediction error method only is guaranteed to algorithms may be unnecessary. This bootstrap sub- converge to a local solution and to find the global solu- space identification algorithm is promising and should tion one have to start the iterations at different feasible be further investigated, e.g. investigate if including a initial values. On our MIMO Example 8.2 we observed row weighting in the projection eq. (50) is influencing that local solutions of the bootstrap subspace identifi- upon the variance, e.g., by using the CCA approach as cation exists, and starting with a zero model for this in AppendixA. example resulted in a biased model. However, starting with an initial model from the higher order ARX strat- egy resulted in a unbiased model with approximately 6.1. Additional details as optimal parameter estimates as as the corresponding The aim of this subsection is to present some details PEM estimates. This is further documented in Exam- and insight into the projections in the bootstrap Al- ple 8.2. gorithm 6.1. Notice that the central iteration in Algo- Notice also that if ib = 1, only one bootstrap it- rithm 6.1, i.e. eqs. (49)-(51) may be written as eration, this algorithm is equivalent to the modified   SSARX method in Section5, denoted SSARX mod, if ˜ ˜ U0|J ZJ|L(i − 1) = OL(i)XJ|1(i) = YJ|L(i − 1)/ the initial model is taken from the higher order ARX Y0|J regression problem.   U0|J = YJ|L/ As far as we know there is no subspace system identi- Y0|J fication algorithm in the literature which utilizes boot-  U   U  strap iterations. The idea and the algorithm illustrated −θ (i − 1) J|L+g−1 / 0|J , m Y Y in this section have been found to give superior pa- J|L−1 0|J rameter estimates compared to the original SSARX (52) method as well as the PBSID opt and SSNEW meth- where the parameter matrix, θm(i − 1), ods as illustrated in Section8 of examples. The method  ˜ d ˜ s  SSARX mb illustrated in this Section has strong sim- θm(i − 1) = HL(i − 1) HL(i − 1) . (53)

212 Di Ruscio, “A Bootstrap Subspace Identification Method” is defined in terms of the Markov parameters of the We may also implement the bootstrap method, i.e. model matrices Ai−1,Bi−1,Di−1,Ki−1 from the previ- Eqs. (56) and (58), with one QR decomposition for ous iteration. computing the projections. Note that eq. (49) may be more compactly written We have as  U  0|J  R 0   Q  ˜ ˜ Y = 11 1 . (59) YJ|L(i − 1) = OL(i)XJ|1(i) + εJ|L =  0|J  R R Q Y˜ 21 22 2  U  J|L  −H˜ d (i − 1) H¯ s (i − 1)  J|L+g−1 . L L Y | {z } J|L from this we obtain the projections θ¯m(i−1) Z (i − 1) = O˜ X = R Q , (60) (54) J|L L J|1 21 1 εJ|L = R22Q2. (61) ¯ s Here, HL is a modified Toeplizt matrix with the Markov parameters of the stochastic part of the sys- An alternative which may be investigated is as follows. From the following LQ (transpose of QR decomposition tem in the lower part and with identity matrices Im×m on the diagonal, i.e., we have)    I 0 ··· 0  U0|J      −DKI ··· 0   Y0|J  R11 0 Q1 ¯ s def   = . (62) HL =  . . .  , (55)  UJ|L+g−1  R21 R22 Q2  . . .    YJ|L −DA¯L−2K −DA¯L−3K ··· I From this we have where we have defined A¯ = A − KD for convenience.     ¯ s ˜ s Lm×Lm UJ|L+g−1 U0|J Note also that HL = I − HL ∈ R and that the / = R21Q1, (63) ¯ s ˜ s YJ|L Y0|J term HL(i−1)YJ|L in Eq. (54) is equal to YJ|L −HL(i− 1)YJ|L−1 in Eq. (49). which is to be used in the projection for the states Eq. (54) gives insight because it nicely shows Eq. (56) and the data involved, i.e. the ”future” Hankel matrix        ⊥ UJ|L+g−1 U0|J UJ|L+g−1 U0|J and the ”past” Hankel matrix = R22Q2. (64) YJ|L Y0|J YJ|L Y0|J which is used to remove the future innovations, εJ|L. Hence, at each iteration we have that a basis for the This QR decomposition approach is an alternative to states are computed as the direct computations illustrated in the bootstrap subspace system identification algorithm. Notice also ˜ ZJ|L(i − 1) = OL(i)XJ|1(i) = that this decomposition is performed once, prior to the     iterations in Algorithm 6.1. ¯ UJ|L+g−1 U0|J θm(i − 1) / , YJ|L Y0|J (56) 7. Outline of some other subspace ¯ where the parameter matrix θm is given by methods

¯  ˜ d ¯ s  θm(i − 1) = −HL(i − 1) HL(i − 1) . (57) We will in this section give a short review of the closed loop subspace system identification algorithms DSR e Also notice that from Eq. (40) we have that the future (Di Ruscio(2008, 2009)), SSNEW (Ljung and McK- innovations are computed as elvey(1995)) and PBSID opt (Chiuso(2007b)). The aim is not to go into deep details, and for this we re-  U  ε = Y˜ (i − 1) − Y˜ (i − 1)/ 0|J fer to the corresponding papers. The motivation is to J|L J|L J|L Y 0|J give a short presentation of the methods which are to    ⊥ ¯ UJ|L+g−1 U0|J be compared by numerical Monte Carlo simulations in = θm(i − 1) , (58) YJ|L Y0|J the next Section8 of examples.

⊥ where () denotes the orthogonal compliment to the 7.1. The DSR e method matrix. The above illustrate the central projections in the The DSR e method as discussed in Di Ruscio(2008, iterations for i > 1. 2009) is a simple subspace algorithm. Below we give a

213 Modeling, Identification and Control short outline connected to the Monte Carlo comparison The idea of the SSNEW method is to first estimate experiment presented in this paper. the parameters of a higher order ARX model, e.g. as If the innovations process was known in addition to in eq. (17), and thereafter construct future predictions the input and output data then we would have found from this higher order ARX estimated model, and from a perfect model. Having this in mind it would be of this form a basis for the states. interest to find an efficient way of estimating the inno- vations process. An efficient estimate is as discussed below. 7.3. The PBSID opt method The DSR e algorithm is linked to the higher order In Chiuso(2007b) the Predictor Based Subspace IDen- ARX model approach in the first step of the algorithm. tification methods (PBSID) and the optimized version However, instead of computing the model from the PBSID opt are discussed. These methods are based higher order ARX model we only use the residual in on constructing a basis for the state space from the order to obtain an estimate of the innovations. This is Kalman filter on prediction form. These methods be- indeed a great difference which gives more numerically long to the class of methods which utilize the fact that reliable results. once the states are known then the model matrices are Step 1 in the DSR e algorithm is as follows: For found from a linear regression problem. “large” J the innovations sequence ε = FE is J|1 J|1 The PBSID algorithm was first presented in Chiuso consistently estimated as and Picci(2005) under the name “whitening filter algo-   rithm”. The “whitening filter algorithm” is also inves- U0|J εJ|1 = FEJ|1 = YJ|1 − YJ|1/ . (65) tigated in Qin and Ljung(2006) and where it is shown Y0|J that this algorithm is a bank of high order ARX models d in the regression step to extract the Markov parame- Note that both the signal part, yJ|1 = DXJ|1 = yJ|1 − ters. The PBSID algorithm was found to give asymp- εJ|1, and the innovation part, εJ|1, are used in the dsr e algorithm. totically the same variance estimates as the CCA (also Step 2 in the DSR e algorithm is a deterministic denoted Canonical Variate Analysis (CVA)) algorithm identification problem. In Di Ruscio(2009) two op- by Larimore(1983, 1990) in case of white inputs. In tions were presented. case of colored non-white inputs the optimized PBSID One option is actually to construct a higher or- algorithm is presented in Chiuso(2007a), and it was der ARX model with future parameter L bounded found that the PBSID opt algorithm perform better or as 1 ≤ n ≤ mL, and then construct a higher order similar to the CCA algorithm in case of colored inputs. state space model with system order mL followed by It is in Chiuso(2007b) found that the PBSID and model reduction by Hankel matrix realization, Ho and SSARX method by Jansson(2003) are asymptotically Kalman(1966), Zeiger and McEwen(1974). This op- equivalent. The optimized version of PBSID, i.e. the tion is found to work properly if L is equal to the sys- PBSID opt method, is using a weighted least squares tem order (SISO) case but it will produce unreliable problem in order to estimate the predictors which are results for increasing L, based on the Monte Carlo sim- used to form a basis for the state space, and this is one ulation experiment in Section8. Hence, this option is difference from their original PBSID method. It is in not considered further. Chiuso(2007b) also found that the PBSID opt method Solving the 2nd Step in the DSR e algorithm as a is a row weighted version of the SSNEW method by deterministic identification problem as in Section 6.1 in Ljung and McKelvey(1995). Di Ruscio(2009) is found to produce very promising In the PBSID algorithm a basis for the state, satis- numerical results regarding variance and consistency. fying a system similar to eq. (34), is solved from sev- This feature is in this paper illustrated in Section8 eral oblique projections (as in Overschee and de Moor with numerical Monte Carlo simulations. (1996)), i.e. considering each block row in eq. (33) at a time. In the PBSID opt algorithm each block row ˜ 7.2. The SSNEW method in YJ|L is solved for the corresponding block row in θ, eq. (24), as a vectorized prob- Another algorithm essentially similar to the higher or- lem, i.e., solving vec(YJ+i|1) ∀ i = 0,...,L − 1 for the der ARX model approach discussed in the above Sec- unknown parameters. The rest of these algorithms may tion 4.1 is the SSNEW method presented in the origi- be performed similar as in the SSARX algorithm, Jans- nal paper by Ljung and McKelvey(1995) where also an son(2003, 2005). m-file code script is presented, also used in Section 8.1 We have included the PBSID opt algorithm as one with numerical examples in this paper. This method of the methods to be compared by Monte Carlo simu- is further discussed in Ljung and McKelvey(1996). lation in Section 8.1 of numerical examples.

214 Di Ruscio, “A Bootstrap Subspace Identification Method”

7.4. Discussion Pseudo Random Binary (PRBS) signal generated in Matlab as R = 0.1 ∗ idinput(N,0 prbs0, [0, 1/50]) In the SSNEW method by Ljung and McKelvey(1995) and r = R(k) ∀ k = 1,...,N. The simulation a higher order ARX model is estimated in the first step. k horizon equals N = 1000. The parameters in this higher order ARX model are used to construct future predictors which are used to Case 2: An integrator system with A = 1, B = form a basis for the states. Using the estimated states 0.5 and K = 1. Innovations ek, controller and the model matrices are computed. In the SSNEW al- reference rk same as in Case 1 above. gorithm then both the states and the innovations are estimated and assumed known. The reference signal used in this example is a pseudo In the first step of the DSR e algorithm only the random binary signal with clock period of 50, i.e., residual of a higher order ARX model is used, i.e., with- the signal is approximately constant over intervals of out computing or using the parameters in the higher length 50 samples. The reference experiment is infor- order ARX model. This is indeed a major difference mative enough. as we will illustrate in Section8 with numerical exam- The system was simulated with discrete time in- ples, especially when measured on the variance of the stants 1 ≤ k ≤ N. This was done M = 100 times with estimation results. different noise realizations on the innovations ek but Since the PBSID algorithm is asymptotically equiv- with the same reference signal, rk, i.e. a Monte Carlo alent with the SSARX method by Jansson(2003) we simulation is performed for both the above cases. For find it useful to compare the DSR e algorithm with the subspace algorithms DSR e, PBSID opt, SSNEW, the PBSID opt and SSARX algorithms, only. A Monte SSARX and SSARX mb methods we used the same Carlo simulation example is presented in the next sec- algorithm past horizon parameter, J = 6 but with tion. varying future horizon in the range 1 ≤ L ≤ 5. The system identification Toolbox Ident function pem was used with the calls dat = iddata(Y, U, 1) and m = 8. Examples pem(dat, n) with system order n = 1. In order to investigate if the DSR e algorithm is ca- 8.1. SISO one state closed loop system pable of producing as efficient estimates as the optimal In Di Ruscio(2009) it was found that the PARSIM- PEM method we implemented the 2nd deterministic E method fails to give comparable results as the PEM identification problem in the DSR e algorithm by using and DSR e methods on a SISO system with a white in- PEM, i.e. using PEM in order to solve the determinis- novations process and a white reference signal. In this tic identification problem with known inputs uJ|1, the d example we compare the DSR e method with PEM and estimated innovations εJ|1 and estimated outputs yJ|1. the recently published PBSID opt algorithm, Chiuso The results of this in comparison with the correspond- (2007b), as well as the SSNEW method in the original ing results from PEM are illustrated in Fig.1. The paper by Ljung and McKelvey(1995). Furthermore results are important because it shows that the DSR e we also investigate the SSARX algorithm by Jansson algorithm is capable of producing almost similar results (2003) as described in Section 4.2 and the modified as PEM, on this example. It is also from this clear that SSARX algorithms, SSARX mod1, SSARX mod2 and it is of central importance to implement the 2nd deter- the bootstrap subspace method SSARX mb presented ministic identification step in the DSR e algorithm as in Section5. efficient as possible. This example also tells us that we Consider the following system with proper order of have implemented the 1st important step in the DSR e appearance algorithm in an efficient way, i.e. that the innovations d εJ|1 and the signal part yJ|1 = DXJ|1 are consistent yk = xk + ek, (66) and (close to) efficient estimates. In Figs.2 and9 we present the same Monte Carlo uk = −Kpyk + rk, (67) experiment but with the actual DSR e algorithm with x = Ax + Bu + Ke , (68) k+1 k k k the 2nd deterministic identification problem solved as We consider the following two cases: a subspace identification problem as presented in Sec- tion 6.1 in Di Ruscio(2009). The results are promising Case 1: Same parameters as in Di Ruscio(2009), i.e., and DSR e (for L = 3 in this example) seems to pro- A = 0.9, B = 0.5, K = 0.6 and an initial value duce estimates with lower variance than PEM. Notice x1 = 0. ek is white noise with however, that using L = 1 the DSR e estimates are 1.0. For the controller we use Kp = 0.6. Instead approximately similar to the PEM estimates. of a white noise reference signal we use rk as a In order to better compare the results we measure

215 Modeling, Identification and Control

A parameter estimates: PBSID A parameter estimates: PEM A parameter estimates: DSR_e(PEM) opt A parameter estimates: DSR_e 1.5 1.5 2 2

1 1 1.5 1.5 1 1 0.5 0.5 0.5 0.5

0 0 0 0 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 B parameter estimates: PBSID B parameter estimates: PEM B parameter estimates: DSR_e(PEM) opt B parameter estimates: DSR_e 2 2 5 5

1 1 0 0 0 0

−1 −1 −5 −5 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 K parameter estimates: PBSID K parameter estimates: PEM K parameter estimates: DSR_e(PEM) opt K parameter estimates: DSR_e 1.5 1.5 2 2

1 1 1 1 0 0 0.5 0.5 −1 −1

0 0 −2 −2 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo)

Figure 1: A, B and K parameter estimates of the Figure 3: Parameter estimates of the closed loop sys- closed loop system in Example 8.1 with pa- tem in Example 8.1 with parameters as in rameters as in Case 1. Past horizon J = 6 Case 1. Future horizon L = 3 and past hori- for the DSR e method with the determinis- zon J = 6. The PBSID opt algorithm as in tic identification 2nd step solved by using the Chiuso(2007a). PEM method.

A parameter estimates: PEM A parameter estimates: DSR_e A parameter estimates: SSNEW A parameter estimates: DSR_e 1.5 1.5 2 2

1 1 1 1 0 0 0.5 0.5 −1 −1

0 0 −2 −2 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

B parameter estimates: PEM B parameter estimates: DSR_e B parameter estimates: SSNEW B parameter estimates: DSR_e 2 2 2 2

1 1 1 1 0 0 0 0 −1 −1

−1 −1 −2 −2 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

K parameter estimates: PEM K parameter estimates: DSR_e K parameter estimates: SSNEW K parameter estimates: DSR_e 1.5 1.5 1 1

0.5 0.5 1 1 0 0 0.5 0.5 −0.5 −0.5

0 0 −1 −1 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo)

Figure 2: A, B and K parameter estimates of the Figure 4: Parameter estimates of the closed loop sys- closed loop system in Example 8.1 with pa- tem in Example 8.1 with parameters as in rameters as in Case 1. Future horizon L = 3 Case 1. Future horizon L = 3 and past hori- and past horizon J = 6. The DSR e al- zon J = 6. The SSNEW method as in Ljung gorithm compared with corresponding PEM and McKelvey(1995). estimates.

216 Di Ruscio, “A Bootstrap Subspace Identification Method”

A parameter estimates: SSARX A parameter estimates: DSR_e A parameter estimates: SSARX_mod2 A parameter estimates: DSR_e 2 2 2 2

1 1 1.5 1.5

0 0 1 1

−1 −1 0.5 0.5

−2 −2 0 0 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

B parameter estimates: SSARX B parameter estimates: DSR_e B parameter estimates: SSARX_mod2 B parameter estimates: DSR_e 5 5 2 2

1.5 1.5

0 0 1 1

0.5 0.5

−5 −5 0 0 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

K parameter estimates: SSARX K parameter estimates: DSR_e K parameter estimates: SSARX_mod2 K parameter estimates: DSR_e 2 2 2 2

1 1 1.5 1.5

0 0 1 1

−1 −1 0.5 0.5

−2 −2 0 0 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo)

Figure 5: Parameter estimates of the closed loop sys- Figure 7: Parameter estimates of the closed loop sys- tem in Example 8.1 with parameters as in tem in Example 8.1 with parameters as in Case 1. Future horizon L = 3 and past hori- Case 1. Future horizon L = 3 and past hori- zon J = 6. The SSARX method as in Jans- zon J = 6. The 2nd modified SSARX method son(2003). as presented in Section 5.2.

A parameter estimates: SSARX_mod1 A parameter estimates: DSR_e A parameter estimates: SSARX_mb A parameter estimates: DSR_e 2 2 1.5 1.5

1.5 1.5

1 1 1 1

0.5 0.5

0 0 0.5 0.5 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

B parameter estimates: SSARX_mod1 B parameter estimates: DSR_e B parameter estimates: SSARX_mb B parameter estimates: DSR_e 5 5 2 2

1 1

0 0 0 0

−1 −1

−5 −5 −2 −2 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

K parameter estimates: SSARX_mod1 K parameter estimates: DSR_e K parameter estimates: SSARX_mb K parameter estimates: DSR_e 2 2 1 1

1 1

0 0 0.5 0.5

−1 −1

−2 −2 0 0 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo)

Figure 6: Parameter estimates of the closed loop sys- Figure 8: Parameter estimates of the closed loop sys- tem in Example 8.1 with parameters as in tem in Example 8.1 with parameters as in Case 1. Future horizon L = 3 and past hori- Case 1. Future horizon L = 3 and past hori- zon J = 6. The 1st modified SSARX method zon J = 6. The bootstrap subspace method as as presented in Section 5.1. presented in Section6.

217 Modeling, Identification and Control

A parameter estimates: PEM B parameter estimates: PEM A parameter estimates: SSNEW A parameter estimates: DSR_e 1.5 2 1.5 1.5

1 1 1 1 L=1 L=1 0.5 0 0.5 0.5

0 −1 0 0 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

A parameter estimates: DSR_e B parameter estimates: DSR_e A parameter estimates: SSNEW A parameter estimates: DSR_e 1.5 2 2 2

1 1 1 1 L=1 L=1 L=2 L=2 0.5 0 0 0

0 −1 −1 −1 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100

A parameter estimates: DSR_e B parameter estimates: DSR_e A parameter estimates: SSNEW A parameter estimates: DSR_e 1.5 2 2 2

1 1 1 1 L=2 L=2 L=3 L=3 0.5 0 0 0

0 −1 −1 −1 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 0 20 40 60 80 100 Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo) Number of simulations (Monte carlo)

Figure 9: A and B parameter estimates of the closed Figure 11: A parameter estimates of the closed loop loop system in Example 8.1 with parameters system in Example 8.1 with parameters as as in Case 1. Varying future horizon param- in Case 1. Varying future horizon parame- eter, L = 1, 2 and fixed past horizon J = 6 ter, L = 1, 2, 3 and fixed past horizon J = 6. for the DSR e method, Di Ruscio(2009). Results from SSNEW, Ljung and McKelvey (1995), and DSR e, Di Ruscio(2009).

the size of the covariance matrix of the error between the estimates and the true parameters, i.e.,

A parameter estimates: PBSID opt A parameter estimates: DSR_e M 1.5 1.5 N X ˆ ˆ T P = (θi − θ0)(θi − θ0) , (69) 1 1 alg M − 1 i=1 L=1 L=1 0.5 0.5 as 0 0 0 20 40 60 80 100 0 20 40 60 80 100

A parameter estimates: PBSID V = trace(P ), (70) opt A parameter estimates: DSR_e alg alg 2 2 1.5 1.5 where subscript “alg” means the different algorithms, 1 1 L=2 L=2 i.e. PEM, DSR e, PBSID opt, SSNEW SSARX, 0.5 0.5 SSARX mod and SSARX mod2. For Case 1 the true 0 0  T 0 20 40 60 80 100 0 20 40 60 80 100 parameter vector is θ0 = 0.9 0.5 0.6 and the A parameter estimates: PBSID T opt A parameter estimates: DSR_e ˆ   2 2 corresponding estimates θ = Aˆ Bˆ Kˆ for each i i 1.5 1.5 estimate i = 1,...,M in the Monte Carlo simulation. 1 1 L=3 L=3 From the simulation results of Case 1 we obtain the 0.5 0.5 results as in Table1 and for Case 2 as in Table2. 0 0 0 20 40 60 80 100 0 20 40 60 80 100 As we see the variance is close and approximately Number of simulations (Monte carlo) Number of simulations (Monte carlo) the same for L = 1. However, when the future horizon Figure 10: A parameter estimates of the closed loop increases the variance of the PBSID opt, SSARX and system in Example 8.1 with parameters as SSNEW methods seems to diverge and produce bad in Case 1. Varying future horizon parame- estimates. Interestingly, the DSR e method behaves ter, L = 1, 2, 3 and fixed past horizon J = 6. completely different and produce parameter estimates Results from PBSID opt, Chiuso(2007b), with a smaller variance as the future horizon increases. and DSR e, Di Ruscio(2009) This is also the case for the bootstrap subspace method SSARX mb which produces estimates close to the cor- responding estimates from DSR e, see Tables1 and2. In order to investigate the convergence properties of the bootstrap method, SSARX mb, we implemented

218 Di Ruscio, “A Bootstrap Subspace Identification Method”

Table 1: Results from Monte Carlo simulations, with Table 4: Parameters as in Case 1. The trace of the co- parameters as in Case 1. The trace of the co- variance matrix, Palg, of the error between es- variance matrix, Palg, of the error between timates and true parameters. Varying future estimates and true parameters. A pseudo horizon, L, vs the number of bootstrap itera- random ref. signal, R = 0.1 ∗ idinput tions, ib, of the algorithm SSARX mb. Result (N,0 prbs0, [0, 1/50]) with N = 1000 and past from the higher order ARX regression prob- horizon J = 6. SISO example with A = 0.9, lem as initial model. B = 0.5, K = 0.6 and Kp = 0.6.

Valg L = 1 L = 2 L = 3 L = 5 L|ib ib = 1 ib = 2 ib = 3 ib = 4

VPEM 115.47 115.47 115.47 115.47 1 99.79 99.79 99.79 99.79

VDSR e 99.93 53.31 44.70 44.70 2 115.94 87.12 87.24 87.23

VPBSID opt 99.96 350.79 569.38 1128.8 3 119.12 80.00 79.45 79.59

VSSNEW 95.19 486.69 761.08 1459.1 Table 5: Parameters as in Case 1. The trace of the co- VSSARX 99.94 2287.4 3189.9 4063.7 variance matrix, P , of the error between es- VSSARX mod1 99.94 355.14 569.90 1110.9 alg timates and true parameters. Varying future VSSARX mod2 99.79 115.94 119.12 144.96 horizon, L, vs the number of bootstrap itera- VSSARX mb 99.93 107.15 109.04 110.65 tions, ib, in the SSARX mb algorithm. A zero Table 2: Results from Monte Carlo simulations, with initial model, i.e., A0 = 0, B0 = 0, D0 = 0 and parameters as in Case 2. The trace of the co- K0 = 0. variance matrix, Palg, of the error between estimates and true parameters. A pseudo L|ib ib = 1 ib = 2 ib = 3 ib = 4 random ref. signal, R = 0.1 ∗ idinput 1 99.79 99.79 99.79 99.79 (N,0 prbs0, [0, 1/50]) with N = 1000 and past 2 115.94 87.43 87.23 87.23 horizon J = 6. Integrator example with 3 119.12 80.89 79.44 79.59 A = 1, B = 0.5, K = 1 and Kp = 0.6.

Valg L = 1 L = 2 L = 3 L = 5 the algorithm with different number of bootstrap it-

VPEM 665.44 665.44 665.44 665.44 erations, and different initial models. See Tables4

VDSR e 564.25 144.67 57.98 26.65 and5. As we see from this example ib = 2 or ib = 3

VPBSID opt 564.29 677.17 828.28 1256.8 bootstrap iterations is enough. And even more impres-

VSSNEW 553.95 2539.1 3590.0 5596.8 sive, the bootstrap method seems to converge to the

VSSARX 564.28 18921.5 31483.2 53966.3 same model, irrespective of initial model. This is good

VSSARX mod1 564.28 677.91 830.97 1291.1 news for which statistically efficiency possibly may be proven. VSSARX mod2 564.04 568.76 572.15 981.58 As we see from Figs.2 to 12 presented in this paper, VSSARX mb 564.04 343.38 216.74 154.09 the estimates from the DSR e algorithms seem to be Table 3: Results from Monte Carlo simulations, with superior compared to the corresponding results from parameters as in Case 1. The trace of the the other subspace algorithms, SSNEW, SSARX and PBSID opt. covariance matrix, Palg, of the error between estimates and true parameters. A Gaussian Also the DSR e algorithm with future horizon pa- white noise ref. signal, R = randn(N, 1)), rameter L = 3 seems to produce parameter estimates i.e. with unit variance and N = 1000. Past with smaller variance compared to the corresponding horizon J = 6. SISO example with A = 0.9, estimates from PEM, see Figs.2 and9. This may also be seen from Tables1 and2. The reason for this is B = 0.5, K = 0.6 and Kp = 0.6. not clear, because PEM is capable of producing opti- Valg L = 1 L = 2 L = 3 L = 5 mal estimates. However, this may be due to a “trade V 24.36 24.36 24.36 24.36 PEM off between bias and variance”, but this is not further V 5.84 4.13 4.18 5.38 DSR e discussed. Notice as mentioned that the parameter es- V 4.49 3.87 3.86 3.88 PBSID opt timates from DSR e are unbiased and approximately V 4.25 5.60 5.82 6.45 SSNEW similar to the PEM estimates for L = 1 on this exam- V 4.40 4.64 4.72 4.62 SSARX ple, but the variance seems to be smaller but biased V 4.40 4.58 4.67 4.54 SSARX mod1 for increasing future horizon and in particular L = 3. V 4.42 4.52 4.69 4.63 SSARX mod2 Noticing that the behavior of the PBSID opt, SSNEW VSSARX mb 4.42 5.08 4.77 4.99 and SSARX methods seems to diverge for increasing future horizon.

219 Modeling, Identification and Control

This same behavior is observed with the parameters where in Case 2 above. The results are approximately  1.5 1 0.1   0 0  the same for future horizon L = 1. In Fig. 12 we A =  −0.7 0 0.1  ,B =  0 1  , (74) illustrate the A parameter estimates from PBSID opt 0 0 0.85 1 0 and DSR e for varying future horizon parameter L.  3 0 −0.6  The performance of the DSR e algorithm seems to be D = . (75) superior compared to the PBSID opt algorithm. 0 1 1 The feedback is obtained with Finally, we also used a white reference signal in the  0.2 0  G = . (76) Case 1 example and the results are presented in Table 0 0.2 3. In this case all methods produced approximately the same model but with PBSID opt producing the small- and rk with a binary sequence as a reference for each est criterion Valg. However, the differences between of the two outputs in yk, generated by using the the methods are minor. MATLAB IDENT Toolbox function idinput, i.e., R =   0 0 R1 R2 with R1 = idinput(N, prbs , [0, 1/50]) and R = idinput(N,0 prbs0, [0, 1/75]). A parameter estimates: PBSID 2 opt A parameter estimates: DSR_e 2 2 The process noise vk and measurements noise, wk T 2 1 1 are white with covariance matrices E(vkvk ) = 0.05 I3 T 2 L=2 L=2 and E(wkw ) = 0.1 I2, respectively. For comparison 0 0 k purpose we present the three eigenvalues of the system, −1 −1 0 20 40 60 80 100 0 20 40 60 80 100 one real and a complex conjugate pair, i.e. A parameter estimates: PBSID opt A parameter estimates: DSR_e 3 3 λ1 = 0.85, (77) 2 2 λ2,3 = 0.75 ± j0.37. (78) 1 1 L=3 L=3 0 0 A Monte Carlo simulation with M = 100 different −1 −1 0 20 40 60 80 100 0 20 40 60 80 100 experiments, 1 ≤ i ≤ M, is performed. The simu- A parameter estimates: PBSID opt A parameter estimates: DSR_e lation results for the eigenvalue estimates from PEM, 3 3 PBSID opt, DSR e and the SSARX mb methods are 2 2 illustrated in Fig. 13 for number of samples N = 1000 1 1 L=4 L=4 0 0 and in Fig. 14 for N = 10000 samples. For the DSR e

−1 −1 and SSARX mb methods we used the algorithm hori- 0 20 40 60 80 100 0 20 40 60 80 100 Number of simulations (Monte carlo) Number of simulations (Monte carlo) zon parameters, J = 6 and L = 2. For the PBSID opt method we had to chose L = 3 in order to obtain re- Figure 12: A parameter estimates of the closed loop sults, probably du to the definition of the future hori- system in Example 8.1 with parameters as zon parameter in this method. in Case 2. Varying future horizon parame- The initial model for the SARX mb method was ter, L = 2, 3, 4 and fixed past horizon J = 6. taken from a higher order ARX model with past hori- zon J = 6. For this example the SSARX mb method The estimation results from the SSARX mb algo- converged to a biased model when a zero initial model was used, which indicates that the initial model for the rithm in Table 1 converged to the same VSSARX mb values irrespective of the initial models used, e.g. for a SSARX mb method should be reasonable. zero initial model, an initial model from a higher order For this MIMO system with three states example ARX strategy or using the results from the SSARX we observed sensitivity for the initial model chosen in algorithm as initial values. the new bootstrap subspace identification algorithm SSARX mb. Using a zero initial model resulted in a biased model, however using an initial model from 8.2. Closed loop MIMO 2 × 2 system with the higher order ARX strategy resulted in a unbiased n = 3 states model with approximately the same variance as the corresponding PEM estimates. Consider the MIMO output feedback system 9. Conclusion yk = Dxk + wk, (71) uk = G(rk − yk), (72) We have in this paper shown by numerical Monte Carlo xk+1 = Axk + Buk + vk. (73) simulations, based on one example presented, that the

220 Di Ruscio, “A Bootstrap Subspace Identification Method”

DSR : eigenvalue estimates DSR : eigenvalue estimates PEM: eigenvalue estimates e PEM: eigenvalue estimates e 0.6 0.6 0.6 0.6

0.5 0.5 0.5 0.5

0.4 0.4 0.4 0.4

0.3 0.3 0.3 0.3 Im Im Im Im 0.2 0.2 0.2 0.2

0.1 0.1 0.1 0.1

0 0 0 0

−0.1 −0.1 −0.1 −0.1 0.6 0.7 0.8 0.9 0.6 0.7 0.8 0.9 0.6 0.7 0.8 0.9 0.6 0.7 0.8 0.9 Re Re Re Re

PBSID_opt: eigenvalue estimates SSARX_mb: eigenvalue estimates PBSID_opt: eigenvalue estimates SSARX_mb: eigenvalue estimates

0.5 0.5 0.5 0.5

0.4 0.4 0.4 0.4

0.3 0.3 0.3 0.3 Im Im Im Im 0.2 0.2 0.2 0.2

0.1 0.1 0.1 0.1

0 0 0 0

−0.1 −0.1 −0.1 −0.1 0.6 0.7 0.8 0.9 0.6 0.7 0.8 0.9 0.6 0.7 0.8 0.9 0.6 0.7 0.8 0.9 Re Re Re Re

Figure 13: Eigenvalue estimates from the PEM, Figure 14: Eigenvalue estimates from the PEM, PBSID opt, DSR e and SSARX mb PBSID opt, DSR e and SSARX mb methods. The correct eigenvalues are methods. The correct eigenvalues are λ1 = 0.85 and a complex conjugate pair, λ1 = 0.85 and a complex conjugate pair, λ2,3 = 0.75 ± j0.3708. Complex eigenvalues λ2,3 = 0.75 ± j0.3708. Complex eigenvalues are in complex conjugate pairs. Hence, the are in complex conjugate pairs. Hence, the negative imaginary part is not presented. negative imaginary part is not presented. Number of samples, N = 1000. Number of samples, N = 10000.

to produce parameter estimates close to the corre- DSR e algorithm outperforms the SSNEW, SSARX sponding estimates from PEM and the DSR e algo- and PBSID opt methods for closed loop subspace sys- rithm. Monte Carlo simulation experiments indicate tem identification, in particular for systems with col- some asymptotic equivalent properties with the boot- ored (non-white) reference signals and when the future strap subspace method and the DSR e method. This horizon is larger than the system order, i.e., L > n, i.e. work is believed to be important for the search for a on the examples presented in this paper. One other variance efficient subspace identification algorithm. examples the performance are more similar. On the SISO one state example presented the vari- ance is approximately the same when the future hori- A. Canonical correlation analysis zon, L, is equal to the system order (L = 1). How- ever, the algorithms behave completely differently for In Jansson(2003, 2005) the Canonical Correlation increasing future horizon. The DSR e algorithm pro- Analysis (CCA) also known as Canonical Variate Anal- duced estimation results with smaller variance which ysis (CVA) is used in order to obtain the estimate of O˜L seems to converge, while the corresponding variance and the states XJ|L. See also Overschee and de Moor from the SSNEW, SSARX and PBSID opt algorithms (1996). Consider the LS problem, eq. (22), with pa- produced estimation results with increasing variance as rameter matrix, θ˜, defined in eq. (24), i.e., the future horizon increases. ˜ ˜ The original SSARX algorithm is discussed and a YJ|L = θWp, (79) new modified version is presented. We have presented where Wp contains the past data Hankel matrices as a modified implementation of the SSARX algorithm, defined in eq. (26). The OLS estimate of eq. (79) is Jansson(2003), which produces estimates with vari- ˜ˆ ˜ T −1 ances which are close to the variance on the correspond- θ = YJ|LWp(WpWp ) . (80) ing PBSID opt algorithm, Chiuso(2007b), even for a finite data example and for colored reference signal. Define a matrix, M, which is a weighting of the param- eter matrix estimate, eq. (80), as follows Based on the modified SSARX algorithm we present a new bootstrap subspace identification algorithm T − 1 ˆ T 1 M = (Y˜ Y˜ ) 2 θ˜(W W ) 2 which is found promising. This bootstrap algorithm J|L J|L p p 1 1 ˜ ˜ T − 2 ˜ T T − 2 seems to converge after a few iterations and seems = (YJ|LYJ|L) YJ|LWp (WpWp ) . (81)

221 Modeling, Identification and Control

Perform the SVD of M Di Ruscio, D. Subspace system identification of the Kalman filter: open and closed loop systems. In T T M = USV ≈ U1S1V1 , (82) Proc. Intl. Multi-Conf. on Engineering and Techno- logical Innovation. 2008. where S1 = S(1 : n, 1 : n) contains the n largest sin- gular values different from “one”, not “zero”, since the Di Ruscio, D. Closed and Open Loop Subspace Sys- “canonical angles” are considered, and U1 = U(:, 1 : n), tem Identification of the . Model- V1(:, 1 : n). Putting eq. (81) equal to the approxima- ing, Identification and Control, 2009. 30(2):71–86. tion in eq. (82), i.e., doi:10.4173/mic.2009.2.3.

T − 1 ˆ T 1 T Ho, B. L. and Kalman, R. E. Effective construction of M = (Y˜ Y˜ ) 2 θ˜(W W ) 2 = U S V , (83) J|L J|L p p 1 1 1 linear state-variable models from input/output func- which gives tions. Regelungstechnik, 1966. 14(12):545–592.

1 1 Jansson, M. Subspace Identification and ARX Model- ˜ˆ ˜ ˜ T 2 T T − 2 θ = (YJ|LYJ|L) U1S1V1 (WpWp ) . (84) ing. In 13th IFAC Symp. on System Identif. 2003. In Jansson(2003, 2005) an input normal realization is Jansson, M. A new subspace identification method for used and hence, open and closed loop data. In IFAC World Congress. 2005. ˆ T 1 O˜ = (Y˜ Y˜ ) 2 U S , (85) L J|L J|L 1 1 Larimore, W. E. System identification, reduced order 1 ˆ T T − 2 filtering and modeling via canonical variate analysis. XJ|1 = V1 (WpWp ) . (86) In Proc. Am. Control Conf. pages 445–451, 1983. References Larimore, W. E. Canonical variate analysis in identifi- cation, filtering and adaptive control. In Proc. 29th Chiuso, A. On the relation between CCA and pre- Conf. on Decision and Control. pages 596–604, 1990. dictor based subspace identification. IEEE Trans- Ljung, L. System Identification: Theory for the User. action on Automatic Control, 2007a. 52(10):1795– Prentice Hall PTR, 1999. 1812. doi:10.1109/TAC.2007.906159. Ljung, L. and McKelvey, T. Subspace identification Chiuso, A. The role of vector autoregressive from closed loop data. 1995. Technical Report LiTH- modeling in predictor-based subspace identifica- ISY-R-1752, Link¨opingUniversity, Sweden. tion. Automatica, 2007b. 43(6):1034–1048. doi:10.1016/j.automatica.2006.12.009. Ljung, L. and McKelvey, T. Subspace identification from closed loop data. , 1996. Chiuso, A. and Picci, G. Consistency analy- 52(12):209–215. doi:10.1016/0165-1684(96)00054-0. sis of some closed-loop subspace identification methods. Automatica, 2005. 41(3):377–391. Overschee, P. V. and de Moor, B. Subspace identifica- doi:10.1016/j.automatica.2004.10.015. tion for linear systems. Kluwer Acad. Publ., 1996. Di Ruscio, D. Combined Deterministic and Stochas- Qin, S. J. and Ljung, L. Closed-loop subspace iden- tic System Identification and Realization: DSR-a tification with innovation estimation. In Proc. 13th subspace approach based on observations. Model- IFAC SYSID Symposium. pages 887–892, 2003. ing, Identification and Control, 1996. 17(3):193–230. Qin, S. J. and Ljung, L. On the role of future horizon doi:10.4173/mic.1996.3.3. in closed-loop subspace identification. In Proc. 14th Di Ruscio, D. On subspace identification of the ex- IFAC SYSID Symposium. pages 1080–1084, 2006. tended observability matrix. In 36th Conf. on Deci- Qin, S. J., Weilu, L., and Ljung, L. A novel sub- sion and Control. 1997. space identification approach with enforced causal Di Ruscio, D. A weighted view of the partial least models. Automatica, 2005. 41(12):2043–2053. squares algorithm. Automatica, 2000. 36(6):831–850. doi:10.1016/j.automatica.2005.06.010. doi:10.1016/S0005-1098(99)00210-1. Zeiger, H. and McEwen, A. Approximate linear re- Di Ruscio, D. Subspace System Identification of the alizations of given dimensions via Ho’s algorithm. Kalman Filter. Modeling, Identification and Control, IEEE Trans. on Automatic Control, 1974. 19(2):153. 2003. 24(3):125–157. doi:10.4173/mic.2003.3.1. doi:10.1109/TAC.1974.1100525.

222