Skip to main content
Submitted by Galil_RobinR on Tue, 07/07/2015 - 09:13

Modern motion controllers can include the ability to run stepper motors with encoder feedback, resulting in true closed-loop motion control. This mode of motor control is very similar to standard three-phase brushless servo motor control, where the three phases are offset 120 electrical degrees. With steppers, the motor has two phases offset by 90 electrical degrees. The benefits of closed-loop control with stepper motors include greatly improved velocity smoothness and reduced power consumption compared to open-loop steppers and much higher torque at low velocity compared with traditional three-phase brushless servo motors.

To compare velocity smoothness and current consumption between open- and closed- loop steppers, two systems were assembled. For open-loop testing, a motion controller provided step and direction signals to a 3.0A microstepping driver with 64 microstep/full step resolution. This was connected to a linear stepper motor. For closed-loop control, a controller with a built-in two-phase brushless amplifier was connected to the same linear stepper motor, shown in Figure 1 below.

linear_stepper_motor.jpg
Figure 1 - Linear stepper motor

The objective of these tests is to maximize velocity smoothness and minimize current consumption. Achieving this will result in a system with higher performance, lower operating costs, and possibly an increase in longevity.

To test for velocity smoothness, the open-loop system was commanded to jog at a steady speed in terms of motor steps. The built-in encoder's velocity was monitored by graphing software. The closed-loop system was then commanded to jog at a speed that was equal to that of the open-loop test, except that the motor was commanded in terms of encoder counts, not motor step pulses. The closed-loop system was tuned manually using the built-in PID (Proportional-Integral-Derivative) filters. In addition, other filters were used to improve performance even further.  

To test for reduced current consumption, the motor was run continuously for 30 minutes, then the motor case temperature was measured. A lower temperature indicates less current consumption. Figure 2 shows the velocity smoothness when running open-loop. As can be seen, there was a sinusoidal velocity ripple due to the physical properties of a stepper motor. The velocity ripple was approximately +/-500 encoder counts/second. There was an audible pulsing sound when moving, typical of open-loop steppers.

open_loop_scope_caputre.png
Figure 2- Open loop stepper motor velocity (1000 counts/sec per division)

Switching to the closed-loop solution and commanding motion based on encoder counts, the position error was added to the plot. Using a combination of automated and manual tuning adjustments, the motor velocity smoothness was improved dramatically. The velocity ripple was measured to be approximately +/-60 counts/second.

closed_loop_scope_caputre.png
Figure 3- Closed loop stepper motor velocity using tuned PID values Top is velocity at 1000 counts/sec per division. Bottom is position error at 20 counts per division.

On the plot of position error, there was a repeating waveform. A portion of this position error was due to the natural resonance of the motor and load. The motion controller's notch filter was used to help minimize the effect of this natural resonance on the accuracy of the motion.

Figure 4 shows the effect on the error when using a notch filter at 16 Hz. The velocity ripple was measured at +/- 15 counts/second.

closed_loop_scope_caputre_notch.png
Figure 4- Closed loop stepper velocity and error using PID and notch filter Top is velocity. Bottom is position error. (same scales as previous graph)

Both the closed-loop and open loop stepper were operated continuously for 30 minutes with identical motion profiles. The motor case temperature was then measured. With an ambient temperature of 19 °C, the open-loop stepper motor warmed up to 33.5 °C, whereas the closed-loop stepper motor case only rose to 26.6 °C.

By integrating a suitable position feedback device such as an incremental quadrature encoder and using a two-phase brushless amplifier in a stepper motor application, the accuracy and smoothness of the motion was improved dramatically.