Editing Tuning velocity controller
Your changes will be displayed to readers once an authorized user accepts them. (help) |
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | Velocity controller tuning means finding the correct drive settings and feedback gain values to achieve a proper [[Servo stiffness]] and response to a velocity [[Setpoint signal|setpoint]] change. | |
This tuning guide is for you if the final application uses the motor in velocity [[Control modes|control mode]] such as spindle or as position mode with external closed loop position controller such as [[LinuxCNC]]. | This tuning guide is for you if the final application uses the motor in velocity [[Control modes|control mode]] such as spindle or as position mode with external closed loop position controller such as [[LinuxCNC]]. | ||
Line 12: | Line 12: | ||
*Attach motor to the target load and ensure it can rotate in both directions '''infinitely''' | *Attach motor to the target load and ensure it can rotate in both directions '''infinitely''' | ||
*Make following parameter changes to Granity and click apply afterwards: | *Make following parameter changes to Granity and click apply afterwards: | ||
− | **Set drive in velocity control mode | + | **Set drive in velocity control mode [[CM]] |
− | **Choose ''Serial only'' setpoint input | + | **Choose ''Serial only'' setpoint input [[CM]] |
**Make other necessary adjustments to have drive powered and enabled | **Make other necessary adjustments to have drive powered and enabled | ||
− | **Untick | + | **Untick Setpoint smoothing [[CIS]] |
− | **Set Goals tab | + | **Set Goals tab [[DIV]] and [[MUL]] to 50 |
− | **Set | + | **Set acceleration [[CAL]] & velocity [[CVL]] limits reasonably to the levels that motor is expected to handle |
*Set-up the test stimulus and capture settings from Testing tab (an example, may be varied): | *Set-up the test stimulus and capture settings from Testing tab (an example, may be varied): | ||
− | **Set target setpoint 1 [[TSP1]] between 1000 and 16383 (16383 equals the max speed that is configured via | + | **Set target setpoint 1 [[TSP1]] between 1000 and 16383 (16383 equals the max speed that is configured via [[CVL]]) |
**Set delay 1 [[TSD1]] to 0.25 seconds | **Set delay 1 [[TSD1]] to 0.25 seconds | ||
**Set target setpoint 2 [[TSP2]] to same, but ''negative'', value of TSP1 | **Set target setpoint 2 [[TSP2]] to same, but ''negative'', value of TSP1 | ||
**Set delay1 [[STD2]] to 0.25 s | **Set delay1 [[STD2]] to 0.25 s | ||
− | **Choose | + | **Choose sample rate [[TSR]] of 500 to 2500 Hz |
**Choose ''Capture setpoint change in positive direction'' from the dropdown | **Choose ''Capture setpoint change in positive direction'' from the dropdown | ||
**''Tick Continuously repeating capture'' | **''Tick Continuously repeating capture'' | ||
**Tick ''Velocity setpoint'' and ''Velocity achieved'' from signals | **Tick ''Velocity setpoint'' and ''Velocity achieved'' from signals | ||
**Tick ''Start capture'' to begin continous capture. | **Tick ''Start capture'' to begin continous capture. | ||
− | **Tick | + | **Tick Enable test stimulus [[TSE]] to begin a continuous position back and forth spinning motion generation |
Once the steps above are done, motor should be generating direction reversing spinning and velocity response graphs should appear on the right side of Granity about once in 3-5 seconds. | Once the steps above are done, motor should be generating direction reversing spinning and velocity response graphs should appear on the right side of Granity about once in 3-5 seconds. | ||
Line 43: | Line 43: | ||
[[File:Veltuning4.png|800px]] | [[File:Veltuning4.png|800px]] | ||
− | Begin tuning by increasing | + | Begin tuning by increasing [[KVP]] gain. This makes motor follow velocty setpoint much better. |
To try different gains, go to Tuning tab, change value and click the Apply settings button. | To try different gains, go to Tuning tab, change value and click the Apply settings button. | ||
Line 50: | Line 50: | ||
[[File:Veltuning3.png|800px]] | [[File:Veltuning3.png|800px]] | ||
− | When | + | When [[KVP]] has been increased too much, the system becomes unstable and may start oscillating. In such case, you may hit Esc button to disable drive, reduce the gain and enable drive again. |
− | Tip: torque bandwidth has significant effect on the behavior of KVP value and the point where it goes unstable. One may experiment different | + | Tip: torque bandwidth has significant effect on the behavior of KVP value and the point where it goes unstable. One may experiment different [[TBW]] settings to find the optimum. |
[[File:Veltuning6.png|800px]] | [[File:Veltuning6.png|800px]] | ||
− | Once a maximum perfectly stable | + | Once a maximum perfectly stable [[KVP]] value has been found, start increasing [[KVI]] gain by a similar fashion. The higher KVI value is, the better servo stiffness. |
[[File:Veltuning5.png|800px]] | [[File:Veltuning5.png|800px]] | ||
− | If | + | If [[KVP]] is increased too much, the result is [[overshooting]] and even sustained oscillation. The cure is similar to the too high [[KVP]] gain as described earlier. |
[[File:velocitylowgain.png|800px]] | [[File:velocitylowgain.png|800px]] | ||
Line 67: | Line 67: | ||
====Advanced tuning: Feed-forwards==== | ====Advanced tuning: Feed-forwards==== | ||
− | [[Feed-forward]] parameters may be used to boost motor responsiveness to setpoint change. | + | [[Feed-forward]] parameters may be used to boost motor responsiveness to setpoint change. Feed-forward gains [[VFF]] and [[AFF]] essentially compensate system friction and mass limiting the dynamic performance. |
− | The recommended way to tune FF gains, is to start increasing | + | The recommended way to tune FF gains, is to start increasing velocity feed-forward [[VFF]] until the optimum level has been found. After that, increase acceleration feed-forward [[AFF]] until the optimum point has been reached. |
[[File:velocitylowgainff.png|800px]] | [[File:velocitylowgainff.png|800px]] | ||
Line 79: | Line 79: | ||
The image above shows similar response without feed-forwards but using high feedback gain values (optimally tuned according to the previous chapter). | The image above shows similar response without feed-forwards but using high feedback gain values (optimally tuned according to the previous chapter). | ||
− | ===Problem cases | + | ====Problem cases==== |
− | + | In this test we run motor with higher speeds (TSPn > 10000) and illustrate few typical problem cases. | |
− | In | + | |
[[File:currentsaturatin.png|800px]] | [[File:currentsaturatin.png|800px]] | ||
Line 87: | Line 86: | ||
The image above shows acceleration limited by insufficient torque produced by the motor. In this example the acceleration limit is set too high to be accelerated with the given motor torque limits (or current limits). | The image above shows acceleration limited by insufficient torque produced by the motor. In this example the acceleration limit is set too high to be accelerated with the given motor torque limits (or current limits). | ||
− | To verify if the problem happens due to torque limit, tick also Torque achieved and Torque setpoint signals from the Testing tab settings. In such way also motor currents will be displayed simultaneously with the position response curves. If the torque curve is limited to the set | + | To verify if the problem happens due to torque limit, tick also Torque achieved and Torque setpoint signals from the Testing tab settings. In such way also motor currents will be displayed simultaneously with the position response curves. If the torque curve is limited to the set peak current limit [[MMC]], then the problem is insufficient torque. In the image above we can see that the torque curves are saturated/clipping at 5A and -5A levels which matches the configured [[MMC]] value of 5A in this demonstration. |
To help this, try: | To help this, try: | ||
− | *Increasing current limits | + | *Increasing current limits [[MMC]] and [[MCC]] if possible |
− | *Reducing | + | *Reducing acceleration [[CAL]] and/or velocity [[CVL]] limits |
− | + | ||
− | + | ||
[[File:velocityunstable.png|800px]] | [[File:velocityunstable.png|800px]] | ||
− | The above example shows instability and oscillation with high speeds even when the system was stable at lower speeds with the same parameters. In such case tune the system again at the most | + | The above example shows instability and oscillation with high speeds even when the system was stable at lower speeds with the same parameters. In such case tune the system again at the most infavourable conditions and speeds to achieve stability over all required operating conditions. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
===Steps to do after tuning finished=== | ===Steps to do after tuning finished=== | ||
− | *Stop test stimulus by unticking | + | *Stop test stimulus by unticking [[TSE]] |
− | *Stop scope | + | *Stop scope catpure by unticking ''Continuously repeating capture'' |
*Undo all temporary changes made to settings | *Undo all temporary changes made to settings | ||
*Save settings to drive memory by clicking ''Save settings on drive non-volatile memory'' button | *Save settings to drive memory by clicking ''Save settings on drive non-volatile memory'' button | ||
− | *Set preferred setpoint source | + | *Set preferred setpoint source [[CRI]], also consider the use of [[CIS]] |
− | *If setpoint signal scaling is needed, adjust | + | *If setpoint signal scaling is needed, adjust [[MUL]] and [[DIV]] values |
− | + | ||
− | + | ||
+ | {{tip|If drive will be controlled by an external motion [[controller]] with acceleration & velocity limits, such as CNC controller programs like [[Mach3]] or [[LinuxCNC]], then its recommended to increase acceleration limit [[CAL]] to the maximum value of 32767 and disable setpoint smoothing [[CIS]] to prevent drive's internal acceleration limiter modifying the [[setpoint signal]]. Using these settings effectively disables the internal acceleration limit and let's external controller to control accelerations.}} | ||
==Using drive in velocity control mode== | ==Using drive in velocity control mode== | ||
If velocity control mode is the final desired operating mode, set-up the [[setpoint]] signal source from Granity Goals tab. Also see [[Signal path of motor drive]] for explanation of velocity setpoint scale. | If velocity control mode is the final desired operating mode, set-up the [[setpoint]] signal source from Granity Goals tab. Also see [[Signal path of motor drive]] for explanation of velocity setpoint scale. | ||
− | |||
− | |||
− |