A High-Precision Rotor Position and Displacement Prediction Method Specially for Bearingless Permanent Magnet Synchronous Motor

The high performance sensorless performance of the bearingless permanent magnet synchronous motor is the main direction to improve the reliability of the drive system and reduce the cost of the system, and the high-precision rotor position and displacement prediction method is the key technology to realize the high performance sensorless operation. In view of the above problems, a rotor displacement and position prediction method based on kernel extreme learning machine is studied in this paper. On the basis of the mathematical model of BPMSM, this method predicted the position and displacement of the rotor according to the current and flux linkage of suspension windings and torque windings by KELM. The construction method of rotor position and displacement prediction model was described; meanwhile the implementation steps of offline training and online prediction were given. Finally, the error between the method and the actual value was compared by simulation and experiment.The results showed that the proposed method had high accuracy and could achieve real-time rotor position and displacement and then provides the basis for realizing sensorless operation control of BPMSM.


Introduction
Bearingless motors have a wide application prospect because of its low energy consumption, high speed and no lubrication.Among all kinds of bearingless motors, bearingless permanent magnet synchronous motor [1] (BPMSM) has been highly influenced by domestic and foreign scholars because of its high power factor, low heat generation, and high reliability.The key to the stable rotation and suspension of BPMSM is to accurately detect the position and radial displacement of the rotor in real time.Generally, sensors such as eddy current and Hall type are used for detecting the position and displacement of the BPMSM rotor, and the detection method increases the cost of the motor.The complexity of the system hardware makes the installation and maintenance cumbersome and the failure rate is high and, even worse, the critical speed of the motor is reduced.Because sensors are susceptible to the environment, they seriously affect the reliability of the system.Therefore, the research of BPMSM's high-performance sensorless control system has high practical significance.
At present, the global researches on sensorless operation of bearingless motors have achieved initial results.For instance, with the linear relationship between the selfinductance of suspension windings and the displacement of the rotor, an extra high frequency excitation signal was injected into the suspension windings to detect the high frequency differential voltage signal of the suspension windings to track the radial displacement of the rotor in literature [2][3][4].However, the extraction and processing of high frequency signal were complex; furthermore, dynamic performance was poor, so it was not suitable for high-speed operation.In literatures [5][6][7], sensorless control technology establishes a series of state observers to detect rotor position and velocity by detecting relevant electrical signals in the motor windings.This type of method relies on the back EMF of PMSM for position and speed estimation.Since the motor operates at zero speed and low speed, the useful signal-to-noise ratio is very low and is often difficult to extract.
In recent years, with the rise of machine learning algorithm, it shows certain superiority in modeling complex systems.As literatures [8,9], the support vector machine (SVM) was used to obtain the prediction model among the rotor position, displacement and the magnetic levitation switched reluctance motor parameters.In literature [10], the author adopts a novel windowed least algorithm to estimate the parameters with fixed value or the parameter with time varying characteristic.
In this regard, a rotor position and displacement prediction model for bearingless permanent magnet synchronous motor based on kernel extreme learning machine is proposed in the paper.According to the mathematical model of BPMSM, it can be known that there is a nonlinear relationship among the current, flux linkage, rotor position and displacement.Therefore the stability and generalization ability of the kernel extreme learning machine (KELM) can be used to predict the rotor position  r and radial displacement x and y.Based on the simulation data, the feasibility and effectiveness of KELM for BPMSM position and displacement prediction are analyzed.Meanwhile, the parameters of KELM are optimized by the particle swarm optimization (PSO) algorithm [11].The method does not depend on the mathematical model of the motor.Compared with the traditional limit learning machine, it uses the kernel function mapping instead of the hidden layer random mapping.It improves the linear degree of the data and does not need to adjust the parameters of the hidden layer repeatedly.The traditional parameter training problem is converted into a linear equation group to solve the problem, so the training and prediction time are greatly shortened.

