ST AN4144 Application note

AN4144
Application note
Voltage mode control operation and parameter optimization
By Enrico Poli
Introduction
Voltage mode driving is the stepper motor driving method patented by STMicroelectronics® which improves the performance of classic control systems.
This application note describes the operating principles of Voltage mode driving and the strategies for the regulation of the control parameters in order to fit the application requirements.
The application note also investigates and provides solutions to one of the most common issues in Voltage mode driving systems: the resonances of the stepper motors.
July 2012 Doc ID 023491 Rev 1 1/28
www.st.com
Contents AN4144
Contents
1 Voltage mode driving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 Basic principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Back EMF compensation algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Motor supply voltage compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Compensation of thermal drift of the phase resistance . . . . . . . . . . . . . . 12
2 Tuning of the BEMF compensation parameters . . . . . . . . . . . . . . . . . . 13
2.1 Collecting the application characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 First dimensioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.1 Holding, acceleration, deceleration and running currents . . . . . . . . . . . 16
2.2.2 Compensation register values out of range . . . . . . . . . . . . . . . . . . . . . . 17
2.3 Fine tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.1 Step 1: verify the phase current during the speed sweep . . . . . . . . . . . 18
2.3.2 Step 2: adjust the starting amplitude (KVAL) . . . . . . . . . . . . . . . . . . . . . 18
2.3.3 Step 3: adjust the intersect speed value . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.4 Step 4: adjust the starting and final slopes . . . . . . . . . . . . . . . . . . . . . . 19
2.3.5 Step 5: final check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 Supply voltage compensation guidelines . . . . . . . . . . . . . . . . . . . . . . . 22
4 Thermal drift compensation guidelines . . . . . . . . . . . . . . . . . . . . . . . . 23
5 Stepper motor resonances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.1 The effects of the resonances on Voltage mode driving . . . . . . . . . . . . . 24
5.2 Facing resonances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2.1 Damping resonances using the mechanical load . . . . . . . . . . . . . . . . . 25
5.2.2 Reducing motor current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2.3 Skipping the resonance points increasing the acceleration . . . . . . . . . . 26
6 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2/28 Doc ID 023491 Rev 1
AN4144 List of figures
List of figures
Figure 1. Motor phase electrical model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 2. Phasor representation of motor phase equation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 3. BEMF compensation curve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 4. Maximum output current limitation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 5. Supply voltage compensation system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 6. Phase inductance measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 7. Bad k Figure 8. Good k
Figure 9. Running current limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 10. Speed sweep with first dimensioning parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 11. Evaluation of the optimal intersect speed value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 12. Tuned starting slope value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 13. Tuned final slope value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 14. Final check acquisition showing artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 15. Magnified acquisition verifies the presence of artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 16. Position ripple caused by the step change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 17. Phase current distortion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 18. Motor stall caused by resonances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
measurement waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
e
measurement waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
e
Doc ID 023491 Rev 1 3/28
List of tables AN4144
List of tables
Table 1. BEMF compensation parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 2. BEMF compensation parameters normalized to the supply voltage (V
Table 3. BEMF compensation register values according to application parameters . . . . . . . . . . . . 15
Table 4. Motor status and BEMF compensation registers relationship. . . . . . . . . . . . . . . . . . . . . . . 16
Table 5. Output current according to the electrical position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 6. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
) . . . . . . . . . . . . 10
BUS
4/28 Doc ID 023491 Rev 1
AN4144 Voltage mode driving

1 Voltage mode driving

This section describes the basic principles of Voltage mode driving and its implementation in STMicroelectronics devices with a focus on the compensation of:
The back electromotive force (Section 1.2)
The motor supply voltage variation (Section 1.3)
The thermal drift of the phase resistance (Section 1.4).

1.1 Basic principles

