Flexible Joints of Picking Manipulator Based on Current Feedback

During the process of automatic picking, malfunctions caused by collisions between the picking manipulator and obstacles can damage plants and/or injure staff. To solve this problem, a flexible joint based on an elastic actuator is designed. Using a collision detection algorithm based on monitoring the current, a feedback control system with a flexible joint moment is set up, and a protection mechanism for the staff and plants against collisions with the manipulator during the automatic picking process is established. The results of the experiments on a prototype show that the proposed feedback control system with flexible joint moment can detect collisions of the manipulator with high accuracy. Based on the jump value of the current during collision detection, the impact moment on the flexible joint is estimated to have a minimum resolution of $2.444\times 10^{-{3}}\,\,\text{N}\cdot \text{m}$ . The frequency of collision detection is 37 Hz, and the minimum estimation error in the impact moment of the flexible joint is 2.25%.


I. INTRODUCTION
With the continuing developments of automation technology, its application to manipulators to pick fruits and vegetables is becoming more common [1]- [3]. However, accidental collisions with the manipulators during automatic picking can damage plants and injure workers [4]. Therefore, it is important to detect the impact of manipulators on human beings and plants in real time, to establish a protection mechanism against collisions during the picking process and to provide timely feedback [5]. The methods used to protect against collisions with manipulators can be divided into four kinds. The first method involves increasing the degree of freedom of the manipulator and designing a related obstacle avoidance algorithm to make it more flexible and avoid obstacles, but this method increases the cost of the manipulator and is unsuitable for large-scale industrial applications. For example, Li et al. [6] proposed a novel method of motion generation for a seven-degree-of-freedom manipulator; these researchers generated collision-free arm The associate editor coordinating the review of this manuscript and approving it for publication was Lorenzo Ciani . motion by combining the configuration space and the collision distribution of arm motion, which can avoid unnecessary forward and inverse kinematics. Hu et al. [7] developed a backward quadratic search algorithm (BQSA) as another option for solving inverse kinematics problems in obstacle avoidance for a seven-degree-of-freedom manipulator, which can reduce the computational burden. The second method involves applying a force sensor and simulated skin to identify the interface between the manipulator and other objects. This method is simple to control and has highly sensitive reactions but is costly and involves a complex installation process. O'Neill et al. [8] designed a continuously stretchable and flexible skin sensor that consistently provides an emergency stop command at only 0.5 N of force. Cirillo et al. [9] proposed a new sensorized flexible skin to enhance the safety and intuitiveness of physical human-robot interactions in applications where both intentional and unintentional contacts may occur. The skin sensor consists of the capability of measuring both the position of the contact point and the three components of the applied force with high repeatability and accuracy. The third method is to monitor the current and position of the motor driving the manipulator's joint to deduce the impact of collisions on it. This method is inexpensive and features a relatively sensitive feedback control system of the manipulator that is easy to implement. For example, Wahrburg et al. [10] presented a Kalman filterbased approach for estimating external forces and torques relying on a dynamic model of a serial-chain robotic manipulator where only motor signals (currents, joint angles, and joint speeds) are measurable. Chen et al. [11] proposed a universal algorithm for the sensorless collision detection of robot actuator faults to enhance the security of the robot. This collision detection algorithm can be implemented without any external sensors or acceleration and can realize realtime detection just needed to measure the motor current and the location information from the encoder of the robot joint. XU et al. [12] proposed three kinds of collision reaction strategies for increasing safety during human and robot interactions without relying on torque sensors. In their proposed algorithms, the motor torque is estimated by the driver current, and the generalized momentum observer is used for collision detection, which does not need joint acceleration information and calculates the inverse of the inertia matrix. The fourth method uses a flexible link with strain gauges to detect obstacles during the control of flexible manipulators. This method produces a sensor system that is small and lightweight. For example, Payo et al. [5], [13] used several strain gauges to measure the coupling torque between the motor and the flexible arm and described a collision detection algorithm according to the change in the trajectory of the coupling torque. A collision was detected when the measured coupling torque exceeded the limits.
To protect against collisions of the picking manipulator, this article proposes flexible joints based on an elastic actuator that can partly absorb the shock of an impact during collisions involving the manipulator and can help reduce damage to the manipulator and plants. At the same time, the collision detection algorithm is designed based on the current feedback of the joint motor inspired by the third method above [11], [12]. The collision detection algorithm is used to establish a control system for flexible joints of the picking manipulator based on moment feedback. Using the flexible joints and the collision detection algorithm, manipulators based on moment feedback control can be implemented for automatic picking, thus enhancing the safety of human workers as well as plants.

