📄 parameter.h
字号:
#ifndef PARAMETER_H
#define PARAMETER_H
/*-------------------------------------------------------------------------------
Next, definitions used in main file.
-------------------------------------------------------------------------------*/
#define PI 3.14159265358979
/* Define the system frequency (MHz) */
#define SYSTEM_FREQUENCY 150
/* Define the samping period for simulation (sec) */
#define SAMPLING_PERIOD 0.000125
/* Define top value of counter for delaying foundation of flux */
#define flux_delay_max 10000
/* Define the Induction motor parameters */
/*****************************************************************/
#define RS 2.74 // Stator resistance (ohm)
#define RR 2.54 // Rotor resistance (ohm)
#define LS 0.3128 // Stator inductance (H)
#define LR 0.3128 // Rotor inductance (H)
#define LM 0.299 // Flux inductance (H)
#define NNP 2 // Number of double poles
#define P NNP*2 // Number of poles
#define FLUX_LEVEL_N 0.9 //额定状态er和us的比值(0.8~1)(此参数实际不独立,可算出,但计算复杂)
#define P_N (2.2e3) // Rated power (W)
#define I_N 4.9 // Rated phase current rms(A)
#define UL_N 380 // Rated line voltage rms(V)
#define F_N 50 // Rated frequency (Hz)
#define N_N 1430 // Rated rotor speed (r/min)
/**********************************************************************************/
/* Define the mechanical parameters */
#define BB 0.0001 /* Damping coefficient (N.m.sec/rad) */
#define JJ (0.0119) /* Moment of inertia of rotor mass (kg.m^2) */
#define TL 0 /* Load torque (N.m) */
#define UP_N (UL_N/1.7320508) /* Rated phase voltage rms(V) */
#define W_N (2*PI*F_N) /* Rated eletrical frequency (rad/s) */
#define WR_N (W_N*N_N/(60*F_N/NNP)) /* Rated electrical frequency rotor speed (rad/s) */
#define WSL_N (W_N-WR_N) /* Rated slide frequency (rad/s) */
#define TORQ_N (P_N/(WR_N/NNP)) /* Rated torque (Nm) */
#define FLUXR_N (FLUX_LEVEL_N*(UP_N*1.4142136/W_N)) /* Rated rotor flux linkage amplitude (Wb) */
/* Define the base quantities */
#define BASE_VOLTAGE (UP_N*1.4142136) /* Base peak phase voltage (volt) */
#define BASE_CURRENT (I_N*1.4142136) /* Base peak phase current (amp) */
#define BASE_FREQ 50//BASE_W/(2*PI) /* Base electrical frequency (Hz) */
#define BASE_W (BASE_FREQ*2*PI)//1.0/BASE_TIME /* Base angle speed (rad) */
#define BASE_TIME (1.0/BASE_W) /* Base time (s) */
#define BASE_POWER (BASE_VOLTAGE*BASE_CURRENT) /* Base power (VA) */
#define BASE_TORQUE (BASE_POWER/BASE_W) /* Base torque (N.m) */
#define BASE_FLUX (BASE_VOLTAGE*BASE_TIME) /* Base flux linkage (volt.sec/rad) */
#define BASE_R (BASE_VOLTAGE/BASE_CURRENT) /* Base resistence */
#define BASE_L (BASE_R*BASE_TIME) /* Base inductance */
#define BASE_INERTIA (BASE_TORQUE*BASE_TIME/BASE_W) /* Base inertia */
#define BASE_WKP (BASE_TORQUE*BASE_TIME) /* Base speed loop sacle plus coefficient */
#define BASE_WKI BASE_TORQUE /* Base speed loop integral plus coefficient */
#define BASE_IKP BASE_R /* Base current loop sacle plus coefficient */
#define BASE_IKI (BASE_R/BASE_TIME) /* Base current loop integral plus coefficient */
#define BASE_FKP (1.0/BASE_L) /* Base flux loop sacle plus coefficient */
#define BASE_FKI (BASE_FKP/BASE_TIME) /* Base flux loop integral plus coefficient */
/* Define the parameter of adjuster */
#define H 5 /* Bandwidth of the intermediate frequency */
#define WC_WR (10*2*PI) /* Cut-off frequency for speed loop filter (rad/s) */
#define WC_CUR (350*2*PI) /* Cut-off frequency for current loop filter (rad/s) */
#define WC_FLUX (5*2*PI) /* Cut-off frequency for flux loop filter (rad/s) */
#define WC_OFFSET (3.0/5.0) //滤除直流漂移的截止频率
#define WC_SYN (5*2*PI) /* Cut-off frequency for dq current filter (rad/s) */
/* Define the maximum of parameter */
//#define I_MAX (2.5*BASE_CURRENT) /* Max value of current output */
#define I_MAX (1.5*BASE_CURRENT) /* Max value of current output */
#define FLUX_MAX (1.5*BASE_FLUX) /* Max value of flux output */
#define VOLTAGE_MAX (BASE_VOLTAGE) /* Max value of voltage output */
#define TORQUE_MAX (1.5*TORQ_N) /* Max value of torque output */
/* Define the reference value */
#define SPEED_REF (25.000*2*PI) /* Reference rotor electronic angular speed */
#define FLUX_REF (FLUXR_N) /* Reference rotor flux */
/* Define the parameter of risistance estimation */
#endif // end of PARAMETER.H definition
//===========================================================================
// No more.
//===========================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -