# Field Oriented Control (FOC) - A Deep Dive

~ Chuck Lewin

DC Brush, Brushless DC (BLDC) and step motors are the three most commonly used motor types for positioning and velocity motion control applications. Of these, Brushless DC and step motors are 'multi-phase', meaning they require some type of external coil excitation to keep the motor moving.

This deep dive will examine the most popular motion control techniques, including field-oriented control (FOC), for multi-phase motor control, with an eye toward determining what control techniques work best for positioning and high-speed applications.

## A tail of two vectors

For Brushless DC motors, magnetic fields are generated by magnets mounted directly on the rotor and by coils in the stator. The stator windings generally come in a 3-phase configuration and are arranged to be 120 electrical degrees apart from each other. It is the sum of the force generated by these three phases that will ultimately generate useable motor rotation.

Depending on how the individual magnetic coils are driven, they can interact to create force that does not generate rotational torque, or they can create force which does generate rotation. These two different kinds of force are known as quadrature (Q) and direct (D), with the useful quadrature forces (not to be confused with quadrature encoding scheme for position feedback devices) running perpendicular to the pole axis of the rotor, and the non-torque generating direct forces running parallel to the rotor's pole axis (Figure 1).

Figure 1: Quadrature and Direct Forces

The trick to generating rotation is to maximize Q (quadrature) while minimizing D (direct) torque generation. If the rotor angle is measured using a Hall sensor or position encoder, the direction of the magnetic field from the rotor is known.

Six step commutation is a simple technique that reads Hall sensors and excites the coils in a specific sequence. The downside to this technique is that for many motors it gives up some efficiency and is not as smooth as more advanced techniques. This is because the output control signal for each coil changes abruptly when a new Hall state is read, which occurs every 60 electrical degrees. Both of these phenomena can be seen in Figure 2, which shows the torque reduction that stems from having only six measurable vector angles per electrical rotation.

Figure 2: Torque Reduction vs Hall-based Sensing

That kind of performance is fine for simple spinning applications, or applications where the motor is geared way down. But for systems that need smoother motion and higher performance, two advanced techniques: sinusoidal control and field oriented control (FOC), provide a jump in performance.

## Field oriented control (FOC)

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: Sinusoidal Commutation

Figure 3b: Field Oriented Control

Figure 3a shows control schemes for both sinusoidal commutation and field oriented control. In the sinusoidal control approach, the torque command is 'vectorized' through a sinusoidal lookup table, thereby developing a separate command for each winding of the motor. As the rotor advances, the lookup angle advances in kind. Once the vectorized phase command is generated, it is passed on to a current loop, one for each winding, which attempts to keeps the actual winding current at the desired current value.

An important characteristic of this approach is that as the frequency of motor rotation increases, so does the challenge of maintaining the desired current. This is because the current loop is affected by the rotation frequency. Lag in the current loop, insignificant at low rotation speeds, generates increasing amounts of D (unwanted) torque at higher rotation speeds, resulting in a reduction of available torque.

The control scheme for FOC, Figure 3b, differs in that the current loop occurs de-referenced from the motor's rotation. That is, independent of the motor's rotation. In the FOC approach, there are two current loops, one for the Q torque and another for the D torque. The Q torque loop is driven with the user's desired torque from the servo controller. The D loop is driven with an input command of zero, so as to minimize the unwanted direct torque component.

The trick to making all of this work is math-intensive transform operations that convert the vectorized phase angle to, and from, the de-referenced D and Q reference frame. Known as Park and Clarke transforms, their practical implementation in Brushless DC drives are now commonplace due to the availability of low-cost, high-performance DSPs and microprocessors.

## Why can't I fry an egg on this motor?

So, what does all this wizardry add up to besides lifetime employment for math majors? The answer is (drum roll...) higher top speed and, often just as importantly, higher motor drive efficiency.

Motor controllers which adopt an FOC approach can drive the motor more efficiently, as high as 97 % in certain applications. This advantage is particularly pronounced at higher speeds.

As it turns out, FOC techniques can also benefit the top speeds of step motors, particularly if the step motor is driven using a closer loop stepper technique (also sometimes called stepper servo). Although step motors are generally two-phase rather than three phase devices, all the same D and Q force concepts discussed above apply. And since closed loop stepper drives the step motor using a variable torque command servo technique rather than with a fixed torque command, dramatic reductions in heat output in the step motor are possible.

## Where the B-Field hits the road

The following chart shows some common applications that benefit most from Field Oriented Control (FOC):

Benefits

Typical Applications

Higher top speed

• Centrifuges
• Machine tool spindles
• Bar code scanners
• Drum scanners & printers
• Scientific instrumentation
• High speed blowers/compressors

Higher efficiency

• Electric vehicles
• Portable applications
• Heat-sensitive applications

## To the laboratory!

The diagram below illustrates a simple demonstration set-up in PMD's lab of the performance improvement from FOC versus Hall-based commutation. In this application, a high speed blower has an internal high speed BLDC motor, and is connected to a Performance Motion Devices’ ION Digital Drive.

Figure 4: Illustration of apparatus set-up for videos below

The links to the videos below show a visual difference in motor efficiency between FOC and Hall-based techniques.

The first video shows the blower driving the car using field oriented control.

The second video shows the exact same setup with a Hall-based commutation.

Using either Hall or FOC control modes as shown above, the ION was given a simple command to drive the motor as fast as it could. In each case the supply voltage was the same, @ 24V.

Under these conditions, the Hall-based technique drove the blower spindle at 17,895 RPM, and the FOC technique drove the blower at 29,310 RPM - about 64% faster!

These are actually larger differences in performance than one would normally expect, which may be because of the fact that the motor is not doing a lot of work (other than blowing a toy car). But the principle remains that at high speed in particular, field oriented control (FOC) can provide significant performance advantages over Hall-based and sinusoidal commutation techniques.

## PMD Products That Provide Field Oriented Control

Performance Motion Devices has been producing motion control ICs that provide advanced position and torque control of step motor, DC Brush, and Brushless DC motors for more than twenty-five years. Since that time, we have also embedded these ICs into plug and play modules and boards. While different in packaging, all of these products are controlled by C-Motion, PMD's easy to use motion control language and are ideal for use in laboratory equipment, spindle control, liquid handling, and a wide variety of other high performance motion control applications.

### Juno Family of ICs

The Juno family of ICs are perfect for building your own low cost, high performance spindle controller. Junos’ excel at velocity and torque control, with features such as FOC (Field Oriented Control), profile generation, high/low switching amplifier control signal generation, leg current sensing, and more. Available in packages as small as 7mm x 7mm and costing \$12 in quantity, these ICs are an ideal solution for your next spindle and pump controller design.

### MC58113 Series ICs

The  MC58113 series of ICs are part of PMD's popular Magellan Motion Control IC Family and provide advanced position control for step motors, BLDC, and DC Brush motors alike. Standard features include auto-tuning, s-curve profiling, FOC (Field Oriented Control), high/low switch signal control, direct encoder & pulse & direction input, and much more. Whether used for laboratory automation, pump control, pointing systems, or general-purpose automation, the MC58113 family of ICs are the ideal solution for your next machine design.

### ION Digital Drives

ION Digital Drives combine a single axis Magellan IC and an ultra-efficient digital amplifier into a compact rugged package. In addition to advanced servo motor control, IONs provide S-curve point to point moves, i2T power management, downloadable user code, and a range of safety functions including over current, over voltage, and over temperature detect. IONs are easy to use plug and play devices that will get your application up and running in a snap.