State-Space Realization
The FixPt State-Space Realization block is a masked
subsystem that implements the system described by
where k is the time step, u(k) is the
current input, x(k) is the current state, x(k + 1) is the
state from the next time step, y(k) is the current output, and A,
B, C, and D are all coefficient matrices.
Parameters and Dialog Box
-
A
-
An n × n matrix where n is the number of states
-
B
-
An n × m matrix where m is the number of inputs
-
C
-
An r × n matrix where r is the number of outputs
-
D
-
An r × m matrix
-
Initial conditions
-
The initial values for all times preceding the current time
-
Sample time
-
The time interval, Ts, between samples
-
Base data type
-
The processor's base data type
-
Accumulator data type
-
The processor's accumulator data type
The advantage of using the state-space realization
is that you can build high order systems quickly. The disadvantage is that
you can't individually scale the elements on vector signal lines. For example,
even if the i-th state, xi, is large and the
j-th state, xj, is small, you must use the same
scaling for both. Matrix gain coefficients can be individually scaled but
this may not suffice.The solution to this problem is
to use a new realization with more blocks and fewer elements on each signal
line. For maximum control of scaling, you should use a diagram that has
only scalars on each line.
Model Design Review
A brief review of the model design is given below.
The design criteria reflect these rules.
-
The matrix gains involve a multiplication which is a size-growing operation.
In most cases, it is desirable for gain and input to use the word size
given by the Base data type or smaller. The output can be left at
the Accumulator data type for extra precision in subsequent operations.
Alternatively, if the output were stored to RAM, or used by a size-growing
operation, it could be reduced to the Base data Type.
-
The FixPt Sum blocks converts inputs to the output data type before performing
the actual addition. Given this order of operation, using the Accumulator
data type often gives better precision.
-
The FixPt Conversion blocks force the output to the Base data type
before storage in RAM (i.e., before input to the unit delay). Converting
the output in the feedforward part of the realization prevents subsequent
operations from being burdened with a large data type.
[ Previous | Help
Desk ]