Design of a universal robot controller

The paper deals with a general purpose industrial robot controller. Due to the modules of the system is universal. It can be connected to several types of robots, even to CNC, turning-mill or other machines. It was connected to an Adept Scara robot successfully,experimental results will be presented. The basic element of the system is the EMC2 open source robot controller program, which runs in a realtime linux kernel. A PCI card creates the high speed connection between the EMC2 and the machine. DC servo ampliﬁer, digital input and output module, teach pendant, and power electronics designed for the sys-tem. The system is RT-middleware (Robotics Technology Mid-dleware)compatible. The RT-middleware is a common robot control platform, which can easily connect di ﬀ erent robots to the same network for a common work.


Introduction
Used robots is a fast growing sector of the automation market.The technology and build quality of robots made over ten years ago means that they are a viable alternative to new robots with little or no difference in capability in many applications.Nowadays the only main problem with used robots is their outworn control systems that makes hard to setup an automated production line from different robots.Small companies have no money for new manufacturing cell, they build it up step by step from used machines.For eliminating the difficulty of this setup process, we have to develop a new modern control system for industrial robots, which can easily connect to different types of machines, and has many configurable communication interfaces to connect it to other industrial units.

Concepts for robot control architecture
With a few years experience in robot control and with the deep investigation of existing control architectures we created the concept of easily configurable hardware architecture for decentralized and centralized robot controls.For first, I would like to give an overview of the existing hardware elements on the market.

Existing hardware elements
For AC and DC servo amplifiers the market gives a very wide choice, hence we don not deal with this topic.The more interesting area is the control electronics that interprets the robot program and gives reference the signals for each joint.The most of the suppliers give only complete finished solutions for an exact problem.

Mesa electronics
In the field of universal controls a very noticeable developer is Mesa electronics.They produce only PCI I/O cards, that's suitable for transferring the signals for motion controllers generated by the PC based EMC2 robotic platform.The most used card is the mesa 5i20 that can be seen in Fig. 1.For making a complete control system with these I/O cards, there are many additional workaround, like building up the interface between GPIO pins and servo amplifiers.

Vital Systems
A better solution for configurable control is Vital Systems Inc.They have 8-Axis Motion Control & Data Acquisition PCI Board, see in Fig. 2.
This card developed exactly for motion control applications hence it has all the I/O data functions that a control system needs and implemented for working with EMC2 open source robotic platform.The manufacturer provides vide variety of expender cards for I/O, DAC/ADC etc.The only problem with this card, that it cannot handle inverse dynamics, it is only good for Cartesian robots.functions.And there is an additional serial line for configuring the servo modules for position control (PID terms etc.).
For centralized control, an additional inverse dynamic card can be connected to a board-to-board socket that contains a DSP-FPGA system.This card connecting parallel to the signals mentioned before, and connecting with the servo modules with an additional serial line for giving them current reference.The servo modules are configured along the serial bus for current control, and the inverse dynamic card has all the signals for solving the Lagrange equations of computed torque method.
On the inverse dynamic card, the FPGA works only as an encoder and step/dir counter interface, and a 32-bit floating point DSP can do the computing, giving the current reference signals for the servo modules.
In the whole system, the configuration firmware of the two FPGA is fixed and there is no need of modification.The servo modules can be configured easily.Only the DSP firmware has to be modified for each different mechanical structure.The block diagram and the connection of the inverse dynamic card can be seen in Fig. 4.

FPGA with soft core processor concept
With further investigation of the system requirements and the available hardware elements those suitable for this application, a simplified solution can be achieved.If the FPGA has enough recourse for an additional 32-bit soft-core processor along with all other gate based signal processing, the additional hardcore DSP-FPGA board can be left.The block diagram of this version of the PCI card can be seen in Fig. 5.
The hardware should be eligible for adapting all the two concepts mentioned above.This can be solved by designing for the first concept, because the second concept is only a simplification that lives the additional inverse dynamic card.

Hardware design
For realizing the concepts of the architectures mentioned above, we needed practical experiences in hardware design.To get a smart ready to work equipment, we had to well align the schematic design, the PCB layout and the mechanical design.

Routing the PCI card
The schematic of the PCI card was designed by Bence Kovács, more information can be found in his final work [6].My task in connection with this circuit was to design the PCB layout.The contour and thickness of the PCB was given by PCI standards.The layout had to be fitted on two copper layers for a cost effective solution.Routing a high speed small signal circuit with these given boundary condition is only possible with manual routing.During routing care must be taken because of high speed data and clock signal lines, and the six different supplies for cores, I/O-s and other peripheral circuit elements.The finished layout design was successful because, there were no EMI/EMC problems during operation.The layout can be seen in Fig. 6.

