Hard real-time multibody simulations using ARM-based embedded systems

The real-time simulation of multibody models on embedded systems is of particular interest for controllers and observers such as model predictive controllers and state observers, which rely on a dynamic model of the process and are customarily executed in electronic control units. This work first identifies the software techniques and tools required to easily write efficient code for multibody models to be simulated on ARM-based embedded systems. Automatic Programming and Source Code Translation are the two techniques that were chosen to generate source code for multibody models in different programming languages. Automatic Programming is used to generate procedural code in an intermediate representation from an object-oriented library and Source Code Translation is used to translate the intermediate representation automatically to an interpreted language or to a compiled language for efficiency purposes. An implementation of these techniques is proposed. It is based on a Python template engine and AST tree walkers for Source Code Generation and on a model-driven translator for the Source Code Translation. The code is translated from a metalanguage to any of the following four programming languages: Python-Numpy, Matlab, C++-Armadillo, C++-Eigen. Two examples of multibody models were simulated: a four-bar linkage with multiple loops and a 3D vehicle steering system. The code for these examples has been generated and executed on two ARM-based single-board computers. Using compiled languages, both models could be simulated faster than real-time despite the low resources and performance of these embedded systems. Finally, the real-time performance of both models was evaluated when executed in hard real-time on Xenomai for both embedded systems. This work shows through measurements that Automatic Programming and Source Code Translation are valuable techniques to develop real-time multibody models to be used in embedded observers and controllers.

[1]  Michael W. Whalen,et al.  On the requirements of high-integrity code generation , 1999 .

[2]  Javier García de Jalón,et al.  Kinematic and Dynamic Simulation of Multibody Systems , 1994 .

[3]  Javier Cuadrado,et al.  Automotive observers based on multibody models and the extended Kalman filter , 2010 .

[4]  Steven F. Barrett,et al.  Bad to the Bone: Crafting Electronic Systems with BeagleBone and BeagleBone Black , 2013, Bad to the Bone: Crafting Electronic Systems with BeagleBone and BeagleBone Black.

[5]  Phillip A. Laplante,et al.  Real-Time Systems Design and Analysis , 1992 .

[6]  Carlos Eduardo Pereira,et al.  Combining aspects and object-orientation in model-driven engineering for distributed industrial mechatronics systems , 2014 .

[7]  E. Hairer,et al.  Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems , 2010 .

[8]  Conrad Sanderson,et al.  Armadillo: An Open Source C++ Linear Algebra Library for Fast Prototyping and Computationally Intensive Experiments , 2010 .

[9]  Terence Parr Language Implementation Patterns: Create Your Own Domain-Specific and General Programming Languages , 2009 .

[10]  Javier García de Jalón,et al.  Kinematic and Dynamic Simulation of Multibody Systems: The Real Time Challenge , 1994 .

[11]  Alberto Trevisani,et al.  State estimation using multibody models and non-linear Kalman filters , 2012 .

[12]  Daniel Dopico,et al.  On the effect of linear algebra implementations in real-time multibody system dynamics , 2007 .

[13]  Werner Schiehlen,et al.  Multibody Systems Handbook , 2012 .

[14]  Nicholas C. H. Vun,et al.  Real-Time Enhancements for Embedded Linux , 2008, 2008 14th IEEE International Conference on Parallel and Distributed Systems.

[15]  Manfred Morari,et al.  Model predictive control: Theory and practice - A survey , 1989, Autom..

[16]  Wolfgang Hirschberg,et al.  Tire model TMeasy , 2007 .

[17]  Manfred Hiller,et al.  An object-oriented approach for an effective formulation of multibody dynamics , 1994 .

[18]  Seppo J. Ovaska,et al.  Real-Time Systems Design and Analysis: Tools for the Practitioner , 2011 .

[19]  B. T. Fijalkowski Model-Based Design with Production Code Generation for SBW AWS Conversion Mechatronic Control System Development , 2011 .

[20]  Javier Cuadrado,et al.  Modeling and Solution Methods for Efficient Real-Time Simulation of Multibody Dynamics , 1997 .

[21]  Hans Petter Langtangen,et al.  A Primer on Scientific Programming with Python , 2009 .

[22]  Salem A. Haggag,et al.  Embedded-model-based control , 2013 .

[23]  Dan Simon,et al.  Optimal State Estimation: Kalman, H∞, and Nonlinear Approaches , 2006 .

[24]  Mats Per Erik Heimdahl,et al.  An approach to automatic code generation for safety-critical systems , 1999, 14th IEEE International Conference on Automated Software Engineering.

[25]  J. S. Shim,et al.  DEVELOPMENT OF VEHICLE DYNAMICS MODEL FOR REAL-TIME ELECTRONIC CONTROL UNIT EVALUATION SYSTEM USING KINEMATIC AND COMPLIANCE TEST DATA , 2005 .

[26]  Wolfgang Rulka,et al.  MBS Approach to Generate Equations of Motions for HiL-Simulations in Vehicle Dynamics , 2005 .

[27]  Alexander Chatzigeorgiou Performance and power evaluation of C++ object-oriented programming in embedded processors , 2003, Inf. Softw. Technol..

[28]  Stefan Behnel,et al.  Cython: The Best of Both Worlds , 2011, Computing in Science & Engineering.

[29]  Gareth Halfacree,et al.  Raspberry Pi User Guide , 2012 .