Copyright © I FAC Id<,,,tili .. ,, ti,,,, ",H I Systt'II' Est imation 19W), York, Lt,,- , I(IW)
1',,,·,,,,,,·\(,1'
MODELLING A ROBOT ARM FROM SAMPLED INPUT-OUTPUT DATA A. M. Karnik and N. K. Sinha [)1'/JIlr/III1'II./
4
1:' /r'I'/ril'lll
1/1/11
COII/Pll/I'/' FlIgilll' l'/'illg, MeMlIs/1'/' Ull ivPrsit.v, Hami LtoN , OIl/lIrio, Cll/lIlrlll UIS -IL7
Abs tract li s the performallce of a n industri a l robot beco mes more dema nding, it is necessary to impl e m e nt adaptive controllers, si nce th ey have the ability t o cope with the comp lex dynamics of the robot. 11 mode l of the robot, req uired for s uc h contro ll e rs, ma y be obtained in severa l forms . In this pape r, the probl em of modeling a robot a rm, direc tly in the continuous t ime domain, from samp les of input-output data is a ddressed . A bri e f discussion, on the application of the maximum e ntropy met hod for estim atin g the natural frequencies ofa system is also included. Res u lt s of modc ling a n industrial robot a rc prese nted . Ke yword s. functions .
Adaptiv e co ni rol, Identification, I{obots, Mode l in g, Trapezo idal pu lse
INTROO UCTION
plots , e tc., howev e r , the ty pe of mode l required most frequently i , the mathematical model - which is a d esc ription , in terms of math e mati ca l re lations . Methods of mode ling a robot arm can be cl ass ified into two categories . The first method involves mode ling the robot arm from the know ledge of its phys ical s ubsyste m s and their interaction. Infor m a tion such as the time constants of motors, load -torque c ha rac ter is tics, e tc., is us ua lly availabl e from the m a nufacturer . Thi s information and the know ledge of phys ica l laws may be used to for mulate a model orthe system .
In the past two decades, the stra tegy for increas ing indu str ia l produc tion in a cost effec tive manner, h as been the introd ucti on of automated processes. More rece ntl y, these mach in es have taken the form of robots. Although increa s ing productivity is the most compe l lin g r easo n for the int ro du ct io n of rob ots in th e ma nufacturing indus try , robots arc also be ing used for the co mfort a nd sa fety of the human operator . IIn exa mpl e of s uch a n application is the arc welding process In the mode rn arc we ldi ng process, t he point of a pplinttio" of thl' arc is flood ed with an in ert gas to protect th e weld t'rolll a tm os ph e ri c oxyge n . Wh e n p e rformed m'"1uall ,v, hUlllan
The m ai n drawback of t hi s me thod is that often , when the system has co mp lex dynami cs , co mp le t e know le dge of the inte racting subsyste m s is not ava ilabl e Also, in some cases, the resulting model s arc too com p lex for real tim e impl e m e ntati o n on
jud ge m e nt is requir e d throughout t he we ldin g- operat
microcomputers,
lOll,
to
position the e lect rod e at th e optimulll di stance frolll th e work pi ece . In addition, the process creates an unplea sant. and unhea lth y wo rkin g e nvironm ent (Karnik and Sinhu, 198:J).
The seco nd method is cal led the 'b lack -box approach ', because the mode l is de riv ed frolll the measure me nts of th t' input (excitation) and the output (res ponse) of th e syst e m . The main advantage of this ap proach is that t he model is obtained h.Y pract ica l testing, so
Typically, indu str ia l rohots (lit) have fi ve to six deg-rees o!'freedolll (oOF). A s ketc h of a typica l "obot is s hown in fig . I Ea ch axis, is dri ve n by a h ydrauli c or 1, leclri ca l device Se nsors "re used to prov ide feedback for acc u r ate co ntro \. 11 b lock di a~ra m "I' a co ntro ll e r for a multipl e degree orfl'eedom rouot is shown in fi g . 2
no a-p ri or i informa t ion ahout consl itw,'lll s llh ~.vstc ms i ~ necessary,
Model for a syste m may be presented in seve ral forms, however , as m e ntioned before, a ma the m a tica l re prese nta t io n is prefe rred for its ease of ana ly s is . Such mode ls a re a lso re fe rred to a s parame tric mode ls Pa ram e tric models may be ob t a in e d dir ec tly from sa mples of I/O data o r ma y be derived from non-para metric ones. Var iou s t ypes of models a rc rep rese nted in a di ag ramatic form in fig . 3 .
As the pe rfor mance requirements o f the I. It . becom e mor e d e ma ndin g, it is necessa ry to implement ud apt iv e co n tro ller s, si nce they ha ve the capability to co pe with the compl ex dynamics of the robo t arm . A ma the mati ca l description or t he s~' s l."m, a lso ca ll ed the model, is r equir ed for the syste matic anal .v sis and design of adaptive contro ll e r s .
Among non -pa ramet r ic mod e ls , one can iso late fr equen cy a nd impul se re s poll s(~ cstilllatin ll as the basic tec hniques (W e lls l cud, 198 1), Both methods vi(' lcl mod e ls in a g raphica l form . Since, in most case:-l, it is Illlt poss ihl(~ to lI se an impul sive test :-l ign a I , the
In this pape r , basic approaches a nd fOl'lTl s of mod,'is arc fir st di sc ussed . Thi s is fo ll owed by d e tail s o f a dir('ct n", thod for ohtaining the transfer function of the robot from ,,"npl('s .. f input output data . The pa per co nclud es with t he rt'Sltits of Illod e li ng a n indust rial robot by applying the direct method .
impul se respoII'" is obta in ed in an 'i mplicit ' way fr o m the res pon se to more feasible input s Several methods for ' implicit' impul se response modeling' a rc available in literat ure (Wellsteud , 1981; Sinha and Ku zs ta 198:1: Mm'pl e, 1981) In the fr eq u enc." domain , the most common r ep r ese nta tion of syste m d y nami cs, is in th e 101'111 of Hod e plot s .
M()D~; L1NG
As mentioned befo re.
de sc ripti on of
proc ess in v ol v ( ~ d is
ncccssa r.v ror th e analysis and d es igTI of ;' 111 a(bpti v(' co n t rull e r
IIlthou g h frequency domain re pr ese nta tion is conv e ni ent ro r co ntroll e r des ig n and sta bi lity a n a lys is , they are gene ral ly off-lil1 "
Such a description is often n dkd the 1110(\( , 1 Il l' the prOlTSS (or s~'st ( ! 11l1 ___ in ee it pro vi
methods and require larg'c lest times Il owe ve r, since co mpact IllOci (' ls arc desirahlt·, non-parametric mode ls are orten con\'c rlt'd to paraml'tric ones h,\' c ur ve ritting and stra i ght li nt'
it
Ut £'
IH9
I ~ 10
A. M. Karnik and ;\I. K. Sillha
dpproximations .
H.pferenc(~s
for SOIlll' methods of conversion which
information regarding the order, type, natural frequencies, elc .
assume that the s.vstcm order is known are given in (Wcllstead,
Fouriet' transform methods have been a major tool for
1981; Sinha and Kuzsta, 1983) An iterative method for ohtaining the discrete time function from samples of the impulse response without a-priori knowledge of the order is given in (Riosanen, 1971)
identification for a long time, however, they have the disadvantage that the spectral resollltion is poor for noisy data . For example, fig . G shows the magnitude plot of the frequency resonse of a simulated second-order sytem with an undamped natural frequency of 3 rads/sec. and a damping ratio of 0.3. The impulse response data was corrllpted with random noise such that the signal -to· noise ratio (SN It) was 10.0 dH. It is quite clear that this technique (Discrete FOllrier transform) is unable to show the peak clearly . This point is further illustrated by the plot in fig . 7 which corresponds to the frequency response of a IV order system consisting of two underdamped 11 order systems . In this case the SNR was 20.0 dB.
As indicated in fig . 3, parametric models can be obtained directly from the input·output data The figure also shows the different types of parametric models in hoth the discrete· time and in the continuous type. Since the input signal and the output signal are of analog nature, they have to be sampled and quantized so that the data can be used with digital computers. In this paper, we elaborate on the modeling of an industrial robot, in the form of a transfer function, from samples of the input and output data.
IDE;NTIFICATION OF ROBOT ARM
Maximum Entropy spectral analysis (MESA) techniques differ from the Fourier transform methods, in that they arc non-linear and do not assume periodic or zero extension of the data outside the available record. The MESA method computes the spectral estimates from the Burg algorithm (Haykin, 1979; Childers, 1981) after cOr1!itructing an autoregressivc prediction error filter
Identification of a dynamic system consists of the following steps: (i) (ii) (iii) (iv)
momber, Cassar and lIarris, 1984). The spectral density is given by
Structural identification Data acquisition Parameter estimation, and Model verification.
S(f)
Structural Identification
This step involves the estimation of the structure of the model to be used for the system . Since an industrial robot has five to six joints, each driven by an independent motor, the robot has to be modelled as a multi variable system with several inputs and outputs. It has been shown Wubrowsky and Des E'orges, 1979; Koivo and Ten· Huei Guo, 1983), that the relations for the dynamics of a robot are non· linear, complex, and consist of coupled terms. Closed form analytic solutions are not available, and numerical solutions obtained on the digital computer are time
M
'"
_ " a m exp(-j.2nmffitll 21 28111 + "'L,
These steps in the identification of a system, may be represented as shown in fig. 4. (i)
P
=
m= 1
where P'" is the output of the prediction error filter of order M, am for m = 0, I, ... M and the corresponding coefficients, B is the bandwidth of the process and fit is the sampling period = 1/2 B. Plots corresponding to the ME;SA method for the two sytems are given in figs . 8 and 9 . It is clear that the resolution of the MESA method is superior even under noisy conditions , and it is possible to identify the natural frequencies of systems with underdamped 11 order components. Such information is particularly important in vihration analysis, and also may be used to modify the sampling rate in data acquisition for subsequentmodeling. In spite 01' above aids, it is very difficult to estimate a suitable
consuming.
model structure for most systems, and in practice, several model structures have to he examined ncforc an acceptable one is
The dynamic model of the robot, has to be simplified by assuming linearity , and neglecting the interaction between the joints . Simulation studies in (Dubrowsky and Des Forges, 1979) demonstrate the feasibility of using simplified models for adaptive
obtained .
(ii)
Data Acquisition
control.
I n general, there arc four types of system models: (i)
Transfer function matrix representation
(ii)
(jjj)
Impul se response matrix representa t ion Polynomial matrix repre sentation, and
(iv)
State space.formulation .
The block diagram of the system used for data acquisition is shown in fig~ . The rohot system uses a two level hierarchical con t rol structure. The first level is called the 'master' controller, and is bulit around the Intel 8086, 16 bit microprocessor . I{csponsihililics of the master cont.roller include interaction with
the ope"utor, transformations hetween the joint and world co· o,-dinat" systems and joint interpolation fo,' path generation In addition , the master controller interfaces to live slave controllers
Although these four types are equivalen t and transformations he tween them are possible, each model has properties affecting the number of parameters to be estimated, and the result of the estimation. A compari son of various methods, algorithms for estimation and their trudeoffs are given in (Sinha and KUlsta, (983) In case or the industrial robot, since the interaction hetween the joints is as s umed to be small, each joint may he treated independently , as a single input single output (SISO) system . The transfer function approach was selected for its suitability in the design and analysis or the controller. In the case of the transfer function model, the structu,-al parameters required to characterize the transfer function matrix of the system are the degrees of the denominator and the numerator polynomials. In some cases, an estimate of the order of the system can he made rrom tran s ient responsr plots; hut in most practical cases ,
particularly for higher order systems and when the noise lev,,[ is hi gh , selecting the order is more difficult. Bode plots pro vidp some
!second level), each one dedicated to a particular joint of the robot. The slave controller is huilt around the Intel 8748 microprocessor. At regular intcrvab, the master controller feeds the incremental joint position to the corresponding slave controller . The slave controller lI ses this information to generate voltag'cs to move the rnotor to the required position . The instantaneous position of the motor i~ red hack to tht, slave by .. In incremental position encoder
attached to the motor Th" firmwave of the master control le" was modified so that a s tep input could be applied to the selected joint, while maintaining the other joints in a 'locked' pos ition . A low frequency square wave generator was used to generate a step input and the instantaneous position of the free end of the arm was monitored with a
capacitance probe . Both the input and output were sampled at a frequency of 1 KIll. . Samples were digitized (fig. 5) and stored in a microcomputer memory and then transferred to noppy disks Data from the disk was transferred to the VAX · 111780 mainframe system for subsequent analysis
191
Moc\ellin!{ of Robot Arm (iii)
Parameter Jo::"ilimalion
N
Once the .trllClUo'e of the model is decided , the next step involves estimating the values of the parameters in the model. There are several different methods of parameter estimation, but onc classification can he made on whether a melhod is on·line or off· line (Sinha and Kuzsta, 19B3; Astrom and WhittcnnHlrk, 19B4). In on·line methods, estimates are ohtained recursively as measurements ar" n, a de . In off·line methods, data is first accumulated and then processed for the parameters. Often off· line methods give more accurate and reliable estimates. The problem of deriving the transfer function of a system, in the form
'> ' ,
e 2(kT)
k =O
RT ~ 1 - "-N'::---
2:
y 2(kT)
k=O
RT can vary between RT = 1.
_00
and + I, where a good fit is indicated by
A visual comparison may be made from a composite plot of y(kT) and Y(kT).
RESULTS H(s)
=
b","''' + bm _ ls
m
-
1
+ . + bls + bl) ,m
<
n
from the sampled sequences {u(kT)} for input and {y(kTl} for output can be approached in two different ways. In the 'indirect' method, a discrete time mod, ·! is first formulated in either the difference equation form or as a , ·domain function . This model is then mapped to give lib) (Sin ha and Kuzsta, 19B3)' The 'direct' method is based on approximating the continuous time, input and output signals from their samples . Three commonly used schemes arc : (il (ii) (iii)
Block pulse function appoximation Trapezoidal pulse function approximation, and Cubic .pline approximation .
Algorithms for parameter estimation and model verification described in the previous sections . were implemented on the VAX · III7BO computer system, and were used to obtain a transfer function model of the robot arm. Data u.ed for modeling wa. obtained by applying a step input to the link with the lowest damping. The response of the arm was recorded as described before . Result. of the identification of the arm, using different model structures were obtained . The value of the fitness indicator RT, corresponding to a third order model was 0.9997, indicating a good fit. A plot showing the model output, superimposed with the actual response of the robot is shown in fig . 10. It is evident that the model output is close to the aclual response . ' Numerical values of the parameters of the model are listed in the following table .
Using cubic spline approximation yields more accurate results, but requires more computations. With trapezoidal pulse function approximations a signal x(t) may be represented as
x(t) =
1 T I {Ik + 1)'1' -
t}x(kt) + (t- kT) x (k~ · 1)'1') I
for kT ,,; t < Ik + 1IT, with T as the sampling interval. Parameter estimates result from using above for obtaining piecewise constant solutions to the differential equations relating the input andoutputofa system, i.e.
Table 1: III order model
POL~~S
NO
-3 .B95 ± j 1B.840 2
-B .316
± jO
CONCI.USIONS
dmu
dill - Ill
= h --+b 111
cllII1
---+ . 111 -
1
dt lll -
1
l)etails of the algorithm for direct estimation of the continuous llme transfer funclion is givt'1l in (Pr;.l si.l d and Sinha , I 98:J) . (iv)
Model Veri/ieation
After a model for the syste m has heen e valuated, it is necessary to lest for its accuracy . A suilable test has to be devised so that il is possihle to quantify lhe 'dosenes s' of the Illodel to the actual system . This 'closeness' is usually quantified in terllls of the residuals, defined as follows: e(k'l')
= y(k'l')-~(kT)
, k
= 0, I, ... N
where y(kT) is the output of the system, and ~(kT) the output of the model, excited by lhe sallle input (fig . 4) . One test indicating a good fit is that lhe sequence of residuals form a white · noise sequence . Another indicator is the value of HT defined as follows by l)avies and lIammond, 19B4.
IS VOL 1-H
Industrial robots are being used to supplement and replace human lahor in several industries. In addition to increasing productivity, IRs are applied where polential dangers exi.t. As the demand on the performance increases, sophisticated controllers are required to operate the robot at the ir optimum efficiency . The aspect of modeling an industrial robot is addressed in this paper. It is shown that maximum entropy methods of spectral estimation can aid in spotting the natural frequencies in a system . The method is particularly useful when noise level is high . A direct method of continuous lime mudl!ling , u!iing ll'apc7.oidal pubc functions was used . I{esults of modelin!; an IR arc presented .
REFERENCES Astrom, K.,I. and Willenlllark , B. (19B41 , Computer Controlled Systems · Theury and Des ign, i'rentice·flall, Inc ., C .S.A. Childers, D.C . (19811, Mode rn Spectrum Analy sis, U.S.A.
mF.~:
Press,
Davies , 1'. and lIamlllond, .I.K . (19841, A Compa rison of Fourier and Parametric Methods for Structural System Identification, Transactions uf the ASMI'; J . Vihration, Acoustics, Stress and Reliability in Design, Vol. 106, pp. 40· 4B.
192
A. M. Ka rnik a nd N. K. Sinha
Dori', R. C. ( 1983) , Rohoti cs a nd Au tomated Man ufacturing , Res ton l'ubli shi ngCo mpany, Inc, V. S.A. Dubrows ky, S. a nd Des Forges, D.T . (1979 ), The Appli ca ti on of Mode l Refe renced Ada ptiv e Cont ro l to Rohotic Ma n ip ul a tors, Tra nsa ctions of t he ASM ~: J . Vi bra tion , Aco ust ics, S tress and Relia b ility in Des ign , Vo!. 101, pp . 193 -200 . \I ay k in, S . (] 979), No nlin ea r Me thods of Spect ra l A naly s is , Sprin ge r -Verl ag, Re rlin . Ka rnik , A.M. and S inh a, N. K. (1983) The Adapti ve Co ntrol of a Robot Arm for Arc· We lding Process , Proc . IEEE Inte rnat io na l Confere nce on Sys te ms, Ma n and Cybernetics, pp . 614-6 18, India . Koi vo, A.J . and Te n-H ue i Guo (1 983) , Ada ptive Linear Controlle r for Robotic Manipul ato rs, IEE E Tra nsac ti o n s on Auto m a tic Control , Vo!. AC-28, No. 2, pp. 162-171 . Ma rpl e, L.S . (1981) , Effi c ient Least S quar es FI R S ys t e m Id e n t ifi ca tion , IEEE Tra nsac tio ns on Aco us tics, Speec h, a nd S ignal Process ing, Vo!. ASSP-29, No . 1.
FIG . 1 :
FIG. 2:
PROM
Y
INPUT-OUTPUT DATA
~ MODELS
I PROM
Pra sad , T. and Sinha , N .K. (1983) , Modeling of Continuous Time Systems from Sa mpl ed Da ta Using Tra pezoida l Pulse Functions, Proc . I~~ E E International Conference on SMC , pp. 427-430, India. Rissa ne n , J . (1971) , Rec Ul's ive Ide ntifica tion of Linear Systems, S IAMJ . Co ntrol , Vo!. 9, No. 3. Ro mberg , T . M., Cassar, A.C. and Harri s , It .W . (1984) , A Co mpa r ison of Tra dition a l I"o uri e r a nd Ma ximum Entropy Spectra l Method s for Vibration An a ly s is, T ra nsa ctions of th e ASMF. J . Vibra ti on, Acous tics , Stress a nd Reliability in Design, Vo!. 106, pp . 36-39. Sinha, N .K. and K uzs ta, B. (1983), Modelling a nd Identifica tion of Dynamic Sy ste ms , Va n Nos trand -Re inhold Publis hing Co ., New York . Wellste ad , P .E . (1 981), Non -Parametric Me thods of Sy s tem Identifi ca tion , Auto ma tica, Vo!. 17, No . I , pp. 55-69 . Zhou Zi -Jie a nd Si nha, N .K. (1982), System Ide ntification using Bl ock -pu lse Fun ct ions , Proc . 25th Midw es t Sympos ium on Circ uits and S yste ms, Mich iga n , pp. 325 -328, V .S .A.
INDUSTRIAL ROBOT
FEEDBACK CONTROL SYSTEM
CollT I NUOUS TIMI
FUNCTION
PARAM!TERIC - - ;
DISCRETE
IM:~:;!
RESPONSE
PHYSICAL DESCRIPTION
i:~:::::~~AL
I
)
STATE
:;;~:R!HCI EQUATION
NOH-PARAMETERIC----1 FREQUENCY
RESPONSE
SYSTEM
'UNCTION STATE
SPACI
FIG. 3 :
TYPES OF MODEL REPRESENTATION
Modelling of Robot Arm
u( t
I-~I_._VS_T_E_H_~-~-- YI
I - -....
193
t)
SAMPLER
YI"T)
ulkT)
MEASUREM!HT
IDENTIFICATION STRUCTURAL PARAMETER
FIG. 4:
SYSTEM IDENTIFICATION
ENC POSITION
PROS!
DIGITAL SCOPI
-- -- -- ----- ---
r
- --, I
I
I
L _____ _
______ J
~'igur e
.0
m
5: Da ta acquisition
r~
m
0
'\~I~t(~ I\~
-1, .CI
w
0
=> ..... H z
-),.0
\ ,
'-"
a
I
.: f
,
\
0
J
j
-16 . 7
w 0
=> ..... H
z
~\ "
- )).)
CD
a
~
~
-.5·"f,
...L...l•. ..J. ...J.
L _ ._ __ - - l
1 (. J
_ 0
FRClC:ENCY
FIG. 6 :
RHD!Q~~ S
I I ORDER SYSTEM ... DFT
le'
-~c ~ rr-:--O ~
~
. .... ...J
3
~VI\1ti\ Y
.J....l.. _ .•••
_._---1
1 (1'
J
r' PESo If
FIG . 7 :
r :()
j
'"
~ ~
~
~
-- , f(;:;:~
1 :::;? rr ::.
IV ORDER SYSTEM ... DFT
A. M. Karnik and N . K. Sinha
194
.
CD
o
• -15.0
w
o
::J
t--
~ -30.0
(,!)
a
~
FREQUENCY FIG. 8:
••• RRDH1NS
II ORDER SYSTEM ... MEM
.
CD
o
w o
::J t--
~ -33.3 (,!)
a
~
FREQUENCY FIG. 9:
••• RRDIRNS
IV ORDER SYSTEM ... MEM
.... ~
~h4'
(j)
W El: ..J W
ElX
.11
~ a:
~
.....
~
."',
. ..
FIG. 10:
..
..
~
~
~
~
ID
SRMPLE NUMBER
ACTUAL AND MODEL RESPONSE FOR AN INDUSTRIAL ROBOT
m