DCAITI Robot Hardware  1.0
fuzzy_table.h
Go to the documentation of this file.
1 
2 #if 0
3 #ifndef _PID_TABLE_H_
4 #define _PID_TABLE_H_
5 
6 #define PB 6
7 #define PM 5
8 #define PS 4
9 #define ZO 3
10 #define NS 2
11 #define NM 1
12 #define NB 0
13 
14 #define DELTA_KP_IDX 0
15 #define DELATA_KI_IDX 1
16 #define ERR 7
17 #define DELTA_ERR 7
18 
19 
20 const char pid_tbl[2][7][7]={
21  {
22  {PB,PB,PM,PM,PS,ZO,ZO},
23  {PB,PB,PM,PS,PS,ZO,ZO},
24  {PM,PM,PM,PS,ZO,NS,NS},
25  {PM,PM,PS,ZO,NS,NM,NM},
26  {PS,PS,ZO,NS,NS,NM,NM},
27  {PS,ZO,NS,NM,NM,NM,NB},
28  {ZO,ZO,NM,NM,NM,NB,NB},
29  },
30 
31  {
32  {NB,NB,NM,NM,NS,ZO,ZO},
33  {NB,NB,NM,NS,NS,ZO,ZO},
34  {NB,NM,NS,NS,ZO,PS,PS},
35  {NM,NM,NS,ZO,PS,PM,PM},
36  {NM,NS,ZO,PS,PS,PM,PB},
37  {ZO,ZO,PS,PS,PM,PB,PB},
38  {ZO,ZO,PS,PM,PM,PB,PB},
39  },
40  };
41 
42 const float kp_tbl[ERR] = {
43  0.07987,
44  0.08974,
45  0.09948,
46  0.12922,
47  0.54896,
48  0.70000,
49  0.76000,
50  };
51 
52 
53 const float ki_tbl[DELTA_ERR] = {
54  0.02451,
55  0.07353,
56  0.14706,
57  0.19608,
58  0.24510,
59  0.30000,
60  0.00000,
61  };
62 
63 #endif _PID_TABLE_H_
64 
65 #endif
66