blockStateSpace

Linear state space system

Extends from Interfaces.MIMO (Multiple Input Multiple Output continuous control block).

Information

The State Space block defines the relation between the input u and the output y in state space form:

der(x) = A * x + B * u
    y  = C * x + D * u

The input is a vector of length nu, the output is a vector of length ny and nx is the number of states. Accordingly

A has the dimension: A(nx,nx),
B has the dimension: B(nx,nu),
C has the dimension: C(ny,nx),
D has the dimension: D(ny,nu)

Example:

parameter: A = [0.12, 2;3, 1.5]
parameter: B = [2, 7;3, 1]
parameter: C = [0.1, 2]
parameter: D = zeros(ny,nu)

results in the following equations:
  [der(x[1])]   [0.12  2.00] [x[1]]   [2.0  7.0] [u[1]]
  [         ] = [          ]*[    ] + [        ]*[    ]
  [der(x[2])]   [3.00  1.50] [x[2]]   [0.1  2.0] [u[2]]
                             [x[1]]            [u[1]]
       y[1]   = [0.1  2.0] * [    ] + [0  0] * [    ]
                             [x[2]]            [u[2]]

Parameters

TypeNameDefaultDescription
Real[:,size(A, 1)]A[1, 0; 0, 1]Matrix A of state space model (e.g., A=[1, 0; 0, 1])
Real[size(A, 1),:]B[1; 1]Matrix B of state space model (e.g., B=[1; 1])
Real[:,size(A, 1)]C[1, 1]Matrix C of state space model (e.g., C=[1, 1])
Real[size(C, 1),size(B, 2)]Dzeros(size(C, 1), size(B, 2))Matrix D of state space model
Integernin (from MIMO)1Number of inputs
Integernout (from MIMO)1Number of outputs
Initialization
Modelica.Blocks.Types.InitinitTypeModelica.Blocks.Types.Init.NoInitType of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)
Real[nx]x_startzeros(nx)Initial or guess values of states
Real[ny]y_startzeros(ny)Initial values of outputs (remaining states are in steady state if possible)

Connectors

TypeNameDefaultDescription
RealInput[nin]u (from MIMO)Connector of Real input signals
RealOutput[nout]y (from MIMO)Connector of Real output signals

Components

TypeNameDefaultDescription
Real[size(A, 1)]xState vector