⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parms.h

📁 dsPIC对于交流感应电机矢量控制的应用笔记的源代码(中文)
💻 H
字号:
#ifndef Parms_H
#define Parms_H

EXT float fWork;
EXT short iWork;

EXT struct {

  // Required physical quantities:

    int   iPoles;         // Number of pole pairs
    int   iScaleMechRPM;  // 8 times nominal mechanical speed of motor (in RPM)
    int   iCntsPerRev;    // Encoder counts per revolution as detected by the
                          //       dsPIC quadrature configuration.

    float fRotorTmConst;  // Rotor time constant in sec
                          // Calculated from rotor inductance / rotor resistance

  // Required software quantities:

    float fLoopPeriod;    // Basic loop period (in sec).

    float fVelIrpPeriod;  // Encoder velocity interrupt period (in sec). 

    int   iIrpPerCalc;    // Number of vel interrupts per velocity calculation.


  // Derived quantities:
    float fScaleMechRPS;    // Scale mechanical speed of motor (in rev/sec)
    
    float fScaleFluxRPS;    // Scale flux speed of motor (in rev/sec)

    float fScaleFluxSpeed;  // Scale flux speed of motor (in radians/sec)
                            // Used for all speed scaling

    float fScaleFluxPeriod; // Period of one revolution of flux vector (in sec) 
                            //   at Scaled speed

    // Fraction of revolution per LoopTime at scaled flux velocity
    float fScaleFracRevPerLoop; 

    long  lScaleCntRate;    // Encoder count rate at iScaleMechRPM

} MotorParm;


bool InitMotorParm(void);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -