Copyright © IFAC Microcomputer Application in Process Control. Istanbul Turkey. 1986
ROBOTICS
MULTIPROCESSOR CONTROLLED ROBOTS D. Naunin, K. Cevik and H.-C. Reuss /lIStitut fiir ElektrOllik, Tecizllische UIliI1ersitiit Bn-lill, Einsteillllfn 19. D- J 000 Berlin 10, German Democratic Republic
Abstract. This paper deals with the control of industrial robots. A completely digital control system for a six-axis-robot has been developed in the Institute of Electronics at the Technical Univer sity of Berlin. This modular control system consists of several units . each with its own intelligence. The axes of the robot are moved by dc servomotors. which are driven by transistor-H-bridges. Each axis is controlled by an 8 bit microcomputer. which measures the state values (position. speed and current) of the dc motor. The microprocessor then gets a new command value from the master computer. and calculates the set variable in form of a PWM signal. The implemented state feedback control algorithm is also discus sed.
The
motor.
power
converter
and
microcontroller
are
regarded
as one unit called the "intelligent drive". The master computer is responsible for calculation and coordination of the motion sequen ces of the robot (PTP .C P). Direct user control and on - line programming have
K~y~-"!.Q.~~
been
Robots;
roprocessor;
realized.
multiprocessing
motor
control;
power
systems; converter:
digital de
control;
mic -
motor.
position controller command fo r \1(11.
l ue
position
DIGITAL
position
OLD
a)
controller for pos i tion command v a l ue
PWM
_posItion
- speed - current
speed
&
positIon
DIGITRL
NEIr-J
b)
F ig .
Control Structures disadvantages such as complicated analog circuits and interfaces. inflexible control algorithms. separate detectors for position and speed. and great demands on the main control computer. For these robot reasons a new concept for a controller has been developed in the Institute of Electronics at the Technical University of Berlin (Fig.lb).
INTRODUCTION
Most industrial robots use dc servomotors because of the ease of speed control. Rpbotic drives need a position control with inner speed and current control loops. Speed and current are normally controlled by analog circuits. while the position controller is integrated in the main digi tal control computer of the robot (Fig.la). This structure includes some
The entire robot control system is structured in several hierarchical levels.
173
D. Naunin, K. Cevik and H.- C. Reuss
174
I NPUT/ OUTPUT
INFORMRTI ON PROCESSING
EJ
MRSTER
SIGNRL PROCESSING
DRIVE
SENSORIC
MECHRNICS
MVME 110
1::::::::::::::::: 1
MC 58000 RRITHMETIC PROCESSOR MC 58000
MC 8044
S
SENSORIC
DC HPU
HRND PROGRRMM ING
DC MOTOR
F i g. 2
Multlprocessor S yst em
Each l eve l should b e as "intelligent" as possible in order to reduce the work load o f th e next upper l eve l. This structure make s it possible to integrate the high future demands on the sensors. Each axis of the robot is controlled by its own 8 bit comp uter (INTEL 8044) . All axis controllers are connected to the master by a high speed ser ial bus (Bitbus . 2.4 Mbps. HDLC /S DLC protocol) . in order to get their instructions and controlling inputs. The axis - controller detects all state values of the dc machine (current. s peed . position) and calculates the set value according to a programmed control algorithm. This means that there are no longer analog components in the control loop. Moreover. the axi s -controller sur v e y s all senso r s of the drive (Fig.2). The
ma n - machine-interlace
i s
realized
in
two ways: the hand programming uni t (HPU) and the sys tem console (CRT) . The hand programming unit is suitable for the t eac h - in of real moving sequences and the s ystem console allows numerical program ming wi th on - l ine execution. The master compute r includes two parallel working 16 bit microprocessors (MC 68000). one managing the entire system. the other calcu lating the coordinate tran s formation and interpolation. The bitbus inter!ace. as primary the overall s tation. controls network and issues commands and reference input signals to the secondary (slave) stations.
STATE FEEDBACK CONTROL
In order to control the position of the robot drives. the slave computers are programmed as controllers ! 0 r the state feedback control of a dc motor . Therefore . a mathematical control law - which is a complex function of the states of the sys tem involving s tate feed back co ntrol is implemented on the program memory of the axis controller. In order
to design a controller u si ng feedback . it is n ecess ary to se t up th e mathematical model of the drive. The par amete rs are determined of the step respons e and manu facturer's
information.
Neglecting the space model of in the form
I~ ( t )
nonlinearitie s . a state the plant may be wri tten
6 '"'(t)
+
'g .u ( t )
(I )
c' . x ( t )
y(t)
The s tate vector x{t) ha s the components armature current. motor speed and position . The system matrix ~ and the input vector Q contain the parameters of the plant. The transfer function can be obtained from the matrix e quation (1) . For the synthesis of the digital control loop with st ate feedback control th e time - di screte s tate space model of the plant must be d e termined. The sam pling time T is of great importance her e. The sa mpling per iod must be as short as po ss ible to avoid distortions of the informations about the plant . However the co ntrol algorithm need s a finite calculating time. If the calculating time Tc ( s ampling. calculation and output) is much sma ller than the sampling period T. the time-discrete state space model be comes much easier. In order to achieve a quasi - continuous control. a sa mpling time of 1 /6 to 1/10 of the dominating time constant of the plant is proposed. For position control the mechanical time constant of 14.6 ms dominates . Therefore in thi s research a sampling time of T=2 ms ha s been chosen. With the help of the continuous state space model and the sa mpl ing time. the time-discrete state space model can be calculated as shown in Eq.(2)
~'.I
I. y,
=
=
~ (Tl . .:-: k + Ij CT) . l,! k c ' . x,
(2 )
M ultip rocessor Controlled Robots
Fi g . 3
where ~(Tl = ~ ( t=TJ T
HeT)
=
C l osed Cont r o l Loop
with
,f....
= f p(tl . ~.dt •
The time - discrete s tate space model of the plant describe s the values of the state vector ~(t) at the s ampling mom e nts t = kT (k = 0.1.2 .. . ) . pre s uming that the set variable u(t) i s con s tant during the s ampling interval . An ex p a n s ion into a serie s . wi lh lhe h e lp of a Pa s cal pro gram . dev e lope s the malrice s of th e continuous syst e m ~(t) and h( t) into the discrete system malrix ~(T) and the input matrix tl(T) . Then th e lime - d is crete tran sient function can be oblained in terms of the z - transform: G (z)
=
~' . (z~ - ~ ( TJ ) - ~ t! (Tl
(3)
The time - discrete transfer function is used to design a state feed back control ler including an integrator (Fig . 3) . This is achieved with the help of the pole as signment method. by which the closed loop system poles are placed in prespecified positions in order lo h a ve c o mplete conlrol over the s y s t e m d y na mi c s . Th e integrator ha s the following a dv a nta ges : lhe s teady state error di sa ppear s completely the conlroller react es t o s mall permanent disturbance s wilh great lorques the integrator smoothes lh e motions on a continuou s palh The closed control loop (Fig . 3) described by Eq . (2) and Eq . (4)
w'.'
I
UIo.'f"l
= =
w,
+ r,
-~' .2:5'10.
+ y. + Kr ,wlo.
can
[~'+'J WitH
~(TJ ?<. +
I~ ( TJ
=[P ( TJ-t! :Tl.~,
K,·lieT)
-c
1
]I
Since the stability of the entire sy s tem is influenced only by the eigen values of the system matrix ~. the zeros of the characteristic polynomial are of great importance :
I (
r[-6 "" ~-(-Z-)-:-=-d-e-t-[-z-~---~-(-T-)'J
6)
As s uming that the plant is c omplelely controllable . the pole s of the command transfer function can be preset randomly . Ther e fore th e gain fa c tors k l . k Z .k 3 and kI can be det e rmin e d with the help of the controllability matrix or the first standard form . For the pole assignment the foll o wing points mu s t be regarded: f o r a stable control loop all pol e s mu s t be placed with i n the unit circle on the z- plane th e amplitude of the set variable in cr eas e s with greater distanc es between th e pole s of the plant and th e pol es of th e controller the control loop becomes faster i f the pole s are placed nearer to the origin If the poles of the command or disturbance transfer functions are placed in a sector of +/- 30 to 60 degrees apart from the rea 1 a xis ins i de the un i t c i r c 1 e. a good dynamical behaviour of the control loop i s realized. The fastest controller is given when all pole s are placed in the ori g in (dead beat controller).
be
(4)
With the assumption that the output of the integrator is a further state variable. an expanded state space model can be written as in Eq . (5): =
175
(5)
INTELLIGENT DRIVE
The goal in developing the hardware is to bring the microcontroller and converter into a small compact form. i.e . the axis controller (Fig . 4) consists of only two VLSI - chips (single chip computer and timer) . Currently. these chips together
D. Naunin , K. Cevik and H .- c. Re ll SS
176
COMMUNICATION
POWER
INTEL-8344
AM 9513
F i g. 4
Axi s Controll er
with a few smaller integrated chips (VCO, PLA , drivers) are soldered on one half of a board (Europe format). The other half is reserved for the power converter. In later versions the size of the board will be reduced to a small package mounted di rectly on the motor enclosure . This "intelligent motor" needs only a power sour ce and a serial bu s connection to the master . This will mean the reduction of the number of cable s in a robot.
HARDWARE
The 8044 microcontroller contains a po werful CPU with on-chip peripherals such as the SIU ( se rial interface unit), two 16 bit timer /co unters , 5 source int e rrupt capabi 1 i ty, 192 bytes on - chip RAM and four 8 bit parallel port s . The SIU i s de s ign e d to perform serial co mmunication with l i ttle or no CPU involvement. The SIU supports d a ta rat es u p to 2.4 Mbp s and the HDLC / SDLC proto col . One timer i s programmed to be the sys tem c lock (T = 2 ms) . An int er rupt s tart s the sampling period which includes sampling of the state values and calculation and output of the se t va l ue ( ca.37 5 IJ-s) . The rest of the time is used for less critical tasks s uch as programming the SIU and
handl ing the I/O ports . The I / O ports control the limit switches, the emergency button, the power converter, the motor brake and the releasing 01 the PWM signal. Parameters and measured values 01 the control system are stored in the onchip RAM . Th e refore the sys tem and control param e ters ca n b e changed during o peration and the implementation of an adaptive control s y s tem is possible . State value detection is made by the all round sys tem timing controller STC 9513 (AMD) with five programmable 16 bit ti mer / counters : counter watch - dog timer counte r 2 PWM - generator counter 3 forward - counter for position /s peed counter 4 : backward- co unter for position /s peed counter 5 : A/ D- converter for current measurement
Since the set variable of th e motor is a PWM s ignal, there i s a ripple on the armature
current .
For
this
{'co sv 6MHz
2 .SV
3 . SHHz
IMHz
----~ I -m-ax--------~0----------~I~m-ax~IR
F ig . 5
reason
an
in-
tegrating A/ D converter is used to average over one period of the PWM signal . The A/ D converter (Fig . 5) is realized with the help of a voltage controlled oscillator (VCO) . The armature current creates a proportional vol tage across a
-I
max
Current Measurement
0
lmax
lR
177
Multiprocesso r Controlled Robots
The study of the entire measurement system shows that the counting frequency 01 the used timers is 01 great importance lor its accuracy and resolution .
shunt . This voltage is amplilied and level-shilted by an inverting operational amplilier and given as input to the veo . Timer 5 counts the pulses (1 . 5 to 6 MHz) during constant time intervals. The resolution 01 the current measurement depends on two lactors:
SOFTWARE
the length of the measurement time the maximum counting frequency of the sy s tem timing controller
The 8044 has four regi s ter banks, each with 8 reg is ters. The s e banks are used to realize a multi - levei, multi - tasking real time operating system . The software modu les (Fig .B) are organised in four hierarchical levels corresponding to their priority . A maximum of eight lunctions belong to each level and work wi th one register bank. The "kernel" calls all needed lunctions corresponding to their priority . The system clock has the highest priority in the system (sampling time) . When timer 0 (one 01 the timers in the 8044) releases an interrupt, lirst timer 0 is started again with a variable standing in a RAM cell (changeable sampling time). Then it is checked to see which level wa s interrupted . The necessary variables are s tored and the regi ster bank is switched over . At this moment the functions belonging to level 3 are started: measur e ment 01 the state va riables, control algorithm and output 01 the set variable. Afterwards, the inter rupted program is continued and the other functions are executed, i.e. communication with the master, interrogation 01 the limit switches, drilt compensation .
With a counting frequency of 6 MHz and a measurement time 01 125 IJ-s a resolution of about 9 bits is obtained. The software extends current by two further features:
measurement
permanent current monitoring drilt compensation On each motor axis an incremental encoder is mounted. In the incremental encoder an optical chopper disk provides two square wave signals (2500 pulses per revolution) with a pha s e difference of 90 degree s. A programmable logi c al array (PLA) detects the direction and provides a pulse for each received edge. De p e nding on the direction the pulse s are given to counter 3 or 4. Therelore there are 10,000 counted pulses per revolution. By adding the content s 01 the counting registers the new position is calculated. The pulses received during one sampling interval give the speed. Since the state leedback controller needs instantaneous values, the measured average values of the speed are approximated by shortening the sampling interval . The tests that were run show that the tachogenerator can be replaced by a high resolution incremental encoder.
There is a set of commands which can be sent lrom the master and which can be executed by the slave independently: go to reference point switch on controller switch off controller drilt measurement
The power converter for the dc motor consists 01 lour SIPMOS-FETs with very last inverting diodes built in a lour quadrant H-bridge. The bridge is driven by counter 2 providing the PWM signal (23.4 kHz) . At the maximum counting frequency 01 the system timing controller (6 MHz) the modulation range is divided into 256 steps, giving a resolution 01 8 bits.
reset
read actual position value go x increments read error
read RAM write RAM
i FKT
I I I
"l e e !e/
/
11
1 1
3 7 ( ZIREG )
FKT 3 6 (SYNCH) FKT 3 2 (STU) FKT 3 1 ( DRIFT ) 3 <) (HRLT)
r-
I 1 FKT
'iKERNEL ~ r-
/ e l e e l ' ''' el I /
I
lI
TIMER
<)
FKT 1 4 (CHECK)
INTERRUPT (SRMPLINGTIME )
F ig. 5
I I I
FKT 2 7 (SYS) I FKT 2 5 (PROTO ) j FKT 2 <) (REFPU) I FKT 1 7 (TRDRTl
j SEPO (SERIRL-PORT-INTERRUPT )j
I
Software Structure
I I
D. Naunin, K. Cevik and H.-C . Reuss
178
T.
T.
T.
T,
T.
~
IS)
~
~N
::J >-tn
oi
...:
~
w
f
g;
~g::;
u.. " ~~~
;;::8~
N
OT>£R
...:
"
~
~g-
w .... i5 "'~" ~ul!
OTHER
T.
SAVE CCll.NTER 5
( cur"en~
ave,.age v a lue >
START COLNTER 5 SAVE COlNTER 3&.4 ( pos it.ion I ncrements)
SAVE CCl...NTrR 5
(c urrent
i ncrements )
Output of the set v alue (COLNTER 2)
T
Flg . ?
eT. -1ST.
)
( m i n~10Sus )
•-
200 us
(C alcuiating-
T T
..... ,.-
time)
T. + T . Time r 0-In t errupt
Software Ti ming
This program system is easy to change and to adapt to new requirements. RESULTS
The s tate feed back control using the microcomputer control circuit described ha s created good re s ul ts in the dynamic response to the command and disturbance variables . Fig . 8 shows the step response to 1024 increments of axis 3 (upper arm) of the robot. The dead weight of the ro bot arm in the horizontal po s ition is a permanent disturbance s uperimposed by the step response. The s mall negative s et variable at beginning. i.e. t=O . provides the holding current. while not influencing the characteristic shape of the state values . Because of the integrator. the reaction of Due to the integrating component in the control algorithm the
POSITION SET VARIABLE CURRENT
1875 u s 125 u s
T.
- ct.RRENT MONITOR
••
( Samp 1 i ngt i me )
T -
T•
ZIREG • CONTRa.. R.GORITl-IM
STU
I
3 T - 2000 us
CD CD CD
FlN:TIONS t
r--- T.
T.
2
'" u..
Fl..NCTla-IS
~.~ 1
::J tn
>--
output variable is delayed by two sampling intervalls . For the set variable there is a reserve of ca. 30 per cent aft er the s tep . The a ct ual position reaches its command value without over s hoot after 70 ms. CONCLUSION
A digital control circuit applying only a few integrated chips has been developed to control the dc servomotors 01 a robot. Control circuit and motor form an intelligent drive which is fed by use of only two power wires and three control wires . The control algori thm employs the state feedback control method for the three state variables (current . speed and posi tion) and shows a good dynamic response. No tachometer is needed.
(1 cm:=100 INCREMENTS ) (1 cm:=5 V) (1 cm: =0 .5 V)
10 8 6 4
2 0~~--~----~~--~~--~~~~~~=-~
t/[ms]
-2 -4
-6
Tr a ns i e nt Functlon of Rxis 3
REFERENCES Follinger,O. (1974) . Lineare Abtastsy steme . R . Oldenburg Verlag. Mtinchen. Wien . Naunin.D . . K.Cevik and E.Baum (1984). YQll~~ndiK~iKitale RegelunK-von Robot~ Elektronik . Franzis-Verlag !:~nt!:i~Q~!!· Mtinchen. Heft 10 .
Hartmann . I. (1982) . Digitale Regelkreise. TUB-Dokumentation Weiterbildung Heft 7. Berlin . Naunin.D .. K.Cevik and H . C.Reuss (1986). l!!i~liK~!!i~~~gJtale Regelung von Roboterantrieben ohne konventionelle Wandler . VDI / VDE-Bericht Nr.598. Dtisseldorf.