Help with Inverted Pendulum on Cart EoM

In summary: The terms in parentheses are the torque on the pendulum due to those accelerations. In summary, the goal is to implement a working inverted pendulum on a cart with an industrial linear motor. The equation of motion is derived and it is unclear where the terms in parentheses come from. It is assumed that the inertia of the rigid body is accounted for. The displacement of the cart is x and the acceleration of the pendulum relative to the cart has tangential and radial components. The two terms are the horizontal components of those.
  • #1
macardoso
4
1
TL;DR Summary
Working engineer trying to relearn some control theory. Help me understand the derivation for the Inverted Pendulum on a Cart Equations of Motion
Hi All,

My goal is to relearn some control theory and implement a working inverted pendulum on a cart with an industrial linear motor. See video:

Working through an example of an inverted pendulum on a cart posted here: https://ctms.engin.umich.edu/CTMS/index.php?example=InvertedPendulum&section=SystemModeling

1676249581944.png


I'm on the part where the pendulum on a cart is broken into free body diagrams and the equations of motion are derived. In the equation below, the horizontal forces on the pendulum are summed to create an equality to the reaction force at the pendulum pivot "N".

When I'm looking at the "Force analysis and system equations", I am trying to understand where all the components of equation (2) come from. I know this is probably elementary, however I am missing some of the steps that are likely glossed over in this example. The equation is:
N = m*x'' + m*L*theta''*cos(theta) - m*L*(theta')^2*sin(theta)

OK, so I understand why "N" is here, it is the horizontal reaction force at the pivot.

m*X'' also makes sense as this is the force felt by the pendulum due to any horizontal acceleration of the system.

I don't understand the term m*L*theta''*cos(theta). I think this might be a torque due to rotational acceleration of the pendulum, but if so, where is the inertia of the rigid body accounted for?

I'm rather unclear about this one, but I have a feeling that m*L*(theta')^2*sin(theta) comes from centripetal acceleration in the form F=m*r*(theta')^2.

I guess one additional question I have is how we know we have actually accounted for all the forces. In this example, I know the end solution so it was easy to see when I was missing something, but if I didn't how would I know if I forgot the centripetal acceleration?
 
Engineering news on Phys.org
  • #2
macardoso said:
m*X'' also makes sense as this is the force felt by the pendulum due to any horizontal acceleration of the system.

I don't understand the term m*L*theta''*cos(theta). I think this might be a torque due to rotational acceleration of the pendulum, but if so, where is the inertia of the rigid body accounted for?

I'm rather unclear about this one, but I have a feeling that m*L*(theta')^2*sin(theta) comes from centripetal acceleration in the form F=m*r*(theta')^2.

I guess one additional question I have is how we know we have actually accounted for all the forces. In this example, I know the end solution so it was easy to see when I was missing something, but if I didn't how would I know if I forgot the centripetal acceleration?
x is the displacement of the cart. The acceleration of the pendulum relative to the cart has tangential and radial components. The two terms are the horizontal components of those.
 

Related to Help with Inverted Pendulum on Cart EoM

What is the Equation of Motion (EoM) for an inverted pendulum on a cart?

The Equation of Motion (EoM) for an inverted pendulum on a cart is derived using either Newton's second law or the Lagrangian mechanics approach. It typically results in a set of coupled, nonlinear differential equations that describe the dynamics of both the cart and the pendulum. The equations account for the forces and torques acting on the system, including gravity, friction, and any external inputs or control forces applied to the cart.

How do you derive the EoM for an inverted pendulum on a cart using Lagrangian mechanics?

To derive the EoM using Lagrangian mechanics, you first define the Lagrangian of the system, which is the difference between the kinetic and potential energies. For the inverted pendulum on a cart, you need to express the kinetic and potential energies in terms of the generalized coordinates (e.g., the position of the cart and the angle of the pendulum). Then, you apply the Euler-Lagrange equation to obtain the equations of motion. This method typically involves calculating partial derivatives of the Lagrangian with respect to the generalized coordinates and their time derivatives.

What are the common control strategies for stabilizing an inverted pendulum on a cart?

Common control strategies for stabilizing an inverted pendulum on a cart include Proportional-Derivative (PD) control, Proportional-Integral-Derivative (PID) control, Linear-Quadratic Regulator (LQR), and State Feedback Control. Each strategy has its own advantages and is chosen based on the specific requirements of the system, such as robustness, response time, and ease of implementation. Advanced methods like Model Predictive Control (MPC) and adaptive control can also be used for more complex scenarios.

What are the challenges in simulating an inverted pendulum on a cart?

Challenges in simulating an inverted pendulum on a cart include accurately modeling the nonlinear dynamics, dealing with parameter uncertainties, and ensuring numerical stability. The system is inherently unstable, so small errors in the model or numerical integration can lead to significant deviations over time. Additionally, simulating real-world conditions such as friction, external disturbances, and actuator limitations adds complexity to the model.

How can you implement a simulation of an inverted pendulum on a cart in MATLAB or Python?

To implement a simulation in MATLAB or Python, you need to discretize the equations of motion using numerical integration methods like Euler's method, Runge-Kutta methods, or built-in solvers like `ode45` in MATLAB or `odeint` in Python. You then write a script to define the system parameters, initial conditions, and control inputs. The simulation loop updates the

Similar threads

  • Mechanical Engineering
Replies
19
Views
1K
  • Introductory Physics Homework Help
Replies
20
Views
1K
  • Introductory Physics Homework Help
Replies
9
Views
965
  • Mechanical Engineering
Replies
1
Views
2K
Replies
2
Views
430
  • Programming and Computer Science
Replies
1
Views
2K
Replies
3
Views
896
Replies
1
Views
206
Replies
1
Views
380
Replies
1
Views
474
Back
Top