Utilization of Euler-Lagrange Equations in Circuits with Memory Elements

It is well known that the equation of motion of a system can be set up using the Lagrangian and the dissipation function, which describe the conservative and dissipative parts of the system. However, this procedure, consisting in a systematic differentiation of the above state functions, cannot be used for circuits containing simultaneously conventional nonlinear elements such as the resistor, capacitor, and inductor, and their nonlinear memory versions – the memristor, memcapacitor, and meminductor. The paper provides a general solution to this problem and demonstrates it on the example of modeling Josephson’s junction.


Introduction
The memristor (memory resistor, MR), memcapacitor (memory capacitor, MC), and meminductor (memory inductor, ML) are memory versions of the resistor, capacitor, and inductor.Their ability to store the information in a nonvolatile way and, concurrently, to perform logic operations predetermine them for revolutionary applications in computer engineering.All three memory elements are linked to L. Chua: In 1976, he introduced the memristor as a hypothetical element into the circuit theory in [1].In 2008, he got satisfaction via the invention of a nanodevice with the memristive behavior in Hewlett Packard labs [2].The concept of the so-called Chua periodical table was published in 1980 [3].It shows that the classical RCL elements and also their memory versions are mere special cases of the so-called higher-order elements (HOEs).The position of each HOE in the table, which resembles the Mendeleyev periodical table of chemical elements, corresponds with the unique features of this HOE.Just as all complex structures of the physical world are compounded from atoms of the elements from Mendeleyev table, an arbitrary electrical circuit can be made up exclusively from HOEs from Chua's table.As shown in [4], [5], this fact opens the way for a new modeling approach, which can be useful in the analysis of complex phenomena in biological systems [6] and in the world of nanotechnology [7].However, a general procedure of modeling complex mem-systems via the elements from Chua's table has not been hitherto published.The current research focuses more likely on the extension of the original definition of the memristor in order to describe the complex properties of existing memristive devices.One illustrative example is represented by the excellent paper [8].
A popular conceptual symmetries of the R-L-C-MR elements as a small square section of Chua's table, published in [2], is frequently used to explain the memristor as the "fourth fundamental electrical element".Its extension Fig. 1.Storeyed structure of a subset of fundamental elements [7].The notation is specified in Sec. 2.
for the MC and ML elements, called the storeyed structure [7], hereinafter abbreviated to StS, is shown in Fig. 1.
The StS shows that above the storey of classical R-L-C elements there is a storey of their memory versions MR-ML-MC.Each of the sextuplet of fundamental elements in Fig. 1 introduces an unambiguous linkage, the socalled constitutive relation (CR), between the constitutive variables, which are time-domain integrals of the corresponding orders of terminal voltage v and flowing current i.The element is regarded as nonlinear if its constitutive relation is also nonlinear.
Procedures of the analysis of circuits containing not only the classical R-L-C but also MR-ML-MC elements were published in [9], [10].The papers [11], [12] are devoted to the problem of setting up equations of motion for such circuits in the form of the Euler-Lagrange equations (hereinafter abbreviated to Lagrange equations), with the methods of loop currents or nodal analysis being made use of.It turns out that the extension of these methods to circuits with memory elements is not trivial.Troubles may appear, for example, if nonlinear elements from both storeys of the StS exist within one loop or between two nodes.In such cases, the equation cannot be derived in a classical way, i.e. via a systematic differentiation of the state functions.
The present work deals with the problem given above.The procedure is as follows: Section 2 describes relationships between the constitutive relations of the elements and their state functions, the latter being the quantities content, energy, action, and time-domain integral of action (denoted in the paper as the evolution) for the R-L-C-MR-ML-MC elements.Section 3 summarizes the results from [11] that concern the extension of the method of the Lagrange equations to circuits compounded exclusively from the memelements, and it presents this extension against the background of novel knowledge about the duality between classical and memory elements [13].Section 4 illustrates problems with setting up the Lagrange equations of a circuit that contains an arbitrary mix of nonlinear classical elements and nonlinear memory elements.It also provides a general solution to and a demonstration of a concrete application.

