Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

Constant Current Control of Stepper Motor in Microstepping Mode using PIC16F877A

B. S. Somesh1 A. Mu!her"ee# S. Sen$ P. %arma!ar&


1 #$& AcSI'(CM)'I Ph * Scholar+ )lectronics and Instrumentation ,aCSI'(Central Mechanical )ngineering 'esearch Institute *urgapur India

Abstract This paper presents a microstepping stepper motor with constant current control algorithm for a precision positioning system. An open loop microstepping controller has been developed without position feedback. A constant current control algorithm has been designed with the feedback current to maintain the phase currents constant at any desired level. The current regulation of PMSM results in improvement of positioning accuracy of the system. The system has been simulated using MATLA !S"M#L"$% and the controller has been implemented using low cost P"&'()*++A microcontroller. The simulation and e,perimental results depict the effectiveness of the controller. Keywordsmicrostepping; stepper motor; current control;

using digital signal processorsB 2*SP3 5hich are much more eApensi:e than the PIC microcontroller. In this paper 5e ha:e used open loop microstepping control of PMSM 5here no position feed-ac! is ta!en as the position sensing sensors are :er4 much eApensi:e. Moreo:er one of the ma"or reasons -ehind the PMSMBs popularit4 is that it performs 5ell in open loop condition -ut the phase currents of PMSM reduces due to -ac! )MF in open loop condition. /he current regulation of PMSM results in impro:ement of position trac!ing 71&8 so a constant current control algorithm has -een proposed to maintain the desire current le:el. /he PMSM 5ith the current control algorithm has -een simulated using MA/,AB(SIM1,I.% and implemented in hard5are using lo5 cost PIC16F877A. II. S/)PP)' M0/0' Permanent magnet stepper motors 2PMSM3 ha:e high tor6ue to inertia ratio sturdiness and high efficienc4. 9ence PMSMsC are used in positioning applications. Deneral PMSMsC ha:e a step si=e of 1.8o. /his limits the usage of PMSM for precision positioning applications. Such a large step si=e can result in motor shaft oscillation rotations and unsta-le rotation at certain speed ranges 71?8. /o o:ercome this dra5-ac! the PMSM is operated in microstepping mode. A. Microstepping Mode Microstepping is an electronic techni6ue of proportioning the current in the PMSM 5indings to get more intermediate steps in -et5een the poles. /his results in high positional resolution and smooth rotation o:er a 5ide speed range. 1sing microstepping pre:ents speed re:ersals. /he desired currents in microstepping for a #(phase PMSM are t5o sinusoidal inputs shifted ><o. /he microstepping control of stepper motor is useful in precision positioning control s4stem. It has -een implemented in PIC microcontroller and also in MA/,AB( SIM1,I.%. /he stepper motor has -een simulated using the mathematical model as discussed -elo5. B. Mathematical Model of the Stepper Motor /he follo5ing parametersC are used for the purpose of defining the mathematical modelE F1 F# and i1 i# are the :oltages and currents in phases A and B. is the rotor speed is the rotor position

I.

I./'0*1C/I0.

Permanent magnet stepper motor 2PMSM3 has -ecome popular in positioning applications -ecause of their dura-ilit4 high efficienc4 simplicit4 and relia-ilit4 as 5ell as high tor6ue to inertia ratio and a-sence of rotor 5inding 71 #8. It 5or!s considera-l4 5ell in open loop control. 9o5e:er in precise positioning application the standard PMSM has some pro-lems 7$8. Standard PMSM usuall4 ha:e large 21;#<< of a re:olution or 1.8o3 step si=e 5hich can also cause motor(shaft oscillations at lo5 speeds. So microstepping controller 5as in:ented and used to impro:e the motion sta-ilit4 and to increase the positioning resolution 7&8. Microstepping of t5o phase stepper motor is achie:ed -4 appl4ing t5o sinusoidal inputs 5ith >< electrical degrees shifted to the PMSM. /hese inputs su-di:ide each full step electronicall4 into a large num-er of smaller steps. Microstepping increases the position resolution smoothness and it largel4 eliminates the "er!4 character of lo5( speed PMSM operation and noises at intermediate speeds 7?8. 0n the other hand in open loop microstepping control currents are decreased due to the -ac! )MF and ha:e phase lags due to the phase inductances. /hus :arious feed-ac! control methods ha:e -een de:eloped to impro:e the performance of microstepping 768@71$8. Micro(stepping 5ith proportional and integral 2PI3 current feed-ac!s ha:e -een used in 768 778 and 788. Micro(stepping 5ith PI current feed-ac! and feedfor5ard 5as proposed in 7>8 to impro:e the trac!ing performance of the desired currents. A microstepping method 5ith a proportional(integral(deri:ati:e 2PI*3 controller has also -een designed 71<8. ,4apuno:(-ased controller for microstepping proposed in 7118 71#8. In 71$8 an adapti:e o-ser:er(-ased nonlinear control for microstepping 5as designed to trac! the desired position and estimate the phase resistances. All these controllers discussed a-o:e are computationall4 eApensi:e 5hich are generall4 implemented

B is the friction coefficient G is the inertia of the motor % is the motor to6ue constant ' is the resistance of the phase 5inding L is the inductance of the phase 5inding N is the num-er of the rotor teeth. /he inductance change detent tor6ue and slight magnetic coupling -et5een the phases are neglected in this model. Ideal sinusoidal fluA distri-ution is assumed 7118. /he state space representation of the d4namical e6uation is H f(x,u) 7118 7168 5here

Fig 1. Bloc! diagram of microstepping stepper motor precision positioning s4stem


S tart S elect duty cycle of S PWM from S LUT

Check phase angle=1 !! or phase angle=!!

Yes

Change phase

xH

is state :ector and u H

is the input.

No Check "f#"m$n Yes "ncrease duty '$dth

/he d4namical e6uation is gi:en -4E


No

H 213 H 2#3 H 2$3 HI 2&3 /he mathematical model discussed a-o:e along 5ith the current control algorithm has -een implemented in the MA/,AB(SIM1,I.% III. C1'')./ C0./'0, A,D0'I/9M /he current has -een controlled -4 controlling the 5idth of the dut4 c4cle of the sinusoidal pulse 5idth modulated signal 2SPJM3 signal. A sine loo! up ta-le 2S,1/3 has -een generated 5here the dut4 c4cle :aries sinusoidall4. Current has -een controlled -4 controlling the 5idth of the dut4 c4cle of the S,1/. /he feed-ac! current has -een compared 5ith the desire current limit 2Imin K Id K ImaA3. If the feed-ac! current 2If3 is greater than the maAimum current limit 2ImaA3 then the 5idth of the dut4 c4cles of SPJM has -een decreased -4 a fraction. In case of the feed-ac! current is smaller than the minimum current 2Imin3 limit then the 5idth of the same has -een increased -4 a fraction. /he flo5 diagram of the current control algorithm has -een sho5n in fig #.
Command pulse Current +,-r$dge Stepper Fig 1. Stepper motor current control -loc! diagram control algor$thm dr$.er motor SPWM

Check "f%"ma&

Yes

(ecrease duty '$dth

No

Fig #. Current control algorithm

IF.

SIM1,A/I0. A.* )LP)'IM)./A, ')S1,/S

/he stepper motor and the current control algorithm ha:e -een modeled using MA/,AB(SIM1,I.% as sho5n in fig $. /he parameters of the stepper motor that is used for eAperimentation and simulation are gi:en in /a-le 1. 9ere $# steps for 1.8o has -een ta!en 2i.e. 6&<< steps per re:olution3. /he speed profile and the desired position are sho5n in fig &. If Md is the desired position and I p is the pea! amplitude of the input current then desired current in t5o phases are i1d = Ipsin(N d) and i!d = Ipcos(N d), 5hich is sho5n in fig ?. /he output phase currents in stepper motor 5ithout current control feed-ac! are sho5n in fig 6. Je can o-ser:e that the phase currents ha:e reduced due to -ac! )MF. /he output phase current has reached its desire current le:el -4 implementing the close loop current feed-ac! control algorithm as sho5n in fig 7. /he position trac!ing error is gi:en in fig 8. /he control algorithm has -een implemented in PIC16F877A microcontroller. /he eAperimental setup of the stepper motor is sho5n in fig 8. /he eAperimental results of the currents in t5o phases are gi:en in fig >. /he magnitude of the current can -e controlled -4 selecting the :alue of ImaA and Imin .
/AB,) I
Parameters Value

9olding tor6ue 'ated current Jiring resistance ' Jinding inductance , 'otor inertia G

<.?# . m #A;phase <.>N;phase $.8m9;phase <.1&A1<(& !g m# <.?? !g

)eed*ack current

Mass Jeight M
Lo' pass f$lter

Fig $. SIM1,I.% model of the current controlled stepper motor Fig 6. 0utput phase currents 5ithout current feed-ac! loop

