# hankelsv

(Not recommended) Compute Hankel singular values for stable/unstable or continuous/discrete system

`hankelsv` is not recommended. Use `reducespec` for model order reduction workflows instead. (since R2023b) For more information on updating your code, see Version History.

## Syntax

```[sv_stab,sv_unstab] = hankelsv(G,ErrorType,style) hankelsv(G) hankelsv(G,ErrorType,style) ```

## Description

`[sv_stab,sv_unstab] = hankelsv(G,ErrorType,style)` returns a column vector `SV_STAB` containing the Hankel singular values of the stable part of `G` and `SV_UNSTAB` of anti-stable part (if it exists). The Hankel SV's of anti-stable part `ss(a,b,c,d)` is computed internally via `ss(-a,-b,c,d)`. Discrete model is converted to continuous one via the bilinear transform.

`hankelsv(G)` with no output arguments draws a bar graph of the Hankel singular values such as the following:

To generate the bar graph with specified error type and style, use `hankelsv(G,ErrorType,style)`. This table describes optional input arguments for `hankelsvd`.

Argument

Value

Description

`ERRORTYPE`

`'``add``'`

`'``mult``'`

`'``ncf``'`

Regular Hankel SV's of G

Hankel SV's of phase matrix

Hankel SV's of coprime factors

`STYLE`

`'``abs``'`

`'``log'`

Absolute value

logarithm scale

## Algorithms

If `ErrorType = 'add'`, then `hankelsv` implements the numerically robust square root method to compute the Hankel singular values [1]. Its algorithm goes as follows:

Given a stable model `G`, with controllability and observability Gramians `P` and `Q`, compute the SVD of `P` and `Q`:

```[Up,Sp,Vp] = svd(P); [Uq,Sq,Vq] = svd(Q); ```

Then form the square roots of the Gramians:

```Lr = Up*diag(sqrt(diag(Sp))); Lo = Uq*diag(sqrt(diag(Sq))); ```

The Hankel singular values are simply:

σ`H =svd(Lo'*Lr);`

This method takes advantage of the robust SVD algorithm and ensures the computations stay well within the square root of the machine accuracy.

If `ErrorType = 'mult'`, then `hankelsv` computes the Hankel singular value of the phase matrix of `G` [2].

If `ErrorType = 'ncf'`, then `hankelsv` computes the Hankel singular value of the normalized coprime factor pair of the model [3].

## References

[1] Safonov, M.G., and R.Y. Chiang, “A Schur Method for Balanced Model Reduction,” IEEE Trans. on Automat. Contr., vol. AC-2, no. 7, July 1989, pp. 729-733.

[2] Safonov, M.G., and R.Y. Chiang, “Model Reduction for Robust Control: A Schur Relative Error Method,” International J. of Adaptive Control and Signal Processing, Vol. 2, pp. 259-272, 1988.

[3] Vidyasagar, M., Control System Synthesis - A Factorization Approach. London: The MIT Press, 1985.

## Version History

Introduced before R2006a

collapse all

### R2023b: Not recommended

`hankelsv` is not recommended. To perform balanced truncation model order reduction and view the Hankel singular values, use the `reducespec` and `view` functions.

```R = reducespec(sys,"balanced"); view(R)```

For the full workflow, see Task-Based Model Order Reduction Workflow.