Interconnection and damping assignment for implicit port-Hamiltonian systems∗

Interconnection and damping assignment for implicit port-Hamiltonian systems∗

Preprints, Preprints, 1st 1st IFAC IFAC Conference Conference on on Modelling, Modelling, Identification Identification and and Preprints, 1st IFAC Co...

457KB Sizes 95 Downloads 91 Views

Preprints, Preprints, 1st 1st IFAC IFAC Conference Conference on on Modelling, Modelling, Identification Identification and and Preprints, 1st IFAC Conference on Modelling, Identification and and Control of Nonlinear Systems Preprints, 1st IFAC Conference on Modelling, Identification Control of Nonlinear Systems Available online at www.sciencedirect.com Control of Systems June 24-26, 2015. Petersburg, Control of Nonlinear Nonlinear Systems June 24-26, 2015. Saint Saint Petersburg, Russia Russia June June 24-26, 24-26, 2015. 2015. Saint Saint Petersburg, Petersburg, Russia Russia

ScienceDirect

IFAC-PapersOnLine 48-11 (2015) 1006–1011

Interconnection and and damping damping assignment assignment Interconnection Interconnection and damping assignment for implicit port-Hamiltonian systems  for implicit port-Hamiltonian for implicit port-Hamiltonian systems systems ∗ ∗∗ Fernando n Fernando Casta˜ Casta˜ nos os ∗∗∗ Dmitry Dmitry Gromov Gromov ∗∗ ∗∗ Fernando Casta˜ n os Dmitry Gromov Fernando Casta˜ nos Dmitry Gromov ∗∗ ∗ ∗ Automatic Control Department, Cinvestav del IPN, M´ Automatic Control Department, Cinvestav del IPN, M´eexico xico D.F., D.F., ∗ ∗ Automatic Control Cinvestav M´eexico xicoDepartment, (e-mail: [email protected]) [email protected]) Automatic Control Department, Cinvestav del del IPN, IPN, M´ M´eexico xico D.F., D.F., M´ (e-mail: ∗∗ M´eexico xico (e-mail: [email protected]) [email protected]) ∗∗ Faculty of Applied Mathematics, St. Petersburg State University, St. M´ (e-mail: Faculty of Applied Mathematics, St. Petersburg State University, St. ∗∗ ∗∗ FacultyPetersburg, of Applied Applied Russia Mathematics, [email protected]) Petersburg State State University, University, St. St. (e-mail: Faculty of Mathematics, St. Petersburg Petersburg, Russia (e-mail: [email protected]) Petersburg, Petersburg, Russia Russia (e-mail: (e-mail: [email protected]) [email protected])

Abstract: Abstract: Implicit Implicit port-Hamiltonian port-Hamiltonian representations representations of of mechanical mechanical systems systems are are considered considered from from Implicit port-Hamiltonian representations of mechanical systems are considered from aAbstract: control perspective. Energy shaping is used for the purpose of stabilizing a desired equilibrium. Abstract: Implicit port-Hamiltonian representations of mechanical systems are considered from a control perspective. Energy shaping is used for the purpose of stabilizing a desired equilibrium. a control perspective. Energy shaping is used for the purpose of stabilizing a desired equilibrium. When using implicit models, the problem turns out to be a simple quadratic programming a control perspective. is usedturns for theout purpose a desiredprogramming equilibrium. When using implicit Energy models,shaping the problem to be ofa stabilizing simple quadratic When using using opposed implicit models, models, the problem problem turnsequations out to to be bethat simple quadratic programming problem to differential need be when When implicit the turns out aa simple problem (as (as opposed to the the partial partial differential equations that need to toquadratic be solved solvedprogramming when using using problemrepresentations). (as opposed opposed to to the the partial partial differential differential equations equations that that need need to to be be solved solved when when using using explicit problem (as explicit representations). explicit explicit representations). representations). © 2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Keywords: Keywords: Hamiltonian Hamiltonian Dynamics, Dynamics, Holonomic Holonomic Constraints, Constraints, Implicit Implicit Models, Models, Passivity, Passivity, Keywords: Hamiltonian Dynamics, Holonomic Constraints, Implicit Models, Pendulum, Cart-Pole Keywords: Hamiltonian Dynamics, Holonomic Constraints, Implicit Models, Passivity, Passivity, Pendulum, Cart-Pole Pendulum, Pendulum, Cart-Pole Cart-Pole 1. tion 1. INTRODUCTION INTRODUCTION tion is is to to provide provide an an elaborated elaborated approach approach to to the the control control of of 1. tion is is to to provide provide an elaborated elaborated approach to the the control control of of Hamiltonian systems in implicit form. 1. INTRODUCTION INTRODUCTION tion an approach to Hamiltonian systems in implicit form. Hamiltonian Hamiltonian systems systems in in implicit implicit form. form. The Hamiltonian formalism is used to describe the dynamThe Hamiltonian formalism is used to describe the dynam- We note note that that there there is is aa series series of of papers papers presenting presenting a a The Hamiltonian formalism is used the dynamics aa wide of mechanical The used to to describe describe the (Arnold dynam- We We note note that there there isdescription a series series of ofand papers presenting a ics of ofHamiltonian wide class class formalism of systems systemsisincluding including mechanical (Arnold unified approach to the analysis of implicit We that is a papers presenting a unified approach to the description and analysis of implicit ics of a wide class of systems including mechanical (Arnold et van Schaft and 1994), electriics of a 2006; wide class of systems mechanical approach to the description and analysis of implicit et al., al., 2006; van der der Schaft including and Maschke, Maschke, 1994),(Arnold electri- unified Hamiltonian systems on the base of (generalized) Dirac unified approach to the description and analysis of implicit Hamiltonian systems on the base of (generalized) Dirac et al., 2006; der Schaft and 1994), cal (Maschke et Bernstein and 1989; et 2006; van van der1995; Schaft and Maschke, Maschke, 1994), electrielectrisystems on the of (generalized) Dirac cal al., (Maschke et al., al., 1995; Bernstein and Liberman, Liberman, 1989; Hamiltonian structures, e.g., e.g., (van der der Schaft, 1998; Dalsmo and van van der Hamiltonian systems onSchaft, the base base of Dalsmo (generalized) Dirac structures, (van 1998; and der cal (Maschke et al., 1995; Bernstein and Liberman, 1989; Blankenstein, 2005; Casta˜ n os et al., 2009), and thermodycal (Maschke et al., 1995; Bernstein and Liberman, 1989; structures, e.g.,It(van (van der Schaft, 1998; Dalsmo and van der der Blankenstein, 2005; Casta˜ nos et al., 2009), and thermody- structures, Schaft, 1999). has been shown that Dirac structures e.g., der Schaft, 1998; Dalsmo and van Schaft, 1999). It has been shown that Dirac structures Blankenstein, 2005; Casta˜ n 2009), and thermody¨¨ Blankenstein, 2005; Casta˜ nos os et et al., al., 2009), andones. thermody- Schaft, namic 2005; Sandberg et al., 2011) Schaft, 1999). Itthe hasanalysis been shown shown that Dirac Dirac structures can be used for of symmetries (Blankenstein 1999). It has been that structures namic ((Ottinger, Ottinger, 2005; Sandberg et al., 2011) ones. can be used for the analysis of symmetries (Blankenstein ¨¨ namic 2005; can used for analysis of symmetries namic ((Ottinger, Ottinger, 2005; Sandberg Sandberg et et al., al., 2011) 2011) ones. ones. and be van der properties can be for the the 2001), analysisand of interconnection symmetries (Blankenstein (Blankenstein vanused der Schaft, Schaft, 2001), and interconnection properties In many cases there are constraints imposed on the system In many cases there are constraints imposed on the system and and van der Schaft, 2001), and interconnection properties (Cervera et al., 2007) of (implicit) Hamiltonian systems and van der Schaft, 2001), and interconnection properties In many cases there are constraints imposed on the system (Cervera et al., 2007) of (implicit) Hamiltonian systems coordinates. reflect the strucIn many casesThese there constraints are constraints imposed on the system coordinates. These constraints reflect the internal internal struc- (Cervera (Cervera et al., 2007) of (implicit) Hamiltonian systems (see also the book (Duindam et al., 2009) for more details). et al., 2007) of (implicit) Hamiltonian systems coordinates. These constraints reflect the internal struc(see also the book (Duindam et al., 2009) for more details). ture of the system, for instance, rigid connections between coordinates. These constraints reflect the internal structure of the system, for instance, rigid connections between (see (see also the book (Duindam et al., 2009) for more details). Recently, there has been a paper devoted to the also the book (Duindam et al., 2009) for more details). ture of for rigid connections between there has been a paper devoted to the control control the elements. From geometrical viewpoint, ture of the the system, system, for instance, instance, rigid connections between Recently, the system’s system’s elements. From the the geometrical viewpoint, Recently, there has to the of (discretized) implicit Recently, there infinite-dimensional has been been aa paper paper devoted devoted toHamiltonian the control control the system’s elements. From the geometrical viewpoint, of (discretized) infinite-dimensional implicit Hamiltonian action of these constraints results in restricting the the system’s elements. From the geometrical viewpoint, the action of these constraints results in restricting the systems, of (discretized) infinite-dimensional implicit Hamiltonian (Macchelli, 2014). However, the authors feel that of (discretized) infinite-dimensional implicit Hamiltonian the action of these constraints results in restricting the systems, (Macchelli, 2014). However, the authors feel that system’s evolution to a submanifold of the state space. the action of thesetoconstraints results in restricting system’s evolution a submanifold of the state space.the systems, systems, (Macchelli, 2014). However, the authors feel that while Dirac structures offer a unified approach it is some(Macchelli, 2014). However, the authors feel that system’s while Dirac structures offer a unified approach it is somesystem’s evolution evolution to to aa submanifold submanifold of of the the state state space. space. while Dirac structures offer a unified approach it is someWhen the system is subject to the action of external forces times more advantageous to have a closer look at while Dirac structures offer a unified approach it is someWhen the system is subject to the action of external forces times more advantageous to have a closer look at the the When the is subject the action of more advantageous to have aa approach closer at it is to (energy-adjoint) port When the system system subject aato topair the of action of external external forces forces object under study. In this sense, presented times more advantageous to havethe closer look look at the the it is convenient convenient toisconsider consider pair of (energy-adjoint) port times object under study. In this sense, the approach presented it is to consider aa pair of port object under study. In this sense, the approach presented variables (u, such that is the it is convenient convenient consider pairproduct of (energy-adjoint) (energy-adjoint) this paper allows one to consider problem at hand object under study. In this sense, thethe approach presented variables (u, y) y) to such that their their product is equal equal to toport the in in this paper allows one to consider the problem at hand variables (u, such that their product is to in this this paper paper allows one to consider consider the problem problem at hand hand power system. model is to variables (u, y) y) into suchthe that their Such product is equal equal to the the at level, without aa (sometimes) unnecessary to the at power supplied supplied into the system. Such model is referred referred to in at aa practical practicalallows level, one without (sometimes) unnecessary power supplied into the system. Such model is referred to at a practical level, without a (sometimes) unnecessary as a port-Hamiltonian system (see Maschke and van der power supplied into the system. Such model is referred to generalization. at a practical level, without a (sometimes) unnecessary as a port-Hamiltonian system (see Maschke and van der generalization. as system Maschke and van der Schaft (1992) definition as stated as aa port-Hamiltonian port-Hamiltonian system (see (see Maschke vanwith der generalization. generalization. Schaft (1992) for for the the original original definition as and stated with The Schaft (1992) for the original definition as stated with The paper paper is is organized organized as as follows: follows: in in Section Section 2, 2, an an implicit implicit respect to Hamiltonian systems in explicit form). Schaft (1992) for the original definition as stated with respect to Hamiltonian systems in explicit form). The paper is organized as follows: in Section 2, an implicit representation of port-Hamiltonian systems is presented The paper is organized as follows: in Section 2, implicit respect to Hamiltonian systems in explicit form). representation of port-Hamiltonian systems isan presented respect to Hamiltonian systems in explicit form). representation of port-Hamiltonian systems is presented In general, there are two different approaches to the repand aa couple couple of of simple models are aresystems derivediswithin within the representation of simple port-Hamiltonian presented In general, there are two different approaches to the rep- and models derived the In general, are different approaches to repand aa couple couple of simple simple models are derived within the resentation of evolving on manifolds: explicit In general, there there are two two different to the the rep- and described framework. In Section 3, the energy shaping of models are derived within the resentation of systems systems evolving on approaches manifolds: the the explicit described framework. In Section 3, the energy shaping resentation of systems evolving on manifolds: the explicit described framework. In Section 3, the energy shaping representation with the dynamics having the form of an resentation of systems evolving on manifolds: the explicit approach is presented in details and a number of illusdescribed framework. In Section 3, the energy shaping representation with the dynamics having the form of an approach is presented in details and a number of illusrepresentation with dynamics having the of an is in and aa number of ordinary differential equation on the and representation with the the dynamics the form form an approach trative is Finally, Section 44 presents the approach is presented presented in details details number of illusillusordinary differential equation on having the manifold manifold andof the the trative examples examples is given. given. Finally,and Section presents the ordinary differential equation on the manifold and the trative examples is given. Finally, Section 4 presents implicit representation with the dynamics described by a ordinary differential equation on the manifold and the conclusions and the the directions for future future research. trative examples is given. Finally, Section 4 presents the the implicit representation with the dynamics described by a conclusions and directions for research. implicit representation the described by aa conclusions conclusions and and the the directions directions for for future future research. research. set usually evolving implicit representation with withequations the dynamics dynamics described by in set of of differential-algebraic differential-algebraic equations usually evolving in set of equations usually evolving in aset space Casta˜ n et for aa of differential-algebraic differential-algebraic evolving 2. a Euclidean Euclidean space (see, (see, e.g., e.g.,equations Casta˜ nos osusually et al. al. (2013) (2013) for in 2. IMPLICIT IMPLICIT PORT-HAMILTONIAN PORT-HAMILTONIAN SYSTEMS SYSTEMS arelated Euclidean space (see, e.g., Casta˜ n os et al. (2013) for discussion Hamiltonian systems). 2. IMPLICIT IMPLICIT PORT-HAMILTONIAN PORT-HAMILTONIAN SYSTEMS SYSTEMS a Euclidean space on (see,constrained e.g., Casta˜ nos et al. (2013) for aa 2. related discussion on constrained Hamiltonian systems). related discussion on constrained Hamiltonian systems). There been lot of on and related discussion systems). Mechanical systems with holonomic constraints There has has been aa on lotconstrained of research researchHamiltonian on the the analysis analysis and 2.1 Mechanical systems with holonomic constraints There has been lot on the analysis and control of (van Schaft, Ortega There been aasystems lot of of research research the 2000; analysis and 2.1 2.1 control has of explicit explicit systems (van der der on Schaft, 2000; Ortega 2.1 Mechanical Mechanical systems systems with with holonomic holonomic constraints constraints control of explicit systems (van der Schaft, 2000; Ortega et al., 2001). However, not many results on the control control of explicit systems (van der Schaft, 2000; Ortega et al., 2001). However, not many results on the control Consider a controlled mechanical system Consider a controlled mechanical system with with the the HamilHamilet al., not many on control of systems formulation have been et Hamiltonian al., 2001). 2001). However, However, notimplicit many results results on the the control 2n controlled mechanical with Hamilof Hamiltonian systems in in implicit formulation have been Consider 2n → R. Let tonian H H aa:: R R there be be system a number number of the holonomic Consider controlled mechanical system with the Hamiltonian → R. Let there a of holonomic of Hamiltonian systems in implicit formulation have been 2n presented so far. Thus, the primary goal of this contribuof Hamiltonian systems in implicit formulation have been n k 2n → tonian H :: R Rc(r) R.0,Let Let there beRaak ,number number of holonomic holonomic presented so far. Thus, the primary goal of this contribu- tonian n → constraints = c : R restricting the conH → R. there be of constraints c(r) = 0, c : R → R , restricting the conpresented k presented so so far. far. Thus, Thus, the the primary primary goal goal of of this this contribucontribu- figuration k constraintsspace c(r) of = the 0, cc system : R Rnn → →to R Ran , (n restricting the concon− k)-dimensional constraints c(r) = 0, : , restricting the figuration space of the system to an (n − k)-dimensional n figuration space of the system to an (n − k)-dimensional  n . Using the submanifold Γ of the configuration space R figuration space of the system to an (n − k)-dimensional work of the second author was supported by the research grant  The submanifold Γ of the configuration space Rnn . Using the The work of the second author was supported by the research grant  submanifold of space  The second author was by Hamiltonian formalism, the dynamics dynamics of R this.. Using systemthe is 9.50.1197.2014 from the St. St. Petersburg State University. University. Using the submanifold Γ Γformalism, of the the configuration configuration space R The work work of of the the second author was supported supported by the the research research grant grant Hamiltonian the of this system is 9.50.1197.2014 from the Petersburg State Hamiltonian formalism, formalism, the the dynamics dynamics of of this this system system is is 9.50.1197.2014 from from the the St. St. Petersburg Petersburg State State University. University. Hamiltonian 9.50.1197.2014 Copyright IFAC 1016 2405-8963 © IFAC (International Federation of Automatic Control) Copyright © 2015, IFAC 2015 2015 1016Hosting by Elsevier Ltd. All rights reserved. Copyright IFAC 2015 1016 Peer review© of International Federation of Automatic Copyright ©under IFAC responsibility 2015 1016Control. 10.1016/j.ifacol.2015.09.324

MICNON 2015 June 24-26, 2015. Saint Petersburg, Russia Fernando Castaños et al. / IFAC-PapersOnLine 48-11 (2015) 1006–1011

described by a set of differential-algebraic equations of the form (Hairer et al., 2006; Casta˜ nos et al., 2013): x˙ = J (∇H(x) + ∇c(x)λ) + gˆ(x)u (1a) 0 = c(x) (1b) y = ∇H  (x)ˆ g (x) ,



 

MΓ = {x = (r, p) ∈ Rn × R∗n |ci (x) = 0,

Gi (x) = 0, i = 1, . . . , k} . Assumption 1. The following holds: i) The constraints are regular, i.e.,   dim span dci (r) r∈Γ = k ,

