Lagrange Mechanics II: 20 February 2023
Lagrange Mechanics II: 20 February 2023
Lagrange Mechanics II
20 February 2023
Presented by:
Amir Patel
PhD (Mechatronics) Cape Town
Electrical Engineering Department EEE4119F
University of Cape Town Mechatronics II
Overview
• Multibody Systems
• Manipulator
Equation
Sand flea
Constraints Revisited
Y
𝐷𝑂𝐹 = 3 ∗ 𝑁 − 𝑚 X
• 𝑵 is number of bodies and 𝒎 is
number of constraints ρ
• Constraint: 𝑥 2 + 𝑦 2 = 𝜌2 m
• In 𝑥 and 𝑦 but one
constraint! (x,y)
• So, if in 3D the planar pendulum has
constraints:
1. 𝑥 2 + 𝑦 2 = 𝜌2
2. 𝑧 = 0
Examples: Bead on a line
• Bead constrained to m X
move on x-axis
• Constraints: 𝑦 = 0 𝑎𝑛𝑑 𝑧 = 0
• DOF?
• 1→𝑞=𝑥
Examples: Bead line with angle
y
• Bead constrained to
move on x-axis α x
• DOF?
• 1→
• Gen Coords:
• 𝑞 = 𝑥 𝑜𝑟 𝑦 𝑜𝑟 𝑠
Examples: Atwood Machine
𝑥1 = 0 𝑎𝑛𝑑𝑦1 = 0
𝑥2 = 0 𝑎𝑛𝑑𝑦2 = 0
• DOF?
• 1
• Gen cords?
• 𝑞 = 𝑧1 or 𝑧2
Homework
• Position
𝑎𝑠𝑖𝑛 𝛼 + 𝑏𝑠𝑖𝑛(𝛽) α
𝒓= a
−𝑎𝑐𝑜𝑠 𝛼 − 𝑏𝑐𝑜𝑠(𝛽)
b
x,y
• Vel β
acos 𝛼 𝛼ሶ + 𝑏𝑐𝑜𝑠(𝛽)𝛽ሶ
𝒓ሶ =
asin 𝛼 𝛼ሶ + 𝑏𝑠𝑖𝑛(𝛽)𝛽ሶ
Homework: Energy
• Kinetic
2 2
𝑚 acos 𝛼 𝛼ሶ + bcos 𝛽 𝛽ሶ 𝑚 asin 𝛼 𝛼ሶ + bsin 𝛽 𝛽ሶ
𝑇𝑡 = +
2 2
𝐼𝐵 2
𝑇𝑟 = 𝛽ሶ
2
𝑇𝑇𝑜𝑡𝑎𝑙 = 𝑇𝑡 + 𝑇𝑟
• Potential
𝑉 = −𝑚𝑔(acos 𝑎𝑙𝑝ℎ𝑎 + 𝑏𝑐𝑜𝑠 𝑏𝑒𝑡𝑎 )
Homework (EOM)
• Eom (𝜶):
𝜕𝐿
= 𝑎𝑚(𝑎𝛼ሶ + 𝑏𝛽ሶ cos 𝛼 − 𝛽 )
𝜕𝛼ሶ
𝑑 𝜕𝐿
= 𝑎𝑚(𝑏𝛽ሶ 2 𝑠𝑖𝑛 𝛼 − 𝛽 − 𝑏𝛼ሶ 𝛽ሶ sin 𝛼 − 𝛽 + 𝑎𝛼ሷ + 𝑏𝛽ሷ cos 𝛼 − 𝛽 )
𝑑𝑡 𝜕𝛼ሶ
𝜕𝐿
= −𝑎𝑚(𝑔𝑠𝑖𝑛 𝛼 + 𝑏𝛼ሶ 𝛽ሶ sin 𝛼 − 𝛽 )
𝜕𝛼
• Eom (𝜷):
• Admin
𝑇
𝒒 = 𝜃1 𝜃2 𝜃3
l
sin 𝜃1 𝑙 θ1
𝑟1 =
−𝑐𝑜𝑠 𝜃1 𝑙 m1
l
sin 𝜃1 𝑙 + sin 𝜃1 + 𝜃2 𝑙 θ2
𝑟2 =
−𝑐𝑜𝑠 𝜃1 𝑙 − cos 𝜃1 + 𝜃2 𝑙 m2 l
θ3 m3
𝑇
𝒒 = 𝜃1 𝜃2 𝜃3 θ1
l
m1
l
cos 𝜃1 𝑙 𝜃ሶ1 θ2
𝑟1ሶ =
𝑠𝑖𝑛 𝜃1 𝑙 𝜃ሶ1 m2 l
θ3 m3
• Admin
τ2
θ1
𝑑 𝜕𝐿 𝜕𝐿
− = 𝜏𝑖
𝑑𝑡 𝜕𝑞ሶ 𝑖 𝜕𝑞𝑖
Motor torque acting on
generalized coordinate 𝒊
Eg: 2DOF Robot arm
𝑇
𝒒 = 𝜃1 𝜃1
m2
𝑙2 θ2
𝑙1 𝑐𝑜𝑠 𝜃1
𝒓𝟏 = m1
𝑙1 𝑠𝑖𝑛 𝜃1 y 𝑙1
𝑙1 𝑐𝑜𝑠 𝜃1 + 𝑙2 𝑐𝑜𝑠 𝜃1 + 𝜃2 θ1 τ2
𝒓𝟐 =
𝑙1 𝑠𝑖𝑛 𝜃1 + 𝑙2 𝑠𝑖𝑛 𝜃1 + 𝜃2
τ1 x
Eg: 2DOF Robot arm
𝑇 m2
𝒒 = 𝜃1 𝜃1
𝑙2 θ2
m1 𝑙2
y 𝑙1
𝒓𝟏ሶ =
− 𝑙1 𝑠𝑖𝑛 𝜃1 𝜃1ሶ θ1 τ2
𝑙1 𝑐𝑜𝑠 𝜃1 𝜃1ሶ
τ1 x
− 𝑙2 𝑠𝑖𝑛 𝜃1 + 𝜃2 (𝜃1ሶ + 𝜃2ሶ )
𝒓𝟐ሶ = 𝒓𝟏ሶ +
𝑙2 𝑐𝑜𝑠 𝜃1 + 𝜃2 (𝜃1ሶ + 𝜃2ሶ )
Eg: 2DOF Robot arm
m2
EOM
θ2
𝜏1 = (𝑚1 𝑙12 + 𝑚2 (𝑙12 + 2𝑙1 𝑙2 𝑐𝑜𝑠 𝜃2 + 𝑙22 ))𝜃ሷ1 m1
y
+(𝑚2 (𝑙1 𝑙2 𝑐𝑜𝑠 𝜃2 + 𝑙22 )𝜃ሷ 2 θ1 τ2
− (𝑚2 𝑙1 𝑙2 𝑠𝑖𝑛𝜃2 (2𝜃ሶ1 𝜃ሶ2 + 𝜃ሶ22 ) τ1 x
+ 𝑚1 + 𝑚2 𝑙1 𝑔𝑐𝑜𝑠 𝜃1 + 𝑚2 𝑔𝑙2 cos(𝜃1 + 𝜃2 )
𝑴 𝒒 𝒒ሷ + 𝑪 𝒒, 𝒒ሶ + 𝑮 𝒒 = 𝝉
Joint torques
𝒏×𝒏 velocity-product matrix
Mass Matrix
Gravity term
Mass Matrix
• Properties:
• Positive definite – Kinetic energy always positive for
non-zero 𝒒ሶ
• Symmetric
• Depends only on 𝒒
• Elements: 𝜕𝑇
𝑀𝑖,𝑗 =
𝜕𝑞ሶ 𝑖 𝜕𝑞ሶ 𝑗
Mass Matrix
Centrifugal &Coriolis Matrix
𝝏𝑻
𝑪 = 𝑴ሶ 𝒒ሶ −
𝝏𝒒
Jacobian
𝝏𝑽
𝑮=
𝝏𝒒
All potential energy can be
captured here
Exercise
• Derive the dynamics for a single-link inverted pendulum
L m2
y0
F θ
x0
m1
Exercise
L m2
𝒎𝟏 𝒙ሶ 𝟐
𝑻𝒃𝒍𝒐𝒄𝒌 = y0
F θ
𝟐 x0
m1
𝒎𝟐 𝑳𝟐 𝜽ሶ 𝟐 𝒎𝟐 𝑳𝒔𝒊𝒏𝜽𝜽ሶ 𝒙ሶ 𝑰𝜽ሶ 𝟐 + 𝒎𝟐 𝒙ሶ 𝟐
𝑻𝒓𝒐𝒅 = − +
𝟖 𝟐 𝟐
𝒎𝟐 𝒈𝑳𝒔𝒊𝒏𝜽
𝑽𝒓𝒐𝒅 =
𝟐
Tailbot
Homework (Tailbot)
• Derive the dynamics for Tailbot during the flight phase
• Can assume the tail is a point mass
• Use Manipulator Equation form!
mt mb Ib
θb
θt x,y
τin
y
x
The end.
• Next lecture:
• 3D Systems