Adaptive Variable Parameter Impedance Control for Apple Harvesting Robot Compliant Picking

In order to reduce the damage of apple harvesting robot to fruits and achieve compliant picking, an adaptive variable parameter impedance control method for apple harvesting robot compliant picking is proposed in this paper. Firstly, the Burgers viscoelastic model is used to characterize the rheological properties of apples and study the variation of mechanical properties of apple grasping at different speeds. *en, a force-based impedance control system is designed. On this basis, aiming at the influence of impedance controller parameters on contact force, three impedance parameters self-tuning functions are constructed to complete the design of an improved force-based impedance control system based on the hyperbolic secant function. *e simulation and experimental results show that the proposed control makes the desired force smoother, and its overshoot is about 2.3%. *e response speed is faster, and the adjustment time of contact force is shorter of about 0.48 s. *e contact force overshoot is about 2%, which is 37.5% less than that of the traditional force-based impedance control. *is research improves the control performance for apple harvesting robot compliant picking.


Introduction
With the development of modern agriculture, harvesting robot is becoming an important area of robot application. e picking operation of harvesting robot is the key link to realize the automation and mechanization of fresh fruit and vegetable harvesting [1]. In the picking process, interaction control between the robot end-effector and the fruit is crucial to reduce the mechanical damage of fruit and successfully picking, since the robot end-effector has to contact and operate on the surface of fruit.
In order to solve the problem of rapid compliant picking, many scholars have conducted a lot of research studies, and many studies have applied impedance control to it. For example, based on the optimal control theory, the set value of the internal impedance control layer was calculated by using the external admittance control layer, and the gain of the impact model was optimized to achieve the control performance with estimated error [2]. To realize the flexible adjustment of force and position of the manipulator under high-speed clamping and achieve good tracking effect, a robust impedance control method was proposed [3]. e grasping constraint relationship between the end-effector of robot and the fruit was equivalent to a second-order impedance-admittance model. e deviation between the desired grasping force and the contact force of fruit was used as the input of the impedance controller, and the reference trajectory was corrected to form an impedance tracking control for the grasping force of the end-effector which was suitable for double-fingered grasping [4]. In free space and constraint space, position-based impedance control and force tracking control were used, respectively. A fuzzy observer was introduced to switch the two control stages. e precise position tracking of the manipulator in free space was realized, and the grasping force can be tracked accurately through a smooth transition to the constraint space [5]. ere were also other studies, such as the sliding signal detector for calculating the sliding amplitude and the grasping force setpoint generator acting on the output of the detector. e detector combined the force adjustment with sliding detection closely to adjust the grasping force accurately and achieved the purpose of grasping objects [6]. In order to study the effect of fruit-finger interaction parameters on the probability of thumb-index finger stability grip, a logistic regression model was used to reasonably predict the probability of two-finger stability grip and to analyze the grasp of two-finger force of picking robot [7]. Ba et al. designed the flexibility enhancement controller with feedforward compensator and rearranged the dynamic flexibility composition of the internal and external HDU control loops, thus improving the control accuracy. Semini et al. studied the problem of active impedance to improve the stability and usefulness of legged robots. ese research studies demonstrated the advantages and the potential of active impedance and torque-controlled robots within a series of new experiments.
To summarize, previous studies have been carried on the different aspect analysis to the robot grasping force control. However, the abovementioned research studies did not consider the influence of the mechanical characteristics of the object on grasping control and did not optimize the control model aiming at the online adjusting ability of the robot grasping object, which cannot adapt to the complex environment of apple fruit grasping. us, the objective of this study is to improve the traditional impedance control for apple harvesting robot end-effector and meet with the requirements of compliant picking. e study establishes the viscoelastic characteristics of fruit and analyzes the law of deformation in the process of grasping. On this basis, an improved force-based impedance control system is designed.
e time-varying functions of impedance controller parameters are constructed to self-tune the impedance parameters, so as to optimize the impedance control of the end-effector and achieve compliant picking. Finally, the control system simulation model and the harvesting robot experiment setup are established, respectively. e effectiveness of the proposed method is verified by simulation comparison and grasping experiments carried out on harvesting robot.

