*Article* **Feedforward Interpolation Error Compensation Method for Field Weakening Operation Region of PMSM Drive**

#### **Young-Bae Ji and Jung-Hyo Lee \***

Department of Electrical Engineering, Kunsan National University, Gunsan, Jeollabuk-do 54150, Korea; dudqo848@naver.com

**\*** Correspondence: jhlee82@kunsan.ac.kr; Tel.: +82-63-469-4707

Received: 9 August 2019; Accepted: 17 September 2019; Published: 18 September 2019

**Abstract:** This study proposes a field weakening control method with interpolation error compensation of the look-up table based permanent-magnet synchronous machine (PMSM) method. The look-up table (LUT) based control method has robust control characteristics compared to other control methods that use linear controllers for current reference generation. However, it is impossible to store all current references under all circumstances for torque commands. General LUT based control methods use two input parameters. In order to mitigate the effect of discretely stored data, two-dimensional interpolation is used to linearly interpolate values between discontinuous data. However, because the current trajectories of PMSMs are generally ellipsoidal, an error occurs between the linearly interpolated and controllable current references. This study proposes a method to compensate for this interpolation error using a feedforward controller for rapid compensation. The improvement using the proposed method is verified by experiment and simulation.

**Keywords:** look-up table; interpolation error; PMSM drive

#### **1. Introduction**

Recently, permanent-magnet synchronous motor (PMSM) drive systems have been widely adopted in vehicles to improve efficiency and convenience. Generally, for these PMSM drives, current command controls based on two-dimensional look-up tables (2D-LUT) are widely used [1–6]. Among these control methods, the flux-torque 2D-LUT based control method is the most generally used due to the reflection of DC-link voltage variation. This method is shown in Figure 1 [1].

**Figure 1.** Flux-torque look-up table based permanent-magnet synchronous machine (PMSM) control method [1].

In this controller, the current data in the 2D-LUT is stored according to the respective memory addresses corresponding to flux-torque values. Because the memory address is a discontinuous value, only current reference data for a specific flux and torque can be stored in the memory. Therefore, it is impossible to store the appropriate current data for the entire driving region. To solve this problem, two-dimensional interpolation has been used to properly interpolate input data that have not been previously stored in the memory [7–9]. Two-dimensional interpolation produces the linear outputs of two continuous input parameters that are not defined at the specific torque and flux points of the look-up table address from the discreet look-up table data. For instance, when the input parameters are inserted into a look-up table, related outputs are generated from memory. These outputs are then linearly interpolated using first-order Newton's interpolation to calculate the approximate output for the input parameters.

Two-dimensional interpolation in PMSM control is only effective if the amount of stored data is sufficient to ignore the interpolation error. However, if the data is insufficient, the interpolation error cannot be ignored because all PMSM current trajectories are not linear, but ellipsoidal. Moreover, in automotive applications, in order to fulfill the international standard ISO26262, which aims to ensure driver safety, PMSM drives should have many fault diagnostic features and AUTOSAR software, which requires much memory to operate.

To solve this problem, only a few studies have investigated the problem of optimal memory use. Lenke et al. [10] used curve fitting to reduce the amount of memory used. However, they did not suggest the solution for the error between the interpolated curve fitting output and optimal output. A constant torque control method for PMSMs using any table was demonstrated in [11]. However, this method requires exact PMSM parameters. Moreover, if the target PMSM does not have sufficient saliency, its effectiveness is limited. Because current trajectories for PMSMs are ellipsoidal, the interpolation used in this application requires a second-order interpolation method, such as a second-order Lagrange or Spline interpolation with parameter modification for each operating condition [12]. However, these are seldom used in motor control because of heavy calculation burdens to digital signal processors (DSPs).

This study proposes a novel control method to reduce this interpolation error. First, we will analyze the cause of the interpolation error and define the problem characteristics. Next, we will illustrate the compensation method for the interpolation error using DC-link voltage feedforward.

#### **2. Interpolation Error of the 2D Interpolation Technique for PMSM Drives**

