# Model-Based Adaptive Collaboration of Multi-Terminal Internal Force Tracking
## 3 Multi-Terminal Adaptive Motion
### Tracking the Generation of Reference Trajectories of Expected Command Internal Forces  
Next, we develop an algorithm to generate \(p_{rj}^{r},(j=b,c,d)\) and the reference trajectories \(p_{rjc},j=b,c,d\) by estimating the uncertain motion of \(P_{rjc},j=b,c,d\) and the object's deformation \(\triangle p_{rj},j=b,c,d\), as depicted in Figure 4, so that the internal forces required to stabilize clamping are fixed around a certain value when the object is moved. As shown in Figure 5, according to Equation (29), we set a required command internal force group:  
\[F_{rj}^{d}=k\left(p_{rjo}-p_{rjc}^{d}\right),j=b,c,d \tag{44}\]  
This corresponds to the desired trajectory  
\[p_{rjc}^{d}=p_{rjo}-\frac{1}{k_{\rm e}}F_{rj}^{d}j=b,c,d \tag{45}\]  
where \(F_{rj}^{d}\) represents the desired command internal force and \(p_{rje}^{d}\) represents the desired trajectory at the holding line \(\overrightarrow{O_{hj}O_{ha}}\) from the terminal actuator Terminal-j, \((j=b,c,d)\). According to Section 3.2, if we estimate \(p_{rjo}\) and \(k\), we can obtain the expected trajectory of \(p_{rjc}^{d}\) using Equation (45), which will be used to compare with the upcoming impedance-model-based method. In Equation (46), we define the target impedance model at the holding line \(\overrightarrow{O_{hj}O_{ha}}\) from the terminal actuator Terminal-j \((j=b,c,d)\),  
\[Mp_{rje}^{\cdot\cdot}\text{+B}p_{rje}+K(p_{rje}-p_{rje}^{d})=e_{rj}\,j=b,c,d \tag{46}\]  
where \(M\)\(=\) diag\(\left[m_{x},\ m_{y},\ m_{z}\right],B\)\(=\) diag\(\left[b_{x},\ b_{y},\ b_{z}\right]\), and \(K\)\(=\) diag\(\left[k_{x},\ k_{y},\ k_{z}\right]\) are the mass, damping, and stiffness parameters of each slave terminal, respectively, in the robot coordinate system \(x,y,z\) directions. \(e_{rj}=F_{rj}-F_{rj}^{d}\) is the internal command force-tracking error, and \(F_{rj}^{d}\) is the expected command internal force. According to Equation (29), we obtain:  
\[ \begin{array}{ll}p_{rje}&=-\frac{1}{k}F_{rj}+p_{rjo}\\ &=-\frac{1}{k}(F_{rj}^{d}+e_{rj})+p_{rjo},j=b,c,d\end{array}  \tag{47}\]  
Substituting Equation (47) into the impedance model (46) provides  
\[ \begin{array}{ll}\ddot{e}_{rj}+\dot{B}\dot{e}_{rj}+(K+k\mathrm{I}_{3})e_{rj }=\\ -(\ddot{M}\ddot{F}_{rj}^{d}+B\dot{F}_{rj}^{d}+K\dot{F}_{rj}^{d})+k(M\ddot{p}_{ rjjo}+B\dot{p}_{rj0}+Kp_{rjo})-kKp_{rje}^{d}\end{array}  \tag{48}\]  
where \(\mathrm{I}_{3}\) represents a \(3\times 3\) identity matrix. Since \(F_{rj}^{d}\) is constant, Equation (48) becomes  
\[ \begin{array}{ll}\ddot{M}\ddot{e}_{rj}+\dot{B}\dot{e}_{rj}+(K+k\mathrm{I}_{3 })e_{rj}=\\ -KF_{rj}^{d}+k(M\ddot{p}_{rjo}+B\dot{p}_{rjo}+Kp_{rjo})-kKp_{rje}^{d}\end{array} . \tag{49}\]  
For the force-tracking error dynamics in Equation (49), the steady-state error is  
\[e_{rj,ss}=k(K+\mathrm{I}_{3}k)^{-1}(-\frac{1}{k}KF_{rj}^{d}+(M\ddot{p}_{rjo}+ B\dot{p}_{rjo}+Kp_{rjo})-Kp_{rje}^{d}) \tag{50}\]  
Therefore, to eliminate the steady-state error \(p_{rje}^{d}\), the desired trajectory of \(p_{rje}\), \(j=b,c,d\) must meet  
\[p_{rje}^{d}=K^{-1}(M\ddot{p}_{rjo}+B\dot{p}_{rjo}+Kp_{rjo}-\frac{1}{k}KF_{rj}^ {d}) \tag{51}\]  
By replacing \(p_{rjo}\) and \(k\) in Equation (51) with the renewal law \(\dot{p}_{rjo}^{\wedge}\) and \(\dot{k}\) established in Section 3.2, the reference trajectory of \(p_{rje},j=b,c,d\) will be  
\[p_{rje}^{r}=\frac{1}{K}(M\ddot{p}_{rjo}^{\wedge}+B\dot{p}_{rjo}^{\wedge}+K \dot{p}_{rjo}^{\wedge}-\frac{K}{\gamma}F_{rj}^{d}),j=b,c,d \tag{52}\]  
As demonstrated in [24], we finally obtain the command internal force system \(F_{rj}\ \rightarrow\ F_{rj}^{d}\), \((j=b,c,d)\) using \(p_{rje}^{r}\), a reference trajectory of \(p_{rje},j=b,c,d\), to eliminate the steady-state error \(e_{rj,ss}\). In summary, we have obtained \(\dot{F}_{rj}^{\wedge}\to F_{rj}\to F_{rj}^{d}\), \((j=b,c,d)\), \(\dot{F}_{rj}^{\wedge}\to F_{rj}\) as described in Section 3.2 and \(F_{rj}\to F_{rj}^{d}\) as described in Section 3.3.