Making Field-Oriented Control of motors simple

The move from mechanical to electronically controlled commutation of motors, coupled with new battery technologies, has opened up a wide range of new applications. Microcontrollers are often the best choice for implementing the motor control since their features are also required to implement other features of the end application. This is made especially challenging when considering the hard-real-time demands of electronically commutating a motor.

Many processing solutions leverage either a digital signal processing (DSP) architecture, or utilize some sort of DSP instruction set extensions or co-processor, in order to efficiently implement the necessary control algorithms. Despite this processing power, the demands of motor control and its need for determinism make it difficult to schedule other tasks effectively.

The reason for turning to DSPs for motor control lies with the type of mathematics employed in the algorithms of sinusoidal commutation. Typically, a Vector or Field-Oriented Control (FOC) algorithm is employed, an approach first proposed in the 1960s. FOC promises smooth operation over the whole speed range, full torque at zero speed and superior dynamic performance with fast acceleration and deceleration. Rotor position can be determined by sensors, although there are schemes that are ‘sensorless’ and approximate the position.

FOC controls a variable frequency sinusoid that aims to keep the rotor and stator magnetic fields of the motor at 90 degrees under all conditions. Two parameters, field flux linkage and torque, need to be derived and controlled optimally to achieve this. These parameters need to be separated into orthogonal components (90 degrees apart in the static co-ordinates of the motor stator) and can be derived from the winding currents and rotor position.

In a sensorless implementation the process starts with the measurement of the three-phase winding currents IU, IV, IW which are passed through an A/D converter and changed to equivalent two-phase currents Iα, Iβ using the ‘Clarke’ conversion method, also known as ‘3-phase to 2-phase conversion’. The rotating coordinates, representing the field flux linkage and torque, are derived with a Park transform. The resulting values can be compared with target values and a compensating error signal, typically provided by a proportional-integral (PI) controller. The three phase drive voltages for the motor are then calculated by reversing the transforms performed previously.

Recognizing the complexity involved in a software implementation of such mathematics, devices such as the TXZ family of Arm® Cortex® based MCUs have integrated it into a hardware peripheral known as a Vector Engine (VE). The latest iteration of this peripheral not only implements the Park-Clarke transformations required for motor control but is also tightly coupled with the other on-chip peripheral needed for accurate motor control. This includes the pulse-width-modulation (PWM) timers and the analog-to-digital converter (ADC). Such tight integration simplifies configuration, ensures accuracy and efficiency in control, and leaves the processing core with much more time to execute other application functions.

Development of an FOC control system also requires tuning of the PI stage gain to match the needs of the particular motor selected. This typically results in different values for light, medium and heavy loads. Too low a gain will produce a slow response to demanded changes and too large will give oscillatory over- and under-shoot, while the ideal gain provides a rapid but critically damped response.

Motor winding resistance and inductance also need to be known, ideally with their variation over the operating temperature specified. Toshiba assist in this tuning phase with their graphical PC utility ‘MotorMind’. Utilising a simple serial interface communication with the target hardware, it is possible to adjust all VE peripheral parameters with the changes being effected in real time. It is even possible to access and visualise information buried deep inside of the vector engine without the need to implement additional data acquisition interfacing.

Designers looking to develop FOC motor control applications, especially those with high motor RPM or a demand for high integration and minimal component count, should review Toshiba’s latest free white paper. It provides the background on the control approach and the mathematics behind FOC, while providing insights on design approaches offered by the TXZ MCU families Vector Engine implementation.

This comprehensive white paper can be downloaded here