II. PRINCIPLE AND SIGNIFICANCE OF THE IMPACT MOMENT ESTIMATION OF FLEXIBLE JOINTS
When a manipulator collides with an object, the resistance moment of its joint increases rapidly, and there is a jump in the current of the motor of the joint. In this context, can the relation between the jump in the current and the impact moment on the joint be determined? If so, the impact of the collision on the manipulator can be obtained indirectly by detecting the current of the motor of the joint motor.
However, during the normal operation of the manipulator, the resistance moment continues to change. To determine the  Fig. 1, can be formulated. The point ''O'' on the rotation axis is set as the zero potential energy line, the joint stiffness coefficient is K s , the degree of torsion of the input end of the joint is θ 1 , and the degree of torsion of load is θ. According to the simplified model established by Spong [14], the elastic potential energy of the manipulator joint is The Lagrangian function is set to L, the kinetic energy to E K , the potential energy to E P , and the rotating inertia of load to I = mgl 2 3. The mass of the load is m, in kg; the distance between the centroid of the load and the axial center is l, in mm; then, the Lagrangian method is applied to dynamically model the flexible joints: Then, the kinetic energy is The force analysis of the joint is The potential energy is The external force moment is When the motor of the joint operates smoothly; that is, when the angular accelerationθ is zero, the relationship between the moment and position is In (7), if the frictional resistance is ignored, under the normal operation of the manipulator, then the resistance moment on the flexible joint is related to the turning angle of the links of the arm. Therefore, by monitoring the changes in the current of the motor of the joints of the manipulator with their rotation, the relation between the jump in the current and the impact moment can be determined to form a collision detection algorithm.
Therefore, the value of the jump in the current of the motor that drives the joints of the manipulator can be used to estimate the impact moment on them. For a multijointed picking manipulator, through jumps in the currents of all joints, the magnitude and position of the external force on the manipulator can be obtained and can play a significant role in its subsequent control and the implementation of the protection mechanism. For the three-degree-of-freedom picking manipulator shown in Fig. 2, when the lower arm collides with an object with external force f 1 , the elbow joint bears impact moment τ 1 , and the shoulder joint bears impact moment τ 2 . When the main arm collides with external force f 2 , τ 1 = 0, and τ 2 changes. When the lower arm and main arm of the manipulator collide with external forces f 1 and f 2 at the same time, both τ 1 and τ 2 change. Therefore, detecting changes in the resistance moment of all flexible joints of the manipulator and analyzing them can help determine the arm that has collided with an object.
Furthermore, according to the impact moment and turning angle of all flexible joints, the magnitude and position of the impact on the manipulator can be deduced in static form. To make it more convenient to analyze the impact moment on the flexible joints, the impact during collisions between the manipulator and humans or plants can be simplified into a step impact. As shown in Fig. 3, suppose that the two-link picking manipulator is under impact f , where the main arm OA of the manipulator is l 1 and the lower arm AB is l 2 . The radius of the flexible joint is r, the angle between the main arm and the horizontal direction is θ 1 , the angle between the lower arm and the extended line of the main arm is θ 2 , the distance between the action point of impact f and point A is l x , and the angle between f and its resolution power f 1 is θ 3 . Thus, the moment at point O is The moment at point A is If τ 1 and τ 2 are given, The magnitude and action position of the impact on the manipulator can be calculated through (10). In the same way, the impact moments on all joints of the multijointed picking manipulator can be calculated to make it more convenient to follow its feedback control.
For manipulators with more than two degrees of freedom, the principle to detect the external force and position of collision is similar to that given in (10), except in terms of the complexity of the calculation. As an example, the authors designed flexible joints of a two-degree-of-freedom picking manipulator with the capability to detect collisions as a protection mechanism. The aim is to ensure the safety of human workers and plants.

