1 Introduction

Robot arms are being used instead of human labor to accomplish various tasks that are depicted by hazards [1, 2], repetitive work [3], and operations requiring high accuracy [4, 5]. These points have attracted researchers to study the contact force of the robot and a specified environment [6]. The contact force is critical in the finishing of manufactured products, requiring high accuracy, high quality [7], and safety during operation [8, 9]. In addition, two essential parameters are used to achieve accurate contact force: position and the stiffness of the environment [10]. Most modern robot arms are designed with no issue in position tracking, but they cannot identify the stiffness of the environment [11, 12]. Practically, identifying the online stiffness of the environment is considered effective for accurate and stable interaction [10, 13]. However, the constant admittance controller is ineffective at force tracking [14], and, therefore, inaccurate during interaction operations, such as a polishing process [15], especially on curved and complex surfaces.

Significant research has been conducted on admittance controller methods to improve the accuracy of contact force during robotic operations. For example, Duan et al. [14] investigated accurate positioning and contact force through an asymmetrical adaptive variable admittance controller for dual-arm cooperative manipulators. The accuracy of this controller was validated using simulation and experimental studies. Similarly, Li et al. [16] presented an adaptive admittance controller based on fuzzy control to solve the problem of the constant admittance controller in obtaining accurate positioning and desired contact force. Simulations and experimental tests were carried out in different environments to establish the contact force performance of this controller. Jung and Jeoing [17] proposed an admittance force controller technique using force tracking impedance functions to obtain accurate contact force and enhance the control of a robotic manipulator’s position.

In other research, Roveda and Piga [18] offered a sensorless model to approximate the contact force and stiffness of the environment. An estimated contact force was used, so the sensorless robot could accomplish interaction operations. Furthermore, environment stiffness approximation could perform compensations, tuning the impedance parameters and achieving stability. The polishing test was conducted to validate the presented method.

In another study, Jung and Seul [19] proposed the position-based admittance control scheme for a robot manipulator derived from the traditional admittance controller that produced desired force tracking for unknown environments. Simulation tests of force control for a robot arm were conducted to validate this method. In addition, Mao et al. [20] developed an online environment stiffness identification approach for an interaction operation applied to a five-degree-of-freedom (5DOF) robot arm based on a variable impedance controller. The results of the experiments indicated that the proposed method was excellent.

Liu et al. [21] suggested a force control technique by assessing the brief force response, maximum overshoot, and steady-state error. This controller combined the active disturbance and the adaptive fuzzy proportional-derivative controller to develop an admittance control scheme. The results of the presented controller were obtained successfully through simulations and experimental tests of a six-axis robot arm with fewer errors. In an underwater study, Cieślak and Ridao [22] presented a controller approach for underwater manipulator equipment to track the end-effector position and applied force during a swimming task. The key property of this method was mixing a kinematic scheme with force based on an admittance controller.

Xu et al. [8] discussed the adaptive admittance control method based on quadratic programming as an optimization method to obtain desired force; this technique was used to apply to a multi-DOF manipulator. Additionally, Li et al. [23] proposed a variable admittance controller based on an adaptive control system to create a variable stiffness with humans and a dynamic environment. The experiments were performed to validate this controller.

In addition, Ramírez-Vera et al. [24] presented an impedance controller method for robotic arms using limited inputs to obtain stable interaction between the human and robot. They mentioned that the human–robot interaction in this approach was designed in joint space to avoid singularity problems. In similar research, Dimeas and Aspragathos [25] suggested variable admittance controller human–robot interaction cooperation by incorporating the decision-making of humans and adaptive control. A fuzzy system was developed from the measured speed and the contact force used by an operator to adjust the online damping.

The above-mentioned studies mainly focused on designing modified traditional admittance controllers to enhance accuracy when robots are in contact with an unknown environment. In particular, they determined accurate contact force according to their proposed methodologies with a constant admittance controller. Still, the environmental stiffness was estimated inaccurately. Unlike the above methods and motivated by this point, we propose a simple and effective an online identification admittance approach to solve the problem of inaccurate position and contact force, then apply it to the polishing process. Our current method is considered a modification of a constant admittance controller based on combining an online environment stiffness and damping law parameters. An essential benefit of this approach is to help those interested in the force feedback control field to overcome this problem with easy computational processes, especially in practice.

This paper aims to present a novel methodology to produce accurate contact force based on an online environment stiffness identification and damping law compensation with an admittance controller. This method can help to achieve stable interaction during contact operations such as the polishing process. Previous studies on variable admittance controllers depended on assuming the environment stiffness was high, leading to inaccurate contact force. In contrast, in this study, this value is calculated online as an absolute value to achieve a more accurate contact force.

The control scheme of this method depends on assigning constant admittance controller parameters with appropriate values to achieve good position tracking: first, calculating environmental stiffness online based on the robot stiffness to maintain accurate position tracking; then determining the damping law based on reference velocity and merging these units to maintain an accurate contact force.

