MTPA Control for IPMSM Drives Based on Pseudorandom Frequency-Switching Sinusoidal Signal Injection

: Among various maximum torque per ampere (MTPA) control schemes for interior permanent magnet synchronous motor (IPMSM) drives, the signal-injection-based methods exhibit relatively high overall performance due to their high control accuracy and satisfactory dynamic performance. However, the high current spectrum peaks induced by the ﬁxed-frequency signal injection may cause electromagnetic interference and even audible noise problems in applications, such as electric vehicles, vessels, and aircraft. To address this problem, an MTPA control method using pseudorandom frequency-switching sinusoidal signal injection is proposed in this paper. The sinusoidal signals with two different frequencies are randomly injected into the d - and q -axis currents and the MTPA points can be tracked according to the resultant system response. In this way, a high-performance MTPA control can be achieved regardless of motor parameter variations. Since the injection frequency of the proposed method varies randomly, the induced harmonic components in phase currents no longer concentrate at certain frequencies, and the current spectrum peaks caused by signal injection can be reduced accordingly. The experimental results demonstrate the validity of the presented method.


Introduction
Permanent magnet synchronous motors (PMSMs) are well known for their high efficiency, high power density, high torque to inertia ratio, etc [1,2]. Interior PMSMs (IPMSMs), as a special kind of PMSMs, also have the advantages of robust rotor structure and strong flux weakening capability, and thus are being increasingly applied in electric vehicles. For an IPMSM, both the alignment torque and reluctance torque can be generated, and a proper current control strategy is required to distribute the dand q-axis currents. Among current control strategies, such as maximum efficiency per ampere control [3], loss minimization control [4], and maximum torque per ampere (MTPA) control [5], the MTPA control is the most widely adopted choice. With this strategy, the required torque can be generated with the minimum current magnitude, and hence the losses of both the IPMSM and its drive can be effectively reduced.
It is well known that MTPA control is closely related to multiple motor parameters, and these parameters vary with the operating conditions of the motor [6,7]. To deal with this challenge, numerous MTPA control methods considering motor parameter variations have been presented, which can be divided into five categories: (1) look-up table (LUT)-based methods; (2) search-based methods; (3) equation-based methods; (4) signal-injection-based methods, and (5) virtual-signal-injection-based methods.
The LUT-based methods and the search-based methods acquire the MTPA operating points by means of offline tests (or numerical analysis) [8] and online search [9], respectively. These methods have the advantage of requiring no motor parameters, but they may suffer from some problems. For instance, the LUT-based methods are time-consuming and are unable to fully consider the motor parameter variations due to the temperature or aging effects, while the search-based methods exhibit relatively poor dynamic performance.
The equation-based methods are a type of widely applied MTPA control scheme, which uses the MTPA equation derived from the motor mathematical model to calculate the MTPA current [10] or flux [11] online. The motor parameters in the MTPA equation are usually obtained from predefined LUTs [12] or online parameter estimations [13] to cope with the influence of parameter variations. Nevertheless, most of these methods neglect the derivatives of motor parameters with respect to the current vector angle (or dand q-axis currents), which may cause large MTPA control deviation at a high current amplitude level [14]. In Ref. [15], the derivatives of motor parameters were considered via a variable equivalent parameter. However, this method still needs to be improved to obtain the equivalent parameter completely online.
The signal-injection-based methods are a type of parameter-insensitive MTPA control scheme, which inject high-frequency (HF) signals into the motor, and then detect the MTPA points according to the resultant response of a system variable, such as torque [16], speed [17], speed regulator output [18], electric power [19], stator flux linkage [20], and dclink current [21]. In this way, an MTPA control with high accuracy and satisfactory dynamic performance can be achieved. The existing signal-injection-based methods usually use fixed injection frequencies, and the induced HF components in phase currents concentrate at certain frequencies, resulting in high current spectrum peaks. These high current spectrum peaks induced by the injected HF signals may cause electromagnetic interference and even audible noise problems [22], imposing a severe restriction to the widespread application of the signal-injection-based methods.
The virtual-signal-injection-based methods are a type of interesting MTPA control scheme. Instead of real injection, these methods inject HF signals into the current vector angle mathematically and then adjust the current vector according to the virtual torque response until the MTPA condition is reached [23][24][25][26]. Since this type of method requires no real-signal injection, the possible negative effects due to the injected signals can be avoided. However, the derivatives of motor parameters with respect to the current vector angle are not fully considered in these methods. Hence, like the equation-based methods, they may also suffer from the control deviation problem at high current amplitude levels. To address this problem, a virtual-signal-injection-based method with an online derivative term estimator was proposed in [27]. Unfortunately, its dynamic performance is unsatisfactory.
According to the above discussions, the signal-injection-based methods have the advantages of high control accuracy and satisfactory dynamic performance, exhibiting relatively high overall performance among different types of MTPA control schemes; however, the high current spectrum peaks due to the conventional fixed-frequency signal injection may cause negative effects in some applications.
In this paper, a novel MTPA control method based on a pseudorandom frequencyswitching (PRFS) signal injection is proposed for IPMSM drives. Different from the conventional signal-injection-based methods, the injection frequency of the proposed method switches randomly between two candidate frequencies. In this way, the harmonic current will no longer concentrate at certain frequencies, and the current spectrum peaks due to the signal injection can be reduced accordingly. Moreover, the proposed method inherits the advantages of the signal-injection-based methods, and hence, it can realize a highperformance MTPA control regardless of motor parameter variations. The effectiveness of the presented method is validated by extensive experiments on an IPMSM drive system.

