Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Inverted pendulum
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== From Lagrange's equations === The equations of motion can be derived using [[Lagrangian mechanics|Lagrange's equations]]. We refer to the drawing to the right where <math>\theta(t)</math> is the angle of the pendulum of length <math>l</math> with respect to the vertical direction and the acting forces are gravity and an external force ''F'' in the x-direction. Define <math>x(t)</math> to be the position of the cart. The kinetic energy <math>T</math> of the system is: :<math> T = \frac{1}{2} M v_1^2 + \frac{1}{2} m v_2^2, </math> where <math>v_1</math> is the velocity of the cart and <math>v_2</math> is the velocity of the point mass <math>m</math>. <math>v_1</math> and <math>v_2</math> can be expressed in terms of x and <math>\theta</math> by writing the velocity as the first derivative of the position; :<math> v_1^2=\dot x^2, </math> :<math> v_2^2=\left({\frac{\rm d}{{\rm d}t}}{\left(x- \ell\sin\theta\right)}\right)^2 + \left({\frac{\rm d}{{\rm d}t}}{\left( \ell\cos\theta \right)}\right)^2. </math> Simplifying the expression for <math>v_2</math> leads to: :<math> v_2^2= \dot x^2 -2 \ell \dot x \dot \theta\cos \theta + \ell^2\dot \theta^2. </math> The kinetic energy is now given by: :<math> T = \frac{1}{2} \left(M+m \right ) \dot x^2 -m \ell \dot x \dot\theta\cos\theta + \frac{1}{2} m \ell^2 \dot \theta^2. </math> The generalized coordinates of the system are <math>\theta</math> and <math>x</math>, each has a generalized force. On the <math>x</math> axis, the generalized force <math>Q_x</math> can be calculated through its virtual work :<math> Q_x\delta x=F \delta x,\quad Q_x=F, </math> on the <math>\theta</math> axis, the generalized force <math>Q_\theta</math> can be also calculated through its virtual work :<math> Q_\theta\delta\theta=mgl\sin\theta \delta \theta,\quad Q_\theta=mgl\sin\theta. </math> According to the [[Lagrangian mechanics|Lagrange's equations]], the equations of motion are: :<math> \frac{\mathrm{d}}{\mathrm{d}t}{\partial{T}\over \partial{\dot x}} - {\partial{T}\over \partial x} = F, </math> :<math> \frac{\mathrm{d}}{\mathrm{d}t}{\partial{T}\over \partial{\dot \theta}} - {\partial{T}\over \partial \theta} = mgl\sin\theta, </math> substituting <math>T</math> in these equations and simplifying leads to the equations that describe the motion of the inverted pendulum: :<math> \left ( M + m \right ) \ddot x - m \ell \ddot \theta \cos \theta + m \ell \dot \theta^2 \sin \theta = F, </math> :<math> \ell \ddot \theta - g \sin \theta = \ddot x \cos \theta. </math> These equations are nonlinear, but since the goal of a control system would be to keep the pendulum upright, the equations can be linearized around <math>\theta \approx 0</math>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)