#include <hidef.h> /*
common defines and macros */
#include "Derivative.h" /*
Derivative-specific definitions */
#include <mc9s12xs128.h>
//定義PID參數(shù)
#define VV_KPVALUE 3 //比例
#define VV_KIVALUE 40 //積分
#define VV_KDVALUE 3 //微分
#define VV_MAX 10000 //返回的最大值,是pwm的周期值
#define VV_MIN 0
#define VV_DEADLINE 0X08 //速度PID,設(shè)置死區(qū)范圍
typedef struct PID //定義數(shù)法核心數(shù)據(jù)
{
signed int vi_Ref; //速度PID,速度設(shè)定值
signed int vi_FeedBack; //速度PID,速度反饋值
標(biāo)簽:
PID
舵機(jī)
電機(jī)
控制算法
上傳時(shí)間:
2016-04-27
上傳用戶:547453159