**1. Introduction**

As one of the endemic tree species in China, jujube ranks first in the world in terms of the planting area and yield [1]. With its unique geographical and climatic conditions, Xinjiang has become the main production area in China [2]. By 2020, the planting area for jujube in Xinjiang is about 445,225 ha, and the output is up to 3,727,729 t [3]. The pruning of jujube trees is an important part of jujube orchard management, because it improves nutrient digestion and absorption, adjusts the tree's structure, extends the tree's life, and improves the yield and quality of the jujube tree [4,5]. At present, the pruning of jujube trees is mainly carried out manually, which causes significant problems, such as poor operating conditions, high labor intensity, low work efficiency, and high labor costs [6]. Therefore, it is an inevitable trend to develop a high degree of automation for pruning manipulators to replace manual pruning.

Recently, the manipulators were widely used in the field of agricultural picking, plant protection, and other orchard management links [7–10]. Li et al. designed a multi-terminal

**Citation:** Zhang, B.; Chen, X.; Zhang, H.; Shen, C.; Fu, W. Design and Performance Test of a Jujube Pruning Manipulator. *Agriculture* **2022**, *12*, 552. https://doi.org/10.3390/ agriculture12040552

Academic Editor: Francesco Marinello

Received: 6 March 2022 Accepted: 8 April 2022 Published: 12 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

manipulator for apple picking, which cut off the fruit's stem via blade rotation and a toothed fruit collector, and the position error of the manipulator end was less than 9 mm [11]. Zhao et al. developed an apple harvesting robot that adopted a 5-DOF manipulator with a PRRRP structure and an end-effector with a spoon-shaped pneumatic gripper, for which the harvesting success rate was 77% [12,13]. Henten et al. designed a 7-DOF manipulator for cucumber picking, and the cutting device of the end-effector used medical thermal cutting technology to pick the cucumbers, with a picking success rate of 74% [14,15]. Bac et al. developed a 9-DOF manipulator system for picking sweet peppers, and the picking success rate reached 84% [16–19]. In the field of pruning, shaping and pruning machinery is mostly studied [20,21]. Domestic and foreign researches on intelligent pruning robots are basically in the laboratory research stage [22,23]. The typical foreign research cases are as follows: Kawasaki et al. developed a new robot for climbing pruning that could perform climbing pruning quickly [24]. Soni et al. designed a 9-DOF pruning robot for climbing areca, and the 5-DOF PUMA manipulator was able to complete the pruning of areca branches with different diameters [25]. Botterill et al. developed a pruning robot for grape trees that took approximately 2 min to prune a single grape tree, and the target estimation error was within 1% [26]. Zahid et al. designed a pruning robot for apple trees planted within a hedge. The 3-DOF end-effector was integrated into the Cartesian mechanical arm, which could cut 25 mm fruit-tree branches [27,28]. Zahid et al. studied the obstacle avoidance trajectory planning of the developed 6-DOF apple pruning manipulator, which provided the research foundation and technical support for the pruning robot to realize intelligent pruning [29]. Van Marrewijk et al. developed a new pruning robot, which could prune spherical, cylindrical, and rectangular shapes of horticultural plants [30]. The typical domestic studies mainly include the following: Chai et al. designed a pruning robot for green fences with a 14-DOF body structure based on the exoskeleton [31]. Luo et al. conducted a study on obstacle avoidance by the arm of a pruning robot for green fences [32]. Li and Chen et al. studied the motion characteristics of a pruning robot for green fences [33,34]. Huang et al. designed a cylindrical coordinate pruning robot for loquat, for which the average pruning and crushing times of a single branch was approximately 55 s [35,36]. Wu et al. designed a high-branch pruning manipulator with a pruning height of 5–20 m, a maximum pruning radius of 5 m, and a maximum pruning diameter of 12 cm [37]. To sum up, the manipulators are mainly used for agricultural fruit and vegetable harvesting, and in the field of agricultural pruning, the pruning robots are mainly studied for the single pruning way of forest trees and green fences. However, due to the great diversity of fruit-tree growth information, different regional pruning requirements, and the unstructured orchard working environment, there are few studies on the technology of orchard pruning robots. More specifically, the research on pruning robots for jujube is rarely reported.

Consequently, a jujube pruning manipulator is designed in this paper; the theoretical model of kinematics for the manipulator is established; the three-dimensional simulation model of the jujube pruning manipulator is generated based on the MATLAB Robotics Toolbox; the Monte Carlo method is used to verify the workspace simulation of the manipulator; and, finally, the performance test of the manipulator prototype is carried out. The results provide a foundation for the research and technical support for the intelligent pruning of the trees in jujube orchards.

#### **2. The Design of the Jujube Pruning Manipulator**

#### *2.1. Structure Composition and Working Principle*

#### 2.1.1. Structure Composition

The body structure of the pruning manipulator for jujube is mainly composed of a machine arm with 5 degrees of freedom (5-DOF), an end-effector, and a control system. Among them, the 5-DOF manipulator is mainly composed of the foundation support, the rotary joint of the foundation support, the machine body, the mobile joint of the machine body, the shoulder joint, the big arm, the elbow joint, the rotary joint of the forearm, and

the forearm. The shear end-effector is mainly composed of a moving cutter and a stationary cutter. The control system is mainly composed of a lower control system and an upper man–machine interface. The diagram for the structure of the overall machine is shown in Figure 1.

**Figure 1.** Schematic diagram of the structure composition for the manipulator. 1. PC machine; 2. Control box; 3. Foundation support; 4. Rotary joint of the foundation support; 5. Machine body; 6. Mobile joint of the machine body; 7. Shoulder joint; 8. Big arm; 9. Elbow joint; 10. Rotary joint of the forearm; 11. Forearm; 12. Moving cutter; and 13. Stationary cutter.

#### 2.1.2. Working Principle

When the manipulator is working, the upper computer of the control system in the teaching mode obtains the coordinate information of the pruning points for the jujube, according to the experience and knowledge obtained from the jujube farmers, and sends them to the lower computer of the manipulator control system. After the lower controller of the control system receives the location information instruction for the coordinates of the jujube branches that need to be pruned, the motor of each joint of the manipulator arm is controlled to rotate correspondingly, according to the forward and inverse kinematics analysis data, so that the manipulator reaches the target pruning point for pruning. According to the pruning point information recorded in the man–machine teaching mode of the upper computer, the manipulator is controlled to arrive at each target pruning point in turn for pruning. After the pruning of all the pruning branches has been completed, the manipulator is reset.

#### *2.2. The Design of the Mechanical Arm*

#### 2.2.1. Structure Design

The structural forms of the manipulator mainly include the type of cylindrical coordinate, polar coordinate, rectangular coordinate, and joint coordinate [38]. The joint coordinate manipulator is similar to the human arm, and it has the advantages of a compact structure, flexible movement, large working space, and small occupation area. To simulate the manual pruning process, the joint coordinates were selected to design the pruning manipulator for dwarf and densely planted jujube trees in Xinjiang.

When manually pruning jujube trees, farmers hold pruning scissors through the coordination and cooperation of each joint for pruning. Therefore, when designing the manipulator, three rotating joints were used to determine the position of the target pruned branches. To meet the standards for pruning jujube trees at different heights and branches at different positions, manual pruning needs to be supplemented by a long ladder. Therefore, a movement joint was used to realize the function of moving up and down. In addition, a rotary joint should be added at the end of the manipulator to adjust the attitude of the end-effector to facilitate the pruning. Finally, the 5-DOF mechanical arm can meet the pruning requirements of jujube trees. The designed manipulator consists of four rotary joints and one mobile joint. The four rotary joints are the rotary joint of the foundation support, shoulder, elbow, and forearm, and one mobile joint is the mobile joint of the

