I'm trying to control a customer motor using the approach in AN3206, but I'm having trouble scaling the quantities and setting things up.
I have controlled the setup as a BLDC motor using Hall detectors, so the setup is working, but I can't get past the ALIGN part of the example.
The ADC Vref is set to 2.5V, so below 0V corresponds to 2.5V VREF.
The currents come in with {-3.125A ... 0 ... 3.125A} mapped to {-2.5 ... 0V ... 2.5}
The bus voltage is 24V and is comes in with {0V ... 24V} mapped to {0V ... 2.4V}.
The way I thought this should work is:
However, I never get any output during the ALIGN_START ... ALIGN_FINISH steps. The duty cycle is always 50%.
The u_dq D output is a reasonable value, but the u_ab output is always {0, 0}.
Any suggestions on how to debug this or additional info I can give?
I said:
"However, I never get any output during the ALIGN_START ... ALIGN_FINISH steps. The duty cycle is always 50%.
The u_dq D output is a reasonable value, but the u_ab output is always {0, 0}.
Any suggestions on how to debug this or additional info I can give?"
The second PMSMVC thread that does the backward park transformation and the DC bus elimination isn't running. That might explain why I see u_dq non-zero but u_ab zero. If I then force an align finish I see the second thread run, but of course the motor isn't aligned.
What lets the second thread run?
I said:
"The second PMSMVC thread that does the backward park transformation and the DC bus elimination isn't running. That might explain why I see u_dq non-zero but u_ab zero. If I then force an align finish I see the second thread run, but of course the motor isn't aligned.
What lets the second thread run?"
I found the source code for the eTPU function at the Ashware site and see that when PMSMVC_PID_OFF is in effect it jumps directly to the PMSMVC_INV_PARK_TRANSFORMATION section of the code in the first thread, so all work is done in a single thread. I'm still stuck with the 50% duty cycle during the ALIGN_START state of the application.
Any suggestions would be greatly appreciated.