Differential Equations of Ideal Memristors

. Ideal memristor is a resistor with a memory, which adds dynamics to its behavior. The most usual characteristics describing this dynamics are the constitutive relation (i.e. the relation between flux and charge), or Parameter-vs-state map (PSM), mostly represented by the memristance-to-charge dependence. One of the so far unheeded tools for memristor description is its differential equation (DEM), composed exclusively of instantaneous values of voltage, current, and their derivatives. The article derives a general form of DEM that holds for any ideal memristor and shows that it is always a nonlinear equation of the first order; the PSM forms are found for memristors which are governed by DEMs of the Bernoulli and the Riccati types; a classification of memristors according to the type of their dynamics with respect to voltage and current is carried out.


Introduction
In [1], the memristor was originally defined as a oneport establishing a unique relation between charge q = ∫idt and flux  = ∫vdt, where i and v are memristor voltage and current. The unalterable relations  = (q) and q = q(), called constitutive relations of the memristor, are exclusive attributes of the element. The memristor always enforces their validity, irrespective of the instantaneous voltage and current relations, and independently of how it is connected to the rest of the circuit. The result is that the memristor appears as a resistor dependent only on the charge q passing through or on the flow . That is why two mutually dual forms of Ohm's law apply to the memristor  i are the differential memristances and memductances, which can be calculated as the slopes of the corresponding constitutive relations at the current operating points. The functions (2) are two mutually compatible forms of the PSM (Parameter-vs-state map) characteristics. The parameter is memristance or memductance, and the state of the memristor is the charge or flux as the integral quantity.
Over time, the designation "memristor" began to be used also for memristive systems originally introduced in [2]. They are resistors that are non-linear with respect to voltage/current and that are also dependent on a general vector state of the associated dynamical system. According to the terminology introduced in [3], memristive systems are considered extended memristors. This paper concerns the memristor in the sense of [1], which we will call, in accordance with [3], an ideal memristor.
A general dynamical one-port can be described by the differential equation 0 ,.. , , , where v(t) is the one-port voltage and i(t) is the current flowing through it. Type (3) equation is the standard basis of modeling techniques in the circuit theory. It does not have to be limited to one-ports, i.e. v and i can be vectors of the input and output variables. In [4], an algorithm is described that converts the state and the output equations of a nonlinear dynamical system into an equivalent description, consisting of three sets of equations. The first one describes the dynamics of the unobservable part of the system; the second expresses the observable states as functions of input and output variables; the third defines the external behavior of the system using a general vector equation of the form (3).
Research into differential equations of memristor (DEM) is of practical importance. A specific type of equation (3) may lead to a structure of the state-based model which can exhibit better properties than the state space model based on a physical variable which is directly connected with the memory mechanism [5], [6]. Finding the type of DEM can also answer the question whether the memristor response to a known excitation can be computed analytically. However, there is no satisfactory explanation as to what equation (3) looks like in the case of an ideal memristor. Probably the first significant attempt in this respect was made in [7]. This work started a series of pub-lications about the so-called Bernoulli dynamics of memristor, and it is the source of the still prevailing opinion [8], [9] that the Bernoulli differential equation (BDE) is a characteristic of the ideal memristor and, consequently, that "ideal memristors obey the Bernoulli dynamics". On the contrary, other publications [10], [11] point out that the BDE is only compatible with a certain special class of ideal memristors.
This paper deals with the problem of the differential equations of ideal memristors as follows. The general form of DEM of ideal memristor is derived in Sec. 2, starting from the memristor PSM in the form of (2). Section 3 shows examples of memristors with various PSMs, leading to various DEMs. It is demonstrated that the type of DEM depends on what variable, voltage or current is used as the input or output variable. Examples of the PSMs are given that lead to linear differential equations with a variable parameter, to the Bernoulli and the Riccati differential equations, to the Abel differential equation of the first kind, and also to equations of other types. It is proved in Sec. 4 that the so-called Bernoulli dynamics has its limits, and PSM forms are found that must comply with memristors exhibiting such dynamics. Sections 5 and 6 are devoted to similar issues but for cases of the Riccati and the Abel dynamics. Section 7 provides the classification of memristors in terms of their dynamics which is exbibited by their voltage and current.

