THE DEVELOPMENT OF ROBOT CONTROL, ROBOT SIMULATION AND DIGITAL IMAGE PROCESSING THE DEVELOPMENT OF ROBOT CONTROL, ROBOT SIMULATION AND DIGITAL IMAGE PROCESSING

The automation of manufacturing processes finds its application almost in all spheres of the economy of all industrial developed countries. Its inseparable part is represented by robotisation of manufacturing technologies in production. Nowadays robots and manipulators are quite common building element of automated workplaces, where they safeguard namely manipulation, control and measurement operations, oper-ation and manipulation transport, exchange of tools, removing scraps in production. They are the only real tools for performing operations in dangerous or harmful environment for people (welding, spraying of colour or anticorrosive paint, work with radioactive material, etc.). Robots are introduced in industrial enterprises at present to allow control of six axes, they are capable to work in learning regime, have sufficient capacity of the control system memory also for a complicated manipulation. They are able to adapt to changing conditions of per-formance while preserving the required quality based on sensor information about the inner state of the robot as well as about outside robot environment. They have automated exchange of effectors, point or curve movement control (or combined), possibility of connection of their own control system with the host computer, etc.


Introduction
Industrial robots are used in a wide range of applications in car industry.
About 50% of robots are used in car production in main industrial countries. Robots are applied in various technologieswelding of car chassis, spraying, and assembling.
Robot applications increase in car industry in all biggest car companies and factories.
For example in VW factory in Bratislava some time ago the use of robots in model Golf production was as follows: 5% in welding, 55% in spraying and 3% in assembling.
The present situation in model Touareg production has changed: 80% in welding, 55% in spraying and 17% in assembling. There are 310 robots in the welding line for car chassis production.

DAAD project "The Development of Robot Control System with Artificial Intelligence Application"
The DAAD project (Deutscher akademischer Austauschdienst) was based on personnel exchange programme between Germany and the Slovak Republic (in the years 2002 -2003). It was oriented at the robot control system development with application of artificial intelligence. The project participants were: the Section of Robotics at the Faculty of Information and Electronics, the University of Applied Sciences in Mittweida, Germany and the Department of Measurement and Automation at the Faculty of Mechanical Engineering, University of Žilina, Slovakia. At both universities, teach-ers, PhD. -students and master degree students in last year of study worked on the project.
The main goals of the project: • Theoretical mastering of robot control systems by applying artificial intelligence methods, mainly digital image processing and sensor systems. • Development of design alternatives of control system and its optimisation. • Realisation of the power part control system, owing to mechanical part of robot and drives of its motion axes to design appropriate type of robot control, design of power part particular servo drive, power supply of control units and the central control unit. • The design of simulation program equipment of robot, computer simulation possibilities -simulation of robot functions, motion and manipulation functions: graphics model of robot (mathematical 3D model, determination of edge visibility, kinematics bindings), the design of simulation algorithms, design of software and verification of correct function. • The design of implementation of robot into a flexible production system, -the design of robot control with a host computer.

The Robot Control System and Simulation Software
The goal of the development was to design software for simulation and control of the SLR 1500 robot (Fig. 1). The SLR 1500 training robot was developed at the University of Žilina in collaboration with a firm IQM Zvolen (Slovakia) to serve for the teaching of robotics at high schools and universities. The training robot SLR 1500 has an angular design. It has five degrees of freedom, three of them serve to position the end effector in the space and the remaining serve to determine its orientation with respect to the object being manipulated. Kinematics structure of the SLR 1500 robot consists of a rotational waist, two arms and a wrist mechanism. All parts are connected with rotational joints in such way that the arms are not in the same plane but are moved with respect to each other. Such design allows extremely large rotational range of individual arms.
After initialization of the program the model of robot is displayed and may be moved by a mouse with arrows on the control panel. Each arrow presents rotation of the particular arm. The program consists also of functions used for approaching, rotating and shifting of the model robot.
There are two possibilities how to create the program for the user: a) Simulation mode -movements of particular arms are simulated.
The position of the end point is in memory and at the same time a new line of the control program is generated. The program may be modified, i.e. it is possible to erase the line, to insert a new line, change the order. Then it is simulated; it is possible to initialize the program step by step or in cyclic repetition. b) Real robot mode -After switching to this mode, the robot is automatically synchronized and adjusted to the position as shown on the screen. In this mode the task of the control program is to switch on or off the direct engines, located in the arms. Controlling the robot end point is analogical as compared to simulation mode, except the movement of a real robot, the transfer of values from increment sensors (located in arms) to counters, which are on the card PCL 836, is executed. These values are read by the control program and transformed into angles in particular arms by simulation. This feedback and absolute synchronization -real robot -model robot is secured.
The PCL 836 card from Advantech Company is in PC, ISA slot and sends impulses to the power unit, which controls the engines. This unit has its own integrated circuit function. It switches on and off the engines. Further, the card PCL reads counts the impulses from inductive sensors, which are responsible for the robot synchronization and also counts the impulses from incremental sensors used for adjusting the required position of particular arms. The output of program: it is the control program for the SLR 1500 robot, which may be saved on a disk and inserted into memory again later.
In one line of the control program there are the following instructions: line number, instruction MOVE x where x represents number of the point where the robot is to move, duration before gripping the body in ms, effector state, i.e. OPEN or CLOSE, duration after gripping the body in ms.

