Comments

@TumiIt looks very much like you're losing power from or at least connection to the grid for those short durations. Looks like a Schneider XW or CSW hybrid system, and by grid output you mean the system is selling to the grid, right? If this were the case, then when power is lost, selling to the grid would stop and AC out to grid would be 0V. The inverter would begin to power any loads using the batteries for the duration of the outage. Both the battery voltage and current would spike when the "load" of the power being sold to the grid was dropped. Just my guess.

The grid must be "good" as seen by the GT/Hybrid AC inverter... The voltage must be between ~210 and 265 VAC and 60 Hz +/- 1.0 Hz (if US/North America).

If the utility had issues, or (possibly more likely), you are at the end of a distribution circuit and perhaps you have a neighbor that is causing the grid to sag (large water pump or air compressor, etc.).

Another possible issue is a poor electrical connection between the line transformer and your main panel. I had been noticing that some of my lights have been flickering a bit in the last 6-12 months, and recently getting worse (and, it turned out, that a couple of my GFI outlets had been tripping too).

Turned out that a a few ounces of rain water had dripped down from the weather head (cable went into the weather head at the wrong angle) in the last ~15 years and got on one of the meter socket wire lugs and one of the copper drop wire was corroded (and blackened from the heat of the poor electrical connection). Replaced the socket and one wire, and all was good again.

Note that in the US, GT type inverters also measure voltage between the neutral and L1/L2 (i.e., 120 VAC line to neutral). If you have a "bad neutral" to the GT inverter, that could cause similar problems too.

If the GT inverter detects "bad line voltage or frequency", the GT inverter will shutdown, wait for line to come back into spec. Then wait 5 minutes before turning back on again.