Interior Permanent Magnet Synchronous Motor Drive System with Machine Learning-Based Maximum Torque per Ampere and Flux-Weakening Control

An interior permanent magnet synchronous motor (IPMSM) drive system with machine learning-based maximum torque per ampere (MTPA) as well as flux-weakening (FW) control was developed and is presented in this study. Since the control performance of IPMSM varies significantly due to the temperature variation and magnetic saturation, a machine learning-based MTPA control using a Petri probabilistic fuzzy neural network with an asymmetric membership function (PPFNNAMF) was developed. First, the d-axis current command, which can achieve the MTPA control of the IPMSM, is derived. Then, the difference value of the dq-axis inductance of the IPMSM is obtained by the PPFNN-AMF and substituted into the d-axis current command of the MTPA to alleviate the saturation effect in the constant torque region. Moreover, a voltage control loop, which can limit the inverter output voltage to the maximum output voltage of the inverter at high-speed, is designed for the FW control in the constant power region. In addition, an adaptive complementary sliding mode (ACSM) speed controller is developed to improve the transient response of the speed control. Finally, some experimental results are given to demonstrate the validity of the proposed high-performance control strategies.


Introduction
IPMSMs have many attractive characteristics, including wide speed operating range, high-power density, and high torque-to-inertia ratio. Thus, IPMSMs has been utilized in many industrial applications [1][2][3][4]. However, the control characteristic of IPMSMs tends to time-varying behavior due to the machine parameters variation caused by the magnetic saturation.
For the IPMSM, the quadrature-axis inductance is increased by the rotor magnetic circuit saliency, which leads to a reluctance torque term incorporating into the torque equation [5]. However, to utilize the advantage of the reluctance torque term in the constant torque and constant power region, appropriate control methods are required. Therefore, an MTPA control has been proposed to improve the torque output in the constant torque region [5][6][7][8][9][10]. In [8], the method of using the high-frequency variation of the output mechanical power combined with a fuzzy-logic controller to obtain the advance angle of the MTPA for an IPMSM was proposed.
Moreover, the method proposed in [9] injects a small virtual current angle signal to track the MTPA operating point and to generate the d-axis current command by utilizing the inherent characteristic of the MTPA operation. With model-based torque correction in [10], an accurate and efficient torque control, as well as robust torque response, can be Figure 1 is the block diagram of the intelligent MTPA and FW-controlled IPMSM drive system with ACSM speed controller. First, the actual rotor position θ rm of the motor is determined by the encoder, and the mechanical speed ω rm is obtained by differentiating θ rm . Next, the mechanical speed ω rm is subtracted from the mechanical speed command ω * rm to derive the mechanical speed error e rm . Then, e rm is inputted into the ACSM speed controller to get the q-axis current command i * q . Moreover, the two inputs and one output PPFNN-AMF is adopted to learn the difference value of the dq-axis inductance L d and L q . The inputs of the PPFNN-AMF are ω * rm and i * q , and the output is the learning result of the dq-axis inductance differencesL d −L q , which is substituted into the MTPA formula to derive the d-axis current command i * d,MTPA for the MTPA control. While the FW control proceeds, the motor speed will be increased above the rated speed. The input of the MTPA block shown in Figure 1 will be switched to FW, and the i * d,MTPA will be kept constant during the FW control. Furthermore, to make sure that the stator voltage command V * s will not exceed the voltage limit V s_max of the inverter V s_max − V * s is inputted into a PI controller to generate the variation of the d-axis current command ∆i * d , which is a negative value. Only when the inverter output voltage V * s exceeds the maximum output voltage V s_max of the inverter, the input of the PI controller will be nonzero. That is to say, the output of the limiter shown in Figure 1 is zero when the input to the limiter is positive.
4. Some test cases with different speed commands and various load torques are investigated to verify the accuracy and robustness of the proposed high-performance control methods in Section 5. Finally, some conclusions are presented in Section 6. Figure 1 is the block diagram of the intelligent MTPA and FW-controlled IPMSM drive system with ACSM speed controller. First, the actual rotor position rm θ of the motor is determined by the encoder, and the mechanical speed rm ω is obtained by differentiating rm θ . Next, the mechanical speed rm ω is subtracted from the mechanical speed command * rm ω to derive the mechanical speed error rm e . Then, rm e is inputted into the ACSM speed controller to get the q-axis current command * q i . Moreover, the two inputs and one output PPFNN-AMF is adopted to learn the difference value of the dq-axis inductance d L and q L . The inputs of the PPFNN-AMF are * rm ω and * q i , and the output is the learning result of the dq-axis inductance differences While the FW control proceeds, the motor speed will be increased above the rated speed. The input of the MTPA block shown in Figure 1 will be switched to FW, and the * , MTPA d i will be kept constant during the FW control. Furthermore, to make sure that the stator voltage command * s V will not exceed the voltage limit of the inverter, the input of the PI controller will be nonzero. That is to say, the output of the limiter shown in Figure 1 is zero when the input to the limiter is positive.   As shown in Figure 1, the three-phase currents i a i b and i c of the VSI are transformed to the corresponding q-axis current i q and d-axis current i d by using the coordinate transformation. In addition, i q and i d are subtracted, respectively from i * q and i * d , and then the dq axis voltage commands v * q and v * d are obtained through the PI controllers of the current loop. After v * q and v * d are obtained, v * α and v * β are derived by using the coordinate transformation. Moreover, the switching signals for the IGBTs of the VSI are generated through the SVPWM, and the switching frequency is 10 kHz. Finally, the switching signals are sent to the IGBTs to achieve intelligent MTPA and FW control.

