Adept SmartMotion: Introduction to Servo Parameters

Each of the blocks shown in the Adept SmartMotion Control System Block Diagram contains several parameters that determine the behavior of the block. These parameters can be adjusted from the Motor Servo Tuning menu available in the SPEC utility program. Some of the parameters are active, in that they directly affect the performance of the motor. Active parameters are adjusted by the user during the tuning process. Other parameters are passive because they have no direct affect on motor performance. For example, the variables that control the generation of error conditions, such as the time-out on a *Motor Stalled* error, would be considered passive. This section provides a description of all the active parameters in Adept SmartMotion, and the affect that they have on motor stability and performance.

Amplifier Control Section

The Amplifier Control Section figure provides an expanded view of  the amplifier control section shown in the Adept SmartMotion Control System Block Diagram. Three parameters are shown that affect the final torque command before it is sent to the motor's amplifier:

Maximum DAC Output

Motor Sign

DAC Output Filter

 


Amplifier Control Section
  1. The Maximum DAC Output specifies the maximum torque command that will be sent to the amplifier. Torque commands whose absolute value is greater than this value will be chopped or saturated against this maximum. It has units of DAC output counts, and may therefore range from 0 to 32767. This will correspond to voltages of 0 to 10 volts after the command is sent the DAC. This parameter is most often used at a low value during initial tuning to limit the amount of torque a motor can produce to a safe value, and then raised to a higher value to attain peak performance.

It is also useful as a means of protecting a small motor that is being used with a powerful amplifier, by preventing the amplifier from dumping too much current to the motor. If the maximum DAC output is set too low, the control system will not be able to exert enough torque to quickly correct for position errors and the motor will behave as if it were underpowered for the application. This condition may be detected by plotting the torque output to the motor and looking for premature saturation.

  1. The Motor Sign determines whether a positive digital torque command corresponds to a positive or negative DAC output voltage. A value of zero indicates no sign flip (positive torque implies positive DAC voltage). A non-zero value will cause a sign flip.

CAUTION: It is VERY important to adjust the Motor Sign (and the Encoder Sign) such that a positive torque command to the motor causes the motor to go in a positive direction. Otherwise, the torque commanded by the control system will tend to INCREASE the position error instead of decreasing it, resulting in a runaway motor. This phenomenon is called positive feedback. The Motor Sign and Encoder Sign must be adjusted to produce negative feedback before ANY attempt is made to tune the motor.

  1. The DAC Output Filter is a low pass digital smoothing filter on the final torque command. Progressively higher integer values will double the degree the output is filtered, removing a larger portion of the high frequency components from the torque command. This will cause the DAC output to change values more slowly and smoothly. Smoothing can be useful in certain situations where the motor has a resonant or vibration mode that is excited by higher frequencies. Such modes are often caused by a flexible coupling between either the motor and encoder, or between the motor and the load.

This vibration can usually be decreased by increasing either the Proportional Pole or the DAC Output Filter to help smooth the torque output, keeping it from changing rapidly enough to excite the resonance. Naturally, if the value is increased too much, the system will not be able to apply corrective torques quickly enough, and overall performance will be severely degraded. Keep the DAC output filter at zero unless it is needed to help control a high-frequency resonant mode. Typical values in this case would be 1 or 2.

Those users with a background in digital control theory will want to know that the DAC filter is implemented as a unity gain digital filter with one pole. The pole location in the Z plane may be calculated as:

p = 1 - 2(-Filter Value)

The frequency response of the DAC output filter is shown in the figure Frequency Response of DAC Output Filter for 4 different values of the pole parameter. If your system has a high-frequency resonance that you cannot eliminate with the proportional pole, you may want to invoke a low value (typically 1 or 2) for the filter.

Note: The delay introduced by the DAC output filter can cause low frequency resonances in the system that are difficult to eliminate, so only use the DAC output filter when necessary.

Frequency Response of DAC Output Filter

Encoder Path

The Encoder Path controls the interpretation of the A and B phases of the encoder, and the zero index pulse. These parameters are used to define the relationship between the encoder, the mechanism, and the control system. Most of the parameters associated with this path are used to control the interpretation of the zero index which ensures proper encoder operation and calibration accuracy. Detailed information on these parameters is available in the Encoder Specification Menu documentation.

The most important parameter in terms of motor performance is the Encoder Sign. The Encoder Sign is similar to the Motor Sign in the Amplifier Control section. It is used to determine which direction of motor rotation will be considered positive by the control algorithm.

