Main Content

ssform

Quick configuration of state-space model structure

    Description

    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.

    example

    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 the estimation data.

    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 [1].

    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.

    References

    [1] Ljung, L. System Identification: Theory For the User, Second Edition, Appendix 4A, pp 132-134, Upper Saddle River, N.J: Prentice Hall, 1999.

    Version History

    Introduced in R2012b