MTPA Indicator
The mathematical model of an IPMSM can be expressed in the rotor reference frame as: where u d,q , i d,q , and L d,q are the dand q-axis voltages, currents, and inductances, respectively; R, ψ f , ω m , p, and Te are the stator resistance, permanent magnet flux linkage, mechanical angular speed, number of pole pairs, and electromagnetic torque, respectively. For a practical IPMSM, the parameters L d , L q , and ψ f are usually functions of i d and i q due to magnetic saturation. It can be seen from Equation (3) that, for a given torque, there can be countless combinations of i d and i q . Among these (i d , i q ) combinations, the optimal combination with the minimum current magnitude is called the MTPA point. To obtain the MTPA point, the most common practice is to calculate it by substituting nominal motor parameters into the MTPA Equation (4). However, such a practice may result in large MTPA control deviation due to the neglect of motor parameter variations [14].
In fact, the MTPA points considering motor parameter variations can be considered as solutions to the following constrained optimization problem: where |i s | is the magnitude of the stator current, and T e0 is the desired torque. From the constrained optimization problem (5), the MTPA condition i d (∂T e /∂i q ) − i q (∂T e /∂i d ) = 0 can be derived using the Lagrange multiplier method. For convenience, let the left-hand side of the above MTPA condition be denoted by F, i.e., Then, the derived MTPA condition i d (∂T e /∂i q ) − i q (∂T e /∂i d ) = 0 can be summarized as F = 0. According to [21], the schematic diagram of the typical i d − |i s | and i d − F curves under a constant torque can be shown in Figure 1, which is helpful to understand the detailed characteristics of F. As can be seen, the characteristics of F are as follows: (1) the sign of F indicates that the operating point is located at the left or right side of the MTPA point, and F = 0 is satisfied at the MTPA point; (2) the value of F reflects the distance between the operating point and the MTPA point. Given these characteristics, F can serve as an MTPA indicator, and an accurate MTPA control can be achieved by forcing F = 0.

Proposed MTPA Control Method Based on PRFS Signal Injection
To realize a signal-injection-based MTPA operation with low injection-induced current spectrum peaks, an MTPA control method using PRFS sinusoidal signal injection is proposed in this section.

