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

📄 pid_reg3.h

📁 TI公司的经典PID控制程序
💻 H
字号:
/* ===========================================================================
File name:       PID_REG3.H  (IQ version)                    
                    
Originator:	Digital Control Systems Group
			Texas Instruments

Description: 
Header file containing constants, data type definitions, and 
function prototypes for the PIDREG3.
==============================================================================
 History:
------------------------------------------------------------------------------
 04-15-2005	Version 3.20
----------------------------------------------------------------------------*/
#ifndef __PIDREG3_H__
#define __PIDREG3_H__

typedef struct {  
                  _iq  Ref;   			// Input: Reference input 
				  _iq  Fdb;   			// Input: Feedback input 
				  _iq  Err;				// Variable: Error
				  _iq  Err1;            // Variable: Error1
				  _iq  Kp;				// Parameter: Proportional gain
				  _iq  Up;				// Variable: Proportional output 
				  _iq  Ki;			    // Parameter: Integral gain
				  _iq  Ui;				// Variable: Integral output  	
				  _iq  DeltaOut; 		// Variable: Pre-saturated output
				  _iq  DeltaOutMax;    // Parameter: Maximum output 
				  _iq  DeltaOutMin;   	// Parameter: Minimum output
				  _iq  Out;   			// Output: PID output
				  _iq  OutMax;          //
				  _iq  OutMin;          //
		 	 	  void  (*calc)();	  	// Pointer to calculation function
				 } PIDREG3;	            

typedef PIDREG3 *PIDREG3_handle;
/*--------------------------------------------------------------------------
Default initalizer for the PIDREG3 object.
----------------------------------------------------------------------------*/                     
/*#define PIDREG3_DEFAULTS { 0, \
                           0, \
                           0, \
						   0, \
                           _IQ(1.3), \
                           0, \
						   _IQ(0.02), \
                           0, \
                           0, \
                           _IQ(1), \
                           _IQ(-1), \
                           0, \
						 
              			  (void (*)(Uint32))pid_reg3_calc }*/

/*----------------------------------------------------------------------------
Prototypes for the functions in PIDREG3.C
----------------------------------------------------------------------------*/
void pid_reg3_calc(PIDREG3_handle);
void PID_Voltage_Loop(_iq Ref,_iq Fdb);
void PID_Current_Loop(_iq Ref,_iq Fdb);

#ifndef Limit_Pid_Delta
#define Limit_Pid_Delta 1
#endif


extern PIDREG3 PID_Voltage;
extern PIDREG3 PID_Current;




#endif // __PIDREG3_H__

⌨️ 快捷键说明

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