## Transforming Between Linear Model Representations

You can transform linear models between state-space and polynomial forms. You can also transform between frequency-response, state-space, and polynomial forms.

If you used the System Identification app to estimate models, you must export the models to the MATLAB® workspace before converting models.

For detailed information about each command in the following table, see the corresponding reference page.

Commands for Transforming Model Representations

CommandModel Type to ConvertUsage Example
`idfrd`

Converts any linear model to an `idfrd` model.

If you have the Control System Toolbox™ product, this command converts any numeric LTI model too.

To get frequency response of `m` at default frequencies, use the following command:

```m_f = idfrd(m) ```

To get frequency response at specific frequencies, use the following command:

`m_f = idfrd(m,f)`

To get frequency response for a submodel from input `2` to output `3`, use the following command:

`m_f = idfrd(m(2,3))`
`idpoly`

Converts any linear identified model, except `idfrd`, to ARMAX representation if the original model has a nontrivial noise component, or OE if the noise model is trivial (```H = 1```).

If you have the Control System Toolbox product, this command converts any numeric LTI model, except `frd`.

To get an ARMAX model from state-space model `m_ss`, use the following command:

`m_p = idpoly(m_ss)`
`idss`

Converts any linear identified model, except `idfrd`, to state-space representation.

If you have the Control System Toolbox product, this command converts any numeric LTI model, except `frd`.

To get a state-space model from an ARX model `m_arx`, use the following command:

`m_ss = idss(m_arx)`
`idtf`

Converts any linear identified model, except `idfrd`, to transfer function representation. The noise component of the original model is lost since an `idtf` object has no elements to model noise dynamics.

If you have the Control System Toolbox product, this command converts any numeric LTI model, except `frd`.

To get a transfer function from a state-space model `m_ss`, use the following command:

`m_tf = idtf(m_ss)`

Note

Most transformations among identified models (among `idss`, `idtf`, `idpoly`) causes the parameter covariance information to be lost, with few exceptions:

• Conversion of an `idtf` model to an `idpoly` model.

• Conversion of an `idgrey` model to an `idss` model.

If you want to translate the estimated parameter covariance during conversion, use `translatecov`.