Professional Documents
Culture Documents
Inv Pend
Inv Pend
=
L
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Lagrangian
Denition
In classical mechanics, the natural form of the Lagrangian is
dened as L = E
k
E
p
E.O.M. can be directly derived by substitution using
EulerLagrange equation:
d
dt
=
L
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Inverted Pendulum Problem
The pendulum is a sti bar of length L which is supported at
one end by a frictionless pin
The pin is given an oscillating vertical motion s dened by:
s(t) = Asin t
Problem
Our problem is to derive the E.O.M. which relates time with the
acceleration of the angle from the vertical position
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Inverted Pendulum Problem
The pendulum is a sti bar of length L which is supported at
one end by a frictionless pin
The pin is given an oscillating vertical motion s dened by:
s(t) = Asin t
Problem
Our problem is to derive the E.O.M. which relates time with the
acceleration of the angle from the vertical position
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Visualization
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Visualization
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Visualization
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Visualization
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup
From the gure on previous page we know
x = L sin x = L cos ()
y = L cos y = L sin ()
y = L cos y = L sin ()
2
cos
2
+ L
2
2
sin
2
= L
2
2
(cos
2
+ sin
2
)
= L
2
2
Substituting into the equation for the Lagrangian we get
L =
1
2
mv
2
mgy
L =
1
2
mL
2
2
mgL cos
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup Continued...
Velocity is a vector representing the change in position, hence
v
2
= x
2
+ y
2
= L
2
2
cos
2
+ L
2
2
sin
2
= L
2
2
(cos
2
+ sin
2
)
= L
2
2
Substituting into the equation for the Lagrangian we get
L =
1
2
mv
2
mgy
L =
1
2
mL
2
2
mgL cos
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup Continued...
Velocity is a vector representing the change in position, hence
v
2
= x
2
+ y
2
= L
2
2
cos
2
+ L
2
2
sin
2
= L
2
2
(cos
2
+ sin
2
)
= L
2
2
Substituting into the equation for the Lagrangian we get
L =
1
2
mv
2
mgy
L =
1
2
mL
2
2
mgL cos
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup Continued...
Recall the Euler-Lagrange equation
d
dt
=
L
We shall now compute both sides of the equation and solve for
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
L
L =
1
2
mL
2
2
mgL cos
L
= 0 + mgL sin
= mgL sin
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
L
L =
1
2
mL
2
2
mgL cos
L
= 0 + mgL sin
= mgL sin
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
d
dt
L =
1
2
mL
2
2
mgL cos
We compute in two steps:
L
= mL
2
0
= mL
2
d
dt
= mL
2
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
d
dt
L =
1
2
mL
2
2
mgL cos
We compute in two steps:
L
= mL
2
0
= mL
2
d
dt
= mL
2
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
d
dt
L =
1
2
mL
2
2
mgL cos
We compute in two steps:
L
= mL
2
0
= mL
2
d
dt
= mL
2
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Applying Euler-Lagrange Equation
Now that we have both sides of the Euler-Lagrange Equation we
can solve for
d
dt
=
L
mL
2
= mgL sin
=
g
L
sin
Which is the equation presented in the assignment.
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Applying Euler-Lagrange Equation
Now that we have both sides of the Euler-Lagrange Equation we
can solve for
d
dt
=
L
mL
2
= mgL sin
=
g
L
sin
Which is the equation presented in the assignment.
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup
With the oscillator we must modify the equation for y
x = L sin x = L cos ()
+ A cos t
Again, we use the denition of the Lagrangian
L = E
k
E
p
L =
1
2
mv
2
mgy
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup
With the oscillator we must modify the equation for y
x = L sin x = L cos ()
+ A cos t
Again, we use the denition of the Lagrangian
L = E
k
E
p
L =
1
2
mv
2
mgy
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup Continued...
Velocity is a vector representing the change in position, hence
v
2
= x
2
+ y
2
= L
2
2
cos
2
+ L
2
2
sin
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
(cos
2
+ sin
2
) 2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
Substituting into the equation for the Lagrangian we get
L =
1
2
mv
2
mgy
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup Continued...
Velocity is a vector representing the change in position, hence
v
2
= x
2
+ y
2
= L
2
2
cos
2
+ L
2
2
sin
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
(cos
2
+ sin
2
) 2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
Substituting into the equation for the Lagrangian we get
L =
1
2
mv
2
mgy
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup Continued...
Velocity is a vector representing the change in position, hence
v
2
= x
2
+ y
2
= L
2
2
cos
2
+ L
2
2
sin
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
(cos
2
+ sin
2
) 2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
Substituting into the equation for the Lagrangian we get
L =
1
2
mv
2
mgy
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Setup Continued...
Velocity is a vector representing the change in position, hence
v
2
= x
2
+ y
2
= L
2
2
cos
2
+ L
2
2
sin
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
(cos
2
+ sin
2
) 2AL sin cos (t)
+ A
2
2
cos
2
(t)
= L
2
2
2AL sin cos (t)
+ A
2
2
cos
2
(t)
Substituting into the equation for the Lagrangian we get
L =
1
2
mv
2
mgy
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
L
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
L
+ 0 + mgL sin 0
= mAL cos cos (t)
+ mgL sin
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
L
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
L
+ 0 + mgL sin 0
= mAL cos cos (t)
+ mgL sin
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
d
dt
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
We compute in two steps:
L
= mL
2
mAL sin cos (t) + 0 0 0
= mL
2
mAL sin cos (t)
d
dt
= mL
2
+ mAL
2
sin sin (t)
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
d
dt
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
We compute in two steps:
L
= mL
2
mAL sin cos (t) + 0 0 0
= mL
2
mAL sin cos (t)
d
dt
= mL
2
+ mAL
2
sin sin (t)
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Computing
d
dt
L =
1
2
mL
2
2
mAL sin cos (t)
+
1
2
mA
2
2
cos
2
(t) mgL cos mgAsin (t)
We compute in two steps:
L
= mL
2
mAL sin cos (t) + 0 0 0
= mL
2
mAL sin cos (t)
d
dt
= mL
2
+ mAL
2
sin sin (t)
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Applying Euler-Lagrange Equation
Now that we have both sides of the Euler-Lagrange Equation we
can solve for
d
dt
=
L
mL
2
+ mAL
2
sin sin (t)
=
mAL cos cos (t)
+ mgL sin
L
+ A
2
sin sin (t) = g sin
L
= g sin A
2
sin sin (t)
=
1
L
(g A
2
sin (t)) sin
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Applying Euler-Lagrange Equation
Now that we have both sides of the Euler-Lagrange Equation we
can solve for
d
dt
=
L
mL
2
+ mAL
2
sin sin (t)
=
mAL cos cos (t)
+ mgL sin
L
+ A
2
sin sin (t) = g sin
L
= g sin A
2
sin sin (t)
=
1
L
(g A
2
sin (t)) sin
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
Applying Euler-Lagrange Equation
Now that we have both sides of the Euler-Lagrange Equation we
can solve for
d
dt
=
L
mL
2
+ mAL
2
sin sin (t)
=
mAL cos cos (t)
+ mgL sin
L
+ A
2
sin sin (t) = g sin
L
= g sin A
2
sin sin (t)
=
1
L
(g A
2
sin (t)) sin
Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator
References
http://en.wikipedia.org/wiki/Euler-Lagrange equation
http://en.wikipedia.org/wiki/Lagrangian mechanics
http://en.wikipedia.org/wiki/Newtons laws of motion