# NAG CL Interfaceg13ewc (trans_​hessenberg_​observer)

Settings help

CL Name Style:

## 1Purpose

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

## 2Specification

 #include
 void g13ewc (Integer n, Integer p, Nag_ObserverForm reduceto, double a[], Integer tda, double c[], Integer tdc, double u[], Integer tdu, NagError *fail)
The function may be called by the names: g13ewc, nag_tsa_trans_hessenberg_observer or nag_trans_hessenberg_observer.

## 3Description

g13ewc computes a unitary state-space transformation U, which reduces the matrix pair $\left(A,C\right)$ to give a compound matrix in one of the following observer Hessenberg forms:
 $n ( U A UT C UT ) = ( * . . . . . . * . . . . . . * . . . . . * . . . * * . . * . . . . * ) n p$
if ${\mathbf{reduceto}}=\mathrm{Nag_UH_Observer}$, or
 $n ( C UT U A UT ) = ( * . . . . * . . * * . . . * . . . . . * . . . . . . * . . . . . . * ) p n$
if ${\mathbf{reduceto}}=\mathrm{Nag_LH_Observer}$. If $p>n$, then the matrix $C{U}^{\mathrm{T}}$ is trapezoidal and if $p+1\ge n$, then the matrix $UA{U}^{\mathrm{T}}$ is full.

## 4References

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

## 5Arguments

1: $\mathbf{n}$Integer Input
On entry: the actual state dimension, $n$, i.e., the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 1$.
2: $\mathbf{p}$Integer Input
On entry: the actual output dimension, $p$.
Constraint: ${\mathbf{p}}\ge 1$.
3: $\mathbf{reduceto}$Nag_ObserverForm Input
On entry: indicates whether the matrix pair $\left(A,C\right)$ is to be reduced to upper or lower observer Hessenberg form
${\mathbf{reduceto}}=\mathrm{Nag_UH_Observer}$
Upper observer Hessenberg form).
${\mathbf{reduceto}}=\mathrm{Nag_LH_Observer}$
Lower observer Hessenberg form).
Constraint: ${\mathbf{reduceto}}=\mathrm{Nag_UH_Observer}$ or $\mathrm{Nag_LH_Observer}$.
4: $\mathbf{a}\left[{\mathbf{n}}×{\mathbf{tda}}\right]$double Input/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×n$ part of this array must contain the state transition matrix $A$ to be transformed.
On exit: the leading $n×n$ part of this array contains the transformed state transition matrix $UA{U}^{\mathrm{T}}$.
5: $\mathbf{tda}$Integer Input
On entry: the stride separating matrix column elements in the array a.
Constraint: ${\mathbf{tda}}\ge {\mathbf{n}}$.
6: $\mathbf{c}\left[{\mathbf{p}}×{\mathbf{tdc}}\right]$double Input/Output
Note: the $\left(i,j\right)$th element of the matrix $C$ is stored in ${\mathbf{c}}\left[\left(i-1\right)×{\mathbf{tdc}}+j-1\right]$.
On entry: the leading $p×n$ part of this array must contain the output matrix $C$ to be transformed.
On exit: the leading $p×n$ part of this array contains the transformed output matrix $C{U}^{\mathrm{T}}$.
7: $\mathbf{tdc}$Integer Input
On entry: the stride separating matrix column elements in the array c.
Constraint: ${\mathbf{tdc}}\ge {\mathbf{n}}$.
8: $\mathbf{u}\left[{\mathbf{n}}×{\mathbf{tdu}}\right]$double Input/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 not NULL, then the leading $n×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 NULL.
On exit: if u is not NULL, then the leading $n×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: $\mathbf{tdu}$Integer Input
On entry: the stride separating matrix column elements in the array u.
Constraint: ${\mathbf{tdu}}\ge {\mathbf{n}}$ if u is defined.
10: $\mathbf{fail}$NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

## 6Error 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{tdc}}=⟨\mathit{\text{value}}⟩$ while ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$. These arguments must satisfy ${\mathbf{tdc}}\ge {\mathbf{n}}$.
On entry ${\mathbf{tdu}}=⟨\mathit{\text{value}}⟩$ while ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$. These arguments must satisfy ${\mathbf{tdu}}\ge {\mathbf{n}}$.
On entry, argument reduceto had an illegal value.
NE_INT_ARG_LT
On entry, ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{n}}\ge 1$.
On entry, ${\mathbf{p}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{p}}\ge 1$.

## 7Accuracy

The algorithm is backward stable.

## 8Parallelism and Performance

g13ewc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

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

## 10Example

To reduce the matrix pair $\left(A,C\right)$ to upper observer Hessenberg form.

### 10.1Program Text

Program Text (g13ewce.c)

### 10.2Program Data

Program Data (g13ewce.d)

### 10.3Program Results

Program Results (g13ewce.r)