Field Oriented Control (FOC) Operation
Last updated
Last updated
A brushless direct-current (BLDC) motor consists of magnets and phase-winding coils. To illustrate its operating principle, consider a simplified model featuring one pair of magnetic poles and three coils.
In this model, the coils form the stator. When current flows through a coil, it generates a magnetic field that either attracts or repels the adjacent magnet on the rotor. This magnetic interaction causes the rotor to rotate.
In a BLDC motor, the ends of the three coils are connected to form three external terminals that interface with the driving circuit. These coils can be connected either in a star (wye) configuration or a delta configuration. The star connection is more common: one end of each coil is accessible as an external lead, while the other ends are joined internally to form a neutral point.
To control the three wires, a three-phase inverter circuit is used. This inverter is composed of three half-bridge drivers, which can be viewed as six switches connecting between VDD and ground. Each half-bridge can operate in one of four states:
High-side ON, low-side OFF (1)
High-side OFF, low-side ON (0)
High-side ON, low-side ON (X)
High-side OFF, low-side OFF (N)
The X state is invalid because it directly connects VCC to ground, while the N state is not used because it leaves the phase coil in a floating condition, reducing the driver’s maximum output capability. This leaves only two valid states: state 1 connects the phase to VCC, and state 0 connects it to ground.
By combining these two valid states for the three phases, there are eight possible inverter states:
000
100
110
010
011
001
101
111
Out of these, the states 000 and 111 are non-driving because all phases are tied to the same voltage level (either VCC or ground), resulting in no voltage differential between them. The remaining six states are the driving states.
For example, consider the motor in state 100:
Phase A is connected to VCC.
Phases B and C are connected to ground.
In this configuration, current flows from phase A through the neutral point to phases B and C, and then to ground. This current generates a magnetic field oriented toward phase A (0°), which attracts the rotor's magnets and rotates the rotor to 0°.
Next, switching to state 110:
Phases A and B are connected to VCC.
Phase C is connected to ground.
This creates a magnetic field pointing between phases A and B (approximately 30°), which turns the rotor toward the 30° direction.
Similarly, the remaining driving states sequentially direct the rotor to 60°, 90°, 120°, 150°, and finally back to 0° when returning to state 100.
By switching through these states in order, the motor can be driven continuously and efficiently.
By analyzing the magnetic forces generated from the stator winding acting on the rotor, we can decompose the overall force into two orthogonal components: one aligned with the rotor’s magnetic field (the d-axis component, ) and one perpendicular to it (the q-axis component, ). In vector control, only the perpendicular component, , contributes to generating torque. The component , which is parallel to the rotor magnet, does not aid in rotation and is essentially wasted energy.
To drive the motor efficiently, the control strategy aims to minimize while maximizing , thereby ensuring that most of the electrical energy is converted into useful rotational force.
Since the motor’s phase voltages are floating and lack a fixed reference point, it is impractical to use power resistors for sampling. A simpler approach is to add resistors under the low-side MOSFETs, which allows us to sample and obtain three approximate sine-wave phase currents. However, the resulting measurement would yield three sinusoidal signals that are correlated with each other. This makes designing the controller for it very challenging. Instead, with the use of a series of mathematical transformations, we can convert the three phase BLDC motor model into a two phase DC motor model.
Tracking the transformation between these two models can be particularly challenging due to differences in reference frames. In the three-phase BLDC motor model, physical quantities are defined relative to each individual phase, with the reference frame rotating along with the rotor. In contrast, the simplified two-phase DC motor model defines quantities with respect to the orthogonal D (direct) and Q (quadrature) axes within a stationary reference frame.
It's essential to pay close attention to the frame in which each variable is defined. In the following discussion, we will clearly state the reference frame along with the corresponding variables.
First, we can express and in terms of , , and :
Using Kirchhoff Circuit Laws, , we can further simplify the equation to be the following
However, we also need to ensure that the magnitude of the signal should match. Therefore, we need to scale the result by factor of .
In an amplitude-invariant transformation, the normalization factor should be set to , while a power-invariant transformation requires .
For this FOC application, it is important to preserve the magnitude of the signals (i.e. phase current readings) during transformation, so we choose, so we set .
After magnitude scaling, we get the final Clarke transform equation:
or in matrix format:
or in matrix format:
After converting the three phase currents into stationary DQ currents using the Clarke and Park transforms, we now have a simplified representation that is much easier to control. However, our control is limited to adjusting the applied voltages. To regulate the current, we employ a controller that modulates the input voltage. A detailed discussion of this controller will be provided in the next section. For now, let's explore how the DQ voltage is converted back into the three phase voltages.
Similarly, we can take the desired voltages and and use the inverse Park transform to convert them into signals and that rotate together with the rotor.
or in matrix format:
Unlike the process of transforming current signals, converting voltage signals involves a different approach. This is because the applied voltage ultimately controls digital signals—either 0 or 1—that determine the switching of the MOSFETs in the upper and lower bridge arms, rather than influencing analog values from current measurements. Consequently, we must adopt an alternative method to discretize our desired voltage.
From the six-step commutation scheme, we know that the motor driver can generate voltage vectors (or forces) pointing in six distinct directions. These can be thought of as six fundamental vectors originating from the center and directed toward 0°, 30°, 60°, and so on. By controlling the motor driver to rapidly switch between two states and adjusting the proportion of time spent in each state, we can synthesize a resultant voltage vector that points in a direction between the two fundamental vectors. Furthermore, by incorporating the two non-driving states—which effectively act as zero vectors—we can also adjust the magnitude of the resultant vector.
As a result, we have:
or in matrix format:
To control the motor correctly during high speed region, the FOC commutation frequency must be significantly higher than the electrical frequency of the motor. A general rule is that commutation frequency must be at least 10x the electrical frequency.
The motor’s mechanical frequency can then be calculated from the electrical frequency and pole pair:
is the number of pole pairs.
For example, for a motor with 14 pole pair, if FOC commutation is set to 10 kHz. Then, the maximum supported electrical frequency is 1 kHz.
The maximum mechanical frequency would then be:
As mentioned above, our objective is to regulate the currents and . To accomplish this, we control the voltages and applied to the motor. A straightforward method to map these voltage inputs to the desired current outputs is by using a proportional-integral (PI) controller.
In the simplified DC motor model, the motor can be seen as a resistor and inductor in series. Therefore, the voltage across the motor can be written as:
where is the current flowing through the motor winding, is the resistance of the motor winding, is the inductance of the motor winding, is the back-EMF coefficient, and is the rotation speed.
The resistance here is not the winding resistance. It is the equivalent resistance we get after performing the Clarke and Park transformation. Same applies for the inductance.
Since we are focusing on low-rpm scenario, the back-EMF term can be ignored, simplifying the equation to be:
Performing Laplace transform to the equation, we get:
We can assume the initial condition to be , hence getting:
As a result, the transfer function of the motor is:
There are two configurations of PI controller, the parallel configuration (the most common one) and the series configuration.
For parallel configuration, we have
For series configuration, we have
Since the subsequent calculations are more straightforward with a series PI controller, we will adopt this configuration.
Example C implementation of the serial PI controller
For open loop control, we have the transfer function as:
In order to simplify the equation, we want
which means
Setting , we can simplify the equation as
For closed-loop feedback control, we have the transfer function as
Therefore,
Substituting , into the equation, we get:
The coefficient determines the frequency where the system response decreases by 3dB, or, the response cutoff bandwidth ω. The unit is rad / s.
In other words, we have
with ,
Usually in practice, we want to ensure that the current bandwidth is less than 10% of the switching frequency, i.e. 20% of the Nyquist rate.
For example, if the switching frequency is 20kHz, the maximum bandwidth would be 2kHz.
Usually, we want to control the motor's output torque, instead of the current. Therefore, we must establish the relation between current and the output torque .
The torque is proportional to the phase current, with a factor of motor torque constant .
However, for the drone BLDC motors, vendors typically only provide the KV rating, representing the revolution per minute per volt applied between the motor phases. A typical measurement process of this KV value is to rotate the motor at a specific rotation speed and measure the peak-to-peak voltage difference between two phases. Hence, this KV value equals to the line-to-line back EMF voltage of the motor.
To convert the KV rating to motor torque constant, two caveats need to be paied attention for. The first thing is the unit conversion. KV is given in revolution per minute. To convert it to the SI unit radius per second per volt, we need to use .
Another aspect is that the measurement of KV is done between two phases of the motor, which the reference frame is different from the DQ frame the PI controller are situated at. To convert it to the correct DQ frame, the following equation establishes:
Similar to current control loop, we can build a PD controller to regulate the rotor position by controlling the target torque.
As a result, we get the following motor controller block diagram.
We can inject user control targets at different stage to achieve control of each quantity (e.g. position, velocity, torque, current, or voltage control).
Reference:
The three phase currents , , and are three sinusoidal, rotating vectors, each offset by 120° relative to the others. Since they all lie in the same plane, the (also named ) can be used to reduce them into two orthogonal components, and .
Next, incorporating the information on rotor position , the can be used to convert the and components from the rotor reference frame to a stationary frame. This yields two stationary components, typically denoted as (the direct axis component) and (the quadrature axis component). These stationary components simplify the motor control strategy by decoupling the torque and flux control.
Reference: