|
@@ -38,15 +38,18 @@ Update Time
|
|
|
/*======================================================================*
|
|
|
Motor Number Selection
|
|
|
*=======================================================================*/
|
|
|
-#define MOTOR_WELLING_CITY 0x20
|
|
|
-#define MOTOR_WELLING_MTB 0x21
|
|
|
-#define MOTOR_ID_SEL MOTOR_WELLING_CITY //
|
|
|
+#define MOTOR_WELLING_CITY_36V 0x20
|
|
|
+#define MOTOR_WELLING_MTB_36V 0x21
|
|
|
+#define MOTOR_WELLING_CITY_48V 0x30
|
|
|
+#define MOTOR_WELLING_MTB_48V 0x31
|
|
|
+
|
|
|
+#define MOTOR_ID_SEL MOTOR_WELLING_CITY_36V
|
|
|
|
|
|
|
|
|
/*======================================================================*
|
|
|
Motor Parameters
|
|
|
*=======================================================================*/
|
|
|
-#if (MOTOR_ID_SEL == MOTOR_WELLING_MTB)
|
|
|
+#if (MOTOR_ID_SEL == MOTOR_WELLING_MTB_36V)
|
|
|
#define M_POLE_PAIRS 7 // unit:Null,Pole pairs
|
|
|
#define M_RS_OHM 170 // unit: 0.1mOhm, Phase resistance
|
|
|
#define M_MATERIAL Al // unit:Null
|
|
@@ -62,7 +65,7 @@ Update Time
|
|
|
#define M_LQ_TURN2_IQ_AP 700 // unit: 0.01A,
|
|
|
#define M_LQ_TURN2_LQ_MH 11500 // unit: 0.01uH,Q axis inductance
|
|
|
#define M_LQ_MIN_MH 11500 // unit: 0.01uH,Q axis inductance
|
|
|
-#define M_JD 500 // unit: 10-7Kg*m2, Rotational inertia
|
|
|
+#define M_JD 2500 // unit: 10-7Kg*m2, Rotational inertia
|
|
|
#define M_MAGNETIC_MATERIAL Ferrite // unit:Null
|
|
|
#define M_FLUX_WB 5360 // unit: 0.001mWb, Flux linkage
|
|
|
#define M_ID_MAX_AP 0 //-25 // unit: 0.01A, Max d axis current
|
|
@@ -74,9 +77,37 @@ Update Time
|
|
|
#define M_R_IRMS_A 2500 // unit: 0.01A, rate Irms
|
|
|
#define M_R_UDC_v 360 // unit: 0.1V, rate Udc
|
|
|
#define M_MAX_TOR_NM 30 // unit: 0.1Nm, Max tor
|
|
|
-#endif
|
|
|
|
|
|
-#if (MOTOR_ID_SEL == MOTOR_WELLING_CITY)
|
|
|
+#elif (MOTOR_ID_SEL == MOTOR_WELLING_MTB_48V)
|
|
|
+#define M_POLE_PAIRS 7 // unit:Null,Pole pairs
|
|
|
+#define M_RS_OHM 170 // unit: 0.1mOhm, Phase resistance
|
|
|
+#define M_MATERIAL Al // unit:Null
|
|
|
+#define M_LD_NOLOAD_MH 11000 // unit: 0.01uH, D axis inductance
|
|
|
+#define M_LQ_NOLOAD_MH 11500 // unit: 0.01uH, Q axis inductance
|
|
|
+#define M_LD_TURN1_ID_AP 5000 // unit: 0.01A,
|
|
|
+#define M_LD_TURN1_LD_MH 11000 // unit: 0.01uH,D axis inductance
|
|
|
+#define M_LD_TURN2_ID_AP 700 // unit: 0.01A,
|
|
|
+#define M_LD_TURN2_LD_MH 11000 // unit: 0.01uH,D axis inductance
|
|
|
+#define M_LD_MIN_MH 11000 // unit: 0.01uH,D axis inductance
|
|
|
+#define M_LQ_TURN1_IQ_AP 200 // unit: 0.01A,
|
|
|
+#define M_LQ_TURN1_LQ_MH 11500 // unit: 0.01uH,Q axis inductance
|
|
|
+#define M_LQ_TURN2_IQ_AP 700 // unit: 0.01A,
|
|
|
+#define M_LQ_TURN2_LQ_MH 11500 // unit: 0.01uH,Q axis inductance
|
|
|
+#define M_LQ_MIN_MH 11500 // unit: 0.01uH,Q axis inductance
|
|
|
+#define M_JD 2500 // unit: 10-7Kg*m2, Rotational inertia
|
|
|
+#define M_MAGNETIC_MATERIAL Ferrite // unit:Null
|
|
|
+#define M_FLUX_WB 5360 // unit: 0.001mWb, Flux linkage
|
|
|
+#define M_ID_MAX_AP 0 //-25 // unit: 0.01A, Max d axis current
|
|
|
+#define M_ID_MIN_AP -300 // unit: 0.01A, Min d axis current
|
|
|
+#define M_IS_PEAK_MAX_AP 5500 // unit: 0.01A, Max phase current(below base speed)
|
|
|
+#define M_POWER_MAX_WT 600 // unit: W, Max power
|
|
|
+#define M_R_SPD_RPM 5000 // unit: r/min, rate spd
|
|
|
+#define M_R_PWR_WT 250 // unit: W, rate power
|
|
|
+#define M_R_IRMS_A 2500 // unit: 0.01A, rate Irms
|
|
|
+#define M_R_UDC_v 480 // unit: 0.1V, rate Udc
|
|
|
+#define M_MAX_TOR_NM 30 // unit: 0.1Nm, Max tor
|
|
|
+
|
|
|
+#elif (MOTOR_ID_SEL == MOTOR_WELLING_CITY_36V)
|
|
|
#define M_POLE_PAIRS 7 // unit:Null,Pole pairs
|
|
|
#define M_RS_OHM 150 // unit: 0.1mOhm, Phase resistance
|
|
|
#define M_MATERIAL Al // unit:Null
|
|
@@ -92,7 +123,7 @@ Update Time
|
|
|
#define M_LQ_TURN2_IQ_AP 700 // unit: 0.01A,
|
|
|
#define M_LQ_TURN2_LQ_MH 10200 // unit: 0.01uH,Q axis inductance
|
|
|
#define M_LQ_MIN_MH 10200 // unit: 0.01uH,Q axis inductance
|
|
|
-#define M_JD 300 // unit: 10-7Kg*m2, Rotational inertia
|
|
|
+#define M_JD 2500 // unit: 10-7Kg*m2, Rotational inertia
|
|
|
#define M_MAGNETIC_MATERIAL Ferrite // unit:Null
|
|
|
#define M_FLUX_WB 4800//5056 // unit: 0.001mWb, Flux linkage
|
|
|
#define M_ID_MAX_AP 0 //-25 // unit: 0.01A, Max d axis current
|
|
@@ -104,8 +135,37 @@ Update Time
|
|
|
#define M_R_IRMS_A 2500 // unit: 0.01A, rate Irms
|
|
|
#define M_R_UDC_v 360 // unit: 0.1V, rate Udc
|
|
|
#define M_MAX_TOR_NM 30 // unit: 0.1Nm, Max tor
|
|
|
-#endif
|
|
|
|
|
|
+#elif (MOTOR_ID_SEL == MOTOR_WELLING_CITY_48V)
|
|
|
+#define M_POLE_PAIRS 7 // unit:Null,Pole pairs
|
|
|
+#define M_RS_OHM 150 // unit: 0.1mOhm, Phase resistance
|
|
|
+#define M_MATERIAL Al // unit:Null
|
|
|
+#define M_LD_NOLOAD_MH 7650 // unit: 0.01uH, D axis inductance
|
|
|
+#define M_LQ_NOLOAD_MH 10200 // unit: 0.01uH, Q axis inductance
|
|
|
+#define M_LD_TURN1_ID_AP 5000 // unit: 0.01A,
|
|
|
+#define M_LD_TURN1_LD_MH 7650 // unit: 0.01uH,D axis inductance
|
|
|
+#define M_LD_TURN2_ID_AP 700 // unit: 0.01A,
|
|
|
+#define M_LD_TURN2_LD_MH 7650 // unit: 0.01uH,D axis inductance
|
|
|
+#define M_LD_MIN_MH 7650 // unit: 0.01uH,D axis inductance
|
|
|
+#define M_LQ_TURN1_IQ_AP 200 // unit: 0.01A,
|
|
|
+#define M_LQ_TURN1_LQ_MH 10200 // unit: 0.01uH,Q axis inductance
|
|
|
+#define M_LQ_TURN2_IQ_AP 700 // unit: 0.01A,
|
|
|
+#define M_LQ_TURN2_LQ_MH 10200 // unit: 0.01uH,Q axis inductance
|
|
|
+#define M_LQ_MIN_MH 10200 // unit: 0.01uH,Q axis inductance
|
|
|
+#define M_JD 2500 // unit: 10-7Kg*m2, Rotational inertia
|
|
|
+#define M_MAGNETIC_MATERIAL Ferrite // unit:Null
|
|
|
+#define M_FLUX_WB 4800//5056 // unit: 0.001mWb, Flux linkage
|
|
|
+#define M_ID_MAX_AP 0 //-25 // unit: 0.01A, Max d axis current
|
|
|
+#define M_ID_MIN_AP -300 // unit: 0.01A, Min d axis current
|
|
|
+#define M_IS_PEAK_MAX_AP 5500 // unit: 0.01A, Max phase current(below base speed)
|
|
|
+#define M_POWER_MAX_WT 600 // unit: W, Max power
|
|
|
+#define M_R_SPD_RPM 5000 // unit: r/min, rate spd
|
|
|
+#define M_R_PWR_WT 250 // unit: W, rate power
|
|
|
+#define M_R_IRMS_A 2500 // unit: 0.01A, rate Irms
|
|
|
+#define M_R_UDC_v 480 // unit: 0.1V, rate Udc
|
|
|
+#define M_MAX_TOR_NM 30 // unit: 0.1Nm, Max tor
|
|
|
+
|
|
|
+#endif
|
|
|
/*======================================================================*
|
|
|
IPM Paremeters
|
|
|
*=======================================================================*/
|
|
@@ -130,26 +190,36 @@ Update Time
|
|
|
#define ALM_ROTOR_LOCK_TM 3 // unit: s, Time of duration(TBC)
|
|
|
#define ALM_ROTOR_LOCK_IQ_ABS 4500 // unit: 0.01A, Threshold value
|
|
|
#define ALM_ROTOR_LOCK_SPD 100 // unit: rpm, Threshold value
|
|
|
-/* Over voltage */
|
|
|
-//#define ALM_OVR_VLT_LVL1_VAL 460 // unit: 0.1V, Threshold value level1
|
|
|
-//#define ALM_OVR_VLT_LVL1_TM 2 // unit: s, Time of duration level1(TBS)
|
|
|
-//#define ALM_OVR_VLT_LVL2_VAL 470 // unit: 0.1V, Threshold value level2
|
|
|
-//#define ALM_OVR_VLT_LVL2_TM 100 // unit: ms, Time of duration level2(TBS)
|
|
|
-//#define ALM_OVR_VLT_LVL3_VAL 480 // unit: 0.1V, Threshold value level3
|
|
|
-//#define ALM_OVR_VLT_LVL3_TM 5 // unit: ms, Time of duration level3(TBS)
|
|
|
|
|
|
+#if ((MOTOR_ID_SEL == MOTOR_WELLING_CITY_36V) || (MOTOR_ID_SEL == MOTOR_WELLING_MTB_36V))
|
|
|
+/* Over voltage */
|
|
|
#define ALM_OVR_VLT_LVL1_VAL 550 // unit: 0.1V, Threshold value level1
|
|
|
#define ALM_OVR_VLT_LVL1_TM 2 // unit: s, Time of duration level1(TBS)
|
|
|
-#define ALM_OVR_VLT_LVL2_VAL 550 // unit: 0.1V, Threshold value level2
|
|
|
+#define ALM_OVR_VLT_LVL2_VAL 560 // unit: 0.1V, Threshold value level2
|
|
|
#define ALM_OVR_VLT_LVL2_TM 100 // unit: ms, Time of duration level2(TBS)
|
|
|
-#define ALM_OVR_VLT_LVL3_VAL 550 // unit: 0.1V, Threshold value level3
|
|
|
+#define ALM_OVR_VLT_LVL3_VAL 570 // unit: 0.1V, Threshold value level3
|
|
|
#define ALM_OVR_VLT_LVL3_TM 5 // unit: ms, Time of duration level3(TBS)
|
|
|
-
|
|
|
/* Under voltage */
|
|
|
#define ALM_UNDR_VLT_LVL1_VAL 260 // unit: 0.1V, Threshold value level1
|
|
|
#define ALM_UNDR_VLT_LVL1_TM 2 // unit: s, Time of duration level1(TBS)
|
|
|
-#define ALM_UNDR_VLT_LVL2_VAL 250 // unit: 0.1V, Threshold value level2
|
|
|
+#define ALM_UNDR_VLT_LVL2_VAL 240 // unit: 0.1V, Threshold value level2
|
|
|
#define ALM_UNDR_VLT_LVL2_TM 2 // unit: ms, Time of duration level2(TBS)
|
|
|
+
|
|
|
+#elif ((MOTOR_ID_SEL == MOTOR_WELLING_CITY_48V) || (MOTOR_ID_SEL == MOTOR_WELLING_MTB_48V))
|
|
|
+/* Over voltage */
|
|
|
+#define ALM_OVR_VLT_LVL1_VAL 598 // unit: 0.1V, Threshold value level1
|
|
|
+#define ALM_OVR_VLT_LVL1_TM 2 // unit: s, Time of duration level1(TBS)
|
|
|
+#define ALM_OVR_VLT_LVL2_VAL 611 // unit: 0.1V, Threshold value level2
|
|
|
+#define ALM_OVR_VLT_LVL2_TM 100 // unit: ms, Time of duration level2(TBS)
|
|
|
+#define ALM_OVR_VLT_LVL3_VAL 624 // unit: 0.1V, Threshold value level3
|
|
|
+#define ALM_OVR_VLT_LVL3_TM 5 // unit: ms, Time of duration level3(TBS)
|
|
|
+/* Under voltage */
|
|
|
+#define ALM_UNDR_VLT_LVL1_VAL 364 // unit: 0.1V, Threshold value level1
|
|
|
+#define ALM_UNDR_VLT_LVL1_TM 2 // unit: s, Time of duration level1(TBS)
|
|
|
+#define ALM_UNDR_VLT_LVL2_VAL 338 // unit: 0.1V, Threshold value level2
|
|
|
+#define ALM_UNDR_VLT_LVL2_TM 2 // unit: ms, Time of duration level2(TBS)
|
|
|
+
|
|
|
+#endif
|
|
|
/* Over speed */
|
|
|
#define ALM_OVR_SPD_VAL 6000 // unit: rpm, Threshold value
|
|
|
#define ALM_OVR_SPD_TM 100 // unit: ms, Time of duration(TBS)
|