Musculoskeletal modeling for estimating muscle force in human: C++ optimization strategies for real-time analysis

Thanks to recent research in biomechanics, the estimation of human muscle forces during a dynamic movement becomes more and more feasible. Applications of such tools can be directed at improving sport performance, diagnoses of musculoskeletal diseases and monitoring progress made in rehabilitation. Still, due to the human body over-actuation (more than one muscle can produce the same action), a scientific challenge remains.

Indeed, the estimation of muscle forces relies on an optimization processes such as static optimization or optimal control. Contrary to static optimization which is based on inverse flow and is sensitive to kinematic noise, optimal control follows a direct flow. The main advantage of the forward procedure is that both muscle activation and kinematics states take part in the optimization process while the static optimization (inverse flow) relies on the hypothesis that kinematics is noiseless and perfectly determined. In reality, the latter is rarely, if not never fulfilled. On the other hand, the number of optimized parameters in an optimal control procedure drastically increases with the number of degrees of freedom of the kinematics model, the number of muscles of the muscular model and the number of time nodes to be optimized. Thus, an optimization process may run some functions over a billion times for the simulation of a simple movement. In this condition, each and every millisecond lost in useless calculation time can lead to minutes and hours waiting in front of the computer.

The goal of this project is to monitor in detail the number of calls and the computational time taken by each function and subfunction involved in the process of an optimal control simulation. As an overview of the flow for one call of the main function, controls (i.e. muscular excitation; inputs of the function) are converted to muscular forces. Then, all the muscular forces are combined to compute joint torques using contact Jacobian matrix. From these joint torques, joint accelerations (outputs), using a forward dynamics function provided by the Rigid Body Dynamics Library (RBDL), are computed. It is to be noted that all matrix calculations are done using the Eigen library.

When the full monitoring is done and validated, the second goal of this project will be to improve and optimize the slowest and/or to reduce the number of calls for the most called functions in order to minimize the global computing time. As an example, the mass matrix inversion while calculating the generalized joint acceleration may be improved by implementing or developing sparse inversion matrix algorithms since this matrix is largely sparse.

This project is part of a larger project about optimal movement synthesis, where the goal is to reproduce from scratch, improve and propose new personalized techniques in sports movement such as diving and jumping for high level athletes.

Faculty Supervisor:

Mickael Begon


Samiya Nasim



Computer science





Current openings

Find the perfect opportunity to put your academic skills and knowledge into practice!

Find Projects