Phone

    00852-6915 1330

Current Sampling in Field Oriented Control (FOC) Approach

  • Contents

Introduction

In the FOC(Field Oriented Control) algorithm, the sampling current is the basis of the algorithm implementation and a very important part. So accurate current sampling can bring better result to the algorithm. In other words, if the current sampling is accurate, it will be very helpful for the subsequent coordinate transformation to obtain required results. From this we can see the role of current sampling in the entire FOC algorithm.

Understanding Field-Oriented Control

Catalog

Introduction

Ⅰ Current Sampling Method

Ⅱ Three Sampling Methods and Precautions

2.1 Single-resistor Sampling

2.2 Dual-resistor Sampling

2.3 Triple-resistor Sampling

Ⅲ The Key to Sampling

Ⅳ Delay Source

Ⅴ Delay Type and Typical Time

Ⅵ Analysis in Details

6.1 PWM Dead Time Insertion

6.2 Optocoupler Delay and Pre-Driver Delay

6.3 Transistor Switching Delay

6.4 Other Delays

Ⅶ FAQ

Ⅰ Current Sampling Method

In motor control, the current sampling method is generally to use PWM to trigger ADC to convert. Taking SoC(System-on-a-Chip) as an example, the ADC module will be configured to automatically sample and trigger conversion. When the trigger point set by the PWM module matches, the signal will be given to the ADC module. At this time, the sampling switch in circuit will be disconnected, and then the ADC module will start to convert, and the voltage of the corresponding sampling current can be obtained after the conversion is completed. The AD value of the signal, you can use this value in the program to write and verify the algorithm.

Current Sampling Time

Figure 1. Current Sampling Time

Ⅱ Three Sampling Methods and Precautions

Current sampling is the basis of FOC, including current sensor sampling and resistor sampling. Resistor sampling is widely used for its simple and low-cost characteristics. The method includes single-resistor sampling, dual-resistor sampling, and triple-resistor sampling.

2.1 Single-resistor Sampling

The biggest difference between the single-resistor and the other two methods is that it cannot obtain two current signals at the same time. Even if two current signals are obtained, there is an error in estimating the third current signal. The formula Iu+Iv+Iw=0 is conditional, that is, the three currents must be recorded at the same time. When the inductance of the motor is larger, the two currents obtained are closer to the real situation. When the inductance is small, the deviation may be relatively large. So if the inductance of the current is large, single-resistor sampling can be selected.
This method requires two samplings in one PWM cycle. In this case, it is necessary to analyze the switch state in the algorithm to clarify which phase current the reconstructed current corresponds to at the time of sampling.

2.2 Dual-resistor Sampling

In the case of dual-resistor sampling, the sampled two-phase current must be used directly. Even if there is a deviation, it needs to be used. This method cannot be used to calculate the third-phase current based on the other two-phase sampling like the triple-resistor sampling. That is to say, this method needs to consider the problem of the sampling window. If the sampling current is to be guaranteed to be accurate, the sampling window must be large enough. To make the sampling window large enough, the PWM waveform needs to be deformed. But this will increase the execution time of the algorithm. The advantage of this approach is to reduce a current-sense resistor and an op amp.
As shown in the figure below, the front of the red circle is the oscillating area. If the sampling window is small, only the oscillating area will not be able to obtain an accurate current. To process the sampling window, you can refer to the following figure, so that the obtained current will be more accurate.

Current Sampling Zone

Figure 2. Current Sampling Zone

2.3 Triple-resistor Sampling

This method is the simpler among the three methods. It directly uses three current-sensing resistors to sample the three-phase phase current of the motor, and the result obtained in this way is relatively straightforward. Using the formula Iu+Iv+Iw=0, recalculate the phase current of one phase with a small sampling window. So that the accuracy of the result obtained is the highest, and the implementation of the following related algorithms is easier. It is the advantage of this method. However, three current-sense resistors and three op amps are used, the hardware cost will be higher than the other two.

 

Ⅲ The Key to Sampling

