Lagrange’s Equationnhuttho/me584/Chapter 3...Lagrange’s Method •Newton’s method of...
Transcript of Lagrange’s Equationnhuttho/me584/Chapter 3...Lagrange’s Method •Newton’s method of...
Lagrange’s Equation
chp3 1
Lagrange’s Method
• Newton’s method of developing equations of
motion requires taking elements apart
• When forces at interconnections are not of
primary interest, more advantageous to derive
equations of motion by considering energies in
the system
• Lagrange’s equations:
– Indirect approach that can be applied for other types
of systems (other than mechanical)
– Based on calculus of variations – finding extremums
of quantifies expressible as integrals
chp3 2
Lagrange’s Equations
chp3
friction viscous toduen dissipatioenergy :)(
itiesular veloclinear/ang inertias, mass
masses, system of in termsenergy kinetic: )(
scoordinate of in termsenergy potential :)(
coordinateeach in loading ingcorrespond:Q
instantany at motion ssystem' describe
tonecessary scoordinatet independen:
:
2
3
2
2
1
i
i
i
i
i
i
iiii
qfR
qfT
qfU
q
where
U
q
R
q
T
q
T
dt
d
3
Deriving Equations of Motion via
Lagrange’s Method
1. Select a complete and independent set of
coordinates qi’s
2. Identify loading Qi in each coordinate
3. Derive T, U, R
4. Substitute the results from 1,2, and 3 into
the Lagrange’s equation.
chp3 4
Example 11: Spring-Mass-Damper
System
chp3
Independent coordinate: q = x
Substitute into Lagrange’s equation:
5
Example 12: Pair-Share:
Restrained Plane Pendulum
• A plane pendulum (length
l and mass m), restrained
by a linear spring of
spring constant k and a
linear dashpot of dashpot
constant c, is shown on
the right. The upper end
of the rigid massless link
is supported by a
frictionless joint. Derive
the equation of motion.
chp3 6
Example 12: Pair-Share:
Restrained Plane Pendulum
chp3 7
0
sin
0sin
)(2
1cos
)(2
1
2
1
)(2
1
,0,
222
222
2
22
2
kbmglcaml
smallforLinearize
kbmglcaml
QURT
)T
(dt
d
bkmglmglU
lmmvT
acR
chp3
• One degree of freedom, q1=angle as an independent coordinate
• Velocity of bead: ; Velocity of hoop:
• Kinetic energy:
• Potential energy relative to its position at the bottom of
the hoop (when the hoop is not rotating and = 0), is
• R = 0, Q = 0
• Substitute into Lagrange’s equation:
• Solving for the angular acceleration:
Example 13: Bead on a Spinning Wire Hoop
sinR
R
.R
2 cos sin .g
R
8
2
2
1mvT 22
sin2
1 RRm
cosmgRmgRU
0sincossin222
mgRmRmR
QURT
)T
(dt
d
Example 14: Pair-Share: Copying machine
• Use Lagrange’s equation to derive
the equations of motion for the
copying machine example,
assuming potential energy due to
gravity is negligible.
chp3
Q1 = F, Q2 = 0
9
q1=y, q2= θ
y
θ
Example 14: Pair-Share: Copying machinechp3 10
Example 15: Mass Spring Dashpot
Subsystem in Falling Container
• A mass spring dashpot subsystem
in a falling container of mass m1 is
shown. The system is subject to
constraints (not shown) that
confine its motion to the vertical
direction only. The mass m2,
linear spring of undeformed length
l0 and spring constant k, and the
linear dashpot of dashpot constant
c of the internal subsystem are
also shown.
• Derive equation(s) of motion for
the system using
– x1 and x2 as independent coordinates
– y1 and y2 as independent coordinates
chp3 11
Example 15: Mass Spring Dashpot
Subsystem in Falling Container
chp3 12
0)()(
0)()(
:'
)(2
1
)(2
1
2
1
2
1
0
.,
2121221
2
2222
1212111
1
1111
2
21
2211
2
21
2
22
2
11
2,1
212211
gmxxkxxcxm
Qx
U
x
R
x
T)
x
T(
dt
d
gmxxkxxcxm
Qx
U
x
R
x
T)
x
T(
dt
d
EquationsLagrangeintoSubstitute
xxcR
gxmgxmxxkU
xmxmT
Q
groundhorizontaltorespectwithmandmofpositionsbexqxqLet
Example 15: Mass Spring Dashpot
Subsystem in Falling Container
chp3 13
0
0)(
:'
2
1
)(2
1
)(2
1
2
1
0
2222212
2
2222
2122121
1
1111
2
2
21211
2
2
2
212
2
11
2,1
1222
111
gmkyycymym
Qy
U
y
R
y
T)
y
T(
dt
d
gmgmymymm
Qy
U
y
R
y
T)
y
T(
dt
d
EquationsLagrangeintoSubstitute
ycR
yygmygmkyU
yymymT
Q
springoflengthdunstretchefromandmtorelativemofpositionbeyq
groundhorizontaltorespectwithmofpositioninertialbeyqLet
• Block mass m sliding down a wedge mass M
• Independent coordinates, q1 and q2, are shown, q1 is along the plane and
is measured relative to the (moving) wedge.
• Velocity of the wedge is , but
velocity of the block has components from both
q1 and q2:
• Total kinetic energy is
• The potential energy of the wedge can be taken as zero, and the block is
• Substitute into Lagrange’s equations and differentiate wrt to q1 and q2
chp3
Example 16: A Block Sliding on a Wedge
q2
q1
a
2q
2 1 cos .m
q qM m
a
12
sin.
1 cos
gq
m
M m
a
a
14
2
1
2
12
222sincos aa qqqvvv yxblock
2
1
2
12
2
2 sincos2
1
2
1aa qqqmqMT
α
asin1mgqU
Example 17: Pair-Share:
Mass Pendulum Dynamic System
chp3 15
• A simple plane pendulum of mass m0 and
length l is suspended from a cart of mass m as
sketched in the figure. The motion of the cart
is restrained by a spring of spring constant k
and a dashpot constant c; and the angle of the
pendulum is restrained by a torsional spring of
spring constant k, and a torsional dashpot of
dashpot constant ct. Note that the constitutive
relations for the torsional spring and torsional
dashpot are linear expressions τ=ktθ and τ=ctθ,
respectively, where τ is the torque and θ is the
change in the angle across the element from its
undeformed configuration.
• The torsional spring is undeformed when the pendulum is in its downward-
hanging equilibrium position. Also, m0 is acted upon by a known dynamic
force F0sinωt, which remains horizontal, regardless of the angle θ and the
motion of the cart. The system is constrained to remain in the plane of the
sketch and the cart remains on the bed throughout its motion. Derive the
equation(s) of motion for the system.
.
Example 16: Pair-Share:
Mass Pendulum Dynamic System
chp3
cos)sin(cos sin
sin)sincos()(m
:Equations sLagrange' into Substitute
cos2)(2
1)sin()cos(
2
1
2
1
)cos1(2
1
2
1
2
1
2
1
cos)sin(sin
, :scoordinatetindependenwo
0000
0
2
00
22
0
22
0
2
0
22
22
0201
21
ltFlxmglmkclm
tFlmkxxcxm
lxlxmllxmT
xmT
TTT
glmkkxU
cRandxcR
ltFQandtFQ
qxqT
tt
pendulum
cart
pendulumcart
t
tx
16
Comparison of Newton’s and
Lagrange’s MethodsNewton’s (Direct Approach) Lagrange’s (Indirect Approach)
Accelerations required Velocities required
Generally vectors required Generally scalars required
Free-body Diagrams useful Free-body diagrams not useful
All forces considered Workless forces (constraints) forces
not considered
All forces handled via same
expression
Conservative and non-conservative
forces handled separately
Intermediate forces more readily
available
Intermediate forces less readily
available
chp3 17
Case Study: Feasibility Study of a
Mobile Robot Design
chp3 18
Preliminary Design Model
• Read Handout 1
• Develop a simplified model of the base
and the arm by neglecting the reaction
forces that occur at the pivot
• When do the reaction forces become
significant?
=> at high accelerations and speeds of the
base and the arm
chp3 19
Preliminary Design Modelchp3 20
Preliminary Design Modelchp3 21
Motion Profiles
• Read Handout 2
• Plot the motor force versus time, and
motor torque versus time, and determine
whether the motor is powerful enough
chp3 22
Motion Profileschp3 23
A More Detailed Model
• The simplified model appears feasible
• Develop a detailed model, including the
reaction forces to see whether they
significantly change the results
chp3 24
A More Detailed Modelchp3 25
A More Detailed Modelchp3 26
A More Detailed Modelchp3 27
Matlab Simulation Example:
Solving Systems of Equations
• From Matlab website: http://www.mathworks.com/support/tech-notes/1500/1510.html#time
chp3 28
Matlab Simulation Example:
Solving Systems of Equations
• From Matlab website: http://www.mathworks.com/support/tech-notes/1500/1510.html#time
• More on ode45 commands: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ode45.html
chp3 29
Homework 3: chapter 3
• 3.14, 3.21,3.24,3.25,3.31,3.33,3.36
• Case study simulation:
– Simulate the detailed model for 10 seconds with initial
conditions and for three
cases:
1. T = 0, f =0
2. T=370 Nm, f = 0
3. T=0, f = 263 N
– For each case, plot state vector versus time
– Describe the behavior of the system for each case
and discuss the stability of the system
chp3 30
0,10,0,0 0
0
000 xx
Case Study Simulation Model
chp3 31
coscos
sincossincossin
coscos
sincossin
sin;cos);(
sincos)(
sin;cos;
sincos
2
2
2
2
mLmLMmI
mglTmLfmLI
I
mL
I
mglT
ebad
ecag
a
b
a
c
mLmLMmI
mglTmLfmLI
ebad
ecagx
andxforSolve
fmLgmLeMmdwhere
gexd
or
fmLmLxMm
mglTcmLbIa
where
cxba
or
mglTxmLI
p
p
pp
p
p
p
p
Matlab Simulationchp3 32
);**/()**(*)/(/)4(
);4()3(
);**/()**()2(
);2()1(
)]'4()3()2()1([]'[%
;)4(*)4(*))3(sin(**
));3(cos(**
);(
));3(sin(***
));3(cos(**
;
;0
;0
2^/%;81.9
%;100
%;40
%;8/7
2^%;5.47
%
);1,4(
),(
%
bedacegaabacdy
ydy
bedacegady
ydy
yyyyxxyvectorState
fyyyLmg
yLme
Mmd
ylgmTc
yLmb
Ia
f
T
smg
kgM
kgm
mL
mkgI
parametersDefine
zerosdy
ytsecondodedyfunction
integratedbetofunction
p
p
)]'[,('
)]'/[,('
),(
)224(
)]'[,('
)]'[,('
),(
)223(
)]'[,('
)]'/[,('
),(
)222(
)]'[,('
)]'[,('
),(
)221(
%
);4(:,);3(:,);2(:,);1(:,
);0,,(@45],[
;]'0180/*1000[0
]'[%
%];30[
stxlabel
sradphidotylabel
phidottplot
subplot
stxlabel
mphiylabel
phitplot
subplot
stxlabel
smxdotylabel
xdottplot
subplot
stxlabel
mxylabel
xtplot
subplot
figure
timeagainstvectorstatePlot
yphidotyphiyxdotyx
ytspansecondodeodeyt
piy
xxyvectorState
vectortimesimulationtspan
References
• Woods, R. L., and Lawrence, K., Modeling and
Simulation of Dynamic Systems, Prentice Hall, 1997.
• Williams, J. H., Fundamentals of Applied Mechanics,
Wiley, 1996
• Close, C. M., Frederick, D. H., Newell, J. C., Modeling
and Analysis of Dynamic Systems, Third Edition, Wiley,
2002
• Lecture notes: web.njit.edu/~gary/430/
• Palm, W. J., Modeling, Analysis, and Control of Dynamic
Systems
chp3 33