Low-speed precision velocity control is all in the filtering.
Chuck Lewin, Performance Motion Devices
A number of medical devices such as peristaltic pumps, syringe controllers and robotic catheter controllers need precise velocity control at low speeds. The key to success is having the right information from the motor and feeding it to the right control algorithm.
The most popular control method for positioning motion control is the PID (proportional, integral, derivative) servo loop. But as those who have used it will tell you, the resultant motion at low speed eventually becomes a series of digital starts and stops rather than a smooth velocity.
Other control techniques can do better, but in all cases, the velocity controller is only as good as the information that is fed to it, as the following how-to guide shows. Here is a sequence of steps to control low-speed motion.
Switch to a velocity loop
Many low-speed applications will benefit from switching to a control loop that explicitly measures the velocity and then executes a loop that compares the desired velocity with the measured velocity. The difference between these two is the velocity error, and after being passed through a PI (proportional, integral) filter, the resultant output value is fed to a current loop where it controls the physical torque generated by the motor.
The velocity loop can use an analog tachometer signal as feedback, but these days, it’s more common to use a position encoder and calculate the velocity by successive subtraction of the position read.
There is also a fancier technique that can be used at low speed called 1/T period measurement. This scheme measures the time interval between the arrival of similar encoder output signals, such as successive falling edges of the quadrature A signal), and from this measured time interval calculates the velocity. While not without its limitations, 1/T can only be used in conjunction with a velocity loop and represents another reason to switch to this control approach.
Slow the loop rate down
Particularly if the measured velocity comes from the subtraction of successive positions, you want to give as much time as possible between reads. This will increase the accuracy and reduce the choppiness of the measured velocity.
While modern servo controllers offer loop rates up to 10 kHz and beyond, it is rare that the velocity loop needs to run at more than 1 kHz. With some experimentation, you can find the servo rate that gets you the best velocity estimation but is still fast enough to stably control the motor.
Filter your way to success
Dramatic improvements in the smoothness of the velocity control can be achieved by filtering (often using a bi-quad filter programmed for a low-pass filtering function) the velocity estimation. The digital outputs of position encoders are by their nature a series of tiny steps, so filtering can significantly smooth things out and mimic analog-velocity sensors.
Depending on your application, another useful filter type is the deadband filter. This type of filter is especially good at reducing hunting when the command velocity is near zero, which can be important to reduce noise and motor heating.
Connect to a higher-level loop
If your application only requires velocity control, congratulations, you’re done! Many applications, however, operate the velocity loop within a higher-order loop such as a position loop or a loop for pressure or temperature control. Respirators, temperature controllers and reactor-process controls are all examples of applications in which an outer loop measures a desired quantity and then continually commands a motor (usually acting as a turbine or centripetal pump) to spin at the speed that will achieve the desired measured quantity.
In these systems. the output of the higher-order loop becomes the input command to the velocity loop. If this is the case, once again you should consider filtering that command to smooth the velocity profile.
Performance Motion Devices and others provide velocity- and torque-control integrated circuits that combine all of these motor-control features into a single package. But even a well-tuned and well-filtered velocity loop cannot defy the laws of physics. When all else fails, higher encoder resolutions will make it easier to create smoother low-speed motion.
Also, be mindful that successive subtraction of positions may bring out non-linearities in the encoder output that would be unimportant in a position-control application. Resolution is not the same thing as accuracy, so in the velocity control application, how evenly the resolvable encoder counts are spaced out has a direct impact on the quality of the motor velocity control.
Chuck Lewin is CEO and VP of sales and marketing at Performance Motion Devices.
The opinions expressed in this blog post are the author’s only and do not necessarily reflect those of Medical Design and Outsourcing or its employees.