Greetings,
I'm trying to understand the significance of these quantities(specifically gMotorVars.Vsref and the svgencurrent->Vlimit), because I'm having a little trouble with these quantities and my motor controller at the moment.
As a starting point, I'll point out that I'm comparing Lab 5d (Instaspin MOTION Speed Control) versus Lab 10b (Instaspin MOTION Speed Control with Overmodulation).
In another thread (e2e.ti.com/.../2088170, I pointed out that in 'main.h', there is a line in the MOTOR_Vars_INIT which sets gMotorVars.Vsref equal to _IQ(0.8 * USER_MAX_VS_MAG_PU). This means that in Lab 5d my Vsref is actually 0.4, since my MAX_VS_MAG_PU is 0.5. In that thread, it was implied that I could change this, and instead use _IQ(1.0 * USER_MAX_VS_MAG_PU) in 'main.h' for my MOTOR_Vars_INIT as long as I wasn't using field weakening.
I was about to set it this way so that my Vsref was 0.5, but then I was reading a bit in Lab 10b, and I found in the SVGEN initialization section the following:
// Initialize and setup the 100% SVM generator svgencurrentHandle = SVGENCURRENT_init(&svgencurrent,sizeof(svgencurrent)); // setup svgen current { float_t minWidth_microseconds = 2.0; uint16_t minWidth_counts = (uint16_t)(minWidth_microseconds * USER_SYSTEM_FREQ_MHz); float_t fdutyLimit = 0.5-(2.0*minWidth_microseconds*USER_PWM_FREQ_kHz*0.001); _iq dutyLimit = _IQ(fdutyLimit); SVGENCURRENT_setMinWidth(svgencurrentHandle, minWidth_counts); SVGENCURRENT_setIgnoreShunt(svgencurrentHandle, use_all); SVGENCURRENT_setMode(svgencurrentHandle,all_phase_measurable); SVGENCURRENT_setVlimit(svgencurrentHandle,dutyLimit); }
In my case, I have a PWM switching frequency of 14 kHz, and so when calculated out I found that the duty limit here used in SVGENCURRENT_setVlimit() is roughly 0.44. Regardless, if my minWidth_microseconds is anything above 0.0, the duty limit is less than 0.5.
QUESTION:
Does this imply that if I set up Lab 5d such that my Vsref is 0.5, I'll be blowing up my motor controller because the currents are unsampleable?