| Contents | Index |
| On this page… |
|---|
This tutorial uses the ex_fixed_point_workflow model.

The model consists of a Source, a Controller Subsystem that you want to convert to fixed point, and a Scope to visualize the subsystem outputs. This method is how you configure a model to determine the effect of fixed-point data types on a system. Using this approach, you convert only the subsystem because this is the system of interest. There is no need to convert the Source or Scope to fixed point.
This configuration allows you to modify the inputs and collect simulation data for multiple stimuli. You can then examine the behavior of the subsystem with different input ranges and scale your fixed-point data types to provide maximum precision while accommodating the full simulation range.
The model consists of the following blocks and subsystem.
Repeating table Source
A Repeating Sequence (Repeating Table) block provides the first input to the Controller Subsystem and periodically repeats the sequence of data specified in the mask.
Rate Transition
A Rate Transition block outputs data from the Repeating table Source block at a different rate to the input.
Sine Wave Source
A Sine Wave block provides the second input to the Controller Subsystem.
Initially, the amplitude of the Sine Wave block is 1. Later, you modify the amplitude to change the input range of the system.
Conversion1 and Conversion2
These two Conversion blocks are set up so that the real-world values of their input and output are equal.
The Controller Subsystem consists of:
Discrete Filter
The Discrete Filter block filters the Repeating table Source signal. The Discrete Filter is a floating-point inheritance block. For floating-point inheritance blocks, when inputs are floating-point, all internal and output data types are floating point.
Chart
The Chart consists of a Stateflow Chart block which converts the Sine Wave input to a positive output and multiplies it by 3.
Lookup Table for Chart
The Lookup Table for Chart block is the first of two identical n-D Lookup Table blocks. This block receives the output from the Chart and, at each breakpoint, outputs the input multiplied by 10.
Gain
The Gain block multiplies the Sine Wave input by -3.
Lookup Table for Gain
The Lookup Table for Gain block is a n-D Lookup Table block. It receives the output from the Gain block and, at each breakpoint, outputs its input multiplied by 10.
Sum for Chart
This Sum block adds the outputs from the Discrete Filter and Lookup Table for Chart blocks and outputs the result to the Scope block.
Sum for Gain
This Sum block adds the outputs from the Discrete Filter and Lookup Table for Gain blocks and outputs the result to the Scope block.
Scope
The model includes a Scope block that displays the Controller Subsystem output signals.
![]() | Learning Objectives | Before You Begin | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |