nag_trans_hessenberg_controller (g13exc) (PDF version)
g13 Chapter Contents
g13 Chapter Introduction
NAG C Library Manual

# NAG Library Function Documentnag_trans_hessenberg_controller (g13exc)

## 1  Purpose

nag_trans_hessenberg_controller (g13exc) reduces the matrix pair $\left(B,A\right)$ to lower or upper controller Hessenberg form using (and optionally accumulating) the unitary state-space transformations.

## 2  Specification

 #include #include
 void nag_trans_hessenberg_controller (Integer n, Integer m, Nag_ControllerForm reduceto, double a[], Integer tda, double b[], Integer tdb, double u[], Integer tdu, NagError *fail)

## 3  Description

nag_trans_hessenberg_controller (g13exc) computes a unitary state-space transformation U, which reduces the matrix pair $\left(B,A\right)$ to give a compound matrix in one of the following controller Hessenberg forms:
 $m n U B ∣ U A UT = * . . . * * . . . . . . * . . . . . . . . . . . . * * . . * . . . . . . . * . . * n$
if ${\mathbf{reduceto}}=\mathrm{Nag_UH_Controller}$, or
 $n m U A UT ∣ U B = * . . * . . . . . . . * . . * . . . . . . . . . . . . * . . . . . . * * . . . n$
if ${\mathbf{reduceto}}=\mathrm{Nag_LH_Controller}$. If $m>n$, then the matrix $UB$ is trapezoidal and if $m+1\ge n$ then the matrix $UA{U}^{\mathrm{T}}$ is full.

## 4  References

van Dooren P and Verhaegen M (1985) On the use of unitary state-space transformations. In: Contemporary Mathematics on Linear Algebra and its Role in Systems Theory 47 AMS, Providence

## 5  Arguments

1:     nIntegerInput
On entry: the actual state dimension, $n$, i.e., the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 1$.
2:     mIntegerInput
On entry: the actual input dimension, $m$.
Constraint: ${\mathbf{m}}\ge 1$.
3:     reducetoNag_ControllerFormInput
On entry: indicates whether the matrix pair $\left(B,A\right)$ is to be reduced to upper or lower controller Hessenberg form as follows:
${\mathbf{reduceto}}=\mathrm{Nag_UH_Controller}$
Upper controller Hessenberg form).
${\mathbf{reduceto}}=\mathrm{Nag_LH_Controller}$
Lower controller Hessenberg form).
Constraint: ${\mathbf{reduceto}}=\mathrm{Nag_UH_Controller}$ or $\mathrm{Nag_LH_Controller}$.
4:     a[${\mathbf{n}}×{\mathbf{tda}}$]doubleInput/Output
Note: the $\left(i,j\right)$th element of the matrix $A$ is stored in ${\mathbf{a}}\left[\left(i-1\right)×{\mathbf{tda}}+j-1\right]$.
On entry: the leading $n$ by $n$ part of this array must contain the state transition matrix $A$ to be transformed.
On exit: the leading $n$ by $n$ part of this array contains the transformed state transition matrix $UA{U}^{\mathrm{T}}$.
5:     tdaIntegerInput
On entry: the stride separating matrix column elements in the array a.
Constraint: ${\mathbf{tda}}\ge {\mathbf{n}}$.
6:     b[${\mathbf{n}}×{\mathbf{tdb}}$]doubleInput/Output
Note: the $\left(i,j\right)$th element of the matrix $B$ is stored in ${\mathbf{b}}\left[\left(i-1\right)×{\mathbf{tdb}}+j-1\right]$.
On entry: the leading $n$ by $m$ part of this array must contain the input matrix $B$ to be transformed.
On exit: the leading $n$ by $m$ part of this array contains the transformed input matrix $UB$.
7:     tdbIntegerInput
On entry: the stride separating matrix column elements in the array b.
Constraint: ${\mathbf{tdb}}\ge {\mathbf{m}}$.
8:     u[${\mathbf{n}}×{\mathbf{tdu}}$]doubleInput/Output
Note: the $\left(i,j\right)$th element of the matrix $U$ is stored in ${\mathbf{u}}\left[\left(i-1\right)×{\mathbf{tdu}}+j-1\right]$.
On entry: if u is defined, then the leading $n$ by $n$ part of this array must contain either a transformation matrix (e.g., from a previous call to this function) or be initialized as the identity matrix. If this information is not to be input then u must be set to the null pointer, i.e., (double *)0.
On exit: if u is defined, then the leading $n$ by $n$ part of this array contains the product of the input matrix $U$ and the state-space transformation matrix which reduces the given pair to observer Hessenberg form.
9:     tduIntegerInput
On entry: the stride separating matrix column elements in the array u.
Constraint: ${\mathbf{tdu}}\ge {\mathbf{n}}$ if u is defined.
10:   failNagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

## 6  Error Indicators and Warnings

NE_2_INT_ARG_LT
On entry, ${\mathbf{tda}}=〈\mathit{\text{value}}〉$ while ${\mathbf{n}}=〈\mathit{\text{value}}〉$. These arguments must satisfy ${\mathbf{tda}}\ge {\mathbf{n}}$. On entry ${\mathbf{tdb}}=〈\mathit{\text{value}}〉$ while ${\mathbf{m}}=〈\mathit{\text{value}}〉$. These arguments must satisfy ${\mathbf{tdb}}\ge {\mathbf{m}}$. On entry ${\mathbf{tdu}}=〈\mathit{\text{value}}〉$ while ${\mathbf{n}}=〈\mathit{\text{value}}〉$. These arguments must satisfy ${\mathbf{tdu}}\ge {\mathbf{n}}$.
NE_BAD_PARAM
On entry, argument reduceto had an illegal value.
NE_INT_ARG_LT
On entry, ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{m}}\ge 1$.
On entry, ${\mathbf{n}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{n}}\ge 1$.

## 7  Accuracy

The algorithm is backward stable.

## 8  Further Comments

The algorithm requires $O\left(\left(n+m\right){n}^{2}\right)$ operations (see van Dooren and Verhaegen (1985)).

## 9  Example

To reduce the matrix pair $\left(B,A\right)$ to upper controller Hessenberg form, and return the unitary state-space transformation matrix $U$.

### 9.1  Program Text

Program Text (g13exce.c)

### 9.2  Program Data

Program Data (g13exce.d)

### 9.3  Program Results

Program Results (g13exce.r)

nag_trans_hessenberg_controller (g13exc) (PDF version)
g13 Chapter Contents
g13 Chapter Introduction
NAG C Library Manual