Engee documentation

Discrete State-Space

Realises a discrete system in the state space.

discrete state space

Description

Block behaviour for non-empty matrices

The Discrete State-Space block realises the system described by the following equations:

,

Where:

  • - input.

  • - state.

  • - output.

The matrix coefficients should have the following characteristics as shown in the diagram:

  • A must be a matrix of size n by n, where n is the number of states.

  • B should be a matrix of size n by m, where m is the number of input parameters.

  • C must be a matrix of size r by n, where r is the number of outputs.

  • D must be a matrix of size r by m.

discrete state space 1

The block takes one input and generates one output. The length of the input vector is the number of columns in matrices B and D. The length of the output vector is the number of rows in the C and D matrices. To specify the initial condition vector, use the Initial conditions parameter.

To specify a vector or matrix of zeros for A, B, C, D, or Initial conditions, use the zeros function.

Block behaviour for empty matrices

When matrices A, B, and C are empty (e.g., [;;;]), the block functionality becomes:

.

If the Initial conditions vector is also empty, the block uses the null initial state vector.

Ports

Input

Port_1 - input signal
scalar | vector | matrix-column

Input vector whose length is equal to the number of columns in matrices B and D.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Output

Port_1 - output signal
scalar | vector

Output vector whose length is equal to the number of rows in matrices C and D.

Data types: Float64.

Parameters

Main

A - matrix A
1 (by default) | scalar | vector | matrix

A matrix factor A of size n by n, where n is the number of states.

Usage in program code

Block parameter

A

Values

scalar | vector | matrix

* By default*

1

B - matrix B
1 (by default) | scalar | vector | matrix

A B matrix factor of size n by m, where n is the number of states and m is the number of input parameters.

Usage in program code

Block parameter

B

Values

scalar | vector | matrix

* By default*

1

C - matrix C
1 (by default) | scalar | vector | matrix

A C matrix factor of size r by n, where r is the number of outputs and n is the number of states.

Usage in program code

Block parameter

C

Values

scalar | vector | matrix

* By default*

1

D - matrix D
1 (by default) | scalar | vector | matrix

A matrix factor D of size r by m, where r is the number of outputs and m is the number of input parameters.

Usage in program code

Block parameter

D

Values

scalar | vector | matrix

By default

1

Initial conditions - initial state vector
0 (By default) scalar | vector

Specify the initial condition vector.

Usage in program code

Block parameter

InitialCondition

Values

scalar | vector

By default

0

Sample time (-1 for inherited) - interval between calculation steps
-1 (by default) | scalar

Specify the interval between calculation steps as a non-negative number. To inherit a calculation step, set this parameter to -1.

Usage in program code

Block parameter

SampleTime

Values

scalar | vector

By default

-1