11. Control Loops – Position Loop and Auto Tune
Streszczenie: Pętla położenia: ustawienia i ręczne strojenie, test profilu S-curve, uwagi o trybie pozycyjnym – schemat, limity trajektorii, wejścia z generatora trajektorii, wzmocnienia Pp/Vff/Aff, sprzężenie, wyjście i zawijanie pozycji – oraz automatyczne strojenie wszystkich pętli dla silników liniowych.
EN: Control loops, part 3: position loop setup and tuning, S-curve test, position loop notes and auto tune for linear motors.
Dotyczy: program CME 2 do konfiguracji i strojenia serwonapędów oraz napędów krokowych Copley Controls (m.in. Xenus, Accelnet, Stepnet, Accelus, Junus)
Źródło: dokumentacja producenta (Copley Controls CME 2 User Guide); tabele przepisane z obrazów na tekst – opracowanie Multiprojekt
Rozdział 11 „Control Loops” podzielono na 3 strony: Current Loop · Velocity Loop · Position Loop and Auto Tune.
11.6 Position Loop Setup and Tuning
Initial position loop proportional gain (Pp), velocity feed forward (Vff), and acceleration feed forward (Aff) values can be calculated with The Calculate Function Enter basic Position Loop settings
1.
Click P Loop to open the Position Loop Values screen:
2. Change/verify Position Loop Values as needed. Click Close when done.
Position Loop – parameters
| Parameter | Description |
|---|---|
| Gain | |
| Aff | Acceleration feed forward. Range: 0 to 32,767. See Trajectory Limits. |
| Vff | Velocity feed forward. Range: 0 to 32,767. 100% Vff: 16,384. See Trajectory Limits. |
| Pp | Position loop proportional gain. Range: 0 to 32,767. See Trajectory Limits. |
| Gains Multiplier | Position loop output is multiplied by this value before going to the velocity loop. In dual encoder systems, the multiplier’s initial value is calculated based on the ratio of motor encoder turns to position encoder turns. See Feedback Parameters. |
| Following Error | |
| Fault | The level (in encoder counts) at which the following error produces a fault, which stops the servo loop. We recommend raising the fault level before tuning the loop. See Following Error Fault Details. |
| Warning | The level (in counts) at which the following error produces a warning (without stopping the loop). See Following Error Fault Details. |
| Disable Fault | Stops following error from faulting. See Following Error Fault Details. |
| Tracking | |
| Tracking Window | Width of tracking window in counts. See Tracking Window Details. |
| Tracking Time | Position must remain in the tracking window for this amount of time to be considered tracking. See Tracking Window Details. |
3. Optionally click Position Wrap to open the Position Wrap screen:
4. Change/verify the position wrap parameters as needed. Set both values to zero to disable position wrapping. Note that the changes do not take effect until OK is pressed. For more information about this feature, see Position Wrap
Position wrap parameters
| Parameter | Description |
|---|---|
| Motor Position Wrap | Position at which the actual motor position count returns to zero. In a single feedback system, it also applies to the actual load position. |
| Load Position Wrap | Position at which the actual load position count returns to zero in dual feedback systems. If the position encoder is set to passive mode, this value applies to the passive encoder position. |
5. Click on the Trajectory Values tab:
6. Change/verify the trajectory values as needed:
Trajectory Limits – parameters
| Parameter | Description |
|---|---|
| Max Velocity | Maximum trajectory velocity. Max value may depend upon the back EMF and the Max feedback count. Min: 0. Default: 0.25 x motor velocity limit. |
| Max Accel | Maximum trajectory acceleration. Max value may depend upon the load inertia and peak current. Min: 0. Default: 0.5 x velocity loop Accel. Limit value. |
| Max Decel | Maximum trajectory deceleration. Max value may depend upon the load inertia and peak current. Min: 0 (disables limit). Default: 0.5 x velocity loop Accel. Limit value. |
| Abort Decel | Deceleration rate used by the trajectory generator when motion is aborted. Min: 0. Default: 0.5 x velocity loop Accel. Limit value. |
| Jerk | Rate of change of acceleration. The value of jerk set during the calculate procedure produces an S-Curve whose maximum slope is equal to the trajectory profile slope. This value will produce a maximum acceleration that is not more than the initial default value of acceleration. Small values will produce less jerking but will take longer to complete move. Large values will produce more jerking and a more trapezoidal profile but will complete the move faster. |
| Note that setting limits to zero disables the trajectory generator so that the command input is not limited by the generator. Velocity is only limited by the Velocity Limit set in the Velocity Loop. | |
Manually tune the position loop
METHOD: Minimize following error and oscillation by running profiles and adjusting position proportional gain (Pp), velocity feed forward (Vff), acceleration feed forward (Aff) and other settings. For instance:
NOTE: During tuning, observe warnings that appear to the left of the trace
3.
On the Settings tab, make sure Auto Setup is selected. Auto Setup automatically sets the following parameters:
Scope settings for position loop tuning
| Parameter | Description |
|---|---|
| Profile Tab | |
| Move | Relative |
| Type | Trap |
| Distance | 2000 counts |
| Reverse and repeat | Not selected |
| Settings Tab | |
| Channel 1 | Profile velocity (green) |
| Channel 2 | Following error (white) |
4.
If the Auto Setup default profile distance is not appropriate, enter an appropriate short distance.
5.
Click Start. The Profile Generator executes a short move.
NOTES:
1) The profile may not reach constant velocity during a short move.
2) If a following error occurs, open the Control Panel and click Clear Faults.
Set up a trapezoidal profile by setting the trajectory limits and distance. See table:
Scope settings for position loop tuning – trajectory limits and profile
| Parameter | Description |
|---|---|
| Trajectory Limits Tab | |
| Maximum Velocity | Set values typical of those expected to be used in the application. |
| Maximum Acceleration | Set values typical of those expected to be used in the application. |
| Maximum Deceleration | Set values typical of those expected to be used in the application. |
| Profile Tab | |
| Distance | Set the move distance to produce a complete trajectory profile. Be sure that this distance does not exceed mechanical limits of the system. |
| Move | Relative |
| Type | Trap |
Adjust position proportional gain (Pp) to minimize following error:
On the Gains tab, set velocity feed forward (Vff) and acceleration feed forward (Aff) to zero.
On the Profile tab, click Start. On the Gains tab, adjust position loop proportional gain (Pp) until best result is obtained.
Click Start after each adjustment to test on a new profile move.
NOTES:
1) Too much position loop proportional gain (Pp) might cause oscillation.
2) If a following error occurs, open the Control Panel and click Clear Faults.
8. Adjust velocity feed forward (Vff):
Velocity feed forward (Vff) reduces following error in the constant velocity portion of the profile. Often, a velocity feed forward (Vff) value of 16384 (100%) provides best results.
Click in the Vff field and adjust the value.
Click Start after each adjustment to test on a new profile move.
9. Adjust acceleration feed forward (Aff):
Acceleration feed forward (Aff) reduces following error during profile acceleration and deceleration.
Click in the Aff field and adjust the value.
Click Start after each adjustment to test on a new profile move.
NOTES:
1) If, after tuning the position loop, the motor makes a low frequency audible noise while enabled but not moving, the velocity loop gains (Vp and Vi) may be lowered to reduce the noise. If the gain values are set too low, the response to instantaneous rates of change might be reduced (i.e., slow correction to disturbances or transients).
2) If the amplifier is set up to run in position mode under analog input command, and the analog command signal produces too much noise at the motor after tuning, the Analog Command Filter or the Velocity Loop Command Filter may be used to reduce the noise further.
See Low-Pass and Bi-Quad Filters
10. Tune to multiple sets of profiles representing typical moves that might be executed in the application. Starting with Step 6, repeat the process as needed.
Test S-Curve Profile
DISCUSSION: If the amplifier will perform S-Curve profile moves, use this procedure to tune the level of jerk. (Jerk is the rate of change of acceleration. S-Curve moves reduce jerk to provide a smooth profile.) Run an S-Curve profile and adjust velocity, acceleration, deceleration, and jerk levels until the desired profile is obtained. For instance:
On the Profile tab, click the S-Curve button.
2. Set up an S Curve profile by adjusting the following parameters to represent a typical move under normal operation.
Scope settings for S-curve tuning
| Parameter | Description |
|---|---|
| Trajectory Limits Tab | |
| Maximum Velocity | Maximum speed of the profile. |
| Maximum Acceleration/Deceleration | Maximum acceleration/deceleration of the profile. The deceleration is set to be the same as acceleration. |
| Maximum Jerk | The value of jerk set during the calculate procedure produces an S-Curve whose maximum slope is equal to the trajectory profile slope. This value will produce a maximum acceleration that is not more than the initial default value of acceleration. Small values will produce less jerking but will take longer to complete move. Large values will produce more jerking and a more trapezoidal profile but will complete the move faster. |
| Profile Tab | |
| Distance | Increase the move distance to produce a complete trajectory profile. Use an acceptable value the does not exceed mechanical limits of the system. |
| Move | Relative |
| Type | S-Curve |
3. Click Start.
4. Try multiple sets of profiles representing typical moves that might be executed in the application. Starting with Set up an S Curve profile, repeat the process as needed.
11.7 Notes on the Position Mode and Position Loop
11.7.1 Position Loop Diagram
The amplifier receives position commands from the digital or analog command inputs, over the CAN interface or serial bus, or from the CVM Control Program. When using digital or analog inputs, the amplifier's internal trajectory generator calculates a trapezoidal motion profile based on trajectory limit parameters. When using the CAN bus, serial bus, or CVM Control Program, a trapezoidal or S-curve profile can be programmed. The trajectory generator updates the calculated profile in real time as position commands are received.
The output of the generator is an instantaneous position command (limited position). In addition, values for the instantaneous profile velocity and acceleration are generated. These signals, along with the actual position feedback, are processed by the position loop to generate a velocity command.
To bypass the trajectory generator while in digital or analog position modes, set the maximum acceleration to zero. The only limits in effect will now be the velocity loop velocity limit and the current limits. (Note that leaving the maximum acceleration set to zero will prevent other position modes from operating correctly.)
The following diagram summarizes the position loop.
11.7.2 Trajectory Limits
In position mode, the trajectory generator applies these limits to generate the profile.
Trajectory limiters
| Limiter | Description |
|---|---|
| Maximum Velocity | Limits the maximum speed of the profile. |
| Maximum Acceleration | Limits the maximum acceleration rate of the profile. |
| Maximum Deceleration | Limits the maximum deceleration rate of the profile. |
| Abort Deceleration | Specifies the deceleration rate used by the trajectory generator when motion is aborted. |
11.7.3 Position Loop Inputs From the Trajectory Generator
The position loop receives the following inputs from the trajectory generator
Position loop inputs from the trajectory generator
| Input | Description |
|---|---|
| Profile Velocity | The instantaneous velocity value of the profile. Used to calculate the velocity feed forward value. |
| Profile Acceleration | The instantaneous acceleration/deceleration value of the profile. Used to calculate the acceleration feed forward value. |
| Limited Position | The instantaneous commanded position of the profile. Used with the actual position feedback to generate a position error. |
11.7.4 Position Loop Gains
The following gains are used by the position loop to calculate the velocity command:
Position loop gains
| Gain | Description |
|---|---|
| Pp - Position loop proportional | The loop calculates the position error as the difference between the actual and limited position values. This error in turn is multiplied by the proportional gain value. The primary effect of this gain is to reduce the following error. |
| Vff - Velocity feed forward | The value of the profile velocity is multiplied by this value. The primary effect of this gain is to decrease following error during constant velocity. |
| Aff - Acceleration feed forward | The value of the profile acceleration is multiplied by this value. The primary effect of this gain is to decrease following error during acceleration and deceleration. |
| Gain Multiplier | The output of the position loop is multiplied by this value before being passed to the velocity loop. |
11.7.5 Position Loop Feedback
Some Copley Controls amplifiers feature dual-sensor position loop feedback, configured as follows:
- Single sensor. Position loop feedback comes from the encoder or resolver on the motor.
- Dual sensor. Position loop feedback comes from the encoder attached to the load. (Note that in either case, velocity loop feedback comes from the motor encoder or resolver.) For more information, see Feedback Notes (p 44).
Position Loop Output
The output of the position loop is a velocity command used as the input to the velocity loop.
11.7.6 Position Wrap
The position wrap feature causes the position reported by the amplifier to “wrap” back to zero at a user-defined value instead of continually increasing. Once set, the reported position will be between 0 and n-1 where n is the user entered wrap value. This feature is most useful for rotary loads that continually turn in one direction and only the position within a revolution is of interest to the user.
Relative moves with the wrap value set will move the relative distance called for. Example; if the wrap value is set to 1000 and a relative move of 2500 is commanded, the axis will turn 2 ½ revolutions.
Absolute moves will move the shortest distance to arrive at the programmed position. This could be in the positive or negative direction. Moves programmed to a point greater then the wrap value will cause an error.
To configure the position wrap feature, see Enter basic Position Loop settings
11.8 Auto Tune all Loops for Linear Motors
The Auto Tune all loops feature is available for use with linear motors.
DANGER: Make sure motor is mounted firmly and verify accuracy and completeness of motor data
Failure to heed this warning can cause equipment damage, injury, or death.
Tune All Loops with Auto Tune (Linear Motors)
At any point, use Back to return to the previous screen. Use Skip to tune the velocity loop without tuning the current loop, or to tune the position loop without tuning the velocity loop.
1. Verify the motor is mounted firmly. Also verify the accuracy and completeness of the motor settings. See Motor/Feedback
Current Loop
2. Make sure the amplifier’s Basic Setup and Motor Phasing procedures have been performed, and that the system is capable of a 10 mm move.
3.
Click Auto Tune to open the Current Loop Tune screen.
The status indicator is blue when the amplifier is ready for tuning.
4. Verify the Initial Move Positive setting. In most cases, this option should be set. If positive initial motion is not possible, you can specify negative initial motion by clearing this option. For instance, negative initial motion may be used when a vertical axis is at the bottom of the motion range and the positive direction is down.
5. Click Start to tune the current loop. During tuning, the status indicator is amber. Cp and Ci values change as the text in the status box gives progress updates. When the current loop has been tuned, the status indicator turns green, and the status box contains instructions for the next step.
Velocity Loop
6. Click Next to open the Jog screen.
7. Move the motor to the center of its motion range. To use a jog move:
Set the Enable Jog option.
Optionally adjust the jog speed
Jog the motor in either direction to move it to the center of its motion range
8. When the motor is centered, click Next. If the amplifier must apply current to hold the new position against a force (such as gravity in a vertical application), the following message appears:
If this message appears, click OK. The Velocity Loop Tune screen opens
9. Optionally adjust the Target Bandwidth.
TIP: Increase bandwidth for more stiffness in the holding position. Decrease bandwidth to eliminate buzzing or oscillations caused when the load is removed.
10. Click Start to tune the velocity loop. During tuning, the status indicator is amber. Vp and Vi values change as the text in the status box gives progress updates. When the velocity loop has been tuned, the status indicator turns green, and the status box contains instructions for the next step:
Position Loop
11. Click Next to open the Position Loop Tune screen:
12. Verify the Move Type setting (S-Curve or Trap).
13. For a trapezoidal profile, optionally optimize the tuning along the scale between Best Settling (for quicker settling) and Best Following (for less following error).
14. Click Start to tune the position loop. During tuning, the status indicator is amber. Pp, Vff, and Aff values change as the text in the status box gives progress updates. When the position loop has been tuned, the status indicator turns green, and the status box contains instructions for the next step:
15. Click Finish. See the reminder:
16. Click OK.
17.
On the CME 2 Main screen, click Save to Flash
Słowa kluczowe
pętla położenia, strojenie, Pp, Vff, Aff, uchyb nadążania, S-curve, generator trajektorii, position wrap, Auto Tune, silnik liniowy




















