StateSpace

Linear state space system

    StateSpace

Library

Modelica/Blocks/Continuous

Description

The State Space block defines the relationbetween the input u and the outputy 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 vectorof 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

StateSpace_0

NameLabelDescriptionData TypeValid Values

mo_A

A

Matrix A of state space model (e.g., A=[1, 0; 0, 1])

Matrix

mo_B

B

Matrix B of state space model (e.g., B=[1; 1])

Matrix

mo_C

C

Matrix C of state space model (e.g., C=[1, 1])

Matrix

mo_D

D

Matrix D of state space model

Matrix

mo_nin

nin

Number of inputs

Scalar

mo_nout

nout

Number of outputs

Scalar

mo_nx

nx

number of states

Scalar

mo_ny

ny

number of outputs

Scalar

mo_initType

initType

Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output)

Structure

mo_initType/choice1

No initialization (start values are used as guess values with fixed=false)

Number

0
1

mo_initType/choice2

Steady state initialization (derivatives of states are zero)

Number

0
1

mo_initType/choice3

Initialization with initial states

Number

0
1

mo_initType/choice4

Initialization with initial outputs (and steady state of the states if possible)

Number

0
1

mo_x_start

x_start

Initial or guess values of states

Vector

mo_y_start

y_start

Initial values of outputs (remaining states are in steady state if possible)

Vector

mo_x

x

x

Structure

mo_x/fixed

fixed

Cell of vectors

true
false

mo_x/start

start

Cell of vectors

StateSpace_1

NameLabelDescriptionData TypeValid Values

mo__nmodifiers

Number of Modifiers

Specifies the number of modifiers

Number

mo__modifiers

Modifiers

Add new modifier

Structure

mo__modifiers/varname

Variable name

Cell of strings

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value

Ports

NameTypeDescriptionIO TypeNumber

u

implicit

Connector of Real input signals

input

1

y

implicit

Connector of Real output signals

output

1

See Also