附录1

PUMA560机器人的硬件改进和计算转矩的控制

更新用于教育事业的工业控制器

英国Reading大学的自动控制系有一台Puma 560教学机器人,由于原来的硬件控制部分和人机界面有所欠缺,因此此文就控制部分的改进作了阐述。本论文描述了两个自动化系的研究生的研究结果,这个课题涉及了基于个人计算机的机器人操作臂的人机界面和计算转矩的控制设计。

 Puma 560机器人是一个六自由度的机器人操作臂,由六个直流伺服电机驱动,关节位置由编码器和电位计测定。三个大功率的电机用于驱动腰部关节,肩关节和肘关节,而三个较小功率的电机用于驱动腕关节位置和方位。Puma 560机器人有一个宽广的可达空间和较大的加速度,加速度大的超出人的想象。Puma 560机器人设计的初衷是用于工业装配和操作控制,目前大多用于科研院所作为研究的目的来应用。现在机器人操作臂本身仍然有高的强度和动力,然而原来的Unimation Mark Ⅱ控制器已经过时并且急需替代。随着现代科技的快速发展,出现了能够运行MATLAB/SIMULINK软件的个人计算机,并且还存在有其它的功能,例如实时监控设备、快速成型、以及用于控制机器人操作臂的高级在线测试。基于机器人控制 “工具箱”的SIMULINK软件可以控制Puma 560机器人操作臂,但是它不具备控制计算转矩的功能,正因为此,本文重点介绍这一技术的相关内容。

Puma 560机器人的改进和接口部分

    为了利用个人计算机来控制Puma 560机器人操作臂,我们特意去掉了原来的LSI/11计算机、EEPROM存储器芯片、CMOS芯片、ad/ac接口、数字伺服控制板、以及操作臂接口卡。正如操作臂接口卡中所描述的一样,原来的功率放大器以及电流、转矩控制器在新设计的控制结构体系中仍然存在。Puma 560机器人控制部分的硬件结构如图一所描述。

专用的TRC041改进卡代替原来的芯片安装在Mark Ⅱ控制器的背面。控制器上的TRC041芯片通过专用的电缆与Q8数据采集器相连接,而Q8数据采集器又与个人计算机上的PCI接口相连接。 奔腾4, 2.4GHz的个人计算机在Windows 2000操作系统下运行,用于控制机器人操作臂的精确运动。伺服电机的转矩通过Mark Ⅱ控制器来控制,并且与由个人计算机通过Q8数据采集器发送过来的数字电压相比较。Q8数据采集器从TRC041芯片上接收到编码器和电位计上的信号。 电位计上的信号用来校准和标定最近接收到的标志信号,然后校准编码器上的读数用来决定关节的位置和方位。

控制器设计

利用控制计算转矩来实现机器人操作臂的控制,这一项技术多用于非线形的动态系统的控制中,用来去掉操作臂控制的非线形、也方便内部控制和定值的获得。关节位置通过微分积分调节器控制计算转矩,进而来控

个人计算机

  Windows 2000

MATLA 6.5/Simulink5.0

    Wincon 402




改进的UNIMATE控制器


PCI总线

Q8数据采集器




TRC041网卡设置

PUMA560操作臂

个人计算机

  Windows 2000

MATLA 6.5/Simulink5.0

    Wincon 402




改进的UNIMATE控制器


PCI总线

Q8数据采集器




TRC041网卡设置

PUMA560操作臂

图1 硬件结构

专用的TRC041改进卡安装在MarkⅡ控制器上,控制器上的TRC041改进卡和Q8数据采集器通过专用的电缆线来连接。奔腾4,2.4GH的个人计算机在Windows2000操作系统下运行,同时应用MATLAB/SIMULINK以及Wincon应用软件来控制机器人操作臂。

制关节位置,计算转矩控制器计算必须的参考转矩值,参考转矩值的计算公式如下:

ι=M(q)(q+Ke`+Ke+Kε)+N(q,q`)              (A-1)

