Multi-valued and Fuzzy Logic Realization using TaOx Memristive Devices

Among emerging non-volatile storage technologies, redox-based resistive switching Random Access Memory (ReRAM) is a prominent one. The realization of Boolean logic functionalities using ReRAM adds an extra edge to this technology. Recently, 7-state ReRAM devices were used to realize ternary arithmetic circuits, which opens up the computing space beyond traditional binary values. In this manuscript, we report realization of multi-valued and fuzzy logic operators with a representative application using ReRAM devices. Multi-valued logic (MVL), such as Łukasiewicz logic generalizes Boolean logic by allowing more than two truth values. MVL also permits operations on fuzzy sets, where, in contrast to standard crisp logic, an element is permitted to have a degree of membership to a given set. Fuzzy operations generally model human reasoning better than Boolean logic operations, which is predominant in current computing technologies. When the available information for the modelling of a system is imprecise and incomplete, fuzzy logic provides an excellent framework for the system design. Practical applications of fuzzy logic include, industrial control systems, robotics, and in general, design of expert systems through knowledge-based reasoning. Our experimental results show, for the first time, that it is possible to model fuzzy logic natively using multi-state memristive devices.

systems 11 and clinical practice decision support systems 12 . The most well known application of fuzzy logic based control system was deployed in Sendai Subway 1000 series subway trains in Japan for speed control 13 . The fuzzy controller based train had a higher relative smoothness of the starts and stops when compared to other trains, and was 10% more energy efficient than human-controlled accelerated trains. Further applications of fuzzy logic include expert systems 14 , robotics 15 and diverse sub-domains of machine intelligence 16 .
Despite these wide ranging applications of MVL, the present computing technology is heavily based on Boolean logic. There have been prior studies on porting MVL to digital and analog circuits with promising results. MVL has been demonstrated to improve energy-efficiency by reducing the switching activity of VLSI interconnects 17,18 . MVL based arithmetic circuits are simpler and more efficient over corresponding Boolean logic based implementations [19][20][21] . However, a limiting factor of MVL realization has been the inherent representation of information in binary format in semiconductor devices, thereby forcing a designer to switch between logic formats, which was clearly an inefficient solution. In this manuscript, we leverage the multi-state memristive devices which can inherently operate in the multi-valued domain. The multi-state memristive devices used in this experiment are Redox-based resisitve switches (ReRAMs), which are considered as one of the most promising emerging non-volatile memory technologies [22][23][24] . Implementation using passive crossbar configuration enables ultra-dense 4F 2 integration. Recently, TaO x based ReRAMs draw significant attention due to excellent performance in term of high endurance (>10 12 ) 25 , long retention (10 years) 26 , multi-level switching capability (3-bit) 27 and fast read/ write speed of below 200 ps 28 . Besides the memory applications, ReRAM based passive crossbar arrays offer the implementation of memory-intensive computing paradigms, i.e. the logic operations are directly processed in the memory and arithmetic tasks. This merges the boundaries between memory and arithmetic logic units and eases the von-Neumann-bottleneck for computation 29 . Furthermore, memristive crossbar arrays can enable the multi-parallel search algorithms for pattern recognition tasks, widely required for neuromorphic applications 30 .
The current paper reports the first implementation of Łukasiewicz logic using the ReRAM-based memristive devices. We do not impose any theoretical limit on the number of states for the memristive devices 31 and hence this work can be used for realizing any application that uses finite-valued Łukasiewicz logic family L n . Before going to the implementation details, we briefly review the basics of Łukasiewicz logic. Formally, a finitely-valued Łukasiewicz logic family L n can be defined over the following truth values.
The designated truth value is 1. Implication (IMP→) and negation (NEG¬) are the two operators used in Łukasiewicz logic, defined through the following functions.
In this paper, we also present a detailed case study to realize fuzzy logic control using Łukasiewicz logic and the implementation of a fuzzy logic controller using multi-state ReRAM crossbar arrays.

