📄 estim.h
字号:
// Header File for Speed estimation
#ifndef Estim_H
#define Estim_H
#define SUPPLY115VAC 1 // 115VAC Supply voltage
//------------------ C API for Control routine ---------------------
typedef struct {
int qDeltaT; // Integration constant
int qRho; // Flux angle
long qRhoStateVar; // State Variable of Flux angle
int qOmegaMr; // Flux frequency
int qLastIalpha; // Value from last control step Ialpha
int qLastIbeta; // Value from last control step Ibeta
int qDIalpha; // Derivative Ialpha
int qDIbeta; // Derivative Ibera
int qEsa; // alpha component back emf
int qEsb; // beta component back emf
int qEsd; // direct component back emf
int qEsq; // quadrature component back emf
int qImr; // amplitude of magnetising current
long qImrStateVar; // state variable of Imr
int qDiCounter; // Counter for derivative
int qVIndalpha; // Inductance voltage:Alpha comp.
int qVIndbeta; // Inductance voltage:Beta comp.
int qEsdf; // fileterd direct component back emf
long qEsdStateVar; // state variable Esd
int qKfilterd; // Filter Konstant Esd
int qEsqf; // filtered quadrature component back emf
long qEsqStateVar; // State variable Esq
int qKfilterq; // Filter Konstant Esq
int qVelEstim; // Estimated electrical speed
int qVelEstimFilterK; // Filter Konstant for Estimated speed
long qVelEstimStateVar;// State Variable for Estimated speed
int qOmeg2Estim; // Estimated slip frequency in 1.15
int qOmegaMrMax; // positive limit OmegaMr
int qOmegaMrMin; // negative limit OmegaMr
int qVelEstimMech;// estimated mechanical speed
int qInvPol; // 1/polpare numbare
} tEstimParm;
typedef struct {
int qRs; // Rs=9.7 Ohm
int qLsDt; // Ts=4ms, Ls=38.8 mH
int qInvPsi; // LM=30mH, Imr=2A,
int qInvTr;
int qRrInvTr;
int qInvPoles;
} tMotorEstimParm;
typedef struct {
int qVelMinContrOff;
// int qVelMinContrOn;
// int qRamp;
// int qCurrentRef;
// int qEpsRamp;
} tStartupParm;
void Estim(void);
void InitEstimParmLeeson(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -