**3. The Performance Test Method of the Manipulator**

To further verify whether the designed manipulator meets the performance requirements of jujube pruning, the performance test of the jujube pruning manipulator prototype was carried out, based on high-speed camera technology [40–42].

#### *3.1. The Analysis of the Agronomic Pruning Point for Jujube Trees*

Jujube pruning agronomy mainly consists of cutting back and thinning the branches. Cutting back mainly consists of cutting off part of the lateral branches of the current year's growth along the height of the jujube trees, which can inhibit the excessive growth of the lateral branches and promote the main branches to produce flowers and fruit. The thinning of the branches mainly entails the cutting off of the dense or dead branches along the depth of the jujube trees, which can improve ventilation and light, and promote the rejuvenation of dead branches. By analyzing the process of using the manipulator to prune the jujube trees, it can be concluded that the manipulator needs to reach the different heights of the jujube tree canopy for pruning when cutting back the branches, and the manipulator needs to complete the pruning of jujube branches at different depths when thinning the branches. The schematic diagram of the agronomic pruning analysis for a jujube tree is shown in Figure 10. In the actual operation, the manipulator is installed on the mobile chassis. In order to be convenient for analysis, the jujube tree height corresponding to the installation height of the manipulator base is taken as zero. A field investigation was carried out on the growth information of the jujube trees before and after pruning; it was found that the cutting back points were mainly distributed in the range of 200~1000 mm in the height direction of the jujube trees, and the points of the thinning branches were mainly distributed in the range of 100~700 mm, in the depth direction of the jujube trees.

**Figure 10.** The schematic diagram for the agronomic analysis of jujube tree pruning.

#### *3.2. The Workspace Simulation of the Manipulator*

Based on the MATLAB Robotics Toolbox, a 3D mathematical simulation model of the jujube pruning manipulator was established. The Monte Carlo method [43] was used to simulate the workspace of the manipulator to verify whether the theoretical design of the manipulator met the requirements of the jujube pruning space. According to the kinematic theoretical analysis of the manipulator, in combination with the parameters and variable ranges of each joint size of the manipulator presented in Tables 1 and 2, the Rand function in MATLAB was used to program the manipulator workspace for the calculation and simulation. The random values of each joint variable generated by the Rand function are shown in Equation (17):

$$
\theta\_i = \theta\_i^{\min} + \left(\theta\_i^{\max} - \theta\_i^{\min}\right) \times Rand(N, 1) \tag{17}
$$

where *θmin <sup>i</sup>* is the minimum value of the angle range of joint *<sup>i</sup>*, degree; *<sup>θ</sup>max <sup>i</sup>* is the maximum angle range of joint *i*, degree; and *N* is the number of cycles, *N* = 10,000.

#### *3.3. The Platform Construction and Test of the Prototype*

The self-made prototype for the jujube pruning manipulator was used to build its performance test platform, as shown in Figure 11. The test results were recorded by a 3D high-speed camera system. The test equipment mainly includes a pruning manipulator prototype, a 3D high-speed camera (FASTECIMAGING-TS4; Fastec Imaging Corporation; San Diego, CA, USA), a graduated scale (accuracy: 1 mm), and a calibration plate.

**Figure 11.** The platform for the manipulator performance test. (**a**) Prototype and (**b**) test platform. 1. PC machine; 2. Control box; 3. Manipulator; 4. 3D high-speed camera; and 5. Calibration plate.

#### 3.3.1. The Scheme for the Positioning Accuracy Test

The end-effector was driven by the manipulator to move to the target pruning point of the branch when pruning the jujube trees, and the branches triggered sensors to complete the pruning operation. The positioning accuracy of the end-effector to the pruning point is one of the key factors for completing the pruning operation. Therefore, the positioning error of the end for the manipulator was taken as the evaluation index to verify the positioning accuracy of the manipulator moving to the pruning points of the jujube trees. The calculation of the positioning error is shown in Equation (18):

$$D = \sqrt{\left(X - X\_0\right)^2 + \left(Y - Y\_0\right)^2 + \left(Z - Z\_0\right)^2} \tag{18}$$

where *P*0(*X*0,*Y*0,*Z*0) are the theoretical coordinates of the pruning points, mm, and *P*(*X*,*Y*,*Z*) are the measured coordinates of the pruning points, mm.

By taking the base of the manipulator as the origin, the positions for the end-effector of the manipulator to the 9 pruning points with the horizontal distance of 600 mm and the height of 200~1000 mm were recorded, and the positioning accuracy was tested. Similarly, the positions of the end of the manipulator to the 5 pruning points with equal spacing ranging from 100~700 mm in the depth direction were recorded, and the positioning accuracy of the end-effector to the pruning points with different depths was tested. The video data analysis software ProAnalyst was used to analyze the test results for the positioning accuracy of the manipulator end-effector. Firstly, the manipulator in the video was calibrated. The ruler placed in advance on the manipulator was marked, and the actual size of the ruler was input in the software; then, the manipulator in the video was restored to the actual size after calibration. Secondly, the center position of the base of the manipulator in the video data analysis software was set as the base coordinate system of the manipulator. Thirdly, the position of the end-effector in the video data analysis software was marked as the tracking point. The motion track of the manipulator along different height directions and different depth directions was automatically tracked. Finally, the coordinates for the tracked trajectory of the manipulator end-effector in the video data analysis software were output and recorded.

#### 3.3.2. The Scheme for the Pruning Test

The test subjects were five two-year-old jujube trees from the Science and Technology Park of Shihezi University. The average height of the jujube trees was 1.8 m, and the average width of the canopy was 1.4 m. The jujube tree was fixed on the performance test platform of the manipulator to conduct the pruning test, as shown in Figure 12.