A. DESIGN OF THE FLEXIBLE JOINT AND SIMULATION ANALYSIS
Common flexible elements of the manipulator include an artificial muscle, a hydraulic driver, and a series elastic actuator. VOLUME 8, 2020 The artificial muscle responds slowly and cannot load a large moment [15]. The hydraulic driver responds quickly with a large driving force. The stability of the movement with a load is influenced by changes in the temperature and load [16]. The elastic driver and the reducer are in series and have the equivalent effect as that obtained by adding a spring between the power source and the load as a transfer mechanism that can independently bear the driving force of the power source and reacting force of the load; it is also flexible and can resist impact due to external forces [17]. Referring to the designs developed by Wyeth and others [18], [19], the circular driving elastic actuator shown in Fig. 4 was designed. This actuator consists of a lower input disk (1), a rolling bearing (2), an output round shell (3), a transmitting spring group (4), and an upper input disk (5). The four transmitting springs were at 90 degrees from one another, installed between the upper input disk and the output round shell. The rolling bearing was installed between the lower input disk and the output round shell, and the upper input disk was connected to it. When the upper input disk rotated as driven by the motor, the lower disk compacted the transmitting spring and transmitted power to the output round shell. A 6333-type bearing was used, and the distance between a spring and the center of rotation was R = 40 mm. The outer radius of the spring was D 1 =20 mm, the diameter of the wire was d = 2 mm, and the stiffness of the spring was K A = 23.66N /mm. The circular driving elastic actuator shown in Fig. 4 was applied in the flexible joints of the picking manipulator, as shown in Fig. 5. A harmonic reducer (6) was installed on the motor frame (8), and the two were connected to the motor (7) and the lower input disk. The rated speed of the brushless DC motor was 3000 r/min, and the rated moment was 0.3 N·m; the transmission ratio of the reducer was 1:100. The shell of the elastic actuator used polylactic acid (PLA) for 3D printing and weighed m = 0.5 kg. When the output axis was fixed, the installation frame of the input spring rotated θ s . The force model of a single spring is shown in Fig. 6. The distances between the springs and the center of rotation O were R + D 1 /2 and R − D 1 /2. Of the two symmetrical springs, one was compacted, and the other was stretched. The magnitude of the deformation was x = R sin θ s , and the stiffness of the spring was K A ; thus, in the transmission of the elastic moment, the total moment of a group of springs was The total moment of the two groups of springs was twice that of a single group. Therefore, the relation between the equivalent stiffness and stiffness of the spring of the flexible joint is The larger the distance between a stiff single spring and the center of rotation is, the larger the equivalent stiffness K s of the flexible joint is. Based on MATLAB software, the relation between the equivalent stiffness K s and the turning angle θ s of the flexible joint, as shown in Fig. 7, was obtained through fitting. It was evident that with an increasing turning angle of the spring θ s , the equivalent stiffness K s of the flexible joint slightly decreased. Within a turning angle of 0∼0.05 rad, the equivalent stiffness of the flexible joint did not change, and thus, a flexible output function was obtained.
Under an external force, the kinetic performance of the elastic actuator is key to determining the impact resistance of the flexible joint. ADAMS software was used to establish the simulation model of the elastic actuator, as shown in Fig. 8, to analyze its stability when the elastic actuator was under an instantaneous resistance step moment.  Considering the attenuation in the motion of the elastic actuator due to friction [20], the linear elastic damping was set as ξ = 0.15N · s/m. Given that K A = 23.66N /mm, the τ 1 = 3N·m moment was exerted on the upper input disk in advance to simulate the normal operation of the manipulator, and the reverse instantaneous resistance τ 2 = 4N · m moment was then exerted to simulate the collision of the manipulator to guarantee the precision of the simulation. A step size of 0.0005 was adopted for the simulation. The curve of the change in the output angle as the elastic actuator was under an instantaneous moment was drawn, as shown in Fig. 9. It is clear that following the instantaneous resistance moment, the shortest time that the elastic actuator needed to recover to ±2% of the primary angle was 2.35 s. The actuator could thus stabilize quickly enough to enable the flexible joint to be a buffer.
According to the design parameters and simulation analysis of the flexible joint, the shell and motor frame of the elastic actuator were formed through 3D printing. The flexible joint was designed according to the method in Fig. 5. A prototype was obtained for the collision detection of the flexible joint, as shown in Fig. 10.

