IFAC
Copyright © IFAC Nonlinear Control Systems, SI. Petersburg, Russia, 200 I
C:UC> Publications www.clsevicr.comllocate/ifac
A VARIATIONAL PRINCIPLE FOR NONLINEAR LC CIRCUITS WITH ARBITRARY INTERCONNECTION STRUCTURE 1 Luc Moreau *,2 Dirk Aeyels * • SYSTeMS, Ghent University, Technologiepark 9, 9052 Zwijnaarde, Belgium
Abstract: A variational interpretation of the dynamics of nonlinear LC circuits is given. An optimal control problem is associated to the circuit that asks for minimizing the time integral of magnetic coenergy minus electric energy subject to Kirchhoff's current law as a dynamic constraint. Via the Pontryagin maximum principle, various mathematical models are obtained for the circuit, both of a Lagrangian and a Hamiltonian nature. Copyright © 2001IFAC Keywords: nonlinear circuits, electrical networks, models, optimal control 1. INTRODUCTION
on the space of curves joining x(to) at to with x(t!) at t1 ' Equation (1) is called the Euler-Lagrange equation for the functional (2). See (Arnold, 1989) for a recent exposition of these topics.
In theoretical mechanics, it is a fundamental observation that a broad class of mechanical systems may be modeled by equations of the form
(8L) _8L8x = 0' dt 8x
~
Motivated by the success of Lagrangian mechanics, there have been several attempts to develop a similar theory for electric circuits; see, e.g., (Crandall, 1968; Chua and McPherson, 1974; Szatkowski, 1979). The analogy between LC circuits and mechanical mass-spring systems suggests magnetic coenergy minus electric energy as Lagrangian or, in a dual approach, electric coenergy minus magnetic energy, although mixed formulations have also been studied (Chua and McPherson, 1974; Szatkowski, 1979). Usually, these Lagrangians are introduced as a function of capacitor charges and inductor currents or inductor fluxes and capacitor voltages, but these variables are not related by simple differentiation. Therefore a central issue in formulating EulerLagrange equations for LC circuits is the selection of generalized coordinates and velocities in terms of which these Lagrangians may be re-expressed. For a considerably broad class of electric circuits, Chua and McPherson (1974) consider inductor currents or capacitor voltages as generalized velocities and their integrals as generalized coordinates.
(1)
where L is a function of x and X, called the Lagrangian, and x and x := dx / dt are respectively generalized coordinates and generalized velocities. This observation has many important consequences, including a convenient method for writing down equations of motion in curvilinear coordinate systems. From a philosophical point of view, equation (1) has a remarkable conceptual interpretation: it is the well-known first order necessary condition for a curve x to be a minimizer for the functional (t'L(x,x)dt
ito
(2)
1 This paper presents research results of the Belgian Pr
61
Finally we mention that the present study is related to the work of Jurdjevic (1997). In that reference the classical variational principle for the heavy top is interpreted as an optimal control problem on the Lie group SO(3). A system of Hamiltonian equations describing the dynamics of the heavy top is then obtained by applying the Pontryagin maximum principle on manifolds.
In this approach the generalized coordinates do not have a simple physical interpretation. Alternatively, for a limited class of circuits, Szatkowski (1979) considers capacitor charges or inductor fluxes as generalized coordinates and their derivatives as generalized velocities. An alternative approach was proposed in (K watny et al., 1982). In that reference, a generalized EulerLagrange formalism (Noble and Seweli, 1972) was used that allows to consider generalized velocities
that are not simply the derivatives of the general-
2. PRELIMINARIES
ized coordinates. This approach circumvents the
above-mentioned problems, but its implementation seems to give rise to computations that are significantly more complex than in the classical Lagrangian formalism. Although no variational interpretation is given and although the results in that reference bear little similarity with the present work, the basic idea expounded in that paper is important for the present study.
2.1 General
Throughout this subsection, U, V and W are finite-dimensional real vector spaces. The natural pairing between elements of V and its dual V· is denoted by C" .). Consider a real-valued function f : V -+ lit The differential of f at v E V is denoted by df(v). It is a linear map from V to IR or equivalently an element of V· .
We associate a variational problem to the circuit that asks for minimizing the time integral of magnetic coenergy minus electric energy subject to Kirchhoff's current law as a dynamic constraintas well as some other constraints, see below for details. We interpret the variational problem as an optimal control problem and apply the Pontryagin maximum principle (Pontryagin et al., 1965) to derive its normal Pontryagin extremals. This leads to various mathematical models for the circuit, both of a Lagrangian and a Hamiltonian nature. The main features of our approach are:
Consider a real-valued function f : V x W -+ IR: (v,w) f-t f(v,w). The differential of f(',w) : V -+ IR at v E V is denoted by dvf(v,w). The differential of f(v,') : W -+ lR at w E W is denoted by dwf(v,w). Let A be a linear map from V to W. The dual of A is denoted by A·. It is a linear map from W" to V".
(1) it is applicable to nonlinear LC circuits with arbitrary interconnection structure; (2) its implementation is not significantly more complex then in the classical Lagrangian and Hamiltonian formalism; (3) the statement of the variational interpretation does not involve non-physical inductor charges or capacitor fluxes.
2.2 Circuits
We introduce a natural and consistent notational scheme for writing down the equations of a dynamic network; its main features are that (1) it allows to assign variables (current, voltage, charge, flux) directly to the branches of a circuit-without having to number the branches first; (2) it takes full account of the natural pairing between branch currents and branch voltages.
A different line of ideas has been expounded in a series of papers by van der Schaft and coworkers (Maschke et al., 1995; van der Schaft and Maschke, 1995). See also (Bloch and Crouch, 1999). In these papers it is recognized that the dynamic equations of a nonlinear LC circuit, obtained by algebraic elimination of the branch currents and voltages, are of a Hamiltonian nature with respect to a constant Dirac structure on the vector space of capacitor charges and inductor fluxes. With our variational approach, we make contact with this line of research.
Consider the graph of a lumped circuit and let B be the collection of its branches. Consider subsets
McNcB. An N -vector is a map from N to lit The set of all N-vectors carries a natural vector space structure and is denoted by IRN. Similarly an N -covector is a map from N to IR" and the set of all N-covectors equipped with its natural vector space structure is denoted by (IR·)N. Notice that we may write RN since (R·)A' is naturally identifiable with (IRN)". For simpliCity of notation, if N = {j}, we write Rj (resp. Rj) instead of lRrj} (resp. R{j})'
We do not want to speculate on the possible applications of our results. In particular, we are aware that the variational formalism is seldom used for the routine solution of electric circuits.
62
normal Pontryagin extremals of this optimal control problem satisfy the control Hamiltonian equations
For a given N-(co)vector x, the M-(co)vector XM is defined as the restriction of the map x to the domain M. For simplicity, we write Xj instead of X{j}'
x=u,
{= (d",L)(x,u), (duL)(x, u) 3. VARlATIONAL MODELING AND OPTTIMALCONTROLTHEORY
x=u, :t (duL)(X , 1.1)) = (d",L)(x,u) ,
Let x be a curve in a finite-dimensional real vector space X and consider L : X x X -+ lR.. According to the theory of the calculus of variations, the first order necessary condition for a curve x to be a minimizer of the functional t,
(3)
to
among all curves x that join x(to) at to with x(tt} at tl is given by the Euler-Lagrange equation
:t (dzL)(X, x») = (d",L)(x, x) .
(12) (13)
which is equivalent to the Euler-Lagrange equation (4). On the other hand, if (11) is solvable for 1.1 = u(x, ~), elimination of 1.1 from the control Hamiltonian equations yields the Hamiltonian system (5),(6) with Hamiltonian 1l(x,~) = H(x,~,u(x,~)). From this modern perspective, the Legendre transformation involves two ingredients: first the introduction of a new variable ~ = (duL)(x,u) in the Euler-Lagrange equations (12) and (13) yielding the control Hamiltonian equations (9)-(11) and secondly the elimination of 1.1 leading to a canonical symplectic Hamiltonian system (5) ,(6). This point of view is advocated in (Sussmann and Willems, 1997). Notice that the first step is without loss of generality, only the second step requires a restrictive invertability assumption.
3.1 Classical variational formalism
L(x,x)dt
(10) (11)
associated to the control Hamiltonian H(x,~, 1.1) = - L( x, 1.1) + (~, 1.1). On the one hand, elimination of ~ leads to
In preparation of the variational modeling of LC circuits, it is instructive to revisit the classical problem of the calculus of variations from the modern perspective of optimal control theory. The purpose of this section is to introduce the various mathematical models that will be encountered in the next section. For simplicity of the exposition, we omit the specification of technical details.
1.
=~
(9)
We thus see that the classical theory of the calculus of variations and the modern perspective of optimal control theory lead to the same mathematical models.
(4)
~ is solvable for x = x(x,~), then by a Legendre transformation, equation (4) is converted into a canonical symplectic Hamiltonian system
IT (dzL)(x,x) =
= (d{1l)(x , ~),
(5)
{= -(d",1l)(x,~)
(6)
x
with Hamiltonian 1l given by 1l(x,~) -L(x , x(x,~)).
3.2 Generalized variational formalism
For the purpose of variational modeling of LC circuits, we are interested in more general variational problems as those given above. Let x (resp. u, v) be a curve in a finite-dimensional real vector space X (resp. U, V), let E (resp. F) be a linear map from U to X (resp. V) and L a function from X x V to lR.. Consider minimization of the functional
= (~, x(x, m
Alternatively, we may interpret the given variational problem as an optimal control problem asking for minimization of the functional
1.
l
tl
L(x,u)dt,
(7)
tl
L(x, v) dt
(14)
to
to
with
subject to the dynamic constraint
x=u
v=Fu, (8)
(15)
subject to the dynamic constraint
on a fixed time interval [to, tll with fixed terminal points x(to) and x(tt}. We apply the Pontryagin maximum principle-see, e.g. , (Pontryagin et al. , 1965) for background and terminology. The
x=Eu
(16)
on a fixed time interval [to, td with fixed terminal points x(to) and X(tl) ' The normal Pontryagin
63
To each branch we assign a current and voltage reference direction, where we choose associated reference directions 3. Let i be the B-vector of branch currents, v the /3-covector of branch voltages, q the C-vector of capacitor charges, and 4> the C-covector of inductor fluxes. The dynamics of the circuit are governed by three types of equations: the element equations, the equations arising from Kirchhoff's current law and those arising from Kirchhoff's voltage law.
extremals of this optimal control problem are given by the control Hamiltonian equations
= Eu, ~ = (dzL)(x, Fu),
;i;
F*(d ll L)(x,Fu)
= E*{.
(17) (18) (19)
associated to the control Hamiltonian H(x, {, u) = -L(x,Fu) + ({,Eu). We proceed along the lines of Section 3.1. Elimination of { yields ;i;=Eu, F*
:t (d
ll
(20)
We make the following element assumptions. Each capacitor is charge-controlled:
L)(X, FU») = E*(dzL)(x, Fu). (21)
Vj
We refer to (20) and (21) as generalized EulerLagrange equations. They are converted into a Hamiltonian model in two steps. First, introduction of a new variable 4> = (d ll L)(x,v) with v = Fu in (20),(21) yields ;i; = Eu,
F*~
(d ll L)(x,v) = 4>, v = Fu.
Secondly, if (24) is solvable for v elimination of v yields
=
;i;=Eu,
F*~ = E*(d zL)(x,v(x,4>)), v(x, 4» = Fu
with L j
We:
lRj -t IR; a smooth function.
lRc
Ll
-t IR: qc f-t We(qc) :=
W~ : 1R.c -t IR: i..c f-t W~(i.c) := L
(27) (28)
jE..c
qj
Sj(s)ds,
0
l
(33) ij
Lj(s) ds.
0
(34) With this notation, the element equations of the capacitors and inductors are
or equivalently
(30)
:
JEC
(26)
«dz1l)(x,4»,~) E Kernel (E,F)*.
(32)
Associated to the capacitors and inductors we introduce the electric energy We and magnetic coenergy W';' defined by
v(x,4»,
(29)
(31)
j E C,
(23) (24) (25)
(x,(dq,1l)(x,4>)) E Image (E,F),
j E C,
with Sj : lRj -t lRj a smooth function. Each inductor is current-controlled:
(22)
= E*(dzL)(x, v),
= Sj(qj),
= dWe(qc), = ic,
(35) (36)
= dW~(i..c), rft..c = V..c,
(37)
Vc tic
This set of equations is of a Hamiltonian nature with respect to a constant Dirac structure (Courant, 1990; Dorfman, 1993; van der Schaft and Maschke, 1995) on the vector space X x V*. We refer to the above introduction of 4> and v and subsequent elimination of v and u as a generalized
and
4>..c
(38)
respectively.
Legendre transformation. Remark 1. We may also C()nsider an alternative approach. Under appropriate invert ability assumptions, the variable u may be eliminated from the control Hamiltonian equations (17)-{19) leading to a canonical symplectic Hamiltonian system in x and { and, via a classical Legendre transformation, this may be C()nverted into classical EulerLagrange equations.
Kirchhoff's current law and Kirchhoff's voltage law may respectively be formulated as ic = Acu, i..c =A..cu,
(39)
(40)
and Acvc
+ Acv.c =
0,
(41)
where Ac and A..c are appropriate linear maps from a real vector space U to lRc respectively 1R..c characterizing the topology of the network and the chosen current reference directions. In the above formulation u E U has been introduced as a new
4. Le cmCUITS
Consider a dynamic circuit consisting of twotenninal capacitors and inductors, and let /3 be the collection of its branches. Denote by C (resp. C) the collection of all capacitor (resp. inductor) branches.
3
Associated reference directions have the following prop-
erty: the power delivered to a two-tenninal element equals (v, i) where 11 (resp. i) denotes the branch voltage (reiip.
branch current) of that element.
64
= Acu, {c = -dWe(qc), Ai:dW~(A.cu) = Acec + (.
variable. It is convenient to think of u as a vector of independent loop currents.
qC
The dynamics of the circuit are governed by (35)(41). By algebraic elimination, these equations may be reduced to a closed system of differential and algebraic equations for qC and u:
Ai:;t
(dW~(A.cu)) =
-ACdWe(qc).
(43)
(= -Ac{c(O)
Equations (42),(43) constitute a mathematical model for the electric circuit. Its solution requires the specification of initial conditions qc(O) and u(O). In a well-posed problem these initial conditions have to be compatible with the algebraic constraints embedded in (42),(43). The data qc(O) and u(O) are specified by the initial capacitor charges and branch currents. From a physical point of view, it seems natural to assume that there is a unique solution, that it is defined for all t, and that it depends only on the initial capacitor charges qc(O) and inductor currents A.cu(O). The specification of conditions under which the mathematical model (42),(43) meets these physical requirements is not the subject of the present study. Instead, the goal of the present paper is to provide an alternative method, based on variational principles, to obtain a mathematical model for the circuit. To this goal, we associate the following optimal control problem to the circuit. Consider to < tl E lR, qCO,qCl E Rc and A E U. Among all piecewise continuous controls u : [to, tll -+ U that steer qc(to) = qc 0 to qc(t d = qc 1 according to the dynamics qc
= Acu
l
udt
equations (42) and (43) may be rewritten as
= Acu, (c = -dWe(qc), AC;t (dW~(A.cu)) = Ac(c.
(45)
The variational problem introduced above is similar to the one discussed in Section 3.2. It differs from it only because of the presence of an extra integral constraint on the inputs. With respect to the various models that may be derived from it, this difference is not essential; we proceed along the lines of that section.
is minimized. More in particular we study the set of all normal Pontryagin extremals of this optimal control problem corresponding to all possible values of to, tl, qco, qCl and A. This leads to the consideration of the control Hamiltonian with abnormal multiplier equal to -1: x U
-+ lR: (qC,ec,u)
First, elimination of ~c from (48)-(50) yields the generalized Euler-Lagrange equations (56)
qc = Acu, Ai:;t
~
+ We(qc) + {{c,Acu} + «(,u)
(55)
The solution of (48)-(50) requires the specification of initial conditions qc(O), {c(O) and u(O). The data qc(O) and u(O) are specified by the initial capacitor charges and branch currents. The initial value ~c(O) is undetermined, it may be chosen arbitrarily. Although perhaps surprising at first sight, this may be understood in the light of the special structure of equations (48)-(50). It is easily verified that the qC and u components of the solution-which completely determine all the dynamic variables of the circuit-are independent of the particular choice for {c(O).
(46)
RC
(54)
Integrating the last equation, we see that this is equivalent to (48)-(50) where (is given by (51).
find that control for which the cost functional
H( : Rc x
(53)
qC
to
- W~(A.cu)
(51)
(52)
(44)
= A,
+ AcdW~(A.cu(O)).
The differential and algebraiC equations (48)-(50) constitute a mathematical model for the electric circuit, which is equivalent to (42),(43). This follows from the following considerations. With the introduction of the differential equation
while satisfying h
(49) (50)
This is a closed system of differential and algebraic equations for qc, {c and u. Its solution requires the specification of the parameter ( and initial conditions qc(O) , {c(0) and u(O). According to the constraint (50), for a well-posed problem it is necessary that
(42)
qC = Acu,
(48)
(dW~(A.cu)) = -ACdWe(qC),
(57)
which were obtained above-see (42) and (43)from the element equations and Kirchhoff's laws by algebraic elimination.
(47)
where ( E U' is a parameter covector. The associated control Hamiltonian equations are given by
~ext,
i.c
65
introduction of cP.c := yields
= A.cu E lR.c
dW~(i.c) E
Ri: with
qC = Acu., (58) Ai:rt>.c = -ACdWe{qc) , (59) cP.c = dW;'{i.c), (60) i.c = A.cu.. (61) We make an extra element assumption: each function L j (j E C) is a difIeomorphism. This assumption implies that the inductors are also fluxcontrolled: ij = rj{cPj) (j E C) with rj : Rj -+ Rj a smooth function, the inverse of Lj . Introduce the magnetic energy W m
rq,j
Wm: Ri: -+ 1R: cP.c >-t Wm{cP.c) :=
L 10
rj{s)ds
jE.c 0
(62) which is related to W;' be the Legendre transformation. Relation (60) may be inverted to
dWm{cP.c) = i.c and i.c may be eliminated from (58)-(61):
(63)
qC = Acu., Ai:q).c = -AcdWe{qC), dWm{cP.c) = A.cu.. Additional elimination of 1.1. yields
(64) (65) (66)
(qc,dWm{cP.c)) E Image (Ac,A.c), (67) (dWe{qc) , rt>.c) E Kernel (Ac, A.c)*. (68) This set of equations is of a Hamiltonian nature with respect to a constant Dirac structure on IRe x RC· It has been studied, e.g., in (van der Schart and Maschke, 1995; Bloch and Crouch, 1999). In these papers, it is obtained directly from the element equations and Kirchhofi"s laws by algebraiC elimination. The present study provides a variational interpretation for this Dirac Hamiltonian system. 5. CONCLUSION
This paper has contributed to the theory of electric circuits by proposing a variational formalism for nonlinear LC circuits with arbitrary interconnection structure. Instrumental for the present approach is the Pontryagin maximum principle, which may be seen as a generalization of the classical theory of calculus of variations. The present approach has led to a generalized Lagrangian description of LC circuits, which has been shown to be related to the generalized Hamiltonian description of (van der Schart and Maschke, 1995) by means of a generalized Legendre transformation. It is instructive to notice that, although in the optimal control literature the maximum principle is often seen in connection with Hamiltonian equations, the present study has used the maximum principle to derive models of a Lagrangian nature. This is, as far as we know, a distinctive and novel feature of the present approach.
6. REFERENCES Arnold, V. I. (1989). Mathematical Methods of Classical Mechanics. Graduate Texts in Mathematics. second ed .. Springer-Verlag. Bloch, A. M. and P. E. Crouch (1999). Representations of Dirac structures on vector spaces and nonlinear IrC circuits. In: Differential Geometry and ControL Proceedings of Symposia in Pure Mathematics. Vo!. 64, pp. 103117. American Mathematical Society. Chua, L. O. and J. D. McPherson (1974). Explicit topological formulation of Lagrangian and Hamiltonian equations for nonlinear networks. IEEE 1hms. Circuits Systems. Courant, T .J. (1990). Dirac manifolds. 1hms. Amer. Math. Soc. 319, 631-{)61. Crandall, S. H., Editor. (1968). Dynamics of mechanical and electromechanical systems. McGraw-Hill Book Company. Dorfman, 1. (1993). Dirac structures and integrability of nonlinear evolution equations. Chichester: John Wiley. Jurdjevic, V. (1997). Geometric Control Theory. Cambridge University Press. Kwatny, H. G., F. M. Massimo and L. Y. Bahar (1982). The generalized Lagrange formulation for nonlinear RLC networks. IEEE 7rans. Circuits Systems CAS-29(4), 220-233. Maschke, B. M., A. J. van der Schart and P. C. Breedveld (1995) . An intrinsic Hamiltonian formulation of the dynamics of LC-circuits. IEEE 7rans. Circuits Systems I Fund. Theory Appl. 42(2), 73-82. Noble, B. and M. J. Sewell (1972). On dual extremum principles in applied mathematics. J. Inst. Maths. Appl. 9, 123-193. Pontryagin, L. S., V. G. Boltyanskii, R. V. Gamkrelidze and E. F. Mishchenko (1965). The Mathematical Theory of Optimal Processes. Interscience Publishers. Third Printing. Sussmann, H. J. and J. C. Willems (1997). 300 years of optimal control: From the brachystochrone to the maximum principle. IEEE Control Systems 17(3), 32-44. Szatkowski, A. (1979) . Remark on ''Explicit topological formulation of Lagrangian and Hamiltonian equations for nonlinear networks" . IEEE 7rans. Circuits Systems CAS26(5) , 358-360. van der Schaft, A. and B. Maschke (1995). The Hamiltonian formulation of energy conserving physical systems with external ports. AEU-Int. J. Electron. Commun. 49{5/6),362-371.
66