## 3 Adaptive Control System  
### Stability Analysis of Impedance Control Models  
Usually, the model parameters, \(M_{r}\), \(B_{r}\), and \(K_{r}\), of the impedance controller and the environmental dynamics parameters, \(K_{e}\), are positive definite diagonal matrices, with the forces in each direction decoupled. Therefore, for the convenience of subsequent research analysis in this paper, the applied force is decomposed and studied. It is assumed that the contact force only acts in one direction, which is the direction of the force. Lowercase letters \(x\), \(x_{r}\), \(x_{d}\), \(m_{r}\), \(b_{r}\), \(k_{r}\), \(f_{r}\), \(f_{e}\), \(x_{e}\), \(k_{e}\), and \(b_{e}\) are used to represent variables and coefficients in a single direction, respectively, instead of the uppercase letters \(X\), \(X_{r}\), \(X_{d}\), \(M_{r}\), \(B_{r}\), \(K_{r}\), \(F_{r}\), \(F_{e}\), \(X_{e}\), \(K_{e}\), and \(B_{e}\). Thus, the impedance relationship in Equation (2) can be expressed in a single direction:  
\[m\big{(}\dot{x}_{r}-\dot{x}_{d}\big{)}+b\big{(}\dot{x}_{r}-\dot{x}_{d}\big{)} +k\big{(}x_{r}-x_{d}\big{)}=f_{e}-f_{r}=-\Delta f \tag{4}\]  
Figure 4: The position—based impedance control. We assume the environmental dynamics model to be as is shown in Equation (5), where \(x_{e}\), \(k_{e}\), and \(b_{e}\) represent the environmental position, environmental stiffness, and environmental damping, respectively. \[f_{e}=b_{e}(\dot{x}-\dot{x}_{e})+k_{e}(x-x_{e}) \tag{5}\]  
Additionally, when the robot makes contact with the environment, its acceleration and movement speed are very small, and the contact force between the robot and the environment can be simplified to  
\[f_{e}=k_{e}(x-x_{e}),x>x_{e} \tag{6}\]  
Taking the Laplace transform of Equation (4) yields  
\[(m_{r}s^{2}+b_{r}s+k_{r})\big{(}x_{d}(s)-x_{r}(s)\big{)}=\big{(}f_{r}(s)-f_{e}( s)\big{)}=\Delta f(s) \tag{7}\]  
By transforming and further simplifying Equation (7), we obtain  
\[ \begin{split}(x_{d}(s)-x_{r}(s))&=\frac{1}{(m_{r}s ^{2}+b_{r}s+k_{r})}\big{(}f_{r}(s)-f_{e}(s))\\ & e(s)=H(s)\Delta f(s)\end{split}  \tag{8}\]  
where \(H(s)=1/(m_{r}s^{2}+b_{r}s+k_{r})\) is the transfer function, as shown in Equation (3). It represents the desired impedance model of the robotic arm, which converts the force error during the contact process into a correction for the reference trajectory. Taking the Laplace transform of the environmental dynamics model shown in Equation (6) yields  
\[f_{e}(s)=k_{e}\big{(}x(s)-x_{e}(s)\big{)},x>x_{e} \tag{9}\]  
As mentioned in Section 2.2, it is generally assumed that there is no tracking error in the position control mode of the robot, that is, \(x=x_{d}\). By incorporating the desired force into Equation (9), we obtain  
\[\Delta f(s)=f_{r}(s)-k_{e}(x_{d}(s)-x_{e}(s)) \tag{10}\]  
Substituting Equation (8) into Equation (10) yields  
\[\Delta f(s)=f_{r}(s)-k_{e}\bigg{(}x_{r}(s)+\frac{1}{(m_{r}s^{2}+b_{r}s+k_{r}) }\Delta f(s)-x_{e}(s)\bigg{)} \tag{11}\]  
\[\Delta f(s)=\frac{m_{r}s^{2}+b_{r}s+k_{r}}{m_{r}s^{2}+b_{r}s+k_{r}+k_{e}}\Big{(} f_{r}(s)-k_{e}(x_{r}(s)-x_{e}(s))\Big{)} \tag{12}\]  
The steady-state tracking error in impedance control can be expressed as follows:  
\[ \begin{split}\Delta f_{ss}&=\lim_{s\to 0}\bigg{(} \frac{m_{r}s^{2}+b_{r}s+k_{r}}{m_{r}s^{2}+b_{r}s+k_{r}+k_{e}}\big{(}f_{r}(s)-k_ {e}\Big{(}x_{r}(s)-x_{e}(s)\big{)}\Big{)}\bigg{)}\frac{1}{s}\\ &=\lim_{s\to 0}\frac{k_{r}}{k_{r}+k_{e}}\big{(}f_{r}-k_{e}(x_{r}-x _{e})\big{)}\end{split}  \tag{13}\]  
From Equation (13), we can see that setting \((f_{r}-k_{e}(x_{r}-x_{e}))=0\) or \(k_{r}=0\) can make the steady-state tracking error \(\Delta f_{ss}\) converge to zero as the system approaches a stable state. However, setting the desired stiffness \(k_{r}\) to zero directly may reduce the force steady-state error to zero, but this would result in the system losing its rigid response to external forces.