Machine designers have a difficult task. More often than not they are asked to squeeze the maximum possible performance out of a machine design for the lowest possible cost. To accomplish this task, the designer typically begins by selecting or designing components such as motors, bearings, mechanical linkages etc. Then the designer prototypes the system and measures its performance. During the machine tuning process the variables that the designer may want to optimize are throughput, vibration, noise, efficiency, and accuracy. Inevitably there will be problems, or areas where the performance could be improved. The question facing the designer is: how do you go about making these improvements
How do you optimize the various motion controller variables such as profile parameters, servo gains, and commutation, to arrive at the best overall machine performance?
Machine performance data trace
Frequently, the answer to this question begins with accurate and sophisticated data measurement, also called Data Trace. Most modern motion controllers allow the user to record various parameters of the external system, most commonly position (typically from an incremental encoder), but also occasionally velocity, vibration, and other parameters.
However, measuring external parameters is not enough. What if we want to know the motion position compared to the desired (commanded) position at each moment in time (this is called the position error, or the servo lag). The desired position at each instant of motion is only available from the motion controller itself. It can not be measured. There are in fact several internal parameters that may be useful in determining not only how the machine is performing, but more importantly why it is performing the way that it is.
What characteristics of the trace system are important? The list below gives additional information on what may be important in your efforts to optimize machine performance:
What variables to capture
Beyond the external parameters such as encoder position and the status of externals signals (analog and digital) some other useful parameters of the motion controller to trace are:
- Commanded (instantaneous desired) position
- Commanded velocity
- Commanded acceleration
- Motor command (output command to amplifier)
- Position error (servo lag)
- Servo integral (amount of windup)
- Servo derivative
Number of simultaneous trace variables
The more the merrier. Two is a minimum, but three or four can be useful. Trace period: The user should be able to select how often data is captured, up to a data point every servo cycle. This may generate a lot of data but for certain precise motions this high level of accuracy is critical.
Example motion product with trace
The Magellan MC58420 from PMD is a state-of-the-art motion controller which supports a trace facility. The MC58420 is a chipset which provides up to 4-axes of servo controlled motion with advanced features like S-curve profiles and electronic gearing. It supports up to four simultaneous trace variables, and can be used with a user-defined amount of RAM memory that the chipset directly writes to.
How much data is to be stored should be selectable. Typical traces are at least 1,000 points. Often they are 10,000 or more. With 4 simultaneous traces at 4 bytes per point this means at least 16Kbytes, but often up to 256Kbytes of RAM is dedicated to trace storage.
When to start the trace
We will discuss this in more detail below but it is important to be able to specify when (upon what conditions) the trace will start.
When to stop the trace
Same as for start of trace. Sophisticated motion controllers allow the end of the trace to be programmed as well as the start.
How to capture
Capture modes are typically one-time (fill up the buffer and stop) or continuous (treat the buffer as circular and keep the latest data available).
This is very important. It is not sufficient that the motion controller allow the host to query for various parameters. To keep all the data synchronized the motion controller “engine” should directly support the trace function, usually using a RAM that it writes to while the trace is active.
Using the trace
In the simplest configuration the data trace allows you to look at servo and profile parameters to determine how the system is functioning. In this mode the trace capture typically starts at the moment the motion “go” command is given, and stops when the trace buffer is filled. As long as the axis under study settles by the time the trace buffer is filled, this type of capture will be satisfactory.
Some applications require the trace to start upon the occurrence of some event. In the case of the Magellan MC5840 chipset any of the numerous digital signals may be specified as the trace start trigger, as well as any of several internal chipset events. This is useful for looking at events that happen not at a particular time, but based on some external system occurrence.
Sometimes it is useful to capture continuously and stop the trace upon some event. This can be accomplished using the MC5840 by putting the trace in rolling mode, and setting a special stop condition. This can be used to look at the performance of the motion leading up to a particular event. For example if a servo error occurs very infrequently, the Magellan MC5840 can be set to stop the trace on a servo error. Depending on the size of the trace buffer, seconds or even minutes of the preceding trace data will then be captured, showing how the system behaved leading up to the final event.
Most state-of-the-art motion trace facilities allow you to capture more than one variable at a time simultaneously. Particularly when examining the whole machine performance this capability can be very important. For example if you want to look at the interaction of one axis with another you can trace the position as well as the servo lag for two axes simultaneously (total of 4 variables). The resulting data will explicitly show any interaction that may be occurring between axes because the data will be “time-stamped.” In other words the four traced variables will be collected at the same moment in time for each element of the trace array.
Data trace, the ability to measure and record both external and internal parameters of a motion system, is a very important tool in optimizing the performance of your machine.
A truly state-of-the-art trace facility can be used as a sophisticated problem solving tool, greatly enhancing the ability of the designer to determine the reason the system is performing as it is.
When you select a motion controller for your next design be sure that it supports the data trace capabilities you will need to bring your design to its full potential.
Article written by:
Founder & CEO
Performance Motion Devices
- Achieve 2X Faster Development
- Mathematics of Electronic Motor Control
- Motoring to Success
- Motion Controller Design Architecture - A Deep Dive
- Optimize Control of Syringe Dispensing