Brushless motors have become a commodity also to hobbyists, and with that modern motor drive technologies crept into their field of vision. * Field-oriented control* (FOC) is one of these technologies, but is still rarely used in the hobby world. The web provides us with endless articles nicely explaining the FOC algorithm in detail. However, I found them all to present FOC in essentially one and the same way, and in a way which I didn’t found very suitable to answer those questions I was most interested in, such as „How does FOC compare to other approaches, e.g. a sinusoidal drive, with regards to dynamic range?“.

In this article I approach FOC from a different perspective, which I actually started to like a lot as it shines light on various aspects of FOC in a rather natural way. I of course do not reinvent the wheel, it’s just an alternative view on the problem. The basic idea is to analyze the situation in the frame and not the rotor-fixed frame as it is usually done.

The hobby brushless motors should be classified as Brushless DC Motor (BLDCM), since their back EMF is closer to a trapezoidal shape, and not the sinusoidal shape characteristic for a Permanent Magnet Synchronous Motor (PMSM) (the back EMF of a typical hobby brushless motor has quite strong higher-harmonic contributions). Despite that, in the context of FOC they are treated as PMSMs. This point should be kept in mind, since it can have important practical implications. It is sad that hobby motor manufactures do not offer motors which better approximate PMSMs.

As always, the literature on the web had been my only source of information.

In the previous article Brushless Gimbal Direct Drive: Theory and Experiment, I discussed the sinusoidal motor drive. The present article duplicates some of the material found there, but not all, and I repeatedly refer to that previous article. That is, both articles should be viewed as companions.

**1**. Motor Equations

1.1. Three-Phase Motor Model

1.2. Space Vector Modulation

**2**. Field Oriented Control

**3**. Motor Control Viewed in the Frame

3.1. Field Oriented Control

3.2. Sinusoidal Modulation

3.3. Simplified FOC

3.4. Comparative Discussion

References

1. Motor Equations

1.1. Three-Phase Motor Model

The following motor equations can be found in any literature source on FOC.

The equations in the frame are slightly more general than those I’ve used in the article Brushless Gimbal Direct Drive: Theory and Experiment in that they allow for saliency, i.e., different values for and . However, by the reasons given in [HDP06,AK12], for hobby brushless motors saliency should be small, i.e., we can expect . In addition, we will be more interested in the frame, in which saliency would imply angle dependent inductances complicating the equations. Therefore, will be assumed.

The electrical angle of the motor’s rotor is denoted by . It is related to the mechanical angle via the number of motor pole pairs: .

In the rotor-fixed frame, the motor equations read:

Eq. (1.1)

Eq. (1.2)

Eq. (1.3)

In the frame the equations for a non-salient motor read:

Eq. (1.4)

Eq. (1.5)

Eq. (1.6)

The back EMF or the term , respectively, is manifestly sinusoidal, reflecting the PMSM approximation. As in the previous article I find it more convenient to express the equations using a complex notation, . This results in

Eq. (1.7)

Eq. (1.8)

Eq. (1.9)

The motor is driven by applying sinusoidal voltages to the motor phases. Thus also the currents are sinusoidal, and the voltages and currents can be expressed as

, Eq. (1.10)

where and are the phases and and are the amplitudes of the voltage and current vectors, respectively. This leads directly to

Eq. (1.11)

and our „master“ equation:

Eq. (1.12) |

**Comment:** One could, maybe more directly, have also expressed the expressions in complex notation, using . One would find the relation , or and (see also the Formulary here).

1.2. Space Vector Modulation

In practical applications of FOC, the voltages applied to the motor phases are generated from a DC voltage using the PWM technique. The simplest approach would be to directly generate sinusoidal voltages, by using PWM modulation times calculated from . However, usually the space vector modulation (SVM) technique is applied. Here, the neutral-point voltage is not zero (or half the bus voltage in fact), but permanently shifted around such that the three generated line voltages „fit better“ into the range given by the DC bus voltage. An excellent explanation is given in [DW14] (starts at ca. 24:00).

As a result, for a symmetric motor, the magnitude of the voltages between the motor phases can be larger by about 15% than with using the naive sinusoidal modulation technique. However, also the SVM technique results in sinusoidal phase-to-phase voltages. That is, the description in Chapter 1.1 can be taken over without modification, except that is not limited by (half) the DC bus voltage, but can be larger by a factor 1.15.

