This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
如上图,电流采样为什么是:
clarke1.As=-(_IQ15toIQ((AdcResult.ADCRESULT1<<3)-cal_offset_A)<<1);
clarke1.Bs=-(_IQ15toIQ((AdcResult.ADCRESULT2<<3)-cal_offset_B)<<1);
而不是:
clarke1.As=(_IQ15toIQ((AdcResult.ADCRESULT1<<3)-cal_offset_A)<<1);
clarke1.Bs=(_IQ15toIQ((AdcResult.ADCRESULT2<<3)-cal_offset_B)<<1);
这个是什么原因决定的呢?
我在写例程时,用的是采样值减去偏置值,电机也能运行,但是加上负号之后就有问题了。
这里的符号应该是跟电路的正负反馈相关的,可以参考下图:
上图中的电流反馈为正反馈,所以需要改变当前的方向。换言之,如果相电流为正,则该正反馈电路中的分流反馈值为负。
当然,如果你的电路是负反馈(如下图),则不需要像例程中那样改变电流反馈值。