Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fuzzy logic in QB???
#1
I'm probably asking a really vague question or just being silly, but does anyone have an idea of how somone might do fuzzy logic in QB. I'm sorry, i don't have any code to post because while the book I bought on AI spends an entire chapter on fuzzy logic it doesn't give any examples of how to do it.

Jack Tongue
Reply
#2
Quote:HOW IS FL DIFFERENT FROM CONVENTIONAL CONTROL METHODS?

FL incorporates a simple, rule-based IF X AND Y THEN Z approach to a solving control problem rather than attempting to model a system mathematically. The FL model is empirically-based, relying on an operator's experience rather than their technical understanding of the system. For example, rather than dealing with temperature control in terms such as "SP =500F", "T <1000F", or "210C <TEMP <220C", terms like "IF (process is too cool) AND (process is getting colder) THEN (add heat to the process)" or "IF (process is too hot) AND (process is heating rapidly) THEN (cool the process quickly)" are used. These terms are imprecise and yet very descriptive of what must actually happen. Consider what you do in the shower if the temperature is too cold: you will make the water comfortable very quickly with little trouble. FL is capable of mimicking this type of behavior but at very high rate.


i guess i use fuzzy logic all the time?
Reply
#3
Thanks, what i was really wandering was how you define for example. 'cool' for the computer. The book has a whole bunch of graphs with over lapping lines to define this kind of thing, how do you get the computer to decide if it's medium temerature or cool when they both overlap?
Reply
#4
i figured 'cool' would be a reading from a sensor (like a thermo coupling)that was 'lower' than whatever floor youd set for allowable operational ranges. when that 'state' is achieved, the machine would then carry out instructions to heat up the machine.

thats how im reading it. seems like an ordinary FSM with weird... labeling, if you will
Reply
#5
That's pretty much what I was thinking too.

just something like this...

Code:
Temp = Temp+ TempDir

CoolingQuickly = TempDir<=-30
AlmostStable = ABS(TempDir)<=3
HeatingQuickly = TempDir>=30


Cool = Temp<500
Warm = Temp>=500 and Temp<=1000
Hot = Temp>1000



If Cool Then
   If CoolingQuickly then TempDir = TempDir + 5
   If AlmostStable then TempDir = TempDir*.5
End If

If Warm Then Bleh

If Hot then Blarg
Reply
#6
isn't it called fuzzy logic because there aren't exact numbers? so wouldn't a random number be good to put in there as well?
[Image: freebasic.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)