This paper presents a single-phase photovoltaic (PV) system consisting of a bi-directional dc-dc converter (BDC) converter and a single-phase voltage source inverter (VSI). A PV panel act as primary source and a battery bank act as secondary source. The PV panel is operated at its maximum power point (MPP) by a maximum power point tracking (MPPT) controller. The boosted dc output voltage of the BDC is maintained constant using a voltage controller. This voltage is converted to ac by the VSI. In the presence of grid power and PV power, the battery bank absorbs charging power from the PV panel. The excess power available on the PV panel is delivered to the utility grid. In the absence of grid power, the load absorbs power from the PV panel or battery bank based on the level of solar irradiation. The proposed system rated for 250 Wp, 34.4 V, 9 A has been analysed in MATLAB/SIMULINK and the performance is compared in open and closed loop modes for various irradiations. THD in the ac output voltage and current is minimized using a passive LC filter.