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.

TMS320F28335: 关于电机电流采样真实值的问题

Part Number: TMS320F28335
Other Parts Discussed in Thread: CONTROLSUITE

小白对于电流真实值采样一直没弄明白,想找大神请教。

在程序中对电流采样为

// ((ADCmeas(q12)/2^12)-offset)*2*(3.0/3.3)
clarke1.As=((AdcMirror.ADCRESULT1)*0.00024414 -offsetA)*2*0.909; // Phase A curr.
clarke1.Bs=((AdcMirror.ADCRESULT2)*0.00024414 -offsetB)*2*0.909; // Phase B curr.

AdcMirror.ADCRESULT1在转速200时采集到为2300左右,offsetA为0.547982752固定不变,offsetB为0.544721186固定不变。

问题一:

对于12位分辨率的ADC数据转换的基本公式是Result/4096*3.0,而offsetA的计算公式如下:

offsetA= K1*offsetA + K2*(AdcMirror.ADCRESULT1)*0.00024414; 			//Phase A offset
offsetB= K1*offsetB + K2*(AdcMirror.ADCRESULT2)*0.00024414; 			//Phase B offset

为何在计算clarke1.As中*3.0是在括号外,将offsetA也乘了进去。offsetA是起什么作用的呢?

问题二:

如果只是要得到实际的电流值,是否可以直接AdcMirror。ADCRESULT1/4096*3.0得到所对应的管脚电压值,再通过对应实际采样电路的放大倍数来确定采样电阻上电压差值,从而确定真实电流呢?