# BalancedTruncationOptions

## Description

This object contains model order reduction options of ordinary (nonsparse) linear
time-invariant models, and is contained in the `Options`

property of a
`BalancedTruncation`

object `R`

created using `reducespec`

. To
configure these options, use dot notation, for example, ```
R.Options.Goal =
"relative"
```

.

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

## Properties

`InputWeight`

— Input weight

`[]`

(default) | dynamic system model | matrix

Input weight for input scaling and frequency weighting, specified as a matrix or dynamic system model.

Set the `InputWeight`

and `OutputWeight`

properties to control the frequency-weighted error $$\Vert {W}_{L}(G-{G}_{r}){W}_{R}\Vert $$, where *G* and
*G _{r}* are the full-order and reduced-order
models, respectively.

*W*(output weight) and

_{L}*W*(input weight) must be linear time-invariant models of compatible size and have high gain in frequency bands of interest and low gain elsewhere. Doing so emphasizes the accuracy of the reduced-order model in a particular frequency band.

_{R}This property is ignored when `R.Options.Goal`

is
`"relative"`

, which corresponds to
*W _{L}* =

`inv(G)`

and
*W*=

_{R}`[]`

.`OutputWeight`

— Output weight

`[]`

(default) | dynamic system model | matrix

Output weight for output scaling and frequency weighting, specified as a matrix or a dynamic system model.

Set the `InputWeight`

and `OutputWeight`

properties to control the frequency-weighted error $$\Vert {W}_{L}(G-{G}_{r}){W}_{R}\Vert $$, where *G* and
*G _{r}* are the full-order and reduced-order
models, respectively.

*W*(output weight) and

_{L}*W*(input weight) must be linear time-invariant models of compatible size and have high gain in frequency bands of interest and low gain elsewhere. Doing so emphasizes the accuracy of the reduced-order model in a particular frequency band.

_{R}This property is ignored when `R.Options.Goal`

is
`"relative"`

, which corresponds to
*W _{L}* =

`inv(G)`

and
*W*=

_{R}`[]`

.`Goal`

— Model reduction goal

`"absolute"`

(default) | `"relative"`

Model reduction goal, specified as either `"absolute"`

' or
`"relative"`

. Use this option to select the balancing algorithm and
control the type of reduced-order model
*G _{r}*.

`"absolute"`

— Minimize the absolute error $${\Vert G-{G}_{r}\Vert}_{\infty}$$.`"relative"`

— Minimize the relative error $${\Vert {G}^{-1}\left(G-{G}_{r}\right)\Vert}_{\infty}$$.

Relative error gives a better match across frequencies while absolute error emphasizes areas with most gain.

`Regularization`

— Regularization level

`"auto"`

(default) | nonegative scalar

Regularization level, specified as `"auto"`

or a nonnegative scalar
value. When you set `Goal`

to `"relative"`

, the
software balances the model `[sys,α*I]`

instead of
`sys`

. Set this option to `"auto"`

to let the
algorithm pick a suitable regularization level `α`

value. Specify a
value *α* ≥ 0 to override this default.

This regularization value helps provide a well-defined relative error at all frequencies.

`FreqIntervals`

— Frequency interval restriction of Gramians

`[]`

(default) | two-column matrix

Frequency intervals for computing frequency-limited Hankel singular values,
specified as a matrix with two columns. Each row specifies a frequency interval
`[fmin,fmax]`

, where `fmin`

and
`fmax`

are nonnegative frequencies, expressed in the frequency unit
of the model. When identifying low-energy states to truncate, the software computes
state contributions to system behavior in these frequency ranges only. For
example:

To restrict the computation to the range between 3 rad/s and 15 rad/s, assuming the frequency unit of the model is rad/s, set

`FreqIntervals`

to`[3,15]`

.To restrict the computation to two frequency intervals, 3–15 rad/s and 40–60 rad/s, use

`[3,15;40,60]`

.To specify all frequencies below a cutoff frequency

`fcut`

