Motor Science Series丨Understanding Motor Control Algorithms
[Copy link]
Introduction: Consumers are demanding more power, smaller size, and higher efficiency from their home appliances, garden tools, and motor-driven products. Like many consumer electronics products, consumers expect these products to be less expensive, more reliable, and easier to use. Brushless DC (BLDC) motors help meet these demands. To meet this demand, fully optimized, highly integrated system-on-chip (SOC) devices are needed. Today's SOC devices are fully programmable motor controllers that provide efficient, compact solutions that help meet the stringent green energy efficiency requirements of 21st century manufacturers. This book details valuable information on how these SOCs improve efficiency and where to use them.
This book is written for both technical and non-technical readers. If you are an executive, salesperson, or design engineer, this book is for you. As long as you are curious about DC motor controller power management, you can read this book. In the first two chapters, "Motor Science Series丨DC Motor Controller Basics" and "Motor Science Series丨Understanding Motor Control Devices", we have done a basic popularization of it. In today's report, we will take a deep look at the motor control algorithm.
In this chapter, you will learn about motor control algorithms and how they work. You will also learn about some real-world examples from various fields.
An algorithm is a set of instructions designed to perform a specific task. Computer programs are essentially sets of algorithms.
In brushless DC (BLDC) motors/permanent magnet synchronous motors (PMSM), software algorithms improve efficiency and reduce operating costs by monitoring and controlling motor operation. Some of the most important functions of the main algorithms in sensored BLDC motors/PMSMs are as follows:
Motor initialization
Hall sensor rotor position detection
Check whether the switch signal increases or decreases the current reference
Check the motor rotation direction
Understand how the controller processes sensor information
The BLDC motor stator has three Hall sensors spaced 120 degrees apart from each other in each phase (see Chapter 2). When their digital output data is combined, a three-digit number is produced that represents the rotor position.
As shown in Figure 3-1, opcodes from 1 to 6 can be represented by a three-bit code. A three-phase brushless DC motor has six states (six possible current states derived from the three-phase output). The sensor generates a three-digit data output using six of the eight opcodes (1 to 6). This information is useful because the controller can determine when an illegal opcode (0 and 7) is issued and perform an action based on a legal opcode (1 to 6).
The method to read the lookup table in Figure 3-1 is as follows:
When Hall sensor W, V, U equals opcode 1-0-1, opcode 5, sector 0 is excited.
When Hall sensor W, V, U equals opcode 1-0-0, opcode 4, sector 1 is excited.
And so on, various other possible states can be obtained.
Each Hall sensor is located on the rotor, so each rotor sector will have a change state. As shown in Figure 3-1, the algorithm takes the Hall sensor opcode and decodes it. Once the Hall sensor opcode value changes, the controller must change the excitation scheme to achieve commutation. The microcontroller uses the opcode to extract the excitation information from the lookup table. After the three-phase inverter is excited by the new sector command, the magnetic field moves to the new position, which pushes the rotor. This process repeats continuously when the motor is running.
Understanding Pulse Width Modulation
Some motors require only one speed, so they only require a constant DC voltage into the inverter, as shown in Figure 3-1. However, many products today, including many power tools and garden tools, require variable speed motors. Such motors use pulse width modulation (PWM) to vary the speed of the motor. PWM allows precise control of motor speed and torque, allowing variable speed.
Pulse width modulation (PWM) is a square wave signal with a constant frequency, as shown in Figure 3-2. Pulse width modulation converts the inverter DC voltage into a modulated effective voltage. For example, using a 0% to 100% duty cycle pulse width modulation control signal, a 12V battery can be used to apply any voltage from 0V to 12V to the motor. The algorithm uses this control method to effectively limit the starting current and regulate the motor speed and torque.
The PWM switching frequency is an important design factor that must be kept in mind during the power supply development phase. Increasing the switching frequency increases switching losses but improves current regulation in low-inductance motors. Reducing the switching frequency increases current ripple, which translates into torque ripple (e.g. vibration). The application voltage and motor inductance will guide the designer in selecting the correct PWM switching frequency. As a rule of thumb, the higher the voltage or current, the lower the switching frequency required.
Continuously varying the PWM signal changes the duty cycle, as shown in Figure 3-3. This gives a range of voltage values, which in turn varies the motor speed. You can use these PWM duty cycle changes to vary the voltage going into the motor windings.
Identify typical applications of brushless DC motors/permanent magnet synchronous motors
In this section, we will explore some common uses of BLDC motors/PMSMs in key product types such as power tools, garden tools, white goods and vehicles.
Power Tools
Battery-powered cordless power tools, especially long-lasting, high-energy-density batteries, offer users flexibility and freedom. This convenience and freedom has led to a rapid shift to brushless DC motors/permanent magnet synchronous motors in the field.
Traditionally, power tools consist of a universal AC/DC brushed motor, a switch or potentiometer, and a cord to connect it to an electrical outlet. This approach has enabled a wide variety of power tools to be designed for nearly a century. However, in cordless power tools, operating time must be considered because it is limited by battery performance. Drills, circular saws, and other similar tools need to start under load, so they use sensors and sensor-based algorithms, most of which use brushless DC motors and a six-step trapezoidal commutation scheme.
However, many other power tools, such as grinders and oscillating saws, and the vast majority of garden tools, such as leaf blowers, lawn mowers, and hedge trimmers, also use sensorless algorithms. Designers are constantly looking for ways to improve power tool performance, so permanent magnet synchronous motors and field-oriented control (FOC) are beginning to appear in higher-cost, higher-performance power tools.
Gardening Tools
Garden tools include lawn mowers, edgers, chain saws, leaf blowers, and trimmers. They may look like power tools, but while traditional power tools (like drills and saws) are powered by electricity, garden tools are mostly powered by gas internal combustion engines, though we may have the occasional corded garden tool in our tool shed.
Reliable battery-powered garden tools have been slow to gain popularity. They have been around for about two or three decades, but they were not very noticeable due to their limited functionality. However, with technological advances in the areas of BLDC motors/PMSMs and high-voltage batteries, their fortunes have reversed! Today’s garden tools use 40V to 80V battery technology that performs just as well as their gas-powered counterparts. Voltages this high are even high enough for BLDC motors/PMSMs to power tractor-type lawn mowers!
White appliances
The white goods industry provides us with many household appliances such as refrigerators, washing machines and dryers, vacuum cleaners, and ceiling fans. Traditionally, all of these appliances use AC induction motors that do not require a dedicated driver/controller. However, with the advent of power saving measures and user demand for variable speeds in some home appliances, AC induction motors have been gradually replaced by brushless DC motors/permanent magnet synchronous motors.
In refrigerators, compressors, fans and water pumps have been converted to brushless DC motors/permanent magnet synchronous motors. These appliances are included in green energy plans, so energy conservation is crucial. At the same time, minimizing vibration and noise in the home environment is also very desirable. With low-ripple permanent magnet synchronous motors using field-oriented control (FOC) commutation, refrigerators are now not only more energy-efficient and reliable, but also quieter and less annoying to use indoors. Ceiling fans, range hoods and vacuum cleaners also take advantage of these advanced technologies.
Automotive Industry
The machine with the most motors you own is most likely your transportation machine - your car! Power seats, power windows, power mirrors, door locks, wipers, water pumps, oil pumps, fans, blowers, etc. Your car may have anywhere from two dozen to as many as 50 motors in various locations, all of which need to be driven and controlled.
Traditionally, all motors in cars have been simple brushed DC motors. However, concerns about energy use and climate change are heralding a new era of energy conservation. Energy that is dissipated as heat must be generated by burning more fossil fuels, so using more efficient motors reduces the carbon footprint. Even if the energy savings are relatively small per motor, when you multiply that by the number of motors in each car and the actual number of cars around the world, which is about 1.4 billion, it becomes clear that switching from brushed DC motors to brushless DC motors/permanent magnet synchronous motors makes sense.
In the following articles, we will take a deeper look at the ten most important facts and trends in the field of motor control.
|