# Hybrid Adaptive Controller Design with Hysteresis Compensator for a Piezo-Actuated Stage
## 2 Hysteresis Modeling
### BW Hysteresis Sub-Model Identification Based on Improved Differential Evolution Algorithm  
A generalized BW model that can describe hysteresis as differential equations was suggested by [PERSON] and [PERSON]. In this study, the BW model is used as the hysteresis sub-model to describe the static hysteresis of the P-AS, and its expression is shown as follows:  
\[\left\{ \begin{array}{l}y_{b}(t)=dV(t)-H(t)\\ H(t)=a\dot{V}(t)-b|\dot{V}(t)|H(t)-c\dot{V}(t)|H(t)|\end{array} \right. \tag{1}\]  
where \(V(t)\) and \(y_{b}(t)\) represent the input and output of the BW model, respectively, at time \(t\). \(H(t)\) and \(d\) denote the hysteresis term and actuator factor, respectively. \(a\), \(b\), and \(c\) are the identified parameters of the BW hysteresis sub-model, which determine the amplitude and shape of the BW model. Because of the complexity of the BW hysteresis sub-model, the conventional algorithms are not suitable for identifying unknown parameters. The differential evolution algorithm is an intelligent optimization algorithm that is commonly used in system identification owing to its simple structure and fast convergence. However, the differential evolution algorithm easily falls into local minima. Therefore, an improved differential evolution algorithm is proposed to enhance its global search capability; the evolution of two populations is used, and the algorithm shares the optimum individual resources by information exchange. In this study, the parameters of the BW hysteresis sub-model are obtained by the improved differential evolution algorithm. Equation (1) is rewritten as follows:  
\[y_{b}(t)=F(t,V(t),H(t),\Theta) \tag{2}\]  
where \(\Theta=[d,a,b,c]\) is the vector of unknown parameters to be identified. The pseudo-code of the improved differential evolution algorithm is presented in Algorithm 1. ```
0: Define the current iteration of this algorithm as \(N\), where \(N\leq N_{\max}\). The dimension of parameters that need to be obtained is \(N_{\theta}\). The number of iterations for the two populations before the exchange of information is \(K_{\theta}\). The range of the unknown-parameter vector is \([\Theta_{\min},\Theta_{\max}]\). Define \(D_{\theta}\) as the dimension of the population. \(\theta_{i}^{j}(n)\) represents the \(i\)-th individual of the \(j\)-th population in the \(n\)-th generation, where \(i=1,2,\ldots,D_{\theta}\); \(j=1,2\); and \(n=1,2,\ldots,N_{\theta}\). Define \(P\) as the probability of crossover and mutation for the second population. 0: The optimal-parameter vector is \(\Theta^{*}\). 1: Initialize \(\Theta^{i}(0)=\Theta_{\min}^{j}+rand(D_{\theta},N_{\theta})(\Theta_{\max}- \Theta_{\min})\), where \((D_{\theta},N_{\theta})\) is a matrix with random element values ranging from 0 to 1. 2: Define a fitness function \(F_{\theta}(\theta_{i}^{j}(n))=\frac{1}{2}\sum_{t=1}^{T}[y(t)-y_{b}(t)]\), where \(y(t)\) represents the output of the P-AS at time \(t\), and \(T\) represents the size of sample. Define \(F_{j}^{*}\) and \(\Theta_{j}^{*}\) as the optimal value of the fitness function and \(j\)-th optimal-parameter vector, respectively. 3: Update the two populations. Define \(\alpha^{j}\) as the variation factor of the two populations, \(\beta\) as the crossover probability, and a random number \(l_{i}^{j}\in[0,1]\). \(p_{i}^{j}(n+1)=\theta_{i_{1}}^{j}(n)+\alpha^{j}\Big{(}\theta_{i_{2}}^{j}(n)- \theta_{i_{3}}^{j}(n)\Big{)}\) for \(i\
eq i_{1}\
eq i_{2}\
eq i_{3}\). \(q_{i}^{j}(n+1)=p_{i}^{j}(n+1)\) if \(l_{i}^{j}\leq\beta\), and \(q_{i}^{j}(n+1)=\theta_{i}^{j}(n)\) if \(l_{i}^{j}>\beta\). \(\theta_{i}^{j}(n+1)=q_{i}^{j}(n+1)\) if \(F_{\theta}(q_{i}^{j}(n))\leq F_{\theta}(\theta_{i}^{j}(n))\), and \(\theta_{i}^{j}(n+1)=\theta_{i}^{j}(n+1)\) if \(F_{\theta}(q_{i}^{j}(n))>F_{\theta}(\theta_{i}^{j}(n))\). ```  
**Algorithm 1** Improved differential evolution algorithm for obtaining the parameters of the BW hysteresis sub-model. Compute the objective function and identify the population whose objective function is smaller.