![bldc tool fault history bldc tool fault history](https://www.st.com/bin/ecommerce/api/image.PF267946.en.feature-description-include-personalized-no-cpn-large.jpg)
Why to use 32-bit number over 16-bit is obvious - since the period6ZC is 32-bit value, the result should be of the same resolution or width. It would mean the maximal fraction number is 1.0, which is represented by its integer value 2^31 = 2,147,483,648.
#Bldc tool fault history how to#
Now, how to read it's scale and what is the SPEED_CALC_NUMERATOR? Let's assume the " actualSpeed" is tFrac32 (1.31 formated signed 32bit number).
#Bldc tool fault history code#
Since the speed (rotor frequency) is just an inverted time period, we can use following code line to calculate the actualSpeed: (4) actualSpeed = SPEED_CALC_NUMERATOR / period6ZC The period per 6 zero-crosses " period6ZC" is calculated within the control loop, usually in the 1 ms timer interrupt routine. (3) time per mechanical revolution = period6ZC * number of pole-pairs You can easily get the time per mechanical revolution for higher-pole motor simply by multipling it by number of pole-pairs. In thsi case: (2) mechanical speed = electrical speed That means, if the motor is 2-pole motor ( = 1 pole-pair motor), it would be the time per single "mechanical" revolution of the rotor. If you sum all the 6 zero-cross periods, you'll get the number of timer ticks per single "electric" revolution.
![bldc tool fault history bldc tool fault history](https://www.mdpi.com/energies/energies-14-03156/article_deploy/html/images/energies-14-03156-g006.png)
To calculate one "electrical" revolution of a motor = 6 commutations (or 6 zero-crosses), all the 6 commutation time periods shall be summed. For that case, the resulting " period6ZC" is defined, formated as tU32 (or unsigned long) to prevent an overflow if all six 16-bit zero-cross periods are summed. In the following text, 3-phase BLDC motor is discussed. (1) mechanical speed = electrical speed / number of pole-pairs = electrical speed / ( number of poles / 2 ) The relation between these two speeds is determined by number of poles or pole-pairs: The mechanical speed is connected directly with the rotor speed. The "electrical" speed is linked with the rotational field. In electric motor theory, we recognize "electrical" and "mechanical" speed. The periods are captured using a timer, as mentioned above. or periodZC, defined as tU16 (16 bit unsigned). In the application, zero-cross (or hall-sensor) periods are captured with periodZC_F_PhA, periodZC_R_PhA, etc. The same aproach can be followed using the Hall-sensor events. maximum 16bit = 65535 ticks between two commutations.at least 100 timer ticks between two commutations.However, the timer should be set to cover some reasonable number of ticks between two commutations (which is linked to the speed precission at high speeds) and should be able to cover two commutations "far away" from each other at very low speeds, without the timer overflow. There is no general guidance how to set up the timer. That means, the time is scaled by the timer TIM0 settings. These zero-cross events times are measured by capturing a timer (TIM0CNT) register at the time the ADC routine detects a zero-cross (or when the Hall sensor commutation event occurs).
![bldc tool fault history bldc tool fault history](https://i1.rgstatic.net/publication/339360562_Application_of_Advanced_Vibration_Monitoring_Systems_and_Long_Short-Term_Memory_Networks_for_Brushless_DC_Motor_Stator_Fault_Monitoring_and_Classification/links/5e4d3ae892851c7f7f45c1a8/largepreview.png)
The motor speed is calculated based on the zero-cross detection of BEMF voltage on a non-active phase. However, the approach is almost the same. It's more benefitial to describe in details the sensorless algorithm over the hall-sensor-based control. For field-oriented control, please refer to the PMSM control discussed in AN5135 or AN5327. The instant of the commutations can be driven by Hall sensors or by the back-EMF signal monitoring (so-called "sensorless"). The principles are well described in many application notes, such as AN4718 or AN4704. As the rotor is moving, the phases are switched (commutated) to keep the stator flux ahead the rotor flux. The key is to create a torque using DC current in two phases while the third phase is not connected. This document is linked with the six-step control of BLDC motors, known for the trapezoidal back-EMF shaped voltage. Please use it for your reference and comment in case there is something to be explained in more details. The paper describes basic scaling procedure of a six-step BLDC motor control application with focus on S12ZVM MCU devices.īased on the various questions regarding the BLDC speed calculation, I've decided to write this document to make the scale calculation clear.