SB10SD - SLICOT Library Routine Documentation

## SB10SD

### H2 optimal controller matrices for a normalized discrete-time system

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

      To compute the matrices of the H2 optimal controller

               | AK | BK |
           K = |----|----|,
               | CK | DK |

      for the normalized discrete-time system

                    | A  | B1  B2  |   | A | B |
                P = |----|---------| = |---|---|
                    | C1 | D11 D12 |   | C | D |
                    | C2 | D21  0  |

      where B2 has as column size the number of control inputs (NCON)
      and C2 has as row size the number of measurements (NMEAS) being
      provided to the controller.

      It is assumed that

      (A1) (A,B2) is stabilizable and (C2,A) is detectable,

      (A2) D12 is full column rank with D12 = | 0 | and D21 is
                                              | I |
           full row rank with D21 = | 0 I | as obtained by the
           SLICOT Library routine SB10PD,

                j*Theta
      (A3) | A-e       *I  B2  | has full column rank for all
           |    C1         D12 |

           0 <= Theta < 2*Pi ,

                j*Theta
      (A4) | A-e       *I  B1  | has full row rank for all
           |    C2         D21 |

           0 <= Theta < 2*Pi .

Specification

          SUBROUTINE SB10SD( N, M, NP, NCON, NMEAS, A, LDA, B, LDB, C, LDC,
         $                   D, LDD, AK, LDAK, BK, LDBK, CK, LDCK, DK, LDDK,
         $                   X, LDX, Y, LDY, RCOND, TOL, IWORK, DWORK,
         $                   LDWORK, BWORK, INFO )
    C     .. Scalar Arguments ..
          INTEGER            INFO, LDA, LDAK, LDB, LDBK, LDC, LDCK, LDD,
         $                   LDDK, LDWORK, LDX, LDY, M, N, NCON, NMEAS, NP
          DOUBLE PRECISION   TOL
    C     .. Array Arguments ..
          INTEGER            IWORK( * )
          DOUBLE PRECISION   A( LDA, * ), AK( LDAK, * ), B( LDB, * ),
         $                   BK( LDBK, * ), C( LDC, * ), CK( LDCK, * ),
         $                   D( LDD, * ), DK( LDDK, * ), DWORK( * ),
         $                   RCOND( * ), X( LDX, * ), Y( LDY, * )
          LOGICAL            BWORK( * )

Arguments

Input/Output Parameters

      N       (input) INTEGER
              The order of the system.  N >= 0.

      M       (input) INTEGER
              The column size of the matrix B.  M >= 0.

      NP      (input) INTEGER
              The row size of the matrix C.  NP >= 0.

      NCON    (input) INTEGER
              The number of control inputs (M2).  M >= NCON >= 0,
              NP-NMEAS >= NCON.

      NMEAS   (input) INTEGER
              The number of measurements (NP2).  NP >= NMEAS >= 0,
              M-NCON >= NMEAS.

      A       (input) DOUBLE PRECISION array, dimension (LDA,N)
              The leading N-by-N part of this array must contain the
              system state matrix A.

      LDA     INTEGER
              The leading dimension of the array A.  LDA >= max(1,N).

      B       (input) DOUBLE PRECISION array, dimension (LDB,M)
              The leading N-by-M part of this array must contain the
              system input matrix B.

      LDB     INTEGER
              The leading dimension of the array B.  LDB >= max(1,N).

      C       (input) DOUBLE PRECISION array, dimension (LDC,N)
              The leading NP-by-N part of this array must contain the
              system output matrix C.

      LDC     INTEGER
              The leading dimension of the array C.  LDC >= max(1,NP).

      D       (input) DOUBLE PRECISION array, dimension (LDD,M)
              The leading NP-by-M part of this array must contain the
              system input/output matrix D. Only the leading
              (NP-NP2)-by-(M-M2) submatrix D11 is used.

      LDD     INTEGER
              The leading dimension of the array D.  LDD >= max(1,NP).

      AK      (output) DOUBLE PRECISION array, dimension (LDAK,N)
              The leading N-by-N part of this array contains the
              controller state matrix AK.

      LDAK    INTEGER
              The leading dimension of the array AK.  LDAK >= max(1,N).

      BK      (output) DOUBLE PRECISION array, dimension (LDBK,NMEAS)
              The leading N-by-NMEAS part of this array contains the
              controller input matrix BK.

      LDBK    INTEGER
              The leading dimension of the array BK.  LDBK >= max(1,N).

      CK      (output) DOUBLE PRECISION array, dimension (LDCK,N)
              The leading NCON-by-N part of this array contains the
              controller output matrix CK.

      LDCK    INTEGER
              The leading dimension of the array CK.
              LDCK >= max(1,NCON).

      DK      (output) DOUBLE PRECISION array, dimension (LDDK,NMEAS)
              The leading NCON-by-NMEAS part of this array contains the
              controller input/output matrix DK.

      LDDK    INTEGER
              The leading dimension of the array DK.
              LDDK >= max(1,NCON).

      X       (output) DOUBLE PRECISION array, dimension (LDX,N)
              The leading N-by-N part of this array contains the matrix
              X, solution of the X-Riccati equation.

      LDX     INTEGER
              The leading dimension of the array X.  LDX >= max(1,N).

      Y       (output) DOUBLE PRECISION array, dimension (LDY,N)
              The leading N-by-N part of this array contains the matrix
              Y, solution of the Y-Riccati equation.

      LDY     INTEGER
              The leading dimension of the array Y.  LDY >= max(1,N).

      RCOND   (output) DOUBLE PRECISION array, dimension (4)
              RCOND contains estimates of the reciprocal condition
              numbers of the matrices which are to be inverted and the
              reciprocal condition numbers of the Riccati equations
              which have to be solved during the computation of the
              controller. (See the description of the algorithm in [2].)
              RCOND(1) contains the reciprocal condition number of the
                       matrix Im2 + B2'*X2*B2;
              RCOND(2) contains the reciprocal condition number of the
                       matrix Ip2 + C2*Y2*C2';
              RCOND(3) contains the reciprocal condition number of the
                       X-Riccati equation;
              RCOND(4) contains the reciprocal condition number of the
                       Y-Riccati equation.