machine body. The structure and motion direction of each joint for the manipulator are shown in Figure 2. The rotary joint of the foundation support can rotate left and right about the Z axis, and it drives all other joint movements along with it when it turns. The Z axis is perpendicular to the horizontal plane (XOY plane) and moves upwards vertically. The mobile joint of the machine body moves up and down the Z axis, and it drives the rotary joints of the shoulder, elbow, and forearm movement along with it when it moves. The shoulder joint can rotate up and down around the *l*<sup>1</sup> axis, parallel to the horizontal plane (XOY plane). When it rotates, it will drives the elbow and forearm movements together. The elbow joint can rotate up and down about the *l*<sup>2</sup> axis, which is parallel to the *l*<sup>1</sup> axis, and when it moves, it drives the rotation joint of the forearm movement together. The rotation joint of the forearm rotates around the *m* axis, and the *m* and *l*<sup>2</sup> axes are perpendicular to each other on different planes. When it moves, it drives the attitude of the end-effector to change.

**Figure 2.** The structure and motion direction of each joint for the manipulator.

The rotating joint of the base drives the overall machine to realize the azimuth adjustment and expand the target working area in the horizontal direction (XOY plane). The mobile joint of the body adjusts the manipulator at different heights by moving up and down to expand the target working area in the vertical direction (Z axis), and adapt to the pruning of jujube trees at different heights. The shoulder and elbow joints coordinate with the base joint, and the body joint is used to locate the branches at different positions and adjust the end-effector pruning posture in real time through the forearm rotation joint to adapt to jujube branches with different growth postures.

#### 2.2.2. The Parameters Design of the Links Dimension

The link size parameters of each joint for the manipulator were determined by the size information of the jujube tree before and after pruning. Therefore, a field investigation was carried out on jujube trees from 2 to 8 years old in dwarf and densely planted jujube gardens in Xinjiang, and the size information of the jujube trees before and after pruning was obtained by actual measurements. The specific size parameters of the jujube tree growth information are as follows: the row space of jujube trees is generally 3000 mm; the plant space is 800~1000 mm; the height of the jujube trees is generally 1500~2500 mm; the diameter of the canopy is 1000~1800 mm; the height of the canopy is 1200~2000 mm; and the height range of the main branch is 300~500 mm. According to the agronomic requirements of jujube pruning, the height of the canopy after pruning is between 800~1600 mm and the diameter of the canopy is between 600~1400 mm. The area formed by the maximum diameter and height of the jujube canopy is rotated around the direction of its trunk to form a cylinder, which envelopes all of the branches of the jujube tree. In combination with the growth information of the jujube trees, the target pruning space of the jujube trees is analyzed. The manipulator is placed on a mobile chassis with a height of 400 mm, and the horizontal distance between the main stem of the jujube tree and the base of the manipulator is 1000 mm. The analysis for the target pruning space of the manipulator is shown in Figure 3.

**Figure 3.** Schematic diagram of the pruning space analysis for the manipulator. (**a**) Main view; (**b**) top view. Note: *d*<sup>0</sup> is the distance between the base of the manipulator and the ground, mm; *d*<sup>1</sup> is the height of the base, mm; *d*2max is the maximum travel of the machine body, mm; *a*<sup>2</sup> is the offset of the shoulder joint, mm; *a*<sup>3</sup> is the length of the big arm, mm; *a*<sup>4</sup> is the offset for the rotatory joint of the forearm, mm; *d*5, *d*<sup>6</sup> is the length of the forearm, mm; *θ*<sup>1</sup> is the rotation angle of the base, degree; *b* is the radius of the jujube canopy after pruning by shortening the branches, mm; and *b*<sup>1</sup> is the operating width of the manipulator for pruning by thinning the branches, mm.

The pruning of jujube trees in winter mainly involves shortening and thinning the branches. Additionally, the range of shortening and thinning branches on one side is shown in Figure 3b. When the end of the manipulator reaches the junction of the shortening and thinning branches area, the shortening of the branches can be completed. At the same time, to meet the space requirements of the operation of thinning the branches, the rotation angle of the base should correspond to Equation (1).

