Difference between revisions of "Using stepping motor with IONI"

From Granite Devices Knowledge Wiki
Jump to: navigation, search
[checked revision][checked revision]
(Created page with "Using stepping motor with IONI drive is possible in three ways: ;Open loop (no encoder) :This is the traditional stepping motor drive method. Will achieve highest speed a...")
 
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Using stepping motor with [[IONI]] drive is possible in three ways:
 
Using stepping motor with [[IONI]] drive is possible in three ways:
  
;Open loop (no encoder)
+
;Mode1 - Open loop (no encoder)
 
:This is the traditional stepping motor drive method. Will achieve highest speed and is easily configurable but there is no feedback, so if motor stalls/loses synchronism, the absolute position will be unknown before referencing/homing.
 
:This is the traditional stepping motor drive method. Will achieve highest speed and is easily configurable but there is no feedback, so if motor stalls/loses synchronism, the absolute position will be unknown before referencing/homing.
;Closed loop (with encoder feedback)
+
;Mode 2 - Closed loop (with encoder feedback)
:This is open loop mode combined with encoder feedback. The advantages are that drive can detect loss of synchronism and restore to commanded position with ''clear faults'' command. This mode is not recommended for most cases.
+
:This is open loop mode combined with encoder feedback. The advantages are that drive can detect loss of synchronism and restore to commanded position with ''clear faults'' command. May be used also with linear encoder to enhance system accuracy.  
;Servo (with encoder feedback)
+
;Mode 3 - Servo (with encoder feedback)
:In this mode, a stepping motor is used as high pole count brushless servo motor. In this mode, motor efficiency is high (no current if no load) and motor do not lose synchronism. However, motor speed is limited by back EMF of motor and typically can achieve lower top speed than the other modes.
+
:In this mode, a stepping motor is used as high pole count brushless servo motor. In this mode, motor efficiency is high (no current if no load) and motor do not lose synchronism. However, motor speed is limited by back EMF of motor and typically can achieve lower top speed than the other modes. In this mode stepper can be also safely driven over it's rated current to get higher peak torque than it's rated torque (like a servo motor).
 +
 
 +
In the modes 1 and 2 stepper is driven with constant current drive and the motion produced by adjusting phase angle (traditional stepper drive method). In the mode 1 phase angle is controlled directly by [[setpoint]] trajectory and in mode 2 it is controlled by encoder based feedback loop. In the mode 3 motor current is controlled by torque controller (from zero to peak current limit) while phase angle is synchronized to rotor angle by the help of encoder. Mode 3 is similar to servo motor control ([[Signal path of motor drive|more details]]).
 +
 
 +
==Setting up open loop mode 1==
 +
In open loop mode (traditional stepper motor mode) uses smooth microstepping of 128 microsteps per one full step. Resolution may be optionally reduced by increasing the {{param|MUL}} value.
  
==Setting up open loop mode==
 
 
In this mode, drive emulates encoder internally and some tuning parameters need to be set to allow operation:
 
In this mode, drive emulates encoder internally and some tuning parameters need to be set to allow operation:
 
;[[MT]] Motor type
 
;[[MT]] Motor type
Line 14: Line 18:
 
;[[FBD]] Feedback device
 
;[[FBD]] Feedback device
 
:None
 
:None
 +
;[[FBI]] Invert feedback direction
 +
:Unticked
 
;[[FBR]] Feedback device resolution
 
;[[FBR]] Feedback device resolution
 
:6400 (this is the emulated encoder resolution, 6400 PPR = 25600 steps/rev)
 
:6400 (this is the emulated encoder resolution, 6400 PPR = 25600 steps/rev)
Line 29: Line 35:
 
:0
 
:0
 
;[[KVI]] Velocity I gain
 
;[[KVI]] Velocity I gain
:180
+
:700
 
;[[AFF]] and [[VFF]]
 
;[[AFF]] and [[VFF]]
 
:0
 
:0
 
;[[KPP]] Position P gain
 
;[[KPP]] Position P gain
:30
+
:10000
 
;[[PFF]] Position feed-forward gain
 
;[[PFF]] Position feed-forward gain
 
:100%
 
:100%
Line 41: Line 47:
 
:1000
 
:1000
  
