Ensuring low-cost and highly reliable electricity generation while meeting the demand load poses a significant challenge. Power plants operate continuously to produce power, with the Programmable Logic Controller (PLC) control system playing a crucial role in managing all the equipment. Power deficiencies in the PLC rooms can lead to equipment disturbances and potential damage to the plant. To address this problem and utilize the abundant solar energy in Libya, this study introduces the optimal sizing of an autonomous hybrid storage system using an optimization method. The Net Present Costs (NPC), Loss Power Supply Probability (LPSP), and Levelized Cost of Energy (LCOE) are employed to extract a suitable function database. The proposed system generates 7 kW of power to meet demand and is implemented in MATLAB. The Grey Wolf Optimization (GWO) method is applied to determine the optimal number of PV panels and BESS capacity for the autonomous hybrid system. The optimal solution obtained through GWO is determined to be 40 PV panels and a 60Ah BESS capacity.