You are on page 1of 22

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/336071523

Chapter four Design and implementation of proposed system

Chapter · September 2019

CITATIONS READS

0 1,405

1 author:

Mazin Haithem
Baghdad College of Economic Sciences University
12 PUBLICATIONS   10 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Certificates of Achievement View project

‫ ﺗﻨﻈﻴﻢ اﻟﺤﺴﺎﺑﺎت اﻟﻤﺼﺮﻓﻴﺔ‬View project

All content following this page was uploaded by Mazin Haithem on 26 September 2019.

The user has requested enhancement of the downloaded file.


Chapter four

Design and implementation


of proposed system

4
4.1 introduction
in this chapter dealing with following point
• proposed system scope
• system design
• implementation of proposed system
• discuses system result

4.2 proposed system scope


proposed system deal with design logic circuit and which one low
energy as fitness function, proposed system may be cover all passable
probability circuit when limit number of (input and gates). Finally two
term basic design criteria and genetic algorithm mix to achieve goal,
Figure (4,1) illustrated it

Proposed Genetic

logic design system

mix between genetic and logic design

Figure (4.1 mix between GA and Digital Design


and system scope illustrated in Figure (4.2)

Proposed system

Design circuit Fitness curve Setting and regeneration

Registering and output processing

Design under GA control

Figure (4.2 ) system scope

4.3 system design


while deal with genetic algorithm now must clear the following
point
• coding
• initial population
• fitness function
coding
using binary stream with 14 Bit length divided as:
1 2 3 4 5 6 7 Bit 8 -------------------- Bit 12 13 14

Input Logic Gate


Not Logic Gate
Not 7 ……………………………… 12 …

7-12 same arrange representing of coding


And following table (4.1) classify input and gate binary code.

Binary code Description


All for input bit
00 A
01 B
10 A+ Feed Q
11 B+ Feed Q
All for Gatet bit
00 OR
11 AND
01 XOR
10 XOR
All for NOT bit
0 Inactive
1 Active

Table (4.1) binary code


initial population
in GA must start with initial population to generate new
population with specific population size such as 10, 15 , 20 ..etc.
and following algorithm 4.1 show GA processing.
1. Randomly creating population of n-
chromosomes (candidate solutions to problem).
Where n is the population size.
2. Compute fitness function value for each
chromosome in the population.
3. If stopping condition satisfy (achieve the goal)
then stop.
4. Repeat the following steps until n offspring has
been created:
a. Select a pair of parent chromosome from
the current population. The same
chromosome can be selected more than
once to become a parent.
b. Perform crossover on every two strings
chosen randomly with crossover
probability to generate new child.
c. Perform mutation operation at each locus
with mutation probability. Place the
resulting chromosomes in the new
population.
5. Replace the current population with the new
population.
6. Go to step 2.

Algorithm( 4.1) GA processing


And algorithm 4.2 using to generate first randomize pop. With n size

Procedure Ini_14bit_binary(n as integer;


Var str as bit stream )

Begin
Pop_size=n
str_len = 14

For i = 1 To pop_size
For j = 1 To str_len
p(i, j) = RndNum(0, 1)
strin(Gen, i) = strin(Gen, i) + Right(Str(p(i,
j)), 1)

Next j
Next i
end

Algorithm (4.2) Random binary stream generate

Fitness function
To solve a problem, some means or procedures must be used
to discriminate good solution from bad solution.
A fitness function must be devised for each problem, given a
particular chromosome; the fitness function returns a single numerical
fitness value, which is proportional to the ability, or utility, of the
individual represented by that chromosome. Better chromosomes are
assigned higher fitness function values .
For many problems, deciding upon the fitness function is very
straightforward, for example, for function optimization search; the fitness
is simply the value of the function. However, there are cases where there
may be many performance measures to optimize .
Using 1/energy sum as fitness function[30].

For example

011111 (A NAND B)

000101 (A NXOR B)

001110 (A XOR B)

Apply fitness as
Assume eng. Data list to improve it for all Gate
and buss thus:
1/ ~(A xor B) > 1/ ~(~A XOR ~B)

where ~ is NOT

And algorithm 4.3 clear fitness function

Procedure fitness(n as integer;


Vart F as real)
Begin
pop_size =n
str_len = 14

For i = 1 To pop_size
Assign energy (Data, f)
Fitness( i) = (1 / ( f))
Next i
End

algorithm (4.3) Fitness algorithm


From Figure (4.2) see the inter active between all system part and all
under control the control support more flexibility support system with
variant pop. Size to make comparison with other.

4.4 Implementation of proposed system


The program is written in visual basic language (Version 6.0),
there are some reasons led to choose this language:
• Visual Basic has a powerful user interface, when have many
capabilities.
• It allows a programmer to use made-up components.
• It expands to the object basic language to include dynamic arrays
that don’t have a fixed size or length, memory for a dynamic array
is relocated when you assign a value to the array.
• It builds an executable file that dose not need any Dynamic Link
Library (DLL).

And algorithm 4.4 represent main engine to improve system scope>

Input (setting as record


Pop_size as integer;
Rate as real;
)
output (circuit design as graphic group;
fitness value as real;
fitness curve as point draw;
)
Begin
Loop i=1.. pop_size
Generate random binary stream of 14 bit
End loop

Do while not exit


Begin
Loop j=1.. Gen
Loop i=1.. pop_size
 Analysis bit stream by code
references Rule
 Calculate fitness function
Pop(j,i)
 Save pop(j,i) fitness
End loop i
selection operation Roulette wheel
cross over for selection pop
End loop j
Read Gen you went j
Loop i= 1.. pop_size
 Draw circuit (j,i) that design
 Clear fitness (j)curve
End loop i
End
End.

Algorithm (4.4) main engine


System interface can clear all that as show in Figure 4.3(a, b and c)..

Figure (4.3 a) initial system interface

Figure (4.3 b) show pop no 4


Figure (4.3 c) show setting facility support ny system

Figure (4.3 d) apply new setting


4.5 Discuss system result
from char 1 and char 2 and design list 1 and design list 2, when make
focusing on char 1, char 2 can see the different fitness that generate many
circuit with different enerage and only select which one better to improve
all result give good indicate

Char 1 from list 1

Char 2 from list 2


List 1
Binary stream Gen Max Min Avr
11111011101110 1 0.01282 0.00006 0.009
11111111011111 2 0.0007 0.00006 0.002
11011011001011 3 0.00487 0.00007 0.006
11111010101111 4 0.0018 0.00006 0.003
11111010000110 5 0.00354 0.00006 0.003
11111101000100 6 0.00271 0.00006 0.002
11111001000111 7 0.00077 0.00006 0.002
11111101101110 8 0.001 0.00006 0.002
11101110111010 9 0.00116 0.00006 0.002
11111000001101 10 0.00126 0.00006 0.002
11110100101101 11 0.00244 0.00006 0.003
11100011011101 12 0.00226 0.00006 0.002
11111101101110 13 0.00186 0.00006 0.003
11110011100110 14 0.01428 0.00006 0.008
01111101101110 15 0.00171 0.00006 0.002
11111011011111 16 0.00284 0.00006 0.003
11111011011111 17 0.00148 0.00006 0.003
11111000110101 18 0.00769 0.00006 0.006
11111110110010 19 0.00364 0.00006 0.004
11111111010111 20 0.00245 0.00006 0.002
11111110001101 21 0.02702 0.00006 0.018
11111101000011 22 0.00089 0.00006 0.002
11111100111001 23 0.00125 0.00006 0.002
11111000011101 24 0.00381 0.00006 0.005
11111000100011 25 0.00168 0.00006 0.002
11111111011111 26 0.00442 0.00006 0.004
11011101101110 27 0.00617 0.00006 0.005
11110111100010 28 0.00091 0.00006 0.001
11111011001110 29 0.0054 0.00007 0.007
11011010001011 30 0.00253 0.00007 0.003
11011010001011 31 0.00052 0.00007 0.001
11111111010011 32 0.0007 0.00006 0.002
11111010011011 33 0.0029 0.00006 0.004
11110000000110 34 0.00046 0.00006 0.001
11111101010111 35 0.00227 0.00006 0.002
11110100011110 36 0.00355 0.00006 0.004
11111110011111 37 0.00091 0.00006 0.002
11111001000111 38 0.00135 0.00006 0.003
11011111101001 39 0.00091 0.00006 0.002
11101110001100 40 0.00591 0.00006 0.004
11011011110010 41 0.00126 0.00007 0.002
11111010011011 42 0.0007 0.00006 0.001
11111011111110 43 0.00226 0.00006 0.002
11111101101110 44 0.00089 0.00006 0.002
11110011100110 45 0.01428 0.00006 0.01
11011011001011 46 0.00171 0.00007 0.002
11100101101110 47 0.00284 0.00006 0.002
11111011011111 48 0.00077 0.00006 0.002
11111111011111 49 0.00769 0.00006 0.005
11111010011011 50 0.00364 0.00006 0.005
11111000011100 51 0.00227 0.00006 0.003
11111110001101 52 0.02702 0.00006 0.017
11111110011101 53 0.00089 0.00006 0.002
11111101000111 54 0.00125 0.00006 0.002
11011011110010 55 0.00381 0.00007 0.004
11110111000100 56 0.00168 0.00006 0.002
11111111011111 57 0.0007 0.00006 0.001
11101010110100 58 0.00617 0.00006 0.005
11110111100010 59 0.00091 0.00006 0.001
11111101110011 60 0.00062 0.00006 0.001
11110011101110 61 0.00046 0.00006 0.001
11011010001011 62 0.00052 0.00007 0.001
11111010011011 63 0.00063 0.00006 0.001
11111010011011 64 0.00102 0.00006 0.003
11011111101001 65 0.00092 0.00006 0.002
11111101010111 66 0.00087 0.00006 0.001
11110100011110 67 0.00355 0.00006 0.004
11111101000011 68 0.00091 0.00006 0.001
11111101101110 69 0.00135 0.00006 0.002
11100011000100 70 0.00091 0.00006 0.002
11101001101100 71 0.00591 0.00006 0.005
11010010011011 72 0.00126 0.00007 0.002
11111010011011 73 0.0007 0.00006 0.002
11110100000100 74 0.00186 0.00006 0.002
11110111011111 75 0.01428 0.00006 0.008
11100100011110 76 0.00204 0.00006 0.003
11100001011001 77 0.02702 0.00006 0.015
11111100000011 78 0.00069 0.00006 0.001
11111011000110 79 0.00099 0.00006 0.002
11111111011111 80 0.00113 0.00006 0.002
11111010011011 81 0.00097 0.00006 0.003
11000000011011 82 0.00126 0.00008 0.002
11111011001001 83 0.00096 0.00006 0.002
11111110011101 84 0.00091 0.00006 0.002
11111101000111 85 0.00093 0.00006 0.001
11101000100001 86 0.00381 0.00006 0.004
11110100011110 87 0.0028 0.00006 0.003
11111111010011 88 0.0007 0.00006 0.001
11100110100101 89 0.00084 0.00006 0.002
11100110011101 90 0.00226 0.00006 0.002
11111101110011 91 0.00042 0.00006 0.001
11110100011110 92 0.00266 0.00006 0.002
11110111100110 93 0.00046 0.00006 0.001
11100001011001 94 0.00052 0.00006 0.001
11111010011011 95 0.00102 0.00006 0.002
11100011000100 96 0.0074 0.00006 0.005
11111000011100 97 0.00126 0.00006 0.002
11110100001100 98 0.00355 0.00006 0.003
11111110011101 99 0.00091 0.00006 0.002
11111101101110 100 0.00091 0.00006 0.002

List 2
Binary stream Gen Max Mini Avr
11111011101110 1 0.01282 0.00006 0.009
11111010100000 2 0.00346 0.00006 0.003
11111100110010 3 0.00043 0.00006 0.001
11111101110100 4 0.00131 0.00006 0.002
11110001111111 5 0.00354 0.00006 0.003
11110000110010 6 0.00161 0.00006 0.002
11111010101111 7 0.0011 0.00006 0.001
11111100000011 8 0.00309 0.00006 0.003
11111100001110 9 0.01111 0.00006 0.007
11110010001111 10 0.00113 0.00006 0.002
11111011011101 11 0.00084 0.00006 0.002
11111101100100 12 0.00131 0.00006 0.002
11101000111100 13 0.00133 0.00006 0.002
11110101010111 14 0.00395 0.00006 0.004
11100100011111 15 0.00069 0.00006 0.001
11111011111101 16 0.00884 0.00006 0.01
11101100010011 17 0.00069 0.00006 0.001
11101101110100 18 0.00154 0.00006 0.002
11101110110111 19 0.00124 0.00006 0.002
11111100111010 20 0.00084 0.00006 0.001
11110010001111 21 0.00531 0.00006 0.004
11110111011101 22 0.00641 0.00006 0.005
11111100100011 23 0.00102 0.00006 0.002
11111110010010 24 0.01538 0.00006 0.01
11101010001111 25 0.00173 0.00006 0.002
11111011011101 26 0.00088 0.00006 0.003
11100101011001 27 0.00045 0.00006 0.001
11111111001110 28 0.00089 0.00006 0.001
11111100011010 29 0.01369 0.00006 0.009
11110100110111 30 0.00558 0.00006 0.004
11111011111101 31 0.00354 0.00006 0.004
11111011100010 32 0.00111 0.00006 0.002
11110000101111 33 0.00452 0.00006 0.004
11111101001101 34 0.0014 0.00006 0.002
11101010111101 35 0.00093 0.00006 0.001
11100100001111 36 0.0014 0.00006 0.002
11111010001111 37 0.00114 0.00006 0.003
11011101001101 38 0.00102 0.00007 0.002
11111010000110 39 0.01369 0.00006 0.009
11100111001101 40 0.00049 0.00006 0.001
11111110010010 41 0.00045 0.00006 0.001
11110000001111 42 0.00049 0.00006 0.001
11111101001101 43 0.0014 0.00006 0.002
11101000111100 44 0.00735 0.00006 0.006
11111100000110 45 0.00197 0.00006 0.002
11110110001111 46 0.00088 0.00006 0.002
11101101100001 47 0.00343 0.00006 0.003
11111110101111 48 0.00264 0.00006 0.002
11110100010110 49 0.00151 0.00006 0.002
11111100011010 50 0.0014 0.00006 0.002
11110011011011 51 0.00558 0.00006 0.004
11101101111001 52 0.00104 0.00006 0.001
11111010101111 53 0.00044 0.00006 0.001
11101101110100 54 0.0027 0.00006 0.003
11110110111111 55 0.01075 0.00006 0.007
11100100101111 56 0.00505 0.00006 0.005
11111010001111 57 0.00531 0.00006 0.005
11110100110110 58 0.00558 0.00006 0.006
11111100000011 59 0.00134 0.00006 0.002
11110011110011 60 0.00558 0.00006 0.004
11110101010001 61 0.00062 0.00006 0.001
11111010001111 62 0.00142 0.00006 0.002
11111001100100 63 0.0011 0.00006 0.001
11110101111111 64 0.00085 0.00006 0.002
11110110010010 65 0.01369 0.00006 0.008
11110101001101 66 0.00113 0.00006 0.001
11110100110110 67 0.004 0.00006 0.003
11100100101111 68 0.00069 0.00007 0.001
11111010101111 69 0.00045 0.00006 0.001
11110001110100 70 0.00173 0.00006 0.003
11110010001111 71 0.00151 0.00006 0.002
11110001101010 72 0.00343 0.00006 0.003
11111011100110 73 0.00111 0.00006 0.002
11111110111111 74 0.00026 0.00006 0.001
11110101101101 75 0.0014 0.00006 0.002
11111110100110 76 0.00413 0.00006 0.003
11101101111001 77 0.0014 0.00006 0.002
11011110000010 78 0.00105 0.00007 0.001
11011101000100 79 0.00296 0.00007 0.002
11110111001110 80 0.00067 0.00006 0.001
11111010111101 81 0.00395 0.00006 0.004
11111110010010 82 0.00729 0.00006 0.006
11101110111111 83 0.00129 0.00006 0.002
11111101001101 84 0.00105 0.00006 0.002
11110101110111 85 0.00091 0.00006 0.002
11100100101000 86 0.00093 0.00006 0.001
11110110001111 87 0.00088 0.00006 0.002
11110101000100 88 0.00271 0.00006 0.002
11111101001101 89 0.0014 0.00006 0.002
11111011111101 90 0.00246 0.00006 0.004
11110110010010 91 0.0014 0.00006 0.002
11101100100100 92 0.00413 0.00006 0.004
11101101111001 93 0.00105 0.00006 0.001
11110001110111 94 0.01052 0.00006 0.012
11100100011111 95 0.02 0.00006 0.015
11111100111111 96 0.01075 0.00006 0.007
11110101101101 97 0.00113 0.00006 0.001
11100100010111 98 0.00099 0.00006 0.001
11111011100010 99 0.00111 0.00006 0.001
11100111010100 100 0.00581 0.00006 0.004
Chapter five

Conclusion and suggesting


for future work

5.1 introduction
in this chapter dealing with following point
• conclusion point
• future work suggestion
5
5.2 conclusion
many point achieved from proposed system :
1- it wrest case using small search space to achieved goal.
2- best method to design logic circuit and calculate estimate real
energy value by apply fitness function, to find the best design.
3- Two or more than circuit give same result with different energy
support designer to choice one of them so clear and benefit.
4- Bit stream with length 14 is more flexible to view similarity and
redundant avoid with high speed .
5- Setting facility support by proposed system give multi case study
to improve and show genetic algorithm powerful and wrest case
.
5.3 future work suggestion
while deal with computer system and design theory thus no
complete work as really, many of suggestion for future and list some of
them
1- proposed system with specific number of gate and input “limited in
design “, suggest as more flexible with N and M variantnumber
input and gate..
2- All energy value is estimated with E.001 to real value, suggest to
increasing it to be near to real value .
3- If add auto_plot channel improve all circuit design on printed

board .
4- Change bit stream with new code system give more powerful result

because binary system not benefit with variant gate and input large,
west time.

View publication stats

You might also like