The operation of the standalone photovoltaic (SAPV) system predominantly depends on solar generating units and battery storage systems (BSS). This paper proposes the utilization of Sequential Quadratic Programming (SQP) algorithm for achieving optimal energy management and also for supplying energy continuously to critical loads. The stand-alone PV system is modeled and the SQP algorithm is implemented on the same. Different test cases are evaluated and validated. © Research India Publications.