A Novel Two-Degree-of-Freedom Gimbal for Dynamic Laser Weeding: Design, Analysis, and Experimentation

Current robotic laser weeding systems mostly rely on serial mechanisms with one or two actuated axes, which can barely meet the requirements of high precision and dynamic performances. In this article, a novel laser weeding gimbal is proposed based on a two-degree-of-freedom 5-revolute rotational parallel manipulator to perform a dynamic intrarow laser weeding operation. Comprehensive analyses consisting of kinematics, workspace, singularity, and dynamics are carried out to evaluate the performance of the proposed design. Finally, experimental tests were conducted both in lab and field environments and the results are provided, in which the positioning accuracy has been evaluated as in average errors of 0.62 mm in position at the distance of 535 mm, and the dynamic weeding efficiency is around 0.72 s/weed with a dwell time of 0.64 s at the tracking speed of 0.1 m/s. The effectiveness of the proposed dynamic intrarow weeding mechanism has been evaluated in a real field trial.

and selectively to the botanical material, heating up the water in the plant cells, and thereby, depress the weed growth [3]. By considering the energy density and biological effect, the efficacy of laser treatment can be optimized by directing toward the apical meristems of weeds, which results in a millimeter-scale spot size [4].
To precisely control the laser beam and perform an efficient and effective laser treatment, various manipulation approaches have been investigated in the literature. By applying a two-axis deflection device, which consists of two galvanometer scannercontrolled mirrors and a focus lens, Nadimi et al. [5] have developed an autonomous laser weeding system to simulate targeting weeds in the dynamic field conditions of a mobile vehicle. Later, based on the similar two-axis deflection device, Rakhmatulin and Andreasen [6] have developed a relatively inexpensive laser-based weeding device and tested on couch grass mixed with tomatoes. Although this type of deflection device has been widely utilized in the additive manufacturing with high precision, the high requirement of well-established stable setup can be barely meet in the real dynamic field environments. Moreover, in practical, the dust as well as smoke generated by burning the weeds in the field can significantly affect the reflection of the mirrors and deflection of the lens, which reduces the pointing and focus performance of the laser beam. By utilizing the serial mechanisms, two-degree-of-freedom (2-DoF) serial manipulators have been mainly devoted to control the laser beam (e.g., class-I) mimicking static laser weeding in a lab environment [7], [8]. With consideration of the high dynamic advantages of parallel mechanisms (PMs), Wang et al. [9] proposed a laser weeding manipulator based on a novel 3UPS-RPU PM, which performs 4-DoF movements (i.e., 2-DoF rotation and 2-DoF translation). Moreover, it can be also noted that none of the aforementioned approaches have been implemented in the field trial stage and some of them even only limited in theoretical analysis. Furthermore, no existing experimental studies discuss about the dynamic laser weeding, i.e., only pointing (i.e., static positioning) but no tracking (i.e., dynamic positioning and tracking).
Throughout this article, R, P, U, and S denote, respectively, revolute, prismatic, universal, and spherical joints in which the underline ( ) represents the actuated ones.
Based on the previous studies, it can be noted that a twoaxis (2-DoF) rotational mechanism is essential and critical This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ for manipulating either a deflection device or directly to the laser collimator. By considering the high dynamic advantages of PMs, this article focuses on the 2-DoF rotational parallel manipulators (RPMs). Thanks to inherent important advantages of large orientation workspace, low rotational inertia, and high payload capacity, 2-DoF RMPs have been widely used as tracking devices [10], [11], vehicle simulators [12], rehabilitation robots [13], wrist joints [14], [15], and surgical devices [16]. 2-DoF 5R-RPMs, as a specialized branch with an RR-RRR closed kinematic chain, are well known as the two rotational DoFs (i.e., pan and tilt) can be controlled independently in a fully uncoupled manner [17]. In spite of various studies of the 2-DoF 5R-RPMs have been carried out in the literature, such as type or configuration synthesis [18], [19], kinematic and dynamic analysis [20], optimization design [21], and workspace and singularity characterization [22], [23], the comprehensive analysis consisting of workspace, singularities, and dynamics has not been fully investigated, especially under the conditions of the high accuracy and dynamic response, e.g., in dynamic laser weeding scenario.
With the aim to develop an effective gimbal for dynamic intrarow laser weeding, in this article, a novel 2-DoF 5R-RPM design has been proposed as well as the comprehensive analysis and experimental evaluation. The rest of this article is arranged as follows. In Section II, a novel design of the 5R 2-DoF RPMs is proposed as the gimbal for laser weeding treatment. Section III is dedicated to comprehensively study the performance characteristics of the proposed gimbal in terms of workspace, singularity, and dynamics. In Section IV, experimental tests are carried out both in lab and field environments for evaluating the laser weeding efficacy. Finally, Section V concludes this article.