$$\begin{cases} \quad \theta\_1 \ge 2 \arcsin(b\_{\max}/s) \\ \quad b\_{\max} = d\_{\max}/2 \end{cases} \tag{1}$$

where *bmax* is the maximum radius of the jujube canopy after pruning, mm, *dmax* is the maximum diameter of the jujube canopy after pruning, mm.

The maximum diameter of the canopy for 2–8-year-old jujube trees after pruning is 1400 mm, which can be substituted into Equation (1) to obtain *θ*<sup>1</sup> ≥ 88.9 degrees. At the same time, when the geometric dimensions of each joint meet Equation (2), the manipulator can complete the unilateral pruning requirements of jujube trees in any horizontal region (*xoy*). When the rotation angle *θ*<sup>1</sup> of the base is 180 degrees, its travel range is −90~+90 degrees, and the problem of satisfying the three-dimensional space pruning can be simplified as the problem of satisfying the rectangle *b*<sup>1</sup> × *h* in the longitudinal plane (*xoz*). When *b*<sup>1</sup> × *h* is satisfied in the longitudinal plane, the base joint of the manipulator is used to rotate the corresponding angle *θ*<sup>1</sup> around the *z* axis to achieve the required pruning space.

$$\begin{cases} a\_2 + a\_3 + d\_5 + d\_6 \ge \sqrt{s^2 + b\_{min}^2} \\ a\_2 + a\_3 \le s - b\_{min} \end{cases} \tag{2}$$

where *bmin* is the minimum radius of the jujube canopy after pruning, mm.

According to the structural layout requirements of the manipulator, when the offset of the shoulder joint *a*<sup>2</sup> is 100 mm and the offset of the forearm rotary joint *a*<sup>4</sup> is 100 mm, the interference between the shoulder joint and forearm rotary joint in the actual assembly and movement can be avoided. To reduce the load arm of the manipulator, the rotary motor of the forearm is arranged at the tail of the forearm, and *d*<sup>5</sup> is 0 mm, which can be obtained by substituting it into Equation (2).

$$\begin{cases} \ a\_3 \le 600\\ \ d\_6 \ge 344 \end{cases} \tag{3}$$

The mechanical arm is a key component of the manipulator. The longer the moment arm of the manipulator, the lower its performance. In the process of movement, if the structure size of the big arm and forearm is larger, the performance of the pruning manipulator is reduced. Therefore, on the premise for meeting the requirements of the pruning space, the design of the big arm and forearm should achieve a compact structure and harmonious proportion. According to Equation (3), the big arm *a*<sup>3</sup> of the mechanical arm designed in this paper is 550 mm, and the forearm *d*<sup>6</sup> is 350 mm. According to the height of the canopy before and after pruning, base *d*<sup>1</sup> is 200 mm, the maximum travel of the machine body *d*2max of the machine body is 700 mm. By analyzing the pruning space of the manipulator, the dimension parameters of each link of the manipulator are shown in Table 1.

**Table 1.** The dimension parameters of the manipulator links.


### *2.3. The Design of the End-Effector*

#### 2.3.1. Structure Design

The common pruning methods for fruit trees are shear and saw cutting. As the method of supported pruning, the operation process of shear pruning is stable. In combination with the structural characteristics of the articulated manipulator, the shear structure was selected as the end-effector of the jujube pruning manipulator. It is mainly composed of an executive motor, planetary reducer, gear transmission mechanism, moving cutter, stationary cutter, diagonal photoelectric sensor, mounting plate, and a fixed support. During the operation, the mechanical arm drives the end-effector installed on the forearm to reach the target branch position, and the moving cutter is closed under the action of the executive motor when the diagonal photoelectric sensor detects that the branch has entered the scissor mouth. When the moving and stationary cutters are completely closed, the motor of the end-effector is reversed to make the moving cutter and the stationary cutter open automatically. To enable the pruned branches to effectively enter the cutting mouth of end-effector, the diameter of the pruned jujube branches was 5–20 mm, the opening angle of the moving and fixed cutters was 40 degrees, the maximum vertical distance of the scissor's mouth was 35 mm, and the distance between the cutting position of the jujube branch and the rotating axis of the moving cutter was 50 mm. The specific structure diagram of the end-effector is shown in Figure 4.