Bearingless Permanent Magnet Synchronous Motor
The BPMSM  s stator adopts 24 slots, and the rotor adopts 4 poles surface mounted structure.The stator slot is embedded with two sets of windings with the polar logarithm difference of 1, which are torque windings and suspension windings respectively.The rotating magnetic field is generated in the torque windings, which drives the permanent magnet on the rotor surface to rotate along the tangent direction.The rotor of the motor is rotated.After the suspension windings are energized, a floating magnetic field is generated in the air gap, which is superposed with the rotating magnetic field and the bias magnetic field generated by the permanent magnet.The synthetic magnetic field generates radial forces of a certain direction and magnitude on the rotor, which achieves the suspension of the motor rotor.The suspension forces generation principle of the bearing permanent magnet synchronous motor in the static two phase coordinate system is shown in Figure 1, in which  s and  s are 2 pole suspension windings, and  m and  m are 4 pole torque windings.
When the BPMSM windings  s and  s are not energized, the internal flux of the motor is balanced with no levitation force.At this time, the motor is similar to the common permanent magnet synchronous motor.When the suspension winding  s is connected to the corresponding polarity current as shown in Figure 1, the controlled flux B s produced by the  s in the air gap 2 is in the same direction as the B f produced by the permanent magnet, and the magnetic flux density in the air gap 2 increases.While the flux B s is opposite to the B f of the permanent magnet in the air gap 1, the flux density decreases in the air gap 1.The flux density on both sides is different, resulting in the suspension force   in the direction shown in Figure 1, causing radial displacement of the motor rotor.Similarly, the suspension of the motor rotor in the beta direction can be adjusted by adjusting the current in the Ns beta.By controlling the current in  s and  s , the suspension force in the radial direction can be synthesized; thus the stable suspension control of the bearingless permanent magnet synchronous motor can be realized.

Design of Position Displacement and
Prediction System Based on Kelm 3.1.Principle of Rotor Position Estimation.BPMSM is essentially PMSM, so rotor field oriented control ( m * =0) can also be used.Under the control method, the example is the surface-mounted BPMSM with 2 pairs of pole torque windings and 1 pairs of pole suspension windings.The electromagnetic torque equation of the motor is as follows [1]: According to the dynamic equation of the rotor of BPMSM, it can be obtained [1,12]: Combined with (1) and ( 2), the expression of rotor position angle can be obtained [1]: where  e is the electromagnetic torque of the motor.When  m * =0, permanent-magnet magnetic flux linkage  f is equal to magnetic flux linkage d axis component of torque windings  m . m is the current d axis component of torque windings. m is the voltage d axis component of torque windings. m (0) is the initial d axis magnetic flux linkage component of torque windings (its value is 0). r is the angle of the rotor position. L is the load torque; J is the moment of inertia.
In order to get the relationship between the rotor position angle  r and the direct acquisition of the motor parameters, (3) could be represented in the static coordinate system as follows: where  m and  m are the  and  axis components of the torque windings flux linkage. m and  m are the  and  axis components of the torque windings current.
According to the principle of electromechanics, the torque windings flux linkage  m ,  m can be obtained by U -I flux linkage identification [6]: where  m and  m are the  and  axis components of the torque windings voltage;  m is the torque windings resistance;  m (0) and  m (0) are the initial values of the flux linkage of the torque windings.
When the motor model is determined, the load torque  L and the moment of inertia J in (4) can be regarded as constants.Therefore, the rotor position prediction system can be { m ,  m ,  m ,  m } as input and the rotor position angle {  } as output.KELM is used to train the rotor position angle model to realize the real-time prediction of rotor position  r .Equation (4) ensures the feasibility of the KELM prediction rotor position angle model.

Principle of Rotor Displacement Estimation.
The flux linkage of the bearingless permanent magnet synchronous motor in the - coordinate system can be expressed as [13,14]: where  and  are the radial displacement components of the rotor in the stationary coordinate system. m and  m are the  and  axis components of the torque windings flux linkage. s and  s are the  and  axis components of the suspension windings flux linkage. m and  m are the self-inductance coefficients  and  axis components of the torque windings. s and  s are the self-inductance coefficients  and  axis components of the suspension windings.  ,   are the mutual inductance coefficients  and  axis components of the suspension windings. m and  m are  and  axis components of the torque windings current. s and  s are the  and  axis components of the floating windings current.i fa and   are the  and  axis components of the permanent magnet equivalent excitation current.
From the third and fourth lines of ( 6), the rotor radial displacement expression can be derived as [13,14] where the suspension windings flux linkages  s and  s are obtained by the U-I flux linkage identification method similar to (5).
It can be known from ( 7) that the rotor radial displacement of BPMSM can be represented nonlinearly by the suspension windings currents  s and  s , the suspension windings flux linkages  s and  s , the torque windings currents  m and  m , and the permanent magnet equivalent current i f .Therefore, the rotor radial displacement prediction system can be {  ,   ,   ,   ,   ,   ,   } as the input, and the rotor radial displacement {, } is the output.Realtime prediction of rotor displacement can be achieved by using KELM to train the rotor displacement model.Equation (7) guarantees the feasibility of KELM predicting the rotor displacement model.