II. NOVEL DESIGN SOLUTION
To tackle the challenge in the dynamic intrarow laser weeding, a novel gimbal design is proposed and built as based on a 2-DoF 5R-RPM, as shown in Fig. 1, where a unique ring guide mechanism (RGM) is designed to accommodate the laser collimator and its bulk power cable, which is different from the designs in the literature [10]- [16]. The coordinate systems, kinematics (i.e., forward and inverse) and Jacobian are presented in this section as the base for further performance study in the following sections. It is worth noting that a different method is proposed to directly derive the 2-DoF 5R-RPM kinematics without calculating passive rotation angles, which can significantly reduce the computation time and improve the real-time performance during the implementation, as compared to the methods in [20] and [23]. Fig. 1(a) shows the novel mechanical design of the 2-DoF 5R-RPM gimbal utilized in dynamic intrarow laser weeding. It consists of a base and a moving platform (i.e., laser collimator), which are connected by two limbs-Limb 1 and Limb 2. Limb 1 is composed of three key components connected following by the Motor I (i.e., R-joint 1), a U-type bar (i.e., Link 1), and a pair of bearings (i.e., R-joint 2), while the Limb 2 is composed of the Motor II (i.e., R-joint 3), a ring guide mechanism (RGM) (i.e., Link 2 and R-joint 4), a connecting piece (i.e., Link 3), and a flange ball bearing (i.e., R-joint 5).

A. Mechanical Design
The two motors are mounted on the base as the actuated joints and the laser collimator is connected with both the pair of bearings and the flange bearing as the moving platform. The RGM [see detailed view in Fig. 1(a)], consisting of two identical half-ring guides and a pair of v-groove bearings, is connected to the Motor II and connecting piece. It is worth noting that the unique RGM not only provides with 1-DoF rotation with large motion range but also allows adjusting the laser collimator passing through the gap between two ring guides. Moreover, considering that the high class level laser collimator is normally equipped with bulky power cable at the end, this RGM design is also able to prevent possible interference between the manipulator and the cables. Besides, the physical connecting links in the Limb 2 and the base also provide the constraints for the laser collimator and secure the gimbal's motion from pointing laser upwards. In this case, it will meet both the requirements of the large bending radius of the power cable and the coincident between the center of mass of the laser collimator and common point of all the R-joint axes, as well as safety requirement in utilizing high class level laser (e.g., Class 3B and 4). It can be noted that once the laser collimator dimension is defined, the geometrical properties (link dimensions and positions) of the proposed gimbal design can be then optimized with consideration of the specifications of flange bearing (R-joint 5) and V-groove bearing (R-joint 4).
Furthermore, the axes of all the R-joints intersect at one common point (i.e., O) and the angle between the axes of any two adjacent joints is equal to 90 • , as shown in Fig. 1(b).

B. Coordinate Systems
To facilitate the analysis, two coordinate systems, {O}:O-XY Z on the base and {O }:O -X Y Z on the moving platform, are first established with coincident origin points O and O , as shown in Fig. 1(b). The Xand Y -axes are along the rotational axes of R-joints 3 and 1, respectively, and the Z-axis is then determined by the right-hand rule, while the X -, Y -, and Z -axes are along the rotational axes of R-joints 2, 4, and 5, respectively. In the R-joint i, i = 1, 2, . . ., 5, the unit vector along the joint axis is denoted by e i , and we have Therefore, the input of 5R-RPM are the rotation angles of both motors (i.e., θ 1 and θ 3 ), while the output is the pose of the moving platform (i.e., θ 1 and θ 2 ).

