# Practical Adaptive Sliding-Mode Control Approach for Precise Tracking of Robot Manipulators
## 2 Proposed SS-ASMC Approach
### The Dynamics of Robot Manipulator
Substituting Equation (8) into Equation (7), we can obtain the control approach with the pole-placement term (PPT) as  
\[\mathbf{\tau}_{t}=\underbrace{-\tilde{\mathbf{M}}\bar{\mathbf{q}}_{t-L}+\mathbf{ \tau}_{t-L}}_{\text{TDE}}+\underbrace{\tilde{\mathbf{M}}\big{[}\bar{\mathbf{q }}_{t,t}+\big{(}\tilde{\mathbf{K}}_{s}+\tilde{\mathbf{K}}_{g}\big{)}\dot{ \mathbf{e}}_{t}+\tilde{\mathbf{K}}_{s}\tilde{\mathbf{K}}_{g}\mathbf{e}_{t} \big{]}}_{\text{PPT}}. \tag{9}\]  
Substituting Equation (9) into Equation (3), the error dynamics can be represented as follows,  
\[\dot{\mathbf{e}}_{t}+\big{(}\tilde{\mathbf{K}}_{s}+\tilde{\mathbf{K}}_{g} \big{)}\dot{\mathbf{e}}_{t}+\tilde{\mathbf{K}}_{s}\tilde{\mathbf{K}}_{g} \mathbf{e}_{t}+\mathbf{E}_{t}=0 \tag{10}\]  
where \(\mathbf{E}_{t}=(E_{1,t},E_{2,t},\cdots,E_{n,t})\in\Re^{n}\) is called \"TDE error\". If we can make the TDE error \(\mathbf{E}_{t}=0\), the tracking error \(\mathbf{e}_{t}=0\) goes to zero monotonically. Then, the sliding gain \(\tilde{\mathbf{K}}_{s}\) and the design parameter \(\tilde{\mathbf{K}}_{g}\) can be defined as the desired poles that help to adjust the convergence rate. If the sampling time \(L\) is sufficiently small, the estimation value \(\hat{\mathbf{\mathcal{L}}}_{t}\) can be as close to \(\mathbf{\mathcal{L}}_{t}\) as possible. Unfortunately, it is impossible to achieve the estimation value \(\hat{\mathbf{\mathcal{L}}}_{t}\) that is the same as \(\mathbf{\mathcal{L}}_{t}\) because the real systems exist in the discrete-time domain, inherent state noises, hard nonlinearity, and abrupt disturbances [29]. It means that the TDE errors must be present in the real systems. To achieve the system stability while guaranteeing the upper bound of these errors, the TDC gain \(\tilde{\mathbf{M}}\) should be satisfied as follows,  
\[\|\mathbf{I}-\mathbf{M}^{-1}(\mathbf{q}_{t})\tilde{\mathbf{M}}\|_{2}<1 \tag{11}\]  
for all \(t>0\), then the TDE errors \(\mathbf{E}_{t}\) are always upper-bounded [27, 30], i.e., \(E_{i}\leq\tilde{E}_{i}^{*}\) for all \(i=1,2,\cdots,n\), where \(\tilde{E}_{i}^{*}\) is the maximum value of the TDE error \(E_{i}\). It means that the magnitude of the TDC gain \(\tilde{\mathbf{M}}\) should be restricted, and thus Equation (9) may cause degraded tracking performance. To suppress the TDE errors \(\mathbf{E}_{t}\), we propose a practical adaptive sliding-mode control (SS-ASMC) approach that is added in Equation (7) as follows,  
\[\mathbf{\tau}_{t}=-\tilde{\mathbf{M}}\tilde{\mathbf{q}}_{t-L}+\mathbf{\tau}_{t-L}+ \tilde{\mathbf{M}}\big{[}\tilde{\mathbf{q}}_{d,t}+\big{(}\tilde{\mathbf{K}}_{s }+\tilde{\mathbf{K}}_{g}\big{)}\dot{\mathbf{e}}_{t}+\tilde{\mathbf{K}}_{s} \tilde{\mathbf{K}}_{g}\mathbf{e}_{t}\big{]}+\tilde{\mathbf{M}}\tilde{\mathbf{K }}_{s}^{*}\text{sgn}(\mathbf{s}_{t}) \tag{12}\]where \(\hat{\mathbf{K}}_{i}^{s}=\text{diag}(\hat{K}_{1,t}^{s},\hat{K}_{2,t}^{s},\cdots, \hat{K}_{n,t}^{s})\in\Re^{n\times n}\) is the diagonal positive gain to be determined for guaranteeing the system stability, called \"switching gain\" in this paper. The switching gain employs two adaptive laws, i.e., the parent (Equation (13)) and child (Equation (14)) adaptive laws, that are  
\[\hat{\hat{K}}_{i,t}^{s}= \begin{cases}\xi_{i}\hat{\eta}_{i,t}|s_{i,t}|\chi_{t}& \text{if}\quad\hat{K}_{i,t}^{s}>0\text{ and }s_{i,t}\
eq 0\\ \xi_{i}\hat{\eta}_{i,t}|s_{i,t}|&\text{if}\quad\hat{K}_{i,t}^{s}=0\text{ or }s_{i,t}=0\end{cases}  \tag{13}\]  
where  
\[\hat{\eta}_{i,t}= \begin{cases}-\gamma_{i}|s_{i,t}|&\text{if}\quad\big{|}\hat{ K}_{i,t}^{s}|<\bar{\mu}\text{ and }\hat{\eta}_{i,t}=\bar{\eta}_{i}^{*}\\ -\gamma_{i}|s_{i,t}|^{a}\chi_{t}&\text{if}\quad\big{|}\hat{K}_{i,t}^{s}|<\bar {\mu}\text{ and }\underline{\eta}_{i}^{*}<\hat{\eta}_{i,t}<\bar{\eta}_{i}^{*}\\ \gamma_{i}|s_{i,t}|&\text{if}\quad\big{|}\hat{K}_{i,t}^{s}|<\bar{\mu}\text{ and }\hat{\eta}_{i,t}=\underline{\eta}_{i}^{*}\\ 0&\text{if}\quad\big{|}\hat{K}_{i,t}^{s}|=\bar{\mu}\end{cases}  \tag{14}\]  
where \(\chi_{t}=\text{sgn}(\|\mathbf{s}_{t}\|_{\infty}-\bar{\epsilon})\).