Relationship between CR and State Function
Let us denote the HOEs by the nonpositive integer indices  and , which are used for their identification in Chua's table.The CR of the (, ) element is an unambiguous relation between the quantities v () and i () , where are the - th -and - th -order time-domain integrals of voltage and current.An annotated survey of the quantities represented by these integrals is shown in Tab. 1.
Figure 2 illustrates the connection between the CR of the (, ) element and its state functions When integrating from zero, the state functions correspond to the areas according to Fig. 2, and the following equality holds: The pair of state functions in (3) contains one function and one cofunction.These two complementary entities have been used since the nineteenth century [14].The current form was introduced by Cherry [15] for the energy and Millar [16] for the content.The content was then extended to memristive elements [17], [18].A survey of the state functions and cofunctions (the latter designated by an asterisk) for the sextuplet of fundamental elements from Fig. 1 is given in Tab. 1.
The state function and cofunction provide additive properties, namely the sum of their values for individual subsystems forms the resulting value for the complete system.The value of the state function associated with the state of the system depends exclusively on this state and not on the way the system attained the state.( Tab. 1. Constitutive variables and state functions of six fundamental elements.The symbols v, i, , and q present voltage, current, flux, and charge,  and  are time-domain integrals of the flux and charge, T and V are the kinetic and potential energy, X and Y are the kinetic and the potential evolution, * denotes the corresponding cofunction.
Energies are well-known state functions.For example, the "potential" energy stored in the electrostatic field of the nonlinear capacitor with the CR of the type It follows from the integral character of the state functions and cofunctions (2) that Formulae ( 5) can be read such that the instantaneous values of the constitutive variables are equal to the gradients of the state functions or cofunctions at the operating point.The constitutive relation as a relation ) ) can be also written in the form where are the differential (small-signal) parameters of the element representing nonlinearity, and m , = 1/n , .A concrete form of these parameters for six fundamental elements is shown in Tab. 2.
( , ) Tab. 2. A survey of differential parameters of six fundamental elements.

Setting up Lagrange Equations
The behavior of a system containing only inductors, capacitors, and resistors (i.e.elements from the "ground floor" of the StS) is given by the Lagrange equations of motion.These equations can be obtained via a systematic differentiation of the state function of the circuit, namely the Lagrange and the dissipation function.The procedure is as follows: The Lagrange function L(•) or the cofunction is derived from the reactance part of the circuit.The charges and fluxes in (8) generates the vector equations of motion, where v ext and i ext are vectors of the voltage and current excitations.If the method of loop currents or nodal analysis is used, then (9) are equations of KVL for loops or equations of KCL for nodes.The first, second, and third left-side terms of ( 9) represent the sums of voltage or current contributions from the inductors, capacitors, and resistors in the loop or in the branches leading to the corresponding node.
The method will be illustrated on the well-known Chua circuit in Fig. 3.In the version (a), the circuit is compounded exclusively from the elements from the ground floor of the StS, namely from one linear inductor, two linear capacitors, one linear resistor, and the so-called Chua diode, which is an active nonlinear resistor with the constitutive relation [13]  with a and b being properly chosen real numbers.
The Lagrange cofunction (8) has the form where  A and  B are the time-domain integrals of voltages of the nodes A and B against the ground, and  = L -1 is the

L MR
inverse inductance.The cocontent of Chua's diode is the integral of the CR (10) with respect to the voltage v = d/dt.The procedure (9) leads to the set of equations of motion where G = R -1 is the conductance of the resistor R.
For circuits compounded only from memristors, memcapacitors, and meminductors, i.e. elements occupying the first floor of the StS, Jeltsema suggests the following procedure [11]: The Lagrange function is derived from the reactance part of the circuit.The timedomain integrals of charges and fluxes in (13) generates the vector equations of motion, where  ext and q ext are the time-domain integrals of the voltage and current excitations v ext and i ext .Equations ( 14) represent Kirchhoff's flux law (KFLL) for loops and Kirchhoff's charge law (KCHL) for nodes [13], denoted in [11] as iKVL and iKCL.The first, second, and third left-side terms of ( 14) represent the sums of flux or charge contributions from the meminductors, memcapacitors, and memresistors in the loop or in the branches leading to the corresponding node.
The extension ( 14) of the Lagrange equations by Jeltsema is readily comprehensible from the point of view of the principle of duality [13].According to this principle, the pairs R-MR, C-MC and L-ML are dual to each other if their constitutive variables are coupled by identical constitutive relations.Then the circuit variables  and  of the circuit containing only memelements (whose special cases are the classical memoryless linear elements) conform to the same equations of motion as the variables  and q of the circuit in which the memelements were replaced by dual nonlinear elements.The formal conformity of the equations of motion ( 9) and ( 14) is an expression of the fact that the dynamics of the circuit with memoryless R, L, C elements is identical to the dynamics of its dual circuit containing MR, MC, and ML elements.
The circuits in Figs 3(a) and 3(b) are dual to each other if the current and voltage of Chua's diode are linked by the same constitutive relation i = i CHUA (v) as the charge and flux of Chua's memristor q = q CHUA (), i.e. i CHUA (•) ≡ q CHUA (•).The linear elements C 1 , C 2 , R, and L can be regarded as the memelements MC 1 , MC 2 , MR, and ML with linear constitutive relations.The Lagrange cofunction (13) is a difference between the potential coevolution of the capacitors and the kinetic evolution of the (mem)inductor, and it has the form  A and  B are the second-order time-domain integrals of voltages of the nodes A and B against the ground.The coaction of Chua's memristor is the integral of the constitutive relation q CHUA (•) with respect to the flux  = d/dt.
The procedure (14) leads to the set of equations of motion Equation ( 16) for  and Equation ( 12) for  are formally identical.This is in conformity with the duality of circuits in Figs 3(a) and 3(b).

