Discharging of the battery will be performed to shave the evening peak load when no or low PV generation is present. Discharge will commence when voltage falls below a threshold. The duration of the peak load support will depend on the amount of the stored energy in the battery. A rough estimate of this duration could be found by equating the amount of stored energy with the amount of energy required in the interval of the evening peak, where the battery will discharge. For example, using a discharge curve in Fig. 4, if SoCm is the maximum attained state of charge prior to the start of the evening peak and DoD is the maximum allowable depth of discharge, then the amount of energy available for discharge, DEbat, can be approximately obtained using,