Stepping Motors

Stepping Motors Unit: 4/EE/A0 Mechatronics Lecturer: James Grimbleby URL: http://www.personal.rdg.ac.uk/~stsgrimb/ email

Views 267 Downloads 14 File size 4MB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

Stepping Motors Unit: 4/EE/A0 Mechatronics Lecturer: James Grimbleby URL: http://www.personal.rdg.ac.uk/~stsgrimb/ email: j.b.grimbleby reading.ac.uk Number of Lectures: 10 Recommended text book: P P. P. P Acarnley: A l Stepping Motors: A Guide to Modern Theory and Practice Peter Peregrinus (for IEE) ISBN 0-86341-027-8 James Grimbleby

School of Systems Engineering - Electronic Engineering

Syllabus Types of stepping motor: variable-reluctance, permanentmagnet, hybrid, single-phase. Stepping motor drivers, drivers H H-bridge, bridge resistor ballasting ballasting, chopper drives, drive sequences Microprocessor control of stepping motors Static St ti torque t characteristic, h t i ti dynamic d i response, resonance, pull-in and pull-out characteristics, micro stepping Stepping motor model, high-speed operation, simulation, velocity-error velocity error plane diagrams Closed-loop control of stepping motors James Grimbleby

School of Systems Engineering - Electronic Engineering

Stepping Motors Stepping motors convert switched excitation changes to precise increments of rotation This property allows stepping motors to be used in positioning systems without the need for feedback Rotor positioning R i i i iis achieved hi db by magnetic i alignment li off rotor and stator poles There are 3 classes of stepping motor: variable-reluctance motors permanent motors, permanent-magnet magnet motors and hybrid motors motors.

James Grimbleby

School of Systems Engineering - Electronic Engineering

Variable Reluctance Stepping Variable-Reluctance Motor A

N

Soft iron stator t t

S Soft iron rotor t N A’ James Grimbleby

S

Induced magnetisation

School of Systems Engineering - Electronic Engineering

Variable Reluctance Stepping Variable-Reluctance Motor Soft iron stator

Soft S ft iron i rotor

Stator stack A James Grimbleby

Stator stack B

Stator stack C

School of Systems Engineering - Electronic Engineering

Variable Reluctance Stepping Variable-Reluctance Motor A

A:

B:

B B

A A C:

A:

C C

A James Grimbleby

School of Systems Engineering - Electronic Engineering

Variable Reluctance Stepping Variable-Reluctance Motor Anti-clockwise rotation can be produced by exciting the stator windings in the sequence: A B C A B C A .. and clockwise rotation can be produced by the sequence: A C B A C B A .. If the h windings i di A B C A are excited i d iin turn, the h rotor moves by one rotor tooth pitch. Thus if p is the number of rotor t teeth t th then th the th step t angle l αs is i given i b by: αs = 360/3p p = 120/p p A typical variable-reluctance stepping motor has 8 rotor teeth giving a stepping angle of 15º James Grimbleby

School of Systems Engineering - Electronic Engineering

Variable Reluctance Stepping Variable-Reluctance Motor

James Grimbleby

School of Systems Engineering - Electronic Engineering

Permanent Magnet Stepping Permanent-Magnet Motor B

N

A

Soft S ft iron i stator

S N

N

S

S N

A’ James Grimbleby

B’ B

Permanent magnet rotor

S School of Systems Engineering - Electronic Engineering

Permanent Magnet Stepping Permanent-Magnet Motor N

A+:

N S

S N

N S

B+:

S N S N

S N S N

S S A: A-:

S N

N S

S N

B: B-:

N S N S

N S N S

N James Grimbleby

School of Systems Engineering - Electronic Engineering