Robot Control in a Collision Situation
In present the industrial robots are able to perform path correction in near trajectory. With suitable sensors they are used for tasks which needed correction of trajectory during the process, according to the immediate situation of environment. By using the sensors for generation copying movement's trajectory, is impossible to exclude automatically collision function by controlling at phase of programming and debugging. In higher-level control systems is necessary to use On-line control, which have big amount especially in Off-line programming.

Method Description
In this case the parts of the robot have to be defined by geometric formats. An algorithm is calculated by the distance between the formats and checks if the formats interface. If the value of distance between the formats is zero the control system will send an order to stop the movement of the robot arm. Also the control system will report the collision situation. There are a lot of possibilities for describing the parts of the robot arm: In 2D they are point -point, line -point, line -line; in 3D they are ball -ball, ball -flat, flat -flat. Each variant has different needs for hardware and advantages or disadvantages [1].
The ball -ball method: in this example the effector and the barrier are described as a ball. During the robot movement we use mathematics algorithms to count their distance. If the distance is zero, the robot will reject any other movement in the wanted direction. The robot will stop or make movement in the opposite direction. Because of the force of inertia in the robot, the ball does not follow the limit contour, exactly but there is some reserve. Everything is in 3D space and real time.
If we have an object or barrier with a complicated shape, the surface of the ball can have a big distance from the surface of the object. In this example it could be a big disadvantage. Such a big distance is not needed. It makes limits for the robot when they are not needed. The advantage of this method is the small expectation on hardware and work in real time. The ball -flat method -in this method the effector is described as a ball. The flat describes an object or barrier. We will get better precision when barriers are described this way. During the movement of the robot we count distance of the ball to the flat or flats. The distance has to be bigger than zero, if not, there is a necessity of collision. Again the control system will give the order to stop or to make a movement to the opposite direction. Like in the method before the effector is described with big reserve. It is a disadvantage. Advantage can be a more exact description of the barrier that we still have small hardware requirement and that this method is working in real time.

Collision 3D Simulation
The collision ball -ball method: in this situation three balls move in 3D space. We use radius condition and mathematics method, which is counting distance between them. If we want to resolve collision successfully we have to know radius of the balls. We have to know where the centres of the balls are, to co-ordinate the system in which the balls move. If we are count correctly, we use a radius condition, we can be sure that the balls are not interfused together, they can just touch with surfaces. One or more balls could define the effector and barrier. For us it is better to have just one for each one. We can follow the centres of the balls with a camera. The camera system reports any changes in barrier co-ordinates and through the mathematics method we know what the changes between the balls are. The action of anti-collision system is counts with new co-ordinates too. We have to choose the point, which is in relationship to centre of ball and we will follow that point by camera. The best way is to choose the point identical to centre of ball. The anti-collision system has to count by inertia of the robot. Because of the simplicity and small financial needs of this method we have chosen it for our application on training robot SLR 1500.
Collision ball -flat method: In this situation we have a collision fixed flat and moving ball. We use the same mathematical method as we did last time and we use a flat condition. We have to know the co-ordinates of the centre and the radius of the ball. We have to know the co-ordinates of the flat and from them we can count the flat equation. If we are to count correctly and we use the radius condition, we can be sure that the ball does not interfuse to flat. The effector is described as a ball and the barrier as a flat. The centre of the ball is again in relationship with the chosen point. On the flat we will choose point too, it is going to define each of the flat. Usually this point is in the middle of the flat. The camera follows this point. The flat position is changed in regard to the point position difference. The anti-collision system reacts in those conditions. This method is reliable and its application is wide.
The simulation for 3D collision and the control is very simple and easy to run (Figs. 2 and 3). In 3D simulation these collision combinations are described: • moving flat to fixed flat, • general moving flat to a general fixed flat. There are applications for both of them in the robotic system. In these methods we will replace the effector and barrier with the flat or system of flats. The mathematical mechanisms are more complicated in these examples. The need for better hardware is necessary, if we want to get fast reactions in real time. In this case they are reliable and the application could be wide.

