Qbasicnews.com
May 26, 2020, 05:06:03 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: fuzzy logic in QB???  (Read 1887 times)
anonjondoe
Member
*
Posts: 47


WWW
« on: June 05, 2005, 11:45:38 AM »

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
Logged
Anonymous
Guest
« Reply #1 on: June 05, 2005, 12:38:16 PM »

Quote from: "some site"
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?
Logged
anonjondoe
Member
*
Posts: 47


WWW
« Reply #2 on: June 05, 2005, 12:44:07 PM »

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?
Logged
Anonymous
Guest
« Reply #3 on: June 05, 2005, 02:05:07 PM »

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
Logged
Dr_Davenstein
Na_th_an
*****
Posts: 2052


« Reply #4 on: June 05, 2005, 04:19:38 PM »

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
Logged
Deleter
Na_th_an
*****
Posts: 1293



WWW
« Reply #5 on: June 07, 2005, 07:26:41 PM »

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?
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!