Viscoelastic Burgers Model of Apple and Parameter
Acquisition. Apple is essentially a kind of viscoelastic body with rheological characteristics. When it is loaded, it will produce flow and deformation and internal structural characteristics of the fruit had an obvious effect on the mechanical damage behavior of the tissues [10]. Applying the viscoelastic model to describe the rheological characteristics of apple can better analyze the flow and deformation characteristics of apple under load. Burgers model can represent complex rheological properties such as permanent plastic deformation, instantaneous elastic deformation, and delayed elastic deformation [11]. erefore, the classical four-element Burgers model is used to characterize the viscoelasticity of apples. e creep constitutive equation of the Burgers model is as follows [12,13]: where f is the contact force between the apple and end-effector finger (N). x is fruit deformation (mm). t is time (s). e 1 is instantaneous elastic modulus (N · mm − 1 ). e 2 is retarded elastic modulus (N · mm − 1 ). η 1 is the viscosity coefficient of series viscous elements (N · s · mm − 1 ). η 2 is the viscosity coefficient of parallel viscous elements (N · s · mm − 1 ). e uniaxial compression test under constant pressure was carried out on the 10 groups of apple samples by using a TA-XT2i/25 texture analyzer. e loading time of each group was 2000 s. After the completion of each group, the data of fruit deformation were screened and 30 data were selected. Combining equation (1), the Burgers creep model of apple under constant force is expressed as follows: After all creep experiments are completed, the data are averaged. e MATLAB fitting toolbox is used to fit the data by equation (2). e fitting results are shown in Figure 1.
e sum of variance and standard deviation of curve fitting results in Figure 1 are 0.00071 and 0.0052, respectively. e fitting results verify the validity of the selected model. e viscoelastic parameters of apples can be obtained from above. e 1 � 24.43 N · mm − 1 , e 2 � 50.88 N · mm − 1 , η 1 � 1.27e 6 N · s · mm − 1 , and η 2 � 2.03e 4 N · s · mm − 1 .

Viscoelastic Apple Grasping Model and Analysis of Its
Mechanical Properties 2.2.1. Viscoelastic Apple Grasping Model. Because apple is the spherical fruit, the globoid end-effector has better envelope in the grasping process. It can increase the contact area between the fingers of end-effector and the grasped fruit. e globoid end-effector reduces the contact pressure as well. us, the end-effector of apple harvesting robot adopts globoid double-fingered configuration [14]. e double finger end-effector of apple harvesting robot is shown in Figure 2. e end-effector is driven by a DC motor with self-locking function. e fingers opening and closing of the end-effector is driven by a constant speed mode. In the process of grasping apple, the fingers contact the apple and continue to close to deform the apple, the end-effector will not slow down, and stop closing until the output force of end-effector reaches the maximum value F 0 . erefore, the grasping process of endeffector includes three stages: the constant loading stage, the overload deceleration stage, and the stress relaxation stage.
At the constant loading stage, the fruit deformation was linearly related to time. e initial conditions are as follows: At the overload deceleration stage, the output force of the end-effector reaches the maximum of F 0 . e fruit contact force will continue to increase due to the inertia of the end-effector finger, which is greater than the output grasping force, and the fingers will slow down to stop at this At stress relaxation stage, fruit deformation did not change, and the initial condition is x 3 � 0.
According to the abovementioned conditions, combining equation (1), three stages of grasping model solutions are obtained as follows in turn: From the abovementioned equations, it is known that the variations of fruit deformation with time in the stage of constant loading and stress relaxation are x 1 � kt and x 3 � 0, respectively, where k is a constant. Next, the equation of fruit deformation during the overload deceleration stage is solved.
According to Deb et al., the discriminant of the characteristic equation of the second equation in formula (3) in the overload deceleration stage is greater than 0. erefore, by solving the characteristic equation of the second equation, one real root λ 1 and two conjugate complex roots α ± βi can be obtained. e solution of the equation is as follows.
where T � t − t 0 , and t 0 is the starting time of overload deceleration. According to the initial value condition where C 1 and C 2 are constants proportional to v 0 . Combining m e € x � F 0 − f with equation (4), the following can be obtained: By integrating equation (6), the equation of fruit deformation with time during the overload deceleration stage can be obtained:

