
Optimising machine movement to maximise cut quality, productivity and machine life.
Author: Chris Williams
Introduction With the advent of high specification CAD packages which permit
users to easily produce an accurate multidimensional path or orientation in space by the final tool
element, motion control manufacturers have had to invest considerable effort and finance into research
and development of complex motion algorithms to provide very smooth velocity profiles for the axes to
follow whilst maintaining a very high degree of positional accuracy and further more, reduce execution
cycle times to increase machine productivity. The difficulty for the motion control designer is
the part produced within the CAD package may appear to have blended intersections, however this is
generally not the case when proved mathematically. In practice the CAD user cannot be expected to ensure
every intersect is a perfect blend. Therefore, to attain smooth and continuous axis velocity profiles
from any given data, this very complex problem is left with the control manufacturer. Why is it
necessary to produce smooth velocity profiles? 1. To prolong machine life. Motion axes being
commanded to instantaneously change velocity will in a very short period of time prove to be unreliable.
2. Increase reliability of the drive chain. 3. Reduce machine maintenance.
4. Significantly improve cut quality of parts being machined. 5. Reduce cycle execution times.
6. Reduce tool wear, thus again increasing throughput. Continuous Motion
A stream of linear (vector), arc, bezier or spline commands will generally specify a continuous
multidimensional tool path. From this data the 'motion planner' needs to generate a velocity profile for
each moving axis, keeping it within its acceleration, deceleration and terminal velocity limits. To
simplify the generation of axis velocity profiles and make best use of modern micro-processor features,
for example caching and data bursting, the input data should be converted to a common format which would
be generally vectorised or splined. To achieve this, the 'motion planner' must know what is to be
executed ahead of what is currently being executed. The term for this function is 'look-ahead' and
constitutes the main criteria to permit the generation of continuous smooth motion. 'Look-ahead' is the
process of examining and performing some pre-calculations on programmed commands ahead of the last
command to have its final velocity profile calculated and specified. There are disadvantages
associated with looking-ahead, however they are far outweighed by the advantages, however for completeness
they are as follows. 1. To 'look-ahead' and perform the pre-calculations requires a significant
amount of processing power which may require a multiple processor solution. 2. To store the motion
commands and hold onto them until the complete velocity profile has been specified requires a significant
amount of fast storage media, generally SRAM or DRAM. The extent of the disadvantages will be
determined by how far the controller is looking ahead. A number of controls on the market today do not
look ahead many more than 10 commands. This significantly limits how quickly the controller executes a
part program which requires high cut speeds with accurate positioning, however it does not have any
detrimental effect on the overall smoothness of the velocity profile. By 'looking-ahead' at more
commands the 'motion planner' has a much better chance of achieving the programmed terminal velocity and
keeping the tool speed constant when executing a series of short moves providing the controller is able
to calculate quickly enough. If the 'motion planner' is looking at the next 10 moves to determine the
end/final velocity of the 1st move then the end velocity of the available acceleration and deceleration
distance for those 10 moves will limit that 1st move. However if the 'look-ahead' is increased to 100
then the 'motion planner' is able to accelerate the axes to a higher velocity, probably achieving the
required programmed terminal velocity due to it knowing the available acceleration and deceleration
distance for those 100 moves. To recap 'look-ahead' permits the controller to accelerate, decelerate
and more importantly still as far as cut quality is concerned, keep the tool speed constant across a
number of consecutive move commands. Intersection Velocity Limiting When executing a
series of vectors it is necessary to limit the velocity change of each axis at the intersect to prevent
the machine from jolting at the end of one vector and the start of the next. Therefore each individual
axis may need to automatically decelerate going into the intersect and then accelerate on the other
side of it. With some motion controllers they leave this function to the CNC programmer. It is by far,
more desirable if this complex problem is resolved by the controller as the permissible velocity changes
are a function of the machine being controlled and not the part program. The size of the velocity
change will be directly proportional to the change in direction. Therefore the larger the intersect angle
the larger the velocity change. A simple, yet very effective solution to this problem is to permit
the system builder to configure a set of parameters for each axis which set the maximum allowable velocity
change at minimum speed and the maximum allowable velocity change at maximum speed. Using these parameters
the control equations can interpolate to obtain the intermediate permitted velocity changes for any given
angle change. With these parameters the step change at the intersect can now be controlled and it is left
with the system builder to trade part quality against job cycle execution time. The higher the settings,
the higher the throughput, however at some stage part quality will be compromised as the machine will not
be able to change velocity instantaneously as being specified. A further degree of control needs
to be embedded within the motion algorithms to enhance part quality. When decelerating all axes to a stop
due to a large intersect angle having been specified it is often necessary to pause at the intersect
before accelerating off in the new direction. The pause is required to give the stopping axes time to
settle at the intersect before changing direction which prevents against the possibility of a wavy line
being machined. The length of pause/dwell should be proportional the size of angle change to minimise
the overall effect on the job execution time but still sufficiently large enough to attain the required
cut quality. A simple way to achieve this is to specify the minimum angle change for which a minimum
pause will be required and specify the pause required for a complete change of direction i.e. 180
degrees and then interpolate to find the intermediate values.
Vector Blending This function is required to remove the velocity step changes caused by
direction changes at vector intersects. Reasonable motion smoothness can be achieved without vector
blending providing the velocity changes are limited to within a range the mechanics and drive chain can
cope with. To achieve the optimum velocity profile, to gain the highest cut quality and reduce job
execution time vector blending is a must. To achieve a continuous motion profile without velocity
step changes the vectors must be blended to each other with other curves. The blend used is parabolic
in shape and allows a smooth change of velocity, but not acceleration between successive vectors.
Whilst blending allows faster overall machine motion, the trade off is part accuracy since at the blend
the tool must deviate away from the programmed path. The permitted deviation distance should be a parameter
the system builder can configure to permit the trade off to be made.
The curve is a consequence of one axis accelerating and another decelerating either side of the intersect.
Generally when executing some form of arc contouring whether it be arc, ellipses, bezier, splines etc.
vector blending permits the original data to be broken down to a much more coarse resolution as the
vector blending algorithms will ensure a smooth velocity transition occurs at the intersect. This is
quite an important realisation as breaking the original data down is mathematically intensive, therefore
generally time consuming for the controller. Before assuming it is not acceptable to deviate from
the programmed path consider how accurately and repeatable the machine can position. Also consider how
well the servoing function can follow the path specified for it and also bear in mind the specification
of the component being machined as the tolerance may be greater than the deviation distance. In some
applications it will not be acceptable to deviate away from the programmed path, however with the majority
it is quite acceptable as the extra amount of productivity far out weighs the small inaccuracy of the
component. In some cases the component accuracy may be improved due to the velocity profile being that
much smoother. Small circle/arc problem It is often desirable to reduce the
resultant tool speed when executing small arcs or circles to improve the quality. The CNC programmer
specifying a speed change for the relevant arc has historically achieved this. However this is quite
time consuming and prone to error. The ideal solution would be for the 'motion planner' to scale the
programmed speed automatically based upon the angle change and distance over the next number of vectors.
The flowchart below shows how this may be achieved.
 Axis Trajectory Generation Once the final velocity profile has