The rest of this study is organized as: Sect. 2 provides a brief description of the admittance controller and dynamic system. Then, the scheme of the online environment stiffness identification method is described in Sect. 3. Next, Sect. 4 describes the simulations studies. The experimental validation is presented in Sect. 5, and in Sect. 6 a comparative study is considered. Finally, a conclusions are explained in Sect. 7.

2 Robot–Environment Modeling

In this section, a description of a robot–environment interaction and contact force modeling are presented.

2.1 Admittance Dynamic Model

Generally, the modeling of the robot manipulator in joint space can be expressed by [26].

$$\begin{aligned} {V(w)\ddot{w} + Y(w,\dot{w})\dot{w} + Z(w) + {\sigma _{f}}(\dot{w}) = \sigma - {\sigma _{e}}} \end{aligned}$$
(1)

where a vectors w, \( \dot{w} \), \(\ddot{w} \) are the angular displacement, velocity, and acceleration, respectively. A symbol V(w) is positive symmetric an inertia matrix, \( Y(w,\dot{w}) \) is Coriolis/centrifugal torques vector, and Z(w) is gravity torque. Where \( {\sigma _{f}} \) is friction force vector, \( \sigma \) is torque vector and \( {\sigma _{e}} \) is external disturbance torques vector. Assume \( Y(w,\dot{w})\dot{w} + Z(w) = u(w,\dot{w}) \) then Eq. 1 can be rewritten as

$$\begin{aligned} V(w)\ddot{w} + u(w,\dot{w}) + {\sigma _{f}}(\dot{w}) = \sigma - {\sigma _{e}} \end{aligned}$$
(2)

The joint space and Cartesian space relationship can be described as

$$\begin{aligned} \dot{X} = J(w)\dot{w}\ \end{aligned}$$
(3)

where J(w) is Jacobian matrix, and by taking derivative of Eq. 3 an acceleration in Cartesian space can be formulated as

$$\begin{aligned} \ddot{X} = J(w)\ddot{w} + \dot{J}\dot{w}\ \end{aligned}$$
(4)

Equation 4 can be rewritten in joint space by the following term

$$\begin{aligned} \ddot{w} = J{(w)^{ - 1}}(\ddot{X} - \dot{J}\dot{w}) \end{aligned}$$
(5)

by substituting Eq. 5 in Eq. 1 yield

$$\begin{aligned} \begin{array}{l} V(w)J{(w)^{ - 1}}(\ddot{X} - \dot{J}\dot{w}) + Y(w,\dot{w})\dot{w}\\ \quad +\, Z(w) + {\sigma _{f}}(\dot{w}) = \sigma - {\sigma _{e}} \end{array} \end{aligned}$$
(6)

The desired force and a actual torque are described by: \( \tau = {J^T}{F_{d}} \) , and then, Eq. 6 can be re-described as

$$\begin{aligned} \begin{array}{l} {J^{ - T}}V(w){J^{ - 1}}\ddot{X} - {J^{ - T}}V(w){J^{ - 1}}\dot{J}\dot{w} + \\ {J^{ - T}}Y(w,\dot{w}) + {J^{ - T}}{\tau _{f}}(\dot{w}) = {F_{d}} - {F_{e}} \end{array} \end{aligned}$$
(7)

By using the above relationships, the dynamic model in Cartesian space is described as

$$\begin{aligned} {} {} {} \hat{V} \ddot{X} + \hat{u} +{F_{\hat{f}}}= F_{d} - {F_{e}} \end{aligned}$$
(8)

where \({} {} {} \hat{V} = \frac{V}{{{J^T}J}}{} {},{} {} {} \hat{u} = \frac{Y}{{{J^T}}} - V\frac{{\dot{J}}}{J}{\dot{X} },{} {} {} {} {F_{\hat{f}}} = \frac{1}{{{J^T}}}{\sigma _{f}}\); \(F_{d}\) is desired force and \( {F_{e}} \) is actual contact force by ignoring Cartesian space friction force, Eq. 8 can be written as

$$\begin{aligned} {F_{d}} = \mathop {\hat{V}} \ddot{X} + \mathop {\hat{u}} + {F_{e}} \end{aligned}$$
(9)

The dynamic system of a robot and work-object can be expressed by mechanical admittance model. The main idea is to adjust it in order to controlling contact force and tracking position using appropriate admittance parameters values [27]. This formula can be described as \(\dot{X} = {Z^{ - 1}}{F_{d}}\), where Z is mechanical admittance and \( \dot{X} \) is the velocity of the end-effector. Its often described by mechanical second-order system of: \(Z = \frac{K_r}{X} + B_r + M_r{\dot{X}}\) where \(K_r\),\(B_r\), and \(M_r\) are represent stiffness, damping and inertia of the robot, respectively; then applied force can be formulated as

