Start-Up Control Algorithm For Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16
At a glance
Powered by AI
The document discusses a startup control algorithm for sensorless and variable load brushless DC motors using a variable inductance sensing method.

It is a method to sense the motor position during startup by measuring the current leak out of the inductor when it is turned off.

Additional current sensing circuitry is needed, including a bias resistor, changing the negative feedback resistor, and removing an output capacitor.

Application Note, V1.

0, Oct 2006

AP08018
XC866
Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Microcontrollers

Edition 2006-11-24 Published by Infineon Technologies AG 81726 Mnchen, Germany Infineon Technologies AG 2006. All Rights Reserved. LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY, CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT. THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION. INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND (INCLUDING WITHOUT LIMITATION WARRANTIES OF NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY) WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE. Information For further information on technology, delivery terms and conditions and prices please contact your nearest Infineon Technologies Office (www.infineon.com). Warnings Due to technical requirements components may contain dangerous substances. For information on the types in question please contact your nearest Infineon Technologies Office. Infineon Technologies Components may only be used in life-support devices or systems with the express written approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system, or to affect the safety or effectiveness of that device or system. Life support devices or systems are intended to be implanted in the human body, or to support and/or maintain and sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may be endangered.

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

AP08018 Revision History: Previous Version:

2006-10 none

V1.0

We Listen to Your Comments Any information within this document that you feel is wrong, unclear or missing at all? Your feedback will help us to continuously improve the quality of this document. Please send your proposal (including a reference to this document) to: [email protected]

Application Note

V1.0, 2006-10

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method
Table of Contents 1 2 3 4 1.1 Page

INTRODUCTION.................................................................................................................................................. 5 RAMP UP METHOD ........................................................................................................................................ 5 VARIABLE INDUCTANCE SENSING METHOD.......................................................................................... 6 HARDWARE IMPLEMENTATION WITH XC866 MICROCONTROLLER............................................ 8 SOFTWARE IMPLEMENTATION WITH DAVE AND KEIL COMPILER ............................................. 9 4.1 4.2 MAIN PROGRAM ........................................................................................................................................... 9 VARIABLE INDUCTANCE SENSING METHOD .............................................................................................. 12

5 6 7

CURRENT SENSING CIRCUIT ...................................................................................................................... 15 EVALUATE YOUR OWN VARIABLE INDUCTANCE SENSING BLDC CONTROL.......................... 16 OTHER RELATING REFERENCES .............................................................................................................. 16

Application Note

V1.0, 2006-10

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Introduction

One of the main concerns of running a BLDC motor is its startup operation. The initial rotor position should be known so that the corresponding motor phases are energized. If the energized phases are incorrect, the rotor will not be able to rotate. There are several ways to startup a BLDC motor. One way is to use the hall sensor to detect the initial position of the rotor and then startup up the motor by energizing the 3 phases according to an energizing pattern. This pattern corresponds to the pair of motor phases that should be energized so that the motor rotates properly. Figure 1 shows this pattern and is labeled as commutation states. After a stable speed, the hall sensor is removed to switch to sensorless mode via detection of the back-emf zero crossing. This method is not commonly used since it is not advisable to use hall sensors because of its cost.

phase B

phase B

phase B

phase A

phase A

phase A

phase C

STATE 1

phase C

STATE 3

phase C

STATE 2

phase B

phase B

phase B

phase A

phase A

phase A

phase C

STATE 5

phase C

STATE 4

phase C

STATE 6

Figure 1. Commutation Pattern 1.1 Ramp up Method

