mcb_eqep_foc_example_with_f28069M stops the motor abruptly when switching from open Loop to close loop control
Afficher commentaires plus anciens
Hey guys,
I am just trying to use the example of mcb_eQEP_example with F28069M with a cubemars motor.
It is jus as the title says, the motor spins well when starting, almost an entire rotatio.
But from what i see in the HOST (Simulink printed signal), when the "enablecloseloop" switches to 1, there is an abrupt incresing in the current, which doesn't look like an overcurrent to me, the drv8305 should be able to handle more than that. However the motor stops with big "clack" and the DRV goes to fault.
I have checked and checked my parameters, my encoder signal which to me looks okay and my current signal in simulink plots looks okay too.
Some hints i can check here?
Thank you guys.
2 commentaires
chynna
le 13 Mar 2026 à 12:57
I encountered the exact same issue with the F28069M launchpad. The abrupt motor stop when transitioning from open loop to closed loop is a common problem with the MCB implementation. The key is to ensure your encoder alignment is correct and that you're gradually ramping up the Id reference during the transition. I found that adding a soft-start mechanism for the q-axis current reference during the first few seconds after switching modes resolved the stuttering issue. Also double-check that your EQEP configuration is properly set with the correct PPR value. Hope cookie-clicker2
jeff
le 13 Mar 2026 à 18:58
Réponses (2)
KrishnaKumar
le 10 Mar 2026
0 votes
Here are a few points you can check -
- Use the open loop example (Example link) to check if motor rotates smoothly before using the present example.
- Was the encoder offset calibration performed for your encoder as described in the example page?
- Recheck your ePWM settings if they were modified, to ensure they do not lead to unintentional switching behavior.
- Do Motor parameters (Rs, Ld, Lq, flux, inertia, and pole-pairs for the Cubemars motor) match the values used in the model?
If any of these steps were skipped or only partially validated, issues can occur when switching to closed loop. In your case, it appears that an over‑current condition may be triggered, causing the DRV to shut down.
2 commentaires
jeff
le 10 Mar 2026
Shivaprasad Narayan
le 11 Mar 2026
You can further perform following tests to see if the issue is in position calculation or current control.
- Use the position computed by the quadrature decoder but break the current control loop. In order to do this, feed a constant 0 for Vd and 0.15 for Vq to the inverse Park transform block after the current PI controllers. This is expected to spin the motor smoothly if the position is accurate. Higher the Vq more will be the speed of the motor. If this test fails, the position calculation has issues. It could be in the offset compensation or position calculation itself.
- If the above check gives expected output, proceed to validate the current control loop. Undo the changes done in above step. Instead of sending Id, Iq references from speed control loop, send constant 0 Id reference and 0.05 Iq reference. the motor should again spin smoothly and reach the maximum possible speed. Higher the value of Iq reference, the motor accelerates faster. If the motor spin fails in this test, it is due to incorrect current control loop. Since you are using the same kit as the shipping example is intended for, I assume the current measurement is intact. Ensure the right motor parameters such as Rs, Ld and Lq are used, so that the current control is tuned correctly.
Catégories
En savoir plus sur Automotive Applications dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




