No matter how much more efficient a motor drive is, it will save a lot of power, which is part of the reason for the growing 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 cost and quiet operation. Induction motors are already widely used in industrial applications such as pumps or fans and are flooding markets such as home appliances, air conditioners, automobiles or servo drives along with permanent magnet synchronous motors. The main reasons for promoting the development of three-phase brushless motors are: the price of Electronic components is reduced, and it is possible to implement complex control strategies to overcome their poor dynamic performance.

Take an asynchronous motor as an example. A simple design requires three 120° phase-shifted sine-wave voltages to be applied to the stator, and these windings are arranged in such a way that a rotating magnetic flux is produced. Using the transformer effect, this magnetic flux induces a current in the rotor cage, which then generates the rotor magnetic flux. It is these two magnetic fluxes that interact to generate an electromagnetic torque that causes the motor to rotate. The condition for inducing a current on the rotor is to ensure that the rotational speed of the rotor is different from the frequency of the magnetic flux of the stator; if they are the same, the rotor experiences only a constant magnetic flux and no induced current is generated (Lenz’s law). The small difference between the energization frequency and the mechanical frequency it produces is what gives asynchronous motors their name. The easiest way to achieve adjustable speed 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 frequency and the voltage at which the motor is energized. This method produces a constant stator flux and then rated motor torque on the rotor main shaft. This is a popular control method for low-cost drives where the load characteristics of the application are well known, as well as drives where the control bandwidth requirements are not very high, such as a small number of HP pumps and fans, washing machines, etc. An 8-bit microcontroller such as the ST7MC with a low MIPS and a reasonable peripheral interface can meet this application requirement, and the programming is also very simple.

