#include #include #include "succus
h" #include #include #include #include #include #define parameterPID 0
1 //PID 常数 #define maxcontroldata 10 //最大控制量 #define parameterfuzzy 12 //模糊控制常数 #define Pe1 4 //隶属度范围 #define Pe2 8 #define Psess1 2 #define Psess2 4 #define parainput 100 //输入常数 static int panelHandle; static int L_PIDstart; //运行标签 static int L_fuzzystart; static float P_control; //获得参数 static float I_control; static float D_control; static int whatmode; static float model_K; //模型参数 static float model_T; static float model_t; static float cycle; //设定周期 static float savedata[3]; //储存偏差量 static float savecontrol[20]; //存储控制量 static float result[2]; //存储仿真结果 static float getsum; static char senddata[22]; //通信协议 static char recievedata[18]; static char nak[6]; static char ack[6]; int main