B. FEEDBACK CONTROL SYSTEM OF THE MOMENT OF FLEXIBLE JOINT
The current in the motor of the flexible joint changes with the changes in the resistance moment. Therefore, the flexible joint was used in a one-link flexible manipulator, and a feedback control system for the moment of the joint was established. Information on the changes in the current in the motor with the turning angle of the links of the arm, when  the manipulator was in normal operation and when it collided with an object, was recorded. The moment on the flexible joint was then calculated to identify the collisions of the manipulator. The structure of the feedback control system of the moment of the flexible joint is shown in Fig. 11. The motor controller obtained information on the current of the motor through the circuit at a resolution of 10 mA and position information of the rotating motor through a Hall element. The system sent VOLUME 8, 2020 these data to the main controller and received an order from it to drive the motor. Under normal operation of the manipulator, changes in the current in the motor of the joint are related to its rotational position, and the procedure for the calculation is shown in Fig. 12. The main controller sends orders to the motor controller to collect the commutation pulse number of the flexible joint at a frequency of 20 Hz. A trough Hall element stores this in the relevant register and reads the data in the register through an interrupted serial communication. The corresponding processing is conducted once the element accepts all frames of the data, and the turning angle of the motor can then be obtained; information on the position of the joint is thus obtained. When the flexible joint is under impact moment, there is a jump in the current of the motor of the joint. The procedure used by the main controller to detect the phase current of the motor of the joint is shown in Fig. 13. The main controller sends orders to the motor controller to collect phase current information when the motor rotates to various positions at a frequency of 20 Hz. The controller stores it in the relevant register, reads the phase current information in the register through interrupted serial communication, and conducts the corresponding processing after accepting all frames of the data. The feedback control procedure of the flexible joint is shown in Fig. 14. Commands are sent by the main controller, and the working mode of the motor controller is set to the speed close loop mode. The motor of the joint is controlled to rotate at a constant speed, and its commutation pulse number and phrase current information are recorded. After filtering the data, the curve of change I e in the phase current of the motor of the joint with its rotational position is obtained, and an external force is exerted to cause the manipulator to collide. The curve of change I c is obtained. A threshold of the jump in current ε is set; when |I c − I e | > ε, the motor of the joint brakes and the manipulator stops operation.