Results
Device Properties. In this work, 2 μm × 2 μm Pt/W/TaO x /Pt cross-point bipolar memristive devices arranged in word structure have been fabricated. Figure 1 shows the scanning electron microscope and transmission electron microscopy image of the devices used in this experiment. The ReRAM device stack of 25 nm Pt/13 nm W/7 nm TaO x /30 nm Pt is depicted in Fig. 1(b). Figure 1(c) shows the schematic of a single device along with the details of the stacked layers. Figure 2(a) shows the typical I-V characteristics of the ReRAM device with set current compliance of 1.0 mA, along with the electroforming curve. After the electroforming process, the device was toggled to high resistance state by applying the reset voltage. The maximum applied voltage |V stop | during RESET process defines the final resistive state of the device. This feature is also used in pulse mode operation, and can thus be used in memory and logic operations for controlling the multi-level states. To enable highly reproducible RESET operation, we have always applied a DC SET operation before each pulsed RESET operation (200 ns). Note that a nanosecond pulsed SET operations are also feasible, but have not been applied in this work.   Fig. 3 demonstrates the multi-level operation of the device.  IMP→ operator. The implication operator works on two operands. The flowchart for performing the implication operation u → v is shown in Fig. 4(a) and the steps are described below.
Step 1: In the beginning, all the devices are initialized to the LRS.
Step 2: To compute ¬u in device D 0 , −(V OFFSET + V 1 ) is applied to the TE and V OFFSET −V u to the BE.
Step 3: The resistive state of the device D 0 is read out by means of V READ = 0.1V.
Step 4: In the second device D 1 , the negated sum of offset voltage V OFFSET and the voltage corresponding to read out value V ¬u is applied to the TE i.e V TE = −(V OFFSET + V ¬u ) whereas at the BE, Step 5: In the following step, resistive state R of the D 1 is read out. If the resistive state R < R2, then the operation is complete. Otherwise, device D 1 is toggled to the LRS and the set operation is used to change the device state to R2 i.e., V TE = −1.1V and V BE = 0.7V is applied. Figure 4(b) demonstrates the computation of 0 → 1 using the proposed method in terms of applied operation voltages and corresponding states. The overall operation requires seven steps. Initially, the device D 0 and D 1 are in LRS state, shown as R D0 and R D1 respectively. In cycle t1, 1 − u is computed by applying 0.7V to the BE and 1.1 − V to the TE of device D 0 , shown as V BE and V TE0 respectively. In cycle t2, the resistive state of D 0 is read out, which is R2. In the next cycle, 1 − u + v is computed by applying 1.1V and −1.1 to the BE and TE of device D 1 . In cycle t4, the current resistive state(R D1 ) of device D 1 is read out. Since R D1 = R4 > R2, device D 1 is reset to the LRS and Proof-of-concept. We demonstrate the realization of a fuzzy logic controller as a representative application of Łukasiewicz logic. A conventional fuzzy controller has three major steps, as shown in Fig. 5(a).
1. Fuzzify input variables using fuzzy membership functions. If the inputs to the system are analog, analog-to-digital converters would be used to convert the inputs to the corresponding values in Łukasiewicz logic. Then, these multi-valued inputs are fuzzified using the membership functions. 2. Execute all the fuzzy inference rules from the rule database to determine the fuzzy output functions. 3. Defuzzify the fuzzy output functions to get crisp output value i.e a single multi-valued output value.
To illustrate the working of a fuzzy logic control, we consider a fuzzy logic controller for regulating screen brightness. The screen brightness has to be regulated based on the ambient light AMBIENT and screen brightness BRIGHTNESS. Each of the variables can be represented using three gradations. We use the fuzzy membership functions shown in Fig. 5(b) and (c) to fuzzify the input variables AMBIENT and BRIGHTNESS respectively. The fuzzy membership functions can be expressed in terms of Łukasiewicz operators 32,33 . Therefore, we can realize the "Fuzzifier" block of a fuzzy control system (shown in Fig. 5(a)) using Łukasiewicz logic operations only. Let us consider the inverted notch membership function f (LOW,AMBIENT) for the grade LOW of variable AMBIENT. f (LOW,AMBIENT) . It can be expressed as (¬v → v) → 0, where v is the input. Similarly, the flipped notch membership function f (SUBDUED,BRIGHTNESS) for the grade SUBDUED of variable BRIGHTNESS can be written as (v → ¬v) → 0. These membership functions can be simplified and expressed in terms of min(u, v) and ¬u (1 − u) operation as shown below.
The detailed procedure to simplify the functions is provided in Supplementary Discussion S1. The series of steps required to realize the inverted notch and flipped notch membership function using multi-state ReRAM is presented in Fig. 6(a) and (b) respectively. We experimentally verified the correctness of computation. Figure 7 shows the experimental results when the input variable AMBIENT is 0 and also for value 1 for input BRIGHTNESS. In   (1 − v)). Figure 8(a) show the sequence of steps to realize Łukasiewicz T-norm using the ReRAM devices. As a representative example, Fig. 9 shows the state transitions of the ReRAM devices during computation of T-norm for inputs u = 1 and v = 1.
Once all the rules have been evaluated, the outputs of these is combined using a suitable T-conorm. The T-conorm should be the dual of the T-norm used for rule evaluation. Therefore, we use Łukasiewicz T-conorm which is min (1, a + b), for combining the output of the rules. Figure 8(b) shows the steps for computation of the Łukasiewicz T-conorm using the multi-state memristive devices. T-conorm evaluation for inputs u = 1 and v = 0.5 is given in Supplementary Fig. S3. To obtain crisp output, the combined fuzzy output in the end has to be defuzzied. The defuzzifier block shown in Fig. 5(a) computes crisp output using an appropriate defuzzification method 34 . Note that the defuzzifier block has not been implemented in the presented prototype, which can be realized using conventional methods.