**Figure 12.** The pruning test.

The specific operational procedures of the jujube pruning test are as follows: firstly, according to the artificial pruning of the jujube agronomic knowledge and the experience of the jujube farmers, the branches that needed to be cut and the location of the pruning

points were identified manually, and each pruning point was marked with green tape. Secondly, the manipulator was set to teaching mode (when the manipulator was in teaching mode, the sensor of the end-effector was in the closed state, and the pruning function of the end-effector could not be triggered when the manipulator reached the pruning point), and the manipulator was controlled manually to reach the pruning point of the jujube tree. Additionally, the coordinate information of the current pruning point was obtained and recorded by the upper computer. The above operations were repeated to obtain and record the coordinate information of each pruning point. Finally, the manipulator was reset to the initial state and set to working mode (when the manipulator was in working mode, the sensor of the end-effector was in an open state. When the manipulator reached the pruning point of the jujube tree, the branch entered the detection area of the sensor, which could trigger the pruning function of the end-effector). The coordinates of the pruning point were manually input into the upper computer, the manipulator was controlled to automatically reach the pruning point of the jujube tree, and the pruning test was carried out. The 3D high-speed camera was used to record the real-time video data of the motion position and pose for the manipulator in the pruning process. The video data analysis software ProAnalyst was used to extract the pruning time and judge the effect of pruning.

The main purpose of the pruning manipulator is to complete the pruning task in a short period of time. Therefore, the success rate of pruning R and the pruning time T are taken as the evaluation indexes of the pruning performance for the manipulator. The success rate of pruning (*R*) and the pruning time (*T*) were calculated as follows:

$$R = \frac{\sum\_{i=1}^{n} L\_i}{\sum L} \times 100\% \tag{19}$$

$$T = \sum\_{i=1}^{n} T\_i \tag{20}$$

where ∑*L* is the total pruning time of a single jujube tree; *n* is the number of successful pruning attempts of a single jujube tree; and *Ti* is the time taken to complete the *i*-th pruning, min.

#### **4. Results and Discussion**

#### *4.1. The Simulation Results and Analysis of the Manipulator Workspace*

The simulation results of the manipulator workspace are presented in Figure 13. The workspace of the manipulator is −600~800 mm in the X direction, −800~800 mm in the Y direction, and −200~1800 mm in the Z direction. Additionally, the pruning points are more dense in the range of 0~600 mm in the X direction, −600~600 mm in the Y direction, and 0~1700 mm in the Z direction. The simulation results show that the geometric size of the jujube pruning manipulator can meet the requirements of the pruning space of the jujube trees in the dwarf and densely planted jujube garden.

**Figure 13.** The simulation results of the manipulator workspace. (**a**) The three-dimensional mathematical simulation model of the manipulator; (**b**) the three-dimensional manipulator workspace; (**c**) the projection of the workspace onto the XOZ plane; and (**d**) The projection of the workspace onto the XOY plane.

#### *4.2. The Results and Discussion of the Positioning Accuracy*

The test results for the positioning error of the manipulator at different pruning points are presented in Table 3. The schematic diagram of the positioning error trend for the manipulator end-effector is shown in Figure 14.


**Table 3.** The test results for the positioning error of the manipulator at different pruning points.

Table 3 and Figure 14 show that, in the height directions, the positioning error of the end-effector tends to decrease as the height increases when the manipulator moves from the initial position (450, 0, 650) to different height positions (600, 0, 200~1000), and the average error value is 4.4 mm. The maximum error occurs at the lowest position (Z = 200 mm), which is 8.92 mm. The main reason for this phenomenon is that, when the manipulator end-effector moves from the initial position to different heights below 650 mm, the moment arm of the machine arm gradually increases with the decrease in the height of the pruning position, and the direction of the manipulator movement is consistent with the gravity direction of the center-of-mass gravity of the manipulator body, resulting in the positioning error of the end-effector increasing with the decrease in the height of the pruning position. When the manipulator is at the lowest position (Z = 200 mm), the motion inertia force

reaches its maximum, resulting in the maximum positioning error occurring in this position. When the end-effector moves from the initial position to different heights above 650 mm, the moment arm of the machine arm gradually increases with the increase in the height of the pruning position. However, the direction of the manipulator movement is opposite to the gravity direction of the center-of-mass gravity of the manipulator body, resulting in the positioning error of the end-effector decreasing with the increase in the height of the pruning position. Therefore, the positioning error of the end-effector tends to decrease as the height of the pruning position increases.

In the depth directions, when the manipulator moves from the initial position (450, 0, 650) to different depth positions (150~650, 0, 600), the positioning error of the end-effector tends to increase as the depth of the pruning position increases, and the average error value is 4.5 mm. The maximum positioning error occurs at the farthest position of pruning point (X = 650 mm), which is 9.13 mm. The main reason for this phenomenon is that the moment arm of the machine arm increases as the moving distance of the manipulator end-effector increases in the direction of the depth. Therefore, the positioning error of the end-effector increases with the increase in the depth of the pruning position.

In conclusion, the positioning errors of the end-effector of the pruning manipulator at different heights and depths are all less than 10 mm. There are two main reasons for the positioning error of the manipulator in the process of the test. On the one hand, there are errors in the manufacturing and assembly of all the parts of the manipulator, and a mechanical vibration occurs in the process of operation. On the other hand, the center of gravity for the machine arm changes in real time during the operation of the manipulator. In the follow-up study, the positioning error is improved by improving the manufacturing and assembly accuracy of the manipulator parts and further optimizing the control system.