This method cannot guarantee optimal motor characteristics (torque, energy efficiency) during instantaneous operation. Moreover, in order to prevent the temporary demagnetization of the motor, the time of the driver’s reaction force must also be limited. To overcome these constraints, other control strategies have emerged on the market considering the dynamic characteristics of the motor. Field-oriented control (also called 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 (hereafter called Id and Iq), just like a separately excited DC motor. The field current Id produces the main DC flux, while Iq controls the torque, functioning the same as the armature current in a DC motor. Field Oriented Control enables precise control of rotational speed when the load changes, responds very quickly, and optimizes motor energy efficiency by keeping the magnetic fluxes of the stator and rotor in quadrature, even during transient operation. This method enables a position control scheme (through momentary torque control) to release the full torque of the motor at low speeds.

The working principle of field-oriented control is briefly described below. To change the reference coordinate system from the fixed stator coil to the moving rotor flux coordinate system, two well-known transformation algorithms are used: Clarke transformation and Park transformation. Clarke transformation is to convert the 120° phase-shifted three-axis coordinate system (Ia, Ib, Ic) into a two-axis Cartesian coordinate system (Ia, Ib); Park transformation is to convert the fixed (Ia, Ib) coordinate system into a rotor-related coordinate system The two-axis rotation coordinate system (Id, Iq) of . The last two values ​​are DC or slowly changing values ​​that can be adjusted using a simple PI controller approach. Finally, it is restored to a fixed AC three-phase coordinate system using the inverse transformation (Park and Clarke inverse transformation), as shown in Figure 1.

Field-Oriented Control of Brushless Motors with a Single STMicroelectronics ARM7 Processor

Figure 1 The working principle of field-oriented control

Among the various vector control methods, we employ an indirect field-oriented control method, and the only motor model parameter measured and processed is the rotor time constant Lr/Rr (in the slip estimator module). If the motor is a permanent magnet synchronous motor, the block diagram and corresponding functions will be very similar, the slip estimator is no longer needed, and the flux command can be set to zero (the magnet itself generates the flux). Algorithms are only part of the job: whenever a voltage level is calculated, it must be converted into volts and amps. Like in any modern power electronic system, this motor control system consists of muscles (power converters) and brains (microcontrollers). The drive power converter (commonly known as the inverter) is driven by three PWM outputs. It is not difficult to see from Figure 2 that a powerful three-way buffer converts a 0-5V logic signal into a 0-300V square wave signal and applies it to the motor terminals. The winding inductance of the motor acts as a low-pass filter: removing the carrier frequency, smoothing the current change, and forming a sinusoidal current waveform, that is, a PWM modulated waveform.

Field-Oriented Control of Brushless Motors with a Single STMicroelectronics ARM7 Processor

Figure 2 Motor Control System

Let’s look at the overall requirements of an advanced motor drive system, starting with the CPU. The entire vector control algorithm must be continuously and repeatedly calculated, and the calculation speed is between 1 and 10 kHz (1ms up to 100μs closed-loop time, depending on the bandwidth of the final application). The system requires a lot of math (trigonometric functions, PID regulators, real-time flux and torque estimation based on motor parameters). In addition, there must be room for calculation of the rest of the application (communication, user interface, etc.). In order not to limit dynamic performance, primary control variables require a minimum of 16 bits of precision, and intermediate results require 32 bits of computing power. All of these factors explain why high-speed, high-performance processors must be used for vector control. Existing products on the market include 16- or 32-bit microcontrollers, hybrid controllers or digital signal processors, which are often directly related to advanced motor control, if you are not deliberately looking for the fastest digital current control loop or the most precise curve control, an ARM7 processor-based solution just meets the requirements for flux-oriented control. In addition to the core performance, if you want to minimize external components, you need to be equipped with reasonable peripheral interfaces. This design greatly simplifies the design process, ensuring cost-effectiveness and reliability (since the PCB design is simplified).

In terms of signal generation, a general-purpose PWM channel is not suitable, and a dedicated PWM signal for motor control must be used, so three pairs of synchronous complementary PWM channels must be used, with dead-time insertion to prevent possible short-circuit faults in the half-bridge. For safety reasons, when the power stage fails/error (overcurrent, high temperature), these 6 PWM channels must be turned off at the same time. The safety function is also equipped with a dedicated emergency fault input. The clock frequency of the timer (typically >50MHz) and the triangular waveform of the PWM carrier frequency are the two factors that ensure high accuracy and the best noise-to-switching loss ratio for a sine waveform, not a sawtooth waveform.

Analog signal acquisition is another major load of MCU, motor monitoring must control two types of signals: slowly changing signals such as DC bus voltage (containing 100Hz ripple voltage component) or potentiometer voltage; high dynamic frequency range from a few Hz to hundreds of Hz , which contains ripple current at PWM rates (typically above 10 kHz). Therefore, the analog-to-digital converter must be fast (below 5 μs) to reduce the measurement of jittery currents when sampling the motor phases sequentially, saving on the PWM interrupt service routine waiting for the result of the analog-to-digital conversion time. When it comes to converter accuracy, 10-bit is becoming the standard for converters. While 8-bit converters are sufficient for most applications, applications with extended current ranges require more than 10-bit analog-to-digital converters to ensure adequate resolution under various load conditions. Furthermore, the control accuracy is directly related to the quality of the analog-to-digital converter.

Finally, we also have to deal with tach and/or position sensors. Incremental encoder position sensors require dedicated signal conditioning as an external clock with up and down counting to handle the two quadrature signal outputs. Handling this function is a timer with a dedicated encoder mode.

We successfully implemented a sensor-based field-oriented control algorithm (based on tachometer generator) on STR730 microcontroller, which is based on ARM7TDMI processor, operates at 32MHz, and has embedded flash memory. This algorithm is completely developed in C language without any deliberate code optimization. In the actual algorithm, it takes 55 μs to complete the entire control loop, with a CPU load of 17% at a 3kHz sampling rate. When the core is running at 60MHz, the expected execution time is below 20µs. The algorithm implemented using the ARM7 processor has many advantages. First, ARM is now the standard core, and its platform approach and extensive development tools are key to cost savings; second, if next-generation product designs require higher processing speeds (MIPS), you can upgrade directly to ARM9-based products. The barrel shifter is interesting from an architectural point of view, allowing variable resolution to be optimized throughout the processing pipeline. You can change the format in one clock cycle to limit the processing time, in addition, it allows to save some multiplications with constants, for example r0=(r1<<4) - r1 is equivalent to r0=15xr1, even faster . Low-cost DSPs have 16-bit fixed-point cores. The ARM7's 32-bit data path is able to avoid multiple 16-bit loads when it is necessary to deal with the integral term of the PI regulator or to extend the required accuracy range. When it comes to motor control signal processing, other important functions of the DSP are not of much use, such as hardware closed loop and dual addressing modes. These explain to some extent why people liken the ARM7 processor to be such an optimized architecture.

Figure 3 shows a new STR7 product, developed for ST’s ARM7 processor-based product line, that meets the system requirements outlined above. Key features include:
* SPTimer synchronous PWM timer, perform high-end PWM signal generation function, based on 16-bit timer, the time resolution can be reduced to 16.6ns, to achieve the best voltage reconstruction;
* Ability to generate center or edge-aligned PWM graphics;
* Internal programmable dead time signal generator and emergency fault protection function required for inverter fault handling;
* To simplify software processing tasks, multiple interrupt sources, a programmable reload rate and “no smoking” protection are used to prevent software from modifying the configuration registers of the system’s important peripherals due to runaway control.

Figure 3 New STR7 product

This SPTimer also acts as a general-purpose timer with two input capture pins, two output compare pins, and an encoder-specific mode that minimizes software overhead. This mode has x2 or x4 resolution, automatic direction management, and can program the line number of the selected encoder, so the rotor angle position signal can be read directly from the count register. For the current measurement function, the new product has a built-in 3μs 10-bit analog-to-digital converter with automatic scanning function. The main 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, energy-consuming braking, etc.

With a strong focus on the motor control market, STMicroelectronics is one of the few suppliers in the world capable of offering a complete motor control portfolio, ranging from fast diodes to processors, including high voltage gate drivers and switches. To meet the need for more energy-efficient “green” motors and high-performance drives, we’ve created a complete line of ARM-centric products to help designers demystify vector control algorithms. This control method will soon eliminate today’s mainstream DSP-style control. Promote and apply a new control method: Since the use of standard ARM-based microcontrollers can meet the needs of advanced motor control, who would spend time implementing advanced motor control on a proprietary architecture?

The Links:   FZ1200R12KF4 EPM7032AETI44-7N