+ All Categories
Home > Documents > Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT...

Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT...

Date post: 01-Apr-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
13
Sabancı University Program for Undergraduate Research (PURE) Summer 2017-2018 Sensorless Control and Drive methods for Permanent Magnet Motors Kıvanç - Çember [email protected] Electronic Engineering Alp Recep - Dayan [email protected] Mechatronics Engineering Osman Berke- Güney [email protected] Electronic Engineering Ahmet - Onat Mechatronics Engineering Abstract This paper presents driving method and sensorless control for BLDC motor. It includes general working principle of brushless DC motor in theoretical level mostly on back EMF generation. Then, using the relationship between zero crossing points with back EMF, procedure of sensorless speed control is explained. Later, electronic processor stm32F302 is present and example code is examined. Keywords: BLDC; back-EMF; sensorless; speed; electronic processors Introduction Energy usage of a system is critically important especially if it is widely using. Systems that includes motors is an example, industry highly dependent on motors. Production lines need motors to work, electronics like laptops produce heat need a fan to cool down. Nearly all home appliances have motors inside, pumps drills air conditioners are some other examples. There are several types of motors. Way that a DC motor does its commutation is mechanically and this causes a loss as friction and creates a significant loss at high speeds. However for a BLDC motor it is not the case commutation is done electronically. This little design change leads big performance improvement. Speed/torque characteristics of a BLDC motor is flat. However for a DC motor, higher speeds useful torque is reduced (Yedamal, 2003).Also coils are at stationary parts and permanent magnets are in rotor it also improves lifetime of BLDC motors. Another
Transcript
Page 1: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

Sabancı University Program for Undergraduate Research (PURE) Summer 2017-2018

Sensorless Control and Drive methods for Permanent Magnet Motors

Kıvanç - Çember [email protected] Electronic Engineering

Alp Recep - Dayan [email protected] Mechatronics Engineering

Osman Berke- Güney [email protected] Electronic Engineering

Ahmet - Onat Mechatronics Engineering

Abstract This paper presents driving method and sensorless control for BLDC motor. It

includes general working principle of brushless DC motor in theoretical level mostly on back EMF generation. Then, using the relationship between zero crossing points with back EMF, procedure of sensorless speed control is explained. Later, electronic processor stm32F302 is present and example code is examined. Keywords: BLDC; back-EMF; sensorless; speed; electronic processors

Introduction Energy usage of a system is critically important especially if it is widely using. Systems

that includes motors is an example, industry highly dependent on motors. Production lines need motors to work, electronics like laptops produce heat need a fan to cool down. Nearly all home appliances have motors inside, pumps drills air conditioners are some other examples. There are several types of motors. Way that a DC motor does its commutation is mechanically and this causes a loss as friction and creates a significant loss at high speeds. However for a BLDC motor it is not the case commutation is done electronically. This little design change leads big performance improvement. Speed/torque characteristics of a BLDC motor is flat. However for a DC motor, higher speeds useful torque is reduced (Yedamal, 2003).Also coils are at stationary parts and permanent magnets are in rotor it also improves lifetime of BLDC motors. Another

Page 2: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

ÇEMBER, DAYAN, GÜNEY

improvement is at development of magnets. Main aim is to improve the flux density. Some rare earth magnets are Neodymium (Nd), Samarium Cobalt (SmCo) and the alloy of Neodymium, Ferrite and Boron (NdFeB)(Yedamal, 2003). There are two main controlling methods sensorless and with sensors. Generally hal

sensors are used to control motor. Basically using time between hal sensors zeroes and ones speed can calculated. However this sensors increases the total cost of the motor and coding part becomes more complex. Also sensors lowers the lifetime of motor and additional wiring needs time and workforce also sensors need to position well. But it is not the case for sensorless drive methods. Wiring from motor only includes 3 wires and its rather simple job to connect motor to the driver. For the sensorless drive main tool is back EMF voltage created on coils of the motor while it spins. Back EMF voltage is created according to constant motor parameters and angular velocity of motor. Relationship between back EMF and angular velocity is eb * i = T * wm (Hanselman, 2006, p. 64).So the way of measuring back EMF is important since at low speeds back EMF will also be small so it becomes hard to detect. Type of measurement has its own range of angular velocity. However general methods can not be used at start up when angular velocity is zero or even close to zero. To overcome this problem predetermined magnetic field is applied and goes on for about half a second, alignment phase is done.Then Motor starts up as an open loop system. After certain amount of successful back EMF detections system turns into a closed loop system.

In this report we will present our work with two main parts. Hardware part includes building of our model and details about back EMF. Software part includes the example code which we explained its general structure.

2.1 Hardware 2.1.1 Components of the Project Kit In this project, STM32F302R8 development board and X-NUCLEO-IHM07M1

