Other Parts Discussed in Thread: DRV8312
I'm developing a motor control board using F28027F/InstaSPIN-FOC. I don't quite understand on trapezoidal waveform control.
What I want to achieve is to set the maximum duty cycle of PWM to a certain value, let's say 95%, and secondly, be able to switch back and forth sinusoidal and trapezoidal waveform on the fly.
I tried setting different values USER_MAX_VS_MAG_PU and gMotorVars.Overmodulation but I am not able to observe any obvious change in current waveform or Vbemf, using codes from lab10a.
I can observe PWM max duty cycle is changed accordingly, and current waveform is cut off at the peak & valley if USER_MAX_VS_MAG_PU is set to values lower than 1.1547.
1. How to convert PWM duty cycle (in percentage) to the value to assign to USER_MAX_VS_MAG_PU?
2. How to force InstaSPIN-FOC to output trapezoidal waveform?
3. Which will take precedence, USER_MAX_VS_MAG_PU in user.h or gMotorVars.Overmodulation?
4. Can I change gMotorVars.Overmodulation on the fly?
Thanks