(1c)

with r ∈ Rn where the state is given by x = r p ∗n and p ∈ R the positions and momenta, respectively, ∂c ∇c(x) = (x) ∂x is the transposed Jacobian of the vector-valued function c(x), λ ∈ Rk is the vector of implicit variables that enforce the holonomic constraints, (u, y) ∈ R∗m × Rm are the conjugated external port variables, and   is a (2n × m)-matrix such that gˆ(x) = 0[m×n] g  (x) rank gˆ(x) = m for all x ∈ R2n . The [2n × 2n]-matrix J is the one associated to the canonical symplectic form,   0n In . J= −In 0n Here and forth all functions are assumed to be smooth enough and the gradient is assumed to be a column vector. Equations (1) correspond to a port-Hamiltonian system (van der Schaft, 2000; Dalsmo and van der Schaft, 1999) ˜ with an augmented Hamiltonian function H(x) = H(x) + c(x)λ (see Arnold et al. (2006, p. 48) for a more general treatment). From the geometrical viewpoint, (1) describe the system evolution on the cotangent bundle of Rn , denoted T ∗ Rn . The vector field X ∈ T (T ∗ Rn ) can be written as X = DH + Dλ λ + Dg u (2a) 0=c (2b) y = Dg (H) , (2c) where, with Einstein’s summation convention implied, ∂H ∂ ∂H ∂ − i DH = ∂pi ∂ri ∂r ∂pi is the Hamiltonian vector field, ∂cj ∂ D λ λ = − i λj ∂r ∂pi is the vector field of the internal (constraint) forces, and ∂ Dg u = gij uj ∂pi is the control vector field. Note that Dλ and Dg are the independent vector fields: Dλ =  tuples of linearly    Dλ 1 , . . . , Dλ k , and Dg = Dg 1 , . . . , Dg m . Thus, for instance, the application of  Dλ to a smooth function  f (x) yields a vector Dλ f (x) = Dλ 1 f (x), . . . , Dλ k f (x) .

