Tuning of control loops: Position/Velocity Loops
This manual explains how to tune the Position/Velocity loop using the Auto Tuning and how to the verify the tuning result.
This manual is written and verified up to the following versions:
MotionLab
| Firmware
|
---|
2.12.2
| 2.4.7
|
Auto-tuning is available since Firmware version 2.4.6. If the option is not enabled for your drive, try to update the drive Firmware.
This guide assumes that the motor parameters are configured correctly. And that you verified the wiring in open loop.
Position Loop tuning using Auto Tuning
- Make sure the wiring and setup in MotionLab are correct.
Go to Motion, then Position Control and click on the Tune button (see red rectangle).
In Optimization Page:
- Please note that Torque tuning must be performed prior to running this tuning (see Tuning of control loops: current/torque loop)
Press Start Identification (green rectangle).
If the identification didn't succeed or need more information regarding the motor, press the Advanced Settings (yellow rectangle).
Here, there are three advanced settings:
Injection signal based on Frequencies (Red rectangle):
- Full frequency range (using the maximum number of frequencies mainly for Rotary motors);
- High frequency range (using a small set of frequencies mainly used for Linear motors).
- Increase or decrease (depending on the error message) the Signal Amplitude by using the horizontal slider (green rectangle).
Identification method (yellow rectangle):
- Open loop is clicked automatically as it is the preferred method for Identification for Rotary motors as well as Linear brushless/Voice coil motors with a large stroke.
- Closed loop Identification is mainly for Linear voice coil motors with smaller stroke but can be used for all Linear motors (vary the proportional gain to get a better fit).
To know that the identification worked, you want to obtain the following parameters (green rectangle) in the Advanced Settings:
- Press Next in the bottom right corner.
In this next window, MotionLab will calculate the PID-controller for the Position Loop. You can use basic settings or advanced settings.
Option 1: Basic Tuning
Select the bandwidth based on the system response of the closed-loop system (slider in red rectangle). The higher the bandwidth of the system, the more aggressive the controller is. Thus the application will provide overshoot or oscillations which might cause instability.
The lower the bandwidth of the system, the slower it responds to a change in the demanded position and also avoiding the overshoot or oscillations.
Press Start Verification (green rectangle on top) to apply and test the controller parameters. The motor will move during the verification based on the selected bandwidth.
- If the verification fails, the system is unstable for the desired bandwidth. Try to make the system slower by moving the horizontal slider to the left.
Once verified, the tuning of the position loop is completed.
Option 2: Advanced Tuning
- Press the Advanced Settings button (yellow rectangle). The following screen will appear.
In the red rectangle, you can select your desired system performance.
By changing the parameters, MotionLab automatically calculates new PID values. Make sure the damping ratio and bandwidth are set properly to reduce the overshoot/oscillations in the system response.
- In the green rectangle, the actual performance is shown.
- In the yellow rectangle, the position demand of injection signal (measured in counts) used for the verification of the auto-tuning can be selected. For rotary motors, the verification is done based on the resolution and for the Linear motors, it is based on the pair poles or the stroke length.
- On the right, the bode diagrams (top: Magnitude, bottom: Phase). For the advanced user, they can be used to better understand the tuning of the motor.
- Once satisfied with the tuning, press Start Verification. A measurement will be done and the response of the system will be plotted in the bode diagrams.
To apply the designed controller, press Finish in the right bottom of the screen. The motor will move during the verification based on the selection of the desired system performance (Bandwidth and Damping ratio).
Velocity Loop tuning using Auto Tuning
- Make sure the wiring and setup in MotionLab are correct.
Go to Motion, then Velocity Control and click on the Tune button (see red rectangle).
In Optimization Page:
- Please note that Torque tuning must be performed prior to running this tuning (see Tuning of control loops: current/torque loop)
Press Start Identification (green rectangle). The motor will move only a small amount based on the frequency injected which will be shown later.
If the identification didn't succeed or need more information regarding the motor, press the Advanced Settings (yellow rectangle).
Here, there are three advanced settings:
Injection signal based on Frequencies (Red rectangle):
- Full frequency range (using the maximum number of frequencies);
- High frequency range (using a small set of frequencies).
- Increase or decrease (depending on the error message) the Signal Amplitude by using the horizontal slider (green rectangle).
Identification method (Yellow rectangle):
- Open loop is basically preferred as the Velocity tuning is done only for Rotary motors
- Closed Loop is preferred if the open loop identification is not succeeded (vary the proportional gain to get a better fit)
To know that the identification worked, you want to obtain the following parameters (green rectangle) in the Advanced Settings:
- Press Next in the bottom right corner.
In this next window, MotionLab will calculate the PI-controller for the Velocity Loop. You can use basic settings or advanced settings.
Option 1: Basic Tuning
Select the bandwidth based on the system response of the closed-loop system (slider in red rectangle). The higher the bandwidth of the system, the more aggressive the controller is. Thus the application will provide overshoot or oscillations which might cause instability. The lower the bandwidth of the system, the slower it responds to a change in the demanded velocity and also avoiding the overshoot or oscillations.
Press Start Verification (green rectangle on top) to apply and test the controller parameters. The motor will move during the verification based on the selected bandwidth.
- If the verification fails, the system is unstable for the desired bandwidth. Try to make the system slower by moving the horizontal slider to the left.
Once verified, the tuning of the position loop is completed.
Option 2: Advanced Tuning
- Press the Advanced Settings button (yellow rectangle). The following screen will appear.
In the red rectangle, you can select your desired system performance. By changing the parameters, MotionLab automatically calculates new PI values. Make sure the damping ratio and bandwidth are set properly to reduce the overshoot/oscillations in the system response.
- In the green rectangle, the actual performance is shown.
- In the yellow rectangle, the velocity demand of injection signal (measured in counts/seconds) used for the verification of the auto-tuning can be selected. For rotary motors, the verification is done based on the maximum speed of the motor.
- On the right, the bode diagrams (top: Magnitude, bottom: Phase). For the advanced user, they can be used to better understand the tuning of the motor.
- Once satisfied with the tuning, press Start Verification. A measurement will be done and the response of the system will be plotted in the bode diagrams.
To apply the designed controller, press Finish in the right bottom of the screen. The motor will move during the verification based on the selection of the desired system performance (Bandwidth and Damping ratio).
Verification of Position/Velocity control loop
Once the motor is tuned, the behavior of the motor can be verified using the Tune window.
Related Articles
Which are the equations of the position/velocity/torque loops?
Problem I am trying to get a dynamic model of the different motion loops of the Ingenia servo drives but I can't manage to figure out the exact equations of each loop. What are the exact equations and control schemes of each loop and what are the ...
Basic tuning guide
Problem I have a brushless motor all properly configured, with its feedback devices well calibrated and with the commutation validated as well. The only remaining thing is to tune the 3 motion loops (torque, velocity and position) but I have no idea ...
How to convert from different motion units for position, velocity and torque
Problem I see that the torque/velocity/position parameters that the firmware of the drive uses can have different units and I don't understand the relationship between the different types nor how to convert from on to another. Where can I find these ...
How to manually execute a profile velocity movement by using the registers
In this How-to guide, we will explain how to execute a movement (profile velocity) by directly changing the register values, instead of using MotionLab or the dedicated macros for motion. We will consider a movement towards a specific velocity in ...
Can I read the position from 2 different encoders?
In standard drives from the Ecore line (Pluto, Triton, Neptune, Jupiter, Nix and Titan) there is not the possibility to read the position of 2 different encoders at the same time. Therefore, if you have 2 encoders in your system (one on the motor ...