You are on page 1of 8

DC MOTOR CONTROL USING ROUND

FUZZY LOGIC BASED MICROCONTROLLER 8031


Oleh:
Resmana, Agus Suryo Widagdo dan Marselino Sudarto
Jurusan Teknik Elektro
Universitas Kristen Petra
Siwalankerto 121-131, Surabaya Indonesia

Telp : (031) 8439040, fax : (031) 8436418


E-mail :
resmana@petra.ac.id

Abstract
This paper describes the development of a fuzzy logic control on controlling dc
motor rotation is implemented on an 8-bit microcontroller Intel's 8031. The program has
been set up fuzzy logic routine in assembly language. Fuzzy logic control here has two
inputs that change the speed error signal and error, and has an output that is a change in
the voltage applied to the dc motor driver. Both input and output has five labels in its
membership fuction, and 25 fuzzy if-then rules are used in this system. The design of
membership functions and fuzzy rules, here using an approach of the control system
performance berfeedback.
Driver dc motor using pulse width modulation technique (PWM), and the feedback
signal obtained from the optical encoder signals are coupled to a dc motor shaft. Control
response generated by setting-point step function with load variations imposed on the
motor shaft and the removal of some of the fuzzy rules also performed. Responses can
control output to follow a given load variations, as well as the removal of some fuzzy
rules, do not make the system significantly degraded. This shows that the fuzzy control
is quite tolerant of errors, and show the phenomenon of redundant. Implementation of
fuzzy control in multi-function microcontroller is reasonably priced and does not require
special fuzzy processors.

The use of Fuzzy Logic control


techniques have been quite widespread
in a variety of applications ranging from
industrial process control, household
electronics, robot control and others [1].
In this paper, given an example of a
simple application using fuzzy control,
the dc motor control system. Fuzzy
control is relatively easy and flexible
designed, with not involve complex
mathematical model of the system to be
controlled.
Dc motor control is here used as a
pottery-making machine player. Round
controlled within the range of 0-200
rpm with loading the raw material of
pottery around 3-5 kg. Setting-point

rounds are given with the help of


pedals, there are two pedals here
respectively for menabah and reduce the
setting-point.
The design of fuzzy control based on
the performance of baited control back
in general. Of the control response is
extracted membership function and
fuzzy if-then rule her. The system was
tested with a set-point gave the variation
and variable loading. Removal of some
fuzzy rules is also done by observing
the effect on the output response. The
results show the control response fuzzy
logic control can follow load variations
as well as the removal of some control
rule does not result in significant
degradation.

PLANING SYSTEM
In figure 1 is shown a block
diagram of a system in which the
blocks are:
1. Minimum
System
8031
software with fuzzy inference
system. Process control is
performed
by
the
microcontroller, ranging from
signal capture setting point, the
feedback signal, the error signal
calculation, calculation of fuzzy
logic process and issue the
results are used to excite the
motor
2. ADC circuit that functions as a
converter from analog to digital
scale magnitude, this ADC
circuit receives input SP (setting
point) on channel 0 and PV
(Present Value) on channel 1 in
the form of a feedback signal
output motor rotation.
3. The circuit DAC is used to
convert digital scale to scale
fuzzy calculation results for the
analog voltage is then fed to the
dc motor driver.
4. The series of F / V convert the
output frequency is generated by
the optical encoder of the motor
servo voltage to the voltage then
this is the price of Present Value
(PV) received by the ADC.
5. Drivers of motor function to
provide
excitation
voltage
anchor servo motor, which is
coupled to the motor shaft belt
mechanism for memutarpiringan
potters. This motor driver gets
input analog voltage from the
DAC.
6. LCD display is used to display
the value of the SP and PV and
process parameters for the fuzzy

logic degugging and testing


purposes.
7. Input the SP form of two pedals,
which function to run a small
motor that is coupled with a
potentiometer. pedals which
rotate the potentiometer to the
left and one turning to the right.
The output of this potentiometer
form a voltage input SP.

Figure 1.
System Block Diagram
a.

Planing Hardware

Figure 2.
Sketch of Mechanical Systems
Planned mechanical system can be seen
in Figure 2, which consists of:
a. The framework is a tool holder
and the motor shaft is made of
angle iron with a size of 3 x 3.
b. The transmission belt is a device
that connects a DC motor with a
pulley pulley pottery player.

c. Drive motor that uses a DC


motor with speed controlled
using fuzzy logic control.
d. Pulley pottery player that pulley
that transmits rotation of a DC
motor through a belt pulley disc
to potters.
e. Comparison between the fingers
of a DC motor with a shaft
pulley player is 1.5: 8, so that
the reduction of the pulley to the
shaft rotation player is at 81%.
f. The disc player pottery made of
particle board that is as a clay
laid.
g. Slots pemiring is to provide the
tool tilt angle. Tool changing
mechanisms slope is located
under the framework of the tool
b. Planing Software
Planned membership functions
for input and Err Err (error and
error change rate) consists of five
labels that NB (negative big), NS
(negative small), ZE (zero), PS
(positive small), and PB (positive
big ). Where:
Err(n) = SP(n) PV(n)
(1)
Err(n) = Err(n) Err(n-1) (2)
Where SP is the set-point value and
PV is the present value. While the
function of the fuzzy output
membership form to the shape
singleton Output have the same
label and Err Err. FLC to the
motor driver outputs are:
Output(n)=Output(n1)+Output (3)
Membership function is shown
in Figure 3. Rule is scheduled to
consist of a basic rule 9, 10 and 6
additional complementary rule. So
in total there are 25 rule. 9 basic rule

derived from the points of reference


(points ah) which is in figure 4,

S
P

Figure 3
Membership function
Which shows the typical response of
a control system and the division of
baited behind division [2], the next
rule is 10 additional rules to refine
the typical system response and 6
complementary rule to be used in
extreme conditions. Each rule in the
rule is derived from the additional
points that are between two points
of reference. 9 fuzzy control rule
base is presented in Table 1, 10
additional rule fuzzy control are
presented in table 2, 6 while the last
rule is presented in Table 3.

Figure 4
Typical System Response and
Distribution Area
Table 1. Fuzzy Control Rule Rule Basic

Table 2. Rule-Rule Fuzzy Control


Supplement

Table 3. Rule-Rule Fuzzy Control


Supplement

Figure 5
Flow Chart of Main Program
Listing Main Program :

The degree of each rule is obtained


from the minimum value of the label or
labels Err Err. The minimum value is
taken as part of the conditions
associated with the logical 'AND' so
that all the parts have to be fulfilled
simultaneously. To rule evaluation
process used maximum inference
method, meaning that the largest value
is taken between the rule with the same
label.

START
LCALL
DELAY
MOV
SP,#4FH
;INIT PPI
MOV
A,#080H
MOV
DPTR,#CW
MOVX
@DPTR,A
;INIT OUTPUT = 0
MOV
OUTPUT,#00H
MOV
A,OUTPUT
MOV
DPTR,#PORTA
MOVX
@DPTR,A
LCALL INISIALISASI_LCD
LCALL TAMPIL_SP_PV
;INIT SERIAL
MOV
TCON,#01000000B

MOV
TMOD,#00100010B
MOV
PCON,#00H
MOV
TH1,#0FDH
MOV TL1,#0FDH
MOV
SCON,#01000000B
;INIT INT0
SETB
IT0
SETB
EA
SETB
EX0
; INIT TAMPIL SP AND PV
MOV
CONTROL,#00H
MOV
A,#00H
MOV
DPTR,#ADC_SP
MOVX
@DPTR,A
ULANG
LCALL
COUNT_ERR_DERR
;FUZZY INFERENCE SYSTEM
LCALL
FIS
LCALL
OUTDATA
LCALL
TAMPIL_RPM
LCALL
DELAY
; SEND DATA ACQUISITION
LCALL
CONNECTION
LJMP ULANG

a. Burden on players earthenware


dish at 10 Kg and SP are set at a
speed of 200 RPM.
b. Burden on players earthenware
dish at 10 Kg and SP altered.
c. Burden on players earthenware
dish at 5 Kg and then added
another 5 Kg.
2). System by reducing the number of
rules to 19 pieces:
a. Burden on players earthenware
dish at 10 Kg and SP are set at a
speed of 200 RPM.
b. Burden on players earthenware
dish at 10 Kg and SP altered
(raising and decreasing).
c. Burden on players earthenware
dish at 5 Kg and then added
another 5 Kg.
The system response is then
displayed on a computer screen with the
help of PC data facilities Aquitition
contained on PetraFuz program.
PetraFuz program receives data from
the system response system 8031
microcontroller is sent serially. Figure
6. shows PetraFuz Program.

Here the process is done by the


