Release 11 New Features      

Fixed-Point Blockset 2.0

Release 11 contains two versions of the Fixed-Point Blockset: Version 1.2, which was included with Release 10 (MATLAB 5.2), and Version 2.0. The 2.0 blockset is located in /toolbox/fixpoint and the 1.2 blockset is located in
/toolbox/fixpoint/obsolete.

The Fixed-Point Blockset 2.0 features are discussed below.

Fixed-Point Blocks

The Fixed-Point Blockset 2.0 includes a number of building blocks to assist you in designing and simulating dynamic systems using fixed-point arithmetic. The fixed-point blocks are grouped together as shown below.

Arithmetic Blocks

Block Name
Description
FixPt Constant
Generate a constant value
FixPt Gain
Multiply the input by a constant
FixPt Matrix Gain
Multiply the input by a constant matrix
FixPt Product
Multiply or divide inputs
FixPt Sum
Add or subtract inputs

Conversion Blocks

Block Name
Description
FixPt Conversion
Convert from one Fixed-Point Blockset data type to another
FixPt Conversion Inherited
Convert input two to the data type of input one
FixPt Gateway In
Convert a Simulink data type to a Fixed-Point Blockset data type
FixPt Gateway Out
Convert a Fixed-Point Blockset data type to a Simulink data type

Look-Up Table Blocks

Block Name
Description
FixPt Look-Up Table
Approximate a one-dimensional function using a selected look-up method
FixPt Look-Up Table (2D)
Approximate a two-dimensional function using a selected look-up method

Logical and Comparison Blocks

Block Name
Description
FixPt Logical Operator
Perform the specified logical operation on the inputs
FixPt Relational Operator
Perform the specified relational operation on the inputs
FixPt Relay
Switch output between two constants
FixPt Saturation
Bound the range of the input
FixPt Switch
Switch output between input one or input three based on the value of input two

Discrete-Time Blocks

Block Name
Description
FixPt FIR
Implement a fixed-point finite impulse response (FIR) filter
FixPt Unit Delay
Delay a signal one sample period
FixPt Zero-Order Hold
Implement a zero-order hold of one sample period

Filters and Systems

The Fixed-Point Blockset 2.0 provides several useful fixed-point filter and system realizations. These realizations are intended to be used as design templates so you can easily see how to build filters and systems suited to your particular needs. The filters and systems are described below.

Filter or System Name
Description
FixPt State-Space Realization
Implement a fixed-point realization of a state-space system
FixPt Integrator: Trapezoidal
Implement a fixed-point realization of an integrator based on trapezoidal numerical integration
FixPt Integrator: Backward
Implement a fixed-point realization of an integrator based on backward numerical integration
FixPt Integrator: Forward
Implement a fixed-point realization of an integrator based on forward numerical integration
FixPt Filtered Derivative
Implement a fixed-point realization of a filtered derivative
FixPt Derivative
Implement a fixed-point realization of a derivative
FixPt Lead or Lag Filter
Implement a fixed-point realization of a lead filter or lag filter

Data Types

The Fixed-Point Blockset 2.0 supports several fixed-point and floating-point data types, which are collectively referred to as the "Fixed-Point Blockset data types." The supported data types and related features are described below.

Fixed-Point Data Types

    Floating-Point Data Types

The label "Fixed-Point Blockset data types" indicates that data types supported by this blockset are unique to it, and not directly compatible with Simulink. This means that a double generated by Simulink cannot be passed directly into a Fixed-Point Blockset block, and a double generated by the Fixed-Point Blockset cannot be passed directly into a Simulink block. Instead, the FixPt Gateway In and FixPt Gateway Out blocks must be used as interfaces between the Fixed-Point Blockset and Simulink.

Scaling

The Fixed-Point Blockset 2.0 supports two general scaling modes: radix point-only scaling and slope/bias scaling. Additionally, some blocks support scaling modes that maximize the precision for constant vectors or matrices. These scaling modes are described below.

General Scaling Modes

Fixed-point numbers can be scaled in these ways:

Constant Scaling for Best Precision

In addition to the general scaling modes described above, the Fixed-Point Blockset provides you with block-specific scaling modes for constant vectors and constant matrices. These scaling modes are based on radix point-only scaling and are designed to maximize precision.

The advantage of finding a common radix point is increased simulation speed, while the disadvantage is reduced precision.

Automatic Scaling Tool

A script is provided that automatically changes the scaling for each block that has generalized fixed-point output and does not have its scaling locked. The script uses the maximum and minimum values logged during the last simulation run. The scaling is changed such that the simulation range is covered and the precision is maximized.

As an alternative to (and extension of) the automatic scaling script, an automatic scaling GUI is provided. This interface allows you to easily control the parameters associated with automatic scaling and display the simulation results for a given model. With the automatic scaling GUI, you can:

Locking the Output Scaling

If the output data type is a generalized fixed-point number, then you have the option of locking its scaling. When locked, the automatic scaling tool will not change the output scaling. Otherwise, the automatic scaling tool is free to adjust the scaling.

Rounding

Fixed-point numbers can be rounded in these ways:

Overflow Handling

Operations on fixed-point numbers that produce an overflow condition can be dealt with in these ways:

Overriding with Doubles

The fixed-point data type can be overridden with doubles either globally or for individual blocks. This feature is useful when debugging a simulation.

Specialized Storage Capabilities

The maximum and minimum values encountered during a simulation can be logged to the MATLAB workspace. These values can then be accessed by the automatic scaling tool.

Standardization with Simulink

The fixed-point blocks are feature-compatible with standard Simulink blocks. Standardization with Simulink provides these expanded capabilities:

Enhanced Model Construction

The Fixed-Point Blockset 2.0 makes it easier to construct models of systems due to these main blockset features:

Updating Obsolete Fixed-Point Blocks

Obsolete fixed-point blocks from previous Fixed-Point Blockset releases can be updated to current fixed-point blocks using the fpupdate command.

Code Generation

With the Real-Time Workshop, you can generate C code for execution on a fixed-point embedded processor. The generated code uses only integer types and automatically includes all operations, such as shifts, needed to account for differences in fixed-point locations. The code is structured so that key operations can be readily replaced by optimized target-specific libraries that you supply. You can also use the Target Language Compiler to customize the generated code.

All fixed-point blocks support code generation, but not every simulation feature is supported. For example, 13-bit numbers can be used for simulation but not for code generation.

Demos

The Fixed-Point Blockset 2.0 provides several demos that illustrate the main product features. You can access these demos via the fixed-point library's Demos block.

Online Help

Each Fixed-Point Blockset block, system, and filter has online HTML-based help. The help is accessed through the dialog box Help button.



[ Previous | Next ]