#### Abstract

As the advances in computer control technology keep emerging, robotic hydraulic excavator becomes imperative. It can improve excavation accuracy and greatly reduce the operator’s labor intensity. The 12-ton backhoe bucket excavator has been utilized in this research work where this type of excavator is commonly used in engineering work. The kinematics model of operation device (boom, arm, bucket, and swing) in excavator is established in both Denavit-Hartenberg coordinates for easy programming and geometric space for avoiding blind spot. The control approach is based on trajectory tracing method with displacements and velocities feedbacks. The trajectory planning and autodig program is written by Visual C++. By setting the bucket teeth’s trajectory, the program can automatically plan the velocity and acceleration of each hydraulic cylinder and motor. The results are displayed through a 3D entity simulation environment which can present real-time movements of excavator kinematics. Object-Oriented Graphics Rendering Engine and skeletal animation are used to give accurate parametric control and feedback. The simulation result shows that a stable linear autodig can be achieved. The errors between trajectory planning command and simulation model are analyzed.

#### 1. Introduction

Hydraulic excavator is widely used as construction machinery. With the increasing digging tasks of complex environments, research on robotic excavator is gradually becoming a hotspot. Robotic excavator improves the operation accuracy and efficiency and reduces the labor intensity. It also can be applicable in some harsh situations which are harmful or dangerous to humans, such as earthquake area and toxic environment. Thus, automation of excavator is considered not only as beneficial, but also as required [1]. The operation device of excavator includes boom, arm, bucket, and swing. The purpose of autodig is to realize position control in excavator bucket which can use trajectory planning method. The operation device can be considered as a 4 degrees of freedom (DOF) serial manipulator. Researches in this area are the key difficulties and studied by many academics and institutes.

According to technical development and functional implement, the researches are divided into three aspects.

The first aspect is sensor-aided automatic control. Gu et al. from Lancaster University developed the Lancaster University Computerized Intelligent Excavator (LUCIE) excavator [2]. There were pressure sensors and displacement sensors mounted on the cylinders to record pressure and stroke data which give feedback. It was also equipped with GPS and can realize autonomous digging for a long straight ditch [3, 4]. Komatsu produced “PC210LCi-10” excavator which has been put into commercial use [5]. Attitude sensors set on operation device so that the work conditions can be monitored when automatic control is conducted.

The second aspect is control algorithms. The Australian Center of Field Robots (ACFR) focused on control strategy on independent digging [6, 7]. The trajectory planning and sensors integration were discussed. They came up with a fuzzy sliding mode control. Compared with conventional PID control, it was more robust and precise. Experiments showed that the trajectory control accuracy is less than 20 cm. Bazaz and Tondu from Denmark Technical University used the 3-Cubic method to generate minimum time online joint trajectory for an excavator [8]. Duration of constant acceleration/deceleration and constant velocity phases were calculated according to the requirements of maximum limiting values of velocity and acceleration. Guan et al. from Zhejiang University proposed a trajectory planning method based on Nonuniform Rational Basis Spline [9]. Nonlinear minimization problems under constraints were solved using sequential quadratic programming. The time-optimal trajectories were planned. Cerebellar Model Articulation Controller (CMAC) + PID algorithm was adopted by Central South University to help excavator to be more accurate [10]. The trajectory control accuracy of bucket teeth can be accurate to 15 cm. It has applied in “SEW-17E” crawler minitype excavator by Sunward Equipment Group [11]. Lv et al. from Harbin Institute of Technology utilized PID controller and backpropagation (BP) network controller to analyze the dynamic response, stability, and steady error of excavator track control [12, 13].

