.

Clip (Symmetric)

Overview

Overview

The Clip block provides symmetrical limits for an input signal. The signal saturates 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. The clip is evaluated at the update rate, which is determined by the Evaluate Block.

Example

The following example demonstrates a simple PID Control loop with a Clip to protect the motor from over current. Additionally, an analog input (another feedback source such as an Accelerometer) is transfered into an AutoNull block and summed into the control loop.

The Clip block allows clipping of any signal to make sure a certain value is never exceeded.  For example, clipping the Torque Command before the signal gets to the drive. Some drives cannot handle the full range of torque commands that the ZMP commands. If this occurs, the actual current commanded by the drive may act erratic resulting in poor performance. This solution is a way to limit what command is sent out to the drive.


clip

The configuration values for this block are as follows:

 
Limit

Symmetric Limit.

If Input + Offset < +Limit, or > -Limit, then Output = Input + Offset
If Input + Offset >= + Limit, then Output = + Limit
If Input + Offset <= -Limit, then Output = -Limit

Offset Offset value that is summed with the Input value before clipping the input to the +/- Limit.
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

bin_img1

The Output of a clip block is the Input plus the offset clipped by the +/- limit.

If Input + Offset < +Limit, or > -Limit, then Output = Input + Offset

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

If Input + Offset <= -Limit, then Output = -Limit

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

CLIPBlock

Declaration

Public Method

 
class CLIPBlock: public virtual Block
{
public:
	// User accessible coefficients
	double	Limit;
	double	Offset;
};
  Required Header: mechaware.h

Description

The Clip 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.

 
long Limit

Symmetric Limit.

If Input + Offset < +Limit, or > -Limit, then Output = Input + Offset
If Input + Offset >= + Limit, then Output = + Limit
If Input + Offset <= -Limit, then Output = -Limit

long Offset

Offset value that is summed with the Input value before clipping the input to the +/- Limit.

Methods

Block Methods

 

See Also

Clip2 (Asymmetric)

 

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