#### 2.3.2. The Design of the Moving Cutter

As a key part of the end-effector, the moving cutter completes the cutting of the branches. To achieve the purpose of saving labor and improving the incision quality, it is necessary to ensure that the cutting angle *α* of each cutting edge point is equal to the friction angle *ϕ* between the moving cutter and the branch during the cutting process. Therefore, the design of the cutting edge curve can achieve the stable and sliding pruning of the jujube branches.

**Figure 4.** The structural diagram of the end-effector. 1. Fixed base; 2. Moving cutter; 3. Stationary cutter; 4. Incomplete gear mechanism; 5. Bevel gear mechanism; 6. Force motor; 7. Planetary reducer; 8. Forearm; 9. Mounting plate; 10. Diagonal photoelectric sensor; and 11. Branch of the jujube tree.

The moving cutter rotated around the hinge point O to shear the jujube branch during the operation. Suppose the blade curve is *ABC*ˆ , the cutting angle *α* of any point on the curve is equal to the friction angle *ϕ*, and the hinge point O is taken as the origin of the coordinates; a coordinate system is established to analyze the blade curve of the moving cutter, as shown in Figure 5.

**Figure 5.** The analysis of the cutting edge curve of the moving cutter. Note: T–T is the tangent line to point B; EB is the normal line at point B; OB is the rotation radius of point B, mm; *v* is the sliding cutting speed at point B, m/s; *vt* is the tangential velocity at point B, m/s; and *vn* is the normal velocity at point B, m/s.

According to the geometric relation of ΔOBD, *β* = *δ* + *ϕ*. There are:

$$\tan \beta = \frac{\tan \delta + \tan \varphi}{1 - \tan \delta \cdot \tan \varphi} \tag{4}$$

where tan *β* = *dy dx* , tan *<sup>δ</sup>* <sup>=</sup> *<sup>y</sup> <sup>x</sup>* = *u*. Substitute them into Equation (4) to obtain:

$$\frac{1 - \mu \tan \varphi}{\tan \varphi + \mu^2 \tan \varphi} d\mu = \frac{1}{\chi} d\chi \tag{5}$$

Integrate both sides of Equation (5) to obtain:

$$\frac{1}{2}\ln\left(\mathbf{x}^2 + \mathbf{y}^2\right) = \frac{1}{\tan\varphi}\arctan\frac{\mathbf{y}}{\mathbf{x}} + \mathbf{C} \tag{6}$$

By substituting *x* = *ρ*· cos *δ*, *y* = *ρ*· sin *δ*, and substitute them into Equation (6); the polar coordinate equation for the blade curve of the moving cutter is:

$$\rho = \mathbb{C}e^{\frac{\delta}{\text{Im}\,\overline{\text{s}}}} \tag{7}$$

where *ρ* is the polar diameter, mm; *δ* is the polar angle; and *C* is the integration constant.

According to Equation (7), when the blade curve of the moving cutter is a logarithmic spiral, stable and sliding pruning can be realized. When the polar angle changes from *δ*<sup>1</sup> to *δ*2, the required cutting edge arc length *l* is the following:

$$dl = \int\_{\delta\_2}^{\delta\_1} dl = \int\_{\delta\_2}^{\delta\_1} \sqrt{\rho\_1^2 + \rho\_2^2} \, d\delta = \frac{\rho\_2 - \rho\_1}{\cos \, \rho} \tag{8}$$