been specified by 'looking-ahead', limiting intersect velocities and blending where possible the next
stage is to break it up into set points. Set points are either velocity or positional commands to be
executed at specified time intervals. The time interval is generally termed 'trajectory time' and
typically ranges from 1mS to 30mS. Simple trapezoidal velocity profiles do not completely capture
the machine characteristics and more advanced controllers allow the specification of an 'S' parameter
which governs the rate of change of acceleration for each axis. This additional parameter takes into
account the fact that the machine requires a finite amount of time to change its acceleration and
deceleration. The effect is to smooth out discontinuities in the velocity profile and thus achieve
smoother acceleration, deceleration and transitions from acceleration to constant velocity and from
constant velocity to deceleration. The component accuracy can also be improved by 'S' curve ramps, as
generally the axis inertia is high enough to cause quite large acceleration errors. By changing the
rate of acceleration the acceleration errors can be kept to a minimum. A major problem with
generating trajectories for low-resolution axes or axes which are to move at slow cut speeds is the
effect of quantisation errors.
Although the above graph showing the effect of quantisation errors is slightly exaggerated for the
purpose of illustration the effect on the cut quality can be quite serious especially with very dynamic
systems. Quantisation problems also result in a saw tooth occurring on the constant velocity portion of
the move, again having a detrimental effect on the cut quality due to the speeding up and slowing down
of the tool. With some mechanical systems the problem may be sufficiently damped by the drive chain or
the inertia of the machine so as not to cause any practical problems, however if the control manufacturer
is aiming to produce a system which may be fitted to any mechanical system then it is a problem which
must be addressed. The solution to what appears to be a relatively complex problem is quite simply
to calculate velocity and positional set points to a higher resolution than that of the machine being
controlled. This eradicates the problem created by the trajectory generator and removes the possibility
of quantisation errors occurring when calculating the control signal to output to the drive amplifier
from within the servoing function. Alternatively, instead of using fixed point arithmetic floating
point could be used to calculate the set points which would resolve the quantisation problem, however
this leads to other problems which are outside of the scope of this paper. Servoing
Once a smooth, accurate co-ordinated set of velocity or positional command profiles for each axis has
been generated all that remains is for them to be faithfully reproduced by each axis driving motor. In
the case of either AC or DC motor this objective will normally be achieved through the use of a feedback
loop, usually with an optical encoder perhaps mounted on the motor shaft, providing the necessary
position and velocity feedback information. When designing the motion control if commercially
available drive amplifiers are to be used which operate from a +/- 10 volt signal then the resolution
of the DAC outputs must be considered as this is your control signal to the motor. Generally 12 bit
DACS (11 control bits + 1 sign bit) will give acceptable control, however 16 bit DACS will give smoother
control providing the servoing algorithms are able to make best use of it. Also the least significant
bits should not be lost to noise problems with your DAC circuit. The following system diagram shows
how a control loop using PID strategy with feed forward and notch filtering may be implemented
 If PID strategy is being deployed to make the axis follow the trajectory then the