Digital Analysis of Image
The main task of digital analysis of image is to capture a picture with camera, process it with computer and shows results on an output device, or activate systems of control. It takes a picture of working environment and processes it in these steps: digitalisation, image focusing, filtration and segmentation.

Digitalisation
The digital image is in the form of function f (x, y), where x and y are co-ordinates in 2D space and functional value corresponds with the intensity of the point. The digital image is recorded in the Matrix - Fig. 6. Digitalization occurs when the linear function f (x, y) is changed to the discreet function D (x, y). Image focusing highlights the difference in intensity.

Filtration
Filtration is the second step in the process. The picture is unclean after digitalization and transit of image data and there is a lot of buzz in it. We can use two ways to filtrate picture: an average value method and median method.

Segmentation
The next step after filtration is segmentation. In this process we separate the profile of the object from the background. There is an optimal value of intensity which represents the limit between the object and the background. In the next step is every place with value under limit repressed by one colour, place with a value under the limit value repressed by other colour. An example of the method is in Fig. 7.

Description of Computer Subsystem for Digital Analysis of Image
The proposed algorithms and function of the program were tested on the computer system, which was made for the purpose of digital image processing and recognition of objects in image (Fig. 8). The computer system is placed at the Department of Machining and Automation, University of Žilina. Its basic configuration is: • processor Pentium Celeron 1,2 GHz, memory 128 RAM, hard disk 40 GB, • graphic card ATI Radeon 7000, • TV card ATI TV Wonder Bt 878, For image processing was used camera 1/3" CCTV System. It is industry camera equipped with CCD sensor. It is resistant against fire and magnetic field. Camera is connected to TV card through coaxial 75-ohm cable with BNC connector.

Software Image Processing V 3
This original software is used for object recognition. The software scans image and makes a diagnosis (histogram, contour, final function). Now we can see the real shape of the object, we can measure distances and it will tell us how many angles the object has. The project at this time is in the first stage form in which we can work with basic 2D objects (triangles, quadrants).
The picture of the main screen is in Figure 9.
Example of recognized elipse in Fig. 10. There are shown characteristic dimensions of ellipse such as main axis, second axis, middle of ellipse and origin.

Conclusion
The robot presents a complicated mechatronical system with several subsystems. The level of adaptability and cognitive ability of processing a perception, thinking and robot decisions making depends, except hardware and sensors, on the level of developed software and control algorithms, from which is control program made.
Sophisticated robotic systems are characterised by the fact that they involve cognitive processes, i.e. processes of perception, "thinking" and decision. Such robotic systems utilise elements of artificial intelligence in their design and performance. Development of the robot design will be oriented towards the solution of visualisation problems in the near future: The ability of shape resolution or the workpiece orientation, interaction of the robot with the environment, computer representation of visualised data, universality of effectors, auto-diagnostics, and communication with the control system in the natural language, etc. Robots with such characteristics become then irreplaceable components of highly productive technologies namely in automated operations.
The present tasks involve designing the appropriate sensor system for adaptive control and design of robot control with application of artificial intelligence -digital image processing, as well as possibility of communication with a host computer and implementation of the robot into a model automated workplace at the department. It is necessary to solve the effector system of the robot.
We can see in Fig. 11 simulation of a car production workplace with robots. Software for complicated simulation is currently developed at Department of Machining and Automation, University of Žilina.