Instructions for Adept Utility Programs
SPEC, Edit Motor Tuning Parameters
File Name Program Name File Type Description SPEC.V2
a.spec
B
Robot specification utility
This section describes the "Edit motor tuning parameters" menu selections. Please refer to the Adept SmartMotion Developer's Guide for more information on the "Edit motor tuning parameters" menu.
The servo tuning parameters affect the performance and stability of the servo loop for each motor. Adept SmartMotion offers the capability to interactively tune these parameters to show graphically how they influence robot motion. From the servo tuning menu, you can change servo gains, select a test to perform or data to display, or initiate a test. For additional information on the servo parameters and the tuning process, see Related Topics. For additional details on servo tuning parameters, see Introduction to Servo Tuning Parameters.
When you select a menu option, the following information is provided on screen:
Instructions for the specified option
Current value
Value range for the parameter if applicable
Menu Options
Change motor num
Use this option to select a different motor for tuning. The currently selected motor is indicated in the menu page title.
Proportional gain
Causes the control system to output a torque that is proportional to the position error (commanded position minus the actual position. For details on the effects of this parameter, see Effects of Servo Parameters.
Zero
Affects the dynamic response of the servo system. By monitoring how fast the position error is changing, the control system is able to anticipate the position error in the future. For details on the effects of this parameter, see Effects of Servo Parameters.
Pole
The Pole, like the Zero, affects the dynamic response of the servo system. By monitoring how fast the position error is changing, the control system is able to anticipate the position error in the future. For details on the effects of this parameter, see Effects of Servo Parameters.
Integral gain
Used to eliminate steady-state errors and improve tracking. The contribution of integral gain to the output torque is proportional to the integral of the position error (the sum of all past position errors). For details on the effects of this parameter, see Effects of Servo Parameters.
Max integrator value
Specifies the maximum value the accumulated (or integrated) error may achieve. It is useful for controlling the de-stabilizing effect of the Integrator Path by placing a limit on the amount of torque that may be contributed by the integrator. For details on the effects of this parameter, see Effects of Servo Parameters.
Max integrator step
Specifies the largest position error for a given servo cycle (ranging from 0.125 to 2 ms) that will be added to the accumulated or integral error. The integrator step is useful for controlling the effect of the integrator during rapid change of 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.
For details on the effects of this parameter, see Effects of Servo Parameters.
Velocity feedforward
Used to generate a torque proportional to the commanded velocity. This parameter is useful to reduce tracking error during long slewing motions on systems with a measurable amount of viscous friction. Typically, systems with high viscous friction may start moving with a low torque command. However, as the speed of the motor increases, so does the friction. Therefore, to maintain a constant speed, additional DAC output must be generated proportional to the speed of the motor.
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 as the velocity then increase the velocity feedforward gain, if the error has the opposite sign of the velocity, then decrease the gain.
For details on the effects of this parameter, see Effects of Servo Parameters.
Accel feedforward
Used to generate a torque proportional to the commanded acceleration/deceleration. The simplest model of relating motion command to the actual torque required to complete motion is the following:
Torque = inertia * acceleration
The Acceleration Feedforward Gain emulates the inertia term in the above equation. By specifying the correct Acceleration Feedforward Gain value, each designated move completes in accordance with the relationship described in the above equation.
For details on the effects of this parameter, see Effects of Servo Parameters.
Static Friction Feedforward Compensation
SPEC includes parameters for setting up a motion-control feature called "Static Friction Feedforward Compensation". This feature is designed to minimize tracking errors by providing a corrective torque proportional to the amount of friction in the system. This allows a motion to start more quickly, particularly in the case of a sticky drive train.
Setting this value too high will make the motor lead the setpoint which causes the mechanism to jerk at the beginning and end of a motion.
Modifying these parameters when moving in square-wave drive mode will have no effect since the commanded velocity is 0.
The static friction feedforward setting has five parameters that can be adjusted: Max and Min trigger, Max positive value, Max negative value, and time constant. Information on these parameters and their effects is provided on the screen when you select the parameter.
NOTE: Modifying these parameters when moving in square-wave drive mode has no effect since the commanded velocity is 0.
![]()
Static Friction Feedforward Menu
You can make adjustments to the settings for the static friction feedforward items shown in Static Friction Feedforward Menu Items
The SPEC program contains options that allow you to configure both the acceleration and deceleration percentages for motor tuning tests, and to specify a custom point-to-point motion routine. To access these options select the following item from the Motor Servo Tuning Parameters menu:
Select test..Taught Pt
Filter Configuration
This parameter allows you to configure the 2nd-order filter for the servo to reduce high-frequency oscillation in a motor. There are two types of filters available: Notch Filter and Butterworth Double-Pole Roll-Off filter.
- Specify the Notch filter to reduce oscillation for frequencies less than 250 Hz.
- Specify the Butterworth Double-Pole Roll-Off filter to reduce oscillation for frequencies higher than 250 Hz
These filters do not eliminate oscillation, but they can reduce its effects.
Filter Status
On the Motor Servo Tuning Parameters menu, the Filter Configuration will display the current status: PROTECTED, ON, or OFF
Filter Status
Description
PROTECTED
By default, the filter value is set to PROTECTED, which means that the filter configuration option is disabled. Before you can use the filter, you must first enable the filter by setting the Filter Configuration parameter to OFF (1).
When the Filter Configuration status is PROTECTED, the system ignores any value entered except for OFF (0). If you enter a different value, when you return to the Servo Tuning menu, the Filter Configuration value will still indicate that Filter Configuration is PROTECTED.
ON
Indicates that the filter configuration option is enabled and in use. When the status is ON, the type of filter in use and the parameter values for that filter display on the screen.
OFF
Indicates that the filter configuration option has been enabled, but neither filter is currently in use. When the status is OFF, you can specify the filter and filter values by selecting Filter Configuration from the Servo Tuning menu and entering the value for the desired filter.
Select Filter Configuration from the menu. The following description of this selection is displayed, followed by a prompt for permission to change the value.
![]()
Filter Configuration Description
To change the configuration of the filter, type Y at the prompt and then press ENTER. To keep the existing value, type N and press ENTER at the prompt.
If you choose to change the configuration of the filter, the following options are displayed:
0 = Protected 1 = OFF 2 = Notch Filter 3 = Butterworth Double-Pole Roll-Off (DPR)
At the prompt, type the number corresponding to the desired configuration option and press ENTER.
If Notch Filter is selected, the following description is displayed along with a prompt for the Notch Filter Pole Frequency (Hz).
Notch Filter Pole Frequency
At the NEW VALUE prompt, type the value (in Hz) for the Notch Filter Pole Frequency and press ENTER. To keep the existing value, press ENTER. If a new value is entered, a description of the notch filter damping ratio is displayed, along with a prompt for changing the value.
![]()
Notch Filter Damping Ratio Description
At the NEW VALUE prompt, type the value for the Notch Filter Damping Ratio and press ENTER. To keep the existing value, press ENTER.
Butterworth Double-Pole Roll-Off
If Butterworth Double-Pole Roll-Off (DPR) is selected, the following description is displayed along with a prompt for the Butterworth Filter Pole Frequency (Hz).
![]()
Butterworth Filter Pole Frequency Description
At the NEW VALUE prompt, type the value (in Hz) for the Butterworth Filter Pole Frequency and press ENTER. To keep the existing value, press ENTER.
DAC output filter
This is a low-pass digital smoothing filter that affects the final torque command. Progressively higher integer values will double the degree of DAC output filtering, removing a large portion of the high-frequency components from the torque command. The result is that the DAC output values change more slowly and smoothly.
S-A (split-axis): Skew error gain (0 to 2.147484E+09)
(Only available if split-axis configuration is selected.) This parameter defines the scale factor applied to the skew error (difference of the position error between the coupled axes) to generate the adjusted torque. This parameter is unitless.
S-A (split-axis): Skew velocity error gain (0 to 2.147484E+09)
(Only available if split-axis configuration is selected.) This parameter defines the scale factor applied to the skew velocity error (difference of the velocity error between the coupled axes) to generate the adjusted torque.
0 indicates no adjustment between the coupled axes. This parameter is unitless.
Select Test
The tuning process breaks the overall tuning task into two major subsections. First, manual feedback gain tuning determines good values for the Proportional and Integral paths. These parameters are critical for minimizing motion settling time and overshoot. Second, automatic (or manual) feedforward gain tuning improves trajectory tracking by estimating the motor command required to follow a trajectory and "feeding forward" or adding that command to the motor. The tests available from the Select Test menu option provide data that help complete both sections of the tuning task.
![]()
WARNING: All tests require the motor to operate under closed-loop control. If the control loop is unstable, the robot can "run away" when it is commanded to begin moving. Make sure the motor and encoder signs have been properly tested before initiating these tests, stay clear of the robot, and keep your hand near an Emergency Stop button to stop the system if it does appear to behave improperly.
If you choose the Select test menu item, the Tuning Test Configuration menu is displayed with the following options:
Tuning Test Selections
Test Selection
Description
Square wave
Used for manually tuning feedback (never feedforward) parameters. You can display any servo data during step response, as shown in Tuning Plot for Square-Wave Response Test in Motor Servo Tuning Parameters Menu. You need to specify the amplitude and period of the square wave, and the data that will be collected and displayed. A step size of about 1/2 turn of the motor shaft is typically used.
Move between taught points
Moves the robot between two taught points for manually tuning feedback and feedforward parameters. The robot must be calibrated to perform this test, so it is only performed during the later stages of tuning. You need to teach the endpoints of the motion, speed and acceleration parameters, and the data that will be collected and displayed. This test routine can be customized, for example to move along a series of points, instead of just between two points. For details, see Customizing Move Between Taught Points Test.
This selection provides test options that allow you to specify the number of frequency bands to test, the start amplitude, and the stop amplitude.
Uses "swept-sine" excitation to collect and display open-loop or closed-loop frequency response information about the mechanism. With closed-loop excitation, it commands a sinusoidal position setpoint; with open-loop excitation a sinusoidal DAC output setpoint. You need to specify the frequency range of interest, the number of test points, and the amplitude of the command. See Frequency Response Tests.
Select Data to Test and Display
If you select taught-point or square wave tests, you need to specify data that will be collected when the test is performed. The data selection menu is shown in Servo Tuning Data Collection Menu. The most useful measure of performance is "PosErr", the motor position error. You want to minimize this to get best servo performance. You will also commonly select "Torque" from this menu to see when the control loop is "saturating," or giving the maximum output torque command. Up to five data items may be selected for display.
1 These menu items appear only on A-Series controllers.
Options for the Frequency Response Tests
NOTE: The options shown on this menu change depending on what test type is selected.
![]()
Motor Tuning Test Configuration Menu
To access the frequency response tests, select one of the following menu options:
"Plant+controller frequency response... "
"Plant-only frequency response... "
You can now make adjustments to the settings for the frequency response items shown in Frequency Response Test Menu Items
Test and Plot
Returning to the Servo Tuning Menu and selecting Test and plot, the robot will move to perform the test selected. There will be a few-second pause while the system collects data, then you will see a display plot of the parameters you requested. Tuning Plot for Square-Wave Response Test and Plant+Controller Frequency Response Test show typical displays of plots for square-wave and frequency response tests.
Test and Display
This is similar to the above option, except that instead of capturing data during the test and plotting it afterwards, it provides a continuously-updated live display of the selected parameters.
Export Results
After using the Test and Plot option, you can export the results using one of the available options:
Output Data to Text File
Use to export the raw data captured during the previous test to an ASCII file. The data can then be imported into a spreadsheet program, for plotting or analysis.
Output Data to Screen
Use to export the data to the screen for review. (Use scroll lock or CTRL-S and CTRL-Q to start and stop the output.)
Save Plot to TIFF Graphics File
Use to export the currently displayed plot (similar to Tuning Plot for Square-Wave Response Test or Plant+Controller Frequency Response Test) to a TIFF format disk file. This option is only available if you have the Adept Graphics module (VGB). The TIFF format is used by many PC and Macintosh graphics programs.
Current Loop Control Parameters
This item applies only to SmartAmp systems.
Select "Current Loop Control Parameters" from the menu. The following description of this selection is displayed, followed by a list of control parameters.
![]()
Current Loop Control Parameters Description and Menu
To change the value of a control parameter, at the prompt type the number corresponding to that parameter and then press ENTER. To exit, type 0 and press ENTER. See Current Loop Control Parameters for a description and value range for each control parameter.
Adaptive Feedforward
Select "Adaptive Feedforward" from the menu. The following description of this selection is displayed, followed by a prompt to enable/disable this feature.
NOTE: The Adaptive Feedforward option is available only for SmartModules.
![]()
Adaptive Feedforward Description
To enable or disable adaptive feedforward control, at the prompt, type Y and then press ENTER. To exit without changing the existing state, type N and then press ENTER.
Related Utilities
Submit comments to: techpubs@adept.com
Last modified on: 4/1/2010
Copyright © 2006 - 2009. Adept Technology, Inc.