differentiation mode should be considered. Differentiating 'following error' (difference between the
current axis position and the position specified by the trajectory generator) will easily give much
smaller tracking errors at the expense of motion smoothness. By differentiating position the control
signal will generally have a reasonable amount of high frequency oscillations, which does not bode well
for motion smoothness. This is due to the dynamic nature of the error signal i.e. it is unlikely to be
very stable or constant, especially during acceleration and deceleration. Differentiating velocity
is the other option. This mode permits a much smoother control signal to be calculated, as the actual
velocity of the axis will be far less dynamic. By differentiating velocity the control signal and
following error will be proportional to the commanded velocity as specified by the trajectory generator.
Intuitively, due to the following error being relatively large at terminal velocity it is natural to
assume the component accuracy is being compromised for motion smoothness. This is certainly not the case,
providing the axis following errors are reasonably balanced (i.e. for 45 degree move the X:Y ratio is 1)
and there is a sufficient pause to permit the axes to 'catch-up' before changing direction then the
accuracy of the component is not compromised. Feedforward Control Feedback systems in
motion controllers are able to move axes by examining the current position and looking to see where it should
go next. This results in a control signal being calculated to compensate for the discrepancy. In practice,
feedback configurations exhibit varying lag times between commanded and actual trajectory for each axis
due to differences in dynamics, inaccuracies in acceleration and deceleration. An ideal solution to
overcome the lag is to add extra intelligence into the compensation loop. This is achieved by modifying
the control signal based upon the compensation loop knowing what the commanded velocity and
acceleration/deceleration is, ahead of the set point currently being calculated. The feed forward
block of the compensation loop is generally configured by two system parameters, velocity feed forward
(KVFF) and acceleration feed forward (KAFF). Some high performance systems, which permit independent
acceleration and deceleration rates, may also incorporate a deceleration feed forward (KDFF) parameter
to compensate for deceleration errors. Notch Filtering In the quest to achieve higher
precision component manufacture it has become necessary to overcome mechanical resonance. A digital
notch filter placed at the output of the compensator loop may be used to counteract the physical
resonance. We will assume that the filter is described by a set of quadratic coefficients of the
form determined by one of the many approximation methods e.g. Butterworth, Chebchev, etc. There are many
analogue and digital filter design software packages on the market which permit high level designs to be
generated which resolves the design to produce the quadratic coefficients. The basic quadratic
block for the implementation of an infinite impulse response filter is as follows: -
 Multiple order (length) filters can be implemented by cascading as shown
below for a fourth order infinite impulse response filter, that is feeding the output of one quadratic
block into the input of another.
 We can generate the transfer function for this section by determining the
expressions for the intermediate signal w(n) and the output signal y(n)
w(n) = x(n) + b1 . w(n-1) + b2 . w(n-2)
y(n) = w(n) + a1 . w(n-1) + a2 . w(n-2)
These equations can now be z-transformed to give
W(z) = X(z) + b1 . z-1 . W(z) + b2 . z-2 . W(z)
Y(z) = W(z) + a1 . z-1 . W(z) + a2 .
z-2 . W(z) The above two equations can now be rewritten and combined to determine the
transfer function for this section of the filter.
 As can be seen in the system block diagram of the fourth order IIR
filter, the input signal is first multiplied by the DC gain constant and is then processed through two
quadratic factors. For every quadratic factor an intermediate signal w(n) and an output signal y(n) is
calculated and every quadratic section requires the values w(n-1) and w(n-2) to be retained.
The final equations to be implemented may be written as follows: -
On a final note, filtering is really only necessary due to the control loop being unable to cope with
the dynamic response characteristics of the system being controlled. In an ideal world the transfer
functions would be generated for the system being controlled and suitable control equations generated
from them to remove the need to have extra control sub-systems. However as we are all trying to achieve
a flexible system, which may be applied to any system needing motion control, this is not a practical
solution. Therefore we give the commissioning engineer the tools and training to achieve an optimal
configuration for the system intuitively.
Top of the Page |
NEE Controls Homepage |
Motion Controllers
|