An Adaptive Strategy to Compensate Nonlinear Effects of Voltage Source Inverters Based on Artificial Neural Networks

In motor drives, distortions of phase voltages and currents are often caused by nonlinear effects of inverters such as dead time, turn-on delay, turn-off delay and voltage drop of power devices. To eliminate these distortions, the dead-time compensation voltage is usually investigated. Furthermore, the relationship between the dead-time compensation voltage and phase currents is nonlinear, which is related to not only the parameters mentioned above, but also the snubber and parasitic capacitance of inverters. A nonlinear function is constructed to model the nonlinear relationship in this paper. To identify the nonlinear function, a method based on artificial neural networks is proposed without inverter parameters. According to the criterion that the trajectory of voltage vector in $\alpha - \beta $ coordinate system is a circle, an adaptive law is constructed to modify the parameters of the nonlinear function. Therefore, the nonlinear dead-time compensation voltage model is obtained accurately, where the distortions of voltages and currents are reduced without any additional hardware. Applying this method to the current predictive control, the bandwidth of a current loop is increased by 500Hz. Effectiveness of the method is verified by experiments.


I. INTRODUCTION
Pulse-width-modulated (PWM) based voltage source inverters (VSIs) are widely used in motor drives because of its high efficiency, low harmonic component output, and easy to be controlled. In the control of VSIs, a dead time, inserted between the switching signals of each phase leg, is adopted to prevent the conduction overlap. However, nonlinear effects of inverters such as dead time, turn-on delay, turn-off delay and voltage drop of power devices induce a voltage mismatch between actual phase voltages and reference voltages. This mismatch leads to the distortions of three-phase currents. Furthermore, the actual phase voltages need to be obtained accurately in some applications, such as motor parameter identification and current predictive control. Nevertheless, additional filter circuits are required to measure the actual phase voltages from the pulse output voltage of VSIs, where The associate editor coordinating the review of this manuscript and approving it for publication was Atif Iqbal . a sampling delay is introduced. To avoid these problems, instead of using the actual phase voltages, the reference voltages are often used for calculations. However, the control performance and accuracy of parameter identification are degraded by the voltage mismatch.
To solve these problems led by voltage mismatch, some offline methods are proposed by investigating the dead-time compensation voltage. According to the phase current polarity, the dead-time voltage is compensated directly [1], [2]. Since this method often leads to wrong judgement of current polarity, the sector of current vector is utilized to judge the current polarity indirectly [3]. To avoid the compensation failure in the current zero-crossing region by the above strategies, a trapezoidal form of wave compensation strategy is proposed [4]. In these methods, the relationship between the dead-time compensation voltage and phase currents is considered as an ideal linear function. However, this relationship is nonlinear considering the parasitic capacitance of power devices, which needs to be charged or discharged during the switching process [5]- [7]. In [6], a piecewise compensation method was proposed to match the nonlinear relationship. In the mentioned literatures, some parasitic parameters of inverters are required. Since these parameters vary with circuit state, they are often regarded as an approximate value. It constrains the accuracy of compensation result in offline methods.
In order to improve the accuracy of compensation result, some online compensation methods are proposed, such as disturbance observers [8]- [11], d-axis voltage compensation methods [12]- [15], sixth harmonic eliminated methods [16]- [21], current predictive control methods [22]- [24], and repeating controllers [25]- [28]. Regarding the dead-time voltage as a voltage disturbance, a disturbance observer is constructed to estimate the compensation voltage according to the voltage equation [8]. In [12], an Adaline estimator is proposed to estimate the dead-time compensation voltage according to the d-axis voltage characteristics, where the voltage fluctuation is mainly caused by the dead-time voltage. To compensate the voltage distortions of a specific sixth harmonic in d-q coordinate system, an active filter utilizing the least-mean-square (LMS) method is proposed [17], [18]. In [24], the error between the predictive current and actual current is used to estimate the dead-time compensation voltage. According to the periodic behavior of the dead-time voltage, a repeating controller is constructed [25]. In these online methods, some parameters of motors are required, which are difficult to be obtained accurately. Besides, they can be affected by the operating conditions, which degrades the voltage compensation effect. Furthermore, the relationship between the dead-time compensation voltage and the phase currents is simplified as a sign function. Since the relationship is a complex model, this simplification leads to the discontinuities of compensation voltages in the current zero-crossing region, which fails to minimize the voltage mismatch. To identify complex models without system parameters, artificial neural network (ANN) algorithms are widely proposed [29]- [31]. Therefore, the ANN-based method is an alternative to achieve the accurate compensation model of dead-time voltage and improve the compensation accuracy.
To improve the compensation effect to the voltage mismatch and current distortions, an online compensation method based on ANN is proposed in this paper. Firstly, a nonlinear function is constructed to model the relationship between the dead-time compensation voltage and phase currents. The parameter of the nonlinear function is utilized to describe the effect to different parameters of inverters. Secondly, the nonlinear function is identified by an ANN structure without inverter parameters, where an adaptive law is constructed to modify the parameters of the nonlinear function. The characteristics of the voltage vector in α-β coordinate system is analyzed, where the trajectory of the voltage vector is a circle without considering the voltage mismatch. According to this characteristic, an adaptive law is constructed by modifying the dead-time compensation voltage to make the trajectory of the voltage vector after compensation approach a circle. Therefore, the nonlinear function of dead-time compensation voltage is identified online. Moreover, the voltage mismatch is reduced and the actual phase voltages are obtained accurately without adding any hardware. Finally, applying this method to the current predictive control, the bandwidth of the current loop is increased by 500Hz. The current distortions due to the voltage mismatch of reference voltages and actual phase voltages are also reduced.
The rest of this paper is organized as follows. Section II analyzes the nonlinear relationship between the dead-time compensation voltage and phase currents. Section III proposes a nonlinear identification model based on ANN and introduces the implementation process of the compensation method. Section IV verifies the effectiveness of the algorithm through experiments. Section V summarizes this article.