$$\begin{aligned} F_{e} = M_r{ \ddot{X} } + B_r{\dot{X}} + K_r X \end{aligned}$$
(10)

Substituting Eq. 9 in Eq. 10, we can get:

$$\begin{aligned} M_r{{ \ddot{X}}} + B_r{\dot{X} } + K_r X - {F_{d}} = \hat{V} \ddot{X} + \hat{u} \end{aligned}$$
(11)

Assume that \(\hat{V} = \hat{u} = 0\); then combining of Eqs. 11 and 9 yields \( F_{d}-F_{e}=0 \). While the robot is described by the (mass–damper–spring) system, an environment is described using spring as shown in Fig. 1.

Because \(\hat{V}, \hat{u} \) cannot equal zero simultaneously in an actual environment, the ideal admittance relationship cannot achieving. Therefore, the admittance force control is not robust in practice, so to solving this problem through a force deviation, \( \delta F=F_{e}-F_{d} \). Then it can be expressed as

$$\begin{aligned} \delta F = {M_r}\delta \ddot{X} + {B_r}\delta \dot{X} + {K_r}\delta X \end{aligned}$$
(12)

where corrected trajectory \( \delta X=X_t-X_{d} \) and X\( _t \), \( X _{d} \) are transmitted and desired position, receptively as shown in Fig. 2.

Fig. 1
figure 1

Contact model between robot manipulator and the environment

Fig. 2
figure 2

Schematic diagram of a force and position-based admittance control

Due to its simplicity, the position control-based admittance methodology is utilized in compliant control. The constant admittance controller consists of the position control system that is utilized to calculate the required position and the admittance control unit to track force [28, 29]. Desired contact force can be controlled by adjusting admittance parameters and then determining location and stiffness of environment. This study considers a curved and complex surface as an environment of a robot, and therefore, obtaining an accurate position and contact force is a challenge.

Figure 2 shows a position-based admittance control system. The admittance part calculates \(\delta X\) in order to maintain accurate \({X_t}\). Therefore, the admittance parameters are determined according to this relationship: \(\delta F = (F_{e} - F_{d})\). An inverse kinematic is used to converts from Cartesian to joint space [30]. While position control system is used to adjust desired trajectory. The forward kinematics part is used to return again to Cartesian space. Equation 12 can be re-described as

$$\begin{aligned} \delta F = {M_r}({\ddot{X}_t} - {\ddot{X}_{d}}) + {B_r}({\dot{X}_t} - {\dot{X}_{d}}) + {K_r}({X_t} - {X_{d}}) \end{aligned}$$
(13)

Then, the admittance control input \( \ddot{X}_t \) is given by

$$\begin{aligned} \ddot{X}_t = {\ddot{X}_{d}} + {M_r^{ - 1}}[{ \delta F} - {B_r}({\dot{X}_t} - {\dot{X}_{d}}) - K_r({X_t} - {X_{d}})] \end{aligned}$$
(14)

3 Designing Proposed Controller

This section presents controller design co-operated with Sect. 2.1.

3.1 Online Environment Stiffness

This section calculates an online environment stiffness to allow the robot end-effector to control position tracking accurately. First, this paper calculates the environment online stiffness throughout an interaction with selected robot stiffnesses of 0.6–1.75 N/m. The robot should have a low stiffness value, which was assumed as absolute zero by previous works [11, 12]. With its adjustment and robustness flexibility, variable stiffness technology has been developed and applied to robots’ interactions with the environment. In this study, we assume Z-dimensions when the robot interacts with the environment to consider the parameters in Eq. 13 as scalar. In this case, the force error should be eliminated, while the environment is considered a rigid body. Then, the actual contact force is described according to Fig. 2 as

$$\begin{aligned} {F_{e}} = {K_{e}}({X_{e}} - {X_{a}}) \end{aligned}$$
(15)

where \( K_{e} \) is nominal environment stiffness and \( X_{e} \) is environment location; let assume the robot has a perfect model, then, \({X_{a}}\) is equal of \({X_t}\). Then, substitute \({X_{a}}\) = \({X_t}\) in Eq. 15 and combining it with Eq. 12, we can get

$$\begin{aligned} {K_{e}}({X_{e}} - {X_t})-F_{d}= {M_r}\delta \ddot{X} + {B_r}\delta \dot{X} + {K_r}\delta X \end{aligned}$$
(16)

Considering position error for Eq. 16, then it can be described as

$$\begin{aligned} {K_{e}}({X_{e}} - {X_{d}}) - {K_{e}}({X_t} - {X_{d}}) = {K_r}({X_t} - {X_{d}}) \end{aligned}$$
(17)

The steady position error \( e_{ss}^p \) of a manipulator is \( (\delta X) \), then can be formulated as