Principle of Kernel Extreme Learning Machine.
Extreme learning machine [15] (ELM) is a training method for a single-hidden layer feedforward neural network.Given a training sample T={(  ,   ),  = 1, 2 . . .}, its input data is x n and its target output value is y n .For K hidden nodes, the ELM network model with activation function g n (x n ) can be expressed as [15] where  n is the weight between the n-th hidden layer node and input node.b n is the offset of the n-th hidden layer of the network. n is the n-th output weight of the connection hidden layer and output layer.y j is the network output value.
When the activation function g n (x n ) can approximate the target output value of any N samples, namely, ∑  =1 ‖ n − n ‖ = 0, with zero error, at this time there are [15] The matrix form of the above N equations can be expressed as [15]  =  (10) Among them [15] ] × (11) where H is he hidden layer output matrix of ELM.T is the desired output vector.The above equation is equivalent to finding the least squares solution of the linear system, that is, to find the optimal weight  * , which makes the sum of the squares of the difference between the actual and the expected value minimum.According to the theory of generalized inverse matrix, the solution is as follows [15]: where  + , which can be obtained by orthogonal projection method or singular value decomposition, represents the generalized inverse matrix of the hidden layer output matrix H.
When the number of hidden layer nodes and the number of samples in the ELM model are equal, the network can approach the trained samples with zero error, but in actual use, the calculation time is lengthy in the fitting of larger samples.Therefore, the number of hidden nodes is often set less than the number of training samples, but the data samples may have complex collinear problems at this time, which will make the output of the ELM model fluctuate randomly.The stability and generalization ability of ELM are deteriorated.
In the ELM research process, due to the introduction of the kernel function, ELM can obtain the performance of the least squares support vector machine.The use of kernel mapping to replace the hidden layer feature random mapping, which makes that KELM not only has the superior performance of SVM, but also has a very high operating speed.
Given a training sample T={(  ,   ),  = 1, 2 . . .}, its regression function and the link weights between the hidden layer and the output layer are as follows [16,17]: where ŷ=f (x) is the network output.x is the sample input. is a hidden layer random feature mapping matrix. is the connection weight between the hidden layer and the output layer, and the  value can be solved according to the generalized inverse matrix.I is a diagonal matrix.C is the regularization coefficient.G is the output of target value.
Huang combined kernel learning with ELM in literature [16] and proposed the KELM algorithm.KELM kernel matrix Ω ELM is defined as follows [16,17]: where x i , x j is the sample input vector, where i and j are any integers in [1, N].K(x i ,x j ) is a kernel function, which is usually replaced by a radial basis function (RBF), namely [16,17], where ‖  ,   ‖ is the Euclidean norm between samples.>0, which is the kernel parameter.Combining ( 13), (14), and (15) gives the output and output weight of the KELM network as follows [17]: According to (16), KELM transforms the random feature mapping matrix H in ELM to a stable kernel function K(x i ,x j ) mapping.Compared with the traditional ELM, the function output value can be obtained without setting the number of nodes in the hidden layer, and the generalization ability and stability of the model are enhanced.Considering the advantages of KELM, this paper proposes a BPMSM rotor position and displacement prediction model based on KELM.

Particle Swarm Optimization Algorithm for
Optimizing KELM Parameters.The kernel parameter and the regularization coefficient of KELM have been selected by random or experience, which makes KELM very complicated and inefficient in fitting some complex networks.At present, the optimization of kernel parameter by particle swarm optimization is the main research direction in the KELM field.The PSO algorithm can globally optimize, ensuring that the KELM network parameters are in the optimal state, which makes the robustness and prediction accuracy of KELM improved.

