00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MOTORCONSTANTS_H
00020 #define MOTORCONSTANTS_H
00021
00022 #include "IQConstants.h"
00023
00024 #define SPMSM_ABB // Surface permanent magnet motor ABB
00025
00026 #ifdef IM
00027 #ifdef DS
00028 #undef DS
00029 #endif
00030 #ifdef MX
00031 #undef MX
00032 #endif
00033 #define QUADRATURE_AXIS_REAL
00034 #define MOTORDEFINED
00035
00036 #endif
00037
00038 #define DS // delta systems IPMS
00039 #ifdef DS
00040 #ifdef IM
00041 #undef IM
00042 #endif
00043 #ifdef MX
00044 #undef MX
00045 #endif
00046 #define DIRECT_AXIS_REAL
00047 #define MOTORDEFINED
00048
00049 #endif
00050
00051
00052 #ifdef MX
00053 #ifdef IM
00054 #undef IM
00055 #endif
00056 #ifdef DS
00057 #undef DS
00058 #endif
00059 #define DIRECT_AXIS_REAL
00060 #define MOTORDEFINED
00061
00062 #endif
00063
00064 #ifndef MOTORDEFINED
00065 #error Motor is not defined
00066 #endif
00067
00068 #define RS (12) // stator resistance [ohms]
00069 #define RR (12) // rotor resistance [ohms]
00070 #define LM (_IQ(0.0005)) // mutual inductance [henry]
00071 #define LLS (_IQ(0.00006)) // stator leakage inductance [henry]
00072 #define LLR (_IQ(0.00006)) // rotor leakage inductance [henry]
00073 #define LR (_IQ(0.06)) // rotor inductance [henry]
00074 #define LS (_IQ(0.0144)) // stator inductance [H]
00075 #define TAUS (_IQ(0.0012)) // stator time constants
00076 #define INVTAUS (_IQ(833.334)) // inverse stator time constants
00077
00078 #ifdef IM
00079 #define P (2) //number of pole pairs
00080 #define R 28 // Rotor bars
00081 #define S 36 // Stator slots
00082 #define I_LIMIT (_IQ(20)) //integrator limit [V]
00083 #define V_LIMIT (_IQ(150)) //command voltage limit (per phase +/-) [V]
00084 #define ISTAR_LIMIT (_IQ(120)) //current command limit for flux axis
00085
00086 #define INV_VBUS (_IQ(0.00333))
00087 #define I0 (_IQ(2.4)) // no load current
00088 #define Ld (_IQ(0.00082))
00089 #define Lq (_IQ(0.00082))
00090 #define TAUS (_IQ(0.0012)) // stator time constants
00091 #define INVTAUS (_IQ(833.334)) // inverse stator time constants
00092 #define TR (_IQ(0.0872756933)) // rotot time constant
00093 #define F_LINK (_IQ(0.00265258))
00094 #define SALIENCY_ORDER (_IQ(14)) // rotor saliency order
00095 #endif
00096
00097 #ifdef DS
00098 #define P (2) //number of pole pairs
00099
00100
00101
00102 #define V_LIMIT (_IQ(70)) //command voltage limit (per phase +/-) [V]
00103
00104
00105 #define INV_VBUS (_IQ(0.00505050))
00106 #define I0 (_IQ(2.68)) // no load current
00107 #define J (_IQ(0.0015)) // intertia (kg*m^2)
00108
00109 #define Ld (_IQ(0.00046)) //@2500 Hz
00110 #define Lq (_IQ(0.00055)) //@2500 Hz
00111 #define Rd (_IQ(11)) //@2500 Hz
00112 #define Rq (_IQ(16)) //@2500 Hz
00113 #define F_LINK (_IQ(0.1378))
00114 #define TR (_IQ(0)) // rotot time constant (CHANGE!!!!)
00115 #define E_LINES (2000)
00116 #define SALIENCY_ORDER (_IQ(2)) // rotor saliency order
00117 #endif
00118
00119 #ifdef MX
00120 #define P (1) //number of pole pairs
00121 #define I_LIMIT (_IQ(10)) //integrator limit [V]
00122 #define V_LIMIT (_IQ(25)) //integrator limit [V]
00123 #define ISTAR_LIMIT (_IQ(15)) //current command limit for flux axis
00124
00125 #define INV_VBUS (_IQ(0.0111111111111111111))
00126 #define I0 (_IQ(5.0)) // no load current
00127
00128 #define J (_IQ(0.0035)) // intertia (kg*m^2)
00129 #define INVJ (_IQ17(12033.6943))
00130 #define Ld (_IQ(0.00031)) // 0.00031
00131 #define Lq (_IQ(0.00035)) // 0.00035
00132 #define Rd (_IQ(3.6))
00133 #define Rq (_IQ(3.6))
00134 #define F_LINK (_IQ(0.115))
00135 #define TR (_IQ(0)) // rotot time constant (CHANGE!!!!)
00136 #define E_LINES (2000)
00137 #define SALIENCY_ORDER (_IQ(2)) // rotor saliency order
00138 #endif
00139 #endif