Another method is to initialize the rotor to a certain position by energizing a phase pair and waiting for the rotor to be aligned with the created stator flux. The motor phases are then energized according to a certain coil energizing pattern. The motor speed is gradually increased by slowly decreasing the commutation period. The values used for the commutation period are stored in a ramp up table. The values of the ramp up table must be tuned according to the inertia, back-emf constant, speed constant, voltage applied, and initial load of the motor to be used.

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method
When the motor has reached the speed where the back-emf can be detected, the operation will switch to sensorless mode via detection of back-emf zero crossing. The commutation period will now depend on the time between the zero crossings. Although hall sensors are not required for this method of startup, the use of ramp up table makes it ineffective since a change in the motor characteristics, like the initial load, will hinder the motor from starting up correctly. A motor with different characteristics will not start properly using the same values in the ramp table tuned for a different motor. The folder HOT5 Project 1 Demo 2 - Full sensorless operation with ramp up contains all the source codes for the sensorless operation using ramp up method.

Variable Inductance Sensing Method

A much more effective method uses variable inductance to detect the initial rotor position. It does not depend on any motor specific characteristics, which allows it to work on any BLDC motor. Even changing the initial load would not be a problem with this method. This method relies on the fact that if voltage is applied across an inductor which is in the presence of a permanent magnet, the resulting current will either add or subtract to the external field created by the permanent magnet, which leads to a further decrease or increase in the inductance. In the case of a BLDC motor, the inductor is the stator while the permanent magnet is the rotor. The implementation of this method requires that a voltage is applied for a fixed time such that it creates a magnetic field in the direction of only one winding. Two magnetic fields of opposite directions should be created for each winding. In order to do this, two phases are held to ground and one is switched to high, creating the forward magnetic field. Then two are switched to high and one is held to ground, creating the opposing magnetic field. This procedure is shown in Figure 2 where phase A is energized in the forward direction.

Figure 2. Energizing of Motor Windings

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method
The two peak currents created from the two opposing magnetic fields are then measured and compared. The larger peak will indicate the current that is in the same direction as the magnetic field caused by the permanent magnet (rotor). Therefore, the polarity of the permanent magnet can be obtained, i.e. the rotor position is found within 180 degrees. Figure 3 shows the current peaks produced when the procedure was done with phase A, given that the rotor is in the position shown in Figure 4. The first current peak which is generated from the forward magnetic field is higher than the one generated from the reverse direction. This means that the magnetic field in the forward direction is in the same direction as that of the magnetic field of the rotor. Thus, the north pole of the rotor is known within 180 degrees.

Figure 3. Current Pulses

phase B

phase A

phase C
Figure 4. Rotor Position within 180

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method
By repeating the entire procedure for the other two phases, the rotor position can be narrowed down to within 60 degrees, which is sufficient enough for proper commutation (Figure 5). There is also the possibility that the rotor is right on the edge of one of the semicircles but it does not matter since the phase that should be energized is the same whether the rotor is on one half of the boundary or the other.

Figure 5. Rotor Position within 60

Hardware Implementation with XC866 Microcontroller

In order to implement the variable inductance sensing method, a current sensor circuit is required. The motor driver board contains an op amp in a current sensor configuration and is capable of detecting and amplifying the current peaks. The output of this current sensor circuit is read by the ADC peripheral of the XC866. Figure 6 shows the block diagram of the hardware implementation of this method. The ADC peripheral will also measure the back-emf after the motor startup has finished. The ADC will look for the back-emf zero crossing, the moment when the back-emf has reached half of the motor power supply level. The ADC adjusts the zero crossing level accordingly by periodically sampling the power supply thru a voltage divider feedback circuit. This allows the power supply to vary within a certain range, without affecting the motor operation. The back-emf zero crossing is crucial in the sensorless operation of a BLDC motor since the time between the zero crossings is used to calculate the commutation period throughout the motor operation. The Capture/Compare Unit 6 (CCU6) produces the coil energizing pattern and PWM which is fed to the 3 phase bridge driver IC. The IC will then drive the switches composing the inverter bridge circuit. The inverter bridge is made up of Infineon Optimos N-channel power transistors. These switches will control the current flow in the stator windings. There is a specific pattern at which the inverter bridge switches must be activated so that the motor rotates properly. If the motor is stalled while running or the startup did not run properly, an emergency stop will be activated by the CTRAP of the microcontroller. This CTRAP will force the CCU6 outputs into a passive state and no active modulation is possible.

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Figure 6. Block Diagram of Sensorless BLDC motor driver For a more detailed discussion on sensorless operation of a BLDC motor, please refer to AP08019, Sensorless Brushless DC Motor Control Using Infineon XC866 Microcontroller.

