<<

Background Inverted Visualization Derivation Without Oscillator Derivation With Oscillator

Derivation of of for Problem

Filip Jeremic

McMaster University

November 28, 2012 It is defined as the needed to accelerate a body of a given from rest to its stated

In classical , the kinetic Ek of a point object is defined by its mass m and velocity v:

1 E = mv 2 k 2

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Kinetic Energy

Definition The energy which an object possesses due to its motion In , the Ek of a point object is defined by its mass m and velocity v:

1 E = mv 2 k 2

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Kinetic Energy

Definition The energy which an object possesses due to its motion

It is defined as the work needed to accelerate a body of a given mass from rest to its stated velocity Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Kinetic Energy

Definition The energy which an object possesses due to its motion

It is defined as the work needed to accelerate a body of a given mass from rest to its stated velocity

In classical mechanics, the kinetic energy Ek of a point object is defined by its mass m and velocity v:

1 E = mv 2 k 2 The amount of gravitational possessed by an elevated object is equal to the work done against in lifting it Thus, for an object at height h, the gravitational potential energy Ep is defined by its mass m, and the g:

Ep = mgh

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Potential Energy

Definition The energy of an object or a system due to the of the body or the arrangement of the of the system Thus, for an object at height h, the gravitational potential energy Ep is defined by its mass m, and the gravitational constant g:

Ep = mgh

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Potential Energy

Definition The energy of an object or a system due to the position of the body or the arrangement of the particles of the system

The amount of gravitational potential energy possessed by an elevated object is equal to the work done against gravity in lifting it Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Potential Energy

Definition The energy of an object or a system due to the position of the body or the arrangement of the particles of the system

The amount of gravitational potential energy possessed by an elevated object is equal to the work done against gravity in lifting it Thus, for an object at height h, the gravitational potential energy Ep is defined by its mass m, and the gravitational constant g:

Ep = mgh Lagrange’s equations employ a single , rather than vector components To derive the equations modeling an inverted pendulum all we need to know is how to take partial

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Lagrangian Mechanics

An analytical approach to the derivation of E.O.M. of a mechanical system To derive the equations modeling an inverted pendulum all we need to know is how to take partial derivatives

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Lagrangian Mechanics

An analytical approach to the derivation of E.O.M. of a mechanical system Lagrange’s equations employ a single scalar function, rather than vector components Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Lagrangian Mechanics

An analytical approach to the derivation of E.O.M. of a mechanical system Lagrange’s equations employ a single scalar function, rather than vector components To derive the equations modeling an inverted pendulum all we need to know is how to take partial derivatives E.O.M. can be directly derived by substitution using EulerLagrange :

d ∂L ∂L = dt ∂θ˙ ∂θ

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Lagrangian

Definition In classical mechanics, the natural form of the Lagrangian is defined as L = Ek − Ep Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Lagrangian

Definition In classical mechanics, the natural form of the Lagrangian is defined as L = Ek − Ep

E.O.M. can be directly derived by substitution using EulerLagrange equation:

d ∂L ∂L = dt ∂θ˙ ∂θ Problem Our problem is to derive the E.O.M. which relates with the of the from the vertical position

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Inverted Pendulum Problem

The pendulum is a stiff bar of length L which is supported at one end by a frictionless pin The pin is given an oscillating vertical motion s defined by:

s(t) = A sin ωt Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Inverted Pendulum Problem

The pendulum is a stiff bar of length L which is supported at one end by a frictionless pin The pin is given an oscillating vertical motion s defined by:

s(t) = A sin ω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 Recall the definition of the Lagrangian

L = Ek − Ep 1 L = mv 2 − mgy 2

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Setup

From the figure on previous page we know

x = L sin θ x˙ = L cos (θ)θ˙ y = L cos θ y˙ = −L sin (θ)θ˙ Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Setup

From the figure on previous page we know

x = L sin θ x˙ = L cos (θ)θ˙ y = L cos θ y˙ = −L sin (θ)θ˙

Recall the definition of the Lagrangian

L = Ek − Ep 1 L = mv 2 − mgy 2 Substituting into the equation for the Lagrangian we get

1 L = mv 2 − mgy 2 1 L = mL2θ˙2 − mgL cos θ 2

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 = L2θ˙2 cos2 θ + L2θ˙2 sin2 θ = L2θ˙2(cos2 θ + sin2 θ) = L2θ˙2 1 L = mv 2 − mgy 2 1 L = mL2θ˙2 − mgL cos θ 2

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 = L2θ˙2 cos2 θ + L2θ˙2 sin2 θ = L2θ˙2(cos2 θ + sin2 θ) = L2θ˙2

Substituting into the equation for the Lagrangian we get 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 = L2θ˙2 cos2 θ + L2θ˙2 sin2 θ = L2θ˙2(cos2 θ + sin2 θ) = L2θ˙2

Substituting into the equation for the Lagrangian we get

1 L = mv 2 − mgy 2 1 L = mL2θ˙2 − mgL cos θ 2 Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Setup Continued...

Recall the Euler-Lagrange equation

d ∂L ∂L = dt ∂θ˙ ∂θ We shall now compute both sides of the equation and solve for θ¨ ∂L = 0 + mgL sin θ ∂θ = mgL sin θ

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

∂L Computing ∂θ

1 L = mL2θ˙2 − mgL cos θ 2 Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

∂L Computing ∂θ

1 L = mL2θ˙2 − mgL cos θ 2

∂L = 0 + mgL sin θ ∂θ = mgL sin θ ∂L = mL2θ˙ − 0 ∂θ˙ = mL2θ˙

d ∂L = mL2θ¨ dt ∂θ˙

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

  Computing d ∂L dt ∂θ˙