three-phase brushless dc motor driver expansion board is used in order to control the BR2804-1700KV-1 three phase motor without Hall effect sensors in the stator of the motor. 12V DC input voltage is used to run the motor . To control the speed of the motor, there are two options which are using software or using potentiometers embedded in the, X-NUCLEO-IHM07M1. BR2804 motor has 7 pole-pairs in it’s motor structure. 2.1.2 Setting Up the Project Kit Initially, before the first run of the motor, suitable protectors for boards and the motor

were drawn in CAD programs and were printed by 3D printers. So all parts of the system is based on a straight piece of wood. After building the basement, a proper T-box is supplied and the transparent packing was cut properly to wrap on the boards for more protection. Jumpers for the wiring have been connected between boards and motor safely. In order to power supply, 12V adapter was restructured for the proper connection to the board. After all this building process, it is possible to say that the motor can be ran safe and sound.

2

Page 3: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR

Figure 1.1

Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8, verified jumper setting are JP1 open, JP5(PWR) set to E5V position

and JP6(IDD) closed. On X-NUCLEO-IHM07M1, verified jumper settings are J9 and JP3 closed. The motor is controlled with 6-step motor control JP1 and JP2 open, J5 and J6 on 1Sh position. And the connection is required for 3 motor cables to different input on J2 connector. JP1 and JP2 pins are jumpers for Field Oriented Control. J9 pin is enabling the VIN supply voltage and JP3 pin is external pull up for sensors. J5 and J6 pins are current measure mode which are 1Sh and 3Sh. J2 pin is the motor connector. Lastly J1 pin which is power supply connector, is connected to adapter.

3

Page 4: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

ÇEMBER, DAYAN, GÜNEY

Figure 1.3 (ST, 2017)

Figure 1.4 (ST, 2016)

4

Page 5: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR

2.1.5 Working Principle of the Motor and BEMF Detection There are several options to control the motor. Two of them are Field Oriented Control

and 6-step algorithm. 6-step algorithm is used in our project to control the permanent magnet synchronous motor without sensors. It is based on 1 shunt current sensing mode and algorithm of back electromotive force detection sensorless. “In BLDC motor control, the electrical cycle is subdivided into six commutation steps. For each step, the bus voltage is applied to one of the motor three phase windings whereas the ground is applied to a second winding. The third winding remains open. The successive steps are executed in the same way except that the motor phase winding changes to generate a rotating stator field.” (ST, 2017)

Figure 1.5 (RENESAS, -)

When the motor starts to spin , the rotor which is moving around inside the stator coils,

induces an electrical potential in the stator coils. This is called BEMF. After the design and production of the motor, Bemf depends on the angular velocity of the rotors. “Bemf waveform is fairly linear and passes through a voltage that is exactly half of the applied voltage at precisely 60 degrees which coincides with the zero crossing points.At various duty cycles, the driven curve always equals half the applied voltage at 60 degrees.”(Brown, 2002) Based on this information, the rotor electrical position can be determined by detecting Bemf when the open terminal voltage equals half of the applied voltage. It is possible to indicate that the shifts in zero crossing points can be sensed and used in order to regulate the commutation rate to keep the motor running at the constant velocity with load torque and applied voltage. After the understanding and starting to use UART communication, motor will be controlled by a PC, also it can be used to show instantaneous values of the motor such like back EMF and zero crossing points. Therefore, the Bemf waveforms of the Figure 1.6 are representative for this project’s motor to understand the zero crossing points.

5

Page 6: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

ÇEMBER, DAYAN, GÜNEY

Figure 1.6 (Yedamale, 2003)

In addition it is a comment that when the phase current becomes at steady state, at the

same time there will be a crossing point. To make it clear, for instance in Figure 1.6, when the coil A is negatively energized, the coil C is positively energized. At the the point which their intersection on zero point, phase current of B becomes steady state at the same time in our mechanical revolution.

6

Page 7: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR

Due to the ST patented “3 resistor” method, BEMF detection is fully digital and it is based on the PWM duty cycle.”Due to the fact that the potential of the neutral point is grounded, the voltage comparator obtains complete information about the BEMF voltage of the non-energized phase on its input via C.” (ST)

Figure 1.7 (ST)

7

Page 8: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

ÇEMBER, DAYAN, GÜNEY

2.2 Software

Figure 1.8 In this project, to control microprocessor and motor driver board, EWARM software is

used. For the coding, we used an example project from STMicroelectronics’ website. In this example project as an algorithm, 6-step algorithm is used. This project includes all the low level coding files which are called hardware abstraction layer. Using some of these HAL files and its functions, other functions, files are formed. By this way, functionality of this project is increased. For example, StopMotor function, StartMotor function, Set_Speed function etc. make easy to manipulate motor. Because, these functions use a lot of variables and functions from various different files.

Figure 1.9

As shown at above picture, start function includes 2 parameters from HAL files, 2 parameters from parameters file etc. Also, StartMotor function initialize uwTick which is system ticker is used for timing of microprocessor. One tick corresponds to

8

Page 9: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR

one millisecond at real time. By using, system ticker, time based algorithm can be implemented. For instance, we can run motor for specific time interval and make it stop for specific time interval, then repeat these start and stop motion.