Analysis of Mechanical Characteristics of Apple
Grasping. According to the three-stage compound dynamic model of the grasping process, we take six different grasping velocities and v 0 � 15 mm·s −1 ) for analysis. On the basis of our previous studies, the law of fruit deformation with time and the law of contact force with time under six grasping velocities were obtained [16]. us, the relationship between contact force and deformation of apple grasping in three stages is shown in Figure 3.

Complexity
In the initial constant loading stage of the fruit grasping process, the contact force is approximately proportional to the deformation. e ratio is 24.43 N/mm from the test data of contact force and deformation. In order to facilitate comparative analysis, the baseline with a slope of 24.43 is given, as shown in Figure 3. In the overload deceleration 4 Complexity stage, the relationship curve between contact force and deformation deviates from the baseline and the slope decreases continuously. At the same time, the decreasing trend increases with the increase in grasping speed. In the final stress relaxation stage, the fruit deformation does not change any more and the contact force is slowly reduced to no change due to self-locking of end-effector drive motor. e stiffness of grasping equivalent environment, which is the slope of the contact force-deformation curve, is obtained by the relationship between the contact force and deformation of fruit [17]. It is calculated by two groups of data (f j , x j ) and (f j+1 , x j+1 ), as shown in Figure 3. e j value of equivalent stiffness of fruit is . e relationship between the equivalent stiffness of grasping and fruit deformation at different grasping velocities is shown in Figure 4.
From Figure 4, it can be seen that the equivalent stiffness is about 24.43 in the constant loading stage. When the grasping process enters the overload deceleration stage, the equivalent stiffness of the environment decreases greatly in a very short time. en, it decreases very slowly in a subsequent period of time, when the equivalent stiffness can be approximately considered to remain unchanged. With the deceleration movement of the end-effector fingers, the grasping velocity becomes slower and slower, and the equivalent stiffness decreases again. Before the end-effector is about to stop, the equivalent stiffness suddenly changes and immediately decreases to nearly zero.
In this section, using the established composite dynamic equation of the grasping process, the relationship between fruit contact force and deformation is obtained. Furthermore, the change rules of the equivalent stiffness of grasping environment are analyzed. ese lay a foundation for the follow-up study of the compliant grasping control.

Harvesting Robot Grasping Experiment Setup.
e experimental platform of apple harvesting robot is shown in Figure 5. e robot mainly consists of an autonomous vehicle, a manipulator, an end-effector, the sensors, the vision system, and control system. e manipulator with 5 degrees of freedom prismatic-revolute-revolute-revolute-prismatic (PRRRP) structure is geometrically optimized to provide quasilinear behavior and to simplify the control strategy. e end-effector with the DC motor-driven gripper is designed to satisfy the requirements for harvesting apple. e harvesting robot autonomously performed its harvesting task using a vision-based module. e fruit recognition algorithm is developed to detect and locate the apple automatically. e control system, including industrial computer and servo driver, conducts the manipulator and the endeffector as it approaches and picks the apples [18]. Before grasping, the image acquisition system recognizes and processes the image of the target fruit [19,20], so as to control the end-effector to stretch out to carry out the grasping task. In the process of grasping, the contact force feedback signal between fruit and end-effector fingers is detected by using a FSR-402 force-sensitive resistance sensor. e signal is collected by data acquisition card and sent to an industrial computer. en, the grasping control task is completed by using an industrial computer. e force calibration method of FSR sensor is to use a set of standard weights to calibrate and a custom filter is designed to deal with data acquisition to improve the accuracy of calibration [21]. e transmission mechanism of the grasping system of the harvesting robot end-effector and the model of the driving system composed of reducer and DC motor are shown in Figure 6.