Principle of PSO Algorithm.
PSO algorithm is a lightweight algorithm with fewer parameters, faster convergence speed and easy to find global optimal solution.It has been applied in the parameter optimization and training of KELM in literatures [17][18][19].
In the optimization process, all particles are determined by a fitness-function to judge the good or bad of the current position, meanwhile each particle has two attributes: position and speed.The initial cluster size is N.In a D-dimensional target search space, the position of the particle i is represented as   = ( 1 ,  2 , . . .,   ) T and the velocity is expressed as V  = (V 1 , V 2 , . . ., V  ) T .The best position that the particle currently searches for is represented as pbest i = ( 1 ,  2 , . . .  ) T , and the global optimal position of the current population is represented as gbest=( 1 ,  2 , . . .  ) T .Then the following equations are used to simulate the change of particle velocity and position [11,19]: where 1≤i≤N.T represents the number of iterations.c 1 and c 2 are acceleration constants that determine the particle velocity change, where c 1 acts on the particle's individual optimal solution and c 2 affects the particle's global optimal solution.r 1D and r 2D are two independent 0∼1 random coefficients used to constrain the velocity of the particles.In order to balance the global search ability and local search ability of the particle swarm algorithm, the inertia weight coefficient  [20] is introduced.The particle velocity changes after introduction are as follows [11,19]: When  > 1, the global search ability of the particle is increased.When  < 1, the particle performs deceleration

Get the initial parameters by training data
The initial position of the particle swarm is determined based on the initial parameters of the KELM, and other parameters are given.
The fitness value of each particle is calculated to determine the individual optimal position and the global optimal position Calculate the individual optimal position and the global optimal position of the new particle and compare the new particle individual optimal value and the global optimal value with the previous particle.

Satisfy the output condition
Output the current particle location and plug it into KELM to calculate its predicted output.motion, the search range of the particle reduces, and the local search ability of the particle increases.

3.4.2.
Steps to Optimize KELM Parameters with PSO Algorithm.The flowchart of particle swarm optimization KELM is shown in Figure 2.
Step 1.The diachronic data obtained by the BPMSM simulation model is selected and divided into training set and test set, and then the training set and test set are normalized to Step 2. The kernel function of the KELM model is RBF kernel, and it is taken into further processing the training set data to get the initial regularization coefficient and kernel parameter.
Step 3. Initialize the particle swarm parameters, including setting the population number to N, the initial particle position to ( int ,  int ), and setting the search range.When the particle crosses the boundary, the position of the particle is set to the boundary value and its velocity is set in the opposite direction.Set the upper limit of the iteration.The mean square error (MSE) of rotor position and displacement prediction by KELM is set as fitness function.The smaller  the MSE value, the better the fitness.Meanwhile the initial velocity, the optimal location, and the global optimal location are given randomly.
Step 4. The particle swarm optimization is carried out.
According to the objective function, the fitness of each particle is calculated in each iteration.Then the speed and individual and global optimal position are updated.
Step 5.The individual and global optimum values of the new particles are compared with the previous ones.If they are better, they are updated.Otherwise they will not be updated.
Step 6.If the number of iterations exceeds the upper limit of iteration, the algorithm is terminated.Otherwise Steps 4 and 5 are repeated.
Step 7. The global optimal position ( best ,  best ) of the particle is outputted, and the fitness value corresponding to the global optimal position is saved.

Design Steps of Position and Displacement Prediction
Models.In order to verify the effectiveness of the designed prediction model, simulation study is carried out in Matlab/Simulink, and the BPMSM simulation parameters in simulation are shown in Table 1.The sampling time is 0.15s, and the sampling mode is variable step ode45, which can obtain the simulation data.The torque windings current ,  axis component data, the torque windings flux ,  axis component data, the suspension windings current ,  axis component data, the suspension windings flux ,  axis component data, and the permanent magnet equivalent excitation current data are used to simulate actual rotor position and displacement data.1000 sets of training samples are selected as rotor position and displacement prediction models at equal time interval, and 1000 groups are selected as rotor position and displacement test samples.Since the single-kernel KELM can only be used for the fitting problem of a single output function, in order to achieve multioutput prediction of rotor position and radial displacement, three prediction models based on KELM are established.
Respectively, the rotor position angle prediction model is { m ,  m ,  m ,  m } as the input set and {  } is the output set.The rotor -axis radial displacement prediction model is { s ,  s ,  s ,  s ,  m ,  m ,   } as the input set, and {} is the output set.The rotor -axis radial displacement prediction model is { s ,  s ,  s ,  s ,  m ,  m ,   } as the input set, and {} is the output set.

