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

📄 tcontrollor.h

📁 程序实现了模糊控制理论中恒温箱的模拟
💻 H
字号:
// TControllor.h: interface for the CTControllor class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TCONTROLLOR_H__9C3F7BD8_998C_442D_A21D_0E94BBBD56F5__INCLUDED_)
#define AFX_TCONTROLLOR_H__9C3F7BD8_998C_442D_A21D_0E94BBBD56F5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
struct Variable{
	float value;       //变量的值
	float lishudu[5];  //变量对于五个模糊量的隶属度->NB,NS,ZO,PS,PB
};
class CTControllor  
{
public:
	float enhance;
	void MainContrllor();
	Variable detaE; //每次采样的温度变化率
	Variable E; //当前温度与目标温度差值
	float T;	//当前温度
	CTControllor();
	virtual ~CTControllor();

private:
	void UseFun();
	int cnt;
	float GetMTW(Variable &X);
	void CalculateW();
	void WriteRules();
	float w0;
	Variable W;   //温度控制器输出量
	float using_rule_weight[9]; //推理中用到规则的权重
	int using_rule[9]; //推理使用的规则->0~8为1~9条推理规则
	void CalLishudu(Variable &v);
private:
	float Max(float a,float b);
	float Min(float a,float b);
};

#endif // !defined(AFX_TCONTROLLOR_H__9C3F7BD8_998C_442D_A21D_0E94BBBD56F5__INCLUDED_)

⌨️ 快捷键说明

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