release 0.1.15
[liba.git] / lua / src / pid_neuro.h
blob39e69e94374b209df44ee06b9fb47a8ead5066b1
1 /***
2 single neuron proportional integral derivative controller
3 @classmod a.pid_neuro
4 */
6 #ifndef LUA_LIBA_PID_NEURO_H
7 #define LUA_LIBA_PID_NEURO_H
9 #include "a.h"
11 /***
12 single neuron proportional integral derivative controller
13 @field k proportional output coefficient
14 @field kp proportional learning constant
15 @field ki integral learning constant
16 @field kd derivative learning constant
17 @field wp proportional weight
18 @field wi integral weight
19 @field wd derivative weight
20 @field outmax maximum final output
21 @field outmin minimum final output
22 @field out controller final output
23 @field fdb cache feedback
24 @field err cache error
25 @field ec error change
26 @table a.pid_neuro
28 #if defined(__cplusplus)
29 extern "C" {
30 #endif /* __cplusplus */
32 /***
33 constructor for single neuron PID controller
34 @treturn a.pid_neuro single neuron PID controller userdata
35 @function new
37 int liba_pid_neuro_new(lua_State *L);
39 /***
40 initialize for single neuron PID controller
41 @treturn a.pid_neuro single neuron PID controller userdata
42 @function init
44 int liba_pid_neuro_init(lua_State *L);
46 /***
47 set proportional integral derivative constant for single neuron PID controller
48 @tparam number k proportional output coefficient
49 @tparam number kp proportional learning constant
50 @tparam number ki integral learning constant
51 @tparam number kd derivative learning constant
52 @treturn a.pid_neuro single neuron PID controller userdata
53 @function set_kpid
55 int liba_pid_neuro_set_kpid(lua_State *L);
57 /***
58 set proportional integral derivative weight for single neuron PID controller
59 @tparam number wp proportional weight
60 @tparam number wi integral weight
61 @tparam number wd derivative weight
62 @treturn a.pid_neuro single neuron PID controller userdata
63 @function set_wpid
65 int liba_pid_neuro_set_wpid(lua_State *L);
67 /***
68 calculate for single neuron PID controller
69 @tparam number set setpoint value
70 @tparam number fdb feedback value
71 @treturn number setpoint value
72 @function run
74 int liba_pid_neuro_run(lua_State *L);
76 /***
77 calculate for incremental single neuron PID controller
78 @tparam number set setpoint value
79 @tparam number fdb feedback value
80 @treturn number output value
81 @function inc
83 int liba_pid_neuro_inc(lua_State *L);
85 /***
86 zeroing for single neuron PID controller
87 @treturn a.pid_neuro single neuron PID controller userdata
88 @function zero
90 int liba_pid_neuro_zero(lua_State *L);
92 #if defined(__cplusplus)
93 } /* extern "C" */
94 #endif /* __cplusplus */
96 #endif /* pid/neuron.h */