Equation (1b) constrains the configuration space of (1). We wish to assure that these constraints are preserved under the system dynamics. To do so we require X to be tangential to Γ, i.e., X(ci ) = 0 for any i = 1, . . . , k. This yields the so-called hidden constraints, ∂H(x) ∂ci (x) Gi (x) = X(ci ) = =0. (3) ∂pj ∂rj Now, considering T ∗ Rn as a state space manifold, we say that (1) evolves on a submanifold MΓ ⊂ T ∗ Rn ,

1007

where dci (r) ∈ T ∗ Rn are the differentials of ci (r) interpreted as the elements of the cotangent vector bundle T ∗ Rn . Note that the manifold Γ is an integral manifold of the distribution generated by dci , i.e.,    T Γ = ker span dci , i = 1, . . . , k ii) The initial conditions belong to MΓ , i.e., x(0) = (r(0), p(0)) ∈ MΓ . iii) The energy is separable and positive definite w.r.t. p, i.e., 1 H(x) = P (r) + K(p) , K(p) = p M −1 p , M > 0 , 2 where P and K are the potential and kinetic energy, respectively. Assumptions i) and iii) guarantee that MΓ is a proper subbundle of T ∗ Rn . Indeed, for any r ∈ Γ, the hidden constraints define a linear subspace of codimension k, which is interpreted as the cotangent subspace to Γ at x. Item i) and strict convexity in iii) ensure that the λi exist and are uniquely defined. More precisely, applying the vector field to the hidden constraints yields the condition 2 X(G) = DH (c) + Dλ DH (c)λ + Dg DH (c)u = 0 , (4) which implicitly defines λ as a function of x and u. Notice that the (k × k)-matrix defined by   ∂H ∂c ∂ 2 H ∂ca ∂cb = − Dλ DH (c) = Dλ (G) = Dλ ∂pi ∂ri ∂pi ∂pj ∂ri ∂rj (5) is negative definite as follows from Assumptions i) and iii) and hence, invertible. This ensures the well-posedness of the problem. Assumption ii) guarantees that there are no jumps in the system’s trajectories. Finally, separability of the Hamiltonian in item iii) is, from a computational point of view, one of the main advantages of the implicit modeling framework (see, e.g., Casta˜ nos et al. (2015)). Note that the hidden constraints (3) imply that the Hamiltonian is invariant under the action of the vector field of constraint forces, i.e., Dλ (H) = 0 . This is equivalent to saying that the internal forces do not produce work and hence do not alter the total energy of the system. Furthermore, the vector field Dλ is also tangential to the submanifold Γ, i.e., Dλ (c) = 0 . (6) To get more insight into the nature of the vector field of internal forces we recall that the cotangent bundle T ∗ Rn is endowed with the canonical symplectic form ω = dri ∧ dpi . The symplectic form defines a canonical