The third aspect is trajectory real-time condition monitor and visualization. Carnegie Mellon University built Autonomous Loading Systems (ALS) to control the excavator [14, 15]. A simulated excavator was confirmed to verify adaptive motion planning. Working with a simulator offered a number of advantages including the ability to load many more trucks in a very short period of time and the ease in changing the work parameters. The ALS can achieve 80% production compared with a trained worker [16]. Yamamoto et al. from University of Tsukuba developed a display system which shows the measured 3D information of the work site created by LIDAR and stereo camera. It also has the ability to display the motion of excavator. The precision was up to 4 cm with 0.2 s delay [17]. A virtual backhoe excavator simulator was created by Kontz from Georgia Institute of Technology [18]. The simulator provided feedback of the backhoe’s orientation, trench depth, volume of dirt in the bucket.

In general, the research trends of automatic excavator are from sensors aided to advanced intelligent operation. Meanwhile, the real-time condition monitor and visualization were imperative. Aiming at achieving linear automatic dig of a 12-ton backhoe bucket excavator, this paper is focused on trajectory planning and autodig. Dynamic model is built using the method called Denavit-Hartenberg (D-H) Coordinates. The forward and inverse kinematics solutions help to make clear relationship with drive space, spatial position, and joint space. The trajectory planning and autodig program is written by Visual C++. After setting the bucket teeth’s trajectory, the program can automatically plan the velocity and acceleration of each hydraulic cylinder and motor. In order to monitor and visualize the status of excavator, the Graphical User Interface (GUI) and skeletal animation simulation are built. By this way, the model and trajectory planning results are verified.

#### 2. Parameters and Model of the Excavator

The 12-ton backhoe bucket excavator has been utilized in this research work. The excavator system consists of mechanical part, hydraulic part, and controller part. The concerned mechanical part is the geometrical parameters of operation device (boom, arm, bucket, and swing), shown in Figure 1. The hydraulic part offers driving and control forces. There is an electrically controlled pump, an electronic-hydraulic proportional multiple valve, a hydraulic motor for swing, and three hydraulic cylinders. The pump is driven by a variable frequency motor which has a rotational speed of 1450 rpm. The hydraulic parameters are presented in Table 1. Compared with other researches, there are no sensors mounted on the motor and cylinders, which reduces cost and improves reliability for engineering application. The controller part contains a superior computer and a digital valve controller with CAN bus as the communication interface. The valve controller receives pressure signals of proportional multiple valve and pump outlets and supplies the control signals on the basis of control strategy. The superior computer monitors the work conditions of the whole system with a virtual platform and transfers the trajectory planning programs to the valve controller.

#### 3. Dynamic Modeling of the Excavator Operation Device

##### 3.1. Establishment of Coordinates

Excavator operation device has four degrees of freedom, including a rotating DOF (swing) and three connecting rod DOFs (boom, arm, and bucket). According to different variables, the excavator has three mathematical expressions: drive space, spatial position, and joint space.

###### 3.1.1. Drive Space

The drive space consists of the slewing platform rotation , the length of hydraulic cylinder in boom , the length of hydraulic cylinder in arm , and the length of hydraulic cylinder in bucket . The drive space can be expressed as a vector .

###### 3.1.2. Spatial Position

The spatial position is the position of the bucket teeth in Cartesian coordinate and the attitude angle . The spatial position can be expressed as .

###### 3.1.3. Joint Space

The joint space also contains four parts: the joint angle between slewing platform and base , boom and slewing platform , arm and boom , and bucket and arm . Therefore, the joint space is written as .

###### 3.1.4. D-H Coordinates

The purpose of trajectory planning is to realize the control of position and attitude of the bucket teeth. Therefore, the destination parameters are given in spatial position. Through the coordinates’ conversion of joint space, the driving parameters of each cylinder and motor can be derived. These are the parameters controlled by the controller. Excavator operation device is treated as a multilinkage mechanism which has an open kinematic chain. For the sake of clear explanation among link frames, D-H method is used to establish the coordinates. Based on the excavator kinematic model, the equations are derived and solved. By setting up local coordinates system of each joint, the corresponding relationship between the local coordinates and the global coordinate is determined.

The link frame of excavator is established, as shown in Figure 2.