According to Equation (8), *ρ*<sup>2</sup> − *ρ*<sup>1</sup> ≥ *d* must be satisfied when cutting the jujube branch with diameter *d*. Additionally, the actual diameter range of pruning the jujube branches is 5–20 mm, so the length of the designed moving cutter is 80 mm. According to the relevant design research of the cutting tools, the slide angle was designed to be 35 degrees and the edge inclination angle was 20 degrees. Figure 6a shows the blade curve of the moving cutter established by MATLAB, and Figure 6b shows the structure of the moving cutter designed by using the blade curve.

**Figure 6.** The model of the moving cutter. (**a**) The blade curve of the moving cutter, and (**b**) the structure of the moving cutter.

#### *2.4. The Design of the Control System*

The design and construction of the control system for the jujube pruning manipulator are very important for its pruning function. The main function of the control system of the jujube pruning manipulator designed in this paper is to realize the delivery, processing, and execution of the control instructions, so as to realize the data communication between the upper and lower computers. The diagram for the overall control scheme of the jujube pruning manipulator is shown in Figure 7.

The control system of the manipulator adopts a two-layer structure control, including the upper and lower computers. The lower computer control system adopts a six-axis off-line motion controller (YJ-CTRL-A601; Shenzhen Yijia Technology Co., Ltd.; Shenzhen; China). The driving motor of each joint is an integrated closed-loop stepper motor (ESS60-P; Shenzhen YAKO Automation Technology Co., Ltd.; Shenzhen; China). The controller is connected to each joint motor of the manipulator through the signal output port, pulse output port, direction port, servo enable port, servo alarm, and alarm clearing port of the encoder, and the driver of each joint motor is controlled by the sending direction and pulse signal. In addition, the motion controller is connected to the solid-state relay by the switching output. The relay signal is used as the input signal of the end-effector controller to control the moving cutter. Finally, the switch signal output by the sensor of the end-effector controls the power-on or power-off of the relay coil to play the role of

system protection or automatic control. The diagram for the electrical schematic of the jujube pruning manipulator is shown in Figure 8.

**Figure 7.** The diagram for the overall control scheme of the jujube pruning manipulator.

**Figure 8.** The diagram for the electrical schematic of the jujube pruning manipulator.

The upper computer adopts a PC machine (Lenovo Y9000P; Lenovo Group; Beijing; China), of which the basic frequency is 2.30 GHz, the development environment is Visual Studio, and the development language is C#. The lower computer communicates with the upper computer through a serial port, for which the serial port communication protocol is RS232, the serial port parameter's baud rate is 115,200, the data bit is 8, and the stop bit is 1.

#### *2.5. The Kinematics Analysis of the Manipulator*

Based on the kinematics analysis of the manipulator designed in this paper, the relationship between the pose of the end-effector and the joint variables of the manipulator was established, and the workspace simulation was carried out based on the kinematics model to verify whether the workspace of the manipulator met the requirements of the pruning space. The coordinate system of the link of the jujube pruning manipulator is

shown in Figure 9. The parameters of the link of the jujube pruning manipulator are shown in Table 2.

**Figure 9.** The coordinate system for the link of the jujube pruning manipulator. (**a**) The schematic diagram of the manipulator structure and (**b**) the coordinate system for the manipulator link. Note: *θ*<sup>1</sup> is the rotation angle of the base, degree; *θ*<sup>3</sup> is the rotation angle of the shoulder joint, degree; *θ*<sup>4</sup> is the rotation angle of the elbow joint, degree; *θ*<sup>5</sup> is the rotation angle of the forearm, degree; *X*0*Y*0*Z*<sup>0</sup> is the base coordinate system; *X*1*Y*1*Z*<sup>1</sup> is the coordinate system at the top of the base; *X*2*Y*2*Z*<sup>2</sup> is the coordinate system for the mobile joint of the machine body; *X*3*Y*3*Z*<sup>3</sup> is the coordinate system of the shoulder joint; *X*4*Y*4*Z*<sup>4</sup> is the coordinate system of the elbow joint; *X*5*Y*5*Z*<sup>5</sup> is the coordinate system for the rotary joint of the forearm; and *noa* is the coordinate system of the end-effector.


**Table 2.** The parameters for the link of the jujube pruning manipulator.