1017

MICNON 2015 1008 Fernando Castaños et al. / IFAC-PapersOnLine 48-11 (2015) 1006–1011 June 24-26, 2015. Saint Petersburg, Russia

isomorphism between the tangent and cotangent spaces: Ω : X → ω(X, ·). It can be easily seen that the vector fields Dλi are isomorphic to the covector fields dci . Now we can establish a relationship between two seemingly unrelated conditions: fulfillment of hidden constraints, X(ci ) = 0, and the invariance of the Hamiltonian H under Dλ , Dλ (H) = 0. First we note that, since ci depend only on r, we can write X(ci ) = DH (ci ). Then we have the following: DH (ci ) = dci (DH ) = ω(DH , Ω−1 (dci )) = ω(DH , Dλ i ) = dH(Dλ i ) = Dλ i (H) = 0 . Now we will show that the passivity property which is central for port-Hamiltonian systems can be readily extended to the case of the constrained dynamics (1). Proposition 2. Consider the restricted state-space MΓ . System (1) is passive whenever H|MΓ , the restriction of H to MΓ , is bounded from below. Proof: Taking the derivative of H gives ∂H H˙ = X(H) = Dg (H)u = gij uj = y j uj . ∂pi This equation, together with the lower bound on H, implies passivity.  Finally, we give a condition for a constrained system to be fully actuated. Definition 3. We say that (1) is fully actuated whenever   0n span = span {Dλ } ⊕ span {Dg } In

