Constraints and Degrees of Freedom 1
2.003J/1.053J Dynamics and Control I, Spring 2007
Professor Thomas Peacock
4/9/2007
Lecture 15
Lagrangian Dynamics: Derivations of Lagranges
Equations
Constraints and Degrees of Freedom
Constraints can be prescribed motion
Figure 1: Two masses, m1 and m2 connected by a spring and dashpot in parallel.
Figure by MIT OCW.
2 degrees of freedom
If we prescribe the motion of m1 , the system will have only 1 degree of freedom,
only x2 . For example,
x1 (t) = x0 cos t
x1 = x1 (t) is a constraint. The constraint implies that x1 = 0. The admissible
variation is zero because position of x1 is determined.
For this system, the equation of motion (use Linear Momentum Principle) is
mx2 = k(x2 x1 (t)) c(x2 x1 (t))
mx2 + cx2 + kx2 = cx1 (t) + kx1 (t)
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Lagranges Equations 2
cx1 (t) + kx1 (t): known forcing term
dierential equation for x2 (t): ODE, second order, inhomogeneous
Lagranges Equations
For a system of n particles with ideal constraints
Linear Momentum
pi = f ext
i
+ f constraint
i
(1)
N
(f ext
i
+ f constraint
i
pi ) = 0 (2)
i=1
f constraint
i
=0
i=1
DAlemberts Principle
N
(f ext
i
pi ) ri = 0 (3)
i=1
Choose pi = 0 at equilibrium. We have the principle of virtual work.
Hamiltons Principle
Now pi = mi ri , so we can write:
N
(mi r i f ext
i
) r i = 0 (4)
i=1
N
W = f ext
i
r i , (5)
i=1
which is the virtual work of all active forces, conservative and nonconservative.
N N
d
mi r i r i = mi (r r i ) r i r i (6)
i=1 i=1
dt i
d
(6) is obtained by using dt (r r) = rr + rr
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Lagranges Equations 3
ri r i can be rewritten as 21 (r r) by using (r r) = 2rr.
Substituting this in (6), we can write:
N N N
d 1
mi r i r i = mi (r i r i ) m(r i r i ) (7)
i=1 i=1
dt i=1
2
The second term on the right is a kinetic energy term.
N
1
m(r i r i ) = (Kinetic Energy) = T
i=1
2
Now we rewrite (4) as:
N
N
mi r i ri f ext
i
ri = 0 (8)
i=1 i=1
Substitute (5) and (7 into (8) to obtain:
N
d
mi (r r i ) T W = 0
i=1
dt i
Rearrange to give
N
d
T + W = mi (r ri ) (9)
i=1
dt i
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Lagranges Equations 4
Integrate (9) between two denite states in time r(t1 ) and r(t2 )
Figure 2: Between t1 and t2 , there are admissible variations x and y. We are
integrating over theoretically admissible states between t1 and t2 that satisfy
all constraints. Figure by MIT OCW.
t2 N
t2
d
(W + T )dt = mi (r i ri )dt (10)
t1 t1 i=1 dt
N
t2
= mi r i ri
(11)
i=1 t1
t2
N
The right hand side, i=1 mi r i r i = 0.
t1
t2
Why? r i r i = 0, because at a particular time, r i (ti ) = 0. Also, we know
t1
the initial and nal states. It is the behavior in between that we want to know.
The result is the extended Hamilton Principle.
t2
(W + T )dt = 0 (12)
t1
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Lagranges Equations 5
Generalized Fores and the Lagrangian
m
W = W conservative + W nonconservative = V + Qj qj
j=1
Conservative W :
W = f cons
i
r i
V
f cons
i
=
ri
V
W = ri = V
ri
Nonconservative W :
Qj qj
m
Qj qj
j=1
m: Total number of generalized coordinates
Qj = j : Generalized force for nonconservative work done
qj = j : Generalized coordinate
Substitute for W in (12) to obtain:
t2 m
(T V + Qj qj )dT = 0 (13)
t1 j=1
Dene Lagrangian
L =T V
The Lagrangian is a function of all the generalized coordinates, the generalized
velocities, and time:
L = L(qj , qj , t) where j = 1, 2, 3 . . . , m
(13) can now be written as
t2 m
L(qj , qj , t) + Qj qj dt = 0 (14)
t1 j=1
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Lagranges Equations 6
Lagranges Equations
We would like to express L(qj , qj , t) as (a function) qj , so we take the total
derivative of L. Note t is 0, because admissible variation in space occurs at a
xed time.
m
L L L
L = qj + qj + t
j=1
qj qj t
t2 m
t2
L L
(L)dt = qj + qj dt (15)
t1 t1 j=1
qj qj
To remove the qj in (15), integrate the second term by parts with the following
substitutions:
L
u=
qj
d L
du =
dt qj
y = qj
dy = qj
m
t2 m t2
L L
qj dt = qj dt
t1 j=1
qj j=1 t1
qj
m
t2 t2
L d L
= qj
qj dt
j=1
qj t1 t1 dt qj
t2
L
qj = 0
qj t1
m
t2 m
t2
L d L
qj dt = qj dt (16)
t1 j=1
qj t1 j=1 dt qj
Combine (14), (15), and (16) to get:
m
t2
L d L
qj qj + Qj qj dt = 0
t1 j=1
qj dt qj
m
t2
d L L
+ +Qj qj dt = 0
t1 j=1
dt qj qj
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Example 1: 2-D Particle, Horizontal Plane 7
dt has nite values.
qj are independent and arbitrarily variable in a holonomic system. They are
nite quantities. Thus, for the integral to be equal to 0,
d L L
+ +Qj = 0
dt qj qj
Equations of Motion (Lagrange):
d L L
Qj =
dt qj qj
or:
d L L
j =
dt j j
Where Qj = j = generalized force, qj = j = generalized coordinate, j =
index for the m total generalized coordinates, and L is the Lagrangian of the
system.
Although these equations were formally derived for a system of particles, the
same is true for rigid bodies.
Example 1: 2-D Particle, Horizontal Plane
Figure 3: 2-D Particle on a horizontal plane subject to a force F . Figure by
MIT OCW.
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Example 1: 2-D Particle, Horizontal Plane 8
Cartesian Coordinates
q1 = x
q2 = y
r = x + yj
r = x + yj
|v|2 = r r = x2 + y 2 = q12 + q22
Q1 = F cos
Q2 = F sin
L =T V
1
T = m(r r)
2
1
= m(q12 + q22 )
2
V =0 (in horizontal plane, position with respect to gravity same at all locations)
For q1 or (x)
L
=0
q1
L
= mq1
q1
d L
= mq1
dt q1
mq1 0 = F cos
mq2 = F sin
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Example 1: 2-D Particle, Horizontal Plane 9
Polar Coordinates
Figure 4: 2-D Particle subject to a force F described by polar coordinates.
Figure by MIT OCW.
q1 = r
q2 =
F = Fr er + F e
r = r(t)er
r = rer + re
|v|2 = r2 + r2 2
1
L =T V = m(q12 + q12 q22 ) + 0
2
q1 :
L
= mq1 q22
q1
d L
= mq1
dt q1
q2 :
L
=0
q2
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Example: Falling Stick 10
d L d
= (mq12 q2 ) = m(2q1 q1 q2 + q12 q2 )
dt q2 dt
q 1 (r): Q1 = Fr
Q2 = F r: moment.
m(2q1 q1 q2 + q12 q2 ) = F q1
m(2q1 q2 + q1 q2 ) = F
mq1 mq1 q2 = Fr
Example: Falling Stick
Figure 5: Falling stick. The stick is subject to a gravitational force, mg. The
frictionless surface causes the stick to slip. Figure by MIT OCW.
G: Center of Mass
l: length
Constraint: 1 point touching the ground.
2 degrees of freedom
q1 = xG
q2 =
Must nd L and Qj . Look for external nonconservative forces that do work.
None. Normal does no work. Gravity is conservaitve.
Q1 = Q2 = 0
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].
Example: Falling Stick 11
Lagrangian
L =T V
Rigid bodies: Kinetic energy of translation and rotation
1 1
T = m(r G r G ) + IG ( )
2 2
l
yG = sin
2
l
yG = cos
2
= k
l
r G = xG + yG j = xG + cos j
2
l2
rG r G = x2G +
cos2 2
4
1 2 l2
2 2 1 1
T = q + cos q2 q2 + ml q22
2
2 1 4 2 12
See Lecture 16 for the rest of the example.
Cite as: Thomas Peacock and Nicolas Hadjiconstantinou, course materials for 2.003J/1.053J Dynamics and
Control I, Spring 2007. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology.
Downloaded on [DD Month YYYY].