Hello,
I am trying to control dq- axis currents of PMSM with Model Predictive Control using F28379D microcontroller. I am controlling the speed of the motor in open-loop. However when I switch the algorithm to closed-loop DC voltage source becomes short circuit. I checked the code several times and I didn't find any problem. But I am thinking that I might entered the wrong offset angle value into the control algorithm. My questions are if I enter a wrong offset angle value into the control algorithm, Does the algorithm still work or Does it break? And another question is that How can I calculate or measure the offset angle of the rotor correctly? I used the back-emf method that I compared back emf voltage of phase A-neutral to index pulse of the encoder. Then I calculated the time difference between index pulse and positive to negative zero crossing of back emf voltage. Thank you for your help and responses.