• No results found

The Inverted Pendulum

N/A
N/A
Protected

Academic year: 2021

Share "The Inverted Pendulum"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

The Inverted Pendulum

The equation of motion of the inverted pendulum with a moving pivoted endpoint is derived using elementary principles (Newton's equations).

y

x η

ξ Θ

Q

mg

Let a fixed coordinate system have the coordinates (ξ,η), and a parallel moving coordinate system centered on the pivot point have the coordinates (x, y) – see the figure. A particle with mass µ acted upon by a force F is assumed to satisfy Newton's law of motion

(1)  ¨=F

 ¨=F

Since ξ(t) = ξ0(t) + x(t), and η(t) = η0(t) + y(t), where (ξ0(t), η0(t)) are the coordinates of the pivot point, the equations (1) can be written,

(2)  ¨x=F­ ¨0

 ¨y=F­ ¨0

The point is thus that Newton's equations in the moving (non-rotating) coordinate system are the same as in the inertial system except for the additional "fiducial" forces represented by the last terms in (2). Applying this to the inverted pendulum case we can derive its equation of motion using the basic dynamical equation

(3) d L

dt =N

relating torque and angular momentum. Besides the gravitational force we have also to add the

(2)

vis-a-vis the pivot)

(4) I ¨ – m g l

2sin m l

2 ¨0 cos ­m l

2 ¨0 sin =0

for a homogenous stick of length l, and the moment of inertia I of the stick with respect to the pivot point. That is, the equation is the same as in a non-moving coordinate system with the gravitational acceleration (0, g) replaced with  ¨0 , g  ¨0  . Inserting I =1

3 m l2 and assuming only horizontal motions  ¨0 =0  the equation (4) reduces to

(5) ¨­ 3 g

2 l sin  3

2 l ¨0 cos =0

The third term in (5) can stabilize the pendulum around the upright position (θ = 0) by properly controlling the motion (ξ0(t)). If we consider only small deviations around θ = 0 then we may set

(6) sin ≈

cos ≈1

in (5) and apparently the system is stabilized if we e.g. choose ¨0 such that (as a linear function of the state variables

˙ ,

of the system)

(7) ¨0t =k g t  ˙t 

with k > 1 and λ > 0 (damping term) which leads to the equation of a damped oscillator.

From equation (2) we infer that the total horizontal external force Q will be given by (8) Q=

F=

¨0  ¨x

=m ¨0  m l

2

­sin  ˙2 cos ¨

Inserting (7) into (8) and using (6) we get an example for a controlling force which stabilizes the pendulum for small deviations around the upright position θ = 0.

The equation of motion in three dimensions of the inverted pendulum with a moving pivoted endpoint is derived using the Lagrangian method.

Next we will derive the full equations for the pendulum in three dimensions. One can proceed as in the 2D-case, but we will use this example in order to illustrate the Lagrangian method.

(3)

Let ξξξξ = (ξ, η, ζ) denote the vector of the pivot point. We describe the attitude of the stick in the moving coordinate system using spherical coordinates. The kinetical energy of the stick can be written

(9)

T =1

2 m

˙˙˙˙

2 m l

2

{

cos 

˙ cos ˙sin 

­ ˙sin 

˙sin 

˙ cos ­ ˙sin 

˙

}

 1 2 I sin 2 ˙2  ˙2

For the potential energy of the stick we get

(10) V =mg l

2 cos mg 

The Lagrangian function L is then defined as L = T – V. The equations of motion of the stick in terms of the azimuth and longitud angles are then obtained from

(11) d

d t

∂ L∂ ˙

­∂ L∂ =0

(12) d

d t

∂ ˙∂ L

­∂ ∂ L=0

ϕ θ

ξ

η ζ

(4)

(13)

I ¨ – I sin  cos  ˙2 – mgl

2 sin =­ml

2

{

¨ coscos ¨cossin  – ¨sin 

}

Id

dt

sin 2 ˙

=­ml

2

{

­ ¨ sin sin  ¨sin  cos

}

We obtain (4) from (13) as a special case with ϕ = 0 (and interchange of ζ and η). Note that θ has different interpretations in (4) and (13). The external forces corresponding to (8) are obtained from

(14) Q= d

d t

∂ L∂ ˙

­∂ L∂ 

and so on for η- and ζ-directions. Thus, from (14 etc) we get for the components of the force

(15)

Q=m ¨m l

2

{

cos  cos  ¨­sin  sin  ¨­sin cos 

˙2  ˙2

­2 cos sin  ˙ ˙

}

Q=m ¨m l

2

{

cos  sin  ¨sin  cos  ¨­sin sin 

˙2  ˙2

2 cos cos  ˙ ˙

}

Q=m ¨ml

2

{

­sin  ¨­cos  ˙2

}

