Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Parts List
(1) IBM or compatible personal computer equipped to run
Microsoft Quick BASIC. IBM is a registered trademark of IBM
Corporation. Microsoft and Quick BASIC are registered
trademarks of Microsoft, Inc.
(2) 8 channel input; 8 bit, analog/digital converter with 8 on-off,
digital output channels and one 8 bit digital/analog output channel.
(3) Signal conditioner (transistor amplifier to adjust levels as
needed)
(4) Transistor - 2N3053.
(5) DC motor, 1.5 V to 3.0 V, 100 ma., 1100 Rpm to 3300 Rpm.
The above speed control system is low cost and suitable for
learning at home or for an application where being rigorously
mathematically correct is not required. The above system
accomplishes the desired purpose and uses triangles to determine
the center of mass (more on this later), but does not add triangles
to compute center of mass as specified by Dr. Bart Kosko (Fuzzy
Thinking, Chapter 10). The fuzzy control action for the above
system is accomplished in a BASIC software program, discussed
below. The controller is a typical low cost ($100) unit, such as the
Speed up
Not much change needed
Slow down
RULES
Translate the above into plain English rules (called "linguistic"
rules by Dr. Zadeh). These Rules will appear in the BASIC
computer program as "If-Then" statements:
Rule 1: If the motor is running too slow, then speed it up.
Rule 2: If motor speed is about right, then not much change is
needed.
Rule 3: If motor speed is to fast, then slow it down.
The next three steps use a charting technique which will lead to a
computer program. The purpose of the computer program is to
determine the voltage to send to the speed controlled motor. One
function of the charting technique is to determine the "degree of
membership" (see Ch. 1) of the Too slow, About right and Too fast
triangles, for a given speed. Further, the charting technique helps
make the continuous control feedback loop easier to visualize,
program and fine tune.
5. Associate the above inputs and outputs as causes and effect
with a Rules Chart, as in Figure 4, below. The chart is made with
triangles, the use of which will be explained. Triangles are used,
but other shapes, such as bell curves, could also be used.
Triangles work just fine and are easy to work with. Width of the
triangles can vary. Narrow triangles provide tight control when
operating conditions are in their area. Wide triangles provide
looser control. Narrow triangles are usually used in the center, at
the set point (the target speed). For our example, there are three
triangles, as can be seen in Figure 4 (three rules, hence three
triangles).
7. Determine the output, that is the voltage that will be sent from
the controller/signal conditioner/transistor to the speed controlled
motor. This calculation is time consuming when done by hand, as
we will do below, but this calculation takes only thousandths of a
second when done by a computer.
Assume something changes in the system causing the speed to
increase from the target speed of 2,420 Rpm to 2,437.4 Rpm, 17.4
Rpm above the 'set point." Action is needed to "pull" the speed
back to 2,420 Rpm. Intuitively we know we need to reduce the
voltage to the motor a little. The "cause" chart and vertical speed
line appear as follows, see Figure 5 below:
The vertical line intersects the About right triangle at .4 and the
Too fast triangle at .3. This is determined by the ratio of sides of
congruent triangles from Plane Geometry:
Intersect point / 1 = 11.6/29 = .4
Intersect point / 1 = 17.4/58 = .3
8. The next step is to draw "effect" (output determining) triangles
with their height "h" determined by the values obtained in Step 7,
above. The triangles to be drawn are determined by the rules in
Step 6. Since the vertical 2,437.4 Rpm speed line does not
intersect the Too slow triangle, we do not draw the Speed up
triangle. We draw the Not much change and the Slow down
triangles because the vertical speed line intersects the About right
and Too fast triangles. These "effect" triangles will be used to
The portion of the program for the above system system which
examines the input and performs the "triangle" calculations to
arrive at a crisp output follows:
910 IF MS = 2420 THEN MIV = 2.4 : GOTO 5000 'MS-MEASURED
SPEED, MIV-MOTOR INPUT VOLTAGE
920 IF MS < 2420 THEN 2000 ELSE 1000
1000 ' LINES 1010-1110; GREATER THAN 2420 RPM, SLOW DOWN
1010 IF MS > 2449 THEN MIV = 2.36 : GOTO 5000
1020 ' COMPUTE INTERSECT POINT, IPA, FOR 'ABOUT RIGHT'
TRIANGLE
1030 IPA = (2449-MS) / 29
1040 IF IPA =< 0 THEN IPA = .0001
1050 ' COMPUTE INTERSECT POINT, IPS, FOR 'SLOW DOWN'
TRIANGLE
1060 IPS = (MS-2420) / 58
1070 ' COMPUTE MOTOR (TRANSISTOR) INPUT VOLTAGE (MIV)
1080 AAR = .5 * .04 * IPA 'AAR - AREA OF 'ABOUT RIGHT'
TRIANGLE
1090 ASD = .5 * .08 * IPS 'ASD - AREA OF 'SLOW DOWN'
TRIANGLE
1100 D1 = .04 * (ASD / (ASD+AAR))
1110 MIV = 2.4 - D1 : GOTO 5000
2000 ' LINES 2010-2110; LESS THAN 2420 RPM, SPEED UP
2010 IF MS < 2362 THEN MIV = 2.44 : GOTO 5000
2020 ' COMPUTE INTERSECT POINT, IPA, FOR 'ABOUT RIGHT
'TRIANGLE