The current sampling includes peak current and average current sampling. Generally, the most common is the average current sampling and its control, so there are actually two ways to sample the average current. One is that the current-sense resistor is placed on the upper bridge of the inverter bridge. The other is that the current-sense resistor of the inverter bridge is connected to the lower end of the lower bridge.
The general method is the latter. The current detection circuit corresponding to this method is relatively simple, and the corresponding power consumption will also be reduced. In this case, the freewheeling current is collected at the lower end, and then we can sample at the midpoint of the lower bridge opening. At this time, the corresponding current reflects the average current, so the corresponding current control is the average.
Then, if we use the three-resistor sampling method, the selected ADC module must have at least the function of simultaneous sampling of three channels. So as to ensure that the three-phase currents obtained by sampling are the currents at the same time, and at this time, to meet the condition, Iu+ Iv+Iw=0.
In the case of dual-resistor sampling, there are only two sampling resistors, and the obtained current cannot use the formula Iu+Iv+Iw=0. Therefore, even if the sampling window is small, if the algorithm is not processed, the double-resistor scheme has limitations. In order to get a better adaptation to the scene, algorithm compensation must be performed on the dual-resistor method, which is also the key point of it.
Similarly, for the single-resistor sampling way, the corresponding current needs to be obtained according to different switch combinations, and it needs to be sampled twice in a PWM cycle. This method cannot satisfy Iu+Iv+Iw=0, and can only be determined by an algorithm. Compensation and correction are performed, so the single-resistor method is more difficult to take. However, if the difficulty can be solved, this method is the best and cheapest one.

 

Ⅳ Delay Source

During the development of the motor-driven FOC control, have you encountered the situation that the motor is too noisy, inefficient or even unable to operate? All of this may be due to sampling anomalies of the phase currents, resulting in the inability to reconstruct the correct three-phase currents in the FOC algorithm. Here is an analysis of a factor that affects current sampling: the delay source.
In the motor drive FOC control of double-resistor sampling, the sampling point is set as the middle moment when the lower tube of the drive bridge is turned on. Note that this is the middle moment when the lower tube of the drive bridge is turned on, not the middle moment of the PWM cycle output by the MCU. There are as many as seven delay sources in this typical drive topology because the PWM is calculated from the MCU to the ADC module where the current signal is sent to the MCU.

MCU Output

Figure 3. MCU Output

Ⅴ Delay Type and Typical Time

The table below details the seven sources of delay that exist in motor drive system topologies and their typical timings. These delays will be superimposed together, and the effect is that the actual output PWM waveform lags behind the PWM waveform that the MCU calculates the expected output. According to this calculation, the phase current sampling point needs to lag the middle moment of the MCU calculating the expected output PWM waveform.

Delay Type

Typical Time

PWM Dead Time Insertion

100ns-2μs

Optocoupler Isolation to Pre-driver

40ns-300ns

Pre-driver Switch Delay

About 50ns

MOSFET Switching Time

100ns-1μs

Amplifier Delay

<1μs

Low-pass Filter Delay

1-2μs

ADC Delay

50ns-200ns

 

Ⅵ Analysis in Details

6.1 PWM Dead Time Insertion

In the three-phase brushless motor drive system, three bridge arms are required to control the current flow of the phase line, and there are two power devices on each bridge arm, such as MOSFET and IGBT. The pair of power devices cannot be turned on at the same time, otherwise a short circuit will occur. Here MOSFET is used as a power device to illustrate. In the control, dead time must be inserted to ensure that the upper and lower MOSFETs are not turned on at the same time. Typical values of dead time may be between 100ns and 2μs, depending on various factors in the system, such as MOSFET drive voltage and type.
After the required PWM waveform is inserted into the dead time, what you get is that both the PWM midpoint and the rising edge are shifted to the right. When using the FOC control algorithm calculates the proper PWM, we start seeing the first delay, recording the dead time.

Dead Time Insertion

Figure 4. Dead Time Insertion

6.2 Optocoupler Delay and Pre-Driver Delay

The signal response of the various optocouplers and pre-drivers causes additional delays between the moment the MCU controls the FTM module to output the PWM waveform and the moment the MOSFET gate is controlled. The output of the pre-driver is delayed by a period of time (Delay1) compared to the waveform output from the MCU pins.

Delay 1

Figure 5. Delay 1

6.3 Transistor Switching Delay

