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

📄 pid.h

📁 智能小车导航
💻 H
字号:
// PID.h: interface for the CPID class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PID_H__AC3243F0_9280_4C3A_BA24_EE695334CB23__INCLUDED_)
#define AFX_PID_H__AC3243F0_9280_4C3A_BA24_EE695334CB23__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CPID  
{
public:
	CPID();
	virtual ~CPID();
private:
	int ThetaFB;
	int ThetaExp;
	float integral;
	float Kp;
	float Ki;
	float Kd;
	int DeadBand;
	int LastError;
public:
	void ClearHistory();
	//pid参数的确省值
	void pid_tune(float m_Kp=0.5,float m_Ki=0.001,float m_Kd=0.001,int m_DeadBand=2);
	float pid_calc(int g_phei);
};

#endif // !defined(AFX_PID_H__AC3243F0_9280_4C3A_BA24_EE695334CB23__INCLUDED_)





















⌨️ 快捷键说明

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