The fluxoriented control (FOC) is a commonly used technique for threephase electric motor control application. Here, the applied voltage pattern is defined using the space vector modulation (SVM) algorithm, which is a more sophisticated pulsewidth modulation (PWM) method. The FOC technique requires an accurate measurement of the motor's phase currents. If the motor coils are star connected, according to the first Kirchhoff's Law, measuring only twomotor phase currents is enough. A classical FOC scheme is shown in Figure 1. In each control period, the motor phase currents iA and iB have to be measured simultaneously with sensors. The three most popular current sensors in motor control applications are 1) shunt resistors, 2) Hall effect current sensors and 3) currentsensing transformers. Hall effect current sensors provide a nonintrusive measurement and are available in a small IC package that combines the sensor and signalconditioning circuit. While currentsensing transformers are also popular sensor technology, especially in highcurrent or ac linemonitoring applications, shunt resistors are the most popular current sensors because they provide an accurate measurement at a low cost. Although, the focus is on shunt resistors, any of the abovementioned sensors can be used because the accuracy of the three types of sensors is similar.
As previously stated, two motor phase currents have to be measured simultaneously, so two analogtodigital converters (ADCs) are required. Also, the use of a PWM method introduces a current ripple at harmonics of the PWM carrier frequency. Hence, to measure the desired motor phase currents without this ripple, it is necessary to measure the currents at the beginning and at the middle point of the PWM period^{[1]}. As a result, the motor phase currents should be measured in the instant 0 or T/2 of the modulation period T. Also, considering that the two currents have to be measured simultaneously, the optimum solution is to use two ADCs and detect the two currents in the same instant 0 or T/2 of the modulation period T. But, using two ADCs is an expensive solution. By allowing some degradation in performance, one multiplexed ADC can be used to perform two sequential measurements. This approach, however, has some disadvantages. In this case, the second measurement is delayed with respect to the first. And the delay is equal to the ADC conversion time. Moreover, the usage of one ADC performing two sequential acquisitions in the same modulation period has another problem because it decreases the maximum duty cycle applicable. In fact, the measurement of the currents has to be stopped before the PWM output changes. Accordingly, using one ADC performing two sequential acquisitions, the PWM output cannot change before a time equal to the sampling time plus the conversion time as shown in Figure 2. Finally, another problem is represented by the lowpass filter (LPF) put between the sensor and ADC to reduce the signal variation during sample time and the noise. This filter, in fact, introduces a delay that has to be compensated for a correct current measurement.
SAMPLING SYSTEM OVERVIEW
Assuming that the motor coils are star connected, Kirchhoff's first law indicates that measuring only two motor phase currents is enough. The proposed strategy measures one current at the instant 0 and the other one at the instant T/2 where T is the modulation period in order to avoid the error due to the current ripple. Consequently, the measured values of the currents are not coherent as these values are not measured at the same time. Thus, measuring the two currents at instant 0 can be done by measuring the current iB at instant 0 of the period, let's say m, and the current iA in the instant T/2 of the period m and in the instant T/2 of the previous period m1. In this way, the current iA at the instant 0 of the period m can be calculated as
iA_m(0) = (iA_m(T/2) + iA_m1(T/2))/2.
Thus, it is clear that the value iA_m(0), calculated as described, is not affected by the error due to the current ripple but it is affected by an error due to the interpolation because the real shape of the motor phase currents is not linear but sinusoidal. Moreover, both iA_m(0) and iB_m(0) are affected by the error due to the usage of LPFs. In order to reduce the terms of these types of error, the proposed strategy provides two correction mechanisms as described in the following. The overall sampling system is shown in Figure 3. The two currents iA and iB are the inputs of the sampling system and these inputs are filtered with two LPFs. The values of the motor phase currents at the instant 0 are the outputs of the sampling system. In Figure 4, the sampling timing block is shown. This block provides two synchronization signals at the instant 0 and at the instant T/2 where T is the modulation period using two comparators with the output of the PWM counter. These two synchronization signals are used by sampling system iA and sampling system iB.
Figure 5 shows in detail the sampling system iA. This block calculates the current iA at the instant 0 as average value using the values iA_m(T/2) and iA_m1(T/2) where m is the current control period and it corrects the errors due to the interpolation and due to the usage of a LPF. Figure 6 shows the block for interpolation correction system iA. This block calculates a correction value to compensate the error due to the interpolation as the discrete second derivative of the current on a modulation period T. In simple words, this value indicates how fast the signal is varying because it is linked to the acceleration. K is a constant given by the relation between error and the correction value. Figure 7 shows the LPF correction system iA. This block calculates a correction value to compensate the error due to the usage of a LPF. K is a constant given by the features of the chosen LPF.
Similarly, the sampling system iB and LPF correction system are used to measure iB. The interpolation correction system block is not used for the current iB because this current is not calculated as average value but measured directly at the instant 0 of the modulation period T.
SIMULATION AND EXPERIMENTAL RESULTS
The proposed strategy was simulated in MATLAB/SIMULINK in order to preliminarily evaluate the performance. Figure 8 shows the speed and the torque for a system using two ADCs without LPF and a system using the proposed strategy with two LPFs. Moreover, in the same figure, the speed error and the torque error are shown. In both cases, the error is defined as the absolute difference between the value for the first system and the value for the second system. Figure 9 shows the currents for a system using the proposed strategy and the relevant errors. In this case, both errors are defined as the difference between the current before the LPF and the current output of the overall sampling system at the measurement instant 0 of the modulation period. In both cases, the absolute error is lower than 4e2 with a 60 A current peak value so the maximum normalized error is lower than 6.67e4. The simulation was repeated for different values of the current peak and the normalized error has always the same order of magnitude and it is lower than the previous value.
The proposed strategy has been implemented on ST10 family microcontrollers. The full system for the experimental test includes an evaluation board with ST10F276, an electric motor control power board and the brushless dc (BLDC) motor — Pittman 3441S001R3. The applied voltage pattern is defined using the SVM algorithm. The ST10F276 is equipped with a 10bit ADC, which was used to measure the same current at the instant 0 and at the instant T/2 of the modulation period T. The measured values at the mid point of each modulation period are used to calculate the average value of the current at the beginning of the modulation period. The value calculated in this way was compared with the values measured directly at the beginning of the modulation period in order to evaluate the error. The current and the relevant error are shown in Figure 10. Accordingly, the maximum normalized error was ±1.96e 3(±2/1023). This error is higher than the theoretical maximum normalized error, which the system shows in simulation. However, in reality, the noise must be taken in account. And, results indicate that the noise produces an error of the same order of magnitude. In short, the maximum normalized error is dependent on the resolution of the used ADC converter.
REFERENCES

Richardson J., “Implementation of a PWM Regular Sampling Strategy for AC Drives,” IEEE Power Electronics Specialist Conference Record, 1989, pp. 649656.
ABOUT THE AUTHORS
Giuseppe D'Angelo, Power Train & Safety Application System, STMicroelectronics, Arzano (Napoli), Italy.