in general, the acquisition precision of commutation pulse width, the higher the better, but also restricted by MCU internal data, if there is a redundant 16-bit timer, don't hesitate, yuntai brushless motor directly use it to make change of counting pulse width, precision can reach 1 us, without the 16-bit timer that can only use eight of the timer and then inside the timer interrupt their cumulative count cough up.
2, the PID operation time how?
1, phase 6 times after running a PID
for the brushless motor, because of the tiny differences between different motor structure and error on the assembly hall, usually do not collect each pulse width value of PID arithmetic, such easy to cause the motor shaking, it's good practice to: collect a full operation cycle (Commutation period is 6)And then put the accumulative average six commutation period, thus it is concluded that the speed of the current value. Once you get a new speed value, dongguan motor, can be a PID arithmetic.
2, restricted to a maximum force of operational PID time
when over a period of time (Mainly in the low speed), model aircraft motor, it has not always given MCU new speed value, so this time will need to be imposed by PID arithmetic, to regain the new power value, the following reference time of the forced computing PID: 40 - msBetween the 150 ms
3, how to eliminate static dithering of the motor?
1, when the acquisition by the pulse width and set the value of pulse width value slightly different EKA1 (Is not zero! ), don't need to do a PID arithmetic, namely program returned directly, without computing algorithm.
2, when the acquisition by the pulse width and set the value of pulse width values were EKA2 (EKA1 <EKA2), the PID arithmetic, but power value plus 1 or minus 1 processing, it's a fine tune power of the method.
3, when the acquisition by the pulse width and set the value of pulse width value difference is bigger EKA3 (EKA2 <EKA3)When, at that time big but call your PID algorithm.