MTPA Control
The electromagnetic torque of an IPMSM in the dq synchronous frame can be expressed as follows [5]: where λ m is the PM flux linkage; P denotes the number of poles. First, define the relationship of the stator current I s between the dq-axis currents i d and i q Substituting (2) into (1) gives the following relationship: The d-axis current command of MTPA i * d,MTPA can be obtained by differentiating the electromagnetic torque equation with respect to the q-axis current and setting the derivative to zero to obtain the extreme value. The resultant equation is as follows: Since the parameters of the IPMSM are not constant resulting from the effects of magnetic saturation, the measuring method of the dq-axis inductance differences L d − L q will be developed, and the PPFNN-AMF will be adopted to learn the inductance differences in the constant torque region.

Estimation of Permanent-Magnet Flux Linkage
Owing to the magnetic saturation of the rotor core, the value of the q-axis inductance L q is mainly affected by the changing of the air gap flux. Therefore, the value of L q should be estimated online in order to accomplish the desired MTPA control performance. In this study, the inductance difference L d − L q is estimated online instead of the L q and the PPFNN-AMF will be adopted to learn the inductance differences. Before measuring L d − L q , it is necessary to estimate the value of the permanent-magnet flux linkage λ m first. Since the measuring methods of L d , L q and λ m are usually very complex [31,32], a heuristic method is developed in this section to generate the training data for the offline training of the PPFNN-AMF.
Let i d be zero first, then (1) can be simplified as: Add two different load torques T L1 and T L2 to IPMSM, respectively, then (5) can be expressed as: where T f is the friction torque; i q1 is the q-axis current when T L1 is added; i q2 is the q-axis current when T L2 is added;λ m is the estimated permanent-magnet flux linkage. Then, subtract (6) from (7), and one can get According to (8), theλ m can be obtained as follows under any load torque conditions: Afterλ m is obtained, the measuring method of the L d − L q will be illustrated in detail in the next section.

Measuring Method of dq-Axis Inductance Differences
Let i d be zero again, and define a new operating condition as follows: where T e3 and i q3 are the electromagnetic torque and q-axis current of the new operating condition when i d = 0. Then, without changing the load torque and the motor speed, define i d = −i q /3 to generate reluctance torque of IPMSM and (1) can be rewritten as: where i q4 is the q-axis current when i d = −i q /3. Since the operating conditions are the same, (10) and (11) are equal and can be expressed as: According to (12), the dq-axis inductance differences L d − L q can be obtained as follows using the estimated permanent-magnet flux linkageλ m under any operating condition: The PPFNN-AMF is utilized in this study to learn the difference value of the dq-axis inductance of the IPMSM. Therefore, to ensure effective offline training under different operating conditions, the q-axis current command i * q and mechanical speed command ω * rm are the input data, and the corresponding L d − L q is the desired output for the offline training of the PPFNN-AMF. Then, under the real-time motor operation, the output of the trained PPFNN-AMF, which is the estimated dq-axis inductance differenceL d −L q , is substituted into (4) to derive the d-axis current command i * d,MTPA for the MTPA control in the constant torque region.

