Investigation of Precise Flat Angle Positioning Controller

The paper refers onto the experimental investigation of the precise flat angle positioning drive. After a deeper investigation of the used microstepping controller, the authors depicted the causes of the observed rotation nonlinearity. A special test bench with a precise rotation encoder has been produced for the purpose, besides that the angular positions of the formed microsteps have been measured with a fast, slow and mixed current decay mode set. After the analysis of the obtained results, the source of nonlinearity has been determined, and then the possible solutions have been defined and tested. The paper presents the guidelines for a new controller design, based on the current research study. DOI: http://dx.doi.org/10.5755/j01.eee.19.6.4556


I. INTRODUCTION
The aim of this research has been to carry out the investigation of a precise flat angle positioning drive (Fig. 1) and to work out the guidelines for the improvement of positioning controller.This positioning drive has been installed in a flat angle calibration machine at Vilnius Gediminas Technical University, Institute of Geodesy, and at present is in use for the checking and calibration of the geodetic instruments parameters.(Fig. 1) consists of a circular scale 1, driven by a worm gear 3 with gear ratio 1:2160, a tooth-belt gear 4 with gear ratio 1:1.833, and a stepper motor 5.The resulting gear ratio is 1:3960.At the centre, in position 2, there is located a place for the instrument under examination placement, and a precise incremental rotary encoder is installed for the measurement of the disc angular position.The model of the encoder is BE198-90000 (produced by "Brown&Sharpe-Precizika"), it has 18000 lines and produces 90000 pulses per rotation.There is a quadrature output, and if the pulse count is quadrupled, the angular resolution is 3.6″, and the declared measurement precision is ± 2.5″.More accurate position measurement could be received by using the photoelectric microscopes 6 (Fig. 1).The scale has strokes every 10′, and the microscope with a webcam, placed close to the scale, is used for the position measurement enhancement at these positions.A specially designed software is able to measure the stroke position with an accuracy of 0.01″ [1].Additionally, the 12-angle polygon can be fitted at the centre of the rotary disc, and the photoelectric autocollimator can be used [2].
At the first stage of modernization of this positioning drive, the stepper motor VEXTA PK266-02B has been fitted.The main parameters of this motor in bipolar and unipolar connection modes are presented in Table I   The motor connected in a bipolar 2-phase excitation mode to the microstepping controller is based on A3979 microstepping driver (produced by "Allegro Microsystems, Inc.").This controller is used for the 16 microsteps mode, and the theoretical 0.1″ scale positioning resolution is achieved (with a gear ratio 1:3960).When investigating the positioning drive, the examination of the real positioning accuracy has been set as the main goal together with the working out of the possible improvements as well as the guidelines for a new controller design.

