Abstract
Coupled electromechanical interactions observed in a closed-loop control system actuated by a stepper motor are studied. Analysed system consists of a PID controller used to maintain constant vertical inclination of a single DOF pendulum. This pendulum serves as a tensioner for a string being pulled by a rotary motion of the electric stepper motor. The second end of the string is being fed to the motor with a variable speed. The mathematical model governing dynamics of the mentioned system consists of a non-linear system of four ordinary differential equations. In addition to the mathematical model, various ways of control of the electric stepper motor have been applied. In particular, the rotor control using the micro-stepping approach has been used to model the real dynamics of the motor controller. Comparison of the proposed theoretical considerations and modelling of the studied system fits well with the experimental investigations.
Similar content being viewed by others
1 Introduction
Nowadays, stepper motors are widely used in both industry and consumer devices, such as scanners, ink-jet printers or digital cameras. Their properties are advantageous in many mechatronic devices, especially where there is a need of a cost effective positioning system [1]. Such synchronous electric motors are characterized by a good performance in open loop configurations, allowing for simplification of the electrical design.
Naturally, there are some drawbacks of the open loop configurations. Specifically, positioning errors can occur, as such systems lack position feedback and therefore it cannot be verified if the rotor achieved desired position. Those errors are usually a result of the phenomena specific to stepper and synchronous motors such as stalling (i.e. losing synchronous speed) and loss of step. These events can occur as a consequence of a sudden peak of load torque or exceeding allowed maximum velocity.
To combat these undesired phenomena, one can chose a closed loop approach [2–4]. For instance, the motor driver can wait for confirmation signal from the optical encoder after issuing every step command. The realistic system described in this paper, however, uses a simpler method. Instead of checking the position continuously, it is only verified after each positioning sequence, which is more than enough to ensure sufficient reliability in this particular case.
The goal of the following research is to create a mathematical model that could be used to evaluate motor’s performance in a variety of scenarios. In particular it has to allow investigations of the system behavior under varying load conditions and using different control methods.
2 Physical system
In the following considerations we analyze a physical system being a part of an industrial device dedicated to measuring and cutting PVC bead strings (e.g. used in window and door blinds). The beads are being fed to the device from an injection molding machine at a variable speed. This requires cutting device speed to be appropriately adjusted. More importantly, the strings must be kept tightened to allow for a smooth cut. Because of that, the device has been fitted with a rotational tensioning arm with an inclination sensor. Tensioner angular position is fed back to the PLC allowing to maintain constant position of the arm and consequently—constant tension.
The drive system consists of a low power hybrid stepper motor powered by an appropriate driver. Incremental optical encoder has been installed on motor’s shaft to ensure correct position after each positioning sequence (i.e. before cutting the string). Motor angular velocity must be adjusted according to the string feeding rate, therefore feedback signal from the inclinometer is run through a PID controller and converted to a pulse signal which drives the stepper motor. The whole machine, including human–machine interface, PID and motor speed is controlled by the PLC. The outline of the mentioned closed loop system is presented in Fig. 1.
Position setpoint is provided by the machine operator, who chooses the optimal string tension experimentally. The deviation from the setpoint is converted to a clock signal applied to stepper motor controller. Then it is converted to an analogue voltage signal powering two phases of a hybrid stepper motor (\(V_a\) and \(V_b\)). Inclinometer provides a digital feedback data, transferred back to the PLC via a RS-232 interface.
3 Mathematical model
3.1 Stepper motor
The equations governing the dynamics of a hybrid stepper motor can be found in a number of publications [1, 5–8]. They have been cast into the following system of four non-linear ordinary differential equations:
where: \(i_a,\,i_b,\,V_a,\,V_b\) are currents and voltages in phases A and B; \(R,\,L\) are winding’s resistance and inductance, respectively; \(K_m\) is the motor torque constant, \(B\) is viscous friction coefficient, \(N_r\) is the number of rotor teeth, \(J\) is rotor’s moment of inertia, \(\tau _l\) is the load torque, \(\omega \) is the rotor speed and \(\varTheta \) is its angular position.
First two of the above equations determine the current in motor’s windings (phase A and B), while the two latter correspond to Newton’s 2nd Law of motion.
3.2 Controller
Stepper motor controller is compelled to provide appropriate voltage on motor’s connectors and change them as required by the demanded motion sequence. The most basic circuit that can be used as a controller is a dual H-bridge. It consists of four transistors that are switching power sequentially, allowing the rotor to move in the desired direction in consecutive steps. While this approach has a big advantage of simplicity and low cost, it doesn’t allow for a very good drive performance. Because of that, for more demanding tasks, dedicated integrated circuits are commonly used.
Those more advanced circuits allow micro-stepping, which by applying the voltages to both phases simultaneously, enable the rotor to take positions between the full steps. The ratio of \(V_a\) to \(V_b\) constrains the exact position of the rotor. This method reduces the vibrations excited during motion and makes drive’s operation more smooth. Those commercially available controllers also use the so called chopper circuits. They use supply voltage that is much higher than motor’s nominal voltage and turn it off when the current in phase goes slightly above the nominal value. This method allows the windings to be energized much more rapidly (as for each step current rises much faster), which results in much better performance of the motor, namely higher maximum speed and higher torque.
To recreate above considerations in the computer model, voltages substituted in Eqs. (1) are obtained by the following rule:
In a realistic device, the frequency of switching the voltage is limited by the circuit parameters. Waveform of the measured phase voltage is shown in Fig. 2. It is worth noting that in this particular case, the supply voltage was being switched at a rate of 42 kHz. The above frequency was taken into consideration when designing the computational model.
If the system is controlled with micro-stepping approach, maximum allowed current Im for each subsequent micro-step is determined by motor’s nominal current and the appropriate current ratio. It can be determined using following two equations:
where \(I_n\) is the nominal current, \(n\) is the present micro-step and \(d\) denotes the division factor (e.g. 2 for half-stepping, 4 for quarter-stepping, etc.). Please note that there are several other methods of determining desired current while micro-stepping, that may be more suitable to a particular motor controller model.
3.3 Tensioning mechanism
The tensioning mechanism is a subject of control in the system. It has been modeled as a single DOF pendulum. The position of the pendulum is at all times restricted by the length of the string currently present in the device (see Fig. 3). Length \(a\), depends on the one hand on the feeding speed and on the other on motor’s speed. Using geometric relations function \(a(\varphi )\) has been derived. The inverse function has been approximated by the following third order polynomial:
where: \(a\) is string’s length and \(\varphi \) is arm’s position. The above equation is very close to actual relation in angle range the device operates in (between \(45^{\circ }\) and \(90^{\circ }\)).
4 Computer simulation
The above mathematical constraints have been applied in a computer model created using scicos which is a part of numerical computation software scilab. All of the mentioned subsystems were recreated and connected together, as seen in the diagram (Fig. 4). Simulation parameters, namely motor’s specification, according to the data sheet are given in Table 1.
Computer model allows applying different kinds of loads to the motor. In particular, load from tensioning arm is approximated. Assuming that at angle \(\varphi =\pi /2\), the tensioner is in vertical position and at \(\varphi =0\) in horizontal position respectively, the simulated load on the motor is assumed to be:
Apart from the above, the external load can be set to zero or given as step function with a constant load starting from time \(t_0\). Motor’s excitation frequency (CLK signal), can be set as a constant value, a polynomial function or a value determined by a PID controller. In the latter case, all of the PID term’s constants can be set, which allows tuning the device using the computer simulation instead of testing it on site.
5 Results
The following plots were made using the computer model described above. Among the objects of interest are phase currents of the stepper motor, as well as rotor’s mechanical position. To evaluate the behavior of the model, different load and excitation conditions were tested.
Additionally, to evaluate the simulation results, some simple measurements on the physical object were attempted (compare [9]). In particular, phase current was measured. This was achieved by adding a serial resistor into the phase circuitry. The resistance of it is several orders of magnitude lower than the winding’s resistance, so that motor performance is not affected by its presence. By connecting an oscilloscope to both ends of the resistor, one can easily measure voltage drop on the shunt resistor, which is an indirect way of measuring phase current in the circuit, as those two physical quantities are proportional. The downside of this simple method, however, is that the recorded waveforms contain a lot of noise and are not very accurate. This is because of the fact that the measured voltage drop is very low (less than 100 mV).
Investigations shown in Fig. 5 confirm that mathematical model’s simulation results are compliant with the physical object. However subtle differences can be observed, such as the amplitude of the phase current. That is likely to be associated with the fact that the amplifier and chopper are not yet accurately modeled.
Figure 6 shows current oscillations when the motor is advancing to the next step. As micro-stepping is used in the considered scenario, those oscillation’s amplitude is proportional to maximum allowed current in a given micro step, as can be seen in Eqs. (3) and (4).
Discussed computational model is able to recreate some of the phenomena mentioned in Sect. 1. Figure 7 shows the rotor travel while accelerating. The profile of the motion is such that the excitation frequency is linearly increasing for 5 s from 0 Hz to 20 kHz. Instead of a constant acceleration, we observe loss of steps after about 3.5 s with motor never actually exceeding 10 kHz. This, of course, qualitatively fits with real device observations, even though small deviations from an actual maximum speed can be observed.
Although simulation results allow to reconstruct motor’s behavior, because of the noise, measurement’s accuracy is limited. Operation of the system as a whole is presented in Fig. 8. In this particular example, excitation frequency is regulated by a PID controller with non-zero “P” and “I” terms. Observe that it accurately resembles behavior of the actual physical device.
6 Concluding remarks
The qualitative results obtained during simulations fit well with the expected behavior of an electric stepper motor. In particular, the proposed solutions to simulating real stepper motor controllers, allow for realistic simulation conditions, resembling commercially available devices. This can lead to a better understanding of pros and cons of certain control methods as well as allowing to a broader usage of electric stepper motors in environments, where their features are desirable, offer more performance or lower cost than their DC or asynchronous counterparts. The mathematical model of a stepper motor system allows for investigating and avoiding some of the phenomena that can hinder system’s performance. Among those are electromechanical resonances that result in increased vibrations, stalling, losing steps, noisy operation and decreased performance and reliability.
It is worth noting that the proposed computational model is relatively complex. That means that the simulations with integration times over 5 s take a significant time to complete. Isolating most resource heavy parts and optimizing them may be crucial to continue the above analysis.
In further research, more physical object measurements will be made, which will open possibilities for fine-tuning the computer model. In particular, precise phase current measurements need to be done to verify the simulation results. This will require building a circuit that allows amplifying the measured signal as well as filtering out the background noise and interferences. Moreover, physical properties of the motor and the whole system should be verified as they can deviate slightly from the values provided in the data sheets.
References
Acarnley P (2002) Stepping motors: a guide to theory and practice. The Institution of Electrical Engineers, London
Ferris TA (1981) A low cost, high performance incremental motion control system using a closed loop stepping motor. In: Proceedings of the 10th annual symposium on incremental motion control systems and devices, Urbana
Adams K, Van Reenen M (1995) A low-cost stepper motor positioning system with minor closed-loop control. Int J Adv Manuf Technol 10:191–197
Banihani S, Al-Widyan K, Al-Jarrah A, Ababneh M (2013) A genetic algorithm based lookup table approach for optimal stepping sequence of open-loop stepper motor systems. J Control Theory Appl 11:35–41
Bodson M, Chiasson J, Novotnak R, Rekowski R (1992) High performance nonlinear feedback control of a permanent magnet stepper motor. In: Proceedings of 1st IEEE conference on control systems technology, vol 1, pp 510–515. doi:10.1109/CCA.1992.269821
Kenjo T, Sugawara A (1995) Stepping motors and their microprocessor control. Oxford University Press Inc., New York
Kuo B, Tal J (1979) Incremental motion control: step motors and control systems. SRL Publishing Company, Champaign
Lyshevski SE (2000) Electromechanical systems, electric machines and applied mechatronics. CRC Press, Boca Raton
Balakrishnan K, Umamaheswari B, Latha K (2013) Identification of resonance in hybrid stepper motor through measured current dynamics in online for accurate position estimation and control. IEEE Trans Ind Inf 9:1056–1063
Acknowledgments
Above paper was presented during 12th Conference on Dynamical Systems—Theory and Applications held in Lodz, Poland on 2–5 December 2013.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.
About this article
Cite this article
Kępiński, R., Awrejcewicz, J. & Lewandowski, D. Dynamical simulation of a nonlinear stepper motor system. Int. J. Dynam. Control 3, 31–35 (2015). https://doi.org/10.1007/s40435-014-0093-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40435-014-0093-6