, use`[0,fcut]`

.To specify all frequencies above the cutoff, use

`[fcut,Inf]`

in continuous time, or`[fcut,pi/Ts]`

in discrete time, where`Ts`

is the sample time of the model.

The default value, `[]`

, imposes
no frequency limitation and is equivalent to `[0,Inf]`

in continuous
time or `[0,pi/Ts]`

in discrete time. However, if you specify a
`TimeIntervals`

value other than `[]`

, then this
limit overrides `FreqIntervals = []`

. If you specify both a
`TimeIntervals`

value and a `FreqIntervals`

value,
then the computation uses the union of these intervals.

When the `Method`

input argument in `getrom`

is
set to `"matchDC"`

(the default value), then the balanced truncation
algorithm attempts to match the DC gain of the original and reduced models, even if the
specified frequency intervals exclude 0. This behavior might reduce the quality of the
match in the specified intervals. To improve the match within frequency intervals that
exclude 0, set `Method`

to `"truncate"`

.

If both the frequency and time intervals do include DC, you can still set
`Method`

to `"truncate"`

to improve the match at
other frequencies and times.

`TimeIntervals`

— Time interval restriction of Gramians

`[]`

(default) | two-column matrix

Time intervals for computing time-limited Hankel singular values, specified as a
matrix with two columns. Each row specifies a time interval
`[tmin,tmax]`

, where `tmin`

and
`tmax`

are nonnegative times, expressed in the time unit of the
model. When identifying low-energy states to truncate, the software computes state
contributions to the system’s impulse response in these time intervals only. For
example:

To restrict the computation to the range between 3 s and 15 s, assuming the time unit of the model is seconds, set

`TimeIntervals`

to`[3,15]`

.To restrict the computation to two time intervals, 3–15 s and 40–60 s, use

`[3,15; 40,60]`

.To specify all times from zero up to a cutoff time

`tcut`

, use`[0,tcut]`

. To specify all times after the cutoff, use`[tcut,Inf]`

.

The default value, `[]`

, imposes
no time limitation and is equivalent to `[0,Inf]`

. However, if you
specify a `FreqIntervals`

value other than `[]`

, then
this limit overrides `Timeintervals = []`

. If you specify both a
`TimeIntervals`

value and a `FreqIntervals`

value,
then the computation uses the union of these intervals.

When the `Method`

input argument in `getrom`

is
set to `"matchDC"`

(the default value), then the balanced truncation
algorithm attempts to match the DC gain of the original and reduced models, even if the
specified frequency intervals exclude 0. This behavior might reduce the quality of the
match in the specified intervals. To improve the match within frequency intervals that
exclude 0, set `Method`

to `"truncate"`

.

If both the frequency and time intervals do include DC, you can still set
`Method`

to `"truncate"`

to improve the match at
other frequencies and times.

`Offset`

— Offset for stable/unstable boundary

`1e-8`

(default) | positive scalar

Offset for the stable/unstable boundary, specified as a positive scalar value. In the stable/unstable decomposition, the stable term includes only poles satisfying

`Re(s) < -Offset × max(1,|Im(s)|)`

(continuous time)`|z| < 1 - Offset`

(discrete time)

Increase the value of `Offset`

to treat poles close to
the stability boundary as unstable.

`SepTol`

— Maximum loss of accuracy in stable/unstable decomposition

`10`

(default) | positive scalar

Maximum accuracy loss factor in stable and unstable decomposition, specified as a
positive scalar. For models with unstable poles, the algorithm first extracts the stable
dynamics using the transformations `TL`

, `TR`

. Use
`SepTol`

to control the decomposition accuracy. Increasing
`SepTol`

helps separate nearby stable and unstable modes at the
expense of accuracy. For more information, see `stabsep`

.

## Version History

**Introduced in R2023b**

## MATLAB 命令

您点击的链接对应于以下 MATLAB 命令：

请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

## How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

### Americas

- América Latina (Español)
- Canada (English)
- United States (English)

### Europe

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)