Permanent Magnet Stepping Permanent-Magnet Motor Clockwise Cl k i rotation t ti can be b produced d d by b exciting iti th the stator t t windings in the sequence: A+ B+ AA BB A+ B+ AA .. and anti-clockwise rotation can be produced by the sequence: A+ B- A- B+ A+ B- A- .. If the windings A+ B+ A- B- A+ are excited in turn, the rotor moves byy one rotor N p pole p pitch. Thus if p is the number of rotor N poles then the step angle αs is given by: αs = 360/4p = 90/p A typical permanent magnet stepping motor has 4 N poles giving a stepping angle of 22 22.5º 5º James Grimbleby

School of Systems Engineering - Electronic Engineering

Permanent Magnet Stepping Permanent-Magnet Motor 0 mm 0.5

Implantable pressure release valve James Grimbleby

School of Systems Engineering - Electronic Engineering

Hybrid Stepping Motor B

B’

A

Soft iron stator

N S

A’ James Grimbleby

N

N

S

S N S

Rotor: soft iron + permanent magnet

School of Systems Engineering - Electronic Engineering

Hybrid Stepping Motor

Permanentt P magnet

S

N Soft iron stator

Soft iron rotor

James Grimbleby

S

N

School of Systems Engineering - Electronic Engineering

Hybrid Stepping Motor A

N S

B S N

S N

N S

N S

N S A’

S N

B’

S N James Grimbleby

School of Systems Engineering - Electronic Engineering

Hybrid Stepping Motor Anti-clockwise rotation can be produced by exciting the stator windings in the sequence: A+ B+ AA BB A+ B+ AA .. and clockwise rotation can be produced by the sequence: A+ B- A- B+ A+ B- A- .. If the windings A+ B+ A- B- A+ are excited in turn turn, the rotor moves by one rotor tooth pitch. Thus if p is the number of rotor teeth then the step angle αs is given by: αs = 360/4p = 90/p A typical hybrid stepping motor has 50 rotor teeth giving a stepping angle of 1.8º James Grimbleby

School of Systems Engineering - Electronic Engineering

Hybrid Stepping Motor Soft iron rotor

Permanent magnet

Soft iron stator James Grimbleby

School of Systems Engineering - Electronic Engineering

Hybrid Stepping Motor

James Grimbleby

School of Systems Engineering - Electronic Engineering

Single-Phase Single Phase Stepping Motor

N

S

Permanent magnet rotor

Soft iron stator

A James Grimbleby

A’ A

School of Systems Engineering - Electronic Engineering

Single-Phase Single Phase Stepping Motor S

N

S

N

N

N

S

N

S

S

S

A+:

N

A-:

James Grimbleby

School of Systems Engineering - Electronic Engineering

Comparison of Motor Types Permanent-magnet P t t stepping t i motors t are inferior i f i in i performance to hybrid motors, and are only used in specialised applications Hybrid motors have a smaller step size and a higher torque than a similar VR motor Hybrid motors also have a detent torque Hybrid motors have 2, rather than 3, windings VR motors have a lower rotor inertia than hybrid motors James Grimbleby

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Voltage Drive +V Vs

Q2

Q1

James Grimbleby

D2

D1

D4

D3

School of Systems Engineering - Electronic Engineering

Q4

Q3

H Bridge: Voltage Drive, Positive H-Bridge: Excitation +V Vs

Q2

D2 IL

Q1

James Grimbleby

D1

D4

Q4

ZL

D3

School of Systems Engineering - Electronic Engineering

Q3

H-Bridge: H Bridge: Voltage Drive Stator winding excitation: I L

R V0 dI R.I + L. = V0 dt ⎧ -t ⎫ I = I0 .⎨1 − exp ⎬ T0 ⎭ ⎩ James Grimbleby

V0 where : I0 = R

L T0 = R

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Voltage Drive Motor parameters: (type ID31 motor) Number of rotor p poles: Rotor inertia: Coupling p g coeff: Viscous damping: Coulomb friction: Stator winding resistance: Stator winding inductance: Nominal stator current: Thus: and: James Grimbleby

