computing the order of a discrete-time system
[Ro[,n,sval,rcnd]] = sorder(meth,alg,jobd,batch,conct,s,Y[,U,tol,printw,ldwork,Ri])
meth integer option to determine the method to use: | |
---|---|
:= 1 : MOESP method with past inputs and outputs; : := 2 : N4SID method. : |
: :alg integer option to determine the algorithm for computing the triangular factor of the concatenated block-Hankel matrices built from the input-output data:
:= 1 : Cholesky algorithm on the correlation matrix; : := 2 : fast QR algorithm; : := 3 : standard QR algorithm. :
: :jobd integer option to specify if the matrices B and D should later be computed using the MOESP approach:
- := 1 : the matrices B and D should later be computed using the MOESP
- approach;
- : := 2 : the matrices B and D should not be computed using the MOESP
- approach. This parameter is not relevant for meth = 2.
:
: :batch integer option to specify whether or not sequential data processing is to be used, and, for sequential processing, whether or not the current data block is the first block, an intermediate block, or the last block, as follows:
:= 1 : the first block in sequential data processing; : := 2 : an intermediate block in sequential data processing; : := 3 : the last block in sequential data processing; : := 4 : one block only (non-sequential data processing). :
: :conct integer option to specify whether or not the successive data blocks in sequential data processing belong to a single experiment, as follows:
- := 1 : the current data block is a continuation of the previous data
- block and/or it will be continued by the next data block;
- : := 2 : there is no connection between the current data block and the
- previous and/or the next ones. This parameter is not used if batch = 4.
:
= 1: | print warning messages; |
---|
: := 0: do not print warning messages. :
Default: printw = 0. : :ldwork (optional) the workspace size. Default : computed by the formulas
nr = 2*( m + l )*s
LDWORK = ( t - 2*s + 3 + 64 )*nr
if ( CSIZE > MAX( nr*nr + t*( m + l ) + 16, 2*nr ) ) then
LDWORK = MIN( LDWORK, CSIZE - nr*nr - t*( m + l ) - 16 )
else
LDWORK = MIN( LDWORK, MAX( 2*nr, CSIZE/2 ) )
end if
: :n the order of the system. : :sval (optional) the singular values used for estimating the order
of the system.
:
sorder - function for computing the order of a discrete-time system using SLICOT routine IB01AD.
For one block (data sequences Y, U): [R,n,sval,rcnd] = sorder(meth,alg,jobd,4,conct,s,Y,U);
For f blocks (data sequences Yj, Uj, j = 1 : f):
R = sorder(meth,alg,jobd,1,conct,s,Y1,U1);
for j = 2 : f - 1
R = sorder(meth,alg,jobd,2,conct,s,Yj,Uj,tol,printw,ldwork,R)
end
[R,n,sval,rcnd] = sorder(meth,alg,jobd,3,conct,s,Yf,Uf,tol);
sorder preprocesses the input-output data for estimating the matrices of a linear time-invariant dynamical system, using Cholesky or (fast) QR factorization and subspace identification techniques (MOESP and N4SID), and then estimates the order of a discrete-time realization.
The model structure is :
x(k+1) = Ax(k) + Bu(k) + w(k), k >= 1,
y(k) = Cx(k) + Du(k) + e(k),
where x(k) is the n-dimensional state vector (at time k),
u(k) is the m-dimensional input vector,
y(k) is the l-dimensional output vector,
w(k) is the n-dimensional state disturbance vector,
e(k) is the l-dimensional output disturbance vector,
and A, B, C, and D are real matrices of appropriate dimensions.
1. The Cholesy or fast QR algorithms can be much faster (for large data blocks) than QR algorithm, but they cannot be used if the correlation matrix, H’*H, is not positive definite. In such a case, the code automatically switches to the QR algorithm, if sufficient workspace is provided and batch = 4.
2. If ldwork is specified, but it is less than the minimum workspace size needed, that minimum value is used instead.