Remote control of industrial robots
To. Valera, M. Vallés, J.L. Díez15/02/2004
This article shows how the remote control of industrial robots through Internet can be implemented. The system hardware configuration is based on PC and industrial data acquisition boards. The software configuration is based on Matlab, Matlab Web Server and drivers for accessing data acquisition cards. These drivers are written as C-Mex functions that allow the programming of data acquisition cards from the Matlab environment.
As mentioned, the configuration that is proposed is largely based on Matlab Web Server tool. This is a set of programs that allow developers of Matlab to create Matlab applications accessible from the web. It is designed to run continuously in the background as a Windows NT service.
To allow the execution of applications of Matlab in remote, Matlab Web Server uses the a series of programs and files [3], as matlabserver, which is responsible for communications between the web application and Matlab, specifying information such as the communication port number, the maximum number of simulations that you want to attend etc. MatWeb.exe is a TCP/IP client of matlabserver that uses the Common Gateway Interface (CGI) to extract data from HTML documents and transfer them to matlabserver. Matweb.conf is the configuration that matweb needs to connect to matlabserver. Finally the file matweb.m, responsible for calling the file is ". m" that you want to run in the web application. A more exhaustive description of the configuration, properties and applications of MWS can be found in [4] or [5].
Application of Matlab you must specify the directory of the application and the name of the host that is running matlabserver. Optionally it can also specify the port number (which must match the assigned in the configuration file for matlabserver), as well as the time (in seconds) for the expiration of time (timing out).
Teams that make requests to the Matlab server must have installed a Web browser. For PC environments, the most used browsers are Netscape Navigator (www.netscape.com) or Microsoft Internet Explorer (www.microsoft.com).
MWS configuration for the remote control of industrial robots
To carry out the remote control has been used the Colonnade industrial robot that is shown in Figure 1.
The robot has three axes: X-Y-Z with a few approximate routes of 2.5, 1.5 and 1 m respectively. In addition to the mechanical part the robot has a control cabinet where the regulators and the various stages of power that are responsible for feeding DC engines that generate the movement of the three axes. This cabinet are different signals of the robot as for example the signals of the speed of the three axes that provide the tacos-dinamos, the signals of the position of the axes (signals A, B and step zero of the incremental encoders), the set of digital signals used for the detection of the end of career, activation of the tool for the terminal element, etc.
Figure 2 shows the architecture of the control unit used in more detail. Any other automated system can be used to establish the remote control, provided that the status (position and velocity) variables are available, and that can provide control actions.
The corresponding applications to MWS will be generally a combination of files of Matlab ".m", code Html and charts, as well as the drivers for the access to the cards of acquisition of data from Matlab. The creation of this type of applications will consist in the generation of the following files:
- A document of entrance Html to send data to Matlab
- A file ".m" Of Matlab to process the entrances and calculate the exits
- A document of exit Html to show the results of Matlab
- A file of proof to validate the code before distributing the application in the web
To complete the remote laboratory need the routines of access to the cards of acquisition of data from the surroundings of Matlab:
- Conversions To/D: they allow to obtain the analog signals of the system to control, specifying cual is the channel of entrance (1 of the 16 channels of the PCL-812) to measure:
>> voltage = read_812(channel);
- Conversions D/To: once it has calculated the action of control, with this instruction will supply him the voltage to the robot specifying the channel of exit wished
>> write_726(voltage, channel);
- Signals of Encoders: to measure the position of some systems (generally robots), have programmed two instructions: the first uses to initialise the card of encoders PCL-833, whereas the second uses to read one of the 3 counters of 24 bits that has this card
>> init_833();
>> value = read_833(channel);
- Gone in and digital exits: the entrances and digital exits allow us generate alarms, unemployments of emergency etc. In the remote laboratory have implemented the following instruction:
>> value=read_gave_812();
>> write_gave_812(value);
- Programming of the period of sampling: to be able to implement the period of show (expressesed in milliseconds) with which acts on the system has developed a routine that uses the function of C++ sleep.
All these functions have programmed with the Visual compiler C++ v.6.0. The executable functions Matlab obtain like files type DLL from the commando mex:
>> mex read_812.cpp
Remote control of industrial robots
Once the customers can access to the server and this has established the communication with the robot by means of the cards of acquisition of data, already can develop the distinct applications for the remote control of the system robotizado. For this need two files Html and a file written in the language of Matlab.
The first file Html will be a document of entrance in which the remote user will enter the distinct necessary parameters for the real execution. When to the server arrives him a request of some customer, matlabserver commissions to launch the execution of the file of Matlab associated happening him the parameters specified by the remote user.
In the figure 4 shows an initial page for the remote control. In this case it specifies that the robot follow a circular path, by what has to supply the angle and the radius of the path. Besides, has to specify also the type of controller to use and the value the parameters.
te=-Kpe-kdv-u (1)
where:
e = q - q(d)
u, v: vary depending on the controller
Drivers based on the dynamic inverse (or drivers) for calculated couple may include problems of linearization by feedback. A system is linealizable by feedback (rigid robotic systems have this property) if there is a transformation of the State space and regular feedback of the State which transforms the non-linear system into one linear [8]. Drivers for calculated couple establish control making a cancellation of the dynamic terms of robot.
This work has obtained a general for these two classes of drivers expression, so that the selection of the various items that make up the expression of the driver is updated depending on the type of controller selected by the user in the initial Html page.
When comes the request from the client to the server, it launches the execution of the function of Matlab, using the different functions described in the preceding paragraph. Once just the implementation of the programme is first filled the information in the Html results page. This page is subsequently returned to the client, so that it can analyze which has been the behaviour and the results of the execution. In addition, the user can also observe the evolution of the robot through the webcam that was added to the architecture of control in real time. A more detailed explanation on the remote control of industrial processes can be found in [9].
Figure 5 shows a typical example of the results page. In this case shows the reference of movement that had been provided to the industrial robot, as well as the actual path that has made. Based on and carried out the programming of the server, it can provide not only the position but control actions, velocities of the axes, the mistake, etc.
As it has been proved, Matlab Web Server is a very useful tool to be developed in Matlab applications accessible from any remote computer that has a web browser. This basically only requires an Html page that provides the input parameters, the function of Matlab to run, and another Html page to display the results of exit.
In the case of the remote control of industrial robots requires additional configuration with the cards of data acquisition and drivers (writings to run from the Matlab environment) for access to the system to control signals. A practical example of its application has been at work to establish the position of a Colonnade industrial robot control.
Finally, in the developed environment, it is very simple to include a camera to allow the display of the actual evolution of the system in addition to the graphical information returned by the web application.
References
[1] M. Johansson, M. Gäfvert, Aström K j. (1998) "Interactive Tools for Education in Automatic Control", IEEE Control Systems Magazine, Vol. 18, pp. 33-40.
[2] Overstreet j. w., Tzes a. (1999). "An Internet-Based Real-Time Control Engineering Laboratory", IEEE Control Systems Magazine, Vol. 19, pp. 19-34.
[3] The MathWorks Inc. (1999). "Matlab Web Server user's guide".
[4] Vallés, M., Valera, Á., Díez J.L., (2001). "Setting up a Virtual Control Laboratory with Matlab Web Server", IFAC-Workshop in Education in Automatic Control EDCOM 2001. Hohannes Kepler University Linz (Austria), September, 2001
[5] Valera, Á., Vallés, M., Turner, j., (2001) "LabConRob: Virtual Laboratory of Real-Time Robot Control", Robotica. 43. ISBN 152701/00. ISSN 0874-9019, pp. 40-45
[6] Ortega, r., Spong, M.W., (1989). "Adaptive Motion Control of Rigid Robots: to Tutorial", Automatica, Vol. 25, p. 877-888
[7] Valera, a., (2000). "Comparative analysis of techniques of Control of robot manipulators rigid and flexible", Ed. Universidad Politécnica de Valencia, ISBN 84-699-2911-9
[8] Slotine, J.J.E., Li, w., (1991). "Applied Nonlinear Control", Prentice-Hall Int. Editions, ISBN 0-13-040049-1
[9] Díez, J.L., Vallés, M., Valera, a. (2002). "A Global Approach for the Remote Process Simulation and Control", IFAC Barcelona, ISBN: Not yet assigned, July, 2002