The advent of frequency converters and advanced motor control methods have made three-phase brushless motors (AC induction motors or permanent magnet synchronous motors) once a huge success in speed control applications. These high-performance motor drivers were mainly used in factory automation systems and robots. In the past decade, the sharp price reduction of electronic components has enabled these motor drivers to enter cost-sensitive markets such as home appliances, air conditioners or personal medical devices. This article will explore how standard ARM-based microcontrollers can break through complex control modes in a market that has long been dominated by DSPs and FPGAs. We will use STMicroelectronics' STM32 series microcontrollers based on the Cortex-M3 core as an example to illustrate this process.
Figure 3 : STM32: Solid foundation for growth
First, let's review the basics of motor control. Why are processors so important in motor control systems? Why do we need very good computing performance? After all, Nicolas Tesla didn't need a compiler when he invented the AC motor a century ago. Whenever speed regulation is required, one cannot avoid using an inverter to drive a decent 3-phase motor, and controlling a permanent magnet synchronous motor (PMSM) is even more inseparable from the inverter. The core of this complex power electronic system is a 3-phase DC-to-AC inverter, in which a microcontroller plays a management role and performs the common trinity of control functions in a fully digital way: sensing (current, speed, angle...), processing (algorithms, housekeeping...), and controlling the power switches (the minimum configuration has at least 6 switches).
The simplest way to achieve variable speed operation of a 3-phase AC motor is to use scalar control. The principle of scalar control is to maintain a constant ratio between the frequency and voltage applied to the motor. For entry-level motor drives, this is a very mainstream control method suitable for applications with very ordinary load characteristics and low control bandwidth requirements (such as very small power pumps and fans). Unfortunately, not all applications can tolerate such a simple control process and its application limitations. In particular, scalar control cannot guarantee the best motor performance (torque, efficiency) in transient environments. To overcome these limitations, other motor control methods have been developed, of which field-oriented control (also known as vector control) is one of the most widely used methods. This control method uses two decoupled DC controllers to drive any AC motor (induction motor or permanent magnet motor) in a split-field motor manner, regardless of the operating frequency (i.e. speed). The excitation current is related to the DC main flux (the flux of the magnets in a PMSM motor), while the 90° phase-shifted current can control the torque and function as the armature current of a DC motor. Field-oriented control allows precise speed control with fast response when the load changes, keeping the stator flux and rotor flux in perfect 90-degree phase difference, ensuring optimized energy efficiency even in transient operating environments. This is the basic theoretical framework for more complex control methods based on motor topologies, especially for PMSM motors. This theory is the basis for sensorless motor drives, which can significantly reduce costs (no speed or angle sensors and related wiring are required) and improve motor reliability. In this case, only the motor mathematical model, current and voltage values must be used to estimate the rotor angle position by calculation. This state observer theory (among other control methods) can achieve sensorless speed control at a minimum of only a few hundred revolutions per minute, which in some cases is a stationary state. However, this is an additional real-time load on the CPU. Finally, the microcontroller must continuously recalculate the vector control algorithm at a rate of 1KHz to 20KHz, depending on the bandwidth of the final application. Processing Parke and Clarke transformations and implementing multiple PID controllers and software phase-locked loops does require intensive digital computing, which is why digital signal processors, microprocessors or FGPA devices have been used as controllers in the past.
Although dedicated dual-mode controllers and low-end fixed-point DSP architectures are available, STMicroelectronics still chose to develop STM32 microcontrollers using the Cortex-M3 core. This solution is well suited to meet the requirements of a large number of brushless motor drives, and from a one-time engineering cost perspective, the advantage of this solution is the cost-effectiveness of using industry-standard ARM® cores and standard microcontrollers. [page]
Based on the Harvard architecture, this 32-bit RISC uses the Thumb2 instruction set, providing 16-bit and 32-bit instructions. Compared with pure 32-bit code, this instruction set can greatly improve code density while retaining most of the advantages of the original ARM7 instruction set (additional optimized multiplication and addition operations and hardware division instructions).
Motor control systems require microcontrollers to have excellent real-time responsiveness (short interrupt latency), pure processing functions (such as single-cycle multiplication), and excellent control performance (when handling non-sequential execution flow and conditional branch instructions). Cortex-M3 can meet all these requirements. For example, when the clock frequency is 72MHz, a sensorless field-oriented control of a permanent magnet motor is completed in 25µs, which is equivalent to 25% CPU load at a 10 kHz sampling rate.
In the STM32 microcontroller, this core works closely with the STMicroelectronics optimized flash interface, and only a few external components are needed to handle external events (Figure 2 shows the block diagram of the STM32F103 medium-capacity microcontroller). Needless to say, the PWM timer and the analog-to-digital converter are the most important components. The PWM timer includes state-of-the-art features such as center-aligned mode PWM signal generation and dead-time insertion logic, with a special emphasis on safety: this module directly controls the commutation of the power switches, which can control the switching power up to several kilowatts. For example, the register code used to configure certain important parameters can be protected by a lock to prevent software failure. As long as the "Emergency Stop" pin is pulled low, all I/O pins are placed in a user-configurable safe state. This function is designed using a combinational logic module, which ensures that the protection circuits can still work properly before switching internally to the backup oscillator when the main clock (crystal) fails. Finally, the microcontroller also includes a fourth comparison channel dedicated to triggering the analog-to-digital converter to achieve the best current measurement accuracy.
Figure 2 : STM32F103 medium-capacity microcontroller block diagram
Even the most sophisticated algorithms can hardly correct inaccurate analog measurements, but the overall performance of the motor drive system depends to some extent on the quality of the analog-to-digital converters. The STM32F103 chip has three built-in 12-bit analog-to-digital converters with a sampling rate of 1MSps and a total unadjusted error (TUE) of less than 5 LSB over the entire temperature and voltage range. The digital interface of the analog-to-digital converter has three main functions: first, it frees the CPU from simple control tasks and data processing; second, it connects the rest of the chip (interrupt requests, DMA requests, trigger inputs); and finally, it synchronizes the operation of the STM32's multiplexers. Among these functions that are useful for brushless motor control, we first consider the channel read sequencer. Compared with the traditional scanning circuit (according to the analog input number, a certain number of channels are converted in sequence), within a sequence of 16 conversion channels (for example: Ch3, Ch3, Ch0, Ch11), the sequencer can convert channels in any order. When designers are designing printed circuit boards, this function brings designers greater design flexibility. In order to achieve the purpose of averaging conversion, multiple samples of the same channel are allowed (in a sequence). When the entire sequence is converted, the DMA channel sends the conversion results to RAM, and the interrupt handler generates an interrupt request.
The noise generated by transient voltages on the power switches during the detection of the motor phase currents (typically several hundred V/µs in offline switching applications) is a significant source of reading errors, which can result in very low signal-to-noise ratios in the measurements. The solution is to synchronize the analog-to-digital converter with the timer controlling the power stage: since the commutation moment can be predetermined (defined by the compare registers of the 3 PWM timers), an additional compare channel can be used to trigger an analog-to-digital conversion operation slightly before or after the commutation moment. For this reason, the STM32 enables a second sequencer (also called injection sequencer) that has a higher priority than the normal sequencer and can interrupt the current conversion operation with a new one that cannot be delayed. Normally, the normal sequencer is responsible for "housekeeping" the conversions, continuously detecting the temperature or the DC bus voltage (as a background task) and then sending them to the RAM through the DMA channel, while the injection sequencer will handle the time-critical conversion operations and store the conversion results in the analog-to-digital converter registers (an interrupt will be generated, but the delay cannot be accepted).
[page]
Having a general-purpose microcontroller capable of performing advanced motor control functions is one thing, but getting started easily is another. Both sides of the puzzle can be addressed with hardware and software tools. First, there is a motor control development starter kit, which includes test tools (JTAG probe and optoisolator), microcontroller chip, and power stage board and demonstration PMSM motor for product performance evaluation and development purposes. The modular design allows upgrading the demonstration application (e.g. dual motor control microcontroller board) to evaluate multiple (or custom) power stages. Finally, STMicroelectronics provides a motor control software library free of charge to STM32 customers. Version 2.0 of the motor control software library supports a variety of configurations using a simple and inexpensive list of #define statements in the header file. The software library contains field-oriented control algorithms for AC induction and synchronous motors, which are written in C programming language to simplify code readability and maintainability, again demonstrating the efficiency of modern compilers. The software library also provides a robust sensorless control algorithm for PMSM motors (based on flux observers), as well as a dedicated control algorithm for ultra-high-speed interior permanent magnet motors (IPM). Of course, the software also supports common speed and position sensors (incremental encoders, Hall sensors or tachometers). The STM32 supports three current sensing methods by using isolated sensors or shunts. The STM32 peripheral can implement an innovative single current sensing method to perform vector control using the lowest cost configuration (a simple unique resistor). This technology has been patented because it can minimize the intrinsic current distortion rate.
STMicroelectronics’ current main development projects are sensorless permanent magnet motor control to control the motor to standstill and dual motor control with built-in power factor correction. Recently, STMicroelectronics successfully demonstrated a single current sensing method, where only one STM32 microcontroller can perform two single current sensing vector control functions while also managing the PFC stage with a 40 kHz control loop (see Figure 1).
Figure 1 : The STM32F103HD can simultaneously handle dual motor control and digital PF
From power switch discrete devices to complex system chips, STMicroelectronics is committed to supporting the motor control market with its unique product portfolio for a long time. The STM32 microcontroller product line will continue to be deployed in four new directions, as shown in Figure 3, two of which are suitable for motor control. The first product line will target the low-cost market and develop low-end 16-bit motor control microcontrollers. The other product line is based on high performance and is aimed at applications that require higher processing performance, larger memory capacity and high-bandwidth interfaces. Such a broad product portfolio combined with the Cortex-M3 core is bound to establish the versatility of the STM32 architecture for current and future motor drives.
Previous article:Design of deep sea remote motor control system based on STM32F103
Next article:Micr0 SD card reading and writing based on STM32F103XX microprocessor
Recommended ReadingLatest update time:2024-11-16 16:51
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Solutions to the "Disconnected-you are now offline" issue when connecting to the Ubuntu system
- 【Perf-V Evaluation】UART
- Are there step by step instructions for adding a custom service?
- ESP8266 Getting Started Guide
- MSP430FR2355 LaunchPad Development Kit
- DC/DC power supply circuit (MP2562 chip) chip breakdown failure when powering on
- Serial communication of TI MSP430F5438A
- Circuit Problem Analysis
- [Chuanglong TL570x-EVM] Establish startup service - print helloworld
- Chestnut Development Board-TI5708 First Hands-On Exploration