Feedback - PID Compensator Parameters

ID Label Type #Val Min Max Attr Description

10320

Enable clearing of integrator state flag

Uint32

 

 

 

 

Enable clearing of the integrator torque in the PID compensator when the high power enable sequence is invoked. Default value is "1", which clears the integrator torque. If this flag is "0" then the integrator torque, which was derived previously, will be reinstated after high power is up. The main purpose mode 0 is to avoid excessive arm "droop" if the axes are heavily loaded due to gravity and/or payload.  So, this parameter is typically set to 0 for Z-axes that are subject to gravity loading.

10321

Feedforward type selection

Uint32

 

 

 

 

Feedforward compensation type selection. The feedforward torque is added with the PID compensator torque to compose the final output torque command into the amplifier. Following are the available selections:

   0 - (default) feedforward torque calculated based on constant velocity and accel feedforward gains
   1 - (not supported) single-axis adaptive feedforward
   2 - (not supported) multi-axes adaptive feedforward (robot kinematics dependent)

Neither of the two adaptive feedforward methods are supported currently. If selected, the default method "0" is used.

10322

Velocity error type selection

Uint32

 

 

 

 

Type of velocity error utilized by the feedback compensator. There are two selections for velocity error generation:

   0 - (default) backward-difference of position error
   1 - difference between velocity command and velocity feedback

It's recommended that the system default, "0", be used. If method "1" is specified, you must be careful about applying a filter to the velocity feedback. If a filter is used then there could be a steady state velocity error, which produces an effect similar to an acceleration feedforward term.

10323

Position in-tolerance limit, mcnt

Flt32

 

 

 

 RO

 

10324

Position in-tolerance duration, sec

Flt32

 

 

 

 

10325

Position in-tolerance prediction window, sec

Flt32

 

 

 

 

10326

Velocity error SPR filter pole, Hz

Flt32

 

 

 

 

The single-pole rolloff (SPR) low-pass filter for the velocity tracking error. The purpose of this filter is to filter out the noise introduced due to limited encoder feedback resolution. In consideration of the loop bandwidth, this filter pole value must be well above the velocity loop bandwidth. The system default value is 100 Hz.

Setting the filter pole to 0 disables the filter.

10327

Accel error DPR filter pole, Hz

Flt32

 

 

 

 

Double-pole rolloff (DPR) low-pass filter for the acceleration error. The acceleration error is generated by backward-differencing the velocity error, so, the result is very noisy. But if the encoder has high resolution and if the acceleration error is heavily filtered via this parameter, the cleaned-up signal may be used for resonance cancellation.

Setting the filter pole to 0 disables the filter.

10328

Feedforward SPR filter pole, Hz

Flt32

 

 

 

 

Single-pole rolloff (SPR) low-pass filter for the feedforward torque. The main purpose of this parameter is to "soften" the edges produced by the feedforward calculation. The system default value is set at 0 Hz.

Also, see the "Feedforward torque rate limit" DataID 10348. See the "Servo Loop Feedforward Gains" section for the benefits and tuning of feedforward components.

Setting the filter pole to 0 disables the filter.

10329

Torque output filter pole, Hz

Flt32

 

 

 

 

An effective technique for eliminating oscillations in an axis is to filter out frequencies in the PID feedback output torque that can excite and/or reinforce the oscillation.   The "Torque output filter pole and damping ratio" is the first of four sets of filters that can be configured as notch filters to suppress a range of frequencies in the PID loop output. 

Typically, these four sets of filters are utilized to suppress oscillations that range from 50hz to 500hz.   For these types of oscillations, a filter pole frequency should be set somewhat lower than the frequency of the oscillation and the damping ratio should typically be sent to 0.3 or 0.4 (larger damping ratios increase the range of frequencies that are filtered out but reduces the strength of the filter).

For situations where widely separate oscillation frequencies exist, a second, third and fourth notch filter, which operate in a cascaded series with the primary filter, can be employed (DataIDs 10353/10354, 10361/10362, 10365/10366).

For each filter set, its parameters control a unity gain 2nd order filter for the PID output torque. This filter may be configured as follows:

   - A notch filter: by setting a valid filter pole and a non-zero damping ratio
   - A DPR filter: by setting a valid filter pole and setting the damping ratio to 0

In some cases, in order to effectively eliminate an oscillation, a notch filter should be used in combination with the "Accel error gain" (DataID 10338).

Setting the filter pole to 0 disables the filter. Beware that by setting the damping ratio to 0 but leaving the filter pole as a valid number, will simply configure this as a DPR filter.

