Logical Gates Using a Nonlinear Chemical Reaction - The Journal of

Logical Gates Using a Nonlinear Chemical Reaction ... Chemical Wave Logic Gates .... Crystal Growth and Design's latest Special Issue celebrates Willi...
0 downloads 0 Views 508KB Size
J . Phys. Chem. 1994,98, 1533-1531

7533

Logical Gates Using a Nonlinear Chemical Reaction D. Lebender and F. W. Schneider' Institut f i r Physikalische Chemie, Universitiit Wiirzburg, Marcusstrasse 9- 11, 97070 Wiirzburg, Germany Received: December 1 , 1993; In Final Form: May 3, 1994"

We present a system of continuous flow stirred tank reactors (CSTR) to build logical gates using a bistable nonlinear chemical reaction. Each reactor operates in the bistable region of the well-known minimal bromate reaction as described by the N F T model. The reactors are flow rate coupled according to the rules given by a feedforward neural net. Coupling is controlled by a conventional computer (PC) according toa linear coupling equation. We are able to solve the simple Boolean functions A N D and OR as well as their negations N A N D and N O R with three reactors. For the solution of the more complex XOR and XNOR problem, our setup is extended to five reactors. Specific conditions to carry out the experiments are given.

Introduction Recently a network of open bistable kinetic reaction systems coupled by mass transfer was used as a chemical computing especially for pattern re~ognition.~,~ The mass transfer rates of this Hopfield-like network6 are determined by a Hebbtype learning rule.' An experimental verificationof a setupusing 36 reactors (as in ref 5 ) is not yet possible due to its great experimental complexity. Here we suggest specific experiments using a nonlinear chemical reaction with three reactors to carry out the simple logical functions AND, OR, NAND, and NOR as well as the more complex XOR and XNOR by the use of five reactors. In order to build efficient logical gates, the nonlinear chemical reaction must display at least two distinct steady states. Bistable reactions provide this property. If the boundary conditions are chosen in a well-defined manner, information processing is performed by switching between the kinetic and the thermodynamic branches of the bistable system. On the other hand, linear reactions show only gradual changes in their kinetic behavior, and they are therefore not as suitable for building up an efficient computational device. We chose the minimal bromate (MB) reaction, which shows bistability and oscillations under appropriate conditions in a continuous flow stirred tank reactor (CSTR). The reaction can be modeled quantitatively by a mechanism suggested by Noyes, Field, and Thompson (NFT).s Effective coupling between the reactors is provided by adjusting the flow rate into the individual reactors. The characteristic coupling strengths are determined for each of the above logic functions according to the rules of a feedforward net. A Hebbian learning rule is not used here. Feedforward neural nets are numerical algorithms consisting of a number of processing units called neurons. The individual units are often represented by a sigmoidal function. The neurons of feedforward nets, which are based on Rosenblatt's perceptron? are arranged in at least two layers, an input and an output layer. The duty of the input layer is to feed the relevant data into the neural net. This information is processed forward to the output layer by the particular connectivities. The computed result is presented in the output layer. A two-layered arrangement is capable of solving only simple problems, such as the above simple logic functions (Figure la). For more complex functions (XOR and XNOR) it is necessary to include a hidden layer between the input and output layers (Figure 1b). Recently we used 40 neurons including two hidden layers10 in order to make short-term predictions from a chaotic training set of the Belousov-ZhabotinskiilIJ2 reaction. In the proposed experiments, neurons are Abstract published in Aduunce ACS Abstracts. July 1, 1994.