Software Implementation with DAvE and Keil compiler

This part will be on the algorithm used to implement the variable inductance sensing method for motor startup. The algorithm for the Main program and the variable inductance method is shown thru flowcharts. DAvE was used to configure and initialize the CCU6, ADC and General I/O ports. The DAvE generated files are then added with the algorithms that are discussed below. For the software implementation of motor operation after startup, please refer to Application Note AP08019 - Sensorless Brushless DC Motor Control using Infineon XC866 Microcontroller. 4.1 Main Program

Figure 8 shows the flowchart for the main program which basically handles the motor startup. The current sensor output and voltage supply are first captured by the ADC to set the reference current and voltage. Then the rotor position is detected through the variable inductance sensing method (Figure 11). If the rotor position detected is indeterminate, then the rotor is jerked by energizing one of the phases and grounding the other two. Otherwise, the rotor position is compared with the previous one. If the position is the same, then the motor phases are energized according to the detected rotor position.

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method
Otherwise the timer 12 is started to keep track of how much time it takes for the rotor position to change and timer 13 is also started to enable the PWM. Then the phases are energized according to the new rotor position for a fixed period of time. The time that the phases are energized should not be too short so that the startup would finish faster and it should not be too long either so that the motor would not get hot. After the energizing of the phases, the Timer 13 PWM is switched off in order to detect the rotor position. To ensure that the motor rotation during startup does not skip a commutation state, it is better to repeat rotor position detection at least 3 times per commutation state. The detected rotor position is then compared to the previous one and if it has changed, then the timer 12 value is recorded as the period of commutation and the whole process repeats. If the current rotor position is not different from the previous one, the energizing PWM (Timer 13 is used to generate) will be applied again. The commutation is done for several times until the commutation period results to a motor speed where the back-emf can be detectable by the ADC. The PWM duty cycle is at about 75% during the startup procedure.so that the speed is faster and would generate enough back emf to be detected by the ADC. When that desired speed is reached, the start up is finished and the MCMOUTS registers are initialized for the next commutation. A good transition between the startup and the back-emf based sensorless operation is such that back-emf is immediately detected right after the startup. This is shown in Figure 7. The blue dotted line marks the end of the start up stage. It can be seen that the back-emf (pink) from one phase is readily detectable right after the start up and the orange dotted line marks the first back-emf zero crossing detection.

Figure 7 Back-emf after start up

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method
After the startup, the PWM is decreased to a minimum value which is also the minimum speed. This is the slowest speed that would still generate enough back-emf to be detected by the ADC.

Figure 8 Flowchart of Main Program

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

4.2

Variable Inductance Sensing Method

Figure 11 shows the software implementation of the variable inductance sensing method. A motor phase is energized such that a magnetic field is produced in opposite directions as shown in Figure 2. The amount of time that a phase is energized should not be too long to prevent magnetic saturation which generates saturated currents and thus no difference in the current peaks would be noticed. On the other hand, energizing a phase for a short period of time would cause small current peaks which have insignificant difference from each other. After energizing a phase in opposite directions for a suitable amount of time, 2 current peaks would be produced. Then a bit 1 is assigned if the forward current peak measured is higher than the reverse current peak, otherwise a bit 0 is assigned. Repeating this procedure three times for phases A,C,B (in that order) results in a 3-bit binary code that is compatible with the commutation pattern that is currently used by the software (Figure 1). For example, the rotor position in Figure 9 is currently in commutation state 5, where A+ and B- are the active switches. Performing the proposed method on phase A will result in having the forward current peak higher than the reverse, thus a 1 is assigned to the rotor_position and then shifted one bit to the left. Doing the same procedures for phase C and B will result in having a bit 0 and 1 respectively. Therefore the resulting 3-bit code is 101, which is 5.

