KLoux
- 174
- 1
I'm working on a simple simulation for an inverted pendulum mounted on a cart. I derived the equations of motion using Lagrangian dynamics, but I want to go back and add viscous damping terms to the linear motion of the cart, as well as the angular motion of the pendulum. I also want to add a driving force to the cart (my end goal is a non-linear controls simulation). Can I add these terms to the equation I initially derived, or do I need to re-derive the equations from the beginning? I think I know the answer to this, but I was hoping someone might have better advice - it's been a long time since I've done anything with Lagrange multipliers (or Lagrange dynamics at all, for that matter).
This is what I came up with for the conservative system: x is the position of the cart, and \theta is the angular position of the pendulum, with zero being straight up (vertical) from the cart. The cart has mass m_{c} and the pendulum has mass m_{p} and length l. The below equation is a combination of the equations for both generalized coordinates.
\stackrel{..}{x}(m_{c} + m_{p} - cos(\theta)) + \stackrel{..}{\theta}(m_{p}l cos(\theta) - l/4) + sin(\theta)(g/2 - m_{p}l\stackrel{.}{\theta}^{2})=0
My gut feeling is that I cannot simply add B_{c} \stackrel{.}{x} + B_{p} \stackrel{.}{\theta} to the left hand side and set the equation equal to F(t)...
Am I wrong?
Thanks for your help!
-Kerry
This is what I came up with for the conservative system: x is the position of the cart, and \theta is the angular position of the pendulum, with zero being straight up (vertical) from the cart. The cart has mass m_{c} and the pendulum has mass m_{p} and length l. The below equation is a combination of the equations for both generalized coordinates.
\stackrel{..}{x}(m_{c} + m_{p} - cos(\theta)) + \stackrel{..}{\theta}(m_{p}l cos(\theta) - l/4) + sin(\theta)(g/2 - m_{p}l\stackrel{.}{\theta}^{2})=0
My gut feeling is that I cannot simply add B_{c} \stackrel{.}{x} + B_{p} \stackrel{.}{\theta} to the left hand side and set the equation equal to F(t)...
Thanks for your help!
-Kerry