Module liba.pid_fuzzy
fuzzy proportional integral derivative controller
die (ctx) |
destructor for fuzzy PID controller |
new () |
constructor for fuzzy PID controller |
init (ctx) |
initialize for fuzzy PID controller |
set_opr (ctx, opr) |
set fuzzy relational operator for fuzzy PID controller |
set_nfuzz (ctx, num) |
set memory block for fuzzy PID controller |
set_rule (ctx, me, mec, mkp, mki, mkd) |
set rule base for fuzzy PID controller |
set_kpid (ctx, kp, ki, kd) |
set proportional integral derivative constant for fuzzy PID controller |
run (ctx, set, fdb) |
calculate for fuzzy PID controller |
pos (ctx, set, fdb) |
calculate for positional fuzzy PID controller |
inc (ctx, set, fdb) |
calculate for incremental fuzzy PID controller |
zero (ctx) |
zeroing for fuzzy PID controller |
op |
enumeration for fuzzy relational operator |
-
die (ctx)
-
destructor for fuzzy PID controller
Parameters:
-
new ()
-
constructor for fuzzy PID controller
Returns:
a.pid_fuzzy
fuzzy PID controller userdata
-
init (ctx)
-
initialize for fuzzy PID controller
Parameters:
Returns:
a.pid_fuzzy
fuzzy PID controller userdata
-
set_opr (ctx, opr)
-
set fuzzy relational operator for fuzzy PID controller
Parameters:
- ctx
a.pid_fuzzy
fuzzy PID controller userdata
- opr
int
enumeration for fuzzy PID controller operator
Returns:
a.pid_fuzzy
fuzzy PID controller userdata
-
set_nfuzz (ctx, num)
-
set memory block for fuzzy PID controller
Parameters:
- ctx
a.pid_fuzzy
fuzzy PID controller userdata
- num
int
maximum number triggered by the rule
Returns:
a.pid_fuzzy
fuzzy PID controller userdata
-
set_rule (ctx, me, mec, mkp, mki, mkd)
-
set rule base for fuzzy PID controller
Parameters:
- ctx
a.pid_fuzzy
fuzzy PID controller userdata
- me
table
points to membership function parameter table, terminated by 0
- mec
table
points to membership function parameter table, terminated by 0
- mkp
table
points to Kp's rule base table which must be a square matrix
- mki
table
points to Ki's rule base table which must be a square matrix
- mkd
table
points to Kd's rule base table which must be a square matrix
Returns:
a.pid_fuzzy
fuzzy PID controller userdata
-
set_kpid (ctx, kp, ki, kd)
-
set proportional integral derivative constant for fuzzy PID controller
Parameters:
- ctx
a.pid_fuzzy
fuzzy PID controller userdata
- kp
number
proportional constant
- ki
number
integral constant
- kd
number
derivative constant
Returns:
a.pid_fuzzy
fuzzy PID controller userdata
-
run (ctx, set, fdb)
-
calculate for fuzzy PID controller
Parameters:
- ctx
a.pid_fuzzy
fuzzy PID controller userdata
- set
number
setpoint value
- fdb
number
feedback value
Returns:
number
setpoint value
-
pos (ctx, set, fdb)
-
calculate for positional fuzzy PID controller
Parameters:
- ctx
a.pid_fuzzy
fuzzy PID controller userdata
- set
number
setpoint value
- fdb
number
feedback value
Returns:
number
output value
-
inc (ctx, set, fdb)
-
calculate for incremental fuzzy PID controller
Parameters:
- ctx
a.pid_fuzzy
fuzzy PID controller userdata
- set
number
setpoint value
- fdb
number
feedback value
Returns:
number
output value
-
zero (ctx)
-
zeroing for fuzzy PID controller
Parameters:
Returns:
a.pid_fuzzy
fuzzy PID controller userdata
-
op
-
enumeration for fuzzy relational operator
Fields:
- CAP
min(a,b)
- CAP_ALGEBRA
a*b
- CAP_BOUNDED
max(a+b-1,0)
- CUP
max(a,b)
- CUP_ALGEBRA
a+b-a*b
- CUP_BOUNDED
min(a+b,1)
- EQU
sqrt(a,b)*sqrt(1-(1-a)*(1-b))