II. POSITIONING ACCURACY MEASUREMENT AND ANALYSIS
The positioning investigation has begun by examining the rotation in a single microstep mode every 1 s (manually) and by executing the position measurement with the help of the attached to the scale microscope provided with a webcam and a specified software [1].To evaluate the system response to the change of the rotation direction, there have been made changes regarding the steps with numbers 120 and 130.The obtained scale rotation diagram is presented in Fig. 2. The encoder data have been collected as well, namely the pulses have been registered after every 32-40 steps (calculated value is 35.2 steps), and the positioning accuracy has been approved to be enough in this case, as it has fitted into the range of the declared encoder measurement accuracy.
The analysis of the rotation diagram (Fig. 2) exhibits a good mechanical quality of the positioning drive, i.e. a good response to the direction change, without any visually noticeable backlash and springiness.The characteristic has proved to be close to the linear one during the mode of regular steps, although some "waves" within the period of about 16 steps are noticeable.The mentioned above fact has stimulated a more detailed investigation of the applied microstepping controller, because the source of this nonlinearity might be detected there.
A specially designed test bench for the study of the microstepping controller has been produced.It contained a similar stepping motor VEXTA PK266-02B, a smaller size stepping motor VEXTA PK264-02B and an incremental rotary encoder ROD-420-5000 (produced by "HEIDENHAIN") mounted on the same basis and possessing the potentiality of connecting shafts by flexible couplings.A smaller motor serves as both the produce of a necessary load to the motor under test, and rotates the shaft of the tested motor with the required speed to be able to measure the back electromotive force (BEMF) of the coils.Moreover, it could be applied for the rotation continuity and stepping vibration evaluation by BEMF measurements.Rotor inertia for VEXTA PK264-02B stepping motor is equal to 12⋅10 -6 kg⋅m 2 .
The installed rotary encoder ROD-420-5000 has 5000 lines and produces 5000 pulses per rotation [4].There is a quadrature output, and if the pulse count is quadrupled, the angular resolution is 0.018° (1.08′), and the declared measurement accuracy is 1/20 of grating period, i.e. 0.216′.Rotor inertia for this encoder is equal to 2.3⋅10 -6 kg⋅m 2 , starting torque is 0.01 N⋅m.The pulse receiver has been produced following the manufacturer's recommendations using AM26C32 quadruple differential line receiver.STM32F4Discovery board is used as a counter, based on Cortex M4 microcontroller with 32 bit counter, capable of counting directly quadrature encoder pulses.Thus, to achieve the purpose a special firmware has been created for the microcontroller.An attached text display is proposed for the position and rotation speed data visualization.
The measured motor torque in a flat angle calibration machine positioning drive is equal to 0.1-0.15N⋅m, the same value is obtained at the test bench.
However, the same controller based on A3979 microstepping driver with a translator is used for the examination of the positioning.This controller is connected according to the datasheet [5] and switched to 16 microsteps mode.A3979 microstepping driver includes two full bridges with fixed off-time current regulators that have the ability to operate in slow, fast, or mixed decay modes.The maximum trip current is adjusted to the reference voltage VREF, equal to the voltage drop on the current sense resistor multiplied by 8.The selected current sense resistor value is equal to 0.15 Ω as recommended, so VREF = 1.68 V for 1.4 A rated motor coil current.To reach the maximum fast action, the shortest recommended off-time value is chosen off 12 k 470 pF 5.46 s The current decay mode is selected after determining the voltage level at PFD input, in case VPFD voltage is greater than 0.6 × VDD (VDD = 5 V), then the slow decay mode is selected, in case it is lower than 0.21 × VDD the fast decay mode is selected.If VPFD is between the mentioned values, the bridge operation mode depends on the stepping phase.A slow decay mode is selected, if the step is operating within the stage of the coil current absolute value increase (microsteps No 1-16 and 33-48 for Phase A, microsteps No 17-32 and 49-64 for Phase B); and if the step is in the stage of coil current absolute value descend (microsteps No 17-31 and 49-63 for Phase A, microsteps No 1-15 and 33-47 for Phase B), then the mixed decay mode is selected..During the mixed decay mode when the trip point of the load current is reached, the device switches onto the fast decay mode operating until the voltage on the current sense resistor tends to deviate to the same level as the voltage applied to the PFD terminal.VPFD for the mixed decay mode is adjusted to be equal to 0.4 × VDD = 2 V.The time allocated for the device to operate in the fast decay is calculated by ln (0.6 / ) 2.21 s After this fast decay portion, the device switches onto the slow decay mode for the remaining fixed off-time period, which lasts 3.25 µs.
The step current formation curves presented in the datasheet [5] are very smooth and continuous.The first requirement for the investigation study is to measure the real stepping accuracy at the different decay mode settings.The obtained position deviation (the difference between the measured position angle and the proper value) results for the bipolar series connected motor coils, 24 V power source voltage and 1.4 A rated coil current are presented in Fig. 3.The same measurement sequence is used for the further measurements.Single steps are manually generated in every few seconds to obtain the established position and to record the results in the same rotation direction.The starting point for the record and base values as 0 is selected when the current of Phase A coil equals to 0, and the current of Phase B coil is maximum negative.All the experiments have been repeated several times to avoid mistakes in measurements.While analyzing the obtained position deviations (Fig. 3) an obvious source of rotation nonlinearity in Fig. 2 can be determined, the same half waves of the position deviations with the period equal to the microstepping number are present.There is a high positioning overshoot at the first step, independent of the decay mode, the actual angle change is three times bigger than the expected ones (the calculated microstep value is 6.75′).For microsteps No 3-5 the slow decay has the lowest deviation, but in the further step deviations under the mixed and fast decay modes, they are much lower, and only the slow decay mode has an increasing slippage at the second half of the full step (microsteps No 8-15 and 25-31).In the middle of the step (microsteps No 8 and 24) the currents of both phase coils are equal and high (about 70 % of the rated value), thus the deviation is quite a small one for all the decay modes.The first microstep overshoot could be reasonable in the cases of high torque load, because it will be smoothed by the external forces, but in our case the control solution for the overshoot elimination has to be found.
Otherwise, the observed positioning deviation could be explained by the complexity of producing the accurate low current values for PWM controller, the resolution of which is not satisfactory enough.There have been made the measurements using the lower power supply values 12 V and 8 V, and thus, much lower position deviation has been obtained, and no difference in positioning accuracy for different decay modes has been found.The results of the measurements are presented in Fig. 4.
The similar positioning accuracy measurements are made with a half-motor coil connected to the same controller and 2 A rated current set for the unipolar connection mode test.The findings regarding the measured positioning accuracy for 24 V power supply are presented in Fig. 5.
The obtained results indicate very similar shapes with higher position deviation values, so the bipolar series motor coil connection is preferable for the accurate positioning.The quantitative evaluation of the deviation for the diverse decay modes is provided by RMS calculation.The results are presented in Table II.The lowered supply voltage has better accuracy, but in case there is no possibility to change it, the unipolar series coil connection and the mixed or fast decay modes have to satisfy the best positioning accuracy.
A certain interesting effect has been determined when trying to change the rotation direction signal after each microstep without a stepping pulse, namely there have been registered the reversible position changes in the mixed and fast decay modes.These changes are considered to be the most significant at the marginal microsteps (No 1-3, 13-15, 17-19, 29-31).For the first half of the step, the direction change has lowered the deviation value, and for the second half of the step it has increased.Therefore, that phenomenon could be explained by the current decay mode change in the phase coils.All the results indicate that the slow decay mode at the phase current increase stage in A3979 driver is used not only in the mixed mode, but in the fast decay mode as well.For the continuous rotation, it is not significant, but the accurate positioning deviation at the first half of the step could be using a simple rule: to stop at the defined position, and if there are microsteps No 2-7 -to change the rotation direction signal and do not produce the step pulse.The obtained position deviation characteristics for the mixed decay mode are presented in Fig. 6, and for the fast decay mode is given in Fig. 7.If the rotation direction is changed after the stop in the first half of the step, for the mixed current decay mode the calculated RMS value is equal to 1.80, for the fast decay it is 1.52.This is the proof regarding the advantage of the fast or mixed decay mode versus the slow decay positioning low torque load, and the possibility of selecting the fast or mixed decay mode for the whole step would be beneficial.
Inaccuracy of the slow mode decay can be explained by the specified current measurement circuitry, which means the usage of the common shunt resistor for a bridge, and the circulation of the coil current during the off-time inside the bridge bypassing shunt.It means that the coil current measurements are distorted and the positioning accuracy is reduced.When the bridge operates under the fast decay mode, all the time, the coil current flows through the shunt resistor and could be measured accurately.
For a new controller design not only the current decay modes or values are important, but also the detailed mathematical model of the stepping motor, whole drive or the system have to be investigated for the best performance [6], [7].With such a complicated system like this available, the exact mathematical model could not be created, thus the usage of the direct search algorithms for the control sequence could be a solution.The modern methods of the simplex search [8] are recommended to be applied for this purpose.

