SBI stands for switched-boost inverter and is a single-stage power converter used to connect low-power sources, such as solar photovoltaic (PV) arrays within a modified nanogrid, to loads. Despite its many benefits, such as the fact that it does not require expensive sophisticated dead-time circuitry, its duty ratio is limited to between 0 and 0.5. As a result, this publication is a contribution towards improving the SBI's performance for use in a modified nanogrid. Furthermore, it also presents a revolutionary strategy for a simple closed-loop control technique that overcomes the majority of inverter shortcomings and system nonlinearity. The suggested robust controller uses a metaheuristic optimization technique, called gorilla troops optimization (GTO), to optimize the performance of this controller. The robustness of the suggested controller is tested against the sudden change of the nanogrid input voltage (i.e., PV-voltage), modulation index of the inverter, and the step-change in DC-link output voltage of the inverter. The test results obtained from Matlab/Simulink software are compared with particle swarm optimization (PSO) – as another optimization algorithm. Furthermore, the proposed system is experimentally implemented with OPAL RT-4510v real-time hardware in the loop (HIL), rapid control prototyping, OP-8660 HIL controller and data acquisition platform.