AN4144
Application note
Voltage mode control operation and parameter optimization
Enrico Poli
Introduction
Voltage mode driving is the stepper motor driving method patented by STMicroelectronics
®
which improves the performance of classic control systems.
This driving method performs smoother operation and higher microstepping resolutions and
is the best solution for applications where high precision positioning and low mechanical
noise are mandatory.
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.
March 2015
DocID023491 Rev 3
1/28
www.st.com
28
Contents
AN4144
Contents
1
Voltage mode driving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1
1.2
1.3
1.4
Basic principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Back EMF compensation algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Motor supply voltage compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
Compensation of thermal drift of the phase resistance . . . . . . . . . . . . . . 12
2
Tuning of the BEMF compensation parameters . . . . . . . . . . . . . . . . . . 13
2.1
2.2
Collecting the application characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 13
First dimensioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.1
2.2.2
Holding, acceleration, deceleration and running currents . . . . . . . . . . . 15
Compensation register values out of range . . . . . . . . . . . . . . . . . . . . . . 16
Step 1: verify the phase current during the speed sweep . . . . . . . . . . . 17
Step 2: adjust the starting amplitude (K
VAL
) . . . . . . . . . . . . . . . . . . . . . . 18
Step 3: adjust the intersect speed value . . . . . . . . . . . . . . . . . . . . . . . . 19
Step 4: adjust the starting and final slopes . . . . . . . . . . . . . . . . . . . . . . 19
Step 5: final check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3
Fine tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.1
2.3.2
2.3.3
2.3.4
2.3.5
3
4
5
Supply voltage compensation guidelines . . . . . . . . . . . . . . . . . . . . . . . 22
Thermal drift compensation guidelines . . . . . . . . . . . . . . . . . . . . . . . . 23
Stepper motor resonances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.1
5.2
The effects of the resonances on Voltage mode driving . . . . . . . . . . . . . 25
Facing resonances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2.1
5.2.2
5.2.3
Damping resonances using the mechanical load . . . . . . . . . . . . . . . . . 26
Reducing motor current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Skipping the resonance points increasing the acceleration . . . . . . . . . . 26
6
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2/28
DocID023491 Rev 3
AN4144
List of tables
List of tables
Table 1.
Table 2.
Table 3.
Table 4.
Table 5.
Table 6.
BEMF compensation parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
BEMF compensation parameters normalized to the supply voltage (V
BUS
) . . . . . . . . . . . . 10
BEMF compensation register values according to application parameters . . . . . . . . . . . . 15
Motor status and BEMF compensation registers relationship. . . . . . . . . . . . . . . . . . . . . . . 15
Output current according to the electrical position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
DocID023491 Rev 3
3/28
28
List of figures
AN4144
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figure 7.
Figure 8.
Figure 9.
Figure 10.
Figure 11.
Figure 12.
Figure 13.
Figure 14.
Figure 15.
Figure 16.
Figure 17.
Figure 18.
Motor phase electrical model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Phasor representation of motor phase equation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
BEMF compensation curve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Maximum output current limitation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Supply voltage compensation system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Phase inductance measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Bad k
e
measurement waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Good k
e
measurement waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Running current limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Speed sweep with first dimensioning parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Evaluation of the optimal intersect speed value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Tuned starting slope value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Tuned final slope value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Final check acquisition showing artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Magnified acquisition verifies the presence of artifacts . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Position ripple caused by the step change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Phase current distortion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Motor stall caused by resonances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4/28
DocID023491 Rev 3
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 on page 7)
The motor supply voltage variation (Section
1.3 on page 11)
The thermal drift of the phase resistance (Section
1.4 on page 12).
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
PH
Back electromotive force (BEMF)
Phase resistance (R
m
) and inductance (L
m
).
The back electromotive force is typically a sinusoidal voltage with frequency and amplitude
proportional to motor rotation speed. The BEMF frequency (f
el
) is equal to one quarter of the
rotation speed expressed in steps per second (f
STEP
); this frequency is exactly the same as
the hypothetical current sine wave that should be applied to the motor phase in order to
make the motor turn at f
STEP
step rate. The BEMF amplitude is proportional to step
frequency through a linear coefficient k
e
: this parameter depends on motor characteristics
and structure (rotor material, coil turns, etc.).
DocID023491 Rev 3
5/28
28