DC Servo amplifiers
In robotics and motion control, the position control of simple brushed DC servos is a very basic and common task.All other servos need more difficult hardware and control method.The old Adept 604-S robot has brushed DC servos too; therefore I have started the servo controller design with a DC servo amplifier.
Overview of the hardware The block diagram of servo controller can be seen in Fig. 7.All the signals form and to the PCI card are optically isolated.The referencesignal can be SPI packets or the conventional Step/Dir signals.The encoder signals are handled by a differential receiver first, that can host absolute signal referenced to ground due to a resistor network before the differential inputs of the receiver.The encoder signals after the line receiver are connected to the microcontroller and fed back to the PCI card for diagnostic and for opportunity of centralized control.Finally one additional fault line is connected to the reference connector to indicate any fault conditions.The H-bridge is built up from discrete elements, except for the FET driver ICs.For current sensing, I have used low side shunt resistors and an operation amplifier for each half-bridge.For sensing the DC bus voltage a simple resistor divider was used with an RC-filter.For active coolant, a small 12V fan was used, that can be turned on/off.For configuring the parameters a low speed USB communication was used.Fig. 8. Routing power traces and small signal lines to one small two layer PCB: The resonator is too close to the power trace on the rightlower side of the picture EMI problems During the first testing, several EMI/EMC problems occurred,because of the heavily packed design.Several additional bypass and filter capacitances were added to make the circuit work.In some cases the power and small signal traces are too close to each other, therefore this first version was very sensitive to electromagnetic disturbances.The next hardware will be updated by placing the MCU-s on a small vertical PCB next to the heat sink.
Servo tuning interface A PC application was implemented for configuring the parameters through USB port.The software was developed in Delphi 7.With this simple application the system integrator can easily adjust all the parameters of the servo control.As test reference signal a step and a ramp function can be switched on with custom amplitude and period during the tuning of control parameters, while the response of the system can be seen on the scope.A screenshot of the software can be seen in Fig. 9.The program sends a configuration frame by clicking on the upload button.When an acknowledge frame arrives back, we can start the testing by clicking on the run button.Global hardware architecture The block diagram of the 4axis controller can be seen in Fig. 10.There are two main hardware units in the system those have to be designed for each different robot: The first is the servo power supply that scaled for the power rating of the servos.The second is a signal interface board, which gives power for the sensors of the robot, and shares out the encoder, homing and end-switch signals.The servo amplifier blocks should be chosen for the types and power ratings of each servo.In this controller the servo amplifier of the first joint can drive a bit more current, the three other are made from the same parts.
The input and output modules can be chosen for the application.The system integrator can choose form isolated digital I/O modules, DAC and ADC modules.All I/O lines of the modules can be virtually connected to any function in EMC2.For example we can connect one relay for an M-code.

Experimental results
In order to validate the control architecture, experiments were carried out on the major joints (Joint 1 and 2) of the SCARA.The software component based controller's main benefit is that each joint is driven independently, but this is also its biggest drawback, when designing the controller for the given system.
A robust, decentralized PID control was implemented in the Joint Controller.Two different experiments were executed and were repeated two times to ensure the correct measurement.The feedback system's sampling time was 1 kHz feedback shows a negligible overshot.Stabilisation time is approximately 200-300 ms which is to be considered very good for an industrial robot.The first experiment tested the step response of the first joint.The results can be seen in Fig. 11.The second experiment tested the step response of the second joint in two different arm positions.The first measurement was carried out with straightenedarms and the second measurement with the second arm perpendicular tothe first.The results can be seen in Fig. 8.The feedback shows a moresignificant overshoot compared to the first experiment and a longer stabilisation time 400-500 ms.Such results were expected since this is a SCARA (selective compliance articulated robot arm), especially developed for as- sembly operations.The compliant structure of joint 2 plays an important role in assembly operations and the horizontal flexibility of the robot arm is favourable during mounting operations, allowing for initial misalignment between the mating parts.

Conclusion
This paper presented a shop-floor control architecture for intermachine communication and control, based on the RTmiddleware framework and the STEP-NC standard.The great variety, diversity and complexity of equipment used in manufacturing cells calls for an open control architecture capable of integrating all of its members.The proposed methodology is general in its layout and emphasizes openness to the largest extent.The architecture is implemented on a SCARA robot,which is driven by low and high level commands.The experimental results shows no significant drawbacks of using a networked, softwarecomponent based architecture.The next step will be the automatic task definition for the shop-floor controller based on the STEP-NC standard.

Fig. 3 .
Fig. 3. Concept of the configurable controller with optional DSP-FPGA card for inverse dynamics.

Fig. 4 .
Fig. 4. Block diagram of the optional inverse dynamic card.

Fig. 5 .
Fig. 5. Second concept of the configurable controller with optional soft core processor for inverse dynamics.

Fig. 6 .
Fig. 6.PCI card routed on a two layer PCB

2. 6 . 3
Description of the 4-axis system made for Adept 604-S As a first EMC2 based control system, we assembled a 4-axis controller for the brushed DC motor driven Adept 604-S type SCARA.

Fig. 11 .
Fig. 11.Step response of the second joint, with decentralized PID control.The Measurement 1 is with straightened arms, while the Measurement 2 is with the second joint perpendicular to the first one.