$$\begin{aligned} {K_r}e_{ss}^p = {K_{e}}({X_{e}} - {X_{d}}) - {K_{e}}e_{ss}^p \end{aligned}$$
(18)

Equation 18 can be re-described as

$$\begin{aligned} e_{ss}^p = \frac{{{K_{e}}({X_{e}} - {X_{d}})}}{{{K_r} + {K_{e}}}} \end{aligned}$$
(19)

Based on the \( e_{ss}^p \), \( F_{d} \), the \( K_r \) value can be obtained as

$$\begin{aligned} \begin{array}{l} {K_r} = ({F_{d}})/({X_t} - {X_{d}}) \\ \quad = ( {F_{d}})/e_{ss}^p = \frac{{{F_{d}}({K_r} + {K_{e}})}}{{{K_{e}}({X_{e}} - {X_{d}})}} \end{array} \end{aligned}$$
(20)

From Eq. 20, estimated environment stiffness is calculated as

(21)

where is estimated stiffness; as known \( {K_{e}} \gg {K_r} \) based on the force error; therefore, stiffness as ratio must be calculated as \( \frac{{{K_{e}}}}{{{K_r}}} \gg 1 \). So, the online stiffness according to Fig. 3 can be determined as

(22)

\( K_{e}^* \) is considered an online stiffness of environment, where \( K_{e} \) is generally assumed as a high values regarding to robot stiffness.

Fig. 3
figure 3

Schematic diagram of online identification admittance controller

3.2 Compensation Damping Law

The second step is calculating damping control law in order to eliminate force error. To reduce force error to zero, this paper suggests reference damping force based on the actual velocity. Through the simulation studies noticed that actual force relies on exact \( B_r \) and the real \( {\dot{X}_{d}} \) are equal to a force error. Then modified force tracking error can be written as

