Search the web
Sign In
New User? Sign Up
SeattleRobotics · The Seattle Robotics Society
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
L298 with Microcontroller   Message List  
Reply Message #29475 of 42036 |
Re: L298 with Microcontroller - Fuzzy Logic

Hi Peter,

I hope it helped clarify what I was trying to say.

In my interpretation of how designers were using fuzzy logic for
control, I started with the idea of interpolation, as follows:

1. Start with a system with one (analog) input and one output.

2. I know that for an input value of A, the output value should be X,
and that for an input value of B, the output value should be Y.

3. In have an input value between A and B.

4. I assume that the output will be between X and Y. I assume the
output value should be between X and Y at the same relative distance
as the input is between A and B. If it is closer to A, then the output
value should be closer to X. This is linear interpolation.

5. The triangle measurement functions and the weighted average
defuzzification are a means to implement this. It takes two
measurement functions, two rules and a weighted average defuzzifier to
implement the above case.

6. I found that the 2+ dimensional cases using the fuzzy AND (either
min or product AND) could be understood as extending this
interpolation model to 2+ dimensions. In general, there will be 2 x N
rules active at a time, where N = number of dimensions.

I put some additional words in the text below as a follow-on.

Fun stuff!

Dave


--- In SeattleRobotics@yahoogroups.com, PeterBalch <PeterBalch@...> wrote:
>
> Dave
>
> Thank you for that long explanation: I've saved it to refer to should I
> need it in the future.
>
> > Each membership function had an exemplar point where the
> > input value was 100% ("1") and for which an output value was
> > associated through the fuzzy rules that used it.
>
> That's a nice way of looking at it. It implies that you could use other
> non-triangular functions that are more mathematically tractable.

Triangular functions imply linear interpolation in the analog logic
model. If you change from triangular, you are changing to a non-linear
interpolation. As you move from A to B, the output may move slower or
faster between X and Y, depending on where you are between A and B.
Not a problem, but be sure you understand what it does and if that is
what you want.
>
> > The trapezoid functions were combined
> > measurement function triangles where the output value of two adjacent
> > triangles was the same. You could factor the trapezoid into two or
> > more triangles.
>
> Is that just a convenient way of making trapeziums or are you suggesting
> it's a shortcut to merging adjacent members of a fuzzy set?
>
> Are you saying that Fuzzy Logic can work well if all the elements of a
> fuzzy set are triangular or that you always do need trapeziums?

I see it as a shortcut to merging members. If two triangles are
adjacent and have the same output value, you do not need to
interpolate between them. So you merge them into a trapezoid. In the
flat part of the trapezoid, only one rule will be active, the one
associated with the trapezoid. Other triangle or trapezoid functions
will have gone to zero at the start and end of the flat part.
>
> > where the output value was a linearly interpolated (weighted
> > average) of the example output values nearest the input value.
>
> I think I now understand this. It didn't make much sense before
because I
> thought you were defuzzifying a single fuzzy value. So I didn't see
where
> the weights came from.
> In fact, you're assuming that the members of the set are arranged
linearly
> along some axis and you're calculating the weighted mean of the
positions
> of the exemplar points - the weight being equal to the fuzzy value
of each
> member of the set.

Zadeh calls the linear arrangement of a set of membership functions
along one axis a "linguistic variable."
>
> I don't really see what "sense" that makes but if it works well,
that's all
> that's required.

The advantage for me was that I understood it as a clean and simple
way of creating a heuristic control system. This is where you know
what the output values should be for a set of input values, but you do
not have a solvable math model of the system. Examples: driving on
ice; controlling a cement kiln.

