Hi Anurag,
There are a few things happening here:
The battery state of charge (SOC) is only a partial indicator of the energy available in the battery. Because of battery degradation, even if the SOC is above the minimum nominal capacity, the actual remaining capacity of the battery may be lower than the minimum.
The battery maximum discharge rate limits how much power the battery can deliver, so even if the battery SOC is above the minimum, if it cannot discharge enough power to meet the load (accounting for any losses), SAM may use the grid for supplemental power.
One potential issue that I do see is that in the last time step of a period where the battery is discharging to meet the load before a period when the PV system starts charging the battery, SAM uses grid power to supplement the battery even when the battery SOC is relatively high. I will ask one of our battery model developers to investigate.
I downloaded an hourly TMY weather file for New Delhi from the NREL NSRDB and interpolated it to 15 minutes. Unless you are using the same weather file I am different results than you, so I can't describe specific days, but I am seeing the pattern you describe.
Best regards,
Paul.