There are five local coordinates: slewing platform rotation , boom hinges , arm hinges , bucket hinges , and bucket teeth *.* They are determined by the principles as follows:(i) axis: along the th joint motion axis.(ii) axis: perpendicular and away from direction.(iii) axis: in accordance with the rules of right-handed coordinate system.

##### 3.2. The Forward and Inverse Kinematics Solutions

After establishing the D-H coordinates, the forward and inverse kinematics solutions of the excavator operation device are studied.

The forward kinematics solution is the conversion of coordinates from drive space to spatial position, which means that the spatial position of bucket teeth is derived if the displacements of hydraulic actuators are known. Relatively, the inverse kinematics solution infers hydraulic actuators’ parameters from bucket teeth position . The forward and inverse conversions both need support by joint space .

###### 3.2.1. The Solutions between Joint Space and Spatial Position

For the objective excavator, is the slewing platform rotation relative to based position matrix. is the boom relative to slewing platform rotation matrix. is the arm relative to boom matrix. is the bucket relative to arm matrix. The position of bucket teeth relative to based position can be expressed by matrix , which is the product of . The related matrix transformation is explained in [19]. According to D-H transformation matrix,

If the parameter is calculated by geometrical relationship, the position of bucket teeth is written as

From geometrical relationship, is obtained

The deduction above is from joint space to spatial position . The inverse kinematics is shown:

The anticlockwise is negative direction. , , and are integers. The value ranges of are from to .

###### 3.2.2. The Space Transformation of Each Joint

The relationship between drive space and joint space is derived by geometrical relationship of excavator, as shown in Figure 3. The geometrical method can find the blind spot in mechanical structure that should be avoided during trajectory planning.where and .

is measured by hydraulic cylinder stroke from 1450 mm to 2400 mm.

mm and mm.

is calculated: −45.179°*～*68.810°.

Similarly, and can be calculated, which are, respectively, −29.760°*～*−149.206° and −147.425°*～*35.1927°.

#### 4. Linear Trajectory Planning of the Excavator

The trajectory planning of excavator refers to serial robotic trajectory planning [20], considering the characteristics of the hydraulic system and large inertia of the excavator. There are basically three methods of trajectory planning commonly used: point-to-point motion, motion through a sequence of points, and operational space trajectories. In this paper, a linear digging trajectory based on close-loop control is planned using operational space trajectories. The trajectory planning program is written by Visual C++ and the flow chart is shown in Figure 4.

Four steps are adopted.

*(1) Obtain the Functions of Time and Position*. Assuming that the trajectory starts at and ends at , the ratio of velocity in , , and is determined by working condition, written as : : . In order to have a linear path, the ratio must be invariant during moving. The acceleration and deceleration methods in , , and are the same. It is available for sine, line, parabola, and so on. The functions of time and position are expressed as .

*(2) Discretize the Functions of Time and Position*. Using equal time interval interpolation, the functions are transferred to control points of trajectory planning and discrete functions .

*(3) Derive Control Points in Joint Space*. It is the procedure from spatial position to joint space. Using the method described in Section 3, the control points in joint space are denoted as .

*(4) Achieve the Displacements and Speeds of Actuators*. According to geometrical relationship, the control points in drive space are achieved finally as . The speeds of all actuators are also determined, expressed as .

The movements of the excavator are divided into three periods: acceleration period, uniform speed period, and deceleration period. For the sake of smooth planning, a sine acceleration and deceleration method is adopted. The max speed and acceleration are limited [21].

*(i) *:* Acceleration Period*. The accelerations of actuators change with the sine functions. The speeds of actuators increase to set points .

*(ii) *:* Uniform Speed Period*. All actuators have the uniform speed in this period.

*(iii) *:* Deceleration Period*. When , the bucket teeth reach the target.

The displacement of bucket teeth is expressed as follows:where . are the parameters that should be planned. If the task is a very short trip that can not reach uniform speed or the requirements of operation device’s velocity and acceleration are out of limits, the trajectory planning program decreases the velocity of each actuator proportionally.

