Professional Documents
Culture Documents
N4SID " Subspace Algorithms For The Identification of Combined Deterministic-Stochastic Systemst
N4SID " Subspace Algorithms For The Identification of Combined Deterministic-Stochastic Systemst
00
Printedin Great Britain. (~ 1993PergamonPressLtd
Abstract--Recently a great deal of attention has been given alternatives. This is especially true for high-order
to numerical algorithms for subspace state space system multivariable systems, for which it is not trivial
identification (N4SID). in this paper, we derive two new
N4SID algorithms to identify mixed deterministic-stochastic
to find a useful parameterization among all
systems. Both algorithms determine state sequences through possible parametrizations. This parametrization
the projection of input and output data. These state is needed to start up the classical identification
sequences are shown to be outputs of non-steady state
Kalman filter banks. From these it is easy to determine the
algorithms (see e.g. Ljung, 1987), which means
state space system matrices. The N4SID algorithms are that a priori knowledge of the order and of the
always convergent (non-iterative) and numerically stable observability (or controllability) indices is
since they only make use of QR and Singular Value
Decompositions. Both N4S1D algorithms are similar, but the
required.
second one trades off accuracy for simplicity. These new With N4SID algorithms, most of this a priori
algorithms are compared with existing subspace algorithms in parametrization can be avoided. Only the order
theory and in practice.
of the system is needed and it can be determined
through inspection of the dominant singular
1. INTRODUCTION values of a matrix that is calculated during the
THE GREATER PART OF the systems identification identification. The state space matrices are not
literature is concerned with computing polyno- calculated in their canonical forms (with a
mial models, which are however known to minimal number of parameters), but as full state
typically give rise to numerically ill-conditioned space matrices in a certain, almost optimally
mathematical problems, especially for Multi- conditioned basis (this basis is uniquely deter-
Input Multi-Output systems. Numerical algo- mined, so that there is no problem of
rithms for subspace state space system identifica- identifiability). This implies that the observ-
tion (N4SID*) are then viewed as the better ability (or controllability) indices do not have to
be known in advance.
Another major advantage is that N4SID
* Numerical algorithms for Subspace State Space System
Identification. Read as a Californian license plate: enforce it. algorithms are non-iterative, with no non-linear
t Received 6 March 1992; revised 2 September 1992: optimization part involved. This is why they do
revised 15 January 1993; received in final form 19 March not suffer from the typical disadvantages of
1993. The original version of this paper was presented
at the 12th IFAC Congress which was held in Sydney, iterative algorithms, e.g. no guaranteed conver-
Australia, during 19-23 July 1993. The Published Pro- gence, local minima of the objective criterion
ceedings of this IFAC Meeting may be ordered from: and sensitivity to initial estimates.
Pergamon Press Limited, Headington Hill Hall, Oxford
OX3 0BW, U.K. This paper was recommended for publica- For classical identification, an extra para-
tion in revised form by the Guest Editors. Corresponding metrization of the initial state is needed when
author: Peter van Overschee. Fax +32-16-221855; E-mail estimating a state space system from data
vanoverschee@esat.kuleuven.ac.be.
ESAT, Department of Electrical Engineering, Katho- measured on a plant with a non-zero initial
lieke Universiteit Leuven, Kardinaal Mercierlaan 94, 3001 condition. A final advantage of the N4SID
Heverlee, Belgium. Research Assistant of the Belgian algorithms, is that there is no difference between
National Fund for Scientific Research.
§ Research Associate of the Belgian National Fund for zero and non-zero initial states.
Scientific Research. Most commonly known subspace methods are
75
76 P. VAN OVERSCHEE and B. DE MOOR
Moonen et al. (1989), Moonen and Ramos System matrices I Kalman states
(1991), where a state space model is computed I
directly from a block Hankel matrix constructed
from the input-output data. In a first step, a FIG. I. The left-hand side shows the N4S1D approach: first
the (Kalman) states, then the system matrices. The
state vector sequence is computed as an interface right-hand side is the classical approach: first the system, and
between a 'past' and a 'future'. Once the state then an estimate of the states.
vector sequence is known, the system matrices
are computed from a set of linear equations.
Similar data-driven identification schemes for
purely stochastic identification are well known,
data. This projection retains all the information
(see e.g. Arun and Kung (1990) and the
(deterministic and stochstic) in the past that is
references therein). Less well known is that
useful to predict the future. Then, the state
these algorithms can compute extremely biased
space matrices are determined from this state
results. This problem was studied and solved by
sequence. Figure 1 shows how these N4SID
Van Overschee and De Moor (1991a, b).
algorithms differ from the classical identification
The problem addressed in this paper is that of
schemes.
identifying a general state space model for com-
The connection of the two new N4SID
bined deterministic-stochastic systems directly
algorithms with the existing algorithms described
from the input-output data. Some papers in
above will also be indicated.
the past have already treated this problem but
This paper is organized as follows: the
from a different viewpoint. In Larimore (1990)
problem description and the mathematical tools
for instance, the problem is treated from a pure
can be found in Section 2. In Section 3 the main
statistical point of view. There is no proof of
projection is defined. Section 4 introduces a
correctness (in a sense of the algorithms being
closed form formula for the non-steady state
asymptotically unbiased) whatsoever. In De
Kalman filter estimation problem. This result is
Moor et al. (1991) and Verhaegen (1991) the
related to the results of Section 3 to find the
problem is split up into two subproblems:
interpretation of the main projection as a
deterministic identification followed by a stoch-
sequence of outputs of a non-steady state
astic realization of the residuals. In Moonen et
Kalman filter bank. Section 5 introduces a first
al. (1992) the problem is solved for double
N4SID algorithm that identifies the system
infinite block Hankel matrices, which implies
matrices exactly. In Section 6 accuracy is traded
practical computational problems.
off for simplicity in a second approximate N4SID
In this paper, we will derive two N4SID
algorithm. Section 7 shows how these N4SID
algorithms that determine the deterministic and
algorithms can be implemented in a numerically
stochastic system at the same time. The
reliable way, using the Q R and the Singular
connection with classical system theory (Kalman
Value Decomposition (SVD). Section 8 investi-
filter) will be used to prove the exactness
gates the connection with other existing algo-
(unbiasedness for an infinite number of measu-
rithms. Finally Section 9 will treat some
rements) of Algorithm 1, or the degree of
comparative examples. The conclusions can be
approximation (calculation of the bias for an
found in Section 10.
infinite number of measurements) of Algorithm
2.
The approach adopted here is similar to the 2. PRELIMINARIES
identification schemes of Moonen et aL (1989) In this section, we describe the linear time
for the purely deterministic case and Van invariant system we want to identify. We also
Overschee and De Moor (1991a, b) for the introduce the input and output block Hankel
stochastic case. First a state sequence is matrices, the past and future horizon as well as
determined from the projection of input-output the input-output equations.
N4SID: Identification of combined systems 77
*E
[(b:)
(w$ v~) = (S~.),
S')
R" dikl -> 02 (3)
model of the form described above, find A, B,
C, D, Q', R "~, S' (up to within a similarity
transformation)•
In the next two sections, we will define some
and A , Q " e N ..... , B e N ...... , C e R I×', D e more useful properties and notations for the
1~1.... , S ~ e N "×t and R ~ e N t×t. The input vectors deterministic and the stochastic subsystem•
u, e N ''×~ and output vectors YkelW ×' are 2.1.1. The deterministic subsystem• Associated
measured• o, e N~×' and wk e I~"×' on the other with the deterministic subsystem (4)-(5), we
hand are unmeasurable, Gaussian distributed, define the following matrices:
(c/
zero mean, white noise vector sequences• • The extended (i > n) observability matrix F,
{A, C} is assumed to be observable, while (where the subscript i denotes the number
{A, (B (Q.,)it2)} is assumed to be controllable• of block rows)
This system (1)-(2) is split up in a
deterministic and stochastic subsystem, by
splitting up the state (xk) and output (y~) in a CA
deterministic (.,i) and stochastic (.") component:
-i - CA:
xk = x a+x~., Yk = y d + y ~ . The deterministic
state (x d) and output (yd) follow from the
deterministic subsystem, which describes the CAi-ll
influence of the deterministic input (Uk) on the
deterministic output • The reversed extended controllability matrix
Q A}~ (where the subscript i denotes the
Xd+I = A x d + BUk, (4) number of block columns)
and
yd = Cx a + Dut. (5) Ad~'(Ai-'B A'-2B ... AB B).
The controllable modes of {A, B} can be either • The lower block triangular Toeplitz matrix
stable or unstable. The stochastic state (x~) and H~'
output (y~) follow from the stochastic sub- H~"
system, which describes the influence of the
noise sequences (wk and ok) on the stochastic
0 0 " i\ )
output CB D 0 ...
x~ +, = Ax'~ + Wk, (6) CAB CB D . .
and
y~ = Cx~ + ok. (7)
CAi-2B
The controllable modes of { A , ( Q ' ) Irz} are
assumed to be stable. 2.1.2. The stochastic subsystem. For the
The deterministic inputs (uk) and states (x d) stochastic subsystem (6)-(7) we define
and the stochastic states (xl) and outputs ( y i )
are assumed to be quasi-stationary (as defined in e~ %' E[x~(x~)']
dcf ~ x t
Ljung, 1987). Note that even though the G = E[xT(yk) ]
deterministic subsystem can have unstable An d~, E[y~(y~)'].
modes, the excitation (Uk) has to be chosen in
such a way that the deterministic states and With equations (3), (6) and (7) and through
output are finite for all time. Also note that since stability of the controllable modes of the system
the systems {A, B} and {A, (Q.,-)i/--,} are not {A, (Q,).2}, we find easily that the following
assumed to be controllable, the deterministic equations are satisfied:
and stochastic subsystem may have common as
p, = AP~A, + Q,
G = A P'C' + S" (8)
*E denotes the expected value operator and 6,~ the
Kronccker index. An = CP'C' + R'.
78 P. VAN OVERSCHEE and B. DE MOOR
This set of equations describes the set of all The deterministic and stochastic state matrices
possible stochastic realizations that have the are defined as
same second order statistics as a given stochastic sddef z d
sequence y~,. We call them the positive real
, =tx, x",+, x:+2 . . . x:+/_,),
equations. More details can be found in Faure x s di e=f t/ X is X is+ l X is+ 2 ... X is+ j _ l ) .
Theorem 1.
= F i AT. Yoli_l = F i x d _ F H ia Uoji_ 1 21- Y os l i _ l , (10)
2.2.Block Hankel matrices and input-output Yq~-~ =FiXd + HiUilzi-, + Yq21-~, d s (11)
equations and
g/-- id
Input and output block Hankel matrices are - A Xo + mid Uoli-i. (12)
defined as The theorem is easy to prove by recursive
/ Uo u, u., ...u/_,) substitution into the state space equations.
where the subscript, denotes past or future, × (Yk-l -- C2k-i -- Duk-i), (21)
• if the input is 'persistently exciting of order Kk-, = (APk-,C' + G ) ( A . + CPk-,C')-'. (22)
2i (Ljung, 1987)': rank U.12~_~= 2mi, and
• if the stochastic subsystem is not identically Pk = A P k - t A ' - (APk-~C' + G)
zero (the purely deterministic case will be x (I~,+ CPk_,C')-'(APk_,C'+ G)' (23)
treated in Section 6.1•3).
Then (for j---~ oo) can be written as
Z, = r,2, +HiUilzi-.,
" (15) No
z,+, = r,_,2,+, +H}L,U,+,I2,_,, (16)
with xk = ( A k - Qkrk I/,'/- Qkn'[I Q')l "'- '
X~ = ( A ' - Q,r, I a:'- Q,HI' I Q,)
{ S R - ' U,,i2,-.' ~
u.,_, !'
~ Y.
\Yk -
(17)
\ Y.li- i / (24)
where
2 , + , = (A '+' - Q , + , F , + , [ a f + , - Q,+,H,~+, I Q,+,)
Q~. = Zklp~-I, (25)
/ S R - i Uopi- ; I x, = A~P,,F~, + a L (26)
x~ U.li" J (18) and
= rka,r + (27)
\ ~:'li /
80 P. VAN OVERSCHEEand B. DE MOOR
1
UO uj-l
( )I/01;-1
&Ii-l
W-1
Yo
Ui+p-1
YP
uitj-2
Y,-1
above, but now the filter has iterated one deterministic subsystem, directly from the given
step beyond the estimate of the pth inputs Uk and outputs y,. The stochastic
column of X,-. This is valid for all columns subsystem can be determined in an approximate
p = l . . . . . j. sense.
(2) We define the residuals ~a of the
projection as 5.1. The projections
First, the projections Z; and Zi+~ (13)-(14)
~ i . Yil21-i
. Zi
. Yil2i-I
. -- Fif(i HidUil2i-i. have to be calculated. In Section 7 we will
(28) describe a numerically stable way to do this.
Since Z~ is the result of the projection of For convenience, we rewrite these projections
Y,.121_l on the row space of Uot2i-, and as follows:
Y01~-~, the residuals of this projection ( ~ )
will always satisfy: ~iU[~12i_l= 0,
~iY[~li_ I = 0 and ~iZ~ = 0. Also, since X'i (33)
\ l i x mi
can be written as a linear combination of
\ Y"I~-~ /
Uol~-i and Yoli-i (see formula (17)), we
find: ~iX't = 0. Zi+ I
(3) Since the corresponding columns of ,,~'i and L~+z ':+' /
,~i+~ are state estimates of the same (in a I(i- I) × m ( i + I I(i--I)xm(i--I) I(i--I)xl(i+|)/
sense of the same initial conditions)
non-steady state Kalman filter at two U(,Ii )
consecutive time instants, we can write
x Ui+ll2i_! (34)
(see formula (21))
Yol/
-.~,+ t = AX, + BU,], + K,(Y..I,- C.,.(", - DU, I, ).
with, from (15)-(18)
(29)
It is also trivial that L~ = F;([A i - Q,F,]S(R-'), I,,/+ A~'- Q,,'/),
Yih = C . f ( i dr DU, I, + (Y,I i - CS, - DUd, ). (35)
(30) L 2,= H~i + F,[A'- QiF,]S(R-')...÷,I~.,,. (36)
If we inspect the formula for ~i a little bit L~ = FiOi, (37)
closer (28), we see that its first row is
equal to Y/i / - C f ( i -DUil i. And since we with (R-~)q,, denoting the submatrix from
know that the row space of ~s (and thus column 1 to column mi.
also the first l rows of ~;) is perpendicular The expressions for L~÷l, L~+l and L3÷t are
to Uol2/-i, Yoli-i and ,('i, we find (together similar, but with shifted indices.
with (29) and (30))
5.2. Determination of Fj and n
/ U,,12~-,~ l An important observation is that the column
"ff~+'=mf(~+BU~l~+~ Y " I ' - ' ] ' (31) space of the matrices L~ and L 3 coincides with
the column space of F i. This implies that Fi and
',ki/ the order of the system n can be determined
from the column space of one of these matrices.
gI/--C2'+DV~I'+~ ~ * - ' 1 ' (32) The basis for this column space actually
determines the basis for the states of the final
\2,/ (identified) state space description.
where (.)± indicates a matrix whose row Let us mention two other possible matrices
space is perpendicular to the row space of that have the same column space as Fi
(.). These formulas will prove to be
L] + L;. LT, (38)
extremely useful in the next section where
and
we determine the system matrices from Z~
and Zi+l. L ~ U,,{,_,
(L~[ ,)(y.ii_, ). (39)
This summarizes the whole interpretation as a
bank of non-steady state Kalman filters. It should be mentioned that, for i---,oo the first
one (38) will lead to a deterministic subsystem
5. IDENTIFICATION SCHEME that is balanced (see also Moonen and Ramos,
In this section, we derive an N4SID algorithm 1991) while the second one (39) leads to a
to identify exactly (unbiased for j---~oo) the deterministic system that is frequency weighted
82 P. VAN OVERSCHEE and B. DE M o o r
Z i + I = Y/+l]2i_ I
/( ,,,, ) Ui+ll2i-i .
better understanding of the mechanism of these
algorithms. A disadvantage is that the results are
not exact (unbiased) for finite i (except for
Y.li special cases), but an estimate for the bias on the
solutions can be calculated.
(2) Determine the Singular Value Decom- If we could determine the state sequences Xi
position and -~'i+~ directly from the data, the matrices A,
B, C and D could be found as the least squares
solution of (31)-(32).
\ Y.li- t / Unfortunately, it is not possible to separate
The order is equal to the number of the effect of the input HidUi]2i-i from the effect
non-zero singular values. of the state Fi-~'i in formula (15), by just
dropping the term with the linear combinations
I'~i = UI'~.II/2 and r i _ I = UI'~~II/2.
of Udzi_~(L~) in the expression for Zi. We would
(3) Determine the least squares solution (Pt automatically drop a part of the initial state if we
and P2 are residuals) did this (see for instance (36)). So, it is not
possible to obtain an explicit expression for FiXi
j n mi and I"i_lZYi+l, without knowledge of H/d, which
n(Ft-,Zi+l] _n(~{I, ff{,2~ would require knowledge of the system matrices.
It is however easy to find a good approxima-
tion of the state sequences, directly from the
J J
data. If we use this approximation in (31) and
(32), we obtain a second very elegant and simple
mi Udzi_~/+ lkp2/" N4SID algorithm that calculates approximations
(4) The system matrices are determined as of the system matrices.
follows:
6.1. The approximate states
A*--;~ll, In this section, we derive an approximate
(i)
C*--:~21. expression for the states ,~'i and Xi+j. This
AUTO 30:1-G
84 P. VAN OVERSCHEE and B. DE MOOR
Fi_lf(i+ I = Zi+ a - L2+tUi+ll2i_t. (47) The same holds for tSXi+~. So, we can conclude
From (33) and (34) we derive that, for i--->o0, there is no difference between
the state sequences ~'i and X,-. Actually, when
L = ([A'- Q,F,]S(R-'),I,., i---~0o, the non-steady state Kalman filter bank
converges to a steady state Kalman filter bank,
+ a",- (48) i.e. the Kalman filters converge (the Riccati
\ Y"Ii- 1]
difference equation (23) converges to an
)t'~+, = ([A '+' _ Q,+tF,+,lS(R-'),Im~,+, ~ algebraic Riccati equation). To obtain the effect
~ + , / U.IA of i---~ oo on a computer, in theory we would need
+ A",+,-Q,+,n,+, a test like.
breaks down (see Appendix A: ~-~ cannot be attention to the fine numerical details, which will
calculated). The following theorem is an be treated in Section 7.
alternative for Theorem 2 for purely determinis- (1) Determine the projections
tic systems:
is equal to: X
I(i--I) x l ( i + l ) Yoli "
~= C D"
(2) Determine the Singular Value
We also know that from the residuals of this
Decomposition
least squares problem, we can approximately
calculate the stochastic subsystem (exactly if
i~oo). Unfortunately, it is impossible to
calculate the states ~'~ and -~'~+l directly from the
data, without any knowledge of the system The order is equal to the number of
matrices. In the previous section, we have seen non-zero singular values.
that for some special cases ,~'i=,~'i. In the Fi = UI~-I/2, and Fi-t = Uj__.._Z]/2.
general case, we have X~ = ,~ if i is reasonably
large. This is because (Section 6.1.1) (3) Determine the states -'~i and Xi+~
i--I , ,
//L...\
6X, = 1-I (A - KkC)S(R-'),.,+q2.,,U,12i_ ,. = Fi ( L i [ \ Yoli- i /
k =0
and
Consequently, for the least squares solution .~ of
~ -- ( ~ : , l : : ~ : ) / V f .
= (el+, IEL, ILL,)U~+,I~_, -
Yoli
2 ( m + I)i × j
(4) Determine Fi and n through the SVD of
(2) Calculate the R factor of the RQ Fi)(i
factorization of (L] 0 3
Li)Rl:4.1:,Ql:,
~= R x Q'
=(U, U2)(~ ' Z2)(Qt:4V)
0 •
2(,n+l)ix2(tn+l)i 2(m+l)ixl
li Ral ga2 R43 R44 0 0 [Q~| (6) Now the least squares problem (45) can be
l RsI R52 R5" Rs4 R55 1 ' ~ ' ~ ! rewritten as
/(i- 1) R., R~2 R, 3 R~ R6~ R~/ \Q min (211t2(UI)tR6:6"I:4~
X \ Rs:5. h4 /
/Z-t~,R \112
* The scalar k/i-is used to be conform with the definition of
E. \ R2:3.h4 /IIF
N4SID: Identification of combined systems 87
and solved in a least squares sense for Xc. With the singular value decomposition
Note that the Q matrix has completely
disappeared from these final formulas. Uoli-i ~ /Rt.i 1.4\
The first n columns of ~ are A and C (yo[i_l] =tg4141114)Ql:4t
stacked on top of each other. The next
=(Ul U2)( S' 0 V'' '
columns determine B and D as described
in Section 5. The residuals of this solution
we find as an appropriate basis
determine the stochastic system as de-
scribed in Section 5. V'I ) Q t
I'I= l~ 1:4-
~J~'2:3.1:4 •
N4SID Algorithm 2.
The rest of the algorithm is very similar to the
(5) We have
general case.
We should note that in the generic real life
case, the problem of rank deficiency is a pure
academic one.
-----(Z -In , i, 0 L 3i)R1:4.1:4"~,
I UI(L
\ R2:2.1:4 ] h~: 1:4, a n d 8. C O N N E C T I O N WITH EXISTING ALGORITHMS
_,,~(Zl - I t 2 U,(L,
t I
0 L,3)R 1:4.1:4) 2. Note that Y~12i-I/U02i-I = Y~'12i-I, since
Y~12i_t/Uil2i_ I = 0 as j---~ oo. Projection of (53) on
\ R2:2,1:4 t IIF
Uoli-i gives: [ Yiiz~-ll Uii2i-i]l
± U,,li-i =
Once again, the Q matrix has completely r i[Xi/Uil21_l]/Uoii_l,
d ±
since
s
Yi[2i_l/Uoli_ I =0. It
disappeared from these final formulas. can be seen from this equation that the column
.L
From 5~ and the residuals we can find the space of [Yd2~_ffUd2i_~]/Uoli_t is equal to that of
system matrices as described in Section 6. I~/(only the deterministic controllable modes are
Note. observed). So, from the column space of 1-~,, A
• The projection of Step 3 is written as a and C can be derived. B and D are then found
function of U and Y, and not as a function from the fact that: ( r i d) ± [ ril2,-,/ uil:i-,lUii2i-,
* =
of Q, because we need to be able to drop (I~/)±H/a which leads to a set of linear equations
the linear combinations (L~) of the rows of in B and D. Finally, the stochastic subsystem is
Uil2i_ I in Zi to find the sequence FiXi and identified from the difference between the
the linear combination (L~+I) of the rows of measured output and a simulation of the
Ui+ll~i-i in Zi+l to find the sequence identified deterministic subsystem with the given
Fi-iXi+l (see formulas (46)-(47)). input uk. This difference is almost equal to the
• The possible rank deficiency of the row output of the stochastic subsystem (y~). The
space we are projecting on (in Step 3) has to stochastic subsystem can then be identified with
be taken into account (see Section 6.1.3). for instance one of the algorithms described by
This occurs when R1:4.1:4 and R~:.S.l:.S are Arun and Kung (1990) and Van Overschee and
rank deficient. It can be checked by De Moor (1991a, b).
inspection of the singular values of R1:4.1:4. A clear disadvantage of this algorithm is the
If one of them turns out to be zero (purely fact that the deterministic and stochastic
deterministic case), a basis 1-I for the space subsystem are identified separately. This in-
we are projecting on has to be selected. This volves more calculations. Two different A
basis should contain the row vectors of matrices will also be identified (one for the
Uil2i_J explicitly. This makes it easy to drop deterministic and one for the stochastic system),
the linear combinations o f GI2i-~ (L~z) in Zi even though a lot of the dynamics could be
to obtain the sequence FiXi. shared between the two subsystems.
88 P. VAN OVERSCHEE and B. DE MOOR
./y
I
if('2 = |
\
il2i-I/\"
" YOI;-I
Uil2i-i
"
characterized by the first two moments, and we
can replace p[A [B] by the expectation opera-
tion E[A I B]. This expectation operator can in
its turn be replaced by the projection operator
(Papoulis, 1984). We then get
Facts.
• The subspace `9 is n dimensional. l( Uil2i-I ~
Yil2i-l/\ Yi)l;__lll= Yil2i-I/\ Mi 1" (54)
Proof. We have: rank ~1 = tel, with tel = (m + By substitution it is easy to verify that all of the
l)i in the generic combined deterministic- following three alternatives: Mi = X;, Mi = -~'i
stochastic case. From equation (15), we find
and Mi = f(;/U~zi-t satisfy equation (54).
that: rank ~2 = mi + n. Finally, if the input is
Actually, every matrix Mi satisfying: row space
persistently exciting: rank (~'t ~z)' = rt + mi.
M ; = r o w space [Zi-ff2Uilzi-i and rank Mi = n
With Grassmann's Theorem, we find: dim [ ~ N
(with ff~ ~ Rzi×"), will also satisfy equation (54)
Y(z]= rank ~t + rank ~z - rank (Ygl ~2) ' = ( r , ) +
and give rise to an n dimensional memory. This
(mi + n) - (xl + mi) = n.
ambiguity is due to the fact that the exact
• The intersection subspace `9 is equal to the
influence of the input variable Uilz;-~ on the
row space of Xi.
output is not known. In the frame work of linear
theory, the most natural choice for Mi is of the
Proof. one for which
--,,~; lies in the row space of ,gt'~, since it is
written as a linear combination of Uop_~
Y,'12i-I Yop-I / = FiMi + Hi U;12i-i
and Yoli_I (see Formula (48)).
- - , ( ' ; lies also in the row space of Y(2 since we
is satisfied (f~ = H~). This is because this choice
know from (46) that
corresponds to the linear state space equations
Mi+ 1=AM; + BUd;,
and
So, ~'i lies in the intersection of the row Y~i / ( U°I2i-' ~ = CMi + DUd;.
spaces of ~ and ~ . Since both the I \ Y~Ji-I I
intersection subspace `9 and the row space This leads to the choice M; = ,~';.
of A'i are n dimensional, they must coincide.
This derivation indicates strong similarities
between N4SID Algorithm 2 and the existing 9. EXAMPLES
intersection algorithm mentioned above. When
j-.-,0o both algorithms will calculate the same
9.1. A simple example
solution (if the same state space basis is used). In This simple simulation example illustrates the
practice however (finite j), they calculate slightly concepts explained in this paper. We consider
different models. In the references given above, the single input single output single state system
in forward innovation form (Faure, 1976)
only purely deterministic systems and the
asymptotic case i - - , ~ are treated. The inter- xk+m = 0.9490xk + 1.8805uk - 0.1502ek,
pretation of Kaiman filter states is totally absent,
as is the effect of finite i. and
The similarities indicate an alternative way to Yk = 0.8725xk - 2.0895uk + 2.5894ek.
N4SID: Identification of combined systems 89
with e, a unit energy (or= 1), zero mean, sequences was calculated (Monte-Carlo
Gaussian distributed stochastic sequence. experiment).
Effect of i. Figure 3 shows the results as a function of i for
We first investigate the effect of the number of both N4SID algorithms. The results for Algo-
block rows (i) of the block Hankel matrices. The rithm 1 are represented with a dotted line (:) and
input Uk to the system is the same for all circles (O). The results for Algorithm 2 are
experiments and is equal to a filtered unit energy represented with a d o t t e d - d a s h e d (-.) line and
( o = 1), zero mean, Gaussian distributed stoch- the stars (*). The exact values are indicated with
astic sequence added to a Gaussian white noise a dashed line.
sequence ( o = 0 . 1 ) . The filter is a second order Figure 3a shows the eigenvalue of the system
Butterworth filter, with cut-off frequency equal as a function of i. Clearly the estimates are
to 0.025 (sampling time 1). The number of data accurate, and there is hardly any difference
used for identification is fixed at 1000. One between the two algorithms. Figure 3b shows the
hundred different disturbance sequences e, were deterministic zero of the system (A - B D - ~ C ) as
generated. For each of these sequences and for a function of i. The difference between the two
each i in the interval [2, 15], two models were N4SID algorithms is clearly visible. Algorithm 1
identified using N4SID Algorithm 1 (Section 5) estimates a zero that is close to the exact
and 2 (Section 6). Also for each of these models deterministic zero, independently of i.
the bias was calculated using the expression in Algorithm 2 on the other hand is clearly biased
Appendix B. Then the mean of all these for small i. Figure 3c shows this bias
quantities over the 100 different disturbance (dashed-dotted line) and the estimated bias
0.949
' h i ., i 1.75 --i t ........ -i,.-'*. .................. i ........................
. .; .
0.949 '° i ; w,• "q ~,--* .
..... ":.,7-:,--/ .... -y.~,~-:~.-:z
i' V :, ° 1.74 ......... ; ... t~.,,.:... . L ..~".'~ .................
-0.01
-0.01 ..... 17.'.( L~............................................... ;"
-0.015
-0.02!
-0.02
-0.025 i -0.03
5 10 15 5 I0 15
i
Algorithm 1 2 3 4 5
calculation of the A R X model takes three times estimate an initial model. Now, in the
as much computation. The calculation of the optimization step, only the p a r a m e t e r s of the C
prediction error model (only three iterations) and D matrix corresponding to three outputs
takes about 25 times as much computation! It can vary (output 1, 4 and 6 for this example).
should be mentioned that none of the algorithms The optimization is better conditioned now and
was optimized in the n u m b e r of operations (nor the resulting model has a similar iaerformance as
ours, nor the ones in the Matlab toolbox), but the subspace models for this example. The
these figures still give an idea of the order of number of floating point operations stays
magnitude of the n u m b e r of computations. The extremely high though and this method is rather
fourth row is the error (in per cent) between the complicated and requires quite some insight
measured validation output and the simulated from the identifiers.
output using only the deterministic subsystem.
The fifth row shows the error between measured 10. CONCLUSIONS
and Kalman filter one step ahead prediction.
In this p a p e r two new N4SID algorithms to
With [Y~k']i the ith validation output channel
identify combined deterministic-stochastic linear
and [Y~]i the ith simulated output channel, the
systems have been derived. The first one
error is defined as (N,, = 300)
calculates unbiased results, the second one is a
simpler biased approximation. The connection
1 " kS.= ([Yk]i -- [Yk],) between these N4SID algorithms and the
. . . . O/~.
E 100 kEL classical Kalman filter estimation theory has
been indicated. This allows interpretations and
proofs of correctness of the algorithms.
In future work, we will discuss other
The best deterministic prediction is obtained
connections with linear system theory: model
with the A R X model, which is logical since it
reduction properties, frequency interpretations
came about by balanced truncation of the
and connections with robust control.
deterministic subsystem. The other models
The open problems that remain to be solved
perform a little worse (but all four about the
are the connection with maximum likelihood
same).
algorithms (Ljung, 1987) and the problem of
The Kalman filter error is the smallest though
finding good asymptotic statistical error
for the first two N4SID algorithms. The
estimates.
projection retains the deterministic and
stochastic information in the past useful to Acknowledgments--We would like to thank Lennart Ljung
predict the future. This implies that the resulting and Mats Viberg for their help and useful comments.
models will perform best when used with a
Kalman filter. The prediction error model does
REFERENCES
not improve this Kalman filter prediction error
at all. There is even a slight decline which is Anderson, B. D. O. and J. B. Moore (1979). Optimal
Filtering. Prentice-Hall, Englewood Cliffs, NJ.
probably due to numerical errors since during Arun, K. S. and S. Y. Kung (1990). Balanced approximation
the iteration procedure a warning for a badly of stochastic systems. SIAM J. Matrix Analysis and
conditioned matrix was given. This means that, Applications, ll, 42-68.
Backx, T. (1987). Identification of an industrial process: a
even though there is no optimization involved, Markov parameter approach. Doctoral Dissertation,
the results obtained with the N4SID algorithms, Technical University Eindhoven, The Netherlands.
for this industrial M I M O process are close to De Moor, B. (1988). Mathematical concepts and techniques
for modeling of static and dynamic systems. Doctoral
optimal. Dissertation, Department of Electrical Engineering, Kath.
For this example, the N4SID algorithms thus Universiteit Leuven, Belgium.
calculate a state space model without any a De Moor, B., P. Van Overschee and J. Suykens (1991).
Subspace algorithms system identification and stochastic
priori fixed parametrization, and this in a fast realization. Proceedings MTNS. Kobe, Japan. part 1,
and numerically reliable way. 589-594.
Finally, we should mention that, as we found Enns, D. (1984). Model reduction for control system design.
Ph.D., dissertation, Dep. Aeronaut. Astronaut., Stanford
out in discussion with Lennart Ljung, the University, Stanford, CA.
prediction error method can be made to work Faure, P. (1976). Stochastic realization algorithms. In R.
better with some extra manipulations. The main Mehra and D. Lainiotis (Eds), System Identification:
Advances and Case Studies. Academic Press, NY.
problem with the prediction error method is that Kailath, T. (19811). Linear Systerr~. Prentice-Hall, Engle-
the outputs are pairwise collinear. This results in wood Cliffs, NJ.
a very hard, ill conditioned optimization Kung, S. Y. (1978). A new identification and model
reduction algorithm via singular value decomposition.
problem, for every possible parametrization. Proc. of the 12th Asilomar Conference on Circuits, Systems
This problem can be solved as follows: first and Computers, Pacific Grove, 705-714.
92 P. VAN OVERSCHEE a n d B . D E MOOR
Wc havc
= lira
1 t t
~ ( r , A ' X ; , + r , A ; U,, + H;'U~ + Y})U;, with ~0 = ~'-2 ~(~2.1~Ii190~1 "
-
with we have:
~,,: r , P " C + L 7 + r,S,(H'/)' + HiS',r', + HIR,,(Hia) '
6"f(i = i ~ (A - K , C ) S ( R I) . . . . . ij2aniUi}2~_l,
-(r,s+ ]('")i k =()
This quantity can only be calculated after the system is
= r A W - SR- ' S ' ) g + L;. identified. In the following it is thus assumed that the system
matrices A , B. C, D, Q", S', R ~ are kno%n. (R and Q are
From formulas (13) and (33) and the definitions of s~ and ~ , the submatrices of the R Q decomposition as defined in
we find (with/'---* ~) Section 7).
- r,A'S((H;')' - ria','s',r',- HIr;~(n'/)' and from the description of the algorithm (see Section 7)
- H",S'UIv/; '(n','(t 0) + r , s r - ' ) we have
2,2:
= (FiA~t HI!) + F I A i S R - t + Fi(A,(S R - i S,
J
- p a ) F ' , - AT)'t,O['(H~t(l O) + FiSR - t ) Thus we have
pa + p., = YI
= (r, a l - rixi~.'H:! hi)
+ F i A , S R - I _ rizilp [ 'FiSR - ' --SR IS' can be easily found as
= (r, la:' - QiH:!I H'/) + Film' - QiF, I S R - ' SR IS'¼SR I(Rl:3.,:3RSl:3.t:3)(SR- t )'
which is exactly the same as the first part of (33). = F~IR4:4.1::~- H~tR,:,.,3I
Once again, using (A.I) and (A.3), we find for L~ ' R'1:1.1:3~tH't)'l/FW
x 1R4:4.1:3- i I% t / '
L~ = [-F,A'S,( H:')' - riA','r, ,(Hi)' Care should be taken when subtracting both quantities
- H'.'R'~.(HI)' - r~A'SR -'S'I~, to obtain ~ , It is possible that due to the
approximations, ~b becomes negative definite. If this is
- F,A','(I O)S'U, H'/(O I)S'U
-