.

PIV with Gain Table

Overview

Overview

The PIV with Gain Table block implements PIV control. There is an inner Velocity Loop and an outer Position Loop. Additionally, there is a PI compensator for both Velocity and Position Loop. All parameters are entered into gain tables. Velocity, Acceleration, and Friction Feed Forward are also supported.

There is a table for each parameter and each table has five elements. The gain index input determines which table element is used for each specific parameter.

The coefficients for this block are as follows:

Kpp

Position Proportion Gain.

Kip Position Integral Gain.
Kpv Velocity Proportional Gain.
Kpff Position Feed Forward to Torque Command.
Kvff Velocity Feed Forward to Velocity Command.
Kafff Acceleration Feed Forward to Torque Command.
Kfff Friction Feed Forward to Torque Command.
MovingImax Position Integral Limit when Trajectory
Generator Command Velocity ~=0.
RestImax Position Integral Limit wen Trajectory
Generator Command Velocity == 0.
Output Limit Absolute value of maximum allowed Torque Command.
Output Limit High Positive Limit of allowed Torque Command.
Output Limit Low Negative Limit of allowed Torque Command.
Offset Offset applied to Torque Command.
Kdv Not used.
Kiv Velocity Integral Gain.
Vintmax Velocity Integral Limit.
Ka0

Velocity Estimate Smoothing parameter.

0 = No smoothing.
1 = Infinite smoothing.
Ka1

FFT gain block Ka1 ~=0 Noise injected at Torque Command.

Ka1 = 0. No Noise Injection.
Ka2

FFT gain block Ka2~=0 Noise injected at Velocity Command

Ka2 = 0 No Noise Injection.
Pos Meas User
Buffer
User buffer number used for Position Loop measurement.
Vel Meas User
Buffer
User buffer number used Velocity Loop Measurement.
Ts Sample Period used for Simulink Simulation
SubSample A code which determines the schedule for updating this block (every sample, even samples only, etc.). See Subsampling.
User Date 0 User Data, Not Applicable for Simulink.


Matlab/Simulink

Simulink Interface

PIV_Gain_Table

The Position Error 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 is set to the Reset Value.

The Gain Index input determines which of the five gain tables elements are used by the servo algorithm. Valid values are 0 through 4.

IMPORTANT! The new Servo Gains are applied immediately when the Gain Index value is changed. The Position Integrator Reset input controls the resetting of the Integrator sum internal to the block. When a non-zero value is detected at the Reset input the integrator sum is set to zero.

The following block diagram shows the block internal structure

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 Subsample Code (See Subsampling). The following Parameter Dialog Box can be opened by double-clicking on the block in a Simulink Model:

piv_reset_sim2

C++ API

PIV_GTBlock

Declaration

Public Method

PIV_GTBlock&   PIV_GT();
Required Header: mechaware.h

Description

This block represents the standard PIV algorithm as used on the ZMP-SynqNet controller including the Gain Tables and Feed Forward parameters. The only difference is the addition of the Ksm value for smoothing.

Each parameter must have a corresponding .txt file containing structure with five (5) coefficient values. Individual parameters can be modified using the API functions below.

PIV_GT().Kpp[index]

Sets gain value at specified index.

Position Proportion Gain.

PIV_GT().Kip[index]

Sets gain value at specified index.

Position Integral Gain.

PIV_GT().Kpv[index]

Sets gain value at index value.

Velocity Proportional Gain.
PIV_GT().Kpff[index]

Sets gain value at index value.

Position Feed Forward to Torque Command.
PIV_GT().Kvff[index]

Sets gain value at specified index.

Velocity Feed Forward to Velocity Command.
PIV_GT().Kafff[index]

Sets gain value at specified index.

Acceleration Feed Forward to Torque Command.
PIV_GT().MovingImax[index]

Sets gain value at specified index.

Position Integral Limit when Trajectory Generator Command Velocity ~= 0.
PIV_GT().RestImax[index]

Sets gain value at specified index.

Position Integral Limit when Trajectory Generator Command Velocity == 0.
PIV_GT().Output Limit[index]

Sets gain value at specified index.

Absolute value of maximum allowed Torque Command.
PIV_GT().Output Limit High[index]

Sets gain value at specified index.

Positive Limit of allowed Torque Command.
PIV_GT().Output Limit Low[index]

Sets gain value at specified index.

Limit of allowed Torque Command.
PIV_GT().Offset[index]

Sets gain value at specified index.

Offset applied to Torque Command.
PIV_GT().Kdv[index] Not used.
PIV_GT().Kiv[index]

Sets gain value at specified index.

Velocity Integral Gain.
PIV_GT().Vintmax[index]

Sets gain value at specified index.

Velocity Integral Limit.
PIV_GT().Ka0[index]

Sets gain value at specified index
Velocity Estimate Smoothing parameter.

0 = No smoothing
1 = Infinite smoothing
PIV_GT().Ka1[index]

Sets gain value at specified index.

FFT gain block Ka1 ~= 0. Noise injected at Torque Command.

Ka1 = 0. No Noise Injection.
PIV_GT().Ka2[index]

Sets gain value at specified index.

FFT gain block Ka2 ~= 0. Noise injected at Velocity Command.

Ka2 = 0. No Noise Injection.

Methods

Block Methods

Remarks

The PIV with Reset block is an alternate PIV loop without gain tables or feed forward terms.

.

See Also

PID with Gain Table

 

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