Modeling and Identification of Permanent Magnet Synchronous Motor via Deterministic Learning

This paper investigates the identification of a permanent magnet synchronous motor (PMSM) velocity servo system based on deterministic learning theory. Unlike most of the existing studies, this study does not identify the system parameters, but rather the system dynamics. System dynamics is the fundamental knowledge of the PMSM system and contains all the information about the system parameters, various uncertainties, and the system structure. The accurate modeling of the various uncertainties is important to improve the control performance of the controller. In this study, the dynamics of the PMSM system containing various uncertainties are identified based on the system state. Firstly, the system state of the PMSM is measured, and then a suitable RBF neural network is designed based on it. The RBF neural network is used to construct a state estimator that takes the motor system as input. The weights of the RBF neural network are updated using the Lyapunov-based weights. As the weights converge, a constant RBF neural network can be obtained, which contains complete information about the system parameters and the various uncertainties of the motor system. We use the proposed method to identify the simulated and real-time PMSM velocity servo systems separately, and the identification results show the effectiveness and feasibility of the proposed method.


I. INTRODUCTION
Permanent magnet synchronous motor (PMSM) has become the mainstream motor in the fields of active aircraft, electric vehicles and industrial servo drives due to its high torque density, high power density, and high efficiency. It is a typical nonlinear complex system with the general properties of chaotic systems, showing self-similarity, initial value sensitivity, and signal pseudo-random complexity [1]. Synchronous motors contain both AC and DC types in principle, and its dynamic model typically can be treated as the universal model of motors. Therefore, accurate modeling of a permanent magnet synchronous motor has universal significance for general motion control optimization with fault diagnosis and also has a strong application background.
The associate editor coordinating the review of this manuscript and approving it for publication was Jinquan Xu . PMSM is a multivariable and dynamic time-varying system. The actual control strategy is affected by the uncertainty of the mathematical model of the motor. The most common uncertainty is the electrical parameters in the motor model [2]. In actual control, these variations in electrical parameters will cause inaccurate estimation of various observers, failure of shaft decoupling, control performance, the dynamic and static modeling quality reduction, and even affecting the stability of the motor control system [3]. To accurately identify the parameters of the PMSM to get an accurate motor model and improve the control performance, a variety of PMSM parameter identification methods have appeared, such as model reference adaptive (MRAS) method, state observer method, intelligent identification method and so on.
In [4], the authors used the current model in the PMSM synchronous rotating coordinate system as a reference model to construct a quadrature axis observer. Based on the error of the reference model and the adjustable model, the quadrature axis current was designed using the Lyapunov stability theory to be identified parametric resistance, quadrature axis inductance, and magnetic flux adaptive law. References [5], [6] used the estimated quadrature axis voltage equation as a reference model and then designed adaptive rules to identify the stator resistance by Lyapunov stability theory. Although the MRAS identification method has been successfully applied in the parameter identification of PMSM [7], [8], the derivation of the adaptive law is mostly carried out under assumptions. It is difficult to determine the adaptive law if multiple parameters are identified simultaneously. Furthermore, the velocity of adjustment and change during parameter identification is slow, which is not suitable for the identification of fast time-varying parameters. The Kalman filter has been successfully applied in the parameter identification of PMSM [9]- [11], but there are still two main problems. One is that the algorithm is complex and computationally intensive. The other is that it requires more assumptions in use and has significant limitations in practical applications.
With the development of intelligent optimization control, many intelligent algorithms appeared in PMSM parameter identification and control, such as Grey wolf optimization algorithm [12], [13], particle swarm algorithm [14], [15], genetic algorithm [16], [17], wavelet algorithm and neural network algorithm [18], [19], etc. For a motor model with known structure but unknown or partially unknown parameters, the problem of identifying motor parameters is transformed into obtaining the optimal solution. Although the intelligent identification algorithm has high accuracy, strong robustness, and fast convergence speed, the algorithm is generally complicated with a large amount of calculation, poor real-time performance, and requires a higher computing capacity. These unfavorable factors hinder the practical application of the intelligent identification algorithm.
Although much research has been done on parameter identification of motor systems, the model structures used in existing studies are generally linear, and the number of parameters to be identified is 3 to 5. It is difficult to accurately model the nonlinear dynamics in the system, especially the various uncertainties. It is worth noting that accurate modeling of uncertainty and its application in controllers can be of great help in improving control performance [20].
Recently, a new algorithm, deterministic learning theory, has been proposed for nonlinear system identification, temporal pattern recognition, and intelligent control of nonlinear systems [21], [22]. The main feature of the deterministic learning approach, compared to existing system identification methods, is the achieved accurate identification of the local true nonlinear system model, which contains information about the system parameters, various uncertainties, and the system structure. Furthermore, the obtained knowledge can be stored and represented by constant RBF neural networks and can be readily used for another similar control task toward guaranteed stability and improved control performance.
In this paper, a method is proposed for the identification of the motor system via deterministic learning. Unlike most of the existing studies, this study does not identify the system parameters, but the system dynamics, which is the fundamental knowledge of the motor system. The system state of the motor is first measured, and then a suitable RBF neural network is designed accordingly. A state estimator is built using the RBF neural network with the system state of the motor as input. The weights of the RBF neural network are updated using Lyapunov-based law. It can be shown that these parameters all converge to a constant value. Thus, a constant RBF neural network can be obtained, which is the dynamics underlying the motor system states and can be used for control, pattern recognition, fault detection, and so on. The information about all system parameters and the structure is also contained in this constant RBF neural network.
The major contributions of this paper include: (1) This method provides accurate identification of the system dynamics of a motor system, rather than the system parameters. System dynamics is the essential characteristic of a motor system and contains all the information of the system, including information of system parameters and various uncertainties; (2) The method is of good practicality, requiring only the state of the system, and is particularly suitable for the identification of real-time motor systems with various uncertainties; (3) The modeling result is expressed as a constant radial basis function (RBF) networks, which can be readily used for another similar control task toward guaranteed stability and improved control performance.
The remainder of the paper is organized as follows. Sections 2 and 3 introduce the dynamic mathematical model of PMSM and deterministic learning, respectively. Section 4 gives the details of the identification method proposed in this paper. Section 5 presents the process and results of the simulation and experimental tests. Section 6 concludes the paper.

