Académique Documents
Professionnel Documents
Culture Documents
Sistem
yang dikendalikan
(proses)
kondisi (non fuzzy)
Modul
Defuzzifikasi
Modul
pengambilan
keputusan
(inferensi)
Basis
Kaidah
Modul
Fuzzifikasi
(fuzzy)
(fuzzy)
RC-RightCenter, and RI-Right. These variables are used to describe the truck's x-position on
the graph. We collect all the membership functions together under the heading TruckPos,
which is the first input to our controller.
In[3]:=
In[8]:=
Plot the Membership Functions
Next, we plot the membership functions for our first input with the FuzzyPlot function. The
PlotJoined option is set to True to produce the line graph shown.
In[9]:=
Truck Angle
Set Universal Space
The second input is the truck's orientation or the angle between a line down the center of the
truck and a line horizontal to the parking lot. For this input, the universal space ranges from
-90 degree, where the back of the truck is facing away from the dock, to 270 degrees, where
it is again facing away. The truck angle should end up near 90 degrees, which indicates that
the back is facing the dock and the truck is perpendicular to the dock. For angles between -90
and 90 degrees, the back of the truck will be facing toward the right of the graph, and for
angles between 90 and 270 degrees, the back of the truck will face the left side of the graph.
We set the universal space for our second input just as we did for our first input.
In[10]:=
Define Linguistic Variables
We again use Kosko's membership functions [Kosko 1992] for this input. The linguistic
variables have the following meanings: RB-Right Below, RU-Right Upper, RV-Right
Vertical, VE-Vertical, LV-Left Vertical, LU-Left Upper, and LB-Left Below. We group all of
the membership functions under the name Angle, which is the second input to our controller.
In[11]:=
In[18]:=
Plot Membership Functions
Here is a plot of the second input's membership functions.
In[19]:=
In[21]:=
In[28]:=
Plot Membership Functions
Here we see how our output membership functions looks.
In[29]:=
This section contains functions that will allow us to simulate the truck backing. This first
function is essentially the fuzzy logic controller. The two inputs to this function, phi and x,
represent the two inputs to the controller, the angle and truck position. The function will
return a crisp output that is the controller's recommended steering angle.
In[31]:=
These next two functions are for modeling the truck-backing. They contain functions that
model the movement of the truck and draw the parking lot and truck graphics. These
functions are from a Mathematica Journal article by James Freeman [Freeman 1994].
In[32]:=
In[33]:=