Main Content

dss

Create descriptor state-space models

    Description

    sys = dss(A,B,C,D,E) creates the continuous-time descriptor state-space model

    Edxdt=Ax+Buy=Cx+Du

    The output sys is a state-space (ss) model object. Descriptor state-space models are also known as implicit state-space models.

    example

    sys = dss(A,B,C,D,E,Ts) creates the discrete-time descriptor model

    Ex[n+1]=Ax[n]+Bu[n]y[n]=Cx[n]+Du[n]

    with sample time Ts (in seconds).

    example

    sys = dss(A,B,C,D,E,ltisys) creates a descriptor model with properties including the sample time, input and output names, delays, and others inherited from the dynamic system model ltisys.

    example

    sys = dss(___,Name=Value) specifies one or more properties of the state-space model sys in addition to the input arguments of previous syntaxes. For example, to name the inputs of sys, set InputName to a string array containing the input names.

    example

    Examples

    collapse all

    Create a descriptor (implicit) state-space model with the following state-space matrices.

    A = -0.2*eye(3);
    B = eye(3);
    C = eye(3);
    D = 0;
    E = [8 -3 -3; -3 8 -3; -3 -3 8];
    

    Use dss with these matrices to create the model.

     sys = dss(A,B,C,D,E);

    sys is an ss model with three inputs and three outputs.

    Create a discrete-time model having the following state-space equation.

    Ex[n+1]=Ax[n]+Bu[n]y[n]=Cx[n]+Du[n]

    Create state-space matrices A, B, C, D, and E. For this example, use a SISO model with two states.

    A = [-3 6; -1 2];
    B = [0.2; 0];
    C = [0.8 0];
    D = 0;
    E = [1 -4; -3 2];
    

    Create the model with sample time 0.1 s.

    Ts = 0.1;
    sys = dss(A,B,C,D,E,Ts);
    

    sys is a discrete-time ss model.

    Create a SISO descriptor state-space model, specifying an input delay, an input name, and an output name. For this example, use the following state-space matrices.

    A = [-3 6; -1 2];
    B = [0.2; 0];
    C = [0.8 0];
    D = 0;
    E = [1 -4; -3 2];
    

    Create the model, using Name-Value pair arguments to specify the properties.

    sys = dss(A,B,C,D,E,InputDelay=0.1,InputName="volt",OutputName="temp");

    If you already have a model object with the desired properties, you can use that model to set the properties of sys instead. For example, suppose you have a state-space model ltisys such that ltisys.InputDelay = 0.1, ltisys.InputName = 'volt', and ltisys.OutputName = 'temp'. Create the descriptor model using ltisys.

    sys = dss(A,B,C,D,E,ltisys);

    Input Arguments

    collapse all

    State-space matrices describing the system specified as matrices. These matrices define the state-space equations for the system as follows.

    • Continuous time:

      Edxdt=Ax+Buy=Cx+Du

    • Discrete time:

      Ex[n+1]=Ax[n]+Bu[n]y[n]=Cx[n]+Du[n]

    The state-space matrices can be numeric matrices, generalized matrices (genmat) containing tunable elements, uncertain matrices (umat) containing uncertain elements.

    Sample time, specified as:

    • 0 for continuous-time systems.

    • A positive scalar representing the sampling period of a discrete-time system. By default, Ts is in seconds. To specify different time units, set the TimeUnit property.

    • -1 for a discrete-time system with an unspecified sample time.

    Model to set properties of sys, specified as a dynamic system model such as an ss model, tf model, or other model type. sys inherits properties including the sample time, input and output names, delays, and others from ltisys.

    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: sys = dss(A,B,C,D,E,InputName="voltage",OutputName="torque") sets the InputName and OutputName properties of the resulting state-space model.

    For dss, you can set the state-space model properties listed in the Properties section of the ss reference page.

    Output Arguments

    collapse all

    Descriptor state-space model, returned as:

    • An ss model, if the state-space matrices A, B, C, D, and E are all numeric matrices.

    • A genss model, if one or more of the state-space matrices is a genmat with tunable elements.

    • A uss model, if one or more of the state-space matrices is a umat with uncertain elements. (Requires a Robust Control Toolbox™ license.)

    Version History

    Introduced before R2006a

    See Also

    | | | | | (Robust Control Toolbox)