II. DYNAMIC MATHEMATICAL MODEL OF PMSM
PMSM is a multi-variable, strongly coupled non-linear system whose electrical parameters affect each other. Therefore, it is difficult to get an accurate PMSM mathematical model. In the actual control of PMSM, the state equation in the d-q two-phase synchronous rotating coordinate system is usually used as a mathematical model. The dynamic equation of a PMSM system in a rotating (d-q) coordinate system can be expressed as follows [23]- [25]: where ω, J , R, B, n p , T L and r are rotor angular velocity, rotor moment of inertia, stator resistance, viscous friction coefficient, pole pair, load torque, and flux linkage, VOLUME 8, 2020 respectively. i d and i q denote d−axis and q-axis currents, u d and u q represent d-axis and q-axis voltages, L d and L q are d-axis and q-axis inductance, respectively. Under different operating conditions, these electrical parameters can be affected by various factors, where the most important factors are the uncertainties.
The system state of a motor system is a time-varying pattern with a recurrent trajectory. It is generated by the motor system and is the manifestation of information about the system parameters, various uncertainties, and system structure, i.e., the system dynamics. In this study, we will identify the dynamics of the system based on the system state, which contains all the information about the system.

III. DETERMINISTIC LEARNING
Deterministic learning theory is a machine learning method recently proposed for the identification and recognition of timing-varying patterns [21]. It was principally developed based on the knowledge of RBF neural networks, adaptive control, and system identification. For a temporal pattern, which is defined as a periodic or recurrent orbit generated by nonlinear dynamical systems, the fundamental knowledge of the temporal pattern can be accurately identified and stored as a time-invariant manner [22], [26].
To be more specific, consider the following dynamical system:u where u = [u 1 , . . . , u n ] T ∈ R n is the system state, G(u; p) = [g 1 (u; p), . . . , g n (u; p)] T is a continuous but unknown nonlinear function vector, and p is a constant parameter vector.
In order to accurately model the unknown system dynamics G(u; p) underlying a dynamical pattern ϕ ζ (a recurrent orbit), the following estimator system is applied: where u i andû i are states of (2) and (3) respectively, d i > 0 is a parameter to be designed, RBF neural networksŴ (3), the following equation can be obtained:u is the ideal approximation error. To updateŴ i , the following Lyapunov-based learning law was employed: where σ i > 0 is a small constant parameter, γ i = γ T i > 0. It has proved that for almost any temporal pattern (recurrent orbit) ϕ ζ , the accurate identification of unknown dynamics g i (u; p) along the orbit ϕ ζ can be obtained [21], [22], [26] and represented as follows: is the actual modeling error. It indicates the dynamics underlying nearly any temporal pattern can be accurately modeled by applying deterministic learning. The deterministic learning has shown that for almost every periodic orbit, there always exists an RBF subvector consisting of RBFs centered in a certain neighborhood of the orbit such that a partial PE condition is satisfied. With the satisfaction of the persistent excitation (PE) condition, locally accurate modeling of nonlinear system models along periodic or quasi-periodic trajectories was achieved. While existing nonlinear system identification methods can only guarantee that the state estimation error converges to a small neighborhood of zero, but they cannot perform a system dynamics accurate identification (i.e., there is no guarantee that the weights of the neural networks will converge to their optimal values). This is the main contribution of deterministic learning. Moreover, the acquired knowledge can be stored and represented by a constant RBF neural network and can be readily used for another similar control task.

