After modifying Li and Lau's LUTs, I got pretty good response with my LUTs. However, I became concerned that the Coarse LUT may not always be able to reduce the Error to less than 100 to allow the Fine LUT to be activated. So after pondering the problem for a few minutes, I decided to add a third LUT that would be activated in between the Coarse and Fine LUTs. I decided to simply try using my Coarse LUT as an Intermediate LUT (ILUT), changing the scale factors and have the ILUT activated when the Coarse LUT reduced the Error value to less than 173. So if the Error was greater than 300, the Coarse LUT would be used, when the Error is less than 300 but greater than 173 the ILUT would be used and finally for Errors less than 100 the Fine LUT would be used. I also established new scale factors for the ILUT, starting with the Coarse LUT scale factors, adjusting the scale factors accordingly.
I ran some simulations and found that this three-stage scheme worked well, getting to the Setpoint a little faster than the two-stage scheme, and I believe it should be safe since the Coarse LUT always reduced the Error to much less than 173 and probably to less than 100.
First I ran simulations with the original Time Constant of 0.28 sec and then I changed the Time Constant to 1.0 sec, closer to what I believe is the Paint Flow System Time Constant, and I ran some more simulations. With Python, it was easy to modify my code to insert the ILUT and set up the various scale factors. So here are my simulation charts:
Simulation of Three-Stage Fuzzy Logic LUT Scheme with TC=0.28s, Sample Rate=0.25s. |
Then I decided to change the system Time Constant to 1.0 sec, about what I figure the Paint Flow System time constant to be. The chart below is with a Sample Rate of 0.25 sec, four times the Time Constant. It shows pretty good response and accuracy with a tiny bit of overshoot.
Simulation of Three-Stage Fuzzy Logic LUT Scheme with TC=1.0s, Sample Rate=0.25s. |
Simulation of Three-Stage Fuzzy Logic LUT Scheme with TC=1.0s, Sample Rate=0.125s. |
Simulation of Three-Stage Fuzzy Logic LUT Scheme with TC=1.0s, Sample Rate=0.5s. |
For the final simulation, I set the Sample Rate at 0.9 sec. The results are also good.
Simulation of Three-Stage Fuzzy Logic LUT Scheme with TC=0.9s, Sample Rate=0.5s. |
Sim_Flow = k*v + (1-k)*Prev_Sim_Flow
So k must be less than 1.0 for the formula to be legitimate.
Anyhow, this three-LUT scheme is now working well and with the Intermediate LUT to be activated when the Coarse LUT reduces the Error to 173, I can be sure that the control system won't be stalled with an error a little over 100: the ILUT will take over and reduce the Error to less than 100 for the Fine LUT to finish reducing the Error.
Another note: I thought that Li and Lau were employing some trickery in their use of a Sample Rate of 0.25 sec for the Time Constant of 0.28 sec but I now realize that the system time constant must be known or measured in order for the Fuzzy Logic control system to operate properly and also that the Sample Rate must be less than the system Time Constant. Sample Time values of 0.25 to 0.5 times the Time Constant seem to produce good response and accuracy.
Thanks again to Y.F. Li and C. C. Lau and their very useful and helpful paper in the IEEE Control System magazine, 1989 IEEE Control System magazine article "Development of Fuzzy Algorithms for Servo Systems."
No comments:
Post a Comment