Fixed-Point Blockset    

Simulation 1: Initial Guess at Scaling

The first simulation uses guesses for the scaling. In general, you won't need to perform this step, and this simulation is included to illustrate the difficulty of guessing at scaling.

After you launch the Interface tool, press the Run button to run the simulation. When the simulation is finished, the interface displays the block name, the maximum and minimum simulation results, the data type, and the scaling for each block. You can then easily plot the results by pressing the Plot button, which launches the Plot System interface. The procedure for this simulation, and the simulation results are shown below.

The display shows that the Up Cast block saturated 23 times, indicating a poor guess for the scaling. Refer to Logging Simulation Results to learn about logging overflow information to the workspace.

The Plot System interface is shown below. This interface displays all MATLAB variable names that contain Scope block data for the current model. You configure the variable name with the Scope block's Properties dialog box, which you launch by choosing the Properties toolbar button.

To plot the simulation results, select one or more variable names, and then select the appropriate plot button. This simulation plots the fixed-point signals for the plant input and the plant output.

The plant input signal and plant output signals are shown below. These signals reflect the initial guess at scaling.

The Bode plot design sought to produce a well behaved linear response for the closed loop system. Clearly, the response is nonlinear. The nonlinear features are due to significant quantization effects. An important part of fixed-point design is finding scalings that reduce quantization effects to acceptable levels.


 Simulation Results Simulation 2: Global Override