General Form of Differential Equation of Ideal Memristor
Consider a memristor with current i(t) flowing through it and with voltage v(t) across its terminals. Depending on how the charge q(t) and the flux (t) change, its memristance and memductance also vary. Their derivatives with respect to time will be i.e. the rate of change of R M or G M is directly proportional to the slope of the respective PSM at the current operating point. Expressing the instantaneous memristance and memductance using the instantaneous values of voltage and current according to (1), performing differentiations on the left-hand sides of (4), and making slight arrangements, we get It is not yet possible to say that equations (5) are in the form of (3) because the slopes of PSMs are generally dependent on charge or flow. Suppose now that the current operating point is in such a position of the PSM function that its inverse function exists in some its neighborhood, i.e. the function q = q(R M ) or  =  (G M ). The inverse PSM is in fact a state-to-parameter map. We will therefore refer to it as SPM. The layout is shown in Fig. 1.
For each operating point in whose neighborhood the SPM exists (5) can be rewritten to the form Equations (6) are ordinary differential equations of the type (3).
Both forms of DEM (6) are equivalent and one equation follows from the other. We can check this easily by adding up the left sides and the right sides of two original equations (5). We get directly the well-known conversion [11] between the slopes of both dual forms of the PSM which can be used for a quick transition from one form of equation (6) to the other. In practice, we use an option that better matches the given PSM.
Equations (6) represent the general form of the DEM of any ideal memristor. It is therefore obvious that the voltage and current of the ideal memristor with arbitrary PSM always satisfy the first-order nonlinear differential equation. It follows from (6) that if the unknown quantity is voltage, the DEM may be of a different type than in the case when the unknown quantity is current.
The following section presents several examples clarifying the process of obtaining the DEM from the PSM of an ideal memristor.

Examples of DEMs of Ideal Memristors
The so-called HP memristor is one of the frequently discussed types of memristors [12]- [14]. Its linear model assumes that the memristance linearly depends on the charge that passed through. Its PSM can therefore be expressed, for example, as follows: where R and k are constants. In order to derive DEM (6), it is necessary to determine the form of the SPM in the first step. In this case it is the inversion of a linear PSM, which also gives a linear SPM The reciprocal value of the slope of SPM (10) gives the function f( ) from (7) thus DEM (6) has the form It is obvious that if the current i(t) is the known variable and the voltage v(t) is unknown, the memristor is governed by a linear differential equation with time-varying coefficients A memristor whose voltage is governed by a linear equation of the type of (13) will be denoted a class v L memristor. Equation (13) has an analytical solution [8], [11].
If the known quantity is the voltage v(t) and the unknown variable is the current i(t), the memristor is governed by the Bernoulli differential equation [15]     0 A memristor whose current is governed by the Bernoulli equation of the type of (14) will be denoted a memristor of class i B. This equation also has an analytical solution [8], [11]. Memristors belonging simultaneously to the classes v L and i B will be denoted memristors of the ( v L i B) type. This and other examples are described in Tab. 1.
The original ideas of how the HP memristor works led to a simple model of the linear dependence of resistance on the charge that passed through [12], [13]. This corresponds with row 1 in Tab. 1, which summarizes the results of (13) and (14) regarding the types of DEM. The second row represents a memristor whose conductance is directly proportional to the flow. For this memristor, the voltage is governed by the BDE and the current by the LDE. The third row of Tab. 1 shows another variant, when, unlike with the "HP memristor", the conductance and not the resistance is linearly dependent on the charge. When excited by a known current, the memristor would, the same as the "HP memristor", comply with the Bernoulli differential equation with respect to voltage. Compared to the classical variant, however, the constant n from (14) would change from 3 to 2. Row 4 refers to a memristor with linear resistance-to-flow characteristic. It is noteworthy that if we interchange the resistance and the conductance and simultaneously the charge and the flux in the starting conditions, the result leads to the same type of DEM. The PSM of the (a + bq) n type leads to memristors of the type of ( v B i B) if n  {-1;-0.5;1}; for n = -1 a n = -1/2 we obtain ( v B i L)-

