Linearize Blocks with Nondouble Precision Data Type
Signals
You can linearize blocks that have nondouble precision data type signals as either inputs
or outputs, and have no preprogrammed exact linearization. Without additional
configuration, such blocks automatically linearize to zero. For example, logical operator
blocks have Boolean outputs and linearize to 0.
Linearizing blocks that have nondouble precision data type signals requires converting all
signals to double precision. This approach only works when your model can run correctly
in full double precision.
When you have only a few blocks impacted by the nondouble precision data types, use a
Data Type Conversion block to fix this issue.
When you have many nondouble precision signals, you can override all data types with
double precision using the Fixed Point Tool.
Overriding Data Types Using Data Type Conversion Block
Convert individual signals to double precision before linearizing the model by inserting a
Data Type Conversion block. This approach works well for model that have only a few
affected blocks.
After linearizing the model, remove the Data Type Conversion block from your model.
NoteOverriding nondouble data types is not appropriate when the model relies on these
data types, such as relying on integer data types to perform truncation from floats.
For example, consider the model configured to linearize the Square block at an operating
point where the input is 1. The resulting linearized model should be 2, but the input to the
Square block is Boolean. This signal of nondouble precision date type results in
linearization of zero.
Linearize Blocks with Nondouble Precision Data Type Signals