2. Field Oriented Control

Following the standard argument, the FOC algorithm is obtained as follows: In the rotor-fixed frame the voltages and currents are nearly static, slowly time-varying quantities. They are thus much easier to control than the fast time-varying signals in the stator-fixed frame, since a lower controller bandwidth is acceptable. Thus, instead of controlling the phase currents or the stator-fixed currents , the current controller is set up to control the rotor-fixed currents . Since however only are measurable, and the transformation to the frame requires knowledge of the motor position , the sensored FOC scheme is immediately obtained:

In normal operating conditions, the direct current is regulated to be zero. The current is then „perpendicular“ to the flux, and the torque generated by the motor is maximal, and given by:

Eq. (2.1)

The torque is directly determined by a current, , exactly as it is for a brushed DC motor. As a result, the motor behavior is also that of a brushed DC motor, with a torque constant .

In practice only two of the three phase currents need to be measured, since they are related by . Also, the inverse Park transformation can be combined with the SVM into a simpler algorithm. These are however just technical details irrelevant to the principle.

The performance of the current controller can be improved. The equations for the voltages are coupled, i.e., the direct voltage is affected not only by but also by , and similarly for the quadrature voltage . Thus, in the above scheme the two PI controllers are coupled, but can be decoupled by adding feedforward terms, which exactly compensate for the coupling terms in the equations [AZ05][DL16].

3. Motor Control Viewed in the Frame

My interest in the FOC technique is related to my efforts in camera gimbals, specifically the 3-axis gimbal controller STorM32. The main question of concern to me was understanding the advantages and disadvantages of the FOC approach * in comparison* to the simpler sinusoidal modulation technique, as explored in the article Brushless Gimbal Direct Drive: Theory and Experiment, and other FOC-inspired „encoder“ approaches. I found it difficult to find answers with working in the frame, as it’s typically done in FOC discussions. Interestingly, and maybe surprisingly, the frame, which I found useful for discussing the sinusoidal modulation, turned out to be also useful for discussing FOC.

To simplify notation, the torque constant is introduced.

3.1. Field Oriented Control

The FOC approach as described in the previous Chapter 2 realizes . The current is thus perpendicular to the flux orientation (which coincides with the rotor orientation), which implies for the current phase that . Thus, equation (1.12) directly leads to

Eq. (3.1) |

which of course agrees with the result obtained in Chapter 2.

In the FOC scheme the control variable for controlling the motor is the amplitude of the current .

3.2. Sinusoidal Modulation

The case of a sinusoidal modulation has been discussed already in Brushless Gimbal Direct Drive: Theory and Experiment. Here, the motor is driven with the voltages .

From equation (1.12) one deduces

Eq. (3.3)

With the assumption of low frequencies, , and small deviations , the simplified torque relation is obtained:

Eq. (3.4) |

where angles were also converted to mechanical angles. Most notably, a term linear in appears, which will lead to an (undesirable) oscillating characteristic behavior. The term linear in will add to the damping in the system, and is not very consequential.

The control variable in this drive scheme is the phase of the voltage vector applied to the motor. The amplitude of the voltage is held constant.

3.3. Simplified FOC

It is interesting to consider a „simplified FOC“ scheme, in which the voltage is maintained to be perpendicular to the flux, and no the current. In other words, instead of enforcing one ensures . This can always be easily achieved with knowing the motor position .

From equation (1.12) one then finds

Eq. (3.5)

Assuming again low frequencies, , and converting to mechanical angles, the torque relation simplifies to:

Eq. (3.6)

In practical applications the voltage is adjusted by PWM modulation of a DC bus voltage , that is , with the PWM duty cycle . The torque relation then reads:

Eq. (3.7) |

In this method, the control variable is the amplitude of the voltage vector applied to the motor, or the PWM duty cycle , respectively. The phase is, as mentioned before, adjusted to be always perpendicular to the flux orientation.

3.4. Comparative Discussion

Using the „master equation“ (1.12) three different motor drive schemes could be derived on an equal footing: FOC, a simplified FOC scheme, and the sinusoidal motor drive.

