Coupled Force–Position Control for Dynamic Contact Force Tracking in Uncertain Environment

: Both the position and force control of robots are needed in industrial manufacturing, such as in assembly and grinding, etc. In this paper, we concentrate on two issues. One is the system oscillation in traditional hybrid force–position control (HFPC) during switching between force and position control because the diagonal elements in the selection matrix are either 0 or 1. Another issue is the poor force-tracking performance of conventional impedance control, which depends on accurate environmental models. To address these issues, a coupled force–position control (CFPC) method is presented in this paper by combining the proposed adaptive impedance control method with a modiﬁed HFPC method. The selection matrix S of HFPC is replaced with a weighted matrix S w . A weighted matrix regulator is designed to realize smooth switching between position and force control by adjusting the matrix weights in real time, and an adaptive impedance control algorithm is proposed to improve the force-tracking performance in complex environments. To verify the feasibility of the CFPC method proposed in this paper, simulations and physical experiments were conducted. The results show that the CFPC method has the advantages of a better force-tracking performance and a smoother switching between position and force control compared to the traditional HFPC method. A grinding experiment was conducted to further compare the performances of the HFPC and CFPC methods. The roughness values of the ground plates were 0.059 µ m for the HFPC method and 0.031 µ m for the proposed CFPC method, which demonstrates that the proposed CFPC method has a better performance.


Introduction
Force and position are two typical control objects in robotic control problems. In many robotic applications, such as peg-in-hole assembly, grinding, and polishing, etc., it is necessary to control both force and position. The robot generally needs to switch frequently between a free space and a contact-manipulating space, where the robot should be compliant. This is an essential problem when designing a compliance controller that has the following advantages: it not only implements smooth changes between the force and position control modes without system oscillation and contact force overshoot but also performs excellently in terms of force tracking in complicated environment.
There are two major compliance control methods, which are impedance control and hybrid force-position control (HFPC) [1,2]. Impedance control, introduced by Hogan [3], can be used for force tracking by adjusting the dynamic relation between the motion and the contact force. This indirect force control method is widely used owing to its easy implementation and robustness [4][5][6][7]. For instance, Yang et al. [8] employed an observer in the robot joint space to estimate the interaction torque of the robot and used impedance control to adjust the position and orientation of the manipulator at the interaction points.
However, traditional impedance control depends on an accurate environmental model. The force-tracking performance is poor in an unstructured environment. To solve this problem, some researchers proposed adaptive impedance control methods by combining adaptive control with impedance control. Li et al. [9] proposed an adaptive impedance control algorithm and established a linear quadratic regulator using reinforcement learning to achieve minimum error tracking. Ikeura et al. [10] and Lee et al. [11] presented a variable impedance control method to deal with force-tracking problems in varying environment. Sheng et al. [12] presented an adaptive impedance control method for mirror milling. Mei et al. [13] proposed an adaptive unified impedance and admittance control method to solve the problem of interactions between the robot and the environment. Although the force-tracking performance improved, overshoot in the contact force is always ignored, which may damage the workpiece. Moreover, the impedance control couples force and position, force control always affects positioning accuracy [14], so impedance control cannot be applied for accurate position tracking in a free space.
Unlike impedance control, HFPC divides the robot task space into two orthogonal subspaces and controls the force and position independently [15][16][17]. Ravandi et al. [18] proposed an HFPC method that combines fuzzy logic with traditional sliding mode control to obtain precise force tracking in uncertain environments. Xie et al. [19] presented an HFPC method to achieve motion tracking and force controlling. A hybrid force-position controller based on fuzzy PID was designed to improve the quality of aviation blade grinding [20]. Anh et al. [21] proposed a hybrid force-position control algorithm based on a neural network to improve the performance of the traditional HFPC method. Although this method is robust, the diagonal elements in the selection matrix of a traditional HFPC method only have two states, i.e., 0 and 1. Consequently, when a manipulator switches from position control to force control, oscillation occurs. Furthermore, it is always difficult to judge when to switch the control mode precisely because environmental information is lacking.
Aiming to address the issues mentioned above, our goal is to design a controller that has the advantages of autonomous smooth switching between the force and position control modes, and also having good performance in terms of force tracking in complicated environments. We make some efforts, as follows: 1.
The selection matrix S of HFPC is replaced by weighted matrix S w , and a weight matrix regulator is designed to achieve automatic smooth switching between position and force control by adjusting the matrix weights in real time according to contact force feedback.

2.
An adaptive impedance controller is proposed to implement force tracking in complicated environment, and its stability is also analyzed.

3.
Combining the proposed adaptive impedance controller with the modified HFPC method, we present a coupled force-position control (CFPC) method in this paper. This method has the merits of an automatic smooth switching between the free space and the interaction manipulating space without contact force overshoot and system oscillation.
The remainder of this paper is organized as follows. In Section 2, a Kalman filter is used to estimate the contact force between the manipulator end-effector and the environment. The design of the coupled force-position controller is presented. The adaptive impedance controller is designed, and its stability is also analyzed. In Section 3, simulations and experiments are conducted to demonstrate the performance and applicability of the proposed CFPC method. Finally, a conclusion is drawn in Section 4.

Contact Force Estimation
The contact force model comprises a robot model and an environmental model. The robot model is represented by a second-order mass-spring-damper model, and the environment is represented as a rigid model, as shown in Figure 1.

Contact Force Estimation
The contact force model comprises a robot model and an environmental model. The robot model is represented by a second-order mass-spring-damper model, and the environment is represented as a rigid model, as shown in Figure 1. The implementation of the proposed CFPC method requires measuring the contact force between the manipulator end-effector and the environment. To obtain an accurate contact force from noisy measurements (the gravity of the tool has been compensated via the gravity-compensation algorithm; assuming the manipulator moves slowly, the influence of the inertia of the tool can be ignored), the Kalman filter, which is a widely applied Bayesian estimation method, is used to estimate the contact force. The state equations are given by where X and Y denote the system state vector and measurement vector, respectively; ; s F and s T represent force and torque measured by the six-axis force-torque sensor, respectively; and 0 A and 0 H are expressed as follows: The system and the measurement models can be expressed as follows: where w and v denote process noise and measurement noise, respectively. Equations (3) and (4) can be discretized as follows: where The implementation of the proposed CFPC method requires measuring the contact force between the manipulator end-effector and the environment. To obtain an accurate contact force from noisy measurements (the gravity of the tool has been compensated via the gravity-compensation algorithm; assuming the manipulator moves slowly, the influence of the inertia of the tool can be ignored), the Kalman filter, which is a widely applied Bayesian estimation method, is used to estimate the contact force. The state equations are given by .
where X and Y denote the system state vector and measurement vector, respectively; T ; F s and T s represent force and torque measured by the six-axis force-torque sensor, respectively; and A 0 and H 0 are expressed as follows: The system and the measurement models can be expressed as follows: .
where w and v denote process noise and measurement noise, respectively. Equations (3) and (4) can be discretized as follows: where A = I 6×6 I 6×6 0 6×6 I 6×6 , H = H 0 , X k represents the force signal at the k-th moment, and the iterative process of the Kalman filter is determined by the following Equations [22]: where Q, ϕ, R, P,x k , andP k denote the process noise, Kalman gain, measurement noise, covariance, predictive system sate, and predictive covariance, respectively.

CFPC Modeling
The contact process between the robot and the environment can be divided into two phases: the first phase is the robot moving in a free space, and the second phase is robot's contact with the environment. In such a contact process, the robot needs to switch from position control to force control correspondingly. The traditional HFPC method switches between force and position control using a selection matrix S in the controller. However, each diagonal element in the selection matrix of the traditional HFPC method is either 0 or 1, the system oscillates when switching from one control mode to the other, and it is always difficult to judge when to switch the control mode precisely in complex environments. To address this problem, we replaced the selection matrix S with the weighted matrix S w . The control block diagram of the proposed CFPC is shown in Figure 2. D r and F d stand for the desired trajectory and desired force, and I denotes the identity matrix. We also designed a weight matrix regulator to realize automatic smooth switching between position and force control by adjusting the matrix weights in real time according to contact force feedback. The matrix weights are adjusted in Algorithm 1. f i is the contact force between the end-effector of the manipulator and the environment, f lim is the contact force threshold, λ is the exponent that determines the transition curve of the weights and is set according to different requirements of force sensitivity, and S wi is the diagonal element of S w .

Algorithm 1. Weight Adjustment
where Q , φ , R , P , ˆk x , and ˆk P denote the process noise, Kalman gain, m ment noise, covariance, predictive system sate, and predictive covariance, respec