Grasping
In Figure 6, u c is the control voltage and n is the reduction ratio of the deceleration device. e motor rotation angle θ m is transformed into load rotation angle θ l by a deceleration device. x is the linear movement displacement of the end-effector finger after contacting the fruit. e relationship between the end-effector finger displacement x and the load rotation angle θ l is x � c · θ l /2π and c is the lead of ball screw. e kinematics equation of DC motor is as follows: where D is the viscous friction coefficient of motor, J is the inertia of motor, T o is the load torque converted to motor, T c is the unknown friction moment, and T e is the electromagnetic torque. According to Kirchhoff's law, where R is armature resistance and L is inductance. e motor electromagnetic torque equation is where i is armature current and K t is the motor's torque constant. e back EMF equation is as follows: where E is the motor back EMF and K b is the back EMF constant. e power amplifier equation is where u m is the armature voltage of the motor and K s is power amplification factor. e driving link is where T l is the actual load torque and T n is the load torque converted to the motor end. In general, the inductance L of DC motor is very small, so let L � 0. e general secondorder model of the end-effector can be obtained from (8) 6 Complexity and ζ 0 � (T Coul + (T n /n))/Jn. A and B are system gain, u c is system input, Q is actual load torque, and Q � cθ l . ζ 0 is a constant disturbance because the controller is required to be robust to ζ 0 ; let ξ 0 � 0. e transfer function of equation (14) is obtained by Laplace transformation.
According to Ji et al., the motor back EMF constant K b � 0.7, motor torque constant K t � 0.9, motor armature resistance R � 1.5 Ω, power amplification factor K s � 50, motor inertia J � 0.1 kg·m 2 , motor viscous friction coefficient D � 0.38, gear reduction ratio n � 50, and the lead of ball screw is 3.14 mm. erefore, the mathematical model of the end-effector is as follows:

Grasping Force Impedance Control Strategy.
In the grasping process of the end-effector, apple is subjected to the grasping force to produce contact force and deformation. e deformation is equivalent to the forward displacement of the end-effector fingers and acts as the desired position input of the control system. e traditional impedance control can make the force and position achieve a good dynamic relationship [23]. According to the analysis in reference [16], when the grasping velocity is greater than 3 mm·s −1 , the apple skin will undergo plastic deformation. Considering the real-time performance of the robot grasping fruits, the grasping velocity of 3 mm·s −1 is selected. rough the solution and analysis in Section 2.2.2, the deformation, deformation velocity, and deformation acceleration of apple under grasping, i.e., the desired position, desired velocity, and desired acceleration, are obtained, as shown in Figure 7.
e force/position control system in the grasping process is modeled as an impedance model of the second-order differential equation of mass-damp-spring [24]. e relationship between the end position of end-effector and the contact force is adjusted by tuning the impedance controller parameters. Taking the end-effector of double fingers structure with single degree of freedom as an example, the force-based impedance equation is as follows [25]: where m d , b d , and k d are inertia, damping, and stiffness parameters of impedance controller, respectively. Choosing appropriate impedance parameters can make the end-effector fingers to touch apple quickly and smoothly, which ensures the compliance of clamping apple [26]. According to the impedance relationship of equation (17), the force-based impedance control block diagram is obtained, as shown in Figure 8.
In Figure 8, _ x d and € x d represent the desired velocity and acceleration of end-effector (mm·s −1 and mm·s −2 ). _ x and € x represent the actual velocity and acceleration of end-effector (mm·s −1 and mm·s −2 ). x e is the environmental location (mm). e outer loop inputs the actual trajectory and the desired trajectory of the end-effector into the impedance model to obtain the desired force. e inner loop takes the error between the desired force and the actual contact force as the input. e input is adjusted by PID. Finally, according to the mathematical model of the end-effector, the output of the actual position is obtained.
As shown in Figure 9, the grasping environment is a new second-order system formed when the end-effector fingers contact with the apple. It includes the impedance characteristics of both the fruit and the end-effector systems. In Figure 9, m e , b e , and k e represent the inertia, damping, and stiffness parameters of the environmental model, respectively.  When the end-effector fingers touch the apple, the apple will be deformed by extrusion. According to the principle of impedance, the deformation of apple will produce contact force F e . Let △x � x − x e because the change rate of △x is very small and usually takes m e △ € x ≈ 0, b e △ _ x ≈ 0. e grasping environment contact force model caused by fruit deformation is equivalent to a first-order model [27].
where k e is the stiffness of fruit (N/mm). However, as can be seen from the analysis in the preceding section, because of the larger equivalent stiffness of grasping environment, the smaller position error will lead to great contact force deviation. Besides, the environmental stiffness and location parameter are also uncertain [28]. Due to the different grasping objects, there is no systematic method to measure the environmental parameters. For reducing the influence of environmental parameter uncertainties on the impedance controller performance of end- e variance and standard deviation of fitting results are 0.03576 and 0.03152, respectively.

