1 Introduction

Memristors are one of the most promising candidates that helps to build the next generation devices and offer several advantages such as non-volatility, excellent scalability and compatibility with the CMOS technology, both electrically and in terms of manufacturability [1, 2]. In contrast to the Metal Oxide Semiconductor Transistor (MOST) [3], memristors are comparatively less susceptible to radiations as well as parasitic capacitance and hence can be much more reliable [2]. This is extremely attractive for safety critical applications where radiations can cause failures in MOST based systems. Recently, it has been observed that certain memristors can also sense chemicals by exhibiting changes in resistance when exposed to the chemicals [4,5,6,7,8,9,10,11]. To this end, Memristive Hydrogen gas sensors were fabricated in [4, 5], which are highly suitable for fuel cells and hydrogen safety applications. Memristive sensors for detecting liquid glucose concentrations and biomarked molecules, e.g. those highly active in tumor tissues and vascular diseases, were also fabricated in [6,7,8, 12] respectively.

Physically, a memristor gas sensor consists of a metal oxide semiconductor as the switching and sensing material sandwiched between two electrodes [5]. A part of the semiconductor is exposed to a target chemical for sensing [4,5,6,7,8]. To this end, gas sensing abilities of metal oxide semiconductors have been widely studied, e.g. in [13,14,15,16]. Metal-oxide sensors are simple, inexpensive, minuscule and have a good sensitivity [17]. The absorption of gas molecules on the surface of the sensors produces a change in its resistance. This change depends on the property of the gas, its concentration, and the material itself, and can cause a momentary change in the output voltage or current. Measuring this change can give accurate indications of the gas concentrations as well as its properties. Hence, modelling this behaviour is the basis of a smart sensing system. The uses of memristors as a single cell sensor and a crossbar array of sensors were experimentally validated in [4,5,6,7,8,9,10, 18, 19] respectively. Therefore, it is known that, unlike other technologies, these devices possess sensing and storage dual capability.

Process variability is perceived as a challenge as technology scales. Performance of the memristors is greatly affected by process variations and reliability may become an unmanageable problem [20]. However, depending on applications, variations in process parameters affect different systems differently. For example, memories and digital logic tend to work within certain noise margins, which can be relatively wide. As long as the voltage levels lie within these margins, the interpretation of the logic levels (i.e. 1 or 0) may still be correct [21]. Therefore, even if the voltage levels may change due to process variations, the systems may still function correctly.

In contrast, sensors normally do not operate within well-defined states. This, together with the fact that memristors are highly susceptible to process variations, makes sensing a far more challenging task. The end result is that, owing to these variations, the systems may provide false readings. Needless to say, for safety critical applications, e.g. in the nuclear and aerospace sectors, this is likely to have catastrophic consequences, if not mitigated. Hence, robust process variation aware sensors, capable of detecting harmful chemicals, are fundamental to preserving life [22]. Additionally, with smaller technology nodes the effects of nanowire resistance are more noticeable [23, 24]. Cumulative wire resistance can also affect performance of systems, e.g. degrade sensing capabilities of sensors [19].

However, to the best of our knowledge, robust low power memristive sensor design techniques to mitigate the effects of process variations and wire resistance still remain almost unexplored. To this end, firstly we present an improved memristive sensor model and previously unexplored sensor properties (Sect. 2). We then propose a process variation aware sensor architecture, which is also immune to wire resistance, for improving overall performance (Sect. 3). This architecture can be configured as a sensor, a multifunction logic gate or as Complementary Resistive Switches (CRS) with low overhead, thereby enhancing resource reusability. Additionally, three sensor architectures for improving overall power efficiencies, in light of scalability, are presented in Sect. 3.2. Our results in Sect. 4 show that the architectures enable accurate predictions of achievable improvements in sensitivity due to process variability, as we scale up. Hence, compared to existing approaches, the key advantage of our architectures is that the sensing accuracy as well as the power performance are significantly improved.

2 Memristive sensor modelling and features

The overall resistance of a memristor is determined by the resistance of two regions, e.g. in a \(\hbox {TiO}_2\) based device an undoped region (\(\hbox {TiO}_2\)) and a doped region (\(\hbox {TiO}_{2-X}\)), as shown in Fig. 1. \(\hbox {TiO}_{2-X}\) is a p-type semiconductor and its resistivity decreases (increases) in the presence of oxidising (reducing) gasses [15, 25]. This change in resistivity is also known to take place without affecting the position of the device’s state variable, as long as the device is in the ‘hold’ state [4, 5, 10]. The dimensions W, X, and D depicted in this figure will be used in the rest of the paper. Figure 1 also shows the symbol of a memristor, where P and N are its ‘positive’ and ‘negative’ terminals respectively.

Fig. 1
figure 1

Symbol and general structure of a \(\hbox {TiO}_2\)-based memristor

2.1 Memristive sensor model

In fabricated memristive sensors only one region, i.e. either the region corresponding to the Low Resistive State (LRS) or \(R_\mathrm{on}\)  [4, 6,7,8] or that corresponding to the High Resistive State (HRS) or \(R_\mathrm{off}\)  [5], is exposed to chemicals while their barriers are kept at the hold state. The resistive state of the region which is not exposed to chemicals remains unaffected. Therefore, to model the behaviour of a memristive sensor, we need two interdependent components [10]:

  1. 1.

    A component for modelling its behavior during chemical interactions;

  2. 2.

    A component for modelling its memristive behavior.