FW Control
The voltage model of an IPMSM in the dq synchronous frame can be written as [5]: When the IPMSM is operated in the FW region at the steady-state condition, the voltage drop caused by the stator resistance in (14) can be neglected. Then, the dq voltage model of an IPMSM can be rewritten as follows: Moreover, the flux model of an IPMSM in the dq synchronous frame can be described by [5]: It is known from (18) that the principle of FW control is to let i d negative to generate the flux in the opposite direction of the PM to reduce λ d and decrease the back EMF of an IPMSM in the constant power region. This allows IPMSM to continue to increase the rotor speed above the rated speed until the stator voltage command V * s reaches the voltage limit V s_max of the inverter. To make sure that the inverter output voltage V * s will not exceed the maximum output voltage V s_max of the inverter V s_max − V * s is inputted into a PI controller to generate the variation of d-axis current command ∆i * d , which is a negative value. On the other hand, the output of the limiter is zero when the input of the limiter is positive. After this, ∆i * d is added to i * d,MTPA to make the i * d more negative to ensure that V * s is less than V s_max as shown in Figure 1.

ACSM Speed Controller
The block diagram of the proposed ACSM speed controller, where the d-axis current is nonzero, is also shown in Figure 1. The mechanical dynamic equation of an IPMSM can be expressed as follows: where J is the moment of inertia of the IPMSM; B is the damping coefficient; T L is the load torque. By neglecting the load torque, (20) can be modified as: .
The dynamic of an IPMSM drive system can be formulated by using (1) and (21) as follows: . where

4J
; B, J, λ m , L d and L q are the nominal values of damping coefficient, moment of inertia, PM flux linkage, d-axis inductance and q-axis inductance, respectively. By considering the uncertainty, including the existence of parameter variations and external disturbances of the IPMSM drive system, (22) can be rewritten as: .
where D rm = − 1 J ; ∆A rm , ∆B rm , ∆C rm and ∆D rm are the time-varying parameter variations; E rm is the lumped uncertainty and defined as: where ρ is a given positive constant. Define the speed tracking error as follows: Then, one can define the generalized sliding surface as follows: where k is a positive constant. From (27) and (23), the following equation can be obtained: Next, a second sliding surface, known as complementary sliding surface, is designed as follows [27]: With the same positive constant k, an important result concerning the relationship between S and S c can be obtained in the following [27]: Theorem 1. For the system dynamic equation represented by (24), the stability of the proposed ACSM control system can be guaranteed, and the tracking error will reach and converge to a neighborhood of zero in finite time by using the proposed ACSM control law designed as (31). Moreover, the control law shown in (31) is a combination of an equivalent control law designed as (32) and a hitting control law designed as (33), where sat is the saturation function with the boundary layer thickness Φ [33] and is designed to reduce the chattering phenomena. The saturation function is defined as follows: A Lyapunov function is chosen as where V is a positive definite function; E rm = E rm −Ê rm ;Ê rm is the estimated value of the E rm ; γ is a positive constant. Taking the time derivative of the Lyapunov function and using (29) and (30) Therefore, according to (36), the ACSM control law U ACSM and adaptive law .Ê rm are designed as follows: The time derivative of the Lyapunov function can be formulated by (36) and (38) as follows: Using (31)- (33) and (39), one can obtain . V is negative semidefinite, i.e., V(S(t), S c (t)) ≤ V(S(0), S c (0)), which means that S(t) and S c (t) are bounded. Now, one can define the following term: Furthermore, because V(S(0), S c (0)) is bounded and V(S(t), S c (t)) is nonincreasing and bounded, the following result can be obtained: In addition, . P(t) is also bounded. Then, P(t) is uniformly continuous. Using Barbalat's lemma [33], the following result can be derived: Thus, (44) means that S(t) and S c (t) will converge to zero as t → ∞ . Moreover, lim t→∞ e rm (t) = 0 and lim t→∞ . e rm (t) = 0. Therefore, the ACSM system guarantees the asymptotic stability of the speed tracking error e rm , even if the parameter variations, external disturbances, and friction force exist.