IV. IDENTIFICATION METHOD
In the section, we will present the method for identifying the PMSM model. For simplicity of notation we denote is the system state vector, and is the system parameter vector, and (1) can be abbreviated as follows: where X = [ω, i q , i d ] T is the system state, F(X , p) = [F 1 (X ; p), F 2 (X ; p), F 3 (X ; p)] T is the nonlinear function vector, p is the system parameter vector. To achieve the locally accurate identification of the system dynamics F 1 (X ; p), F 2 (X ; p) and F 3 (X ; p), we employ the dynamical models using the RBF neural network as follows: whereω,î q andî d are the estimation of ω, i q , i d , respectively, a i > 0 (i = 1, 2, 3) is constant parameter to be designed, W T i S i (X ) is the RBF neural networks to approximate F i (X ; p) (i = 1, 2, 3).
From Eqs. (7) and (8), the derivative of the state estimation errors e 1 =ω − ω, e 2 =î q − i q and e 3 =î d − i d satisfy where are the ideal approximation errors. The weight estimatesŴ i (i = 1, 2, 3) are updated by the following law: where i = T i > 0, and σ i > 0 are small values. It can be indicated from the following theorem that the accurate identification of F i (X ; p) (i = 1, 2, 3) can be obtained along a recurrent trajectory of the motor system (1).
Theorem 1: Consider the adaptive system composed by the motor system (7), the dynamical model (8), and the updating law (10), the following conclusions can be drawn: (i) all signals in the adaptive system remain uniformly bounded, the state estimation error e i (i = 1, 2, 3) converges to a small neighborhood of zero, and the neural weight estimateŴ ζ i (as in (16)) converges to a small neighborhood of its optimal valueŴ * ζ i (i = 1, 2, 3); (ii) locally accurate approximation of F i (X ; p) (i = 1, 2, 3) can be achieved along the recurrent trajectory φ(X ) of the motor system (7).
Proof: (i) Consider the following Lyapunov function candidate: Take the derivative of V i , Let a i = a i1 + a i2 with a i1 , a i2 > 0. Because it follows thaṫ Clearly,V i is negative definite when That is, e i and W i are uniformly bounded Based on the locally properties of RBF neural network, we describe Eq. (9) and Eq. (10) in the following form: where (·) ζ , (·)ζ represent the area close to and far away from the trajectory φ(X ), respectively. S ζ i is a subvector of S i , W ζ i is the corresponding weight subvector. ζ i = O( i ) is the neural network approximation error along the trajectory φ(X ). According to the nature of RBF neural networks, any recurrent trajectory can satisfy a partial persistent excitation (PE) condition of the corresponding RBF subvector. Since the trajectory φ(X ) generated by the motor model (7) is recurrent, S ζ i satisfies the PE condition. Based on Lemma 2 in reference [27], the origin (e i , W ζ i ) = 0 of the nominal part of the system (16) is exponentially stable. Since ζ i = O( i ) and σ i ζ iŴζ i can be made small by choosing a sufficiently σ i , by using Lemma 3 in [27], the state error e i and W ζ i both converge exponentially to some small neighborhoods of zero, and the size of the neighborhoods being determined by * i and σ i ζ i W * ζ i , respectively. (ii) The convergence ofŴ ζ i to be in a small neighborhood of W * ζ i means that along the trajectory φ(X ), Based on the convergence result, a constant vector of neural weights can be obtained according to the following formula: where "mean" is the arithmetic mean, and [t a , t b ] represents a piece of time segment after the transient process. So, we have that