We assume in our model that only the LRS or \(R_\mathrm{on}\) region is directly exposed to chemicals and becomes \(R_\mathrm{OnEff}\) upon exposure [25, 26]. However, this model will also work for the HRS or \(R_\mathrm{off}\) region to become \(R_\mathrm{OffEff}\) by trivial modifications [5].

To model gas exposure, Item (i) above can be represented as follows [26].

$$\begin{aligned} \frac{R_\mathrm{OnEff}}{R_\mathrm{on}}&= 1+AC^{\beta }\, \text {[Reducing gas]}, \end{aligned}$$
(1)
$$\begin{aligned} \frac{R_\mathrm{OnEff}}{R_\mathrm{on}}&= \frac{1}{{1+AC^{\beta }}}\, \text {[Oxidising gas]}, \end{aligned}$$
(2)

where A is the sensitivity coefficient of the semiconductor material, \(\beta\) is the response order of the subject gas, and C is the gas concentration in ppm.

Now, Item (ii) can be modelled based on Eq. (3) and Eq. (4), which represent the overall device resistances \(R^\mathrm{I}_\mathrm{M}\) and \(R^\mathrm{F}_\mathrm{M}\) before and after exposure to C ppm of gas respectively:

$$\begin{aligned} R^\mathrm{I}_\mathrm{M}&=R_\mathrm{on}\cdot e^{\lambda _\mathrm{I}\cdot (X-x_\mathrm{on})/(x_\mathrm{off}-x_\mathrm{on})} \end{aligned}$$
(3)
$$\begin{aligned} R^\mathrm{F}_\mathrm{M}&=R_\mathrm{OnEff}\cdot e^{\lambda _\mathrm{F}\cdot (X-x_\mathrm{on})/(x_\mathrm{off}-x_\mathrm{on})}, \end{aligned}$$
(4)

where \(\lambda _\mathrm{I}=\ln (\frac{R_\mathrm{off}}{R_\mathrm{on}})\), \(\lambda _\mathrm{F}=\ln (\frac{R_\mathrm{off}}{R_\mathrm{OnEff}})\), \(x_\mathrm{on}\le X\le x_\mathrm{off}\). Here \(\lambda _\mathrm{I}\) and \(\lambda _\mathrm{F}\) are fitting parameters; \(x_\mathrm{on}\) and \(x_\mathrm{off}\) are the lower and upper bounds of the undoped region respectively and \(R_\mathrm{OnEff}\) is as defined in Eqs. (1) and (2) for reducing and oxidising gasses respectively. These equations, defined in [27], are based on the relationships between resistance and state variables in physical devices.

We consider Eq. (5) to model the behaviour of the state variable (barriers) with externally applied voltages [27]. Here, the functions \(F_\mathrm{on}\) and \(F_\mathrm{off}\) behave as window functions; the coefficients \(K_\mathrm{on}\), \(K_\mathrm{off}\), \(\alpha _\mathrm{on}\) and \(\alpha _\mathrm{off}\) are fitting parameters; and \(V_\mathrm{off}\) and \(V_\mathrm{on}\) are the upper and lower threshold voltages of the device respectively. Clearly, as observed in fabricated devices [4,5,6,7,8], this equation is a function of only applied external voltage over time and does not depend on either \(R_\mathrm{on}\) or \(R_\mathrm{off}\), i.e. it is independent of exposure to chemicals.

Let \(V_\mathrm{P}\) be the voltage applied at the terminal P. Now, the resistance of the device shifts towards HRS (\(R_\mathrm{off}\)) when \(V_\mathrm{P}>V_\mathrm{off}\) and towards LRS (\(R_\mathrm{on}\)) when \(V_\mathrm{P}<V_\mathrm{on}\) for \(V_\mathrm{in}=V_\mathrm{P}\) in Eq. (5). The device’s state does not change, i.e. it is in a ‘hold’ state, for \(V_\mathrm{on}<V_\mathrm{P}<V_\mathrm{off}\).