C. Kinematic Analysis
As stated, θ 1 is represented as both for input and output, therefore, the kinematic analysis in this subsection is to calculate θ 2 with given θ 1 and θ 3 , i.e., forward kinematic analysis (FKA), and to solve θ 3 with known θ 1 and θ 2 , i.e., inverse kinematic analysis (IKA).
Based on the coordinate system in Fig. 1(b), the rotational matrix of the moving platform related to the base can be obtained through both the kinematic chains in Limbs 1 and 2 as follows.
In Limb 1 (Link 1 and R-joints 1-2) and in Limb 2 (Links 2-3 and R-joints 3-5)  (1) and (2), the explicit expression can be obtained as provided in the Appendix V for the sake of brevity. The forward and inverse kinematics can be computed according to (55) and (56).
FKA-The output θ 2 can be calculated with given θ 1 and θ 3 as where c i and s i denote cos(θ i ) and sin(θ i ), respectively. IKA-The input θ 3 can be expressed with known θ 1 and θ 2 as It is worth noting that, as mentioned in Section II-A, the laser collimator in the proposed design can only point beneath the O-XY plane. By considering the positioning FKA-Substituting (55) into (42) and (5), the output O p = [p x , p y , p z ] T can be calculated with given θ 1 and θ 3 as IKA-The inputs θ 1 and θ 3 can be expressed with known [p x , p y , p z ] T as

D. Velocity Analysis
Based on the screw theory [24], the velocity analysis of the proposed 2-DoF 5R-RPM are conducted with instantaneous twist of the moving platform, which can be expressed as the linear combination of instantaneous twists of both limbs as where $ i is the screw associated to the joint i with the form . Besides, the velocity state of the moving platform can be defined as $ p = [ω p ; v p ], where ω p represents the angular velocity of the platform and v p is the linear velocity of a point in the moving platform. Since all the joints are revolute joints, and their axes pass the origin, the screws are given by To obtain the Jacobian of the proposed 2-DoF 5R-RPM, the methodology in [25] is applied and the reciprocal basis screws of each limb are then calculated by the observation method [24]. Let $ r,k,j denote the kth reciprocal screw ($ r ) of the jth limb, these screws can be obtained as Taking the reciprocal product of both sides of (8) and each of the reciprocal screws, and writing in matrix form the linear independent equations yields to Then, we proceed locking the actuated joints of each limb, therefore, the reciprocal screw system increases by one for each limb. The new reciprocal screws are given by Taking the reciprocal product of both sides of (8) and each of the new reciprocal screws gives (13) where Multiplying both sides of (13) by J q −1 , we obtaiṅ where the Jacobian of actuation, J a , can be calculated as Complementing (11) and (14), we geṫ whereq 0 = q 0 4x1 and J = J a J c is the overall Jacobian.

III. PERFORMANCE ANALYSIS
In this section, a comprehensive performance analysis of the proposed novel gimbal design is carried out in terms of workspace, singularity, and dynamics. First, the reachable workspace is analyzed with consideration of joint limits and collisions between adjacent links. Second, singularity study is conducted based on the evaluation of the Jacobian matrix. Finally, dynamics analysis is conducted to calculate the following: 1) the generalized forces acting in each link; 2) the total power applied to the mechanism; 3) the torque required for the actuators.

A. Workspace Analysis
As based on the FKA in (3), the workspace W can be expressed as To obtain the reachable workspace, the joint limits and collisions have to be identified first. As mentioned in Section II, the proposed gimbal design only contains revolute joints, which are based on bearings, or servo motors, or the RGM. In other words, apart from the RGM, all the other R-joints can potentially perform the full rotation. However, since the proposed gimbal is utilized for laser weeding, i.e., only the region beneath the O-XY plane is under consideration, the motion range of R-joint 1 and 3 is constrained with half rotation (i.e., θ 1 , θ 3 ∈ (−90 • , 90 • )) for the safety consideration. Moreover, the motion range of the RGM is constrained by the half ring guide, which results in a half rotation range of R-joint 4 as well (i.e., θ 4 ∈ (−90 • , 90 • )). Therefore, the collisions between links and singularities are the main constraints.
Considering the geometrical properties (link dimensions and positions), collision conditions can be evaluated to prevent possible impact damages. First, by utilizing the Msc.Adams, the colliding areas in the proposed design can be identified and the motion range of (θ 1 , θ 3 ) are narrowed down into θ 1 ∈ (−65.5 • , 65.5 • ) and θ 3 ∈ (−50.62 • , 66.85 • ). Moreover, by applying the FKA in (55), the θ 2 can calculated, and then, the workspace of the proposed 2-DoF 5R-RPM in terms of joint space and 2-D contour of θ 2 are obtained with and without consideration of constraints, as shown in Figs. 2 and 3, respectively. It can been seen that the reachable workspace with consideration of constraints is significantly reduced.