for all x ∈ MΓ . We say that (1) is underactuated if it is not fully actuated. 2.2 A simple actuated pendulum

Consider a simple pendulum with mass m1 held by an ideal massless bar of length l. Let r = (rx ry ) and respectively. p = (px py ) be the position and momenta,   The constraint is given by c1 (x) = 12 r2 − l2 = 0, while the energy takes the form 1 p2 + m1 g¯ · ry H(x) = 2m1 with g¯ the acceleration due to gravity. Suppose that a torque u1 is applied to the pendulum axis. The implicit model then takes the form 1 r˙ = p (7a) m1       1 −ry 0 rx u1 − y λ1 + 2 (7b) p˙ = −m1 g¯ r rx 1 l rx py − ry px (7c) y1 = m1 l2 It is not difficult to verify that Assumption 1 holds, and that the system is fully actuated. Boundedness of H can be easily established. Given the positive definite form of K, it is only necessary to verify the term m1 g¯ ·ry . The term is continuous  and restricted to the compact set Γ = r ∈ R2 | r = l . By the extreme value theorem of Weierstrass, we know that the term is

bounded from below and the passivity of the pendulum is confirmed. 2.3 A pendulum on a cart Consider now an actuated cart with mass m1 , position r1 ∈ R2 and momentum p1 ∈ R2 . The cart is constrained to move along the x-axis, which can be expressed as c1 (x) = 0 with c1 (x) = r1y . Attached to the cart is a pendulum of length l, mass m2 , position r2 ∈ R2 and momentum p2 ∈ R2 . The bond between the cart and the pendulum is expressed as c2 (x) = 0 with  1 2 c2 (x) = r − r1 2 − l2 . 2 The total energy is given by 1 1 H(x) = p1 2 + p2 2 + m2 g¯ · r2y , 2m1 2m2 so the pendulum takes the form 1 p1 r˙ 1 = m1 1 r˙ 2 = p2 m2       1x 0 r − r 2x   1 0 1y 2y   0 0 1 r − r  λ1 +  u p˙ = −m2 g¯   −  2x 0 0 0 r − r 1 x  λ2 0 1 0 r 2y − r 1 y p 1 y1 = x . m1

(8)

(9)

Again, Assumption 1 holds, but the system is underactuated: o+m=2+1<4=n. The constraint r2 − r1  = l implies that r2y − r1y  ≤ l. Since r1y = 0, we have r2y  ≤ l, which defines a compact set on r2y . Weierstrass Theorem then implies that the restriction of m2 g¯ · r2y is bounded from below and the pendulum on a cart is passive as well. Note that the described framework is general enough to model most classes of mechanical systems, including manipulators and various types of robotic arms such as the acrobot, the pendubot and many more. 3. IMPLICIT ENERGY SHAPING 3.1 The matching equations Definition 4. Let Hd be a smooth mapping from R2n to R. We say that Hd is an admissible energy (Hamiltonian) function if the matching equation D Hd − D H = Dλ µ + D g u ˆ (10) −1 with DHd = Ω (dHd ) is satisfied for some µ ∈ Rk , u ˆ ∈ Rm and if Dλ (Hd ) = 0 . (11) Setting u = u ˆ + υ and substituting (10) into (1) gives the new port-Hamiltonian system x˙ = J (∇Hd (x) + ∇c(x)(λ − µ)) + gˆ(x)υ (12a) 0 = c(x) (12b)