Problem and Its Solution
Hitherto published methods of drawing up the Lagrange equations via state functions are applicable only to circuits that are exclusively composed of elements of one kind: they must belong either to the ground ("classical") or to the first ("memory") floor of the StS.Drawing-up the equations of motion is governed by the well-known methodology (9) for the first case and by the extension by Jeltsema (14) for the second case.Linear resistors, capacitors, and inductors can be considered as memelements with linear constitutive relations.That is why the linear element from an arbitrary floor of the StS can be included in either the first or the second group as necessary.
It follows from the above that the procedure of selecting either the method ( 9) or ( 14) cannot be used for circuits that contain simultaneously nonlinear classical and nonlinear memory elements.Nevertheless, the general solution is easy, as described below.
Consider that we know the (co)functions L(•), C(•) from ( 9) and L M (•), A(•) from ( 14), which describe the parts of the circuit containing separately the classical and the memory elements.Then the voltage or current contributions of the classical elements in the loops or nodes can be obtained via (9).Subsequently we add the contributions of the memelements, which can be derived via differentiating the flux or charge contributions according to (14).The final set of KVL equations for the loop currents can be then written as follows: The first/second term represents the voltage contributions from the memelements/classical elements.The set of KCL equations for the nodal voltages is in the form The first/second term represents the current contributions from the memelements/classical elements.
Let us apply the procedure (18) to the circuit in Fig. 4, consisting of all six nonlinear elements from the StS in Fig. 1.According to (8), the Lagrange cofunction L * (•) of the memoryless part of the circuit is The cocontent of the nonlinear resistor is given by the formula The functions with the indices L, C, and R in ( 19) and (20) are the constitutive relations of the respective elements.The Lagrange cofunction (13) L M * (•) of the memory part of the circuit is in the form The functions with the indices MC and ML are the constitutive relations of the memcapacitor and meminductor.The memristive coaction is The function with the suffix MR is the constitutive relation of the memristor.
Applying the procedure (18) to the functions (19)-( 22) yields the KCL equations of the circuit where C(•) is a voltage-dependent capacity, and i L (•) and i R (•) are generally nonlinear constitutive relations of the inductor and resistor.
The model of Josephson's junction is shown in Fig. 5 [13].The C and R elements are linear, and the nonlinear constitutive relations of the inductor and memristor are as follows: where I 0 , k, G 0 , and k 0 are constants.
Since the circuit in Fig. 5 contains no memcapacitor and no meminductor, the Lagrange cofunction L M * (•) according to (13) does not exist.The equation of motion (18) can be simplified to the form where are state functions as integrals of the constitutive relations (24) and linear constitutive relations of the resistor R and capacitor C. The procedure (25) leads to the equation of motion, which can, with respect to the equality  = d/dt, be written as

L MR
Note that this is in agreement with the results published in [13].

Conclusions
The well-known classical form of the Lagrange equation (9), which starts from the knowledge of the state functions of reactive elements and the content of dissipative elements, cannot be applied to circuits containing memristors (MR), memcapacitors (MC), and meminductors (ML).This paper provides a generalization in the form of the procedure (17) or (18), which facilitates setting up the KVL-or KCL-type Lagrange equations of a circuit containing an arbitrary combination of classical R-L-C elements and their memory versions MR-ML-MC.The equations can be set up based on the knowledge of the constitutive relations of the individual elements and the information about their interconnection.
It follows from the analysis of the procedures ( 9) and ( 14) that, if the circuit contains only elements from one floor of the storeyed structure in Fig. 1, the method of the loop or node analysis can lead to a set of nonlinear differential equations of order not higher than 2. If the elements belong to both floors, the order of the resulting equation cannot be higher than 3.
The method deals with the way of drawing up the Lagrange equations of the circuit based on the knowledge of the potential functions of the circuit elements.It does not address the question of whether the variational principle, which was originally associated with the idea of the Lagrangian of the system, is or is not fulfilled.

Fig. 2 .
Fig. 2. Geometric meaning of state functions as areasbelonging to the CR of the element.P denotes the current state of the element.
(8) associated in the vector variables.For details about the variables V, V*, T, and T* see Tab. 1.The Lagrange function or cofunction(8)has the physical measure of energy, i.e. its unit is Joule [J].The function content C(•) or the cofunction cocontent C * (•) (see Tab. 1) is determined from the part of the circuit that includes the dissipative elements.The procedure