PPFNN-AMF
The PPFNN-AMF proposed in [23] was utilized in this study to estimate the difference value of the dq-axis inductance of the IPMSM. The network structure and learning algorithms are presented in the following paragraphs.

Network Structure
There are six layers, which consist of the input, membership, Petri, probabilistic, rule and output layers with two inputs and one output in the network structure of the PPFNN-AMF shown in Figure 2a. The signal propagation of each layer is described in detail in the following: Input layer: The input and the output of the node of the input layer are represented as follows: where x i denotes the ith input to the input layer; N denotes the Nth iteration. The inputs of the PPFNN-AMF are e 1 (N) = ω * rm and e 2 (N) = i * q , which are the mechanical speed and the q-axis current command, respectively.
In addition, is also bounded. Then, ) (t P is uniformly continuous. Using Barbalat's lemma [33], the following result can be derived:

PPFNN-AMF
The PPFNN-AMF proposed in [23] was utilized in this study to estimate the difference value of the dq-axis inductance of the IPMSM. The network structure and learning algorithms are presented in the following paragraphs.

Network Structure
There are six layers, which consist of the input, membership, Petri, probabilistic, rule and output layers with two inputs and one output in the network structure of the PPFNN-AMF shown in Figure 2a. The signal propagation of each layer is described in detail in the following: Input layer: The input and the output of the node of the input layer are represented as follows:

Membership layer
The asymmetric Gaussian functions were adopted as the membership function in each node of this layer to implement the fuzzification operation shown in Figure 2b. In addition, the input and output of the node are expressed in the following:

Membership Layer
The asymmetric Gaussian functions were adopted as the membership function in each node of this layer to implement the fuzzification operation shown in Figure 2b. In addition, the input and output of the node are expressed in the following: In (46) and (47), net j (N) and µ j (N) represent the input and the output of the membership layer. Moreover, m j denotes the mean of the asymmetric Gaussian function in the jth term associated with the ith input variable. Furthermore, σ lj and σ rj represent the left-hand-side and right-hand-side standard deviations of the asymmetric Gaussian function in the jth term associated with the ith input variable.

Petri Layer
In this layer, the transition is fired or unfired by the following equations: where t p is the transition, d th is a threshold value, and is varied by the function V = (ω * rm + i * q )/2; α and β are positive constants. The relationship between the input and output of the Petri layer is presented as follows:

Probabilistic Layer
The receptive field function is a Gaussian function in the probabilistic layer and described as follows: In (52) and (53), m k and σ k denote the mean and standard deviation of the Gaussian function, and P k (µ p ) denotes its output.

Rule Layer
The node input and the node output of the rule layer are described as: In (54)-(56), superscript I denotes the input, subscript l denotes the node number, and superscript o indicates the output. Moreover, µ I l and P I l represent the inputs of rule layer; w jl , which is set to 1, represents the connective weight between the membership layer and the rule layer; w kl , which is also set to 1, represents the connective weight between the probabilistic layer and the rule layer; µ o l represents the output of the rule layer.

Output Layer
In the output layer, the node is denoted by Σ performing the summation operation. Hence, the output of this layer, which is the estimated dq-axis inductance differenceL d −L q , is given as follows:

Learning Algorithms
In order to illustrate the learning algorithms of the PPFNN-AMF, first, the energy function E is defined as: where y d is the desired output. Then, the learning algorithms are explained as follows: The error term, which is propagated back from the output layer, is computed as: According to the chain rule, the connective weight w l is updated by the amount: where η 1 is the learning rate and the connective weight w l is updated as follows: The error term to be propagated is calculated as follows:

Membership Layer
In this layer, the error term needs to be calculated and propagated as follows: The mean of the asymmetric Gaussian function m j is defined and calculated as follows: where η 2 denotes the learning rate of the mean of the asymmetric Gaussian function. Moreover, the left-hand-side and right-hand-side standard deviations of the asymmetric Gaussian function are calculated in the following: where η 3 , η 4 represent the learning rates of the left-hand-side σ lj and right-hand-side σ rj standard deviations of the asymmetric Gaussian function, respectively. Therefore, the mean and the left-hand-side and right-hand-side standard deviations of the asymmetric Gaussian function are updated according to the following equations: The exact calculation of the Jacobian of the system, which is contained in ∂E/∂y(N), is very difficult in practical applications. Thus, a delta adaptation law is proposed in the following The detailed convergence analysis of the PPFNN-AMF can be referred to [23].

Experimental Results
To facilitate the verification of the proposed control strategies, the IPMSM test platform and the experimental drive system are shown in Figure 3. The IPMSM test platform comprised the IPMSM, the gearbox (with gear ratio 4:1), the torque meter and the magnetic powder brake. The total moment of inertia of the motor test platform was 1.4010737 × 10 −2 Nm/(rad/s 2 ). The detailed information of the magnetic powder brake and IPMSM is listed in Tables 1 and 2. The DSP -based motor drive included the DSP control boards, and PWM VSI are also shown in Figure 3. A torque meter with 100 Nm/ 7000 rpm was utilized for the measurement of the load torque. The resolution of the adopted encoder is only 8000 pulsed/rotation. Moreover, the maximum speed of the IPMSM in the experimentation was 3750 rpm in the constant power region. By using the gearbox with a gear ratio of 4:1 to reduce the speed, the maximum speed of the magnetic powder brake 937.5 rpm was smaller than the rated speed of the magnetic powder brake 1800 rpm. Furthermore, the ratings of the VSI using IGBTs was 5 kW/220 V/14 A. The switching frequency of 10 kHz was controlled by using SVPWM technology. The DC link voltage provided by an adjustable DC power supply was set at 311 V. According to the SVPWM, the inverter maximum output voltage V s_max was set to 311/ √ 3 ≈ 179 V. In addition, the experimental cutoff frequency of the IPMSM drive system, including the motor test platform with ACSM speed controller, was about 30 Hz, which could be obtained by using an Agilent 35670A dynamic signal analyzer. The low bandwidth was due to the large inertial of the motor test platform, which includes IPMSM, gear, torque meter and magnetic powder brake, and the low-resolution of the adopted encoder. Since the moment of inertia of the IPMSM was 4.07473 × 10 −3 Nm/(rad/s 2 ), the resultant load moment of inertia ratio was 2.44:1. bandwidth was due to the large inertial of the motor test platform, which includes IPMSM, gear, torque meter and magnetic powder brake, and the low-resolution of the adopted encoder. Since the moment of inertia of the IPMSM was 3 10 4.07473   Nm/(rad/s 2 ), the resultant load moment of inertia ratio was 2.44:1.

 
The controllers were implemented with a 120 MHz TMS320F28075 32-bit floatingpoint DSP to enhance computation performance of the proposed intelligent MTPA and  The controllers were implemented with a 120 MHz TMS320F28075 32-bit floatingpoint DSP to enhance computation performance of the proposed intelligent MTPA and FW control with ACSM speed control system. The flowcharts of the proposed ACSM controller and PPFNN-AMF are provided in Figure 4. Since the PPFNN-AMF was trained offline, the complexity was much reduced for the real-time implementation in the DSP. By using the clock tool of the Texas Instruments Code Composer Studio v6.2 program editing interface, the execution time of the "C" program could be obtained. The operation cycles and execution time for the proposed ACSM controller and PPFNN-AMF were 40 cycles (0.00033 ms) and 5252 cycles (0.0437 ms), respectively. Although the implemented complexity of the proposed ACSM controller and PPFNN-AMF were higher than that of the traditional PI controller and MTPA control, the execution time of the proposed ACSM controller was much less than the outer speed control loop time 1 ms (speed sampling time). Moreover, the execution time of the PPFNN-AMF was still less than the inner current control loop time of 0.1 ms (current sampling time). offline, the complexity was much reduced for the real-time implementation in the DSP. By using the clock tool of the Texas Instruments Code Composer Studio v6.2 program editing interface, the execution time of the "C" program could be obtained. The operation cycles and execution time for the proposed ACSM controller and PPFNN-AMF were 40 cycles (0.00033 ms) and 5252 cycles (0.0437 ms), respectively. Although the implemented complexity of the proposed ACSM controller and PPFNN-AMF were higher than that of the traditional PI controller and MTPA control, the execution time of the proposed ACSM controller was much less than the outer speed control loop time 1 ms (speed sampling time). Moreover, the execution time of the PPFNN-AMF was still less than the inner current control loop time of 0.1 ms (current sampling time).
The mechanical speed command 
The mechanical speed command ω * rm , the mechanical speed ω rm , the mechanical speed error e rm , and the q-axis current command i * q in Cases 1 to 4 are shown in Figures 5-8, respectively.
According to Figures 5 and 6, the parameter γ had little effect on the speed responses of the system. On the other hand, based on Figures 6-8, the parameter k had a greater influence on the speed responses than the parameter γ. A larger k will make the mechanical speed error smaller, but it will cause larger q-axis current command. Therefore, the selection of the value of k was a tradeoff between speed response and starting current. In this study, in order to achieve the best control performance with the consideration of stability, the parameters of the ACSM speed controller were set to be k = 24, γ = 10 by trial and error.
of the system. On the other hand, based on Figures 6-8, the parameter k had a greater influence on the speed responses than the parameter γ. A larger k will make the mechanical speed error smaller, but it will cause larger q-axis current command. Therefore, the selection of the value of k was a tradeoff between speed response and starting current. In this study, in order to achieve the best control performance with the consideration of stability, the parameters of the ACSM speed controller were set to be k = 24, γ = 10 by trial and error.    of the system. On the other hand, based on Figures 6-8, the parameter k had a greater influence on the speed responses than the parameter γ. A larger k will make the mechanical speed error smaller, but it will cause larger q-axis current command. Therefore, the selection of the value of k was a tradeoff between speed response and starting current. In this study, in order to achieve the best control performance with the consideration of stability, the parameters of the ACSM speed controller were set to be k = 24, γ = 10 by trial and error.    According to Figures 5 and 6, the parameter γ had little effect on the speed responses of the system. On the other hand, based on Figures 6-8, the parameter k had a greater influence on the speed responses than the parameter γ. A larger k will make the mechanical speed error smaller, but it will cause larger q-axis current command. Therefore, the selection of the value of k was a tradeoff between speed response and starting current. In this study, in order to achieve the best control performance with the consideration of stability, the parameters of the ACSM speed controller were set to be k = 24, γ = 10 by trial and error.

PPFNN-AMF Estimator
As mentioned in Section 2.  Figure 9, and the training result after 10,000 epochs training of the PPFNN-AMF is shown in Figure 10. Since the measuring of all the training data was performed under nominal motor operating conditions, the temperature condition of all the obtained training data were the same as the experimentation shown in Figures 11-15. In order to verify the training accuracy of PPFNN-AMF at different operating speed and load torque conditions, the training errors of five conditions are shown in Table 3. According to Table 3, the biggest training error was 1.689%. The rest training errors were all smaller than 1%, which could demonstrate that the PPFNN-AMF was well trained.

PPFNN-AMF Estimator
As mentioned in Section 2.3, to ensure effective offline training under different operating conditions of load torque and speed, the q-axis current command i * q and mechanical speed command ω * rm were the input data, and the measured dq-axis inductance difference L d − L q was the desired output for the offline training of the PPFNN-AMF. The training data, including 39 different i * q , 13 different ω * rm and 507 measured, L d − L q are shown in Figure 9, and the training result after 10,000 epochs training of the PPFNN-AMF is shown in Figure 10. Since the measuring of all the training data was performed under nominal motor operating conditions, the temperature condition of all the obtained training data were the same as the experimentation shown in Figures 11-15. In order to verify the training accuracy of PPFNN-AMF at different operating speed and load torque conditions, the training errors of five conditions are shown in Table 3. According to Table 3, the biggest training error was 1.689%. The rest training errors were all smaller than 1%, which could demonstrate that the PPFNN-AMF was well trained.

MTPA Control
After the PPFNN-AMF having been well trained offline, the output of the PPFNN-AMF q d L L could be substituted into the MTPA formula to get the d-axis current command of the MTPA under different operating conditions. Five test cases with different operating speed and load torque shown in Table 3 were selected to test the validity of the proposed intelligent MTPA control. The IPMSM was first operated with , and then the proposed MTPA control was performed at time 10  t s. The experimental results of the MTPA control at (1) 500 rpm operating speed with 6 Nm and 9 Nm load torque; (2) 1500 rpm operating speed with 6 Nm and 9 Nm load torque; (3) rated speed 2000 rpm with rated torque 9.5 Nm, which was the rated output power 2 kW condition, were illustrated in Figures 11-15, respectively. Figures 11a, 12a, 13a, 14a

MTPA Control
After the PPFNN-AMF having been well trained offline, the output of the PPFNN-AMF q d L L could be substituted into the MTPA formula to get the d-axis current command of the MTPA under different operating conditions. Five test cases with different operating speed and load torque shown in Table 3 were selected to test the validity of the proposed intelligent MTPA control. The IPMSM was first operated with , and then the proposed MTPA control was performed at time 10  t s. The experimental results of the MTPA control at (1) 500 rpm operating speed with 6 Nm and 9 Nm load torque; (2) 1500 rpm operating speed with 6 Nm and 9 Nm load torque; (3) rated speed 2000 rpm with rated torque 9.5 Nm, which was the rated output power 2 kW condition, were illustrated in Figures 11-15, respectively. Figures 11a, 12a, 13a, 14a

MTPA Control
After the PPFNN-AMF having been well trained offline, the output of the PPFNN-AMFL d −L q could be substituted into the MTPA formula to get the d-axis current command of the MTPA under different operating conditions. Five test cases with different operating speed and load torque shown in Table 3 were selected to test the validity of the proposed intelligent MTPA control. The IPMSM was first operated with i * d = 0, and then the proposed MTPA control was performed at time t = 10 s.
The experimental results of the MTPA control at (1) 500 rpm operating speed with 6 Nm and 9 Nm load torque; (2) 1500 rpm operating speed with 6 Nm and 9 Nm load torque; (3) rated speed 2000 rpm with rated torque 9.5 Nm, which was the rated output power 2 kW condition, were illustrated in Figures 11-15, respectively. Figures 11a, 12a, 13a, 14a and 15a present the mechanical speed command ω * rm , the mechanical speed ω rm and the mechanical speed error e rm . The q-axis current command i * q , the d-axis current command i * d and the amplitude of stator current I s are shown in Figures 11b, 12b, 13b, 14b and 15b. In all test cased observed from Figures 11-15, the intelligent MTPA control could effectively reduce the stator current I s with negative d-axis current command i * d according to (4).
It was very difficult to verify the accuracy of the training dataL d −L q with the real data L d − L q . Nevertheless, to verify the effectiveness of the proposed intelligent MTPA control at different operating conditions in Table 3, the d-axis current command i * d was gradually changed from 0 A to −8 A to find out the lowest value of the stator current I s via experimentation [34]. The lowest value of the stator current, which could satisfy the specific operating condition in terms of speed and load torque, i.e., the MTPA operating point at that specific operating condition, could be obtained by varying the d-axis current command gradually as shown in Figures 16-20. The experimental results of finding the lowest stator current at (1) 500 rpm operating speed with 6 Nm and 9 Nm load torque; (2) 1500 rpm operating speed with 6 Nm and 9 Nm load torque; (3). 2000 rpm with rated torque 9.5 Nm are illustrated in Figures 16-20, respectively. The mechanical speed ω rm , the q-axis current command i * q , the d-axis current command i * d and the stator current I s are all presented in Figures 16-20. Moreover, the experimental results of Figures 11-20 are compared in Table 4. The stator currents of the proposed intelligent MTPA control shown in Figures 11-15 were quite close to the lowest values at all test cases shown in Figures 16-20, which could verify that the proposed IPMSM drive system could achieve effective MTPA control.
the amplitude of stator current s I are shown in Figures 11b, 12b, 13b, 14b and 15b. In all test cased observed from Figures 11-15, the intelligent MTPA control could effectively reduce the stator current s I with negative d-axis current command * d i according to (4).
It was very difficult to verify the accuracy of the training data  Table 3, the d-axis current command * d i was gradually changed from 0 A to −8 A to find out the lowest value of the stator current s I via experimentation [34]. The lowest value of the stator current, which could satisfy the specific operating condition in terms of speed and load torque, i.e., the MTPA operating point at that specific operating condition, could be obtained by varying the d-axis current command gradually as shown in Figures 16-20. The experimental results of finding the lowest stator current at (1) 500 rpm operating speed with 6 Nm and 9 Nm load torque; (2) Table 3, the d-axis current command * d i was gradually changed from 0 A to −8 A to find out the lowest value of the stator current s I via experimentation [34]. The lowest value of the stator current, which could satisfy the specific operating condition in terms of speed and load torque, i.e., the MTPA operating point at that specific operating condition, could be obtained by varying the d-axis current command gradually as shown in Figures 16-20. The experimental results of finding the lowest stator current at (1) 500 rpm operating speed with 6 Nm and 9 Nm load torque; (2) 1500 rpm operating speed with 6 Nm and 9 Nm load torque; (3). 2000 rpm with rated torque 9.5 Nm are illustrated in Figures   16-20

Conclusions
An IPMSM drive system with machine learning-based MTPA control in the constant torque region and an FW control in the constant power region was successfully developed in this study.
Moreover, an ACSM speed controller was developed to improve the transient response of the speed control. In the intelligent MTPA control, first, the d-axis current command which can achieve the MTPA control was derived. Then, the difference value of the dq-axis inductance of the IPMSM was obtained by a well-trained PPFNN-AMF and substituted into the formula of d-axis current command to achieve the MTPA control and to alleviate the effect of the magnetic saturation. In the FW control, a voltage control loop was designed to limit the inverter output voltage to the maximum output voltage of the inverter by increasing the negative d-axis current at high-speed. Finally, some experimental results were provided to demonstrate the validity of the proposed high-performance control strategies of the IPMSM drive system, including the ACSM speed control, the intelligent MTPA control and the FW control.
The main contributions of this study are listed as follows: (1) An ACSM speed controller considering nonzero d-axis current was proposed to improve the robustness of the speed control. Moreover, the Lyapunov stability theorem was used to derive the adaptive law, which was used for online estimation of the lumped uncertainty. (2) The PPFNN-AMF was adopted in this study to learn the difference value of the dq-axis inductance of the IPMSM offline. After the PPFNN-AMF was well-trained, the difference value of the

Conclusions
An IPMSM drive system with machine learning-based MTPA control in the constant torque region and an FW control in the constant power region was successfully developed in this study.
Moreover, an ACSM speed controller was developed to improve the transient response of the speed control. In the intelligent MTPA control, first, the d-axis current command which can achieve the MTPA control was derived. Then, the difference value of the dq-axis inductance of the IPMSM was obtained by a well-trained PPFNN-AMF and substituted into the formula of d-axis current command to achieve the MTPA control and to alleviate the effect of the magnetic saturation. In the FW control, a voltage control loop was designed to limit the inverter output voltage to the maximum output voltage of the inverter by increasing the negative d-axis current at high-speed. Finally, some experimental results were provided to demonstrate the validity of the proposed high-performance control strategies of the IPMSM drive system, including the ACSM speed control, the intelligent MTPA control and the FW control.
The main contributions of this study are listed as follows: (1) An ACSM speed controller considering nonzero d-axis current was proposed to improve the robustness of the speed control. Moreover, the Lyapunov stability theorem was used to derive the adaptive law, which was used for online estimation of the lumped uncertainty. (2) The PPFNN-AMF was adopted in this study to learn the difference value of the dq-axis inductance of the IPMSM offline. After the PPFNN-AMF was well-trained, the difference value of the dq-axis inductance of the IPMSM was obtained by the PPFNN-AMF and substituted into the d-axis current command of the MTPA to alleviate the saturation effect in the constant torque region. (3) The successful implementation of the intelligent MTPA and FW control with the proposed ACSM speed controller in a 32-bit floating-point DSP was built to achieve the MTPA and FW control at different speeds and load torque conditions for an IPMSM drive.