# Generation of a Reconfigurable Logical Cell Using Evolutionary Computation

Authors: I. Campos-Cantón; L. M. Torres-Treviño; E. Campos-Cantón; R. Femat
Journal: Discrete Dynamics in Nature and Society
 (2013)

---

## Abstract

In nature, an interesting topic is about how a cell can be reconfigured in order to achieve a different task. Another interesting topic is about the learning process that seems to be a trial and error process. In this work, we present  mechanisms about how to produce a reconfigurable logical cell based on the tent map. The reconfiguration is realized by modifying its internal parameters generating several logical functions in the same structure. The logical cell is built with three blocks: the initial condition generating function, the tent map, and the output function. Furthermore, we propose a reconfigurable structure based on a chaotic system and an evolutionary algorithm is used in order to tune the parameters of the cell via trial and error process.


---

## Body

## 1. Introduction

Adaptation in nature is a relevant research area that has many applications in artificial systems, which can be used for the benefit of society. Particularly in biology, a neuron can reconfigure itself to develop different tasks using the same structure; however, this procedure is a mystery. The processes of adaptation, learning, and coupling between them have been research pursuits therein, and the understanding of this processes can help to build artificial devices. The act of joining living tissue with electronics has long been imagined in the world of science fiction, but cybernetic organisms are now one step closer to reality, thanks to work emerging from researchers that have built tiny electronic meshes out of silicon nanowires and have used them as scaffolds to grow nerve, heart, and muscle tissue.Chaotic dynamical systems are commonly used in communication systems, like the generation of pseudorandom signals, and encryption, among others. Chaotic systems are recognized by the richness of their dynamics; however, these systems could be very sensible to perturbations or a combination of an infinite number of instabilities. Chaotic systems of one dimension may generate a remarkable variety of behaviors if they are observed as a function of time due to different initial conditions or their parameters [1]. The use of one-dimensional mapping is feasible, as the logistic map for instance or the tent map, to generate logical functions [2–4].Nowadays, the searching for alternative solutions in the hardware used in computational systems is a very important aspect in the area [5]; one of them is the development of reconfigurable hardware, where the chaotic circuits are candidates to perform these types of tasks [6–8]. As expected, the chaotic elements might generate different logical functions, with reconfiguration capabilities [9, 10]. Other alternatives consist of architectures that use programmable gates circuits (FPGA's), whose configuration is made by rewiring multiple static gates of single purpose; that is, a single logic gate has a fixed configuration. In this work, a tent map 1 is used to build a reconfigurable cell that generates different logical basic functions where an evolutionary algorithm is used to adjust its parameters [11–13]. 						(1)f(x)={μx,ifx<0.5,μ(1-x),ifx≥0.5.Evolutionary computation is a paradigm inspired by the natural selection theory proposed by Charles Darwin, where several evolutionary processes can be accounted for in computing including three of them in the developing of an evolutionary algorithm: the fitness assignation, the inclusion of diversity, and the selection of more fitted individuals that can reproduce and have offspring. In evolutionary computation the same process that occurs in nature is emulated, but in a simple way. Genetic algorithms, genetic programming, and estimation of distribution algorithms are examples of this kind of algorithms [11, 12]. In this work, an easy implementation of an estimation of distribution algorithm called Evonorm [13] is used for tuning the parameters of the reconfigurable logic cell. This counts as the actual way for tuning the parameters usually made by trial and error process. Using this algorithm generated all the sixteen logic functions considering two inputs.Although previous paragraphs seem to be uncorrelated, the possibility of designing reconfigurable logic cells by electronic circuits allows one (i) to explain how a same structure of artificial systems (circuits) can be reconfigured to develop different tasks; (ii) to incorporate chaotic dynamics as the basis of reconfiguration at the artificial systems (circuits); (iii) to define alternative architectures, distinct from FPGA's, such that the reconfiguration goes beyond rewiring; and (iv) to exploit evolutionary computation towards the optimization of parameters in the reconfiguration process. The main contribution of this paper is on a reconfigurable logic cell. This reconfigurable logic cell can represent several logical functions, all in the same structure changing specific parameters. The setting of these parameters is made by an evolutionary algorithm. In Section2, a reconfigurable logic cell is presented. In Section 3, the Evonorm evolutionary algorithm is described and used to set the parameters of reconfigurable logic cell proposed. In Section 4, the proposal architecture is used to generate different logical functions. Conclusion and future work are given in the last section.


## 2. Reconfigurable Dynamical Logic Cell

In our proposal, the reconfigurable logical cell is constituted by an architecture consisting of three blocks: (i) a generator of initial conditions, (ii) a tent map, and (iii) an output block. Each block obeys the following:(i)
the initial condition of the reconfigurable logic cell is defined by the following equation:(2)x0=(xs+BU)mod1,
where xs∈(0,1) is an ignition seed, B=[b1b2]∈R2, and U=[u1u2]T with u1,u2∈{0,1};(ii)
the tent map yields the first iteration using (1); that is,
(3)x1=f(xs+b1u1+b2u2);(iii)
the output block is a functiony:(0,1)→{0,1}, x1↦{0,1}, generating a bistable response as follows:
(4)y(x)={1,ifx1>β,0,otherwise,
where β is a threshold reference signal to determine the output of the system, a logical zero, or a logical one.Figure1 illustrates a block diagram of a reconfigurable logic cell defined by (1), (2), and (4). Considering the inputs u1,u2, the reconfigurable logic cell generates 16 logic functions. Without a loss of generality, we explain two functions f14 and f8 (OR & AND logic gates) of these 16 whose outputs satisfy the true Table 1.Table 1
True table for OR and AND logic gates.
u
1
u
2
OR
AND
0
0
0
0
0
1
1
0
1
0
1
0
1
1
1
1Figure 1
Block diagram of the logical cell.


### 2.1. Functionf14 (OR)

For the functionf14, the reconfigurable logical cell is tuned by considering the following parameters μ=2, b1=b2=0.2, β=0.5, and xs=0.1. These parameters satisfy the response shown in Table 2, column YOR.Table 2
Outputs for the logical functionsf14 and f8 (OR and AND logical gates).
u
1
u
2
x
s
f
(
x
)
Y
OR
(
x
)
Y
AND
(
x
)
0
0
0.1
0.2
0
0
0
1
0.1
0.7
1
0
1
0
0.1
0.7
1
0
1
1
0.1
0.8
1
1The behavior of the reconfigurable logic cell is described in what follows. If the initial condition isx0=0.1+0.25u1+0.25u2 and inputs u1=0,  u2=0, then x0=0.1 and the first iteration of the tent map 1 is f(x)=0.2. Thus, the output defined by 4 is y=0. Repeating the exercise with u1=0,  u2=1, we have x0=0.35, f(x)=0.7, and y=1. Following this way, all the possible combinations are considered with two logic inputs to get the results illustrated in column YOR(x) of Table 2, so the logical cell under the parameters defined above can generate the behavior of a logical function OR.


### 2.2. Functionf8 (AND)

For this case, the same parameter values used above are considered, except theβ parameter is now tuned to 0.75. Note that only one parameter is reconfigured. The output of the logic gate is shown in Table 2, column yAND. This means that only one parameter is changed for the reconfiguration of the logical cell generating from the logical function OR to the logical function AND.Note that the selection of the parameter values can be adjusted by trial and error but this was an exhausted task; hence, the evolutionary algorithms arise as a convenient alternative. We propound the Evonorm evolutionary algorithm to be used for the selection of the parameter values and the algorithm explained in the next section.


## 2.1. Functionf14 (OR)

For the functionf14, the reconfigurable logical cell is tuned by considering the following parameters μ=2, b1=b2=0.2, β=0.5, and xs=0.1. These parameters satisfy the response shown in Table 2, column YOR.Table 2
Outputs for the logical functionsf14 and f8 (OR and AND logical gates).
u
1
u
2
x
s
f
(
x
)
Y
OR
(
x
)
Y
AND
(
x
)
0
0
0.1
0.2
0
0
0
1
0.1
0.7
1
0
1
0
0.1
0.7
1
0
1
1
0.1
0.8
1
1The behavior of the reconfigurable logic cell is described in what follows. If the initial condition isx0=0.1+0.25u1+0.25u2 and inputs u1=0,  u2=0, then x0=0.1 and the first iteration of the tent map 1 is f(x)=0.2. Thus, the output defined by 4 is y=0. Repeating the exercise with u1=0,  u2=1, we have x0=0.35, f(x)=0.7, and y=1. Following this way, all the possible combinations are considered with two logic inputs to get the results illustrated in column YOR(x) of Table 2, so the logical cell under the parameters defined above can generate the behavior of a logical function OR.


## 2.2. Functionf8 (AND)

For this case, the same parameter values used above are considered, except theβ parameter is now tuned to 0.75. Note that only one parameter is reconfigured. The output of the logic gate is shown in Table 2, column yAND. This means that only one parameter is changed for the reconfiguration of the logical cell generating from the logical function OR to the logical function AND.Note that the selection of the parameter values can be adjusted by trial and error but this was an exhausted task; hence, the evolutionary algorithms arise as a convenient alternative. We propound the Evonorm evolutionary algorithm to be used for the selection of the parameter values and the algorithm explained in the next section.


## 3. Evolutionary Computation

An important question is about the existence of an efficient way to determine the values of the parameters of the reconfigurable logic cell. In this section, we show how parameters can be tuned in order that the logical functions will be generated. Particularly, we illustrate the case of 2 inputs generating 16 outputs. An evolutionary algorithm is used to this end. Essentially, an evolutionary algorithm is used for searching solutions [11, 12]. Here we exploit it to tune the parameters of the reconfigurable logic cell. The selected evolutionary algorithm is called Evonorm [13] and is based on four items as follows:  (1)
representation of individuals;(2)
evaluation or fitness calculation of every individual;(3)
selection of the best fitted individuals;(4)
generation of new individuals.Tracking the above four items, every potential solution is represented as an individual of a population where it is assigned an evaluation value depending on its performance to solve the problem of tuning the parameters. Specifically, In Evonorm, a marginal random variable is used for yielding a new population via an estimation of a normal distribution. The implementation of the algorithm requires two matrices and three vectors. One of the two matrices is namedP∈ℝTi×TP, which represents the population of solutions, where Ti is the number of total individuals and TP is the number of parameters. The other matrix is denoted as Ps∈ℝTs×TP, which stores selected individuals, where Ts is the number of selected individuals, usually ten percent of the total population. The vector FE∈ℝTi×1 stores the evaluation value per individual. The vectors μ∈ℝTp×1 and σ∈ℝTp×1 are used for storing the mean and standard deviation, respectively, of the random variable used per parameter. The above definitions correspond to the first item of evolutionary algorithm Evonorm. The initial population is generated randomly using a uniform distribution function.In what follows, the Evonorm evolutionary algorithm is highlighted for determining the initial conditions of the reconfigurable logic cells. Every individualk of the population is evaluated as follows.Step 1.
Evaluation and extraction of the logical cell parameters. Extraction of the parameters:xs=P(k,1), μ=P(k,2), β=P(k,3), b1=P(k,4), and b2=P(k,5).Step 2.
Calculation ofr=∑pr=1TP‍|ydpr-y(xs),μ,k,b1,b2)|/4, where ydpr is a vector that represents the expected output values corresponding to every input combination in the cell. For example, the function f7 has the following outputs ydpr=[1;1;1;0] that correspond to the inputs [00;01;10;11], respectively. The maximum number of outputs is considered to perform the normalization; in this example, number four is used for the normalization of the evaluation.Step 3.
Determine the evaluation asFEk=1-r. A maximization of this function is expected.Step 4.
Selection of the most fitted individuals. This procedure sorts the individuals of matrixP using the evaluation vector FE as a criterion. Then a selection of Ti individuals is made for generating a new population Ps. In this procedure is stored the best fitted individual in vector Ix∈ℝTs×TP.Step 5.
Calculate the mean and the standard deviation per parameter:(5)μpr=∑k=1Ts(Psk,pr)Ts,σpr=(∑k=1Ts(Psk,pr-μpr))Ts.Step 6.
Generate a new population considering a marginal random variable with normal distribution:(6)Pk,pr={N(μpr,σpr),U()>0.5,N(Ixpr,σpr),otherwise.N
(
μ
pr
,
σ
pr
) is a random variable that generates numbers with a normal distribution function considering a mean μpr and a standard deviation σpr, precalculated previously. The approximation of a standard random variable with a normal distribution is calculated using (7), where U() is a random variable with normal distribution:
(7)N(μ,σ)=μ+σ(∑i=112‍(U())-6).Steps1–6 are repeated several times in cycles called generations. This algorithm is capable of adjusting the parameters of the reconfigurable logical cell and generates all the logical functions for two inputs u1,u2.


## 4. Tuning Parameter Values by Evonorm

Evonorm algorithm is used to generate a better parametric solution for all the logic functions considering two input variables, as shown in Table3.Table 3
Logic functions.
u
1
u
2
f
0
f
1
f
2
f
3
f
4
f
5
f
6
f
7
f
8
f
9
f
10
f
11
f
12
f
13
f
14
f
15
0
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
1
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1The parameter values for all the logic functions with two inputs were generated by an evolutionary algorithm (Table4). For example, the boolean function f12 is generated by considering the parameter values xs=0.111, μ=2, b1=0.25, b2=0.1, and β=0.5 according to Table 4. The initial condition x0 is equal to 0.11 with inputs u1=0, u2=0; so these value are used in (1) to get in the first iteration f(x)=0.222, and the output y=0 is given by (4). Repeating this process, all the outputs are generated, as illustrated in Table 4.Table 4
Parameter's values for generating 16 logic functions.
Función
μ
b
1
b
2
β
x
s
f
0
2
0.25
0.25
0.85
0.111
f
1
2
0.3
0.3
0.9
0.45
f
2
2
0.7
0.15
0.5
0.111
f
3
2
0.3
0.2
0.8
0.4
f
4
2
0.15
0.7
0.5
0.111
f
5
2
0.2
0.4
0.5
0.4
f
6
2
0.45
0.45
0.25
0.111
f
7
2
0.45
0.45
0.1
0.111
f
8
2
0.25
0.25
0.75
0.111
f
9
2
0.5
−0.1
0.6
0.3
f
10
2
0.1
0.25
0.5
0.111
f
11
2
−0.1
0.4
0.6
0.3
f
12
2
0.25
0.1
0.5
0.111
f
13
2
0.4
−0.1
0.6
0.3
f
14
2
0.25
0.25
0.5
0.111
f
15
2
0.25
0.25
0.2
0.111


## 5. Conclusion

A development of a reconfigurable logic cell based on tent map is presented. The reconfiguration is made by tuning the parameter values:xs, β, b1, b2, and μ. The Evonorm algorithm is a useful tool for tuning the parameter values of the reconfigurable logic cell and generating all the 16 boolean functions of two logical inputs (remaining fixed μ, Table 4). As a future work, a comparison between other evolutionary algorithms and the use of reconfigurable logic cells with three or more inputs is expected.



---

*Source: 250593-2013-03-21.xml*