2.5.1. Forward Kinematics Analysis

The DH parameter method [11,39] was used for the kinematic analysis, and a kinematic model of the manipulator was established to describe the relative position and attitude among the coordinate systems. According to the kinematics theory of the robot, the general formula *<sup>i</sup>*−<sup>1</sup> *<sup>i</sup> T* of the transformation matrix under the DH parameters of the adjacent link of the manipulator is:

$$\begin{aligned} \;\_i^{j-1}T = \begin{bmatrix} \cos\theta\_i & -\sin\theta\_i & 0 & a\_{i-1} \\ \sin\theta\_i\cos a\_{i-1} & \cos\theta\_i\cos a\_{i-1} & -\sin a\_{i-1} & -d\_i\sin a\_{i-1} \\ \sin\theta\_i\sin a\_{i-1} & \cos\theta\_i\sin a\_{i-1} & \cos a\_{i-1} & d\_i\cos a\_{i-1} \\ 0 & 0 & 0 & 1 \end{bmatrix} \end{aligned} \tag{9}$$

where *θ<sup>i</sup>* is the joint angle, degree; *di* is the horizontal distance, mm; *ai*−<sup>1</sup> is the distance of the common normal, i.e., the length of the rod, mm; and *ai*−<sup>1</sup> is the torsion angle, degree.

According to Equation (9) and the parameters of the link presented in Table 2, the transformation matrix <sup>0</sup> <sup>6</sup>*T* for the end pose of the jujube pruning manipulator can be obtained:

$$\begin{aligned} \,^0\_6T &= \,^0\_1T^1\_2T^2\_3T^3\_4T^4\_5T^5\_6T = \begin{bmatrix} n\_x & o\_x & a\_x & p\_x\\ n\_y & o\_y & a\_y & p\_y\\ n\_z & o\_z & a\_z & p\_z\\ 0 & 0 & 0 & 1 \end{bmatrix} \end{aligned} \tag{10}$$

where

$$\begin{aligned} n\_x &= c1\varepsilon(c34 - s3\varsigma4) + s1\varsigma 5\\ n\_y &= s1\varepsilon(c3c4 - s3\varsigma4) - c1\varsigma 5\\ n\_z &= c5(c3s4 + s3\varsigma4) \\ o\_x &= s1\varepsilon - c1s5(c3s4 - s3\varsigma4) \\ o\_y &= -s1s5(c3c4 - s3\varsigma4) - c1\varsigma 5\\ o\_z &= -s5(c3c4 + s3\varsigma4) \\ a\_x &= c1(c3s4 + s3\varsigma4) \\ a\_y &= s1(c3s4 + s3\varsigma4) \\ a\_z &= s3s4 - c3c4 \\ \end{aligned} \tag{11}$$
 