The classic current mode driving method limits the phase current to a reference value using a comparator and a current sensor (usually an external resistor). This control is the most intuitive but brings with it some drawbacks: the current ripple can be significant and obtaining an acceptable control of the current can be challenging. In trying to solve these problems, current control algorithms were made more and more complex, including techniques such as fast decay and mixed decay. With the introduction of microstepping in stepper motor driving a new current control algorithm limit became evident: the analog circuitry and the control loop should be able to manage lower currents with higher resolution.
Voltage mode totally changes the control approach implementing an open-loop control: a sinusoidal voltage is applied to the motor phases and the electro-mechanical system response with a sinusoidal current.
Note: Due to its principle of operation, Voltage mode driving is not suited to full step driving. The
best performance is always obtained using microstepping operation.
This result can be obtained through the analysis of the stepper motor electrical model.
Equation 1, extracted from the model in Figure 1, shows how the current of a generic motor
phase is related to:
Phase voltage V
Back electromotive force (BEMF)
Phase resistance (R
PH
) and inductance (Lm).
m
The back electromotive force is typically a sinusoidal voltage with frequency and amplitude proportional to motor rotation speed. The BEMF frequency (f rotation speed expressed in steps per second (f
); this frequency is exactly the same as
STEP
) is equal to one quarter of the
el
the hypothetical current sinewave that should be applied to the motor phase in order to make the motor turn at f frequency through a linear coefficient k
step rate. The BEMF amplitude is proportional to step
STEP
: this parameter depends on motor characteristics
e
and structure (rotor material, coil turns, etc.).
Doc ID 023491 Rev 1 5/28
Voltage mode driving AN4144
VPH(t)
BEMF(fel, t)
L
m
R
m
Stepper motor
Motor phase
AM12849v1
iPHt()
V
PH
t() BEMF felt,()+
R
m
i2πfelLm⋅+
----------------------------------------------------------=
α
β
δ
V
PH
I
PH
Φ
STA
Φ
ROT
BEMF
Rm · I
PH
δ = arctan(2πf
el
· Lm/Rm)
2
πf
el
· Lm · I
PH
AM12850v1

Figure 1. Motor phase electrical model

Equation 1
Considering all the currents and voltages of the electrical model as sinusoidal, Equation 1 can be written as a vector equation (Equation 2). The resulting vector system, which is shown in Figure 2, adds a new variable to the current vs. voltage relationship: the load angle β which is the angle between stator and rotor magnetic field vectors. The load angle is in direct relation with the angle α lying between the phase current and BEMF phasors, as shown in Equation 3.
The torque (Tq) applied to the motor shaft is proportional to both the phase current and the sine of the load angle, as shown by Equation 4, where the k constant which is equal to the k
constant, but expressed in Nm/A instead of V/Hz.
e
parameter is the motor torque
t

Figure 2. Phasor representation of motor phase equation

6/28 Doc ID 023491 Rev 1
AN4144 Voltage mode driving
IPHfel()
V
PHfel
()BEMF fel()+
R
m
i2πfelLm⋅+
-------------------------------------------------------=
α
π
2
-- - β=
T
q
KtI
PH
α()cos KtI
PH
π
2
-- - β
⎝⎠
⎛⎞
cos⋅⋅=⋅⋅=
KtNm/A[]KeV/Hz[]=
V
PH
2
R
m
2
2πfel()2L
m
2
+()I
PH
2
kefel⋅()
2
+=
2 πα arc 2πfelLm/R
m
()tan()I
PH
Kefel⋅()R
m
2
2πfel()2Lm⋅
2
+⋅⋅ cos
VPH Rmi2πfelLm⋅+ IPH⋅ V
BEMFfel
()+
V
PH
R
m
2
2πfel()2L
m
2
+ IPH⋅ K
efel
()+=
Equation 2
Equation 3
Equation 4
Starting from Equation 2, it is possible to obtain the voltage amplitude which, when applied to the motor phase, makes the amplitude of phase current constant. The basic principle of Voltage mode control is based on this relationship. The resulting formula (Equation 5) shows how the voltage amplitude is a complex function of phase current, motor parameters and other factors.
Equation 5
Resolving this equation, to obtain the phase voltage to be applied for various speeds, is very complex and computationally onerous. In addition, the phase relationship between the current and the BEMF phasors (α) is difficult to measure or evaluate for a specific application.
The STMicroelectronics control method, starting from this complex model, implements an effective driving strategy that overcomes these issues with the classic current mode control method in most microstepping applications.