B. Singularity Analysis
In this section, the singularities (i.e., constrain and architecture) of the parallel manipulator are explained based on the analysis of the overall Jacobian calculated in Section II-D, namely, the constraint singularities occur when J c loses its rank, while architecture singularities occur when det(J) = 0. Regarding the constraint singularities, J c can be calculated by a full rank of 6 minus the number of DoFs [24]. By considering the two DoFs of the proposed RPM, i.e., two orthogonal vectors e 1 and e 2 , it can be noted that there are not constraint singularities as rank is always equal to 4.  Regarding the architecture singularities, it can be seen that only when the term (e 4 × e 5 ) T /(î · e 4 × e 5 ) is equal to zero, det(J) = 0. In other words, this only occurs when the rotation axes of both R-joint 5 and 3 are collinear, which is out of the scope of this design. In a word, the proposed mechanical design can perform as a singularity-free 2-DoF RPM.

C. Dynamic Analysis
In what follows, the dynamic analysis of the manipulator is computed using the screw theory. In order to calculate the generalized forces acting in each body, it is necessary to express the velocity state in terms of the generalized velocityq, therefore, the passive joint rates need to be expressed in terms of the first-order influence coefficients aṡ From (8), since the velocity of the platform with respect to the ground has the form O V p = [ω; 0 3×1 ] and simplifying terms, we get: Thus, the aforementioned equation can be rewritten aṡ Applying Cramer's method to (19) yieldṡ Therefore, the influence coefficients are given by Then, defining the partial screw $ j n , as the contribution to the motion of the body n due to the actuated R-joint j as The partial screws associated with the platform are given by and the expression (18) can be rewritten as In a similar fashion, the velocity state of the remaining links are given by where All these screws are expressed using as a reference point coincident with the origin, but when the representation point is changed to the center of mass CM (or any other point) the expression of partial screws is modified as where P($ n ) and D($ n ) represents the primary and dual component of the screw, respectively. According to [26], the reduced acceleration of the end effector of a serial chain, in terms of the screws of the kinematic joints of the chain, with respect to an inertial frame is given by where the term $ L is given by and the brackets [$ a $ b ] represent the Lie product between the elements $ a and $ b . Therefore, the reduced acceleration of the platform can be expressed as Given that A p = [ω p ; 0 3x1 ], from (29), the acceleration joint rates can be obtain bÿ Applying Cramer's method to (31) yields The reduced acceleration of the remaining links can be obtained by Letĉ be a link of the manipulator with mass m, under a velocity state of its CM given by 0 V CM c , and a reference frame Oĉ attached to the center of mass CM of the body in consideration.
Additionally, let f be the force applied to the body and τ CM the torque applied to the center of mass of bodyĉ. Then, the external forces acting ofĉ can be represented by Fĉ E = [f ; τ CM ], also known as external wrench.
Using the D'Alembert principle, the inertial wrench is given by where aĉ 0 and αĉ 0 are the linear and angular acceleration of the bodyĉ with respect to the fixed ground, and 0 Iĉ CM is the inertia matrix ofĉ relative to its center of mass expressed in the fixed reference frame {O-XY Z}. This matrix can be calculated as where Oĉ Iĉ CM is the inertia matrix ofĉ relative to its center of mass expressed in the moving reference frame attached to the body, and O R Oĉ the rotation matrix between the moving reference system and the fixed reference system. Furthermore, denoting the acceleration due to gravity byĝ, the gravity wrench is given by Therefore, the overall force acting on the bodyĉ is The power Wĉ produce by the force Fĉ can be obtained applying the reciprocal product as Then, the total power applied to the mechanism is given by where τ 1 and τ 3 are the torques applied by the actuators 1 and 2, respectively. Rewriting (39) in terms of the generalized velocities and partial screws, and grouping terms and this can be true only if therefore, the torque of the actuators can be calculated by