Discussion
Knowledge-based system is capable to reason with judgmental, imprecise, and qualitative knowledge as well as with formal knowledge of established theories. The design of such systems is an important challenge in the realm of Artificial Intelligence (AI). The incompleteness and uncertainty associated with the knowledge-base in is handled through fuzzy logic. Fuzzy logic allows linguistic variable 35 to be assigned inexact or partial truth values for modeling logical reasoning. In this work, we have shown the realization of fuzzy logic control in terms of three-valued Łukasiewicz logic operands. We have demonstrated the feasibility of implementation of three-valued Łukasiewicz logic L 3 using the multi-states memristive devices.
Our demonstrated method can be scaled up for arbitrary n-valued Łukasiewicz logic L 3 , n ≥ 3, depending on the number of resistive states available. For the realization of L n , the memristive device should support at least 2n states. From the perspective of area, the implementation of a higher-valued logic system does not increase the area per device since it is dependent on the number of resistive states. However with increase in number of resistive states, the peripheral circuitry has to be more robust.todo.
Regarding the representation of numbers, it is well understood that for higher radix, the number of literals reduce in logarithmic order in comparison to lower-radix. For example, the efficiency of a n-valued representation of a truth-value N compared to its corresponding Boolean representation is equal to log N log N ( ) 1 Implementation of a given fuzzy system in Boolean logic requires the treatment of every member with varied degree in a separate set and performing Boolean logic operations on those sets. Therefore, the computation steps do also increase in logarithmic proportion when using the Boolean logic in comparison to the fuzzy logic. Traditionally, Mamdani-type fuzzy systems use min and max functions for evaluation of fuzzy rules and combining the output of the rules 11 . min and max functions can be expressed as in terms of Łukasiewicz logic operators: Therefore, it is possible to use the multi-valued Łukasiewicz logic for realization of Mamdani type fuzzy systems as well. In general, Łukasiewicz logic is capable of dealing with a wide range of approximate reasoning paradigms, since it can express evaluation function of multi-valued logic classes described in terms of +, −, min and max [35][36][37] .
In past, Łukasiewicz logic arrays has been demonstrated for realization of fuzzy inference engines and expert systems [38][39][40] with CMOS-based circuitry. However, such realizations did not have any multi-valued storage devices for storing the intermediate results thereby requiring costly conversions to-and-from binary representation. In this work, we have experimentally realized a working fuzzy system by using Łukasiewicz logic, that does not use any intermediate binary/Boolean representation. Although implementation of fuzzy logic gates have been reported in the DNA computing paradigm 41 , this is the first experimentally reported work on multi-valued  logic operators as well as a demonstrative application of that in fuzzy inference engine using memristive devices. Recently, an implementation of Boolean minimum and maximum gate has been demonstrated using memristive devices 42 with their application restricted to the implementation of sorting networks.
Here, we have successfully demonstrated Łukasiewicz logic operation on 2 μm × 2 μm ReRAM devices. However, these devices are fully compatible to 4F 2 configuration in crossbar array in conjunction with a selector device and can be scaled down to 5 nm 43,44 . The integration of the selector device would prevent the problem of sneak paths in the crossbar array. Ultra-dense large-scale multi-state ReRAM crossbars can be controlled by peripheral control circuitry, as shown in Supplementary Fig. S4. The approach of implementing Łukasiewicz logic operation within the resistive memory device using the available multi-level states is a highly attractive option for future hybrid CMOS/ReRAM chips for enhancing its present functionality. Each multi-valued operation requires a constant number of steps, 1 step for negation and 7 steps for implication (depicted in Fig. 4), to be realized, irrespective of the value of n in an n-valued logic system. For Boolean realization of the implication and negation operators, the number of steps would increase with the value of n 29,45,46 . Furthermore, parallel operations across multiple devices that share the same wordline, can be enabled by carefully packing operations that have the same input, similar to the strategy proposed by Bhattacharjee et al. 47 . In contrast, to leverage such parallelism, the Boolean circuits corresponding to the implication and negation operations need to be replicated. Multi-level ReRAM devices reduces the complexity of state representation and thus, brings fundamental benefits across arithmetic and logical primitives. This capability has far-reaching implications in modern Internet-of-Things (IoT) systems, which promotes local computing due to the bandwidth scarcity. By having multi-valued and fuzzy logic primitives at the device level, efficient processing-in-memory can be undertaken for application domains like public key cryptography, error correcting codes, industrial control and security. Note that, the energy-efficiency can be further boosted by having short-pulse (sub-ns) operations.