Class of DE for the output as PSM DE voltage current
Type of memristor

LDE The Linear Differential Equation RDE
The Riccati Differential Equation

BDE
The Bernoulli Differential Equation ADE The Abel (first kind) Differential Equation

XDE Another Differential Equation
Tab. 1. Relation between PSM and class of DEM.
type memristor, and for n = 1 it would be a ( v L i B)-type memristor. Table 1 shows that there are memristors whose DEMs are not of the BDE type with respect to both voltage and current. As an example, one can mention PSMs that lead to the Abel differential equation of the first kind (ADE, row 6) or to an equation of quite a different type (rows 8 and 9). A frequently held view [7], [8] that ideal memristors are inseparably adherent to the Bernoulli dynamics, is therefore incorrect. The next section provides a derivation of the limits of the Bernoulli dynamics, i.e. the conditions for the PSM of the memristor such that the dynamics of its voltage or current would comply with the Bernoulli differential equation.

Bernoulli Dynamics
Denote v B (or i B) a class of all the memristors that exhibit the Bernoulli dynamics with respect to voltage (or current), i.e. when equation (6) is a Bernoulli differential equation for voltage (or current). The question of what type of PSM all the memristors in classes v B and i B must have can be changed to another question: What conditions must the respective functions f( ) or g( ) from equation (6) meet?
Just like the PSM of ideal memristor (2) does not explicitly depend on the voltage or current but exclusively on the charge or flow, its SPM also depends exclusively on the memristance or memductance. The function f( ) or g( ) from (6) is therefore always a function of the ratio v/i, i.e. voltage and current cannot figure therein separately or in any other form than the above ratio. This fact makes the next steps easier, because those forms of f( ) or g( ) are sought which cover all the possibilities of generating the BDE from equations (6) with respect to voltage or current.
The function f( ) or g( ) will generally have different forms for memristors of classes v B and i B. We will denote the first one f v () or g v () and the other f i () or g i (). If equations (6) are to be BDEs with respect to current i, the function f i () must fulfill the condition (15) where n is the constant from (14), k 1 , k 2  R, k 1 ≠ 0. The first summand in (15), after multiplying by i 3 from (6), generates the element k 1 v 3 -n i n . For a BDE with respect to i it is required that n  {0;1} [15]. The second summand in (15) may or may not contribute to the element (idv/dt) in (6) with a contribution k 2 v 2 i without violating the format of the BDE (14) with respect to i. Taking into account the condition (7) and the fact that v/i = R M , then 2 2 Relation (16) is a differential equation that generates a PSM of the R M (q) type of all the memristors of class i B.
After the separation of variables, the appropriate SPM function can be expressed as the integral whose general solution can be found in terms of the hypergeometric function The resulting form of the PSM for the special case of k 2 = 0 can be expressed in terms of standard functions: where q 0  R.
The general form of the PSM of R M (q) type that would cover the entire set of i B cannot be expressed via the elementary functions, but we can get its dual form G M (). Utilizing relations (8) and (16) and a simple rearrangement yield that all the PSMs of the G M () type that lead to memristors of class i B must be solutions of the differential equation which is a Bernoulli differential equation with constant parameters. Substituting the function g i () = -k 1 () n -k 2 () into the second equation in (6), we get the DEM form for any memristor of class It follows from (21) that each memristor of class i B must with respect to voltage exhibit the dynamics governed by the differential equation It is an equation that, for special combinations of k 2 and n, becomes the BDE, RDE, or ADE of the first kind, or the LDE with time-varying parameters.
Equation (20) has an analytic solution. For The solution of (20) for k 2 ≠ 0 is as follows: For some combinations of the constants k 1 and k 2 , the function (24) will show singularities at points where the argument of the abs ( ) function acquires zero. Therefore, the resulting formula for G M () is ambiguous: The sign of the exponential term depends on the sign of the argument of the abs ( ) function in (24).
Memristors of class i B with the BDE (21) must therefore have the G M () characteristic in the form of (23) or (25). Since the constants k 1 , k 2 ,  0 and n are, with discrete exceptions (e.g. k 1 ≠ 0, etc.), arbitrary real numbers, the basic forms (23) and (25) can be transposed, with the help of other constants, into other forms. All adjustments that lead to the original structure of the source equation (20) but with different, mutually independent constants are acceptable, i.e.  The linear model of the HP memristor [13] not employing any window functions is the well-known representative of the "Bernoulli dynamics". According to our classification, it is a memristor of the ( v L i B) type with the BDE constant n = 3, see row 1 in Tab. 1.

