0% found this document useful (0 votes)
166 views15 pages

First Order Equations from Lagrangian Method

1) A second order differential equation can be converted into a set of two first order equations by defining an additional variable known as the generalized momentum. 2) The generalized momentum is defined in terms of the Lagrangian and conjugate to the generalized coordinate. 3) This conversion results in a set of first order differential equations where the derivative quantities are expressed as functions of the fundamental variables, which is a desirable form.

Uploaded by

RizqahAdams
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views15 pages

First Order Equations from Lagrangian Method

1) A second order differential equation can be converted into a set of two first order equations by defining an additional variable known as the generalized momentum. 2) The generalized momentum is defined in terms of the Lagrangian and conjugate to the generalized coordinate. 3) This conversion results in a set of first order differential equations where the derivative quantities are expressed as functions of the fundamental variables, which is a desirable form.

Uploaded by

RizqahAdams
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

5

Obtaining First Order Equations

It was seen in the last chapter that the Lagrangian methodology yields the system equations
in the second order. The next step would be to solve the equations to obtain the course of
evolution of the system starting from any given initial condition.
It is known that differential equations are much easier to solve if they are expressed in
the first order. Especially if the solution is to be obtained through numerical methods in a
computer, it is desirable to express the equations in first order form. Standard numerical
routines like the Runge-Kutta method can then be applied to obtain the solution.

5.1 First Order Equations from the Lagrangian Method


A second order differential equation can be expressed in the form of two first order equations
by defining an additional variable. It will be convenient to define the additional variables as
the generalized momenta, given by 
  
  (5.1)

Due to the associatedness of  with


 , these new set of variables are also called con-
jugate momenta. The advantage of defining the additional variables this way is that the La-
grangian takes a simple form in the generalized momenta. Since
 

    

the Lagrangian equation    


  

            

becomes simply   



 
       (5.2)

These are first order equations.


 The desirable form of first order equations is where the
derivative quantities (
 and  ) are expressed as functions of the fundamental variables.
OBTAINING FIRST ORDER EQUATIONS 61
 
The equations for
 are obtained from (5.1) and
  those for are obtained from (5.2). In
some cases substitution of the expressions for into (5.2) would be necessary to eliminate
derivative quantities from the right hand side.

Example 5.1 Find the generalized momenta and the first order equation for the spring-pendulum
system of Example 4.4.
Solution: Recall that the Lagrangian was given by
  
    
   
                  

Here the generalized coordinates are  ! and   . Hence the generalized momenta are

     
"

and 

     
 # 

Putting the derivative quantities in the left hand side we get two first order equations as

$  (5.3)

  
% &  $  
(5.4)

The differential equations in the conjugate momenta are obtained from (5.2), with the
Rayleigh term set to zero. The first equation is obtained from

 
 
as        ('
   &      

Substituting  we get

    $     *+  '

 ) 
(5.5)

The equation in the second coordinate is obtained from




   

as   -,/.  '
    (5.6)
We thus get four first order equations (5.3), (5.4), (5.5), and (5.6).
OBTAINING FIRST ORDER EQUATIONS 62

C L2

q1 L1
q2 R
E

Figure 5.1 System pertaining to example 5.2.

Example 5.2 In the circuit in Fig.5.1,


 
       
     

     

 
   
Hence   
     # 
  
 

      
The Lagrangian equations become



      
  
 

   
  
We now define the conjugate momenta as

      " 
 

    
 
 
       
 
These provide the equations for  and  as
  
  
     
 
  
     
In terms of  and  the Lagrangian equations become
  "

  
    
       
These are the four dynamical equations in the first order.
OBTAINING FIRST ORDER EQUATIONS 63

5.2 The Hamiltonian Formalism


If we have to express the system equations finally in the first order form, why don’t we
derive them in the first order? In this section we shall show that this can be done, and the
Hamiltonian method provides the way.  
For this, instead of the Lagrangian function   , we shall use the total energy
function and denote it by . Hence
 

 
We then make use of the functional forms of and . We note that the potential is
dependent only on the generalized coordinates and not on the generalized velocities. Hence
 
   
 

 
       (5.7)

