Having more than a few grey hairs from tuning PID loops in my time, I was excited to read how Fuzzy Logic is capable of modifying PID parameters dynamically.
Having recently translated the eFFL library (), this seemed like a good test for both the library and my ability to use it. The result is posted here: . It seems to work as advertised, although i haven't used it in the field yet.
The controller has 2 crisp inputs, error (E = r(t)-c(t)) and error rate of change (Ec = de/dt). Each of these inputs is divided into 7 fuzzy sets; the resulting matrix requiring (7x7) 49 rules to cover. There are 3 crisp outputs, Kp, Ki, and Kd, as you'd expect.
The documentation that this project is based on is included in the /Docs section. Note the licensing remains open source.
EDIT: Added a 'Rules Fired' count to the visualization text display (Fuzzy_eFFL_PID_011.project)
EDIT: Updated with integrated PID controller -->
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh wow. I'm going to see if I can put this to the test. Thank you.
Do you have a PID module that you recommend? I have seen the FB in the Oscat Basic library. Mostly I've just used the basic PI function blocks or relied on my VFD's built in PID system.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
try to open Fuzzy_eFFL_PID_011.project
but says: it can not be opened.
I'm on Codeys 3.5.10.5. Maybe your project has a higher version.
Can you save / export it for me in a convenient version?
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Note that the PID output has been limited to between -10.0 and 10.0. These values can be found in the PID_GVL globals. You can scale this to whatever your analog output requires. The original C code looks like it was intended for for micros and had an output range of 0 to 255.
@gatto;
I did export the original library to V3.5 SP10. Find this in the ../Old directory.
Having more than a few grey hairs from tuning PID loops in my time, I was excited to read how Fuzzy Logic is capable of modifying PID parameters dynamically.
Having recently translated the eFFL library (), this seemed like a good test for both the library and my ability to use it. The result is posted here: . It seems to work as advertised, although i haven't used it in the field yet.
The controller has 2 crisp inputs, error (E = r(t)-c(t)) and error rate of change (Ec = de/dt). Each of these inputs is divided into 7 fuzzy sets; the resulting matrix requiring (7x7) 49 rules to cover. There are 3 crisp outputs, Kp, Ki, and Kd, as you'd expect.
The documentation that this project is based on is included in the /Docs section. Note the licensing remains open source.
EDIT: Added a 'Rules Fired' count to the visualization text display (Fuzzy_eFFL_PID_011.project)
EDIT: Updated with integrated PID controller -->
Oh wow. I'm going to see if I can put this to the test. Thank you.
Do you have a PID module that you recommend? I have seen the FB in the Oscat Basic library. Mostly I've just used the basic PI function blocks or relied on my VFD's built in PID system.
Hi,
try to open Fuzzy_eFFL_PID_011.project
but says: it can not be opened.
I'm on Codeys 3.5.10.5. Maybe your project has a higher version.
Can you save / export it for me in a convenient version?
Thank you
@RoryLDM;
https://github.com/geekfactory/PID
Note that the PID output has been limited to between -10.0 and 10.0. These values can be found in the PID_GVL globals. You can scale this to whatever your analog output requires. The original C code looks like it was intended for for micros and had an output range of 0 to 255.
@gatto;
I did export the original library to V3.5 SP10. Find this in the ../Old directory.
Find the latest revision here --> https://1drv.ms/f/s!AgeXD5P3kwJIg3Sbvn0Zj2gu88qY (Fuzzy_eFFL_PID_020 (V3.5 SP13).project).
Have fun peeps!
I just found this thread (3 years later) and am wondering if the project is still available?
Thanks guy. I'll see about re-purposing some solid state relays and heaters.