Through the pre-driver, the PWM waveform reaches the MOSFET transistors, but due to their inherent characteristics, all transistors take a certain amount of time to turn on and off. This delay time varies depending on the transistor type and the voltage level required to switch between on/off. Delay 2 is the total delay between the theoretical switching point (CMP2) of the phase line voltage and the instant of the actual switching point.

Delay 2

Figure 6. Delay 2

Finally, the gate voltage reaches the level that can make the transistor turn on, the current passes through the phase line and the sampling resistor, and a voltage difference is generated across the sampling resistor. The red waveform is the phase current waveform in an ideal state. At this time, there is a total delay time between the midpoint of the PWM cycle calculated and generated by the MCU, and the "phase current midpoint shift" is shown in the figure.

Phase Current Midpoint Shift

Figure 7. Phase Current Midpoint Shift

6.4 Other Delays

As shown in the figure below, the final delay chain that affects the current sampling is formed by the amplifier slew rate, the low-pass filter on the MCU pins, and the ADC slew rate. The time marked by the red circle in the figure is the correct current sampling time. It can be seen that the phase current sampling point is greatly delayed compared with the PWM midpoint output by the FTM.

Other Delay

Figure 8. Other Delay

In all and electrical and electronic circuits, there will be signal delay problems. And it is impossible to completely eliminate them, but the impact can be reduced by selecting low-delay devices. In the motor drive, in addition to selecting the appropriate device, it is also necessary to perform software compensation for the signal delay. The precise delay time of these delay sources mentioned in the article can be obtained by oscilloscope and calculation, and the correct current sampling time can be obtained by compensating for these delays in software. In this way, the data collected at the correct moment can be used as the data source for reconstructing the three-phase current of the motor in the FOC control.

 

Ⅶ FAQ

1. What is FOC algorithm?
Field-oriented control (FOC), or vector control, is a technique for variable frequency control of the stator in a three phase AC induction motor.

2. What is FOC drive?
Vector control, also called field-oriented control (FOC), is a variable-frequency drive (VFD) control method in which the stator currents of a three-phase AC or brushless DC electric motor are identified as two orthogonal components that can be visualized with a vector.

3. What is FOC brushless motor?
FOC implementation allows the BLDC motor to run more efficiently (high power factor and better light load efficiency), more smoothly (lower torque ripples) with quick dynamic response (better dynamic performance to load and speed changes).

4. What is FOC in BLDC motor?
Field oriented control (FOC) is an important control approach for Brushless DC motors. It resembles sinusoidal commutation but adds a major mathematical twist. Figure 3a shows control schemes for both sinusoidal commutation and field oriented control.

5. How is Bldc phase current measured?
With a BLDC motor use an ac voltmeter to measure the voltage between any 2 wires of the 3 motor wires and then convert the line-to-line voltage to the phase voltage value by dividing the line-to-line voltage by 3 =1.73.

6. Do BLDC motors have inrush current?
Handle Peak Inrush Current of a BLDC Motor to protect the Power Supply. Summary: BLDC motors have a Peak current on startup which is 3x or more the rated current. The motor has a rated current of 7.3A.

7. What causes motor inrush current?
When an electrical device, such as an AC induction motor, is switched on, it experiences a very high, momentary surge of current, referred to as inrush current. ...The interaction of these two magnetic fields produces torque and causes the motor to turn.

Kynix

Kynix was founded in 2008, specializing in the electronic components distribution business. We adhere to honesty and ethics as our business philosophy and have gradually established an excellent reputation and credibility in our international business. With the accurate quotation, excellent credit, reasonable price, reliable quality, fast delivery, and authentic service, we have won the praise of the majority of customers.

Join our mailing list!

Be the first to know about new products, special offers, and more.

Leave a Reply

We'd love to hear from you! Feel free to share your thoughts and comments below. Rest assured, your email address will remain private.

Name *
Email *
Captcha *
Rating:

Kynix

  • How to purchase

  • Order
  • Search & Inquiry
  • Shipping & Tracking
  • Payment Methods
  • Contact Us

  • Tel: 00852-6915 1330
  • Email: info@kynix.com
  • Follow Us

authentication

Kynix

© 2008-2026 kynix.com all rights reserved.