10330

Torque output filter damping ratio

Flt32

 

0.1 

 

10331

Proportional gain, Kp

Flt32

 

 

 

 

The servo feedback algorithms represent motor positions in units of motor counts, which are typically the same as encoder counts, and generate output commands in units of torque counts.  Torque counts range from +/- 32768 and are mapped to the full range of the amplifier as defined by the "Amplifier PEAK(non-RMS) current, A(z-p)" (DataID 10610).   The standard unit of time for the servos is milliseconds. 

The feedback gains are simple multipliers in the basic units of measure for the servo algorithms.  Therefore, Kp and Ki are in units of tcnts/mcnts and Kd is in units of tcnts/(mcnts/msec).

These PID feedback gains are a function of both the motor and the axis that the motor is driving.

Typical ranges for each of these parameters is as follows: (Kp) 10 to 100, (Ki) 0.02 to 0.4, (Kd) 100 to 1500. These parameters are all highly dependent upon the specific mechanism and values outside of these typical ranges are quite possible.

10332

Integral gain, Ki

Flt32

 

 

 

 

10333

Derivative gain, Kd

Flt32

 

 

 

 

10334

Integrator limit

Flt32

 

 

 

 

Integrator torque limit in units of torque counts, tcnt's.  Set to 2000 by default.

10335

Integrator rate limit

Flt32

 

 

 

 

This parameter restricts how quickly the integral torque can change by limiting the magnitude of the position error that is multiplied times the "Integral gain" (DataID 10332). This limit prevents the integrator from charging up too fast, which typically happens when there is an excessive tracking error (possibly due to a heavy payload and/or high acceleration). This provides a nonlinear effect, which dynamically lowers the compensator "zero" and helps stabilize the feedback loop.  For example, if the "Position tracking error" (DataID 12320) is 400 encoder counts, and the rate limit is set to 100, the Integral gain will be multiplied by 100 (rather than 400) when the new integral torque value is computed. This value defaults to 50.

10336

Acceleration feedforward gain

Flt32

 

 

 

 

Feedforward gains, which are multiplied with the commanded acceleration and velocity, respectively. The resulting torques are then added to the feedback loop output torque to generate the final torque command into the amplifier.

The acceleration feedforward gain should roughly match with the link inertia and should be expressed in units of tcnts/(mcnts/msec^2), and the velocity feedforward gain should match the axis viscous friction torque and be expressed in units of tcnts/(mcnts/msec).

See the "Servo Loop Feedforward Gains" section for the benefits and tuning of feedforward components.

10337

Velocity feedforward gain

Flt32

 

 

 

 

10338

Accel error gain, Ka

Flt32

 

 

 

 

This gain is multiplied times the filtered accel error (see DataID 10327) to generate a resonance cancellation torque and is in units of tcnts/(mcnts/msec^2). In the case of an axis resonance problem, it can be used under the following conditions:

   - The encoder resolution is very high such that a good velocity/accel feedback signal may be generated.
   - The "Accel error DPR filter" (DataID 10327) is set to a relatively low value, typically around 40-100 Hz in order to clean up the accel error.
   - Then the gains may be adjusted to cancel out a resonance.

Due to the excessive phase loss from the DPR filter, the effectiveness of resonance cancellation will be somewhat limited. Typically this value should be set to 0, or disabled.

10339

Split axis cross-coupling gain

Flt32

 

 

 

 

(Split-axis)  This is a special feedback term that is only valid for motors that are controlled in split-axis mode.  This gain factor is multiplied by the difference in the actual position of the two split-axis motors and the result is added into the PID loop.  This correction assists in minimizing the tracking error between the two motors.  This value defaults to 0.

10340

Integrator deadband, mcnt

Flt32

 

 

 

 

Defines a deadband region about the final target position of the commanded motion.  If the axis is within the deadband region, the integrator value is frozen and not altered until the axis is outside of the deadband or a new motion is initiated.

This parameter can prevent a motor from dithering at the end of a motion due to the integrator slowly oscillating to correct for small position errors.  However, it is important to note that the use of integrator deadband will leave a steady state position error at the end of motion. 

To avoid generating a nulling timeout error, the runtime deadband value is the minimum of position in-tolerance limit (10323) and the defined deadband value.  The default value is 0, which disables the deadband.

10341

Cross-coupling error SPR filter pole, Hz

Flt32

 

 

 

 

