*1.1. Background*

In the last decade, especially driven by the robotic school of the University of Waterloo, the inverted pendulum model, as an evolution of the passive pantograph walker, has been proposed for foot placement estimation (FPE) and the related biped gait design. First, the problem was solved in two dimensions [1,2], with a first extension and test in 3-D in [3]. More recently, the approach has been transferred to 3-D adopting a specific form of a spherical inverted pendulum (SIP) and called SFPE [4,5]. However, in order to make the problem manageable several questionable simplifications were introduced, i.e. the projections of the central inertia on the two rotation axes of the SIP are considered constant, the rotation velocity does not change before and after the contact of the swing foot with the ground, the impact is approached approximatively, so it is the computation of the angles after the impact.

The solution of the problem depends on three phases: pre-impact, impact and postimpact of the flying foot. The total energy and the angular moment on the pivot point

**Citation:** Menga, G. The Spherical Inverted Pendulum: Exact Solutions of Gait and Foot Placement Estimation Based on Symbolic Computation. *Appl. Sci.* **2021**, *11*, 1588. https://doi.org/ 10.3390/app11041588

Received: 29 December 2020 Accepted: 4 February 2021 Published: 10 February 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

projected on the vertical axis are constant in the periods before and after the impact, the velocities and loss of energy after the impact can be calculated, finally, the equilibrium is reached imposing zero to both angular velocities at the erect standing balance point.

Instead of introducing approximations in these three steps, an exact solution is possible by using explicitly the mathematical equations of all involved variables, and processing them with a numerical solver, to find a solution.

#### *1.2. Symbolic Computation*

The programming of the exact expressions of the previously mentioned three steps is simplified by adopting a method to describe dynamical systems introduced at the end of the last century by Prof. Kane of Stanford, known as the Kane's method [6]. He also developed a symbolic manipulation software environment, called Autolev (now MotionGenesis) [7], to support his method and to generate fragments of very efficient code of all needed mathematical expressions to be embedded into a nonlinear numerical solver. The approach allows to represent unitarily, either holonomic and non-holonomic systems, and to handle explicitly kinetic energy, momenta, impact, impulsive forces, and generalized momenta.