IV. EXPERIMENTAL CHARACTERIZATION
In this section, the mechanical design and performance analysis were carried out. A series of experimental characterization tests of the proposed gimbal design have been conducted both in lab and field environments: a customized experimental setup [see Fig. 4(a)] was built for evaluation of static positioning accuracy; a mock-up setup [see Fig. 4(b)] was built for testing the dynamic positioning and tracking; and a field trail system (see Fig. 6) was finally built for evaluating the effectiveness of the proposed laser weeding device.

A. Test in Lab Environment
Prior to field trial of the proposed gimbal, both static (i.e., positioning) and dynamic (i.e., positioning and tracking) tests were carried out in the lab environments with an experimental setup, as shown in Fig. 4 and the mechanical specification of the gimbal is listed in Table I. The gimbal system is equipped with two identical servo motors (Dynamixel 64-AT) for actuation and an ultrasonic distance sensor (HC-SR04) for measuring the distance [i.e., p z in (7)] as shown in Fig. 4(a). It is worth noting that the motor was selected by primarily considering the required torque when performing the dynamic weeding. For instance, one critical scenario was considered when one of the motors rotated from −25 • to 25 • within 0.1 s with the initial and final velocities equal to zero, while the other one remained at the reference position. Based on (41), the calculated torques are 1.06 and 1.1 Nm for Motors I and II, respectively, while the stall torque of Dynamixel 64-AT is 6.0 Nm at 12 V. Moreover, a series of circular trajectories on the grid board were selected (radius = [50 : 50 : 250] mm) for the static tests. In Fig. 4(b), a mock-up testbed for dynamic tests is elaborated with a laptop (image processing and control), a monocamera (image capturing) and a conveyor belt with mock-up plants and weeds (i.e., green paper in arbitrary shapes and sizes).
1) Positioning Accuracy Test: The positioning accuracy is essential for the proposed design as it requires to point at apical meristems of weeds (a millimeter-scale spot) from a reasonable height (e.g., approx. 535 mm in the field trials). To evaluate the positioning accuracy of the proposed gimbal, a series of circular trajectories (radius = [50 : 50 : 250] mm) are selected and 121 discrete points on each circle are chosen as pointing positions, P = [p x , p y , p z ] T . IKA of the proposed gimbal in Section II-C is utilized to compute the desired joint angles for both actuation R-joints (θ 1 , θ 3 ).
In Fig. 5, test results are plotted in terms of R-joint angle (θ = [θ 1 , θ 3 ]), pointing position (P = [p x , p y ]) and error of them, where the X-axis in Fig. 5(a) and (c), φ, represents the corresponding positioning point on the circle as illustrated in Fig. 5(b). The R-joint angle measured during the experiment are presented in Fig. 5(a), where the black solid lines show the analytical value while the red circle and blue diamond represent the measured R-joint angles of θ 1 and θ 3 , respectively. Moreover,  Table II corresponding to Fig. 5(c). As shown in Fig. 5(a), it can be noted that initial offsets of R-joint 3 have been set as 5.3 • , 10.5 • , 16.6 • , 20.5 • , and 25 • , respectively, i.e., half of the motion ranges and were utilized to initialize the start position (φ = 0 • ) on the corresponding circular trajectory. Moreover, the errors in R-joint 3 were approximately twice of the ones in R-joint 1, which were caused by higher torque required in R-joint 3 as calculated in (41). Furthermore, by taking into account of the motor backlash in this design (20 arcmin, i.e., 0.33 • ), it is significant uncertainty and disturbance to the high positioning accuracy requirement of the proposed gimbal design, as the backlash representing approximate 3.08 mm at a distance of 535 mm. To overcome and reduce the impact, a rubber band was applied to the moving platform, which kept the motor approaching the target angle from the same direction every time. As shown in Fig. 5 and Table II, the positioning test results in average errors of 0.05 • in R-joint 1, 0.10 • in R-joint 3, and 0.62 mm in position, respectively, which indicates that the proposed gimbal design is capable of performing desired pointing and targeting with consistently high accuracy.
2) Positioning and Tracking Test: The dynamic tests, i.e., positioning and tracking, were carried out based on a mock-up test setup, as shown in Fig. 4(b), where green scraps of paper were utilized to simulate the plants (200-mm scale) and weeds (10-mm scale) and the conveyor belt was to mimic the movement of the mobile platform (speed = 0.1 m/s), which carries the laser weeding device. To maximally ensure the test reliability, all of the plants and weeds are randomly shaped and placed on the conveyor belt. After captured by the monocamera, the positions of weeds can be obtained based on a two-stage image processing method [8], and then, set as targets for tracking. As shown on the laptop screen in Fig. 4(b), the plants were represented in blue and laser execution area was in red, where the weeds within the intrarow area for laser treating are first shown in white dots, and then, in gray once treated. Moreover, the tracking duration for each weed (i.e., dwell time) in this experiment is set as 0.64 s as an efficient laser control using a 90-w, 810-nm laser with 1.8-mm spot diameter [4]. As shown in Table III, three test trials were conducted where average weeding time per weed was 0.73 s, which results in 0.09-s positioning time for the proposed gimbal, which is significantly improved as compared to the conventional 2-DoF serial mechanism based gimbal (0.51 s) [8]. Furthermore, the proposed gimbal can perform an extremely high average hit rate of 99.2% at the moving speed of 0.1 m/s.

