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

📄 pmsm31.h

📁 本程序来自TI公司网站原程序,其功能是通过传统的矢量控制算法来实现对永磁同步电机的控制,矢量控制采用双闭环结构
💻 H
字号:
/* ==============================================================================
System Name:  PMSM3_1  (QEP version)

File Name:	PMSM31.H

Description:  Peripheral independent object for the implementation 
              of Sensored Field Orientation Control for a Three Phase 
              Permanent-Magnet Synchronous Motor using measured rotor angle.

Originator:		Digital control systems Group - Texas Instruments

Target dependency:	x240/1/2/3/07 
To Select the target device see target.h file.

Note that the PWM/sampling frequency in C system is running at 15 kHz, which 
is different from the PWM/samping frequency in ASM system (i.e., 20 kHz) as 
indicated in the PMSM3-2 system documentation. Also, this PWM/samping frequency
in both ASM and C systems are based on x2407 with 30 MHz clock. If the x243 with
20 MHz clock is used, then the PWM/samping frequency may be decreased accordingly.   
			
=====================================================================================
 History:
-------------------------------------------------------------------------------------
 03-01-2001	Release	Rev 1.0
=================================================================================  */

/*-----------------------------------------------------------------------------*/
/* Get target information.                                                     */
/*-----------------------------------------------------------------------------*/
#include <TARGET.H>

#if (TARGET==F243)
#include <regs24x.h> 
#endif


#if (TARGET==F2407)                      
#include <regs240x.h> 
#endif

/*-------------------------------------------------------------------------------
    Get buildlevel information.
-------------------------------------------------------------------------------*/
#include <build.h>

/*------------------------------------------------------------------------------
    Include file containing the system vectors.
    These must be set up correctly for the interrupt mechanisms to work
------------------------------------------------------------------------------*/
#include <sysvecs.h>

/*-------------------------------------------------------------------------------
Next, Include project specific include files.
-------------------------------------------------------------------------------*/
#include <EVMDAC.h>             /* Get Constants etc for the EVMDAC            */
#include <PWMGEN.h>             /* Get Constants etc for the PWM Generators    */
#include <WATCHDOG.H>           /* Get the watchdog driver interface           */
#include <QEP.h>                /* Get constants and defs for the QEP      */
#include <speed_fr.h>           /* Get constants and defs for the SPEED_MEAS Obj */
#include <Ilegmeas.h> 		 	/* Include header for the ILEG2MEAS object */
#include <foc_ti.h>             /* Include header for the FOC_TI object     */
#include <drive.h>              /* Include header for the DRIVE object     */

/*-------------------------------------------------------------------------------
    Function Prototypes for the functions implemented in PMSM31.C
-------------------------------------------------------------------------------*/
void RstSystem(void);
void rtmon_init(void);
void interrupt c_int02();
void interrupt c_int04();
void interrupt phantom(void);

#ifndef TRUE
#define FALSE ((Bool)0)
#define TRUE  ((Bool)1)
#endif

⌨️ 快捷键说明

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