|
@@ -25,6 +25,7 @@
|
|
|
*
|
|
|
******************************/
|
|
|
SLONG tmp_CurCalibCoef[CURCALIBNUM] = {
|
|
|
+ 8275, // -20--1 Q10
|
|
|
30224, // 0-19 Q10
|
|
|
53743, // 20-39
|
|
|
77427, // 40-59
|
|
@@ -35,6 +36,7 @@ SLONG tmp_CurCalibCoef[CURCALIBNUM] = {
|
|
|
};
|
|
|
|
|
|
static SWORD PCB_swRTempTab[TEMPNUM] = {
|
|
|
+ 10538,
|
|
|
3362, // 0.01kOnm IPM voltage at 0 C
|
|
|
1253, // 0.01kOnm IPM voltage at 20 C
|
|
|
530, // 0.01kOnm IPM voltage at 40 C
|
|
@@ -45,6 +47,7 @@ static SWORD PCB_swRTempTab[TEMPNUM] = {
|
|
|
};
|
|
|
|
|
|
static SWORD PCB_swRTempCofTab[TEMPNUM] = {
|
|
|
+ -3, // Q10 -20--1 Coef of R
|
|
|
-10, // Q10 0-19 Coef of R
|
|
|
-28, // Q10 20-39 Coef of R
|
|
|
-72, // Q10 40-59 Coef of R
|
|
@@ -54,35 +57,35 @@ static SWORD PCB_swRTempCofTab[TEMPNUM] = {
|
|
|
-1301,// Q10 120-139
|
|
|
};
|
|
|
/* motor NTC intercept array */
|
|
|
-SLONG q10_motor_tmp_CurCalibCoef[CURCALIBNUM] = {
|
|
|
- 112056, // 70-81 Q10
|
|
|
- 125480, // 81-91
|
|
|
- 139284, // 92-102
|
|
|
- 152248, // 103-113
|
|
|
- 166113, // 114-124
|
|
|
- 178913, // 125-135
|
|
|
- 198400, // 136-146
|
|
|
-};
|
|
|
-/* motor NTC resistance */
|
|
|
-static SWORD motor_swRTempTab[TEMPNUM] = {
|
|
|
- 223, // 0.01kOnm IPM voltage at 70 C
|
|
|
- 163, // 0.01kOnm IPM voltage at 81 C
|
|
|
- 120, // 0.01kOnm IPM voltage at 92 C
|
|
|
- 91, // 0.01kOnm IPM voltage at 103 C
|
|
|
- 69, // 0.01kOnm IPM voltage at 114 C
|
|
|
- 54, // 0.01kOnm IPM voltage at 125 C
|
|
|
- 43, //0.01kOnm IPM voltage at 136 C
|
|
|
-};
|
|
|
-/* motor NTC fitting slope array */
|
|
|
-static SWORD q10_motor_swRTempCofTab[TEMPNUM] = {
|
|
|
- -182, // Q10 70-81 Coef of R
|
|
|
- -263, // Q10 81-91 Coef of R
|
|
|
- -378, // Q10 92-102 Coef of R
|
|
|
- -519, // Q10 103-113 Coef of R
|
|
|
- -715, // Q10 114-124 Coef of R
|
|
|
- -947, //Q10 125-135
|
|
|
- -1393, //Q10 136-146
|
|
|
-};
|
|
|
+//SLONG q10_motor_tmp_CurCalibCoef[CURCALIBNUM] = {
|
|
|
+// 112056, // 70-81 Q10
|
|
|
+// 125480, // 81-91
|
|
|
+// 139284, // 92-102
|
|
|
+// 152248, // 103-113
|
|
|
+// 166113, // 114-124
|
|
|
+// 178913, // 125-135
|
|
|
+// 198400, // 136-146
|
|
|
+//};
|
|
|
+///* motor NTC resistance */
|
|
|
+//static SWORD motor_swRTempTab[TEMPNUM] = {
|
|
|
+// 223, // 0.01kOnm IPM voltage at 70 C
|
|
|
+// 163, // 0.01kOnm IPM voltage at 81 C
|
|
|
+// 120, // 0.01kOnm IPM voltage at 92 C
|
|
|
+// 91, // 0.01kOnm IPM voltage at 103 C
|
|
|
+// 69, // 0.01kOnm IPM voltage at 114 C
|
|
|
+// 54, // 0.01kOnm IPM voltage at 125 C
|
|
|
+// 43, //0.01kOnm IPM voltage at 136 C
|
|
|
+//};
|
|
|
+///* motor NTC fitting slope array */
|
|
|
+//static SWORD q10_motor_swRTempCofTab[TEMPNUM] = {
|
|
|
+// -182, // Q10 70-81 Coef of R
|
|
|
+// -263, // Q10 81-91 Coef of R
|
|
|
+// -378, // Q10 92-102 Coef of R
|
|
|
+// -519, // Q10 103-113 Coef of R
|
|
|
+// -715, // Q10 114-124 Coef of R
|
|
|
+// -947, //Q10 125-135
|
|
|
+// -1393, //Q10 136-146
|
|
|
+//};
|
|
|
|
|
|
SWORD tmp_PcbTemp = 0;
|
|
|
SWORD tmp_MotTemp = 0;
|
|
@@ -164,9 +167,13 @@ void PcbTempCal(SWORD PcbR)
|
|
|
SWORD TempCal(SWORD PcbR, SWORD *ptemp_tab, SWORD *p_temp_coef, SLONG *p_cali_coef, SWORD temp_140)
|
|
|
{
|
|
|
SWORD per_temp;
|
|
|
- if (PcbR >= *(ptemp_tab+temp_0))
|
|
|
+ if (PcbR >= *(ptemp_tab+temp__20))
|
|
|
{
|
|
|
- per_temp = 0;
|
|
|
+ per_temp = -20;
|
|
|
+ }
|
|
|
+ else if (PcbR < *(ptemp_tab+temp__20) && PcbR >= *(ptemp_tab+temp_0))
|
|
|
+ {
|
|
|
+ per_temp = (PcbR * (*(p_temp_coef+temp__20)) + (*(p_cali_coef+temp__20))) >> 10;
|
|
|
}
|
|
|
else if (PcbR < *(ptemp_tab+temp_0) && PcbR >= *(ptemp_tab+temp_20))
|
|
|
{
|
|
@@ -211,10 +218,10 @@ void PcbTempCal(SWORD PcbR)
|
|
|
tmp_PcbTemp = TempCal(PcbR, PCB_swRTempTab, PCB_swRTempCofTab, tmp_CurCalibCoef, temp_pcb_140);
|
|
|
}
|
|
|
|
|
|
-void MotorTempCal(SWORD PcbR)
|
|
|
-{
|
|
|
- tmp_MotTemp = TempCal(PcbR, motor_swRTempTab, q10_motor_swRTempCofTab, q10_motor_tmp_CurCalibCoef, temp_motor_150);
|
|
|
-}
|
|
|
+//void MotorTempCal(SWORD PcbR)
|
|
|
+//{
|
|
|
+// tmp_MotTemp = TempCal(PcbR, motor_swRTempTab, q10_motor_swRTempCofTab, q10_motor_tmp_CurCalibCoef, temp_motor_150);
|
|
|
+//}
|
|
|
#endif
|
|
|
/*************************************************************************
|
|
|
End of this File (EOF)!
|