CFPC Modeling
The contact process between the robot and the environment can be divided i phases: the first phase is the robot moving in a free space, and the second phase is contact with the environment. In such a contact process, the robot needs to swit position control to force control correspondingly. The traditional HFPC method s between force and position control using a selection matrix S in the controller. H each diagonal element in the selection matrix of the traditional HFPC method is or 1, the system oscillates when switching from one control mode to the other, always difficult to judge when to switch the control mode precisely in complex e ments. To address this problem, we replaced the selection matrix S with the w matrix w S . The control block diagram of the proposed CFPC is shown in Figure 2.

Force Controller Design
Generally, the commercial manipulator performs position tracking excellently, so we merely focus on the force controller design. Impedance control has the advantage of an easy implementation, but its force-tracking performance is poor in complex environments, since it depends on an accurate environmental model [23]. To overcome this limitation, we propose an adaptive impedance control algorithm to improve the performance of force tracking.
where D c , F e , M, B, and K denote trajectory sent to the robot, contact force between the end-effector and environment, mass, damping, and stiffness, respectively.

Force Controller Design
Generally, the commercial manipulator performs position tracking excellently, merely focus on the force controller design. Impedance control has the advantage easy implementation, but its force-tracking performance is poor in complex env ments, since it depends on an accurate environmental model [23]. To overcome this tation, we propose an adaptive impedance control algorithm to improve the perform of force tracking. Figure 3 shows the block diagram of the proposed adaptive impedance co method. The control algorithm can be expressed as folles: Where c D , e F , M , B , and K denote trajectory sent to the robot, contact forc tween the end-effector and environment, mass, damping, and stiffness, respectively Without loss of generality, we study the one-dimensional case. Equation (12) c rewritten as follows: As the accurate environmental stiffness e k is unknown, reference trajectory difficult to obtain. Therefore, the trajectory can be replaced with the environmental tion e d [24], and Equation (13) can be expressed as follows: By letting position perturbation  Without loss of generality, we study the one-dimensional case. Equation (12) can be rewritten as follows: As the accurate environmental stiffness k e is unknown, reference trajectory d r is difficult to obtain. Therefore, the trajectory can be replaced with the environmental location d e [24], and Equation (13) can be expressed as follows: By letting position perturbation e = d c − d e , Equation (14) becomes the following: Because an error exists between the actual and the measured environmental locations, estimation should be performed. Let d e denote the estimation of the environmental location and ∆d e stand for the estimated error of the environmental location, which can be expressed as ∆d e = d e − d e . Define e = e + ∆d e ; then, Equation (15) can be rewritten as follows: where ∆d and d e are time-varying parameters, indicating the persistent force-tracking error. We propose the following adaptive impedance control algorithm: where with Q k (t) and Q b (t) being adjusted according to the force error. α and β denote the sampling period and update rate of the system, respectively.

Stability Analysis of the Force Controller
In this section, we analyze the stability of the force controller we designed in this paper. To analyze the stability of the force controller, we first substitute (18) and (19) into (17) to obtain m ..
It follows that m ..
According to the environmental model f e = k e (d e − d c ) = −k e e, we can obtain where k e denotes environmental stiffness. Upon substituting (22) into (21), we obtain −m . .
From (29), we can obtain the stability condition of the system: Assuming that n is large and that α is small, such that ∞ ∑ n=1 e −αsn = e −αs 1−e −αs , e −αs ≈ 1 − αs. Equation (30) can be rewritten as According to Routh's stability criterion, we obtain and the stable condition of the system is given as follows: The steady-state error of the stable system can be obtained by Laplace transform: Assuming that the input of the system is a step function, p(s) = 1 s ; when t → ∞ , we have lim t→∞ ( f d (t) − f e (t)) = 0. Therefore, the contact force f e between the end-effector and the environmental approaches the desired force f d as t → ∞ . This fact shows that the adaptive impedance controller designed in this paper is stable. In Section 3, We also confirm this through simulations and experiments, in which a complex input function in the system provides a tracking error close to zero.

Simulations
To verify the effectiveness and performance of the proposed controller, we used a Python implementation to simulate CFPC. We compared the force-tracking performance on a plane, a slope, and a complex surface using HFPC and CFPC. The simulation parameters are listed in Table 1

Experiments
The proposed CFPC method was also verified through physical experiments. The experimental platform mainly comprises a computer (Intel Core i7: Intel Corporation, Ubuntu 18.04, Python 2.7), robot controller, robot body (Universal Robots UR5: Universal Robots A/S Energivej 25 DK-5260, Odense, Danmark, maximum load: 5 kg, communication frequency: 125 Hz), six-axis force-torque sensor (Universal Robots NRS-6050-D80, maximum force/torque: ±500 N/±10 Nm, sampling rate: <1000 Hz, force/torque resolution: 0.015 N/0.312 × 10 −3 Nm), and signal converter. The details of the experimental platform are shown in Figure 7. To demonstrate the feasibility of the proposed CFPC method, we compared the performances of the HFPC and CFPC methods. We conducted constant force-tracking and variable force-tracking experiments on sloped, curved, and complicated surfaces, as shown in Figures 8a,b and 9. The results are shown in the Video S1. The results of forcetracking experiments on sloped, curved surfaces are shown in Figures 10-13. The constant  Figures 4a, 5a, and 6a show the variable force tracking of HFPC on the plane, sloped, and complex surfaces, respectively. While switching between position and force control, the system oscillates and an overshoot occurs for large tracking forces. Figures 4b, 5b, and 6b show the variable force tracking of the proposed CFPC method on the plane, sloped, and complex surfaces. The contact force approaches the desired force smoothly without overshoot. The results of the position tracking are shown in Figures 4c, 5c, and 6c. The positiontracking error results in a large force-tracking error in the initial phase when using HFPC. The weights of position control and force control are shown in Figures 4d, 5d, and 6d, verifying the smooth change.