Tolerances

      TOL     DOUBLE PRECISION
              Tolerance used in determining the nonsingularity of the
              matrices which must be inverted. If TOL <= 0, then a
              default value equal to sqrt(EPS) is used, where EPS is the
              relative machine precision.

Workspace

      IWORK   INTEGER array, dimension (max(M2,2*N,N*N,NP2))

      DWORK   DOUBLE PRECISION array, dimension (LDWORK)
              On exit, if INFO = 0, DWORK(1) contains the optimal
              LDWORK.

      LDWORK  INTEGER
              The dimension of the array DWORK.
              LDWORK >= max(1, 14*N*N+6*N+max(14*N+23,16*N),
                               M2*(N+M2+max(3,M1)), NP2*(N+NP2+3)),
              where M1 = M - M2.
              For good performance, LDWORK must generally be larger.

      BWORK   LOGICAL array, dimension (2*N)

Error Indicator

      INFO    INTEGER
              = 0:  successful exit;
              < 0:  if INFO = -i, the i-th argument had an illegal
                    value;
              = 1:  if the X-Riccati equation was not solved
                    successfully;
              = 2:  if the matrix Im2 + B2'*X2*B2 is not positive
                    definite, or it is numerically singular (with
                    respect to the tolerance TOL);
              = 3:  if the Y-Riccati equation was not solved
                    successfully;
              = 4:  if the matrix Ip2 + C2*Y2*C2' is not positive
                    definite, or it is numerically singular (with
                    respect to the tolerance TOL).

Method

      The routine implements the formulas given in [1]. The X- and
      Y-Riccati equations are solved with condition estimates.

References

      [1] Zhou, K., Doyle, J.C., and Glover, K.
          Robust and Optimal Control.
          Prentice-Hall, Upper Saddle River, NJ, 1996.

      [2] Petkov, P.Hr., Gu, D.W., and Konstantinov, M.M.
          Fortran 77 routines for Hinf and H2 design of linear
          discrete-time control systems.
          Report 99-8, Department of Engineering, Leicester University,
          April 1999.

Numerical Aspects

      The accuracy of the result depends on the condition numbers of the
      matrices which are to be inverted and on the condition numbers of
      the matrix Riccati equations which are to be solved in the
      computation of the controller. (The corresponding reciprocal
      condition numbers are given in the output array RCOND.)

Further Comments

      None

Example

Program Text

      None

Program Data

      None

Program Results

      None

Return to Supporting Routines index