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.

HVACI_Sensored程序问题



请教TMDSHVMTRPFCKIT(v2.0)问题!

1.程序定義GLOBAL_Q 是Q24,能否請教一下為何指定是Q24?如果變成Q25或Q26會有其它差異嗎?

2.求park Angle時,有幾行程序不太懂
_IQsinPU(park1.Angle)

#if GLOBAL_Q == 24
#define _IQsinPU(A) _IQ24sinPU(A)

#define _IQ24sinPU(A) sin((A)*6.283185307)

請問這裡為什麼是乘上2pi的數值?

谢谢!

  • 1. Q24指数据扩大2的24次方表示,这个根据你的程序可以自己定义采用QXX的格式来表示,也可以采用25,26等,只要保证你的所有换算是正确的就行;

    2、#define _IQ24sinPU(A) sin((A)*6.283185307) 这一段是没有预编译的,不包含在这个代码中的,因此没有和#define _IQsinPU(A) _IQ24sinPU(A)冲突,乘以2Pi是因为角度A采用标幺值表示的,基值时2Pi。