Anyone had any luck with using Picmicro (18F..) programming fuzzy Logic control loop in assembly?
Fuzzy? In .asm? On a PIC?Anyone had any luck with using Picmicro (18F..) programming fuzzy Logic control loop in assembly?
Fuzzy Logic basically uses a series if IF-THEN-ELSE commands to control the loop, and is not predicated on the controlled system being linear as PID analog (discrete-time, digitized form in a computer) loops do."Fuzzy" Logic is a scheme that seems to be a whole lot of "IF, Then" decisions, the goal is for the code to not be so inflexible.
No, I don't really see where probability comes into using FL.The way I see FL working is it uses probabilities rather than absolute values. So instead of 'temp > 50' it's the probability of the temp being in the region of, say, 50 - 75 based on where it last was and it's rate of change versus the probability of being <50 or >75. Then, based on its history it can, over time, tweak those boundaries to accommodate noise, non-linearity, etc. thus removing instability from the system.
OK, probability is the wrong word, though to my mind its sort of like one. Call it a membership 'goodness' function. If you look at the geeks for geeks article I posted above, the fuzzification process is creating a valuation of membership of one set or another, as illustrated for the temperature of 32C graphically below. It's 0.8 in the Warm category and 0.2 in the Hot category. This is then used to calculate a fan speed based on assigned speeds for "Warm" (50%) and "Hot" (80%) giving a final fan speed of 56%. In this instance no IF-THEN statements are used, just simple integer math. There's no 'error' function as in a PID controller. I've added a new category "Very Hot" with a fan speed of 100% so a temperature above 40C would attract a mix of 80% and 100%, showing how fuzzy logic can easily be extended when a new circumstance arises.No, I don't really see where probability comes into using FL.
It does look at how far the measured value is from the desired value, and adjusts the control voltages accordingly using IF-THEN-ELSE statements, but I don't see that as being a probability.

It would seem that's just basically the P of a PID loop.In this instance no IF-THEN statements are used, just simple integer math
Of course.Certainly it is possible to create a much better software version of a PID (Proportional, Integral, Derivative) control that will better control a motor speed.
Servo loop systems are not some new mystery yet to be solved.
??Over simplifying is the plan to avoid!