Adept SmartMotion Developer's Guide


Step-by-Step Tuning Procedure

Initial servo tuning should be done with the motor uncoupled from the load. This allows the user to gain experience with the tuning parameters without risking hardware damage to the mechanism. It also provides a useful reference for final tuning when the motors are installed.

Start by setting the servo tuning parameters to the values listed in Servo Tuning Parameters, with Suggested Initial Values. The suggested initial values represent a set of parameters that will probably allow stable start-up of the servo loop, but system performance may be quite poor. You should also ensure that the Motor/Amplifier values are set as described in the  Motor/Amplifier Specification Menu documentation.

WARNING: The user should assume the worst when starting the system for the first time. The system may be unstable and could produce uncontrollable motion or severe vibration. Be sure to take all precautions necessary to avoid equipment damage or injury to personnel. Stand clear of all mechanisms and be prepared to depress the Emergency Stop button. It is imperative that operation of the Emergency Stop circuit be verified BEFORE attempting to start up the system.

Tuning is usually most efficiently performed by the step-by-step process outlined below.

NOTE: The step response test process only enables that axis which is being tuned.

 

Tuning Overview

Detailed Tuning Procedure

NOTE: See This Topic for a detailed explanation of the servo-tuning parameters (Description of Servo Parameters), block diagrams of the servo loops, and an overview of the objectives and methods of tuning (Tuning Analysis Tools: Step and Frequency Response).

  1. Test Encoder and Motor Signs:

Disconnect the motor output shaft from the robot mechanism. Define the values of the Encoder Sign and Motor Sign so that:

a) when the joint is pushed in the positive direction (as defined in the axis-definition diagram for your robot device module), positive encoder motion is obtained, and


b) a positive torque or velocity command ("U" in the hardware diagnostics menu) generates positive encoder motion. If this is not the case, do not proceed until the situation is corrected, because the control system will attempt to apply an output that makes position errors worse instead of better.

  1. Test Signs:

    With the motors still disconnected from the mechanism and the tuning and motor parameters set as specified in Motor/Amplifier Parameters and Servo Tuning Parameters, with Suggested Initial Values, enable High Power, the Amplifier, and Brake Release if necessary. Carefully move the motor shaft, and verify that a weak corrective torque is generated. If the motor runs uncontrollably, go back to step 1. If the motor starts to vibrate badly, lower the Proportional Gain until it stops. At this point, the motor should feel very "loose" or "soft" because of the very low settings of the Proportional Gain. Nonetheless, it is critical that the weak torque generated tends to correct for any induced position errors (see step 1 above).

  2. Pre-tune the robot:

Assuming performance was as expected in the previous step, the stiffness of the motor may now be increased by increasing the Proportional Gain and the Max DAC Output. The motor should become increasingly stiff. If the Proportional Gain is increased too much, it will eventually begin to excite resonances in the motor body. Motors with a particularly flexible coupling between the motor and the encoder may start resonating prematurely when perturbed. If this occurs, increase the Proportional Pole or enable the DAC output filter by setting it to 1 or 2.

  1. Initialize Proportional Gain and Zero:

The purpose of this step is to obtain initial approximate values for the Gain and Zero. Enable the step command, and using the motor's step response as a guide, continue adjusting the Proportional Gain and Zero until satisfactory performance is obtained. A step size of about 1/2 of a revolution of the motor shaft is normally used. (Make sure that the amplitude of the square wave is at least 25% smaller than the envelope error limit, or else that error may be generated.) The motor shaft should make sharp movements with little or no overshoot. The Zero can be adjusted up to increase damping, or down to decrease it. Again, if a motor resonance is discovered at this point, it may be necessary to enable the DAC output filter by setting it to a non-zero value. (The DAC output filter will reduce performance, and should only be used as a "last resort". If you use it now, try to set it back to zero after connecting the mechanism.)


For motors with no load connected, the Pole may almost always be left at zero, but the user may experiment with it now if desired. Increasing the Pole will usually only be required for systems with a high inertial load. This is an iterative process. You can leave all other parameters set to zero for now, or you may want to spend some time at this stage determining the effects of the various Proportional Path parameters.

NOTE: The Feedforward parameters for Velocity and Acceleration cannot be tuned during square wave tuning. (See step 11.)

  1. Test Integrator Gain Parameters:

Once a satisfactory response to a step input has been achieved, the integrator parameters can be slowly enabled to help eliminate any steady-state error. With the motor disconnected from the load, the amount of steady-state error will almost certainly be very small. Nonetheless, adjusting the integrator parameters now, with the motor unloaded, will provide the user with some valuable experience without risking the mechanism.