Next, we note that the kinetic energy is a homogeneous function of degree 2 in the generalized
velocities. To illustrate what this means, consider a two dimensional system, where is a
function of and   . The functional form of would be such that if we multiply a constant

 with " and  then    
 $     $
 
Functions with such property are called homogeneous function of degree 2. The kinetic en-
ergy of all the systems considered so far follow this property (the reader may check this fact).
In fact, barring a few exceptions all physical systems have kinetic energy with this functional
form. Now differentiate both sides of the equation by  , to get
 
          
 
   

Since the choice of  is arbitrary, this equation would be valid for   also. Hence
 
        
 
 

The same result would hold for a homogeneous function in more than two variables (the case
for higher dimensional systems). Thus in general we have
 
    
  

This result also goes by the name of the great mathematician Euler, called the Euler
theorem for homogeneous functions. From it, by (5.7) we have
 

     
 
OBTAINING FIRST ORDER EQUATIONS 64

With the help of this equation, can be written as


       
   
  
 
         
     (5.8)

The function in the right hand side is called the Hamiltonian function in classical mechan-
ics. We thus find that the Hamiltonian function is nothing but the total energy for systems in
which the above functional forms of and hold. Since all systems an engineer has to
deal with obey these functional forms and since total energy is a much clearer notion for an
engineer, we have preferred to begin from that premise to arrive at the Hamiltonian function.

In the Hamiltonian formalism, the fundamental variables are  ,  and . It is therefore
necessary to express the function in terms of the generalized positions,  momenta and time.
Since in our earlier discussions we have expressed as a function of  , it will be necessary to
substitute  in terms of  . This can be easily obtained by using the definition of generalized
momenta as (5.1).
After     is obtained, the equations of motion in terms of can be obtained by
taking the differential of as
  
  
         (5.9)
 
 
Since is a function of  ,   and , using (5.8) we can also write as

     


     
  
 
        
 
  


   
          



         

The second term is zero because of (5.1). Hence


 
     
 
    
 
By (5.2), we have   

 

     
Substituting, we get
   

     

 
 
    
    (5.10)

Comparing (5.9) and (5.10) we have the relations



  
  (5.11)
 
   
    (5.12)
 
 
  (5.13)
OBTAINING FIRST ORDER EQUATIONS 65

The first two equations, expressed in the first order form, are called the Hamiltonian equa-
tions of motion. These provide an easy way of deriving the first order differential equations
of any system directly. The only drawback is the existance of the dissipative term as function
of the generalized velocities which are not the fundamental
 variables in the Hamiltonian rep-
resentation. This, however, is no great deterrant since  can always be substituted in terms of
the fundamental variables by using (5.11). Note also that the equations (5.11) give basically
the same functional relationship between  and  as the equations (5.1).
It may be noted that (5.13) is not a differential equation and hence is not needed to
represent the dynamics.
It only says that if the Lagrangian does not have explicit dependence

on time (i.e., if does not appear in its functional form), then also would not be explicitly
dependent on time. This is obvious, since both are composed of the functions and .
In absence of dissipative forces the first two equations take very symmetrical form:

    (5.14)

 
   (5.15)

Such symmetry in the form of dynamical equations has prompted generations of scientists to
probe these systems in details and through this a body of knowledge has emerged. Dynamical
systems where these equations hold are called Hamiltonian systems. We shall, however, not
like to concentrate on such systems which are almost nonexistent in engineering, and will
use differential equations of the form

    (5.16)
  

  '

   
 
 (5.17)

Example 5.3 Let us take the system in the example 5.2 and derive the system equations by
the Hamiltonian method.
 
   
  
   $              " 
      
             

        
       " 

         
Hence the Hamiltonian equations are
  
     
   
 
     
    $
   
  
    
OBTAINING FIRST ORDER EQUATIONS 66
 
   
 
    

      

Note that these equations are the same as those derived in example 5.2.

1 2
L

E q1 C q2 R

Figure 5.2 The circuit pertaining to Example 5.4.