(Split-axis)  Single-pole roll off (SPR) low-pass filter for the cross-coupling error term that is multiplied times the "Split axis cross-coupling gain" (DataID 10339).  The main purpose of this filter is to minimize the noise introduced by the cross coupling compensation.  Setting the filter pole to 0 disables the filter.  The system default value is 0.

10342

Position feedforward gain

Flt32

 

 

 

 

These parameters implement non-linear position feedforward compensation.  This was initially developed to compensate for the spring force often present with voice coil motors.  If the gain and other applicable parameters are non-zero, these parameters add a term to the servo's output torque that is a function of the commanded motor position. 

These parameters can also implement a constant torque gravity compensation term for gravity loaded Z-axes.  To do this, Coefficient_2 and Coefficient_1 (the terms that are position dependent) should be set to zero.   In this case, the "Position feedforward gain" is typically set to 1 and Coefficient_0 is set to the constant torque offset in units of torque counts.

The full compensation computed by these terms is as follows.  First, the offset between the commanded motor position and a "zero" position is computed:

    Position_offset = Motor_command_position -
                                  Motor_neutral_position

Then a correction is computed that is a non-linear function of the position offset:

    Non_linear_pos = Coefficient_2 * Position_offset^2
                             + Coefficient_1 * Position_offset
                             + Coefficient_0 - Motor_neutral_position

Finally, the torque feedforward term in units of torque counts is computed and then added to the servo output command to the motor amplifier:

    Output_torque = Position_feedforward_gain *
                             Non_linear_pos

10343

Motor neutral position, mcnt

Flt32

 

 

 

 

10344

Position adjustment coefficient 0

Flt32

 

 

 

 

10345

Position adjustment coefficient 1

Flt32

 

 

 

 

10346

Position adjustment coefficient 2

Flt32

 

 

 

 

10347

Friction feedforward torque, tcnt

Flt32

 

 

 

 

Friction feedforward torque is a constant torque that will add to the final output of the compensator.  The direction of the friction feedforward torque depends on the commanded velocity. This parameter is generally used to compensate for static friction in the system.

See the "Velocity feedforward gain" (DataID 10337) for compensating for viscous friction. See "Friction feedforward rate limit, tcnt" (DataID 10371) to smooth out the transition when the friction compensation is reveresed. See the "Servo Loop Feedforward Gains" section for the benefits and tuning of feedforward components.

The default torque value is 0.

10348

Feedforward torque rate limit

Flt32

 

 

 

 

Feedforward torque rate of change limit in units of torque counts per servo execution period (tcnt/tick). This limit prevents the feedforward torque from changing too fast.  For example, this can occur if an axis hits a soft stop limit in manual control and the setpoint speed is spontaneously set to 0.  Limiting the rate of change of the feedforward torque can prevent the motor from becoming unstable or from generating a large jerk.

This limit is applied after the feedforward SPR filter (ID 10328).

See the "Servo Loop Feedforward Gains" section for the benefits and tuning of feedforward components.

The default value is 100.

10349

Gravity compensation torque, tcnt

Flt32

 

 

 

 

Adds a constant torque offset when an axis is either in position or torque control modes.  This offset can be used to compensate for gravity in axes that are subject to a constant gravity force.  For example, this term can be applied to the Z-axis for either a Cartesian or SCARA robot.

For axes that are subject to a constant gravity load, defining this compensation torque can improve the performance of the PID loop since having a high Integral Gain (DataID 10332) to compensate for gravity can cause instabilities or degrade the performance of an axis.

This compensation should typically not be utilized for axes with greatly varying gravity compensation, such as those of a 6-axis Articulated robot.  This compensation is redundant with the compensation that is typically provided by Dynamic Feedforward Compensation.

Since this compensation is enabled during torque control mode, it is also active during Jog Control Free Mode.   This compensation is compatible with enabling the "Free mode gravity comp motor mask" (DataID 2824).

See the "Servo Loop Feedforward Gains" section for the benefits and tuning of feedforward components.

The default value is 0.

10350

Integrator torque preload, tcnt

Flt32

 

 

 

 

Immediately sets the integrator torque as displayed by "Integral torque" (DataID 12325) to a specified value.

This parameter can be written before motor power is enabled to preload the integral torque with a value that will be in effect as soon as power is enabled.  Alternately, this can change the integral torque while power is enabled and the PID loop is active.  In either case, once the preload value is written, the integrator torque will continue to be modified per the standard PID loop algorithm and the value of the "Feedback compensator configuration" (DataID 10300). 