1 L = mL2θ˙2 − mgL cos θ 2 We compute in two steps: d ∂L = mL2θ¨ dt ∂θ˙

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

  Computing d ∂L dt ∂θ˙

1 L = mL2θ˙2 − mgL cos θ 2 We compute in two steps: ∂L = mL2θ˙ − 0 ∂θ˙ = mL2θ˙ Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

  Computing d ∂L dt ∂θ˙

1 L = mL2θ˙2 − mgL cos θ 2 We compute in two steps: ∂L = mL2θ˙ − 0 ∂θ˙ = mL2θ˙

d ∂L = mL2θ¨ dt ∂θ˙ d ∂L ∂L = dt ∂θ˙ ∂θ mL2θ¨ = mgL sin θ g θ¨ = sin θ L 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 θ¨ 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 ∂L ∂L = dt ∂θ˙ ∂θ mL2θ¨ = mgL sin θ g θ¨ = sin θ L Which is the equation presented in the assignment. Again, we use the definition of the Lagrangian

L = Ek − Ep 1 L = mv 2 − mgy 2

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 (θ)θ˙ y = L cos θ + A sin ωt y˙ = −L sin (θ)θ˙ + Aω cos ωt 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 (θ)θ˙ y = L cos θ + A sin ωt y˙ = −L sin (θ)θ˙ + Aω cos ωt

Again, we use the definition of the Lagrangian

L = Ek − Ep 1 L = mv 2 − mgy 2 v 2 =x ˙ 2 +y ˙ 2 = L2θ˙2 cos2 θ + L2θ˙2 sin2 θ − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2(cos2 θ + sin2 θ) − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2 − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt)

Substituting into the equation for the Lagrangian we get

1 L = mv 2 − mgy 2 1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

Setup Continued...

Velocity is a vector representing the change in position, hence Substituting into the equation for the Lagrangian we get

1 L = mv 2 − mgy 2 1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2

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 = L2θ˙2 cos2 θ + L2θ˙2 sin2 θ − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2(cos2 θ + sin2 θ) − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2 − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ω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 = L2θ˙2 cos2 θ + L2θ˙2 sin2 θ − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2(cos2 θ + sin2 θ) − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2 − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt)

Substituting into the equation for the Lagrangian we get

1 L = mv 2 − mgy 2 1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2 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 = L2θ˙2 cos2 θ + L2θ˙2 sin2 θ − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2(cos2 θ + sin2 θ) − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt) = L2θ˙2 − 2ALω sin θ cos (ωt)θ˙ + A2ω2 cos2 (ωt)

Substituting into the equation for the Lagrangian we get

1 L = mv 2 − mgy 2 1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2 ∂L = 0 − mALω cos θ cos (ωt)θ˙ + 0 + mgL sin θ − 0 ∂θ = −mALω cos θ cos (ωt)θ˙ + mgL sin θ

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

∂L Computing ∂θ

1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2 Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

∂L Computing ∂θ

1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2

∂L = 0 − mALω cos θ cos (ωt)θ˙ + 0 + mgL sin θ − 0 ∂θ = −mALω cos θ cos (ωt)θ˙ + mgL sin θ ∂L = mL2θ˙ − mALω sin θ cos (ωt) + 0 − 0 − 0 ∂θ˙ = mL2θ˙ − mALω sin θ cos (ωt)

d ∂L = mL2θ¨ − mALω cos θ cos (ωt)θ˙ + mALω2 sin θ sin (ωt) dt ∂θ˙

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

  Computing d ∂L dt ∂θ˙

1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2 We compute in two steps: d ∂L = mL2θ¨ − mALω cos θ cos (ωt)θ˙ + mALω2 sin θ sin (ωt) dt ∂θ˙

Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

  Computing d ∂L dt ∂θ˙

1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2 We compute in two steps: ∂L = mL2θ˙ − mALω sin θ cos (ωt) + 0 − 0 − 0 ∂θ˙ = mL2θ˙ − mALω sin θ cos (ωt) Background Inverted Pendulum Visualization Derivation Without Oscillator Derivation With Oscillator

  Computing d ∂L dt ∂θ˙

1 L = mL2θ˙2 − mALω sin θ cos (ωt)θ˙ 2 1 + mA2ω2 cos2 (ωt) − mgL cos θ − mgA sin (ωt) 2 We compute in two steps: ∂L = mL2θ˙ − mALω sin θ cos (ωt) + 0 − 0 − 0 ∂θ˙ = mL2θ˙ − mALω sin θ cos (ωt)

d ∂L = mL2θ¨ − mALω cos θ cos (ωt)θ˙ + mALω2 sin θ sin (ωt) dt ∂θ˙ d ∂L ∂L = dt ∂θ˙ ∂θ

mL2θ¨ − mALω cos θ cos (ωt)θ˙ + 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 θ¨ = (g − Aω2 sin (ωt)) sin θ L

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 θ¨ Lθ¨ + Aω2 sin θ sin (ωt) = g sin θ Lθ¨ = g sin θ − Aω2 sin θ sin (ωt) 1 θ¨ = (g − Aω2 sin (ωt)) sin θ L

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 ∂L ∂L = dt ∂θ˙ ∂θ

mL2θ¨ − mALω cos θ cos (ωt)θ˙ + mALω2 sin θ sin (ωt) = −mALω cos θ cos (ωt)θ˙ + mgL 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 ∂L ∂L = dt ∂θ˙ ∂θ

mL2θ¨ − mALω cos θ cos (ωt)θ˙ + 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 θ¨ = (g − Aω2 sin (ωt)) sin θ L 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/Newton’s laws of motion