Professional Documents
Culture Documents
1
International Journal of Computer Applications (0975 8887)
Volume 94 - No. 14, May 2014
2
International Journal of Computer Applications (0975 8887)
Volume 94 - No. 14, May 2014
u Error (e)
NB NM NS ZE PS PM PB
Linguistic variables NB NM NS ZE PS PM PB
Coded value 0 1 2 3 4 5 6
[Initial Population]. GA starts with generating a random popula- Where: mk the centre of fuzzy output set, Bk , k = 1, 2...m is the
tion of n chromosomes (suitable solutions for the problem). The fuzzy output variable. Using the maximum inference engine:
population is composed by binary or real coded string chromo-
somes. µBk = max(µR1 , µR2 , ..., µRr ) (2)
[Calculate Fitness]. Evaluate the fitness value of each chromosome Where: r is the total of candidate rules, Ri is membership function
in the population. of rule Ri.
[Test]. If the end condition is satisfied, Stop, and return the best
solution in the current population. 3.1 Tuning Fuzzy rules using DC Servomotor Speed
[New population]. If the condition is not satisfied, a population is profile
generated by following the steps below until a new population is
complete. In order to design an optimized FLC, the initial rules were estab-
lished in Table 1 in according to with [22]. The linguistic vari-
(1) [Selection]. Selects two parent chromosomes from a popu-
ables were defined as: NB: Negative Big, NM: Negative Medium,
lation according to their fitness (the better fitness, the bigger
NS: Negative Small, ZE: Zero, PS: Positive Small, PM: Positive
chance to be selected).
Medium, PB: Positive Big.
(2) [Crossover]. With a crossover probability, cross over the The step response was supposed to be divided into 2 stages as in
parents to generate new offspring. If no crossover was per-
Fig.3: the first stage was increasing stage (ST1) of velocity and
formed, the offspring is copied exactly the parents.
the other was decreasing stage of velocity (ST2)[10]. In the first
(3) [Mutation]. with a mutation probability, mutate new off-
spring at each locus. stage, the speed of the motor increased to the maximum speed that
depends on the load, bearing friction etc. and then stabilized with
this speed until the end of this stage. The terminative point of this
3. A NEW DC MOTOR TUNING ALGORITHM - stage was at around 40% of the reference value. The second stage
FLCSGA ALGORITHM continued to stabilize the motor’s maximum speed until the point
of around 60% reference value and then reduced to get the stable
The algorithm used two consecutive stages to optimize the FLC: speed of zero. The algorithm is summarized as:
the first one was used to tune the Fuzzy rules based on Motor’s
speed profile and then GA with the new coding method was Begin
applied to optimize the MF(s) of the FLC. GetMinimumVoltage();
For the Mamdani fuzzy logic controller, the algorithm used AND CheckConditionForST1;
operator for inference engine and the centre of gravity defuzzifica- CheckConditionForST2;
tion formula :
End.
The missions of GetMinimumVoltage() function is to get the min-
Pm imum requirement voltage of the motor to achieve the maximum
i=1 .mk .µBk (u) speed and to count the minimal acceleration time of the motor.
u= P m (1)
i=1 .µBk (u) CheckConditionForST1 implements to control motor and check
3
International Journal of Computer Applications (0975 8887)
Volume 94 - No. 14, May 2014
When implementing a simple genetic algorithm a number of issues To evaluate the performance of the DC Servomotor, the algorithm
must be handled [12], these include the coding procedure, the se- compared the minimum value of the cost functions to get the mini-
lection , crossover, mutation. mal value.
3.2.1 A new encoding method for membership functions. The
membership functions show the fuzziess degree in a premise. How- 4. EXPERIMENTS AND RESULTS
ever, the main feature of membership function is their overlapping
capability rather than their shapes precision [18]. Consider a tri-
4.1 Experimental setup and method
angle fuzzy member and its parameters are C kr , C kc and C kl , re- In order to analyze and verify the FLCSGA algorithm, the FLC-
spectively, represent the coordinates of right anchor, cortex and left SGA was used to optimize the FLC of a DC Servomotor. The ex-
anchor of kth linguistic degree. In addition, as mention above, each perimental model is shown in Fig.6.
universe of discourse was divided into 7 linguistic variables. There- In the Fig.6, the PCI 6024 is a PCI pulse counter board to measure
fore, the algorithm needed 21 parameters to represent each Input the number of revolutions of motor shaft. And the PCI 3523A is a
or Output premise. Furthermore, without loss of generality, we as- 12-bit analog Input/Output board that is used to perform AD/DA
sumed that the first and the last degrees of fuzzy number were left- conversion. The dash or dash-dot lines are the power transmission
and right- skewed triangles, respectively. It is noticed that the first, form energy sources to the Encoder HEAL 5540 and the motor con-
last and center anchor of each universe of discourse are -1,1 and 0 troller. The motor RE 35-273752, which is attached a 4.8 :1 reduc-
respectively and they need not to be tuned. As a result, to represent tion ratio Gearhead, is controlled by a Maxon Motor controller of
each premise the algorithm only needed 16 parameters. Additional AD 50/5. Two power supplies are PMC 18-3 which are set up based
constraint are imposed: C kr ≥ C kc ≥ C kl , and the condition to on the specification of the encoder, motor controller and motor. The
prevent overlapped membership functions [2] a typical premise of continuous lines are the signal lines to get the current revolution of
input and output is expressed as Fig.4 or as in (3). the motor shaft and to control the motor.
Firstly, the universe of discourses were split into 6 equal fuzzy sets
C0kl = C0kc = −1 ≤ C1kl < C0kr ≤ C1kc ≤ C2kl < ... and run the first stage of FLCSGA. The experiments were imple-
(3) mented in different reference values from 20 to 40 which represent
≤ C3kc = 0 ≤ ... ≤ C6kl < C5kr ≤ C6kr = C6kc = 1 the different fuzzy sets. Next, the second stage of optimization us-
ing FLCSGA was done to optimize the membership functions of
From the condition (3), we suggested a simple way to achieve the the FLC.
of parameters’ values at initial time to generate the first generation
is that in each current range of universe of discourse, [0,1] for exam- 4.2 Experiment results by FLCSGA
ple, 8 values was randomly selected and rearranged following the
increasing trend. These increasing values after that were assigned After running the first stage, the speed responses of the motor were
to the parameters form C1kl to C5kr . The process of rearrangement collected as in Fig.7 for the different reference values as well as
4
International Journal of Computer Applications (0975 8887)
Volume 94 - No. 14, May 2014
Power
Supplier
TMR-2201
40
revolution [rev]
30
20
10
0 ENCODER
0 1 2 3 4 5
Time [sec]
TMR-2401
PCI 6024
Motor
controller
the optimized rule base as in Table 3. The maximum speed of the Table 3. : Optimized rule base.
motor in this case is the no load speed:
u Error (e)
7070
n0 = = 24.5[rev/sec] (5) NB NM NS ZE PS PM PB
4, 8.60
NB NB NB NB NB NM PM PM
Change of Error (ce )
5
International Journal of Computer Applications (0975 8887)
Volume 94 - No. 14, May 2014
-10 20
40
-15 35
30
-20
-25
-30
Time [sec]
a) b)
Fig. 8: Fuzzy rule base surfaces at the first and after the second stage generated by FLCSGA.
970
950
930
Fitness (IAE)
910
890
870
850
830
810
0 2 4 6 8 10 12
Generations
Fig. 9: Convergence properties of the proposed FLCSGA algorithm.
6
International Journal of Computer Applications (0975 8887)
Volume 94 - No. 14, May 2014
Algorithm
GA [24] GA [4] GA [15] PSO [21] FLCSGA
Generations 300 100 100 30 12
Chromosomes 30 72 40 16
7
International Journal of Computer Applications (0975 8887)
Volume 94 - No. 14, May 2014
Nominal Voltage V 15
Max.efficiency % 81