VOLUME 8, 2020
On the other hand, for neurons far away from the trajectory φ(X ), | Sζ i | will become very small due to the localization characteristic of RBFs, so the activation and update of the neural weightsWζ i is very weak. For the initial valueŴ i (0) = 0, bothŴζ i andŴ T ζ i Sζ i , as well asWζ i andW T ζ i Sζ i will remain very small (i.e., still in a small neighborhood of zero). These mean that the entire RBF neural network W T i S i can approximate F i (X ; p) along the trajectory φ(X ): where It implies that accurate identification of the motor system to the desired error level i is achieved by using the entire RBF neural network in a local region along the recurrent trajectory φ(X ) of the motor system.

V. SYSTEM IDENTIFICATION FOR THE DYNAMICS MATHEMATICAL MODEL A. SIMULATION AND EXPERIMENTAL PLATFORM
The PMSM first runs under a normal steady-state condition, and then a pseudo-random binary signal (PRBS) is added to the PMSM after a prescribed time. The length and period of the PRBS signal are designed based on the cut-off frequency of the PMSM. With this input data set, the PMSM is fully excited, which allows the model to recognize the complete system behavior. If control i d = 0, the PMSM will be decoupled, and we can control the PMSM as easily as a DC motor.
Space vector pulse width modulation (SVPWM) is a special switching scheme of a 3-phase power converter with six power transistors. We apply SVPWM to approximate the reference voltage and combine it with eight basic space vectors [28]. Modeling details of the SVPWM design can be found in [29]. The 3-phase inverter consists of three groups of IGBT power transistors. Every group is composed of upper and lower two transistors, the six IGBT power transistors are controlled by the PWM1-PWM6 signals from the SVPWM module, and the outputs of the inverter connect to the 3-phase inputs of the motor. The PMSM is driven by a conventional voltage-source inverter. The two input currents of the PMSM (i a and i b ) are measured by the inverter and sent to the DSP controller via two analog-to-digital converters (ADCs).
Theoretically, PMSM-driven field-oriented control allows for independent control of motor torque and magnetic flux, as in DC motor operation. In other words, torque and magnetic flux are decoupled from each other. Rotor position requires a variable conversion from a stationary reference frame to a synchronously rotating reference frame. Due to this conversion (i.e., park transformation), the q-axis current will control the torque, while the d-axis current is forced to zero. Therefore, the key module of this system is the rotor position information from the QEP encoder. The overall flow diagram of the simulation and experimental platform implementation is shown in Figure 1.  The PMSM real-time velocity control experimental platform shown in Figure 2 will be used for accurate identification and experimental verification. The PMSM is controlled by a servo drive and connected to a computer for signal monitoring using a Joint Test Action Group (JTAG) emulator interface. The code composer studio (CCS) software tool is used for online tuning and debugging. The control board uses a Texas Instruments TMS320F2812 DSP control unit. The two-phase current signal is sampled from the current transducer and used as current feedback for closed-loop control. The speed feedback signal is obtained from the encoder output as speed closed-loop control.

