Comparing the advantages and disadvantages of physics-based and neural network-based modelling for predicting cycling power

Patrick Mayerhofer, Ivan V. Bajić, J. Maxwell Donelan

TL;DR

This paper compares physics-based and neural network models for predicting cycling power. Both models achieved similar prediction accuracy, but the neural network model offered advantages by not requiring deep domain knowledge or precise measurements of physical parameters, while the physics-based model retained interpretability.

What Problem Does This Paper Address?

Developing accurate models for physical phenomena is crucial for understanding and predicting complex systems. Traditionally, this has been achieved through two main approaches: physics-based modeling, which relies on expert knowledge of underlying principles, and data-driven modeling, such as neural networks, which learn from experimental data. However, each approach has its own set of advantages and disadvantages. Physics-based models can be difficult to develop if the underlying principles are not well understood or if precise measurements of numerous parameters are required. Neural networks, while powerful, can be "black boxes" lacking interpretability and may require extensive data. This paper aims to directly compare these two approaches in the context of predicting cycling power, a well-understood physical process, to elucidate their respective strengths and weaknesses.

Methods

The researchers developed and compared two models for predicting cycling power:

  • Physics-based Model: This model was derived from fundamental physics principles of cycling. It incorporates forces like rear wheel force and air resistance, and uses Newton's second law. Key parameters like gear ratio, cadence, and the derivative of cadence were used as inputs. The only unknown parameter, the "drag number" (which accounts for air resistance and rolling resistance), was optimized using a Levenberg-Marquardt algorithm.
  • Neural Network Model: A simple recurrent neural network was employed, specifically using a Long Short-Term Memory (LSTM) layer with 8 nodes. The input data included cadence, the derivative of cadence, and gear ratio. The network was trained to predict power output.

Both models were evaluated using a within-trial analysis (predicting data within the same trial) and a within-participant analysis (predicting data across different trials for the same participant). Performance was assessed using normalized root mean square error (RMSE) and normalized mean error, with k-fold cross-validation employed for robust evaluation.

Datasets

The study utilized data collected from nine participants cycling on a 400m track. Participants performed two 18-minute trials with different gear ratios, while their cadence was controlled by a metronome, commanding step changes of ±5%, ±10%, and ±20% of their preferred cadence. Power output, cadence, and crank arm angular velocity were measured. This dataset was split into subsets for training and testing using k-fold cross-validation.

Key Insights and Ideas

  • Comparable Performance: Surprisingly, for this well-understood physical system, a relatively simple neural network achieved prediction performance comparable to a physics-based model. This suggests that for certain problems, the complexity of a physics-based model might not be strictly necessary for achieving good predictive accuracy.
  • Interpretability vs. Simplicity: The physics-based model offers clear interpretability through its physically meaningful parameters (e.g., drag number). This is valuable for understanding why the model makes certain predictions. In contrast, the neural network, while simpler to train without deep domain knowledge, acts more like a "black box."
  • Reduced Measurement Burden: The neural network model's ability to learn complex relationships without requiring precise measurements of fixed parameters (like bike weight or wheel size) is a significant advantage. This reduces the effort and potential for inaccuracies associated with data collection.
  • Adaptability to Changing Conditions: The paper highlights that if experimental conditions change (e.g., a different bike), the physics-based model would require re-parameterization and potentially re-derivation, whereas the neural network would primarily need retraining with the new data.

Key Results

  • Within-Trial Analysis:
    • Physics-based model: Normalized mean error of 1.6%±1.1%, normalized RMSE of 19.6%±5.1%.
  • Neural network model: Normalized mean error of 1.2%±4.2%, normalized RMSE of 18.2%±6.0%.
  • The predictive performance between the two models was not significantly different (p = 0.34).
  • Within-Participant Analysis:
    • Physics-based model: Normalized mean error of 3.2% ± 1.8%, normalized RMSE of 20.9%±5.1%.
  • Neural network model: Normalized mean error of 4.1%±10.9%, normalized RMSE of 25.4%±5.6%.
  • Again, the predictive performance between the two models was not significantly different (p = 0.12).
  • The optimized drag number for the physics-based model was consistently around 1.2±0.2.

Limitations and Future Work

  • Simplified Model: The models did not account for external factors like headwinds or tailwinds, which can significantly influence drag. Incorporating these would require more complex measurement systems and potentially more sophisticated physics-based model derivations.
  • Interpretability Trade-off: While the neural network is simpler to train, its lack of interpretability makes it harder to gain fundamental understanding of the underlying cycling dynamics compared to the physics-based model.
  • Future Work: The authors suggest that adding variables like wind speed and direction would be easier to implement in a neural network framework through retraining, whereas it would be more challenging for the physics-based model. As the complexity of a system increases or the number of required measurements grows, data-driven approaches like neural networks may become more advantageous, despite their interpretability challenges.

Summary updated

Abstract

Models of physical phenomena can be developed using two distinct approaches: using expert knowledge of the underlying physical principles or using experimental data to train a neural network. Here, our aim was to better understand the advantages and disadvantages of these two approaches. We chose to model cycling power because the physical principles are already well understood. Nine participants followed changes in cycling cadence transmitted through a metronome via earphones and we measured their cadence and power. We then developed and trained a physics-based model and a simple neural network model, where both models had cadence, derivative of cadence, and gear ratio as input, and power as output. We found no significant differences in the prediction performance between the models. Both models had good prediction accuracy despite using less input variables than traditional models and using more challenging prediction conditions by enforcing rapid speed changes during cycling. The advantages of the neural network model were that, for similar performance, it did not require an understanding of the underlying principles of cycling nor did it require measurements of fixed parameters such as system weight or wheel size. These same features also give the physics-based model the advantage of interpretability, which can be important when scientists want to better understand the process being modelled.
BibTeX
@article{mayerhofer2024comparing,
  author = {Patrick Mayerhofer and Ivan V. Bajić and J. Maxwell Donelan},
  title = {{Comparing the advantages and disadvantages of physics-based and neural network-based modelling for predicting cycling power}},
  journal = {Journal of Biomechanics},
  year = {2024},
  doi = {10.1016/j.jbiomech.2024.112121},
}
Figure