Skip to content

Commit

Permalink
issue #54
Browse files Browse the repository at this point in the history
improved indices
  • Loading branch information
tania-morozova authored and isvasia committed Dec 28, 2018
1 parent d82a5db commit 5025b58
Showing 1 changed file with 68 additions and 57 deletions.
125 changes: 68 additions & 57 deletions doc/chap_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -518,23 +518,32 @@ are shown in green. Observe that in the congested mode, the density
:math:`x_2` in the congested part decreases slightly, while the density
:math:`x_1` upstream of the congested part increases. The blue set above
the guard is not actually reached, because the state evolves according
to the green region.

to the green region.


.. raw:: html

<h2>References</h2>

.. [SUN2003] L.Muñoz, X.Sun, R.Horowitz, and L.Alvarez. 2003. Traffic Density
Estimation with the Cell Transmission Model. In *Proceedings of the
American Control Conference*, 3750–3755. Denver, Colorado, USA.
Inverted Pendulum On a Cart
---------------------------


.. _invpendfig:

.. figure:: /pic/chapter06_section05_inpendulum.png
:alt: invpend
:width: 50 %

Inverted pendulum

Consider a mechanical system consisting of a cart (body 1) and a rod (body 2) attached to the cart with a joint. We assume that movement of the bodies is plane. The system represents an inverted pendulum with unstable equilibrium at :math:`\theta = \frac{\pi}{2}.` There is a control :math:`u(t)` that presents a force applied to the cart along the axis OX.

Therefore we define

:width: 50 %

Inverted pendulum

Consider a mechanical system consisting of a cart (body 1) and a rod (body 2) attached to the cart with a joint. We assume that movement of the bodies is plane. The system represents an inverted pendulum with unstable equilibrium at :math:`\theta = \frac{\pi}{2}.` There is a control :math:`u(t)` that presents a force applied to the cart along the axis OX.

Therefore we define

- :math:`\theta` - angle between axis OX and the rod;

- :math:`m_1` and :math:`m_2` - weights of the bodies 1 and 2 respectively;
Expand All @@ -545,43 +554,43 @@ Therefore we define

- :math:`J_c` - inertia moment of the second body relative to its center of mass;

- :math:`u` - the force applied to cart and we assume :math:`|u| \leqslant \alpha`.


Firstly we consider the system without any control. Writing down expressions for kinetic and potential energies of the bodies 1 and 2 we obtain:

.. math::
:label: invpend_energy
\begin{aligned}
T_1 &= \frac{m_1v^2}{2}, \\
T_2 &= \frac{J_c\omega^2}{2}, \\
\Pi_1 &= 0, \\
\Pi_2 &= m_2g\frac{L}{2}\sin(\theta).
\end{aligned}
Here :math:`T_1` and :math:`T_2` stand for kinetic energy of cart and rod respectively, :math:`\Pi_1` and :math:`\Pi_2` stand for potential energy, :math:`v` is a speed of a cart and :math:`\omega` is an angular velocity of the rod. Further we will replace :math:`v` with :math:`\dot x`, :math:`\omega` with :math:`\dot \theta`.

As there is viscosity, we write down generalized forces:

.. math::
:label: invpend_forces
\begin{aligned}
Q_1 &= k_1\dot x, \\
Q_2 &= k_2L\dot \theta.
\end{aligned}
Writing down the Langrange equations in case of potential and nonpotential forces we obtain:

.. math::
:label: invpend_lagrange
\frac{d}{dt}(\frac{\partial T}{\partial \dot q_i}) - \frac{\partial T}{\partial q_i} + \frac{\partial \Pi}{\partial q_i} = Q_i.
Here the Lagrange coordinates :math:`q_1 = x, q_2 = \theta`, :math:`T = T_1 + T_2, \Pi = \Pi_1 + \Pi_2`.

Applying previously obtained values to the equations and adding the control to the first equation, we get:
- :math:`u` - the force applied to cart and we assume :math:`|u| \leqslant \alpha`.


Firstly we consider the system without any control. Writing down expressions for kinetic and potential energies of the bodies 1 and 2 we obtain:

.. math::
:label: invpend_energy
\begin{aligned}
T_1 &= \frac{m_1v^2}{2}, \\
T_2 &= \frac{J_c\omega^2}{2}, \\
\Pi_1 &= 0, \\
\Pi_2 &= m_2g\frac{L}{2}\sin(\theta).
\end{aligned}
Here :math:`T_1` and :math:`T_2` stand for kinetic energy of cart and rod respectively, :math:`\Pi_1` and :math:`\Pi_2` stand for potential energy, :math:`v` is a speed of a cart and :math:`\omega` is an angular velocity of the rod. Further we will replace :math:`v` with :math:`\dot x`, :math:`\omega` with :math:`\dot \theta`.

As there is viscosity, we write down generalized forces:

.. math::
:label: invpend_forces
\begin{aligned}
Q_1 &= k_1\dot x, \\
Q_2 &= k_2L\dot \theta.
\end{aligned}
Writing down the Langrange equations in case of potential and nonpotential forces we obtain:

.. math::
:label: invpend_lagrange
\frac{d}{dt}(\frac{\partial T}{\partial \dot q_i}) - \frac{\partial T}{\partial q_i} + \frac{\partial \Pi}{\partial q_i} = Q_i.
Here the Lagrange coordinates :math:`q_1 = x, q_2 = \theta`, :math:`T = T_1 + T_2, \Pi = \Pi_1 + \Pi_2`.

Applying previously obtained values to the equations and adding the control to the first equation, we get:

.. math::
:label: invpend1
Expand All @@ -591,10 +600,10 @@ Applying previously obtained values to the equations and adding the control to t
.. math::
:label: invpend2
(J_c + \frac{m_2L^2}{4})\ddot{\theta}+\frac{m_2gL\cos(\theta)}{2} + k_2\dot{\theta}L = 0 .
After linerarization in the neighbourhood of :math:`\frac{\pi}{2}` we have :math:`\cos(\theta) \approx \frac{\pi}{2} - \theta`.
(J_c + \frac{m_2L^2}{4})\ddot{\theta}+\frac{m_2gL\cos(\theta)}{2} + k_2\dot{\theta}L = 0 .
After linerarization in the neighbourhood of :math:`\frac{\pi}{2}` we have :math:`\cos(\theta) \approx \frac{\pi}{2} - \theta`.
Defining :math:`x_1 = x, x_2=\dot{x}_1, x_3 = \theta` and :math:`x_4=\dot{x}_3`, we can rewrite :eq:`invpend1`-:eq:`invpend2` as a linear system in standard form:

.. math::
Expand All @@ -617,12 +626,12 @@ Defining :math:`x_1 = x, x_2=\dot{x}_1, x_3 = \theta` and :math:`x_4=\dot{x}_3`,
0 \\
\frac{1}{m_1} \\
0 \\
0 \end{array}\right]u + \left[\begin{array}{cc}
0 \\
0 \\
0 \\
0 \end{array}\right]u + \left[\begin{array}{cc}
0 \\
0 \\
0 \\
-\frac{m_2Lg\pi}{4J_c+m_2L^2} \end{array}\right].
Consider some moment of time :math:`t_1` and final position :math:`x_1(t_1) = x_1, x_2(t_1) = 0, x_3(t_1) = \frac{\pi}{2}, x_4(t_1) = 0`. It is required to calculate the backward reachability sets (tube) for the linearized system :eq:`invpendls` emanating from the given final position and project it onto :math:`(x_1, x_3)` subspace. It is also required to identify whether it’s possible to reach the final position from a given initial position :math:`x_1(t_1) = x_1, x_2(t_1) = v_1, x_3(t_1) = \theta_1, x_4(t_1) = \omega_1` using some admissible control function.

.. raw:: html
Expand Down Expand Up @@ -1004,6 +1013,8 @@ Solving collision problem:
robust longitudinal guidance. Proceedings of the 17th World Congress
The International Federation of Automatic Control
Seoul, Korea, July 6-11, 2008
=======
Consider some moment of time :math:`t_1` and final position :math:`x_1(t_1) = x^1_1, x_2(t_1) = 0, x_3(t_1) = \frac{\pi}{2}, x_4(t_1) = 0`. It is required to calculate the backward reachability sets (tube) for the linearized system :eq:`invpendls` emanating from the given final position and project it onto :math:`(x_1, x_3)` subspace. It is also required to identify whether it’s possible to reach the final position from a given initial position :math:`x_1(t_0) = x^0_1, x_2(t_0) = v_1, x_3(t_0) = \theta_1, x_4(t_0) = \omega_1` using some admissible control function.

Blending tank with delay
------------------------
Expand Down

0 comments on commit 5025b58

Please sign in to comment.