Advertisement

Blog

Standard Step-Motor Driver Interface Limits Performance

Increasingly elaborate Rube Goldberg schemes for controlling step-motors have developed over the years that try to pace stepping to avoid missteps. This direction of development is fundamentally misguided. This article tells why.

The industry-standard interface between step-motor drivers and controllers consists of essentially two lines: direction and step. The controller determines when the steps are taken by pulsing the step line. As a consequence, all the system dynamics depends on the controller.

Step Motors

A step-motor nowadays is a permanent-magnet synchronous (PMS) motor with some residual variable-reluctance torque production. It can basically be regarded as a PMS motor which is sometimes referred to as a “servo motor”. Permanent magnets are attached to the rotor.

The stator has two phase-windings, which is the minimum needed to rotate a field-referred current vector in a plane, the plane normal to the spin of the rotor. Three phase-windings reduce the amount of drive electronics over two phases, but two were chosen historically because electronic power drivers and control were implemented with electron tubes and had to be kept simple. By center-tapping the two windings, four leads result. Combinations of them can be switched to ground to allow winding current to flow when the center-tap is connected to the supply voltage, Vg . The four half-windings can be labeled A+, A–, B+, and B–.

Stator electromagnets rotate a magnetic field, represented by the field-referred current vector of the stator, that attracts the rotor magnets, like a donkey to a carrot held out in front. The stator keeps ahead of the rotor, to pull its magnets along rotationally. Maximum torque is produced when the stator field vector leads the rotor field vector by 90o in the direction of rotation. In the diagram below, the stator field is not quite advanced enough CCW in phase for maximum torque, as both vectors rotate in synchronism together CCW.

When Vg is connected across a half-winding of either the A or B windings, a current flows which produces a vector pointing in one of the four cardinal directions (0o , 90o , 180o , 270o ) which can be labeled by the winding names. The result is a rather crude sequencing of the stator current vector phase with four “full steps” per electrical cycle. In more refined drives, the stepping has more phase resolution and the jerkiness of discrete steps is reduced. The mainstream development for step-motors has attempted such a refinement, called microstepping , by increasing the number of intermediate steps.

The basic idea of torque generation is to produce an attracting current vector that is rotated just enough ahead in phase of the rotor magnet to pull it along with maximum torque. The phase is the electrical phase and this is related to the mechanics by the number of pole-pairs. For each mechanical cycle (revolution) of the rotor there are a pole-pair number of electrical cycles. Each electrical cycle advances the rotor by a pole-pair.

Maximum torque is produced when the stator current (or flux) vector is maintained at 90 degrees electrical ahead of the rotor magnet flux vector. It is basically that simple and the result is called field-oriented control because the stator field is kept oriented 90o ahead of the rotor field. When this is maintained, none of the adverse dynamic behaviors of step-motors occur and the motor behaves essentially like a brush motor. With field-orientation, the motor model is shown below, where Vg is the peak vs .

In a brush motor, the phase of the stator current vector is controlled electromechanically by the switch sequencing (or commutation ) of the windings with commutator bars on the rotor. These bars rub against stationary (relative to the stator) graphite brushes to complete the moving electrical connection to the spinning rotor winding. PMS motors eliminate the brushes by eliminating the rotor winding and replacing it with magnets.

Open-Loop Versus Phase Control

Field-oriented control is simply phase control of the stator current vector. The magnitude of the torque generated is proportional to winding current and a current controller circuit thus controls the current magnitude as a different subsystem of the motor drive. In early step-motor drives, neither magnitude nor phase was controlled. In mainstream step-motor drives, the phase is open-loop controlled by schemes that try to model what the motion system will do when driven in various ways. In other words, an elaborate compensator is inserted in the forward path of the control system and there is no phase feedback from the motor. As a result, it is logical to then have a command interface that consists of direction and step pulses. As pulses are received, they are “buffered” by the motion controller and the motor drive is fed these step pulses at a rate and with timing that will minimize spurious mechanical motor behavior.

This overly-complicated and only partially successful direction of development can be replaced by using the motor phase as feedback and letting the advancement or stepping of the stator-current drive vector be controlled to keep it 90o ahead of the actual motor electrical phase. Then nothing bad happens. It is just that simple, yet step-motor drive development has overlooked basic (and generally known!) facts about motors and for many years has failed to apply basic motor theory to drive design.

It is no longer optimal to maintain a step-direction interface from motion controller to drive. The command interface instead becomes direction and step enable , where step enable is no longer a sequence of pulses but a logic level that enables stepping. In addition, the actual motor steps and their direction are fed back to the motion controller so that it can count them to determine position and control the step-enable line. In this scheme, the motor steps at its own pace, driven by the system dynamics and constrained in time to keep field orientation. The motion dynamics for the motor itself have been moved from motion controller to motor drive.

A better, though less backward-compatible, interface between motion controller and motor drive has torque magnitude and direction inputs to the drive. This allows for indirect speed control and the motor drive achieves phase control of the motor without involving the motion controller at all. This is how step-motor systems should have been designed from the mid-1960s and thereafter, but were not. The requisite motor theory to implement field-oriented control existed ever since it was refined and simplified by Paul Krause in 1965. (His book, from Purdue U., on Analysis of Electric Machinery is the standard on explaining motor theory, though a subsequent book co-authored by Oleg Wasynczuk titled Electromechanical Motion Devices , McGraw-Hill, 1989, is a better place to start for an introductory treatment.)

It was not until years later, when solid-state power electronics developed, that field-oriented control was applied to large three-phase induction and synchronous motors but not to step motors. The reason is probably that step-motor technology continued to be viewed as minimalist-electronics technology and was treated as such far after it would have been simpler to apply motor theory to step-motors. And to this day, this lesson has not been completely learned.

It is not that field-oriented control lacks design challenges. Sensing the motor phase is one, and has two categories of schemes. One is to sense electrical phase by sensing mechanical phase with a shaft encoder on the rotor shaft. Step-motors have a large number of pole-pairs – usually 50 – and hence electrical phase resolution from an electromechanical encoder, while possible, results in higher cost and the limitations in reliability of an electromechanical component. The encoder wheel must be adjusted just-so for electrical alignment. More practically, after the encoder is attached to the shaft, calibration using a dynamometer acquires phase offset compensation for the encoder.

The more elegant category of schemes uses the induced voltage across the windings of the motor to sense phase, for the induced-voltage waveforms are the true determinant of motor electrical phase and can be used directly. One problem in sensing them is that the motor windings are also being driven at the same time, but this can be overcome – and is left for the next article in this series.

5 comments on “Standard Step-Motor Driver Interface Limits Performance

  1. j.sinnett
    April 15, 2015

    I have a 3D printer which uses 4 NEMA-17 stepper motors.  These steppers have 200 physical poles, and are used with 16X microstepping.  This 3D printer, like almost all consumer and prosumer 3D printers, has no position feedback; it relies entirely on keeping track of the steps sent to each motor to know where the printhead is.

    I can't see how it would be possible to maintain the article's suggested electrical 90 degree phase lead on all the motors.  Wouldn't the phase lead depend on the motor's load?  In other words, at a constant speed, the phase lead would equate roughly to the amount of torque the motor is supplying – and if the required torque is very low, then the phase lead would also be low.

    But more importantly, in a 3D printer, all four motors (X, Y, Z, and Extruder) must be maintained in constant synchrony.  If a particular “tool path” calls for just a small increment in X and a large increment in Y, then the steps per second delivered to each of these channels will be very different.  We can't allow the steps to one motor to be “optimized” for that individual motor's path.

    By the way, these motors have 2-wire coils, and the reversal of current is handled in the driver chips with an H-bridge configuration.

  2. Victor Lorenzo
    April 15, 2015

    >> “If a particular “tool path” calls for just a small increment in X and a large increment in Y, then the steps per second delivered to each of these channels will be very different

    In the case of CNC machine controllers, we use a kernel that “samples” all axis positions at a relatively high frequency. This kernel takes care of not exceeding the maximum pulse per second (pps) rating for each axis motor and coordinates all movements. The pps for the slowest motor limits the overall head speed. The tool path is generated by the planner according to movement commands.

    At the end it is a matter of converting the tool path from a continuous time formulae to a discrete time (sampled) representation.

  3. D Feucht
    April 15, 2015

    “I can't see how it would be possible to maintain the article's suggested electrical 90 degree phase lead on all the motors.  Wouldn't the phase lead depend on the motor's load? “

    Your 3D printer probably uses step-motors in the usual open-loop way, of stepping them from one equilibrium (zero-torque) position to the next. No attempt is even made to control phase other than to sequence through the steps. Consequently, the actual phase depends on motor load and other factors. The motion between steps is uncontrolled.

    With phase control, the torque angle is held at 90 degrees so that maximum torque can be produced all the time (under the zero-torque speed) and the motion trajectories of multiple motors can be controlled by a motion controller that continuously controls the torque of each motor so that they move along a commanded path. The feedback to the motion controller from the motor-drives is the phase information acquired from the motor induced voltage – and this is continuous and not microstepped. In the best scheme, there are no microsteps, only analog (continuous) control.

    This applies to all PMS step-motors, regardless of how the windings or the drive circuits to them are configured.

    In my next article on this topic, I explain phase control in more detail.

     

  4. GSKrasle
    April 21, 2015

    Dennis,

     

    I think the point is that if constant maximum torque is maintained, then speed or position is not controlled. If a system were only inertial, constant torque would mean continuously increasing speed.

  5. D Feucht
    April 21, 2015

    GSKrasle,

    To clarify, what is desired for torque control is that the motor torque magnitude can be varied without reactive behavior to an input torque magnitude command. This is achieved by field-oriented control of the motor so that it can produce the maximum real torque which can then be scaled down by the input command.

    The motion controller varies the torque command to achieve speed and position goals. The point is that we do not want the motor-drive to do anything but apply the commanded amount of torque AND that it be real and linear, like a brush motor. This occurs when the torque angle is 90 deg, at which the motor is also capable of producing maximum torque.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.