C. EXPERIMENTAL METHOD
In the prototype of the flexible joint collision detection system shown in Fig. 10, the feasibility of the feedback control system of the moment of the flexible joint is verified by examining the relation between the moment of impact on the flexible joint and the jump in the current of the motor. A comparison and analysis of the error of estimating the rate of the impact moment under various collision frequencies is conducted, and the most appropriate frequency for detecting the impact moment is defined. During the experiment, the lower arm was first controlled to rotate uniformly at n = 8 r/min and collided with the obstacle after a certain period. The impact was controlled to approximately 1.5 N, and the curve of the change in the current in the motor of the joint with its rotational position was recorded. The step value at the mutation point of the current was chosen as the primary value of the jump in it. Considering the safety of operators, all experiments used the jump threshold value as the primary value.
The lower arm stopped after rotating uniformly for a certain period, and the curve of the change in the phase current with the turning angle of the lower arm was obtained. The above steps were repeated to enable the lower arm to rotate normally for the same time and collide with the obstacle, and the curve of the change in the phase current with the turning angle of the lower arm was again obtained. The difference between the two curves at the mutation point of the current was recorded to determine whether the motor of the joint braked when the threshold ε was passed to verify the feasibility of the control system.
To study the relation between the impact moment on the flexible joint and the value of the jump in the current, the threshold of the jump was changed several times to enable the manipulator to have critical touch-stopping, which is the joint motor braking state that occurs when the current jump value just reaches the threshold value. An aluminum alloy load sensor was applied to detect the impact F of the obstacle on the manipulator, and the value is shown on the display of the controller. A ruler was used to measure the distance L between the action point of impact F and the center of the joint to obtain the impact moment T on the joint. Then, by calculating its average value and standard deviation, a linear fitting of the data was carried out, and the relation between them was obtained to define the minimum resolution needed to estimate the impact moment.
To study the influence of the frequency of collision detection on the estimated impact moment and determine the most appropriate frequency for this purpose, the threshold of the jump in current was chosen as the primary value. The impact moment T and value of jump in current ε when the manipulator was under critical touch-stopping was recorded, and the impact moment was estimated though the relation obtained in the second experiment. The estimated value was compared with the practical value to obtain the estimation error. The experiment was repeated 20 times to calculate the average and standard deviation of the error. The average value and stability of the error in the estimated impact moment at various current detection frequencies were analyzed to determine the most appropriate detection frequency.

IV. EXPERIMENTAL RESULTS AND ANALYSIS A. FEASIBILITY OF THE CONTROL SYSTEM
In the primary experiment, a jump threshold of preset current ε = 1200 mA was used. The control lower arm was uniformly rotated for 100 s at a speed of n = 8 r/min. The curve of change I e of the phase current with the turning angle of the lower arm was recorded. The lower arm was then normally operated once again for the same amount of time and then made to collide with the obstacle. The curve of change I c of the phase current with the turning angle of the lower arm was again obtained. The changes between the curves under the two conditions are shown in Fig. 15. When the lower arm collided with the obstacle, the current of the motor of the joint declined rapidly, and then the braking was finished; thus, the feasibility of the system was relatively high, and collision detection could be realized.

B. ESTIMATION OF THE IMPACT MOMENT
To obtain the relation between the impact moment on the flexible joint and the value of the jump in the current, the threshold of the latter was set to ε = 1200 mA. The lower arm was controlled to rotate at n = 8 r/min, and the distance L between the position of the collision and the center of the joint was 25 cm. During the touch-stopping of the manipulator, the jump in the current was near the threshold. The experiment was repeated 40 times, and the impact moment T was recorded. The position of the collision was kept constant, the threshold of the jump in current ε was lowered, and the experiment was repeated another 40 times. The experimental data are shown in Fig. 16, from which it is clear that if the threshold of the jump in current ε varied, when the manipulator was at critical touch-stopping, then the range of the fluctuation of the impact moment on the joint also varied. Under various thresholds of the jump in current, the average and standard deviation were calculated and are shown in Table 1. With an increase in the preset threshold ε, during critical touch-stopping of the manipulator, the average value of the impact moment on the flexible joint continued to increase. The amplitude of the increase was 20.1%∼41.5%, while the standard deviation decreased at a rate of 6.9%∼25.6%.   An error bar chart of the impact moment on the joint was drawn, as shown in Fig. 17. The average impact moment under the four conditions was linearly fitted, and the fitting parameters are shown in Table 2. The ratio of the impact moment T on the flexible joint to the value of the jump in current i was In practice, the value of the jump in current i can be substituted into (13) to estimate the acceptable impact moment. The smallest resolution for current detection was 10 mA, and the smallest resolution of the estimated impact moment was 2.444 × 10 −3 N·m. By consulting the relevant literature [21], [22], it was shown that the smallest impact of the superficial injury of a cucumber is 11.3 N, the smallest impact of an injured juicy peach is 18.4 N, and the smallest impact of an injured tomato was 17.4 N. The general length of the manipulator arm link is 300 mm. Therefore, the largest impact moment needed to prevent damage to plants is between 3.39 and 5.52 N·m. Manipulators with flexible joints can estimate the impact moment on the joints to limit collisions between the manipulator and plants to within a safe range. There have been many studies on obstacle avoidance for mobile manipulators [23]- [25], and this study can also help expand the space of operation of the manipulator in the automatic picking process, which provides new ideas for path planning of picking manipulators.

