Hexapod control system and software

Hexapod is a testing device for generation of six degrees of freedom movement. Its control system is built from the National Instruments components and control application is created in the software LabVIEW. Using the real-time system to run this application requires special programming procedures because the precise timing of the control loop has to be observed. The hexapod motion control is based on its kinematic model. Equations for the six basic motions (3-axis movement and 3-axis rotation) were obtained from the kinematic model. These equations are implemented directly in the control program for basic movement and rotation control. The control system, program design and program optimization are described in this paper.


Introduction
The hexapod is a new testing device for generation of six degrees of freedom movement (see Fig.1). It is used for testing of mechanical parts or assemblies properties (mostly car seats). This kinematical solutions increased device stiffness so higher frequencies of testing signals can be used. Of course the control signals calculation is more complicated than for the classical orthogonal system. Hexapod motion is induced by six linear hydraulic engines which are controlled by the position feedback. The control system is built from the National Instruments components and control application is created in the software LabVIEW. Because the precise timing of the control loop has to be observed the real-time system to run the control application has to be used. The hexapod motion control is based on its kinematic model, equations for the six basic motions (3-axis movement and 3-axis rotation) were obtained from this model. These equations are implemented directly in the control program for basic movement and rotation control.

Control system hardware
The control system block diagram is shown in the next figure.
National Instruments real-time system PXI1002 forms the control system core [1]. Piston position sensors are connected to the six channel amplifier and then to the PXI system by 16-bit A/D converter. Voltage signals from PXI output 16-bit D/A converters are transferred to the current signals for the servo valves control. The above elements constitute the six hydraulic engine basic position feedback.
Galvanically isolated digital inputs and outputs control all hexapod auxiliary equipment (input hydraulic valves, signal lights, etc.). Digital lines are used for communication with the laboratory hydraulic power units control system [2], too. Direct hydraulic power units control is thus possible by the hexapod software application. The standard PC provides user-friendly interface for the hexapod control. This PC and real-time system are connected by the classic internet cable.

Hexapod control software
The hexapod control software was created in LabVIEW 2009 RT. A LabVIEW real time project defines a set of applications and their distribution between the RT system and PC. It also defines the priority policy and the data exchange system. In this case, applications are mainly allocated to the real-time system. Only the user interface front panel and pre-processor application are placed to the user PC.

Real-time application structure
Three parallel running loops form the core of the most important real-time application. These loops are very accurately timed by the RT system 1Mhz hardware clock and their run priority is precisely defined. Six PID controllers are realized by the high priority hardware timed (2kHz frequency) loop. Exact running of this loop must not be breached in any case so all data are transmitted to this loop by a data queue. Desired position values are read from a binary data file and stored to the queue by the next medium priority loop. Possible data reading irregularities are thus eliminated by the data reservoir in the queue. Third low priority loop is used for the operator commands.  All control and display elements are concentrated in this user interface window so the summary status overview and the device control are very simple.

Real-time application optimization
Execution time of all instructions into the HW-timed loop has to be less than its timing. So the number and type of instructions have to be optimized for this condition fulfillment. This is a lengthy testing process in time optimal sequences selecting. The optimization results and the application block diagram are shown in the Figure 6. HW-timed loop has approximately thirty percent reserve and the CPU is used on 76%. These are good results for the smooth application running.

Hexapod kinematic calculation
Timing analysis results show that the real-time hexapod kinematics calculation is impossible in the current CPU. Only the special binary data file has to be used as the desired values source for position control.
Hexapod kinematic equations were created using its model. These equations are used to calculate the desired values binary file.

Hexapod kinematic model
The hexapod kinematic model was created using Autodesk Inventor software [3]. This model operates in the inverse mode. Central point general 3D motion (three-axis movement and three-axis rotation) is recalculated for six engines movement.
Their graphical representation is shown in the next figure. Similar quadratic equations apply to the other directions of the movement. The transformation matrix was created from all these equations and it was then implemented directly to the hexapod control software. The preprocessing application with this matrix was added to the real-time project.

Pre-processing application
Only the special binary data file has to be used for realtime hexapod position control. The desired values binary file is created before start of the hexapod movement by this pre-processing application. Figure 9. The pre-processing application block diagram.
The hexapod central point movement waveforms file (its three-axis movement and three-axis rotation) is this application input. The six hexapod engines position waveforms are calculated by the transformation matrix and these waveforms are saved to the special binary format file. The binary file is then used as the reference position source during the real-time hexapod control. This method is suitable for the real movement data (measured vibration reproduction) but for the simple movement generation is too difficult (an input data file is required). So the internal harmonic waveform generator was added to the pre-processing application and simple harmonic motion in all axes and their combination can be created directly in this application. Blocks of generated movements (including movements from the input files) can be assigned into the control sequence. Very long and varied hexapod movement sequence can be created. This application user window is shown in the next figure. The pre-processing application is not used for realtime hexapod control so it is allocated to the user PC. Generated binary files are then moved to the RT system before hexapod motion start. This application is completely independent and it can be installed on any PC for the motion sequences generating, too.

Hexapod movement verification
Finally the hexapod movement is formed by relatively complicated procedure. Therefore, all component correct function had to be verified. The measuring cube was mounted on the hexapod and its actual position was measured by the noncontact laser position sensors. The laser position sensors were placed in different directions and the hexapod basic movements and their combinations were running. Signals from sensors were measured by the independent measuring system and then compared with the desired motion trajectory. The example of results for the combination of two phaseshifted harmonic signals in the XY plane (a circular motion in the XY plane) is shown in the next figure. The measurements showed that the maximum deviation of the real and desired trajectory is about 1% of the hexapod movement range. It implies that the calculation algorithm and the control system operate correctly.

Conclusion
Conducted tests indicated that the control system and software were created correctly. The hexapod kinematic model and conversion equations well describe its kinematics and the hexapod reproduces the desired trajectory with sufficient precision. The hexapod can be used as a standard testing device.