$$\begin{aligned} p\_x &= c1[a\_2 + a\_3c3 + a\_4(c3c4 - s3\varsigma4) + (d\_5 + d\_6)(c3s4 + s3\varsigma4) \\ p\_y &= s1[a\_2 + a\_3c3 + a\_4(c3s4 - s3\varsigma4) + (d\_5 + d\_6)(c3s4 + s3\varsigma4) \\ p\_z &= a\_3s3 + a\_4(c3s4 + s3\varsigma4) + d\_1 + d\_2 + (d\_5 + d\_6)s3s4 - c3c4 \end{aligned} \tag{12}$$

In Equation (11), *c*i = cos*θ*i, *s*i = sin*θ*i, where i is 1, 3, 4, and 5, respectively. The same is expressed below.

The transformation matrix <sup>0</sup> <sup>6</sup>*T* represented by Equation (10), describes the pose of the base coordinate system {0} relative to the end-effector coordinate system {6} of the pruning manipulator. To test the correctness of the model <sup>0</sup> <sup>6</sup>*T*, the initial positions (*θ*<sup>1</sup> = 0 degree, *θ*<sup>3</sup> = 90 degree, *θ*<sup>4</sup> = 0 degree, *θ*<sup>5</sup> = 0 degree) of the manipulator were obtained for checking and calculation; substituting them into Equation (11), the result of calculating the arm transformation matrix <sup>0</sup> <sup>6</sup>*T* is:

$$\begin{aligned} \, \_6^0T\_{\text{Initial position}} = \begin{bmatrix} 0 & 0 & 1 & 450 \\ 0 & -1 & 0 & 0 \\ 1 & 0 & 0 & 650 \\ 0 & 0 & 0 & 1 \end{bmatrix} \end{aligned} \tag{12}$$

The test results of Equation (12) are consistent with the initial position parameters of the designed manipulator, indicating that the established mathematical model of the manipulator kinematics is correct.

#### 2.5.2. Inverse Kinematic Analysis

Before the manipulator is driven to the desired position, all the joint variables related to the position must be obtained. Therefore, it is necessary to carry out the inverse kinematics analysis of the manipulator.

The desired pose coordinate of the end-effector of the manipulator is assumed as [*n*, *o*, *a*, *p*]. Firstly, multiply <sup>0</sup> <sup>1</sup>*T*−<sup>1</sup> at both sides of Equation (10) by the inverse transformation method. After simplification, it can be determined that <sup>0</sup> 1*T*−<sup>10</sup> <sup>6</sup>*<sup>T</sup>* = <sup>1</sup> 2*T*<sup>2</sup> 3*T*<sup>3</sup> 4*T*<sup>4</sup> 5*T*<sup>5</sup> <sup>6</sup>*T*. According to the equal elements of the matrices at both sides, it can be determined that *c*1 × *py* = *s*1 × *c*1 × *px*. Finally, the rotation angle of the base joint is shown in Equation (13):

$$\theta\_1 = \arctan \frac{p\_y}{p\_x} \tag{13}$$

Similarly, multiply <sup>1</sup> <sup>2</sup>*T*<sup>−</sup>1, <sup>2</sup> <sup>3</sup>*T*<sup>−</sup>1, <sup>3</sup> <sup>4</sup>*T*<sup>−</sup>1, <sup>4</sup> <sup>5</sup>*T*<sup>−</sup>1, <sup>5</sup> <sup>6</sup>*T*−<sup>1</sup> at both sides of Equation (12), and, according to the elements at both sides, which are equal, the general expressions of the revolute joint variables *θ*3, *θ*4, *θ*<sup>5</sup> are obtained, as shown in Equation (14)~(16):

$$\theta\_3 = \arctan \frac{t\_2 - (d\_5 + d\_6)a\_z - a\_4 \left(c1a\_x + s1a\_y\right)}{t\_1 - (d\_5 + d\_6)\left(c1a\_x + s1a\_y\right) + a\_4 a\_z} \tag{14}$$

$$\theta\_4 = \arctan \frac{a\_4(c3t\_2 - s3t\_1) + (d\_5 + d\_6)(s3t\_2 + c3t\_1 - a\_2)}{a\_4(s3t\_2 - c3t\_1 - a\_3) - (d\_5 + d\_6)(c3t\_2 + s3t\_1)} \tag{15}$$

$$\theta\_5 = \arctan \frac{n\_\text{x} \cdot \sin \theta\_1 - n\_\text{y} \cdot \cos \theta\_1}{o\_\text{x} \cdot \sin \theta\_1 - o\_\text{y} \cdot \cos \theta\_1} \tag{16}$$

where *t*<sup>1</sup> = *c*1*px* + *s*1*py* − *a*2, *t*<sup>2</sup> = *pz* − *d*<sup>1</sup> − *d*2.

In conclusion, the DH parameter method was used to establish the theoretical model of the manipulator kinematics, and the relative position and pose relationship between the coordinate systems of each joint were obtained. Meanwhile, the inverse kinematic analysis of the manipulator was carried out to obtain the general expressions for the joint angles of the manipulator, which provides the theoretical basis for the simulation analysis of the manipulator workspace.
