FixedPoint StateSpace
Implement discretetime state space
Libraries:
Simulink /
Additional Math & Discrete /
Additional Discrete
Description
The FixedPoint StateSpace block implements the system described by
$$y(n)=\text{C}x(n)+\text{D}u(n)$$
$$x(n+1)=\text{A}x(n)+\text{B}u(n)$$
where u is the input, x is the state, and y is the output. Both equations have the same data type.
A must be an nbyn matrix, where n is the number of states.
B must be an nbym matrix, where m is the number of inputs.
C must be an rbyn matrix, where r is the number of outputs.
D must be an rbym matrix.
In addition:
The state x must be an nby1 vector.
The input u must be an mby1 vector.
The output y must be an rby1 vector.
The block accepts one input and generates one output. The width of the input vector is the number of columns in the B and D matrices. The width of the output vector is the number of rows in the C and D matrices. To define the initial state vector, use the Initial conditions parameter.
Ports
Input
Port_1 — Input signal
scalar  vector  matrix
Input vector, where the width equals the number of columns in the B and D matrices. For more information, see Description.
Data Types: single
 double
 int8
 int16
 int32
 int64
 uint8
 uint16
 uint32
 uint64
 Boolean
 fixed point
Complex Number Support: Yes
Output
Port_1 — Output signal
scalar  vector  matrix
Output signal, with width equal to the number of rows in the C and D matrices. For more information, see Description.
Data Types: single
 double
 int8
 int16
 int32
 int64
 uint8
 uint16
 uint32
 uint64
 Boolean
 fixed point
Parameters
Main
State Matrix A — Matrix of states
[2.6020 2.2793 0.6708; 1 0 0; 0 1
0]
(default)  scalar  vector  matrix
Specify the matrix of states as an nbyn matrix of real or complex values, where n is the number of states. For more information on the matrix coefficients, see Description.
Programmatic Use
Block Parameter:
A 
Type: character vector 
Values: scalar  vector  matrix 
Default:
'[2.6020 2.2793 0.6708; 1 0 0; 0 1
0]' 
Input Matrix B — Column vector of inputs
[ 1; 0; 0]
(default)  scalar  vector  matrix
Specify the column vector of inputs as an nbym matrix of real or complex values, where n is the number of states, and m is the number of inputs. For more information on the matrix coefficients, see Description.
Programmatic Use
Block Parameter:
B 
Type: character vector 
Values: scalar  vector  matrix 
Default:
'[ 1; 0; 0]' 
Output Matrix C — Column vector of outputs
[0.0184 0.0024 0.0055]
(default)  scalar  vector  matrix
Specify the column vector of outputs as an rbyn matrix of real or complex values, where r is the number of outputs, and n is the number of states. For more information on the matrix coefficients, see Description.
Programmatic Use
Block Parameter:
C 
Type: character vector 
Values: scalar  vector  matrix 
Default:
'[0.0184 0.0024 0.0055]' 
Direct Feedthrough Matrix D — Matrix for direct feedthrough
[0.0033]
(default)  scalar  vector  matrix
Specify the matrix for direct feedthrough as an rbym matrix of real or complex values, where r is the number of outputs, and m is the number of inputs. For more information on the matrix coefficients, see Description.
Programmatic Use
Block Parameter:
D 
Type: character vector 
Values: scalar  vector  matrix 
Default:
'[0.0033]' 
Initial condition for state — Initial state vector
0.0
(default)  scalar  vector  matrix
Specify the initial condition for the state.
Limitations
The initial state cannot be inf
or
NaN
.
Programmatic Use
Block Parameter:
X0 
Type: character vector 
Values: scalar  vector  matrix 
Default:
'0.0' 
Signal Attributes
Data type for internal calculations — Data type for internal calculations
fixdt('double')
(default)  data type string
Specify the data type the block uses for internal calculations.
Programmatic Use
Block Parameter:
InternalDataType 
Type: character vector 
Values: data type string 
Default:
'fixdt('double')' 
Scaling for State Equation AX+BU — Scaling for state equations
2^0
(default)  scalar
Specify the scaling for the state equation AX+BU.
Programmatic Use
Block Parameter:
StateEqScaling 
Type: character vector 
Values: scalar 
Default:
'2^0' 
Scaling for Output Equation CX+DU — Scaling for output equations
2^0
(default)  scalar
Specify the scaling for the output equation CX+DU.
Programmatic Use
Block Parameter:
OutputEqScaling 
Type: character vector 
Values: scalar 
Default:
'2^0' 
Lock output data type setting against changes by the fixedpoint tools — Prevent fixedpoint tools from overriding data types
off
(default)  on
Select to lock the output data type setting of this block against changes by the FixedPoint Tool and the FixedPoint Advisor. For more information, see Use Lock Output Data Type Setting (FixedPoint Designer).
Programmatic Use
Block Parameter:
LockScale 
Type: character vector 
Values:
'off' 
'on' 
Default:
'off' 
Integer rounding mode — Rounding mode for fixedpoint operations
Floor
(default)  Ceiling
 Convergent
 Nearest
 Round
 Simplest
 Zero
Specify the rounding mode for fixedpoint operations. For more information, see Rounding (FixedPoint Designer).
Programmatic Use
Block
Parameter:
RndMeth 
Type: character vector 
Values:
'Ceiling'  'Convergent'  'Floor' 
'Nearest'  'Round'  'Simplest' 
'Zero' 
Default:
'Floor' 
Saturate to max or min when overflows occur — Method of overflow action
off
(default)  on
When you select this check box, 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.
Programmatic Use
Block Parameter:
DoSatur 
Type: character vector 
Values:
'off'  'on' 
Default:
'off' 
Block Characteristics
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 

^{a} This block is not recommended for use with Boolean signals. 
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
HDL Code Generation
Generate VHDL, Verilog and SystemVerilog code for FPGA and ASIC designs using HDL Coder™.
HDL Coder™ provides additional configuration options that affect HDL implementation and synthesized logic.
This block has one default HDL architecture.
If you use the block in matrix multiplication mode, you can specify the
DotProductStrategy. This setting determines whether you
want to implement the matrix multiplication by using a tree of adders and
multipliers, or use the MultiplyAccumulate block implementation. The default is
Fully Parallel
.
Note
The DotProductStrategy must be set to Fully
Parallel
when you use the Native Floating
Point
mode.
For more information, see DotProductStrategy (HDL Coder).
General  

ConstrainedOutputPipeline  Number of registers to place at
the outputs by moving existing delays within your design. Distributed
pipelining does not redistribute these registers. The default is

DSPStyle  Synthesis attributes for multiplier mapping. The
default is 
InputPipeline  Number of input pipeline stages
to insert in the generated code. Distributed pipelining and constrained
output pipelining can move these registers. The default is

OutputPipeline  Number of output pipeline stages
to insert in the generated code. Distributed pipelining and constrained
output pipelining can move these registers. The default is

FixedPoint Conversion
Design and simulate fixedpoint systems using FixedPoint Designer™.
Version History
Introduced before R2006a
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
 América Latina (Español)
 Canada (English)
 United States (English)
Europe
 Belgium (English)
 Denmark (English)
 Deutschland (Deutsch)
 España (Español)
 Finland (English)
 France (Français)
 Ireland (English)
 Italia (Italiano)
 Luxembourg (English)
 Netherlands (English)
 Norway (English)
 Österreich (Deutsch)
 Portugal (English)
 Sweden (English)
 Switzerland
 United Kingdom (English)