Copyright © IFAC Microcomputer Application in Process Control, Istanbul Turkey, 1986
FAST POSITION CONTROL WITH MICRO· PROCESSOR FOR MACHINE TOOLS U. Kunz and W. Oberschelp fllstitut fiil" Elektrische Ellelgietechllik, Universitiit Siegen, Siegen, Federal Republic of Germany
Abstract. Due to the development of automation in manufacturing engineering higher demands are expected regarding the accuracy and speed of machine tools and robots. A measure for the quality is given by the contour error when working off a given contour. This paper deals with a high dynamic position control based on a fast microcomputer. This microcomputer is coupled with a high accurate continuous contour control. Based on a model the continuous contour control generates the control function and the optimal system response of the position drives for a given contour on- line in order to suppress the deviation between the desired and actual position . The limitations of the control inputs and state variables are considered . The real drive system of each axis will be controlled at first by the control variable acceleration resp. current and then corrected by ~he optimal state variables speed and position obtained from the model system. with this information about the reference state of the drive in every point of time the mechanical disturbances (load torques and backlash) can be eliminated directly. Keywords. Optimal control , continuous contour control, position control, modelling, digital computer applications , machine tools , controllers.
INTRODUCTION
Further developments adapted this control to machine tools by implementation in a fast microprocessor system realizec by Oberschelp and Kunz (1983 , 1985) . ~he control method is based on setting the Acceleration resp. the torque of the mo to~ of each axis with respect to the path con'c'Jur and the speed of operation. The control variable is computed in consideration of the limitations of acceleration and velocity. Since the motor torque instead of the acceleration is the control quantity unknown load torques would disturbe the motion and result contour errors. Therefore a iceal model of the drive is the reference for the real drive . The ideal state of the model is compared with the real state and state deviations which results from disturbances and parameter variations correct the control - quantity of the real system in order to reduce or to eliminate these deviation& In this way the state of the real drive is controlled in a closed loop and the real system gets the behaviour of the ideal mode l.
The growing automatization in manufacturing engineering needs more and more machines with continuous contour control which move a work piece or work tool along a desired contour . These controls are mainly applied to machi ne tools (milling and turning machines, electrical discharge machines etc.) and robots. The desired motion along the given contour is obtained by position drives which are controlled simultaneously by the computerized numerical control (CNC). The number of the necessary drives depends on the degrees of freedom of the movement. Electrical position drives are preferred because of its high dynamics and simple power supply. In conventional continuous contour control systems contour errors can't be avoided if the work piece or tool is moved along a curved path. The va l ue of the contour error depends on the radius of curvature of the path and the velocity along the path (speed of machining operation) . ~urthermore the mechanical characte rist i cs of the forward feed systems affect the accuracy of operation . Nonli n ea r fric tion forces and backlashes reduce the dy namics of the position controlled drives as shown for instance by Stute (1975) and GroB (1981). In order to avoid contour errors at high speed of operation a new control method was developed by Hackstein and Kunz (1980, 1982) .
243
The mode l delivers the state variables vel ocity and position which are the reference q u a n t i ties for control loops which are su:>erposed on the torque control (e. g . curren t control) of the drive. By realization in a fast microprocessor system the state controller can solve additional problems as for instance the com~ensation of friction torques .
U.
244
KUIU
and W. O berschelp
CONVENTIONAL CONTINUOUS CONTOUR CONTROL Fig. 1 shows the structure of a conventional continuous contour control. The CNC generates on the basis of a desired contour the reference values of position s1w ... snw for all axis drives . The actual position values in each axis are s1 . .. sn' Disturbances as cutti n g and friction forces as well as backlashes influence the control systems. A speed control in each servo drive has to eliminate these influences . In order to obtain step responses without overshoot in the position control systems every position controller has proportional action with the gain factor Kv (see Schmid 1972). The output of the controller is the refe rence quantity for the speed control. During operation a deviation of the position must occur because the speed resp . the velocity is proportional to the deviation . Therefore the actual position lags behind the desired position. This lag in the position causes contour errors if the contour is curved .
If the position is measured directly e . g . by linear measuring scale at the support the structure of the position control loop is shown in fig. 2b . In this case the influence of the backlash can be eliminated but at an expense of dynamics . The ga in factor Kv must be reduced for stable and satisfying working of the position control.
r pOSllION CONTROLLER+ - FEEO FORWARD DRIVE
------~1
SPEED CONTROLLER ELECTRICAL DRIVE
Fig. 2b.
BACKLASH E
position control with direct position measuring syste;n
If there is no backlash the dimensioning of Kv is optimal for 0 , 3 . .. 0,4
• w
oA
5,. DE SIRED CONTOUR
with the eigenfrequency woA of the speed control loop of the axis drive .
V">
=>
= = z '" = = z
=
c; '" z
S2W
0
Fig. 3 shows the proportional gain Kv di vided by the value Kvopt with respect to the value E of the backlash in order to obtai n stable and satisfying operation as shown by GroB (1981).
S2
0
~
0
S,.
Fig. 1 .
0
5,
conventional continuous contour control
_K_v__ ,o~__-,____.-__-.____.-__-.____~
Fig. 2a shows the basic diagram of a posi tion control if a backlash with the value E exists outside of the closed loop for instance if the position is measured indirectly by an encoder on the mo tor shaft . In this case the backlash causes not recognizable position errors .
K, opl
.
0.8
"\
\.r-
0.64--
4-==1===1==9==9===1
0.4 +----+----+----+----f----f----I
.,I
r pOSllION CONTROLLER+ - F EEO FORWARD ORIVE--- - - - -..
0.2 +---+----+----+----+-----+-----4 0.0 +---+----+----+----+-----+-----4 o 10 20 3D 40 50 60
SPEED CONTROLLED ELECTRICAL DRIVE
BACKLASH E
Fig. 2a. position control with indirect position measuring system
Fig. 3.
Reduction of controller gain Kv by backlash E
Microprocessor for Machine Tools CONTROL METHOD FOR THE REDUCTION OF THE CONTOURING ERROR Fig. 4 show the structure of the realized control method. In o~position to conventional continuous contour control the position drive follows acceleration resp. current references. with the information about the dynamic of the position drives a model generates the reference values Vw and Sw of the state. The state deviation between vw, Sw and v, s forms the correction quantity 6i by a state controller. 6i is added to the control value iw to minimize the contour error.
245
the backlash is provided but not yet set into operation. The influence of a backlash is observed when the speed passes trough zero. For compensating the backlash in this points the drive must be accelerated with a high armature current pulse in order to pass through the width of the backlash as fast as possible. The short-time overload capacity of servo drives up to 10 times the nominal torque gives an advantage. Since a fast microprocessor (MC 68 000) is used the cycle time for a complete computation of the control algorithm corresponding to figure 5 is lower than 250 ~s.
DYNAM IC OF THE FOR WARD FEED DR IV ES CONTROL AND REF ER E ~ CE STAT E VAR IABLES COMPU TED BY THE CON TI ~ UOUS THE MODEL _ _ _ _ . _
C ONTOUR~TR ~O
V.
S.
ZERO PA S SAII~===;l DETECTION
~
DE SI REO CONTOUR
=>
'"
~~ ~ =
'" o o o
fig.
4.
VAR IABLES V AND S
o
structure diagram of a servo drive system with model reference control
In this way a solution was developed which yields the control quantities for the position drive of each coordinate axis considering the limitations of armature current (acceleration) and sneed (velocity) by an on-line computation. In order to enable on-line computation with a fast microprocessor (MC 68 000) a control was developed for such contours which consists of pieces of straight lines and arcs of circle. This is sufficient regarding usual machine tools.
DIGITAL STATE CONTROLLER Fig. 5 shows the structure of the digital position and speed controller. The references for the control variable acceleration a w resp. current iw and the state variables velocity Vw and position Sw are preset by the continuous contour control. A cascade control structure on principle is given. The deviation Sw - s multiplied by the proportional sensitivity Kv gives the correction signal 6v for the reference value v w ' The difference between (vw + 6v) and v is the input quantity for the speed controller. For this controller a digital PI algorithm is implemented which generates the correcting quantity6i. An additional reference value iR compensates the influence of friction in the forward feed system. For that purpose the friction torque was measured off-line with respect to the velocity and the functional relation between friction torque and velocity is stored into the memory of the microcomputer. Furthermore the capability of compensating
M.A . P . C.~
'.
fig.
5.
structure of digital speed and position controller
Fig. 6 show the flow chart of the digital control. To synchronize the continuous contour control with the state controller a interrupt handler is implemented. The INT 1 interrupt (1ms) is given by the cycle time of the continuous contour control. In this point of time new control references are delivered to the position controller (state controller). With this requirements the state controller computes the current control input iw in the way shown in fig. 5. The running period of time for the interrupt program is as mentioned above smaller then 250 ~s. In fig. 6 this time intervall is marked by hatching (number 1). In order to increase the accuracy of the state controller a second interrupt INT 2 is generated in intervalls of 250 ~s synchronuously to interrupt INT 1. In the points of time defined by INT 2 the controller gets actual input values of position and speed and generates new reference values of position and speed in the time intervalls 2, 3 and 4 marked by dotting on the assumption that the acceleration a w is constant in each intervall defined by INT 1. In this way the controller works with a cycle time of 250 ~s in opposition to the continuous contour control with a cycle time of 1 ms. The increase of the sampling frequency in the controller increases also the accuracy of the continuous contour control.
246
U. Kunz and W. Oberschelp
IN Tl
INT 2
I' , : ,
PROGRAM
FLOW
1
I
I
I
I
I
I
I
I
I
I
I
6.
fig.
I
I
program flow of the digital controller
RESULTS Some experimental results shall shown the advantages of the here described control method. The investigation were made in a test set up with two servo drives modeling a two dimensional machine tool. With this model motions in a plane defined by a cartesian x-y-coordinate system can be realized.
v m
..
A simple point-to-point-motion with the coordinates (x, y) = (0,0) ~ (200, 200) mm ~ (0,0) is regarded. The desired contour is a straight line which is passed from the origin to the point (200, 200) mm and then again back to the origin. In order to demonstrate the capabilities of the ~processor based position controller at first a motion is regarded if the drive is controlled only by the control variable acceleration without feedback of velocity and position. The control variable is switched on the current control according to the time optimal control law. Since a friction torque in the range of 30% of the rated torque exist deviation in the velocity and position must occur. Fig. 7a shows the transient response. In the lower part of the fig. the control variable is shown. In the upper part the velocity and in the middle the deviation of the velocity with reference to the optimal velocity are presented. As expected the velocity deviates strongly. In the next step a disturbance compensation is added to the control. For that purpose the characteristic of the friction torque was measured off-line and stored in the computer memory. The results of the compensation is shown in fig. 7b. Already this capability of the controller effects a great reduction of the velocity deviation although no feedback of velocity and position exists.
v
3iTiTrl 3
3m%-
2
3 2 1
1
0
0
·1
-2 -3 -4 -5 .0.5
3
3 m~n
2
.0.5
1
1
3iiWn
0
0
-1
-1
-2 "
~ 9A
Iw
9A
2 1
0 -1
-]
-2 -3
fig.
7a.
3 2 1 0
-2 -3
transient response of current controlled drive without friction compensation
fig.
7b.
transient response of current controlled drive with friction compensation
Microprocessor for Machine Tools
v 3lL 3 mm 2
v m 3 min
1 O~~~~~+-~~--,---~
-1
-2 -3
-.t
~ 24 ~m
JiL 12A
247
3 1. 1 0 -1 -2 -3
0 -1
3 2 1 0
·1 -2
fig. 8a.
transient response of the position controlled drive without friction compensation
In the next step the control loops of velocity and position are closed and the same motion as mentioned above is regarded . In the first test the compensation of the friction torque is switched off . Fig . 8a shows the corresponding transient response. In the upper part of the fig . the velocity, in the middle the deviation of position and in the lower part the armature current are drawn. The very small deviation of position is remarkable. Its value is only in the range of 6 urn at a resolution of 2 urn of the position encoder. Only in the switching points of the control variable the position deviations are greater . Fig. 8b shows the same motion but now with compensation of the friction torques. The position deviations in the switching points are reduced now considerably .
OUTLOOK In the next time a two-axis milling machi ne will be equipped with these position controllers and the accuracy of the con tinuous contour control will be tested. Furthermore a compensation of the backlash will be investigated and the characteristic of the friction torque will be determined on-line in order to obtain an adaptive friction compensation .
fig . 8b.
transient response of the position controlled drive with friction compensation REFERENCES
Gro/3, H. (1981). Elektrische Vorschubantriebe flir Werkzeugmaschinen . Siemens Aktiengesellschaft, Berlin, Hlinchen. Hackstein , D. (1980). Eine zeitoptimale Bahnsteuerung mit Digitalrechner . Dissertation , ~echnische Hochschule Darmstadt. Hackstein, D. and Kunz, U. (1992). Eigh Accurate and Fast Continuous Contour Control with Electrical Drives Third Int. HOTOR20~ Conference , Genf . pp. 383 - 391 Kunz, U. and Oberschel~, W. (1983). High Accurate Continuous Contour Control by on - line Simulation using Micropro cessors. Fifth Int . MOTORCON Conferen ce , Genf. pP. 665 - 675. Kunz~U . and Oberschelp , W. (1985) . Two Di mensional High Accurate Continuous Contour Control using a Multimicropro cessor System. Fifth Power Electronics Conference , Budapest. Vol. 1, pp. 141-150 . Oberschelp , W. (1985). Eine schleppfehler freie Bahnsteuerung mit Mikrocompu t er . Dissertation, Universitat Siegen. Schmidt , D. (1972) . Numerische Bahnsteue rung , Beitrag zur Informationsverarbeitung und Lageregelung. Springer Verlag, Berlin-Heidelberg, New York. Stute , G. (1975) . Die Lageregelung an Werkzeugmaschinen . FISW-Selbstverlag , Stuttgart.