C. INFLUENCE OF THE COLLISION DETECTION FREQUENCY ON ESTIMATING THE IMPACT MOMENT
To determine the most appropriate collision detection frequency to estimate the impact moment, the jump in current was set to ε = 1200 mA. Then, the detection frequency of the current was varied in the range of 20∼50 Hz, and a critical collision experiment was carried out. The average curve of change in the error was drawn, as shown in Fig. 18. The stability of the estimated error in the impact moment decreased from the two sides to the middle. A frequency of 37 Hz was found to be the most appropriate for estimating the impact moment, and the average error rate was 2.25%.

D. ANALYZING THE POSITION AND MAGNITUDE OF COLLISION FORCE
If robots used in picking operations are equipped with several flexible joints of the kind described above, then the estimated impact moment on all their joints can be obtained during touch-stopping under the action of external forces. Combined with the rotational angles of all arms, the magnitude and position of the impact of collision can then be calculated.
Consider a six-degree-of-freedom picking manipulator as an example, as shown in Fig. 19. The manipulator is under impact f , which can be resolved into force f 1 , vertical to the rod, and force f 2 , horizontal to the rod. The length of the main arm OA is l 1 , that of the median arm AB is l 2 and that of the lower arm BC is l 3 . The radius of the flexible joint is r, the angle between the main arm and the horizontal is θ 1 , and the angle between the median arm and the extended line of the main arm is θ 2 . The angle between the lower arm and the extended line of the median arm is θ 3 , the distance between the action point of impact f and point A is l x , and the angle between f and its resolution force f 1 is θ 4 . Thus, the moment at point O is The moment at point A is = f cos θ 4 (l 2 cos θ 3 + l x + 2r cos θ 3 + r) −f sin θ 4 sin θ 3 (l 2 + 2r) (15) The moment at point B is If τ 1 , τ 2 and τ 3 are given, where k 1 = (l 1 + 2r) sin θ 3 + (l 2 + 2r)cosθ 3 + r k 2 = (l 2 + 2r) sin 2 θ 3 − (l 1 + 2r) sin θ 3 cos θ 3 k 3 = (l 2 + 2r) cos θ 3 + r k 4 = (l 2 + 2r) sin θ 3 (18)

V. CONCLUSION
The flexible joints proposed in this article provide new ways to protect workers and plants against a collision with the manipulator during picking operations. Using the method described in this article, the magnitude of the impact and its position can be calculated, which can help establish a protection mechanism for plants and humans. With such a mechanism, the manipulator can collide with workers and plants without the risk of damage or injury. This approach can help expand the space of operation of the manipulator during the automatic picking process. Due to limitations of time and experimental equipment, the mechanism of manipulator-plant interaction was not examined here but should be studied in future work. We will also study the path planning problem after the picking manipulator collision, along with an analysis of the relation between a protection mechanism and the operational efficiency.