Engee documentation

Discrete State-Space

Implements a discrete system in the state space.

blockType: DiscreteStateSpace

Path in the library:

/Basic/Discrete/Discrete State-Space

Description

Block behavior for nonempty matrices

Block Discrete State-Space implements a system described by the following equations:



where

  • — entrance;

  • — condition;

  • — exit.

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

  • A It must be a matrix of size on , where — the number of states.

  • B It must be a matrix of size on , where — the number of input parameters.

  • C It must be a matrix of size on , where — the number of exits.

  • D It must be a matrix of size on .

discrete state space 1

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

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

Block behavior for empty matrices

When are the matrices A, B and C if they are empty (for example, [;;]), the block functionality becomes:

.

If the vector Initial conditions If it is also empty, then the block uses the zero vector of the initial state.

Ports

Input

# IN_1 — input signal
scalar | vector | matrix-column

Details

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

Data types

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

Complex numbers support

No

Output

# OUT_1 — output signal
scalar | vector

Details

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

Data types

Float64.

Complex numbers support

No

Parameters

Main

# A — matrix A

Details

matrix coefficient A of size to , where is the number of states.

Default value

1

Program usage name

A

Tunable

Yes

Evaluatable

Yes

# B — matrix B

Details

matrix coefficient B of size to , where is the number of input parameters.

Default value

1

Program usage name

B

Tunable

Yes

Evaluatable

Yes

# C — matrix C

Details

matrix coefficient C of size to , where is the number of outputs.

Default value

1

Program usage name

C

Tunable

Yes

Evaluatable

Yes

# D — matrix D
Scalar / array of real numbers

Details

Matrix coefficient D of size to , where is the number of outputs and is the number of input parameters.

Default value

1

Program usage name

D

Tunable

Yes

Evaluatable

Yes

# Initial conditions — initial state vector
Scalar / vector of real numbers

Details

Specify the initial state vector.

Default value

0

Program usage name

InitialCondition

Tunable

Yes

Evaluatable

Yes

# Sample time — interval between calculation steps
SampleTime (real number / vector of two real numbers)

Details

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

Default value

-1

Program usage name

SampleTime

Tunable

No

Evaluatable

Yes

Examples