Conclusion
Fuzzy set allows its elements with certain degrees of membership, in contrast to a crisp set. Operators on the fuzzy set can realistically model real-life applications in, for example, industrial control, linguistics, decision variables and bio-informatics, and therefore, have grown in usage over last half century. The logic operations on the fuzzy set is performed through fuzzy inference system. In this manuscript, we demonstrated a practical fuzzy inference system, by realizing the fuzzy logic operations using the multi-state TaO x devices. Further, each fuzzy operation is mapped to a series of the multi-valued logic primitives, namely, Łukasiewicz logic. We showed a practical fuzzy inference system through a limited number of logical steps and 1 × 3 memristive crossbar array. The multi-state TaO x devices enable computation entirely using multi-valued elements for the operations, without need for any intermediate representations. Therefore, these devices provide a natural platform to undertake multi-valued logic and thus, fuzzy inference operations. We believe that these results can greatly benefit scientific community and provide a direction to move forward in the field of fuzzy logic.

Methods
Device Fabrication. Cross-point based Ta 2 O 5 ReRAM was fabricated on thermally grown SiO 2 samples. In our design, each device shares a common bottom electrode (BE). The BE was patterned in 30 nm-thick platinum (Pt) layers, grown by the sputtering process. After patterning the BE, switching layer of 7 nm-thick TaO x , 13 nmthick tungsten (W), and 25 nm-thick platinum (Pt) were sequentially deposited by the sputtering process. The TaO x layer was grown with reactive sputtering process with 76.6% Argon and 23.3% Oxygen at partial pressure of 2.3 × 10 −2 mbar. The W ohmic electrode, and the Pt were grown with DC sputtering method. For the top electrode (TE) patterning, photo-lithography and reactive ion etching steps were performed. These steps lead to the Pt/W/TaO x /Pt memristive device stack. Figure 1 shows the scanning electron microscopy (SEM) of 1 × 3 crossbar array with 2 μm × 2 μm size cell with cross-sectional tunneling electron microscopy (TEM) image and its corresponding schematic diagram. More experimental details can be found in reference 48 . Measurement Set-up. The pristine state of the memristive devices was highly resistive (GΩ) and therefore an electroforming process was required. This process was carried out by applying a positive DC voltage on the