Self-Tuning of Impedance Control Parameters.
According to the impedance control diagram shown in Figure 8 and the overall mathematical model of the endeffector, the control performance is tested by taking into account the overshoot, response speed, adjustment time, and steady-state error. e parameters of the impedance controller are set as fixed values at first. According to the principle of determining and adjusting impedance parameters m d , b d , and k d [29], taking the grasping control of apple harvesting robot in our laboratory as an example, the fixed impedance parameters are set as follows: the inertia parameter m d � 0.05 N·s·mm −2 , damping parameter b d � 1.5 N·s·mm −1 , and stiffness parameter k d � 15 N·mm −1 . e environmental location is 5 mm. e parameters of PID controller, which are determined by the trial and error method, are proportional parameter K p � 2.68 and integral parameter K i � 5.03. Because the introduction of differential parameters may reduce the control system accuracy in the case of disturbance, take K d � 0. By substituting the fixed parameters into the system, the compliant grasping control of fruits can be achieved by combining the grasping environment and the mathematical model of the endeffector.
However, due to the unknown and uncertain complex environment information, the fixed parameters impedance controller does not have good adjustment ability [30]. erefore, it is necessary to study the method of impedance parameters self-tuning. e influence of different impedance control parameters on the output force will be analyzed in following sections. e variation functions of inertia, damping, and stiffness parameters are constructed so that the contact force can track the desired force more quickly and effectively.
(1) Design of the Inertia Parameter m d Self-Tuning Function. Fix the damping and stiffness parameters of the impedance controller; let b d � 1.5, k d � 15, and m d equals 0.005, 0.05, and 0.15, respectively. e contact force curves of the force-based impedance control system with different inertia parameters m d are shown in Figure 11. As shown in Figure 11, with the increase of inertia parameter m d from 0.005 to 0.15, the response speed of contact force increases and the time reached the peak value becomes less and less. When the inertia parameters become larger, the overshoot of contact force increases. Meanwhile, too large inertia parameters cause the output contact force to oscillate, while too small inertia parameters increase the peak time. us, when adjusting the inertia parameter of impedance controller, the desired inertia parameter should be selected without causing the oscillation of the contact force, and it should make the contact force have faster response speed and smaller overshoot.
According to the abovementioned analysis, the designed nonlinear function of the inertial parameter is as follows: where t is the simulation time, a m , b m , and c m are the coefficients of the inertial parameter nonlinear function. When t � 0, the inertia parameter takes maximum a m . When t tends to infinity, the inertia parameter takes minimum a m − b m . c m is used to adjust the change rate of inertia parameter. sec h(x) � 2/(e x + e −x ) is a hyperbolic secant function. Inertia parameter is large at first, and the response speed is fast. With the grasping process, the inertia parameter is quickly stabilized to the smaller value, which makes the overshoot of contact force as small as possible.
(2) Design of the Damping Parameter b d Self-Tuning Function. Fix the inertia and stiffness parameters of the impedance controller and analyze the influence of the change of damping parameter on the output contact force f e . Let m d � 0.05, k d � 15, and b d equals 0.25, 1.5, and 3.5, respectively. e contact force output of the force-based impedance control system with different damping parameters b d is shown in Figure 12. According to Figure 12, when the inertia and stiffness parameters are fixed, too small damping parameter will cause the oscillation of contact force and the adjusting time will increase. However, the contact force can still track the desired force eventually. When the value of damping parameter increases, the overshoot of contact force decreases and the response speed decreases. It can be seen that the value of b d should not only ensure the avoidance of  contact force oscillation but also enable the system to have a smaller overshoot and faster response speed. Based on the abovementioned analysis, the nonlinear function of the damping parameter is designed as follow: where a b , b b , and c b are the coefficients of the damping parameter nonlinear function. When t � 0, the minimum value of the damping parameter is a b . When t tends to infinity, the maximum value of the damping parameter is a b + b b . c b is used to adjust the change rate of damping parameters. e initial value of damping parameter is selected to make the initial response speed faster and avoid oscillation. en, the damping parameter is reduced to obtain better reverse regulation performance.

(3) Design of the Stiffness Parameter k d Self-Tuning Function.
Fix the inertia and damping parameters of the impedance controller, and analyze the influence of stiffness parameter on the output contact force. Let m d � 0.05, b d � 1.5, and k d equals 3, 15, and 30, respectively. e contact force output of the force-based impedance control system with different stiffness parameters m d is shown in Figure 13. According to Figure 13, the final stability values of contact force are different under different stiffness parameters. e greater the stiffness parameter, the greater the contact force stability. It shows that the stiffness parameter determines the desired output force of outer loop impedance controller in control system. When the stiffness parameter is small, the final contact force is about 2.34 N, the overshoot is about 74%, and the peak time is about 0.27 s. When the stiffness parameter is large, the contact force is stable at 11.22 N. e contact force reached its peak at 0.42 s is about 11.21 N. It can be seen that with the increase of stiffness parameter, the contact force and the peak time all increase, but the response speed is fast and the overshoot decreases significantly.
According to the abovementioned analysis, the stiffness parameter should guarantee the response speed of contact force at the beginning. en, it reduces to keep the contact force at the final stable value. Consequently, the designed nonlinear function of the stiffness parameter is as follows: where a k , b k , and c k are the coefficients of the stiffness parameter nonlinear function. Substituting equations (20)- (22) into equation (17), we get a new impedance control equation, e second-order transfer function of the impedance model is obtained by Laplace transform: e improved impedance control model is simulated below.

Analysis of Force-Based Impedance Control Simulation
Results. To verify the effectiveness and rapidity of forcebased impedance control in tracking desired grasping force, a simulation model of the apple grasping control system with uniform end-effector speed, as shown in Figure 14, is built in SIMULINK. In Figure 14, the grasping environment contact force model is a function represented by equation (19). e force controller is composed of the PID algorithm and the end-effector transfer function.

Traditional Impedance Control with Fixed Parameters.
e simulation results of the grasping force impedance control with fixed parameters given in Section 2.4.3 are shown in Figure 15.
From Figure 15(a), it can be seen that the desired force calculated by the impedance controller according to the desired position, velocity, and acceleration fluctuates greatly in the initial stage. After that, the change of desired force is relatively smooth. It is a peak at 0.42 s, which is about 8.21 N, and finally stabilize at 7.97 N. Under the force controller, the contact force reaches its peak value at 0.36 s and the overshoot is about 3.2%. en, it converges rapidly and tends to be stable. Here, the force error is equal to 0. It shows that the designed impedance controller has good real-time performance and no jitter. e force controller enables the contact force to track the desired force quickly and low overshoot. rough the two curves of actual position change rate and actual position change acceleration, the change of actual position in the simulation process can be observed more clearly. In the initial stage, the actual position changes rapidly and reaches the maximum speed of 1.77 mm·s −1 at 0.13 s. e end-effector finger's forward acceleration is 0 mm·s −2 . en, the finger begins to decelerate, and the increase in the amount of finger position begins to slow down until it reaches a maximum. Due to the overshoot of contact force, the controller adjusts backward. When the actual position change rate reaches zero again, the actual position reaches the first trough.
e value is about 0.33 mm. After an   Complexity acceleration and deceleration movement, the actual position of the end-effector finger is stable and the grasping process is completed.

