Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Analysis and improvement of low precision Hall-sensor-controlled brushless dc motors Alaeinovin, Pooya 2010

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

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

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  ii 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.  iii 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   iv 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   v Appendix D ...................................................................................................88  Appendix E ...................................................................................................89  Appendix F ...................................................................................................95  Appendix G...................................................................................................96    vi 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    vii 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   viii 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 ( ABE ) 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   ix Figure E-3 Drive-system response to a fast transient while filter deactivation is implemented... 93    x 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.   xi 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.   1 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,  2 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.  3 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  4 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.  5  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  6 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.   7 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.  8 [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.   9 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.  10                              ω           
    Figure 2-1 Schematic diagram of a BLDC motor-drive system.      
         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:  mxx P 2  . (2-1)   11 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:  dt d abcs abcssabcs λirv   (2-2)  where  Tcsbsasabcs ffff , and f  may represent the voltage, current or flux linkage vectors. The diagonal matrix of stator resistance is denoted by sr . 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:  12                                        1 12 3 2 3 2 12sin 12sin 12sin ' n r r r nmabcs n n n Kλ      iLλ sabcs  (2-3)                                                  1 12 3 2 3 2 12cos 12cos 12cos ' 2 n r r rT cs bs as nme n n n i i i KλPT       (2-4) where the inductance matrix is              mlsmm mmlsm mmmls s LLLL LLLL LLLL 5.05.0 5.05.0 5.05.0 L  (2-5)  In (2-3) and (2-4), m  is the magnitude of the fundamental component of the permanent magnet rotor flux linkage. The coefficients nK denote the normalized magnitudes of the thn  flux harmonic relative to the fundamental component. Also in (2-5), lsL  is the stator leakage inductance and mL  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 6 v . 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  13 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.          	    θ ω H1' H2' H3' H1 H2 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 AvrAv   9090 H2 on BvrBv   21030 H3 on CvrCv   330150  Table 2-2 Switching intervals of a 120-degree inverter Switching interval Rotor position Transistors on 1 BvrCv   3030  5,1 2 AvrBv   9030  1,6 3 CvrAv   15090  6,2 4 BvrCv   210150  2,4 5 AvrBv   270210 4,3 6 CvrAv   330270 3,5  2.3 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  14 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)                                         1 3 212cos 3 212cos 12cos 12)12(' n rn rn rn nKnmλrabcs    e  (2-6)               1 12 312sin.312sin.12'.2 n rnmrab nnKnλe   (2-7)              1 12 3 212sin.12sin.12'.2 n rnmrbc nnKnλe   (2-8)               1 12 312sin.312sin.12'.2 n rnmrca nnKnλe   (2-9)  It can be seen in (2-7) - (2-9) that abe , bce  and cae  cross zero at 3 2,3  r ,  ,0r  and 32,3  r  respectively, as the first sine term becomes zero. Recall that for normal operating conditions 6  v . Therefore, according to Table 2-1, for an ideal motor the signals H1, H2 and H3 also cross zero at 3 2,3  r ,  ,0r  and 32,3  r , 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 abe  and H1 respectively. The misplacement angle for H1 is calculated as  15  23  A  (2-10)   θ  π π 2 3π 2 φ  φ         0π 2    
    θ1  θ2  θ3 φ   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.      16 Table 2-3 Misalignment values for three different motors Motor no. A  B  C 1 -1.2 0.8 -4 2 11.2 -7.6 4.8 3 3.2 -16 -16   0.115 0.12 0.125 0.13 0.135 0.14 10 0 10 0.115 0.12 0.125 0.13 0.135 0.14 10 0 10 0.115 0.12 0.125 0.13 0.135 0.14 10 0 10 0.115 0.12 0.125 0.13 0.135 0.14 10 0 10 Time (s) Measured currents of motor no.1 Measured currents of motor no.2 Measured currents of motor no.3 Simulated currents of the ideal motor St ato r c ur re nt s, i ab cs (A ) St ato r c ur re nt s, i ab cs (A ) St ato r c ur re nt s, i ab cs (A ) St ato r c ur re nt s, i ab cs (A )  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  17 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 developed by each motor. 0.115 0.12 0.125 0.13 0.135 0.14 10 0 10 0.115 0.12 0.125 0.13 0.135 0.14 10 0 10 0.115 0.12 0.125 0.13 0.135 0.14 10 0 10 Motor no. 1 Motor no. 2 Motor no. 3 St ato r c ur ren ts,  i a bc s(A ) St ato r c ur ren ts,  i a bc s(A ) St ato r c ur ren ts,  i a bc s(A ) 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  18 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 degrade drive performance  0.18 0.184 0.188 0.192 0.196 0.2 0 0.2 0.4 0.6 0.18 0.184 0.188 0.192 0.196 0.2 0 0.2 0.4 0.6 0.18 0.184 0.188 0.192 0.196 0.2 0 0.2 0.4 0.6 0.18 0.184 0.188 0.192 0.196 0.2 0 0.2 0.4 0.6 Motor no. 1 Motor no. 2 Motor no. 3 Ideal motor El ec tro m ag ne tic  T or qu e (N .m ) El ec tro m ag ne tic  T or qu e (N .m ) El ec tro m ag ne tic  T or qu e (N .m ) El ec tro m ag ne tic  T or qu e (N .m ) Time Figure 2-7 Electromagnetic torque for three non-ideal and ideal BLDC motors.   19 0 2 4 6 8 10 0 0.02 0.04 0.06 0 2 4 6 8 10 0 0.02 0.04 0.06 0 2 4 6 8 10 0 0.02 0.04 0.06 0 2 4 6 8 10 0 0.02 0.04 0.06 Motor no. 1 Motor no. 2 Motor no. 3 Ideal motor El ec tro m ag ne tic  T or qu e (N .m ) El ec tro m ag ne tic  T or qu e (N .m ) El ec tro m ag ne tic  T or qu e (N .m ) El ec tro m ag ne tic  T or qu e (N .m ) 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.  20 2.6 References [1] 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  21 3 EFFICIENT IMPLEMENTATION OF HALL SENSOR SIGNALS 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:  22 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.      23 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  3,2,1H  and  3,2,1H , 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 .    
      	     		     	                            		   ω       ! ! "	
#	 $ %&   ' () *  Figure 3-1 BLDC motor-drive system with filtering of Hall-sensor signals.   24          	    θ ω H1' H2' H3' H1 H2 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  dt d abcs abcssabcs λirv   (3-1)  where  Tcsbsasabcs ffff , and f  may represent the vector of phase voltages, currents or flux linkages. Also, sr  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]:                                        1 12 3 2 3 2 12sin 12sin 12sin ' n r r r nmabcssabcs n n n KλL      iλ  (3-2)                                                  1 12 3 2 3 2 12cos 12cos 12cos ' 2 n r r rT cs bs as nme n n n i i i KλPT       (3-3)   25 where sL  is the stator-phase self-inductance, and m'  is the magnitude of the fundamental component of the PM magnet flux linkage. The coefficients nK  denote the normalized magnitudes of the thn  flux harmonic relative to the fundamental, i.e. 11 K . 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. θr, rad. τ(n+1) Time, s.τ(n)τ(n-1) τ(n+2)τ(n-2)τ(n-3)τ(n-4)τ(n-5) θ(n-5) θ(n-4) θ(n-3) θ(n-2) θ(n-1) θ(n) θ(n+1) θ(n+2)  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:  26       1 0 /2 N k Nknj k ecn   (3-4)  where the Fourier coefficients  kc , 1,...,1,0  Nk , 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 3 2  and 3 4  radians per sample [24]. 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 3 2  and 3 4  harmonics from the sequence  n . This can be achieved with selection of linear filters that generally have the following form:        M m m mnbn 1   (3-5)  where M  is the order of the filter corresponding to the number of time intervals taken into account, and mb  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 3a , 6a , l  and q , respectively. The final filter equations are presented here for completeness.          321 3 1 3  nnnna   (3-6)                654321 6 1 6  nnnnnnna   (3-7)            43212 3 1  nnnnnl   (3-8)            542313 3 1  nnnnnq   (3-9)     27 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:      )1(_  ntnntt outswnext   (3-10)  where  n  denotes the averaged time interval as calculated using any of the filters (3-6)–(3-9), and  nt  is the so-called reference switching time as defined in [24]. Also, here )1( ntout  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  nt  and the averaged interval  n . This approach requires more  28 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 )1( ntout  (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 )(ntin , the time of the next output ISR can be expressed as:  )()()1( nntnt corrinout   (3-11)  where )(ncorr  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 )(ncorr  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 )(ncorr  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, )(ntin . The scheduled output software interrupts for the modified switching signals are depicted on the bottom time axis, )(ntout . Assuming a certain reference time  nt  and a given  n , the correction term may also be calculated using (3-10)–(3-11) as:      )()()1()( ntnntntntn ininoutcorr    (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.          ntntntnt  3 1  (3-13)  Here )(nt  is time of the last switching of the input Hall signal, and  nt  and  nt   are the times extrapolated from the two preceding input Hall signal transition times, as follows:             nntnt nntnt in in   22 1    (3-14)  As can be seen in Fig. 3-4, the most recent input hardware interrupt has occurred at )(ntin . The  29 last two input hardware interrupts have occurred at )1( ntin  and )2( ntin  respectively. These times are used to calculate the extrapolated terms according to (3-14), and then the reference time according to (3-13). τ(n-2) τ(n-1) tin(n) Input Interrupt Trigger Times Output Interrupt Trigger Times tout(n+1) τcorr(n) t(n) t (n)’’ t (n)’ τ(n) 2 τ(n) t(n) τ(n) tin(n-1)tin(n-2)  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:           )(21 3 1 nntntntnt ininin   (3-15)  Since )1( ntin  and )2( ntin  refer to the previous input hardware interrupt times, they can be expressed as:  )1()()1(  nntnt inin   (3-16)  )1()2()()2(  nnntnt inin   (3-17)  Combining (3-15)–(3-17) and (3-12), the correction term may be represented as:   nnnncorr  2))2()1(2( 3 1)(   (3-18)  Thereafter, it becomes possible to determine the required correction term )(ncorr  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:  30      322 3 1)(3  nnncorra   (3-19)            65431 3 1)(6  nnnnnncorra   (3-20)          4232212 3 1)(  nnnnncorrl   (3-21)            524432214 3 1)(  nnnnnncorrq   (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 Algorithm Implementation and Prototype 3.4.1 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.   31 Begin Save Timer value Restart the Timer Filtering conditions are met      Calculate τ   −    τ   −    τ    −    , ...      )3(),2(),1( nnn Capture Hall state Shift input Hall  signals to the output  of the filter Disable software interrupt First time filtering conditions are met  Last scheduled software interrupt  occurred Calculate correction term and compare it with Timer to trigger the next software interrupt Compare Timer with the difference between the last calculated correction term and the last τ to trigger the software interrupt Calculate the new  correction term Return Capture Hall state Return Enable software  interrupt Calculate correction term and compare it with Timer to trigger the next software interrupt Shift input Hall  signals to the output  of the filter No Yes No No Yes Yes  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  32 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 )(ncorr . 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 )(ncorr  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 )1()1(  nncorr  , 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 )(ncorr  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.  33        
  
  τ   τ 	  τ  ,  
  
 
 τ	 τ	τ	   
    
  
  τ   τ 	  τ  ,  τ	   
 
  
 
  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 the software interrupt Return update  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  34 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.  35 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.   36 20 0 20 1 2 3 0 1000 2000 1 2 3 St at or  c ur re nt s, i a bc s ( A ) El ec tro m ag ne tic  to rq ue , T e (N .m ) El ec tro m ag ne tic  to rq ue , T e (N .m ) Simulated Measured Calculated Calculated 0 0.02 0.04 0 0.02 0.04 0 0.02 0.04 0 0.02 0.04 Filter activated R ot or  m ec ha ni ca l s pe ed , ω  (r .p .m ) 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.   37 20 0 20 1 2 3 0 1000 2000 1 2 3 St at or  c ur re nt s, i a bc s ( A ) El ec tro m ag ne tic  to rq ue , T e (N .m ) El ec tro m ag ne tic  to rq ue , T e (N .m ) Simulated Measured Calculated Calculated 0 0.02 0.04 0 0.02 0.04 0 0.02 0.04 0 0.02 0.04 Filter activated R ot or  m ec ha ni ca l s pe ed , ω (r. p. m ) 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  38 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  3 cba vv    (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.  39 50 0 50 0 0.01 0.02 0.03 0.04 0.05 0.06 500 1000 1500 2000 50 0 50 500 1000 1500 2000 Measured currents  of Motor 2 Measured speed of Motor 2 0 0.01 0.02 0.03 0.04 0.05 0.06 0 0.01 0.02 0.03 0.04 0.05 0.06 0 0.01 0.02 0.03 0.04 0.05 0.06 Measured speed of Motor 1 Measured currents  of Motor 1 St at or  c ur re nt s, i a bc s ( A ) St at or  c ur re nt s, i a bc s ( A ) Time (s) Sp ee d,  n  (r pm ) Sp ee d,  n  (r pm )  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  40 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.  41 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  42 (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.  43 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.  44  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  45 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 CBA ,,  and provides the switching logic with the modified set of signals ''' ,, CBA  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.   46    
      	     		     	                            		     3' ω       ! ! "	
#	 $ %&   ' () *  Figure 4-2 BLDC motor-drive system with filtering of Hall sensor signals. 4.2 BLDC Machine with Hall-Sensor Errors 4.2.1 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 1H , 2H , and 3H  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  mmm 821 ,,,   . It is easy to see that for the case of Fig. 4-3(a), we have  Pmmm   360821    (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 1H , 2H , and 3H  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  47 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:  imie P 2   (4-2)  jmje P 2   (4-3)  where P  indicates number of poles,  8,,2,1 i , 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.   48 Based on (4-1) and (4-2), for the ideal case of Fig. 4-3(a) one should have 180ie , 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., 0am , 0bm , 0cm ), 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        120120 221  rmrmrm HHH   (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, 180ie , 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., 0jm ) also shift the entire sequence of logical signals from that sensor by the angle 0je , i.e.,       cmrmbmrmamrm HHH    120120 321  (4-5)  Therefore, in order to represent both sources of error, it is necessary to consider the actual sequence  mmm 821 ,,,    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.  49 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:  dt d abcs abcssabcs λirv   (4-6)  where  Tcsbsasabcs ffff , and f  may represent the voltage, current or flux linkage vectors. Also, sr  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]:                                         1 12 3 2 3 2 12sin 12sin 12sin ' n r r r nmabcssabcs n n n Kλ      iLλ  (4-7)                                                  1 12 3 2 3 2 12cos 12cos 12cos ' 2 n r r rT cs bs as nme n n n i i i KλPT       (4-8)  where sL  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 nK  denote the normalized magnitudes of the thn  flux harmonic relative to the fundamental, i.e. 11 K . 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  50 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 4.0 . At the same time for the Motor 2, the errors in im  go as high as 6.1 . 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.  51 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.  52 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.  53 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   22 6 rmP  ; where rm  is the rotor mechanical speed. For 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   2 rmP  . In the case of a motor with unevenly magnetized tablet and misplaced Hall sensors (this would be similar to Motor 2), harmonics will be integer multiples of   28 rmP  .  Figure 4-6 Harmonics in electromagnetic torque for ideal motor and the actual Motor 1 and 2.    54  Figure 4-7 Hall-sensor signals of an ideal and non-ideal motor. 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 Filtering Hall-Sensor Signals 4.3.1 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 123H  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 123H  changes value. The sequence )(n  represents the angular intervals  55 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:    38 1 3 1)( 87654321   eeeeeeeen  (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      10,2,1  nnn    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 123H , the series of history terms      9,2,1  nnn   ,      10,3,2  nnn   , and      8,4,3  nnn    will provide enough information about all of the magnetic poles  eee 821 ,,,   . 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:                    38..43 10..32 9..21 8 1 3 1)(                 nnn nnn nnn n  (4-10)   56 Simplifying (4-10) the average angular interval )(n  may be calculated as                           1092837363 534333221 24 1)( nnnnn nnnnn n    (4-11)  4.3.1.2 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:       1 0 /2 N k Nknj kecn   (4-12)  where the Fourier coefficients  kc , 1,...,1,0  Nk , provide the description of  n  in the frequency domain and may be calculated as:     1 0 /2)(1 N n Nknj k enN c   (4-13)  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 3 2  and 3 4 radians per sample) originate from inaccurate positioning of Hall sensors [19]. The other 7 frequencies (frequencies 8 2 i , 7,..,2,1i  ) are imposed by uneven magnetization of the magnetic tablet. In the case of an ideal motor, only the DC component would be present in the frequency content of  n .  57  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  2,0 , basic averaging filters can be used to cancel these extra frequencies. These filters generally have the following format:        M m M mnM n 1 1   (4-14)  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 3 2  and 3 4  radians per sample). This stage of the filter can be represented as:  58        3 1 3 3 1 m mnn   (4-15)  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 1 8 8 1 m mnn   (4-16)  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:            2 0 8 1 2 0 88/3 24 1 3 1 k mk mknknn   (4-17)  Simplifying (4-17) the final equation of the averaging filter may be represented as                            1092837363 534333221 24 1 8/3 nnnnn nnnnn n    (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).  59  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       212  nnnex   (4-19)  where  n  is the sequence of input time samples and  nex  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:  60                            119837363 5343342312 24 1 _8/3 nnnnn nnnnn nex    (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 Filter Implementation and Response 4.4.1 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 CBA ,, ) and providing the inverter with a set of modified signals (output Hall signals ''' ,, CBA ). 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  61 direction of rotation. The relationship between the input Hall signals that arrive at times )(ntin and the output (modified) switching times )1( ntout  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.  	    	         τ   τ  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  nt  to calculate the time when the modified output Hall signals have to switch to the next state. Symbolically, this can be expressed as:     nntntout  )1(  (4-21)  where  n  is calculated according to either (4-18) or (4-20) depending on the filtering approach.  The reference time  nt  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:                            ntntntntnt ntntntntnt nt 01234 56789 2333 3332 24 1  (4-22)  where it is the time extrapolated from the thi  preceding input Hall signal transition time. This  62 Figure 4-13 Calculation of the reference time. time is extrapolated as:       niintnt ini   (4-23)  Here,  intin   corresponds to the thi input Hall signal transition before the most recent input Hall signal transition, i.e. )(ntin . As can be seen, initially the times      ntntnt 910 ,....,,  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  nt . Substituting (4-23) into (4-12), the reference time can be expressed in terms of the input Hall signal switching times only as                        nntntntntnt ntntntntnt nt ininininin ininininin 5.4 12233343 536373829 24 1         (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 in Fig. 4-12. To show that this property holds, it is sufficient to calculate the difference between the  63 two consecutive reference times as:                              15.4 12233 435363 73839210 24 11            nn nnn nnn nnnn ntnt      (4-25)  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     15.4  nn   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  nt  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 )1( ntout  (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 )(ntin , the next time when the output Hall signals will have to be switched can be expressed as:  )()()1( nntnt corrinout   (4-26)  where )(ncorr  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 )(ncorr . Rearranging (4-26) we can express the correction term as      )()()1()( ntnntntntn ininoutcorr    (4-27)  Substituting (4-24) into (4-27), we get:                           ntn nt ntntnt ntntnt ntntnt n in in ininin ininin ininin corr              5.5 122333 435363 73829 24 1  (4-28)   64 Further analyzing Fig. 4-13, the terms  intin   can be related to the last switching of the input Hall signals )(ntin  as        9,,2,1for     , 1    iknntint i k inin   (4-29)  Further substituting (4-29) into (4-28), the correction term can be calculated in terms of time intervals  n  and  n  as                       n nnn nnn nnn ncorr      5.5 98376 69512415 318221123 24 1             (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:                            105.591085.1375.1065.7 55.445.135.121015.17 24 1 8/3 nnnnn nnnnn n corr    (4-31)                             115.595.485.1375.1065.7 55.445.13425.4112 24 1 _8/3 nnnnn nnnnn n corr ex   (4-32)  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  nout . In order to express  nout  one can use (4-26) to calculate  ntout  and  1ntout , and then subtract the result.  65 Following this approach we obtain         11  nnnn corrcorrout   (4-33)  Substituting )(ncorr  and )1( ncorr  for the 3/8-step-averaging 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:                               1111109978676 665646317215113 48 1 8/3_ nnnnn nnnnnn nout   (4-34)                                 121111111099188676 665645317215124 48 1 _8/3_ nnnnnn nnnnnn nexout    (4-35)  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 st 04.0 ,  the speed starts to increase until the speed reaches 188.6 rad/s at st 059.0 . This acceleration profile is depicted in Fig. 4-14 (see subplot 1). The actual input Hall signal times  niin  and the calculated output switching times  niout  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  nout . 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 st 059.0 . 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.  66 0.04 0.05 0.06 0.07 0.08 120 140 160 180 200 0.04 0.05 0.06 0.07 0.08 1.2 1.4 1.6 1.8 2 0.04 0.05 0.06 0.07 0.08 0.04 0.06 0.08 0.04 0.05 0.06 0.07 0.08 0.8 1 1.2 1.4 1.6 Time (s) Ro to r m ec ha ni ca l s pe ed  (R ad /S ) Sw itc hi ng  ti m e in te rv al s o f  th e or ig in al an d m od ifi ed  H al l s ig na ls (m S) N or m al iz ed  d el ay  b et w ee n th e in pu t a nd  th e ou tp ut  sw itc hi ng  e ve nt s A ct ua l s w itc hi ng  ti m es  o f t he  o ut pu t H al l s ig na ls (S ) No filter Averagimg plus extrapolating filter Averagimg filter Averagimg plus extrapolating filter Averagimg filter No filter Averagimg plus extrapolating filter Averagimg filter  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  67  n , which is defined as follows        n ntntn inout  1  (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 Hardware Realization and Case Study 4.5.1 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.  68 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].  69 Measured currents of Motor 1, 3-step plus quadratic extrapolating filter 0 0.05 0.1 Time (s) Measured currents of Motor 1, 3-step plus linear extrapolating filter 0 0.05 0.1 Measured currents of Motor 1, 3-step averaging filter -25 0 25 St at or  c ur re nt s,  i a bc s ( A ) 0 0.05 0.1 -25 0 25 St at or  c ur re nt s,  i a bc s ( A ) -25 0 25 St at or  c ur re nt s,  i a bc s ( A ) Filter disabled Filter enabled Filter disabled Filter enabled Filter disabled Filter enabled  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 st 05.0 , 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.  70 Measured currents of Motor 2, 3-step averaging filter 0 0.05 0.1 Measured currents of Motor 2, 3-step plus linear extrapolating filter 0 0.05 0.1 Measured currents of Motor 2, 3-step plus quadratic extrapolating filter 0 0.05 0.1 Time (s) -25 0 25 St at or  c ur re nt s,  i a bc s ( A ) -25 0 25 St at or  c ur re nt s,  i a bc s ( A ) -25 0 25 St at or  c ur re nt s,  i a bc s ( A ) Filter disabled Filter enabled Filter disabled Filter enabled Filter disabled Filter enabled  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).  71 Measured currents of Motor 1 Measured currents of Motor2 0 0.1 Time (s) 0.05 0 0.10.05 -20 0 20 St at or  c ur re nt s,  i a bc s ( A ) -20 0 20 St at or  c ur re nt s,  i a bc s ( A ) Filter disabled Filter enabled Filter disabled Filter enabled  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 2/rad2000 s . 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.   72 Measured currents of Motor 2 -40 0 40 St at or  c ur re nt s,  i a bc s ( A ) 0 0.05 0.1 0 0.05 0.1 Measured speed of Motor 2 1000 2100 Time (s) M ea su re d sp ee d r.p .m 200 0 ( rad /S  )2  Figure 4-19 Response of the Motor 2 with the new 3/8-step-averaging filter to a step in applied voltage. Measured currents of Motor 2 -40 0 40 St at or  c ur re nt s,  i a bc s ( A ) 0 0.05 0.1 0 0.05 0.1 Measured speed of Motor 2 1000 2100 M ea su re d Sp ee d r.p .m Time (s) 200 0 ( rad /S  )2  Figure 4-20 Response of the Motor 2 with the new 3/8-step-averaging-plus-extrapolating filter to a step in 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 2/rad3300 s . 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  73 when the motor uses the 3/8-step-averaging-plus-extrapolating filter (see Fig. 4-21, bottom plot).  Averaging filter -20 0 20 St at or  c ur re nt s,  i a bc s ( A ) 0 0.015 0.03 Averaging plus extrapolating filter -20 0 20 St at or  c ur re nt s,  i a bc s ( A ) 0 0.015 0.03 Time(s) 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. 1400 1900 Sp ee d (r. p. m ) 0 0.015 0.03 To rq ue  (N .m ) 2 -1 0 1 Averaging filter Averaging plus extrapolating filter 0 0.015 0.03 Time(s) 330 0 (r ad/ S  )2  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  74 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.  75 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.  76 [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   78 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  79 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.  80 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.   81 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,  18.0sr Ω, 4.0sL  mH, 21m 7 mV·s; inertia 4102 J  N·m·s2; back emf harmonic coefficients 11 K , 03 K , 042.05 K , and 018.07 K  82 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 41012 J  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 sr  0.12 Ω 0.12 Ω sL  0.375 mH 0.375 mH m  21.5mV.s 22 mV·S 1K  1 1 3K  0 0.02 5K  -0.059 -0.059 7K  0.025 0.025   83 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 . 1v 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.  84  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 ( ABE ), 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 ABE  crosses zero at 3 4, 3  r .  85 π π 2 3π 2   0π 2      θ   θ  π 2 ϕ ν ϕ    θ  π 2 ϕ ν ϕ  
 α2     Figure C-3 Hall sensor output (H1), and corresponding back emf voltage ( ABE ) as a function of rotor position. Investigating Fig. C-2b, it can be observed that zero crossings of H1 would occur at avvr   12 , 212    avvr . These values are distinguished in Fig. C-3, where av  1  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 ( ABE ), with aC1  and aC2 , the following equations hold true.  aa C1  (C-1)    aa C22 180    (C-2)  36021   (C-3) These equations can be simplified as:  aa C1  (C-4)  180211  aa CC  (C-5)  180122  aa CC  (C-6) For an 8 pole motor the equations above can be easily generalized to:  aa C1  (C-7)  180811  aa CC  (C-8)  180122  aa CC  (C-9)  86  180233  aa CC  (C-10)  180344  aa CC  (C-11)  180455  aa CC  (C-12)  180566  aa CC  (C-13)  180677  aa CC  (C-14)  180788  aa CC  (C-15) Where iaC  is the thi  angular distance between zero crossings of the Hall sensor signal (H1) and the line back-emf ( ABE ). Replacing bv  1 , cv  1  with 'b , 'c , similar equations can be written for the Hall sensor signals produced by H2 and H3, as:  bb C1  (C-16)  180811  bb CC  (C-17)  180122  bb CC  (C-18)  180233  bb CC  (C-19)  180344  bb CC  (C-20)  180455  bb CC  (C-21)  180566  bb CC  (C-22)  180677  bb CC  (C-23)  180788  bb CC  (C-24)   cc C1  (C-25)  180811  cc CC  (C-26)  180122  cc CC  (C-27)  180233  cc CC  (C-28)  180344  cc CC  (C-29)  180455  cc CC  (C-30)  180566  cc CC  (C-31)  180677  cc CC  (C-32)  180788  cc CC  (C-33)  87  It is important to note that as the sensors produce the same shifted output signals, the values calculated for 821 ,...,,   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 iaC , ibC , icC correspond to the instance when H1, H2, and H3 transition between the thi  and the  thi 1 pole of the reaction tablet, respectively. To guarantee the match and to properly model the phenomena, the three sets of angular distances  iaC ,  ibC ,  icC  were measured. The maximum values of the sets were assigned to aC1 , bC1 , cC1  Subsequent values of aC1 , bC1 , cC1  were assigned to  aaa CCC 832 ,...,, ,  bbb CCC 832 ,...,, ,  ccc CCC 832 ,...,, , 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, 821 ,...,,  . Matched assignment of aC1 , bC1 , cC1  ensures accurate calculation of 821 ,...,,  however this may shift the three positioning errors 'a , 'b , 'c  by the same value depending on weather aC1 , bC1 , cC1 actually correspond to the maximum value of the sets  iaC ,  ibC ,  icC  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.   88 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 41012 J  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 451 m  -0.2 0 452 m  -0.4 1.6 453 m  0.4 0.4 454 m  0.1 0.7 455 m  0.4 0 456 m  -0.4 -0.9 457 m  0.3 -1.6 458 m  -0.2 0 v  30 30 sr  0.12 Ω 0.12 Ω sL  0.375 mH 0.375 mH m  21.5mV.s 21 mV·S 1K  1 1 3K  0 0.02 5K  0.039 -0.032 7K  -0.015 -0.011   89 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  nout , and the correction term sequence )(ncorr . 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 )(ncorr , and the input Hall signal transition time intervals  n , should be performed. Then, to maintain the robustness, the filter should be automatically deactivated when )(ncorr  is much larger or much smaller than  n .  90  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 )(ncorr  would be equal to  n . However for non-ideal (actual) motors the sequence   n ncorr   would be oscillating around unity. The range is which the ratio    n ncorr    remains depends on the 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    n ncorr    was measured between 0.6 and 1.4. (i.e.    4.01 n ncorr   ). To provide an acceptable level of robustness, the filter mode is set to be deactivated when    7.01 n ncorr   . Also, to avoid constant switching between activated and deactivated modes, the filter is reactivated only when     5.01 n ncorr    for at least one 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  91 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 24 ..N10.5 sm  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 2/rad9000 s . 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    1n ncorr    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.   92 1500 Sp ee d (r. p. m ) To rq ue  (N .m ) Time(s) Si m ul at ed  p ha se  cu rr en ts  (A ) -50 50 0 3500 -3 6 Fi lte r d ea ct iv at io n si gn al τ c or r( n) τ( n) 1 0 1 0 0.20.10.05 0.15 0 0.20.10.05 0.15 0 0.20.10.05 0.15 0 0.20.10.05 0.15 0 0.20.10.05 0.15 0.7 0.5 Filter deactivation threshold Filter reactivation threshold 90 00  (r ad /S   )2 0 3  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  93 about st 036.0  the sequence    1n ncorr    goes beyond the predefined filter deactivation threshold (0.7) and filtering module is deactivated consequently. This instance is identified in Fig. E-3 subplot 5.                 	   	                 	                     !   τ      	  τ       "   "   "   "   "  #              $     % 
"    " &"  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  94 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,    1n ncorr    goes below the pre-set filter reactivation thresholds (0.5) at about st 062.0  . However filtering module is not reactivated before    1n ncorr    stays below 0.5 for at least one mechanical revolution. This criterion is satisfied at about st 082.0 and the filtering module is reactivated. As can be seen the transition between the inactive and the active modes happens very smoothly.  95 APPENDIX F Schematics of the designed printed circuit board.  11 22 33 44 D D C C B B A A Ti tle Nu m be r Re vis io n Si ze A4 Da te: 17 /0 2/ 20 09 Sh ee t   o f Fi le: C :\D oc um en ts an d Se tti ng s\. .\R ota tio n_ 3. SC H D OC D ra wn  B y: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1516171819202122232425262728 M CL R AN 0/C M P1 A/ CN 2/R B 0 AN 1/C M P1 B/ CN 3/R B1 AN 2/C M P1 C/ CM P2 A/ CN 4/ R B2 AN 4/C M P2 C/ CN 6/ RB 4 AN 3/C M P1 D/ CM P2 B/ CN 5/ R B3 AN 5/C M P2 D/ CN 7/R B 5 Vs s OS C 1/ CL K 1/ RB 6 OS C 2/ CL K O/ RB 7 PG D1 /E M U D1 /T 2C K/ U1 A TX /C N1 /R E7 PG C1 /E M U C1 /E XT RE F/ T1 CK /U 1A RX /C N0 /R E6 VD D PG D 2/ EM UD 2/ SC K 1/S FL T3 /IN T2 /R F6 A V DD A V SS PW M 1L /R E0 PW M 1H /R E1 PW M 2L /R E2 PW M 2H /R E3 RE 4 RE 5 VD D VS S PG D /E M UD /S DO 1/S C L/ U1 TX /R F8 PG C /E M UC /S D I1 /S DA /U 1R X/ RF 7 SF LT 2/ IN T0 /O CF LT A/ RA 9 PG C 2/ EM U C2 /O C 1/ SF LT 1/ IN T1 /R D 0 U1 DS PI C3 0F 20 20 _X X X 1 2 3 4 5 JP 1 He ad er  5 12345 JP 2 He ad er  5 4.7 R1 4.7 R2 4.7 R3 F1 Fu se  1 F2 Fu se  1 F3 Fu se  1 D 1 D  Z en er D 2 D  Z en er D 3 D  Z en er 14 0 R4 14 0 R5 14 0 R6 4.7R1 2 4.7R1 1 4.7R1 0 F6 Fu se  1 F5 Fu se  1 F4 Fu se  1 D6 D Ze ne r D5 D Ze ne r D4 D Ze ne r 14 0 R9 14 0 R8 14 0 R7 H all _i n_ 1 H all _i n_ 2 H all _i n_ 3 H all _o ut _3 H all _o ut _2 H all _o ut _1 Ha ll_ in_ 1 Ha ll_ in_ 2 H all_in_3 H all_out_1 H all_out_2 H all_out_3 20 pF C1 Ca p 20 pF C2 Ca p 1 2 Y1 XT AL DS 1 DS 2 14 0 R1 3 14 0 R1 4 VC C VC C LE D _1 LE D _2 LE D _1 LE D _2 10 K R1 5 10 K R1 610 K R1 7 VC C VC C VC C 10 K R1 8 VC C M CL R VC C V CC 10 0n F C 3 C ap 2 3 41 5 6 R J-1 1 15 -4 3- 61 10 M CL R PG D PG CV CC PG D PG C 10 K R1 9 10 uF C4 Ca p V CC Filter on Filter on 6.2 5 6.25 1 2 3 JP 4 H ea de r 3 6.2 5 F7 Fu se  1 4. 7 R2 0 10 0u F C 5 C ap D7 60  v FB 4 ON /O FF 5 GN D 3 IN 1 OU T 2 U2 LM 25 76 HV T- 5. 0 D8 48  v 10 0u H L1 In du ct or 47 0u F C6 Ca p 12 JP 3 H ea de r 2 GN D VC C 10 0n F C7 Ca p 14 0 R2 1 2 3 1 SW 2 SW -S PD T   96 APPENDIX G Layout of the designed printed circuit board.       

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

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}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo 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

Comment

Related Items