Accelerating the pace of engineering and science

# modreal

Modal form realization and projection

## Syntax

```[G1,G2] = modreal(G,cut)
```

## Description

[G1,G2] = modreal(G,cut) returns a set of state-space LTI objects G1 and G2 in modal form given a state-space G and the model size of G1, cut.

The modal form realization has its A matrix in block diagonal form with either 1x1 or 2x2 blocks. The real eigenvalues will be put in 1x1 blocks and complex eigenvalues will be put in 2x2 blocks. These diagonal blocks are ordered in ascending order based on eigenvalue magnitudes.

The complex eigenvalue a+bj is appearing as 2x2 block

$\left[\begin{array}{cc}a& b\\ -b& a\end{array}\right]$

This table describes input arguments for modreal.

Argument

Description

G

LTI model to be reduced.

cut

(Optional) an integer to split the realization. Without it, a complete modal form realization is returned

This table lists output arguments.

Argument

Description

G1,G2

LTI models in modal form

G can be stable or unstable. G1 = (A1, B1, C1, D1), G2 = (A2, B2, C2, D2) and D1 = D + C2(–A2)–1B2 is calculated such that the system DC gain is preserved.

## Examples

Given a continuous stable or unstable system, G, the following commands can get a set of modal form realizations depending on the split index -- cut:

```rng(1234,'twister');
[G1,G2] = modreal(G,2); % cut = 2 for two rigid body modes
G1.d = zeros(2,2); % remove the DC gain of the system from G1
sigma(G,G1,G2)
```