Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 159
MOTOR DC POSITION CONTROL BASED ON MOVING SPEED CONTROLLED BY SET POINT CHANGING USING FUZZY LOGICS
CONTROL SYSTEM
Andino Maseleno
1
, Fajar Hayyin
2
, Hendra
3
, Rahmawati Lestari
4
, Slamet Fardyanto
5
, Yuddy Krisna Sudirman
6
1
Informatics Engineering, National Development University “Veteran”, Yogyakarta Jl. Babarsari No.2 Yogyakarta 55281, Indonesia
4
Electronics Engineering, Indonesian Islamic University, Yogyakarta Jl. Kaliurang Km.14,5 Yogyakarta, Indonesia
6 ,
5 ,
3 ,
2
Industrial Engineering, National Development University “Veteran”, Yogyakarta Jl. Babarsari No.2 Yogyakarta 55281, Indonesia
andinomaselenoyahoo.com, rahma_124yahoo.com, peacefiestayahoo.com, hauna81yahoo.com, f_ardyantoyahoo.com, krisna_dewayahoo.com
ABSTRACT
One of motor DC function is uses for position control. It is extremely need high accuracy to reach
the position. Therefore, a control system that able to arrange motor DC position as we like is needed. There
is one familiar control system in nowadays which is implemented on microcontroller using fuzzy logics
control system. These fuzzy logics system had 2 crisp input which is; error position e_pos and position
change d_pos and had a 1 crisp output is voltage changing. Each function membership has 5 labels then
uses 25 basis rules. Defuzzification using mean of maxima methods. Defuzzification output resulted by
microcontroller as digital bits that converted by DAC Digital Analog Converter into analog as voltage.
This voltage will operate the motor DC. The Feedback system came from output of position sensor as pulses.
Respond system tested with various set points, the result already shown a quite good respond. Fuzzy
logics control had a high level of accuracy and softer in dealing with respond, changing set point value for
instance. Keywords : Motor DC, Fuzzy logics, Microcontroller
1. INTRODUCTION
Recent days, motor DC as driver system still play an important role because it controllable. In this case
we try to change motor DC into position driver. This system need a highly accuracy in order to reach the
correct position. A good motor positioning control system is needed so motor able to move to whatever
direction we want. There is so many control system. Fuzzy logics control gives an alternative control
system. Fuzzy logics system done by extract rules so appropriate with mind though and human knowledge
both; operator or expert, so we does need math model.
Fuzzy logics recently successfully made a brake through to all the problems ever met and soon become
a high technology basic. In application, it belief that capable to create a revolution in technology.
Implemented on control system is a innovation brake through in control system. Because control system
using fuzzy more precise than digital control system that only control on off on some device. This
research focus in effort to build a motor DC position control system using microcontroller AT89C52.
Microcontroller able to cover industrial needs and recently many used, compiler assembler and
supporting device easy to get.
2. FUZZY LOGIC
Basically, fuzzy logics used to reveal all the logics structure limitations that only had two points of view
which is true or false. Fuzzy logics try to make a solution to links those condition that unable to
dissolve only using statement yes or no but also give other description or between conditions yes or no in
math.
2.1. Fuzzy Set
Universes of discourse define fuzzy set into basic theory fuzzy set. For a universes of discourses U,
Fuzzy compilation based on memberships function located U universes of discourse membership into
some degree that had value among 0 and 1.
Membership function is a curve that shows math on data input points to membership value that had
interval between 0 and 1. Membership function usually used in real live is:
a. S Membership function
µ[x] = [
] [
]
⎪ ⎪
⎩ ⎪
⎪ ⎨
⎧ ≤
≤ −
− −
≤ ≤
− −
c u
c u
b a
c c
u b
u a
a c
a u
a u
1 2
1 2
2 2
Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 160
Defuzificatio
Control Rule
Fuzzification
µ 1
0,5
0 a b c
Figure 1 S Membership function
b. Linear membership function Input mapping to membership degree figures as
straight line.
x ≤ a
µ[x] = x-a b-a a
≤ x ≤ b 1
x ≥ b
µ 1
0 a b
Figure 2 Linear membership function
c. Triangle Membership Function Triangle curve basically is a merge between 2
linear lines.
µ[x] =
µ 1
0 a b c
Figure 3 triangle membership functions
d. Trapezium Membership function Basically, Trapezium membership similar as
triangle form, only some other spot that had 1 memberships.
µ[x] =
µ 1
0 a b c d
Figure 4 Trapezium membership function
2.2. Fuzzy Logics Control
In general, Fuzzy logics control is close loop system. Basic fuzzy logics control contained
fuzzification unit, decision maker mechanisms and inference system, and defuzzification unit, shown at
the next figure.
Crisp Output Fuzzy Output
Crisp Input Fuzzy Input
Figure 5 basic structure of fuzzy logics control
3. SYSTEM PLANNING
Set point SP set through the keypad. Set point
will send into minimum system, set point will decreased by present value PV that powered by
position sensor resulting error position e_pos in the minimum system. Although position changing d_pos
are recent error score et minus by previous error score e t-1. These two input gained by position
sensor output. The number of pulse that enters from sensor divided to show recent motor movement. Error
position and position change are fuzzification inputs.The Concept
⎪ ⎪
⎩ ⎪
⎪ ⎨
⎧ ≤
≤ −
− ≤
≤ −
− c
x c
x b
b c
x c
b x
a a
b a
x a
u ⎪
⎪ ⎪
⎩ ⎪⎪
⎪ ⎨
⎧
≥ ≤
≤ −
− ≤
≤ ≤
≤ −
− ≤
d x
d x
c c
d x
d c
x b
b x
a a
b a
x a
x 1
Motor DC Position Control Based on Moving Speed Controlled by Set Point Changing Using Fuzzy Logics Control System – Andino Maseleno, Fajar Hayyin, Hendra,
Rachmawati Lestari, Slamet Fardyanto, Yuddy Krisna Sudirman
ISSN 1858-1633 2005 ICTS 161
Fuzzy Logic Control FLC System contained fuzzification parts, inference, and defuzification. As
the system revenue is a defuzzification process that consider by 8 bit binary as DAC input. DAC output
will amplify in motor amplifier and the result is voltage to activate the motor. Each PV change will
decrease with SP and the result is error position that will be fuzzification input with position change in that
time again, that so over until the same error with zero or approximately zero.
Figure 6 Diagram block Motor DC position Control system
Figure 7 Error Position Membership function e_pos
Figure 8 Position change membership function
System µC AT89C52
FLC
Position Sensor
MOTOR DC
SET POINT
DAC
DISPLAY
Amplifier
Position Counter
and
d_pos pos
e_pos pos
NB NS
Z PS PB
50 100
150 200
250 300
- i70 - 85
170 255
Error position
85 - 255
Note: NB
= negative big membership set NS
= negative small membership set
Z = zero membership set
PS = positive small membership
5 10
15 20
25 30
- 255
- 32
- 65
-32 - 65
- 255
Position change d_pos
Note: NB
= negative big membership set NS
= negative small membership set
Z = zero membership set
PS = positive small membership
Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 162
µ
F
output 255 NB NS
Z PS
PB
0 64 128 192 255
Output
Figure 9 Output membership function
Figure 10 Fuzzification Flowchart
Set point SP set through the keypad. Set point
will send into minimum system, set point will decreased by present value PV that powered by
position sensor resulting error position e_pos in the minimum system. Although position changing d_pos
are recent error score et minus by previous error score e t-1. These two input gained by position
sensor output. The number of pulse that enters from sensor divided to show recent motor movement. Error
position and position change are fuzzification inputs.
Fuzzy Logic Control FLC System contained fuzzification parts, inference, and defuzification. As
the system revenue is a defuzzification process that consider by 8 bit binary as DAC input. DAC output
will amplify in motor amplifier and the result is voltage to activate the motor. Each PV change will
decrease with SP and the result is error position that will be fuzzification input with position change in that
time again, that so over until the same error with zero or approximately zero.
3.1. Fuzzy Logic Control FLC System Planning
FLC inputs
FLC inputs came from sensor position in pulse. From the sensor then formed two inputs which are
error position e_pos and position change d_pos. Error position e_pos
Error position is a difference between set point position SP and actual position PV.
Error position e_pos = Set point SP – Position PV
3.1
Set point revenue by keypad that had a score between 0
o
– 360
o
with 8 bit resolution powered by microcontroller AT89C52 is 0 until 255.
Position Change d_pos Position change is a difference between recent
error value and previous error value.
d_pos = e t – e t-1 3.2
Start e_pos = SP –
PV d_pos = et –
1 Look at position error and position change
b hi
bl Finish
Motor DC Position Control Based on Moving Speed Controlled by Set Point Changing Using Fuzzy Logics Control System – Andino Maseleno, Fajar Hayyin, Hendra,
Rachmawati Lestari, Slamet Fardyanto, Yuddy Krisna Sudirman
ISSN 1858-1633 2005 ICTS 163
d_pos shows position change with an interval as big as sampling value that had been done.
Determine Membership Function
Membership function derived by using trial and error method. Fuzzy set membership stated in function
definition, by analyze to determine membership degree for each element in universes of discourse.
Universes of discourse value amount in 0 until 255 that shows the lowest and highest value in
microcontroller count. It also had other limitation which incapable to operate in negative sense and will
be acquainted into positive. Error position membership
Fuzzy membership function had different form depends on planning demand. Fuzzy membership
function for error position input is five memberships set in triangle form as follows.
Maximum membership function degree is not made to be same value with 1 but same value with
255, to use microcontroller resolution, so this membership degree became abnormally.
Maximum membership function degree is not made to be same value with 1 but same value with
255, to use microcontroller resolution, so this membership degree became abnormally.
Position change membership d_pos
Using five memberships set in triangle form shows in Figure 8.
Output membership Output membership function is five fuzzy
singleton set had the same label with error and d_pos. Fuzzification
Mapping from domain analog to domain fuzzy set. Fuzzy Set input is position error e_pos and position
change d_pos, fuzzification flowchart can be shown on figure 10.
After result fuzzy score from measurement. Thus, the next step is mapping data into appropriate fuzzy
set with the result that gathering certain membership degree for a membership set. The process doing by
function form for each fuzzy set or using table, it used Table 1 Fuzzy logic control rule
Condition Rule no -
Position Change
d_pos Output
1 Positive Big
Negative Big Negative Big
2 Positive Big
Negative Small Negative Big
3 Positive Big
Zero Negative Big
4 Positive Big
Positive Small Negative Small
5 Positive Big
Positive Big Zero
6 Positive Small
Negative Big Negative Big
7 Positive Small
Negative Small Negative Big
8 Positive Small
Zero Negative Small
9 Positive Small
Positive Small Zero
10 Positive Small
Positive Big Positive Small
11 Zero Negative
Big Negative Big
12 Zero Negative
Small Negative Small
13 Zero Zero
Zero 14
Zero Positive Small
Positive Small 15
Zero Positive Big
Positive Big 16
Negative Small Negative Big
Negative Small 17
Negative Small Negative Small
Zero 18
Negative Small Zero
Positive Small 19
Negative Small Positive Small
Positive Big 20
Negative Small Positive Big
Positive Big 21
Negative Big Negative Big
Zero 22
Negative Big Negative Small
Positive Small 23
Negative Big Zero
Positive Big 24
Negative Big Positive Small
Positive Big 25
Negative Big Positive Big
Positive Big
Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 164
to mapping error position membership degree e_pos and position change membership degree d_pos.
The table system choose because easier, simple and quick these and because there is no arithmetic
process. The system lack ness is using a lot of memory, but it does matter because there is enough
memory. Inference Rule Base
The Used Fuzzy Logic rules depend on the control system. There is no exact formulation in determine
fuzzy rules and input output membership function. Fuzzy rule base in these control based on “if –
then” rule, able to shows rule and relation between position error, position change, and output. The
planning is using MAX-MIN method. Defuzzification
Defuzzification process is final part of fuzzy logic set for purpose in mapping fuzzy set from inference
result into the real value. Mean of Maximum MOM used because operationally usable. Defuzzification
solution observed by taking average domain score which has maximum membership score.
Defuzzification membership set is fuzzy singleton set. It use to simplify the system and easier the count.
Recent defuzzification output used to control the voltage to arrange motor position. If output is positive
then the voltage will increase and if output is negative then voltage will decrease.
Software Planning
Fuzzy logic control process doing by the program made using assembler language for microcontroller
AT89C52. These Program reading actual data from position sensor which presentate motor position then
compare with the set point and processing contain fuzzification, inference and defuzzification. Fuzzy
result continued to DAC to control motor position. System responds shows in graphic against time.
4. RESULT AND DISCUSSION
Control system using Fuzzy Logic planned to gather the correct motor DC position control system
for variety set point score the position we want to.
Control system had been tested for variety set point score in this research.
YES
N YES
YES YES
YES
Start Initialization
Check FLC ?
FLC
Activate sampling timer
Save data in RAM
display Start button
pushed?
Turn off sampling timer
Stop button pushed
?
Keypad pushed ?
Number button pushed?
N N
N
N
Figure 11 Main Program Flowchart
Motor DC Position Control Based on Moving Speed Controlled by Set Point Changing Using Fuzzy Logics Control System – Andino Maseleno, Fajar Hayyin, Hendra,
Rachmawati Lestari, Slamet Fardyanto, Yuddy Krisna Sudirman
ISSN 1858-1633 2005 ICTS 165
4.1. Digital To Analog Converter DAC
The planning system is using 1one DAC 0832 function as input voltage control for motor driver.
Next is DAC testing table with variety binary input.
Table 2 DAC testing table
No. Input Binary
Output V Measured
1. 0000 0000
2. 0000 0010
- 2.42 3.
0001 0000 - 2.23
4. 1000 0000
0.65 5. 1111
1111 2.6
4.2. Motor Driver
Motor driver circuit input is Digital to Analog Converter DAC output. Motor driver circuit process
analog signal in voltage from DAC to control appropriate motor spinning.
For direction control application using microcontroller, is using transistor as in figure 12,
contained 4 transistors with Darlington configuration in each transistor contained 2 transistors which is Tip
31A and C9013 for NPN, and Tip 32A and C9012 for PNP.
4.3. Position Sensor
There are 2 sensors to distinguish left or right spinning direction. Sensor circuit contained
optocoupler, encoder, lm358 as comparator, and 74HC14 schmit trigger.
Optocoupler
Optocoupler is an optic sensor, which is capable to change light effect into electric pulse. Inside the
optocoupler contained infrared LED and phototransistor. If optocoupler activated, it able to
transfer electric energy from infrared LED to phototransistor.
For further if infrared light is block then basis collector obstacle getting bigger so collector current
decrease and collector voltage closing 0 volt, electric transfer will cut off.
Figure 12 Two direction position sensor output
Encoder
Plastic plate giving black and white stripes on plate fingers with same distance in 180 lines. Each line will
read by optocoupler in pulses. To distinguish direction then the line made up and down with different pattern.
74HC14 Schmitt Trigger
IC 74HC14 function as square wave inverter amplifier. The imperfect square wave related to
Schmitt trigger 74HC14 input, in order to gather the perfect square wave.
4.4. Display Unit
To display set point and motor position using 6 seven segment common cathode. IC input Port came
from port B PPI 8255 used as data sender. Display unit using IC CMOS 4511 with BCD input and as
decoder that separate set point display and position used by 74HC138.
The output data from microcontroller in 8 bit binary will be split into 2 parts. First part contains 4
bit A – D used as IC CMOS 4511 input to display at seven segment. The next 4 bit D0 – D3 used as IC
74HC138 input to address which seven segment will turn on.
4.5. Testing Result Table
This test is to watch the system respond against given set point score. Testing doing by giving variety
set point.
Table 3 Testing Result in variety set point
No. Set
point Position Error
1. 100 100
- 2. 450
448 2
3. 250 250
- 4. 180
184 4
5. 360 360
- 6. 300
302 2
7. 20 22
2 8. 128
128 -
9. 99 100
1 10. 75
74 1
5. CONCLUSION
Based on testing result and system analyze, conclusion of all these is:
1. Fuzzy logic control relative easier to be
implemented because doesn’t need math model but operate based on rule that extractable from
experience and operator skill.
2. Fuzzy logic control system very sensitive
against membership function variables, fuzzy rule and input variable type, because those
variables influence parameter size from position and position change.
Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 166
3. More fuzzy set and membership from each
fuzzy set will get higher accuracy level and softener in dealing with respond.
4. Fuzzy logic control has higher accuracy level
and softener in dealing with respond, for example; with set point score change.
Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 167
A VARIABLE-CENTERED INTELLIGENT RULE SYSTEM
Irfan Subakti
Department of Informatics, Faculty of Information Technology Institute Technology of Sepuluh Nopember Surabaya ITS
Kampus ITS, Keputih, Sukolilo, Surabaya, Indonesia email: yifanagmail.com
ABSTRACT
A Rule-based System RBS is a good system to get the answer of What, How, and Why questions
from the rule base RB during inferencing. Answers and explanations are properly provided. The problem
with RBS is that it can’t easily perform the knowledge acquisition process and it can’t update the rules
automatically. Only the expert can update them, manually, by the support of a knowledge engineer.
Moreover most researches in RBS concern more about the optimization of the existing rules than about
generating new rules from them. Rule optimization, however, can’t change the result of the inferencing,
significantly, in term of knowledge coverage. Ripple Down Rules RDR came up to overcome the major
problem of expert systems: experts no longer always communicate knowledge in a specific context. RDR
allows for extremely rapid and simple knowledge acquisition without the help of a knowledge engineer.
The user doesn’t ever need to examine the RB in order to define new rules: the user only needs to define a
new rule that correctly classifies a given example, and the system can determine where the rule should be
placed in the hierarchy. The limitation of RDR is the lack of powerful inference. RDR seems to use Depth
First Search which lacks the flexibility of question answering and explanation accrued from inference.A
Variable-Centered Intelligent Rule System VCIRS is our proposed method. It hybridizes RBS and RDR.
The system architecture is adapted from RBS and obtains advantages from RDR. This system organizes
the RB in a special structure so that easy knowledge building, powerful knowledge inferencing and
evolutional improvement of system performance can be obtained at the same time. The term “Intelligent”
stresses that it can “learn” to improve the system performance from the user during knowledge building
via value analysis and refining by rule generation. Keywords : Rule-based Systems, Ripple Down Rules,
knowledge building, knowledge inferencing, knowledge refining
1. INTRODUCTION