.

Gain Tables

Overview

The controller’s Filter object contains up to 5 gain tables. By default, only gain table 0 is used for the closed-loop servo control. In cases where multiple gain tables are required for optimal closed-loop servo performance, the controller can be commanded to switch between gain tables. The coefficients from the active gain table are applied to the closed-loop control algorithm. Switching the gain table index can be controlled directly by the application program, by the controller’s commanded trajectory, or in special cases via custom algorithms embedded in custom firmware. Gain table coefficients can be loaded or modified at any time.

Additionally, SynqNet drives may also support multiple gain tables via drive parameters. For more information, please contact your SynqNet drive manufacturer.

MPI Version 03.04.08 (and later)

See the Release Notes for the 03.04.08 MPI software release.

The controller will send the gain table index to the SynqNet drive via the cyclic demand packet. If the drive supports multiple gain tables, it will automatically activate the gain table coefficients that correspond to the gain table index. If the SynqNet drive does not support multiple gain tables, it will simply ignore the gain table index in the cyclic demand packet. Gain tables are useful for SynqNet drives operating in either Velocity or Position (future) demand modes. At this time, no SynqNet drives support gain tables while in Torque demand mode.

Example #1 - User Selectable Gain Table Index

Suppose the application requires different gain tables for different moves.

chart1

The application would maintain a list of move-specific optimized gain table values and select the gain table index before each move. For instance, while Move A is in progress, the application would load the gain tables for the next move. After Move A is complete, the application would set the gain index and then command Move B.

MPI

The example code fragment below shows how to use the gain table index.

NOTE: This code fragment does not contain return value checking or all the necessary logic for a real application. It is for demonstration purposes only.


mpiFilterGainIndexSet(filter, 0); /* select gain table 0 */ mpiMotionSimpleTrapezoidalMove(motion, position, velocity, acceleration, deceleration);

/* load controller gains for table 1 */ mpiFilterGainGet(filter, 1, &gain); gain.PID.proportional = 100.0; gain.PID.integral = 0.2; gain.PID.derivative = 1000.0; mpiFilterGainSet(filter, 1, &gain);
/* load S200 drive gains for table 1 */ mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVP_1, MPIDriveMapParamTypeSINGLE, &valueKVP); mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVI_1, MPIDriveMapParamTypeSINGLE, &valueKVI);
/* wait for motion to complete using events */ mpiNotifyEventWait(notify, &eventStatus, MPIWaitFOREVER); if (eventStatus.type == MPIEventTypeMOTION_DONE) { mpiFilterGainIndexSet(filter, 1); /* gain table 1 */ mpiMotionSimpleTrapezoidalMove(motion, position, velocity, acceleration, deceleration); }

MPX

Gain tables are not supported.

Motion Console

To select the controller and drive gain table index, set the Gain Switch Type to "None" and select the Gain Table.

gainTable1

Example #2 - Controller Selectable Gain Table Index

Suppose the application requires different gain tables for different portions of the trajectory.

chart2

The application would load the optimized gain table values and configure the controller for gain switch type MOTION operation. Then the application would command moves and the controller would automatically switch the gain table index.

MPI

The example code fragment below shows how to use the gain table index.

NOTE: This code fragment does not contain return value checking or all the necessary logic for a real application. It is for demonstration purposes only.

/* load S200 drive gains for table 0, 1, 2, and 3 */ 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVP_0, 
MPIDriveMapParamTypeSINGLE, &valueKVP); 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVI_0, 
MPIDriveMapParamTypeSINGLE, &valueKVI); 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVP_1, 
MPIDriveMapParamTypeSINGLE, &valueKVP); 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVI_1, 
MPIDriveMapParamTypeSINGLE, &valueKVI); 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVP_2, 
MPIDriveMapParamTypeSINGLE, &valueKVP); 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVI_2, 
MPIDriveMapParamTypeSINGLE, &valueKVI); 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVP_3, 
MPIDriveMapParamTypeSINGLE, &valueKVP); 
mpiSqNodeDriveParamSet(node, driveIndex, S200ParamKVI_3, 
MPIDriveMapParamTypeSINGLE, &valueKVI); 

mpiFilterConfigGet(filter, &config);
/* controller gains for tables 0, 1, 2, and 3 */ for (index = 0; index < MPIFilterGainCOUNT_MAX; index++) { config.gain[index].PID.proportional = 100.0; config.gain[index].PID.integral = 0.2; config.gain[index].PID.derivative = 1000.0; }
/* controller switches gain table index */ config.gainSwitchType = MPIFilterGainSwitchTypeMOTION_ONLY; mpiFilterConfigSet(filter, &config); mpiMotionSimpleTrapezoidalMove(motion, position, velocity, acceleration, deceleration);

MPX

Gain tables are not supported.

Motion Console

To have the controller set the gain table index based on the command trajectory, set the Gain Switch Type to "Motion Only."

gainTable2

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