Automatically Tuning Motors
When you automatically tune your servo system, use the Control Type and Response Time parameters on the Main tab to customize your system. Smooth controls have a slower response time. The smoother the control, the less the axis will overshoot the specified position before slowing. The more overshoot the system can manage, the faster the response times.
The motor connected to the axis oscillates to identify parameters, such as inertia and friction. Optimal control loop gains are calculated based on these values and the control type that you selected.
Tip By default, MAX saves control loop gain settings to the MAX database, and the settings are used for all subsequent initializations of your controller. If you do not want to save the control loop gain settings to the MAX database, deselect the Save control loop gains to Initialization Settings after auto tune option in the Main tab. |
Click the Step Response tab to view the type of response Servo Tune achieved for the system. If the response time is unsatisfactory, change the control type and tune the motor again. Use the Control Loop tab to view the calculated control loop gains.
In most cases, auto tuning is 99% of the system tuning process. Manual tuning makes up about 1% of this process, and is used to tweak the PID gains to achieve an optimal response.
Caution If your system becomes unstable and unmanageable, including demonstrating rapidly fluctuating oscillations, immediately disable your drive and turn off the power. Disable the power switches on the drive before proceeding. |
Complete the following tutorial for an example of how to automatically tune your servo motor:
- Launch MAX.
- Expand Devices and Interfaces in the configuration tree.
- Expand NI–Motion Devices, and then expand the item for the appropriate motion device.
- Expand Calibration in the configuration tree, and select Servo Tune.
- Select the Main tab.
- Select Axis 1 in Axis.
- Adjust the Control Type to 70% to indicate smooth control and slow response time.
- Click Auto Tune. The motor oscillates as it determines the correct PID values for the system.
- Click the Step Response tab and enter 500 in Samples.
A low overshoot and few, or no, oscillations occur. The Step Response plot shows that the system is slow to respond to commands, which is demonstrated by the slow migration to the commanded position. - Select the Main tab.
- Select Axis 1 in Axis.
- Adjust the Response Time to 70% to indicate a fast response and stiff control.
- Click Auto Tune. The motor oscillates as it determines the correct PID values for the system.
- Click the Step Response tab. Compare this plot to the previous smooth control plot. The difference is that the system responds faster, but produces more oscillations and a greater overshoot.
- Experiment with feeling the different responses by using your hand to move the motor to the off position, and feel the response when it snaps back.