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

📄 smopos.h

📁 TI的digital motor control lib的源代码。了解TI的编程规范
💻 H
字号:
/* =================================================================================
File name:        SMOPOS.H                     
                    
Originator:	Digital Control Systems Group
			Texas Instruments   
			

Description: 
Header file containing constants, data type definitions, and 
function prototypes for the SMOPOS_CALC module.

Note that thetae = (0,7FFFh) => (0,360 degree)
 
=====================================================================================
 History:
-------------------------------------------------------------------------------------
 03-01-2001		Release	Rev 1.0                                                   
------------------------------------------------------------------------------*/

#ifndef __SMOPOS_H__
#define __SMOPOS_H__

typedef struct {  int  vsalfa;   	/* Input: Stationary alfa-axis stator voltage (Q15) */
                  int  esalfa;   	/* Variable: Stationary alfa-axis back EMF (Q15) */
                  int  zalfa;      	/* Output: Stationary alfa-axis sliding control (Q15) */
                  int  gsmopos;    	/* Parameter: Motor dependent control gain (Q15) */
                  int  isalfae;    	/* Variable: Estimated stationary alfa-axis stator current (Q15) */
                  int  fsmopos;    	/* Parameter: Motor dependent plant matrix (Q15) */
                  int  vsbeta;   	/* Input: Stationary beta-axis stator voltage (Q15) */
                  int  esbeta;  	/* Variable: Stationary beta-axis back EMF (Q15) */
                  int  zbeta;      	/* Output: Stationary beta-axis sliding control (Q15) */
                  int  isbetae;    	/* Variable: Estimated stationary beta-axis stator current (Q15) */
                  int  isalfa;  	/* Input: Stationary alfa-axis stator current (Q15) */
                  int  isalfaerr;  	/* Variable: Stationary alfa-axis current error (Q15) */                
                  int  kslide;     	/* Parameter: Sliding control gain (Q15) */
                  int  isbeta;  	/* Input: Stationary beta-axis stator current (Q15) */
                  int  isbetaerr;  	/* Variable: Stationary beta-axis current error (Q15) */                
                  int  esalfalo;   	/* Variable: Stationary alfa-axis back EMF - low word */                    
                  int  kslf;       	/* Parameter: Sliding control filter gain (Q15) */
                  int  esbetalo;   	/* Variable: Stationary beta-axis back EMF - low word */                    
                  int  thetau;     	/* Varialbe: Estimated rotor angle (Q15) */
                  int  thetae;     	/* Output: Compensated rotor angle (Q15) */
    		  	  int  comp_ang_flg; /* Input: Compensated rotor angle flag, 1=comp., 0=no comp. */ 
                  int  speedref;   	/* Input: Reference speed (Q15) */
                  int  (*calc)(); 	/* Pointer to calculation function */ 
				 } SMOPOS;	            

/*-----------------------------------------------------------------------------
Default initalizer for the SMOPOS object.
-----------------------------------------------------------------------------*/                     
#define SMOPOS_DEFAULTS { 0x0000,  /* vsalfa (Q15) */  \
                          0x0000,  /* esalfa (Q15) */ \
                          0x0000,  /* zalfa (Q15) */  \
                           19677,  /* gsmopos (Q15) */  \
                          0x0000,  /* isalfae (Q15) */  \
                           32097,  /* fsmopos (Q15) */  \
                          0x0000,  /* vsbeta (Q15) */ \
                          0x0000,  /* esbeta (Q15) */ \
                          0x0000,  /* zbetal (Q15) */ \
                          0x0000,  /* isbetae (Q15) */  \
                          0x0000,  /* isalfa (Q15) */  \
                          0x0000,  /* isalfaerr (Q15) */  \
                            5419,  /* kslide (Q15) */ \
                          0x0000,  /* isbeta (Q15) */  \
                          0x0000,  /* isbetaerr (Q15) */  \
                          0x0000,  /* esalfalo */  \
                            5147,  /* kslf (Q15) */  \
                          0x0000,  /* esbetalo */  \
                          0x0000,  /* thetau (Q15) */  \
                          0x0000,  /* thetae (Q15) */  \
                               0,  /* comp_ang_flg (Q0) */  \
                          0x0000,  /* speedref (Q15) */ \
              			  (int (*)(int))smopos_calc }

/*------------------------------------------------------------------------------
Prototypes for the functions in SMOPOS.ASM
------------------------------------------------------------------------------*/
void smopos_calc(SMOPOS *);

#endif /* __SMOPOS_H__ */

⌨️ 快捷键说明

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