This work proposes a renewable energy generation system that operates with a similar behavior as a synchronous generator in terms of reliability in the power supply and inertial response properties against power changes and grid voltage disturbances. The main contributions of this work are: (1) the renewable energy variability managing by means of a battery energy storage strategy, whose charge and discharge are determined by a forecasted-based power adjustment algorithm, (2) the dynamical modeling of an inverter that includes physical inertia and its corresponding response to power and voltage variations, and (3) the synthesis of a nonlinear optimal control for the inertia-based inverter system where the reactive power injection is regulated. Simulation results for a photovoltaic-based generator are presented to demonstrate the effectiveness of the proposed methodologies.