Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

To help you learn the Fixed-Point Blockset, a collection of demos is provided. You can explore specific blockset features by changing block parameters and observing the effects of those changes.

The demos are divided into two groups: basic demos that illustrate the basic functionality of the Fixed-Point Blockset, and advanced demos that illustrate the functionality of systems and filters built with fixed-point blocks. All demos are located in the fxpdemos directory.

You can access the demos through MATLAB's Demo browser. You launch the Demo browser by opening the Demos block found in the Fixed-Point Blockset library, or by typing

demo blockset 'Fixed Point'

at the command line. You can also type the name of a particular demo at the command line.

Basic Demos

The basic demos are listed below.

Demo name

Description

Double to Fixed-Point Conversion

Convert a double precision value to a fixed-point value.

Fixed-Point to Fixed-Point Conversion

Convert a fixed-point value to another fixed-point value.

Fixed-Point to Fixed-Point Inherited Conversion

Convert a fixed-point value to an inherited fixed-point value.

Fixed-Point Sine

Add and multiply two fixed-point sine wave signals.

Scaling a Fixed-Point Control Design

Simulate a fixed-point feedback design.

Generating Only Fixed-Point Code

Generate pure integer code for a fixed-point digital controller.

The Double to Fixed-Point Conversion demo is discussed in Example: Converting from Doubles to Fixed-Point, while the Scaling a Fixed-Point Control Design demo is the subject of Chapter 6, Tutorial: Feedback Controller Simulation.

Advanced Demos: Filters and Systems

The filter and system demos are intended to be used as a design aid so you can see how to build and test filters and systems suited to your particular needs. The output of these demos is compared to the output of analogous built-in Simulink blocks with identical input.

You can access the filter and system demos through the Filters & Systems: Examples block, which is included with the Fixed-Point Blockset library. Alternatively you can type

fixptsys

at the MATLAB command line. The advanced demos are listed below.

Demo name

Description

Fixed-Point Integrators

Compare output from the FixPt Integrator: Trapezoidal, FixPt Integrator: Backward, and FixPt Integrator: Forward realizations to output from Simulink's Discrete Integrator block.

Fixed-Point Derivatives 

Compare output from the FixPt Derivative and FixPt Derivative: Filtered realizations to output from the Simulink derivatives built using the Discrete Filter and Transfer Fcn blocks.

Fixed-Point Lead and Lag Filters

Compare output from the FixPt Lead and Lag Filter realization to output from analogous Simulink filters built using the Discrete Filter block.

Fixed-Point State Space

Compare output from the FixPt State-Space Realization realization to output from the analogous built-in Simulink State-Space and Discrete State-Space block.

You can invoke a filter or system demo by double-clicking the appropriate subsystem. For example, to invoke the Fixed-Point Derivatives demo, double-click the Demo: Derivative subsystem. For more information about filters and systems, refer to Chapter 7, Building Systems and Filters.

Additional fixed-point demos exist for direct form II, series cascade form, and parallel form realizations. These demos and realizations are discussed in Chapter 5, Realization Structures.

  • No labels