Riccati Dynamics
Row 7 in Tab. 1 represents the case of a memristor whose current is governed by the Riccati differential equation. The class of memristors complying with this dynamics will be denoted by the symbol i R. Let us examine the requirements for the PSM that lead to the classes v R and i R.
In accordance with [15], regarded as a Riccati differential equation is an equation of the type of For our purposes, y(t) will be either the memristor voltage or current.
On the basis of (6), (7) and (27), it can easily be found that belonging to the dynamics of class v R is equivalent to the condition Then the voltage will comply with the differential equation which is formally identical to the Riccati equation (27). The SPM q = q(R M ) can be calculated as the integral The result depends on the sign of the discriminant as follows: The PSM is derived by inverting the formula (32) Relations (33) represent the complete set of the forms of R M (q) leading to the Riccati dynamics v R.
Since the hyperbolic tangent can be expressed using the exponential functions, the memristance for D > 0 can also be written as Note that this relation employs the well-known sigmoid function [5].
Applying (8) where W( ) is the Lambert function.
General forms of the PSM that belong to memristors of classes v R and i R are summarized in Tab. 3. Table 3 contains all the possible forms of the G M () of the class i R memristors and all the possible forms of the R M (q) of the class v R memristors. The general form of the R M (q) for class i R and the G M () for class v R cannot be expressed using standard functions. We will only succeed for special combinations of the parameters in the generating equations.
The well-known model of the HP memristor with the Joglekar window function with the parameter p = 1 [13] exhibits the Riccati dynamics with respect to voltage. Its PSM is derived in [5]   where R off , R on , and R ini are the maximum, minimum, and the initial memristor resistances, and k is the technological constant. According to Tab. 3, it is the R M (q) of the memristor of class v R.

Memristors of class
Tab. 3. Boundary of the Riccati dynamics of ideal memristor.

Abel Dynamics
Consider the differential equation of the form where n is a positive integer. Equation (39) is the generalized Abel differential equation (ADE) of the first kind [16]. Its basic form is given for n = 3 [15]. If n = 2 and simultaneously f 0 (t) ≠ 0, (39) changes to the Riccati differential equation. For n > 1 and simultaneously f i (t) = 0, i  {0,2,3,..,n -1}, (39) becomes the Bernoulli differential equation for integer-type n.
If the current/voltage of the memristor is governed by the basic form of (39), i.e. for n = 3, then it belongs to the i A/ v A class. A specific case of the i A class memristor is shown in row 6 of Tab. 1.
Let us examine the requirements for the PSM of the memristors of class v A. The generating equation for the PSM of R M (q) type can be obtained the same way as for the Bernoulli and the Riccati dynamics. It is the ADE of the first kind with the voltage conforming to the differential equation ..
Note that this equation is of type (39). The current will be the solution of the equation

Possible Types of Memristor in Terms of DEM
Consider the differential equation where n is a positive integer and R is a non-integer real number. If some of the functions f R (), f 0 (), .., f N () were identically zero, then (43) could become the LDE, BDE, RDE, ADE or generalized ADE.
If y(t) is the voltage, then the generating equation for the PSM of the R M (q) type will be ..
Note that this equation is of type (43). The current will be a solution of the equation This equation is of type (43) only for n = 3.
Analogous results hold for y(t) representing the current. The analysis of these results yields all the possible combinations of classes that are represented as a matrix in Fig. 2. Some of the combinations of classes are not realizable in principle. If, for example, the memristor voltage is governed by the Bernoulli differential equation, then its current cannot be governed by a type of equation other than LDE, BDE or RDE. If we observe that the memristor voltage is governed by a linear differential equation, then we can be confident that the current must follow either the Bernoulli differential equation or the Abel differential equation of the first kind. If the voltage and current are to be governed by the same type of DEM, then it must be only the Bernoulli differential equation.
It is evident that there are memristors of different types outside the matrix. Examples can be found in Tab. 1 in rows 8 and 9. However, the scheme exhibits the sym- It means that the classes v X and i Y, presented in the matrix, cannot occur for any memristor that lies outside the matrix. To put it concisely: if, for example, the memristor current complies with a linear differential equation with timevarying coefficients, then the voltage cannot be governed by other than the Bernoulli or the Abel of the first kind dynamics. Likewise, the voltage or current of a memristor whose type is outside the matrix cannot exhibit linear dynamics (i.e. dynamics governed by a linear differential equation).