II. NONLINEAR DEAD-TIME VOLTAGE MODEL
The inverter nonlinear effects such as dead time, turn-on delay, turn-off delay and voltage drop of power devices cause a voltage mismatch between the actual phase voltages and the reference voltages. The dead-time voltage is usually investigated to compensate the voltage mismatch. The relationship between the dead-time compensation voltage and phase currents is nonlinear, which is analyzed as follows. The PWM signals of power devices are shown in Fig. 1. The compensation voltages are expressed as (1) according to Fig. 1 [18]: where sign(i) is the sign function. V d is the magnitude of the compensation voltage, which is defined as: where V dc is the DC link, V f is the voltage drop of power devices, V diode is the voltage drop of diodes. T d is the dead time, T on is the turn-on delay, T off is the turn-off delay, T s is the period of PWM. Therefore, the compensation voltages in a-b-c coordinate system are obtained as: where i a , i b , and i c are the phase currents. Instead of the sign function used in (3), (4) is constructed in this paper: where w is the weight value of this function. Equation (4) is constructed according to the characteristics of the sign function and the transfer function, which is usually used in ANN. When w is set to 7 as an example, the waveform of the proposed nonlinear function is shown in Fig. 2. However, this value of w is related to the parameters of inverters. In different inverter systems, this value needs to be identified. The compensation voltages V α , V β in α-β axes are obtained as (5) by using the coordinate transformation, (3), and (4): Fig. 3 shows the comparison of the compensation voltages with the sign function and the proposed function. The compensation voltages using the proposed function change with the phase currents continuously in the current zero-crossing region. It is more consistent with the actual nonlinear effects of inverters. Since the parameter of the proposed nonlinear function is related to inverter parameters, it needs to be identified online.