PRFS Sinusoidal Signal for Injection
As reported in [21], the HF signals injected into the dand q-axis currents for MTPA control can be expressed as: where i d0 and i q0 are the dc components of the dand q-axis currents, respectively, and A (0 < A < 0.08) and ω h are the injection gain and injection frequency, respectively. In the conventional signal-injection-based methods, the injection frequencies are fixed, and the induced HF components in phase currents concentrate at certain frequencies, causing high current spectrum peaks. Unlike the conventional methods, the injection frequency of the proposed method is selected randomly between two candidate frequencies, so as to reduce the injection-induced current spectrum peaks. Figure 2 shows the schematic diagram of the PRFS sinusoidal signal generation. As can be seen, N is a pseudorandom number between 0 and 1; if N = 0, the lower candidate frequency ω h1 is chosen as the injection frequency, otherwise, the higher candidate frequency ω h2 is chosen, as shown in Equation (8); after finishing a sinusoidal cycle, the pseudorandom number N is updated; by repeating the above processes, the PRFS sinusoidal signal for MTPA control can be generated. It should be noted that to make the randomly varying injection frequency switches at the zero point of the sinusoidal signal, the periods corresponding to ω h1 and ω h2 should be integral multiples of the pulse width modulation (PWM) period. In this paper, the generation of the pseudorandom number N is primarily based on the 32-bit xorshift algorithm [28] represented by: where ⊕ represents the bitwise XOR operator, the subscript "k" denotes the kth injection cycle, S k is the 32-bit pseudorandom number among [1, 2 32 − 1] whose initial value is 2,463,534,242, and X and Y are the 32-bit intermediate variables. Then, the pseudorandom number N between 0 and 1 can be generated according to S k as: where S p is the switching probability, which is set according to Equation (11) in this paper to equalize the action time of the two candidate injection frequencies.

Electric Power Response Due to Signal Injection
The electric power of the motor, i.e., P e can be expressed as Equation (12). Based on Equations (1)-(3), Equation (12) can be rewritten as Equation (13).
It follows from Equation (7) that the dand q-axis currents after the signal injection can be expressed as: Next, substituting Equation (14) into Equation (13) yields the electric power considering the signal injection, namely: It can be observed from Equation (15) that to analyze the response of P e due to the signal injection, specific information regarding the resultant torque T e (i d , i q ) is required. By performing the bivariate Taylor series expansion, the resultant torque T e (i d , i q ) can be represented as: In Equation (16), the term in the square bracket is actually the dc component of the MTPA indicator F shown in Equation (6), namely: This means that the resultant torque T e (i d , i q ) shown in Equation (16) can be rewritten as: After T e (i d , i q ) is derived, by substituting Equation (18) into Equation (15), a more detailed expression of the electric power response due to the signal injection can be obtained as:

Extraction of MTPA Indicator Information
Because the dc component of the MTPA indicator, i.e., F(i d0 , i q0 ) indicates whether the operating point (i d0 , i q0 ) is the MTPA point, it is necessary to evaluate F(i d0 , i q0 ). As can be seen from Equation (19), F(i d0 ,i q0 ) is contained in the last term of the electric power P e , i.e., the term proportional to sinω h t. In this case, the information regarding F(i d0 ,i q0 ) can be extracted from P e with the demodulation technique shown in Figure 3. As can be seen in Figure 3, the electric power P e is first filtered by a band-pass filter (BPF). Since the center frequency of the BPF varies with the random-injection frequency ω h , the injection frequency component of P e (i.e., the terms containing sinω h t and cosω h t in Equation (19)) can be extracted by this BPF. Then, the output of the BPF is multiplied by sinω h t, and the product can be represented by Equation (20). After that, this product is fed into a low-pass filter (LPF) to obtain only the dc component, i.e., the last term of Equation (20). Finally, the obtained dc component Aω m F(i d0 ,i q0 )/2 is divided by Aω m /2, and the MTPA indicator information F(i d0 ,i q0 ) can be extracted.
As discussed above, the MTPA indicator information F(i d0 ,i q0 ) can be extracted from the electric power P e under the PRFS signal injection. This MTPA indicator information will be employed to adjust the operating point of the motor until it equals zero, i.e., F(i d0 ,i q0 ) = 0. In this way, the motor can operate on the MTPA points.