1.2 Back EMF compensation algorithm

In order to devise a simple but effective compensation method, consider the formulas in
Equation 6. In this manner, the dependence on the load angle (β) can be removed, obtaining
a formula which allows the evaluation of the V I
current independent of the motor speed (or its equivalent fel).
PH
Equation 6
voltage that is able to produce a constant
PH
Doc ID 023491 Rev 1 7/28
Voltage mode driving AN4144
V
PH _APPLIED
R
mIPH_TARGETKefel
for 2πfelRm/L
m
«+
2πf
elLmIPH_TARGET
⋅⋅ Kefel for 2πfelRm/L
m
«+
=
R
mIPH_TARGET
Ω[] A[] V[]=
4Rm/2πL
m
step
cycle
-------------- -
Ω[]/H[]
step
cycle
-------------- -
= Hz[]
step/s=
Using this formula, a compensation algorithm that gives the phase voltage amplitude (VPH) for a target phase current (I
) and motor speed (fel) is defined.
PH
The compensation algorithm of Equation 6 can be further simplified according to the electrical frequency. Two different cases can be considered, when the motor speed is low (2
πf
<< R/L) and when it is high (2πf
el
>> R/L).
el
Equation 7 shows how the formula can be approximated when these two cases are
considered.
Equation 7
The Voltage mode control implemented in STMicroelectronics’ products is based on the simplified model described by Equation 7.
In particular, the following parameters are extracted and used to describe the compensation curve:
K
is the voltage applied to the motor phase at zero speed. It is the starting point of
val
the BEMF compensation curve
Intersect speed is the motor speed that determines the switching from the low-speed
compensation factor (starting slope) to the high-speed one (final slope)
Starting slope is the rate at which the phase voltage is increased in the low-speed
range (i.e. motor speed is less than intersect speed)
Final slope is the rate at which the phase voltage is increased in the high-speed range
(i.e. motor speed is greater than intersect speed).
These parameters are listed inTab le 1 .

Table 1. BEMF compensation parameters

Parameter Description Formula Unit
Voltage applied to the
K
val
Intersect
speed
phase at zero speed in order to obtain the target current value.
Motor speed discriminating the compensation slope that should be used.
8/28 Doc ID 023491 Rev 1
AN4144 Voltage mode driving
Ke/4
V
Hz
-------
/
step
cycle
-------------- -
=
V[] s/step
2π L
mIPH-TARGETKe
+⋅⋅()/4
V
Hz
-------
/
step
cycle
-------------- -
=
V[] s/step
V
PH
V
BUS
t
ON
t
SW
-------- V
BUS
DutyCycle
PMW
==
VPH/V
BUS
Speed
[step/s]
Intersect
speed
Kv al
Starting slope
Final slope
AM12859v1
Table 1. BEMF compensation parameters (continued)
Parameter Description Formula Unit
Compensation slope Starting slope
Final slope
used when motor
speed is lower than
intersect speed.
Compensation slope
used when motor
speed is higher than
intersect speed.
The control system generates the phase voltage using a PWM modulation. The outputs switch between supply voltage V
and ground at a fixed frequency. The mean voltage of
BUS
the resulting square-wave is adjusted through its duty cycle (on time over square-wave period ratio) according to the following formula:
Equation 8
The duty cycle ranges from 0% (the output is always forced to ground) to 100% (the output is always forced to V
BUS
).
The BEMF compensation curve is implemented adjusting the PWM duty cycle, so all the voltage values must be normalized to the supply voltage of the power stage (Figure 3).

Figure 3. BEMF compensation curve

Doc ID 023491 Rev 1 9/28
Loading...
+ 19 hidden pages