III. PROPOSED DEAD-TIME VOLTAGE COMPENSATION METHOD
To identify the nonlinear model of dead-time compensation voltage online, an ANN-based method is proposed. And the compensation method aims to: • Constructing a nonlinear function to model the complex relationship between the dead-time compensation voltage and phase currents.
• Identifying the nonlinear function online by an ANN method without inverter parameters. The process of the proposed method is shown as follows: Firstly, an ANN structure is constructed to identify the nonlinear function. Secondly, the maximum compensation voltage is obtained by a two-step voltage method. Thirdly, an adaptive law to modify the parameter of nonlinear function is proposed according to the characteristics of voltage in α-β coordinate system. Finally, applying the compensation method, the current predictive control is performed.

A. ANN MODEL
After the nonlinear function of the dead-time voltage and phase currents is constructed, an ANN structure is proposed to identify the nonlinear function online. In practical, the value of reference voltage vector changes slowly. There-fore, without considering the nonlinear effects of inverters, the magnitude of reference voltage vector is a constant value in a small duration. However, due to the influence of the dead-time voltage, the amplitude of reference voltage vector is fluctuated periodically. According to this characteristic, a three-inputs and one-output ANN structure is constructed to identify the nonlinear function of the dead-time voltage in α-β coordinate system. Fig. 4 shows the ANN structure. The phase currents are used as input variables, while the magnitude of reference voltage vector is used as the output variable. Without external references, this ANN structure recognizes eigen trend through a self-reference. The ANN structure is described by the following two equations: where u j (n + 1) is the input of j th neuron in the n + 1 th layer, w ij (n+1) is the weight between j th neuron and i th neuron in the n + 1 th layer. d j (n+1) is the threshold of j th neuron in the n + 1 th layer, f [.] is the input-output function, Y j (n+1) is the output of j th neuron in the n+1 th layer. In the proposed neural network structure, the weights and input-output functions are given in Table 1. It can be seen from Table 1 that w a , w b , w c , and V d are unknown. V d will be identified by a two-step voltage method, and the others are identified by the proposed ANN algorithm. Therefore, the maximum dead-time compensation voltage and an adaptive law are required to identify the nonlinear function of dead-time voltage.

B. CALCULATION OF MAXIMUM DEAD-TIME COMPENSATION VOLTAGE BASED ON TWO-STEP VOLTAGE METHOD
As mentioned before, the maximum dead-time compensation voltage is required. To obtain the maximum dead-time compensation voltage, a two-step voltage method is utilized in this section. When the motor is at standstill, two different voltage vectors are output and recorded as V β1 and V β2 . At the same time, the steady-state currents are measured as i β1 and i β2 .
Then the following equations are obtained according to the voltage equation: where R is the stator resistance. For simplification, V α is often set to zero. According to (5), when i β1 , i β2 are large enough, V β1 is equal to V β2 . Therefore, the magnitude of dead-time compensation voltage is calculated as:

C. ANN BASED DEAD-TIME VOLTAGE COMPENSATION METHOD
After the maximum dead-time compensation voltage is obtained, an adaptive law is proposed. The magnitude of the compensated voltage vector is expressed as: where V α and V β are the reference voltages in α-β axes, V αr and V βr are the voltages after compensation in α-β axes.
In order to obtain a stable self-reference voltage, a lowpass filter is used. The magnitude of the self-reference voltage vector is expressed as: where T f is the filter time constant.

VOLUME 8, 2020
The voltage error is expressed as (12) according to (10) and (11): Considering the differences of hardware parameters are small, w a = w b = w c = w. The adaptive law of the weight value is obtained as (13) according to the error backpropagation rule and the chain derivation rule: where η is the learning factor. It affects the convergence speed of w. The expressions of l, m, and n are shown as follows: Therefore, the adaptive law of the weight value is obtained as: According to the proposed ANN structure, the motor phase voltages in α-β axes are obtained after the dead-time voltage is compensated. Considering that only one parameter needs to be identified, the ANN structure mentioned before is simplified to a three-layer ANN structure. The control block diagram is shown in Fig. 5. When motor is running, the ANN algorithm is used to identify the nonlinear function of deadtime voltage in α-β coordinate system. The weight value is modified according to (15) continuously. A new reference voltage is obtained by the difference between the reference voltage and the dead-time compensation voltage. Therefore, the compensated reference voltages are approximated as the actual phase voltages on the motor side.
In order to implement the dead-time voltage compensation method without any system parameters, the above algorithm needs to be executed as follows: I. When the motor is at standstill, the maximum dead-time compensation voltage is calculated according to the two-step voltage method and (9). II. When the motor is running, the nonlinear function of dead-time voltage is identified according to the ANN algorithm. The maximum dead-time compensation voltage used in the ANN algorithm is obtained by the step I.

