How to Tune
This article provides basic guidelines to allow inexperienced users to manually tune the motion loops of their motor. The instructions will be basic guidelines and recommendations and there will be no stability or control theory explanations.
Before starting
This tutorial assumes that you have gone through an initial configuration of the basic parameters of the system either through the Configuration Wizard or manually. Do not try to attempt these steps unless this previous configuration is finished.
Ingenia’s Summit series architecture is a cascaded triple control loop (position - velocity - current).
To get a deeper understanding of how the control loops are implemented, please refer to the following documentation:
Current direct/quadrature loop
The best way to tune the current direct/quadrature loops is with the Tune workspaces that MotionLab3 has. In addition to this, it is very important to have either the shaft of the motor locked externally or lock it from the drive so that it will not move during these tunings which could give misleading results. The following are a series of register modifications that need to be done in order to lock the shaft of the motor in a fixed position:
Change the commutation sensor to the internal generator → register 0x151 with a value of 3
Change the reference sensor to the internal generator → register 0x153 with a value of 3
Change the generator mode to → register 0x380 with a value of 0
These register modifications can either be done in the Drive Explorer or in the Control widget. After having done them, you can proceed to open the Tune workspaces to start tuning the loops (example of the current direct loop):
To begin the manual tuning, always start with all gains at 0. You will observe that the response is flat and the motor should not move.
Increase Kp little by little until the current direct value starts to tend to the demanded value
Increase Ki little by little until the current direct value reaches the set-point. It might overshoot or have oscillations around the target set-point at this point.
Modify Kp and Ki until the response of the controller is accurate and fast enough. If you find that you have a certain overshoot and you want to reduce it, you most likely need to reduce Ki or increase Kp or a combination of both.
Once you have tuned either the current direct or quadrature loop first, then you can proceed to copy the same gains to the alternative loop since this will work well in the large majority of motors.
Normal Kp/Ki/Kr value ranges
For most motors, the values of Kp, Ki and Kr usually fall inside the following ranges:
Kp → 0.1 - 50
Ki → 100 - 15000
Kr → 0 - 1
Also, remember that changing the value of Kr from 0 to 1 (or vice-versa) will not ensure that the current Kp and Ki gains give a proper stable performance. When changing from Kr = 0 to Kr = 1, you will usually have to decrease Kp and Ki and when changing from Kr = 1 to Kr = 0, you will usually have to increase Kp and Ki.
Do not take these recommendations as hard truths, there are always exceptions so do not get confused if you get the best performance in your system with some gains that fall outside of these suggested ranges.
Velocity loop
Before starting with the tuning of the velocity loop, make sure that both current direct/quadrature loops have been tuned satisfactorily to your requirements. Otherwise, you might not be able to get the performance that you are looking in velocity mode regardless of the controller that you end up designing for this loop.
The best way to tune the velocity loop is with the Tune workspaces that MotionLab3 has. Before doing this though, make sure to change the commutation and reference sensor back to what they need to be and the set the velocity sensor correctly as well. If unsure of how to do this, repeat the Feedbacks steps of the configuration Wizard and make sure to do the test of the specific feedback before attempting to tune the velocity manually.
Once this is done, again you can open the velocity Tune workspace to start the manual tuning steps again:
To begin the manual tuning, always start with all gains at 0. You will observe that the response is flat and the motor should not move.
Increase Kp little by little until the current direct value starts to tend to the demanded value
Increase Ki little by little until the current direct value reaches the set-point. It might overshoot or have oscillations around the target set-point at this point.
Modify Kp and Ki until the response of the controller is accurate and fast enough. If you find that you have a certain overshoot and you want to reduce it, you most likely need to reduce Ki or increase Kp or a combination of both. Kd might be used in some marginal cases in which excessive oscillations happen in the response and to reduce excessive overshoot as well.
Normal Kp/Ki value ranges
For most motors, the values of Kp, Ki and Kr usually fall inside the following ranges:
Kp → 0.1 - 50
Ki → 0.1 - 1000
Do not take these recommendations as hard truths, there are always exceptions so do not get confused if you get the best performance in your system with some gains that fall outside of these suggested ranges.
Position loop
Before starting with the tuning of the position loop, make sure that both current direct/quadrature and velocity loops have been tuned satisfactorily to your requirements. Otherwise, you might not be able to get the performance that you are looking in position mode regardless of the controller that you end up designing for this loop.
Kp based controller
Due to the triple-loop scheme that the Summit devices have, if the current and velocity loops have been tuned properly, the position loop will probably be composed of a proportional gain only. Therefore, this is usually the easiest loop to tune once the other ones are configured.
The best way to tune the position loop is with the Tune workspaces that MotionLab3 has. Before doing this though, make sure to check that the position sensor is properly configured in your drive. If unsure of how to do this, repeat the Feedbacks steps of the configuration Wizard that relate to the specific position sensor that you have in your system before attempting to tune the position manually.
Once this is done, again you can open the velocity Tune workspace to start the manual tuning steps again:
To begin the manual tuning, always start with all gains at 0. You will observe that the response is flat and the motor should not move.
Increase Kp little by little until the position actual value overlaps with the position demand value or it reaches it as fast as possible while keeping the trajectory stable
Normal Kp/Ki value ranges
For most systems, the values of Kp and Ki usually fall in the following ranges:
Kp → 0.00001 - 0.1
Ki → 0.0001 - 0.01
Remember that in most cases Ki is not even necessary in position control when working with a triple-loop control scheme.
Do not take these recommendations as hard truths, there are always exceptions so do not get confused if you get the best performance in your system with some gains that fall outside of these suggested ranges.