5 1

Figure 9. Rotor position detection with Variable Inductance Sensing Method The current measurement will be done six times, 2 for each phase. After each set of current measurements, the phases will be energized according to the rotor position detected by the Variable Inductance Sensing algorithm. These are illustrated in Figure 10. The yellow waveform is the output of the current sensor circuit while the pink, violet and green are the voltage at each motor phase. As one can see, there are six current peaks and in between each set of current peaks represents the current during the modulated energizing stage.

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Current Peak Measurements

Energizing stage

Figure 10. Current Peak Measurements at Startup

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Figure 11. Flowchart of Variable Inductance Sensing Method

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Current Sensing Circuit

To implement this variable inductance method, extra current sensing circuitry is needed. Based on the motor driver board used in this application, three modifications need to be done. A bias resistor should be connected and the negative feedback resistor should be changed. Referring to Figure 12, with a bias resistor of 220k and feedback resistor of 43k, the current sensor circuit output will be biased by 1V while the current input to voltage output gain would be around 0.7. The bias is required to observe the current leak out of the inductor from the moment it is turned off. In addition, output cap C11 should be removed so that instant current value can be measured.

Figure 12. Current Sensor Circuit

http://www.infineon.com

Published by Infineon Technologies AG

AP08018 Start-up Control Algorithm for Sensorless and Variable Load BLDC Control Using Variable Inductance Sensing Method

Evaluate Your Own Variable Inductance Sensing BLDC Control

Motor startup is a vital part in operation of a sensorless BLDC motor. The ramp up method is simple and easy to implement however it is not suitable to run motors with varying characteristics and initial load. The varying inductance sensing startup method requires additional circuitry but is more suitable to run the startup process of a wider variety of BLDC motors, especially in applications where the initial load is not constant. This application note has presented some key features of Infineons 8-bit XC866 microcontroller and how the CCU6 and ADC unique features are able to achieve high performance motor control. The BLDC motor sensorless control using Variable Inductance Sensing techniques on varying initial load presented in this application note can be implemented using the following hardware available from Infineon now: 1. Infineon XC866 Microcontroller Starterkit (Innovator Kit for XC800 Family) 2. Infineon Low Voltage Motor Driver Board (MDB LV45G v1.1) 3. BLDC motor (BL3056-18-028) 4. Power Supply - I/P: AC 100-240V 50/60 HZ 0.3 A, O/P: DC 24V 2.1A (Meanwell S-50-24) Additionally, the folder HOT5 Project 2 Demo 1 - Full sensorless operation with variable inductance contains all the DAvE and Keil reference source files needed for the operation of the BLDC motor using Infineons 8-bit XC866 microcontroller. The software provided was written in C for the Keil Compiler using DAvE and comes with step-by-step guides on setting up your own BLDC motor control in Sensorless operation. All references codes and guides can be easily migrated to other Infineon microcontrollers in the XC800 family for immediate evaluation too. Additionally, Infineons Autocode generator, DAvE configures all the peripherals of the XC866 microcontroller with ease, saving many hours of work. Although no speed or torque control loop was implemented in this application note, however a simple PI controller can be easily implemented and should provide robust regulation. Kindly refer to the software attached with this application note for further evaluation on how Infineons lowcost high performance 8-bit microcontrollers allows you to achieve your demanding design requirements. Please contact your local distributor should you wish to obtain your own motor control training kit complete with hardware and reference algorithm to perform an evaluation or allow our experts to contact you on how we may assist you in your designs needs.

Other Relating References

You may wish to refer to the following application notes to learn more about Infineons 8-bit XC866 microcontroller and Brushless DC motor control. 1. Application note AP08026 Brushless DC Motor Control with Hall Sensor 2. Application note AP08019 - Sensorless Brushless DC Motor Control

http://www.infineon.com

Published by Infineon Technologies AG

You might also like