# balred

(Not recommended) Model order reduction

`balred`

and `balredOptions`

are not recommended.
Use `reducespec`

(Control System Toolbox)
instead.* (since R2023b)* For more information on updating your code, see Compatibility Considerations.

## Description

`[`

computes a reduced-order approximation `rsys`

,`info`

] = balred(`sys`

,`order`

)`rsys`

of the LTI model
`sys`

. The desired order (number of states) is specified by
`order`

. You can try multiple orders at once by setting
`order`

to a vector of integers, in which case
`rsys`

is an array of reduced models. `balred`

also
returns a structure `info`

with additional information like the Hankel
singular values (HSV), error bound, regularization level and the Cholesky factors of the
gramians.

`[~,`

returns the structure `info`

] = balred(`sys`

)`info`

without computing the reduced-order model.
You can use this information to select the reduced order `order`

based
on your desired fidelity.

**Note**

When performance is a concern, avoid computing the Hankel singular values twice by
using the information obtained from the above syntax to select the desired model order
and then use `rsys = balred(sys,order,info)`

to compute the
reduced-order model.

`[___] = balred(___,`

computes the reduced model using the options set `opts`

)`opts`

that you
specify using `balredOptions`

. You can specify additional options for
eliminating states, using absolute vs. relative error control, emphasizing certain time or
frequency bands, and separating the stable and unstable modes. See
`balredOptions`

to create and configure the option set
`opts`

.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

`balred`

first decomposes*G*into its stable and unstable parts:$$G={G}_{s}+{G}_{u}$$

When you specify

`ErrorBound`

as`absolute`

,`balred`

uses the balanced truncation method of [1] to reduce*G*. This computes the Hankel singular values (HSV)_{s}*σ*based on the controllability and observability gramians. For order_{j}*r*, the absolute error $${\Vert {G}_{s}-{G}_{r}\Vert}_{\infty}$$ is bounded by $$2{\displaystyle \sum _{j=r+1}^{n}{\sigma}_{j}}$$. Here,*n*is the number of states in*G*._{s}When you specify

`ErrorBound`

as`relative`

,`balred`

uses the balanced stochastic truncation method of [2] to reduce*G*. For square_{s}*G*, this computes the HSV_{s}*σ*of the phase matrix $$F={\left(W\text{'}\right)}^{-1}G$$ where_{j}*W(s)*is a stable, minimum-phase spectral factor of*GG’*:$$W\text{'}(s)W(s)=G(s)G\text{'}(s)$$

For order

*r*, the relative error $${\Vert {G}_{s}{}^{-1}({G}_{s}-{G}_{r})\Vert}_{\infty}$$ is bounded by:$$\prod _{j=r+1}^{H}\left(\frac{1+{\sigma}_{j}}{1-{\sigma}_{j}}\right)}-1\approx 2{\displaystyle \sum _{j=r+1}^{n}{\sigma}_{j}$$

when, $$2{\displaystyle \sum _{j=r+1}^{n}{\sigma}_{j}}\ll 1$$.

## Alternative Functionality

### App

Model Reducer (Control System Toolbox)

### Live Editor Task

Reduce Model Order (Control System Toolbox)

## References

[1] Varga, A., "Balancing-Free
Square-Root Algorithm for Computing Singular Perturbation Approximations," *Proc. of
30th IEEE CDC*, Brighton, UK (1991), pp. 1062-1065.

[2] Green, M., "A Relative Error Bound
for Balanced Stochastic Truncation", *IEEE Transactions on Automatic
Control*, Vol. 33, No. 10, 1988

## Version History

**Introduced before R2006a**

## See Also

### Functions

`balredOptions`

(Control System Toolbox)

### Apps

- Model Reducer (Control System Toolbox)

### Live Editor Tasks

- Reduce Model Order (Control System Toolbox)

### Topics

- Model Reduction Basics (Control System Toolbox)
- Balanced Truncation Model Reduction (Control System Toolbox)