Experiments
The proposed CFPC method was also verified through physical experiments. The experimental platform mainly comprises a computer (Intel Core i7: Intel Corporation, Ubuntu 18.04, Python 2.7), robot controller, robot body (Universal Robots UR5: Universal Robots A/S Energivej 25 DK-5260, Odense, Danmark, maximum load: 5 kg, communication frequency: 125 Hz), six-axis force-torque sensor (Universal Robots NRS-6050-D80, maximum force/torque: ±500 N/±10 Nm, sampling rate: <1000 Hz, force/torque resolution: 0.015 N/0.312 × 10 −3 Nm), and signal converter. The details of the experimental platform are shown in Figure 7. experimental platform mainly comprises a computer (Intel Core i7: Intel Corporation, Ub-untu 18.04, Python 2.7), robot controller, robot body (Universal Robots UR5: Universal Robots A/S Energivej 25 DK-5260, Odense, Danmark, maximum load: 5 kg, communication frequency: 125 Hz), six-axis force-torque sensor (Universal Robots NRS-6050-D80, maximum force/torque: ±500 N/±10 Nm, sampling rate: <1000 Hz, force/torque resolution: 0.015 N/0.312 × 10 −3 Nm), and signal converter. The details of the experimental platform are shown in Figure 7.  To demonstrate the feasibility of the proposed CFPC method, we compared the performances of the HFPC and CFPC methods. We conducted constant force-tracking and variable force-tracking experiments on sloped, curved, and complicated surfaces, as shown in Figures 8a,b and 9. The results are shown in the Video S1. The results of force-tracking experiments on sloped, curved surfaces are shown in Figures 10-13. The constant force and variable force-tracking experiments on sloped and curved surfaces in Figures 10a, 11a, 12a, and 13a show that the HFPC method demonstrates a large overshoot of contact forces when switching between position and force control and that system oscillation also occurs. In contrast, Figures 10b, 11b, 12b, and 13b show that the proposed CFPC method can realize smooth switching between position and force control. Figures 10d, 11d, 12d, and 13d show the smooth transition between position and force control. The results of position tracking are shown in Figures 10c, 11c, 12c, and 13c. 10a, 11a, 12a, and 13a show that the HFPC method demonstrates a large overshoot of contact forces when switching between position and force control and that system oscillation also occurs. In contrast, Figures 10b, 11b, 12b, and 13b show that the proposed CFPC method can realize smooth switching between position and force control. Figures 10d,  11d, 12d, and 13d show the smooth transition between position and force control. The results of position tracking are shown in Figures 10c, 11c, 12c, and 13c.   10a, 11a, 12a, and 13a show that the HFPC method demonstrates a large overshoot of contact forces when switching between position and force control and that system oscillation also occurs. In contrast, Figures 10b, 11b, 12b, and 13b show that the proposed CFPC method can realize smooth switching between position and force control. Figures 10d,  11d, 12d, and 13d show the smooth transition between position and force control. The results of position tracking are shown in Figures 10c, 11c, 12c, and 13c.          We also conducted this experiment in a complicated environment where the controller needs to switch frequently between the position and force control. This complicated environment includes a sloped, a curved surface, and a step surface. The experiment results are shown in Figure 14. The overshoot of contact forces and system oscillation are obvious when using HFPC, as shown in Figure 14a, because the traditional HFPC depends on accurate environmental information and we do not know exactly when to apply posi-  We also conducted this experiment in a complicated environment where the controller needs to switch frequently between the position and force control. This complicated environment includes a sloped, a curved surface, and a step surface. The experiment results are shown in Figure 14. The overshoot of contact forces and system oscillation are obvious when using HFPC, as shown in Figure 14a, because the traditional HFPC depends on accurate environmental information and we do not know exactly when to apply position or force control in complicated environments. Unlike the HFPC method, the CFPC We also conducted this experiment in a complicated environment where the controller needs to switch frequently between the position and force control. This complicated environment includes a sloped, a curved surface, and a step surface. The experiment results are shown in Figure 14. The overshoot of contact forces and system oscillation are obvious when using HFPC, as shown in Figure 14a, because the traditional HFPC depends on accurate environmental information and we do not know exactly when to apply position or force control in complicated environments. Unlike the HFPC method, the CFPC method can realize automatic smooth switching between position and force control according to the contact force feedback, and there is no overshoot of contact forces, as shown in Figure 14b. The results of position tracking are shown in Figure 14c, and the weights of position control and force control are shown in Figure 14d. Finally, we conducted a grinding experiment that changes the position contro force control during the working process to further demonstrate the performance o proposed CFPC in practical applications. The desired grinding force was set to 10 N Q235 plate with an initial roughness of 0.49 μm, and the motor speed was set to 3000 r The grinding devices is shown in Figure 8c.
The grinding force obtained using CFPC approaches the desired force smoothly ure 15b), whereas the grinding force obtained using HFPC presents an overshoot (Fi 15a). As seen from Figure 15d  Finally, we conducted a grinding experiment that changes the position control to force control during the working process to further demonstrate the performance of the proposed CFPC in practical applications. The desired grinding force was set to 10 N on a Q235 plate with an initial roughness of 0.49 µm, and the motor speed was set to 3000 rpm. The grinding devices is shown in Figure 8c.
The grinding force obtained using CFPC approaches the desired force smoothly (Figure 15b), whereas the grinding force obtained using HFPC presents an overshoot ( Figure 15a). As seen from Figure 15d, the control mode switches gradually. The results of the position tracking are shown in Figure 15c, and the grinding results are shown in Figure 16. The roughness values of the ground plates are 0.059 µm for HFPC and 0.031 µm for the proposed CFPC. The roughness is measured in the time interval [0, 8] s. The grinding experiment further demonstrates that the proposed CFPC can realize smooth switching between position and force control, which leads to better grinding performances. 15a). As seen from Figure 15d, the control mode switches gradually. The results of the position tracking are shown in Figure 15c, and the grinding results are shown in Figure  16. The roughness values of the ground plates are 0.059 μm for HFPC and 0.031 μm for the proposed CFPC. The roughness is measured in the time interval [0, 8] s. The grinding experiment further demonstrates that the proposed CFPC can realize smooth switching between position and force control, which leads to better grinding performances.

Conclusions
To realize smooth switching between a free space and a contact manipulating space, a CFPC method was proposed by combining the proposed adaptive impedance control

Conclusions
To realize smooth switching between a free space and a contact manipulating space, a CFPC method was proposed by combining the proposed adaptive impedance control method with the modified HFPC method. This control method can provide an automatic

Conclusions
To realize smooth switching between a free space and a contact manipulating space, a CFPC method was proposed by combining the proposed adaptive impedance control method with the modified HFPC method. This control method can provide an automatic smooth transition between position and force control according to the contact force feedback, thereby solving the oscillation problem of traditional HFPC. Moreover, the proposed CFPC method has good force-tracking performance in complicated environments. The stability of the force controller has also been analyzed. The feasibility of the proposed CFPC method was evaluated through constant and variable force-tracking simulations, as well as physical experiments on sloped, curved, and complicated surfaces. A grinding experiment was conducted to compare the performances of the HFPC and the proposed CFPC methods, which showed that the proposed CFPC can provide better roughness compared to the HFPC method. The simulations and experiments demonstrated that the proposed CFPC method could realize automatic smooth switching between free space and interaction space without system oscillation and contact force overshoot.
Our future work will focus on further improving the response ability of the system.