Example 5.4 The simple circuit of Fig. 5.2 was taken up in Chapter 3. If we want to obtain
the first order equations by the Hamiltonian method, we note:
 
 
      "   #    $

 
  

Therefore,
 
      
or,    
     ('
and

The Hamiltonian function can then be expressed as
 

     
     
 
   


      

In terms of this Hamiltonian function,

     
 (5.18)

 
and since   ,   cannot be evaluated. The momentum equations are:
  
       "    
   (5.19)
  
  
 
       
   
OBTAINING FIRST ORDER EQUATIONS 67
  
Since   ,   . Therefore

   "   (5.20)

Therefore (5.18), (5.19), and (5.20) are the three first order equations.

It may be noted that though the obtained equations are correct (in the sense that they
suffice in defining the time evolution), these are not the minimum set of equations required
to define the dynamics of the systems. In Example 5.3 there are three independent storage
elements, and so a minimum of three first order differential equations should suffice in defin-
ing the dynamics. In Example 5.4 there are two storage elements, and hence there should
be two independent differential equations. But the equations obtained are one more than the
minimum necessary number.
The problem lies in our assumption of the position coordinates as the charges flowing in
the loops irrespective of what constitute the elements of the loop. One possible way out is to
consider the charges flowing in the storage elements as the variables.

Example 5.5 In this example, we work out the differential equations of the system in the last
example in terms of the currents flowing through the inductor and the capacitor as shown in
Fig 5.3.

L q1 q
2

E C R

Figure 5.3 The circuit of Example 5.4 with variables redefined.

In this case
 
     "
      

  
  $   

Therefore,
 
     ('
     or,     and    

The Hamiltonian function can then be expressed as


 
    

     
OBTAINING FIRST ORDER EQUATIONS 68

In terms of this Hamiltonian function,



      (5.21)
 
Since   , in this case also   cannot be evaluated. The momentum equations are:
 
    " 
        (5.22)
  
    " 
 
          

Since   ,   . Therefore the last equation gives
 
 
     (5.23)

Substituting (5.21) and (5.23), (5.22) takes the form



    
  (5.24)

Therefore (5.24) and (5.23) are the two first order equations.

C2 q
3

L q1 q2 R 1
q1 q3 q1 q2
+ E R2
− C1
q q +q
1 2 3

Figure 5.4: The circuit pertaining to Example 5.6, with charges flowing in the storage ele-
ments chosen as the coordinates.

Example 5.6 In this example, we consider the same system as in Example 4.10, and define
the variables differently — the charges flowing in the storage elements forming the coordi-
nates. Since these branches form a tree, these variables suffice in defining the charges in all
other branches, as shown in Fig. 5.4. In this case

  
 
            )   $  ) 
  
      
          )  '

OBTAINING FIRST ORDER EQUATIONS 69

This gives
       )  '
Thus can be written as
  
  )  $ ) ' 
    
    
       . Since   )  ,
 The
 first set     
 of  Hamiltonian equations give
  and  ) are undefined, and  ) .
The second set of Hamiltonian equations give
  

$  
 
 $  
 )
   
   $ $  )  
        
 )
  $  )  '
)        
Algebraic manipulation of these three equations yield

  
 
 ) 
   
     

    )
)     
      
These three are the first order differential equations of the system.

A particular advantage of the Lagrangian-Hamiltonian formalism is that mechanical and


electrical systems are treated in the same way. That makes it particularly suitable for handling
electromechanical systems that have mechanical and electrical components. In such systems
one may come across situations where the   potential
  energy term may become dependent on
the generalized velocities, thus making     assumption invalid. In such cases one
has to be careful about the form of Lagrangian equation to use. We illustrate this with the
example of a dc motor and mechanical load system.

Example 5.7 The system under consideration is shown in Fig. 5.5. In this problem, the gen-
eralized coordinates are
: The charge flowing in the armature circuit
 : The angle of the rotor
) : The angle of the load wheel.
The electrical circuit and the mechanical part can be treated as two subsystems. These
two subsystems interact through the torque exerted by the electrical side on the mechanical
side and the back emf exerted by the mechanical side on the electrical side. These are given
by    