Assume that the excavator is doing the flatting ground job which is the most common task of an excavator. The bucket teeth should always keep close to ground from Point J (0, 6866, 0, 130) to Point K (2244, 3886, 0, 70). The displacement of bucket teeth is 3746.4 mm. The work time should be no more than 20 s. The motion of buck teeth is set preferentially, as shown in Figure 5. The trajectory planning time is 18.4 s and the maximum speed is 15 mm/s.

**(a) Displacement of bucket teeth**

**(b) Velocity of bucket teeth**

The ratio of : : of each actuator is the same, so that they use the same . , , and can be inferred. According to the method explained in Section 3, the spatial position of bucket teeth of each axis is shown in Figure 6.

**(a)**Spatial position

**(b)**Spatial position

**(c)**Spatial position

**(d)**Spatial positionThe actuators’ displacements of the same time are compounded, bringing the trajectory line in Cartesian space as shown in Figure 7. It has more control points in the acceleration and deceleration periods than in the uniform speed period.

The velocities of actuators are calculated by finite difference method. The starting point and end point have the zero velocity:

From Section 3, the ranges of are obtained. When carrying out the space transformation, the blind points must be avoided. The displacement, velocity, and acceleration of each actuator are shown in Figures 8, 9, and 10. These are the parameters controlled by the hydraulic cylinders and the motor in drive space.

**(a) Displacement of boom**

**(b) Displacement of arm**

**(c) Displacement of bucket**

**(d) Displacement of rotation**

**(a) Velocity of boom**

**(b) Velocity of arm**

**(c) Velocity of bucket**

**(d) Velocity of rotation**

**(a) Acceleration of boom**

**(b) Acceleration of arm**

**(c) Acceleration of bucket**

**(d) Acceleration of rotation**

#### 5. Excavator Autodigging Simulation Based on Skeletal Animation

In order to visually display the results of trajectory planning, a simulation model is built in Object-Oriented Graphics Rendering Engine (OGRE). The skeletal animation of excavator is established, as shown in Figure 11.

The components and objective skeletal models are interrelated. The skeletal nodes of each part are shown in Table 2.

The parameters are set in GUI which is built by Qt (a cross-platform application framework). There are two methods in GUI that can generate trajectory planning: spatial position method and joint space method. Figure 12 shows the GUI of the simulation environment. The working condition of excavator can be monitored in a real time. The GUI gives an alarm if there exists solving error, blind spot, or over speed limit.

The results in simulation model are compared with the trajectory planning commands which are acquired in Section 4. Table 3 is the average errors between trajectory planning command and simulation model. The simulation is accurate to millimeter. The main errors come from rounding errors when D-H conversion of coordinates is conducted and the skeletal model’s dimension errors.

#### 6. Conclusions

Trajectory planning and autodig of a 12-ton backhoe bucket excavator are studied. The kinematics model of operation device (boom, arm, bucket, and swing) is established in both D-H coordinates and geometric space. The transformation and inverse transformation between hydraulic cylinders driving space and bucket teeth in Cartesian space are derived.

The trajectory planning and autodig program is written. Considering the characteristics of the hydraulic excavator, the trajectory planning of operation device with sine acceleration is studied and discussed through the method of operational space trajectories. After setting the bucket teeth’s motion trajectory, the program can automatically plan the velocity and acceleration of each hydraulic cylinder and motor. Before the implementation, the program detects whether there is a kinematic blind spot in trajectory planning based on mechanical structure of excavator. Otherwise, the program will terminate execution and alarm.

For a better visual display of trajectory planning results, a 3D entity simulation environment is established. It can present real-time movements and realize accurate parametric feedback based on OGRE with skeletal animation. The simulation shows high-accuracy of the trajectory planning and will give helpful reference to an actual excavator.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

This work was funded by the “Twelfth Five-Year” National Science and Technology Support Program of China (no. 2014BAF02B00).