#### *2.1. Two-Dimensional Interpolation Technique*

Two-dimensional interpolation is a linear interpolation method for two input parameters. As mentioned before, 2D-LUT data on specific fluxes and torques have four different values: Outputs on the ceiling and floor of the flux input (λmax, λmin), and outputs on the ceiling and floor of torque input (*T*max, *T*min), as shown in Figure 2. To generate the interpolated output, the following linear interpolation formula is applied three times to the input parameters as shown in Figure 2b.

Research manuscripts reporting large datasets that are deposited in a publicly available database should specify where the data have been deposited and provide the relevant accession numbers. If the accession numbers have not yet been obtained at the time of submission, authors should state that they will be provided during review as they must be provided prior to publication.

$$f(\mathbf{x}) = f(\mathbf{x}\_1) + \left(\frac{f(\mathbf{x}\_2) - f(\mathbf{x}\_1)}{\mathbf{x}\_2 - \mathbf{x}\_1}\right) \cdot (\mathbf{x} - \mathbf{x}\_1) \tag{1}$$

For instance, in the linear interpolation of speed on *T*min, *x*2, and *x*<sup>1</sup> are the ceiling and floor of the speed input (λmax, λmin), respectively; and *f*(*x*2) and *f*(*x*1) are the current reference data on *T*min corresponding to λmax and λmin (the notations in Figure 2b are *i r*∗ *dqs*\_*T*minλmax , *<sup>i</sup> r*∗ *dqs*\_*T*minλmin ), respectively. *x* is the input of current speed (λ*r*), and *f*(*x*) is the interpolated output on *T*min (*i r*∗ *dqs*\_*T*min ).

**Figure 2.** Two-dimensional interpolation procedure for current references outputs from two-dimensional look-up tables (2D-LUT). (**a**) Stored data in the 2D-LUT according to each speed and torque value. (**b**) The 2D interpolation procedure for specific speed and torque reference inputs.

To reduce the processing burden on microprocessors, the division of variables must be avoided as much as possible. This study uses the same fixed unit as that used in [9]. In this study, the current references from look-up tables were also established according to this unit value. Substituting the variable with the fixed unit value, Equation (1) can be changed as shown below.

$$f(\mathbf{x}) = f(\mathbf{x}\_1) + \left(\frac{f(\mathbf{x}\_2) - f(\mathbf{x}\_1)}{\mathbf{x}\_{\text{unit}}}\right) \cdot (\mathbf{x} - \mathbf{x}\_1) \tag{2}$$

where *xunit* is the fixed unit value of the input parameter's deviation.

Note that the flux is an inverse value of the speed. If the speed is increasing, then the flux is decreasing, as shown in Figure 2a. Therefore, the calculated flux should be properly limited to avoid divergence.

#### *2.2. Two-Dimensional Interpolation Error In Look-Up Table Based PMSM Control*

Figure 3 shows the interpolated current trajectories using only six torque inputs. As shown in the figure, using 2D interpolation, two current reference points stored in the memory are linearly connected, whereas the operating condition that stored the data is absent. Although using 2D interpolation can reduce the error better than using only look-up table outputs, the generated power is lower than the capable maximum power. In addition, the effect of the interpolation error hardly exists in the constant torque operating region because current data are sufficient for the torque input. In contrast, the effect

of the interpolation error is enhanced in the field weakening operating region because the current data are insufficient in high-speed operation.

**Figure 3.** Interpolated current trajectories of PMSMs with a current table having the data of six torque inputs.

Figure 4 shows the magnified interpolation error described in Figure 3. The fundamental PMSM model equations to calculate this 2D interpolation error are shown below.

$$\begin{array}{l} \mathbf{v}\_{\rm ds}^{r} = R\_{\rm s} \mathbf{i}\_{\rm ds}^{r} + L\_{d} p \mathbf{i}\_{\rm ds}^{r} - \omega\_{r} L\_{\rm q} \mathbf{i}\_{\rm qs}^{r} \\ \mathbf{v}\_{\rm qs}^{r} = R\_{\rm s} \mathbf{i}\_{\rm qs}^{r} + L\_{\rm q} p \mathbf{i}\_{\rm qs}^{r} + \omega\_{r} L\_{\rm d} \mathbf{i}\_{\rm ds}^{r} + \omega\_{r} \phi\_{f} \end{array} \tag{3}$$

$$T\_{\mathfrak{c}} = 3P / 4 \{ \phi\_f i\_{q\mathfrak{s}}^{\tau} - (L\_{\mathfrak{q}} - L\_{\mathfrak{sl}}) i\_{\text{ds}}^{\tau} i\_{q\mathfrak{s}}^{\tau} \} \tag{4}$$

$$\begin{array}{l}V\_{\text{max}} = \omega\_r \sqrt{\left(L\_d \dot{\mathbf{r}}\_{ds}^r + \phi\_f\right)^2 + \left(L\_\eta \dot{\mathbf{r}}\_{qs}^r\right)^2} \\ V\_{\text{max}} = \frac{V\_{dc}}{\sqrt{3}}\end{array} \tag{5}$$

where *vr ds*, *vr qs* are d- and q-axis voltages of the PMSM, respectively; *Te* is torque, *V*max is the voltage restriction of the PMSM; ω*<sup>r</sup>* is electric angular speed; *Rs* is phase resistance; *Ld*, *Lq* are d- and q-axis inductances, respectively; φ*<sup>f</sup>* is the permanent magnet's flux; *P* is the number of poles; and *Vdc* is DC-link voltage.

**Figure 4.** Magnified 2D interpolation error in field weakening region of Figure 3.

As shown in Figure 4, the interpolation error does not affect the d-axis current component (*i r ds*\_interp). However, it affects the q-axis current component (*i r qs*\_interp). This interpolated q-axis current reference can be expressed from Equation (1) as Equation (6) below.

$$\begin{array}{l} i\_{q\text{s\\_interp}}^r(T\_{\varepsilon2} + \Delta T\_{\varepsilon}^\*) = i\_{q3} + \frac{i\_{q3} - i\_{q2}}{T\_{\varepsilon3} - T\_{\varepsilon2}} \Delta T\_{\varepsilon}^\*\\ (\Delta T\_{\varepsilon}^\* = T\_{\varepsilon}^\* - T\_{\varepsilon2}) \end{array} \tag{6}$$

where *Te*<sup>2</sup> and *Te*<sup>3</sup> are floor and ceil of torque references in Figure 4, respectively.

Using Equation (6), the magnitude of the back-EMF (electric motive force) using the interpolated current reference can be expressed as Equation (7):

$$\begin{cases} V\_{\text{mag}} = \omega\_r \sqrt{\left(L\_d l\_{ds\\_inter}^r \left(T\_{c2} + \Delta T\_e^\*\right) + \phi\_f\right)^2 + \left(L\_q l\_{qs\\_inter}^r\right)^2} \\ V\_{\text{mag}} < V\_{\text{max}} \end{cases} \tag{7}$$

where *Vmag* is the back EMF magnitude for the variation of torque reference.

If the interpolated d-axis current is according to the varied torque in Equation (7), then the magnitude of the maximum torque generated by this d-axis current can be obtained through the intersection of the voltage restriction curve and the torque curve. The equation is expressed in quadratic form as shown in Equation (8), which has four roots (two imaginary, two real). Of the two real roots, the effective d-axis current is the magnitude with the minimum value.