D. CURRENT PREDICTIVE CONTROL
In the current loop, there is one-beat delay between the output voltages and currents due to the sampling delay and the calculation delay. According to the above analysis, the reference voltages are used to replace the phase voltages after compensation. Therefore, it is possible to use the reference voltages to predict one-beat currents to eliminate the mentioned delay. The α-β axes voltage equations are given as follows: where R is the stator resistance, L is the stator inductance, V α , V β , i α , and i β are the α-β axes stator voltages and currents, respectively. e α and e β are the α-β axes back electromotive force, which is calculated by motor speed, flux linkage, and electrical angle. The predicted currents are obtained as (17) according to (16): where the reference voltages are used to replace the phase voltages.
The predictive currents are used as the feedback currents in the current loop in this paper. This will reduce the delay of the feedback currents and improve the response capability of the current loop.

IV. EXPERIMENT RESULTS
The proposed compensation method is implemented in an ARM MCU (KV3125612). The main frequency of the MCU is 120MHz. The control cycle is 83.3us. And the computing time of the ANN method is 9.5us. Therefore, it accounts for 11.4% of the control cycle. The parameters of testing permanent magnet synchronous motor (PMSM) and inverter are shown in Table 2. The intelligent power module (FSBB30CH60F) is used as the power devices, which is the inverter module of IGBTs. The switch frequency of IGBTs is generally selected from 8khz to 16kHz. When the switch frequency is increased, the heat dissipation capacity is need to be increased due to the increase of switch loss. On the other hand, when the switch frequency is decreased, the harmonics of the current are increased due to the decrease of carrier ratio. Therefore, the switching frequency is selected as 12kHz in this paper. The dead-time in each switching period is set to 3us according to the recommendation of the intelligent power module (IPM). The experiment platform is shown in Fig. 6. A constant loading platform is used to control the load level. The rated-power of the tested VSI is 750W, and the DC link is 310V. Fig. 7 shows the voltage and current waveforms of the twostep voltage experiment. The experimental data are recorded  in flash and transmitted through serial communication when the test system is running. Firstly, the output of V β is 12.6V, and the measured i β is 1.476A. At 0.067s, the V β is increased to 14.4V, and the measured i β is 2.495A. V d is calculated as 8.65V according to (9). After the maximum dead-time compensation voltage is obtained, only the weight value needs to be identified by the ANN algorithm.  The weight value tends to a stable value of 6.96 at 4s, where the learn factor is 0.02. Since the nonlinear effects of inverters are not affected by the load torque and motor speed, the weight value remains constant under different working conditions. Therefore, the nonlinear function of dead-time compensation voltage is obtained.