1018

yd = ∇Hd (x)ˆ g (x)

(12c)

MICNON 2015 June 24-26, 2015. Saint Petersburg, Russia Fernando Castaños et al. / IFAC-PapersOnLine 48-11 (2015) 1006–1011

with port variables (υj , ydj ).

Proof: Set

Since λ − µ is an implicit variable, i.e. it is found as the solution to the auxiliary condition (4), the way it is denoted is immaterial and thus it is possible to rename (λ − µ) to λ without changing the system dynamics. This leads us to the following definition. Definition 5. Given the vector fields of internal forces {Dλ i }, i = 1, . . . , k, two Hamiltonian functions H1 and H2 , Hi : R2n → R, i = 1, 2, are said to be equivalent, H1 (x) ∼λ H2 (x) if   DH1 − DH2 ∈ span Dλ i , where DHi = Ω−1 (dHi ). The equivalence class of H, ˆ : R2n → RH ˆ ∼λ denoted [H]λ , is defined as [H]λ = {H H}.

We have the following proposition. ˆ satisfy (10) and (11). Then, any Proposition 6. Let H ˆ Hd ∈ [H]λ is an admissible energy function. ˆ λ conditions Proof: We need to prove that for any Hd ∈ [H] ˆ+ (10) and (11) hold. An Hd can be represented as Hd = H i ˆ κi c , i = 1, . . . , k. If H satisfies (10), then Hd satisfies (10) as well with µ ˆ = µ − κ. Furthermore, (11) is satisfied as Dλ (c) = 0.  This gives additional freedom for choosing Hd in (10). Roughly speaking, this additional freedom ‘compensates’ for the need to solve (10) in a high-dimensional setting (i.e., higher than in the explicit formulation) using the same number of controls u ˆ. Equation (11) is analogous to the one formulated for the original system. It ensures that the new Hamiltonian vector field DHd preserves the holonomic constraints ci , i.e., DHd (ci ) = 0 and that the constraint forces preserve the new energy, i.e., Dλi (Hd ) = 0 whenever x ∈ MΓ . See Sec. 2.1 for more details. Proposition 7. If Hd |MΓ is bounded from below, then the closed-loop (12) is passive and the storage function is equal to Hd . Proof: Direct computation gives ∂Hd uj = ydj vj . H˙ d = Dg (Hd )u = gij ∂pi

1009



3.2 Equilibrium stabilization Let

 ∗ r ∗ (13) ∈ MΓ x = 0 be a desired equilibrium point. It follows from standard Lyapunov theory that x∗ is stabilizable whenever Hd is admissible and x∗ is a strict minimum of Hd |MΓ , arg min Hd (x) = x∗ . (14) x∈MΓ

The problem is easily solvable in the fully actuated case. Theorem 8. Let (1) be fully actuated. Any x∗ satisfying (13) is an assignable equilibrium and can be stabilized.

1 1 Hd (x) = a r + (r − r∗ ) A(r − r∗ ) + p M −1 p , (15) 2 2 where A = A ∈ Rn×n satisfies the linear matrix inequality (LMI)  j (16) A + ∇2 ci (x∗ )ξ ∗ + ∇r c(x∗ )∇r c (x∗ ) ξ¯∗ > 0 r

for some scalars

i ∗ ξi

j

and ξ¯∗ , and with

a = −∇r ci (x∗ )ξi∗ .

(17)

Since the kinetic energy is left unchanged, we have Dλ (Hd ) = Dλ (H), so (11) is trivially satisfied. Since   0n , DHa = Hd − H ∈ span In

equation (10) is solvable on account of full actuation. Thus, the closed-loop is passive with storage function (15). To show stability, it suffices to prove (14). Next, we construct the Lagrange function L(x, ξ) = Hd (x) + ci (x)ξi with Lagrange multipliers ξi . The first-order stationarity condition gives a + A(r − r∗ ) + ∇r ci (x)ξi = 0 , M −1 p = 0 , ci (x) = 0 , which are solved by (13) and ξi = ξi∗ if we set a as in (17). The second-order sufficient condition takes the form (Berstekas, 1996, p. 68)   (18) z  A + ∇2r ci (x∗ )ξi∗ z > 0 for all z ∈ Tx∗ Γ, i.e., for all z ∈ Rn such that ∇r (ci ) (x∗ )z = 0, i = 1, . . . , k.

It remains to show that the condition (18) is satisfied whenever (16) holds. LMI (16) can be equivalently written as an inequality involving quadratic form   j  y, A + ∇2 ci (x∗ )ξ ∗ + ∇r c(x∗ )∇r c (x∗ ) ξ¯∗ y > 0 r

j

i

which must hold for all y ∈ R \ {0}. Chosing y ∈ Tx∗ we recover (18) while the converse, i.e., the existence of ξ¯∗ follows from the Finsler theorem (Bellman, 1970).  n