B. NUMERICAL EXPERIMENTS
The following numerical simulation is conducted to show the effectiveness and feasibility of the method. Referring to Figure 1, if the control i d = 0, the PMSM will be decoupled and can be controlled as easily as a DC motor. The numerical solutions are obtained from the Eq. (7) (as shown in Figure 3) with the following parameters: n p = 4, The dynamical model employing RBF neural networks Eq. (8) are used to identify the unknown system dynamics F i (X ; p)(i = 2, 3) in Eq. (7). The RBF neural network W T i S i (X )(i = 2, 3) is constructed in a regular lattice, with nodes N = 408, the centers evenly placed on [−50, 65] × [−60, 20], and the width is 5. The weights of the RBF neural networks are updated online according to Eq. (10). The initial weightsŴ i (0) = 0. Figure 4 shows the convergence of the neural network weights W 1 and W 2 . The NN approximations of F 2 (X ; p) and F 3 (X ; p) in the time domain are shown in Figure 5. It can be seen that the accurate identification of the system dynamics is achieved. From these figures, we can see that accurate approximation of dynamics F 2 (X ; p) and F 3 (X ; p) are indeed achieved. The accurate NN approximations can be considered as partially true system dynamics F 2 (X ; p) and F 3 (X ; p) stored in constant RBF neural net-worksW T 2 S 2 (X ) andW T 3 S 3 (X ). Correspondingly, the accurate identification of the PMSM velocity response can also be achieved. As an example, the identification results of PMSM with PRBS is presented.
The PMSM first runs at a normal steady-state condition. After a prescribed time Ts = 0.2s has elapsed, the PRBS is sent to the PMSM. The PMSM velocity response with the input PRBS and its identification results are shown in Figure 6, where the blue line is the PMSM velocity response with PRBS, the red line is the identification results. We can see that the accurate identification of the PMSM velocity response is indeed achieved.

C. EXPERIMENTS ON PLATFORM 1) CUT-OFF FREQUENCY IDENTIFICATION
The PMSM used here is a laboratory-scale three-phase motor, the parameters of which are given in Table 1 and were obtained from the nameplate of the selected motor. Figure 8 shows the experimental curves for the cut-off frequency experiment. The cutoff frequency experiment was used to design the period and length of the PRBS signal. Different motor output velocity can be obtained by inputting different VOLUME 8, 2020  periods of the voltage square wave t s on the experimental platform. When the motor speed output is almost zero, the reciprocal 1/t s of the period of the square wave is the cutoff frequency of the motor system. Figure 8 shows the real-time PMSM velocity response of a square-wave input signal with a voltage amplitude of 310 V and t sM = 0.0125 s period  excitation. Therefore, the velocity response value is close to zero, and the cutoff frequency f M is 80 Hz.

2) PRBS INPUT SIGNAL SELECTION FOR SYSTEM IDENTIFICATION
The pseudo-random binary sequence (PRBS) signal is often used as an input signal for system identification. The PRBS signal is a step function generated by a series of shift registers with an XOR operator. The maximum length PRBS signal has a correlation function similar to the white noise correlation function. This property does not hold for non-maximum length sequences. Therefore, the PRBS signal used in the identification process should be the maximum length PRBS signal. In order to design an effective PRBS test sequence, the period and length must be selected correctly. The determination of PRBS with a period of and length N p should follow the rules: where f M is the system cut-off frequency. Then it is easy to determine the PRBS input signal with a period of = 0.003s and a length of N p = 127 according to Eq. (21). By applying this input PRBS sequence, the PMSM velocity system can be fully stimulated to achieve accurate identification of system model behavior. Figure 9 shows the PRBS input used in the simulation and experiment.

3) EXPERIMENTAL RESULTS
In this subsection, we will evaluate the proposed method by using the experimental data from the PMSM platform. Injecting a PRBS input signal to the motor system from 0.2s (as shown in Figure 9), the velocity response exhibits periodic characteristics since the nature of the input PRBS is a periodic signal. The data is sampled by the DSP controller with a period of 0.0025 seconds as shown in Figure 10. It can be seen that from the time 0 to 0.2 seconds, the motor velocity is affected by noise and various uncertainties, which is different from the situation in the simulation. The response curve is shown in the blue line in Figure 10, and the system identification curve is shown in the red line.    Figure 11 shows the convergence of the neural network weights.
To demonstrate the advantages of the method, the PRBS response curve shown in Figure 10 was also identified using the identification method of [28] under the same experimental platform. Figure 12 gives the L1 norm of the identification error using the methods proposed in this paper and reference [28], which shows that the approach of this paper works better.

VI. CONCLUSION
In this study, a novel method via deterministic learning is proposed for identifying the PMSM velocity servo system. It achieves an accurate identification of the PMSM dynamics only based on system states. It is an advancement to use the system state for the identification of real PMSM system from the viewpoint of practical application. The effectiveness and feasibility of the proposed method are demonstrated from the numerical simulation and practical experiment. Different from existing methods in the literature, the identification result contains information about system parameters, various uncertainties, and system structure. Especially, it can be represented and stored in a constant manner, which makes it useful for recognizing similar dynamic behaviors for fault diagnosis or control design.