Conclusions
The voltage and current of the ideal memristor are, under all circumstances, governed by an ordinary differential equation of the first order (6). This equation can be linear with variable coefficients, Bernoulli, Riccati, Abel of the first kind or a differential equation of quite a different type.
The methodology for determining the type of the differential equation from the memristor PSM is given by equations (6) to (8). This methodology is successful if it is possible to invert the given PSM analytically in terms of standard functions. It was used for determining the differential equations of all the types of memristors that are given in Tab. 1.
A method has been found for generating the PSM which must apply to memristors with a given type of dynamics with respect to voltage or current. For a prescribed type of the dynamics, the generating differential equation is found which generates all the PSMs sought. It is noteworthy that the generating differential equation is of the same type as the original differential equation that determines the type of the dynamics, but it is simpler in the sense that it has constant parameters. It should also be noted that the generating equations generate all the possible PSM functions that would lead to the prescribed type of the dynamics. In the case of the synthesis, for example, of only passive memristors, the free constants in the generating equations or directly in the resulting PSMs would be correspondingly limited. Another remarkable observation: it is possible to find all the closed-form PSMs of the R M (q)/G M () type in terms of the standard functions for the Bernoulli and the Riccati dynamics with respect to voltage/current. Finding the corresponding counterpart from the pair R M (q) -G M () analytically is generally impossible, as shown in [11].
The overview of the memristor types in Fig. 2 indicates one of the possible reasons why the Bernoulli dynamics is still mistakenly considered a feature of every ideal memristor. This dynamics is mentioned if it governs at least one quantity of the pair of variables voltage -current [7], [8]. It is apparent from the matrix in Fig. 2 that if the memristor voltage (current) exhibits the linear, Bernoulli, or Riccati dynamics, it can lead to the Bernoulli dynamics with respect to the current (voltage). The current (voltage) cannot exhibit the Bernoulli dynamics only if the voltage (current) is governed by the Abel differential equation of the first kind. As a result, three of the four types of dynamics with respect to the current (voltage) can lead to the Bernoulli dynamics. The Bernoulli dynamics is therefore likely to be abundantly represented in textbook examples. For instance, there is a mention in [17] of a Bernoulli memristor with R M (q) = αq 2 . According to Tab. 1, row 5, it is really of the ( v B i B) type, thus the memristor exhibits the Bernoulli dynamics even with respect to voltage and current simultaneously. But a "slight" change of the PSM to R M (q) = 1 + αq 2 would cause that the memristor would not only cease to be "Bernoulli" but its dynamics would put it completely outside the matrix of dynamics in Fig. 2.
As is obvious from Tab. 2, only memristors with R M (q) of the R(q -q 0 ) N or R(a + exp(q -q 0 )) N types or with G M () of the G( - 0 ) N or G(a + exp( - 0 )) N types, N ≠ 1, a ≠ 0, are governed by the v B/ i B Bernoulli dynamics with respect to voltage/current. Coincidentally, according to the same table, the HP memristor from [13] with the PSM of the R M (q) = R(q -q 0 ) type also belongs to the class i B. The belief that ideal memristors must obey the Bernoulli dynamics is nothing but a chimera, which is buried symbolically by the example of one of the most discussed types of memristor: The HP memristor with the Joglekar window function [13] for p = 1 is a memristor of the ( v R i A) type, thus neither its voltage nor its current exhibits the Bernoulli dynamics.