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

📄 pid.h

📁 2802 步进电机控制器
💻 H
字号:
/* =================================================================================
File name:       PID.H  (IQ version)                    
                    
Originator:		ECS Development

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

typedef struct {  _iq  Ref;   		// Input: Reference input 
				  _iq  Fdb;   		// Input: Feedback input 
				  _iq  Err;			// Variable: Error
				  _iq  Kp;			// Parameter: Proportional gain
				  _iq  Up;			// Variable: Proportional output 
				  _iq  Ui;			// Variable: Integral output 
				  _iq  OutPreSat; 	// Variable: Pre-saturated output
				  _iq  OutMax;	    // Parameter: Maximum output 
				  _iq  OutMin;	   	// Parameter: Minimum output
				  _iq  Out;   		// Output: PID output 
				  _iq  SatErr;		// Variable: Saturated difference
				  _iq  Ki;		    // Parameter: Integral gain
				  _iq  Kc;	     	// Parameter: Integral correction gain
		 	 	  void  (*calc)();	  	// Pointer to calculation function
				 } PID;	            

/*-----------------------------------------------------------------------------
Default initalizer for the PID object.
-----------------------------------------------------------------------------*/                     
#define PID_DEFAULTS      { 0, \
                           0, \
                           0, \
                           _IQ(1.3), \
                           0, \
                           0, \
                           0, \
                           _IQ(1), \
                           _IQ(-1), \
                           0, \
                           0, \
                           _IQ(0.02), \
                           _IQ(0.5), \
              			  (void (*)(unsigned long))pid_calc }

/*------------------------------------------------------------------------------
Prototypes for the functions in PID.C
------------------------------------------------------------------------------*/
void pid_calc(PID *);

#endif // __PID_H__

⌨️ 快捷键说明

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