在这里ι∈R6是一个矢量,是指关节转矩的参考值;q∈R6也是一个矢量,一般是指关节变量;M(q)是转动惯量矩阵;N(q,q`)代表非线性的术语,例如向心力和震动的影响,以及摩擦和重力(万有引力)的影响;e(t)=qd(t)-q(t)是跟踪误差;qd(t)∈R6是理想的轨迹值;ε∈R6是总的跟踪误差;并且Kp、 Ki和 Kv是微分,积分调节器在各个关节的参数设定值的矩阵真值表。因为公式(1)是一个在时间上连续,即动态参数的公式在应用的初期通常应在数字计算机中利用。

假定这个动态的模型应用的相当恰当和精确,这个设计将对机器人操作臂提供有效的控制,幸运的是这种Puma 560机器人操作臂的动态性正如其所描述的一样,满足这种设计要求。相对的动态性和Denavit-Hatenburg操作臂所应用的参数是基于[4][5],参考文献中所描述的一样。PID调节器参数的获取可参考文献[4]。

软件部分设计

   软件结构的实现是基于在Windows 2000下运行的SIMULINKLAB和SIMULINK软件来实现的。SIMULINK软件使控制算法的快速设计得以实现,并且允许利用C代码来实现特殊的功能,并称之为S功能。除此之外,Wincon 4.1[6]用来实时执行已经编译的C代码,这些C代码是来自于SIMULINK软件项目下的实时监控处得来的,并且通过它来与Q8数据采集器通信。

   并在SIMULINK软件下实现控制

利用PID调节器设计计算转矩控制并在SIMULINK软件下实现控制。已知当前的关节位置和过去的关节位置通过调节器计算当前的关节速度。饱和反馈用来防止积分器出错,采样间隔是1ms。

轨迹生成

轨迹的生成也即是关节的运行路线的生成,是通过MATLAB代码来实现的。在实时控制器运行的时候通过关节点理想轨迹的离线计算可以充分利用处理器,提高处理器的利用效率。第五个命令是用来计算关节沿着指定的路线运动时关节角的矩阵变换。这个矩阵一旦被计算出来,这个变换矩阵就被用来作为控制器的表格来实现理想关节角的插值。

控制器的实现

PID计算转矩控制器利用SIMULINK软件来实现,它的实现如图2所示。由公式(1)给定的计算转矩的控制准则有一部分写成C代码作为SIMULINK软件的S功能。专门的SIMULINK软件模块与Q8数据采集器连接在一起来实现控制算法的计算,并且将计算转矩的参考值传送到Mark Ⅱ控制器。

假定这个动态的模型应用的相当恰当和精确,这个设计将对机器人操作臂提供有效的控制,幸运的是这种Puma 560机器人操作臂的动态性正如其所描述的一样,满足这种设计要求。相对的动态性和Denavit-Hatenburg操作臂所应用的参数是基于[4][5]参考文献中所描述的一样。PID调节器参数的获取可参考文献[4]。

用户界面

基于MATLAB的用户使用界面允许使用者通过改变由轨迹生成器生成的代码参数来详细的了解目标轨迹和用户界面。用户使用界面如图三所示。这个机器人操作的用户使用界面十分友好,关节空间的轨迹可以被储存,也可以被重新装载。末端执行器在笛卡尔坐标系中的位置和方位可以利用定义在文献[7]中的运动学方程来得到。关节到达笛卡尔坐标系中某一特定位置和方位的关节角由文献[8]中给定的逆运动学方程来求解。

实验调试

在模拟环境中完成测试,并且达到有效性的要求后,也应该调试一下实际的机器人操作臂的应用情况。很多测试指标都用来评估控制器的性能。控制器调试的结果表明此控制器的设计结构有很好的使用性能,对于不同的轨迹参考值均能达到小的跟踪误差,并且这些误差在要求的范围之内。

为了达到跟踪误差的高性能和高精度,在此设计中采用了飞投运动的原理。飞投指的是渔民投掷鱼线到河中的某一位置。这一涉及到飞投的行为存在以下几种状态,向前投掷,向前的运动,腕部关节的抖动,以及投掷运动的完成。PUMA 560机器人操作臂的运动通过提供一个预先设定的关节轨迹到控制器上,然后大体上来模仿投掷运动的原理来实现关节轨迹的控制。参考轨迹包括正弦曲线信号的合适的相位,量值,以及应用在关节二、三、五上的频率。运动结果实现了由人来完成的投掷运动的效果。PUMA 560机器人操作臂实验的关节轨迹的数值如图四所示,这个界面里包括了投掷运动的三个循环周期。实验用的视频是AVI格式的,你可以在文献[10]里下载。

该界面显示了当前的关节角度和末端执行器的笛卡尔坐标位置。在关节的运动范围内编辑器提供有效的关节角度,利用其可以设定理想关节角度。它也显示了末端执行器的理想笛卡尔坐标位置。该应用界面也可以存储当前位置和装载以前存储的位置。

教学过程

研究这个课题的学生获得了改进工业机器人操作臂的能力和接口部分的设计。这个课题包括阅读和解释即熟练掌握相关科技文献上的相关知识,移去UNIMATE控制器上的多余的芯片,根据使用指南插入改进后的芯片选择和购买电缆和终端,以及接口电源,伺服系统,编码器,以及电位计和数据采集器。学生也学习了计算转矩控制的原理,并且将其熟练的应用到了PUMA 560机器人操作臂的运动控制当中。运动控制的实现还涉及到计算转矩控制方程的模型代码,在这里计算转矩控制方程是通过C语言编制的SIMULINK软件的S功能来实现的;运动控制的实现还包括作为校准的SIMULINK系统的设计,比例微分积分调节器控制,轨迹生成,以及外部信号接口。

机器人的应用开发

由于该课题是在2002-2003学年完成的,机器人和基于接口技术的新的个人计算机运动控制的开发已经由另外的两个再读研究生来完成,这次历时四年。这两次计算转矩的控制开发都是用在内环上。这次研究的主要内容是:

⑴ PUMA机器人操作臂的力控制。这个内容涉及到操作臂的末端执行器的六个力传感器以及和计算机的接口部分的设计,也包括在SIMULINK下对控制器的控制。

⑵ 实现PUMA机器人操作臂的随意控制。这个内容包括利用专用的控制器替换在2002-2003年使用的比例微分积分调节器控制的控制。

在基于神经网络控制器的发展和实现的基础上,未来的研究主题因该是利用神经网络控制器来控制PUMA机器人操作臂。一些机器人控制的实验手册可以提供给学生二手的资料,以便了解机器人控制的相关知识,也可以利用它来评估不同的控制器设计的优劣,包括0重力加速度、计算转矩控制、阻抗控制、以及导纳控制等。这篇论文描述了PUMA 560机器人操作臂的改进,与个人计算机的接口,基于MATLAB轨迹生成和友好的用户界面的软件的开发,在SIMULINK下比例微分积分调节器控制的实现。这个项目是利用先进的技术将在技术上落后但机械结构上仍还完善的机器人实验台变废为宝的恰当的例证,能够使使用者在低成本的基础上利用基于SIMULINK和MATLAB开发的先进的、柔性的软件来实现对机器人操作臂的实验研究。

附录 2

Hardware Retrofit and Computed Torque Control of a Puma 560 Robot

Updating an industrial manipulator for educational use

The Department of Cybernetics at the University of Reading U.K. had, for a number of years, a functional PUMA 560 manipulator robot with its original control hardware and human interfaces. This article describes the results of a third-year project by two undergraduate students in the Cybernetics Department. The project consisted of interfacing the robot arm with a PC and developing software for the real-time implementation of a computed torque control scheme.

The PUMA 560 is a six-degree-of-freedom robotic manipulator that uses six dc servomotors for joint control. Joint positions are measured using encoders and potentiometers. Three large motors provide control of the waist, shoulder, and elbow, while three smaller motors position the orientation of the wrist. The PUMA 560 has a large reach and can achieve impressive acceleration. Originally designed for assembly and manipulation tasks, the PUMA arm is now widely adopted by academic institutions for research purposes. While the robot arm itself is still relatively robust, the original Unimation Mark II controller was outdated and in need of replacement. The use of a PC running MAT-LAB/SIMULINK and associated real-time tools facilitates the prototyping, development, and on-line testing of advanced schemes for controlling the manipulator. A SIMULINK-based robotic toolkit for controlling the PUMA 560 manipulator, but which excludes the computed torque control technique employed in this article, is reported in[1].

Retrofitting and Interfacing the PUMA 560 Robot

To control the PUMA arm using a PC, we removed the original LASI/11 computer, EEPROM boards, and arm interface card. The original power amplifiers and current/torque controllers remain in the control architecture, as does the arm cable card. The hardware configuration is illustrated in Figure 1.

Special-purpose TRC041 retrofit cards [2] re installed in the backplane of the Mark II controller, replacing the original boards. Custom-made cables are used to interface the TRC041 cards and a Q8 data acquisition board[3], which is connected to the PCI interface of the PC. An Intel Pentium 4.2.4 GHz PC running the Windows 2000 operating system is used to control the arm. Servo torques are controlled by the Mark II controller, with reference values sent as

Personal Computer

 Windows 2000

MATLAB6.5/Simulink5.0

   Wincon 402



Retrofitted

UNIMATE

Controller


PCI BUS Q8 Data Acquisition Board


TRC041

Cable     

Card

Set

P   PUMA560

   Manipulator

Figure1. Hardware configuration.

Special TRC041 retrofit cards were installed in the Mark II controller. The TRC041 cards in the controller and a Q8 data acquisition board were interfaced using custom-made cables. An Intel Pentium 4 2.4 GHz PC running the Windows 2000 operating system, together with MATLAB/SLMULINK and Wincon, are used to control the arm.

analog voltages from the PC through the Q8 board. The Q8 board receives encoder and potentiometer signals from the TRC041. Readings from the potentiometers are used to calibrate the encoders to the nearest index purse. The calibrated encoder readings are then used to determine the joint positions.

Controller Design

Control of the arm is performed using computed torque control[4]. This technique uses a nonlinear dynamic model of the system to remove the nonlinearities of the manipulator, facilitating external control with fixed gains. Joint positions are controlled by means of a proportional integral-derivative (PID) computed torque controller, which calculates the six required reference torque values by means of

ι=M(q)(q+Ke`+Ke+Kε)+N(q,q`)              (A-1)

Whereι∈R6 is a vector of joint torque references;q∈R6 is a vector of generalized joint variables; M(q) is the inertia matrix; N(q,q`) represents nonlinear terms, including Coriolis/centripetal effects, friction, and gravity; e(t)=qd(t)-q(t) is the tracking error, qd(t)∈R6  is the desired trajectory;ε∈R6 is the integral of the tracking error; and Kp, Ki and Kv are diagonal matrices with the proportional, derivative, and integral gains for each joint, respectively. Since (1) is a continuous-time formulation, a sufficiently short sampling period should be used in a digital computer-based implementation.

