# Behavioral Modeling of Memristor-Based Rectifier Bridge
## 3 Forming the Sets of Input and Output Signals of the Memristor-Based Rectifier Bridge
### The Yakopcic Model of a Memristor in LIspice  
The memristor model used in the circuit depicted in Figure 2 plays the important role for signal processing. In the past, several different mathematical memristor models were published; each of them aiming for a certain application. The first model was created by HP Laboratory in 2008 [12]. The basic current (I)-voltage (V) relationship can be found there. In 2009, the original HP model was extended by introducing the factor \(\eta\), which describes the state variable motion with respect to the polarity of the applied voltage. Furthermore, a window function for the state variable motion was added [56]. The window function was modified by Biolek for a more realistic behavior of the state variable motion near the boundaries [57]. The first hardware related model was introduced by the Air Force Research Lab [58]. It does not use a state variable; the resistance change rate was defined directly. Later, models were implemented that describe a hyperbolic sine I-V relationship, like the one by the University of Michigan [59]. Previous models could only emulate sinusoidal input signal correctly, not general signal shapes. The hyperbolic sine model can approximate the I-V relationship of the MIM junction better. For the implementation of a memristor model in LIspice we use the generalized hyperbolic sine model by [PERSON] et al. [55]. In comparison with the above-mentioned memristor models, the [PERSON] model uses more general equations for the memristor dynamics. Via fitting parameters, the model can be adapted to a variety of published memristor devices. The LIspice schematic of the sub-circuit can be seen in Figure 3.  
Figure 3: The LIspice schematic of the internal memristor model. Figure 2: The circuit of the memristor-based rectifier bridge with resistive load. The I-V relationship of the generalized memristor model depends on the state variable \(x(t)\). Due to the MIM sandwich structure the memristive device shows an increase in conductivity beyond a certain voltage threshold. This behavior is considered by using a hyperbolic sine function. \[i(t)=\left\{ \begin{array}{l}a_{1}\cdot x(t)\cdot\sinh(b\cdot v(t))\;v(t)\geq 0\\ a_{2}\cdot x(t)\cdot\sinh(b\cdot v(t))\;v(t)<0\end{array} \right., \tag{6}\]  
where \(a_{1}\), \(a_{2}\) and \(b\) are the parameters used to fit the model function to real memristive devices. The state variable \(x(t)\) is related to the resistance of the device, i.e., the relation of the length of the doped region to the overall length \(l_{\rm d}/l_{\rm mem}\). In the LTspice sub-circuit, the state variable is named XSV. For the LTspice netlist Equation (6) is written as [55]  
.func IVRel(V1,V2) = IF(V1 >= 0, a1*V2*sinh(b*V1), a2*V2*sinh(b*V1))  
Here V1 stands for the voltage across the memristor \(v(t)\) and V2 stands for the state variable \(x(t)\). The state variable change is described in (7) by two functions \(f(x(t))\) and \(g(v(t))\) :  
\[\frac{{\rm d}x(t)}{{\rm d}t}=\eta\cdot g(v(t))\cdot f(x(t)), \tag{7}\]  
where \(\eta\) is a factor which can be +1 or \(-1\). It represents the direction of the motion of the state variable relative to the polarity of \(v(t)\). In order to get the derivative of the state variable, one can use a 1F capacitor in LTspice (Figure 3). Then the derivative of the node voltage V(XSV) is proportional to the current \(i_{x}(t)\) in the capacitor which is equal to the current of the voltage dependent source Gx. Eventually, we can write:  
\[\frac{{\rm d}x(t)}{{\rm d}t}=\frac{1}{C}\cdot i_{x}(t).\]  
The initial state \(x_{0}\) can be thought of as the voltage across the capacitor \(v_{\rm C}(t=0)\)[55]: Cx XSV 0 [1]  
.ic V(XSV) = xo  
In order to change the state variable, a certain voltage threshold must be exceeded. The function \(g(v(t))\) accounts for this behavior:  
\[g(v(t))=\left\{ \begin{array}{l}A_{\rm P}\cdot\left({\rm e}^{v(t)}-{\rm e}^{ V_{\rm P}}\right)&v(t)>V_{\rm P}\\ -A_{\rm n}\cdot\left({\rm e}^{-v(t)}-{\rm e}^{V_{\rm n}}\right)&v(t)<-V_{\rm n }\\ 0&-V_{\rm n}\leq v(t)\leq V_{\rm P}\end{array}