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 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” 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 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 , 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 θ = tan−1 Ib . The motor torque Γ is generated a b I Ia E by I combined to the load angle θL, i.e., the phase angle between the rotor position θR and the current position θI [15]: ΓE = Kt·I· sin(θL) = Kt·I· sin(θR − θI ) (1) where Kt is the torque constant. The torque is null when θL = 0 independently from the current magnitude, and it is maximum when θL = π/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 ( − ) θ = 0, π , 2 π , 3 π ,... 4NM 1 π [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 θL, present퐿 between the rotor magnet, magnet, 휃 , and the current field, 휃 . The target load angle 휃 is obtained by advancing of 휃 the θR, and the푅 current field, θI. The target퐼 load angle θLt is obtained퐿푡 by advancing of θIn the current퐼푛 current field 휃 . field θi. 푖

2.2.2.2. TorqueTorque ModulationModulation

AccordingAccording to to (1), (1), thethe torque torque can can be be modulated modulated by by controlling controlling the the load loadangle, angle,θ L휃,퐿, and/or and/or the the 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 ±π ofangleθL = of 휃/2,퐿 = and±π/2, the and current the current magnitude magnitudeI modulates 퐼 mo thedulate torque.s the This torque is the. This most is efficient the 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 torqueθL 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 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, and for example,reducing the퐼 = load 1A, and angle reducing at sin θL the load1/10 , angle can help at sin to( make휃퐿) = the1/10 driver, can producehelp to make the desired the driver torque produce while the working desired in torque its preferred while currentworking range. in its preferred current range.In order to show that the proposed method is able to modulate the torque by changing both I andInθL order, in the to proposedshow that implementation the proposed method we chose is able a double to modulate control the approach, torque by as changing summarized both in 퐼

Tableand 1휃.퐿, Which in the of pr theoposed 2 control implementation approaches is we applied chose dependsa double on control the instantaneous approach, as required summarized torque in ratioTableΓ E1./ WhichΓM, where of theΓM 2 =controlKt·IM approachesis the nominal is applied torque depends of the motor, on the produced instantaneous at the nominal required current torque

IratioM with 훤퐸⁄ the훤푀, maximumwhere 훤푀 = load퐾푡 angle.∙ 퐼푀 is the For nominal high torque torque values, of the i.e., motor,ΓE/ΓM produced> 10% (see at firstthe nominal row of Table current1), ±π the퐼푀 samewith the approach maximum as in load the FOCangle. is used:For high the torque load angle values, is fixed i.e., to훤퐸⁄훤푀>10%/2, and, (see from first (1),row the of torqueTable 1 is), ΓtheE = same±Kt Iapproach, which is as modulated in the FOC by is controlling used: the Iload(the angle sign depends is fixed onto ±π/2, the direction and, from of rotation).(1), the torque On the is other훤퐸 = ± hand, 퐾푡퐼, whenwhicha is torque modulated lower by than controllingΓE/ΓM = 10%퐼 (the is requiredsign depends (bottom on the row direction in the table), of rotation). the current On · = IM ( ) isthe fixed other to I hand,= 0.1 I whenM. From a torque (1), the lower torque than is Γ E훤퐸⁄훤푀K=10%t 10 sin isθ requiredL , which (bottom is modulated row inby the changing table),θ L the. 퐼푀 current is fixed to 퐼=0.1·퐼푀 . From (1), the torque is 훤퐸 = 퐾푡 sin(휃퐿), which is modulated by Table 1. Torque modulation control strategy10 (1/2). changing 휃퐿. Condition Control Strategy Angle Current Torque Table 1. Torque modulation control strategy (1/2). ΓE Angle fixed, ΓE π > 0.1 θL = ± I ΓE = ±Kt I (2a) ΓM modulated by I 2 Condition Control strategy Angle Current Torque ΓE Current fixed ΓE IM IM Γ < 0.1 θL I = ΓE = Kt sin(θL) (2b) M 훤퐸 controlledAngle fixed, by θL 휋 10 10 > 0.1 휃퐿 = ± 퐼 훤퐸 = ± 퐾푡퐼 (2a) 훤푀 훤퐸 modulated by 퐼 2

Electronics 2018, 7, 242 4 of 15

The Torque column of Table1 describes the achieved torque when the current magnitude and the load angle are known. To control the motor we need the opposite, i.e., given a desired torque ΓE, we need to know the load angle, θL, and the current, I, which produce such a torque. This result is obtained by solving the torque equations present in the Torque column of Table1 with respect to the current I and the angle θL (first row and second row of Table2):

Table 2. Torque modulation control strategy (2/2).

Condition Control Strategy Angle Current Torque

ΓE Angle fixed, ΓE π ΓE ΓE > 0.1 θL = ± I = = IM ΓE (3a) ΓM modulated by I 2 Kt ΓM   ΓE Current fixed ΓE −1 10·ΓE IM Γ < 0.1 θL = sin Γ I = ΓE (3b) M controlled by θL M 10

Table2 should be read as follow: given the desired torque ΓE, the load angle and current to be used with the the motor to generate such a torque are those reported in Angle and Current columns, at the row selected by the Condition column. It is now convenient to distinguish the actual current I and load angle θL, from the target current It and load angle θLt, respectively. With reference to Figure1, the first are the values currently present in the motor, while the others are the values that the motor control should achieve for generating the imposed torque. According to the aforementioned strategy, the electronics control, during the rotor movement, should drive the 2-phase currents so that I has the desired amplitude (I = It) and is dynamically positioned to maintain the target load angle (θL = θLt). Thus, if θR and θI are the actual rotor and current positions, (see Figure1), the current position should be incremented/decremented by an angle of: θIn = θLt − θL = θLt + θR − θI. (4) For practical reasons, since we are going to use a µ-step driver where the current position can be incremented/decremented in discrete steps of amplitude 2π/4/NM rad, it is convenient to rewrite (4) as: STi = LAT + RP − CP (5) where STi, LAT, RP, CP, correspond to θIn, θLt, θR, θI, respectively, now expressed in µ-step unit. For a better understanding of the proposed method, Figure2 summarizes the control procedure. The instantaneous desired torque, expressed as torque ratio ΓE , the present current position, CP, and ΓM rotor position, RP, are inputs to the procedure. The calculation is divided into 2 steps. In the first step (Figure2, top), the torque ratio is compared to the 0.1 threshold. If higher (Y-branch of the graph in π Figure2), the load angle is fixed to the maximum, i.e., θLt = 2 , corresponding to LAT = NM µ-steps, and the current magnitude is calculated according to (3a). On the other hand, if the torque ratio is lower than the threshold (N-branch of the graph in Figure2), the current module is set to its minimum It = 0.1·IM, and the torque is modulated through the load angle, as calculated by (3b). Electronics 2018, 7, 242 5 of 15 Electronics 2018, 7, x FOR PEER REVIEW 5 of 16

훤 퐸⁄ 푅푃 C푃 훤푀 inputs

N Y >10%

1st step 10 LA = sin-1 LAT = Nm T 푀 훤퐸 퐼 = 퐼푀/10 퐼 = 퐼푀 훤푀 LAT Torque blk 퐼

퐿퐴푇 LoadAngle blk 2nd step 푆푇푖 = 퐿퐴푇 + 푅푃 − 퐶푃 푆푇푖

푆푇 퐼 outputs 푖 FigureFigure 2.2. ProcedureProcedure ofof thethe proposedproposed controlcontrol method.method.

In the second step (Figure2, bottom), the target load angle LAT and the actual current and rotor In the second step (Figure 2, bottom), the target load angle 퐿퐴푇 and the actual current and rotor positions are used in (5) to obtain the number of µ-steps STi necessary to update the CP position so positions are used in (5) to obtain the number of μ-steps 푆푇푖 necessary to update the 퐶푃 position so that the load angle changes from θL to the target load angle θLt. The output values It and STi are finally that the load angle changes from 휃퐿 to the target load angle 휃퐿푡. The output values 퐼푡 and 푆푇푖 are sent to the . Please note that when the border value of ΓE = 0.1·ΓM is used in both the finally sent to the motor drive. Please note that when the border value of 훤퐸 = 0.1∙훤푀 is used in both branches of the procedure, it produces the same current module It = 0.1·IM and target load angle the branches of the procedure, it produces the same current module 퐼푡 = 0.1 ∙ 퐼푀 and target load LAT = NM. This confirms that the decision above the threshold does not produce discontinuities in angle 퐿퐴푇 = 푁푀 . This confirms that the decision above the threshold does not produce thediscontinuities generated currents in the generated and target currents angles. and target angles. TheThe 2nd 2nd stepstep of of the the descripted descripted procedure procedure represents represents the quick the and quick simple and control simple loop control mentioned loop inmentioned Section1 .in It Sec. should I. It loopshould at aloop high at rate, a high so thatrate, CPso that tracks CP RP tracks accurately RP accurately with the with correct the phasecorrect duringphase during the motion the motion of the of shaft, the shaft, which which can rotatecan rotate at several at several rev/s. rev/s. On On the the other other hand, hand, the the 1st 1st stepstep isis moremore relaxed,relaxed, sincesince thethe torquetorque changeschanges areare affectedaffected byby thethe relativelyrelatively slowslow dynamicsdynamics ofof thethe motormotor mechanics.mechanics. For For example, example, let let us us consider consider a motor a motor running running at a constant at a constant velocity velocity of 1000 of rpm 1000 and rpm loaded and byloaded a constant by a constant resistant resistant torque. t Inorque. case In of case a 200-step/turn of a 200-step/turn motor motor controlled controlled with 16withµ-step 16 μ per-step step, per thestep, shaft the runsshaft a runsµ-step a μ every-step 20everyµs. 20 To μs. maintain To maintain the load the angle, load theangle, control the control loop should loop should correct thecorrect CP position with comparable timing, while no change is made to It and θLt. the CP position with comparable timing, while no change is made to 퐼푡 and 휃퐿푡. 3. Method Implementation 3. Method Implementation 3.1. The Electronics 3.1. The Electronics The proposed method was implemented in an electronics system based on 3 boards (see Figure3). The proposed method was implemented in an electronics system based on 3 boards (see Figure The DECA MAX10 (Arrow Electronics, Centennial, CO) includes an FPGA from the low-cost MAX10 3). The DECA MAX10 (Arrow Electronics, Centennial, CO) includes an FPGA from the low-cost family produced by Altera (San Jose, CA). It is connected to a homemade interface board that includes MAX10 family produced by Altera (San Jose, CA). It is connected to a homemade interface board the basic electronics to read the quadrature signals from incremental encoders, and to connect to that includes the basic electronics to read the quadrature signals from incremental encoders, and to the evaluation boards of the PowerSTEP01 motor control device. The board and the device are both connect to the evaluation boards of the PowerSTEP01 motor control device. The board and the produced by STMicroelectronics (Geneva, Switzerland). PowerSTEP01 is able to drive a stepper device are both produced by STMicroelectronics (Geneva, Switzerland). PowerSTEP01 is able to motor with up to 80 V and 10 A currents in an open loop. In this work, the device was set for drive a stepper motor with up to 80V and 10A currents in an open loop. In this work, the device was NM = 16 (1/16 µ-step mode), and used in “Step-clock” mode, where it rotates the current position, CP, set for 푁 =16 (1/16 μ-step mode), and used in “Step-clock” mode, where it rotates the current by a single푀µ-step every rise-edge generated on the step-clock signal. The direction of the rotation and position, 퐶푃, by a single µ-step every rise-edge generated on the step-clock signal. The direction of the current are set by specific commands sent through a SPI channel. the rotation and the current are set by specific commands sent through a SPI channel.

Electronics 2018, 7, 242 6 of 15 Electronics 2018, 7, x FOR PEER REVIEW 6 of 16

Figure 3. The electronics system is composed of the DECA Max10 and the EVLPOWERStep01 Figure 3. The electronics system is composed of the DECA Max10 and the EVLPOWERStep01 developing boards connected through a homemade interface board. A second drive board can be developing boards connected through a homemade interface board. A second drive board can be connected to simultaneously drive 2 motors. connected to simultaneously drive 2 motors. 3.2. FPGA Implementation 3.2. FPGA Implementation The proposed method is implemented in the FPGA of the DECA MAX10 board, and is sketched The proposed method is implemented in the FPGA of the DECA MAX10 board, and is sketched in Figure4. This implementation refers to a stepper driver set for NM = 16 and a 10 k pulse-per-turn 푁 encoder;in Figure however, 4. This implementation it can easily be adaptedrefers to to a differentstepper driver settings. set The for time-critical푀=16 and a calculations, 10k pulse-per like-turn the controlencoder loop; however (5), are, it implementedcan easily be adapted in the FPGA to different fabric settings. and coded The directly time-critical in VHDL, calculations, while parts like the of thecontrol remaining loop (5), tasks are implemented are coded in the in the C language FPGA fabric and and run coded in a NiosII directly®soft in processorVHDL, while included parts inof thethe FPGA.remaining This tasks approach are coded allowed in lowthe executionC language time and for run the in control a NiosII® loop (5)soft and processor a faster andincluded easier in code the developmentFPGA. This approach for the otherallowed tasks. low Theexecut sectionsion time coded for the in control the soft-processor loop (5) andinclude a faster aand conventional easier code Proportional-Integraldevelopment for the (PI) other controller tasks. The [10 ] sections and a simple coded trajectory in the soft generator,-processor which include are ancillary a conventional blocks thatProportional are necessary-Integral to allow (PI) the controller experimental [10] and test a of simple the torque trajectory control generator method. , which are ancillary blocksWith that reference are necessary to Figure to allow4, the softthe experimental processor includes test of the the simple torque trajectory control method. loop, that according to With reference to Figure 4, the soft processor includes the simple trajectory loop, that according a programmed trajectory, calculates the target position PT every 1 ms. PT feeds the PI controller [10] to a programmed trajectory, calculates the target position PT every 1 ms. PT feeds the PI controller that compares PT to the actual position PA and outputs the target torque ΓE. The torque is then T 훤 processed[10] that compares in the Torque P to block the, actual which position applies the PA first and step outputs of the the control target procedure torque 퐸 detailed. The torque in Figure is then2, processed in the Torque block, which applies the first step of the control procedure detailed in Figure and generates the required current It and the target load angle LAT. LAT is delivered to the LoadAngle 2, and generates the required current 퐼푡 and the target load angle 퐿퐴푇. 퐿퐴푇 is delivered to the block, while It is directly programmed to the driver through the SPI. Both the PI and the load angle 퐼 calculationLoadAngle block run, every while 200 푡 µiss. directly programmed to the driver through the SPI. Both the PI and the load Theangle FPGA calculation fabrics run include every several 200 μs. interacting blocks. The EncCnt counter (Figure4 top, right) tracksThe the FPGA actual fabrics rotor positioninclude PAseveral by integrating interacting theblocks. quadrature The EncCnt signals counter produced (Figure by the4 top, encoder. right) PAtracks is then the usedactual by rotor the PIposition and the PAMapper by integrating block in the the FPGA quadrature fabric. signals produced by the encoder. PA isIn then the usedMapper by blockthe PI, theand physical the Mapper position block in of the the FPGA rotor PAfabric. is converted from encoder to µ-step In the Mapper block, the physical position of the rotor PA is converted from encoder to μ-step units [18] (8/25 factor for 10 k pulse/turn encoder and NM = 16). The least-significant 5 bits of this 푁 valueunits [ maps18] (8/25 the factor rotorposition for 10k pulse/turn in the electrical encoder circle and of Figure푀=16).1 ,The RP, least expressed-significant in µ-step 5 bits unit, of this which value is deliveredmaps the to rotor the LoadAngle position inblock. the electrical circle of Figure 1, RP, expressed in μ-step unit, which is deliveredThe current to the LoadAngle position CP block. is tracked in the StepMan block (see Figure4). The number of µ-steps The current position CP is tracked in the StepMan block (see Figure 4). The number of μ-steps STi demanded to the driver in every control cycle are accumulated in the “step counter” with a sign 푆푇푖 demanded to the driver in every control cycle are accumulated in the “step counter” with a sign that depends on the direction of rotation. The counter works with a 4푁푀 module: for 푁푀=16 a 5-bit counter is used.

Electronics 2018, 7, 242 7 of 15

that depends on the direction of rotation. The counter works with a 4NM module: for NM = 16 a 5-bit counterElectronics is 2018 used., 7, x FOR PEER REVIEW 7 of 16 The LoadAngle block (see Figure4) finally calculates the µ-steps required to maintain the desired The LoadAngle block (see Figure 4) finally calculates the μ-steps required to maintain the desired load angle, STi, by applying the second step of the control procedure described in Figure2 to the load angle, 푆푇푖, by applying the second step of the control procedure described in Figure 2 to the inputs provided from the blocks previously described. Every 50 µs, STi is delivered to the StepMan inputs provided from the blocks previously described. Every 50 µs, 푆푇푖 is delivered to the StepMan block that issues to the powerSTEP01 driver the direction command followed by a burst of STi electrical block that issues to the powerSTEP01 driver the direction command followed by a burst of 푆푇푖 pulseselectrical of 1 pulsesµs each. of 1 µs each.

NIOSII® 1 ms Trajectory Target Position

Cnt

Position PI

Enc

A Enc Target Torque 훤퐸

200 us Torque blk ⁄ M Position P Position 훤푀 Mot

Control step 1 Shaft 퐼 LAT Curr. Driver

퐿퐴푇

Dir. Step 50 us Control step 2 C푃 Pulse Pulse 푅푃 LoadAngle blk 푆푇푖 Count. Gen. StepMan blk

Scaling Factor LA 퐼푡 CP 푅푃 푆푇푖 (8/25) T Mod64 PC 0-63 0-3199 Mapper blk Sampling FPGA Debug Timer Memory

FigureFigure 4. 4.FPGA FPGA implementation implementation ofof thethe proposedproposed method.method. Control step 1 and Control step 2 refer to the calculationsthe calculations reported reported in the in correspondingthe corresponding steps steps of Figureof Figure2. 2. 3.3. Debug Memory 3.3. Debug Memory The FPGA includes a debug memory (see Figure4 bottom, right), where P A, LAT, It, CP, RP, and The FPGA includes a debug memory (see Figure 4 bottom, right), where PA, 퐿퐴푇, 퐼푡, CP, RP, STi parameters are simultaneously saved with a sampling rate set by the user from 1 µs to 100 ms. and 푆푇푖 parameters are simultaneously saved with a sampling rate set by the user from 1 μs to 100 Upms. to Up 4096 to values4096 values of each of parametereach parameter can be can saved be saved without without interfering interfer withing thewith algorithm. the algorithm. The memory The canmemory be downloaded can be downloaded to a host PCto a when host PC the when motor the is motor stopped. is stopped. Although Although this feature this feature has no impacthas no on theimpact algorithm, on the italgorithm, is essential it is for essential debugging for debug and performanceging and performance analysis. analysis.

3.4.3.4 Timings. Timings and and ResourcesResources

TheThe trajectory trajectory controllercontroller updates updates the the target target position position,, PT, P everyT, every 1 ms 1, ms,and andexecutes executes in 1.0 in μs 1.0 onµ as on aNios Nios processor processor clocked clocked at at100 100 MHz. MHz. The ThePI controller PI controller and the and torque the torque control control run every run 20 every0 μs, and 200 µs, andexecute execute the the calculations calculations in 1.5 in 1.5μs only.µs only. This This result result is obtained is obtained using using a look a look-up-up table table for forthe the sin sin inversion necessary in control step 1 (see Table 2, second row) for low torque condition. The remaining tasks, performed in FPGA fabric, are simple mathematical calculations or logic operations

Electronics 2018, 7, 242 8 of 15

Electronicsinversion 2018 necessary, 7, x FOR inPEER control REVIEW step 1 (see Table2, second row) for low torque condition. The remaining8 of 16 tasks, performed in FPGA fabric, are simple mathematical calculations or logic operations that take thata few take clock a few cycles clock at cycles most at to most execute. to execute The LoadAngle. The LoadAngleblock (stepblock 2 (step in Figure 2 in Figure2) is evaluated 2) is evaluated every every50 µs. 50 In μs. this In period, this period, the StepMan the StepManblock block issues issues a SPI commanda SPI command and a and step-clock a step- burstclock toburst the to driver the driver(see Figure (see 5Figure). The 5) SPI. The transmission, SPI transmission, 1 byte at 1 4byte MHz, at 4 takes MHz, about takes 3 aboutµs. PowerSTEP01 3 μs. PowerSTEP01 driver requires driver requiresa step-clock a step period-clock of period 1 µs, so of the 1 μs, maximum so the maximum length of thelength burst of is the of 32burstµs (everyis of 32 position μs (every in aposition 64 µ-steps in aelectrical 64 μ-steps circle electrical can be circle reached can by, be atreached maximum, by, at 32 maximum,µ-steps towards 32 μ-steps the shorter towards path). the shorter The minimum path ). Thetemporal minimum length temporal of a torque length control of a torque loop is con thustrol 3 loop + 32 is = thus 35 µ s,3 which+ 32 = 35 fits μs, well which in the fits 50 wellµs periodin the 50usedμs period here. used here.

50us 3us

SPI Dir Dir 1us Up to 32 CLK STEP

time

Figure 5. Timing of the commands sent to the power driver. Figure 5. Timing of the commands sent to the power driver. The resources employed in the FPGA are reported in Table3. As expected, most of the resources are usedThe by resource the Nioss employed®soft processor, in the while FPGA the are other reported control blocksin Table need 3. relatively As expected, few logicmost cells of andthe resourcesregisters, andare used no memory by the norNios® mathematical soft processor, processors while the (DSPs). other control blocks need relatively few logic cells and registers, and no memory nor mathematical processors (DSPs). Table 3. FPGA Resources employed by the control system. Table 3. FPGA Resources employed by the control system. FPGA Blok Logic Cell Dedicated Reg Memory Bits DSP FPGA Blok Logic Cell Dedicated Reg Memory bits DSP Nios 5017 3079 195,000 6 StepManagerNios 455017 303079 -195000 6 - LoadAngleStepManager + Mapper Blk 34945 13230 -- - - LoadAngleEnc CNT + Mapper Blk 167 349 67132 -- - - Enc CNT 167 67 - - 4. Experiments 4. Experiments 4.1. Experimental Set-Ups 4.1. ExperimentalThe control Set method-Ups was implemented in the electronics system reported in Section 3.1, which was connectedThe control to the method set-ups was shown implemented in Figure6. in The the set-up electronics is composed system byreported the M1233041 in Sec. 3 stepper.1, which motor was connected(Lam Technologies, to the set-ups Florence, shown Italy) in Fig connectedure 6. The toset the-up REV621is composed (Elap, by Milan, the M1233041 Italy) encoder stepper through motor (Lama flexible Technologies, mechanical Florence, coupling. Italy) Table connected4 reports theto the main REV621 features (Elap, of the Milan, employed Italy) motorencoder and through encoder. a flexible mechanical coupling. Table 4 reports the main features of the employed motor and encoder.

Electronics 2018, 7, 242 9 of 15 Electronics 2018, 7, x FOR PEER REVIEW 9 of 16

Figure 6. Experimental set-up with the stepper motor (left) connected to the encoder (right) through Figure 6. Experimental set-up with the stepper motor (left) connected to the encoder (right) through a flexible mechanical coupling (center). a flexible mechanical coupling (center). 4.2. Control Procedure Test 4.2. Control Procedure Test In this test, the trajectory and PI control loops implemented in the Nios II®were bypassed. The softIn this processor test, the wastrajectory programmed and PI control to set loops a fixed implemented torque ratio inΓ Ethe= Nios0.5. II® Being were the bypassed ratio higher. The 훤 ΓM thansoft processor the 0.1 threshold, was programmed the control to setsset a afixed fixed torque current ratioI = 퐸0.5⁄ ·I= 0.5.= 2.1 BeingA and the aratio 90◦ higherload angle, than t 훤푀 M i.e.,the 0.1LA threshold,T = NM = the16 µcontrol-steps. set Thes a debugfixed current memory 퐼푡 in= FPGA0.5 ∙ 퐼푀 was= 2 programmed.1A and a 90° toload acquire angle, a i.e. complete 퐿퐴푇 = µ set 푁푀 of= parameters16 µ-steps. everyThe debug 1 s. The memory motor in was FPGA enabled was for programmed 1 s, and when to acquire the rotor a reachedcomplete a stableset of velocityparameters after every the initial1 µs. The acceleration, motor was the enabled debug memoryfor 1s, and was when downloaded the rotor andreached processed a stable in velocity Matlab (Theafter Mathworks, the initial acceleration, Natick, MA, the USA). debug The memory parameters was trend downloaded is reported and in processed Figure7 for in Matlab a period (Th ofe aboutMathworks, 1.6 ms. Natick, The rotor MA, electrical USA). The position parameters (RP, Figure trend 7is first reported row) in completes Figure 7 anfor electricala period of revolution about 1.6 (ms.i.e., The 64 µ -stepsrotor )electrical in 0.68 ms. position An electrical (RP, Fig revolutionure 7 first corresponds row) completes to 4 steps an [electrical3]; thus, sincerevolution the employed (i.e. 64 motorμ-steps) features in 0.68 200ms. step/rev,An electrical the shaft revolution performs corresponds a complete to 4 physical steps [3 turn]; thus, in 200/4 since · the0.68 employed = 34 ms. Themotor current features electrical 200 step/rev, position, the CP, shaft is reported performs in the a complete 2nd row ofphysical Figure7 turn. As expected,in 200/4∙0. it68 has = 3 a4 step-like ms. The behavior,current electrical with each position, step being CP, is 50 reportedµs, i.e., the in the loop 2nd period. row of Similarly Figure 7 to. As RP, expected, CP performs it has an a electricalstep-like revolutionbehavior, with (0–64 eachµ-steps) step inbeing 34 ms. 50 μs, i.e. the loop period. Similarly to RP, CP performs an electrical revolution (0–64 μ-steps) in 34 ms. Table 4. Features of the Motor and the Encoder used in the experimental set-up. Table 4. Features of the Motor and the Encoder used in the experimental set-up. MOTOR ModelMOTOR M1233041 Model Manufacturer Lam Technologies,M1233041 Florence, Italy Manufacturer FlangeLam Technologies, NEMA23 Florence, Italy Step angle 1.8◦ (200 step/rev) Flange Hold Torque 1.1NEMA23 N·m Step angleDetent Torque1.8° 0.035 (200 N step/rev)·m Hold Torque Current 4.21.1 AN·m Detent TorquePhase Resistance 0.40.035 Ohm N·m Phase Inductance 1.2 mH Current 4.2 A Rotor Inertia 0.280 kg·cm−2 Phase Resistance 0.4 Ohm ENCODER Phase Inductance 1.2 mH Rotor Inertia Model0.280 REV621 kg·cm-2 Manufacturer Elap, Milan, Italy ENCODER Zero reference yes ModelPulse/revolution 10,000REV621 Manufacturer Elap, Milan, Italy Zero reference yes Every 50 µs, the controller calculates ST from RP and CP (see 3rd row of Figure7). In this Pulse/revolution i 10000 experiment, STi is in the range 5 ± 1 µ-steps, but most of the time is exactly 5 µ-steps. The calculated Every 50 μs, the controller calculates 푆푇푖 from RP and CP (see 3rd row of Figure 7). In this experiment, 푆푇푖 is in the range 5 ± 1 μ-steps, but most of the time is exactly 5 μ-steps. The calculated

Electronics 2018, 7, 242 10 of 15 Electronics 2018, 7, x FOR PEER REVIEW 10 of 16 valuevalue is isthen then used used to to update update CP CP in innext next control control period. period. The The measured measured load load angle, angle, calculated calculated in in MatlabMatlab®®as LA as M퐿퐴=푀CP= C− RP− R(see (see Figure Fig1ure) is reported1) is reported in the last in rowthe lastof Figure row 7 of, where Figure it is7, compared where it is tocompared the target to angle the targetLAT represented angle 퐿퐴푇 represented by the horizontal by the dashed horizontal line dashed at 16 µ -step.line at It16 features μ-step. aIt roughfeatures triangulara rough triangular shape of 50 shapeµs period. of 50 μs When period. the When CP is updatedthe CP is by updatedSTi µ-steps, by 푆푇LA푖 μM-steps,reaches 퐿퐴푀LA reachesT and the 퐿퐴푇 loadand angle the load error angle is zero. error Then, is zero. in the Then, following in the 50 followingµs, the shaft 50 moves,μs, the RPshaft rises, moves, and LARP Mrises,diminishes and 퐿퐴푀 untildiminishes the next until control the period next control zeroes period the error zeroes again. the error again.

50

RP RP (uSt) 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

50

CP CP (uSt) 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 10

5

(uSt) i

ST 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 20

(uSt) 10 M

LA 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 time (ms)

Figure 7. Rotor (RP) and Current (CP) Positions, Step Increment (STi), and measured Load Angle Figure 7. Rotor (RP) and Current (CP) Positions, Step Increment (푆푇푖), and measured Load Angle (LAM ) with fixed 2.5 A phase currents and 16 µ-steps target load angle (LAT ). (퐿퐴푀) with fixed 2.5A phase currents and 16 µ -steps target load angle (퐿퐴푇). This experiment helps to clarify that the error between the measured and target angle depends on This experiment helps to clarify that the error between the measured and target angle depends the motor velocity and the control period T. In fact, the higher the velocity, the wider the angle turned on the motor velocity and the control period T. In fact, the higher the velocity, the wider the angle by RP in the control period. Quantitatively, the load angle peak error, in µ-steps can be expressed as: turned by RP in the control period. Quantitatively, the load angle peak error, in μ-steps can be expressed as: ω Lerr = ·3200·T (6) 2πω Lerr = · 3200 · T (6) where ω is the motor velocity in rad/s and 3200 is2휋 the number of µ-steps per revolution. Since the errorwhere features ω is the a triangle-like motor velocity shape in (seerad/s last and row 3200 of is Figure the number7), its mean of μ value-steps isper half revolution. of the peak, Since i.e., the Lerr/2.error features a triangle-like shape (see last row of Figure 7), its mean value is half of the peak, i.e., Lerr/2. 4.3. Torque Load Disturbance Test 4.3With. Torque the Load set-up Disturbance used in previous Test experiment, the trajectory generator was disabled and the PI was enabledWith the with set its-up input used fixed in previous to PT = experiment, 0 (see Figure the4). trajectory The debug generator memory was was disabled programmed and the to PI savewas a parameterenabled with set its every input 200 fixedµs. Into this PT = test, 0 (see the Fig motorure shaft4). The was debug loaded memory with an was external programmed positive to torque,save a which parameter was released set every at 200μs. time t =In 0. this Figure test8, treportshe motor the shaft shaft was position loaded measured with an byexternal the encoder, positive PAtorque,, the current which ratio, was releasedIt/IM, the at target time t angle, = 0. FigLAureT, 8 calculated reports the by shaft the motor position control, measured and theby the measured encoder, loadPA, angle, the currentLAM, ratio, together It/IM with, the its target error angle, with respect퐿퐴푇, calculated to the target by the angle. motor control, and the measured loadBefore angle the, 퐿퐴 torque푀, together was released with its( terror< 0), with the control respect system to the target maintained angle.the rotor at position PA = 0 by imposingBefore the the maximum torque was load release angled (LAt < T0),= the−16 controlµ-steps system and a currentmaintained of about the rotor 50% ofat position the nominal PA = 0 value.by imposing After the the external maximum torque load was angle released 퐿퐴푇 (t >= − 0),16 the μ-steps control and system a current reacted of about by reducing 50% of the the current nominal value. After the external torque was released (t > 0), the control system reacted by reducing the current to its minimum of 10% in about 40 ms, then further reduced the torque by lowering the load

Electronics 2018, 7, 242 11 of 15 to its minimum of 10% in about 40 ms, then further reduced the torque by lowering the load angle towards 0. Meanwhile, due to the sudden load change, the shaft rotated of about −1.5 rad out of position, so the PI responded by imposing a slight positive load angle (t > 60 ms), while maintaining the current at its minimum level. The shaft recovered the target position in about 250 ms and the load angle decreased to 0. The error between the target and measured load angles, shown in last row, is within ±1 µ-step, except for few outliers. The load angle error is the same with (t < 0), and without (t > 0) the presence of load. The position error calculated as mean ± standard deviation of the errors measured before torque release (t < 0) is 0.05 ± 1.3 mrad, while after a stable condition was reached at t > 250 ms, is 0.09 ± 1.4 mrad. The test shows that the control reacts to a strong load change recovering the original position and controlling the load angle with a high level of accuracy.

4.4. Trajectory Test in Different Load Conditions The trajectory generator of Figure4 was programmed to produce a forward movement of 2 π rad, with a constant acceleration/deceleration of 270 rad/s2 and a maximum velocity of 16.4 rad/s. The experiment was repeated with the motor free, i.e., no load except the encoder, and with the motor connected to a load. The load was realized with a weight suspended by wire wrapped around the shaft. In the movement, the motor raised up the weight generating a torque that corresponds to about 20% of the full motor capacity. Figure9 reports the parameters acquired in the FPGA every 300 µs. Left and right columns report the measurements obtained without and with the load, respectively. The errors are expressed as mean ± standard deviation calculated on the samples population of the corresponding measurement. The measured position PA is reported on the 1st row of Figure9. The movement lasted 0.83 s; it featured a typical “S” shape, which is barely visible because of the high acceleration used. The position error Perr is shown in the 2nd row. In the experiment with no load, the error peaks up to ±0.2 rad in the high acceleration/deceleration regions, but it is as low as 1 ± 2 mrad in the constant velocity region. The motor reacts to the acceleration in presence of load with an oscillation error of ±0.02 rad, which damps down in 200 ms. In the remaining part of the constant velocity region, the error is the same as in the no-load condition. With load, after the movement, the controller recovers the right steady position a bit more slowly with respect to no-load condition. Electronics 2018, 7, 242 12 of 15 Electronics 2018, 7, x FOR PEER REVIEW 12 of 16

Figure 8. The rotor position is controlled at position 0. An external positive torque is applied and Figure 8. The rotor position is controlled at position 0. An external positive torque is applied and released at t = 0 (vertical dashed line). From top to bottom, physical Rotor position PA, motor current released at t = 0 (vertical dashed line). From top to bottom, physical Rotor position PA, motor current ratio (It/IM), target (LAT) and measured (LAM) load angles, and load angle error (Err), are reported. ratio (It/IM), target (LAT) and measured (LAM) load angles, and load angle error (Err), are reported. The measured velocity shows the expected trapezoidal shape with some oscillations. The velocity is reportedThe measured on the 3rd velocity row of Figure shows9 , the where expected it is compared trapezoidal to theshape target with value, some i.e., oscillation 16.4 rad/s,s. The highlightedvelocity is byreported the red on horizontal the 3rd row segment. of Figure The 9, velocity where errorit is compared was 0.01 ± to0.58 the rad/starget withvalue, no i.e. load,, 16.4 andrad/s, 0.02 highlighte± 0.85 rad/sd by with the thered load. horizontal segment. The velocity error was 0.01 ± 0.58 rad/s with no loadWithout, and 0.02 load, ± 0.85 as expected, rad/s with the the current load. was set to its 10% minimum (4th row, left) and the torque Without load, as expected, the current was set to its 10% minimum (4th row, left) and the torque was modulated by the load angle (LAT 5th row, left), which, during the movement, was about 10waµ-stepss modulated and reduced by the inload the angle steady (퐿퐴 region.푇 5th row, The left), error which, on the during load the angle movement, (Lerr, 6th wa row,s about left) 10 wasμ-steps0.03 ± and0.7 reduceµ-step.d Within the load, steady during region. the The movement, error on the the load load angle angle (Lerr, was fixed6th row, to its left) maximum, was 0.03 ± 0.7 μ-step. With load, during the◦ movement, the load angle was fixed to its maximum, i.e. 16 μ-step i.e., 16 µ-step corresponding to 90 (LAT 5th row, right), and the torque was modulated by the current th (4thcorresponding row, right), which to 90° was (퐿퐴 about푇 5th row, 20% ofright), the nominal and the value.torque At was the modulated end of the by movement, the current when (4 therow, torqueright) required, which wa reduced,s about the 20% current of the went nominal down value to 10%. At and the the end torque of the was movement, again modulated when the by torque the angle.required In this reduced, case, the the error current on the went load down angle to was 10%− and0.4 ± the0.5 torqueµ-step. was again modulated by the angle. In this case, the error on the load angle was −0.4 ± 0.5 μ-step.

Electronics 2018, 7, 242 13 of 15 Electronics 2018, 7, x FOR PEER REVIEW 13 of 16

2 Figure 9.9. MovementMovement ofof 22ππ rad rad withwith acceleration acceleration of of 270 270 rad/s rad/s2 andand maximummaximum velocityvelocity ofof 16.416.4 rad/s,rad/s, performedperformed with motor motor free free (left (left column) column) and and with with a load a load of 20% of 20%motor motor capacity capacity (right (rightcolumn). column). From

Fromtop to top bottom, to bottom, Shaft Shaft position position (PA) (P, PositionA), Position error error (Perr), (Perr), Velocity Velocity (Vel), (Vel), motor motor current current ratio ( (IItt/I/IMM), targettarget loadload angleangle ((LALATT),), and load angle error (Lerr), are reported.reported. 5. Discussion and Conclusions 5. Discussion and Conclusions Stepper motors are pervasive in modern applications; however, their use of open loops has several Stepper motors are pervasive in modern applications; however, their use of open loops has drawbacks. This work aims at a simple closed-loop method for overcoming such disadvantages. several drawbacks. This work aims at a simple closed-loop method for overcoming such The method is fully compatible with the commercial monolithic devices typically used for open-loop disadvantages. The method is fully compatible with the commercial monolithic devices typically drive of stepper motors, so that the generation and control of phase currents can be achieved on used for open-loop drive of stepper motors, so that the generation and control of phase currents can such devices. be achieved on such devices.

Electronics 2018, 7, 242 14 of 15

The heart of the method is represented by the loop control (5). It comprises a few simple operations that are executed at a high rate. In fact, the ripple on the load angle error depends on the loop execution period T, according to (6). In this implementation, we used T = 50 µs, which, for example, allowed us to reduce the load angle error to less than −5 µ-step (about 1/100 rad) for a rotor velocity up to 750 rev/min. The proposed method achieves a very low static error both in load (0.05 ± 1.3 mrad) and no-load (0.09 ± 1.4 mrad) conditions, as measured in the experiment reported in Section 4.4). This error can be compared, for example, to those obtained by similar closed loop controllers described in [19] and [20], where static errors of 0.5◦ (~8 mrad) and 0.2◦ (3.5 mrad) are reported, respectively. The position error present during constant velocity movement (see experiment 4.4) is similar or lower to that shown in Figure5 of [ 11], where a different FOC closed loop controller for stepper motors is presented. The controller presented in [11], among other differences, is based on a microcontroller where the control loop runs at T = 350 µs, with respect to T = 50 µs proposed here. The high execution rate used in this work would be critical—if not unfeasible—in full microprocess implementation; hence, the use of an FPGA, as proposed here. On the other hand, the remaining tasks, e.g., current calculation, are more time-relaxed, and a C-like microprocessor approach makes the development and the debug easier. The use of the FPGA fabric and the soft processor answers to both requirements with a single electronics device. However, in cases where FPGA resources must be saved, a full VHDL controller implementation is feasible. Several improvements can be made to the proposed method, like the damping of the motor resonances [21], the use of optimal load angle [22], the sensor-less angle measurement [23,24], ripple reduction [25], and others. The proposed method represents a simple and economic implementation of closed-loop control, which yields significant improvement in stepper motor performance with respect to the typical open-loop approach.

Author Contributions: Conceptualization, Methodology, Writing paper, Funding Acquisition: S.R.; Software, Investigation, Data Curation: V.M. Funding: This work is part of the MIPEC project, CUP 4421.02102014.072000051, funded by the Tuscany Region government through the FAR-FAS 2014 program. Acknowledgments: Authors thank Microtest srl (Altopascio, Italy) for managing the funding project, and the Industrial Engineering Department (DIEF) of the University of Florence for their advices in the realization of the mechanical set-up. Conflicts of Interest: The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision to publish the results.

References

1. Athani, V.V. Stepper Motors: Fundamentals, Applications and Design; New Age International: New Delhi, India, 2005; ISBN 81-224-1006-5. 2. Robert, B.; Feki, M. Control of the stepping motor. In Control of Non-Con- Conventional Synchronous Motors; Louis, J.P., Ed.; Wiley-ISTE: London, UK, 2012; ISBN 978-1-848-21331-9. 3. Gaan, D.R.; Kumar, M.; Sudhakar, S. Real-time precise position tracking with stepper motor using frequency modulation based microstepping. IEEE Trans. Ind. Appl. 2018, 54, 693–701. [CrossRef] 4. Derammelaere, S.; Vervisch, B.; Cottyn, J.; Vanwalleghem, B.; Cox, P.; De Belie, F.; Stockman, K.; Vandevelde, L.; Van Den Abeele, G. The efficiency of hybrid stepping motors. IEEE Ind. Appl. Mag. 2014, 20, 50–60. [CrossRef] 5. Krause, P.; Wasynczuk, O.; Sudhoff, S.; Pekarek, S. Analysis of Electric Machinery and Drive Systems; IEEE Press Wiley: Hoboken, NJ, USA, 2013; ISBN 978-1-118-02429-4. 6. Wang, F.; Zhang, Z.; Mei, X.; Rodríguez, J.; Kennel, R. Advanced control strategies of induction machine: Field oriented control, and model predictive control. Energies 2018, 11, 120. [CrossRef] 7. Blackburn, J.L. Symmetrical Components for Power Systems Engineering; Marcel Dekker: New York, NY, USA, 1993. Electronics 2018, 7, 242 15 of 15

8. Monmasson, E.; Cirstea, M.N. FPGA design methodology for industrial control systems—A review. IEEE Trans. Ind. Electron. 2007, 54, 1824–1842. [CrossRef] 9. Ricci, S.; Meacci, V.; Birkhofer, B.; Wiklund, J. FPGA-based system for in-line measurement of velocity profiles of fluids in industrial pipe flow. IEEE Trans. Ind. Electron. 2017, 64, 3997–4005. [CrossRef] 10. Astrom, K.J.; Hagglund, T. Advanced PID Control; ISA-The Instrumentation, Systems, and Automation Society: Research Triangle Park, CA, USA, 2006; ISBN 13: 978-1556179426. 11. Kim, W.; Yang, C.; Chung, C.C. Design and implementation of simple field-oriented control for permanent magnet stepper motors without DQ transformation. IEEE Trans. Magn. 2011, 47, 4231–4234. [CrossRef] 12. Le, K.M.; Hoang, H.V.; Jeon, J.W. An advanced closed-loop control to improve the performance of hybrid stepper motors. IEEE Trans. Power Electron. 2016, 32, 7244–7255. [CrossRef] 13. Jimenez-Fernandez, A.; Jimenez-Moreno, G.; Linares-Barranco, A.; Dominguez-Morales, M.J.; Paz-Vicente, R.; Civit-Balcells, A. A neuro-inspired spike-based PID for multi-motor robots with low cost FPGAs. Sensors 2012, 12, 3831–3856. [CrossRef][PubMed] 14. Le, Q.N.; Jeon, J.W. Neural-network-based low-speed-damping controller for stepper motor with an FPGA. IEEE Trans. Ind. Electron. 2009, 57, 3167–3180. [CrossRef] 15. Matsui, N.; Nakamura, M.; Kosaka, T. Instantaneous torque analysis of hybrid stepping motor. IEEE Trans. Ind. Electron. 1996, 32, 1176–1182. [CrossRef] 16. Cetin, E.; Daldaban, F. Analyzing the profile effects of the various magnet shapes in axial flux PM motors by means of 3D-FEA. Electronics 2018, 7, 13. [CrossRef] 17. Kazmierkowski, M.P.; Malesani, L. Current control techniques for three-phase -source PWM converters: A survey. IEEE Trans. Ind. Electron. 1998, 45, 691–703. [CrossRef] 18. Ricci, S.; Meacci, V.; Russo, D.; Matera, R. Encoder-Motor Misalignment Compensation for Closed-Loop Hybrid Stepper Motor Control. In Proceedings of the 6th International Conference Applications in Electronics Pervading Industry Environment Society (APPLEPIES 2018), Pisa, Italy, 26–27 September 2018. 19. Lu, W.; Wang, Q.; Ji, K.; Dong, H.; Lin, J.; Qian, J. Research on closed-loop drive system of two-phase hybrid step motor based on SVPWM. In Proceedings of the 2016 IEEE Vehicle Power and Propulsion Conference (VPPC), Hangzhou, China, 17–20 October 2016. 20. Liu, G.F.; Li, H.W. Design of stepper motor position control system based on DSP. In Proceedings of the 2017 2nd International Conference on Machinery, Electronics and Control Simulation (MECS 2017), Dubai, UAE, 24–25 June 2017. 21. Crnosija, P.; Kuzmanovic, B.; Ajdukovic, S. Microcomputer implementation of optimal algorithms for closed-loop control of hybrid stepper motor drives. IEEE Trans. Ind. Electron. 2000, 47, 1319–1325. [CrossRef] 22. Tsui, K.W.H.; Cheung, N.C.; Yuen, K.C.W. Novel modeling and damping technique for hybrid stepper motor. IEEE Trans. Ind. Electron. 2009, 56, 202–211. [CrossRef] 23. Derammelaere, S.; Vervisch, B.; De Viaene, J.; Stockman, K. Sensorless load angle control for two-phase hybrid stepper motors. Mechatronics 2017, 43, 6–17. [CrossRef] 24. Gutierrez-Villalobos, J.M.; Rodriguez-Resendiz, J.; Rivas-Araiza, E.A.; Martínez-Hernández, M.A. Sensorless FOC performance improved with on-line speed and rotor resistance estimator based on an artificial neural network for an drive. Sensors 2015, 15, 15311–15325. [CrossRef][PubMed] 25. Gómez-Espinosa, A.; Hernández-Guzmán, V.M.; Bandala-Sánchez, M.; Jiménez-Hernández, H.; Rivas-Araiza, E.A.; Rodríguez-Reséndiz, J.; Herrera-Ruíz, G. A new adaptive self-tuning Fourier coefficients algorithm for periodic torque ripple minimization in permanent magnet synchronous motors (PMSM). Sensors 2013, 13, 3831–3847. [CrossRef][PubMed]

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).