ES386 Unit 05 Lecture Slides - 2025
ES386 Unit 05 Lecture Slides - 2025
OT Unit5: 1
Dynamics of Vibrating Systems 5
Lagrange’s Equation for Dynamic Modelling
Dr Oksana Trushkevych
Lagrangian Dynamics
5.1 Introducing Lagrange’s equation
Constructing equations of motion
Our tools:
Newton’s 2nd law (consider all forces)
𝑑
Conservation of energy 𝑇+𝑉 =0
𝑑𝑡
D’Alembert’s principle (dynamic equilibrium)
Virtual displacement principle (in equilibrium for 𝛿 𝑟,
Ԧ δW = 0)
Lagrange equation
Rao 2.2
4
D’Alembert’s principle
The sum of the differences between the forces acting on a system and the time
derivatives of the momenta of the system is zero
𝐹Ԧ 𝑡 − 𝑚𝑥Ԧሷ = 0 ሷ
𝑀 𝑡 − 𝐼 𝜃Ԧ = 0
5 Rao 2.2
Virtual work
In a system in equilibrium the virtual work done by virtual displacement is zero
F3
F1
Formulated by Johann J. Bernoulli δr
Ԧ 𝑟Ԧ = 0
𝛿𝑊 = 𝐹𝛿 F2
Fi
• Applies to accelerating systems if we use inertia forces (D’Alembert)
• Very useful in cases when there are various linked motions in different directions
• Virtual work is the work done by all the active forces in a virtual displacement
• Forces are assumed to remain unchanged while applying 𝛿 𝑟Ԧ
6 Rao 2.2
Virtual displacement
In a system in equilibrium the virtual work done by virtual displacement is zero
F3
F1
• A virtual displacement 𝛿 𝑟Ԧ is δr
F2
• infinitesimal variation of the coordinate (in the permitted direction) Fi
• no significant change of geometry
𝑑
• instantaneous 𝛿 𝑟Ԧ = 0 (while d𝑟Ԧ happens over dt)
𝑑𝑡
• 𝛿 𝑟Ԧ obeys rules of differential calculus
• 𝛿 𝑟Ԧ may be equal to d𝑟Ԧ
7 Rao 2.2
Lagrangian Dynamics
Joseph L C Lagrange introduced a new mathematical approach to Newton’s 2nd law
in the late 18th century
It is a work-energy method, powerful for complex systems
The bad news: it is mathematically abstract.
The good news: you don’t have to derive it!
The moderate news:
– Risky to use a method without understanding it
– So, you might wish to go through the derivation (Thomson, Goldstein)
– Lectures will outline the main arguments and implications and explain
terminology
Rao 6.7
Thomson 7.3, Tongue 1.5
OT Unit5: 8
Lagrange’s Equation
𝑑 𝜕𝐿 𝜕𝐿 𝑑 𝜕𝐿 𝜕𝐿 𝑑 𝜕𝑇 𝜕𝑇 𝜕𝑉
− =0 − = 𝑄𝑖 − + = 𝑄𝑖
𝑑𝑡 𝜕𝑞ሶ 𝑖 𝜕𝑞𝑖 𝑑𝑡 𝜕𝑞ሶ 𝑖 𝜕𝑞𝑖 𝑑𝑡 𝜕𝑞ሶ 𝑖 𝜕𝑞𝑖 𝜕𝑞𝑖
Free vibration Forced vibration
Rao 6.7
Thomson 7.3, Tongue 1.5
OT Unit5: 9
Lagrange’s Equation
qi are generalised coordinates
Qi is a generalised force
𝑑 𝜕𝑇 𝜕𝑇 𝜕𝑉
− + = 𝑄𝑖 T is Kinetic Energy
𝑑𝑡 𝜕𝑞ሶ 𝑖 𝜕𝑞𝑖 𝜕𝑞𝑖
V is Potential Energy
The left hand side is energy conservation The right side is related to the
and is equivalent to d(T+V)=0 work done by non-potential
forces (external forces)
Rao 6.7
Thomson 7.3, Tongue 1.5
OT Unit5: 10
Generalised Co-ordinates
qi
Generalized Co-ordinates
Generalized coordinates are a set of independent coordinates equal in
number to the degrees of freedom of the system
For a mechanical system with n DoF choose exactly n independent parameters, qi, such that
they together specify fully the positional configuration of the system
𝑥12 + 𝑦12 = 𝑙12
θ1 x1, y1 (𝑥2 − 𝑥1)2 +(𝑦2 − 𝑦1)2 = 𝑙22
x ,y
θ2 2 2
qi are often spatial variables, but they could be anything (e.g. angle, velocity; commonly a
mix of displacements and angle, often in polar coordinates)
Despite qi not necessarily being displacements, their time derivatives are called Generalized
Velocities
Rao 6.6
Thomson 7.1, Tongue 1.5
OT Unit5: 12
Generalized Co-ordinates
Example 2
z
y
ψ Φ
x
m
The position of the spherical pendulum can be completely defined by the two independent coordinates ψ
and Φ.
Hence, ψ and Φ are generalized coordinates, and the spherical pendulum represents a system of two degrees
of freedom.
The position of the spherical pendulum can also be described by the three Cartesian coordinates (x, y, z),
which exceed the degrees of freedom by 1.
Coordinates x,y,z are, however, not independent: they are related by the constraint equation: x2+y2+z2 = R2
OT Unit5: 13
Generalized Co-ordinates
Example 3
x1 x x2
θ
l1 l2
OT Unit5: 14
Generalised coordinates
Exactly as many as degrees of freedom.
Only appear as set.
Not unique.
Can be angles, displacements,…
Time derivatives are called generalised velocities.
OT Unit5: 15
Generalised Force(s)
Qi
Generalized Forces
Nonconservative systems
𝑑𝑇 = 𝑑𝑊𝑝 + 𝑑𝑊𝑛𝑝 Need to put work to change energy
𝑑𝑊𝑝 = −𝑑𝑉
Separate potential and nonpotential forces
𝑑𝑇 + 𝑑𝑉 = 𝑑𝑊𝑛𝑝
Nonpotential work is equal to the work done by nonpotential forces in a
virtual displacement in generalised coordinates
𝑁
Rao 6.6
Thomson 7.4
OT Unit5: 17
Generalised forces
In nonconservative systems (forced vibration)
Defined through virtual work done by nonpotential forces
in generalised coordinates
𝑄𝑖𝛿𝑞𝑖 are in units of energy/work, but Qi is not
necessarily in units of force (N) (e.g. can be torque (Nm))
OT Unit5: 18
Lagrange & Rigid Bodies
OT Unit5: 19
Lagrangian Method summary
Works with generalised coordinates
Requires absolute velocities in an inertial frame
No need to use free-body diagrams and no vectors (a scalar method)
It automatically generates the required number of equations of motion
The equations of motion are derived in the same way for any set of co-ordinates (a
routine process)
Kinetic energy involves only velocity , which is squared, so no problems over signs
Many terms to track in complex systems
OT Unit5: 20
Lagrangian method in action
5.3 Using Lagrange’s equations
Lagrange How-to
Write down kinetic and potential energy (T, V).
If necessary, use constraints to eliminate non-independent variables
(n DoF = n variables)
Write down partial derivatives with respect to generalised
coordinates, velocities:
OT Unit5: 22
Lagrange needs practice!
We now look at a few more complicated examples
Systems are still very artificial, but contain ideas that occur often
in practice
Start using Lagrange method from now on
OT Unit5: 24
Lagrange Example 1
Simple case with 2DoF
k1 k2 k3
m1 m2
OT Unit5: 26
Lagrange Example 2
Pendulum + Horizontal Trolley
Assume: M
k
No friction.
Pendulum rod is light (massless).
Pendulum rod is inextensible. m
Linear spring.
Trolley is a ‘particle’ (moves in straight line).
Pendulum bob is small – particle.
OT Unit5: 31
𝑣𝑝
Energy terms 𝑥ሶ
𝜃 𝑙𝜃
ሶ
1
Trolley KE 𝑇𝑡 = 𝑀𝑥ሶ 2
2
𝑣𝑡 = 𝑥Ԧሶ 𝑖
Pendulum KE ሶ
𝑣𝑝 = 𝑥ሶ + 𝑙 𝜃𝑐𝑜𝑠𝜃 ሶ
𝑖Ԧ + 𝑙 𝜃𝑠𝑖𝑛𝜃 𝑗Ԧ
1 1
2
𝑇𝑝 = 𝑚 𝑣𝑝𝑖 2
+ 𝑣𝑝𝑗 𝑇𝑝 = 𝑚 𝑥ሶ 2 + 𝑙 2 𝜃ሶ 2 + 2𝑙 𝑥ሶ 𝜃𝑐𝑜𝑠𝜃
ሶ
2 2
1 1 𝜃
Total KE 𝑇 = (𝑀 + 𝑚)𝑥ሶ + 𝑚 𝑙 2 𝜃ሶ 2 + 2𝑙 𝑥ሶ 𝜃𝑐𝑜𝑠𝜃
2
2
2
ሶ
𝑙
𝑙𝑐𝑜𝑠𝜃
1 2
Spring + gravity PE 𝑉 = 𝑘𝑥 + 𝑚𝑔𝑙(1 − 𝑐𝑜𝑠𝜃)
2 ℎ
OT Unit5: 32
𝑑 𝜕𝑇 𝜕𝑇 𝜕𝑉
Lagrange solution 𝑑𝑡 𝜕𝑞ሶ 𝑖
− +
𝜕𝑞𝑖 𝜕𝑞𝑖
= 𝑄𝑖
For x:
𝑑 𝜕𝑇 𝑑
= ሶ
𝑀𝑥ሶ + 𝑚(𝑥ሶ + 𝑙 𝜃𝑐𝑜𝑠𝜃
𝑑𝑡 𝜕𝑥ሶ 𝑑𝑡
ሷ
= 𝑀 + 𝑚 𝑥ሷ + 𝑚𝑙𝜃𝑐𝑜𝑠𝜃 − 𝑚𝑙𝜃ሶ 2 𝑠𝑖𝑛𝜃
𝜕𝑇 𝜕𝑉
=0 = 𝑘𝑥
𝜕𝑥 𝜕𝑥
OT Unit5: 33
𝑑 𝜕𝑇 𝜕𝑇 𝜕𝑉
Lagrange solution 𝑑𝑡 𝜕𝑞ሶ 𝑖
− +
𝜕𝑞𝑖 𝜕𝑞𝑖
= 𝑄𝑖
For 𝜃:
𝑑 𝜕𝑇 𝑑
= 𝑚𝑥𝑙𝑐𝑜𝑠𝜃
ሶ + 𝑚𝑙 2 𝜃ሶ
𝑑𝑡 𝜕𝜃ሶ 𝑑𝑡
ሶ
= 𝑚𝑙 𝑥ሷ 𝑐𝑜𝑠𝜃 − 𝑚𝑥𝑙ሶ 𝜃𝑠𝑖𝑛𝜃 + 𝑚𝑙 2 𝜃ሷ
𝜕𝑇 𝜕𝑉
ሶ
= −𝑚𝑥𝑙ሶ 𝜃𝑠𝑖𝑛𝜃 = 𝑚𝑔𝑙𝑠𝑖𝑛𝜃
𝜕𝜃 𝜕𝜃
OT Unit5: 34
Lagrange - assemble
Now build Lagrange’s equations in
x and in .
𝑑 𝜕𝑇 𝜕𝑇 𝜕𝑉
ሷ − + = 𝑄𝑖
𝑀 + 𝑚 𝑥ሷ + 𝑚𝑙 𝜃𝑐𝑜𝑠𝜃 − 𝑚𝑙 𝜃ሶ 2 𝑠𝑖𝑛𝜃 + 𝑘𝑥 = 0 𝑑𝑡 𝜕𝑞ሶ 𝑖 𝜕𝑞𝑖 𝜕𝑞𝑖
𝑚𝑙 𝑥ሷ 𝑐𝑜𝑠𝜃 + 𝑚𝑙2 𝜃ሷ + 𝑚𝑔𝑙𝑠𝑖𝑛𝜃 = 0
OT Unit5: 35
Equation of Motion
𝑀+𝑚 𝑚𝑙 𝑥ሷ 𝑘 0 𝑥 0
ሷ + =
𝑚 𝑚𝑙 𝜃 0 𝑚𝑔𝑙 𝜃 0
OT Unit5: 36
Lagrange Summary
Scalar (work-energy) method.
No vector considerations.
Requires absolute velocities.
Automatically right number of equations.
Requires generalised coordinates (as many as degrees of
freedom).
Can handle damping (watch videos)
OT Unit5: 43
For the next class
• Videos
• Quiz
• Examples sheet
• Further example sheet if you want a challenge
• Friday – more examples
OT Unit5: 44