Provided the dynamic model employed is reasonably accurate, this scheme provides effective control of the arm. Fortunately, the dynamics of the PUMA 560 manipulator are well known and reported. The inverse dynamics and Denavit-Hatenburg arm parameters employed are based on those reported in [4][5]. The PID controller gains employed are reported in[4].

Software Design

The implemented software architecture is based on MATLAB and SIMULINK running under Windows 2000. SIMULINK enables rapid design of control algorithms and allows specific functions to be implemented in C code as S-functions. In addition, WinCon 4.[6] is used for real-time execution of the compiled C-code generated by the Real Time Work shop form the SIMULINK diagram, and to communicate with the Q8 board.

Trajectory Generation

Trajectory generation, which is performed in joint space, was implemented in MATLAB code. The off-line calculation of points on the desired trajectory reduces the overhead on the processor while the real-time controller is running. A fifth-order polynomial is used to calculate a matrix of joint angles along the specified trajectory. Once calculated, this matrix is used as a look-up table to interpolate the desired joint angles for the controller.

Figure2. SIMULIK implementation of the

                  PID computed torque control scheme

Figure2. SIMULIK implementation of the PID computed torque control scheme. Joint velocities are computed using a filtered derivative the current and past joint positions. A saturation feedback scheme is used to prevent integrator windup. The sample interval is 1 ms.

