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 Newton's second law=== Oftentimes it is beneficial to use [[Newton's laws of motion|Newton's second law]] instead of [[Lagrangian mechanics|Lagrange's equations]] because Newton's equations give the reaction forces at the joint between the pendulum and the cart. These equations give rise to two equations for each body; one in the x-direction and the other in the y-direction. The equations of motion of the cart are shown below where the LHS is the sum of the forces on the body and the RHS is the acceleration. :<math> F-R_x = M \ddot x </math> :<math> F_N - R_y - M g = 0 </math> In the equations above <math>R_x</math> and <math>R_y</math> are reaction forces at the joint. <math>F_N</math> is the normal force applied to the cart. This second equation depends only on the vertical reaction force, thus the equation can be used to solve for the normal force. The first equation can be used to solve for the horizontal reaction force. In order to complete the equations of motion, the acceleration of the point mass attached to the pendulum must be computed. The position of the point mass can be given in inertial coordinates as :<math> \vec r_P = (x-\ell \sin \theta) \hat x_I + \ell \cos \theta \hat y_I </math> Taking two derivatives yields the acceleration vector in the inertial reference frame. :<math> \vec a_{P/I} = (\ddot x + \ell \dot \theta^2 \sin \theta - \ell \ddot \theta \cos \theta ) \hat x_I + (-\ell \dot \theta^2 \cos \theta - \ell \ddot \theta \sin \theta) \hat y_I </math> Then, using Newton's second law, two equations can be written in the x-direction and the y-direction. Note that the reaction forces are positive as applied to the pendulum and negative when applied to the cart. This is due to Newton's third law. :<math> R_x = m(\ddot x + \ell \dot \theta^2 \sin \theta - \ell \ddot \theta \cos \theta ) </math> :<math> R_y - m g = m (-\ell \dot \theta^2 \cos \theta - \ell \ddot \theta \sin \theta) </math> The first equation allows yet another way to compute the horizontal reaction force in the event the applied force <math>F</math> is not known. The second equation can be used to solve for the vertical reaction force. The first equation of motion is derived by substituting <math>F-R_x = M \ddot x</math> into <math>R_x = m(\ddot x + \ell \dot \theta^2 \sin \theta - \ell \ddot \theta \cos \theta )</math>, which yields :<math> \left (M+m \right) \ddot x - m \ell \ddot \theta \cos \theta + m \ell \dot \theta^2 \sin \theta = F </math> By inspection this equation is identical to the result from Lagrange's Method. In order to obtain the second equation, the pendulum equation of motion must be dotted with a unit vector that runs perpendicular to the pendulum at all times and is typically noted as the x-coordinate of the body frame. In inertial coordinates this vector can be written using a simple 2-D coordinate transformation :<math> \hat x_B = \cos \theta \hat x_I + \sin \theta \hat y_I </math> The pendulum equation of motion written in vector form is <math>\sum \vec F = m \vec a_{P/I}</math>. Dotting <math>\hat x_B</math> with both sides yields the following on the LHS (note that a transpose is the same as a [[dot product]]) :<math> (\hat x_B)^T\sum \vec F = (\hat x_B)^T (R_x \hat x_I + R_y \hat y_I - m g \hat y_I) = (\hat x_B)^T(R_p \hat y_B - m g \hat y_I) = -m g \sin \theta </math> In the above equation the relationship between body frame components of the reaction forces and inertial frame components of reaction forces is used. The assumption that the bar connecting the point mass to the cart is massless implies that this bar cannot transfer any load perpendicular to the bar. Thus, the inertial frame components of the reaction forces can be written simply as <math>R_p \hat y_B</math>, which signifies that the bar can transfer loads only along the axis of the bar itself. This gives rise to another equation that can be used to solve for the tension in the rod itself: :<math> R_p = \sqrt{ R_x^2 + R_y^2} </math> The RHS of the equation is computed similarly by dotting <math>\hat x_B</math> with the acceleration of the pendulum. The result (after some simplification) is shown below. :<math> m(\hat x_B)^T(\vec a_{P/I}) = m(\ddot x \cos \theta - \ell \ddot \theta) </math> Combining the LHS with the RHS and dividing through by m yields :<math> \ell \ddot \theta - g \sin \theta = \ddot x \cos \theta </math> which again is identical to the result of Lagrange's method. The benefit of using Newton's method is that all reaction forces are revealed to ensure that nothing is damaged. For a derivation of the equations of motions from Newton's second law, as above, using the Symbolic Math Toolbox<ref>{{cite web| url = https://www.mathworks.com/help/symbolic/derive-and-simulate-cart-pole-system.html| title = Derive Equations of Motion and Simulate Cart-Pole System}}</ref> and references therein.
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)