$$\begin{aligned} \delta {{F'}} = {F_{d}} - F_{e}^* + {B_r}{\dot{X}_{d}} \end{aligned}$$
(23)

Equation 23 can be rewritten as

$$\begin{aligned} \delta F' = {F_{d}}-{{K_{e}^*}}({X_{e}} - {X_t})+ {{B_r}{\dot{X}_{d}}} \end{aligned}$$
(24)

The modification of admittance model in discrete formula can be obtained as

$$\begin{aligned} \left\{ \begin{array}{l} {{\ddot{X}}_t}(t) = {{\ddot{X}}_{d}}(t) + {1 / {{M_r}}}(\delta F'(t) - \\ {B_r}({{\dot{X}}_t}(t - 1) - 2{{\dot{X}}_{d}}(t))- K_r X_{d}(t)\\ {{\dot{X}}_t}(t) = {{\dot{X}}_t}(t - 1) + {{\ddot{X}}_t}(t){T_s}\\ {X_t}(t) = {X_t}(t - 1) + {{\dot{X}}_t}(t){T_s} \end{array} \right. \end{aligned}$$
(25)

3.3 Stability Analysis

Stability of an online environment stiffness controller will analyze and discuss in this subsection using exponential stability theorem based on a Lyapunov direct method. By combining Eqs. 24 and 13 we can get the following expression

$$\begin{aligned} {M_r}\delta \ddot{x}' + {B_r}\delta \dot{x}' + {K_r}\delta x' = {F_{d}} - { F_{e}^*} + {F_{xd}} \end{aligned}$$
(26)

where \( \delta x' \) is position error generated by proposed method, \( {F_{e}^*} = {\hat{K}_{e}}({X_{e}} - {X_t}) \) is estimated contact force, and \({F_{xd}} = {B_r}{\dot{X}_{d}} \) is compensation force. The main aim of this controller is to reduce the term \(\delta F'= {F_{d}} - {F_{e}^*} + {F_{xd}} \) to zero as short as possible. Then the stability analysis can determined under assumption

$$\begin{aligned} {M_r}\delta \ddot{x}' + {B_r}\delta \dot{x}' + {K_r}\delta x' = 0 \end{aligned}$$
(27)

Equation 27 can be represented in state space as

$$\begin{aligned} \frac{\hbox {d}}{{\hbox {d}t}}\left[ {\begin{array}{*{20}{c}} {\delta x'}\\ {\delta \dot{x}'} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {\delta \dot{x}'}\\ { - ({K_r}/{M_r})\delta x' - ({B_r}/{M_r})\delta \dot{x}'} \end{array}} \right] \end{aligned}$$
(28)

Since this system is linear, we can determine stability by checking the system’s poles; then it can be represented as

$$\begin{aligned} A = \left[ {\begin{array}{*{20}{c}} 0&{} \quad 1\\ { - \left( {{K_r}/{M_r}} \right) }&{} \quad { - \left( {{B_r}/{M_r}} \right) } \end{array}} \right] \end{aligned}$$
(29)

which has characteristic equation described by

$$\begin{aligned} {\lambda ^2} = \left( {{B_r}/{M_r}} \right) \lambda + \left( {{K_r}/{M_r}} \right) \end{aligned}$$
(30)

The solutions of Eq. 30 are

$$\begin{aligned} \lambda = \frac{{ - {B_r} \pm \sqrt{{B_r} - 4{K_r}{M_r}} }}{{2{M_r}}} \end{aligned}$$
(31)

By applying this method to determine exponential stability, the Lyapunov function using in this case is energy formula as

$$\begin{aligned} V(\delta x',t) = \frac{1}{2}{M_r}\delta {\dot{x}'^2} + \frac{1}{2}{K_r}\delta {x'^2} \end{aligned}$$
(32)

Taking the derivative of V along positions of Eq. 27 yields

$$\begin{aligned} \dot{V} = {M_r}\delta \dot{x}'\delta \ddot{x}' + \frac{}{}{M_r}\delta x'\delta \dot{x}' = - {B_r}\delta {\dot{x}'^2} \end{aligned}$$
(33)

The expression \( \dot{V} \) is a negative quadratic function, it does not depend on \( \delta x' \), and then we cannot decide on exponential stability. At \( \delta x' \)=0 is an exponentially stable equilibrium point, of \(\delta \dot{x} =f(\delta x, t)\) if and only if there exists an \( \phi > 0 \) and a function \( V (\delta x, t) \) which satisfies

$$\begin{aligned} {M_r}{\left\| {\delta x'} \right\| ^2} \le V(\delta x',t) \le {K_r}{\left\| {\delta x'} \right\| ^2} \end{aligned}$$
(34)

and

$$\begin{aligned} \dot{V} \le - {B_r}{\left\| {\delta x'} \right\| ^2} \end{aligned}$$
(35)

For some positive constants \( M_r, K_r, B_r \) and \( \left\| {\delta x'} \right\| \le \phi \), therefore, in order to solve the problem of exponential stability in Eq. 33 simple modified as

$$\begin{aligned} \begin{array}{l} V(x,t) = \frac{1}{2}{\left[ {\begin{array}{*{20}{c}} {\delta x'}\\ {\delta \dot{x}'} \end{array}} \right] ^T}\left[ {\begin{array}{*{20}{c}} {{K_r}}&{} \quad {\phi {M_r}}\\ {\phi {M_r}}&{} \quad {{M_r}} \end{array}} \right] \left[ {\begin{array}{*{20}{c}} {\delta x'}\\ {\delta \dot{x}'} \end{array}} \right] \\ \qquad \qquad \quad = \frac{1}{2}\delta \dot{x}'{M_r}\delta \dot{x}' + \frac{1}{2}\delta x'{K_r}\delta x' + \phi \delta \dot{x}'{M_r}\delta x' \end{array} \end{aligned}$$
(36)

where \( \phi \) is a small constant positive value and V still has a positive definite. The derivative of the Lyapunov function becomes

$$\begin{aligned} \begin{array}{*{20}{l}} \dot{V} &{}=&{} \delta \dot{x}'{M_r}\delta \ddot{x}' + \delta x{K_r}\delta \dot{x}' + \phi {M_r}\delta \dot{x}'^2 \\ &{}&{} +\phi \delta x'{M_r}\delta \ddot{x}' = ( - {B_r} + \phi {M_r})\delta \dot{x}'^2 \\ &{}&{} +\phi ( - {K_r}\delta x'^2 - {B_r}\delta x'\delta \dot{x}') \\ &{}= &{} -{\frac{1}{2}{{\left[ {\begin{array}{*{20}{c}} {\delta x'}\\ {\delta \dot{x}'} \end{array}} \right] }^T}\left[ {\begin{array}{*{20}{c}} {\phi {K_r}}&{} \quad {0.5\phi {B_r}}\\ {0.5\phi {B_r}}&{} \quad {{B_r}-\phi {M_r}} \end{array}} \right] \left[ {\begin{array}{*{20}{c}} {\delta x'}\\ {\delta \dot{x}'} \end{array}} \right] } \end{array} \end{aligned}$$
(37)

The term \( {\dot{V}} \) can be considered as a negative definite for chosen \( \phi \) adequately small. And then we can summarize that is exponential stable, which mean that Eq. 37 achieved direct a Lyapunov stability condition \( {\dot{V}} \) \( < \) 0. On the other hand, \( \delta F' \) also should be stable and then contact force must be convergent to desired force as

$$\begin{aligned} F_{e}^* - {F_{d}} + {F_{xd}} \approx 0 \end{aligned}$$
(38)

4 Simulation Studies

This section studies online environment stiffness identification simulations to maintain precise position and contact force using a proposed method without external disturbance. The simulation block diagram shown in Fig. 4 considers the mathematical model of a presented approach. It is including the admittance controller, online environment stiffness law, damping model, and input parameters. By Assuming \( {{{B}}_r} = 40 \) N s/m, \({M_r}=1\) N s\(^2\)/m, \({F_{d}}= 50\) N, and constant environment stiffness \( K_{e} = 5000 \) N/m. Simulations of online environment stiffness estimation, desired positions, force measurements, and damping force compensation were conducted on curved and complex surfaces.

Fig. 4
figure 4

Simulation block diagram of online identification admittance controller

Fig. 5
figure 5

Positions on curved surface using online environment stiffness for two cases

Fig. 6
figure 6

Contact force tracking on curved surface before compensation for both cases

Fig. 7
figure 7

Compensation force tracking error on curved surface for both cases

Fig. 8
figure 8

Contact force tracking on curved surface after compensation for both cases

Fig. 9
figure 9

Online environment stiffness values on curved surface for both cases

4.1 Case I: Curved Surface

In this case, with environment velocity and acceleration, \({{\dot{X}e}} \ne {{0}},{{\ddot{X}e}} \ne {{0}}\). This paper addressed a proposed method effectiveness with the dynamic changes of environment stiffness according to the changes of robot stiffness. Assume that \( {{{X}}_{{{t }}}}{{ = }}{{{X}}_{{{a }}}}{{ = 0 }} \), the proposed method used the same controller parameters shown in Sect. 4. The robot stiffnesses were considered for case I as: \({k_{r1}}=0.1\) N/m, \({k_{r2}}=0.2\) N/m, and \({k_{r3}}=0.3\) N/m; and for case II as: \({k_{r1}}=0.6\) N/m, \({k_{r2}}=1\) N/m, and \({k_{r3}}=1.6\) N/m. Figures 5, 6, 7, 8, and 9 show the simulation results of position tracking, contact force before compensation, compensation force, contact force after compensation, and online environment stiffness estimation for these robot stiffnesses.

Fig. 10
figure 10

Position tracking on complex surface using online stiffness for two cases

Fig. 11
figure 11

Contact force tracking on complex surface before compensation for both cases

Fig. 12
figure 12

Compensation force tracking error on curved surface for both cases

Fig. 13
figure 13

Contact force tracking on complex surface after compensation for both cases

Fig. 14
figure 14

Online environment stiffness values on complex surface for both cases

Fig. 15
figure 15

Hardware and software implementation

4.2 Case II: Complex Surface

In this case \({{\dot{X}e}} \ne {{0}},{{\ddot{X}e}} \ne {{0}}\), we verified a capability of this method to accurately estimate the same environment stiffness same parameters and assumptions, and Xt = 0.15 m. In addition, three values of robot stiffness were used: \({k_{r1}}=0.25\) N/m, \({k_{r2}}=0.5\) N/m, and \({k_{r3}}=0.75\) N/m. For Case II, \({k_{r1}}=0.8\) N/m, \({k_{r2}}=1.25\) N/m, and \({k_{r3}}=1.75\) N/m.

Figures 10, 11, 12, 13, and 14 show the simulation results with same sequences shown in Sect. 4.2.

The simulation procedures included the following stages: First, we calculated position and force tracking with specified robot stiffness values \({k_{r}}\) without merging compensation force with force error, as shown in Figs. 5 and 6 for the curved surfaces and Figs. 10 and 11 for the complex surfaces.

The second stage combined the damping compensation force to minimize the force error to zero with accurate locations, as shown in Figs. 8 and 13 for both cases. Lastly, we calculated the environment stiffness online according to the different robot stiffness values, as shown in Figs. 9 and 14 for the two cases.

Simulation studies were carried out using different robot stiffnesses for curved and complex surfaces, as shown in Sects. 4.1 and 4.2 . Then, the corresponding estimated environment stiffness values were found as 500, 1000, and 1500 N/m and 3000, 5000, and 8000 N/m for the curved surface, respectively, and 1500, 2800, and 3800 N/m for the complex surface. The results showed that positions were suitable for case II and the contact forces were accurate at around 50 N, owing to the eliminated force error using the damping force law for both cases.

Fig. 16
figure 16

Experimental setup: a case one, b case two

5 Polishing Experiments Study

The polishing experiments were conducted to validate the efficiency of a proposed method based on Eq. 25 in achieving accurate contact force for polishing process. A tool had the following specifications: a polishing disk diameter of 2 in, a brand of S-grand with pad sanding P6*10, air pressure of 75–125 psi, no-load speed of 10,000 rpm, orbital pneumatic type, a weight of 0.5 kg, and abrasive paper of type P-60. The test environment consisted of a UR robot manipulator, servo control system, supercomputer, and force sensor with an accuracy of 2.5% FS and resolution of 0.002 N. The servo control system communicates with a supercomputer through UDP with a sampling time of 2 ms. The command position was sent to this controller via the C++ packages. In addition, we used the Qt graphical user interface (GUI) through INtime application and shared memory by parallel programming. The existing parallel programming models support shared memory and cluster shared memory systems [31] due to the recession of central processing unit (CPU) speeds [32] (Fig. 15).

5.1 Case I: Curved Surface

In case I, a proposed controller was utilized to determine the position and contact polishing force on a curved surface. A desired contact force is \( Fd = 10\) N, and the admittance parameters were \( {{{B}}_r} = 40\) N s/m), \({M_r}=1\) N s\(^2\)/m, and \({K_r}\) was 0.6, 1, and 1.6 N/m with corresponding values of environment stiffness from the simulation study. Figure 16a shows the experiment components of this surface. The work-piece material in this experiment was aluminum; the speed of the used tool was 5000 rpm.

Fig. 17
figure 17

The surface microstructure before polishing on curved surface

Fig. 18
figure 18

The surface microstructure after polishing on curved surface

A proposed method was implemented with the desired force of 10 N. Then 3D/2D microstructure and surface roughness along the vertical and horizontal centerlines are measured for curved and complex surfaces. They were measured by an olympus laser microscope before and after a polishing process as shown in Fig. 17a–d, respectively.

Before polishing, the surface exhibited a roughness that was slight and fluctuated, as shown in Fig. 17c, d for horizontal and vertical centerlines, respectively. After polishing, the microstructure measurement of the polished area of the surface became smooth with a surface roughness (Ra) as shown in Fig. 18c, d for the horizontal and vertical centerlines, respectively.

The surface roughness results indicate the equality of the removal material rate, confirming the proposed method applies accurate constant force effectively. Figure 19 shows the position and polishing contact force results.

Fig. 19
figure 19

Position and polishing force on curved surface based on case II

Fig. 20
figure 20

The surface microstructure before polishing on complex surface

Fig. 21
figure 21

The surface microstructure after polishing on complex surface

5.2 Case II: Complex Surface

The admittance controller was used on a complex surface with the same desired contact force and admittance parameters shown in Sect. 5.1. The work-object material in this test was nickel with complex geometry; the speed of the polishing tool was adjusted to 7000 rpm. This test was conducted as shown in the experimental setup in Fig. 16b. Before polishing, the surface roughness was high and fluctuated along the horizontal and vertical centerlines, as shown in Fig. 20c, d. After polishing, the surface roughness (Ra) was smooth and clean with roughness for horizontal and vertical centerlines as shown in Fig. 21c, d. Furthermore, the surface microstructure results indicate the effectiveness of this approach in applying accurate contact force. The experimental results clarified in Fig. 22 represent the location and polishing force on a complex work-piece. The accurate of achieved positions is depend on the robot stiffness, according to the simulation study. As a result, the accurate position should be at \(K_r=1.75\) N/m, and the force error should be corrected in a short time.

Fig. 22
figure 22

Position and polishing force on complex surface based on case II

The obtained results showed that a presented methodology could precisely track a force. Therefore, a traditional admittance controller is considered unsuitable when a robot interacts with complex environments. An overshoot force occurs at the contact point, and after a short adjustment, the force stabilizes thanks to the proposed controller. The contact forces illustrated in Figs. 19 and 22 are noisy because of machining vibration.

The polishing experimental results validated the proposed method. The practical tests were based on the simulation results of case II to achieve accurate constant contact force during the polishing of the curved and complex surface. The contact forces for the two cases were very accurate when using Case II parameters, with fluctuations reaching \( \pm 1.25 \) N. Then, the surface roughness was assessed on one point for every surface before and after polishing using an olympus laser microscope with a resolution of 0.0025 \(\upmu \)m and accuracy of 0.002 \(\upmu \)m. The surface roughness was reduced from ranges of 40 to − 20 and 20 to − 20 to ranges of 3.5 to − 3 and 5 to − 5.75 \(\upmu \)m for the vertical and horizontal lines, respectively, for case I. For case II, the roughness decreased from ranges of 180 to − 60 and 0 to − 66 \(\upmu \)m to 2.5 to − 3 and 3.75 to − 2.3 \(\upmu \)m for the vertical and horizontal lines, respectively.

Table 1 Uncertainty analysis of measured parameters

Then for roughness device the uncertainty can be described as

$$\begin{aligned} {U_{Ra}} = \sqrt{{{({E_{r(R.d)}})}^2} + {{({E_{a(R.d)}})}^2}} \end{aligned}$$
(39)

where \( {U_{Ra}} \) is the surface roughness uncertainty due to a resolution \( {E_{r(R.d)}} \) and accuracy \( {E_{a(R.d)}} \). The uncertainties values according to Eqs. 41 and 39 are described in Table 1

Table 2 Comparison study with previous works

5.3 Uncertainty Analysis

The uncertainty analysis is always used to investigate the experimental measurements [35] where the general form of uncertainty equation can be described by:

$$\begin{aligned} {U_y} = {\sum \limits _{i = 1}^n {U_{x,i}^2} } \end{aligned}$$
(40)

where \( U_y \) is uncertainty value and \( U_{x,i} \) is the measured parameter. In this study, two measured parameters, real polishing force, and surface roughness, using a force sensor and roughness device, respectively. First, the uncertainty of measuring the force sensor is calculated based on the following equation

$$\begin{aligned} {U_{f}} = \sqrt{{{({E_{r(F.S)}})}^2} + {{({E_{a(F.S)}})}^2} + {{({E_{\hbox {tool}(\hbox {air} - \hbox {pressure})}})}^2}} \end{aligned}$$
(41)

where \( U_{f} \) is uncertainty of force measurement and \( E_{r(F.S)} \) is the error of force sensor due to resolution. \( E_{a(F.S)} \) is the error resulting from accuracy, and \( E_{\hbox {tool}}(\hbox {air}- \hbox {pressure}) \) is an error caused by a rotation of the tool by air pressure, which are calculated as \( \pm 1.25 \) and \( \pm 1.3 \) in this study for the curved and complex surface, respectively.

6 Comparative Study

This section highlights the superiority of the proposed method in maintaining accurate contact force compared to four methods from the literature. The results of this study are shown in Table 2. Roveda and Piga [18], Li et al. [16], Zhou et al. [33], and Shen et al. [34] enhanced the accuracy of contact force during the polishing process where D.force is the desired force, NES is nominal environment stiffness, and OES is online environment stiffness.

Roveda and Piga [18] tested the simulation results of an environment stiffness of 1000 N/m under a desired force of 30 N; the following robot parameters were assumed: \( M_r = 10 \) N s\(^2\)/m, inertia \( K_r =10\) N/m, and \( B_r = 0.7\) N s/m. The contact force error during the polishing task reached \( \pm 4.5 \). In addition, Li et al. [16] used the following admittance parameters: \( M_r = 0.05\) kg, \( K_r =10\) N/m, \( B_r =35\) N s/m under a desired force of 10 N and nominal environment stiffness of 5000 N/m. During the polishing process, the force error was around \( \pm 3.5 \) N.

Zhou et al. [33] considered the following robot parameters to adjust the contact force: \( K_r = 2877.5\) N/m \( B_r\) = 220.36 N/(m/s), and \(M_r\) = 1.4 kg under a desired force of 10 N and nominal environment stiffness of 1400 N/m. In addition, the contact force error during the grinding process was \(\pm 3 \) N. Lastly, Shen et al. [34] assumed that \( K_r \) was 500 N/m, \( B_r \) was 500 N/(m/s), and \( M_r \) was 1 N s\(^2\)/m. In this study, the contact force error was slightly lower than \( \pm 2\) N under a desired force of 15 N with a nominal environment stiffness of 10,000 N/m and an estimated one of 9000 N/m.

For the current study, the estimated online stiffness was accurately calculated based on the following assumed robot parameters: \( {{B}_r} = 40\) N s/m, \({M_r}=1 \) N s\(^2\)/m, and \({K_r}= \) 0.6 and 0.8 N/m for the two cases, respectively, under a desired force of 10 N. The study found that the contact polishing force error did not exceed \( \pm 1.25\) N for both cases, with estimated online environment stiffnesses of 8500 and 9000 N/m for case I and II, respectively. Therefore, the superiority of this study over previous studies is due to the lower contact force error achieved during polishing.

7 Conclusions

Controlled robotic contact force is an important issue facing robotic manipulators when contacting curved and complex surfaces.

This study presents a novel method using an online environment stiffness identification and damping force with an admittance controller to solve this problem. The contact force of the robot and specified environment was modeled using a mechanical system of (mass/damper/spring) and (spring) for the robot and its environment, respectively. The traditional constant admittance control was modified by merging an online environment stiffness and damping law to enhance position and contact force accuracy. Then, the online environment stiffness was substituted to constant environment stiffness; then, damping force was merged to eliminate the force error.

To validate the current method, simulation and experimental studies were conducted. According to the simulation results, the position accuracy mainly depended on the relationship between the robot and environment stiffness. Two cases of robot stiffness were used to calculate two corresponding groups of online environment stiffnesses. The contact forces were around 50 N for both cases. The experimental results showed the proposed method’s ability to apply a constant contact force of 10 N within an error of \( \pm 1.25 \) based on online environment stiffness calculated from simulation studies of case II for both surfaces. Then, the surface roughness was measured before and after the polishing process for both cases. The surface roughness results indicate that the proposed controller accurately applied constant contact force, which helped maintain the equality of removal material rate.