The main intent behind the modeling and simulation is to help the designers to come out with the apt device characteristics per application. In the present case the main rationale is to fine tune the memristor attributes through simulation for two fold purposes viz. fast transition from LRS to HRS for RRAM applications while slow transition from LRS to HRS for the neuromorphic domain. The modeling for the above mentioned attributes has been obtained by applying the piecewise linear and nonlinear window functions. After zeroing down on the technique for modeling the simulation was accomplished.

Figure 3 represents the simulated I–V characteristics of nanostructured memristor device with piecewise linear window function. The present simulation is carried out for control parameter p = 10, 20, and 30 with state variable x = 0.3, 0.5, and 0.7. In the other words, these state variables represent the growth location of conductive filament in the memristor device. An illustration of such mechanism is shown in the Fig. 4. The state variable *x* = 0.3, 0.5, and 0.7 represents LHS bounds, middle region and RHS bounds respectively and it can be visualize from Fig. 2. The simulation results suggested that the current in the device increases as the control parameter *p* increases from 10 to 30. The relationship between current and control parameter with various values of state variable is shown in the Fig. 5. From Figs. 3 and 5, it is seen that the memristor device shows RRAM kind of characteristics at higher magnitude of control parameter. The results also suggest that abrupt switching occurs at the higher magnitude of control parameter. For the lower magnitude of control parameter, current and pinched hysteresis loop (PHL) become small. The area under the PHL is also increases as the magnitude of control parameter increases. The change in the control parameter can be used for the switching from one state to another state. In the other words, if one can have power over the control parameter then switching of the device can be controlled. This characteristic is very similar to digital memory and has application in the digital memory domain. From the results it is clearly evident that memristor will be work as a promising RRAM building block at the higher values of control parameter, when it is modeled with piecewise linear window function.

Figure 6 represents the simulated I–V characteristics of nanostructured memristor device with nonlinear window function. For the present simulation control parameter ‘p’ varies as 1, 3, 5, 10, 20, and 30. For each control parameter, I–V characteristics is simulated at state variable *x* = 0.5 (insignificant change is observed at state variable *x* = 0.3 and 0.7 with respect to *x* = 0.5). The results indicates that the memristor device shows nonlinear behavior only at the lower magnitude of control parameter (p = 1, 3, and 5) and I–V characteristics does not alter at higher magnitude of control parameter (p = 10, 20, and 30). The area under the curve is higher only at the lower magnitude of control parameter and becomes approximately same at higher magnitude of control parameter. This window function does not reaches to *f*(*x*) = 1 (it becomes *f*(*x*) = 1 only at p = ∞) and is a main limitation of nonlinear window function. To rectify this limitation, we are proposing a new window function which can be scaled up to *f*(*x*) = 1 at higher magnitude of control parameter. The proposed nonlinear window function can be defined as,

$$\begin{aligned} &{\text{If p}} < {\text{p}}_{0} \,{\text{then}}, \\ &f( x) \, = \left\{ {\begin{array}{*{20}l} {x^{{\frac{1}{p}}} } &\quad {for \,\, 0 \, \le \, x \, \le \, X_{0} } \\ {x_{0}^{{\frac{1}{p}}} } &\quad {for \,\, X_{0} \le \, x \, \le \, Y_{0} } \\ {\left|(x - 1)\right|^{{\frac{1}{p}}} } &\quad {for \,\, Y_{0} \le \, x \, \le \, 1} \\ \end{array} } \right. \\ &{\text{Otherwise if}}\,{\text{p}} = {\text{p}}_{0} \,\,{\text{then}}, \\ &f\left( x \right) \, = \left\{ {\begin{array}{*{20}l} {x^{{\left( {\frac{{1 - x_{0} x}}{p}} \right)}} } &\quad {for \,\, 0 \, \le \, x \, \le \, X_{0} } \\ {x_{0}^{{\frac{{p_{0 - } p}}{p}}} } &\quad {for \,\, X_{0} \le \, x \, \le \, Y_{0} } \\ {\left| {(x - 1)} \right| ^{{ - \left( {\frac{{x_{0} x - 1}}{p}} \right)}} } &\quad {for \,\, Y_{0 } \le \, x \, \le \, 1} \\ \end{array} } \right. \hfill \\ \end{aligned}$$

(4)

where, *0* < *X*
_{
0
}< *Y*
_{
0
}< *1, Y*
_{
0
} = *(1*−*X*
_{
0
}
*)* and p ∈ R^{+}. Figure 7 shows the difference between two nonlinear window functions with various values of control parameter *‘p’*. The results suggested that the proposed window function scaled up to *f*(*x*) = 1 at higher magnitude of control parameter. The simulation of memristor device with modified nonlinear window function is shown in the Fig. 8. The results suggested that modified nonlinear window function is able to simulate the memristor characteristics at higher magnitude of control parameter. From the results it is clear that the current in the device increases as a function of state variable i.e. magnitude of current increases as value of state variable increases. I–V characteristic shows smooth nonlinear change from LRS to HRS and vice versa. This is due to the fact that the drifting of oxygen vacancies (state variables of the memristor) are highly nonlinear when switching occurred. Furthermore, the applied bias, device geometry, and conduction mechanism also influences the device switching dynamics [2, 19]. This is very similar to analog memory and has application in the neuromorphic engineering domain. In nutshell, modified nonlinear window function can be used for the analog memory applications.