Controller Implementation

The PID computed torque controller was implemented in SIMULINK as shown in Figure 2. The computed torque control law given by (1) was partly written in C as a SIMULINK S-function. Special SIMULINK blocks interface with the Q8 board to bring measurements into the control algorithm and to send torque references to the Mark II controller. Results show that the implemented control scheme has good performance, achieving small tracking errors for different reference trajectories.

Graphical User Interface

A MATLAB-based graphical-user interface (GUI) allows the user to specify the desired trajectory by changing the parameters used by the trajectory generation code. The GUL, shown in Figure 3, is designed for user-friendly operation of the robot, enabling joint-space trajectories to be stored and reloaded. The Cartesian position and orientation of the end effector are obtained using the forward kinematic equations defined in[7]. The joint angles required to reach a specified cartesian position and orientation are calculated using the inverse kinematics given in[8].

Experiments

After initial testing and validation of the implemented controller in a simulated environment, real-time experiments with the actual manipulator were carried out. Several tests were made to assess the performance of the implemented controller. The results show that the implemented control scheme has good performance, achieving small tracking errors for different reference trajectories.

To illustrate the tracking performance of the implemented control scheme, a demonstration was designed based on the action of fly-casting[9].  Flycasting is used by fishermen to cast off the fishing line to a position in the river. The actions involved in flycasting are the forward cast, the forward motion, the flick of the wrist joint, and completion of the cast.

 The Cartesian position of the end-effector is displayed together with the current joint angles. Desired joint angles are set using edit boxes that provide validation of the joint angle with respect to the arm limitations. It is also possible to specify the desired cartesian store positions and load previously saved positions.