Nr = 50 Jr = 1.16×10-5 kg m2 Kc = 0.121 V rad-1s Dr = 0.0006 Nmrad-1s Fr = 0.000 Nm Rw = 0.66 Ω Lw = 1.52 ×10-3 H Iw = 2.0 A

V0 = Rw × Iw = 1.32 V T0 = Lw / Rw = 2.3 ms School of Systems Engineering - Electronic Engineering

H Bridge: Voltage Drive, H-Bridge: De-excitation +V Vs

Q2

D2 IL

Q1

James Grimbleby

D1

D4

Q4

ZL

D3

School of Systems Engineering - Electronic Engineering

Q3

H-Bridge: H Bridge: Voltage Drive Stator winding de de-excitation: excitation: I L

R V0 dI R.I + L. = −V0 dt ⎧ ⎫ -t I = I0 .⎨2 exp − 1⎬ T0 ⎩ ⎭ James Grimbleby

V0 where : I0 = R

L T0 = R

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Voltage Drive Low stepping rate:

High stepping rate:

James Grimbleby

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Resistor Ballast Drive For the ID31 motor:

L 1.52 × 10 −3 T0 = = = 2.3 ms R 0.66 Stepping pp g rate should be less than 400 step/s p To increase the stepping rate it is necessary to reduce T0 Since it is not possible to reduce L the only alternative is to increase R: an external ballast resistance is placed in series with the winding This reduces T0 at the expense of efficiency James Grimbleby

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Resistor Ballast Drive +Vs

Q2

Q1

James Grimbleby

D2

D1

D4

D3

School of Systems Engineering - Electronic Engineering

Q4

Q3

H-Bridge: H Bridge: Resistor Ballast Drive Use a series ballast resistance of 11.34 Ω:

L 1.52 × 10 −3 T0 = = = 0.13 ms R 11.34 + 0.66 Stepping pp g rate is increased to 8000 step/s p To maintain a stator current of 2 A requires q a supply pp y voltage g of 24 V Static power dissipation has increased from 2.64 W to 48 W The poor efficiency of resistor ballast drive limits application to low power motors James Grimbleby

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Chopper Drive +V Vs

Q2

Q1

James Grimbleby

D2

D1

D4

D3

School of Systems Engineering - Electronic Engineering

Q4

Q3

H Bridge: Chopper Drive, Initial H-Bridge: Excitation +V Vs

Q2

D2 IL

Q1

James Grimbleby

D1

ZL

D4

D3

School of Systems Engineering - Electronic Engineering

Q4

Q3

H-Bridge: H Bridge: Chopper Drive Stator winding initial excitation: dI R.I + L. = V0 where : V0 >> R.I dt V0 I0 .L I ≈ .t or : T0 ≈ V0 L

T0 is the time for the current to reach the nominal stator current I0 I0 .L 2 × 1.52 × 10 −3 T0 ≈ = = 0.13 ms V0 24

When stator current reaches nominal current the chopper goes into freewheel mode drives g James Grimbleby

School of Systems Engineering - Electronic Engineering

Winding Cu urrent (A)

H-Bridge: H Bridge: Chopper Drive 76 76 e

Final current = 50/0 50/0.66 66 = 76 A

2 0.13 ms 2.3 ms James Grimbleby

Time

School of Systems Engineering - Electronic Engineering

H Bridge: Chopper Drive, H-Bridge: Freewheeling +V Vs

Q2

D2 IL

Q1

James Grimbleby

D1

ZL

D4

D3

School of Systems Engineering - Electronic Engineering

Q4

Q3

H-Bridge: H Bridge: Chopper Drive St t winding Stator i di freewheeling: f h li dI R.I + L. = V0 = 0 dt L -t I = I0 .exp where : T0 = T0 R

Stator S a o cu current e decays with time e constant co s a T0 towards o a ds zero eo By y alternately y applying pp y g the full supply pp y voltage, g , and the freewheeling, the stator current is maintained close to the nominal current. James Grimbleby