The LMI (16) can always be solved by setting ξi = 0, ξ¯j = 0 and choosing A any positive definite matrix. However, the resulting controller can be greatly simplified by carefully solving the LMI. Below, we give some intuition on how to choose the coefficients in equations (15) and (16). To do this we have to consider in some more detail the class of systems under study. A typical mechanical system can be modelled as a set of point masses with some constraints imposed on them. In absence of electro-magnetic field, the potential energy of such a system is described as a sum of gravitational potential energies of the respective masses and is hence a linear function of the system’s coordinates r. We consider only non-holonomic, i.e., geometrical constraints (note that the integrable kinematic constraints can be considered within the same framework). The most typical geometric constraints are

1019

• The linear constraints, i.e., the constraints of the form ai ri + b = 0, where ai , b ∈ R. These constraints

MICNON 2015 1010 Fernando Castaños et al. / IFAC-PapersOnLine 48-11 (2015) 1006–1011 June 24-26, 2015. Saint Petersburg, Russia

effectively eliminate some degreees of freedom of the system fixing the values of the respective coordinates. • The quadratic constraints, i.e., those of the form αi ri 2 + β = 0, αi , β ∈ R. These constraints state that the respective point masses must maintain fixed distances from each other. The equilibrium stabilization problem consists in finding a Hamiltonian function Hd (x) whose restriction to MΓ attains its minimum value at x = x∗ , see Eq. (13). The kinetic energy is a positive-definite quadratic function of q and hence attains its minimum at q ∗ = 0. For the potential energy there are two options: either the configuration manifold is convex, i.e., there is exists a vector ξ ∗ ∈ Rk , ξi∗ > 0 such that the weighted sum of Hessians of constraints ci (r) is positive definite, ∇2r ci (x∗ )ξi∗ > 0, or the Hamiltonian Hd is a convex function of r. The first case occurs when there are quadratic constraints imposed on the system. In this case, the Hamiltonian function can be chosen to be linear, i.e., the matrix A can be set to zero. In the second case, the existence of a global minimum is guaranteed by choosing A > 0. A detailed analysis of this issue will be presented in an extended version of this paper which will be published elsewhere. Remark 9. The controller obtained from the matching equation (10) with Hd as in (15) provides Lyapunov stability only. As usual, asymptotic stability can then be achieved by adding proper damping. For underactuated systems, the problem can be solved by searching first a set of si (x), i = 1, . . . , m + k, such that span{Ω−1 (dsi )} = span {Dλ } ⊕ span {Dg } . (19) By setting the desired Hamiltonian as Hd (x) = H(x) + f (s(x)), it is ensured that Hd is assignable for any differentiable f : Rm+k → R. Then f is chosen such that (14) holds. The described approach has a number of advantages compared to solving the equilibrium stabilization problem in local coordinates (Ortega et al., 2002; Ortega and Garc´ıaCanseco, 2004; Acosta et al., 2005). In particular, one needs to solve a simple quadratic program instead of a partial differential equation. Furthermore, the obtained control is expressed in global coordinates, hence, there are no singularities. Finally, it turns out that an implicit Hamiltonian system is easier to discretize as the Hamiltonian function written in global coordinates is separable. This fact can be used to design an effective integration scheme (Casta˜ nos et al., 2015). 3.3 The simple actuated pendulum 

Suppose we want to stabilize the point x∗ = (0 l 0 0) (the upright vertical position), which clearly satisfies (13). A solution set for the LMI (16) is m1 g¯ ¯∗ , ξ1 = 0 , A = 0 , ξ1∗ = l i.e., ∇2r c1 (x∗ ) = I2 > 0. This gives m1 g¯ = − (0 m1 g¯) a = − (0 l) · l and 1 p2 . Hd (x) = −m1 g¯ry + 2m1

The matching equation (10) takes the specific form      x 1 −ry 0 r u ˆ. (20) =− y µ+ 2 2m1 g¯ rx r l The solution is simply µ = −2m1 g¯

ry l2

and

u ˆ = 2m1 g¯rx . 

A local coordinate chart for Γ is θ → (l sin θ l cos θ) with θ ∈ (−π, π). In local coordinates, the control takes the form u ˆ = 2m1 g¯ sin θ . Since it was constructed using global coordinates, the controller does not exhibit undesirable phenomena such as unwinding (Chaturvedi et al., 2011). Moreover, u ˆ is continuous on Γ at θ = π, the point which is not covered by the coordinate chart. 3.4 The pendulum on a cart It can be verified that 1 2 r − r1 2 and s3 (x) = r1x 2 satisfy (19). Given the constraints c1 (x) = c2 (x) = 0, it is clear that the only Hamiltonian functions of interest are of the form s1 (x) = r1y ,

s2 (x) =

Hd (x) = H(x) + f (s3 (x)) = 1 1 p1 2 + p2 2 + m2 g¯ · r2y + f (r1x ) , 2m1 2m2 and that the stabilizable equilibria have the structure   r x∗ = ∗ , 0     where r∗ ∈ r∗1x 0 r∗1x −l | r∗1x ∈ R .