Fig &. Speed profile and desired phase angle Fig 7. 0utput phase currents 5ith current feed-ac! loop

Fig ?. *esired input phase currents

Fig 8. /rac!ing position error

controlling the 5idth of the dut4 c4cle of the SPJM signal. /he stepper motor and control algorithm has -een simulated using MA/,AB(SIM1,I.% and also eAperimentall4 :alidated. /his 5or! is important for de:eloping a lo5 cost precision positioning control s4stem. ')F)').C)S
718 7#8 7$8 B. C. %uo /heor4 and Applications of the Step Motors..e5 Oor!E Jest Pu-lishing Co. 1>7&. P. P. Acarnle4 Stepping MotorsE A Duide to Modern /heor4 and Practice. .e5 Oor!E Peregrinus 1>8#. Microstepping httpE;;machinedesign.com;Basics0f*esign)ngineeringItem;71&;6?78>; Microstepping.aspA. *ouglas J. Gones ?. Microstepping of Stepping Motors httpE;;555.cs.uio5a.edu; "ones;step;micro.html. M. F. 'ahman and A. Poo PAn application oriented test procedure for designing microstepping step motor controllers Q I))) /rans. Ind. )lectron. :ol. $? no. & pp. ?&#@?&6 .o:. 1>88. A. Bellini C. Concari D. Franceschini and A. /oscani PMiAed(mode PJM for high(performance stepping motors Q I))) /rans. Ind. )lectron. :ol. ?& no. 6 pp. $167@$177 *ec. #<<7. S. Manea PStepper motor control 5ith dsPIC *SCs Q Microchip Application .ote pp. 1@#6 #<<>. Core /echnolog4 Motors and Control S4stems for Precise Motion Control. 70nline8. A:aila-leE httpE;;555.1( core.com;li-rar4;auto;motion(control; J. %im I. Choi and C. C. Chung PMicrostepping 5ith PI feed-ac! and feedfor5ard for permanent magnet stepper motors Q in Proc. ICCAS( SIC) #<<> pp. 6<$@6<7. A. S. Dhafari and M. Beh=ad PIn:estigation of the micro(step control positioning s4stem performance affected -4 random input signals Q Mechatronics :ol. 1? no. 1< pp. 117?@118> *ec. #<<?. J. %im I. Choi %. Bae and C. C. Chung PA ,4apuno: method in microstepping control for permanent magnet stepper motors Q in Proc. I))) Int. Conf. Mechatron. #<<> pp. 1@?. J. %im I. Choi and C. C. Chung P,4apuno:(-ased control in microstepping 5ith a nonlinear o-ser:er for permanent magnet stepper motors Q in Proc. Amer. Contr. Conf. #<1< pp. &$1$@&$18. J. %im *. Shin and C. C. Chung PAdapti:e o-ser:er(-ased nonlinear control in microstepping for permanent magnet stepper motors Q in Proc. I))) Conf. *ecision Control #<1< pp. &?>&@&?>>. J. %im *. Shin and C. C. Chung RMicrostepping 1sing a *istur-ance 0-ser:er and a Faria-le Structure Controller for Permanent(Magnet Stepper Motors R I))) /ransactions on Industrial )lectronics :ol. 6< no. 7 Gul4 #<1$. 7>8 /. C. Chin *. P. Mital M. A. Ga--ar RA Stepper Motor ControllerR I)/ International Conference on Control(88 pp. ?<<(?<? 1>88. M. Bodson G. Chiasson '. .o:otna! and '. Fte!o5s!i R9ighPerfonnance .onlinear Feed-ac! Control of a Pennanent Magnet Stepper Motor R I))) trans. on Control S4stems /echnolog4 :ol. 1 no. 1 pp. ?( 1& 1>>$.

7&8 7?8

768 Fig 8. )Aperimental setup of current controlled stepper motor 778 788

7>8

71<8

7118

71#8

Fig >. )Aperimental output of phase currents

71$8

C0.C,1/I0. Among the :arious reasons for the popularit4 of the stepper motor one of the :ital reason is that it performs considera-l4 5ell in the open loop. 9ere 5e ha:e implemented an open loop microstepping control algorithm using PIC microcontroller 16F877A. /5o sinusoidal pulse 5idth modulated 2SPJM3 signals ha:e -een generated 5ith ><o phase difference using the PIC microcontroller. Current feed-ac! is gi:en to the controller to control the phase current constant 5ithin a prescri-ed limit to increase the positioning accurac4. /his has -een achie:ed -4

71&8

71?8 7168

You might also like