liba 0.1.15
An algorithm library based on C/C++
Loading...
Searching...
No Matches
pid_neuro.h
Go to the documentation of this file.
1
21#ifndef LIBA_PID_NEURO_H
22#define LIBA_PID_NEURO_H
23
24#include "pid.h"
25
32typedef struct a_pid_neuro a_pid_neuro;
33
34#if defined(__cplusplus)
35extern "C" {
36#endif /* __cplusplus */
37
42#define a_pid_neuro_init(ctx) a_pid_neuro_zero(ctx)
43
53
62
71
80
85A_EXTERN void a_pid_neuro_zero(a_pid_neuro *ctx);
86
87#if defined(__cplusplus)
88} /* extern "C" */
89namespace a
90{
91typedef struct a_pid_neuro pid_neuro;
92} /* namespace a */
93#endif /* __cplusplus */
94
99{
106#if defined(__cplusplus)
107 A_INLINE void init() { a_pid_neuro_init(this); }
108 A_INLINE void set_kpid(a_float k_, a_float kp, a_float ki, a_float kd)
109 {
110 a_pid_neuro_set_kpid(this, k_, kp, ki, kd);
111 }
112 A_INLINE void set_wpid(a_float wp_, a_float wi_, a_float wd_)
113 {
114 a_pid_neuro_set_wpid(this, wp_, wi_, wd_);
115 }
116 A_INLINE a_float run(a_float set, a_float fdb)
117 {
118 return a_pid_neuro_run(this, set, fdb);
119 }
120 A_INLINE a_float inc(a_float set, a_float fdb)
121 {
122 return a_pid_neuro_inc(this, set, fdb);
123 }
124 A_INLINE void zero() { a_pid_neuro_zero(this); }
125#endif /* __cplusplus */
126};
127
130#endif /* a/pid_neuro.h */
#define a_float
Definition a.h:785
double a_pid_neuro_run(a_pid_neuro *ctx, double set, double fdb)
calculate for single neuron PID controller
void a_pid_neuro_set_wpid(a_pid_neuro *ctx, double wp, double wi, double wd)
set proportional integral derivative weight for single neuron PID controller
#define a_pid_neuro_init(ctx)
initialize for single neuron PID controller
Definition pid_neuro.h:42
void a_pid_neuro_set_kpid(a_pid_neuro *ctx, double k, double kp, double ki, double kd)
set proportional integral derivative constant for single neuron PID controller
double a_pid_neuro_inc(a_pid_neuro *ctx, double set, double fdb)
calculate for incremental single neuron PID controller
void a_pid_neuro_zero(a_pid_neuro *ctx)
zeroing for single neuron PID controller
proportional integral derivative controller
instance structure for single neuron PID controller
Definition pid_neuro.h:99
double wi
integral weight
Definition pid_neuro.h:103
a_pid pid
instance structure for PID controller
Definition pid_neuro.h:100
double ec
error change
Definition pid_neuro.h:105
double wd
derivative weight
Definition pid_neuro.h:104
double wp
proportional weight
Definition pid_neuro.h:102
double k
proportional output coefficient
Definition pid_neuro.h:101
instance structure for PID controller
Definition pid.h:106