Condition (14) is indeed satisfied with the choice f (r1x ) = 1 1x − r∗1x )2 . The matching equation is then 2 (r   1x   1x   0 r − r 2x   1 r ∗ − r 1x µ1 1 r 1y − r 2y     0 0   +  u ˆ . (21)   =  2x 0 0 0 r − r 1x  µ 2 2 1 0 0 0 r y −r y

The solution is simply µ1 = µ2 = 0 and u ˆ = r∗1x − r1x . 4. CONCLUSIONS

In global coordinates, the defining functions (the Hamiltonian and the constraints) of many mechanical systems of interest are quadratic and convex. This representation proves to be useful in an energy shaping scenario, where the control problem turns out to be a simple quadratic programming problem instead of the usual problem of finding the solution of a partial differential equation. Another advantage of computing the closed-loop energy (or Lyapunov) function is that the resulting controller does not exhibit undesired phenomena such as winding. It is worth noting, however, that once the closed-loop Hamiltonian has been obtained, computing the control is simpler in local coordinates. Thus, the results of Casta˜ nos et al. (2013) can be used in a mixed approach in which Hd

1020

MICNON 2015 June 24-26, 2015. Saint Petersburg, Russia Fernando Castaños et al. / IFAC-PapersOnLine 48-11 (2015) 1006–1011

or V are computed in global coordinates and the actual control is computed using an explicit representation. ACKNOWLEDGEMENTS The authors are grateful to the anonymous reviewers for their valuable comments. REFERENCES Acosta, J.A., Ortega, R., Astolfi, A., and Mahindrakar, A.D. (2005). Interconnection and damping assignment passivity-based control of mechanical systems with underactuation degree one. IEEE Trans. Autom. Control, 50, 1936 – 1955. Arnold, V.I., Kozlov, V.V., and Neishtadt, A.I. (2006). Mathematical Aspects of Classical and Celestial Mechanics. Springer-Verlag. 3rd Edition. Bellman, R. (1970). Introduction to matrix analysis. Second edition. McGraw-Hill Book Co., New YorkD¨ usseldorf-London. Bernstein, G.M. and Liberman, M.A. (1989). A method for obtaining a canonical Hamiltonian for nonlinear LC circuits. IEEE Trans. Circuits Syst., 36, 411 – 420. Berstekas, D.P. (1996). Constrained optimization and Lagrange multiplier methods. Athena Scientific, Belmont, Massachusetts. Blankenstein, G. (2005). Geometric modeling of nonlinear RLC circuits. IEEE Trans. Circuits Syst. I, 52, 396 – 404. Blankenstein, G. and van der Schaft, A.J. (2001). Symmetry and reduction in implicit generalized Hamiltonian systems. Reports on mathematical physics, 47(1), 57– 100. Casta˜ nos, F., Gromov, D., Hayward, V., and Michalska, H. (2013). Implicit and explicit representations of continuous-time port-Hamiltonian systems. Systems and Control Lett., 62, 324 – 330. Casta˜ nos, F., Jayawardhana, B., Ortega, R., and Garc´ıaCanseco, E. (2009). Proportional plus integral control for set-point regulation of a class of nonlinear RLC circuits. Circuits Syst. Signal Process., 28, 609 – 623. Casta˜ nos, F., Michalska, H., Gromov, D., and Hayward, V. (2015). Discrete-time models for implicit portHamiltonian systems. arXiv:1501.05097 [cs.SY]. Cervera, J., van der Schaft, A.J., and Ba˜ nos, A. (2007). Interconnection of port-Hamiltonian systems and composition of Dirac structures. Automatica, 43(2), 212– 225. Chaturvedi, N.A., Sanyal, A.K., and McClarmoch, N.H. (2011). Rigid-body attitude control. IEEE Control Syst. Mag., 31, 30 – 51. Dalsmo, M. and van der Schaft, A.J. (1999). On representations and integrability of mathematical structures in energy-conserving physical systems. SIAM J. Control Optim., 37, 54 – 91. Duindam, V., Macchelli, A., Stramigioli, S., and Bruyninckx, H. (eds.) (2009). Modeling and Control of Complex Physical Systems: The Port-Hamiltonian Approach. Springer Science & Business Media. Hairer, E., Lubich, C., and Wanner, G. (2006). Geometric numerical integration: structure-preserving algorithms for ordinary differential equations. Springer-Verlag.

1011

Macchelli, A. (2014). Passivity-based control of implicit port-Hamiltonian systems. SIAM Journal on Control and Optimization, 52(4), 2422–2448. Maschke, B., van der Schaft, A.J., and Breedveld, P.C. (1995). An intrinsic Hamiltonian formulation of the dynamics of LC-circuits. IEEE Trans. Circuits Syst. I, 42, 73 – 82. Maschke, B. and van der Schaft, A. (1992). Port-controlled hamiltonian systems: Modelling origins and systemtheoretic properties. In Proc. 2nd IFAC NOLCOS, 282– 288. Ortega, R. and Garc´ıa-Canseco, E. (2004). Interconnection and damping assignment passivity-based control: A survey. European Journal of Control, 10, 432–450. Ortega, R., Spong, M.W., G´omez-Estern, F., and Blankenstein, G. (2002). Stabilization of a class of underactuated mechanical systems via interconnection and damping assignment. IEEE Trans. Autom. Control, 47, 1218 – 1233. Ortega, R., van der Schaft, A.J., Mareels, I., and Maschke, B. (2001). Putting energy back in control. IEEE Control Syst. Mag., 18–33. ¨ Ottinger, H.C. (2005). Beyond Equilibrium Thermodynamics. Wiley. Sandberg, H., Delvenne, J., and Doyle, J.C. (2011). On lossless approximations, the fluctuation-dissipation theorem, and limitations of measurements. Automatic Control, IEEE Transactions on, 56(2), 293–308. van der Schaft, A.J. (1998). Implicit Hamiltonian systems with symmetry. Reports on mathematical physics, 41(2), 203–221. van der Schaft, A.J. (2000). L2 -Gain and Passivity Techniques in Nonlinear Control. Springer-Verlag, London. van der Schaft, A.J. and Maschke, B. (1994). On the Hamiltonian formulation of nonholonomic mechanical systems. Rep. on Mathematical Physics, 34, 225 – 233.

1021