Skip to main content
deleted 36 characters in body
Source Link
hft
  • 23.3k
  • 2
  • 31
  • 67

Introduction

Hello,
II have to come up with a PD-controller for an inverted Spherical Cart Pendulum, therefore I tried to compute the Dynamics of such a Pendulum. Spherical Pendulum

The Spherical Cart Pendulum is a hybrid between the Cart Pole and the Spherical Pendulum. The underlying Cart can move in the X-Y Plane.

Cart Pole

Basics

$l$ is the length of the Pendulum, $m_p$ is the mass of the pendulum, $m_c$ is the mass of the cart, $\theta$ denotes the azimuthal and $\phi$ the polar

As generalized Coordinates I use the conversion between spherical Coordinates and cartesian Coordinates:

$$x=l\sin(\theta)\cos(\phi)$$ $$y=l\sin(\theta)\sin(\phi)$$ $$z=l\cos(\theta)$$

The generalized Coordinates for the Pendulum look like this:

$$x_p=l\sin(\theta)\cos(\phi)+x$$ $$y_p=l\sin(\theta)\sin(\phi)+y$$ $$z_p=l\cos(\theta)$$ and $$\dot x_p = -l\sin(\phi)\sin(\theta)\dot\phi+l\cos(\phi)\cos(\theta)\dot\theta+\dot x$$ $$\dot y_p = l\sin(\phi)\cos(\theta)\dot\theta+l\sin(\theta)\cos(\phi)\dot\phi+\dot y$$ $$\dot z_p = -l\sin(\theta)\dot \theta$$ The Lagrangian Equation is defined by: $$L=T-V$$ with $$T=T_c+T_p$$ $$T_c=\frac{1}{2}m_c(\dot x^2+\dot y^2)$$ $$T_c=\frac{1}{2}m_p(\dot x_p^2+\dot y_p^2 + \dot z_p^2)$$ and $$V=m_p\cdot g \cdot z_p$$ results in: $$L=- g l m_{p} \cos{\left(\theta \right)} + 0.5 l^{2} m_{p} \sin^{2}{\left(\theta \right)} \dot{\theta}^{2} + 0.5 m_{c} \dot{x}^{2} + 0.5 m_{c} \dot{y}^{2} + 0.5 m_{p} \left(- l \sin{\left(\phi \right)} \sin{\left(\theta \right)} \dot{\phi} + l \cos{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + \dot{x}\right)^{2} + 0.5 m_{p} \left(l \sin{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + l \sin{\left(\theta \right)} \cos{\left(\phi \right)} \dot{\phi} + \dot{y}\right)^{2}$$

and after $$\frac{\partial L}{\partial q_j}-\frac{d}{dt}\frac{\partial L}{\partial \dot q_j}=0$$

I get a set of differential equations$A=(\ddot \phi, \ddot \theta, \ddot x, \ddot y)^T$. They are all looking good, except one:

Now my Problem:

The equilibrium point of the inverted Pendulum I want to control is at $\theta=0$. Therefore the differential equation for $$ \ddot{\phi} =\frac{- 2 l \cos{\left(\theta \right)} \dot{\phi} \dot{\theta} + \sin{\left(\phi \right)} \ddot{x} - \cos{\left(\phi \right)} \ddot{y}}{l \sin{\left(\theta \right)}} $$

$$ \lim_{\theta \to 0}\ddot{\phi}=\infty $$ means that I cannot compute $\theta$ for very small angles. I know that for $\ddot x=0$ and $\ddot y=0$, $\ddot \phi$ is a cyclic Coordinate and displays the angular momentum.

How can I interpret $\ddot \phi$ in a way that my differential equation makes sense and does not explode into the infinity?

Thank you for your help!

Introduction

Hello,
I have to come up with a PD-controller for an inverted Spherical Cart Pendulum, therefore I tried to compute the Dynamics of such a Pendulum. Spherical Pendulum

The Spherical Cart Pendulum is a hybrid between the Cart Pole and the Spherical Pendulum. The underlying Cart can move in the X-Y Plane.

Cart Pole

Basics

$l$ is the length of the Pendulum, $m_p$ is the mass of the pendulum, $m_c$ is the mass of the cart, $\theta$ denotes the azimuthal and $\phi$ the polar

As generalized Coordinates I use the conversion between spherical Coordinates and cartesian Coordinates:

$$x=l\sin(\theta)\cos(\phi)$$ $$y=l\sin(\theta)\sin(\phi)$$ $$z=l\cos(\theta)$$

The generalized Coordinates for the Pendulum look like this:

$$x_p=l\sin(\theta)\cos(\phi)+x$$ $$y_p=l\sin(\theta)\sin(\phi)+y$$ $$z_p=l\cos(\theta)$$ and $$\dot x_p = -l\sin(\phi)\sin(\theta)\dot\phi+l\cos(\phi)\cos(\theta)\dot\theta+\dot x$$ $$\dot y_p = l\sin(\phi)\cos(\theta)\dot\theta+l\sin(\theta)\cos(\phi)\dot\phi+\dot y$$ $$\dot z_p = -l\sin(\theta)\dot \theta$$ The Lagrangian Equation is defined by: $$L=T-V$$ with $$T=T_c+T_p$$ $$T_c=\frac{1}{2}m_c(\dot x^2+\dot y^2)$$ $$T_c=\frac{1}{2}m_p(\dot x_p^2+\dot y_p^2 + \dot z_p^2)$$ and $$V=m_p\cdot g \cdot z_p$$ results in: $$L=- g l m_{p} \cos{\left(\theta \right)} + 0.5 l^{2} m_{p} \sin^{2}{\left(\theta \right)} \dot{\theta}^{2} + 0.5 m_{c} \dot{x}^{2} + 0.5 m_{c} \dot{y}^{2} + 0.5 m_{p} \left(- l \sin{\left(\phi \right)} \sin{\left(\theta \right)} \dot{\phi} + l \cos{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + \dot{x}\right)^{2} + 0.5 m_{p} \left(l \sin{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + l \sin{\left(\theta \right)} \cos{\left(\phi \right)} \dot{\phi} + \dot{y}\right)^{2}$$

and after $$\frac{\partial L}{\partial q_j}-\frac{d}{dt}\frac{\partial L}{\partial \dot q_j}=0$$

I get a set of differential equations$A=(\ddot \phi, \ddot \theta, \ddot x, \ddot y)^T$. They are all looking good, except one:

Now my Problem:

The equilibrium point of the inverted Pendulum I want to control is at $\theta=0$. Therefore the differential equation for $$ \ddot{\phi} =\frac{- 2 l \cos{\left(\theta \right)} \dot{\phi} \dot{\theta} + \sin{\left(\phi \right)} \ddot{x} - \cos{\left(\phi \right)} \ddot{y}}{l \sin{\left(\theta \right)}} $$

$$ \lim_{\theta \to 0}\ddot{\phi}=\infty $$ means that I cannot compute $\theta$ for very small angles. I know that for $\ddot x=0$ and $\ddot y=0$, $\ddot \phi$ is a cyclic Coordinate and displays the angular momentum.

How can I interpret $\ddot \phi$ in a way that my differential equation makes sense and does not explode into the infinity?

Thank you for your help!

Introduction

I have to come up with a PD-controller for an inverted Spherical Cart Pendulum, therefore I tried to compute the Dynamics of such a Pendulum. Spherical Pendulum

The Spherical Cart Pendulum is a hybrid between the Cart Pole and the Spherical Pendulum. The underlying Cart can move in the X-Y Plane.

Cart Pole

Basics

$l$ is the length of the Pendulum, $m_p$ is the mass of the pendulum, $m_c$ is the mass of the cart, $\theta$ denotes the azimuthal and $\phi$ the polar

As generalized Coordinates I use the conversion between spherical Coordinates and cartesian Coordinates:

$$x=l\sin(\theta)\cos(\phi)$$ $$y=l\sin(\theta)\sin(\phi)$$ $$z=l\cos(\theta)$$

The generalized Coordinates for the Pendulum look like this:

$$x_p=l\sin(\theta)\cos(\phi)+x$$ $$y_p=l\sin(\theta)\sin(\phi)+y$$ $$z_p=l\cos(\theta)$$ and $$\dot x_p = -l\sin(\phi)\sin(\theta)\dot\phi+l\cos(\phi)\cos(\theta)\dot\theta+\dot x$$ $$\dot y_p = l\sin(\phi)\cos(\theta)\dot\theta+l\sin(\theta)\cos(\phi)\dot\phi+\dot y$$ $$\dot z_p = -l\sin(\theta)\dot \theta$$ The Lagrangian Equation is defined by: $$L=T-V$$ with $$T=T_c+T_p$$ $$T_c=\frac{1}{2}m_c(\dot x^2+\dot y^2)$$ $$T_c=\frac{1}{2}m_p(\dot x_p^2+\dot y_p^2 + \dot z_p^2)$$ and $$V=m_p\cdot g \cdot z_p$$ results in: $$L=- g l m_{p} \cos{\left(\theta \right)} + 0.5 l^{2} m_{p} \sin^{2}{\left(\theta \right)} \dot{\theta}^{2} + 0.5 m_{c} \dot{x}^{2} + 0.5 m_{c} \dot{y}^{2} + 0.5 m_{p} \left(- l \sin{\left(\phi \right)} \sin{\left(\theta \right)} \dot{\phi} + l \cos{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + \dot{x}\right)^{2} + 0.5 m_{p} \left(l \sin{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + l \sin{\left(\theta \right)} \cos{\left(\phi \right)} \dot{\phi} + \dot{y}\right)^{2}$$

and after $$\frac{\partial L}{\partial q_j}-\frac{d}{dt}\frac{\partial L}{\partial \dot q_j}=0$$

I get a set of differential equations$A=(\ddot \phi, \ddot \theta, \ddot x, \ddot y)^T$. They are all looking good, except one:

Now my Problem:

The equilibrium point of the inverted Pendulum I want to control is at $\theta=0$. Therefore the differential equation for $$ \ddot{\phi} =\frac{- 2 l \cos{\left(\theta \right)} \dot{\phi} \dot{\theta} + \sin{\left(\phi \right)} \ddot{x} - \cos{\left(\phi \right)} \ddot{y}}{l \sin{\left(\theta \right)}} $$

$$ \lim_{\theta \to 0}\ddot{\phi}=\infty $$ means that I cannot compute $\theta$ for very small angles. I know that for $\ddot x=0$ and $\ddot y=0$, $\ddot \phi$ is a cyclic Coordinate and displays the angular momentum.

How can I interpret $\ddot \phi$ in a way that my differential equation makes sense and does not explode into the infinity?

fixed title
Link

Lagrangian DynamicDynamics of aan inverted Spherical Cart Pendulum

Source Link

Lagrangian Dynamic of a inverted Spherical Cart Pendulum

Introduction

Hello,
I have to come up with a PD-controller for an inverted Spherical Cart Pendulum, therefore I tried to compute the Dynamics of such a Pendulum. Spherical Pendulum

The Spherical Cart Pendulum is a hybrid between the Cart Pole and the Spherical Pendulum. The underlying Cart can move in the X-Y Plane.

Cart Pole

Basics

$l$ is the length of the Pendulum, $m_p$ is the mass of the pendulum, $m_c$ is the mass of the cart, $\theta$ denotes the azimuthal and $\phi$ the polar

As generalized Coordinates I use the conversion between spherical Coordinates and cartesian Coordinates:

$$x=l\sin(\theta)\cos(\phi)$$ $$y=l\sin(\theta)\sin(\phi)$$ $$z=l\cos(\theta)$$

The generalized Coordinates for the Pendulum look like this:

$$x_p=l\sin(\theta)\cos(\phi)+x$$ $$y_p=l\sin(\theta)\sin(\phi)+y$$ $$z_p=l\cos(\theta)$$ and $$\dot x_p = -l\sin(\phi)\sin(\theta)\dot\phi+l\cos(\phi)\cos(\theta)\dot\theta+\dot x$$ $$\dot y_p = l\sin(\phi)\cos(\theta)\dot\theta+l\sin(\theta)\cos(\phi)\dot\phi+\dot y$$ $$\dot z_p = -l\sin(\theta)\dot \theta$$ The Lagrangian Equation is defined by: $$L=T-V$$ with $$T=T_c+T_p$$ $$T_c=\frac{1}{2}m_c(\dot x^2+\dot y^2)$$ $$T_c=\frac{1}{2}m_p(\dot x_p^2+\dot y_p^2 + \dot z_p^2)$$ and $$V=m_p\cdot g \cdot z_p$$ results in: $$L=- g l m_{p} \cos{\left(\theta \right)} + 0.5 l^{2} m_{p} \sin^{2}{\left(\theta \right)} \dot{\theta}^{2} + 0.5 m_{c} \dot{x}^{2} + 0.5 m_{c} \dot{y}^{2} + 0.5 m_{p} \left(- l \sin{\left(\phi \right)} \sin{\left(\theta \right)} \dot{\phi} + l \cos{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + \dot{x}\right)^{2} + 0.5 m_{p} \left(l \sin{\left(\phi \right)} \cos{\left(\theta \right)} \dot{\theta} + l \sin{\left(\theta \right)} \cos{\left(\phi \right)} \dot{\phi} + \dot{y}\right)^{2}$$

and after $$\frac{\partial L}{\partial q_j}-\frac{d}{dt}\frac{\partial L}{\partial \dot q_j}=0$$

I get a set of differential equations$A=(\ddot \phi, \ddot \theta, \ddot x, \ddot y)^T$. They are all looking good, except one:

Now my Problem:

The equilibrium point of the inverted Pendulum I want to control is at $\theta=0$. Therefore the differential equation for $$ \ddot{\phi} =\frac{- 2 l \cos{\left(\theta \right)} \dot{\phi} \dot{\theta} + \sin{\left(\phi \right)} \ddot{x} - \cos{\left(\phi \right)} \ddot{y}}{l \sin{\left(\theta \right)}} $$

$$ \lim_{\theta \to 0}\ddot{\phi}=\infty $$ means that I cannot compute $\theta$ for very small angles. I know that for $\ddot x=0$ and $\ddot y=0$, $\ddot \phi$ is a cyclic Coordinate and displays the angular momentum.

How can I interpret $\ddot \phi$ in a way that my differential equation makes sense and does not explode into the infinity?

Thank you for your help!