Figure 2.0 Above picture shows, what we wrote to start and stop motor repeatedly. This code run

motor for three seconds, wait motor for two seconds to run again. To be able to do this, one thing should be changed. At StartMotor function, uwTick value is assigned to zero. If this thing is disabled, above small piece of code work as desired. Another important functionality of system ticker is that general loops that repeat itself by each millisecond by using of that internal clock. With repeating itself, program checks some important thing for motor run, with giving priorities these important thing.

9

Page 10: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

ÇEMBER, DAYAN, GÜNEY

Figure 2.1 (ST, 2017) At high priority task, PWM generation, Bemf detection routine, new step duration time

calculations and startup failure routine are checked.

Figure 2.2 (ST, 2017) At medium priority task, high frequency PWM start command, ADC conversion

triggering start, step forming etc. are checked.

10

Page 11: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR

Figure 2.3 (ST, 2017) At low priority task, speed loop routine, PI regulator routine, alignment routine handler,

potentiometer calculation routine, speed feedback calculation routine are checked. Program runs motor first with open loop control, since Bemf is directly proportional

with motor speed, at the beginning Bemf values cannot be measured precisely, so closed loop control cannot be used. But after motor reaching some threshold speed value, closed loop control start to used. To be able to do these things following stages should be done alignment stage and ramp generation stage. At alignment stage, program force to rotor at a specified position through a specific switch configuration. At ramp generation stage, a controlled and fixed current is used to run and accelerate the motor. If the motor reach specific amount of zero crossing events (threshold amount which is set by program), motor is started to control with closed loop control (ST, 2017).

11

Page 12: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

ÇEMBER, DAYAN, GÜNEY

Figure 2.4 (ST, 2017)

3. Conclusion and Future Work In this report building blocks of controlling a motor is presented. For each block an

example application or tool is shown with pictures and instructions. Especially back EMF is explained in details since knowing the characteristic of back EMF and processing it provides sensorless control for BLDC motor. We used a st microcontroller which has a built in detection circuit for back EMF. Also st has example motor control project that we send to microcontroller which does necessary processing. In the end we have better understanding at how a BLDC motor rotates mechanically and with the help of an example code we go in detail and examine the flow of coding and see necessary values and functions. For the future work we now can improve the code and make proper adjustments to chance 6 step commutation to more like a field oriented control.

12

Page 13: Sensorless Control and Drive methods for …...SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR Figure 1.1 Figure 1.2 2.1.3 Pin Configurations of the Boards On STM32F302R8,

SENSORLESS CONTROL AND DRIVE METHODS FOR PERMANENT MAGNET MOTOR

References Gamazo-Real, José & Vázquez-Sánchez, Ernesto & Gomez-Gil, Jaime. (2010). Position

and Speed Control of Brushless DC Motors Using Sensorless Techniques and Application Trends. Sensors. 10. 10.3390/s100706901.

Hanselman D. (2006). Brushless Permanent Magnet Motor Design. Lebanon, Ohio.

Magna Physics Publishing. ST (Ed.). (2017, July). Getting started with the six-step firmware library for STM32

Nucleo boards based on STM32F microcontrollers. Retrieved from https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/90/b6/9f/0c/50/c1/47/1d/DM00334922/files/DM00334922.pdf/jcr:content/translations/en.DM00334922.pdf

ST (Ed.). (2017, December). STM32 Nucleo-64 boards. Retrieved August 7, 2018, from

https://www.st.com/content/ccc/resource/technical/document/user_manual/98/2e/fa/4b/e0/82/43/b7/DM00105823.pdf/files/DM00105823.pdf/jcr:content/translations/en.DM00105823.pdf

ST (Ed.). (2016, September). STM32 Nucleo Packs - Motor Control FOC and 6-step

solutions for three-phase, low-voltage and low-current motors. Retrieved August 7, 2018, from https://www.st.com/content/ccc/resource/technical/document/user_manual/70/a6/a2/95/7a/3d/4d/f8/DM00226315.pdf/files/DM00226315.pdf/jcr:content/translations/en.DM00226315.pdf

BLDC Motor Basics : 2) Controlling BLDC Motors. (n.d.). Retrieved August 7, 2018,

from https://www.renesas.com/en-eu/support/technical-resources/engineer-school/brushless-dc-motor-02-inverter-pmw.html

ST (Ed.). (n.d.). SENSORLESS BLDC MOTOR CONTROL AND BEMF SAMPLING

METHODS WITH ST7MC. Retrieved August 7, 2018, from https://www.st.com/content/ccc/resource/technical/document/application_note/aa/b4/69/3f/75/58/4a/a1/CD00020086.pdf/files/CD00020086.pdf/jcr:content/translations/en.CD00020086.pdf

Yedamale, P. (2003, June 28). Brushless DC (BLDC) Motor Fundamentals. Retrieved

from http://ww1.microchip.com/downloads/en/AppNotes/00885a.pdf

13


Recommended