­mg

We will consider the same problem but using instead cylindrical coordinates (r, φ, y) with the axis along the y-direction, and the angle φ measured from the z-axis. Using these coordinates we can express x- and z-coordinates as

(16) x=

r2 ­ y2cos  z=

r2 ­ y2sin 

The Lagrangian for the homogenic stick becomes in the cylindrical coordinates

(17)

L=m1 2

˙˙˙˙

2

m

2

{

˙

­ y ˙yl2 – y2sin 

l2 – y2cos  ˙

 ˙ ˙y ˙

­ y ˙yl2 – y2cos ­

l2 ­ y2sin  ˙

 }

m

6

{

l2 – y2

˙2 l2 l2 – y˙y2 2

}

– m2 g

l2 – y2 cos  – m g 

From the Lagrangian equations in the angle and the y-variable we obtain the equations of motion as follows

(5)

(18) d

dt

{ 

1 – u2

˙

}

 3

2 l ¨

1 – u2cos ­3

2 l ¨

1 – u2sin ­3 g

2 l

1 – u2sin =0

and

(19) d

dt

{

1 – u˙u 2

}

 3 2 l

{

¨

1 – uu 2sin  ¨­ ¨ u

1 – u2

cos 

}

 3 g2 l u

1 – u2

cos =0

where we have used the notation u = y/l. From (18) we see that for very small |u| << 1 we get back the 2-dimensional case (4).

An example of the inverted pendulum problem is a stick balanced on the fingertip. Assume the pivot point only moves along the ξ-axis and that the motion of the stick is restricted to the vertical plane through the ξ-axis. In the linear approximation we suppose the problem can be formulated in terms of the equation for the stick and an equation for the hand (of mass M),

(20) ¨ – 3 g 2 l  3

2 l ¨=0 M ¨ ˙=FH ,

Here γ is a phenomenological friction coefficient of the arm muscle dynamics. The crucial point is finding the force FH, which controls the hand, such that the solutions of (20) mimic realistic movements. For a light stick we may neglect the “back reaction” on the hand in FH (20b). We may expect FH to depend on the delayed values θ(t – τ) and ξ(t – τ) of the variables θ and ξ due to a time delay τ of the sensory system. Using the vectors

(21) X =

˙˙

B=

­l / M1 / M0 0

we can write (20) as a state-space equation (22) ˙X t=A X B⋅FH X t­

where A is the matrix

0 1 0 0 ­/ M 0 0 0

(6)

The simplest form for FH is a linear function, (24) FHt = p t­ – q t­

and at least for small τ the equations (20) suggest this choice gives a stable system when q > 0 and (25) p  M g

While the first term on the RHS of (24) will tend to drive the angle θ to zero angle by pushing the hand forward when the stick tilts forward, the second term will tend to drive the postion ξ also to zero (marking the “neutral” postion of the hand). We could introduce noise by adding a noise term ε to (24), and following the Cabrera-Milton ansatz, we could also insert noise in the parametric control term by replacing the constant p in (24) by a fluctuating parameter

(26) p= p0 

where η is a random fluctuation. The idea is that if p0 is positioned near the stability boundary then fluctuations of the form (26) may cause temporary excursion into the instability region and thus perhaps enhance the corrective force. A physiological argument for (26) could be that the motor- sensory system as a computational system hardly is able to accurately estimate whatever “optimal value” for p in (24) (also considering the time-varying properties of biological systems) and this circumstance can be described as a fluctuation around an average value p0. The question is whether this parameter is indeed pushed to near the stability boundary (assuming the model can be applied to this case) as proposed by Cabrera and Milton in their model.

References

Related documents

This thesis presents regularity estimates for solutions to the free time dependent fractional Schr¨ odinger equation with initial data using the theory of Fourier transforms.. (1)

In this section, we will begin with a description of the most common method used for solving the heat equation; namely, the separation of variables.. Subse- quently, we can employ

One script about the simulations of the final theoretical model, another about the results of the experimental tests and finally, the last MATLAB script is used to know some

Keywords: Double inverted pendulum, nonlinear system, unstable dynamic system, dc motor, Maxon device, Hough transform, edge detection, pattern recognition, vision system, NI

Figure 24 shows the result from the modified cascade controller that controls the propeller angle and thrust using the velocity of the robot as well.. Robot regulated

This thesis can conclude that the deep RL algorithm DDPG can at least han- dle gaussian noise with mean 0 and standard deviation of 0.025 in the simple environment called

Figure 4.3 shows the time-evolution of the numerically computed and analytically derived two-soliton solutions for the Boussinesq equation.. Figure 4.4 does the same for the

EFEEE. The initialization rule for this mode will give a value of the relative velocity of the masses that contradicts the constitutive relation of the switch. Hence the mode is