## SB10TD

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

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

Purpose

```  To compute the matrices of the H2 optimal discrete-time controller

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

from the matrices of the controller for the normalized system,
as determined by the SLICOT Library routine SB10SD.

```
Specification
```      SUBROUTINE SB10TD( N, M, NP, NCON, NMEAS, D, LDD, TU, LDTU, TY,
\$                   LDTY, AK, LDAK, BK, LDBK, CK, LDCK, DK, LDDK,
\$                   RCOND, TOL, IWORK, DWORK, LDWORK, INFO )
C     .. Scalar Arguments ..
INTEGER            INFO, LDAK, LDBK, LDCK, LDD, LDDK, LDTU, LDTY,
\$                   LDWORK, M, N, NCON, NMEAS, NP
DOUBLE PRECISION   RCOND, TOL
C     .. Array Arguments ..
INTEGER            IWORK( * )
DOUBLE PRECISION   AK( LDAK, * ), BK( LDBK, * ), CK( LDCK, * ),
\$                   D( LDD, * ), DK( LDDK, * ), DWORK( * ),
\$                   TU( LDTU, * ), TY( LDTY, * )

```
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.

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 trailing
NMEAS-by-NCON submatrix D22 is used.

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

TU      (input) DOUBLE PRECISION array, dimension (LDTU,M2)
The leading M2-by-M2 part of this array must contain the
control transformation matrix TU, as obtained by the
SLICOT Library routine SB10PD.

LDTU    INTEGER
The leading dimension of the array TU.  LDTU >= max(1,M2).

TY      (input) DOUBLE PRECISION array, dimension (LDTY,NP2)
The leading NP2-by-NP2 part of this array must contain the
measurement transformation matrix TY, as obtained by the
SLICOT Library routine SB10PD.

LDTY    INTEGER
The leading dimension of the array TY.
LDTY >= max(1,NP2).

AK      (input/output) DOUBLE PRECISION array, dimension (LDAK,N)
On entry, the leading N-by-N part of this array must
contain controller state matrix for the normalized system
as obtained by the SLICOT Library routine SB10SD.
On exit, the leading N-by-N part of this array contains
controller state matrix AK.

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

BK      (input/output) DOUBLE PRECISION array, dimension
(LDBK,NMEAS)
On entry, the leading N-by-NMEAS part of this array must
contain controller input matrix for the normalized system
as obtained by the SLICOT Library routine SB10SD.
On exit, the leading N-by-NMEAS part of this array
contains controller input matrix BK.

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

CK      (input/output) DOUBLE PRECISION array, dimension (LDCK,N)
On entry, the leading NCON-by-N part of this array must
contain controller output matrix for the normalized
system as obtained by the SLICOT Library routine SB10SD.
On exit, the leading NCON-by-N part of this array contains
controller output matrix CK.

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

DK      (input/output) DOUBLE PRECISION array, dimension
(LDDK,NMEAS)
On entry, the leading NCON-by-NMEAS part of this array
must contain controller matrix DK for the normalized
system as obtained by the SLICOT Library routine SB10SD.
On exit, the leading NCON-by-NMEAS part of this array
contains controller input/output matrix DK.

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

RCOND   (output) DOUBLE PRECISION
RCOND contains an estimate of the reciprocal condition
number of the matrix Im2 + DKHAT*D22 which must be
inverted in the computation of the controller.

```
Tolerances
```  TOL     DOUBLE PRECISION
Tolerance used in determining the nonsingularity of the
matrix 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 (2*M2)

DWORK   DOUBLE PRECISION array, dimension (LDWORK)

LDWORK  INTEGER
The dimension of the array DWORK.
LDWORK >= max(N*M2,N*NP2,M2*NP2,M2*M2+4*M2).

```
Error Indicator
```  INFO    INTEGER
= 0:  successful exit;
< 0:  if INFO = -i, the i-th argument had an illegal
value;
= 1:  if the matrix Im2 + DKHAT*D22 is singular, or the
estimated condition number is larger than or equal
to 1/TOL.

```
Method
```  The routine implements the formulas given in .

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

 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
input and output transformations and of the matrix Im2 +
DKHAT*D22.

```
```  None
```
Example

Program Text

```  None
```
Program Data
```  None
```
Program Results
```  None
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.7057386,"math_prob":0.95461905,"size":4904,"snap":"2023-40-2023-50","text_gpt3_token_len":1368,"char_repetition_ratio":0.17285714,"word_repetition_ratio":0.1870229,"special_character_ratio":0.2593801,"punctuation_ratio":0.18381618,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.996238,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-03T13:50:57Z\",\"WARC-Record-ID\":\"<urn:uuid:6bbeabe6-bc7b-4f9f-8390-da619b403057>\",\"Content-Length\":\"7575\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:60e240a4-4ffc-4df8-832c-b73c6350cc8f>\",\"WARC-Concurrent-To\":\"<urn:uuid:904557d3-245a-40ca-bfde-f69192be9156>\",\"WARC-IP-Address\":\"193.175.52.37\",\"WARC-Target-URI\":\"https://www.slicot.org/objects/software/shared/doc/SB10TD.html\",\"WARC-Payload-Digest\":\"sha1:4OBLWUILFXTPV5WDZ4DWAK3RLMWOMVY3\",\"WARC-Block-Digest\":\"sha1:C33PWWHE47TPNE57OGQDTKMAC3YWOPDE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100508.23_warc_CC-MAIN-20231203125921-20231203155921-00157.warc.gz\"}"}