Fuzzy Inference System Fuzzy Kernel
PetraFuz.
FIS
process
includes
fuzzification, rule evaluation, and
defuzzification. Fuzzy Kernel built in
assembly language for microcontroller
MCS51 family.

Here the authors wanted to test the


system response to the load variation
and variations in SP. Testing was also
done by providing interference from
outside in the form of additional friction
and increase load suddenly. The tests
were conducted as follows:
1) The system with rule number 25
pieces:

Figure 6. PetraFuz program


a. Response System with rule 25
System responds to fixed point
setting, shown in Figure 7. The
number of rules that are used 25,
which is 9 basic rule, 10 additional

rule and complementary rule 6 with


a load of 10 kg.

Figure 7
System Response to Setting Point
Fixed
From the figure it can be seen that
the response time of the system has
a very fast rise time of
approximately 3-4 seconds to shoot
over approximately 5-10 RPM.
Steady State Error response of the
system is also very small + 1 RPM.
Figure 13 shows the system
response to variations in setting
point. Setting point change from 200
RPM then lowered to 150 RPM, 100
RPM, and the last 50 RPM. In
contrast to the 14 images shown
boosts the system responds to
Setting Point.

Figure 8
System Response to Variation SP,
The load 10 Kg

Figure 9.
System Response to Variation SP,
The load 10 Kg.
From the figure it can be seen that it
takes time + 2 seconds to achieve
any change in Setting Point. With a
reach of 5-10 RPM overshoot.
Response systems with varying load
can be seen in Figure 15.

Figure 10
Response System to Load Variation
Given the load gradually, first 5 Kg
and then added another 5 Kg. Rule used
is a basic rule, the additional rule and
complementary rule with a total of 25
rules.
The figures show that the fuzzy
logic controller response is very fast, to
changes in load. The time needed to
reach
the
setting
point
after
experiencing the addition of load
between 1-2 seconds.
b. Response System with rule 19
Figure 11 shows the response of the
system with only the rule number 19,

this rule is the basic rules / basic plus an


additional rule. Load used 10 Kg.

Figure 11
Response System with rule 19, SP =
200 RPM, The load 10 Kg
From the Figure it can be seen
that the reduction rules do not affect
the response of the system
significantly. Figure 17 and Figure
18 shows the system response to
variations setting point.

Figure 12.
Response System with Rule 19 of the
Variation SP, Load 10 Kg

Figure 13.
Response System with Rule 19 of the
Load Variation, SP = 200 RPM
From Figure 17, Figure 18 and
Figure 19 it can be seen that the system
response to variations in Setting Point
and load variations with the basic rules
and additional rules, amounting to 19,
there are no significant changes,
although to achieve the desired setting
point slowdown around + 1 sec. To
Steady State Error of each image equal
to the Steady State Error in system
response with rule number 25.
CONCLUSION
Based on the results that have been
obtained, it can be a number of
conclusions, among others:
1. Fuzzy Logic Controller is a system
that is relatively easy to control its
design, because it takes no exact
mathematical model of the system. With
the rule-based approach and a common
sense system designed and built.
2. At this plant 9 basic rules (basic
rules) is the principal rule is used on
vertices, 10 additional rule is used to
refine the system response and 6
complementary rule is used when the
system is experiencing extreme
disruption.
3. Fuzzy Logic control has a redundant
and fault tolerant nature, in which the
reduction rule does not lead to an
uncontrollable system. He still can be
controlled by degraded.
BIBLIOGRAPHY
1. Klir, George J, Fuzzy Sets and
Fuzzy Logics : Theory and
Applications, NJ : Prentice Hall,
1995.

2. Wang, Paul P. & Dai, Jing, Design


of Fuzzy Controller According to
the Parameters of A Feedback
System,
Technical
Report
Electrical Engineering Department,
Duke University, 1994.
3. Thiang, Hanawati, A., and Resmana.
"Petrafuz : Sistem Pengembangan
Kendali Fuzzy Logic berbasis
Mikrokontroler Keluarga MCS51",
Prosiding
Seminar
Nasional
Penerapan Teknologi Kendali dan
Instrumentasi
pada
Pertanian,
BPPT-Jakarta. Oktober, 1998

PERTANYAAN:
1. Apa itu fuzzy logic?
2. Bagaimana cara mnggunakan
software PetraFuz51?
3. Menggapa fuzzy logic dapat
melakukan pengaturan terhadap
motor dc?
Sumber:
http://puslit2.petra.ac.id/eportfolio/artef
act/file/download.php?file=147683

You might also like