## Materials and Methods
### Control System
#### 2.2.1 Control Theory
For the design of the adaptation mechanism and for the proof of the stability of the adaptive control system, the Adaptive Model-Following Control (AMFC) system must be reconfigured into an equivalent feedback system with the linear time-invariant part in the forward path, and with the non-linear time-varying part in the feedback loop [22]. The obtained equivalent feedback system enables the use of [PERSON]'s theory of hyperstability. The linear time-invariant part in the forward path and the non-linear time-varying part in the feedback loop must be chosen in order to be able to meet the specifications required so that the stability of the adaptive system is assured. To satisfy the required specifications for the linear time-invariant part in the forward path, the linear compensator described by Equation (24) must be included in the adaptation mechanism:  
\[\mathbf{v}(t)=\mathbf{D}\mathbf{e}(t) \tag{24}\]  
where \(\mathbf{D}\) denotes the matrix gain of the linear compensator and \(\mathbf{v}(t)\) is the output vector of the linear compensator. The linear compensator's matrix \(\mathbf{D}\) must be chosen, in order to assure that the transfer matrix of the equivalent forward block defined by Equation (25) is a strictly positive real transfer matrix:  
\[\mathbf{H}(s)=\mathbf{D}\big{(}s\mathbf{I}-\mathbf{A}_{\text{m}}+\mathbf{B}_{ \text{p}}\mathbf{K}_{\text{m}}\big{)}^{-1}\mathbf{B}_{p} \tag{25}\]  
where \(\mathbf{H}(s)\) denotes a transfer matrix of the equivalent forward block, \(\mathbf{I}\) is an identity matrix, and \(s\) is a complex variable of the Laplace transform. For the computation of the linear compensator \(\mathbf{D}\), one must solve the Lyapunov Equation (26) after the choice of the weighting matrix \(\mathbf{Q}\):  
\[\Big{(}\mathbf{A}_{\text{m}}-\mathbf{B}_{\text{p}}\mathbf{K}_{\text{m}}\Big{)}^ {\text{T}}\mathbf{P}+\mathbf{P}\Big{(}\mathbf{A}_{\text{m}}-\mathbf{B}_{\text{ p}}\mathbf{K}_{\text{m}}\Big{)}=-\mathbf{Q} \tag{26}\]  
where \(\mathbf{Q}\) is a chosen positive definite matrix and \(\mathbf{P}\) is the solution of the Lyapunov equation. Finally, the linear compensator's matrix \(\mathbf{D}\) is calculated from \(\mathbf{P}\) with (27):  
\[\mathbf{D}=\mathbf{B}_{\text{p}}^{\text{T}}\mathbf{P} \tag{27}\]  
To satisfy the required specifications for the non-linear time-varying part in the feedback loop, the time-varying matrices \(\Delta\mathbf{K}_{\text{p}}(\mathbf{e}(t),t)\) and \(\Delta\mathbf{K}_{\text{u}}(\mathbf{e}(t),t)\) must be calculated by means of Equations (28) and (29):  
\[\Delta\mathbf{K}_{\text{p}}(\mathbf{e}(t),t)=\int_{0}^{\text{t}}\mathbf{F} \mathbf{v}(\tau)\Big{(}\mathbf{G}\mathbf{x}_{\text{p}}(\tau)\Big{)}^{\text{T }}\text{d}\tau+\int_{0}^{\text{t}}\mathbf{F}^{{}^{\prime}}\mathbf{v}(\tau) \Big{(}\mathbf{G}\mathbf{x}_{\text{p}}(\tau)\Big{)}^{\text{T}}+\Delta\mathbf{ K}_{\text{p}}(0) \tag{28}\]  
\[\big{(}\mathbf{I}-\mathbf{B}_{\text{p}}\mathbf{B}_{\text{p}}^{+}\big{)}\big{(} \mathbf{A}_{\text{m}}-\mathbf{A}_{\text{p}}\big{)}=\mathbf{0} \tag{20}\]0  
where matrices \(\mathbf{F}\), \(\mathbf{M}\), \(\mathbf{G}\), and \(\mathbf{N}\) are positive definite matrices, \(\mathbf{F}^{{}^{\prime}}\) and \(\mathbf{G}^{{}^{\prime}}\) are positive semi-definite matrices, and \(\Delta\mathbf{K}_{\text{p}}(0)\) and \(\Delta\mathbf{K}_{\text{u}}(0)\) are initial values of the time-varying matrices \(\Delta\mathbf{K}_{\text{p}}(\mathbf{e}(t),t)\) and \(\Delta\mathbf{K}_{\text{u}}(\mathbf{e}(t),t)\). A block diagram of the entire adaptive system is presented in \[\big{(}\mathbf{I}-\mathbf{B}_{\text{p}}\mathbf{B}_{\text{p}}^{+}\big{)}\big{(} \mathbf{A}_{\text{m}}-\mathbf{A}_{\text{p}}\big{)}=\mathbf{0} \tag{20}\]1  
\[\big{(}\mathbf{I}-\mathbf{B}_{\text{p}}\mathbf{B}_{\text{p}}^{+}\big{)}\big{(} \mathbf{A}_{\text{m}}-\mathbf{A}_{\text{p}}\big{)}=\mathbf{0} \tag{20}\]2 Block diagram of an adaptive model-following control system.