Simple Torque Control Method for Hybrid Stepper Motors Implemented in FPGA
Total Page:16
File Type:pdf, Size:1020Kb
electronics Article Simple Torque Control Method for Hybrid Stepper Motors Implemented in FPGA Stefano Ricci * and Valentino Meacci Information Engineering Department (DINFO), University of Florence, 50139 Florence, Italy; valentino.meacci@unifi.it * Correspondence: stefano.ricci@unifi.it; Tel.: +39-0552758585 Received: 12 September 2018; Accepted: 4 October 2018; Published: 7 October 2018 Abstract: Stepper motors are employed in a wide range of consumer and industrial applications. Their use is simple: a digital device generates pulse-bursts and a direction bit towards a power driver that produces the 2-phase currents feeding the motor windings. Despite its simplicity, this open-loop approach fails if the torque load exceeds the motor capacity, so the motor and driver should be oversized at the expense of efficiency and cost. Field-Oriented closed-loop Control (FOC) solves the problem, and the recent availability of low cost electronics devices like Digital Signal Processors, Field Programmable Gate Arrays (FPGA), or even Microcontrollers with dedicated peripherals, fostered the investigation and implementation of several variants of the FOC method. In this paper, a simple and economic FOC torque control method for hybrid stepper motors is presented. The load angle is corrected accordingly to the actual shaft position through pulse-bursts and direction commands issued towards a commercial stepper driver, which manages the 2-phase winding currents. Thanks to the FPGA implementation, the control loop updates the electrical position every 50 µs only, thus allowing a load angle accuracy of −1/100 rad for a rotor velocity up to 750 rev/min, as shown in the reported experiments. Keywords: stepper motor; torque control; closed-loop control; Field Programmable Gate Array (FPGA) 1. Introduction The stepper motor [1] is widely used nowadays in a large range of applications such as 3D printers, industrial manufacturing tools, robotic arms, etc. Part of its success is certainly due to its capability of moving in a sequence of accurate and discreet locations (steps). A microcontroller connected to one of the several power drivers available on the market through a “step” clock and a “direction” command is often sufficient for the motor control [2]: For every “step” pulse, the driver modifies the 2-phase currents that feed the motor so that the shaft rotates by a “step” (typically 1.8◦) or a fraction of it (µ-step) [3]. Unfortunately, the performance of the stepper motor heavily depends on the load condition. Therefore, if the load accidentally increases over the motor capacity, the control misses the actual shaft position and the application fails. To prevent this catastrophic event, stepper motors (and their drivers) are typically selected with a torque capacity that abundantly exceeds the nominal requirement. This results in oversized motors, and waste of power and heat [4]. Closed-loop motor control with the Field Oriented Control (FOC) method [5,6] solves this problem. The typical FOC implementation is based on Direct-Quadrature (DQ) coordinate transformations [6,7] that, in the past, required a considerable calculation effort and correspondingly complex hardware, which was not compatible with economic consumer applications. In recent years, however, the availability of microcontrollers with dedicated peripherals and/or economic Field Programmable Electronics 2018, 7, 242; doi:10.3390/electronics7100242 www.mdpi.com/journal/electronics Electronics 2018, 7, 242 2 of 15 Gate Arrays (FPGAs) has supported the development and implementation of new closed-loop approaches. In particular, FPGA represents a standard device for industrial applications [8,9], including motor control. For example, a Proportional-Integral-Derivative (PID) controller [10] with velocity feed-forward was proposed in [11]; in [12] a closed-loop control system based on motor parameter identification was presented; in [13] and [14], motor controllers based on Neural Networks are proposed. In this paper a closed-loop torque control method for hybrid stepper motors is presented with its FPGA implementation. The method is based on a simple control loop that, thanks to the FPGA’s performance, executes every few 10 s of µs. Every loop iteration, the motor shaft position is monitored through an incremental encoder, and the stator magnetic field position is updated so that the relative phase between the positions of the stator and the rotor generates the desired load angle. While this quick loop maintains accurate control of the load angle, the magnitude of the phase currents is adjusted to obtain the programmed torque. The output of the control loop consists of the number of µ-steps and the direction bit the rotor should move to maintain the desired load angle. These data perfectly fit with the “step/direction” interface present in several commercial power devices which are typically employed for open-loop µ-step motor control. In other words, this method does not need custom power electronics for the generation and control of the motor phase currents, which can be delivered by one of the monolithic devices already available in the market. The proposed control is implemented in a FPGA from the MAX10 family (Intel/Altera, San Jose, CA, USA), connected to the PowerStep01 stepper driver (STMicroelectronics, Geneva, Switzerland). The paper presents the basics of the applied method in the next section; the employed electronics system and the FPGA implementation are described in Section3; finally, several experiments are reported in Section4. 2. Methods 2.1. Torque Generation and Step Movement In a hybrid 2-phase stepper motor, the torque is generated by the interaction of the field produced by the rotor fixed magnet, and the field dynamically generated by the stator windings. The torque is composed by 3 components: the cogging, the reluctance, and the electrodynamic component [15,16]; however, in this work, the electrodynamic component, being predominant, is the only one considered. With reference to Figure1, if Ia and Ib are the currents flowing in the 2 windings, the magnitude and q angle of the resulting current is I = I2 + I2 and q = tan−1 Ib . The motor torque G is generated a b I Ia E by I combined to the load angle qL, i.e., the phase angle between the rotor position qR and the current position qI [15]: GE = Kt·I· sin(qL) = Kt·I· sin(qR − qI ) (1) where Kt is the torque constant. The torque is null when qL = 0 independently from the current magnitude, and it is maximum when qL = π/2. A sinusoidal current excitation produces a continuous rotation of the current vector of amplitude I and a corresponding movement of the equilibrium position of the rotor. However, the typical commercial stepper driver produces only a limited set of quantized values of the phase currents. If NM is the number of the different current levels the driver produces, 4NM equilibrium positions are generated around the electrical circle of Figure1 in ( − ) q = 0, p , 2 p , 3 p ,... 4NM 1 p [3]. R 2NM 2NM 2NM 2NM ElectronicsElectronics2018 2018,,7 7,, 242 x FOR PEER REVIEW 33 ofof 1516 It I ib 휃퐼 휃퐿푡 휃퐿 휃퐼 휃푅 ia ia ib Figure 1. In a stepper motor the torque is related to the load angle 휃 , present between the rotor Figure 1. In a stepper motor the torque is related to the load angle qL, present퐿 between the rotor magnet, magnet, 휃 , and the current field, 휃 . The target load angle 휃 is obtained by advancing of 휃 the qR, and the푅 current field, qI. The target퐼 load angle qLt is obtained퐿푡 by advancing of qIn the current퐼푛 current field 휃 . field qi. 푖 2.2.2.2. TorqueTorque ModulationModulation AccordingAccording toto (1),(1), thethe torquetorque cancan bebe modulatedmodulated byby controllingcontrolling thethe loadloadangle, angle,q L휃,퐿, and/or and/or thethe current,current,I .퐼. The The typical typical FOC FOC application application regulates regulates the the motor motor windings windings currents currents to generate to generate a load a angle load ±π ofangleqL = of 휃/2,퐿 = and±π/2, the and current the current magnitude magnitudeI modulates 퐼 mo thedulate torque.s the This torque is the. This most is efficientthe most approach, efficient sinceapproach, the minimum since the current minimum is used current for a is given used torque. for a given However, torque in.some However, situations, in some maintaining situationsI, fixedmaintaining and modulating 퐼 fixed and the modulating torque through the torqueqL can bethrough convenient. 휃퐿 can Let’s be convenient. consider, for Let’s example, consider, a 10 for A motorexample, driver a 10A that, mo attor a particular driver that, moment, at a particular is required moment, to produce is required a low torque to produce of 1/100 a oflow the torque nominal of ◦ value.1/100 of By the controlling nominal thevalue. load By angle controlling to 90 , the windings’load angle currentto 90°, magnitudethe windings should’ current be reducedmagnitude to 10/100should =be 0.1 reduced A. It is to feasible 10/100that = 0.1A. the driver,It is feasible which that typically the driver, employs which chopper typically amplifiers employs designed chopper foramplifiers high currents, designed suffers for high reduced currents, accuracy suffers in reduced this low currentaccuracy range in this [17 low]. Thus, current imposing range [1 a7 current]. Thus, ( ) = magnitudeimposing a of, current for example, magnitudeI = 1 of, A, andfor example, reducing the퐼 = load1A, and angle reducing at sin qL the load1/10 ,angle can help at sin to( make휃퐿) = the1/10 driver, can producehelp to make the