ANALYSIS AND IMPROVEMENT OF LOW PRECISION HALL-SENSOR-CONTROLLED BRUSHLESS DC MOTORS by Pooya Alaeinovin B.A.Sc., The University of Tehran, 2007 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE STUDIES (Electrical and Computer Engineering) THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) January 2010 © Pooya Alaeinovin, 2010 Abstract Hall-sensor-based Brushless dc (BLDC) motors are becoming very popular in wide range of applications, mainly due to their low cost, high efficiency, and reliable operation as compared to the conventional brushed motors. These machines have been extensively researched in the literature mainly under two common assumptions: each Hall-sensor produce square-wave signal of exactly 180 electrical degrees; and that the signals from the three Hall-sensors are exactly 120 electrical degrees apart. These assumptions are not necessarily the case, particularly for low to medium cost motors. A recently published manuscript investigated operation of motors with unbalanced Hall-sensor signals and introduced inaccurate positioning of the sensors as the cause of the unbalance. There, solutions have been proposed to mitigate the adverse effects of sensor positioning errors on performance of the motor. This thesis builds upon this recent publication by identifying another source of error in the Hall-sensor signals. Here, it is shown that inaccurate positioning of the Hall sensors and uneven magnetization of the tablet with which the Hall sensors react are the major factors contributing to the distortion of Hall sensor signals. It is shown here that errors in the Hall sensor signals result in unsymmetrical operation of the inverter which in turn leads to low-frequency harmonics in the electromagnetic torque; increases torque ripple and acoustic noise; and degrade overall dynamic performance of the drive. A control-level approach is proposed to mitigate the adverse effects of the errors in the Hall-sensor signals. In this approach a multi-stage digital filtering block is added to remove the errors in the original Hall-sensor signals. Each stage of the filter is designed to cancel the undesirable harmonics due to one of the error sources, the unevenly magnetized reaction tablet and the misaligned Hall sensors. An efficient realization of the proposed filter is presented that makes it possible to be potentially programmed inside existing motor controllers or implemented in a stand-alone microcontroller which can be packaged into a dongle circuit. The operation of typical low-precision industrial BLDC motors with the proposed filtering approach is shown to approach the performance of the motors with ideal Hall sensors. ii Table of Contents Abstract.......................................................................................................... ii Table of Contents ......................................................................................... iii List of Tables................................................................................................. vi List of Figures.............................................................................................. vii Acknowledgments ..........................................................................................x Co-authorship Statement ............................................................................ xi 1 Introduction ................................................................................................1 1.1 Brushless DC Motors ........................................................................................................ 1 1.2 Problem of Getting Accurate Hall–Sensor Signals......................................................... 3 1.3 Objectives and Summary of Contributions .................................................................... 4 1.4 Thesis Organization .......................................................................................................... 5 1.5 References .......................................................................................................................... 7 2 Evaluating Misalignment of Hall Sensors in Brushless DC Motors .....9 2.1 Introduction ....................................................................................................................... 9 2.2 Modeling and Operation of the BLDC Motor ...............................................................11 2.3 Measuring the Misalignment.......................................................................................... 13 2.4 Measurement Results and Comparison ........................................................................ 15 2.5 Conclusions ...................................................................................................................... 19 2.6 References ........................................................................................................................ 20 3 Efficient Implementation of Hall Sensor Signals Filtering for Improved Operation of Brushless DC Motors......................................21 3.1 Introduction ..................................................................................................................... 21 3.2 System Operation with Unbalanced Hall-Sensors ....................................................... 23 3.2.1 BLDC Motor Operation and Modeling .................................................................... 23 3.2.2 Filtering of Hall Sensor Signals ................................................................................. 25 3.3 Efficient Implementation of the Filters ......................................................................... 27 3.4 Algorithm Implementation and Prototype.................................................................... 30 3.4.1 Functionality .............................................................................................................. 30 3.4.2 Prototype ..................................................................................................................... 33 3.5 Case Studies ..................................................................................................................... 35 iii 3.5.1 Steady State Performance ........................................................................................... 35 3.5.2 Transient Performance................................................................................................. 38 3.6 Conclusion........................................................................................................................ 40 3.7 References ........................................................................................................................ 41 4 Improving Operation of Low Precision Brushless DC Motors Using Digital Filtering of Hall-Sensor Signals .................................................43 4.1 Introduction ..................................................................................................................... 43 4.2 BLDC Machine with Hall-Sensor Errors...................................................................... 46 4.2.1 Effect of Errors on Hall-Sensor Signals.................................................................... 46 4.2.2 Detailed Model of the System .................................................................................... 49 4.2.3 Performance of the System and Model Verification ................................................ 50 4.3 Filtering Hall-Sensor Signals.......................................................................................... 54 4.3.1 Analysis of Original Hall-Sensor Signals ................................................................. 54 4.3.1.1 Time-Domain Sequence Analysis ........................................................................ 55 4.3.1.2 Frequency-Domain Sequence Analysis ............................................................... 56 4.3.2 Generalization of the Proposed Averaging Filter.................................................... 57 4.3.3 Proposed Extrapolating Filter ................................................................................... 59 4.4 Filter Implementation and Response............................................................................. 60 4.4.1 Filter Implementation ............................................................................................... 60 4.4.2 Time-Domain Response of the Overall Filter........................................................... 64 4.5 Hardware Realization and Case Study.......................................................................... 67 4.5.1 Hardware Prototype.................................................................................................. 67 4.5.2 Steady State Performance .......................................................................................... 68 4.5.3 Performance during Transient .................................................................................. 71 4.6 Conclusion........................................................................................................................ 74 4.7 References ........................................................................................................................ 75 5 Conclusions and Future Work ................................................................78 5.1 Conclusion......................................................................................................................... 78 5.2 Future Work..................................................................................................................... 79 5.3 References ......................................................................................................................... 80 Appendix A ...................................................................................................81 Appendix B ...................................................................................................82 Appendix C ...................................................................................................83 iv Appendix D ...................................................................................................88 Appendix E ...................................................................................................89 Appendix F ...................................................................................................95 Appendix G...................................................................................................96 v List of Tables Table 2-1 Hall sensor states as a function of rotor position ............................................................. 13 Table 2-2 Switching intervals of a 120-degree inverter.................................................................... 13 Table 2-3 Misalignment values for three different motors .............................................................. 16 Table B-1 Measured Hall sensor misplacements for the sample motors ........................................ 82 Table D-1 Measured Hall sensor configurations for the Sample motors........................................ 88 vi List of Figures Figure 1-1 Hall sensor configuration of two prototype BLDC motors; Arrow Precision (on the left), and Maxon (on the right). ...................................................................................................... 3 Figure 2-1 Schematic diagram of a BLDC motor-drive system. ..................................................... 10 Figure 2-2 Misplaced Hall sensors in a prototype BLDC motor. .................................................... 10 Figure 2-3 Cross-section of a BLDC machine with misplaced Hall sensors. ................................. 13 Figure 2-4 Open circuit line voltages superimposed on Hall sensor outputs. ................................ 15 Figure 2-5 Currents of three BLDC motors compared with an ideal motor.................................. 16 Figure 2-6 Simulated stator currents of three BLDC motors.......................................................... 17 Figure 2-7 Electromagnetic torque for three non-ideal and ideal BLDC motors.......................... 18 Figure 2-8 Frequency content of the predicted electromagnetic torque for three non-ideal and ideal BLDC motors. ....................................................................................................................... 19 Figure 3-1 BLDC motor-drive system with filtering of Hall-sensor signals................................... 23 Figure 3-2 Permanent-magnet synchronous machine with misaligned Hall sensors. ................... 24 Figure 3-3 Stator currents with unequal conduction intervals due to Hall-sensor misalignment.25 Figure 3-4 Timing of the input and output Hall signal transitions. ................................................ 29 Figure 3-5 Flow chart of conditions and functions performed during input ISR. ........................ 31 Figure 3-6 Sequence of hardware and software interrupts. ............................................................ 33 Figure 3-7 Flow chart of the software output ISR............................................................................ 33 Figure 3-8 Prototype dongle-filter for use with existing motor drivers: (a) actual-size photo of the printed circuit board; (b) simplified block-scheme representation depicting major components and ports.................................................................................................................... 34 Figure 3-9 Motor 1 measured phase currents, calculated and predicted electromagnetic torque and the estimated speed................................................................................................................. 36 Figure 3-10 Motor 2 measured phase currents, calculated and predicted electromagnetic torque and the estimated speed................................................................................................................. 37 Figure 3-11 Measured responses of phase currents and speed to step-change in dc voltage. ....... 39 Figure 4-1 Construction of a typical BLDC motor: a) rotor showing a magnetic tablet on the rear end of the shaft; and b) back side of the motor case showing Hall sensors’ PCB and magnetic tablet. .............................................................................................................................................. 44 Figure 4-2 BLDC motor-drive system with filtering of Hall sensor signals. .................................. 46 Figure 4-3 Typical BLDC motor Hall-sensor configuration: a) ideal positioning of Hall sensors and magnetic poles of evenly magnetized reaction tablet; and b) misaligned Hall sensors and uneven magnetic poles of reaction tablet. .................................................................................... 47 vii Figure 4-4 Steady state measured and simulated phase currents. .................................................. 51 Figure 4-5 Electromagnetic torque for ideal motor and the actual Motor 1 and 2. ...................... 52 Figure 4-6 Harmonics in electromagnetic torque for ideal motor and the actual Motor 1 and 2.53 Figure 4-7 Hall-sensor signals of an ideal and non-ideal motor. ....................................................... 1 Figure 4-8 Sequence of time intervals n for a prototype motor................................................ 57 Figure 4-9 Frequency content of the switching time intervals n . ............................................. 57 Figure 4-10 Frequency response of the basic 3- and 8-step averaging, and the overall averaging filter. ................................................................................................................................................ 59 Figure 4-11 Frequency response of the averaging plus extrapolating filter compared with averaging filter. .............................................................................................................................. 60 Figure 4-12 Proposed filter structure showing the averaging/extrapolating stage and the reference time stage. ...................................................................................................................... 61 Figure 4-13 Calculation of the reference time. ................................................................................... 1 Figure 4-14 Transient response of the overall proposed filters. ...................................................... 66 Figure 4-15 Printed circuit board of the constructed dongle prototype......................................... 67 Figure 4-16 Measured currents for Motor 1 operating with different filters [19]. ........................ 69 Figure 4-17 Measured currents for Motor 2 operating with different filters [19]. ........................ 70 Figure 4-18 Measured phase currents of Motor 1 and Motor 2 with the new 3/8-step-averaging filter. ................................................................................................................................................ 71 Figure 4-19 Response of the Motor 2 with the new 3/8-step-averaging filter to a step in applied voltage. ............................................................................................................................................ 72 Figure 4-20 Response of the Motor 2 with the new 3/8-step-averaging-plus-extrapolating filter to a step in applied voltage. ............................................................................................................... 72 Figure 4-21 Phase currents response of the decoupled Motor 2 with 3/8-step-averaging and 3/8-step-averaging-plus-extrapolating filters to a step in applied voltage. ............................... 73 Figure 4-22 Speed and torque response of the decoupled Motor 2 with 3/8-step-averaging and 3/8-step-averaging-plus-extrapolating filters to a step in applied voltage. ............................... 73 Figure C-1 Sensor configuration of the ideal motor and a prototype motor.................................. 83 Figure C-2 Arrangement of Hall sensors and reaction tablet; (a) prototype motor; (b) equivalent model............................................................................................................................................... 84 Figure C-3 Hall sensor output (H1), and corresponding back emf voltage ( E AB ) as a function of rotor position. ................................................................................................................................. 85 Figure E-1 Timing of the input and output Hall signal switching events....................................... 90 Figure E-2 Drive-system response to a fast transient while filter deactivation is not implemented. ......................................................................................................................................................... 92 viii Figure E-3 Drive-system response to a fast transient while filter deactivation is implemented... 93 ix Acknowledgments I would like to express my deepest gratitude to my research supervisor, Dr. Juri Jatskevich, for his invaluable guidance and continues support throughout my program at UBC. It has been an honour for me to work with such a committed and knowledgeable individual. I would also like to thank Dr. José R. Martí and Dr. Edmond Cretu, who have kindly agreed to devoted their precious time and expertise and to be on my examining committee. I would also like to thank my colleague, Mr. Sina Chiniforoosh, for his help and constructive suggestions during our collaboration. My warm appreciation goes to all members of the UBC Power Systems lab, and in particular to: Tom De Rybel, Marcelo Tomim, Liwei Wang, and Amir Rasuli. Last but not least, I would like to thank my parents for their unconditional love and support and for helping me make my dream come true. x Co-authorship Statement I am the main contributor and the primary author of this thesis and the publications from which it is comprised. I have developed all computer models, derived equations, conducted simulations and experiments, and completed hardware design and implementation of the proposed filtering approach to achieve the results presented in this thesis. The manuscripts that constitute Chapters 2, 3, and 4 of this thesis, were initiated and prepared by me, and then iterated by the co-authors, Mr. Chiniforoosh and Dr. Jatskevich, to improve quality and coherency of the text. Mr. Chiniforoosh has also helped me conduct some of the experiments required for verification studies presented in Chapters 2 to 4. Dr. Juri Jatskevich closely supervised my entire research work presented in this thesis and helped me implement the described methodology with his invaluable ideas. xi 1 INTRODUCTION 1.1 Brushless DC Motors Brushless dc (BLDC) motors are becoming very popular in various applications due to their high efficiency, long life, high power density, and reliable operation. As may be inferred from the name, BLDC motors do not have the mechanical commutation system used on traditional brushed dc motors. Removal of the brushes increases the efficiency of the machine, reduces maintenance cost, and eliminates ionizing sparks from the commutator which also reduces the electromagnetic interference (EMI). Initially BLDC motors were used merely in high-end military applications. However, at present, these motors are being considered in many different applications ranging from high-end industrial automation and positioning systems to low-cost appliances and electric toys. Widespread application of BLDC machines is mainly due to the recent reduction in cost of these machines. Advances in the semiconductor and magnetic material industries made it possible to mass-produce low cost BLDC machines in large quantities. Ideally, these motors can be deployed in any of the areas where more traditional (brushed dc, synchronous, and induction) motors have been used. The BLDC motors are particularly gaining market share in robotics, consumer appliances, power tools, and manufacturing automation. A typical BLDC motor consists of a permanent magnet synchronous machine (PMSM) fed with a voltage source inverter (VSI). As the rotor magnets typically have high electrical resistance, the rotor losses are small contributing the higher efficiency. The motor case can be entirely enclosed and protected from dirt or other foreign matter. When the BLDC motor is packaged as a servo-motor, the VSI is packaged together typically in the same casing on the back of the machine. The VSI is fed from dc source. The switching logic of the inverter is always determined with respect to the rotor position, which ensures synchronous operation at variable frequency. Depending whether the rectifier is included in the same package or not, the servo-motor may be referred to as the AC or DC servo-motor. However, in many instances the PMSM and the driver (which includes the VSI and the motor controller) are sold separately so that the motor and the driver can be selected and better matched for a given electromechanical application. The approaches to establish rotor position are generally classified into two categories; sensorless and sensor-based. Although there has been many publications on sensorless position estimation schemes [1]–[3], sensor based drives are still preferred in many applications due to their simple implementation and reliable operation under different loading conditions and speeds, 1 without the need for the machine parameters. The sensorless techniques are typically based on using the measured voltages and/or currents [4]–[6], the back emf generated in the stator windings [7]–[8], or the observer-based methods [9]–[10]. The sensorless approach is not very reliable in low speeds and generally requires significant computational resources and knowledge of motor parameters, and therefore is used only in specific industrial applications. Within the BLDC sensor controls, the Hall-sensor-based approach is probably the most common means for estimating the rotor position. This method is simple, economical, and very reliable. In this configuration, three Hall sensors are positioned 120 degrees apart and react to a magnetic tablet that mimics magnetic characteristics (poles) of the rotor. Each Hall sensor outputs a logical signal of zero or one depending on whether it is facing the North or the South magnetic pole. Using this arrangement, one mechanical revolution is divided into six different zones. The combined state of the three Hall-sensor signals is used to identify the zone in which the rotor is located. Knowing the zone, the inverter transistors are switched accordingly to produce the desired electromagnetic torque. Unlike sensorless approaches, the Hall-sensor-based BLDC drive systems are self-starting, very reliable, and have good and predictable torque-speed characteristic in wide range of speeds. This approach is also very inexpensive from a computational point of view. The Hall-sensor-based drive system basically requires a look-up table that maps each of the six states of the Hall-sensor signals to the corresponding topology state of the VSI. Another advantage of the-Hall-sensor-based drive system is its high compatibility. Most of the industrial BLDC drives simply accept Hall sensor signals as an input without any specific requirements. The back emf in a typical BLDC motor may be either trapezoidal or sinusoidal [11], [13], whereupon the particular type depends on the physical construction of the rotor. As the sinusoidal back emf is generally harder to achieve, the motors with trapezoidal back emf tend to be less expensive and therefore used in larger number of low-cost applications. The transistors of the inverter may be controlled using the 180- or 120-degree commutation logic [11], [14]. The 180-degree switching logic is better suited for the PWM-generating of the sinusoidal stator currents in the motors with sinusoidal back emf. In this method, each phase is always connected either to the positive or the negative bus of the inverter. The 120-degree switching is used extensively with the trapezoidal back emf machines. In this method, each stator phase is conducting for 120 electrical degrees and is then left floating for 60 electrical degrees, which happens two times during one electrical revolution. This thesis is primary focused on the Hall-sensor-controlled trapezoidal BLDC motors that are most widely used offering simplicity and robustness to many applications. 2 1.2 Problem of Getting Accurate Hall–Sensor Signals In a typical BLDC motors considered in this thesis, the Hall-sensor signals of are generated by reaction of the Hall sensors to magnetic field of a special magnetic tablet that is mounted on the motor shaft. The tablet should ideally have the same magnetic characteristics, i.e. the distribution of magnetic poles as those of the actual rotor. Fig. 1-1 shows two different industrial BLDC motors with a magnetic tablet. As depicted in this figure, the tablet is fixed on the rear end of the rotor shaft. The Hall sensors are usually mounted on a printed circuit board (PCB). In this configuration, the magnetic tablet rotates along with rotor, and the stationary Hall sensors generate the necessary signals by responding to the magnetic poles of the tablet. Figure 1-1 Hall sensor configuration of two prototype BLDC motors; Arrow Precision (on the left), and Maxon (on the right). Theory and modeling of BLDC motors driven by the Hall sensors is very well explained in many sources, e.g. [8], [11]–[15] whereas the most common operation is achieved using the 120-degree switching logic for controlling the voltage-source inverter. To achieve a balanced operation among motor phases, the Hall sensors must be placed exactly 120 electrical degrees apart and the magnetic tablet needs to be evenly magnetized so that each magnetic pole corresponds to an angular interval of 180 electrical degrees. This ideal arrangement would result in a balanced set of Hall-sensor signals and in turn lead to symmetrical operation of the inverter. However, this is difficult to achieve in many mass-produced motors due to manufacturing tolerances. Hall sensors can be positioned several degrees off their ideal location and the magnetic tablet can be magnetized quite unevenly, particularly in the case of low-cost motors. These errors would be translated into larger electric-equivalent values (angles) for motors with large number of 3 magnetic poles. This results in distortion of the signals produced by the Hall-sensors, which in turn leads to unbalanced operation of the voltage-source inverter and deteriorates the overall drive performance. In traditional literature on modeling and analysis of BLDC machines [11], [12], [15], [16], several assumptions are usually made. Some of such assumptions include absence of saturation, no cogging torque, and availability of ideal Hall sensor signals. Although our communications with industry, researches and the engineers in the field made it clear that the problem of Hall-sensor signals asymmetry has been known for quite some time, very few publications address this problem [17]–[20]. A partial solution has been recently presented in [21], [22], where the authors have proposed filtering the Hall-sensor signals to mitigate the undesirable effects of the Hall-sensor misalignment. However, as will be demonstrated in this thesis, this measure along is not sufficient to improve the operation of the motors that could have both the unevenly magnetized reaction tablet as well as the misaligned sensors. As a rapid increase is observed in the applications of low-cost/low-precision BLDC motors, more attention is required to solve the problems of accuracy of the Hall-sensor signals. Presenting an effective solution to this problem may have a significant impact, allowing the low-cost BLDC motors to be used in applications where previously only the high-precision and costly motors were deployed. 1.3 Objectives and Summary of Contributions It is very desirable to solve the problem of inaccurate Hall-sensor signals in a way that is sufficiently general and can mitigate the errors that are due to any potential source. Such a solution can achieve widespread use provided that reliability issues and economic aspects of the problem are also considered. The proposed solution also should not compromise the robustness of the Hall-sensor-based drive systems and should not impose addition of expensive components to the conventional drive. Moreover, the solution should also be realizable on most of the BLDC motor-drives available on today’s market. This thesis extends the basic approach of filtering the existing Hall-sensor signals [21], [22] and makes the following overall contributions: The thesis provides a detailed analysis of the BLDC motor system and identifies different factors that potentially contribute to the errors in the Hall-sensor signals. 4 It develops a detailed model of the phenomena and investigates the effects of Hall-sensor signal asymmetry on drive system performance. We propose a simple and yet effective control-level filtering approach that can dramatically improve performance of the motors. The new generalized filters are proposed to mitigate the errors due to both common sources, namely the uneven magnetization and the misaligned Hall sensors. The thesis describes a straightforward and computationally efficient realization of the proposed digital filters which makes it possible to code them into the existing drive-system modules. Filters can also be implemented in the form of a standalone dongle-circuit that can be easily placed between the original Hall-sensors and the motor drive to filter out all undesirable errors in the signals. A very compact prototype of the proposed dongle had been fabricated and texted on a number of typical industrial BLDC motors and drivers. The thesis also presents extensive simulation results and hardware measurements to validate the effectiveness of the proposed generalized methodology. 1.4 Thesis Organization This thesis is written in the manuscript format based on the latest guidelines of the UBC’s Faculty of Graduate Studies1. Specifically, Chapters 2 through 4 consist of three publications that present research results on the BLDC drive systems with distorted Hall-sensor signals. These results were achieved during my two-year M.A.Sc. program at the UBC’s power group. Chapter 5 includes additional details that are pertaining to improving reliability of the drive. The material included in Chapter 5 has not been previously published, but perhaps may be included in future publications as well as the patent application which will be filed with the University-Industry Liaison Office (UILO). Chapter 6 summarizes the research findings and provides overall conclusions achieved by the proposed methodology. Possible extensions of the proposed filtering techniques are also presented in this Chapter. Since Chapters 2, 3, and 4 concentrate on the closely-related subjects, it is natural that there exists a certain amount of overlap of introductory material included therein. However, the UBC’s 1 UBC Faculty of Graduate Studies: Master’s and Doctoral Thesis Preparation and Submission. Manuscript-based Thesis. Available at: http://www.grad.ubc.ca/students/thesis 5 Faculty of Graduate Studies guidelines instruct the author not to remove the material common between different manuscripts and instead include the published materials “as is”. Therefore, the reader is asked to take these formatting guidelines into consideration and not to hold it against the author and/or the technical contributions presented. 6 1.5 References [1] J. P. Johnson, M. Ehsani, Y. Guzelgunler, “Review of Sensorless Methods for Brushless DC,” In Proc. Industry Applications Conference, 1999. Thirty-Fourth IAS Annual Meeting. Conference Record of the 1999 IEEE, Vol. 1, pp. 143–150, Oct. 3 – 7, 1999. [2] T. Senjyu, K. Uezato, “Adjustable Speed Control of Brushless DC Motors without Position and Speed Sensors,” In Proc. Int’l. IEEE/IAS Conf. on Industrial Automation and Control: Emerging Technologies, pp. 160–164, 1995. [3] A. Consoli, S. Musumeci, A. Raciti, A. Testa, “Sensorless Vector and Speed Control of Brushless Motor Drives,” IEEE Trans. on Industrial Electronics, Vol. 41, pp. 91–96, February, 1994. [4] P. Acarnley, “Sensorless Position Detection in Permanent Magnet Drives”, IEE Colloquium on Permanent Magnet Machines and Drives, pp. 1011–1014, 1993. [5] K. Iizuka, et al., “Microcomputer Control for Sensorless Brushless Motor,” IEEE Transactions on Industry Applications, Vol. IA-27, pp. 595–601, May – June, 1985. [6] W. Brown, “Brushless DC Motor Control Made Easy”, Microchip Technology Inc., 2002. [Online]. Available: www.microchip.com [7] K. R. Shouse, D. G. Taylor, “Sensorless Velocity Control of Permanent-Magnet Synchronous Motors”, In Proc. 33rd Conf. on Decision and Control, pp. 1844–1849, December, 1994. [8] N. Ertugrul, P. Acarnley, “A New Algorithm for Sensorless Operation of Permanent Magnet Motors,” IEEE Transactions on Industry Applications, Vol. 30, pp. 126–133, January – February, 1994. [9] N. Matsui, “Sensorless PM Brushless DC Motor Drives,” IEEE Transactions on Industrial Electronics, Vol. 43, pp. 300–308, April, 1996. [10] M Schrodl, “Sensorless Control of Permanent Magnet Synchronous Motors,” Electric Machines and Power Systems, Vol. 22, pp. 173 – 185, 1994. [11] B. J. Brunsbach, G. Henneberger, T. Klepseh, “Position Controlled Permanent Magnet Excited Synchronous Motor without Mechanical Sensors,“ In Proc. IEE Conf on Power Electronics and Applications, Vol. 6, pp. 38–43, 1993. [12] M. Benarous, J.F. Eastham, P.C. Coles, “Sinusoidal Shaft Position Encoder,” In Proc. Power Electronics, Machines and Drives (PEMD 2004), Vol. 1, Mar. 31 – Apr. 2, 2004 pp. 132–136 [13] Y. Buchnik, R. Rabinovici, “Speed and Position Estimation of Brushless DC Motor in Very Low Speeds,” In Proc. Convention of Electrical and Electronics Engineers in Israel, Sept. 6 – 7, 2004 pp. 317–320 [14] P. C. Krause, O. Wasynczuk, S. D. Sudhoff, Analysis of Electric Machinery and Drive Systems. IEEE Press, Piscataway, NJ, 2002. 7 [15] P. Pillay, R. Krishnan, “Modeling, simulation, and analysis of permanent-magnet motor drives. Part II. The brushless DC motor drive,” IEEE Transactions on Industry Applications, Vol. 25, Iss. 2, March-April 1989, pp. 274–279. [16] P. L. Chapman, S. D. Sudhoff, C. A. Whitcomb, “Multiple Reference Frame Analysis of Non-sinusoidal Brushless DC Drives,” IEEE Transactions on Energy Conversion, Vol. 14, No. 3, pp. 440–446, 1999. [17] S. D. Sudhoff, P. C. Krause, “Average-value Model of the Brushless DC 120º Inverter System,” IEEE Transactions on Energy Conversion, Vol. 5, No. 3, pp. 553–557, 1990. [18] S. D. Sudhoff, P. C. Krause, “Operation Modes of the Brushless DC Motor with a 120º Inverter,” IEEE Transactions on Energy Conversion, Vol. 5, No. 3, pp. 558–564, 1990. [19] P. B. Beccue, S. D. Pekarek, B. J. Deken, A. C. Koenig, “Compensation for Asymmetries and Misalignment in a Hall-Effect Position Observer Used in PMSM Torque-Ripple Control,” IEEE Transactions on Industry Applications, Vol. 43, No. 2, pp. 560–570, 2007 [20] J. Jatskevich, N. Samoylenko, Improving Performance of Hall-Sensor-Driven Brushless DC Motors, The University of British Columbia, University Industry Liaison Office, Patent Draft 07-078, Jun. 2007. [21] N. Samoylenko, Q. Han, J. Jatskevich, “Balancing hall-effect signals in low-precision brushless DC motors,” In Proc. IEEE Applied Power Electronics Conference, Feb. 28 – Mar. 2, 2007, Anaheim CA, USA, pp. 606–611. [22] N. Samoylenko, Q. Han, J. Jatskevich, “Improving dynamic performance of low-precision brushless DC motors with unbalanced Hall sensors,” In Proc. IEEE Power Engineering Society General Meeting, Panel Session – Intelligent Motor Control I, June 24–28, 2007, Tampa FL, USA. 8 2 EVALUATING MISALIGNMENT OF HALL SENSORS IN BRUSHLESS DC MOTORS1 2.1 Introduction Brushless DC motors have become increasingly popular because of their low cost, fast dynamic response, good torque-speed characteristics and long life. Advances in semiconductor technology and magnetic materials, together with availability of permanent magnets in the market, resulted in an increasing use of BLDC motors in industrial automation, position and motion control and many servo applications. A BLDC motor consists of a permanent magnet synchronous machine (PMSM) supplied with an inverter. In this type of motor the switching logic of the inverter is determined by rotor position. Generally, the approaches to establish the rotor position may be classified into sensor and sensorless methods [1]–[3]. The method that uses Hall Effect sensors has numerous advantages, especially at low speeds where many sensorless methods become less accurate. In this paper we focus on the Hall-sensor-driven BLDC motors since these are the very cost effective and mass-produced drives. A schematic diagram of a BLDC drive is illustrated in Fig. 2-1. Here, the Hall sensors H1, H2 and H3 provide the inverter with rotor position information which is necessary to control the inverter transistors according to standard 120-degree switching logic. The theory and modeling of Hall-sensor-driven BLDC motors have been well investigated in the literature [1], [4], [5], [6]. Most of the publications on BLDC assume that Hall sensors are positioned exactly 120 electrical degrees apart. This assumption may not be true for many low-cost and low-precision motors that are mass-produced on the market. Fig. 2-2 shows a prototype BLDC motor with misplaced Hall sensors. Dashed axes represent ideal position of the sensors while solid axes represent the actual position of the sensors. As can be seen, the Hall sensors H1, H2 and H3 are mounted on a PC board placed outside the motor case. These sensors react to the magnetic field produced by a permanent magnet tablet that is attached to motor shaft and revolves with the rotor. This tablet is magnetized in a way to have the same magnetization characteristics as that of the rotor. In Fig. 2-2, the misplacement angles in mechanical degrees are 1 A version of this chapter has been published. P. Alaeinovin, S. Chiniforoosh, J. Jatskevich ‘Evaluating Misalignment of Hall Sensors in Brushless DC Motors’, IEEE Electric Power & Energy Conference (EPEC 2008), Oct. 6-7, 2008, Vancouver BC, Canada. 9 Switching logic + ! - " # $ + + - + - - 0 Sr A B C ωr 0 0! Nr Figure 2-1 Schematic diagram of a BLDC motor-drive system. BmA BmB - actual position BmC - ideal position Figure 2-2 Misplaced Hall sensors in a prototype BLDC motor. denoted by mA , mB and mC for H1, H2 and H3, respectively. Although the actual mechanical misplacements may appear small (on the order of few degrees), for the motors with large number of magnetic poles these values translate into even greater errors in electrical degrees as: P 2 x mx . (2-1) 10 Here the subscript x may represent the phases, A , B , and C , respectively, and P denotes the number of magnetic poles. In some motors Hall sensors are placed inside the stator case and may not be readily accessible. Hence, measuring the amount of misplacement, physically, is neither an easy nor an accurate method. The adverse effects of misaligned Hall sensors on inverter operation and motor phases have been recently investigated in [7]. It has been demonstrated that misalignment of Hall Effect sensors result in mal-operation of the voltage source inverter and lead to deterioration of the overall drive performance. In this paper, a procedure is presented to evaluate the misplacement of each Hall sensor. In order to show the effects of misplacement on performance of the machine, three prototype BLDC motors with different misplacements are compared. As it is difficult in practice to measure the instantaneous electromagnetic torque, the detailed models of the subject motors have been established in MATLAB Simulink [8] using toolbox [9]. The models are used to predict the electromagnetic torque and investigate the torque ripple. 2.2 Modeling and Operation of the BLDC Motor For the purpose of investigating the effects of misplaced Hall sensors on machine performance, it is beneficial to develop a detailed model. The model discussed herein uses the following common assumptions [1], [4], [5] and [6]: (a) saturation is negligible; (b) no current is induced in the permanent-magnet rotor; (c) the stator self and mutual inductances are constant. The electrical dynamics of the stator may then be described by the equation: v abcs rs i abcs where f abcs f as f bs dλ abcs dt (2-2) f cs T , and f may represent the voltage, current or flux linkage vectors. The diagonal matrix of stator resistance is denoted by rs . In the case of a motor with non-sinusoidal back emf, the back emf is assumed to be half-wave symmetric and contain spatial harmonics. Therefore, the stator flux linkages and electromagnetic torque equations have to be modified as follows: 11 sin 2n 1 r 2 K 2n 1 sin 2n 1 r λ abcs L s i abcs λ'm 3 n 1 sin 2n 1 2 r 3 T cos2n 1 r i as P 2 Te λ'm K 2n 1 ibs cos 2n 1 r 2 3 n 1 ics cos 2n 1 2 r 3 where the inductance matrix is Lls Lm L s 0.5 Lm 0.5 Lm 0.5 Lm Lls Lm 0.5 Lm 0.5 Lm 0.5 Lm Lls Lm (2-3) (2-4) (2-5) is the magnitude of the fundamental component of the permanent magnet In (2-3) and (2-4), m rotor flux linkage. The coefficients K n denote the normalized magnitudes of the n th flux harmonic relative to the fundamental component. Also in (2-5), Lls is the stator leakage inductance and Lm is the stator magnetizing inductance. A cross-sectional view of an equivalent two-pole PMSM with misplaced Hall Effect sensors is depicted in Fig. 2-3. Here, the H1’, H2’, and H3’ represent the ideally placed Hall sensors, while H1, H2, and H3 denote the actual non-ideal sensors. The quantities A , B and C denote the misplacement angles for H1, H2 and H3 respectively. Here v is the advance firing angle [1]. In normal motor operation v 6 . Output state of each Hall sensor as a function of rotor position is defined in Table 2-1. Note that these signals also depend on the advance firing angle v as well as the positioning errors in electrical degrees A , B and C . These signals are used by the inverter to provide the stator with the desired voltages. Switching logic of the transistors in the inverter is summarized in Table 2-2. Transistor numbers in this Table correspond to what is shown in Fig. 2-1. It can be understood from Table 2-2, that the commutation-conduction pattern of the inverter is very sensitive to the physical position of the Hall sensors. Hence misplacing the sensors will affect 12 switching intervals of the inverter. The insufficiently precise positioning of the Hall sensors causes unbalanced operation of the inverter, with some phases conducting for longer and other phases conducting for shorter time intervals. The resulting unbalance among the phases leads to an increase in torque pulsation, vibration and audible noise. bs-=NEI H1 'H as' 1 ωH φ Α cs H2 H2' φυ Sr q-=NEI bs θH φΒ as-=NEI Nr bs' as cs-=NEI cs' φ+ d-=NEI H3' H3 Figure 2-3 Cross-section of a BLDC machine with misplaced Hall sensors. Table 2-1 Hall sensor states as a function of rotor position H1 on H2 on H3 on 90 v A r 90 v A 30 v B r 210 v B 150 v C r 330 v C Table 2-2 Switching intervals of a 120-degree inverter Switching interval Rotor position 1 30 v C r 30 v B 30 v B r 90 v A 90 v A r 150 v C 2 3 4 5 6 2.3 150 v C r 210 v B 210 v B r 270 v A 270 v A r 330 v C Transistors on 5,1 1,6 6,2 2,4 4,3 3,5 Measuring the Misalignment To study the effects of misplaced Hall sensors in a large number of BLDC motors a convenient method should be established to evaluate the misplacement angles. The approach used in this 13 paper is based on comparing the zero crossings of the line-to-line back emf voltages with the zero crossings of the relevant Hall sensor output signal. The back emf voltages can be measured at the stator terminals when the machine is open-circuited and rotated by a prime mover. Based on (2-2) and (2-3), the phase back emf voltages can be calculated as (2-6). Thereafter, line-to-line back emf voltages will be described as (2-7), (2-8) and (2-9) cos2n 1 r 2 e abcs r λ'm (2n 1) K 2n 1 cos 2n 1 r 3 n 1 2 cos 2n 1 r 3 eab 2. r λ'm (2-6) 2n 1.K 2n 1 sin 2n 1 r 3 .sin 2n 1 3 (2-7) n 1 ebc 2.r λ'm 2n 1.K 2n 1 sin2n 1 r .sin 2n 12 3 (2-8) n 1 eca 2. r λ'm 2n 1.K 2n 1 sin 2n 1 r 3 .sin 2n 1 3 (2-9) n 1 It can be seen in (2-7) - (2-9) that eab , ebc and eca cross zero at r , 2 , 3 3 r 0, and r 3 , 2 3 respectively, as the first sine term becomes zero. Recall that for normal operating conditions v . Therefore, according to Table 2-1, for an ideal motor the 6 signals H1, H2 and H3 also cross zero at r , 2 , r 0, and r , 2 , 3 3 3 3 respectively. However, for a motor with misplaced Hall sensors zero crossings of Hall signals will be shifted. For the purpose of discussion, the Hall sensor signals and the line-to-line back emf voltages of a non-ideal motor are shown in Fig. 2-4. Zero crossing of line-to-line back emf is independent of sensor positioning and depends only on rotor position. Hence, it can be used as a reference. Therefore, the misplacement angle for each sensor can be measured by comparing the zero crossings of relevant line-to-line back emf voltage and Hall sensor signal as shown in Fig. 2-4. In this diagram, 2 and 3 represent zero crossings of eab and H1 respectively. The misplacement angle for H1 is calculated as 14 A 3 2 (2-10) φ) 0 8 )* θ1 θ2 θ3 φ* 0 8 *+ φ+ 0 ! 8 +) θHH=@ π 2 0 π 2 π 3π 2 Figure 2-4 Open circuit line voltages superimposed on Hall sensor outputs. To find the corresponding positioning error in mechanical degrees one should apply (2-1). The misplacement of H2 and H3 can be measured similarly. 2.4 Measurement Results and Comparison To study the phenomena of unbalanced Hall-effect sensors, we measured the amount of misplacement for a batch of industrial BLDC motors for possible variation in the severity of sensor misalignment. The results of the measurements for the three sample motors are shown in Table 2-3 in electrical degrees. In order to present the effects of misaligned Hall sensor on stator current an experimental study was carried out. In this study a mechanical load of 0.5 (N.m) was applied to the motors and stator currents were measured. The inverter was fed from a power supply with a DC voltage of 36 volts. In Fig. 2-5, stator currents of the three motors are compared to the stator currents of an ideal BLDC motor. Current waveforms of the ideal BLDC motor were obtained using simulation. The motor parameters used in the studies are summarized in Appendix A. 15 Table 2-3 Misalignment values for three different motors A B C 1 2 3 -1.2 11.2 3.2 0.8 -7.6 -16 -4 4.8 -16 Stator currents, iabcs(A) Stator currents, iabcs(A) Stator currents, iabcs(A) Stator currents, iabcs(A) Motor no. 10 Measured currents of motor no.1 0 10 0.115 0.12 0.125 10 0.13 0.135 0.14 Measured currents of motor no.2 0 10 0.115 0.12 0.125 10 0.13 0.135 0.14 Measured currents of motor no.3 0 10 0.115 0.12 0.125 10 0.13 0.135 0.14 Simulated currents of the ideal motor 0 10 0.115 0.12 0.125 0.13 0.135 0.14 Time (s) Figure 2-5 Currents of three BLDC motors compared with an ideal motor. As seen in Fig. 2-5, for non ideal motors the phases are energized for unequal periods of time and the waveforms are not symmetric among the phases. In particular, stator currents of motor no. 3 are distorted the most while the currents of motor no. 1 are close to that of the ideal motor. These visible distortions are consistent with the misplacement angles presented in Table 2-3 where motor no.1 and 3 had the best and the worst misplacement angles, respectively. The detailed model was used to predict the produced electromagnetic torque for all three BLDC machines assuming a constant load torque of 0.5 (N.m). The currents predicted by our models are 16 demonstrated in Fig. 2-6. As can be seen in Figs. 2-5 and 2-6, the predicted currents are fairly close to the measurements. This assures that the torque predicted by our model is close the actual torque Stator currents, iabcs(A) Stator currents, iabcs(A) Stator currents, iabcs(A) developed by each motor. 10 Motor no. 1 0 10 0.115 0.12 0.125 0.13 0.135 10 0.14 Motor no. 2 0 10 0.115 0.12 0.125 0.13 0.135 10 0.14 Motor no. 3 0 10 0.115 0.12 0.125 0.13 0.135 0.14 Time Figure 2-6 Simulated stator currents of three BLDC motors. Furthermore, in Fig. 2-7, the predicted torque of the three motors is compared with that of the ideal motor. As can be seen, motor no.1 produces an electromagnetic torque that is very close to the torque produced by an ideal motor. The torque produced by motor no. 3 however, is deformed and has a larger ripple. Distortion amount of the torque produced by motor no.2 is between the distortion levels of the other two motors. To demonstrate the effects of sensor misalignment on electromagnetic torque even further, the harmonics content of the torques are shown in Fig. 2-8. Here the frequency axis is normalized with respect to a fundamental frequency of 892.5 Hz. Since the motor is driven by the six-step inverter the fundamental frequency equals six times the electrical frequency of rotor at the given speed. As can be seen in the Fig. 2-8, the predicted torque for the ideal motor has the fundamental frequency of 892.5 Hz and its harmonics that are integer of the fundamental. In motor 1, which is a relatively good motor, the frequency content of the torque is fairly close to that of the ideal motor. According to Table 2-3, motor no. 3 has the worst misalignment and it can be seen in Fig. 2-8, that the predicted torque for this motor has a much richer spectrum. In particular, the electromagnetic 17 torque has also components at frequencies lower than the fundamental frequency. The torque spectrum of motor no.2 also has some low frequency components as shown in Fig. 2-8. Overall, misplacement of Hall sensors results in an increase of torque harmonics particularly in the low frequency range. These components result in vibration of the motor, increase audible noise and Electromagnetic Torque (N.m) Electromagnetic Torque (N.m) Electromagnetic Torque (N.m) Electromagnetic Torque (N.m) degrade drive performance 0.6 0.4 Motor no. 1 0.2 0 0.18 0.184 0.188 0.192 0.196 0.2 0.6 0.4 Motor no. 2 0.2 0 0.18 0.184 0.188 0.192 0.196 0.2 0.6 0.4 Motor no. 3 0.2 0 0.18 0.184 0.188 0.192 0.196 0.2 0.6 0.4 Ideal motor 0.2 0 0.18 0.184 0.188 0.192 0.196 0.2 Time Figure 2-7 Electromagnetic torque for three non-ideal and ideal BLDC motors. 18 Electromagnetic Torque (N.m) Electromagnetic Torque (N.m) Electromagnetic Torque (N.m) Electromagnetic Torque (N.m) Motor no. 1 0.06 0.04 0.02 0 0 2 4 6 8 10 Motor no. 2 0.06 0.04 0.02 0 0 2 4 6 8 10 Motor no. 3 0.06 0.04 0.02 0 0 2 4 6 8 10 Ideal motor 0.06 0.04 0.02 0 0 2 4 6 8 10 Normalized frequency Figure 2-8 Frequency content of the predicted electromagnetic torque for three non-ideal and ideal BLDC motors. 2.5 Conclusions This paper explained the phenomena of unbalanced Hall sensors in BLDC motors and presented a practical method for measuring the misplacement angles for each of the Hall sensors. Misalignment effects on motor operation were analyzed by investigating several industrial BLDC motors with different misplacement angles. A detailed model of the BLDC motor has been developed and used to determine the resulting electromagnetic torque. It was shown that unbalanced Hall sensors lead to unequal conduction intervals among the phases and subsequently undesirable low-frequency harmonics in torque. 19 2.6 [1] References P. C. Krause, O. Wasynczuk, S. D. Sudhoff, Analysis of Electric Machinery and Drive Systems. IEEE Press, Piscataway, NJ, 2002. [2] P. Pillay, R. Krishnan, “Modeling, simulation, and analysis of permanent-magnet motor drives, Part II: The brushless DC motor drive” IEEE Trans. Industry Applications, Vol. 25, Iss. 2, pp. 274–279, Mar.-Apr. 1989. [3] W. Brown, “Brushless DC Motor Control Made Easy”, Microchip Technology Inc., 2002 [Online]. Available: www.microchip.com [4] S. D. Sudhoff, P. C. Krause, “Average-value model of the brushless DC 120º inverter system,” IEEE Trans. Energy Conversion, Vol. 5, No. 3, pp. 553–557, 1990. [5] S. D. Sudhoff, P. C. Krause, “Operating modes of the brushless DC motor with a 120º inverter,” IEEE Trans. Energy Conversion, Vol. 5, No. 3, pp. 558–564, 1990. [6] P. L. Chapman, S. D. Sudhoff, C. A. Whitcomb, “Multiple reference frame analysis of non-sinusoidal brushless DC drives,” IEEE Trans. Energy Conversion, Vol. 14, No. 3, pp. 440–446, 1999. [7] N. Samoylenko, Q. Han, and J. Jatskevich, “Improving Dynamic Performance of Low-Precision Brushless DC motors with Unbalanced Hall Sensors,” IEEE Power Engineering Society, General Meeting, 2007. [8] Simulink: Dynamic System Simulation for MATLAB, Using Simulink Version 6, The Math Works Inc., 2006. [9] Automated State Model Generator (ASMG), Reference Manual Version 2, P.C. Krause & Associates, Inc. 2003. Available: www.pcka.com 20 EFFICIENT IMPLEMENTATION OF HALL SENSOR SIGNALS 3 FILTERING FOR IMPROVED OPERATION OF BRUSHLESS DC MOTORS1 3.1 Introduction BRUSHLESS dc (BLDC) motors are becoming very inexpensive and popular in various applications. Generally, such motors have been investigated quite well in the literature [1]–[6]. In low- to medium- cost applications, the Hall sensors are typically utilized for determining the rotor position and producing the signals needed for switching the inverter transistors. Although there have been numerous sensorless approaches proposed in the literature [7], [8], the Hall-sensor controlled BLDC motors are preferred in many applications due to their relative simplicity, low cost, and reliable operation in wide range of loading conditions and speeds. The Hall-sensor-controlled BLDC motors are also popular in small electric vehicles, scooters, and appliances [9], [10], [11]. In many instances, the BLDC machine and the driver module can be sourced separately and mix-and-matched, which allows for very flexible design. Theory and modeling of BLDC motors driven by Hall sensors is well explained in many sources, e.g. [1]–[6], whereas the most common operation is achieved using the 120-degree switching logic to control the six-step voltage-source inverter (VSI) [5], [6]. Under these conditions, the motor phases are supposed to conduct for 120 electrical degrees two times per cycle. To achieve a balanced operation among the motor phases, the Hall sensors must be placed exactly 120 electrical degrees apart. Although this is a common assumption in many literature sources, this is difficult to achieve in many mass-produced motors due to manufacturing tolerances. In fact, in many low-precision motors sensor positioning could be quite inaccurate and relative displacements may be significant. Many advanced control schemes also rely on Hall-sensor based position and speed estimation [12]–[18], in which case their performance will be affected. A misalignment of Hall sensors was documented in [19], where the authors investigated a vector-tracking observer to locate the position of the rotor. A method for measuring the relative displacement of each Hall sensor was proposed in [20]. Authors of [21] also proposed a moving average filtering method along with a calibration method for different speed ranges to mitigate the 1 A version of this chapter has been submitted for publication. P. Alaeinovin, S. Chiniforoosh, J. Jatskevich Efficient Implementation of Hall Sensor Signals Filtering for Improved Operation of Brushless DC Motors: 21 adverse effects of low-resolution position sensors on motor performance. For small-scale machines the accuracy of Hall-sensor positioning may also be a problem. The authors of [22] demonstrated their carefully-made prototype and related the unsymmetrical phase currents to the Hall-sensor inaccuracy. In [23], [24] different linear averaging filters were presented to improve static and dynamic performance of the BLDC motor drive system. Insufficiently precise positioning of the Hall sensors causes unbalanced operation of the motor inverter and uneven conduction intervals among the phases. The resulting unbalance among the phases leads to an increase in torque pulsation, vibrations, and acoustic noise, and in general reduces the performance of the drive system. Since there has been an increase in production and use of low-cost/low-precision BLDC motors in many applications, the problem of inaccurate positioning of Hall sensors requires further attention. Interested reader can find a detailed model and analysis of the performance of BLDC drive systems with inaccurate Hall sensors in [24]. This paper extends the previous work in this area and makes the following additional contributions: We derive very compact and computationally efficient form for the filtering algorithms introduced in [24]. In the proposed form, any of the filters can be readily implemented either in the code of existing motor drives, or in a low-power and low-memory stand-alone programmable integrated circuit (PIC) or microcontroller. We propose a very robust and efficient interrupt-based realization of the filters that is capable of handling wide range of errors in the Hall sensor signals, as well as riding through acceleration/deceleration transients. We present an experimental prototype-dongle of the filter that can be placed between the Hall sensors and the motor-driver module to perform the necessary corrections of the Hall-sensor signals without compromising the drive performance. 22 3.2 System Operation with Unbalanced Hall-Sensors 3.2.1 BLDC Motor Operation and Modeling This paper considers a conventional 3-phase BLDC motor-inverter system as shown in Fig. 3-1, which utilizes the standard 120-degree switching logic to control the six-step VSI. However, a filtering block is added here in order to filter-out the errors in the Hall-sensor signals. To analyze the effects of unbalanced Hall sensors on BLDC motor operation, it is instructive to consider a cross-sectional view of an equivalent 2-pole permanent-magnet synchronous machine (PMSM) in more detail as shown in Fig. 3-2. Here, the rotor position and speed are denoted by r and r , respectively. The advance in firing angle is designated by v [1]–[3]. The actual and ideally positioned Hall sensors are denoted by H1,2,3 and H1,2,3 , respectively. The angles a , b , and c represent the overall Hall-sensor errors in each phase in electrical degrees. In this paper, positive errors are defined to be in clockwise direction, coinciding with direction of v . %& + ! ! " # $ - 0 + 0! - - ω + ' () * 0 - + Figure 3-1 BLDC motor-drive system with filtering of Hall-sensor signals. 23 bs-=NEI H1 ϕa as' cs H2 H2' Sr 'H 1 q-=NEI ωH φυ bs ϕb θH as-=NEI Nr bs' as cs' ϕc d-=NEI cs-=NEI H3' H3 Figure 3-2 Permanent-magnet synchronous machine with misaligned Hall sensors. The PMSM can be analyzed based on commonly used dynamic state model [1]–[4], which is included here for completeness. In particular, the stator voltage equation has the following form v abcs rs i abcs where f abcs f as f bs dλ abcs dt (3-1) f cs T , and f may represent the vector of phase voltages, currents or flux linkages. Also, rs represents the stator resistance matrix. In the case of a motor with non-sinusoidal back emf, the back emf is assumed to be half-wave symmetric and contain spatial harmonics. Therefore, the stator flux linkages and electromagnetic torque may be written as [4]: sin 2n 1 r 2 K 2n 1 sin 2n 1 r λ abcs Ls i abcs λ'm 3 n 1 sin 2n 1 2 r 3 ias P Te λ'm K 2n 1 ibs 2 n 1 ics T cos2n 1 r 2 cos 2n 1 r 3 2 cos 2n 1 r 3 (3-2) (3-3) 24 where Ls is the stator-phase self-inductance, and 'm is the magnitude of the fundamental component of the PM magnet flux linkage. The coefficients K n denote the normalized magnitudes of the n th flux harmonic relative to the fundamental, i.e. K1 1 . Each Hall sensor is assumed to output a logical signal (0 or 1) for 180 electrical degrees. When the ideal motor is running, the Hall sensors produce square wave signals displaced by exactly 120 electrical degrees relative to each other, which divides one electrical cycle into six equal 60-degree intervals [3]. Transitions of the signals produced by Hall sensor are then used directly to switch the inverter transistors according to the standard 120-degree commutation logic [3], [6]. According to this logic, each phase is turned on for 120 and turned off for 60 electrical degrees two times during one complete electrical cycle. However, when the Hall sensors are not precisely located, the switching sequence becomes distorted leading to unbalance among the motor phases. We have investigated a batch of industrial BLDC motors, and the parameters of the two sample motors considered in this paper are summarized in Appendix B. For example, Fig. 3-3 depicts the stator phase currents from the sample Motor 1. Here, the angular- and time-duration between each subsequent Hall sensor transition is denoted by n and n , respectively, and n denotes the interval number. In case of a BLDC motor with ideally-placed Hall sensors, the angular duration n between subsequent Hall sensor transitions should be 60 degrees for all n , which is clearly not true in Fig. 3-3. Also, in steady state operation, the time intervals n should be equal. τ(n-5) τ(n-4) τ(n-3) τ(n-2) τ(n-1) τ(n) τ(n+1) τ(n+2) Time, s. θ(n-5) θ(n-4) θ(n-3) θ(n-2) θ(n-1) θ(n) θ(n+1) θ(n+2) θr, rad. Figure 3-3 Stator currents with unequal conduction intervals due to Hall-sensor misalignment. 3.2.2 Filtering of Hall Sensor Signals The frequency content of the sequence n , introduced in Fig. 3-3, can be evaluated by using the discrete-time Fourier series (DTFS) [25], so that the sequence can be written as: 25 n N 1 ck e j 2kn / N (3-4) k 0 where the Fourier coefficients ck , k 0,1,..., N 1 , provide the description of n in the frequency domain. In our case, the signal n has one zero-frequency component and two components with frequencies of 2 4 and radians per sample [24]. 3 3 The purpose of filtering schemes presented in this section is to make the sequence of the time intervals follow that of a motor with perfectly positioned Hall sensors. Hence, the filter must remove 2 4 and harmonics from the sequence n . This can be achieved with selection of 3 3 linear filters that generally have the following form: n M bm n m (3-5) m 1 where M is the order of the filter corresponding to the number of time intervals taken into account, and bm is the weighting coefficient that depends on a particular filter realization. Different linear filters were proposed in [24] including 3-step averaging; 6-step averaging; linear extrapolating-plus-averaging; and quadratic extrapolating-plus-averaging. The resulting values produced by these averaging filters are denoted by a3 , a6 , l and q , respectively. The final filter equations are presented here for completeness. a3 n a6 n 1 n 1 n 2 n 3 3 1 n 1 n 2 n 3 n 4 n 5 n 6 6 1 l n 2 n 1 n 2 n 3 n 4 3 1 q n 3 n 1 n 3 2 n 4 n 5 3 (3-6) (3-7) (3-8) (3-9) 26 3.3 Efficient Implementation of the Filters The computational resources required to implement a control scheme depend on the complexity of the algorithm. Although very fast and powerful CPUs and DSPs may be easily available in research labs on experimental samples, their use may not be justifiable for the volume production of inexpensive drives. Many of the BLDC drive systems available in today’s market utilize microcontrollers with low number of bits (8 to 16) and relatively slow clock (10 to 80 MHZ). The older drive systems have even more limited resources. To enable wide applicability of the filtering methodology presented in [24] it is essential to design a straightforward, robust and computationally efficient implementation that requires minimum computational resources. Such implementation could therefore be either coded into the existing drive systems with limited recourses or added as a filter (see Fig. 3-1) with minimal additional hardware. Here we present a simple implementation of the previously introduced filters that can easily be used with existing drive systems. As can be seen in Fig. 3-1, the filter accepts the original Hall sensor signals as an input (input Hall signals), and provides the switching circuitry with the modified signals (output Hall signals). The proposed filtering algorithm is implemented here using an interrupt-based approach. Using this method, switching of the Hall sensors triggers the input hardware interrupt service routines (ISR), at which time all the necessary calculations (instructions) can be done inside of the microcontroller. In order to avoid the overflow and enable a robust and continuous operation of the drive, the internal time counter of the microcontroller has to be re-set back to zero at each time the input ISR is invoked. Hence, the time intervals n are readily available simply as the timer counts between the Hall-sensor transitions. To switch the transistors when the filter is enabled, the software output ISR has to be invoked at a particular time to provide the inverter with the modified Hall signals. This time of the next switching may be expressed as: t next _ sw t n n tout (n 1) (3-10) where n denotes the averaged time interval as calculated using any of the filters (3-6)–(3-9), and t n is the so-called reference switching time as defined in [24]. Also, here tout (n 1) refers to the time when the modified output Hall signals will be switched. Direct implementation of (3-10) as described in [24] requires continuously re-calculating both the reference time t n and the averaged interval n . This approach requires more 27 computational resources which is not very practical for many applications where cost-effective control and simplicity are essential. Instead, to make the implementation efficient, it is necessary to relate the time tout (n 1) (when the modified output Hall signals will be switched) to the time when the original Hall signal has triggered the input ISR. Denoting the most-recent calling of the input ISR by tin (n) , the time of the next output ISR can be expressed as: tout (n 1) tin (n) corr (n) (3-11) where corr (n) is the appropriate correction term. Implementation of (3-11) has a big advantage over (3-10) as it requires a very simple scheduling of the output ISR by the offset correction time corr (n) without the need for the reference time. Using this approach, the output ISR can simply be scheduled by comparing the value of the timer and correction term. To understand how the correction time corr (n) can be calculated, it is instructive to consider Fig. 3-4. Here, the top time axis depicts the input hardware interrupts that are triggered by the actual Hall sensor signals, tin (n) . The scheduled output software interrupts for the modified switching signals are depicted on the bottom time axis, tout (n) . Assuming a certain reference time t n and a given n , the correction term may also be calculated using (3-10)–(3-11) as: corr (n) tout (n 1) tin (n) t n n tin (n) (3-12) Computation of (3-12) requires knowledge of the reference time. This time may be obtained by averaging the switching times of the three phases as depicted in Fig. 3-4. t n 1 t n t n t n 3 (3-13) Here t (n) is time of the last switching of the input Hall signal, and t n and t n are the times extrapolated from the two preceding input Hall signal transition times, as follows: t n tin n 1 n t n tin n 2 2 n (3-14) As can be seen in Fig. 3-4, the most recent input hardware interrupt has occurred at tin (n) . The 28 last two input hardware interrupts have occurred at tin (n 1) and tin (n 2) respectively. These times are used to calculate the extrapolated terms according to (3-14), and then the reference time according to (3-13). Input Interrupt Trigger Times tin(n) tin(n-1) tin(n-2) τ(n-2) τcorr(n) τ(n-1) t(n) τ(n) 2 τ(n) Output Interrupt Trigger Times t ’(n) t ’’(n) τ(n) t(n) tout(n+1) Figure 3-4 Timing of the input and output Hall signal transitions. Combining the results, the reference time can be calculated in terms of input hardware interrupts only as: t n 1 tin n tin n 1 tin n 2 (n) 3 (3-15) Since tin (n 1) and tin (n 2) refer to the previous input hardware interrupt times, they can be expressed as: tin (n 1) tin (n) (n 1) tin (n 2) tin (n) (n 2) (n 1) (3-16) (3-17) Combining (3-15)–(3-17) and (3-12), the correction term may be represented as: 1 3 corr (n) (2 (n 1) (n 2)) 2 n (3-18) Thereafter, it becomes possible to determine the required correction term corr (n) for each filters (3-6)–(3-9) by substituting the relevant expression for n . In particular, using the same notations as in [24], after all relevant substitutions and grouping of terms, the final correction terms for each filter can be expressed as: 29 acorr 3 (n) 1 n 2 2 n 3 3 1 n 1 n 3 n 4 n 5 n 6 3 1 lcorr (n) 2 n 1 n 2 2 n 3 2 n 4 3 1 qcorr (n) 4 n 1 n 2 2 n 3 4 n 4 2 n 5 3 acorr 6 (n) (3-19) (3-20) (3-21) (3-22) As can be seen, equations (3-19)–(3-22) are very simple and computationally efficient and represent an improvement over [24]. These final equations were implemented inside the code section of the microcontroller. 3.4 3.4.1 Algorithm Implementation and Prototype Functionality To ensure that the proposed filtering approaches are practical and reliable, it is essential to define a robust method to handle the input interrupts and schedule the output interrupts under different operating conditions including the possibility when the two interrupts are very close to each other or even collide in real time. Hence the realization needs to be smart enough to schedule such output interrupts without missing any input interrupts and still be sufficiently fast to achieve a high resolution filtering. A simplified block diagram of the operations performed during the input ISR is depicted in Fig. 3-5. To start the operation, the appropriate registers of the microcontroller have to be initialized. Thereafter, the microcontroller will initially output the existing Hall-sensor signals and wait for the first input hardware interrupt to occur. This guarantees that the rotor will start to move and that the input hardware interrupts will be detected. This also ensures that the motor can operate with the filter in its disabled state for as long as needed. Upon detection of an input hardware interrupt, the ISR will be invoked and the microcontroller will become ready to perform operations. 30 Begin Save Timer value Restart the Timer Calculate τ (n − 1), τ (n− 2),τ (n − 3 ) , ... No Capture Hall state Filtering Yes conditions are met No Shift input Hall signals to the output of the filter Yes Disable software interrupt Yes First time filtering conditions are met Capture Hall state No Last scheduled software interrupt occurred Compare Timer with the difference between the last calculated correction term and the last τ to trigger the software interrupt Calculate correction term and compare it with Timer to trigger the next software interrupt Calculate the new correction term Shift input Hall signals to the output of the filter Calculate correction term and compare it with Timer to trigger the next software interrupt Enable software interrupt Return Return Figure 3-5 Flow chart of conditions and functions performed during input ISR. First of all, inspecting (3-19)–(3-22) it can be pointed out that due to the inherent memory, the filters cannot be enabled right from the start. Depending on the filter order, a certain number of input hardware interrupts must be detected to record sufficient number of time intervals into the filter’s memory. Hence, the filter may not be activated before this condition is met. Also, possibly during a very fast and/or abnormal acceleration or deceleration of the motor, there may be a need to automatically disable the filter and default to just using the existing unfiltered Hall sensor signals. This option is included to ensure that the filter will not compromise the system’s performance in any adverse condition. As can be seen in Fig. 3-5, upon detection of an input hardware interrupt, the time interval between the last two input hardware interrupts is recorded by reading the timer value. If filtering conditions are not met (i.e. not enough history terms, rapid acceleration/deceleration, deactivation of the filter by a manual switch, etc.) the existing Hall signals will be provided to the output for switching the inverter transistors. In this case, no additional output software interrupts are scheduled. If the filtering conditions are met for the first time, the input Hall signals will be captured and 31 shifted to the output. Following that, the correction term will be calculated and stored for the future use. After that, the output software interrupt will be enabled and ready to be invoked when the time counter becomes equal to the correction term corr (n) . The output software interrupts may have to be switched before or after the next input interrupt depending on many conditions, e.g. relative position errors, whether the motor is decelerating or accelerating, etc. Fig. 3-6 shows the two scenarios, Case A and Case B, depicting the instances when the next scheduled output software interrupt comes before its corresponding input hardware interrupt or after its input hardware interrupt, respectively. In Case A (see Fig. 3-6, top plot), the output software interrupt is invoked earlier making the inverter switching happen before the actual Hall-sensor-signal-transition. This could happen for example when the motor is under deceleration and/or when a given Hall sensor has an error in the direction of rotation. Then, at the time of input ISR the corresponding correction term corr (n) is calculated and used to schedule the next output software interrupt to make the inverter switch. In Case B (see Fig. 3-6, bottom plot), the actual Hall sensor signal comes ahead of what it should be in an ideal case. This may happen when the motor is accelerating and/or when a given Hall sensor has an error in the opposite direction to the motor rotation. If this is the case, then at the time of input ISR, when the timer is reset to zero, the next output software interrupt will be scheduled for the time determined by the difference corr (n 1) (n 1) , as shown in Fig. 3-6 (bottom plot). In addition to this, another output software interrupt for the next switching interval should be scheduled as well. This is simply done by calculating the new correction term corr (n) and putting it as a second request for invoking the output software interrupt. The steps performed during the output ISR are shown in Fig. 3-7. When the output ISR is invoked, the next state of the Hall sensors is predicted according to the existing state and the direction of rotation. After that, the output Hall signals will be changed to switch the inverter into its next topological state. The last step is to compare the previously calculated correction term with the current timer value to update the next scheduled output software interrupt (as may be needed in Case B). After that step, the output ISR is finished and the program continues to run until the next input interrupt is detected. 32 τ (n-) τ (n- τ (n) ) τn- , τ (n-) τ (n- τ (n) ) τn- , τn- τn- Figure 3-6 Sequence of hardware and software interrupts. Begin Predict next Hall state Provide the switching circuitry with the predicted Hall signals Compare Timer with the last calculated correction term to update the software interrupt Return Figure 3-7 Flow chart of the software output ISR. 3.4.2 Prototype In order to demonstrate the simplicity and effectiveness of the filtering approach described above, a basic programmable integrated circuit microcontroller (dsPIC30f2020) was considered here. This and similar microcontrollers are often used in many inexpensive BLDC drive systems. The printed circuit board of the prototype and its simplified schematic are shown in Fig. 3-8 (a) and (b), respectively. To make the prototype dongle of the filter operational for various BLDC motor drives according to Fig. 3-1, it should have several auxiliary components in addition to the 33 microcontroller. The voltage regulator is used to handle the input voltages from 6 up to 48 Vdc. In this arrangement, the dongle can be powered either from the dc bus of the BLDC motor drivers or directly from the dc supply that feeds the Hall sensors of the motor. The input and output ports of the microcontroller are also protected against accidental over-voltage. The microcontroller can be re-programmed with different filters through the data programming port, as well as enabled or disabled using the manual switch. Potentially, the dongle can be made much smaller if some of the auxiliary components are removed and/or optimized. $% ! !$!'' $! ! "#$ %"& Figure 3-8 Prototype dongle-filter for use with existing motor drivers: (a) actual-size photo of the printed circuit board; (b) simplified block-scheme representation depicting major components and ports. The Hall sensors are simply connected with the BLDC driver through the input and output ports provided on the board, thus enabling modification of the Hall sensor signals according to the proposed filtering methodology. The proposed filters (3-6)–(3-9) in conjunction with (3-19)–(3-22) were programmed inside the code-section of the microcontroller according to the implementation approach defined by (3-11) and (3-19)–(3-22) and the functional diagrams depicted in Figs. 3-5 to 3-7. 34 3.5 Case Studies Several commercially available BLDC motors were considered in order to demonstrate operation of the proposed filtering approach. A number of motor drivers were tested including Maxon EC Amplifier DEC 50, Anaheim Automation MDC 150-050, as well as our own prototype driver all giving the same consistent results. Due to limited space, the presented studies include only two motors of the same type, Motor 1 and Motor 2. The parameters of these motors are summarized in Appendix B. The Hall sensor positioning errors were determined using the methodology described in [20] and are also given in Appendix B. As it can be seen in Appendix B, Motor 1 has appreciably larger errors than Motor 2. As was demonstrated in [24], all filters (3-6)–(3-9) achieve the same steady state performance, with the extrapolating filters (3-8)–(3-9) capable of providing somewhat faster response during the transients. Without loss of generality, the 3-step filter was used here. 3.5.1 Steady State Performance In the first study, the motors were coupled to a dynamometer and supplied from a dc source with 36 V. Under a load of approximately 2 Nm the resulting steady state speed was 1800 rpm and 1770 rpm for Motor 1 for Motor 2, respectively. Fig. 3-9 and 3-10 show the measured phase currents of both motors corresponding to this operating condition before and after the filter is activated. As can be seen in Fig. 3-9 and 3-10 (top plots), the stator currents of both motors are somewhat asymmetric. Specifically, Motor 1 has significantly distorted currents, whereas in Motor 2 the problem is less noticeable. This is consistent with the Hall sensor positioning errors present in each motor (see Appendix B). The distorted phase currents contribute to the increased torque ripple also shown in Fig. 3-9 and 10 (see subplots 2 and 3). Here, the second subplot shows the electromagnetic torque that is calculated using actual measured currents. To estimate developed torque from the measured currents using (3-3), the rotor position r was extracted using the measured current waveforms and sensor positioning errors (see Appendix B). For comparison purpose, the electromagnetic torque was also predicted using the detailed simulation of the BLDC motor-drive system defined by (3-1)–(3-3) and coupled with VSI as shown in Fig. 3-1. The models of both motors were implemented using Matlab/Simulink [26] to simulate the same operating conditions. Close match between the estimated/measured and simulated torque confirms the accuracy of detailed models. 35 Filter activated Stator currents, iabcs (A) Measured 20 0 20 0 0.02 Electromagnetic torque, Te(N.m) 3 Calculated 2 1 0 0.02 3 Electromagnetic torque, Te(N.m) 0.04 0.04 Simulated 2 1 0 0.02 0.04 Rotor mechanical speed, ω (r.p.m) Calculated 2000 1000 0 0 0.02 0.04 Time (s) Figure 3-9 Motor 1 measured phase currents, calculated and predicted electromagnetic torque and the estimated speed. The filter is enabled approximately in the middle of the time interval depicted in Fig. 3-9 and 3-10. As it can be clearly observed in Fig. 3-9 and 3-10 (top plots), upon activation of the filter the stator currents become balanced and symmetric, and the corresponding improvement in electromagnetic torque is also observed. This improvement is more noticeable in Motor 1 than Motor 2 as the Hall sensor errors are significantly larger in the first motor. 36 Filter activated Stator currents, iabcs (A) Measured 20 0 20 0 0.02 Electromagnetic torque, Te(N.m) 3 Calculated 2 1 0 0.02 3 Electromagnetic torque, Te(N.m) 0.04 0.04 Simulated 2 1 0 0.02 0.04 Rotor mechanical speed, ω(r.p.m) Calculated 2000 1000 0 0 0.02 0.04 Time (s) Figure 3-10 Motor 2 measured phase currents, calculated and predicted electromagnetic torque and the estimated speed. Many commercially-available BLDC motor-drivers with speed control capabilities also estimate the rotor speed by measuring the time interval between two successive Hall signal transitions and assuming a 60-degree interval. This method of speed estimation is very simple and cost-effective (since no additional speed sensor is necessary), and it has been used in a number of recently proposed BLDC motor controllers [13]–[18]. Inaccurately-positioned Hall sensors would also introduce errors in the speed estimation. To demonstrate this point, Fig. 3-9 and 3-10 (bottom 37 subplot) show the speed calculated based on the Hall-sensor transitions before and after the filter is activated. As can be seen, activation of the filter also dramatically improves the estimated speed. Similarly, the improvement is more pronounce in the case of Motor 1 which has larger Hall-sensor positioning errors. As can be seen in Figs. 3-9 and 3-10, the filter operation balances the steady state phase currents of both motors. However, based on the error angles as defined in Fig. 3-2, the averaging filter also results in a slight shift of the effective advance firing angle according to the following expression b c v v a 3 (3-23) Based on the Hall-sensor positioning errors summarized in Appendix B, the effective v is found to be 17.8 and 23.2 degrees for Motor 1 and Motor 2, respectively. This small difference in advance firing angle also shows as a difference in torque ripple between the two motors. 3.5.2 Transient Performance Another study was performed in which the same motors, while connected to a dynamometer and initially loaded with torque of 0.62 Nm, undergo acceleration transient. The transient is implemented by stepping the dc voltage from 18 to 38 Volts. The measured phase currents and dynamometer (tachometer) speed are shown in Fig. 3-11. As seen in Fig. 3-11, both motors go through acceleration as a result of increased dc voltage. As demonstrated by the measured responses, both motors handle the transients very well without any problems from the addition of the averaging filter. At the same time, the filter performs as expected by completely removing the effects of the misplaced Hall sensors. 38 Stator currents, iabcs (A) 50 Measured currents of Motor 1 0 50 0 0.01 2000 0.02 0.03 0.04 0.05 0.06 0.02 0.03 0.04 0.05 0.06 0.02 0.03 0.04 0.05 0.06 Speed, n (rpm) Measured speed of Motor 1 1500 1000 500 0 Stator currents, iabcs (A) 50 Measured currents of Motor 2 0 50 0 2000 Speed, n (rpm) 0.01 0.01 Measured speed of Motor 2 1500 1000 500 0 0.01 0.02 0.03 0.04 0.05 0.06 Time (s) Figure 3-11 Measured responses of phase currents and speed to step-change in dc voltage. The performance of Motor 2 was not compromised by the filter but slightly improved even though this motor is significantly better than Motor 1. This is an important observation as in the case of good motors the input and output interrupts come very close in time and may potentially collide. However, the proposed realization and functional implementation (see Section 3.4) is very 39 robust and resolves all potential problems related to handling of the interrupts and controlling the VSI. 3.6 Conclusion The Hall-sensor controlled BLDC motors are preferred in many applications due to their relative simplicity, low cost, and reliable operation in wide range of loading conditions speeds. However, the low-cost BLDC motors that are becoming widely available are also prone to inaccurate positioning of Hall sensors due to low-precision manufacturing, which leads to increase of torque pulsation and degradation of drive performance. An approach of filtering of the Hall signals was recently proposed to mitigate the problem. This paper extends the previous work and proposes a very robust and computationally efficient algorithm that is also straightforward to implement on very basic microcontroller-based-hardware. The new implementation is based on input/output interrupts without the need for the reference time such that proper functioning of the filters and handling of the switching transitions is ensured for all cases. Due to its simplicity and effective implementation, the proposed algorithm could be readily applied to a variety of BLDC motors (with small and large Hall-sensor positioning errors) and drivers. For example, it can be added (programmed) into many existing motor controllers, or implemented in a standalone integrated circuit that is placed as a dongle-filter between the Hall sensors and the motor driver. The proposed filtering algorithm has been demonstrated using BLDC motors (with small and large Hall-sensor positioning errors) and is shown to be very efficient and robust in steady state and transients. 40 3.7 References [1] P. C. Krause, O. Wasynczuk, S. D. Sudhoff, Analysis of Electric Machinery and Drive Systems, IEEE Press, Piscataway, NJ, 2002. [2] S. D. Sudhoff, P. C. Krause, “Average-value model of the brushless DC 120º inverter system,” IEEE Trans. Energy Conversion, Vol. 5, No. 3, pp. 553–557, 1990. [3] S. D. Sudhoff, P. C. Krause, “Operation modes of the brushless DC motor with a 120º inverter,” IEEE Trans. Energy Conversion, Vol. 5, No. 3, pp. 558–564, 1990. [4] P. L. Chapman, S. D. Sudhoff, C. A. Whitcomb, “Multiple reference frame analysis of non-sinusoidal brushless DC drives,” IEEE Trans. Energy Conversion, Vol. 14, No. 3, pp. 440–446, 1999. [5] P. Pillay, R. Krishnan, “Modeling, simulation, and analysis of permanent-magnet motor drives. Part II. The brushless DC motor drive,” IEEE Trans. Industry Applications, Vol. 25, Iss. 2, pp. 274–279, Mar.-Apr. 1989. [6] W. Brown, “Brushless DC Motor Control Made Easy”, Microchip Technology Inc., 2002 [Online]. Available: www.microchip.com [7] P. P. Acarnley, J. F. Watson, “Review of Position-Sensorless Operation of Brushless Permanent-Magnet Machines” IEEE Trans. Industrial Electronics Vol. 53, Iss. 2, pp. 352–362, Apr. 2006. [8] H. A. Toliyat, L. Hao, D. S. Shet, T. A. Nondahl, “Position-Sensorless Control of Surface-Mount Permanent-Magnet AC (PMAC) Motors at Low Speeds” IEEE Trans. Industrial Electronics Vol. 49, Iss. 1, pp. 157–164, Feb. 2002. [9] M. J. Yang, H. L. Jhou, B. Y. Ma, K. K. Shyu, “A Cost-Effective Method of Electric Brake With Energy Regeneration for Electric Vehicles,” IEEE Trans. Industrial Electronics, Vol. 56, Iss. 6, Jun. 2009, pp. 2203–2212. [10] Cheng-Hu Chen, Ming-Yang Cheng, “Implementation of a Highly Reliable Hybrid Electric Scooter Drive,” IEEE Trans. Industrial Electronics, Vol. 54, Iss. 5, Oct. 2007, pp. 2462–2473. [11] Anno Yoo, Seung-Ki Sul, Dong Cheol Lee, Cha Seung, “Novel speed and rotor position estimation strategy using a dual observer for low resolution position sensors,” In Proc. IEEE Power Electronics Specialists Conference, 15-19 June 2008, pp. 647–653. [12] F. Rodriguez, A. Emadi, “A Novel Digital Control Technique for Brushless DC Motor Drives” IEEE Trans. Industrial Electronics Vol. 54, Iss. 5, pp. 2365–2373, Oct. 2007. [13] Pan Ching-Tsai, E. Fang, “A Phase-Locked-Loop-Assisted Internal Model Adjustable-Speed Controller for BLDC Motors” IEEE Trans. Industrial Electronics Vol. 55, Iss. 9, pp. 3415–3425, Sep. 2008. [14] S. Rajagopalan, J. M. Aller, J. A. Restrepo, T. G. Habetler, R.G .Harley, “Analytic-Wavelet-Ridge-Based Detection of Dynamic Eccentricity in Brushless Direct Current 41 (BLDC) Motors Functioning Under Dynamic Operating Conditions” IEEE Trans. Industrial Electronics Vol. 54, Iss. 3, pp. 1410–1419, Jun. 2007. [15] Chung-Wen Hung, Cheng-Tsung Lin, Chih-Wen Liu, “Fuzzy PI Controller for BLDC motors Considering Variable Sampling Effect” In Proc. 33rd Annual Conf. of the IEEE Industrial Electronics Society (IECON), Nov. 5-8, 2007, Taipei, Taiwan, pp. 1175–1179. [16] A. Sathyan, N. Milivojevic, Y. J. Lee, M. Krishnamurthy, A. Emadi, “An FPGA Based Novel Digital PWM Control Scheme for BLDC Motor Drives,” Accepted to IEEE Trans. Industrial Electronics, (Paper TIE.2009.2022067). [17] Dan Liu, Changliang Xia, Maohua Zhang, Yingfa Wang, “Control of Brushless DC Motor Using Fuzzy Set Based Immune Feedback PID Controller,” In Proc. IEEE International Symposium on Industrial Electronics (ISIE 2007), 4-7 June 2007, pp. 1045–1049. [18] P. B. Beccue, S. D. Pekarek, B. J. Deken, A. C. Koenig, “Compensation for asymmetries and misalignment in a Hall-effect position observer used in PMSM torque-ripple control,” IEEE Trans. Industry Applications, Vol. 43, No. 2, pp. 560–570, 2007. [19] Giulii Capponi. F, De Donato. G, Del Ferraro. L, Honorati. O, Harke. M. C, Lorenz. R.D, “AC brushless drive with low-resolution Hall-effect sensors for surface-mounted PM machines” IEEE Trans. Industry Applications Vol. 42, Iss. 2, pp. 526–535, Mar.-Apr. 2006. [20] P. Alaeinovin, S. Chiniforoosh, J. Jatskevich, “Evaluating the misalignment of Hall sensors in BLDC motors” In Proc. IEEE Canada Electric Power Conference, 6-7 Oct. 2008. [21] Chung-Wen Hung, Cheng-Tsung Lin, Chih-Wen Liu, Jia-Yush Yen, “A Variable-Sampling Controller for Brushless DC Motor Drives With Low-Resolution Position Sensors” IEEE Trans. Industrial Electronics Vol. 54, Iss. 5, pp. 2846–2852, Oct. 2007. [22] C. Zwyssig, S. D. Round, J. W. Kolar, “Power electronics interface for a 100 W, 500000 rpm gas turbine portable power unit,” In Proc. IEEE Applied Power Electronics Conference, 19–23 Mar. 2006. [23] N. Samoylenko, Q. Han, J. Jatskevich, “Balancing hall-effect signals in low-precision brushless DC motors,” In Proc. IEEE Applied Power Electronics Conference, Feb. 28 – Mar. 2, 2007, Anaheim CA, USA, pp. 606–611. [24] N. Samoylenko, H. Qiang, J. Jatskevich, “Dynamic Performance of Brushless DC Motors with Unbalanced Hall Sensors,” IEEE Transactions on Energy Conversion, Vol. 23, Iss. 3, pp. 752–763, Sep. 2008. [25] J. G. Proakis, D. G. Manolakis, Digital Signal Processing, Prentice Hall, Upper Saddle River, NJ, 1996, p. 248. [26] Simulink: Dynamic System Simulation for MATLAB, Using Simulink Version 6, The MathWorks Inc., 2006. 42 4 IMPROVING OPERATION OF LOW PRECISION BRUSHLESS DC MOTORS USING DIGITAL FILTERING OF HALL-SENSOR SIGNALS1 4.1 Introduction BRUSHLESS dc (BLDC) motors are becoming very popular in various applications including industrial automation and positioning systems, actuators, electric vehicles, medical instruments, robotics, etc. Generally, the approaches to drive BLDC motors can be classified into sensorless and sensor-based controls. Although there have been many advancements in the sensorless schemes, the Hall-sensor-controlled motors are used very widely primarily due to their low cost and reliable operation in wide range of speeds and loading conditions. Theory and modeling of BLDC motors where the Hall sensors are used to detect the rotor position and determine the inverter switching state is well-known and explained in many sources, e.g. [1]–[6]. In particular, the most common operation is achieved using the 120-degree switching logic to control the six-step voltage-source inverter (VSI) [5], [6]. Under these conditions, the motor phases are supposed to conduct for 120 electrical degrees two times per cycle. An example of the BLDC machine rotor and its Hall sensor assembly is shown in Fig. 4-1, which is a very typical design configuration for the low-power motors. As Fig. 4-1 shows, the Hall sensors are mounted on a printed circuit board (PCB) that is attached to the rear end of the motor. To produce the control signals necessary for the standard 120-degree commutation, the Hall sensors react to the magnetic field of the tablet that is fixed on the rear end of the motor shaft. In this configuration, the magnetic tables is assumed to have the same number of poles as the motor rotor and stator, and the tablet’s field is independent from the stator currents which achieves consistent readings of the rotor position at any load. Ideally, the Hall sensors must be placed exactly 120 degrees apart and the magnetic tablet needs to be evenly magnetized. If this is true, then the Hall sensor signals will be apart by exactly 120 electrical degrees. Although this is a common assumption in most literature sources, this condition is difficult to achieve in practice in many mass-produced motors due to manufacturing tolerances. 1 A version of this chapter will be submitted for publication. P. Alaeinovin, S. Chiniforoosh, J. Jatskevich Improving Operation of Low Precision Brushless DC Motors Using Digital Filtering of Hall-Sensor Signals. 43 Figure 4-1 Construction of a typical BLDC motor: a) rotor showing a magnetic tablet on the rear end of the shaft; and b) back side of the motor case showing Hall sensors’ PCB and magnetic tablet. In general, uneven magnetization of the reaction tablet and/or inaccurate positioning of the Hall sensors will result in errors of the Hall-sensor signals, which in turn leads to timing errors in firing the inverter transistors and unbalanced operation among the motor phases. The unbalanced phase currents cause the increase of torque ripple, contribute to audible noise, and degrade the overall drive performance. In control schemes that rely on Hall-sensor-based position and speed estimation [7]–[13], the additional errors in the Hall-sensor signals will degrade the control characteristics and performance. As the number of applications where the low-cost/low-precision BLDC motors are being considered is rapidly increasing, more attention is required to solve the problem of Hall-sensor signal errors. In the literature, the misalignment of Hall sensors was documented in [14], where the authors investigated a vector-tracking observer to locate the position of the rotor. Authors of [15] also proposed a moving average filtering method along with a calibration method for different speed ranges to mitigate the adverse effects of low-resolution position sensors on motor performance. The problem of Hall-sensor signal errors has been also identified in small-scale machines. The authors of [16] demonstrated their carefully-made prototype and related the 44 unsymmetrical phase currents to Hall sensor inaccuracy. In [17], a Hall-effect-sensor-based position observer was derived to mitigate torque ripple due to sensor positioning inaccuracy. The most comprehensive analysis and methodology have been proposed in [18], [19], where several linear averaging filters were presented to improve the static and dynamic performance of the drive system with inaccurately positioned Hall sensors. To the best of our knowledge, all the previously mentioned methodologies have considered the errors that are caused by the Hall-sensor alignment only, and no solutions have been proposed to mitigate the uneven magnetization of the reaction tablet. This paper considers a 3 phase motor-inverter system as shown in Fig. 4-2, which utilizes the standard 120-degree switching logic to control the six-step VSI. As has been proposed in [19] and shown in Fig. 4-2, a filtering block is added to the conventional drive system. In this configuration, the proposed filter accepts the original Hall sensor signals A, B, C and provides the switching logic with the modified set of signals A' , B ' , C ' that is supposed to be cleared from the possible errors. This paper extends the work of [19] by generalizing the approach of filtering Hall-sensor signals and makes the following additional contributions: We provide a detailed analysis of errors in the Hall-sensor signals and include the contribution of unevenly magnetized reaction tablet. We derive a new family of digital filters that are capable of cancelling the errors (harmonics) due to both the Hall-sensor misalignment and the uneven magnetic poles of the reaction tablet. The new methodology is shown to be more general and effective than any of the previously designed filters [19]. It is therefore applicable to a wider range of low-precision motors with different causes of the Hall-sensor errors. The proposed digital filters are verified experimentally with typical industrial BLDC motors with significant inaccuracies in the Hall-sensor signals. It is shown that motors with the proposed digital filtering of Hall-sensor signals approach the performance of ideal motors in steady state as well as practical acceleration/deceleration transients. 45 %& + ! ! " # $ 0 ω 0 0 + 03' - 0! - + ' () * 0 - - + Figure 4-2 BLDC motor-drive system with filtering of Hall sensor signals. 4.2 4.2.1 BLDC Machine with Hall-Sensor Errors Effect of Errors on Hall-Sensor Signals In order to design an effective filtering strategy of mitigating the inaccuracy of the Hall-sensor signals, it is important to consider both sources of error, namely the uneven magnetization of the reaction tablet and the misaligned sensors. To better understand the combined effect of these inaccuracies on Hall-sensor signals, it is instructive to consider a typical Hall-sensor configuration depicted in Fig. 4-3. Without loss of generality, here we show an 8-pole magnetic tablet that would correspond to the 8-pole sample BLDC motors considered in this paper. However, the developed methodology easily extends to the P -pole machines. In particular, Fig. 4-3 (a) depicts an ideal case when the Hall sensors H1 , H 2 , and H 3 are precisely positioned 120 mechanical degrees apart, and the magnetic poles of the reaction tablet divide the circle into eight wedges of equal size. The widths of the magnetic poles of the tablet in mechanical degrees are denoted by 1m , 2m ,, 8m . It is easy to see that for the case of Fig. 4-3(a), we have 1m 2m 8m 360 P (4-1) This would correspond to an ideal case requiring high manufacturing precision and is not achievable for inexpensive motors. A more realistic situation is depicted in Fig. 4-3(b), where the Hall sensors H1 , H 2 , and H 3 are assumed to be misplaced. The errors in alignment of the Hall sensors in mechanical degrees are denoted by am , bm , and cm , respectively. These errors 46 denote the deviation of each Hall sensor from its ideal position in Fig. 4-3(a). For the analysis presented in this paper, the positive value of these errors is defined to be in the clockwise direction, which is the assumed in the opposite direction of rotation. The Hall-sensor errors and the widths of the magnetic poles of the tablet can be calculated in electrical degrees as follows: P im 2 P je jm 2 ie (4-2) (4-3) where P indicates number of poles, i 1,2,,8 , and j denotes the phase and can take place of a , b , or c . Figure 4-3 Typical BLDC motor Hall-sensor configuration: a) ideal positioning of Hall sensors and magnetic poles of evenly magnetized reaction tablet; and b) misaligned Hall sensors and uneven magnetic poles of reaction tablet. 47 Based on (4-1) and (4-2), for the ideal case of Fig. 4-3(a) one should have ie 180 , which results in each Hall sensor producing an ideal square-wave signal with eight equal pulses (of logical values 1 and 0) per mechanical revolution. Moreover, if the Hall sensors are placed exactly 120 mechanical degrees apart (i.e., am 0 , bm 0 , cm 0 ), the resulting square-wave signals from each of the Hall sensor will also be 120 electrical degrees apart. Symbolically, this condition can be expressed as H1 rm H 2 rm 120 H 2 rm 120 (4-4) Exactly such signals are required to implement the standard 120 commutation of the BLDC motors [1]–[6]. However, for the actual case depicted in Fig. 4-3(b), the condition (4-1) does not hold true. As a consequence of that, ie 180 , and the square-wave signal from each Hall sensor will have eight unequal pulses per mechanical revolution. Moreover, the errors in alignment of each Hall sensor (i.e., jm 0 ) also shift the entire sequence of logical signals from that sensor by the angle je 0 , i.e., H1 rm am H 2 rm 120 bm H 3 rm 120 cm (4-5) Therefore, in order to represent both sources of error, it is necessary to consider the actual sequence 1m , 2m ,, 8m together with (4-5), which replaces the standard logical table for 120-degree switching [2], [3], [5]. We have investigated a number of low-precision and low-cost BLDC motors and found that noticeable errors may exist in terms of both the uneven magnetization of the reaction tablet as well as the sensor alignment as has been documented in [19]. In order to demonstrate the phenomena and the methodology presented in this paper, we consider two sample BLDC motors. The measured Hall sensor misalignment angles were evaluated using the methodology similar to that described in [20] which has been extended to also measure the uneven magnetization angles. Generalization methodology is described in Appendix C. This information was obtained by measuring and comparing the zero crossing of the line back electromagnetic force (EMF) with zero crossing of the Hall-sensor signals over one mechanical revolution. The corresponding motor parameters are summarized in Appendix D. 48 4.2.2 Detailed Model of the System The detailed model of the BLDC motor drive system is required in order to investigate the combined impact of the Hall sensor signal errors on the instantaneous developed electromagnetic torque, which is otherwise very difficult to measure in practice. A detailed model of permanent magnet synchronous motor (PMSM) can be analyzed based on the commonly used dynamic state model [1]–[4], which is included here for completeness. In particular, the stator voltage equation has the following form: v abcs rs i abcs where f abcs f as f bs dλ abcs dt (4-6) f cs T , and f may represent the voltage, current or flux linkage vectors. Also, rs represents the stator resistance matrix. Since the typical BLDC motors have non-sinusoidal back EMF, the back EMF is assumed to be half-wave symmetric and contain spatial harmonics. Therefore, the stator flux linkages and electromagnetic torque may be written as [4]: sin 2n 1 r 2 K 2n 1 sin 2n 1 r λ abcs L s i abcs λ'm 3 n 1 sin 2n 1 2 r 3 T cos2n 1 r ias P 2 Te λ'm K 2n 1 ibs cos 2n 1 r 2 3 n 1 ics 2 cos 2n 1 r 3 (4-7) (4-8) where L s is the stator self inductance matrix [1], and 'm is the magnitude of the fundamental component of the permanent magnet (PM) rotor flux linkage. The coefficients K n denote the normalized magnitudes of the n th flux harmonic relative to the fundamental, i.e. K1 1 . According to the standard 120 degree switching logic the inverter switches every time one of the Hall sensors change its state. A detailed model of the system was developed in 49 Matlab-Simulink [21] using the toolbox [22] to implement the switching circuit of the inverter. The standard 120 degree inverter logic was implemented according to the table presented in [3] and [6]. Sensor positioning information and the width of the magnetic poles on the reaction tablet were included in the model as described in Subsection above (4.2.1). To increase the model accuracy, the special harmonics were also included according to (4-7) and (4-8). 4.2.3 Performance of the System and Model Verification Due to limited space, the results are presented here are based on the two sample motors only; Motor 1 and Motor 2. As can be seen from the parameters summarized in Appendix D, the reaction tablet of Motor 1 is magnetized almost evenly, and the errors in im do not exceed 0.4 . At the same time for the Motor 2, the errors in im go as high as 1.6 . Also, the Hall-sensor alignment is not very good in both motors, and the errors in jm may reach several mechanical degrees. To demonstrate the operation of the two motors, the following steady state has been considered here. The BLDC motor is supplied with a DC voltage of 25 Volts and a mechanical load of 0.96 Nm was applied to the shaft. Under the given mechanical load Motor 1 and Motor 2 reached speeds of about 1382 rpm and 1384 rpm, respectively. The waveforms of the phase currents obtained under this operating condition are shown in Fig. 4-4. For comparison, a motor with the same electrical parameters but with no errors in the Hall sensor signals has also been simulated under the same test conditions. Fig. 4-4 (see subplot 1) shows the phase currents for this ideal motor operation. As expected, under the ideal conditions, the current waveforms are symmetric among the motor phases, and each phase conducts for 120 degrees two times during one electrical revolution. Also, since the motor has 8 poles, the pattern of currents repeats four times in each phase over one mechanical revolution. Fig. 4-4, subplots 2 and 3, depict the measured and simulated phase currents obtained for the Motor 1, respectively. As can be seen (see Fig. 4-4, subplots 2 and 3), the simulated currents are very close to the measured results, which also verifies the accuracy of the detailed model in capturing the secondary effects. It can also be observed that conduction pattern of each phase is now different. Further evaluating the results of the Motor 1, it can be noticed that each phase current repeats the same pattern four times over one mechanical revolution. This is due to the fact that Motor 1 has 8 poles and its reaction tablet has very small uneven magnetization. 50 Fig. 4-4, subplots 4 and 5, present the measured and simulated phase currents obtained for the Motor 2, respectively. As is demonstrated here, the uneven magnetization of the reaction tablet combined with inaccuracy of the Hall sensor positioning result in very different conduction patterns for all three phases. Moreover, this pattern repeats only one time over the entire mechanical revolution. Figure 4-4 Steady state measured and simulated phase currents. 51 Comparing the phase currents of Motor 1 and Motor 2 (see Fig. 4-4, subplots 2 through 5), with those of an ideal motor (see Fig. 4-4, subplot 1) it can be seen that inaccurate positioning of the Hall sensors and uneven magnetization of the tablet result in unsymmetrical operation among the motor phases. This phenomenon was verified with a number of experiments and does not depend on the loading condition of the motor. The previously verified detailed models of both motors have been also used to predict the instantaneous electromagnetic torque produce by Motor 1 and Motor 2 for the same operating point. The waveforms of the calculated electromagnetic torque are shown in Fig. 4-5, and the corresponding spectrums of harmonics are shown in Fig. 4-6, respectively. As observed in Fig. 4-5, subplot 1, the ideal motor should produce relatively clean ripple pattern that repeats every 60 electrical degrees. However, the torque produced by Motor 1 (see Fig. 4-5, subplot 2) has larger ripple and repeats the same pattern every 180 electrical degrees. It can also be seen that Motor 2 (see Fig. 4-5, subplot 3) has the largest ripple waveform which has the longest period of one mechanical revolution. Figure 4-5 Electromagnetic torque for ideal motor and the actual Motor 1 and 2. 52 For more detailed analysis, it is also instructive to consider the harmonics present in the developed electromagnetic torque. Fig. 4-6 summarizes the frequency content of the predicted electromagnetic torque for the ideal and the two actual motors. An important observation can be made regarding Motor 1 and Motor 2 is that the uneven magnetization of the tablet and/or misaligned positioning of the Hall sensors (see Fig. 4-6, subplots 2 and 3) produce the low-frequency harmonics that are not present in ideal motor (see Fig. 4-6, subplot 1). In the case of an ideal P -pole motor, the harmonics present in the torque waveform will correspond to integer multiples of 6 P rm ; where rm is the rotor mechanical speed. For 2 2 the motor with ideal tablet but inaccurately positioned Hall sensors (this would be similar to Motor 1), the harmonics in electromagnetic torque will be integer multiples of P rm . In the case of a 2 motor with unevenly magnetized tablet and misplaced Hall sensors (this would be similar to Motor 2), harmonics will be integer multiples of P rm . 8 2 Figure 4-6 Harmonics in electromagnetic torque for ideal motor and the actual Motor 1 and 2. 53 Overall, the combined effect of the uneven magnetization in the reaction tablet and the Hall sensor misalignment contributes to the low-frequency harmonics in electromagnetic torque and increase noise and vibrations. The detailed analysis of vibrations and acoustic characteristics of BLDC machines is very important [23]–[25], and in general requires information about the machine’s design (slots, teeth, etc.). However, this is beyond scope of this paper. Instead, we focus on presenting a methodology based on digital filtering of the original Hall-sensor signals and calculating a set of modified signals that are free from errors. These modified signals are then used instead of the original signals to control the inverter transistors as schematically illustrated in Fig. 4-2. This in turn would improve dynamic and acoustic performance of the machine. 4.3 4.3.1 Filtering Hall-Sensor Signals Analysis of Original Hall-Sensor Signals In order to design proper filters, it is essential to have appropriate understanding of the properties of the original Hall sensor signals and how these signals affect operation of the inverter. To gain such an understanding it is instructive to consider Fig. 4-7 where Hall-sensor signals of an ideal motor (dashed lines) and an actual prototype motor (solid lines) are depicted. Combined signal H123 that is produced by adding all three Hall-sensor signals (phases) is also shown in Fig. 4-7 (see subplot 4). In the standard 120-degree logic, the inverter switches every time the combined signal H123 changes value. The sequence (n) represents the angular intervals Figure 4-7 Hall-sensor signals of an ideal and non-ideal motor. 54 between the two consecutive switching events of the inverter. The duration of the intervals (n) are denoted by (n) . Here we analyze the sequence of time and angular intervals and identify important properties of these sequences. These properties will be utilized in subsequent sections to design proper filters. 4.3.1.1 Time-Domain Sequence Analysis As presented in Fig. 4-7, for ideal motors the sequence of angular intervals is equal to 60 degree. However in the case of actual motor, the sequence (n) is periodic with a period of 24 and is oscillating about 60 degrees. Although (n) is not equal to 60 degrees, the average value of this sequence over one mechanical revolution still equals 60 degrees. As one mechanical revolution is swept by 8 poles of the magnetic tablet, the average angular interval can be calculated as: 1 1 1e 2e 3e 4e 5e 6e 7e 8e 3 8 3 ( n) (4-9) Calculation of the average angular interval seems to require knowledge of 24 consecutive terms as 24 successive terms will obviously cover one mechanical revolution. However, the sequence of angular intervals (n) has one important property that makes it possible to calculate the average term (n) with only 10 successive terms. To show that, Fig. 4-7, depicts how the average angular interval, (n) can be calculated by taking 10 angular intervals n 1, n 2, n 10 into account. Calculation of the average angular interval over only 10 intervals is achievable due to the fact that Hall sensors produce the same shifted output, meaning, while one sensor is responding to a given magnetic pole, the other two sensors are responding to two other magnetic poles. Hence, the combined Hall signal H123 , the series of history terms n 1, n 2, n 9 n 3, n 4, n 8 , n 2, n 3, n 10 , and will provide enough information about all of the magnetic poles 1e , 2e ,, 8e . These series of angular intervals are depicted with dashed arrows in Fig. 4-7. Therefore, the average angular interval can be obtained using only 10 history terms as follows: n 1 n 2 .. n 9 1 1 (n) n 2 n 3 .. n 10 3 8 3 n 3 n 4 .. n 8 (4-10) 55 Simplifying (4-10) the average angular interval (n) may be calculated as ( n) 4.3.1.2 1 n 1 2 n 2 3 n 3 3 n 4 3 n 5 24 3 n 6 3 n 7 3 n 8 2 n 9 n 10 (4-11) Frequency-Domain Sequence Analysis To perform the frequency analysis of the sequence of time and angular intervals, the sequence of time intervals n of Fig. 4-7 is reproduced in Fig. 4-8 as time samples. It should be noted that assuming steady state operation, the two sequences (n) and n would have the same frequency content. As the sample Motor has 8 poles, the sequence n is periodic with a period of 24. The frequency content of the sequence n can be evaluated using the Discrete-Time Fourier Series (DTFS) [26], so the sequence can be written as: n N 1 ck e j 2kn / N (4-12) k 0 where the Fourier coefficients ck , k 0,1,..., N 1 , provide the description of n in the frequency domain and may be calculated as: ck 1 N N 1 (n)e j 2kn / N (4-13) n0 The frequency content of the sequence is depicted in Fig. 4-9. As can be seen the sequence has one zero frequency component and 9 non-zero frequencies two of which (Frequencies 2 4 and 3 3 radians per sample) originate from inaccurate positioning of Hall sensors [19]. The other 7 frequencies (frequencies 2i , i 1,2,..,7 ) are imposed by uneven magnetization of the 8 magnetic tablet. In the case of an ideal motor, only the DC component would be present in the frequency content of n . 56 Figure 4-8 Sequence of time intervals n for a prototype motor. Figure 4-9 Frequency content of the switching time intervals n . 4.3.2 Generalization of the Proposed Averaging Filter As demonstrated in the previous section, the sequence of interval durations n has two distinct set of frequencies each imposed from a source of inaccuracy. As each set has frequencies that are equally spaced in the range 0,2 , basic averaging filters can be used to cancel these extra frequencies. These filters generally have the following format: M n 1 M M n m (4-14) m 1 where M is the order of the filter. In the case of the 8 pole motor with 3 Hall sensors as shown in Fig. 4-3, a basic 3-step averaging stage is required to remove the frequencies imposed by inaccurate positioning of the sensors (frequencies of 2 4 and radians per sample). This 3 3 stage of the filter can be represented as: 57 3 n 1 3 3 n m (4-15) m 1 Further to that, addition of an 8-step averaging stage is necessary to remove the frequencies associated with uneven magnetization of the tablet. This stage of the filter is characterized by: 8 n 1 8 8 n m (4-16) m 1 Fig. 4-10, shows frequency response of the 3-step and the 8- step basic averaging filters. As can be seen these filters cancel the extra frequencies introduced in Fig. 4-9. To ensure cancellation of all of the undesired frequencies, the two stages need to be cascaded. As both of the stages are linear filters they can be used interchangeably. Replacing (4-16) into (4-15) and removing the delay in the second stage, the overall averaging stage may be represented as: 3 / 8 n 1 3 2 8 n k k 0 1 24 2 8 n k m (4-17) k 0 m 1 Simplifying (4-17) the final equation of the averaging filter may be represented as 3 / 8 n 1 n 1 2 n 2 3 n 3 3 n 4 3 n 5 24 3 n 6 3 n 7 3 n 8 2 n 9 n 10 (4-18) It can be seen in Fig. 4-10, that the proposed averaging filter cancels the undesirable frequencies of the input sequence. Considering the fact that 24 history terms are required to cover one mechanical revolution, cancelation of the extra frequencies with filters that take only 10 history terms into account may seem unusual. However, as can be seen the final equation of the averaging filter (4-18) is very similar to (4-11). The average time interval calculated by (4-18) corresponds to the average angular interval calculated by (4-11). As described in previous section, the angular interval calculated by (4-11) equals 60 degrees. Consistency of (4-18) with (4-11), supports the frequency analysis provided and correctness of (4-18). 58 Figure 4-10 Frequency response of the basic 3- and 8-step averaging, and the overall averaging filter. The frequency analysis provided here can be easily generalized to a P pole machine. In the case of a P pole machine, a two stage filter is required to cancel the extra frequencies. The first stage needs to be a P -step basic averaging filter to suppress frequencies imposed by uneven magnetization of the tablet. The second stage however should be a basic three step averaging filter to remove the frequencies associated with inaccurate positioning of the sensors. 4.3.3 Proposed Extrapolating Filter When the drive system goes through speed transients, such that n may no longer be periodic, consideration of an extrapolation (prediction) of the time samples may be beneficial to better cope with the acceleration or deceleration of the motor. Different extrapolation schemes may be considered. Here we consider linear extrapolation based on two step history as it is easy to implement in the hardware and gives outstanding results. The extrapolation filter may be presented as ex n 2 n 1 n 2 (4-19) where n is the sequence of input time samples and ex n is the output of the extrapolating filter. In order to guarantee cancellation of the undesired frequencies, the extrapolation stage needs to be cascaded with the previously introduced averaging stage. In this configuration output of the averaging stage will be fed to the extrapolation stage. Hence, replacing (4-18) into (4-19) and removing the delay in the extrapolating stage, the overall filter may be expressed as: 59 3 / 8 _ ex n 1 2 n 1 3 n 2 4 n 3 3 n 4 3 n 5 24 3 n 6 3 n 7 3 n 8 n 9 n 11 (4-20) Fig. 4-11 compares the frequency response of the proposed 3/8-step-averaging filter and the 3/8-step-averaging-plus-extrapolating filter. As may be seen, both filters cancel the undesired frequencies while keeping the DC component unscathed. Hence, the proposed filters will achieve the required balancing of the Hall sensor signals during steady state. It is also noticeable that addition of the extrapolating stage results in an improvement of the filter frequency response by improving the phase delay and hence improving transient response of the filter. Figure 4-11 Frequency response of the averaging plus extrapolating filter compared with averaging filter. 4.4 4.4.1 Filter Implementation and Response Filter Implementation The filtering block shown in Fig. 4-2 works as a multi-input multi-output (MIMO) filter by accepting the original Hall-sensor signals (input Hall signals A, B, C ) and providing the inverter with a set of modified signals (output Hall signals A' , B ' , C ' ). However, the actual filtering algorithm is implemented as a single-input single-output (SISO) system [19]. In this formulation, the input is determined by the time instances produced by the original input Hall signals, and the output is defined by the calculated times when the output (modified) Hall signals are switched to their new state. The new state of the output Hall signals depends only on the present state and the 60 direction of rotation. The relationship between the input Hall signals that arrive at times tin (n) and the output (modified) switching times t out (n 1) that are used to change the inverter state is represented as a SISO filter that is depicted in Fig. 4-12. As Fig. 4-12 shows, the time duration between the input Hall signals n is calculated and is fed to the proposed averaging filter. τn n τn t n+ Figure 4-12 Proposed filter structure showing the averaging/extrapolating stage and the reference time stage. The filtering algorithm is designed to produce an output averaged time interval n that is free from all undesirable harmonics. This output n is then added to the so-called reference time t n to calculate the time when the modified output Hall signals have to switch to the next state. Symbolically, this can be expressed as: t out (n 1) t n n (4-21) where n is calculated according to either (4-18) or (4-20) depending on the filtering approach. The reference time t n is calculated based on the preceding input Hall signal transition times using the same filter order as used for calculating n . To better understand calculation of reference time, Fig. 4-13 shows the sequence of input Hall signals (top subplot) and the output sequence of the modified switching times (bottom subplot). Extending the approach set forth in [19], where the reference time was established based on the 3-step averaging, the new reference time may be calculated based on the new multi-stage filter design as: t n 1 t9 n 2t8 n 3t 7 n 3t 6 n 3t5 n 24 3t 4 n 3t3 n 3t 2 n 2t1 n t 0 n (4-22) where t i is the time extrapolated from the i th preceding input Hall signal transition time. This 61 time is extrapolated as: ti n tin n i i n (4-23) Here, tin n i corresponds to the i th input Hall signal transition before the most recent input Hall signal transition, i.e. tin (n) . As can be seen, initially the times t 0 n , t1 n ,...., t9 n are extrapolated from the preceding input Hall signal switching times according to (4-23). After that, these terms are averaged according to (4-22) to calculate the reference time t n . Substituting (4-23) into (4-12), the reference time can be expressed in terms of the input Hall signal switching times only as t n 1 tin n 9 2t in n 8 3tin n 7 3t in n 6 3t in n 5 4.5 n 24 3t in n 4 3tin n 3 3t in n 2 2t in n 1 t in n (4-24) An important property of calculating the reference time according to (4-24) is that this branch of the filter cancels the same input frequencies as the 3/8-step-averaging filter depicted in Fig. 4-12. If it did not, then these extra frequencies would propagate to the output of the overall filter shown Figure 4-13 Calculation of the reference time. in Fig. 4-12. To show that this property holds, it is sufficient to calculate the difference between the 62 two consecutive reference times as: n 10 2 n 9 3 n 8 3 n 7 1 t n t n 1 3 n 6 3 n 5 3 n 4 4.5 n n 1 (4-25) 24 3 n 3 2 n 2 n 1 Evaluating (4-25), it is noted that the first part of this equation corresponds to the filter defined earlier by (4-18). The 3/8-step-averaging filter (4-18) removes all the undesirable frequencies by its design as shown in Fig. 4-10. Moreover, the remaining term 4.5 n n 1 contains only the n which is also filtered. Therefore, calculating the reference time according to (4-24) represents a significant advancement over the approach documented in [19] as it will not allow any undesirable frequencies to pass through the filter into the output switching signals. However, direct implementation of (4-21) requires continuous re-calculation of both the reference time t n and the averaged interval n , which requires more computational resources and is not practical for realization in hardware using microcontrollers with finite counters. Instead, to make the implementation more efficient and feasible for realistic microcontrollers, it is necessary to relate the time t out (n 1) (i.e., when the modified output Hall signals will be switched) to the time when the original Hall signals have changed their state. Denoting the most-recent transition of the input Hall signals by tin (n) , the next time when the output Hall signals will have to be switched can be expressed as: tout (n 1) tin (n) corr (n) (4-26) where corr (n) is the appropriate correction term. The fundamental advantage of (4-26) is that it can be easily realized in hardware, unlike (4-21). Therefore, to implement (4-26) it is necessary to establish the correction term corr (n) . Rearranging (4-26) we can express the correction term as corr (n) tout (n 1) tin (n) t n n tin (n) Substituting (4-24) into (4-27), we get: t in n 9 2t in n 8 3t in n 7 1 3t in n 6 3tin n 5 3t in n 4 corr n 5.5 n t in n 24 3t in n 3 3tin n 2 2t in n 1 t in n (4-27) (4-28) 63 Further analyzing Fig. 4-13, the terms tin n i can be related to the last switching of the input Hall signals tin (n) as tin n i tin n i n k , k 1 for i 1,2,,9 (4-29) Further substituting (4-29) into (4-28), the correction term can be calculated in terms of time intervals n and n as 23 n 1 21 n 2 18 n 3 1 corr n 15 n 4 12 n 5 9 n 6 5.5 n 24 6 n 7 3 n 8 n 9 (4-30) The result of (4-30) is then used with appropriate filter for n to calculate the final update correction term that will be used in the actual implementation of the overall averaging filter. In particular, the correction term for the 3/8-step-averaging and the 3/8-step-averaging-plus-extrapolating filters are readily calculated by substituting (4-18) and (4-20) for n into (4-30). After algebraic manipulations and collecting terms, the results are as follows: corr 3 / 8 n corr 1 17.5 n 1 10 n 2 1.5 n 3 1.5 n 4 4.5 n 5 (4-31) 24 7.5 n 6 10.5 n 7 13.5 n 8 10 n 9 5.5 n 10 3 / 8 _ ex n 1 12 n 1 4.5 n 2 4 n 3 1.5 n 4 4.5 n 5 (4-32) 24 7.5 n 6 10.5 n 7 13.5 n 8 4.5 n 9 5.5 n 11 As may be seen from (4-31) and (4-32), the relevant correction terms can be calculated with minimal computational effort using only the time intervals. This makes it possible to realize the proposed filters on a practical microcontroller with finite counters and computational resources. 4.4.2 Time-Domain Response of the Overall Filter For the purpose of evaluating the response of the overall filter, it is instructive to directly relate the sequence between the intervals n that are produced by the input Hall-sensor signals and the sequence between the output signal intervals denoted here by out n . In order to express out n one can use (4-26) to calculate t out n and t out n 1 , and then subtract the result. 64 Following this approach we obtain out n n 1 corr n corr n 1 Substituting corr (n) and corr (n 1) for the 3/8-step-averaging (4-33) and the 3/8-step-averaging-plus-extrapolating filters into (4-33), the final relation between the input and output sequences of the time intervals can be obtained as: out _ 3 / 8 n out _ 3 / 8 _ ex n 1 13 n 1 15 n 2 17 n 3 6 n 4 6 n 5 6 n 6 (4-34) 48 6 n 7 6 n 8 7 n 9 9 n 10 11 n 11 1 24 n 1 15 n 2 17 n 3 5 n 4 6 n 5 6 n 6 (4-35) 48 6 n 7 6 n 8 18 n 9 9 n 10 11 n 11 11 n 12 To demonstrate the response of the proposed filters during acceleration/deceleration transients, an ideal BLDC motor is considered in the following study. First, the motor is assumed to be running at a constant speed of 130.9 rad/s which corresponds to the switching time intervals of about 2 ms. Then, at t 0.04s , the speed starts to increase until the speed reaches 188.6 rad/s at t 0.059s . This acceleration profile is depicted in Fig. 4-14 (see subplot 1). The actual input Hall signal times iin n and the calculated output switching times iout n resulted from the considered acceleration transient are shown in subplot 2 of Fig. 4-14. As this figure shown, the switching rate is rapidly increasing. To better demonstrate the effect of the filters with respect to the unfiltered response of the Hall-sensor signals, Fig. 4-14 (see subplot 3) also depicts the unfiltered time intervals n and the filtered out n . As can be seen here, both proposed filters introduce a noticeable delay in response to the initial acceleration which is followed by an overshoot after the speed has reached its new steady state of 188.6 rad/s at t 0.059s . Moreover, this delay and overshoot are more pronounced for the 3/8-step-averaging filter. The 3/8-step-averaging-plus-extrapolating filter also has a delay and an overshoot, but the overall response of this filter represents and appreciable improvement over the filter without the extrapolating stage. 65 Rotor mechanical speed (Rad/S) 200 180 160 140 120 Actual switching times of the output Hall signals (S) 0.04 0.05 0.06 0.07 0.08 Averagimg plus extrapolating filter Averagimg filter No filter 0.08 0.06 0.04 Switching time intervals of the originaland modified Hall signals (mS) 0.04 0.05 0.06 0.07 0.08 Averagimg plus extrapolating filter Averagimg filter No filter 2 1.8 1.6 1.4 1.2 0.04 0.06 0.07 0.08 Averagimg plus extrapolating filter Averagimg filter 1.6 Normalized delay between the input and the output switching events 0.05 1.4 1.2 1 0.8 0.04 0.05 0.06 0.07 0.08 Time (s) Figure 4-14 Transient response of the overall proposed filters. To compare the response of the two considered filters, it is also instructive to consider a delay between the input and the output time instances normalized over the duration of the time interval 66 n , which is defined as follows t n tin n 1 n out n (4-36) The normalized delay calculated over the duration of this acceleration transient is also shown in Fig. 4-14 (see subplot 4). As this figure shows, both filters will result in some delay in response. However, as expected from the design of proposed filters, the extrapolating filter demonstrates a faster response and a better transient response than simply the averaging filter of the same order. 4.5 4.5.1 Hardware Realization and Case Study Hardware Prototype The overall simplicity and low computational complexity of the proposed filtering schemes makes it possible to realize them on many available low-cost microcontrollers, which can then be packaged as a standalone dongle. Alternately, whenever possible the proposed filtering algorithm can also be directly embedded into the code of existing motor drive systems. However, to demonstrate the proposed methodology, in this paper the programmable integrated circuit microcontroller dsPIC30f2020 [27] was considered for a standalone implementation. This and similar microcontrollers are used in many low-cost BLDC drive systems [28]. Fig. 4-15 shows the designed printed circuit board (PCB) of the constructed dongle prototype. This dongle-circuit is inserted between the original Hall sensor signals and the inverter inputs, similar to the block diagram shown in Fig. 2. In this configuration, the dongle accepts the original Hall-sensor signals at the input port and provides the inverter with the modified signals at the output port. A manual switch is also considered on the PCB to enable and disable the filter. Figure 4-15 Printed circuit board of the constructed dongle prototype. 67 The filter is realized according to an interrupt-based approach where a change in the state of input Hall signals triggers an interrupt. To start the operations, the microcontroller needs to be initialized first. Due to the inherent memory of the proposed filters, the filter cannot be activated before sufficient number of history terms have been taken into the filter’s memory. Hence, initially the original Hall signals will be provided at the output port. This guarantees that the rotor will start to move and subsequent interrupts can be detected. The time intervals between input Hall signal transitions are measured simply by restarting the internal counter every time an interrupt is detected at the input port. Once enough history terms have been collected, the correction term is calculated using the equations corresponding to the filter under consideration. After that, the output Hall signals are calculated according to the filter algorithm as described in Section 4.4. Also during very rapid transients there may be a need to deactivate the filter and default to original Hall-sensor signals. Appendix E describes how automatic deactivation of thee filtering module can be implemented. 4.5.2 Steady State Performance In order to demonstrate the effectiveness of the new filters the same Motor 1 and Motor 2 are considered here. In the following study both motors are coupled to a dynamometer and fed with 36 volts DC. The applied mechanical torque was about 0.93 Nm, which resulted in speeds of 2090 rpm. The measured stator currents for Motor 1 and Motor 2 are shown in Fig. 4-16 and 4-17, respectively, where several filters previously described in [19] have been considered. In particular, for the purpose of comparison, we implemented the basic 3-step-averaging, the 3-step-plus-linear-extrapolation, and the 3-step-plus-quadratic-extrapolation filters, respectively [19]. 68 Stator currents, iabcs (A) Measured currents of Motor 1, 25 3-step averaging filter 0 Filter disabled 0 0.05 Measured currents of Motor 1, 3-step plus linear extrapolating filter -25 Stator currents, iabcs (A) 25 Filter enabled 0.1 0 Filter disabled Filter enabled 0.05 0.1 0 Measured currents of Motor 1, 25 3-step plus quadratic extrapolating filter Stator currents, iabcs (A) -25 0 -25 Filter disabled Filter enabled 0.05 Time (s) 0 0.1 Figure 4-16 Measured currents for Motor 1 operating with different filters [19]. Initially, the filter is disabled by the manual switch. This operation corresponds to the operation of original Motor 1 and Motor 2 as described in Section 4.2. Then, at about t 0.05s , the filter is activated and the motors continue to operate with the filtered Hall-sensor signals. As can be seen in Fig. 4-16 (subplots 1, 2 and 3), the operation of the Motor 1 improves which is consistent with the theory set forth in [19]. However, the same does not happen for the Motor 2, which in addition to Hall-sensor misalignment also has significant uneven magnetization of its reaction tablet (see Appendix D). Fig. 4-17 shows the measured phase currents for this motor under similar operating conditions with the same three filters, namely the basic 3-step-averaging, the 3-step-plus-linear-extrapolation, and the 3-step-plus-quadratic-extrapolation filters, respectively. As Fig. 4-17 shows, the performance of the motor can even become worse especially for the extrapolating filters (see Fig. 4-17, subplot 2 and 3). This can be associated with the new harmonics that were introduced by the uneven magnetization of the tablet. Since the phenomenon of uneven magnetization has not been considered in the previously designed filters [19], these filters cannot be effective for the Motor 2. 69 Stator currents, iabcs (A) Measured currents of Motor 2, 25 3-step averaging filter 0 Stator currents, iabcs (A) Filter disabled -25 0.05 0 Measured currents of Motor 2, 3-step plus linear extrapolating filter 25 Filter enabled 0.1 0 -25 Stator currents, iabcs (A) 25 Filter disabled Filter enabled 0.05 0 Measured currents of Motor 2, 3-step plus quadratic extrapolating filter 0.1 0 -25 0 Filter disabled 0.05 Time (s) Filter enabled 0.1 Figure 4-17 Measured currents for Motor 2 operating with different filters [19]. In order to verify effectiveness of the generalized filtering approach proposed in this manuscript, both Motor 1 and Motor 2 were tested under many different operating conditions. Without loss of generality, the study presented in Fig. 4-18 corresponds to the motor operation under 1.03 Nm mechanical load at the speed of about 2000 rpm. As can be seen in Fig. 4-18, activation of the new filter improves motor performance and results in balanced phase currents. For this study we tested both the 3/8-step averaging and the 3/8-step-averaging-plus-extrapolation filters as defined by (4-31) and (4-32), respectively. Both generalized filters yield the same improvement in steady state for Motor 1 and more importantly for Motor 2 (with unevenly magnetized tablet). 70 Stator currents, iabcs (A) 20 0 -20 20 Stator currents, iabcs (A) Measured currents of Motor 1 Filter disabled 0.05 0 Measured currents of Motor2 Filter enabled 0.1 0 -20 Filter disabled Filter enabled 0.1 0.05 Time (s) 0 Figure 4-18 Measured phase currents of Motor 1 and Motor 2 with the new 3/8-step-averaging filter. 4.5.3 Performance during Transient Without loss of generality, in this section only the Motor 2 is considered since this motor possesses both uneven magnetization of the reaction tablet and the Hall-sensor misalignment, and is therefore more challenging to correct. To demonstrate and compare the performance of the new filters during the transient, the following studies have been considered in this subsection: In the first study, the motor is coupled to the dynamometer and supplied initially with 18 Volts DC. At the given initial condition, the resulting mechanical load was approximately 0.21 Nm at speed of about 1118 rpm. To implement acceleration transient, the DC bus voltage was stepped to 32 Volts. The corresponding measured transient responses of the phase currents are depicted in Figs. 4-19 and 4-20 for the Motor 2 with the 3/8-step-averaging and the 3/8-step-averaging-plus-extrapolating filter, respectively. The initial acceleration rate for this study is on the order of 2000rad / s 2 . As can be seen in Figs. 4-19 and 4-20, both filters handle the transient very reliably and produce almost identical response of the overall system. 71 Stator currents, iabcs (A) 40 Measured currents of Motor 2 0 -40 Measured speed r.p.m 0.05 0 Measured speed of Motor 2 2100 1000 0.1 ) 2 d/S ra 0( 0 20 0.05 Time (s) 0 0.1 Figure 4-19 Response of the Motor 2 with the new 3/8-step-averaging filter to a step in applied voltage. Stator currents, iabcs (A) 40 Measured currents of Motor 2 0 -40 Measured Speed r.p.m 0.05 0 2100 Measured speed of Motor 2 1000 2 /S 0.1 ) rad ( 00 20 0.05 0.1 Time (s) Figure 4-20 Response of the Motor 2 with the new 3/8-step-averaging-plus-extrapolating filter to a step in 0 applied voltage. To subject the motor to a higher acceleration, the motor shaft was decoupled from the dynamometer, similar to the study presented in [19]. Under these conditions, total mechanical loss torque was about 0.1 Nm. Initially, the motor is supplied with a DC voltage of 23 volts. Then, the DC voltage is stepped to 28 volts. The corresponding transient responses are depicted in Fig. 4-21. As shown in Fig. 4-21, the motor rides through this acceleration transient and approaches a new steady state operating condition. The initial acceleration rate for this study is on the order of 3300rad / s 2 . However, when only the 3/8-step averaging filter is used (see Fig. 4-21, top plot), the phase currents increase and go into a different conduction-commutation mode for a brief period of time. It is interesting to note that this change of conduction-commutation mode does not happen 72 when the motor uses the 3/8-step-averaging-plus-extrapolating filter (see Fig. 4-21, bottom plot). Stator currents, iabcs (A) 20 Averaging filter 0 -20 Stator currents, iabcs (A) 0.015 0 Averaging plus extrapolating filter 20 0.03 0 -20 0.015 0.03 Time(s) Figure 4-21 Phase currents response of the decoupled Motor 2 with 3/8-step-averaging and 0 3/8-step-averaging-plus-extrapolating filters to a step in applied voltage. Averaging filter Speed (r.p.m) 1900 2 d/S Averaging plus extrapolating filter ) ra 0( 0 33 1400 0 0.015 0.03 Torque (N.m) 2 1 0 -1 0 0.015 0.03 Time(s) Figure 4-22 Speed and torque response of the decoupled Motor 2 with 3/8-step-averaging and 3/8-step-averaging-plus-extrapolating filters to a step in applied voltage. Since it was not possible to measure the mechanical torque and speed for this experiment, the detailed model of the drive system was used to predict the electromagnetic torque and mechanical speed. Fig. 4-22 compares the predicted electromagnetic torque and speed of the motor. It can be observed in Fig. 4-22 that delayed response of the 3/8-step-averaging filter results in a drop in the 73 electromagnetic torque and speed. However, the same drop in torque is not present when the 3/8-step-averaging-plus-extrapolating filter is used (see Fig. 4-22, bottom plot). Therefore, without the drop in torque, the motor also handles the increase in speed very efficiently (see Fig. 4-22, top plot). This study demonstrates how the advantage of the 3/8-step-averaging-plus-extrapolating filter in terms of its faster response translates into the overall improvement of the motor during reasonably high acceleration transient. 4.6 Conclusion This paper extended the work of [19] by investigating another important source of errors in the Hall-sensor signals of typical BLDC motor-drive systems. It was shown here that in addition to inaccurate positioning of the Hall sensors, the uneven magnetization of the reaction tablet can also significantly contribute to the errors in the Hall-sensor signals. A detailed model of the BLDC motor with combined sources of inaccuracies has been presented and used to investigate the operation of the low-precision motors. It was shown that since the filters introduced in [19] did not consider the uneven magnetization phenomenon, such filters can be effective only when the reaction tablet is even and close to ideal. The new filters are proposed based on the advanced 3/8-averaging stage that is designed to cancel all undesirable harmonics in the Hall-sensor signals due to any potential source of error. A straightforward interrupt-based implementation of the proposed advanced filters is described together with the hardware prototype dongle-circuit. It is also demonstrated that the new 3/8-step-averaging-plus-extrapolating filter is capable of improving the motor operation in steady state and even during relatively high accelerations transients without degrading the drive performance. 74 4.7 References [1] P. C. Krause, O. Wasynczuk, S. D. Sudhoff, Analysis of Electric Machinery and Drive Systems, IEEE Press, Piscataway, NJ, 2002. [2] S. D. Sudhoff, P. C. Krause, “Average-value model of the brushless DC 120º inverter system,” IEEE Trans. Energy Conversion, Vol. 5, No. 3, pp. 553–557, 1990. [3] S. D. Sudhoff, P. C. Krause, “Operation modes of the brushless DC motor with a 120º inverter,” IEEE Trans. Energy Conversion, Vol. 5, No. 3, pp. 558–564, 1990. [4] P. L. Chapman, S. D. Sudhoff, C. A. Whitcomb, “Multiple reference frame analysis of non-sinusoidal brushless DC drives,” IEEE Trans. Energy Conversion, Vol. 14, No. 3, pp. 440–446, 1999. [5] P. Pillay, R. Krishnan, “Modeling, simulation, and analysis of permanent-magnet motor drives. Part II. The brushless DC motor drive,” IEEE Trans. Industry Applications, Vol. 25, Iss. 2, pp. 274–279, Mar.-Apr. 1989. [6] W. Brown, “Brushless DC Motor Control Made Easy”, Microchip Technology Inc., 2002 [Online]. Available: www.microchip.com [7] F. Rodriguez, A. Emadi, “A Novel Digital Control Technique for Brushless DC Motor Drives” IEEE Trans. Industrial Electronics Vol. 54, Iss. 5, pp. 2365–2373, Oct. 2007. [8] Pan Ching-Tsai, E. Fang, “A Phase-Locked-Loop-Assisted Internal Model Adjustable-Speed Controller for BLDC Motors” IEEE Trans. Industrial Electronics Vol. 55, Iss. 9, pp. 3415–3425, Sep. 2008. [9] S. Rajagopalan, J. M. Aller, J. A. Restrepo, T. G. Habetler, R.G .Harley, “Analytic-Wavelet-Ridge-Based Detection of Dynamic Eccentricity in Brushless Direct Current (BLDC) Motors Functioning Under Dynamic Operating Conditions” IEEE Trans. Industrial Electronics Vol. 54, Iss. 3, pp. 1410–1419, Jun. 2007. [10] Chung-Wen Hung, Cheng-Tsung Lin, Chih-Wen Liu, “Fuzzy PI Controller for BLDC motors Considering Variable Sampling Effect” In Proc. 33rd Annual Conf. of the IEEE Industrial Electronics Society (IECON), Nov. 5-8, 2007, Taipei, Taiwan, pp. 1175–1179. [11] A. Sathyan, N. Milivojevic, Y. J. Lee, M. Krishnamurthy, A. Emadi, “An FPGA Based Novel Digital PWM Control Scheme for BLDC Motor Drives,” Accepted to IEEE Trans. Industrial Electronics, (Paper TIE.2009.2022067). [12] Dan Liu, Changliang Xia, Maohua Zhang, Yingfa Wang, “Control of Brushless DC Motor Using Fuzzy Set Based Immune Feedback PID Controller,” In Proc. IEEE International Symposium on Industrial Electronics (ISIE 2007), 4-7 June 2007, pp. 1045–1049. [13] P. B. Beccue, S. D. Pekarek, B. J. Deken, A. C. Koenig, “Compensation for asymmetries and misalignment in a Hall-effect position observer used in PMSM torque-ripple control,” IEEE Trans. Industry Applications, Vol. 43, No. 2, pp. 560–570, 2007. 75 [14] Giulii Capponi. F, De Donato. G, Del Ferraro. L, Honorati. O, Harke. M. C, Lorenz. R.D, “AC brushless drive with low-resolution Hall-effect sensors for surface-mounted PM machines” IEEE Trans. Industry Applications Vol. 42, Iss. 2, pp. 526–535, Mar.-Apr. 2006. [15] Chung-Wen Hung, Cheng-Tsung Lin, Chih-Wen Liu, Jia-Yush Yen, “A Variable-Sampling Controller for Brushless DC Motor Drives With Low-Resolution Position Sensors” IEEE Trans. Industrial Electronics Vol. 54, Iss. 5, pp. 2846–2852, Oct. 2007. [16] C. Zwyssig, S. D. Round, J. W. Kolar, “Power electronics interface for a 100 W, 500000 rpm gas turbine portable power unit,” In Proc. IEEE Applied Power Electronics Conference, 19–23 Mar. 2006. [17] P. B. Beccue, S. D. Pekarek, B. J. Deken, A. C. Koenig, “Compensation for asymmetries and misalignment in a Hall-effect position observer used in PMSM torque-ripple control,” IEEE Trans. Industry Applications, Vol. 43, No. 2, pp. 560–570, 2007. [18] N. Samoylenko, Q. Han, J. Jatskevich, “Balancing hall-effect signals in low-precision brushless DC motors,” In Proc. IEEE Applied Power Electronics Conference, Feb. 28 – Mar. 2, 2007, Anaheim CA, USA, pp. 606–611. [19] N. Samoylenko, Q. Han, J. Jatskevich, “Improving dynamic performance of low-precision brushless DC motors with unbalanced Hall sensors,” In Proc. IEEE Power Engineering Society General Meeting, Panel Session – Intelligent Motor Control I, June 24–28, 2007, Tampa FL, USA. [20] P. Alaeinovin, S. Chiniforoosh, J. Jatskevich, “Evaluating misalignment of hall sensors in brushless DC motors” In Proc. IEEE Electric Power Energy Conference, 6–7 Oct 2008, Vancouver, Canada. [21] Simulink: Dynamic System Simulation for MATLAB, Using Simulink Version 6, The Math Works Inc., 2006. [22] Automated State Model Generator (ASMG) Reference Manual, Version 2, P C Krause & Associates, Inc. 2003. Available: www.pcka.com [23] M. Brackley, C. Pollock, “Analysis and reduction of acoustic noise from a brushless DC drive,” IEEE Transactions on Industry Applications, Vol. 36, No. 3, pp. 772–777, 2000. [24] A. Hartman, W. Lorimer, “Undriven Vibrations in Brushless DC Motors,” IEEE Transactions on Magnetics, Vol. 37, No. 2, pp. 789–792, 2001 [25] T. Yoon, “Magnetically induced vibration in a permanent-magnet brushless DC motor with symmetric pole-slot configuration,” IEEE Transactions on Magnetics, Vol. 41, No. 6, pp. 2173–2179, 2005. [26] J. G. Proakis, D. G. Manolakis, Digital Signal Processing, Prentice Hall, Upper Saddle River, NJ, 1996, p. 248. [27] dsPIC30f1010/202x Data Sheet, 28/40/44-Pin High-Performance Switch Mode Power Supply Digital Signal Controllers. Microchip Technology Inc., 2006 [Online]. Available: www.microchip.com [28] Reston Condit “Sensorless BLDC with Back-EMF Filtering,” Microchip Technology Inc. Available: http://ww1.microchip.com/downloads/en/AppNotes/01083a.pdf 76 5 CONCLUSIONS AND FUTURE WORK The Hall-sensor-based brushless dc motor-drives are getting wide acceptance in different applications ranging from high-end positioning systems, industrial automation, machining tools, and household appliances. As a result of high demand, many low-cost and low-precision BLDC motors are becoming available in today’s market and are very attractive replacements for the more accurate motors that require higher manufacturing precision to produce and therefore more expensive. However, the low precision of manufacturing typically results in low accuracy of the overall Hall-sensor assembly and introduces errors in the signals that control the motor inverter, thus degrading the drive performance. Addressing this problem can have significant impact on the requirement for the manufacturing tolerances and types of BLDC motors that can be considered acceptable in many applications. 5.1 Conclusion This thesis investigated the sources of errors in the Hall-sensor signals and the influence of such errors on performance of the drive system. It is shown that the two major sources of inaccuracy of the Hall-sensor signals are the misalignment of the sensors and the uneven magnetization of the reaction tablet. Although the first source of errors, namely the misalignment of the Hall sensors has been addressed in the previous work [1] of another member of our group, the current research presented in this thesis demonstrates that considering the uneven magnetization of the reaction tablet is vital for achieving the desired improvement in the drive performance. This research work includes a comprehensive computer model of the BLDC motor drive with the two considered sources of inaccuracy in the Hall signals. This model is used to predict the impact of the combined errors in the Hall signals onto the resulting electromagnetic torque. It is shown that the uneven magnetization contributes to additional harmonics in the torque ripple that are lower than the harmonics due to the Hall sensor misalignment and therefore are particularly undesirable. Removal of these harmonics of particularly low frequency is also more challenging as more information (larger number of time intervals) is required. An important contribution of this thesis is the generalized methodology of filtering the Hall-sensor signals. It is also shown that although the sequence of the time intervals generally repeats every one mechanical revolution, it is still possible design a filter that requires roughly 1/3 78 of the mechanical revolution to achieve the needed cancelation of harmonics. In particular, an advanced 3/8-step-averaging digital filter is proposed. The filter is designed with two stages. The 3-step stage cancels the harmonics due to misalignment of the Hall sensors, and the 8-step stage removes the remaining harmonics that are due to uneven magnetization of the reaction tablet. An extrapolating filtering stage is also proposed to reduce the effect of delay and thus improve the transient performance of the overall BLDC motor drive. An efficient realization of the proposed filter makes it possible to be potentially programmed inside existing motor controllers or implemented in a stand-alone low-cost microcontroller. A hardware prototype of the microcontroller-based dongle filter has been designed and built to conduct the experiments and verify the proposed generalized methodology. We demonstrate that a typical industrial BLDC motor with the proposed filter can achieve a performance that approaches that of an ideal motor with perfectly accurate Hall sensor signals. Moreover, this improvement is achieved for steady state as well as reasonable (practical) electromechanical transients (accelerations/decelerations). To improve the robustness of proposed approach, a mechanism for automatic activation and deactivation of the whole filter is also proposed. This feature is necessary to ensure that in case of abnormally fast transients the motor can fall back on using the original (unaltered) Hall-sensor signals to ride through such transients without loosing the synchronism. 5.2 Future Work The ideas presented in this thesis can be extend for other applications. In particular, a similar digital filtering approach can potentially be applied mitigation of the errors in traditional position encoders. Generally, the high resolution position-encoders are expensive and also prone to errors. Thus reducing such errors and improving the accuracy may allow substituting a high-resolution encoder with the lower resolution one that achieves the same accuracy. This direction of research would be useful for the high-precision encoder-based BLDC drive systems. In some applications the Hall-sensor-controlled BLDC motors operate in harsh conditions (in-wheel motors in automotive/transportation applications, home appliances, etc.) that may damage the sensors. It is possible to extend the proposed digital filtering approach presented here to provide the drive system with a set of modified Hall signals even when one or two of the Hall sensors fail to operate. This is another area of work that can be particularly attractive for applications where the high reliability is required. This work will be undertaken by another member or our group. 79 5.3 References [1] N. Samoylenko, Q. Han, J. Jatskevich, “Improving dynamic performance of low-precision brushless DC motors with unbalanced Hall sensors,” In Proc. IEEE Power Engineering Society General Meeting, Panel Session – Intelligent Motor Control I, June 24–28, 2007, Tampa FL, USA. 80 APPENDIX A Parameters of the motors of the same type used for the studies of Chapter 2 are as follows: Arrow Precision Motor Co., LTD., Model 86EMB3S98F, 36 VDC, 210 W, 2000 rpm, 8 poles, rs 0.18 Ω, Ls 0.4 mH, m 21 7 mV·s; inertia J 2 10 4 N·m·s2; back emf harmonic coefficients K 1 1 , K 3 0 , K5 0.042 , and K 7 0.018 81 APPENDIX B Parameters of the 2 Motors of the same type used for the studies of Chapter 3 are as follows: Arrow Precision Motor Co., LTD., Model 86EMB3S98F, 36 VDC, 210 W, 2000 rpm, 8 poles, combined inertia J 12 10 4 N·m·s2 .Hall-sensor errors and other parameters for the two motors are provided in Table B-1. Table B-1 Measured Hall sensor misplacements for the sample motors Motor 1 Motor 2 a -0.48 -9 b -18 -5 c -19 -6.5 v 30 30 rs 0.12 Ω 0.12 Ω Ls 0.375 mH 0.375 mH m 21.5mV.s 22 mV·S K1 1 1 K3 0 0.02 K5 -0.059 -0.059 K7 0.025 0.025 82 APPENDIX C This Appendix generalizes the idea presented in Chapter 2 and represents a convenient approach for measuring the relative sensor positioning errors and the widths of the magnetic poles on the reaction tablet. These quantities are essential for modeling purposes. To have a better understanding it is helpful to consider Fig. C-1, where a cross sectional view of a 2-pole BLDC motor with inaccurately positioned Hall sensors and unevenly magnetized tablet is compared to an ideal motor. In this diagram a , b , c represent positioning errors corresponding to H1, H2, H3 respectively. The advance firing angle is assumed to be 30 degrees and is denoted by v . v1 represents the angular displacement between rotor axis and the axis of the magnetic tablet. Figure C-1 Sensor configuration of the ideal motor and a prototype motor. 83 The widths of the magnetic poles on the tablet are also indicated by 1 , 2 . It is obvious that if the tablet and the Hall sensors are rotated altogether, the output of the Hall sensors would remain the same as a function of rotor position. Hence, without loss of generality, any BLDC motor can be modeled with the assumption that the axis of the magnetic tablet and rotor coincide, as long as sensor positions are shifted to compensate for the initial deflection between the two axes. Fig. C-2 demonstrates this situation. The diagram on the left shows configuration of an arbitrary motor and the drawing on the right, presents the equivalent motor that can be used for modeling purposes. As the relative angular distance between sensor axis and the axis of the magnetic tablet remain unchanged, output of the sensors as a function of rotor position will not change. This guarantees that motor performance would be correctly modeled. This is the model that is used in this thesis. Authenticity of the model was verified in Chapter 4. Figure C-2 Arrangement of Hall sensors and reaction tablet; (a) prototype motor; (b) equivalent model. Each Hall sensor outputs a logical signal of zero or one depending on whether the sensor is facing the North or the South pole of the reaction tablet. Assuming that the motor has the configuration shown in Fig. C-2b, Hall sensor signals can be plotted as a function of rotor position. Fig. C-3 presents the Hall sensor signal (H1) and the corresponding line to line back emf voltage ( E AB ), as a function of rotor position. It should be noted that the back emf voltage is merely a function of rotor position and does not depend on the configuration of the Hall sensors or the magnetic tablet. Therefore zero crossing of the line back emf can be used as a reference for determination of the rotor position. A detailed analysis of zero crossings of the back emf was presented in Chapter 2. There, it has been shown that E AB crosses zero at r 4 3 , 3 . 84 θr = π 2 EAB - ϕν - ϕ=- θr = π 2 - ϕν - ϕ=- + α 2 H1 θr(rad) + += π 2 0 π 2 = π 3π 2 Figure C-3 Hall sensor output (H1), and corresponding back emf voltage ( E AB ) as a function of rotor position. Investigating Fig. C-2b, it can be observed that zero crossings of H1 would occur at r 2 v v1 a , r 2 v v1 a 2 . These values are distinguished in Fig. C-3, where v1 a is replaced with a' . Assuming a v of 30 degrees, and indicating the angular distance between zero crossings of the Hall-sensor signal (H1), and the corresponding back-emf signal ( E AB ), with C1a and C2a , the following equations hold true. a C1a (C-1) a 2 180 C2a (C-2) 1 2 360 (C-3) a C1a (C-4) 1 C1a C2a 180 (C-5) 2 C2a C1a 180 (C-6) These equations can be simplified as: For an 8 pole motor the equations above can be easily generalized to: a C1a (C-7) 1 C1a C8a 180 (C-8) 2 C2a C1a 180 (C-9) 85 3 C3a C2a 180 (C-10) 4 C4a C3a 180 (C-11) 5 C5a C4a 180 (C-12) 6 C6a C5a 180 (C-13) 7 C7a C6a 180 (C-14) 8 C8a C7a 180 (C-15) Where Cia is the i th angular distance between zero crossings of the Hall sensor signal (H1) and the line back-emf ( E AB ). Replacing v1 b , v1 c with b' , c' , similar equations can be written for the Hall sensor signals produced by H2 and H3, as: b C1b (C-16) 1 C1b C8b 180 (C-17) 2 C2b C1b 180 (C-18) 3 C3b C2b 180 (C-19) 4 C4b C3b 180 (C-20) 5 C5b C4b 180 (C-21) 6 C6b C5b 180 (C-22) 7 C7b C6b 180 (C-23) 8 C8b C7b 180 (C-24) c C1c (C-25) 1 C1c C8c 180 (C-26) 2 C2c C1c 180 (C-27) 3 C3c C2c 180 (C-28) 4 C4c C3c 180 (C-29) 5 C5c C4c 180 (C-30) 6 C6c C5c 180 (C-31) 7 C7c C6c 180 (C-32) 8 C8c C7c 180 (C-33) 86 It is important to note that as the sensors produce the same shifted output signals, the values calculated for 1, 2 ,..., 8 according to all of the three equation sets ((C-8)−(C-15), (C-17)−(C-25), (C-27)−(C-33)) would yield the same result, as long as Cia , Cib , Cic correspond to the instance when H1, H2, and H3 transition between the i th and the i 1th pole of the reaction tablet, respectively. To guarantee the match and to properly model the phenomena, the three sets of angular distances Cia , Cib , Cic were measured. The maximum values of the sets were assigned to C1a , C1b , C1c Subsequent values of C1a , C1b , C1c were assigned to C2a , C3a ,..., C8a , C2b , C3b ,..., C8b , C2c , C3c ,..., C8c , correspondingly. Equation sets ((C-7)−(C-15)), ((C-16)−(C-25)), ((C-26)−(C-33)) have then been used to calculate positioning errors, a' , b' , c' , and the width of the magnetic poles on the tablet, 1 , 2 ,..., 8 . Matched assignment of C1a , C1b , C1c ensures accurate calculation of 1, 2 ,..., 8 however this may shift the three positioning errors a' , b' , c' by the same value depending on weather C1a , C1b , C1c actually correspond to the maximum value of the sets Cia , Cib , Cic This was compensated for by shifting a' , b' , c' , altogether. This method was applied to the two sample motors of Chapter 4, and its accuracy was verified. 87 APPENDIX D Parameters of the two Motors of the same type used for the studies of Chapter 4 are as follows: Arrow Precision Motor Co., LTD., Model 86EMB3S98F, 36 VDC, 210 W, 2000 rpm, 8 poles, combined inertia J 12 10 4 N·m·s2 . Hall-sensor errors and other parameters for the two motors are provided in Table D-1 Table D-1 Measured Hall sensor configurations for the sample motors Motor 1 Motor 2 am 0.622 0.5 bm 5 2.975 cm 5.25 4.25 1m 45 -0.2 0 2m 45 -0.4 1.6 3m 45 0.4 0.4 4m 45 0.1 0.7 5m 45 0.4 0 6m 45 -0.4 -0.9 7 m 45 0.3 -1.6 8m 45 -0.2 0 v 30 30 rs 0.12 Ω 0.12 Ω Ls 0.375 mH 0.375 mH m 21.5mV.s 21 mV·S K1 1 1 K3 0 0.02 K5 0.039 -0.032 K7 -0.015 -0.011 88 APPENDIX E This Appendix completes the work presented in previous chapters by describing several details pertaining to implementation and reliability concerns of the filters. These details have not been covered in any of the manuscripts but may be included in the patent application. As described in the introduction of this thesis, one of the advantages of the Hall-sensor-based BLDC drive systems is its reliability. Hence, to gain wide acceptance by the industry, the filtering approach should not compromise the drive-system reliability. However, due to the inherent memory of the filters, the proposed filtering scheme can potentially degrade performance of the drive system during very quick transients. Although filters showed great level of robustness in the experiments we conducted, a mechanism should still be established to automatically identify transients that are too fast for the filters. This mechanism should be simple enough so it can be realized on simple architectures. Based on the implementation algorithm described in Chapter 3, the realization of filters requires calculation of an offset term between the input Hall signals switching time, and the scheduled output Hall signals switching instance. This so-called correction term, corr , has been introduced in Chapter 3. Fig. E-1 shows the timing relationship among the sequences of the input Hall signal transitions n , the output Hall signal transitions out n , and the correction term sequence corr (n) . It should be noted that the input Hall signal time intervals n can change abruptly during unexpected operating conditions, while the sequence of the correction terms will move more sluggishly due to the memory of the filter (see (4-31), (4-32)). This can potentially lead to large time delays between the input and output Hall signal switching events, and degrade performance of the drive system. To avoid such situations, a comparison between the sequence of correction terms corr (n) , and the input Hall signal transition time intervals n , should be performed. Then, to maintain the robustness, the filter should be automatically deactivated when corr (n) is much larger or much smaller than n . 89 Figure E-1 Timing of the input and output Hall signal switching events. It should be noted that in the case of an ideal motor operating in steady state, the sequence corr (n) would be equal to n . However for non-ideal (actual) motors the sequence would be oscillating around unity. The range is which the ratio corr n n corr n remains depends on the n sensor positioning errors and the mismatch between the widths of the magnetic poles of the reaction tablet. For the batch of investigated BLDC motors, the ratio and 1.4. (i.e. corr n was measured between 0.6 n corr n 1 0.4 ). To provide an acceptable level of robustness, the filter mode is n set to be deactivated when corr n 1 0.7 . Also, to avoid constant switching between activated n and deactivated modes, the filter is reactivated only when corr n 1 0.5 for at least one n mechanical revolution. The algorithm described above was added to the model of the drive system and investigated using the detailed model of the considered BLDC motor drive. The studies under different operating conditions for different motors proved the effectiveness of the abovementioned method for detection of transients that are too fast. The filter used for this investigation was the 90 3/8-step-averaging-plus-extrapolating filter introduced in Chapter 4 (see equation (4-32)). The BLDC motor with parameters listed in Appendix D is assumed, but the moment of inertia has been reduced to 5.10 4 N.m.s 2 in order to emulate a faster acceleration transient. To demonstrate how the automatic activation and deactivation of the filter affects the performance of the drive system, the following two studies are considered here. In the first study, the motor is fed with a DC voltage of 25 volts. The applied mechanical torque is assumed to be 0.2 Nm. This loading condition results in a mechanical speed of about 1642 rpm. To force the drive into a rapid transient, DC voltage is stepped to 45 Volts which causes the motor to ride through a very quick acceleration transient. The rate of the acceleration was estimated by the model to be about 9000rad / s 2 . This acceleration rate is three times faster than the quickest transient studies presented in Chapter 4. To make a comparison, automatic filter deactivation was not implemented in the first study. Fig. E-2 represents results of the first study. As presented by Fig. E-2, subplot 1, as a result of the voltage step, phase currents increase very quickly and operation mode of the motor changes for a short period. Fig. E-2, subplot 2 represents produced electromagnetic torque. It can be observed in this subplot that the torque signal dips quickly and goes into an oscillatory mode. It is also important to note that the applied torque is opposing motor speed (negative values of torque signal) for a short period of time (zero torque is distinguished with a solid line in subplot 2). This can potentially compromise reliability of the drive. The oscillatory mode is also present in rotor speed and as depicted in Fig. E-2, subplot 3. Overall when filter deactivation is not implemented, performance of the drive is not acceptable with extremely quick transients. Although such quick transients are very rare during normal operation of the drive system, ideal filtering module should be able to reliably handle all normal and abnormal working conditions. Comparing corr n 1 n with the predefined filter deactivation threshold (see subplot 4), it can be observed that the described filter deactivation algorithm would have been able to detect this quick transient if it were implemented. 91 Simulated phase currents (A) 50 0 Torque (N.m) -50 0 6 0.05 0.1 0.15 0.2 0.05 0.1 0.15 0.2 0.05 0.1 0.15 0.2 3 0 -3 0 900 0 (r ad/ S 2) Speed (r.p.m) 3500 1500 0 1 1 Filter deactivation threshold Filter reactivation threshold τ(n) τcorr(n) 0.7 0.5 0.05 0.1 0.15 0.2 Filter deactivation signal 0 0 0 0.05 0.1 0.15 0.2 Time(s) Figure E-2 Drive-system response to a fast transient while filter deactivation is not implemented. In the second study the same voltage step is applied to the machine operating under similar operating conditions. However in this study automatic filter deactivation is implemented in the drive model. Fig, E-3 presents results of the second study. As can be seen in Fig. E-3 subplots 1, 2, response of the drive immediately after voltage step is the same as the response presented in Fig. E-2. Phase currents start to increase and electromagnetic torque dips very rapidly. However at 92 about t 0.036s the sequence corr n 1 goes beyond the predefined filter deactivation n threshold (0.7) and filtering module is deactivated consequently. This instance is identified in Fig. E-3 subplot 5. " " " $ % " τn τ n # ! " " &" " Figure E-3 Drive-system response to a fast transient while filter deactivation is implemented. As a result of filter deactivation, torque signal starts to recover and drive system handles the 93 transient very well. During the period when filtering module is deactivated, performance of the motor is similar to what it would have been if original Hall sensors were used to switch inverter transistors. Therefore reliability of the drive is ensured during this time. As can be observed in Fig. E-3, subplot 5, corr n 1 goes below the pre-set filter reactivation thresholds (0.5) at about n t 0.062s . However filtering module is not reactivated before corr n 1 stays below 0.5 for n at least one mechanical revolution. This criterion is satisfied at about t 0.082s and the filtering module is reactivated. As can be seen the transition between the inactive and the active modes happens very smoothly. 94 D C B 2 1 Header 2 JP3 1 5 4 3 2 1 Header 5 JP2 6.25 4.7 VCC R18 Cap 20pF Cap 20pF C2 C1 VCC 10K MCLR Y1 XTAL Cap 100nF C7 140 D4 Fuse 1 D Zener R7 F4 140 D5 D Zener Fuse 1 4.7 R10 R8 F5 140 D6 D Zener Fuse 1 R11 4.7 JP4 Header 3 6.25 R12 3 2 1 1 A R9 F6 Hall_in_3 Filter on Hall_out_3 Hall_out_2 Hall_out_1 2 2 140 R21 Cap 10uF C4 R19 10K 2 1 SW-SPDT SW2 VCC 3 3 Fuse 1 F7 DSPIC30F2020_XXX R20 4.7 D7 60 v C5 Cap 100uF 1 5 3 3 LM2576HVT-5.0 Date: File: A4 Size VCC GND Fuse 1 D3 D Zener Number D8 48 v C3 Cap 100nF C6 Cap 470uF PGD PGC VCC R3 Fuse 1 D2 D Zener F3 R2 R1 F2 Fuse 1 D1 D Zener F1 Inductor 100uH L1 140 140 140 4 Revision LED_2 DS2 LED_1 DS1 15-43-6110 RJ-11 MCLR 1 2 3 4 5 6 4.7 4.7 4.7 4 17/02/2009 Sheet of C:\Documents and Settings\..\Rotation_3.SCHDOC Drawn By: PGC PGD Hall_in_1 Hall_in_2 LED_1 LED_2 4 2 Title 28 27 26 25 24 23 22 21 20 19 18 17 16 15 VCC Hall_in_3 R6 R15 10K VCC Hall_in_2 R5 R16 10K VCC Hall_in_1 R4 R17 10K VCC IN FB ON/OFF OUT GND U2 1 MCLR AVDD AN0/CMP1A/CN2/RB0 2 AVSS 3 AN1/CMP1B/CN3/RB1 PWM1L/RE0 4 AN2/CMP1C/CMP2A/CN4/RB2 PWM1H/RE1 5 AN3/CMP1D/CMP2B/CN5/RB3 PWM2L/RE2 6 AN4/CMP2C/CN6/RB4 PWM2H/RE3 7 AN5/CMP2D/CN7/RB5 RE4 8 Vss RE5 9 OSC1/CLK1/RB6 VDD 10 OSC2/CLKO/RB7 VSS 11 PGD1/EMUD1/T2CK/U1ATX/CN1/RE7 PGC/EMUC/SDI1/SDA/U1RX/RF7 12 PGC1/EMUC1/EXTREF/T1CK/U1ARX/CN0/RE6 PGD/EMUD/SDO1/SCL/U1TX/RF8 13 VDD SFLT2/INT0/OCFLTA/RA9 14 PGD2/EMUD2/SCK1/SFLT3/INT2/RF6 PGC2/EMUC2/OC1/SFLT1/INT1/RD0 U1 Hall_out_1 Hall_out_2 Hall_out_3 2 6.25 Filter on 1 R14 R13 140VCC 140VCC Header 5 1 2 3 4 5 JP1 D C B A APPENDIX F Schematics of the designed printed circuit board. 95 APPENDIX G Layout of the designed printed circuit board. 96
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Analysis and improvement of low precision Hall-sensor-controlled...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Analysis and improvement of low precision Hall-sensor-controlled brushless dc motors Alaeinovin, Pooya 2010
pdf
Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
Page Metadata
Item Metadata
Title | Analysis and improvement of low precision Hall-sensor-controlled brushless dc motors |
Creator |
Alaeinovin, Pooya |
Publisher | University of British Columbia |
Date Issued | 2010 |
Description | Hall-sensor-based Brushless dc (BLDC) motors are becoming very popular in wide range of applications, mainly due to their low cost, high efficiency, and reliable operation as compared to the conventional brushed motors. These machines have been extensively researched in the literature mainly under two common assumptions: each Hall-sensor produce square-wave signal of exactly 180 electrical degrees; and that the signals from the three Hall-sensors are exactly 120 electrical degrees apart. These assumptions are not necessarily the case, particularly for low to medium cost motors. A recently published manuscript investigated operation of motors with unbalanced Hall-sensor signals and introduced inaccurate positioning of the sensors as the cause of the unbalance. There, solutions have been proposed to mitigate the adverse effects of sensor positioning errors on performance of the motor. This thesis builds upon this recent publication by identifying another source of error in the Hall-sensor signals. Here, it is shown that inaccurate positioning of the Hall sensors and uneven magnetization of the tablet with which the Hall sensors react are the major factors contributing to the distortion of Hall sensor signals. It is shown here that errors in the Hall sensor signals result in unsymmetrical operation of the inverter which in turn leads to low-frequency harmonics in the electromagnetic torque; increases torque ripple and acoustic noise; and degrade overall dynamic performance of the drive. A control-level approach is proposed to mitigate the adverse effects of the errors in the Hall-sensor signals. In this approach a multi-stage digital filtering block is added to remove the errors in the original Hall-sensor signals. Each stage of the filter is designed to cancel the undesirable harmonics due to one of the error sources, the unevenly magnetized reaction tablet and the misaligned Hall sensors. An efficient realization of the proposed filter is presented that makes it possible to be potentially programmed inside existing motor controllers or implemented in a stand-alone microcontroller which can be packaged into a dongle circuit. The operation of typical low-precision industrial BLDC motors with the proposed filtering approach is shown to approach the performance of the motors with ideal Hall sensors. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Date Available | 2011-03-31 |
Provider | Vancouver : University of British Columbia Library |
Rights | Attribution-NonCommercial-NoDerivatives 4.0 International |
DOI | 10.14288/1.0068948 |
URI | http://hdl.handle.net/2429/24224 |
Degree |
Master of Applied Science - MASc |
Program |
Electrical and Computer Engineering |
Affiliation |
Applied Science, Faculty of Electrical and Computer Engineering, Department of |
Degree Grantor | University of British Columbia |
GraduationDate | 2010-05 |
Campus |
UBCV |
Scholarly Level | Graduate |
Rights URI | http://creativecommons.org/licenses/by-nc-nd/4.0/ |
AggregatedSourceRepository | DSpace |
Download
- Media
- 24-ubc_2010_spring_alaeinovin_pooya.pdf [ 2.33MB ]
- Metadata
- JSON: 24-1.0068948.json
- JSON-LD: 24-1.0068948-ld.json
- RDF/XML (Pretty): 24-1.0068948-rdf.xml
- RDF/JSON: 24-1.0068948-rdf.json
- Turtle: 24-1.0068948-turtle.txt
- N-Triples: 24-1.0068948-rdf-ntriples.txt
- Original Record: 24-1.0068948-source.json
- Full Text
- 24-1.0068948-fulltext.txt
- Citation
- 24-1.0068948.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
data-media="{[{embed.selectedMedia}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.24.1-0068948/manifest