BLDC Closed loop using dspic30f3010
I am trying AN957 closed loop code. Our motor have 23 pole pair , 700 RPM . I changed these parameter only in that code and one more thing TMR3 get overflow in slow speed so that i changed that 16bit timer into 32bit timer mode (TMR2+TMR3).
but when i call speed calculation function, actual speed not get changed quickly so if(actual speed < desired speed) function called so many times PDC get increased so quickly,then after some delay actual speed get increased > desired speed. I used this code for E-Bike but its speed up/down continously on load because of acutal speed delay.
timer3value = TMR3;
TMR3 = 0;
timer3avg = ((timer3avg + timer3value) >> 1);
why we are shifting and adding TIME instead of direct TMR3 for actual speed calculation. Plz anybody help me out to get quick actual speed. I have no time to complete this project so plz Reply me as soon as possible.