Improved Impedance Control with Self-Tuning
Parameters. Simulation is performed using the model in Figure 14 according to equations (20)- (22). According to the analysis of the influence of impedance parameters on contact force and the properties of hyperbolic sec h(x) in Section 2.4.3, the designed nonlinear function ensures that the contact force has a faster initial response speed and a smaller overshoot and can avoid oscillation, so as to achieve stability. en, the coefficients a m and a k are larger, and a b is smaller, i.e., a m � 0.05, a b � 1.5, and a k � 20. e coefficients b m � 0.04, b b � 0.2, and b k � 15. To ensure that the parameters of the nonlinear functions have a faster change rate, the coefficients c m � 20, c b � 20, and c k � 20. e simulation results based on improved impedance control are shown in Figure 16.
As shown in Figure 16(a), the desired force of improved impedance control is smoother and the overshoot is about 2.3%. Meanwhile, the peak time is smaller, and the response speed is faster than the traditional impedance control. However, there is a sudden change at 0.4 s. e peak value of the desired force is about 8.3 N, which is larger than that of traditional impedance control. e desired force finally stabilizes at 7.97 N. ere is a peak value of contact force at 0.36 s and the overshoot is 2%. en, the contact force converges rapidly and tends to be stable. At this time, the force error is equal to 0. Figure 16(b) is a comparison curve of contact force and force error under two impedance control methods. Compared with the traditional impedance controller, the improved impedance controller can make the contact force curve smoother and reduces overshoot by 37.5% under the same conditions. e error fluctuation of contact force and desired force is smaller. e adjustment time of contact force is shorter, which is reduced to 0.48 s. Its compliant control performance is superior to that of traditional impedance control. Under the action of the inner-loop force controller, the contact force can still achieve smooth tracking for desired force even if there is the sudden change of desired force. e improved impedance control method is proposed for the contact force control in this paper. First, the system input, which is the desired position, is obtained according to the change of fruit deformation with time. Second, aiming at the shortcomings of the traditional first-order model of grasping environment, the grasping environment contact force model is re-established. Finally, aiming at the problem of traditional fixed impedance parameters, the nonlinear function of self-tuning impedance parameters is designed to guarantee that the control system can be better adjusted.

Analysis of End-Effector Grasping Experiment Results.
To verify the performance of the proposed method, the closed-loop grasping experiments are carried out using the traditional impedance control and the improved impedance control, respectively. e grasping experimental platform for harvesting robot is shown in Figure 5. e curves of contact force varying with time during grasping process are obtained, as shown in Figure 17. It can be seen that the endeffector is initially in free space, the time at which the endeffector does not touch the apple and the contact force is 0. When contact occurs, the end-effector moves into the constrained space. At this moment, the designed impedance control algorithm starts to work and adjust the output torque of motor. So, the contact force can track the desired force quickly. When the contact force is stable, the host computer will send the signal of cutting fruit stalk and then issues command to make manipulator move to the designated position. Finally, the motor is driven to reverse and the end-effector releases the apple.
By comparing the experimental curves of the two control methods in Figure 17, it can be found that the contact force curves of the traditional impedance control and the improved impedance control almost reach the peak at 0.64 s, and they are 8.384 N and 8.140 N, respectively. Also, the adjustment time of contact force is basically the same. However, the overshoot of traditional impedance controller is about 3.7%. e overshoot of improved impedance controller is about 1.7%, and the contact force overshoot is significantly reduced. Meanwhile, the contact force of traditional impedance control fluctuates between 7.744 and 8.141 N. While the contact force curve of improved impedance control fluctuates less, between 7.872 and 8.084 N. e improved impedance control fluctuate is about 46% less than that of the traditional one. e contact force changes more smoothly and stably. e improved impedance controller is more suitable for grasping control of picking robot.
When the contact force data of the closed-loop grasping test are collected, there is a slight deviation between the final stability value of each contact force curve and the simulation result of MATLAB. In order to analyze the stability performance of two impedance controllers mentioned above and ensure the stability of the harvesting robot, ten times grasping experiments are carried out on the same apple using two control methods. Set the force measured before release as stable contact force, and the contact force data of grasp test with traditional impedance control method is shown in Table 1.
Similarly, the improved impedance control method is used to carry out the grasp test, and the corresponding contact force data is shown in Table 2.
By analyzing the data in tables 1 and 2, it can be found that the deviation between the contact force obtained by the improved impedance control and the desired force obtained by the simulation is small. e maximum deviation is 9.4%, the minimum deviation is 3.3%, and the average deviation value is 0.465 N. e maximum and minimum deviations of contact force and desired force measured by traditional impedance control are 11% and 6.2%, and the average deviation value is 0.637 N. e average deviation is 27% larger than the one measured by improved impedance control.

