StateSpace

StateSpace  implements a linear state-space system.

Element

Direction

Remark

in::continuous[m]

input

block input

For m inputs, set the Dimension in the element's properties editor to m.

out::continuous[r]

output

block output

For r outputs, set the Dimension in the element's properties editor to r.

internal::continuous[3]

discrete state; reserved for internal calculations

  • internal[0] is n (number of states)
  • internal[1] is m (number of inputs)
  • internal[2] is r (number of outputs)

x::continuous[n]

continuous state; states

For n states, set the Dimension in the element's properties editor to n.

modifyable values in matrices A, B, C, D

matrices provided via the Matrix class

  • matrix A must be an n by n matrix
  • matrix B must be an n by m matrix
  • matrix C must be an r by n matrix
  • matrix D must be an r by m matrix

The system's behavior is described by the equations:

dx

 =

Ax + Bu

dt

y

 =

Cx + Du

(x is the state vector, u is the input vector, y is the output vector)

Note

Before starting an experiment, the sizes of the arrays x, in, out and of the matrices A, B, C, and D must be determined correctly.