III. CONCLUSIONS
The investigation of the precise flat angle positioning drive has depicted periodical nonlinearity of rotation, and the source has been determined, which is the microstepping controller producing three times higher overshoot of the first microstep.It could be corrected by lowering the supply voltage to 12 V (for continuous rotation linearization) or by using the fast current decay mode and changing the rotation direction after the stop if only there is initiated the first half of the step (for the final position fix).
To design a new controller it is significant to provide the accurate coil current measurements, thus the fast decay mode is preferable, and there has been determined no mixed decay mode benefit versus the fast decay.

Fig. 1 .
Fig. 1.Structure of precise flat angle positioning drive.The flat angle positioning drive under examination

Fig. 3 .
Fig. 3. Motor angular deviation using 24 V power supply and bipolar series coil connection.

Fig. 4 .
Fig. 4. Motor angular deviation using 8 V and 12 V power supply and bipolar series coil connection.

Fig. 5 .
Fig. 5. Motor angular deviation using 24 V power supply and bipolar one half coil connection.

Fig. 6 .
Fig.6.Motor angular deviation using 24 V power supply, bipolar series coil connection, mixed decay and rotation direction change.

Fig. 7 .
Fig. 7. Motor angular deviation using 24 V power supply, bipolar series coil connection, fast decay and rotation direction change.

TABLE II .
DEVIATION RMS VALUES FOR DIFFERENT TEST MODES.