Other settings are not critical and can be configured as desired (such as acceleration and velocity limits).
+
Other settings are not critical and can be configured as desired (such as acceleration and velocity limits). If setpoint scaling is 1:1 ([[MUL]]=[[DIV]]), then this mode yields resolution of 25600 steps/revolution. If reduction of resolution is required, then adjust scaling accordingly (if scaling is set above 4:1, then try also Setpoint smoothing [[CIS]]).
==Setting up servo mode==
+
{{tip|Use Granity's ''Measure resistance & inductance'' button to automatically set MR and ML}}
 +
 
 +
{{download|To save time, you may load [[Media:IONIStepperSettingsTemplate3.drc|this template settings file]] to drive. '''Usage:''' connect to the drive with Granity, and click ''Load settings from file''. After loading the file, just set motor current limits MMC and MCC to match your motor. After saving & restarting drive, use ''Measure resistance & inductance'' button to automatically set MR and ML. }}
 +
 
 +
 
 +
'''NOTE:''' these values and settings apply from '''firmware version 1.5.2''' (1096). For older firmware version settings, see:
 +
* [http://granitedevices.com/w/index.php?title=Using_stepping_motor_with_IONI&oldid=5109 Version 1.2.1 - 1.5.1]
 +
* [http://granitedevices.com/w/index.php?title=Using_stepping_motor_with_IONI&oldid=4026 Version 1.2.0 and earlier]
 +
 
 +
==Setting up closed loop mode 2==
 +
In this mode, follow parametrization of open loop mode (mode 1) except:
 +
;[[FBD]] Feedback device
 +
:Choose your feedback device (other than None)
 +
;[[FBI]] Invert feedback direction
 +
:Try both settings and choose the one with stability
 +
;[[FBR]] Feedback device resolution
 +
:Set your feedback device resolution
 +
;[[KVI]] and [[KPP]]
 +
:Tune KVI, VFF, and KPP values (and possibly other gains if non-zero) to have nice response
 +
;[[FMO]] Motion fault limit
 +
:Set non-zero value (perhaps 100-1000) to cause a fault state when motor stalls
 +
 
 +
{{tip|In this mode it might give best response when KVI has been set very low value and Velocity feed-forward VFF tuned to non-zero value. As starting values you may try the ones mentioned in the example below.}}
 +
{{tip|One practical system we successfully configured in Mode 2 had following equipment: a typical 200 step/rev stepper, 1 mm/rev lead screw and a 0.1 µm/count resolution linear encoder, we found following well behaving parameters: KVI 2, VFF 40, KPP 150, PFF 100. Especially VFF value should is subject to change significantly when system resolution changes (i.e. encoder or lead screw).}}
 +
==Setting up servo mode 3==
 
To set-up stepper as servo motor, just follow the [[IONI & IONICUBE user guide]] and consider the stepper motor as servo motor. For a typical 1.8 degree/step two-phase stepping motor the correct motor type parameters are:
 
To set-up stepper as servo motor, just follow the [[IONI & IONICUBE user guide]] and consider the stepper motor as servo motor. For a typical 1.8 degree/step two-phase stepping motor the correct motor type parameters are:
 
;[[MT]] Motor type
 
;[[MT]] Motor type
 
:2 Phase AC or BLDC
 
:2 Phase AC or BLDC
 
;[[MPC]] Pole count
 
;[[MPC]] Pole count
:100
+
:100          
 +
 
 +
== Optional: reducing motor vibration and noise ==
 +
IONI firmware 1.5.2 and later supports reduction of stepping motor vibration and noise by the means of parameters TRF1, TRA1, TRF2, and TRA2.
 +
 
 +
[[File:Stepperlinearizeparams.png]]
 +
 
 +
=== Usage ===
 +
For typical 2-phase (4, 6 or 8 wire) stepper it is recommended to try TRF1 of Sin(4x).
 +
# To adjust TRA1 to optimum value, make motor move slowly by setting up test stimulus from Granity Testing page and setting low values into acceleration and velocity limits (CAL and CVL). For example as test stimulus settings, try TSP1=10000, TSD1=0.5, TSP2=0, TSD2=0.5, CAL=1, CVL=1000.
 +
# While motor is running slowly back and forth, adjust TRA1 until the motor vibration and noise is minimized.
 +
# Some motors also benefit from using third harmonic of this setting, Sin(12x) which may be enabled by setting it as TRF2 and doing same procedure for finding the optimum TRA2 value.
 +
'''Note:''' some motors do not receive significant benefit of these settings. In such case, it's recommended to leave these settings disabled (TRF1 & TRF2 = None and TRA1 & TRA2 = 0) to avoid making the smoothness actually worse.
  
[[category:IONI user guide]]
+
[[Category:Setup_guides]]
[[category:Setup guides]]
+

Latest revision as of 21:31, 14 February 2022

Using stepping motor with IONI drive is possible in three ways:

Mode1 - Open loop (no encoder)
This is the traditional stepping motor drive method. Will achieve highest speed and is easily configurable but there is no feedback, so if motor stalls/loses synchronism, the absolute position will be unknown before referencing/homing.
Mode 2 - Closed loop (with encoder feedback)
This is open loop mode combined with encoder feedback. The advantages are that drive can detect loss of synchronism and restore to commanded position with clear faults command. May be used also with linear encoder to enhance system accuracy.
Mode 3 - Servo (with encoder feedback)
In this mode, a stepping motor is used as high pole count brushless servo motor. In this mode, motor efficiency is high (no current if no load) and motor do not lose synchronism. However, motor speed is limited by back EMF of motor and typically can achieve lower top speed than the other modes. In this mode stepper can be also safely driven over it's rated current to get higher peak torque than it's rated torque (like a servo motor).

In the modes 1 and 2 stepper is driven with constant current drive and the motion produced by adjusting phase angle (traditional stepper drive method). In the mode 1 phase angle is controlled directly by setpoint trajectory and in mode 2 it is controlled by encoder based feedback loop. In the mode 3 motor current is controlled by torque controller (from zero to peak current limit) while phase angle is synchronized to rotor angle by the help of encoder. Mode 3 is similar to servo motor control (more details).

Setting up open loop mode 1[edit | edit source]

In open loop mode (traditional stepper motor mode) uses smooth microstepping of 128 microsteps per one full step. Resolution may be optionally reduced by increasing the Setpoint multiplierMUL value.

In this mode, drive emulates encoder internally and some tuning parameters need to be set to allow operation:

MT Motor type
Stepping motor
FBD Feedback device
None
FBI Invert feedback direction
Unticked
FBR Feedback device resolution
6400 (this is the emulated encoder resolution, 6400 PPR = 25600 steps/rev)
MCC Motor continuous current
This is the resting current when motor stands still. Drive will switch to this after 0.5 seconds of standing still.
MMC Motor peak current limit
This is the motor rated current that is used when motor is rotating.
MR Motor coil resistance
See motor datasheet or if not known, start with low values such as 1 ohm
ML Motor coil inductance
See motor datasheet or if not known, start with low values such as 1 mH
CM Control mode
Set to Position control (typical) or Velocity control mode
KVP Velocity P gain
0
KVI Velocity I gain
700
AFF and VFF
0
KPP Position P gain
10000
PFF Position feed-forward gain
100%
FEV Over speed fault
1000
FPT and FVT fault limits
1000

Other settings are not critical and can be configured as desired (such as acceleration and velocity limits). If setpoint scaling is 1:1 (MUL=DIV), then this mode yields resolution of 25600 steps/revolution. If reduction of resolution is required, then adjust scaling accordingly (if scaling is set above 4:1, then try also Setpoint smoothing CIS).


NOTE: these values and settings apply from firmware version 1.5.2 (1096). For older firmware version settings, see:

Setting up closed loop mode 2[edit | edit source]

In this mode, follow parametrization of open loop mode (mode 1) except:

FBD Feedback device
Choose your feedback device (other than None)
FBI Invert feedback direction
Try both settings and choose the one with stability
FBR Feedback device resolution
Set your feedback device resolution
KVI and KPP
Tune KVI, VFF, and KPP values (and possibly other gains if non-zero) to have nice response
FMO Motion fault limit
Set non-zero value (perhaps 100-1000) to cause a fault state when motor stalls

Setting up servo mode 3[edit | edit source]

To set-up stepper as servo motor, just follow the IONI & IONICUBE user guide and consider the stepper motor as servo motor. For a typical 1.8 degree/step two-phase stepping motor the correct motor type parameters are:

MT Motor type
2 Phase AC or BLDC
MPC Pole count
100

Optional: reducing motor vibration and noise[edit | edit source]

IONI firmware 1.5.2 and later supports reduction of stepping motor vibration and noise by the means of parameters TRF1, TRA1, TRF2, and TRA2.

Stepperlinearizeparams.png

Usage[edit | edit source]

For typical 2-phase (4, 6 or 8 wire) stepper it is recommended to try TRF1 of Sin(4x).

  1. To adjust TRA1 to optimum value, make motor move slowly by setting up test stimulus from Granity Testing page and setting low values into acceleration and velocity limits (CAL and CVL). For example as test stimulus settings, try TSP1=10000, TSD1=0.5, TSP2=0, TSD2=0.5, CAL=1, CVL=1000.
  2. While motor is running slowly back and forth, adjust TRA1 until the motor vibration and noise is minimized.
  3. Some motors also benefit from using third harmonic of this setting, Sin(12x) which may be enabled by setting it as TRF2 and doing same procedure for finding the optimum TRA2 value.

Note: some motors do not receive significant benefit of these settings. In such case, it's recommended to leave these settings disabled (TRF1 & TRF2 = None and TRA1 & TRA2 = 0) to avoid making the smoothness actually worse.