$$\begin{split} & -\left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right)^{2} \mathrm{L}\_{q}^{-2} \mathrm{I}\_{\mathrm{ds\\_inter}}^{\mathrm{d}} \\ & + \left\{-2\mathrm{L}\_{d} \mathrm{d}^{2} \left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right) - 2\phi\_{f} \mathrm{L}\_{d} \mathrm{L}\_{d} \left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right)^{2} \right\} \mathrm{I}\_{\mathrm{ds\\_inter}}^{\mathrm{r}} \\ & + \left\{-2\mathrm{L}\_{d} \mathrm{d}^{2} \phi\_{f} \,^{2} - 4\phi\_{f} \mathrm{L}\_{d} \mathrm{L}\_{d} \left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right) - \left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right)^{2} \phi\_{f} \,^{2} + \left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right)^{2} \left(\frac{\mathrm{V}\_{\mathrm{max}}}{\omega\_{r}}\right)^{2} \right\} \mathrm{I}\_{\mathrm{ds\\_inter}}^{\mathrm{r}} \\ & + \left\{-2\phi\_{f} \,^{3} \mathrm{L}\_{d} - 2\left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right) \phi\_{f} \,^{2} + 2\left(\mathrm{L}\_{d} - \mathrm{L}\_{q}\right)^{2} \left(\frac{\mathrm{V}\_{\mathrm{max}}}{\omega\_{r}}\right)^{2} \right\} \mathrm{I}\_{\mathrm{ds\\_inter}}^{\mathrm{r}} \\ & + \left\{\phi\_{f} \,^{2} \left(\frac{\mathrm{V}\_{\mathrm{max}}}{\omega\_{r}}\right)^{2} - \left(\frac{\mathrm{I}\_{q} \left(\mathrm{L}\_{d} + \mathrm{$$

where *Pn* is pole-pair and Δ*T*<sup>∗</sup> *<sup>e</sup>*\_int is increased torque output from compensated current.

The compensation value of the q-axis current can be obtained by substituting the d-axis current value from Equation (8) into Equation (4).

$$i\_{qs\\_comp}^r = \frac{4}{3P} \frac{T\_{c2} + \Delta T\_{c\\_int}^\*}{(\phi\_f + (L\_d - L\_q)i\_{ds\\_inter}^r)} - i\_{qs\\_inter}^r \tag{9}$$

From Equation (9), the increased torque output using the compensated q-axis current (Δ*T*∗ *<sup>e</sup>*\_int) is always higher than the increased torque output using the interpolated q-axis current (Δ*T*∗ *<sup>e</sup>*), as shown in Figure 4.

This proves that a torque error exists between the interpolated output and optimal output. In addition, the torque generated from the interpolated output is always lower than that generated from the optimal output.

#### **3. An Interpolation Error Compensation Method with DC-Link Voltage Feedforward Controller**

Generally, because the magnitude of the current in the field weakening region is not large, the magnitude of the back EMF has a major influence on the components in the permanent magnet's flux. Therefore, the variation in the torque in this region is largely affected by the variation in the q-axis current and the voltage restriction is greatly affected by the speed and the d-axis current. Among these, the speed is not a direct control target of the electric motor, but a restrictive condition that is influenced by the machine-driving environment. Therefore, to compensate for the reduced output caused by the interpolation, the q-axis current must be compensated to raise the torque.

This torque error occurs because the magnitude of the back EMF of the interpolated q-axis current is smaller than the voltage limit, which is determined by DC-link voltage. Therefore, the compensated q-axis current can be obtained from the voltage error between the back EMF and the voltage limit calculated from the DC-link voltage. From this error, the proportional-integral (PI) controller in this study deducts the compensated q-axis current [13,14].

$$I\_{q\text{s\\_comp}}^r = \frac{sK\_p + K\_i}{s}(V\_{\text{max}} - V\_{\text{mag}}) \tag{10}$$

where *Kp* and *Ki* are P and I gains of PI controller, respectively.

However, as all current trajectories for PMSM operation are ellipsoidal, the PI controller is insufficient to calculate the compensation current. A PI controller is widely known to be effective with fixed references. However, if the references are ellipsoidal, the final output value always has an error from delayed response.

The easiest way to respond suitably to ellipsoidal references is to use a proportional-integraldifferential (PID) controller to increase the poles of the controller's characteristic equation or to adapt numerous higher gains of PI controller to reduce this final output error. However, the D controller requires suitable filters to avoid divergent outputs and a higher gain PI controller can be very unstable operation for disturbance.

In this work, a feedforward controller was added to improve the dynamics of the PI controller. To obtain the feedforward compensation current, the voltage error between the back EMF and the voltage limit can be obtained as Equation (11) from Equation (7).

$$\begin{array}{l} V\_{\text{s\\_err}} = V\_{\text{max}} - V\_{\text{mag}}\\ \hline V = \frac{V\_{\text{dc}}}{\sqrt{3}} - \sqrt{\left(\omega\_{\text{r}} \text{L}\_{q} \text{i}\_{\text{gs\\_limar}}^{r}\right)^{2} + \left(\omega\_{\text{r}} \text{L}\_{d} \text{i}\_{\text{ds\\_limar}}^{r} + \phi\_{f}\right)^{2}} \end{array} \tag{11}$$

where *Vs*\_*err* is voltage error from the interpolation.

As shown in Figure 4, because the interpolated d-axis current reference generates a proper current for the voltage limit, Equation (11) can be changed to Equation (12).

$$\begin{array}{l}V\_{s\\_err} = V\_{\text{max}} - V\_{\text{mag}}\\ = \frac{V\_{dc}}{\sqrt{3}} - \alpha \nu L\_q \left| i\_{qs\\_linear}^r \right|\end{array} \tag{12}$$

To reduce this voltage error to zero, the compensation feedforward q-axis current can be established using Equation (13).

$$\dot{\mathbf{u}}\_{q\kappa\text{-}ff}^{r} = \frac{V\_{\text{s\\_crr}}}{\omega\_{\text{r}}L\_q} \tag{13}$$

where, *i r qs*\_ *f f* is compensation feedforward q-axis current.

Using Equation (13), the proposed overall control block for q-axis compensation current is established in Figure 5.

As mentioned, an interpolation error hardly exists in the constant torque operating region. Moreover, the back EMF in this region has its own value at each operating point. Compensating for interpolation error in this region requires other back EMF look-up table data for each flux and torque values. Therefore, in this work, the compensation block was deactivated while the PMSM operated in the constant torque region.

To reduce the amount of stored memory for voltage magnitude, the start points for the field weakening operation of each speed were obtained experimentally instead of from voltage magnitudes all over the operating region. Figure 6 shows the stored data of field weakening start points. As can be seen from the figure, as speed increases, the generated torque reduces, generating a constant power output. In addition, because an error hardly occurs between the practical torque-speed curve and the linearly interpolated curve, the field weakening start torque, which is generated from flux-torque LUT of Figure 5, can determine whether to enable or disable the compensation block. Instead of using speed inputs, estimated flux is used to reflect input voltage variation. Conversion from speed to flux can simply be obtained using Equation (14).

$$
\lambda\_{\rm r} = V\_{\rm max} / \omega\_{\rm r} \tag{14}
$$

The activation condition of the q-axis current compensation can be determined by the following equation.

$$\begin{aligned} \left( f(T\_{\varepsilon}^\* - T\_{\varepsilon \\_FW} > 0 \right) : \operatorname{sgn}(T\_r^\* - T\_{\varepsilon \\_FW}) = 1 \\ \left( T\_{\varepsilon}^\* - T\_{\varepsilon \\_FW} \le 0 \right) : \operatorname{sgn}(T\_r^\* - T\_{\varepsilon \\_FW}) = 0 \end{aligned} \tag{15}$$

With this enable-disable control block, the proposed compensation block is only activated when the effect of compensation is maximized.

**Figure 5.** Overall proposed control block for q-axis current compensation.

**Figure 6.** Field weakening operation start points for each speed.

#### **4. Experiment**

To verify the proposed control algorithm, the experiment was set up as shown in Figure 7. The test motor parameters are described in Table 1. The controller of the inverter used the DSP TMS320F28335 from Texas Instruments Corporation.

**Figure 7.** Experimental setup: (**a**) Picture of the setup; (**b**) composition of the setup.


**Table 1.** Test motor parameters.

Although this DSP has sufficient memory to store current 2D-LUT data, for the worse environment configuration, the current map is constructed using very little memory compared to the conventional method.

The d-q-axis current map for each speed-torque was measured through experiments [6]. The results are shown in Figure 8. In this study, the experimental current map was stored at one-third of the rated torque and at one-quarter of the maximum driving speed. The resulting speed-torque current map was transformed into a flux-torque map using Equation (14). As a result, it can be seen that only one torque data appears in the d-q-axis current value for the torque command change at the maximum speed, except for the d-q-axis current value during the zero-torque control. This is because the inductance expressed by the nominal value in the actual motor and the permanent magnet flux decreased due to the influence of saturation in the actual experiment.

Figure 9 shows the comparison of experimental results with or without the proposed compensation method. Without the compensation method, the d-q-axis currents are linearly controlled due to the 2D interpolation according to the increase of torque references. Despite applying 2D interpolation, a considerable error exists between the maximum controllable output and linearly controlled output because the stored current references are insufficient in the high-speed field weakening operating region. However, with the proposed compensation method, the d-q-axis current trajectory follows the voltage limit ellipse, which means that the target PMSM generates the maximum controllable output at current motor speed.

**Figure 8.** *Cont.*

**Figure 8.** Current maps in the experiment: (**a**) D-axis current map, (**b**) q-axis current map, (**c**) look-up table for the field weakening operation start point, (**d**) d-q-axis current maps according to variable flux.

Figure 10 shows the compared experimental results for operation at 1500 rpm. The applied torque reference is from 0 to 15 Nm. The shape of the torque reference is a ramp with a slope of 0.75 Nm/ms. As shown in Figure 10a, without any compensation, the d-q-axis current references are linearly straight lines because the stored currents data have only two points at this speed. In Figure 10b, for the compensation algorithm using only a PI controller [14], the compensated amount is small and delayed because the voltage error is not fixed, but is varied according to the torque reference. The compensator requires time to generate suitable compensation currents. If the torque reference is changed rapidly, the response time of the PI controller must be considered because excessive q-axis current occurs and saturates the back EMF. In Figure 10c, with the proposed feedforward compensator, the response time of the PI controller can be improved. Therefore, a suitable compensation current can be obtained, even if a rapid varied torque reference is applied.

**Figure 9.** Comparison of experimental results of the conventional and the proposed method with and without 2D interpolation compensation. (**a**) Operation at 750 rpm, (**b**) operation at 1150 rpm, (**c**) operation at 1500 rpm.

**Figure 10.** Magnified comparison of the experimental results at 1500 rpm using (**a**) only 2D interpolation, (**b**) compensator with a PI controller [14], and (**c**) the proposed compensation method. (Slope of the torque reference: 0.75 Nm/ms).

#### **5. Conclusions**

This study proposed a compensation method for the interpolation error in the general flux-torque 2D-LUT based PMSM control method. To achieve this, we first calculated the error between the back EMF and the voltage limit in the field weakening operating region. We then obtained the q-axis compensation current from PMSM voltage equations. To improve the compensation control dynamic for ellipsoidal references in the feedback controller, a feedforward controller based on DC-link voltage was attached to the general PI controller.

With the proposed compensation blocks, the generated power was enhanced beyond the power obtained using only 2D interpolation, although very restricted numbers of memory are allowed for flux-torque 2D-LUT. The proposed control method was verified by the experiment with a test setup.

**Author Contributions:** J.-H.L. designed and performed the experiment, analyzed the theory, and wrote the manuscript. J.-H.L. and Y.-B.J. participated in research plan development and revised the manuscript. All authors have contributed to the manuscript.

**Funding:** This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (NRF-2018R1C1B6008895). This work is supported the Human Resources Development Program (Grant No. 20174010201350) by the Korea Institute of Energy Technology Evaluation and Planning (KETEP) grants.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

*Article*