The fuzzy approach - as practiced - seemed to me to be an elegant
formal system for interpolating output values from current input
values using known example points (exemplars). It factors multiple
input dimensions into combinations of single dimensions and uses rules
with AND functions to combine them. Much easier than creating a
multi-dimensional hypersurface and finding the output point given an
input point on that surface.
>
> > The choice defuzzification function results from applying negative
> > feedback among the various active rules to the inputs of the weighted
> > average function. The result is a mutually exclusive, winner-take-all
> > function.
>
> That makes more "sense" - If the two endpoint members of your set
are high
> and all the middle ones are low, you probably don't want to take a
weighted
> mean.
>
> > At the end of the day, you are probably right. Analog logic is not
> > fuzzy logic. It is a derivative or mutant of fuzzy logic. However, it
> > seems to be compatible with how most fuzzy logic control systems are
> > actually designed.
>
> A system of fuzzy logic rules is a function that maps multiple analogue
> inputs to a single analogue, integer or boolean output. So they're
like any
> other function that defines a landscape. If the landscape is the right
> shape to solve your problem, it could be argued that's all that matters.
> But I personally wouldn't argue it. I think that clarity or
> understandability are important (can you trust a neural net if you
have no
> idea how it makes its decisions when it's just been "trained" ?).

You are preaching to the choir! The problem with trained neural
networks (and other learning systems) is that you do not know *what*
they have learned. If you analyze the weights that result, the
resulting "rules" are in Martian, not human.

If it works, it is magic because you do not know *why* it works. If it
does not work, it is bad magic because you do not know *why* it does
not work - or how to fix it.
>
> A system of fuzzy logic rules isn't trained, it's just written by a
> designer who think he/she knows what the rules ought to be. If various
> weights have to be adjusted to make it work properly, that may be no
> different from training a neural net. How often do the rules you design
> work without needing much fudging?
>
> Peter
>





Thu Nov 30, 2006 7:08 pm

dcwjobs2004
Offline Offline
Send Email Send Email

Message #29475 of 42036 |
Expand Messages Author Sort by Date

Dave Thank you for that long explanation: I've saved it to refer to should I need it in the future. ... That's a nice way of looking at it. It implies that you...
PeterBalch
prbalch
Offline Send Email
Nov 29, 2006
3:12 pm

Hi Peter, I hope it helped clarify what I was trying to say. In my interpretation of how designers were using fuzzy logic for control, I started with the idea...
David Wyland
dcwjobs2004
Offline Send Email
Nov 30, 2006
7:17 pm

... Did you ever have a look at Squeak and what they did with e-toys? You won't get a Smalltalk VM into a PIC, but their 'programming language/interface' is ...
Markus Lampert
markuslampert
Offline Send Email
Nov 21, 2006
12:44 am

On Mon, 20 Nov 2006 16:25:08 -0800 (PST), Markus Lampert ... A long time ago, I wrote a Smalltalk compiler for the PIC 16F84. It didn't use a Smalltalk VM, but...
Jon Hylands
hylander_ii
Offline Send Email
Nov 23, 2006
3:35 pm

... Not so obvious. Economists have a terrible time with value. One example is housing. For 4 decades in California, you could buy a house, live in it for 2+...
David Wyland
dcwjobs2004
Offline Send Email
Nov 21, 2006
1:04 am

Thanx David: Now I feel like the novelist that painted an ugly painting. You said just about the same thing as the PBS program, "Open for Business". Last...
robotMaker
robotmeiker
Offline Send Email
Nov 21, 2006
5:16 am

Markus ... looks like ... called ... look like ... Depending on ... fuzzy-set ... I'm with Marcus on this. John's example was an analogue control loop. The ...
PeterBalch
prbalch
Offline Send Email
Nov 21, 2006
10:28 am

... But arent all if/then/else decisions boolean? Its either true or false, no in between action is possible. Its 100% binary! If/then statements for sensors...
John Palmisano
palmisano@...
Send Email
Nov 21, 2006
2:05 pm

Thanx Peter for the explanations. I see "fuzzy logic" less fuzzy now. In the IQ100, in the firmware, it uses the scalar threshold and sensitivity values, and...
robotMaker
robotmeiker
Offline Send Email
Nov 21, 2006
8:06 pm

John ... Putting aside the question of whether the analogue connectionism you described is the same as what other people call "fuzzy logic" ... Your code...
PeterBalch
prbalch
Offline Send Email
Nov 21, 2006
3:56 pm

... You are right, the code that I explicitly supplied will not work for that reason. However, I already pointed that out when I said 'You can also add a time...
John Palmisano
palmisano@...
Send Email
Nov 21, 2006
6:00 pm

from Dave Wyland ... production/distribution ... It doesn't always have to be "well ahead". The profit of the business depends on turnover as well. If the...
PeterBalch
prbalch
Offline Send Email
Nov 21, 2006
4:01 pm

My guess is no market at present. I will get into this in a bit. You are correct about turnover of inventory. Grocery stores have a slim profit margin of 5%...
David Wyland
dcwjobs2004
Offline Send Email
Nov 22, 2006
6:58 pm

John ... never ... I didn't say it would never work. Just that it's "clumsy and very soon leads to completely opaque programs". Clarity is very important in ...
PeterBalch
prbalch
Offline Send Email
Nov 22, 2006
3:11 pm

Would you consider doing 2D mapping and decision making with 3 sharp IR and 3 sonar (without a single if/then statement) interesting? ...
John Palmisano
palmisano@...
Send Email
Nov 22, 2006
5:42 pm

Markus wrote ... won't get ... use. I finally got around to looking at that. Thanks for the link. I'm very interested in the design of programming systems for...
PeterBalch
prbalch
Offline Send Email
Nov 23, 2006
2:49 pm

On Thu, 23 Nov 2006 09:39:14 -0500, PeterBalch <PeterBalch@...> ... Squeak is actually a version of Smalltalk, which is probably one of the most...
Jon Hylands
hylander_ii
Offline Send Email
Nov 23, 2006
3:28 pm

On Thu, 23 Nov 2006 09:39:14 -0500, PeterBalch <PeterBalch@...> ... I'm going to answer this separately from my last reply, since this has nothing...
Jon Hylands
hylander_ii
Offline Send Email
Nov 23, 2006
4:06 pm

Cesar ... Thank you for that link. It made interesting reading. The designer of the instruction set has clearly gone though many of the thought processes that ...
PeterBalch
prbalch
Offline Send Email
Nov 23, 2006
6:16 pm

Jon ... Thank you for taking the time to write that description. You have finite state machines arranged in levels. When one FSM regognises a situation that it...
PeterBalch
prbalch
Offline Send Email
Nov 24, 2006
2:17 pm

On Fri, 24 Nov 2006 09:07:21 -0500, PeterBalch <PeterBalch@...> ... Well, not quite. The thing (the only thing) that subsumes in my system is the...
Jon Hylands
hylander_ii
Offline Send Email
Nov 24, 2006
3:04 pm

Jon ... didn't ... a ... machine ... Smalltalk on a PIC ? Wow! Did it have multitasking or the data structures that Smalltalk allows? Or did it simply give...
PeterBalch
prbalch
Offline Send Email
Nov 24, 2006
2:17 pm

On Fri, 24 Nov 2006 09:07:28 -0500, PeterBalch <PeterBalch@...> ... Just the syntax, sorry. We've only got 68 bytes of RAM to play with... :-) ... ...
Jon Hylands
hylander_ii
Offline Send Email
Nov 24, 2006
3:17 pm

Jon ... languages ... I missed that. I thought that the EToys implementation _was_ Squeak. ... I stand corrected. I didn't see threads in any of the examples...
PeterBalch
prbalch
Offline Send Email
Nov 24, 2006
2:17 pm

On Fri, 24 Nov 2006 09:07:37 -0500, PeterBalch <PeterBalch@...> ... Squeak is a full-blown implementation of Smalltalk. It grew out of Apple ...
Jon Hylands
hylander_ii
Offline Send Email
Nov 24, 2006
2:40 pm

Jon ... navigator ... So the watchdogs somehow suppress the "seek goal number N behaviour" or replace it altogether with an "avoidance behaviour" or...
PeterBalch
prbalch
Offline Send Email
Nov 25, 2006
11:15 am

On Sat, 25 Nov 2006 06:04:50 -0500, PeterBalch <PeterBalch@...> ... The watchdogs are not responsible for that. When then take over, the old ...
Jon Hylands
hylander_ii
Offline Send Email
Nov 25, 2006
12:48 pm
 First  |  |  Next > Last 
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help