Main Content

ssequiv

Equivalence transformation for state-space models

Since R2023b

    Description

    ssequiv performs an equivalence transformation on a state-space model.

    Input ModelTransformed Model

    Ex˙=Ax+Buy=Cx+Du

    TLETRx˙=TLATRx+TLBuy=CTRx+Du

    Here:

    • The left-transformation matrix is defined as TL=T1e1.

    • The right-transformation matrix is defined as TR=T2e2.

    • e1 and e2 are either –1 or 1. That is, TL is T1 or its inverse and TR is T2 or its inverse.

    sysT = ssequiv(sys,T1,e1,T2,e2) performs the equivalence transformation for sys.

    example

    Examples

    collapse all

    Perform an equivalence transform for a state space model.

    Generate a random state-space model and a transformation matrix.

    rng(0)
    sys = rss(5);  
    T1 = randn(5);
    rng(2)
    T2 = randn(5);

    Perform the following transformation on sys.

    x˙=T1-1AT2x+T1-1By=CT2

    sysT = ssequiv(sys,T1,-1,T2,1);

    Plot the frequency response of both models.

    bode(sys,'b',sysT,'r--')
    legend

    MATLAB figure

    ans = 
      Legend (sys, sysT) with properties:
    
             String: {'sys'  'sysT'}
           Location: 'northeast'
        Orientation: 'vertical'
           FontSize: 8.1000
           Position: [0.8059 0.8814 0.1486 0.0884]
              Units: 'normalized'
    
      Use GET to show all properties
    
    

    The responses of both models match closely.

    ssequiv applies state transformation only to the state vectors of the numeric portion of the generalized model.

    Create a genss model.

    sys = rss(2,2,2) * tunableSS('a',2,2,3) + tunableGain('b',2,3)
    Generalized continuous-time state-space model with 2 outputs, 3 inputs, 4 states, and the following blocks:
      a: Tunable 2x3 state-space model, 2 states, 1 occurrences.
      b: Tunable 2x3 gain, 1 occurrences.
    
    Type "ss(sys)" to see the current value and "sys.Blocks" to interact with the blocks.
    

    Specify transformation matrices.

    T1 = [1 -2;3 5];  
    T2 = T1;

    Apply the transformation

    x˙=TLATR-1x+TLBy=CTR-1+Du.

    tsys = ssequiv(sys,T1,1,T2,-1);

    Compare this transformed model with the model from decomposed tsys.

    sigma(sys,tsys,"r--")

    MATLAB figure

    The responses of both models match closely.

    Input Arguments

    collapse all

    Dynamic system, specified as a SISO, or MIMO dynamic system model. Dynamic systems that you can use include:

    • Continuous-time or discrete-time numeric LTI models, such as ss or dss models.

    • Generalized or uncertain LTI models, such as genss or uss (Robust Control Toolbox) models. (Using uncertain models requires Robust Control Toolbox™ software.)

      For such models, the state transformation is applied only to the state vectors of the numeric portion of the model. For more information about decomposition of these models, see getLFTModel and Internal Structure of Generalized Models.

    • Identified state-space idss (System Identification Toolbox) models. (Using identified models requires System Identification Toolbox™ software.)

    If sys is an array of state-space models, ssequiv applies the transformation T to each individual model in the array.

    Left-transformation matrix, specified as an n-by-n square invertible matrix, where n is the number of states. The left-transformation matrix is defined as TL=T1e1, that is, T1 or its inverse.

    To omit the left transformation, specify T1 and e1 as [].

    For example, the following code transforms A, B, C, E of sys to ATT, B, CTT, ETT.

    sys = ssequiv(sys,[],[],T',1);

    Left-transformation matrix exponent, specified as –1 or 1.

    To omit the left transformation, specify T1 and e1 as [].

    For example, the following code transforms A, B, C, E of sys to ATT, B, CTT, ETT.

    sys = ssequiv(sys,[],[],T',1);

    Right-transformation matrix, specified as an n-by-n square invertible matrix, where n is the number of states. The right-transformation matrix is defined as TR=T2e2, that is, T1 or its inverse.

    To omit the right transformation, specify T2 and e2 as [].

    For example, the following code transforms A, B, C, E of sys to T-1A, T-1B, C, T-1E.

    sys = ssequiv(sys,T,-1,[],[]);

    Right-transformation matrix exponent, specified as –1 or 1.

    To omit the right transformation, specify T2 and e2 as [].

    For example, the following code transforms A, B, C, E of sys to T-1A, T-1B, C, T-1E.

    sys = ssequiv(sys,T,-1,[],[]);

    Output Arguments

    collapse all

    Transformed state-space model, returned as a dynamic system model of the same type as sys.

    Version History

    Introduced in R2023b

    See Also

    | | | |