Quantitative Performance Analysis of Spring-Mass-Damper Control Systems: A Comparative Implementation in Python and R - Herho, Sandy Hardian Susanto; Kaban, Siti Nurzannah (Indonesian Journal of Applied Mathematics, 2025)
The numerical simulation of control of spring-mass-damper (SMD) systems offer critical insights into dynamical systems and computational methodologies. This study provides a comprehensive comparative analysis of implementing SMD systems across two prominent open-source scientific computing platforms: Python and R. By examining both open-loop and closed-loop system configurations, the research investigates the computational performance, numerical accuracy, and implementation characteristics of these platforms. Utilizing an idealized one-dimensional SMD system with a Proportional-Integral-Derivative (PID) controller, the study conducted extensive numerical simulations and statistical performance analyses. Results revealed Python's significant advantages in execution speed, achieving up to 63.57% reduction in runtime for controlled system simulations, while R demonstrated superior consistency in execution and memory usage. The controlled system demonstrated exceptional performance, with a final position error of merely 0.4% and enhanced damping characteristics. This work not only bridges theoretical stability analysis with empirical performance insights but also promotes reproducibility and transparency in computational dynamics research by leveraging open-source platforms.