School of Systems Engineering - Electronic Engineering

H Bridge: Chopper Drive, H-Bridge: De-excitation +V Vs

Q2

D2 IL

Q1

James Grimbleby

D1

ZL

D4

D3

School of Systems Engineering - Electronic Engineering

Q4

Q3

H-Bridge: H Bridge: Chopper Drive Stator winding de de-excitation: excitation: dI R.I + L. = −V0 dt V0 I = I0 − .t L

where h : V0 >> R.I I0 .L or : T0 = V0

T0 is the time for the current to fall to zero, and is the same as the excitation time The current in the stator winding is normally sensed by placing l i a smallll resistor i t iin series i with ith th the source tterminals i l off Q1 and Q3 James Grimbleby

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Chopper Drive Initial excitation it ti Chopping De-excitation Because ecause o of magnetostriction ag e os c o the e motor o o will ge generate e a e noise o se at the chopping frequency To prevent this causing annoyance the chopping frequencyy is normallyy chosen to be greater g than 25 kHz James Grimbleby

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Chopper Drive

D l 2 A chopper Dual h d drive i James Grimbleby

School of Systems Engineering - Electronic Engineering

H-Bridge: H Bridge: Chopper Drive

Commercial 4A chopper drive (Mclennan Servo Supplies Ltd) James Grimbleby

School of Systems Engineering - Electronic Engineering

Stepping Motor Drive Sequences The simplest drive sequence is the one one-winding-on winding on sequence: A+ 1 0 0 0

B+ 0 1 0 0

A− 0 0 1 0

B− 0 0 0 1

This sequence repeats after 4 steps It is rarely used because a better performance can be obtained from the two-windings-on or wave sequence James Grimbleby

School of Systems Engineering - Electronic Engineering

Stepping Motor Drive Sequences The two two-windings-on windings on or wave sequence: A+ 1 0 0 1

B+ 1 1 0 0

A− 0 1 1 0

B− 0 0 1 1

This sequence also repeats after 4 steps It provides √2=1.4 times the torque of the one-winding-on sequence, a the expense of twice the static power consumption James Grimbleby

School of Systems Engineering - Electronic Engineering

Stepping Motor Drive Sequences The half-step sequence: A+ 1 1 0 0 0 0 0 1

B+ 0 1 1 1 0 0 0 0

A− 0 0 0 1 1 1 0 0

B− 0 0 0 0 0 1 1 1

This sequence repeats after 8 steps and provides twice the precision of other sequences James Grimbleby

School of Systems Engineering - Electronic Engineering

Microprocessor Control Microprocessor system step dir step dir step dir

Sequencer and drivers step dir

A B

Motor A B

Other axes

The most common interface between a microprocessor p system and a sequencer/driver is by step and dir signals James Grimbleby

School of Systems Engineering - Electronic Engineering

Sequencer State Machine A,B di 0 dir=0 B

s7

di 0 dir=0

s0

di 1 dir=1

A s1

di 1 dir=1

dir=0

dir=0 dir=1 s6

A1,B ,

dir=1

Half-step sequence

A,B1 ,

dir=1

dir=0

dir=1

s5 A1

dir=1

dir=0

dir=1 s4

dir=0

dir=0 dir 0

s3 B1

A1 B1 A1,B1 James Grimbleby

s2

School of Systems Engineering - Electronic Engineering

Sequencer State Machine PIN 1 PIN 2

= clock; = dir;

/* inputs */ / /

PIN PIN PIN PIN

= = = =

/* outputs */

16 17 18 19

A; A1; B; B1;

PIN [12..14] = [y2..0]; /* state vars */ FIELD stepper = [y2..0]; [y2 0]; $DEFINE s0 'b'000 /* states */ $DEFINE s1 'b'001 $DEFINE s2 2 'b'011 $DEFINE s3 'b'010 $DEFINE s4 'b'110 $DEFINE s5 'b'111 $DEFINE s6 'b'101 $DEFINE s7 'b'100 b 100 James Grimbleby

