**1. Introduction**

Multibody formalisms, which appeared in the seventies, were intended to produce the equations of motion of so-called multibody systems (MBS) of any size and of any kind, with the aim of studying their motion. For several decades, multibody models were mainly used to study mechanical systems with a purely predictive (development of a new device) or corrective (improvement of an existing device) target. The "real-time computation" character was completely absent for obvious limitations related to the performance of computers at the time.

The massive and amazing arrival of increasingly more powerful processors and of faster and larger memories (RAM) encouraged research teams to produce very compact multibody formalisms (e.g., based on so-called recursive techniques or Order-N methods), to exploit programming techniques (such as symbolic generation) and to take maximum advantage of state-of-the-art computer architectures (vector or parallel processors).

All this contributed to exploring the possibilities of using multibody models in the context of real-time computing. Already at the beginning of the nineties for instance, the inverse dynamic computation of robot actuator torques was carried out to enrich their internal controllers with a feedforward component (e.g., predicted-torque control). Computational algorithms in haptic rendering may consider various approaches [1].

Among demanding applications (in terms of real-time computation point of view), one finds a series of multibody systems (vehicle simulator, remotely-actuated surgical robot, etc.) whose haptic feedback (i.e., the force or torque to be sent back to the human)

**Citation:** Docquier, N.; Timmermans, S.; Fisette, P. Haptic Devices Based on Real-Time Dynamic Models of Multibody Systems. *Sensors* **2021**, *21*, 4794. https://doi.org/10.3390/ s21144794

Academic Editors: Miguel Ángel Naya Villaverde and Javier Cuadrado

Received: 7 June 2021 Accepted: 12 July 2021 Published: 14 July 2021

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

**Copyright:** © 2021 by the authors. 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/).

should reproduce, as accurately as possible, the dynamics of the system with which it is in interaction. Among the ingredients required to develop such devices one finds, beside the real-time multibody model, a series of sensors (at the human–machine and machine– machine interfaces), powerful computer processors, and an operating meta-system. The latter must play the role of a real conductor responsible for synchronizing and interfacing the involved hardware and software components.

This work presents the developments realized in this sense by the UCLouvain multibody team, who decided to make the most to couple the symbolic multibody models (issuing from their symbolic ROBOTRAN (www.robotran.eu, accessed on 13 July 2021) software) within the ROS (www.ros.org, accessed on 13 July 2021) architecture (Robot Operating System). The latter is used to interface the models with a set of well-chosen sensors pursuing two objectives: (i) first to validate the multibody models with respect to experimental physics and (ii) second to handle specific haptic devices whose underlying physical system is dynamic in nature.

Two very distinct applications are presented to illustrate the approach. The first one—of research type—concerns the development of a digital piano keyboard with haptic feedback, based on the real-time multibody model of the grand piano action. The second application—rather educational—concerns a car simulator whose 3D multibody model allows to feedback pertinent sensory information, namely, the steering torque and a 3D visualization with realistic visual clues. The model can be tuned in real-time by instantaneously modifying the suspension settings but also the contact characteristics of the tire/ground forces.

In all cases, the haptic specifications and requirements of the envisaged applications have guided our choices for (i) the electromechanical design itself, (ii) the level of refinement and computational efficiency of the multibody model, (iii) the type and conditioning of the sensors, and (iv) the way of interfacing the whole through a suitable meta-architecture (ROS). The results confirm the advantages and assets of the symbolic multibody approach and the interest of embedding such models in haptic devices to best capture highly dynamic effects (a technique that was not conceivable with the technologies of the past in a context of haptic feedback).

The paper is organized as follows. After a state-of-the-art on multibody formalisms and haptic devices (Section 2), the multibody approach and its symbolic implementation are treated in Section 3. Section 4 addresses the different aspects of the haptic problem, still focusing on multibody applications. Section 5 illustrates the approach proposed for the two above-mentioned applications and, more succinctly and illustratively, for other systems developed in our laboratory. A concluding section closes this work, pointing out the interesting perspectives of this research. Having a immense potential, haptics technology is still in its beginning stage [2].