Discussion.
According to the results of the abovementioned simulation and experiment, the author's original intention of this research is further verified. e compliant grasping control of the harvesting robot is realized. Regarding the simulation results of Figure 16(a), by self-tuning of the impedance control parameters, the contact force can quickly respond and track the desired force. It finally reaches a stable value.
is shows that the improved impedance control and the desired input obtained by fruit mechanical characteristics both have an effect in the grasping process. e effect is more apparent in the comparison of improved impedance control and traditional impedance control in   Figure 16(b). e improved contact force overshoot is reduced by 37.5% compared with the traditional one, and the force tracking error is much smaller. It greatly improves the disadvantages of traditional impedance control. Based on the simulation results, a fruit grasp test was carried out. According to Figure 17, it can be seen that the improved impedance control has a significant effect on the improvement of contact force. Its overshoot has been reduced by approximately 53% compared to the traditional impedance control. e improved contact force fluctuation is smaller, and it is also reduced by about 46% compared with the previous one.
rough the comparison between Tables 1 and 2, it can also be found that under the improved impedance control, the force average deviation is smaller.
e results show that after the self-tuning parameters impedance control is applied to the picking robot, the online adjustment ability of the object is effectively improved and the contact force is well controlled. is means that the fruit can be better protected from damage when being grasped. e improved impedance control method, which has better stability and better compliance control performance, is more suitable for grasping control of picking robot. e research results can provide a reference for the compliance control method of apple harvesting robot.

Conclusions
e four-element Burgers model is used to describe the rheological characteristics of apples and the relationship between contact force, and time is established at each stage of the grasping process. Combining viscoelastic parameters and initial grasping speed, the relationship between fruit contact force and deformation and the equivalent stiffness of grasping environment during grasping operation are obtained, respectively. e force-based impedance control system is designed. e desired position, velocity, and acceleration are obtained according to the law of fruit mechanical properties. e grasping environment contact force model is established to avoid the errors caused by the firstorder environment model. Aiming at the influence of inertia, damping, and stiffness parameters of impedance controller on system overshoot and response time, three time-varying functions of parameters are constructed. en, an improved impedance control system is obtained. e effects of fixed parameter traditional impedance control and self-tuning parameters improved impedance control are compared by simulation analysis. e contact force overshoot obtained by traditional impedance control is about 3.2%. en, it can converge quickly and tend to be stable and the force error will fluctuate greatly at the beginning, which equals 0 with the stability of the contact force. e contact force of improved impedance control has shorter adjusting time and smaller overshoot, which is about 2% and 37.5% less. e fluctuation of force error is obviously reduced. e experimental results also show that the actual contact force overshoot obtained by the improved impedance control is about 1.7%. e average deviation of contact force is 0.465 N, which is 27% less than the traditional impedance control, and the fluctuation of force error is 46% less. e performance of improved impedance control for robot compliant picking is greatly enhanced compared with the traditional impedance control.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.