a semi-autonomous electrical generation or grid energy storage system which links to the mains to feed excess capacity back to the local mains electrical grid. When insufficient electricity is generated, or the batteries are not fully charged, electricity drawn from the mains grid can make up the shortfall.
When batteries are used to store, the system is called battery-to-grid (B2G), which includes vehicle-to-grid (V2G). [...] Direct Current electricity is passed to an inverter which is grid tied. The inverter monitors the alternating current mains supply waveforms and generates electricity that is phase matched. The DC electrical system is attached to the mains via this mechanism. Source: Wikipedia