6#ifndef LIBA_PID_FUZZY_H
7#define LIBA_PID_FUZZY_H
34#if defined(__cplusplus)
42#define a_pid_fuzzy_init(ctx) a_pid_fuzzy_zero(ctx)
77#define A_PID_FUZZY_BFUZZ(n) (sizeof(unsigned int) * (n) * 2 + sizeof(a_float) * (n) * (2 + (n)))
134#if defined(__cplusplus)
138typedef struct a_pid_fuzzy pid_fuzzy;
166#if defined(__cplusplus)
168 A_INLINE
void set_opr(
unsigned int opr_)
173 A_INLINE
void set_bfuzz(
void *ptr,
a_size num)
177 A_INLINE
void set_rule(
unsigned int nrule_,
a_float const *me_,
a_float const *mec_,
double a_float
compiler built-in floating-point number type
Definition a.h:1003
void a_pid_fuzzy_set_opr(a_pid_fuzzy *ctx, unsigned int opr)
set fuzzy relational operator for fuzzy PID controller
void a_pid_fuzzy_zero(a_pid_fuzzy *ctx)
zeroing for fuzzy PID controller
void a_pid_fuzzy_set_bfuzz(a_pid_fuzzy *ctx, void *ptr, a_size num)
set memory block for fuzzy PID controller
void * a_pid_fuzzy_bfuzz(a_pid_fuzzy const *ctx)
get memory block for fuzzy PID controller
a_float a_pid_fuzzy_pos(a_pid_fuzzy *ctx, a_float set, a_float fdb)
calculate for positional fuzzy PID controller
void a_pid_fuzzy_set_kpid(a_pid_fuzzy *ctx, a_float kp, a_float ki, a_float kd)
set proportional integral derivative constant for fuzzy PID controller
#define a_pid_fuzzy_init(ctx)
initialize for fuzzy PID controller
Definition pid_fuzzy.h:42
a_float(*)(a_float, a_float) a_pid_fuzzy_opr(unsigned int opr)
get fuzzy relational operator for fuzzy PID controller
Definition pid_fuzzy.h:49
void a_pid_fuzzy_set_rule(a_pid_fuzzy *ctx, unsigned int nrule, a_float const *me, a_float const *mec, a_float const *mkp, a_float const *mki, a_float const *mkd)
set rule base for fuzzy PID controller
a_float a_pid_fuzzy_run(a_pid_fuzzy *ctx, a_float set, a_float fdb)
calculate for fuzzy PID controller
a_float a_pid_fuzzy_inc(a_pid_fuzzy *ctx, a_float set, a_float fdb)
calculate for incremental fuzzy PID controller
@ A_PID_FUZZY_CAP
Definition pid_fuzzy.h:26
@ A_PID_FUZZY_CAP_BOUNDED
Definition pid_fuzzy.h:28
@ A_PID_FUZZY_CUP_ALGEBRA
Definition pid_fuzzy.h:30
@ A_PID_FUZZY_CUP
Definition pid_fuzzy.h:29
@ A_PID_FUZZY_CUP_BOUNDED
Definition pid_fuzzy.h:31
@ A_PID_FUZZY_EQU
Definition pid_fuzzy.h:25
@ A_PID_FUZZY_CAP_ALGEBRA
Definition pid_fuzzy.h:27
size_t a_size
unsigned integer type returned by the sizeof operator
Definition a.h:823
proportional integral derivative controller
instance structure for fuzzy PID controller
Definition pid_fuzzy.h:146
a_pid pid
Definition pid_fuzzy.h:147
a_float kd
Definition pid_fuzzy.h:162
a_float ki
Definition pid_fuzzy.h:161
a_float kp
Definition pid_fuzzy.h:160
a_float(* opr)(a_float, a_float)
Definition pid_fuzzy.h:158
a_float * val
Definition pid_fuzzy.h:156
a_float const * mec
Definition pid_fuzzy.h:150
a_float const * mki
Definition pid_fuzzy.h:152
a_float const * mkp
Definition pid_fuzzy.h:151
unsigned int nfuzz
Definition pid_fuzzy.h:165
a_float const * mkd
Definition pid_fuzzy.h:153
unsigned int nrule
Definition pid_fuzzy.h:164
a_float const * me
Definition pid_fuzzy.h:149
unsigned int * idx
Definition pid_fuzzy.h:155
instance structure for PID controller
Definition pid.h:106