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

📄 mc.h

📁 基于FREESCALE MC56F802 BLDC的源程序
💻 H
字号:
/******************************************************************************
*
* Motorola Inc.
* (c) Copyright 2000 Motorola, Inc.
* ALL RIGHTS RESERVED.
*
*******************************************************************************
*
* FILE NAME: mc.h
*
*******************************************************************************/

#ifndef __MC_H
#define __MC_H

#include "types.h"

#ifdef __cplusplus
extern "C" {
#endif

/******************************************************************************
*
*                      General Interface Description
*
* This Motor Control header file (mc.h) contains generally useful and generic 
* types that are used throughout the domain of motor control.
*
******************************************************************************/

typedef enum
{
	mcPhaseA,
	mcPhaseB,
	mcPhaseC
} mc_ePhaseType;

typedef struct
{
	Frac16 PhaseA;
	Frac16 PhaseB;
	Frac16 PhaseC;
} mc_s3PhaseSystem;

/* general types, primary used in FOC */

typedef struct
{
	Frac16 alpha;
	Frac16 beta;
} mc_sPhase;


typedef struct
{
	Frac16 sine;
	Frac16 cosine;
} mc_sAngle;


typedef struct
{
	Frac16 d_axis;
	Frac16 q_axis;
} mc_sDQsystem;


typedef struct
{
	Frac16 psi_Rd;
	Frac16 omega_field;
	Frac16 i_Sd;
	Frac16 i_Sq;
} mc_sDQEstabl;



typedef UWord16 mc_tPWMSignalMask;    /*  pwm_tSignalMask contains six control bits
										representing six PWM signals, shown below.
										The bits can be combined in a numerical value
										that represents the union of the appropriate
										bits.  For example, the value 0x15 indicates
										that PWM signals 0, 2, and 4 are set.
									 */
										
#define MC_PWM_SIGNAL_0       0x0001
#define MC_PWM_SIGNAL_1       0x0002
#define MC_PWM_SIGNAL_2       0x0004
#define MC_PWM_SIGNAL_3       0x0008
#define MC_PWM_SIGNAL_4       0x0010
#define MC_PWM_SIGNAL_5       0x0020
#define MC_PWM_NO_SIGNALS     0x0000     /* No (none) PWM signals */ 
#define MC_PWM_ALL_SIGNALS   (MC_PWM_SIGNAL_0 | \
										MC_PWM_SIGNAL_1 | \
										MC_PWM_SIGNAL_2 | \
										MC_PWM_SIGNAL_3 | \
										MC_PWM_SIGNAL_4 | \
										MC_PWM_SIGNAL_5)
  


/* general types, primary used in PI, PID and other controllers */

typedef struct
{
   Word16 ProportionalGain;
   Word16 ProportionalGainScale;
   Word16 IntegralGain;
   Word16 IntegralGainScale;
   Word16 DerivativeGain;
   Word16 DerivativeGainScale;
   Word16 PositivePIDLimit;
   Word16 NegativePIDLimit;
   Word16 IntegralPortionK_1;
   Word16 InputErrorK_1;
}mc_sPIDparams;


typedef struct
{
   Word16 ProportionalGain;
   Word16 ProportionalGainScale;
   Word16 IntegralGain;
   Word16 IntegralGainScale;
   Word16 PositivePILimit;
   Word16 NegativePILimit;
   Word16 IntegralPortionK_1;
}mc_sPIparams;




#ifdef __cplusplus
}
#endif
										
#endif

⌨️ 快捷键说明

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