This work presents a Battery Energy Storage System (BESS) incorporated to a hybrid generation system-grid connected (Solar Photovoltaic and Eolic) applied in a specific facility located in Quito-Ecuador. For controlling the state of charge and discharge of the battery bank, a supervisory controller based on peak shifting principle is used. A bidirectional converter controls the power flux from the battery into the DC bus and vice versa, whereas the inverter controls the amount of power injected into the AC bus. In order to manage the energy from the inverter, active and reactive (P-Q) control is applied. The control structure involves two cascade loops formed by an internal current control and a superimposed voltage control. Fuzzy logic combined with proportional-integral controllers is applied, ensuring thus, robustness to the system. In this document, the results for two main operating modes, charging and discharging batteries are presented and discussed.