School of Systems Engineering - Electronic Engineering

Sequencer State Machine sequence stepper { present s0 if ( dir ) next s1; if (!dir ) next s7; out A,B; present s1 if ( dir) ) next s2; ; if (!dir) next s0; out A; present s2 if ( dir ) next s3; ....................... present s7 if ( dir) next s0; if (!dir) next s6; out B; } James Grimbleby

School of Systems Engineering - Electronic Engineering

Sequencer State Machine

Sequencer state machine simulation James Grimbleby

School of Systems Engineering - Electronic Engineering

Sequencer State Machine ______________ | Stepping | clock x---|1 20|---x di x---|2 dir | 19|---x | x---|3 18|---x x---|4 x |4 17|---x 17| x x---|5 16|---x x---|6 15|---x x---|7 | 14|---x | x---|8 13|---x x---|9 x |9 12|---x 12| x GND x---|10 11|---x |______________|

Vcc B1 B A1 A y0 y1 y2

GAL16V8: connection details James Grimbleby

School of Systems Engineering - Electronic Engineering

Microprocessor Coordinator Step class (base class) definition: class step { public: step() {} // step class constructor ~step() {} // step class destructor void up(); // move one step clockwise void dn(); // move one step anti anti-clockwise clockwise };

James Grimbleby

School of Systems Engineering - Electronic Engineering

Microprocessor Coordinator Step class (base class) implementation: #include "step.h" #define p ((volatile unsigned char *) ... #d fi #define di bi 0x01 dir_bit 0 01 #define step_bit 0x02 void step::up() { *p = dir_bit; *p = dir_bit dir bit | step_bit; step bit; *p = dir_bit; } void step::dn() { *p p = 0; ; *p = step_bit; *p = 0; } James Grimbleby

School of Systems Engineering - Electronic Engineering

Microprocessor Coordinator Move class (derived class) definition: #include "step.h" p class move: private step { private: i t long int pos; p public: move() { pos = 0; } // move class constructor ~move() () {} // move class constructor void g go(long ( g int x, , long g int s); ); // move to position x at speed s }; James Grimbleby

School of Systems Engineering - Electronic Engineering

Microprocessor Coordinator Move class (derived class) implementation: #include "move.h" void move::go(long int x, long int s) { const long int q = 1000000 / s; l long int i k k; while (pos != x) { for (k = q; k > 0; --k); k); if (pos < x) { up(); pos++; } else { dn(); pos pos--; ; } } } James Grimbleby

School of Systems Engineering - Electronic Engineering

Microprocessor Coordinator Delayy loop: p ; D7 1000000) { k -= 1000000; if (x > pos) { up(); pos++; } else { dn(); pos--; } } } } James Grimbleby

School of Systems Engineering - Electronic Engineering

k:

James Grimbleby

22 27156 6 68 83945 5 14 40734 4 59 97523 3 05 54312 2 51 11101 96 67890 0 42 24697 7 88 81468 8 33 38257 7 79 95046 6 25 51835 5

89382 24 01728 80 14073 36 26419 93 38764 48 51110 04 63456 60 75801 16 88147 72 00492 28 12838 84 25184 40

31 13578 8

85 56789 9 77 70367 7

s=123456: 123456

77036 68

64691 12

52345 56

40 00000 0

k:

40000 4 00

Microprocessor Coordinator

s 456789: s=456789: k += s; ; if (k > 1000000) k -= 1000000;

School of Systems Engineering - Electronic Engineering

Microprocessor Coordinator Each iteration of the while loop involves around 24 machine instructions taking Δt=6μs. Δt=6μs The proportion of iterations generating a step is s/1,000,000 s/1 000 000 and varies from 0 to 1 (as s varies from 0 to 1,000,000) The maximum step frequency is therefore 160,000 steps/s and the frequency increment is 160 160,000/1,000,000 000/1 000 000 = 0.16 0 16 steps/s There will be a jitter in the step pulses of Δt=6μs James Grimbleby

