Dynamical System

A controlled dynamical system is a set of differential equations which has the structure:

(1)\[\mathbf{A}(\mathbf{x}(\zeta),\zeta)\mathbf{x}'(\zeta)=\mathbf{f}(\mathbf{x}(\zeta),\mathbf{u}(\zeta),\zeta).\]

or in case of control with feed-back structure:

(2)\[ \mathbf{A}(\mathbf{x}(\zeta),\zeta)\mathbf{x}'(\zeta)=\mathbf{f}(\mathbf{x}(\zeta),\mathbf{u},\zeta), \qquad \textrm{where} \qquad \mathbf{u}\equiv\mathbf{u}(\mathbf{x}(\zeta),\zeta).\]

The control set \(\mathbf{u}\) may be empty and in this case the dynamical system reduce to a standard ODE. The nonsingular matrix \(\mathbf{A}(\mathbf{x},\zeta)\in\mathbb{R}^{n\times n}\) can be dependent of the state variable \(\mathbf{x}\in\mathbb{R}\). Its entries are continuous and piecewise differentiable, \(\mathbf{A}\) corresponds to the mass matrix of the multibody model considered in many problems. The controls \(\mathbf{u}\) are in \(\mathbb{R}^m\), the function \(\mathbf{f}:\mathbb{R}^{n+m+1}\to\mathbb{R}\). If the set of the controls is empty and matrix \(\mathbf{A}\) is the identity, then the dynamic system (1) reduces to an Ordinary Differential Equation in explicit form.

Because of the non singularity of \(\mathbf{A}\), it is possible to multiply the right hand side by \(\mathbf{A}(\mathbf{x})^{-1}\) to recast the problem in the classic way. Nevertheless this is not done because the inverse of \(\mathbf{A}\) can be complicated or may not exist in an analytic form.

PINS was designed to find the stationary state of the system (1) by solving \(\mathbf{f}(\mathbf{x},\mathbf{u},\zeta)=\mathbf{0}\). The non linear system is solved numerically with an affine invariant Newton method, [BBDL07], [BBDL06], [BBDL05].

To forward integrate the dynamic system the library provides two Runge–Kutta forward integrators. The non stiff case employs the Dormand-Prince of order 5 while the stiff case is treated with the Radau method of order 5. This forward integration can be used for the dynamic system once the control law \(\mathbf{u}(\zeta)\) or \(\mathbf{u}(\mathbf{x},\zeta)\) is supplied by the user. Typically this becomes interesting when the control comes from an OCP or when an optimal control is compared with other user defined functions.

Another feature is to find the eigenvectors and eigenvalues of the linearisation of (1). The linearisation around \((\mathbf{x}_0,\mathbf{u}_0)\) is

\[\mathbf{A}(\mathbf{x}_0)\mathbf{x}'=\mathbf{f}(\mathbf{x}_0,\mathbf{u}_0)+\dfrac{\partial\mathbf{f}}{\partial \mathbf{x}}(\mathbf{x}_0,\mathbf{u}_0)(\mathbf{x}-\mathbf{x}_0),\]

which yields the linear system \(\mathbf{M}\mathbf{x}'=\mathbf{N}\mathbf{x}+\mathbb{b}\) for two suitable matrices \(\mathbf{M}\), \(\mathbf{N}\in\mathbb{R}n\) and \(\mathbb{b}\in\mathbb{R}\). The study of the eigenvectors and eigenvalues of the matrix \(\mathbf{M}^{-1}\mathbb{N}\) gives information about the stability of the system and its vibration mode.