.

Clip 2 (Asymmetric)

Overview

Overview

The Clip2 block provides asymmetric limits for an input signal. The signal will saturate at a maximum value of (UpperLimit) and a minimum value of (LowerLimit). The input signal is offset by an amount defined by the offset prior to the clipping the signal to the upper and lower limits.

Example

The following illustrates how a control algorithm is built in a vertical application where the force in the up direction has a higher limit than the down direction. This is because to move up, you must fight gravity, and to move down, gravity is helping. To control the torque limits, an Asymetric clip is used to limit the torque and a complimentary Deadband filter attached to an EStop command to stop motion if the command does exceed the limits of the Clip. Upon exceeding the limits, the faulting torque command is written to the User Buffer to help determine the cause of the fault.

The Asymmetric clip will clip the commanded torque at -5000 to prevent downward commanded motion from moving too fast, and clip upward motion at 15000 torque counts.

The configuration values for this block are as follows:

 
UpperLimit

Asymmetric Upper Limit.

If Input + Offset < UpperLimit, then Output = Input + Offset
If Input + Offset >= UpperLimit, then Output = UpperLimit

LowerLimit

Asymmetric Lower Limit.

If Input + Offset > LowerLimit, then Output = Input + Offset
If Input + Offset <= LowerLimit, then Output = LowerLimit

Offset Offset value that is summed with the Input value before clipping the input to the upper and lower limits.
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). 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

bin_img1

The Output of a Clip2 block is the Input plus the offset clipped by the upper and lower limits.

If Input + Offset < UpperLimit, or > LowerLimit, then Output = Input + Offset

If Input + Offset >= UpperLimit, then Output = UpperLimit

If Input + Offset <= LowerLimit, then Output = LowerLimit

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:

bin_img2

 

 

C++ API

CLIP2Block

Declaration

Public Method

 
class CLIP2Block: public virtual Block
{
public:
	// User accessible coefficients
 	double	UpperLimit;
	double	LowerLimit;
	double	Offset;
};
  Required Header: mechaware.h

Description

The Clip2 block provides symmetrical limits for an input signal. The signal will saturate at a maximum value of (+ Limit) and a minimum value of (– Limit). The input signal is offset by an amount defined by offset prior to the clipping the signal to +/- limit.

 
double UpperLimit

Asymmetric Upper Limit.

If Input + Offset < UpperLimit, then Output = Input + Offset
If Input + Offset >= UpperLimit, then Output = UpperLimit

double LowerLimit

Asymmetric Lower Limit. Input + Offset.

If Input + Offset <= LowerLimit, then Output = LowerLimit

double Offset Offset value that is summed with the Input value before clipping the input to the upper and lower limits.

Methods

Block Methods

 

See Also

Clip (Symmetric)

 

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