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

📄 incurmod.c

📁 dsPIC数字信号控制器对于交流感应电机矢量控制的应用笔记的源代码及详细说明资料(中文)
💻 C
字号:
// Scaling for current model routine

#include "general.h"
#include "Parms.h"
#include "CurModel.h"

/**********************************************************
InitCurModelScaling

Initialize scaling constants for current model routine.

Physical constants:
  fRotorTmConst        Rotor time constant in sec

Physical form of equations:
  Magnetizing current (amps):
     Imag = Imag + (fLoopPeriod/fRotorTmConst)*(Id - Imag)

  Slip speed in RPS:
     VelSlipRPS = (1/fRotorTmConst) * Iq/Imag / (2*pi)

  Rotor flux speed in RPS:
     VelFluxRPS = iPoles * VelMechRPS + VelSlipRPS

  Rotor flux angle (radians):
     AngFlux = AngFlux + fLoopPeriod * 2 * pi * VelFluxRPS

Scaled Variables:
  qImag      Magnetizing current scaled by maximum current
  qVelSlip   Mechnical Slip velocity in RPS scaled by fScaleMechRPS
  qAngFlux   Flux angle scaled by pi

Scaled Equations:
  qImag      = qImag + qKcur * (qId - qImag)
  qVelSlip   = Kslip * qIq/qImag
  qAngFlux   = qAngFlux + Kdelta * (qVelMech + qVelSlip)

Scaling factors:
  qKcur = (2^15) * (fLoopPeriod/fRotorTmConst)
  qKdelta = (2^15) * 2 * iPoles * fLoopPeriod * fScaleMechRPS
  qKslip = (2^15)/(2 * pi * fRotorTmConst * iPoles * fScaleMechRPS)



**********************************************************/

bool InitCurModelScaling( void )
{
    CurModelParm.qKcur = 32768.0 * MotorParm.fLoopPeriod / MotorParm.fRotorTmConst;

    CurModelParm.qKdelta = 32768.0 * 2 * MotorParm.iPoles * MotorParm.fLoopPeriod * MotorParm.fScaleMechRPS;

    CurModelParm.qKslip = 32768.0/(6.2832 * MotorParm.iPoles * MotorParm.fScaleMechRPS*MotorParm.fRotorTmConst);

    // Maximum allowed slip speed
    CurModelParm.qMaxSlipVel = 32768.0/8;

    // Initialize private variables used by CurrModel
    InitCurModel();
    return False;
}

⌨️ 快捷键说明

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