Implementation of the Proposed MTPA Control Scheme
From the above discussions, the implementation of the proposed MTPA control scheme can be depicted in Figure 4, where the superscript "*" represents the reference value. The PRFS sinusoidal signal generation module is used to provide the desired PRFS sinusoidal signal. The injected signal references i * dh and i * qh can be calculated using Equation (7), accordingly. Then, with the help of the current control loop module, the injected signals can be injected into the dand q-axis currents according to their references i * dh and i * qh . In this case, the MTPA indicator information F(i d0 ,i q0 ) can be extracted from the electric power P e through the MTPA indicator information extraction module, as discussed in Sections 3.2 and 3.3. Since F(i d0 ,i q0 ) is equal to zero when the operating point (i d0 , i q0 ) is at the MTPA point, it is employed to generate i * d0 through an integrator controller with a zero command value. In this way, F(i d0 ,i q0 ) can be forced to zero, i.e., the motor can operate on the MTPA points. In Figure 4, the reference of the dc component of the q-axis current (namely, i * q0 ) is generated based on Equation (21), where the motor parameters L d , L q , and ψ f can be assumed as their nominal values. The generation of the reference i * d0 is independent of i * q0 and Equation (21), and hence, although inaccurate motor parameters are employed in Equation (21), the accuracy of the MTPA point tracking will not be affected [14]. The adoption of inaccurate motor parameters in Equation (21) may result in torque error, which can be automatically compensated by the speed control loop.
Different from the conventional signal-injection-based methods, which use fixed injection frequencies, the proposed method employs the pseudorandom-switching injection frequency, making the current harmonics no longer concentrated at certain frequencies.
Hence, the proposed method can exhibit lower injection-induced current spectrum peaks compared with the conventional methods. Moreover, it can be seen from Figure 4 that the MTPA indicator information can be obtained independently of motor parameters. Thus, although the injection frequency varies randomly, the proposed method inherits the advantage of the signal-injection-based methods, i.e., being robust to motor parameter variations.
To visually demonstrate the performance of the proposed MTPA control method against motor parameter variations, Figure 5 shows the simulation results under a load torque of 30 N·m when a 20% step change is manually applied to the motor parameter ψ f and L q . It can be seen that although the MTPA currents changed after the step change is applied to motor parameters, the measured dand q-axis currents can still converge to the new MTPA currents accurately. This means that the proposed method is stable under severe motor parameter variations, and the motor parameter variations have a very limited effect on the MTPA control accuracy of the proposed method.

Current Control Loop Considering PRFS Signal Injection
In this paper, the PRFS current signal injection is required, which needs to be realized through the current control loop. However, the conventional PI-based current control loop is not competent for this task since the injection frequency is high and pseudorandomswitching. The current control loop reported in [19] may support the changeable signal injection frequency. Nevertheless, the process variables and outputs of the two separated BPFs cannot be reasonably assigned at the frequency-switching moment, making the HF components unable to rapidly track their references after the frequency-switching, as shown in the results presented in [19]. To meet the requirement of the PRFS current signal injection, a variable-frequency BPF is used to replace the two separated BPFs of the current control loop in [19]. Then, the enhanced current control loop can be shown in Figure 6, which contains the PI-based control loop and the PRFS sinusoidal signal auxiliary control loop, allowing both the dc and randomly-injected components of the dand q-axis currents to track their references.
It can be seen from Figure 6 that the PRFS auxiliary control loop consists of BPFs and proportional controllers. The center frequencies of the BPFs are set at the injection frequency ω h to extract the randomly-injected components i dh and i qh . This makes it possible for the auxiliary control loop to regulate only the randomly-injected components with no influence on the dc components. Additionally, it can be observed from Figure 6 that the PI-based control loop also has an effect on the regulation of the randomly-injected components. This is because the inputs of the PI controllers, i.e., i * d − i d and i * q − i q contain the randomlyinjected components i * d h − i dh and i * q h − i qh , respectively. Considering the effects of both the PRFS sinusoidal signal auxiliary control loop and the PI-based control loop, the equivalent block diagram of the injection frequency current control loop (take the d axis as an example) can be shown in Figure 7.   Figure 7, the transfer function of the equivalent injection frequency current control loop can be derived as: Substituting s = jω h into Equation (22), the frequency characteristic of Equation (22) at the injection frequency ω h can be obtained as follows: The gain k h of the proportional controllers in the injection frequency control loop can be designed as the value satisfying Then, combining Equations (23) and (24) yields Equation (25). This means that the PRFS sinusoidal reference i * dh can be accurately tracked by i dh . Similarly, the PRFS sinusoidal reference i * qh can also be accurately tracked by i qh . Therefore, the desired PRFS sinusoidal signals can be accurately injected into the dand q-axis currents with the current control loop shown in Figure 6. The PRFS sinusoidal tracking performance of the current control loop will be verified in Section 4.

Experimental Results
To experimentally evaluate the performance of the proposed MTPA control method, experiments were conducted on a prototype IPMSM drive system. The IPMSM is coaxially coupled to a dynamometer, where the dynamometer is operated in speed control mode and the tested IPMSM is operated in torque control mode. The parameters of the IPMSM are listed in Table 1. The control algorithm is implemented through dSPACE DS1202. The PWM frequency and the current sampling frequency are both 10 kHz. In the experiments, the injection gain A of the proposed method and the comparable fixed-frequency injection method are set as the same values, i.e., A = 0.05. Since the PRFS sinusoidal signal injection is critical for the proposed method, the PRFS sinusoidal tracking performance of the current control loop, shown in Figure 6, was first tested. In this test, the two candidate frequencies for the PRFS sinusoidal signal injection are ω h1 = 344.83 Hz and ω h2 = 434.78 Hz, and the magnitudes of the references i * dh and i * qh are manually set as 1.5 and 0.5 A, respectively. Figure 8 shows the resultant PRFS sinusoidal current components and their references, as well as the relevant zoomed-in views. It can be seen that, as discussed in Section 3.5, i dh and i qh follow their respective references i * dh and i * qh closely. The performance of the current control loop can meet the requirements of the PRFS signal-injection-based MTPA control.
The proposed method was tested under various torque levels, and the current trajectory connected by the resultant steady-state operating points is depicted in the |i s | − i d plane in Figure 9. For comparison, Figure 9 also shows the real MTPA current trajectory obtained by offline detection, the current trajectory based on Equation (4) using constant parameters, and the constant torque curves, where the constant torque curves from bottom to top are 5, 10, 15, 20, 30, 40, and 50 N·m, respectively. The results in Figure 9 show that the current trajectory based on Equation (4) significantly deviates from the real MTPA current trajectory, due to the neglect of motor parameter variations. By contrast, the current trajectory of the proposed scheme matches well with the real MTPA current trajectory. This demonstrates that the proposed method based on PRFS signal injection can achieve a high MTPA control accuracy.  Furthermore, the proposed method was tested at 500 r/min under a step torque of 10-30-10 N·m, and the results are shown in Figure 10. As can be seen, after the torque changed abruptly, the dand q-axis currents were adjusted quickly until they tracked the real MTPA currents. Consequently, the proposed method can tolerate torque transients, showing high stability under severe conditions; moreover, it exhibits a satisfactory dynamic response.
The performance of the proposed PRFS injection method and the conventional fixedfrequency injection method were tested at 600 r/min under 40 N·m. Because the injection frequency of the proposed method switches between the two candidate frequencies ω h1 = 344.83 Hz and ω h2 = 434.78 Hz, the conventional fixed-frequency method was tested with these two injection frequencies, respectively, for a fair comparison. The obtained stator phase currents and their Fast Fourier Transform (FFT) results are shown in Figure 11. It can be seen from Figure 11a that with the fixed-frequency method, the phase current FFT result shows two obvious peaks at the frequency of ω h ± ω e (ω e is the electrical frequency), which are caused by the signals injected into the dand q-axis currents. The results in Figure 11b also show similar characteristics.  For the proposed method, the injection frequency switches between ω h1 and ω h2 , and the two frequencies have the same action time due to Equation (11). This implies that the mean injection frequency injected into the dand q-axis currents is 0.5(ω h1 + ω h2 ). In this case, as shown in Figure 11c, the phase current FFT result of the proposed method shows two small peaks near the frequency of 0.5(ω h1 + ω h2 ) ± ω e . It is worth noting that the injection-induced current spectrum peaks of the proposed method are significantly lower than that of the fixed-frequency method, which benefits from the randomly switching of the injection frequency. Moreover, it can be seen from Figure 11 that, unlike the fixedfrequency method whose injection-induced current spectrum is concentrated at two special frequencies, the injection-induced current spectrum of the proposed method is distributed at other frequencies in addition to two special frequencies. Since the injection-induced current spectrum of the proposed method is continuously distributed throughout a wide bandwidth (i.e., the harmonic energy is no longer concentrated) and it has very small magnitudes, the impact of the harmonic components beyond two special frequencies is negligible.
The performance of the proposed PRFS injection method and the fixed-frequency injection method were also tested under other torque levels, and the injection-induced maximum current spectrum peaks under different torque levels are summarized in Figure 12.
The results in Figure 12 show that, for any given torque level, the injection-induced maximum current spectrum peak of the proposed method is dramatically lower than that of the fixed-frequency method. Hence, the proposed method can significantly reduce the current spectrum peaks caused by the signal injection under different torque levels. Considering that power spectral density (PSD) is usually employed to acquire the frequency-domain characteristic of stationary random signals [29,30], the phase current of the proposed method tested at 200 r/min under 30 N·m was analyzed by means of PSD in both log and linear forms, and the results are depicted in Figure 13. The results of the fixed-frequency injection method are also depicted in Figure 13 for comparison. Because the injection frequency of the proposed method switches between ω h1 = 344.83 Hz and ω h2 = 434.78 Hz, the conventional fixed-frequency method was tested with these two injection frequencies, respectively. As can be seen from Figure 13a,b, each phase current PSD of the conventional fixed-frequency method consists of two discrete spectra at the frequency of ω h ± ω e , which are induced by the signal injection. By contrast, the phase current PSD of the proposed method shown in Figure 13c contains some continuous spectra near the frequency of 0.5(ω h1 +ω h2 ) ± ω e instead of two discrete spectra. In addition, it can be seen that the spectrum peaks in the linear PSD of the proposed method are less than 2.64% of that of the fixed-frequency method. Hence, with the proposed method, the injection-induced current spectrum peaks are significantly reduced.
For intuitive comparison, Figure 14 shows the injection-induced maximum current spectrum peak in PSD of the proposed method and that of the fixed-frequency method under different torque levels. In Figure 14a,b, the PSDs are presented in log and linear forms, respectively. It can be seen from Figure 14 that for any given torque level, the proposed method exhibits a very lower injection-induced current spectrum peak in PSD than the fixed-frequency method. Therefore, the characteristic that the proposed method has a significant current spectrum peak reduction effect is also confirmed from the PSD point of view.

Conclusions
This paper has proposed an MTPA control scheme based on PRFS sinusoidal signal injection for IPMSM drives. This method is insensitive to motor parameter variations and can realize a high-performance MTPA control. Different from the conventional fixedfrequency signal injection methods, the presented method employs the randomly switching injection frequency. Therefore, the induced HF components in phase currents no longer concentrate at certain frequencies, and the current spectrum peaks caused by signal injection can be significantly reduced accordingly. This characteristic is beneficial for the proposed method to be applied to more applications. The effectiveness of the presented method has been experimentally confirmed based on a prototype IPMSM drive system. The results have shown that, taking 40 N·m torque level as an example, the injection-induced maximum current spectrum peak of the proposed method can be reduced to a quantity less than 21.6% of that of the fixed-frequency method, and its injection-induced maximum current spectrum peak in linear PSD can be reduced to a quantity less than 2.68% of that of the fixed-frequency method. Additionally, under severe conditions, both the simulation and experimental results have validated the stability of the proposed method.