## 4 Structure of the First Diagram for Robot Control, the Iterative Learning Method
### Outer Loop Control Is by Iterative Learning Controller Design  
Expression (17) describes the system (14) that becomes LTI by compensating the \(\underline{\eta}\) synthetic disturbances in (15) by the compensator (16), and, for iterative learning systems, it is rewritten as follows in ILC language:  
\[\left\{\begin{array}{ll}\underline{X}_{k}(n+1)=\hat{A}*\underline{X}_{k}(n) +\hat{B}[\underline{\underline{\theta}}_{k}(i)+\underline{\underline{\delta}} _{k}(n)]\\ \underline{Y}_{k}(n)=\hat{C}*\underline{X}_{k}(n)\end{array}\right\} \tag{24}\]  
where \(n=0,1,\ldots,N=T/t_{s},\underline{X}_{k}(N)=\underline{X}_{k+1}(0),\)_and_  
\[\begin{array}{ll}\hat{A}=\underset{\hat{B}}{\int}\limits^{T_{s}}e^{At}Bdt\\ \hat{C}=(I_{n},O_{n})\end{array} \tag{25}\]The control objective at this point is to choose the proper learning parameter K for the update rule P-Type, assuming we have identified two matrices that make the matrix A provided in Equation (6).  
\[\underline{\underline{\varrho}}_{k+1}(n)=\underline{\underline{\varrho}}_{k}(n)+ K\underline{E}_{k},with\ \underline{E}_{k}(n)=\underline{R}_{k}(n)+\underline{Y}_{k}(n) \tag{26}\]  
For the necessary convergence to be satisfied \(\|\underline{E}_{k}(n)\|\to 0\) for all \(n\), or at least as close as possible to the origin.  
The value \(\underline{\underline{\varrho}}_{k}\) given by ILC (26) is partially constant, so the discrete time model in Equation (24) obtained is equivalent to the continuous time model in Equation (17). In expression (24), no information about the system model (1) is used either. Therefore (24) can be applied to all robot controllers. From (24), it is obtained with the assumption \(\underline{\underline{\delta}}_{k}(n)=\underline{0}\),  
\[\underline{Y}_{k+1}(n)=C\hat{A}^{n}\underline{X}_{k+1}(0)+\sum\limits_{j=0}^{ n-1}C\hat{A}^{n-n-1}\hat{B}\underline{\underline{\varrho}}_{k+1}(j),\]  
This results from (24) and the clear demonstration of repeatable ability \(\underline{X}_{k}(0)=X_{k+1}(0),\forall k\)  
\[\underline{E}_{k+1}(n) =\underline{R}(n)-\underline{Y}_{k+1}(n)=\underline{R}(n)-\left[ C\hat{A}^{n}\underline{X}_{k}(0)+\sum\limits_{j=0}^{n-1}C\hat{A}^{n-n-1}\hat{B}( \underline{\underline{\varrho}}(j)+K\underline{E}_{k}(j))\right]\] \[=\underline{R}(n)-\underline{Y}_{k}(n)-\sum\limits_{j=0}^{n-1}C \hat{A}^{n-j-1}\hat{B}K\underline{E}_{k}(j)=(I-C\hat{B}K)\underline{E}_{k}(n) -\sum\limits_{j=0}^{n-2}C\hat{A}^{n-j-1}\hat{B}K\underline{E}_{k}(j)\] Hence, \[\underline{E}_{k+1}=\Phi\underline{E}_{k}\] (27) where \[\underline{E}_{k}=\begin{pmatrix}\underline{E}_{k}(0)\\ \underline{E}_{k}(1)\\ \vdots\\ \underline{E}_{k}(N-1)\end{pmatrix}\text{ and }\Phi=\begin{pmatrix}I-C\hat{B}K&0& \cdots&0\\ -C\hat{A}\hat{B}K&I-C\hat{B}K&\cdots&0\\ \vdots&\vdots&\vdots&\vdots\\ C\hat{A}^{N-2}\hat{B}K&-C\hat{A}^{N-2}\hat{B}K&\cdots&I-C\hat{B}K\end{pmatrix} \tag{28}\]  
**Theorem 2**: _For the situation \(\underline{\underline{\delta}}_{k}(n)=0\), all requirements \(\|\underline{E}_{k}(j)\|\to 0\) for all \(n=0,1,\ldots,N-1\) will only be fulfilled if and when the P-Type learning parameter K is adjusted in a way that makes the value given in (16) Schur._  
Proof.: For the autonomous system (27) the proof is comprehensive as it is clear that it is stable if and only if it is Schur. \(\square\)