1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Equations of Motion for Inverted Pendulum

  1. Nov 5, 2008 #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: [tex]x[/tex] is the position of the cart, and [tex]\theta[/tex] is the angular position of the pendulum, with zero being straight up (vertical) from the cart. The cart has mass [tex]m_{c}[/tex] and the pendulum has mass [tex]m_{p}[/tex] and length [tex]l[/tex]. The below equation is a combination of the equations for both generalized coordinates.

    [tex]\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[/tex]

    My gut feeling is that I cannot simply add [tex]B_{c} \stackrel{.}{x} + B_{p} \stackrel{.}{\theta}[/tex] to the left hand side and set the equation equal to [tex]F(t)[/tex]...:frown: Am I wrong?

    Thanks for your help!

    -Kerry
     
  2. jcsd
  3. Nov 5, 2008 #2
    OK, after some re-arranging and substitution, I get the following:

    [tex]\stackrel{..}{x} = \frac{gtan(\theta)}{2} - \frac{l\stackrel{..}{\theta}}{4cos(\theta)}[/tex]
    [tex]\stackrel{..}{\theta} = \frac{-2sin(\theta)(g(m_{c} + m_{p}) + 2m_{p}l\stackrel{.}{\theta}^{2}cos(\theta))}{l(4m_{p}cos^{2}(\theta) - m_{c} - m_{p})}[/tex]

    I'm somewhat confident that I can add my damping and forcing terms to the [tex]\stackrel{..}{x}[/tex] equation, and the position of the cart will calculate correctly. I'm also somewhat confident that doing this will make the equation for [tex]\stackrel{..}{\theta}[/tex] incorrect, even if I don't add the rotational damping term to that equation. Similarly, adding the rotational damping will make the cart position calculation wrong. Since the pendulum position is affected by cart motion, the rotational damping term will also make the pendulum position calculation incorrect. Is this thought process right?

    Thanks,

    Kerry
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Equations of Motion for Inverted Pendulum
Loading...