A. DEAD-TIME COMPENSATION VOLTAGE RESULTS
After the nonlinear function is obtained, the voltages with compensation and without compensation are shown in Fig. 9. The compensation method with the sign function is selected as a comparison. The waveforms of voltages before compensation are distorted. This results in a voltage mismatch between the reference voltages and phase voltages. Using the reference voltages as the phase voltages for calculation will cause the performance degradation or even failure. The VOLUME 8, 2020  voltage distortions are reduced by the compensation method with the sign function. However, the discontinuities and burred feature show up in the current zero-crossing region, which degrades the compensation effect. Since the compensation voltage in the proposed function changes continuously with the phase currents in the zero-crossing region, the voltage distortions, discontinuities, and burred feature of the voltage waveforms are greatly reduced by the proposed method. The waveforms of voltages compensated by the two compensation methods are much closer to sinusoidal waveforms. This indicates that the compensated reference voltages can be approximated as the phase voltages. Fig. 10 shows the xy plot waveforms of different compensation method. The red circular curves in Fig. 10 are the theoretical voltage vector trajectory at 200rpm (16.5V). The scattered point waveforms of the voltages compensated by the two compensation methods are closer to the theoretical circular trajectory. This shows that the magnitude of the voltage vector after compensation is a constant value. This fits the proposed theoretical assumption of weight value correction rule. However, there are some points away from the theoretical circle, when the voltage is compensated by the compensation method with the sign function. It is caused by the discontinuity of the sign function in the zero-crossing region. Nevertheless, the points are much closer to the theoretical circle, when the voltage is compensated by the proposed method. Therefore, the voltage mismatch between the reference voltages and the output voltages is greatly reduced by the proposed method. And the actual phase voltages are obtained without adding any hardware. Fig. 11 shows the current waveforms of different compensation methods. The current distortions are reduced by the two compensation methods. However, due to the sudden change of the sign function in the current zero-crossing region, the change of currents in the zero-crossing region is discontinuous. Both the current distortions and the discontinuous phenomenon are greatly reduced by the compensation method with the proposed function. Fig. 12 shows the Fast Fourier Transform (FFT) results of different compensation methods. The current harmonics caused by the nonlinear effects of inverters are mainly the 5 th and 7 th harmonics. The total harmonic distortion (THD) of the uncompensated current waveforms is 7.91%.

B. CURRENT COMPENSATION RESULTS
The 5 th and 7 th harmonics are suppressed by the two compensation methods. However, the higher harmonics as 6 th , 8 th , and 10 th are increased by the compensation method   with the sign function. This is caused by the discontinuous change of currents in the zero-crossing region. When the voltage mismatch is compensated by the proposed method, the harmonic components mentioned above are not increased. Therefore, the current distortions are significantly reduced by the proposed compensation method, and the THD is also reduced from 7.91% to 4.48%. Fig. 13 shows the current waveforms of different compensation methods in the α-β coordinate system and the d-q coordinate system. The id = 0 control method is used. The 6 th harmonic is quite large in the d-axis current waveforms, which is caused by the nonlinear effects of inverters. The 6 th harmonic is suppressed by the two compensation methods. However, by using the proposed compensation method, the sixth harmonic component is significantly reduced. At the same time, the 6 th harmonic component in the compensated q-axis current is quite small. Therefore, torque fluctuations due to inverter nonlinear effects are reduced by the proposed VOLUME 8, 2020 compensation method. Fig. 14 shows the xy plot current waveforms of different compensation methods in the α-β coordinate system. The compensated current trajectory is much closer to a circle than the uncompensated current trajectory. This indicates that the current distortions are reduced by the two compensation methods. When currents are compensated by the method with the sign function, the discontinuities show up in the current zero-crossing region. This also shows that using this method will cause the discontinuous change of currents in the zero-crossing region. The trajectory of the current compensated by the proposed method is a continuous circle. Therefore, the current distortions are significantly reduced by the proposed method both in the α-β coordinate system and the d-q coordinate system.   reference current and the predictive current is 45 degrees. But the phase lag between the reference current and the feedback current is 90 degrees. Therefore, the bandwidth of the proposed current loop is 2000Hz. Through the above analysis, the bandwidth of the proposed current loop is increased by 500Hz.

V. CONCLUSION
This paper proposes a dead-time voltage compensation method based on ANN. The non-linear model of dead-time compensation voltage is obtained through online identification. The voltage mismatch is significantly reduced by the proposed method. Applying this method to the current predictive control, the bandwidth of the current loop is increased by 500Hz. The experimental results show that the current distortions due to the nonlinear effects of inverters are reduced and the THD of currents is reduced from 7.91% to 4.48%. Therefore, the phase voltages are obtained accurately and the current distortions are greatly reduced by the proposed method without adding any hardware. TAO  Research Centre. He is currently an Associate Professor with the School of Automation, Wuhan University of Technology. His research interests include the power electronics system design and control, such as dc-dc converter sensorless control strategies, electrical machine parameters estimation by control theory, system nonlinearity compensation for dc-dc converters, and voltage source inverters.