.

PIV with Reset

Overview

Overview

Description

The PIV with Reset block computes a Position PI (Proportional, Integral), and Velocity PI filter transformation. Both the position and velocity integration sums may be limited (Imax, VImax). The output is calculated as determined by the Evaluate Block.

The Reset inputs are used to reset the Integrator sum.

Example

In this example we are using a PIV Filter rather than PID Filter to command motion on an Axis. After the PIV block, Feed Forwards are summed in to help gain extra performance.


The coefficients for this block are as follows:

Kpp

Position Proportional Gain.

Kip

Position Integral Gain.

Kpv

Velocity Proportional Gain.

Kiv

Velocity Integral Gain.

Ksm

Velocity smoothing parameter.

0 = no smoothing
1 = infinite smoothing (unstable)

Imaxp Limit value for the position integration sum.
Imaxv Limit value for the velocity integration sum.
Ts Sample period of the PIV algorithm. This is the cycle time of the PIV algorithm in Simulink simulation. This value has no effect on the PIV execution on the controller.
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

piv_reset_sim1

The Position input should connect to a position error block or equivalent (for example the output of a sum block). The Velocity Position input should be from an Actual Position block or equivalent.

The Output is the torque command ready to connect to a motor output or equivalent. The Reset and Reset Value inputs control resetting of the Integrator sum internal to the block. When a non-zero value is detected at the Reset input the integrator sum will be set to the Reset Value.

The following block diagram shows the block internal structure:

piv

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:

piv_reset_sim2

 

C++ API

PIV_RBlock

Declaration

Public Method

class PIV_RBlock: public virtual Block
{
public:
	virtual void WriteIntegrator() const = 0;

	// User accessible coefficients
	double						Sump;
	double						Sumv; 
	double						Kpp;
	double						Kip;
	double						Kpv;
	double						Kiv;
	double						Ksm;
	double						IMaxp;
	double						IMaxv;
};
Required Header: mechaware.h

Description

The PIV with Reset block computes a Position PI (Proportional, Integral), and Velocity PI filter transformation. Both the position and velocity integration sums may be limited (Imax, VImax).

double Kpp

Proportional Proportion Gain.

double Kip Position Integral Gain.
double Kpv Velocity Proportional Gain.
double Kiv Velocity Integral Gain.
double Ksm

Smoothing parameter.

0 = no smoothing
1 = infinite smoothing

double IMaxp Limit value for the position integration sum.
double IMaxv Limit value for the velocity integration sum.

Methods

Block Methods

Remarks

The Reset and Reset Value inputs should be left disconnected if the integrator does not need to be reset.

See Also

PID with Reset

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