Energetic formulation of the subgroup commutativity degree (Nonlinear Analysis : Modelling and Control, 2025)