.

Matrix Gain

Overview

Overview

The Matrix Gain block is used to output a weighted sum of the Observer block’s states.  The matrix gain block can only be connected to the states output of the observer block.  The output of the matrix gain block is a double, and can be connected to any of the other mechaware blocks. 

The weighting of the states is specified by a file that contains the weighting coefficients.  The length of the matix gain block is k, where k is the order of the observer that the matrix gain block is connected to.  The maximum order of an observer is 16 (defined by MFWMaxObserverSize), and this is also the maximum length of the matrix gain block. 

The coefficients for this block are as follows:

 

Matrix Gain(.txt)

The file name of a text file containing the coefficients.  This is a 1 X k array where k is the order of the observer.

Evaluate Block

This block allows you to specify whether the block executes Every Sample, Every Other Sample (Odd or Even), or Every Fourth Sample (and specify the First, Second, Third, or Fourth) or background. This provides greater flexibility in controlling the execution of a model and to preserve performance for other areas of motion control.

User Defined Block Priority When selected, allows you to enter a Priority Code to modify Execution Ordering of this block. For more information, see Block Execution Order and User Defined Block Priority.
Priority For an explanation of how the Priority field is used by the MechaWare Model Downloader, see Block Execution Order and User Defined Block Priority.
User Data 0 Application-specific data. See User Data Storage.
User Data 1 Application-specific data. See User Data Storage.

Matlab/Simulink

Simulink Interface

Matrix Gain Simulink Block

The Matrix Gain block is used to output a weighted sum of the Observer block’s states.  The matrix gain block can only be connected to the states output of the observer block.  The output of the matrix gain block is a double, and can be connected to any of the other mechaware blocks. 

The weighting of the observer states is specified by the file specified by the Matrix Gain parameter in the block’s simulink parameter listing (see below). 

The block has two user data fields (User Data 0, User Data 1) to store application-specific data for convenient storage and retrieval. See User Data Storage for details.

The block's update schedule is determined by the Evaluate Block. The following Parameter Dialog Box can be opened by double-clicking on the block in a Simulink Model:

C++ API

MATRIXGAINBlock

Declaration

Public Method

 
class MATRIXGAINBlock: public virtual Block
{
public:
	// User accessible coefficients
	long	Length;
	double	Coeff[MFWMaxObserverSize];
}; 
 

Required Header: mechaware.h

Description

The Matrix Gain block is used to output a weighted sum of the Observer block’s states. The length of the matrix gain block is specified by Length, and it is the order of the observer block that the matrix gain block is connected. The Coefficients of the matrix gain block are specified by the coefficient registers.   

Parameters

 

long

Length

Order of the MATRIXGAIN BLOCK. Maximum order is 16

double

Coeff[]

The coefficients of the matrix gain block. These are multiplied by the internal states of the observer’s, X array to create the weighted sum of the observer’s state’s.  The maximum array size is 16 (defined by  MFWMaxObserverSize)

Methods

Block Methods

See Also

Observer

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2012 Motion Engineering