# ssform

Quick configuration of state-space model structure

## Syntax

``newSys = ssform(sys)``

## Description

example

````newSys = ssform(sys)` specifies the type of parameterization, feedthrough, and disturbance dynamics for the identified state-space model `sys` using one or more name-value arguments.If you do not specify a name-value argument, the corresponding model property remains unchanged.```

## Examples

collapse all

Create a state-space model.

```rng('default'); A = randn(2) - 2*eye(2); B = randn(2,1); C = randn(1,2); D = 0; K = randn(2,1); model = idss(A,B,C,D,K,'Ts',0);```

The state-space model has free parameterization and no feedthrough.

Convert the model to observability canonical form.

`model1 = ssform(model,'Form','canonical');`

`load iddata1 z1;`

Create a state-space model.

```rng('default'); A = randn(2) - 2*eye(2); B = randn(2,1); C = randn(1,2); D = 0; K = randn(2,1); model = idss(A,B,C,D,K,'Ts',0);```

The state-space model has free parameterization and no feedthrough.

Convert the model to observability canonical form and specify to estimate its feedthrough behavior.

`model1 = ssform(model,'Form','canonical','Feedthrough', true);`

Estimate the parameters of the model.

`model2 = ssest(z1,model1);`

## Input Arguments

collapse all

Identified state-space model, specified as an `idss` object.

### Name-Value Arguments

Specify optional pairs of arguments as `Name1=Value1,...,NameN=ValueN`, where `Name` is the argument name and `Value` is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: `Form="free"`

Before R2021a, use commas to separate each name and value, and enclose `Name` in quotes.

Example: `'Form',"free"`

Structure of model `A`, `B`, and `C` matrices, specified as one of the following values.

• `"free"` — Configure all elements of `A`, `B`, and `C` as free parameters.

• `"companion"` — Use the companion form of the model, where the characteristic polynomial appears in the far-right column of state matrix `A`.

• `"modal"` — Use the modal decomposition form, where state matrix `A` is block-diagonal. Each block corresponds to a real or complex-conjugate pair of poles.

You cannot use this model decomposition form for models with repeated poles.

• `"canonical"` — Use the observability canonical form of `A`, `B`, and `C` matrices, as described in .

Model feedthrough, specified as a logical vector with length equal to the number of model inputs Nu. Use this option to indicate whether the model has direct feedthrough from the input u(t) to the output y(t).

If you set the ith element of `Feedthrough` to `false`, then `ssform` sets `newSys.Structure.D.Value(:,i)` to zero and `newSys.Structure.D.Free(:,i)` to `false`.

If you set the ith element of `Feedthrough` to `true`, then `ssform` sets `newSys.Structure.D.Free(:,i)` to `true`.

Note

Specifying this option for a previously estimated model causes the model parameter covariance information to be lost. Use `translatecov` to recompute the covariance.

Option to estimate noise component of model, specified as one of the following values.

• `"none"` — Do not estimate the noise component of the model. In this case, the `K` matrix is zero.

• `"estimate` — Estimate the noise component of the model. In this case, the `K` matrix is treated as a free parameter of the model.

Note

Specifying this option for a previously estimated model causes the model parameter covariance information to be lost. To recompute the covariance, use `translatecov`.

## Output Arguments

collapse all

Updated state-space model with configured parameterization, feedthrough, and disturbance dynamics, returned as an `idss` object.

If you do not specify tone or more of the parameterization, feedthrough, or disturbance dynamics, the corresponding properties of `newSys` remain unchanged.

## Alternatives

Use the `Structure` property of an `idss` model to specify the parameterization, feedthrough, and disturbance dynamics by modifying the `Value` and `Free` attributes of the `A`, `B`, `C`, `D`, and `K` parameters.

 Ljung, L. System Identification: Theory For the User, Second Edition, Appendix 4A, pp 132-134, Upper Saddle River, N.J: Prentice Hall, 1999.
{"ft_lang_label":"__label__en","ft_lang_prob":0.5976361,"math_prob":0.95594513,"size":4193,"snap":"2023-40-2023-50","text_gpt3_token_len":1056,"char_repetition_ratio":0.13893531,"word_repetition_ratio":0.22258593,"special_character_ratio":0.22919151,"punctuation_ratio":0.17992656,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98018545,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-10-01T17:45:32Z\",\"WARC-Record-ID\":\"<urn:uuid:3468d35f-6630-41a8-a5e6-ece339611781>\",\"Content-Length\":\"100378\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:badd16f7-5a09-4298-9f91-0b29d0fbd1e2>\",\"WARC-Concurrent-To\":\"<urn:uuid:184d6acd-d159-453a-9395-5489f7c207b6>\",\"WARC-IP-Address\":\"23.34.160.82\",\"WARC-Target-URI\":\"https://nl.mathworks.com/help/ident/ref/idss.ssform.html\",\"WARC-Payload-Digest\":\"sha1:EC5GP2SZGE6EXWFTEEMGF4UE4RN4LFZT\",\"WARC-Block-Digest\":\"sha1:UJBHXUE4ZTM5KZXQVSRYGMTT42F7PKDB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510924.74_warc_CC-MAIN-20231001173415-20231001203415-00453.warc.gz\"}"}