($

w13

24

Figure 1. (a) Feedforward nets used for solving the AND, OR, NAND, and NOR problems consisting of input reactors 1 and 2 and an output reactor 3. (b) For the XOR and XNOR connectivitics a hidden layer (reactors 3 and 4) must be inserted. The neurons i of each layer are connected with the neuronsj of the following layer by the weights wij [L mol-' s-l] and the bias b, [s-*](not shown). Thus the output of neuron i is processed forward to the neurons j of the following layer.

represented by CSTRs. The activation function of each reactor is given by the NFT model.

The Minimal Bromate Reaction The oxidation of ceric ions by bromate in the presence of bromide and sulfuric acids is known as the minimal bromate reaction. This reaction system describes the inorganic part of the Belousov-Zhabotinskii reaction, and it shows oscillations only under flow conditions,l3-l6 while bi- and multistable steady states are observed over a wide range in parameter space.17-19 Different sets of improved rate constants have been developedm.2' for the

0 1994 American Chemical Society 0022-3654/94/2098-1533~04.5~/0

7534 The Journal of Physical Chemistry, Vol. 98, No. 31,1994 I

0.00014 I

I

I

Lebender and Schneider TABLE 2: The Boolean Functiona input 1 input2 AND OR NAND NOR XOR 1 1

0 1 1

0 0 0

0

1

1

1 1

1

1

1

0

0 0

1

0 0

0

0

XNOR

0

1

1 1 0

0 0 1

(IV) concentrations for high flow rates, while a stable steady state with high cerium(1V) is expected for low flow rates. There is a range of flow rates between these two regions where both types of steady states coexist and the system shows bistability (Figure 2).

The Chemical Net 0' 0

I

0.001 0.002 0.003 0.004 0.m 0.006 0.007 0.008 0.009 0.01 Flow Rate [lk]

Figure 2. Bifurcation diagram of the MB reaction (NlT model). The system shows bistability in a certain range of flow rates. Two steady states, one with high and one with low cerium(1V)concentration, coexist ([H+]o= 1.5 M,[BrO3-]o = 4.5 X 10-2M, [Brio = 2.0 X 1@M, [Ce3+]0 = 1.5 X l@ M). Rate constan& are given in Table 1.

--

TABLE 1: NET ModePU BrO3- + B r + 2H+ HBr02 + HOBr HBrO2 + B r + H+ 2HOBr HOBr + B r + H+ f Br2 + H20 BrO3- + HBrO2 + H+ + 2Br02' + H20 Ce3++ Br02.2 + H+ f Ce4++ HBr02 kl 2.1 S-1 M-3 k2 = 2.0 x 109 s-1 M-2 k3 = 8.0 x 109 s-l M-2 k, = 1.o x 104 s-1 ~ ks = 6.5 X 10' M-2

(R1) (R2) (R3) (R4)

(R5)

1.1 X l@s-' M-I L, = 2.0 x 107 S-1 M-1 kS= 2.4 x 107 S-1 M-1 k-3

2

NFT mechanism. They shift the calculated bifurcation diagram in parameter space toward the experimental values, without showing any qualitatively new dynamic behavior.20.23 In our calculations we use "stage e" of a reduced version of the NFT mechanism according to Bar ElP4 (see Table 1): the number of variables of this system has been reduced from nine to seven by keeping the Br03- concentrations constant. This somewhat simplifiedmechanism reproducesthe experimental behavior quite well. The boundary conditions of a CSTR are achieved by adding flow terms to the NFT' differential equations:

We make use of the bistable behavior of the reaction system by assigning the states with highor low cerium(1V) concentrations to logical "true" or "false", respectively. Each neuron in the chemical neural net is represented by a CSTR containing the minimal bromate system, while the connectivities between the neurons are realized by flow rate coupling. The connections wu between the reactors of two successive layers are given by the flow rates kfi,where the cerium(1V) concentration in the reactors i of the preceding layer determines the kn values for each reactor j in the succeeding layer in a linear fashion:

k, =

w,,[Ce"],

k4 [ B r - ] ~ t= -[BrO;] k2

If reaction R2 is faster than reaction R4 ([Br] > [Br]dt), the system will remain in a state characterized by a high bromide and a low cerium(1V) concentration. If R4 is faster than R2 ([Br]< [Br]ht), a state of low bromide and high cerium(1V) concentration is obtained. Since bromide is an inflow species, the concentration of bromide will increase with increasing flow rate. Therefore we expect a stable steady state with low cerium-

(3)

The factors wij denote the coupling strengths of the connections between the neurons, whereas the values of bj represent a simple bias. For the calculations, the reactors of the input layer remain in one of the two possible states ("true" or "false") by adjustment of the flow rate of each input reactor by hand. All reactors of the followinglayers will ultimately reach a steady state bordering the bistable region as determined by eq 3. The reactor of the output layer displays the calculated result.

comectivitie3 Logical connections between binary states may be described by Boolean algebra. Assume that the binary Boolean states are represented by the Boolean variables u and b whose values are either "true" or "false". Then the variables are connected by Boolean functionsfb which assign a binary value ("true" or "false") to their arguments. The simplest functions work on only one argument. The identity

fb(4 =a in which the vector y contains the actual concentrations yi of all components. The function fly) describes the rate law of the chemical reactions. For the given inflow concentrations ym, the model shows bistability between the flow rates kr = 3.702 X le3 s-I and kt = 5.526 X 10-3 s-* (Figure 2). The dynamical behavior of the system is strongly influenced by the competition of B r (R2) (Table 1) and Br03- (R4) for HBr02, for which a critical bromide concentration has been evaluated:20

+ b,

I

(4)

has a value equal to its argument. Another function of this simple type is the negation fb(a)

=a

(5)

which leads to "true" if the argument a is "false" and vice versa. Functions of two or more arguments are the AND connection,

fb(a,b)= a h b

(6)

leading to "true" only if all arguments are "true" (Table 2) and the OR connection,

f,,(a,b) = a v b

(7)

which gives "true" if at least one argument (I or b has the value "true" (Table 2). The NAND and the NOR connections are obtained by applying a negation to the result of an AND or OR connection, respectively. The decision, whether the arguments u and b are equal or not, can be made by the EXCLUSIVE OR

Logical Gates Using a Nonlinear Chemical Reaction

TABLE 3 w13 w23

b3

The Journal of Physical Chemistry, Vol. 98, No. 31, 1994 1535

Calculated Connectivities (Eqs 9 and 10). AND -24.91 -24.91 9.62X

OR -20.81 -20.81 6.52 X lC3

NAND 20.81 20.81 4.81 X 1V

NOR 24.91 24.91 2.38 X 10-3

XOR -24.91 -24.91 9.62X 10-3 24.91 24.91 2.38 X 10-3 81.42 81.42 -2.40 X lk3

wl4 “‘24

b4 w35 w45 a

bs Connectivities wl,[L mol-’ s-l], bias b,[s-l].

connection (XOR). In this case an AND connection tests if both arguments are “true” and simultaneously a NOR connection checks if a as well as b is “false”. In a second step the results of these two decisions are related to each other by a NOR connection: f,(a,b) = (a Ab) v (a v 6 )

(8)

The negation of XOR is the XNOR connection which indicates whether the two arguments have different values. Table 2 gives an overview of all possibleconnections of two Boolean arguments, where the numeral “1” denotes a “true” value, while “0” indicates “false”. We now demonstrate how the boundary conditions of the experimental setup introduced in the former section have to be chosen to solve the above logical problems. Since two Boolean variables serve as input for our chemical net, we will use an input layer made of reactors 1 and 2 (Figure la) each representing the value of one input variable. It has been shown that the AND and the OR connections require only one neuronzs with the corresponding input. Therefore we use a chemical net made of two input reactors and one output reactor for the implementation of the AND, OR, NAND, and NOR connections. The states of the input reactors are switched manually by adjusting the flow rate arbitrarily to 0.001 s-I to obtain the “true” state (high Ce4+)or to 0.009 s-I to obtain the “false” state (low Ce4+). The output reactor is coupled to both input reactors, and the flow rate is calculated by a computer (PC) according to the linear coupling equation (eq 3)

k, = w 1 3 [ ~ e 4 ++] , w z 3 [ ~ e 4 ++l 26,

/’

g o.ooo1 3

8e-05 49-05 2e-05

1

‘false’

‘true’

L ‘false’

0 0

0.00012 -

2 m

The variables [Ce4+I1and [Ce4+I2 denote the cerium(1V) concentrations of reactors 1 and 2, respectively. Due to the commutativity of the logical functions shown in Table 2 (the states of the input reactors can be exchanged without altering the state of the out put reactors), the values of ~ 1 and 3 ~ 2 must 3 be equal for a given logical function. Taking account of this property, the weights wr,[L mol-’ s-I] and the bias b3 [s-l] for the logical functions AND, OR, NAND, and NOR are obtained from the solution of simultaneous equations. The latter are derived by inserting the cerium concentrations [Ce4+]1 and [Ce4+]2as well as the corresponding flow rates kn into eq 9. The values of wrj and b, for each type of Boolean connection are given in Table 3.

0

The XOR and XNOR problems are Boolean functions, for which five reactors are needed: two input, two hidden, and one output reactor coupled according to eqs 3 and 8 (Figure lb). For both XOR and XNOR gates, an AND (NOR) problem has to be solved first between the input and the hidden layers whose result is displayed by “hidden” reactor 3 (reactor 4). For the XOR gate the output reactor 5 is connected in an NOR-like manner to the two reactors 3 and 4 of the hidden layer. This connection checks whether one of the two hidden reactors is in a “true” state. If reactor 3 (reactor 4) is in a “true” state, both

‘true’

0.00012

(9)

The XOR and XNOR Problem

Input 1

0.00014

Is

XNOR -24.91 -24.91 9.62X 10-3 24.91 24.91 2.38 X -8 1.42 -8 1.42 1.24X 1P2

)00

Itrue’

‘true’

0

‘false’ 5000

10000 hme [SI

15WO

20000

Figure3. Input C& concentrationsfor all implementedBoolean functions versus time. The state of the input reactors is changed every 5000 s although much shorter intervals are possible. High Ce4+concentrations are obtained with a flow rate of 0.001 s-’; low Ce4+is obtained at a flow rate of 0.009 s-l. High Ce4+concentrations stand for “true”;low steady state concentrations of Ce4+denote ‘false”.

input reactors 1 and 2 are in their “true” (“false”) states. If one of the hidden layer reactors indicate “true”, then both input reactors are in different states. The flow rates into the two hidden reactors (kn and kf4) and into the output reactor (kfs) are given by

k, = w l 3 [ ~ e 4 + + l 1 wz3[~e4+lZ + b3 k,= w14[Ce4+],+ ~ ~ ~ [ C e+~b,+ l ,

(10)

kf5= ws5[~e4+], + w ~ ~ [ c ~ ~++b,] , where the coupling parameters (Table 3) have been adjusted by using the commutativity of the problem. Since the XOR connection is a composite problem, the constants for coupling the input and the hidden layers are given by the AND and the NOR

7536 The Journal of Physical Chemistry, Vol. 98, No. 31, 1994

-

Lebender and Schneider 0.00014

,

NAND

I

I

0.00012

-

0,0001



1 sg

‘true’

0.00012

8605’

6605.

4605. 2605

. I

I

O L

0

- ‘true’

O.OOOI~



t

0.0001

-

8605

-

6605

-

4605

-

2605

-

0’ 0

5000

10000 Time (s]

15000

1 ‘true’

‘true’

I

0 ‘

20000

0

I 0.00012

p

’e

1ow Time Is]

5000

15000

20000

15000

20000

t

0.0001

6eO5 6605

‘false’

I

5000

loo00 Time Is]

15000

20000

-

‘false’ v

0

0

so00

10000 M e Is1

Figure 4. State of the output reactor for the simple Boolean connections AND (top, left), OR (bottom, left), and the corresponding negations NAND

(top, right) and NOR (bottom, right). All results are obtained with a chemical neural net consisting of three reactors (Figure la), while the activation

in Figure 3 was fed into the input reactors 1 and 2. High Ce4+stands for “true”;low Ce’+ denotes “false”.

gates as above: coupling between the hidden and theoutput layers is a NOR connection. For the latter case both reactors of the hidden layer cannot be simultaneously in the “true” state. The XNOR connection is identical with XOR up to the hidden layer; here coupling between the hidden and the output reactors is an OR gate. An overview of all coupling parameters is given in Table 3.

Numerical Experiments For every encoded Boolean function we arbitrarily start by feeding an input pattern of two “true” states into the two input reactors of our chemical computer. For convenience, the flow rates of the input reactors are changed every 5000 s to generate successively the patterns “true”-“false”, “false”-”true”, and “false”-“false” (Figure 3). For the AND, OR, NAND, and the NOR connections the activation displayed in the output reactor is given in Figure 4. The AND function shows the output “true” if both input reactors are in the state of high cerium(1V) concentrations. The output of the OR problem indicates “true” if at least one of the input reactors is in the “true” state. The NAND and the NOR connections lead to the inverse output of the AND and the OR problems, respectively. For the XOR and the XNOR connections the Ce4+ concentration of output reactor 5 is shown in Figure 5. TheXOR connection leads to a “true” output if the input reactors are in different states. Otherwise the output is “false”. The XNOR connection, however, shows high cerium(1V) concentrations if the states of both input reactors are identical. Discussion The present numerical experiments show the application of flow rate coupling to construct logical gates. This can be achieved

by employing a relatively simple experimental setup consisting of a few coupled reactors and pumps. For the composite and more complex problems XOR and XNOR, the simple functions AND and OR and their negations NAND and NOR can be interlinked. The definition of a “true” (“false”) steady state is approximate. The C&+ concentrationstate is consideredas “false” (“true”) if a given steady state is within 10% of the minimal (maximal) value. A disadvantage of the suggested experiments is the comparatively low speed of information processing. In order to approach a steady state to within -95%, less than three residence times are required (Figure 3). This reaction time is propagated through the subsequent layers of the chemical network, since the state of a reactor in a subsequent layer depends on the state of all reactors in the previous layer. If the transition occurs from a high to a low flow rate state, the transition time is relatively long. However, the transition time is short if the transition occurs from a low (Ytrue”)to a high (“false”) flow rate state although the number of the required residence times is similar. The minimum time required for a given sequence of patterns is about 1 h for the MB reaction. Linear chemical reactions show gradual changes between initial and final states. They are less suitable to act as efficient switching devices. If very fast chemical reactions are used, the rate limiting step for the chemical computation time will be the physical flow rate of the reactant solutions.26 In the present setup the use of a nonlinear chemical reaction and flow rate coupling leads to efficient switching between the two steady states. Coupling between the reactors, however, is realized by a silicon-based computer. In order to achieve a true chemical computer, which is based solely on chemistry, not only the nonlinear switching between the two states but also the sums

-

Logical Gates Using a Nonlinear Chemical Reaction

The Journal of Physical Chemistry, Vol. 98, No. 31, 1994 7537

XOR

information processing. For example, rhythmogenesis and oscillator death were 0bserved3~recently in the MB reaction, when two reactors were coupled by the flow rate. Despite the disadvantage of a low computation speed, some necessary properties for the construction of chemical gates can be derived from our model: At least two distinct stable steady states of the reaction should exist. The system should be sensitive toward a control parameter allowing fast and defined switching between the stable states. Furthermore, the switching process should be reversible, so that “aging” is avoided.

0.00014 7