To explore the effects of a pure integrator (without the saturating elements) set the Max Step and Max Value to very large values, and slowly increase the Integral Gain from zero. Remember that the Integral Gain is much smaller numerically than the Proportional Gain, because it multiplies with a sum of all past position errors. Starting with the Integral Gain set to a small fraction, such as 0.01, is usually safest. The maximum value for the Integral Gain is usually around 10.

In most systems, raising the Integral Gain will decrease damping, which causes more oscillatory behavior. At some point, the motor will probably start oscillating with increasing instead of decreasing amplitude, as the integrator starts to dominate the response. Be prepared to disable power quickly if this occurs. Next, lower the Integral Gain to a reasonable value and slowly lower both the Step and the Max Value until they start to have an effect on the response. The best setting for the Max Integrator Value will be the minimum that still allows the integrator to remove all the steady state error. Remember the values that provide good performance, for future reference when the motor is installed.

  1. Connect to Mechanism:

Once reasonable no-load performance is obtained, connect the motors to the mechanism. The tuning parameters will require some readjustment because the effective inertia seen by the motor will increase. Most mechanisms will also increase the effective damping seen by the motor, so it may be possible to decrease the Zero somewhat.

CAUTION: With the motors connected to the mechanism, a poorly tuned system may now be capable of causing substantial damage. Adept recommends that the user set the tuning parameters to conservative values before enabling power for the first time. In particular, the integrator should be disabled by setting the gain to zero, and the Maximum DAC Output should be set to a small value so as to limit the amount of energy the motors can expend.
  1. Fine Tune the mechanism:

Repeat square-wave tuning to arrive at appropriate values for all active parameters, including Proportional Gain, Zero and Pole, and Integrator Gain, Step and maximum value. Now that the motor is connected to the load, experimentation should be done with the utmost caution. Change all values in small increments.

  1. Define Calibration Parameters and calibrate the robot:

Define calibration (homing) parameters, then calibrate the robot. The robot must be calibrated before you can use the "Move between taught points" tuning option. See Motor Calibration Parameters.

  1. Define other Specification Parameters:

Define all remaining mechanism and motion parameters. (See Joint Motion Parameters.)

  1. Test performance using Point-to-Point Testing:

After obtaining good performance with the square-wave step command, verify that the motor runs well during normal V+ trajectory generation ("Move between taught points"). This is especially important when the motor is installed in the mechanism. Long slewing motions can sometimes excite oscillations in systems with the gains set very high, especially if there is a cyclic variation in load friction (which is common with lead screw drives). Also, friction and gravity loads may vary from point to point in the working envelope, and it should be verified that the steady state error remains below an acceptable minimum in all areas of the workspace. If a problem is encountered with the steady state error, adjust the Integral Gain or Max Integrator Value and repeat the test.

  1. Set Feedforward Gains:

Once all motors are tuned and the robot is calibrated, adjust the Feedforward gains while moving the motor between taught points. Remember, the Feedforward gains will have no effect on the motor's response to a step command, because a step command has no meaningful commanded velocity or acceleration associated with it. As with all tuning parameters, start small and increase the values slowly.

  1. Save all parameters.

It is recommended that you save your parameters from time-to-time as you work. When you have finished, save the final version and make a backup copy. (For details, see Managing SPEC data.)

Auto-Tuning of Feedforward Parameters

The feedforward auto-tuning is performed by moving the mechanism back and forth between two points and monitoring the average DAC command during the motions. Best-fit calculations determine the optimal feedforward gains from the data. The robot must be calibrated to perform feedforward auto-tuning. It is important when performing this test that you teach two points far enough apart that the mechanism has time to perform a sufficient amount of constant-velocity motion.

Summary of Active Parameters

Effects of Servo Tuning Parameters summarizes the most important effects that each parameter has on various system response characteristics.

Effects of Servo Tuning Parameters
Servo Parameter
System Response
Raise P-Gain
Raise Int-Gain
Raise Zero
Raise Pole
Raise VelFFwd
Raise AccFFwd

Overshoot

increase

increase

decrease

 

decreasea

decrease

Rise Time

decrease

decrease

increase


 

 

decrease

Settling Time

decrease

increase

 

 

decreasea

decreasea

Steady State Error

decrease

decrease

no effect

no effect

no effect

no effect

Stiffness

increase

increase

decrease

increase

no effect

no effect

Following Error

decrease

decrease

 

 

decreasea

decreasea

Damping Factor

increase

decrease

increase


 
 
 
a when properly adjusted


Submit comments to: techpubs@adept.com
Last modified on: 9/29/2010
Copyright © 1994 - 2010. Adept Technology, Inc.