Scilab Function

findBDK - Kalman gain and B D system matrices of a discrete-time system

Calling Sequence

[B,D,K] = findBDK(S,N,L,R,A,C,METH,JOB,NSMPL,TOL,PRINTW)
[B,D,RCND] = findBDK(S,N,L,R,A,C,METH,JOB)
[B,D,K,Q,Ry,S,RCND] = findBDK(S,N,L,R,A,C,METH,JOB,NSMPL,TOL,PRINTW)

Parameters

Description

finds the system matrices B and D and the Kalman gain of a discrete-time system, given the system order, the matrices A and C, and the relevant part of the R factor of the concatenated block-Hankel matrices, using subspace identification techniques (MOESP or N4SID).

  • * [B,D,K] = findBDK(S,N,L,R,A,C,METH,JOB,NSMPL,TOL,PRINTW) computes the system matrices B (if JOB = 1), B and D (if JOB = 2), and the Kalman predictor gain K (if NSMPL > 0). The model structure is:
  •      x(k+1) = Ax(k) + Bu(k) + Ke(k),   k >= 1,
         y(k)   = Cx(k) + Du(k) + e(k),
       

    where x(k) and y(k) are vectors of length N and L, respectively.

  • * [B,D,RCND] = findBDK(S,N,L,R,A,C,METH,JOB) also returns the vector RCND of length 4 containing the reciprocal condition numbers of the matrices involved in rank decisions.
  • * [B,D,K,Q,Ry,S,RCND] = findBDK(S,N,L,R,A,C,METH,JOB,NSMPL,TOL,PRINTW) also returns the state, output, and state-output (cross-)covariance matrices Q, Ry, and S (used for computing the Kalman gain), as well as the vector RCND of length 12 containing the reciprocal condition numbers of the matrices involved in rank decisions, least squares or Riccati equation solutions.
  • Matrix R, computed by findR, should be determined with suitable arguments METH and JOBD. METH = 1 and JOBD = 1 must be used in findR, for METH = 1 in findBDK. Using METH = 1 in FINDR and METH = 2 in findBDK is allowed.

    The number of output arguments may vary, but should correspond to the input arguments, e.g.,

                B = findBDK(S,N,L,R,A,C,METH,1)  or
            [B,D] = findBDK(S,N,L,R,A,C,METH,2)  or
       [B,D,RCND] = findBDK(S,N,L,R,A,C,METH,2)  
       

    Examples

    See Also