Optimization of KELM Kernel Parameters.
Given the parameters of PSO algorithm, the MSE of training samples is set as fitness function.For the rotor position angle  r training model, the acceleration factors c 1 and c 2 are set to 2, w is set to 0.5, the population number is set to 25, and the maximum iteration number  max is 100, Finally, the parameter optimization result can be obtained as ( best ,  best ) = (0.001, 10000).
For the rotor -axis radial displacement  training model, the acceleration factors c 1 and c 2 are set to 2, w is set to 0.6, the population number is set to 25, and the maximum iteration number  max is 100, Finally, the parameter optimization result can be obtained as ( best ,  best ) = (0.008, 200000).
For the rotor -axis radial displacement  training model, the acceleration factors c 1 and c 2 are set to 2, w is set to 0.6, the population number is set to 25, and the maximum iteration number  max is 100, Finally, the parameter optimization result can be obtained as ( best ,  best ) = (0.002, 20000).kernel matrix Ω ELM train is obtained, a matrix I/C is added, which is substituted into the output weight matrix function together with the output { * } of the training sample, and finally an output weight matrix  is obtained.Among them, I is the unit matrix with the same order of training kernel matrix.Multiplication of Ω ELM train and  is the predicted output of training samples {}.After obtaining the mean square error, it is trained several times to get the minimum mean square error and finally get the most suitable output weight matrix .The establishment of the rotor position angle  r and the rotor -axis radial displacement training model is similar to the rotor -axis radial displacement.It will not be described in detail here.

Prediction of Rotor Position and Displacement Online.
According to Figure 4, the Matlab/Simulink simulation model is built.The current and voltage signals obtained by real-time simulation are firstly identified to obtain the torque and the floating flux linkage, and then the flux linkage signal and the current signal are used as the corresponding inputs of the three prediction models; finally the predictions are obtained.
In the online prediction, the offline trained weight matrix  is stored in advance in an external data file.The construction of the predictive model is written in the Matlab Function module.The real-time sampling of current and flux signals is stored in a variable array.Then the predicted kernel matrix Ω ELM predict corresponds to the input at this time, and finally the Matlab Function module calls the external weight matrix  directly.The products of the two are the real-time prediction output under the sampling time point.