The flycasting motion was approximately modeled using the PUMA manipulator by supplying a predefined join trajectory to the controller. The reference trajectory consists of sinusoidal signals with appropriate phase, magnitude, and frequency applied to joints 2,3, and 5. The resulting motion resembles the flycasting action performed by a human. Experimental joint trajectories of the PUMA manipulator are shown in Figure 4, which includes three cycled of the flycasting motion. A video of the experiment in AVI format can be downloaded from[10].

 Figure 3.  The graphical user interface.

The Pedagogical Process

   The students involved in this project gained experience in retrofitting and interfacing an industrial manipulator robot. This experience included reading and interpreting technical documentation, removing board from the UNIMATE controller, inserting the retrofit boards according to the manufacturer’s instructions, specifying and purchasing cables and terminals and interfacing power-up, servo encoder, and potentiometer signals with a data acquisition board. The students also learned the theory of computed torque control, and applied it to the PUMA 560 manipulator robot. The implementation involved coding the model-based computed torque control equations in a SIMULINK S-function using the C programming language, as well as the design of a SIMULINK system for calibration, PID control, trajectory generation, and external signal interfacing.

Further Use of the Robot

Since this project was carried out during the academic year 2002-2003,the robot and its new PC-based interface have been used for two additional undergraduate projects, this time at the fourth-year level. In both cases, the computed torque control scheme developed in the 2002-2003project was used in an inner loop. The topics of these projects were:

(1)Force control of the PUMA manipulator robot. This project involved the coupling of a six-axis force sensor with the end-effector of the manipulator and its interface with the control computer. The project also involved the implementation in SIMULINK of admittance and impedance controllers.

(2)Constrained predictive control of the PUMA manipulator robot. This project involved replacing the multivariable PID control employed in the 2002-2003 project with a constrained predictive controller. Future projects include the development and implementation of a neural-network-based controller on the PUMA manipulator. Moreover, a laboratory manual is being written to allow students of an undergraduate module entitled Manipulator Robotics to gain hands-on experience with manipulator control and to assess the performance of different control, Cartesian control, impedance control, and admittance control.

The project is an example of how a mechanically sound robotic platform with obsolete interfaces can be revitalized at low cost, enabling users to perform experimental research on the manipulator using a modern and flexible software interface.

Conclusions

This article describes a third-year undergraduate project that involved the retrofit of a PUMA 560 manipulator robot, its interface with a PC, MATLAB-based software development for trajectory generation and graphical user interface, and SIMULINK implementation of a PID computed torque control scheme. The project is an example of how a mechanically sound robotic platform with obsolete interfaces can be revitalized at low cost, enabling users to perform experimental research on the manipulator using a modern and flexible software interface based on MATLAB and SIMULINK.