School of Systems Engineering - Electronic Engineering

Microprocessor Coordinator Main loop: #include "move.h" int main() { move s; for (;;) { delay(100000); s.go(800, 800); d l (100000) delay(100000); s.go(0, 1200); } return 0; } James Grimbleby

School of Systems Engineering - Electronic Engineering

Hardware Implementation 32-bit MicroLatch processor 32 32 D-bus D Q (s) ce l le

32-bit 32-bit Adder Register oflo A 3 32 sum D Q clk B 32 Clock

At each clock edge: oflo = (k + s ) > 232 k = (k + s) mod 232 James Grimbleby

School of Systems Engineering - Electronic Engineering

step t

(k)

Microprocessor Coordinator

Commercial microprocessor-based coordinator (Mclennan Servo Supplies Ltd) James Grimbleby

School of Systems Engineering - Electronic Engineering

Static Torque Characteristic Torque T0 -4 4

-3 3

-2 2

-1 1

Steps 1 2 θ=2π/4n

3 θ 2 / θ=2π/n

4

θ

T = −T0 sin nθ where n is the number of rotor teeth and θ is the rotor angle James Grimbleby

School of Systems Engineering - Electronic Engineering

Static Torque Characteristic The motor torque is given by: T = −T0 sin nθ

If a load torque TL is applied to the motor then the rotor will be displaced p to an angle g θe where: TL = −T0 sin nθ sin−1( −TL / T0 ) θe = n

This formula is true for |TL| 2) xpos = mpos - 2; else xpos = 0;

Provided that the motor position remains within 2 steps the excitation remains constant If motor position exceeds 2 steps the excitation changes to provide maximum restoring torque James Grimbleby

School of Systems Engineering - Electronic Engineering

Closed-Loop Closed Loop Control T Torque Position (½ steps) -5 -4

-3 -2 -1

1

2

3

4

5

Closed-loop static torque characteristic - phase excitations change to maintain torque James Grimbleby

School of Systems Engineering - Electronic Engineering

Closed-Loop Closed Loop Control Algorithm Closed-loop control algorithm to maintain a position of cpos: if (mpos - cpos < -2) xpos = mpos + 2; else if (mpos - cpos > 2) xpos = mpos - 2; else xpos = cpos; Provided that the error does not exceed 2 steps p the behaviour is identical to open-loop If error exceeds 2 steps the excitation changes to provide maximum correcting torque James Grimbleby

School of Systems Engineering - Electronic Engineering

Closed-Loop Closed Loop Control Algorithm Open loop:

Closed loop:

0

-4000 Error:

-2

0

2

-6 6 -4 4

-2 2

0

2

0

-4000 Error: James Grimbleby

-6 -4

4000 Spee ed

Operation at the resonantt step t rate t (20steps at 153steps/s)

Sp peed

4000

School of Systems Engineering - Electronic Engineering

Closed-Loop Closed Loop Control Algorithm 4000 Sp peed

Open loop: Start-stop operation (100steps at 4000 t 4000steps/s) / )

0

-4000 Error:

-4 -2

0

2

-6 6

-4 4

0

2

Spee ed

4000

Closed loop:

0

-4000 Error: James Grimbleby

-6

-2 2

School of Systems Engineering - Electronic Engineering

Closed-Loop Closed Loop Control Algorithm 4000 Sp peed

Open loop: Disturbance response (0.5Nm for 10ms)

0

-4000 Error:

-6

-4 -2

0

2

-6 6

-4 4

0

2

Closed loop:

Spee ed

4000 0

-4000 Error: James Grimbleby

-2 2

School of Systems Engineering - Electronic Engineering

Stepping Motors

© J. B. Grimbleby October 08

James Grimbleby

School of Systems Engineering - Electronic Engineering