Analysis of Simulation Results
Figures 5 and 6 show the actual value, predicted value, and prediction error of the rotor position and displacement when BPMSM is unloaded and given a constant speed of 3000 r/min.
It can be seen from Figure 5(a) that the rotor position prediction value is basically consistent with the measured value when the motor no-load constant speed was 3000 r/min.It can be seen from Figure 5(b) that the maximum position angle  r prediction error of the rotor position prediction model based on KELM is 3.48e-03 rad, which is within an acceptable range.
It can be seen from Figures 6(a) and 6(c) that, during the motor starting phase, the rotor suspension state of the motor fluctuates because the operating conditions of the motor are not stable enough.In the  direction, it is greatly affected by gravity.When the motor starts, the rotor position starts from -3×10 -4 m, and the suspension control accuracy is slightly lower too, which is 10 -4 m.The prediction error of the rotor displacement prediction model based on KELM is more obvious in the motor starting stage.When the operating condition of the motor is stable, the prediction error was gradually reduced to close to 0. When the no-load constant speed was 3000 r/min, the displacement error in the maximum  direction is 4.99×10 -9 m, and the displacement error in the maximum  direction is 4.94×10 -7 m, which are much smaller than the set allowable value.
Figure 7shows the change of the rotational speed and the rotor position prediction error at the time when the BPMSM is given a constant speed of 3000 r/min under the condition of a load torque  L =5 N⋅m at 0.1 s.
It can be seen from Figure 7(b) that, in the case of sudden load, although the rotor position prediction stability was slightly lower than before the load torque was added, the overall error was within the acceptable range, so the rotor position prediction model based on KELM still had good reliability.
When the BPMSM is given a constant speed of 3000 r/min, Figures 8(a It can be seen from Figure 8 that the accuracy of the rotor displacement prediction model decreased slightly when the disturbance is added, but the overall predicted displacement accuracy is within an acceptable range.When the rotor  position returns to the equilibrium position, the accuracy will increase accordingly.
The comprehensive simulation results show that the rotor position and displacement prediction models based on KELM can meet the high-precision requirements of the BPMSM control system and have certain robustness when the BPMSM is running with load or displacement disturbance at a given speed.

Comparison of Algorithm Performance
In order to test the performance of KELM algorithm, ELM and LS-SVM are used as comparison algorithms to establish BPMSM rotor position and displacement offline training models for three algorithms.According to the original training set data, the maximum error and the mean square error of the prediction model are used as indicators to compare the algorithms.
In the ELM training models, "sawtooth" is used as all the activation functions.The number of hidden neurons is adjusted with the establishment of different models, but they are basically adjusted within the range of 2500∼3000.When the LS-SVM training models are used, "RBF" is used as all the kernel functions.Under different training models, the sigma kernel parameters of the RBF kernel function are different.
Because it is only to test the superiority of the KELM algorithm in rotor position displacement prediction accuracy, this section collects the correlation quantities of the Matlab/Simulink model after simulation into the ".mat" files and only calculates the predicted output under each algorithm offline.The training samples and prediction samples of each algorithm are completely consistent.After selecting the optimal parameters of each model, the computer program is programmed by Matlab, and the simulation is performed on the PC.The final results of each algorithm are shown in Table 2.
Comparing the algorithms, it can be seen that KELM is slightly higher than LS-SVM in terms of prediction accuracy, but both are much higher than ELM prediction accuracy.This is because ELM is a random given parameter of the algorithm hidden layer, which leads to its poor generalization ability and stability.KELM replaces the random mapping in ELM with nuclear mapping, which effectively solves such problems    and obtains the least squares optimal solution.At the same time, KELM has relatively weak optimization constraints compared with LS-SVM.
In the prediction time, the difference between KELM and LS-SVM is not significant, which is obviously better than that of ELM.The time of calculation of ELM is not only limited by the size of the sample size but also influenced by the number of neurons in the hidden layer.KELM does not need to input the number of hidden layer neurons and only needs to adjust the kernel parameters and regularization coefficients.Its calculation time is only related to the number of samples, so KELM has an advantage in system response.

Conclusion
In this paper, a high-precision prediction method based on KELM is proposed for the prediction of rotor position and displacement of BPMSM.The mathematical model of disturbance (m) × 10 -6 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.  BPMSM is used to determine the input required by the prediction method.KELM prediction models are established by the data obtained in the simulation model.Finally, in order to prove the superiority of KELM algorithm, the performance index of KELM algorithm is compared with other algorithms.
Simulation results show that (1) the KELM-based predictive model design method is efficient and convenient and can well fit the nonlinear relationship between various parameters of the motor; (2) the designed prediction model can accurately predict the position and displacement of the rotor, which provides the basis for the realization of BPMSM sensorless operation control; (3) compared to traditional ELM, KELM has a shorter prediction time and more stability.Compared to LS-SVM, KELM has better generalization performance.In summary, the BPMSM rotor position and displacement high-precision prediction method based on KELM provide a reliable and key technology for sensorless operation control of BPMSM.

Figure 3 :
Figure 3: Rotor alpha axis radial displacement training function flow.
Figure 3, the establishment process of the radial displacement training model of the rotor -axis is taken as an example.During the training process of the model, according to the training sample input { s * ,  s model
) and 8(b) exert interference forces on the -axis at 0.12s and Figures8(c) and 8(d) exert interference forces on the -axis at 0.08s.
Position angle  r contrast error e_ r (rad) Position angle  r prediction error
Displacement prediction error on the -axis

Figure 7 :
Figure 7: Speed and rotor position prediction error under load torque  L =5 N⋅m.

Figure 8 :
Figure 8: Prediction and error of rotor displacement under external displacement disturbance.

Table 2 :
Comparison of prediction results of various algorithms at 3 000 r/min.