The increasing penetration of photovoltaic (PV) generation requires energy management strategies for PV-battery systems that are not only optimal but also stable and robust under variable solar generation and load demand. Classical optimal control approaches based on first-order optimality conditions ensure stationarity of solutions but provide limited observation into local stability and sensitivity to operational perturbations. This paper introduces a second-order variational framework based on Jacobi equations to analyze and design optimal PV-battery energy management trajectories. The proposed methodology quantifies state-of-charge (SOC) trajectory stability, explicitly identifies conjugate points that signal loss of local optimality, and characterizes time-dependent sensitivity to PV and load fluctuations through Jacobi fields. Numerical experiments on a representative 24-hour PV-battery system demonstrate the practical effectiveness of the approach, revealing critical periods of vulnerability and providing quantitative guidance for battery sizing, control-weight selection, and predictive operational planning. Results show that incorporating second-order optimality conditions enables rigorous stability verification and enhanced robustness compared with classical first-order methods. By extending conventional optimal control frameworks with stability-aware analysis, this work provides a mathematically grounded and practically relevant foundation for resilient energy management in renewable microgrids and residential PV-battery systems.
Mundu et al. (Sat,) studied this question.