$$\begin{aligned} \frac{{\mathrm{dX}}(t)}{\mathrm{dt}}=\left\{ \begin{array}{ll} K_\mathrm{off}\left( \frac{V_{\mathrm{in}}}{V_{\mathrm{off}}}-1\right) ^{\alpha _{\mathrm{off}}} F_\mathrm{off}(X) &{} 0<V_\mathrm{off}<V_{\mathrm{in}}\\ 0 &{} V_\mathrm{on}<V_{\mathrm{in}}<V_\mathrm{off}\\ K_\mathrm{on}\left( \frac{V_{\mathrm{in}}}{V_{\mathrm{on}}}-1\right) ^{\alpha _{\mathrm{on}}} F_\mathrm{on}(X) &{} V_{\mathrm{in}}<V_\mathrm{on}<0,\\ \end{array}\right. \end{aligned}$$
(5)
Fig. 2
figure 2

a IV Characteristics showing hysteresis behaviour of the proposed sensor model with \(\mathrm{TiO}_2\) as base material; b variations in gas sensitivity with scalability in existing parallel architecture [10] and (c) the same in the proposed recursive architecture

These properties are combined into an efficient Spice implementation of memristive gas sensors and presented in the Appendix (An Efficient Spice Implementation). The model and the systems built with it were tested and verified in LTSpice.

The proposed model exploits a non-linear voltage control mechanism of the state variable. It also ensures that the resistance does not change unless a threshold voltage is exceeded. These behaviours are governed by Eqs. (3), (4) and (5). Consequently, in contrast to existing models [10], the proposed model: (i) Approximates the physical behaviour of memristors much more accurately; (ii) Has a much closer relationship with the materials used for their fabrications, e.g. \(\hbox {TiO}_2\). An IV characteristic of the Spice implementation showing hysteresis behaviour of the proposed sensor model, with and without gas and \(\hbox {TiO}_2\) as base material, is shown in Fig. 2a and detailed in Sect. 4.

2.2 Memristive magnification

We introduce the concept of memristive magnification, where a small ‘input’ resistance is magnified to a ‘larger’ resistance for improving power consumption and sensor reading. Let us assume in Eqs. (3) and (4) that, \(x_\mathrm{on}=0\) and \(x_\mathrm{off}=D\) (Fig. 1). Then, \(\frac{X-x_\mathrm{on}}{x_\mathrm{off}-x_\mathrm{on}}=\frac{X}{D}\), where X varies between 0 and D in Fig. 1. Now, in Eq. (3) [Eq. (4)] we can visualize \(R_\mathrm{on}\) (\(R_\mathrm{OnEff}\)) as being magnified to a new value \(R^\mathrm{I}_\mathrm{M}\) (\(R^\mathrm{F}_\mathrm{M}\)). The “magnification factor” is determined by the position of X with respect to D and \(R_\mathrm{off}\). The position of X can be set: (i) By applying a voltage of predetermined amplitude and polarity over a fixed period of time [27]; (ii) By repeatedly applying programming (voltage) pulses of predetermined amplitude and width for a certain number of times [28].

This effect can be conveniently expressed as \(R_\mathrm{out}=\gamma \cdot R_\mathrm{in}\), where \(R_\mathrm{in}\), \(R_\mathrm{out}\), and \(\gamma =e^{\ln (R_\mathrm{off}/R_\mathrm{in})\cdot X/D}\) can be visualized as ‘input’ resistance, ‘output’ resistance, and a non-linear magnification factor respectively. Here, for a given \(R_\mathrm{in}\), \(R_\mathrm{out}\) depends on X/D and \(R_\mathrm{off}\). The value of \(R_\mathrm{out}\) varies between a minimum of \(R_\mathrm{in}\) to a maximum of \(R_\mathrm{off}\) depending on if X is closer to 0 or to D respectively.

This alternate visualization of memristive devices can be very useful in applications such as sensors for improving power consumption and sensor readings. In this case the input can be interpreted as \(R_\mathrm{on}\) or \(R_\mathrm{off}\), which changes to an effective value because of an external event, e.g. exposure to chemicals. In Eq. (3) \(R_\mathrm{on}\) is magnified to \(R^\mathrm{I}_\mathrm{M}\), while in Eq. (4) \(R_\mathrm{on}\) changes to \(R_\mathrm{OnEff}\) because of C ppm of gas, which is magnified to \(R^\mathrm{F}_\mathrm{M}\), etc.

Example 1

As per Eq. (2), Oxidising gasses can drastically reduce the effective resistance from \(R_\mathrm{on}\) to a very low \(R_\mathrm{OnEff}\), which can result in significant read power consumption. Let us consider a scenario for \(\hbox {TiO}_2\) sensor: \(R_\mathrm{on}=50\varOmega\), \(R_\mathrm{off}=1000\varOmega\), and the resistance is left at LRS, i.e. state variable \(X=0\). Then by Eq. (4) \(R^\mathrm{F}_\mathrm{M}=1.16\varOmega\) for a concentration \(C=100\times 10^3\) ppm of gas assuming that \(A=0.42\times 10^{-3}\) and \(\beta =1\) [26]. This will draw significant power from the source and may also be difficult to measure. This can be rectified by moving X towards D, e.g. for \(X=0.5\cdot D\) nm, \(R^\mathrm{F}_\mathrm{M}=34.09\varOmega\), for \(X=0.8\cdot D\) nm, \(R^\mathrm{F}_\mathrm{M}=258.88\varOmega\), etc., which will significantly reduce power consumption and improve measurability.

We have analyzed the effects and benefits of Memristive Magnification based on our proposed sensor architecture and the results are presented in Sect. 4.

2.3 Relative gas sensitivity

In existing literature, sensitivity is defined as changes in \(R_\mathrm{off}/R_\mathrm{on}\) [6,7,8]. However, this does not capture the relative change in the resistance due to exposure to chemicals and the overall resistive behaviour of the device. To this end, we define relative gas sensitivity, S, as follows:

$$\begin{aligned} S=\frac{\left| R^\mathrm{F}_\mathrm{M}-R^\mathrm{I}_\mathrm{M}\right| }{R^\mathrm{I}_\mathrm{M}}. \end{aligned}$$
(6)

This sensitivity measure can be applied for both Oxidising and Reducing gasses, as it measures the absolute sensitivity relative to the initial measurement. This measure of sensitivity is used throughout the rest of the paper.

2.4 Effects of wire resistance

As technology nodes are shrinking, the effects of wire resistance on sensors can significantly affect sensitivity to chemicals as shown in Fig. 2b based on the architecture of [10, 19]. To mitigate this, we propose an architecture which is relatively immune to wire resistance in Sect. 3. We also present its scalability and analyze its effectiveness in Sects. 3.2 and 4 respectively.

3 Proposed architecture

3.1 Four-memristor gas sensor architecture

We propose a 4-memristor process variation aware gas sensor architecture, which is also relatively immune to wire resistance for improved overall performance. The architecture is shown in Fig. 3a and incorporates four memristors: \(M_\mathrm{1}\), \(M_\mathrm{2}\), \(M_\mathrm{3}\) and \(M_\mathrm{4}\). In the presence of chemicals \(M_\mathrm{1}\)\(M_\mathrm{4}\) act together as a single sensor and are assumed to be subjected to similar concentration of gasses. The memristors are assumed to have similar initial conditions that enable them to react approximately in a similar pattern in the presence of a target gas. To read a sensed value, a non-zero voltage is applied while ensuring that the sensors remain in a hold state to prevent their state variables (resistance) from changing. The sensed resistance is then this voltage divided by the resulting current. This is done with and without the gas to obtain the relative sensitivity based on Eq. (6). This can be achieved by ensuring that \(V_{S1}\ne 0\) and \(2\cdot \mathrm{max}(V_\mathrm{on},-V_\mathrm{off})< V_{S1}<2 \cdot \mathrm{min}(-V_\mathrm{on},V_\mathrm{off})\). We also leave \(T_\mathrm{1}\) and \(T_\mathrm{2}\) floating. This ensures that Eq. (5) is satisfied.

As a chemical sensor the architecture can substantially reduce variations in sensitivity due to unavoidable process variations, while maintaining its overall resistance similar to that of a single sensor. It is also largely unaffected by wire resistance. Additionally, its power consumption remains similar to that of a single sensor regardless of scalability. These are detailed in Sect. 3.2.

Fig. 3
figure 3

a A 4-memristor gas sensor architecture; b a reconfigurable architecture

3.2 Sensor design and scalability

We further propose three architectures for sensing for improved accuracy and power consumptions. To simplify the analysis while maintaining accuracy and correctness, we assume that the devices: (i) operate only as sensors and are designed such that they have identical initial conditions that enables them to react in approximately similar pattern in the presence of any target gas; (ii) are subjected to similar concentrations of gasses; (iii) are in their hold states, i.e. their barriers do not shift due to external voltages. These assumptions are realistic, e.g. Assumption (iii) can be maintained by ensuring that the read voltage lies within \(V_\mathrm{on}\) and \(V_\mathrm{off}\) [Eq. (5)].

Let \(R^1_\mathrm{eff}=R_\mathrm{ins}\pm \varDelta R+R_w\) be the effective resistance of single sensors, where \(R_\mathrm{ins}\), \(R_w\), and \(\varDelta R\) are the expected instantaneous resistance, wire resistance, and deviation in \(R_\mathrm{ins}\) respectively. The deviation in \(R_\mathrm{ins}\) may be due to variations in temperature, ion concentration, threshold voltage or any other such variations that causes the instantaneous resistance to deviate [29].

3.2.1 Recursive architecture

A recursive architecture is one which can be scaled up simply by replacing each element by the same architecture multiple times. In our case, the recursive architecture is as shown in Fig. 4a and can be obtained by repeatedly applying the circuit in Fig. 3a to each block recursively. For example, if \(B_\mathrm{1}\)\(B_\mathrm{4}\) in Fig. 4a are each replaced with Fig. 3a, then we obtain the \(4\times 4\) architecture shown in Fig. 4b. The advantage of this architecture is that sensitivity variations reduce with scalability while expected instantaneous and wire resistances remain similar to single sensors, i.e. the wire resistances effectively cancel out instead of accumulating. This can be reasoned about from the differential property of the architecture in Fig. 3a. For \({i\in \{1,2,3,4\}}\), let \(\varDelta R_i\) be the deviation in the instantaneous resistance of \(M_\mathrm{i}\) under process variations. Then the effective resistance under process variation \(R^4_\mathrm{eff}=(2R_\mathrm{ins}\pm \varDelta R_1\pm \varDelta R_2+2R_w)||(2R_\mathrm{ins}\pm \varDelta R_3\pm \varDelta R_4+2R_w)\equiv R_\mathrm{ins}\pm \varDelta R^4_e+R_w\), where \(\varDelta R^4_e\) is the equivalent effective deviation. Because of additive/subtractive effects of process variability, together with the effects of resistances in parallel, \(\varDelta R^4_e\le \varDelta R_i\). Since process variation is also random, we have \(\varDelta R^4_e <\varDelta R_i\). Hence \(R^4_\mathrm{eff}\approx R^1_\mathrm{eff}\), while sensitivity variations reduce. This can be recursively reasoned about for Fig. 4b and generalised to larger architectures.

Fig. 4
figure 4

a Purely recursive architecture; b the architecture in a expanded by recursively incorporating the architecture in Fig. 3a to each one of the blocks \(B_\mathrm{1}\), \(B_\mathrm{2}\), \(B_\mathrm{3}\), and \(B_\mathrm{4}\)

Fig. 5
figure 5

a Parallel architecture; b the architecture in a expanded by incorporating the architecture in Fig. 3a to each one of the blocks \(B_\mathrm{1}\), \(B_\mathrm{2}\),...,\(B_\mathrm{n}\)

The read power can be calculated as follows: Let the read voltage be \(V_\mathrm{read}\). The associated current \(I_\mathrm{read}=\frac{V_\mathrm{read}}{R^4_\mathrm{eff}}\approx \frac{V_\mathrm{read}}{R^1_\mathrm{eff}}\). Hence, the read power consumption is \(V_\mathrm{read}\times I_\mathrm{read}\approx \frac{V^2_\mathrm{read}}{R^1_\mathrm{eff}}\) W regardless of the scalability, i.e. similar to that of a single sensor. However, the number of sensors, m, needs to be \(4^k\), where k is a non-zero positive integer.

3.2.2 Parallel architecture

This architecture is shown in Fig. 5a where each block is expanded by incorporating the architecture in Fig. 3a to each one of the blocks \(B_\mathrm{1}\), \(B_\mathrm{2}\),...,\(B_\mathrm{n}\). The overall resistance is \(\approx R^4_\mathrm{eff}/n\approx R^1_\mathrm{eff}/n\). Given m number of sensors, the advantage of this architecture over a traditional array of sensors, e.g. in [10], is that, with scalability, the resistance drops 4 times slower in this architecture. The reason is that with this architecture the m memristors are organized as m/4 blocks, each one containing a 4-memristor architecture in Fig. 3a. Hence, the overall resistance is \(\approx (4\times R^1_\mathrm{eff})/m\) as opposed to \(\approx R^1_\mathrm{eff}/m\) in existing parallel architectures. The variation in sensitivity also reduces because the effective deviation becomes \(<\varDelta R^4_e/n\). Regarding the power requirement of this architecture, the associated read current \(I_\mathrm{read}\approx \frac{m\cdot V_\mathrm{read}}{4\cdot R^1_\mathrm{eff}}\). Hence, the power consumption, \(V_\mathrm{read}\times I_\mathrm{read}\approx \frac{m\cdot V^2_\mathrm{read}}{4\cdot R^1_\mathrm{eff}}\) W. For the traditional architecture, this figure is \(\approx \frac{m\cdot V^2_\mathrm{read}}{R^1_\mathrm{eff}}\) W, i.e. 4 times higher. Thus the parallel architecture offers improved power performance over existing techniques.

3.2.3 Hybrid architecture

In many cases it may not be possible to express m in terms of \(4^k\) to take full advantage of the recursive architecture in Sect. 3.2.1. In such cases a hybrid architecture constituting parallelized recursive architecture can be considered, where \(m=p\cdot 4^k\) and p a non-zero positive integer. Consequently the m sensors can be divided into p recursive structures, each one containing \(4^k\) sensors. These p recursive structures can be parallelized as in Fig. 5a. The overall resistance of the hybrid structure is \(\approx \frac{R^1_\mathrm{eff}}{p}=4^k\cdot \frac{R^1_\mathrm{eff}}{m}\) and the resulting read power is \(\approx \frac{m\cdot V^2_\mathrm{read}}{4^k\cdot R^1_\mathrm{eff}}\) W. Hence, the overall resistance drops much slower than a traditional parallel sensor architecture [10], while the variation in sensitivity remains similar. This can be reasoned about by combining the effects of the recursive architecture with that of the parallel architecture.

Table 1 summarises read power for various architectures and highlights the improvements in the proposed architectures.

Table 1 Read power consumption

3.3 Extension to logic and CRS architectures

The proposed gas sensor architecture (Fig. 3a) can also be made reconfigurable, i.e. it can be extended to become a multifunction logic architecture presented in [30] and a Complimentary Resistive Switch (CRS) [31] by adding switches \(S_\mathrm{3}\) and \(S_\mathrm{4}\) and an NMOST as shown in Fig. 3b. Depending on (i) whether \(T_\mathrm{1}\) and \(T_\mathrm{2}\) are connected to \(S_\mathrm{3}\) and \(S_\mathrm{4}\) or to \(V_{L1}\) and \(V_{L2}\), and (ii) for \(i\in \{1,2,3,4\}\), the voltage \(V_{Si}\) applied via source \(S_\mathrm{i}\), the architecture can be configured as a chemical sensor, a 1-Transistor-4-Memristor (1T-4M) multifunction logic gate [30], or as a CRS for improved resource utilization. The switching operation of \(T_\mathrm{1}\) and \(T_\mathrm{2}\) between \(S_\mathrm{3}\) and \(S_\mathrm{4}\) or \(V_{L1}\) and \(V_{L2}\) can be implemented in various ways with solid state devices such as MOSTs. This is not presented in this paper for brevity. Table 2 summarizes these configurations, which are detailed in the following. Here, \(V_1\) represents an ON-state voltage, which is sufficient to switch on a device.

Table 2 Reconfiguration

3.3.1 Logic operation

For logic operation, we assume that the sensors are not in contact with chemicals. In this case the architecture operates as a CMOS compatible single cycle 1T-4M multifunction logic gate as shown in [30]. The details are left to [30] for brevity. To perform this operation, the terminals \(T_\mathrm{1}\) and \(T_\mathrm{2}\) are connected to \(V_\mathrm{L1}\) and \(V_\mathrm{L2}\) respectively, while the inputs are applied via \(S_\mathrm{1}\) and \(S_\mathrm{2}\). Row 4 of Table 2 summarizes this configuration.

3.3.2 Complementary resistive switch

CRS was proposed in [32] to address the challenges posed by current leakages in memristive arrays. In the absence of chemicals, the proposed architecture can also be configured as CRS to obtain improved resistive behaviour [31] by pairing memristors \(\left<M_\mathrm{1},M_\mathrm{2}\right>\) and \(\left<M_\mathrm{3},M_\mathrm{4}\right>\) in Fig. 3b. This can be useful where the devices are a part of a larger system and switching them to e.g. HRS may help to effectively isolate, block, or “power down” a part of the system.

Depending on the voltage applied via sources \(S_\mathrm{1}\), \(S_\mathrm{2}\) and \(S_\mathrm{3}\), \(S_\mathrm{4}\) (to \(T_\mathrm{1}\) and \(T_\mathrm{2}\)), the devices can be configured in three modes as shown in Table 2:

  1. (i)

    In “Complimentary Mode”, \(M_\mathrm{1}\) and \(M_\mathrm{4}\) are switch-ed to LRS (HRS), while \(M_\mathrm{3}\) and \(M_\mathrm{2}\) are switched to HRS (LRS). Therefore, the overall resistance \(\approx (R_\mathrm{on}+R_\mathrm{off})/2\);

  2. (ii)

    In “All LRS Mode”, all memristors are switched to LRS, which is equivalent to the LRS of a single device;

  3. (iii)

    In “All HRS Mode”, all memristors are switched to HRS, which is equivalent to the HRS of a single device.

For applications only as a chemical sensor the NMOST in Fig. 3b is not necessary. In this case \(V_{S1}\) can be any value within the indicated range. However, if it is also to be used as a 1T-4M logic gate, then this voltage needs to be \(<0\) (negative) unless \(T_\mathrm{1}\) and \(T_\mathrm{2}\) are left floating. This is to ensure that the NMOST in Fig. 3b does not switch on during the sensing operation. If \(T_\mathrm{1}\) and \(T_\mathrm{2}\) are not left floating, then \(V_{S1}\) can only be positive as long as \(V_{S1}/2\) lies below the turn-on threshold of the NMOST.

Fig. 6
figure 6

a and b A process of matching state variables of memristors \(M_\mathrm{3}\), \(M_\mathrm{4}\), \(M_\mathrm{1}\), and \(M_\mathrm{2}\) in Fig. 3b; c memristive Magnification and the resulting read power consumption at \(V_\mathrm{read}=10\)mV, while sensing Oxidising gas, with the architecture in Fig. 3a; d effects of wire resistance on sensitivity variations in the existing architecture with 512 sensors [10]

Row 3 of Table 2 summarizes the sensor configuration. To set the barriers of the devices to a fixed position or to cater for any change in their positions, e.g. after a logic operation, the state variables of the four memristors can be first shifted to D (length of the memristor) and then back to a desired value, e.g. at the middle or \(0.5\times D\). This can be achieved by applying accurate specific voltages [27] or by repeatedly applying programming pulses [28] for a precise number of times. To this end, the programming voltage is applied at terminals \(T_\mathrm{1}\) and \(T_\mathrm{2}\) via \(S_\mathrm{3}\) and \(S_\mathrm{4}\) to the pairs \(\left<M_\mathrm{3}, M_\mathrm{4}\right>\) and \(\left<M_\mathrm{1},M_\mathrm{2}\right>\) respectively, while \(S_\mathrm{1}\) and \(S_\mathrm{2}\) are grounded. The following example illustrates this.

Example 2

In order for the four memristors \(M_\mathrm{1}\)-\(M_\mathrm{4}\) in Fig. 3b to act as a single sensor their initial conditions should closely match. Let us consider the following scenario based on fabricated \(\hbox {TiO}_2\) memristors with the parameters shown in the Appendix [27, 33]. Let the initial state variables (X) of \(M_\mathrm{1}\), \(M_\mathrm{2}\), \(M_\mathrm{3}\) and \(M_\mathrm{4}\) be \(0.1\cdot D\) nm, \(0.8\cdot D\) nm, \(0.3\cdot D\) nm and \(0.6\cdot D\) nm respectively (\(D=3\)nm), i.e. they are widely mismatched. Their state variables can be made to closely match each other, say at \(0.5\cdot D\) nm, by first shifting them to D by applying \(-0.4V\) at \(T_\mathrm{1}\) and 0.4V at \(T_\mathrm{2}\) for \(1 \mu\)sec, and then back to \(0.5\cdot D\) nm by applying 207.7mV at \(T_\mathrm{1}\) and \(-207.7\)mV at \(T_\mathrm{2}\) for \(1 \mu\)sec. During this process \(S_\mathrm{1}\) and \(S_\mathrm{2}\) are grounded. This is illustrated in Fig. 6a and b based on Spice simulation.

In addition, the proposed architecture can also determine the value of a specific memristor. For example, let the instantaneous resistance of \(M_\mathrm{3}\) be \(R_\mathrm{ins}\), which we wish to read. Let \(T_\mathrm{1}\) and \(T_\mathrm{2}\) be connected to \(S_\mathrm{3}\) and \(S_\mathrm{4}\) respectively. The following voltages will set \(M_\mathrm{1}\), \(M_\mathrm{2}\) and \(M_\mathrm{4}\) to \(R_\mathrm{off}\), without affecting \(M_\mathrm{3}\)  \(V_{S3}=V_{S1}=0\), \(V_{S2}>V_\mathrm{off}\), and \(V_{S4}>V_{S2}+V_\mathrm{off}\). Then the measurable equivalent resistance, \(R_\mathrm{equiv}\approx (2\cdot R_\mathrm{off})||(R_\mathrm{ins}+R_\mathrm{off})\). Since \(R_\mathrm{off}\) is known, this can be solved to determine \(R_\mathrm{ins}\).

4 Results and discussion

The models and designs presented in this paper were comprehensively tested and analyzed. For verifying the sensor architectures, the memristors were coded in Spice based on the model in Sect. 2 (presented in the Appendix) and the systems were designed and verified via simulations in LTSpice. The effects of process variations, scalability, and wire resistance on sensitivity were simulated in MATLAB. To this end, we developed a simulation framework, which can simulate and analyze the sensor architectures in different configurations with process variations and wire resistance.

4.1 Memristive behaviour

The primary requirement of verifying a memristor sensor is to ensure that it manifests memristive characteristics. To this end, Fig. 2a shows the IV characteristics of our model, which shows hysteresis in a \(\hbox {TiO}_2\)-based sensor [4,5,6,7,8] with and without gas. The parameters, based on [27, 33], are presented in the Appendix (Fig. 7). The blue plot, which shows the hysteresis without any gas, clearly matches the characteristics in [27, 33] for a \(\hbox {TiO}_2\) based memristor. The other plots show the characteristics in the presence of 500 ppm oxidising and reducing gasses. The plots were obtained from Spice simulations with a sinusoidal wave of amplitude 1 V at a frequency of 5 MHz [27, 33].

4.2 Memristive magnification

The effects of Memristive Magnification (Sect. 2b) were analyzed for a single device as well as for the architectures in Sect. 3. For example, Fig. 6c shows this effect in the four memristor sensor architecture in Fig. 3a. Owing to the properties of this architecture, the observed Memristive Magnification is similar to that in a single sensor under similar conditions. Here the parameters are as in Fig. 7 and based on fabricated \(\mathrm{TiO}_2\) devices [4,5,6,7,8, 27, 33]. The devices were assumed to be exposed to Oxidising gas. The gas concentration was linearly varied from 0 to \(100\times 10^3\) ppm over time. This was simulated in Spice with a voltage source, as explained in the Appendix. The state variables of all the memristors were varied between \(0.3\times D\) to \(0.7\times D\). This can be achieved as shown in Sect. 3. Clearly, as we shift the barriers towards D, the spread of resistance over different gas concentrations increases, which in turn improves measurability. Owing to the higher overall resistance, the read power consumption also significantly improves, as shown in the lower plot of Fig. 6c.

4.3 Process variation and wire resistance

We assumed the presence of wire resistance in each segment of wire. For example, in Fig. 3a, we assumed that each wire connected to the four memristors \(M_\mathrm{1}\)\(M_\mathrm{4}\) has a wire resistance and so do the wires connecting the two sources \(S_\mathrm{1}\) and \(S_\mathrm{2}\). The effects on sensitivity due to \(1\mu \varOmega\) resistance per segment of wire, with scalability, are shown in Fig. 2b and c for existing techniques [10, 19] and the architecture in Sect. 3 respectively. The assumed parameters are as follows: \(R_\mathrm{on}=100\varOmega\), \(R_\mathrm{off}=10\mathrm{K}\varOmega\), \(X=0.5\cdot D\) nm and a reducing gas with a concentration of 1000 ppm. In ideal circumstances, i.e. in the absence of process variation and wire resistance, \(R^\mathrm{I}_\mathrm{M}=1\mathrm{K}\varOmega\), \(R^\mathrm{F}_\mathrm{M}=1.19\mathrm{K}\varOmega\), and sensitivity \(S=0.19\). For the simulation and analysis we varied the number of memristors from 1 to 1024 and also the process parameter D (Fig. 1) by about 2.5%. However, variations in any parameter which translate into variations in the measurable resistance can be considered for simulation. The trend in Fig. 2c has been observed with other realistic values of these parameters owing to the inherent properties of this architecture. The variations were assumed to be random in the Gaussian (normal) distribution space. Standard deviation was used as a measure of variation of sensitivity based on the empirical “three-sigma rule”, i.e. the 68-95-99.7 rule [34]. The number of simulation runs was 10,000 per design, i.e. 10,000 “chip fabrications” were simulated with process variation and wire resistance per design.

As can be seen, the variations in sensitivity are reducing in both Fig. 2b and c with scalability, however in Fig. 2b the overall sensitivity is shifting to the right due to wire resistance. In contrast, the overall sensitivity is remaining centered around about 0.19 in Fig. 2c, i.e. this architecture is relatively immune to wire resistance.

The degrading effects of wire resistance on sensing is further highlighted in Fig. 6d based on existing techniques [10, 19]. Here, we varied wire resistance, \(R_w\), from \(10^{-6}\varOmega\) to \(10^{-3}\varOmega\) in an array of 512 memristor sensors while keeping all other parameters fixed. Clearly, as the wire resistance is increasing, the bell curves are shifting to the left resulting in noticeable degradation in sensitivity. In contrast, for the proposed recursive architecture, hardly any degradation was observed, while the effects of process variations reduced substantially.

Table 3 provides further details. Here, the third column—“Variations Simulated”—is obtained by finding the standard deviation of sensitivity variations. In contrast, the sixth column—“Variations Calculated”—is obtained simply by successively dividing by two the sensitivity variations of a single sensor in the first row. Clearly, for similar degree in variations, the variations in sensitivity is reducing by half in each level (depth of recursion), i, in a highly predictive manner. Following the pattern in this column, if the variation in sensitivity is d for a single sensor then, it drops to \(\approx d/2^i\) at level i or to \(d/2^{\log _2(N)/2}\) for N sensors, where \(N=4^i\).

Column 4 reports the improvement, which is clearly quite significant. However, this comes at a cost of extra sensors, but not at the cost of any extra power consumption (Table 1). The hardware overhead can be justified by considering the fact that if the devices are fabricated on a die then the cost of a single sensor should not be significantly lower than that of an array of sensors.

Accuracy of sensing devices is known to deteriorate owing to ageing. This architecture is expected to reduce the effects of ageing in a manner similar to the way it reduces the effects of process variability (Sect. 3.2.1). This is because each device in the architecture is expected to age differently and hence the overall effects of ageing is expected to be much lower than that of a single device.

Sensors are often placed in noisy environments such as factories, trains, aeroplane engines and military equipment, which can affect their performance. The proposed architecture is expected to improve noise margins and reduce the effects of noise. Our studies have shown that it is capable of reducing noise in a manner similar to the way it handles process variability. For example, the effects of any noise in one branch are likely to be minimised by its effects in the other branch and vice versa. As a result, the overall effect of noise is expected to reduce. This has been studied in terms of parasitically induced noise effects in memristors for similar architectures in [35]. To this end, the proposed architecture is also expected to improve the overall noise margin.

Sensors require calibration to accurately detect and measure substances of an unknown quantity. To this end, since the proposed architecture is expected to function as a single unit in a manner similar to a single sensor device, it can be calibrated based on known calibration techniques for single sensor devices, e.g. [36,37,38].

Table 3 Effects of scalability (Ideally \(R^\mathrm{I}_\mathrm{M}=1\mathrm{K}\varOmega ,R^\mathrm{F}_\mathrm{M}=1.19\mathrm{K}\varOmega\), Sens\(=\)0.19)

4.4 Power consumption

In general memristive devices are known to be extremely power efficient owing to the fact that the read voltage (Sect. 2a) is usually very low. This can be leveraged to further improve systems level power consumption by organizing the devices in certain ways within the architectures. To this end Table 1 provides a summary of the power requirement of various architectures in terms of \(V_\mathrm{read}\) and \(R^1_\mathrm{eff}\). Clearly, the proposed recursive architecture provides significantly improved power performance. Referring to Fig. 6c, the read power can be maintained below \(1\mu\)W even in the presence of high concentration of gasses. The performance of the proposed parallel (Sect. 3.2b) and hybrid (Sect. 3.2c) architectures is worse than the purely recursive architecture, but it is still at least four times better than existing approaches.

5 Conclusions

In this paper, we presented a novel memristor based gas sensor architecture for improving sensing accuracy and power performance. We achieved this by organising the devices in ways to reduce variations in the readings due to process variations and wire resistance. The architecture can also be configured as a 1T-4M multifunction logic architecture or as a complimentary resistive switch in the absence of gasses.

We first presented an improved memristive gas sensor model. This model matches device behaviours in literature in a better way and also can be expanded to different materials. The model and architecture are able to exploit “Resistive Magnification” for improved power consumption and sensor readings by allowing a device’s barrier to be ‘preset’ to a certain position. Using this model, three architectures, namely, parallel, recursive and hybrid, were proposed and analyzed. All the architectures demonstrated significant immunity to process variations with scalability and improved power consumption compared to existing techniques. Additionally, our analysis showed that the recursive architecture is more efficient as it maintains the overall resistance and sensitivity close to ideal values. This architecture may also offer repairability with low overhead. For example, this can be visualized as a network of 4-sensor cells. If an element is faulty, then only that cell needs to be replaced with a spare cell instead of entire rows or columns in traditional crossbar array architectures. The power performance of the parallel and hybrid architectures is poorer than the recursive architecture, but still at least four times superior to existing architectures. Although, the variations in sensor readings were assumed to be due to process variations, the architectures are expected to reduce these regardless of the causes. Another cause of the variations could be, upon exposure, different sensors coming in contact with different concentrations of gasses. Our anticipation is that the proposed work will play an important role in low power reliable sensor design for safety critical applications, potentially provide far-reaching benefits in a world that is rapidly adopting the Internet of Things (IoT) paradigm and make significant contribution to the IoT revolutions, making its diffusion even faster and ultimately contributing to humankind’s progress as a whole.