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 driving method performs smoother operation and higher micro-stepping 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.

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 ke measurement waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Figure 8. Good ke measurement waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 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

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 (VBUS) . . . . . . . . . . . . 10 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

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 VPH

Back electromotive force (BEMF)

Phase resistance (Rm) and inductance (Lm).

The back electromotive force is typically a sinusoidal voltage with frequency and amplitude proportional to motor rotation speed. The BEMF frequency (fel) is equal to one quarter of the rotation speed expressed in steps per second (fSTEP); this frequency is exactly the same as the hypothetical current sinewave that should be applied to the motor phase in order to

make the motor turn at fSTEP step rate. The BEMF amplitude is proportional to step frequency through a linear coefficient ke: this parameter depends on motor characteristics

and structure (rotor material, coil turns, etc.).

Doc ID 023491 Rev 1

5/28

ST AN4144 Application note

Voltage mode driving

AN4144

 

 

Figure 1. Motor phase electrical model

Stepper motor

Lm

VPH(t)

Motor phase

Rm

 

 

BEMF(f, t)

 

el

AM12849v1

Equation 1

iPH

VPH(t) + BEMF(fel, t)

( t) = ----------------------------

π---f--el-----

------L----m---------

 

Rm + i2

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 kt parameter is the motor torque constant which is equal to the ke constant, but expressed in Nm/A instead of V/Hz.

Figure 2. Phasor representation of motor phase equation

 

 

 

VPH

Φ

ROT

β

 

2πfel · Lm · IPH

 

 

 

 

 

 

 

BEMF

 

 

δ

 

 

 

 

 

 

 

Rm · IPH

 

 

α

I PH

 

 

ΦSTA

δ = arctan(2πfel · Lm/Rm)

AM12850v1

6/28

Doc ID 023491 Rev 1

AN4144

 

 

 

 

 

 

Voltage mode driving

 

 

 

 

 

 

 

 

 

 

 

 

Equation 2

 

 

 

 

 

 

 

IPH( fel )

VPH( fel ) + BEMF( fel )

 

 

= ---------------------------

π---f--el---------

 

--L----m--------

 

 

 

 

 

 

 

Rm + i2

 

 

 

Equation 3

 

 

 

 

 

 

 

 

 

 

 

 

π

 

 

 

 

 

 

 

 

 

 

 

α = -- β

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

Equation 4

 

 

 

 

 

 

 

Tq = Kt

 

IPH

 

 

cos( α)= Kt

 

IPH

 

cos

π

 

 

 

 

 

 

 

 

 

-- β

 

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

 

 

Kt[ Nm/A] = Ke[ V/Hz]

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

VPH 2 = (Rm2 + ( 2πfel)2 Lm2 ) IPH 2 + (ke fel )2

 

2 cos( πα arc tan ( 2πfel Lm/Rm) ) IPH ( Ke fel) Rm2 + ( 2πfel)2 Lm

2

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.2Back 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 VPH voltage that is able to produce a constant IPH current independent of the motor speed (or its equivalent fel).

Equation 6

VPH ≤ Rm + i2πfel Lm IPH + VBEMF(fel )

VPH = Rm2 + ( 2πfel )2 Lm2 IPH + Ke (fel )

Doc ID 023491 Rev 1

7/28

Voltage mode driving

AN4144

 

 

Using this formula, a compensation algorithm that gives the phase voltage amplitude (VPH) for a target phase current (IPH) and motor speed (fel) is defined.

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πfel << R/L) and when it is high (2πfel >> R/L).

Equation 7 shows how the formula can be approximated when these two cases are considered.

Equation 7

 

 

Rm

 

IPH_TARGET

 

+ Ke

fel

for 2πfel « Rm/Lm

 

 

 

 

VPH_APPLIED

=

2πfel

Lm

 

 

 

+ Ke fel

 

 

 

IPH_TARGET

for 2πfel « Rm/Lm

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:

Kval is the voltage applied to the motor phase at zero speed. It is the starting point of 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 inTable 1.

Table 1.

BEMF compensation parameters

 

 

 

 

 

 

 

 

 

 

 

 

 

Parameter

Description

 

Formula

 

 

 

 

 

Unit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Voltage applied to the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Kval

phase at zero speed in

Rm

 

IPH_TARGET

 

 

[ Ω]

[ A] = [V]

order to obtain the

 

 

 

 

target current value.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

step

 

 

[Ω]/[ H]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

cycle

 

 

 

 

 

 

 

 

--------------

 

 

 

 

 

Motor speed

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

step

 

[ Hz]

Intersect

discriminating the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

=

 

--------------

 

speed

compensation slope

4

 

Rm/2πLm

 

 

cycle

 

 

 

 

 

 

 

 

 

 

 

 

that should be used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= step/s

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8/28

Doc ID 023491 Rev 1

AN4144

 

 

 

 

 

 

Voltage mode driving

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table 1.

BEMF compensation parameters (continued)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Parameter

Description

Formula

 

 

 

 

 

 

 

 

Unit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Compensation slope

 

 

 

 

 

 

 

 

 

 

V

 

 

/

 

 

 

step

 

 

=

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------

 

 

--------------

 

 

 

Starting

used when motor

 

 

 

 

 

 

 

 

 

Hz

 

 

 

 

cycle

 

 

 

slope

speed is lower than

 

 

Ke/4

 

 

 

 

 

[V]

 

 

 

s/step

 

 

 

intersect speed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Compensation slope

 

 

 

 

 

 

 

 

 

 

V

 

/

 

 

 

step

 

=

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------

 

 

--------------

 

 

Final slope

used when motor

 

 

 

 

 

 

 

 

 

 

Hz

 

 

 

 

 

cycle

 

 

 

( 2π Lm

 

IPH-TARGET

 

+ Ke)/4

 

 

 

 

 

[V]

 

 

 

 

 

 

 

 

speed is higher than

 

 

 

 

 

 

 

 

 

 

s/step

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

intersect speed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The control system generates the phase voltage using a PWM modulation. The outputs switch between supply voltage VBUS and ground at a fixed frequency. The mean voltage of the resulting square-wave is adjusted through its duty cycle (on time over square-wave period ratio) according to the following formula:

Equation 8

 

 

tON

 

VPH = VBUS

DutyCyclePMW

-------- = VBUS

 

 

tSW

 

The duty cycle ranges from 0% (the output is always forced to ground) to 100% (the output is always forced to VBUS).

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

VPH /VBUS

 

 

 

 

Final

Kval

Starting

slope

 

 

 

 

slope

 

 

Intersect

Speed

 

speed

[step/s]

 

 

AM12859v1

Doc ID 023491 Rev 1

9/28

Loading...
+ 19 hidden pages