Azzera filtri
Azzera filtri

How to use the two feedback loop in C2000 Embedded coder in Simulink

3 visualizzazioni (ultimi 30 giorni)
Hi all,
I'm using the Ti LAUNCHXL-28069M to run the PMSM motor using the SPI absolute encoder.
I used the "mcb_pmsm_foc_qep_f28069LaunchPad" example and modified it to do the position control of the motor as shown below.
Serial comunication interface(SCI - A) and interrupt is used for the communication and interrupt is used for Serial RX and TX.(priority is 40 and 60).
The issue is that if I add one feedback loop for position control or speed control, it's working but if I used both feedback loops, Serial Receive values(PosRef_PU) does not enter (it keeps showing 0) and motor does not work.
This is position control block
This is velocity control block.
I don't know why the controller does not work if I use the two closed loop control.
Could anyone please help me about this issue?
Sincerely,
  1 Commento
MathWorks Motor Control Blockset Team
How fast you are running your SPI for reading position sensors? Ensure your ADC interrupt loop is not overrunning (consumes more than your interrupt time). Try to profile the execution time of interrupt loop and ensure sufficient eexcution time is left for speed controller and position controller.
If you find you are overrunning, limit your SPI read to low speed tasks (where you are not foreseeing major postion change).

Accedi per commentare.

Risposte (0)

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by