# Hybrid Adaptive Controller Design with Hysteresis Compensator for a Piezo-Actuated Stage
## 3 HAC Design
### HAC Design Based on Hysteresis Compensator  
The open-loop control system based on the hysteresis compensator for P-AS in the complex field is expressed as follows:  
\[y(s)=\Big{[}u(s){G_{H}}^{-1}+\Gamma_{1}\Big{]}{G_{H}}{G_{0}}(s)+\Gamma_{2} \tag{5}\]  
where \(u(s)\) and \(y(s)\) represent the input and output of the open-loop control, respectively, and \(G_{H}\) and \(G_{0}\) represent the hysteresis sub-model and linear sub-model of the P-AS, respectively. \({G_{H}}^{-1}\) is the transfer function for the inverse compensator. \(\Gamma_{1}\) and \(\Gamma_{2}\) represent the input and measurement noise of the P-AS, respectively. Then, the transfer function of the open-loop control can be denoted as follows:  
\[G(s)=\frac{y(s)}{u(s)}=\bigg{[}{G_{H}}^{-1}+\frac{\Gamma_{1}}{u(s)}\bigg{]}{G _{H}}{G_{0}}(s)+\frac{\Gamma_{2}}{u(s)} \tag{6}\]  
Define \(k_{b}f_{1}=(\Gamma_{1}G_{H})/u(s)\) and \(k_{b}f_{2}=\Gamma_{2}/u(s)\). Then, (6) can be rewritten as:  
\[G(s)={G_{0}}(s)[1+k_{b}f_{1}(s)]+k_{b}f_{2}(s) \tag{7}\]  
where \(f_{1}(s)\) and \(f_{2}(s)\) represent the input and output unmodeled dynamics, respectively, of the P-AS. The scalar parameter \(k_{b}>0\) represents the rate of the unmodeled dynamic. To achieve precise tracking control, a hybrid adaptive controller is designed in this section. First, we exploit two accessorial vectors \(\omega_{1}(s)\) and \(\omega_{2}(s)\) and define:  
\[\left\{\begin{array}{l}\dot{\omega}_{1}(s)=\mathbf{A}_{1}\omega_{1}(s)+ \mathbf{B}_{1}u(s)\\ \dot{\omega}_{2}(s)=\mathbf{A}_{2}\omega_{2}(s)+\mathbf{B}_{2}y(s)\end{array}\right. \tag{8}\]  
\[y_{f}(t)=-(\mathbf{\[PERSON]}_{k}-\mathbf{\[PERSON]}^{*})^{\mathrm{T}}G_{m}(t)\omega(t)+G_{m}(t)(\mathbf{ \[PERSON]}_{k}-\mathbf{\[PERSON]}^{*})^{\mathrm{T}}\omega(t) \tag{18}\]  
where \(y_{f}(t)\) is an instrumental variable. We define \(\xi(t)=G_{m}(t)\omega(t)\) and \(\eta(t)=f(t)u(t)\), where \(\omega(t)^{\mathrm{T}}=[\omega_{1}(t),\omega_{2}(t),y(t)]\). Next, the augmented error is obtained as follows:  
\[\begin{split}\varepsilon_{1}(t)&=e_{1}(t)-y_{f}(t )\\ &=(\mathbf{\Phi}_{k}-\mathbf{\Phi}^{*})^{\mathrm{T}}\xi(t)+k_{b}^{*}\eta( t)\end{split} \tag{19}\]  
We define \(\varepsilon(t)=\varepsilon_{1}(t)/m(t)\) and \(\psi(t)=\xi(t)/m(t)\), where \(m(t)\) satisfies the differential equation as follows:  
\[\dot{m}(t)=-\delta_{0}m(t)+\delta_{1}\mathbf{E}\mathbf{R}^{\mathrm{T}}(t) \tag{20}\]  
Here, \(\mathbf{E}\) is a three-dimensional identity matrix. Both \(\delta_{0}\) and \(\delta_{1}\) are positive real numbers, and \(\mathbf{R}(t)=[|u(t)|,|y(t)|,1]^{T}\). \(m(0)\) is the default value of \(m(t)\), which satisfies \(m(0)>\delta_{0}/\delta_{1}\). According to (20), \(\varepsilon(t)\) can be rewritten as:  
\[\varepsilon(t)=(\mathbf{\Phi}_{k}-\mathbf{\Phi}^{*})^{\mathrm{T}}\psi(t)+k_{b}^{*}\eta (t)/m(t) \tag{21}\]  
To adjust \(\mathbf{\Phi}_{k}\) online, the adaptive law is designed as:  
\[\mathbf{\Phi}_{k+1}=\mathbf{\Phi}_{k}-\frac{1}{T_{k}}\int_{t_{k}}^{t_{k+1}}\frac{ \sigma(t)\varepsilon(t)\psi(t)}{1+\psi^{T}(t)\psi(t)}dt \tag{22}\]  
where \(T_{k}=t_{k+1}-t_{k}\). \(\sigma(t)\) is defined as:  
\[\sigma(t)=\left\{\begin{array}{ll}0,|\varepsilon(t)|\leq v_{0}\\ 1,|\varepsilon(t)|>v_{0}\end{array}\right. \tag{23}\]  
where \(v_{0}\) is a positive constant that satisfies:  
\[2k^{*}|\eta(t)|/m(t)\leq v_{0}\leq k^{*}\rho_{0},\quad\rho_{0}>0 \tag{24}\]  
Then, we can obtain the control law of HAC. A schematic of the HAC design based on the hysteresis compensator is shown in Figure 2.  
Figure 2: Structure of the proposed hybrid adaptive controller.