Second-order variational analysis of PV–battery energy management using jacobi equations | Synapse