and   
OBTAINING FIRST ORDER EQUATIONS 70

La Ra
 


q1 I 1 , R1


k
E I2

    
q2 q3 R2
 Const.

Figure 5.5: The separately excited dc motor and mechanical load system with a flexible shaft.

 
where is a constant and is the field flux.
In the electrical subsystem, 

    
 
 

 


 


 

       
$
Thus we can write
, the Hamiltonian of the electrical subsystem in terms of  and  as
     



This gives the 1st order equations as

  

   (5.25)
 


        
  "   "     (5.26)

In the mechanical subsystem,


  
         )
 
 
    )   
  
 
 
     ) 


The generalized momenta  and ) are given by


 
    

 
OBTAINING FIRST ORDER EQUATIONS 71

 
  )
and
)    
)


The Hamiltonian function of the mechanical system can be expressed as
 



)

   )   

   
 
 

The first order equations for the mechanical subsystem are obtained as
 
      (5.27)



)    )  
 
(5.28)
)
 
 

  

  
    
  
    ) 

     )     (5.29)

     )   )    )  )
)   )    )       (5.30)

The interaction between the mechanical and electrical subsystems occur through the back emf
and the torque, which appear in equations (5.26) and (5.29) respectively. When expressed in
terms of the generalized coordinates, these become
  
 

and  
 


Substituting these into (5.26) and (5.29) we get
     
    (5.31)

  
     )  
   (5.32)

Equations (5.25),(5.27),(5.28),(5.30),(5.31),(5.32) are the final set of differential equations.

Now let us demonstrate how to obtain the state equations by the Lagrangian methodology,
without treating the electrical and mechanical subsystems separately.
The total kinetic energy is
  
    
 
      
    )


the total potential energy is

 
  
    )   
  

 
 
 
      )      
OBTAINING FIRST ORDER EQUATIONS 72

and the total Raleigh function is


  
 
      '
   )


Now notice that the potential energy has terms dependent on the generalized velocities.
This violates the assumption  
    
   
used in deriving the Lagrangian equation (4.15). Therefore in this case we have to use the
form that is derived without using this assumption. This is
   
  

            (5.33)

Using this equation, we get the second-order equations as

       

   


     ) 

   

)  

  )   ) '
In this case the expression for the generalized momenta will be

  
    

which gives
 
 $


   
)   
 )
And the first order equations are obtained from
  

       

as
       "
 

        
 
(5.34)
    )
    

   
   
  )
    (5.35)
 )
)     )  
    )   ) ' (5.36)

Series Motor: If a series motor (with field resistance and field inductance  ) supplies
the same load, no new state variable will be necessary. Since the field circuit is in series with
OBTAINING FIRST ORDER EQUATIONS 73


the armature circuit,  will be replaced by    and by 
in the state
variable equations.
However there will be major change in the torque and the emf equations as the field flux
is dependent on the field current. In this case,
      $  


and          
Thus (5.31) will be modified to
         
     
       
and (5.32) will be modified to
     
      )   
     )      
   

Shunt motor: In case of a shunt motor, the dynamics of the shunt field will have to be
considered and hence an additional generalized coordinate ( ), the flow of charge in the 
shunt field, will be included. In this case the back emf equation will be
         


and the torque equation will be


   $     "
The complete set of state variable equations can be derived in a similar manner, which we
leave for the reader.

5.3 Chapter Summary


First order equations can be obtained either by reduction of the Lagrangian equations, or by
the Hamiltonian methodology. In the first method, one defines the generalized momenta as

  
     (5.37)
 
which give the first order equations in  . Then the first order equations in  are obtained
from the equations  
 
  ('

 
 
  (5.38)

In the Hamiltonian formalism, the steps are:


 Define the elementary variables as the generalized coordinates  and the conjugate
monenta  .
OBTAINING FIRST ORDER EQUATIONS 74
 Express the kinetic energy, potential energy and the Rayleigh potential in terms of 
and  .
 Define the Hamiltonian function as 


.
 The first order equations are then obtained from



     (5.39)
  

 
       (5.40)

You might also like