Taking into account the mechanical properties of the motor and a load attached to it, the equation of motion becomes

Eq. (3.8)

where is the combined moment of inertia of the motor and the load, and describes some viscous friction. In low-speed operation also a Coulomb friction term of the form should be added, but it is more involved to handle mathematically and hence ignored here. Cogging torque would lead to an additional, position dependent term . Variations in the flux linkage density would by accounted for by an angle dependent friction term . These contributions to torque ripples [JH96] are in no means negligible in our hobby brushless motors, but are neglected in the following.

We arrive at these transfer functions for the mechanical motor position:

FOC: Eq. (3.9)

simplified FOC: Eq. (3.10)

sinusoidal drive: Eq. (3.11)

where in the last two cases the low-frequency assumption were employed.

These transfer functions directly reveal the relevant dynamical differences:

In comparison to FOC, the simplified FOC scheme adds a term to the damping. I unfortunately do not have good values for (nor for ), but estimates indicate that this damping is extremely small, and irrelevant. The major difference between the FOC and the simplified FOC schemes is thus that in the latter the effect of the motor inductance kicks in at frequencies of about , leading to an additional second-order roll off. Again, I unfortunately do not have good values for ; my estimates range from few 10 Hz to several 10 kHz so that this effect could indeed be significant. In anyway, a general lesson can be learned however:

The major effect of the current control loop is to compensate for the (negative) impact of the motor inductance.

In hindsight I realized that I could have come to that insight already earlier from comparing the dynamics of the voltage- and current-controlled DC motor (discussed here), but I didn’t. This however just underpins the generality of that conclusion.

The major difference of the sinusoidal drive in comparison to the FOC and simplified FOC schemes is the appearance of the term in the denominator, which has dramatic consequences: The transfer function becomes that of an under-damped oscillator, with a resonance frequency (for details see Brushless Gimbal Direct Drive: Theory and Experiment). In practical cases, this frequency is in the range of 5 – 15 Hz, which implies that the motor loses its responsiveness at frequencies above this cut off.

Frequency Dependencies

The similarities and differences in the dynamic behavior can be further underpinned by rewriting the transfer functions as follows:

FOC: Eq. (3.12)

simplified FOC: Eq. (3.13)

sinusoidal drive: Eq. (3.14)

where , , and as before. For the simplified FOC and sinusoidal drive schemes the roll-off due to the motor inductance at frequencies above have in addition to be rated in.

Parameter Identification

For the simplified FOC scheme, the transfer function with respect to speed can be written as

Eq. (3.15)

with parameters

Eq. (3.16)

Notably, is independent of the inertia and thus is indeed a motor constant. In the steady state or constant speed operation one finds

Eq. (3.17)

which identifies as the „KV constant“ of the motor. It can be compared to the motor constant of a DC motor (eqs. 3.1 and 3.2 in Elektromotor & Rotor: Grundlagen), yielding and .

**Comment:** The and KV constants express the speed-voltage relation in different units: .

The comparison to the sinusoidal drive scheme yields:

Eq. (3.18)

Appendix: References

[AK12] Design and Simulation of Field Oriented Control and Direct Torque Control for a Permanent Magnet Synchronous Motor with Positive Saliency (Mai ’12) [.pdf] – by Andreas Kronberg

[DW14] Teaching Old Motors New Tricks — Part 3 – by Dave Wilson, Texas Instruments

[HDP06] Feldorientierte Regelung der permanenterregten Synchronmaschine ohne Lagegeber fur den gesamten Drehzahlbereich bis zum Stillstand (Dez. ’06) [.pdf] – by Hector D. Perassi

[JB12] Geregelte Drehstromantriebe (Jan. ’12) [.pdf] – by Joachim Böcker

[AZ05] Improving Motor Current Control Using Decoupling Technique (Nov. ’05) [.pdf] – by Andras Zentai, Tamas Daboczi

[DL16] Features of Tuning Strategy for Field Oriented Control of PMSM Position Drive System with Two mass Load [.pdf] – by Dmitry V. Lukichev, Galina L. Demidova

[JH96] Identification and Compensation of Torque Ripple in High-Precision Permanent Magnet Motor Drives – by Joachim Holtz