CAUTION: Like the Motor Sign, the value for the Encoder Sign should be determined before ANY attempt is made to tune the motor. As discussed above, if either sign is set incorrectly, the control system will command torques that INCREASE the position error instead of decrease it.

Typically, the signs are determined by first adjusting the Encoder Sign so that positive rotation is defined in the direction desired, and then adjusting the Motor Sign to produce negative feedback (so that a positive torque command generates motion of the motor in the positive direction).

Proportional Path

The Proportional Path figure provides an expanded view of the Proportional Feedback Path shown in the Adept SmartMotion Control System Block Diagram. It is the most important section of the block diagram and is controlled by specifying values for the following three parameters:

Proportional Gain

Proportional Zero

Proportional Pole

This path accepts a position error input and produces a torque command output that under normal operation will dominate the overall response of the system.


Proportional Path

Those familiar with digital control theory will recognize that the Proportional Path illustrated in the figure above consists of a digital filter with one zero and pole, and a separate gain element. The overall affect of this filter is very similar to the proportional and derivative feedback of a PD (Proportional-Derivative) feedback system. That is, the torque command generated will be proportional to both the position error and the velocity error.

  1. The Proportional Gain has units of DAC output units/encoder count. It causes the control system to output a torque that is proportional to the position error (commanded position minus actual position). This makes the motor behave like a spring. As the motor is moved from its setpoint (increasing the position error) the torque it develops in the direction of the setpoint increases just as a spring applies a greater force the more it is moved from the spring center. Assuming that the integrator gain is set to 0, if the position error is held at a constant value (perhaps by holding the motor at a fixed distance from the setpoint), the resulting corrective output torque can be calculated as follows:

Steady State torque (DAC output units) = PGain * Position Error

As an example, assume that all paths but the Proportional Path are disabled, and the motor is held so that there is a constant position error of 100 encoder counts, with a Proportional Gain of 150. Then it is easy to calculate that the torque command that will be sent to the motor is 150*100 = 15000 DAC units. If the Maximum DAC output is set to 32767, the motor will develop about 15000/32767 = 46% of the available torque trying to remove the 100 encoder count error.

Clearly, increasing the Proportional Gain will increase the stiffness of the servo system by increasing the torque that is generated in response to a given position error. Similarly, a Proportional Gain value which is too low will result in a spongy or soft system. If the Proportional Gain is too high, it will begin to excite high frequency vibration modes in the motor, coupling, or load, and lead to noisy, rough operation.

  1. The Proportional Zero specifies the zero of the Proportional Path compensation, and it is a unitless quantity. Typical values for the Zero range from 0.8 to 0.99. It will have a strong effect on the damping and rise time of the motor's response to a step command. Generally, the motor will have a longer rise time, with less overshoot, the higher the value of the Zero. The table Zero and Pole Values in Corresponding Frequency, normalized to 1 KHz servo rate relates the values of Zero and Pole to frequency in Hertz. Note that large values of Zero correspond to low frequencies. Readers familiar with the S-plane and Z-plane methods of controls analysis will recall that a zero tends to attract the poles of the closed loop system. One may expect, therefore, that a higher value of zero will tend to place the poles of the closed loop system at relatively low frequencies (i.e., slow the response).

Whereas the Proportional Gain dominates the "steady state" response of the Proportional Path, the Zero (and Pole) affect the dynamic response, i.e., they are useful because of the effect they have on the torque command when the position error is rapidly changing. The Pole and Zero act to provide the control system with some measure of "phase lead", or derivative feedback. The effect is equivalent to having a feedback loop based on the error in velocity, as well as position.

Zero and Pole Values in Corresponding Frequency, normalized to 1 KHz servo rate
Pole or Zero,
Z Plane
Pole or Zero,
S Plane
Frequency, Hz
Pole or Zero,
Z Plane
Pole or Zero,
S Plane
Frequency, Hz

0

-x

x

0.91

-94

15.01

0.1

-2303

366.46

0.92

-83

13.27

0.2

-1609

256.15

0.93

-73

11.55

0.3

-1204

191.18

0.94

-62

9.85

0.4

-916

145.83

0.95

-51

8.16

0.5

-693

110.31

0.96

-41

6.50

0.6

-511

81.30

0.97

-30

4.85

0.7

-357

56.77

0.98

-20

3.22

0.8

-223

35.51

0.99

-10

1.60

0.9

-105

16.77

0.999

-1

0.16

