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 3 Current »

FixPt Matrix Gain 
Multiply the input by a constant matrix
Description
The FixPt Matrix Gain block is a masked S-function that multiplies the input by a constant matrix (referred to as the matrix gain). The block generates its output by multiplying the input by a specified matrix
 
where K is the matrix gain and u is the input. If the matrix has m rows and n columns, then the input to this block should be a vector of length n. The output is a vector of length m.
You specify the matrix gain with the Gain matrix value parameter. You specify the scaling for the matrix gain with the Parameter scaling parameter. Note that there are two dialog box parameters that control the matrix gain scaling: one associated with an edit field, and one associated with a parameter list. If Parameter data type is a generalized fixed-point number such as sfix(16), the Parameter scaling list provides you with these scaling modes:

  • Use Specified Scaling - This mode uses the slope/bias or radix point-only scaling specified for the editable Parameter scaling parameter (for example, 2^-10).
  • Use Best Precision: Element-wise - This mode produces radix points such that the precision is maximized for each element of the Gain matrix value matrix.
  • Use Best Precision: Row-wise - This mode produces a common radix point for each element of a Gain matrix value row based on the best precision for the largest value of that row.
  • Use Best Precision: Column-wise - This mode produces a common radix point for each element of a Gain matrix value column based on the best precision for the largest value of that column.
  • Use Best Precision: Matrix-wise - This mode produces a common radix point for each element of the Gain matrix value matrix based on the best precision for the largest value of the matrix.

For a detailed description of all other block parameters, refer to Block Parameters.
Parameters and Dialog Box
 
Gain matrix value
Specify as a scalar or vector.
Parameter data type
Any data type supported by the Fixed-Point Blockset.
Parameter scaling
Radix point-only or slope/bias scaling. Additionally, the gain can be scaled using the constant matrix scaling modes for maximizing precision. These scaling modes are available only for generalized fixed-point data types.
Output data type and scaling
Specify the output data type and scaling via the dialog box, or inherit the data type and scaling from the driving block or by back propagation.
Output data type
Any data type supported by the Fixed-Point Blockset.
Output scaling
Radix point-only or slope/bias scaling. These scaling modes are available only for generalized fixed-point data types.
Lock output scaling so autoscaling tool can't change it
If checked, Output scaling is locked. This feature is available only for generalized fixed-point output.
Round toward
Rounding mode for the fixed-point output.
Saturate to max or min when overflows occur
If checked, fixed-point overflows saturate. Otherwise, they wrap.
Override data types(s) with doubles
If checked, the Parameter data type and Output data type values are overridden with doubles.
Log minimums and maximums
If checked, minimum and maximum simulation values are logged to the workspace.
Conversions and Operations
The Gain matrix value parameter is converted from doubles to the specified data type offline using round-to-nearest and saturation. Refer to Parameter Conversions for more information about parameter conversions.
The FixPt Matrix Gain block first multiples its inputs by the Gain matrix value parameter, converts those results to the output data type using the specified rounding and overflow modes, and then performs the summation. Refer to Rules for Arithmetic Operations for more information about the rules this block adheres to when performing operations.
Characteristics

Input Ports

Any data type supported by the blockset

Output Port 

Any data type supported by the blockset

Direct Feedthrough

Yes

Sample Time

Inherited

Scalar Expansion

No

States

0

Vectorized

Yes

  • No labels