#### **2. State-of-the-Art**

### *2.1. Multibody Formalisms*

Multibody dynamics, a scientific discipline that emerged in the early seventies (see, e.g., in [3,4]), is concerned with the kinematic and dynamic study of "polyarticulated" mechanical systems (referred to as MultiBody Systems, or MBS in short) such as transmission mechanisms, humanoid robots, road and railway vehicles, human body, cranes, etc. (Figure 1).

Beside experimental investigations, the analysis of the motion of these MBS requires their mathematical modeling, based on the fundamental laws of mechanics, of which the Newton equations (for body translations) and Euler equations (for body rotations) are common starting points, in the same way as the Lagrange equations or the virtual work and virtual power principles.

To obtain the equations describing the motion of MBS, several choices of variables (referred to as generalized coordinates *q*) are possible. Some schools have favored absolute or nodal coordinates (denoting the configuration of each body of the MBS with respect to an inertial frame) [4–6], others preferred using relative coordinates (representing the configuration of each body with respect to another body of the MBS) [7,8] or natural coordinates (representing the absolute configuration of specific material points on each body of the MBS) [9].

**Figure 1.** Multibody applications range from small piano action, through road and railway vehicles, to huge port cranes (UCLouvain).

Concerning the bodies themselves, the formalisms are distinguished according to whether they consider them rigid or flexible, in which case deformation equations are superimposed to the equations of the overall motion of the MBS (see. e.g., in [6,8]).

Regardless of the formalism used, the complexity of real applications is such that the automatic generation of their multibody models on a computer has quickly become essential. Indeed, it allows obtaining reliable and sufficiently generic models to deal with the numerous MBS families (see above). A distinction is made between the numerical approach (e.g., Adams-MSC or Samcef-Mecano software) and the so-called symbolic approach (e.g., Neweul-M2, Maplesoft, and ROBOTRAN software) which still presently cohabit among the available multibody computer programs.

The first approach requires reconstructing the model through a series of numerical subroutines at each step of the computation (e.g., integration time step). This reconstruction inevitably drains a series of useless computations linked to the numerous zeros of multibody models (inherent to the data or to the tree-like morphology of the physical system). Symbolic multibody programs avoid this algorithmic reconstruction: the whole dynamic model fits in a single file. Above all, symbolic engines can eliminate unnecessary operations like multiplication by zero, condensation of trigonometric formulas or even deletion of complete unnecessary equations provided by generic multibody formalisms [10]. Their superiority in terms of FLOPS is established and leads to much lower computation times, favorable to the real-time performances required here. In sum, symbolic multibodydedicated programs allow to produce compact equations leading to very efficient and portable models, written in the desired language (e.g., C, Python, Matlab).

Multibody dynamics then opened up to other physics disciplines (e.g., hydraulics, pneumatics, mechatronics, and granular media) and to specific analysis methods (control, optimization, and HIL real-time applications), the challenge being essentially to ensure a numerically robust and computationally efficient coupling between the mathematical models of the disciplines involved (see, e.g., in [11]). The scientific literature of the last twenty years is full of developments in this field of multibody-multiphysics coupling, most often guided by a specific type of application (see, e.g., in [12]).

For systems requiring real-time (or even faster than real-time) computation of their multibody model, as in the case of haptic devices whose internal kinematics or dynamics cannot be disregarded, specific developments have been carried out by the scientific community. They allow, among others, to achieve feedforward computed-torque control of walking robots, to increase the precision of surgical tools or to improve the haptic feedback of driving simulators.

In this context, one of the current challenges concerns the inclusion in haptic feedback devices of dynamic models that are (i) sufficiently representative of the system (number of bodies, joints, nature of internal forces, etc.), (ii) accurate (correct identification of parameters and force laws), and (iii) efficient (i.e., faster than real-time). All this cannot be achieved without a strong interaction between the virtual model, the real device and the external world, through the use of both virtual and real sensors, in order to claim high-level haptic performances.