Of special interest is bit 10 of the "Feedback compensator configuration" (DataID 10300).   If this bit is set and 10350 is written, the integrator torque will be set to the specified value and will remain at this value until bit 10 is cleared or 10350 is written again.

This value is not written to the Robot__.PAC configuration data file.  If you wish to have this preload value set each time motor power is enabled, see "Saved integrator torque preload" (DataID 10355).

10351

Max positive torque limit for PID feedback, tcnt

Flt32

 

0

FP32
_Mx

 

These parameters limit the sum of the PID feedback output without affecting feedforward terms.  These limits are especially useful for Z-axes with significant gravity loading. 

If these PID limits are zero and a Z-axis unexpectedly encounters an obstacle, a very large downward force may be generated that is the sum of the weight of the axis plus the force generated by the peak motor torque.  If these parameters are non-zero and gravity and inertial acceleration are compensated by feedforward terms, these limits restrict the torque generated by the PID feedback terms during a collision while still permitting the peak motor torque to be used to lift and accelerate the axis.

For example, if a Z-axis is supported by a 6000 tcnt "Gravity compensation torque" (DataID 10349) and DataID 10352 is set to -4000, the motor torque will not be permitted to be lower than +2000 tcnt.

The PID feedback components whose sum is limited include: the "Proportional torque" (DataID 12326), "Integral torque" (12325), "Differential torque" (DataID 12327), "Accel error torque" (DataID 12329) and the "Split axis cross-coupling torque" (DataID 12334).  The sum of the PID feedback components that is limited by the Max/Min limits are available as the "Torque output for PID feedback" (12338).

The feedforward components that are not included in the sum that is limited include: the "Feedforward torque" (DataID 12330/12331) and the "Dynamic feedforward torque" (DataID 12337).  The "Feedforward torque" is generated from components such as the acceleration, velocity, friction and gravity feedforward (DataIDs 10336, 10337, 10347, 10349).

These PID limits do not permit the motor torque to exceed the limits set by other terms such as DataIDs 10610, 10611, 10613, 10615 and 10618.

If the sum of the PID feedback terms saturate at these limits for the period of time specified by the "PID output saturation duration limit" DataID 10369, an error is generated and motor power is disabled.

10352

Max negative torque limit for PID feedback, tcnt

Flt32

 

-FP32
_Mx

0

 

10353

Torque output filter pole, Hz #2

Flt32

 

 

 

 

Second set (of four sets) of torque output filters that are applied after the "Torque output filter pole" (DataID 10329) and "Torque output filter damping ratio" (DataID 10330).  This cascaded set of four filters permits four distinct frequency ranges to be suppressed in the output of the servo feedback loop to reduce the possibility of exciting an oscillation in the axis.

10354

Torque output filter damping ratio #2

Flt32

 

0.1 

 

10355

Saved integrator torque preload, tcnt

Flt32

 

 

 

 

Sets the integrator torque as displayed by "Integral torque" (DataID 12325) to a specified value each time that motor power is enabled.   Once the system completes its motor power enable sequence, the integrator torque will be modified per the standard PID loop algorithm and the value of the "Feedback compensator configuration" (DataID 10300). 

Of special interest is bit 10 of the "Feedback compensator configuration" (DataID 10300).   If this bit is set and 10355 is defined, the integrator torque will be set to the specified value and will remain at this value until bit 10 is cleared.

As with most standard values, this parameter is written to the Robot__.PAC configuration data file.  If you wish to set the integrator value immediately or set the preload value once, see the "Integrator torque preload" (DataID 10350).

10361

Torque output filter pole, Hz #3

Flt32

 

 

 

 

Third set (of four sets) of torque output filters that are applied after the "Torque output filter pole #2" (DataID 10353) and "Torque output filter damping ratio #2" (DataID 10354).  This cascaded set of four filters permits four distinct frequency ranges to be suppressed in the output of the servo feedback loop to reduce the possibility of exciting an oscillation in the axis.

10362

Torque output filter damping ratio #3

Flt32

 

0.1 

 

10363

Kd gain schedule, gain at zero speed, Kd

Flt32

 

 

 

 

These two parameters implement a simple linear derivative gain adjustment (Kd gain scheduling). Systems with direct drive motors or low gear ratio axes are often under damped when the axis is not moving.  However, increasing Kd can have the negative effect of generating unstable vibrations when the axis is moving at high speed.

