O'#g¢TmO P'O|NT Optimizing a servo system f o r a c o o r d i n a t e m e a s u ri ng machine, A. T. Sutherland and D. A. Wright * Time saving is the primary justification for a CMM. The data acquisition activity (probing), in general occupies over 95% of the real cycle time, and is dictated by the characteristics of the machine and its servo control system. Considering a# the requirements, a control system based on a microprocessor was chosen. The microprocessor can be programmed to suit the system requirements in a way which cannot be achieved in pure hardware systems. The control program can even be edited in real time by passing relevant parameters from the supervising computer, if required.
Keywords: coordinate measuring machines, servo control systems, data acquisition, microprocessor control
Controlled manufacture, like any other controlled system, relies on rapid and accurate error feedback. The coordinate measuring machine ( C M M ) was invented to reduce the time required for accurate inspection, and time saving remains the primary justification for such machines. The factors relevant to the productivity of a C M M are:-(1) (2)
(3) (4) (5)
The ease of creating and 'de-bugging' part programs. The ergonomics of the user/machine interface for measuring 'one-off' components, or creating a part program by 'learning'. The time required to move the probe and obtain accurate data from the part, Trn. The processing time, Tp, for the raw data to obtain the desired information (eg fitting data to a cylinder). The time required for output of results, TO, and for interpretation by the user.
The three 'real time" elements in the process are normally activities (3), (4) and sometimes (5). Their relationship is shown in Fig la. Measuring a 50 mm diameter bore using four probings might take a total of 12s, where Tm is 9s, Tp is insignificant, and To is 3 s. However, for certain features, Tp could extend to several seconds. For this reason a scheme, whereby the control system obtains 'probing data' for the next feature at the same time as the computer is processing measurement data from the last feature, is under consideration (see Fig 1 b). If the last result is necessary for the next movement (eg it may be the datum for the following features) then the probing
will be suspended until the result is available. Time saving is 2% to 30%, depending on the feature 'fitted'. The output activity, (5), need not use real time, in that the results can be printed, plotted and/or filed in parallel with the other processes. Therefore the data acquisition activity (3), in general, occupies over 9 5 % of the real cycle time, and is dictated by the characteristics of the machine and its servo control system.
A c c u r a c y and speed Accuracy and speed are conflicting requirements. C M M errors are composed of systematic and random components. Systematic errors may be compensated relatively simply, eg by software error correction, but random errors, by their very nature. are not amenable to such treatment. On a kinematically designed C M M with air
M o t i o n d-a~a to c o n t r o l s y s t e m and obtain measured data for feature ~ n
M o t , o q d a t a to (:ontro~ system an(1 oo~a~n m e a s u r e o d a t a ~or { e a t u r ~
.......................................... •
T# Process data f o r h _ t o give results
OtJ t:):;: r:~su It5 a
Probe feature
Probe featur~
Fn
Fn ~ 1
b
* FerrantL Dalkeith, Scotland, UK
Process a a [ a TO, ! F,, • ~ t o give resuH
Fig 1 Inspection process
P,ob~ featu,e
Sutherland and Wright- servo system for C M M
Table 1 T i m e s (s) t o m e a s u r e a 50 m m d i a m e t e r b o r e Low speeds Low accelerations
High speeds Low accelerations
Low speeds High accelerations
High speeds High accelerations
9.95
9.90
9.05
9.00
bearings, random errors tend to be dominated by inertial/dynamic deflections. Measuring accuracy is virtually unaffected by speed, say between 50 mm s 1, but it is directly affected by a c c e l e r a t i o n . The relationship between acceleration and measuring error is elementary in theory (Fig 2(a)) and in practice (Fig 2(b)). Unfortunately, cycle time is more sensitive to an increase of acceleration than to an increase of a maximum speed which may never be reached (Table 1). To maintain accuracy, maximum stiffness to mass ratio and maximum damping are desirable. Therefore the mechanical designers of a C M M are given inertial deflection/natural frequency targets, whilst the servo engineers are required to remain inside specified acceleration envelopes at all times. These two complementary aspects must be matched to achieve speed with accuracy.
Mechanical design A practical acceleration for probing is between 50 Acceleration
Mass
\/ Force
/
Stiffness
Deflection
l
Error Fig 2a Theoretical relationship between measuring error and acceleration Accelerating
+0.4
Coasting
+0,2
d__ -0.5
+0.5
0.2 d
E
Time after end of acceleration ramp, (s)
w
0,6
Fig 2b Practical relationship between measuring error and acceleration
PRECISION ENGINEERING
and 100 mm s 2. Lower values tend to be swamped by environmental vibrations, including acoustic ones. Higher values tend to give the mechanical designer an impossible target. The time taken to accelerate to a typical probing speed of 10 mm s 1 is 100 to 200 ms, and the acceleration ramp extends over about 1 mm distance. Positioning moves may be made with significantly higher accelerations, whilst the highest acceleration is used to stop the probe a f t e r latching the data. Therefore, the acceleration is a maximum immediately after probing, and a minimum immediately before probing. Natural frequencies of the measuring loop around 20 to 30 Hz are achievable, even on large machines, corresponding to inertial deflections of 4 - 3 t o + l . 5 / ~ m a t __+50mms 2. Natural frequencies of the positioning loop may be significantly lower because the servo p o s i t i o n i n g accuracy required is typically an order poorer than m e a s u r i n g accuracy. In practice, some compliance is built into the axis drive system to prevent high frequency, high "g' noise being transmitted to the measuring elements. Hollow box construction is preferred for all moving members, perhaps even in ceramic or a carbon fibre/graphite composite to maximize the stiffness to mass ratio. However, mention should be made of the use of solid granite moving members on large CMMs. The mass and/or stiffness to mass ratio of solid granite is order(s) of magnitude worse than hollow box construction (see Appendix 1 ), so the designer must use a high acceleration r e l a t i v e to the stiffness to mass ratio. Accuracy can be recovered by ensuring a dwell period at zero acceleration/constant velocity prior to probing. Granite's natural damping helps here. In joystick mode, the dwell is achieved by taking a second probing under closed loop control with relevant algorithms. In DCC mode, the dwell can usually be achieved by specifying a low probing speed and suitable clearance distance. The ramp length reduces as the square of the probing speed, and soon becomes a small fraction of the minimum practical touch distance. The ultimate application of such techniques must have been one large granite machine with a natural frequency of 2 Hz which was persuaded to measure accurately, but getting the probe into small holes proved tricky. Two benefits of granite are its suitability for precision lapping, and the brutal design simplicity of granite guide members. But error maps are replacing lapping, and finite element analysis is replacing brute force. A spin off from the low mass design philosophy is the reduction in servo power required, and hence of power and heat dissipated at the CMM.
223
Sutherland and Wright---servo system for CMM Therefore, a high stiffness to mass ratio is essential for speed with accuracy, but some of the techniques learned on low stiffness machines can be used to enhance the performance of high stiffness machines.
Gratir signals
Servo amps
[-Posi iona,3 lters ~ ttches~
...... (~ontrol I program 1 L (EPROM) j
I0:::
Comou~er
RA M ....
D/A converters
CPU
Arithmetic processor
High speed parallel I/ F
1
,
i /
Control system design The following were the requirements for the control system for a range of CMMs. (a)
(b)
(c)
(d)
(e)
(f)
The system must be capable of controlling the position, velocity and acceleration of the machine's moving members so as to produce an accurate probe tip locus. In certain applications the 'vector' accuracy is of major significance in obtaining accurate data. During motion, the acceleration parameter must be kept within specified limits. This value varies depending on the activity. For example during probing the acceleration will be limited to 80 mm s -2, during positioning to 200 mm s -2, and while stopping after probe contact to 400 mms -2. The control system must have monitoring facilities to ensure no misuse or potential misuse of the machine. This is primarily concerned with providing fail-safe safety features. The system must be able to accept and respond to a variety of command signals, eg from joystick, analogue or switch type probes, etc. There must be a high-speed bi-directional communication channel between the controller and supervisory computer. The computer provides the control data and commands required to probe the features on the part. It then accepts the data from the control system, and any machine status information, for the subsequent data processing, The basic system must be easily adaptable to machines of varying sizes, performance and accessories (eg rotary table).
Considering these requirements a control system based on a microprocessor design was chosen. An outline for the overall system is shown in Figs 3 and 4.
High speed serial I I/!F !
/ l
t
t- Z
(
~ J
| -Afd
\
I Display I.
I.' Probe
/i
Clock
Emergency'
Jovstick
Fig 3 Microprocessor control
computed via a high speed arithmetic processor (see Appendix 2). This allows the CPU to perform some of its other tasks eg sending data and status information to the computer, servicing the display, joystick commands, etc while the error is being computed. Other events, eg the probe, limit switch, any emergency condition, etc, can interrupt the CPU and cause a branch to relevant service routines. If an emergency situation is detected, the CPU rapidly halts all axes, then reports the condition to the computer and the operator's display. The servo power is independently switched-off by the monitoring hardware. A probe interrupt causes automatic latching of the position data, and the CPU executes a controlled ramp down at 400 mm s 2 max. The probe is then 'backed off' to clear the part by approximately 0.15 mm. If the machine had been executing a 'touch' procedure the data is stored in RAM and sent to the computer at the required time. If the machine had been executing a positioning move (ie was not expecting to hit a surface) then
,/
....... ~.
/
\
'
\
\
/
/
p
x
~ s"
\
/
I¢
"%
Signal failure detector
j
\
F-
i /
i!
\
control
\,
and
~........
motor..//
./'~............. \\ ~lr / Y amp, k
/-- [ and ,~ /' \ motor / ..... ~','
.-',~
, \ ,croprocesso,
\
%
/ X amp, ",,
/'
_-~
...........
I
/ Emergency \ \X/~ | stop and } / \ , \ limit 1// x X x SW teh /~/~ ', .... ~-Dl/''. h"
= _ _ s
;
Power ! i .....i source t .....................
J
........ ~. 'iv/
-
.]
" h ....... I /" / / /
,
•- ~ - ~ - - 7 ~---Iib----{ .E---l~-~k
i
ower ~
~ sw~tch Y-~-It 4 off -
--~J
I 'Z' column ~ fa ure )
Microprocessor control
224
'Shaper'
I tEPROM} I
i
~k
Fig 3 illustrates the essential items and their relationships within the microprocessor control system. The heart of the system is the control program contained with the EPROM memory and executed by the central processing unit (CPU). This program is 'event' driven, the main event being the interrupt from the 40 ms system clock. At each cycle the machine position is sampled (at the same time for all axes) and compared with the current target value. Any error is computed and sent to the power elements of the control loop, via the digital to analogue (D/A) converters. The machine error is
I
/
i
...
i
Z amp \~
I
...
£ ~ and V .......... / x motor/, iI .............. --
Fig 4 Safety logic
OCTOBER 1987 VOL 9 NO 4
,
Sutherland and Wright
-i
ID_ f,.O
_
servo system for C M M
Am
_
co
T2l__ Time
i-
Deflection
TO
~J {.3
T1
T3
< !
,!
I
i
7
Fig 5 Joystick "shaper • characteristic
V
m/
\
o
the operator has the option to clear the obstacle using joysticks and then to continue to the final target, or to cancel and continue with the following movement. The machine may also be used in joystick mode by the operator. The joysticks effectively produce an analogue voltage proportional to deflection. This is first digitized by an analogue to digital converter, the output of which is used to address an EPROM programmed to generate the response shown in Fig 5. This characteristic provides fine control at low speeds ( < 1 mm s 1), a definitive maximum speed, and a null zone. When the joystick for one axis is deflected outside the null zone, that axis becomes a velocity loop, the other axes remain under position loop control, and hence remain effectively locked. The output from the 'shaper' EPROM is processed by the CPU and directed to the appropriate D/A of the axis to be driven. The CPU ensures that the rate of change of the commanded velocity is within the permitted measuring acceleration, irrespective of joystick handling, so ensuring the specified measuring accuracy.
Servo system The C M M is powered on all axes by suitably rated DC torque motors. They are driven by pulse width modulated (PWM) power amplifiers, which have the characteristics of fast response and virtually zero dead band. The first stage in the design was to characterize the elements of the system in terms of their linearized frequency response functions. This was done by low signal measurement of the motor and load combination and from design information regarding the servo amplifier. Figs 8 and 9 illustrate the elements in the velocity and position loops. The static gain was chosen to give a static position error of 20 l~m (ie gain = static friction torque/static error). The position loop bandwidth of 10-12 radss 1 was chosen as being an order less than the sampling frequency in the processor. This results in a following positional error of approximately 17 mm when moving at 1 8 0 m m s 1. At probing speeds ( l O m m s 1) the error is l m m . However, if all axes
PRECISION ENGINEERING
> TO
T1
T2
P3
T3
C
P2 t-
.uo o o_
P1 Po
-I
I
TO
1
T1
T2
T3
N1
N2
N3
Fig 6 Parameter profiles
are matched for position loop gain (this is easily achieved to less than 3 % ) then the deviation from a commanded vector is less than 25/xm at 10 mm s 1. The system may be fine tuned for linearity by adjusting the gain factor Kp for each axis by commands to the control system via the computer. The velocity bandwidth was designed to be approximately 80 100 radss 1. This value put most of the other system poles eg electric time constant of motor, coupling etc outside the velocity loop. To maintain the high static gain it was necessary to include phase compensating networks around the pre-amplifier. The microprocessor also
40 ms o
Latch & sample M/C position
I
lO0#s
Calculate errors and output to D/R
I
300#s
Calculate position for next sample 5ms
Fig 7 Error process time
225
Sutherland and Wright---servo system for C M M Preamplifier K[1 +ST1] j S[1 +ST2]
Current control ~
Motor armature
l Bridge i 100011 +ST3] I V r - ~ K ~ L ~ S
,
L_
~ 1
Motor + ioao -- .............. K
1 Ra[I+STm]
~
. . . . /"
W jr--=-S
[. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Current feedback ,~
[~ +sT]
Velocity feedback Ks q
[I +ST]
[. . . . . . . . . . . . . . . .
Fig 8 Velocity loop
introduced a small amount of integral error control which was used to minimize the effects of drift in the amplifiers. The measured performance of a typical C M M gave a linearity of movement of approximately 5 0 # m when moving at 10 mm s 1 with negligible overshoot ( < 10/~m). The system is deliberately slightly overdamped resulting in a slightly longer time to reach a specific target ( + 0 . 1 s). However, this may be recovered by relaxing the positioning tolerance zone, allowing the machine to proceed towards the next target as soon as it is inside the zone. Safety
The overall safety monitoring is shown in Fig 4. The safety requirements for the vertical axis differ from the other axes. Runaway in Z can occur w i t h o u t motor runaway, for example in certain counterbalance failure modes. Therefore monitoring the tacho is not adequate, and instead the displacement transducer signals for all axes are continuously monitored for over-speed and invalid amplitude, using circuitry independent of the
I t I
Microprocessor
IE
lV ~ ~
W ~-2--]
microprocessor which controls the servos. Any error switches off the servos and dumps the air supply to the Z bearings, thus locking the probe column. Note that injury by a Z column is more likely to be caused by the column kinetic energy rather than its weight alone especially with the preferred lightweight design. The microprocessor itself also monitors the apparent speed of the CMM, particularly useful if the counter should run away for any reason when the servos shut down before any significant movement can occur. All axes have friction drives, which limit the force which can be applied to the operator, part or C M M structure. In the event of a hard crash, the clutches also dissipate the substantial kinetic energy of the motor assemblies, which have high referred inertia and speed. However, because the drive force on a large C M M is thousand(s) of Newtons, further operator protection is provided by mounting the complete probe column kinematically, not unlike a giant Renishaw probe stylus, and sensing abnormal movement of the slave bearings to trigger an emergency stop. This displacement of the column again minimizes force, injury and damage in a hard crash. An interesting hazard occurred during a test crash, when a master air bearing which had not been correctly trapped, fell out and was left dangling on its air supply pipel After replacement, the squareness was checked and found still within specification.
x Conclusion
I I L
FLg 9 Position loop
226
The microprocessor is an excellent friend of the mechanical engineer. It can be programmed to suit the system requirements in a way which w o u l d have been impossible a few years ago. The control program can even be edited in real time by passing relevant parameters from the supervising computer,
OCTOBER 1987 VOL 9 NO 4
Sutherland and Wright~servo system for C M M
Appendix 1 S e r f - i n e r t i a l d e f l e c t i o n s etc at 100
mm
s -2
The following figures are primarily comparative, but are based on the hollow steel design for a Merlin XL, 5 m x 2.5 m x 1.75m. 1 Probe columns for 1750 mm Z travel (1750 mm effective length) Granite Hollow steel same weight 225 dia x 2 mm thick 71 mm dia LID W(kg) E(N m /(mm 4) d(/~m)
-19.25 205 x 109 8.7 x 1 06 0.70
2)
25 : 1 19.25 95 x 109 1.26 x 1 06 10.8
Granite same dia 225 mm dia
Granite same defln 280 mm dia
8:1 192.5 95 x 109 125.8 x 106 1.08
6.3:1 299 95 x 109 302 x 106 0.70
In practice, the steel column is tapered in both diameter and thickness. This further enhances its stiffness:mass ratio, and permits deeper probing of measured features. The steel column is not a guide member, hence L/D ratio is not relevant. 2 Bridge beams for 2500 mm travel (4000 mm effective length)
L/D W(kg) E ( N m 2) /(mm 4) d(/~m)
Hollow steel 800 x 800 mm
Granite same weight 339 x 339 mm
Granite same section 800 x 800mm
Granite same defln 983 x 983mm
5:1 1297 205x109 4.23 x 109 1.1 8
12:1 1297 95 x 10 9 1.1 x 1 0 9 9.92
5:1 7447 95 x 10 9 34.1 x109 1.84
4:1 10721 95 x 109 77.8x109 1.18
Note The stiffness: mass ratio of aluminium is the same as steel. The lower density of aluminium can sometimes simplify design by allowing thicker walls, but its higher thermal expansion coefficient is unwelcome.
Appendix 2
T1 = Vm/A m~N1
Positioning algorithm
12 = D 3 / V m ~ N 2
The positioning algorithm is such that it must control the acceleration, velocity, and position of the machine axes in order to move to its commanded position in a straight line (within a given tolerance zone) with minimal overshoot. The theoretical profiles for each of the parameters are as shown in Fig 6. Once a new target vector is acquired the high speed processor computes the following initial values: D3 = ,/P3 -/Do/
where
T3 = T1 + T 2 ~ N 1 4 - N 2
N 2 is calculated first and Vm adjusted (Vm ~) to make N2 • the nearest integral value to N2. Using Vm~, N1 is calculated and Am adjusted (Am ~) to give N1 ~ the nearest integral value to N 1. The microprocessor calculates the position vector at clock sample 'n' on the following basis: Section a
Pn
[D1
0 <~n <~N1
n
2 ~
/°3 = Target position vector Po = Current position vector u = ( P 3 - P 0 ) normalized,
Section b
N1< n < N2
p~n=[Ol_t ( D 3 - 2 D 1 ) ( n -
D 1 = V2/(2 x Am) D2 = D3 -
D1
PRECISION ENGINEERING
where N21 = N2 - N1
227
Sutherland a n d Wright---servo system for C M M Section c
N 2 <<.n <~N 3
F(N3 - n) ] 2 ]
L Section d
] ]u
n > N3
Pn =
These position vectors are calculated one clock period in advance of the actual sample of machine position. When the machine position is sampled the only processing to be done is a high speed subtraction
228
and scaling before output to the digital to analogue converter. ie
Error in X Error in Y Error in Z where [X, Y, Z]
= -= -.
(X--Px)Kx ( Y - Py)Ky (Z --Pz)Kz current sample of machine position [Px, PY, Pz] = Pn the theoretical machine position [Kx, Ky, Kz] = gain constants for each axis
Typical processing times are as in Fig 7.
OCTOBER 1987 VOL 9 NO 4