Share this

Using an ARM7 processor to implement field-oriented control of a brushless motor

2026-04-06 00:19:37 · · #1
No matter how much the energy efficiency of motor drives is improved, it will save a significant amount of electrical energy, which is part of the reason for the growing market interest in advanced motor control algorithms. Three-phase brushless motors mainly refer to AC induction asynchronous motors and permanent magnet synchronous motors. These motors are known for their high energy efficiency, high reliability, low maintenance costs, low product costs, and quiet operation. Induction motors have been widely used in industrial applications such as water pumps or fans, and are now flooding the markets for home appliances, air conditioners, automobiles, and servo drives, alongside permanent magnet synchronous motors. The main reasons driving the development of three-phase brushless motors are: the reduction in the price of electronic components, making it possible to implement complex control strategies to overcome their inherently poor dynamic performance. Take asynchronous motors as an example. A simple design requires applying three sinusoidal voltages with a 120° phase shift to the rotor. The arrangement of these windings generates a rotating magnetic flux. Utilizing the transformer effect, this magnetic flux induces a current in the rotor cage, which in turn generates rotor magnetic flux. It is the interaction of these two magnetic fluxes that produces electromagnetic torque, causing the motor to rotate. The condition for inducing current in the rotor is that the rotor speed is different from the frequency of the stator magnetic flux; if they are the same, the rotor experiences only a constant magnetic flux, and no induced current is generated (Lenz's Law). The slight difference between the energizing frequency and the resulting mechanical frequency is the reason for the name "asynchronous motor." The simplest way to achieve speed-adjustable operation of a three-phase AC motor is to implement a so-called voltage/frequency control (or scalar control), which works by maintaining a constant ratio between the frequency and the motor's energizing voltage. This method generates a constant stator magnetic flux, resulting in rated motor torque on the rotor shaft. This is a popular control method for low-cost drives with well-known load characteristics and drives with low control bandwidth requirements, such as a small number of HP pumps and fans, washing machines, etc. An 8-bit microcontroller with relatively low MIPS and reasonable peripheral interfaces, such as the ST7MC, can meet the needs of this application, and programming is also simple. This method cannot guarantee optimal motor characteristics (torque, efficiency) during instantaneous operation. Moreover, to prevent temporary demagnetization of the motor, the duration of the driver's reaction force must be limited. To overcome these limitations, and considering the dynamic characteristics of motors, other control strategies have emerged in the market. Field-oriented control (NAC) (also known as vector control) is the most widely used control algorithm, with target applications including belt conveyors, high-power water pumps, automotive exhaust emissions, and factory automation. This method allows an AC motor to be controlled with two decoupled control variables (hereinafter referred to as Id and Iq), just like controlling a DC motor with separate excitation. The excitation current Id generates the DC main magnetic flux, while Iq controls the torque, functioning similarly to the armature current in a DC motor. When the load changes, NAC can precisely control the speed with a very fast response, even during instantaneous operation. By keeping the stator and rotor magnetic fluxes orthogonal, motor efficiency can be optimized. This method can implement position control schemes (through instantaneous torque control), releasing the full torque of the motor at low speeds. The working principle of NAC is briefly introduced below. The reference coordinate system is changed from the fixed stator coil coordinate system to the moving rotor magnetic flux coordinate system using two well-known transformation algorithms: Clarke transformation and Park transformation. The Clarke transformation converts a 120° phase-shifted three-axis coordinate system (Ia, Ib, Ic) into a two-axis Cartesian coordinate system (Ia, Ib); the Park transformation converts the fixed (Ia, Ib) coordinate system into a rotor-dependent two-axis rotating coordinate system (Id, Iq). These last two values ​​are DC or slowly changing values, which can be adjusted using a simple PI controller. Finally, the inverse transformations (Park and Clarke inverse transformations) are used to restore it to the fixed AC three-phase coordinate system, as shown in Figure 1. [img=500,315]http://www.icembed.com/UploadFiles/20072281731734.jpg[/img] Figure 1 Working principle of field-oriented control. Among various vector control methods, we adopt an indirect field-oriented control method. The only measured and processed motor model parameter is the rotor time constant Lr/Rr (within the slip estimator module). If the motor is a permanent magnet synchronous motor, the block diagram and corresponding functions will be very similar, eliminating the need for a slip estimator, and the flux command can be set to zero (the magnet generates flux itself). The algorithm is only part of the job: once the voltage level is calculated, it must be converted to volts and amperes. Like any modern power electronics system, this motor control system consists of muscles (power converters) and a brain (microcontroller). The power converter (commonly known as an inverter) is driven by three PWM outputs. As can be seen from Figure 2, a powerful three-way buffer converts a 0-5V logic signal into a 0-300V square wave signal, which is then applied to the motor terminals. The motor winding inductance acts as a low-pass filter: removing the carrier frequency, smoothing current changes, and forming a sinusoidal current waveform, i.e., the PWM-modulated waveform. [img=500,287]http://www.icembed.com/UploadFiles/20072281738580.jpg[/img] Figure 2. Motor Control System. Let's examine the overall requirements of an advanced motor drive system, starting with the CPU. The entire vector control algorithm must be continuously and iteratively calculated at speeds between 1 and 10 kHz (1 ms to 100 μs closed-loop time, depending on the bandwidth of the final application). The system requires a large amount of mathematical calculations (trigonometric functions, PID regulators, real-time flux calculations, and torque estimation based on motor parameters). Furthermore, sufficient margin must be left for calculations in the rest of the application (communication, user interface, etc.). To avoid limiting dynamic performance, the main control variables require a minimum of 16 bits of precision, and intermediate results require 32 bits of computing power. All these factors explain why vector control must use a high-speed, high-performance processor. Existing products on the market include 16-bit or 32-bit microcontrollers, hybrid controllers, or digital signal processors. These products are typically directly related to advanced motor control. Unless you are specifically seeking the fastest digital current control loop or the most precise curve control, an ARM7 processor-based solution perfectly meets the requirements for flux-oriented control. Besides core performance, a reasonable set of peripheral interfaces is necessary to minimize external components. This design greatly simplifies the design process, ensuring cost-effectiveness and reliability (due to simplified PCB design). For signal generation, general-purpose PWM channels are unsuitable; dedicated PWM signals for motor control must be used. Therefore, three pairs of synchronous complementary PWM channels with dead-time insertion are required to prevent short-circuit faults in the half-bridge. For safety, all six PWM channels must be shut down simultaneously in the event of a power stage fault/error (overcurrent, high temperature). A dedicated emergency fault input is also included for safety features. The timer clock frequency (typically >50MHz) and the triangular waveform of the PWM carrier frequency are the two factors that ensure high accuracy of the sinusoidal waveform and the optimal noise-to-switching loss ratio, not a sawtooth waveform. Analog signal acquisition is another major load for the MCU. Motor monitoring must control two types of signals: slowly changing signals such as DC bus voltage (containing a 100Hz ripple voltage component) or potentiometer voltage; and high-dynamic motor currents ranging from a few hertz to hundreds of hertz, including ripple currents with PWM rates (typically above 10 kHz). Therefore, the analog-to-digital converter (ADC) speed must be very fast (below 5 μs) to reduce measurements of unstable currents when sequentially sampling motor phases, saving time spent waiting for ADC conversion results in PWM interrupt service routines. Regarding converter accuracy, 10 bits are becoming the standard. While 8-bit converters are sufficient for most applications, applications with wider current ranges require ADCs with more than 10 bits to ensure adequate resolution under various load conditions. Furthermore, control accuracy is directly related to the quality of the ADC. Finally, we must also handle speed and/or position sensors. Incremental encoder position sensors require dedicated signal conditioning functions, acting as an external clock with up and down counting capabilities to handle two quadrature signal outputs. This function is handled by a timer with a dedicated encoder mode. We successfully implemented a sensor-based magnetic field orientation control (based on a speed generator) algorithm on the STR730 microcontroller, which is based on an ARM7TDMI processor operating at 32MHz and has embedded flash memory. This algorithm was developed entirely in C language without any deliberate code optimization. In the actual algorithm, the entire control loop was completed in 55μs, with a CPU load of 17% at a 3kHz sampling rate. When the core runs at 60MHz, the expected execution time is less than 20μs. The algorithm implemented using the ARM7 processor has many advantages. First, ARM is now the standard core, and its platform approach and abundant development tools are key to cost savings. Second, if the next generation of product design requires higher processing speeds (MIPS), you can directly upgrade to an ARM9-based product. From an architectural perspective, the barrel shifter is interesting; it allows for optimization of variable resolution throughout the processing flow. You can change the format within a clock cycle to limit processing time. Furthermore, it allows for saving certain multiplication operations using constants; for example, r0 = (r1 << 4) - r1 is equivalent to r0 = 15xr1, or even faster. Low-cost DSPs have a 16-bit fixed-point core. When the integral term of a PI regulator must be processed or the required accuracy range extended, the ARM7's 32-bit data path avoids multiple 16-bit loads. Other important DSP functions, such as hardware closed-loop and dual-addressing modes, are less useful when processing motor control signals. This, to some extent, explains why the ARM7 processor is often described as such an optimized architecture. Figure 3 shows a new STR7 product, developed for ST's ARM7-based product line, meeting the system requirements outlined above. Key features include: * SPTimer synchronous PWM timer, performing high-side PWM signal generation, based on a 16-bit timer with a time resolution down to 16.6ns for optimal voltage reconstruction; * Ability to generate centered or edge-aligned PWM patterns; * Internal programmable dead-time signal generator and emergency fault protection functions required for inverter fault handling; * Multiple interrupt sources, a programmable reload rate, and "no-smoking" protection to simplify software processing tasks and prevent software from uncontrollably modifying configuration registers of critical system peripherals. [img=500,285]http://www.icembed.com/UploadFiles/200722817310621.jpg[/img] Figure 3. The new STR7 product. This SPTimer can also be used as a general-purpose timer, featuring two input capture pins, two output compare pins, and an encoder-specific mode to minimize software overhead. This mode has x2 or x4 resolution, automatic direction management, and can be programmed for the number of lines of the selected encoder, allowing direct reading of the rotor angle signal from the counter register. For current measurement, the new product incorporates a 3μs 10-bit analog-to-digital converter with automatic scanning. Key peripheral interfaces include multiple timers, communication interfaces, etc. Considering the non-motor control tasks handled by the microcontroller, we designed intelligent peripherals on the circuit board, such as connection terminals, power factor correction, and energy-efficient braking. STMicroelectronics focuses its efforts on the motor control market and is one of the few suppliers in the world capable of providing a complete portfolio of motor control products, ranging from fast diodes to processors, including high-voltage gate drivers and switches. To meet the demand for more energy-efficient "green" motors and high-performance drives, we've built a complete product line based on ARM, helping designers unravel the mysteries of vector control algorithms. This control approach will soon render today's mainstream DSP-based control obsolete. Promoting a new control method: since advanced motor control needs can be met using standard ARM-based microcontrollers, who would bother spending time implementing advanced motor control on proprietary architectures?
Read next

CATDOLL Maria Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22