By looking not only at what the value of the position error is, but also at how fast it is changing, the control system is able to get some "early warning" regarding what the position error is likely to be in the future. The similarity to derivative (or velocity) feedback explains the strong affect the Zero has on damping; just as the Proportional Gain may be compared to the stiffness of a spring, so the value of the Zero may be thought of as helping to control the damping of the spring.

In fact, if the Pole is set to the default value of zero, then the values of the Proportional Gain and Zero may be related to the position error gain and velocity error gain of an equivalent "PD" (Proportional and Derivative) feedback system as follows:

 position error gain = PGain
 velocity error gain = PGain * Zero/(1-Zero)

From these equations it becomes clear that the Proportional Gain will affect both stiffness and damping, since it affects both position and velocity feedback gains. Increasing the Zero will increase the damping since it is proportional to the equivalent velocity feedback gains. Higher inertia systems will typically benefit from a higher value of Zero because they require more damping.

  1. The Proportional Pole specifies the pole of the Proportional Path compensation. Like the Zero, it is a unitless quantity. Typical values for the Pole range from 0 to 0.8, and it should always be kept less than the Zero. It is the least important of the three Proportional Path parameters, and should be adjusted last. The Pole can often be left at the default value of zero, although systems with high-frequency resonances may benefit from having it increased. The Pole may be thought of as controlling a low pass filter placed before the "PD" feedback of the Gain and Zero. It is preferable to use the Proportional Pole than the DAC Output Filter, since it is more easily adjustable.

Integrator Path

The Integrator Path figure provides an expanded view of the Integrator Path shown in the Adept SmartMotion Control System Block Diagram. The Integrator is used to zero out steady state errors in motor position. It is controlled by the following three parameters that can be specified on the Motor Servo Tuning menu:

Integral Gain

Maximum Integrator Step

Maximum Integrator Value

Like the Proportional Path, the integrator accepts a position error input and produces a torque output. The "z-1" in the diagram means a delay of one servo cycle, so the effect of the summing junction is to add the newest error to the sum from the previous cycle.


Integrator Path

When the mechanism is servoing while stopped, the integrator counteracts disturbances by keeping a running sum of the position errors from all previous servo cycles, and outputting a torque proportional to that sum. This is very useful if there is a constant disturbance force, such as gravity, pushing the motor away from the setpoint. With an integrator, the torque to the motor will continue to increase as the steady state error is accumulated (or integrated), until finally the force applied by the motor is enough to counteract the disturbance force.

While very useful in eliminating steady state error, integrators tend to have a de-stabilizing affect on the overall response. Because of this, the Integrator Path should be disabled (by setting the Integral Gain to zero) until initial values for the Proportional parameters (Gain, Zero, and Pole) are found.

  1. The Integral Gain has the same units as the Proportional Gain, that is, "DAC output units"/encoder count. It causes the control system to output a torque that is proportional to the integral of the position error (the sum of all past position errors). Typical values of the Integral Gain are much smaller than those for the Proportional Gain, because it multiplies with an integrated error, and not the error itself. Values between 0.1 and 10 are typical. Too much Integral Gain will increase overshoot, and may destabilize the system (causing oscillations that never damp out). Too little Integral Gain, and it will take an excessively long period of time to "null out" steady state errors.
  2. The Maximum Integrator Value specifies the maximum value the accumulated (integrated) error may achieve, and has units of DAC output counts. It is useful for controlling the destabilizing affect of the Integrator Path by placing a limit on the amount of torque that may be commanded to the motor due to integrated errors. This value specifies the largest possible torque that will be output by the Integrator Path.

Setting the Maximum Integrator Value too low may cause steady state errors to occur. This value should be adjusted so that it is as small as possible while still always allowing the motor to achieve zero (or an acceptably small) steady state error. If the Maximum Integrator Value is set unnecessarily high, then the integrator may begin to dominate the motor response and cause unnecessary overshoot and oscillation.

  1. The Maximum Integrator Step specifies the largest position error for a given servo cycle that will be added to the accumulated or "integral" error. It has units of encoder counts. The Integrator Step is useful for controlling the effect of the integrator during rapid slewing motions, when the position error is largest. For example, consider a step command to the motor. Immediately after the step, the position error is quite large because the motor has not had time to move. In this initial stage of the motion, it is not important to have the integrator attempting to null out every last bit of position error; rather, the Proportional Path should be allowed to dominate the motor's response. Specifying a small value for the Step keeps the unusually large position error from driving up the integral error too quickly, and therefore minimizes the relative effect of the Integrator Path until the motor has time to get close to the setpoint.

The Maximum Integrator Step may be thought of as specifying a range around the setpoint in which the integrator should act unimpeded. Beyond that range, the integrator will build up more slowly. Since it will specify the maximum rate at which the integrated error can build up, if the Step is too small, it will take too long for the control system to null out steady state errors. If it is too large, the integrator will dominate the motor's response even when the position error is large, resulting in unnecessary overshoot and oscillation.

Feedforward Path

The Feedforward Path figure provides an expanded view of the Feedforward Path shown in the Adept SmartMotion Control System Block Diagram. The Feedforward Path generates a contribution to the final motor torque command by examining the command stream.  Three parameters are available to adjust the Feedforward path:

Velocity Feedforward Gain

Acceleration Feedforward Gain

Static Friction Feedforward Gain

The commanded velocity and acceleration are multiplied by the Velocity Feedforward Gain and the Acceleration Feedforward Gain and the result is added to the torque command as illustrated in the Feedforward Path figure below. The torque command can also be adjusted proportional to the amount of friction in the system using the Static Friction Feedforward Gain.

While the Proportional and Integrator Paths require a non-zero position error to create a change in motor command, the feedforward path can create a motor command without requiring position error.

 
Feedforward Path

The feedforward gains can improve tracking accuracy but have little effect on stability, so they are usually adjusted last, and in many cases can simply be left at their default values of 0. The Feedforward Gain parameters can be adjusted from the Motor Servo Tuning menu.

NOTE: Neither of these parameters may be tuned using the step response method, because a step position command does not generate a meaningful commanded velocity or acceleration. Appropriate Feedforward values may be determined by commanding smooth motions with the SPEC tuning utility. For details, see the Step-by-Step Tuning Procedure.

  1. The Velocity Feedforward Gain is used to generate a torque command proportional to the commanded velocity. It has units of "DAC output counts"/[encoder counts/ms]. Velocity feedforward is useful in reducing the following error during long slewing motions, especially in systems with friction. Friction Explanation shows the characteristics of a typical mechanism with both Coulomb and viscous friction. A system with high Coulomb friction may take a large command "threshold" to get it moving, but a command only slightly larger than the threshold will make it reach high speed. A system with high viscous friction may start moving with very low command, and will reach a terminal velocity directly proportional to the command. The velocity feedforward in the feedback loop compensates for viscous friction by adding a DAC output command proportional to the speed of the motor. To compensate for Coulomb friction, adjust the Static Friction Feedforward Gain parameter.

Values for the Velocity Feedforward Gain cannot be determined by looking at the motor's step response, since the commanded velocity is always zero. Setting this value too high will make the motor lead the setpoint, and cause significant overshoot at the end of the motion. In low-friction mechanisms, excellent performance can be obtained without using the Velocity Feedforward Gain at all.

To tune the velocity feedforward gain, use a point to point test and plot the commanded velocity along with the tracking error. Disable the integrator gain. If the error has roughly the same sign than the velocity then increase the velocity feedforward gain, if the error has the opposite sign than the velocity, then decrease the gain."

Friction Explanation
  1. The Acceleration Feedforward Gain is similar in operation to its velocity counterpart. It has units of DAC output counts [encoder counts/ms2] and is used to generate a torque proportional to the commanded acceleration. This can be useful to compensate for the mass of a mechanism in low-friction systems, since the torque command in such systems should be proportional to acceleration by the familiar F=ma equation.

Values for the Acceleration Feedforward Gain cannot be determined by looking at the motor's step response, since the commanded acceleration is always zero. Setting this value too high will make the motor lead the setpoint during acceleration.

To tune the acceleration feedforward gain use a point to point test and plot the commanded acceleration along with the tracking error. If the error has roughly the same sign than the acceleration then increase the acceleration feedforward gain, if the error has the opposite sign than the acceleration, then decrease the gain.

  1. The Static Friction Feedforward Gain

The Static Friction Feedforward Gain can minimize tracking errors by providing a corrective torque proportional to the amount of Coulomb friction in the system (see Friction Explanation diagram above). This allows a motion to start more quickly. This parameter can be useful to compensate for the mass of a mechanism in low-friction systems. It can also be useful for motors that have a high inductance.

Setting this value too high will make the motor lead the setpoint which results in jerk at the beginning and end of a motion.

Modifying the Static Friction Feedforward Gain parameters when moving in square-wave drive mode will have no effect since the commanded velocity is 0.