Lagrangian: Inverted telescoping pendulum (robot leg)

In summary: I will try to get a diagram sorted out this weekend.Thanks very much for your replies so far :)In summary, the conversation discusses the design and control of a robot that rocks sideways on its legs. The speaker's goal is to design a control system using mathematical models, but they are struggling with the math. They provide equations and ask for clarification on certain terms, such as the use of the Lagrangian and accounting for friction. The discussion also touches on using sensors and controlling the length of the robot's leg to stabilize its movement.
  • #1
garethpriede
6
0
Hi, hopefully someone can check my logic.

I have a lever with a mass on top which is rising towards the vertical on a frictionless pivot. The length of the lever can change. (In reality this is a robot rocking onto a foot and straightening its leg). The intention is to bring the lever to a halt at the vertical by continuously controlling the length.

I've been trying to use the Langrangian, but I'm not sure if I've captured the variables correctly.

x is the length of the leg, theta is the angle from the vertical (so 0 is upright). (I hope my latex paste comes out ok)

L=T-V \\
L=\left[\frac{1}{2}m\omega^{2}+\frac{1}{2}m\dot{x}^{2}\right]-mgxcos(\theta) \\
L=\frac{1}{2}m(x^{2}\dot{\theta}^{2}+\dot{x}^{2})-mgxcos(\theta)\\
\frac{d}{dt}\frac{\partial L}{\partial\dot{\theta}}=\frac{\partial L}{\partial\theta}\\
m\dot{x}^{2}\ddot{\theta}=mgxsin(\theta)\\
\frac{d}{dt}\frac{\partial L}{\partial\dot{x}}=\frac{\partial L}{\partial x}\\
m\ddot{x}=mx\dot{\theta}^{2}+mgsin(\theta)

What worries me is the first partial derivative, something seems to be missing. Do I need to account for the energy involved in extending the leg?

Then if you don't mind a mini part 2, if the pivot has friction, can I still use the Lagrangian (I assume not, but perhaps it's just an extra coefficient somewhere)
 
Physics news on Phys.org
  • #2
garethpriede said:
I have a lever with a mass on top which is rising towards the vertical on a frictionless pivot. The length of the lever can change. (In reality this is a robot rocking onto a foot and straightening its leg).
Welcome to PF, Garethpriede.
If reality is involved, why on Earth would you assume a frictionless pivot?
I have no idea about anything mathematical; I don't even know what a "Lagrangian" is, other than in reference to a Lagrange orbital point.
I can't help wondering, though, why you can't just use a position sensor even as simple as a potentiometer to simply measure the leg position. That's how I'd do it, but I'm no genius. There are a lot of heavy-duty engineers and physicists here who can deal with the question in the way that you are hoping for. Unfortunately, I'm not one of them. :smile:
 
  • #3
Hi, thanks for the welcome :)

I have sensors etc so I know what's happening in reality. But I need to design the control system and that requires some maths. Even if I'm making some simplifications, I need a solid base to start on. I saw quite a few other posts on solving Lagrangians, and even for pendulums and pendulums on springs, so I was hoping someone would see the "obvious flaw" in my derivation.
 
  • #4
Ah, I see. Hmm... Fred Garvin was one of the PF experts in control systems, but I haven't seen anything from him in a long time. I think that Brewnog is very knowledgeable in the field as well, and definitely Astronuc. I'm sure that one or more of them can set you up.
 
  • #5
Sorry but the Latex code not coming out was really bugging me!

[tex]
L=T-V
[/tex]

then

[tex]
L=\left[\frac{1}{2}m\omega^{2}+\frac{1}{2}m\dot{x}^{2}\right]-mgxcos(\theta)
[/tex]

then

[tex]
L=\frac{1}{2}m(x^{2}\dot{\theta}^{2}+\dot{x}^{2})-mgxcos(\theta)\\
[/tex]

then

[tex]
\frac{d}{dt}\frac{\partial L}{\partial\dot{\theta}}=\frac{\partial L}{\partial\theta}\\
[/tex]

then

[tex]
m\dot{x}^{2}\ddot{\theta}=mgxsin(\theta)\\
[/tex]

and

[tex]
\frac{d}{dt}\frac{\partial L}{\partial\dot{x}}=\frac{\partial L}{\partial x}\\
[/tex]

then

[tex]
m\ddot{x}=mx\dot{\theta}^{2}+mgsin(\theta)
[/tex]

Isn't the energy of a rotating system
[tex]
E_{rot} = \frac{1}{2}I\omega^{2}
[/tex]

You can use the parallel-axis theorem to work out the mass-moment of inertia and I'm pretty damn sure that it will be a function of your x variable, that will probably create the missing extending arm term your missing.

I'm interested how your going to control this - are you going to go for a state-space control of the pendulum ?
 
Last edited:
  • #6
If you want to add in friction you can model it using Reyleigh dissipation, basically the frictional terms appear as extra forces, so you get:

[tex]\frac{d}{dt}\frac{\partial L}{\partial\dot{q}_{i}}-\frac{\partial L}{\partial q_{i}}=Q_{i}-D_{i}\dot{q_{i}}[/tex]

Here [tex]Q_i[/tex] are the external applied forces for that i'th degree of freedom and [tex]D_i\dot{q_i}[/tex] are the friction terms you require.

Sounds like a really fun problem :)

Are you sure that is the right way to model the problem? Is the robot leg bending to change length?

Can you please submit a diagram so that we can see the degrees of freedom?

Lastly, if all that you can control is the length of the leg you're going to have a tough time to stabilise the system in the upright condition. Some work was done on stabilising an inverted pendulum using only movements that are parrallel to the length of the pendulum but that requires really high frequency pulsing.
 
Last edited:
  • #7
thanks for the reply, sorry for the delay in my reply.

to provide some more input, I want a robot to rock sideways from leg to leg. So at t=0, the robot is balanced on the left leg with the right leg in the air and the legs are splayed by about 10degrees. It then starts to fall to the right until it lands on the right leg. Its momentum keeps it moving and it rises up on the right leg until it runs out of energy. It then falls back to the left again and repeats. There are losses in the ankle joint and the landing collision, so eventually the rocking comes to a halt.

In order to overcome the losses and also to control the rocking frequency, i control the length of the landing leg (or you could call it the pivot leg) while the robot is rising and slowing down.

i'm not interested in the dynamics while the robot is falling or with the collision, i only want to model what happens as the robot is rising on the pivot leg with a continuously changing leg length. so I can model this as an inverted pendulum with all the mass at the tip, having some initial angular velocity and some initial angle with the vertical.

my first practical attempt is quite simple, I shorten the landing leg by a fixed amount to ensure there's enough angular velocity to keep the robot moving, then shortly afterwards, as soon as I have enough data to calculate the resulting angular velocity, I lengthen the leg once by some amount to stop it rocking too far (which I calculate using conservation of angular momentum, but that isn't the focus of this post)

This results in a very rough controller which does work at keeping the robot rocking indefinitely, but without any insight into the frequency etc, and without the mathematical model to continuously control the leg length.

So I've been trying to get a full non-linear model of the system, but my maths isn't up to it. It looks like a similar problem to the classical inverted-pendulum-on-a-cart problem, but without the cart and with a variable pendulum length. I'm happy to ignore the friction in the joint for now, I can determine it experimentally later, as a first go I just need to model the effect of leg length.

Any help is greatly appreciated.
 
  • #8
Im assuming a point mass at the tip of an extendable rod, angle is zero when the rod is upright, the x direction is along the horizontal and y direction is along the vertical.

Let the position vector be [tex]r(t)=[x,y][/tex]

[tex]r(t)=[x(t)-l(t)sin\theta(t),\, l(t)cos\theta(t)][/tex]

Therefore
[tex]T=1/2m\dot{r(t)}\bullet\dot{r(t)}[/tex]

Note: this is the vector dot product of [tex]\dot{r(t)}[/tex] with itself.

[tex]V=mgl(t)cos(\theta(t))[/tex]

Now the Lagragian is
[tex]L=T-V[/tex]
and you do exactly what we did before with the Lagrangian for each of the variables
[tex]x(t),\theta(t), l(t)[/tex]
but only [tex]l(t)[/tex] is actuated.

Hence you'll get

[tex]\frac{d}{dt}\frac{\partial L}{\partial \dot{x}}-\frac{\partial L}{\partial x}=0[/tex]

[tex]\frac{d}{dt}\frac{\partial L}{\partial \dot{l}}-\frac{\partial L}{\partial l}=F_l[/tex]

[tex]\frac{d}{dt}\frac{\partial L}{\partial \dot{\theta}}-\frac{\partial L}{\partial \theta}=0[/tex]

where [tex]F_l[/tex] is the force you apply to lengthen or shorten the leg.

I hope that's the sort of thing you were looking for :smile:
 
Last edited:
  • #9
As an aside, the other leg (i.e. the one not being balanced on) will enter the model as a stray (constant) torque in the [tex]\theta[/tex] co-ordinate, so you'll probably need to include it to model the dynamics correctly.

Lastly, you are probably only interested in the dynamics in the [tex]\theta[/tex] co-ordinate only so you can neglect the other two equations if you assume that [tex]l(t)[/tex] moves to its controlled value much much faster than [tex]\theta(t)[/tex] changes.

Hence you have

[tex]\frac{d}{dt}\frac{\partial L}{\partial \dot{\theta}}-\frac{\partial L}{\partial \theta}=\tau_s[/tex]

where [tex]\tau_s[/tex] is the stray torque I mentioned earlier
 
Last edited:
  • #10
Thankyou very much, that makes much better sense now. That's exactly what I was hoping to find out.
 
  • #11
My pleasure :smile:

I've thought about some further refinements where you make the stray torque depend on the angle of the leg if you want to.

[tex]\frac{d}{dt}\frac{\partial L}{\partial \dot{\theta}}-\frac{\partial L}{\partial \theta}=\tau_s(\theta)[/tex]

Good luck!
Let us know how it goes ^^
 

1. What is a Lagrangian inverted telescoping pendulum?

A Lagrangian inverted telescoping pendulum is a type of robot leg that uses a telescoping mechanism to mimic the movement of a human leg. It is named after Joseph-Louis Lagrange, a mathematician who developed a mathematical formula to describe the motion of a pendulum.

2. How does a Lagrangian inverted telescoping pendulum work?

The leg is composed of two segments connected by a telescoping mechanism, with the bottom segment representing the thigh and the top segment representing the shin. The telescoping mechanism allows the segments to extend and retract, mimicking the movement of a human leg. The motion is controlled by a series of motors and sensors, which use the Lagrangian formula to calculate the position and velocity of the pendulum.

3. What are the benefits of using a Lagrangian inverted telescoping pendulum?

The use of a Lagrangian inverted telescoping pendulum allows for more natural and efficient movement in robot legs. It also allows for greater stability and control, as the telescoping mechanism can adjust for uneven surfaces and obstacles.

4. What are the applications of a Lagrangian inverted telescoping pendulum?

This type of robot leg can be used in various industries, such as manufacturing, healthcare, and search and rescue. It can also be used in prosthetics to provide more natural movement for amputees.

5. Are there any challenges or limitations to using a Lagrangian inverted telescoping pendulum?

One of the main challenges is the complexity of the control system, as it requires precise calculations and coordination between the motors and sensors. Additionally, the telescoping mechanism may be prone to wear and tear over time. However, advancements in technology and materials are constantly improving the design and functionality of these legs.

Similar threads

Replies
3
Views
740
  • Mechanics
Replies
3
Views
973
Replies
2
Views
189
Replies
3
Views
941
Replies
76
Views
4K
Replies
2
Views
867
  • Mechanics
Replies
24
Views
988
Replies
3
Views
496
Replies
8
Views
237
Replies
7
Views
937
Back
Top