B. Test in Field Environment
To evaluate the performance of the proposed laser weeding mechanism in the field scenario, a field trial system named Hy-perWeeding was built as shown in the Fig. 6. The HyperWeeding system was assembled at the rear of a tractor and inside the hood, a monocamera-based multispectral vision system [27] and a laser loaded gimbal were mounted on a three-axis gantry, which allowed relocating the system according to the field condition. It is worth to note that only intrarow area was treated by laser, while the interrow area was treated by the nonlaser weeding method.
The effects of the laser weeding in the field trial are illustrated in Fig. 7. A treated weed and the corresponding plant are first presented to give an intuitive view of the treatment scenario, as shown in Fig. 7(a), where a closer view of the treated weed in the dashed box is given to show how the apical meristem looks immediately after the treatment. Moreover, an overview of the treated area after 24 days is shown in Fig. 7(b), where only the middle row is treated with the aim to compare with the untreated rows beside. It can be seen that the number of intrarow weeds of the middle row are significantly reduced in comparison of the other two, which indicates that the effectiveness of the proposed laser weeding device is valuable in the real field. Furthermore, to the best of the authors' knowledge, this was the first time that laser weeding treatment has been implemented in a real field.

V. CONCLUSION
This article presents a novel gimbal design based on a decoupled 2-DoF 5R RPM for the dynamic intrarow laser weeding. By applying an unique dual-RGM, the proposed design allows the bulky power cable of the laser collimator passing through the ring guide, which is able to avoid potential interference between the manipulator and the cables.
Comprehensive analyses of the proposed 2-DoF 5R RPM have been carried out in terms of kinematics, velocity, workspace, singularity, and dynamics. It can be noted that by considering the geometry constraints, the noncollision and singularity-free workspace has been obtained to ensure safe and high precision operation. Moreover, dynamics analysis has been conducted to calculate: the generalized forces acting on each link, the total power applied to the mechanism, and the torque required for the actuators.
Finally, experimental testes have been carried out with several built setups both in lab and field environments. Test results have shown that the proposed gimbal design can perform as follows: 1) in static conditions, the positioning accuracy with average actuation angular error of less than 0.
As mentioned in Section II-C, the kinematic analysis is to calculate the relationship between θ 2 and θ 3 with a known θ 1 . Moreover, by looking into the (49) and (52), it is worth noting that this relationship can be solved when the c 4 is calculated. Furthermore, taking into account of s 2 2 + c 2 2 = 1, c 4 can be calculated from (49)  (56) It can be noted that there is only one solution in our case study based on the defined rotation range of θ i in Section III-A, which is different from the work in [20] and [23]. In addition, the forward kinematics can be directly solved without calculating the passive rotation of θ 5 , which can significantly reduce the computation time and improve the real-time performance during the implementation, as compared to the methods in both [20] and [23]. By simple substitution of (53) into (49) and (52), the kinematics can be solved as shown in the main context.