can FOC Frequency be very low?
I've designed an FOC board.First of all,I want to realize the SVPWM without using other transformation in order to make the motor rotate first.
PWMC_SetPhaseVoltage(pwmcHandle, Valphabeta);so I generate an array about Valphabeta as the code below:
#define PIDIV180 0.017453292519943
#define MAX 25000
int main()
{
double cnt=0,angle;
int a,b;
printf("int16_t test1[][2]=\n{\n");
for(cnt = 0;cnt<90;cnt+=0.05)
{
angle = cnt * PIDIV180;
a = MAX*cos(angle);
b = MAX*sin(angle);
printf("{%d,%d},\n",a,b);
}
printf("};");
return 0;
}and the FOC code is changed to below:
cnt = (cnt+1)%1800;
if(!cnt)
{
cnt1 = (cnt1+1)%4;
}
switch(cnt1)
{
case 0:// 4 quadrand
a = test1[cnt][0];
b = test1[cnt][1];
break;
case 1:// 3 quadrand
a = -test1[cnt][1];
b = test1[cnt][0];
break;
case 2:// 2 quadrand
a = -test1[cnt][0];
b = -test1[cnt][1];
break;
case 3:// 1 quadrand
a = test1[cnt][1];
b = -test1[cnt][0];
break;
}
Valphabeta.alpha = a;
Valphabeta.beta = b;
hCodeError = PWMC_SetPhaseVoltage(pwmcHandle, Valphabeta);when PWM_FREQUENCY is above 10k,the motor rotates,but when PWM_FREQUENCY is slow like 5k,the motor rotates back and forth at a small angle.
Where is the problem?FOC frequency can't be too low or my test method is wrong.