This gain scheduling provides a simple means for increasing Kd when the axis is stopped and linearly decreasing Kd as the axis' speed increases. When the axis is at a fully stop, Kd is set equal to the "Kd gain schedule, gain at zero speed" (DataID 10363).   As the axis' speed increases, the Kd value is linearly interpolated starting at the value set by DataID 10363 such that when the axis achieves the speed defined by "Kd gain schedule, activate below speed" (10364), Kd is equal to its standard value defined by "Derivative gain, Kd" (10333).  Above the speed defined by 10364, Kd is constant at the value defined by 10333.

For example, if Kd (10333) is set to 200, the zero speed Kd (10363) is set to 400 and the activate below speed is set to 10000 mcnt/sec: when the axis is stopped, Kd will be 400;  when the axis speed is 5000 mcnt/sec, Kd will be 300; and at speed 10000 mcnt/sec and above, Kd will be 200.

To monitor the instantaneous Kd value, "Active derivative gain" (DataID 12339) is provided.

To activate Kd gain scheduling, the "Activate below speed " (DataID 10364) must set to a value larger than 1 (mcnt/sec).

10364

Kd gain schedule, activate below speed, mcnt/sec

Flt32

 

  

 

 

10365

Torque output filter pole, Hz #4

Flt32

 

 

 

 

Fourth set (of four sets) of torque output filters that are applied after the "Torque output filter pole #3" (DataID 10361) and "Torque output filter damping ratio #3" (DataID 10362).  This cascaded set of four filters permits four distinct frequency ranges to be suppressed in the output of the servo feedback loop to reduce the possibility of exciting an oscillation in the axis.

10366

Torque output filter damping ratio #4

Flt32

 

0.1 

 

10367

Max torque limit for PID feedback after error, tcnt

Flt32

 

 

 

 

When a severe error occurs (such as a "Hard envelope error" (-3100)), this parameter immediately takes effect and limits the sum of the PID feedback output without affecting feedforward terms (such as DFF, acceleration feedforward and gravity compensation).  In the case of a "Hard envelope error", this prevents the position error feedback from driving against any object that is encountered.

This parameter operates in the same manner as the "Max positive/negative torque limit for PID feedback, tcnt" (DataIDs 10351/10352) but only has an effect after an error occurs.  Please see the descriptions of those DataIDs for more information on the operation of this parameter.

By default, this parameter is set to 0 or -1 to disable this feature, which leaves the PID feedback terms unaltered.

See also DataIDs 10351, 10352, 10368.

10368

Max torque limit for feedforward after error, tcnt

Flt32

 

 

 

 

When a severe error occurs (such as a "Hard envelope error" (-3100)), this parameter immediately takes effect and limits the sum of the feedforward output (e.g. velocity (10337), acceleration (10336), friction (10347), gravity (10349), dynamic feedforward) without affecting the feedback torques.  When a collision occurs, this feature limits the feedforward torque output, which were probably properly defined to drive an axis during normal operation, but may be excessive when the axis is in contact with an unexpected object.

By default, this parameter is set to 0 to disable this feature, which leaves the feedforward terms of the output torque unaltered.

10369

PID output saturation duration limit, sec

Flt32

 

 0

1000

 

The maximum time, in seconds, that the sum of the PID loop feedback terms can remain at its maximum value as defined by DataIDs 10351/10352). If this time is exceeded, a -3101 "PID output saturated too long" error occurs and robot power is disabled.

By default, this value is set to 2 seconds. For safety, you should set this value to the minimum that allows the robot to perform its normal task.

10370

Integrator clear rate limit, tcnt

Flt32

 

 

 

 

If the feature to zero the integrator when an axis is in motion is enabled (bit 6 of the "Feedback compensator configuration", DataID 10300), this parameter defines how many tcnts the integrator torque is reduced during each feedback compensator cycle. The feedback compensator loop rate is set to 2kHz by default, so this parameter typically sets the maximum reduction of the integral torque every 0.5 msec when a move starts.

This rate limit helps reduce the spring effect when a move starts and the integrator is being reset to 0.

This parameter is set to 0 by default, which means the rate limit is disabled and the integrator is instantaneously zeroed.

10371

Friction feedforward rate limit, tcnt

Flt32

 

 

 

 

When the “Friction feedforward torque, tcnt” (DataID 10347) is non-zero and the direction of the commanded velocity is reversed, the sign of the friction torque compensation is spontaneously changed.   If the friction feedforward torque is large, this can generate a sudden jerk in the compensator command.   This rate limit smooths out this transition by gradually applying the change in the friction compensation.   

This parameter is interpreted as torque counts per servo execution period (tcnt/tick) and defaults to 0 (disabled).