# Neuroadaptive Robust Speed Control for PMSM Servo Drives with Rotor Failure
## 3 Control Strategy
### B-Spline Neural Networks  
In the past two decades, adaptive controllers based on BSNN have been used in many industrial, electronic, mechatronics, and electromechanical control systems to regulate output variables, such as parallel kinematic manipulators, electrical power systems, shunt DC motors, UPS inverters, quadrotor, power control of wind turbine and induction motor [16; 17; 18; 19; 20; 21]. The typical structure of a BSNN is shown in Figure 2. The main feature of the BSNN is adjusting its weights iteratively on-line in an attempt to reproduce a particular function using a conjugate gradient. The adaptability feature of the neural network gives the ability to learn from previous events, by interconnecting the input data to output, as shown in Figure 2. However, the initial values of weights of the BSNN are often generated randomly or adjusted based on the designer's experience to get excellent performance for a specific controller [16; 17; 19]. The BSNN can compute its response on-line, based on a modest structure and a short number of basic mathematical operations that are an important desirable feature for efficiently controlled physical systems. To design the BSNN is a priority to define the size of the input space lattice, which is defined by a set of nth knot vectors (KV). In this work, a KV is used for each one of the three control loops. To define the number of knots, the interval between them, and the value of each one, this can be calculated using an optimization algorithm or through the user's experience knowing the magnitude and the input signals to the neural network. Thus, each control loop has a KV but they must be adjusted in relation to the maximum and minimum values of the reference signals. The KV are distributed in groups of 4 elements and 8-knot points, to form 3 B-spline functions that between them must share one or more knot points. The univariate base function for the B-spline can be defined in the following expression [17]  
\[ \begin{split} S_{K}^{j}(u)=\left(\frac{u-\lambda_{j}-k}{\lambda_ {j-1}-\lambda_{j-k}}\right)S_{K-1}^{j-1}(u)+\left(\frac{\lambda_{j}-u}{ \lambda_{j}-\lambda_{j-k+1}}\right)S_{K-1}^{j}(u)\\ S_{1}^{j}(u)=\left\{\begin{array}{c}1\quad\quad\quad\quad \text{if }u\ e\ l_{j}\\ 0\ \ \text{for other cases}\end{array}\right.\end{split}  \tag{17}\]  
Figure 2: B-Spline neural networks structure. where \(u\) is the input, \(\lambda_{j}\) is the \(j_{th}\) knot point and \(Ij=\left[\lambda_{j-1},\lambda_{j}\right)\) is the \(j_{th}\) interval between two-knot points, and \(K\) corresponds to the order of the output function. The output of each BSNN can be written as follows [29; 30]:  
\[\sigma_{i}=\sum_{m=1}^{P}a_{m}w_{m}=a_{i}^{T}w_{i}\qquad\forall_{i}=1,\;2,\;3\]  
where \(a_{i}\) corresponds to \(P\)-dimensional vector which have the outputs of the basis functions and, \(w_{i}\) corresponds to the weights vector which is updated through the selected instantaneous learning instruction  
\[w_{i}=w_{i}(t-1)+\frac{\gamma\sigma_{i}(t)}{||a_{i}(t)||_{2}^{2}}a_{i}(t) \qquad\forall_{i}=1,\;2,\;3 \tag{18}\]  
where \(\|\cdot\|\) is the Euclidean norm and the increment, \(\gamma\) corresponds to the learning rate, \(w_{i}(t-1)\) is the previous weight, and \(\sigma_{i}\) corresponds to the BSNN output error. The process to carry out the instantaneous training (IT) that uses the neurocontroller based on the BSNN, is used to calculate the value of the weights of the active base functions. The algorithm for the instant learning rule works to minimize the estimated value of performance metric mean square error (PMMSE) function of the output vector, and the values are adjusted using the descending gradient criterion (DGC) [30]. Following the rules defined above, the online training algorithm for the BSNN can be summarized in the next pseudocode (Algorithm 1).