Documentation

Fixed-Point State-Space

Implement discrete-time state space

Library

Additional Math & Discrete / Additional Discrete

Description

The Fixed-Point State-Space block implements the system described by

y ( n ) = C x ( n ) + D u ( n )

x ( n + 1 ) = A x ( n ) + B u ( n )

whereuis the input,xis the state, andyis the output. Both equations have the same data type.

The matrices A, B, C and D have the following characteristics:

  • A must be an n-by-n matrix, where n is the number of states.

  • B must be an n-by-m matrix, where m is the number of inputs.

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

  • D must be an r-by-m matrix.

In addition:

  • The state x must be an n-by-1 vector.

  • The input u must be an m-by-1 vector.

  • The output y must be an r-by-1 vector.

The block accepts one input and generates one output. The block determines the input vector width by the number of columns in the B and D matrices. Similarly, the block determines the output vector width by the number of rows in the C and D matrices.

Data Type Support

The Fixed-Point State-Space block accepts signals of the following data types:

  • Floating point

  • Built-in integer

  • Fixed point

For more information, seeData Types Supported by Simulinkin the Simulink®documentation.

Parameters

State Matrix A

Specify the matrix of states.

Input Matrix B

Specify the column vector of inputs.

Output Matrix C

Specify the column vector of outputs.

Direct Feedthrough Matrix D

指定的矩阵直接引线。

Initial condition for state

Specify the initial condition for the state.

Data type for internal calculations

Specify the data type for internal calculations.

Scaling for State Equation AX+BU

Specify the scaling for state equations.

Scaling for Output Equation CX+DU

指定输出的扩展方程。

Lock output data type setting against changes by the fixed-point tools

Select to lock the output data type setting of this block against changes by the Fixed-Point Tool and the Fixed-Point Advisor. For more information, seeUse Lock Output Data Type Setting(Fixed-Point Designer).

Integer rounding mode

Specify the rounding mode for fixed-point operations.For more information, seeRounding(Fixed-Point Designer).

Saturate to max or min when overflows occur

Select to have overflows saturate to the maximum or minimum value that the data type can represent. Otherwise, overflows wrap.

When you select this check box, saturation applies to every internal operation on the block, not just the output or result. In general, the code generation process can detect when overflow is not possible. In this case, the code generator does not produce saturation code.

Characteristics

Data Types

Double | Single | Boolean | Base Integer | Fixed-Point

Direct Feedthrough

Yes

Multidimensional Signals

No

Variable-Size Signals

Yes

Zero-Crossing Detection

No

Code Generation

Yes

Introduced before R2006a

Was this topic helpful?