Energy Generated not Always Correct

I have a Goodwe inverter and I’m using https://github.com/markruys/gw2pvo script to upload my data. The chart for power across the day seems to be correct everyday, but on days where there are clouds and the power output goes up and down a lot the total energy generated in not correct.

Check out my system “Sun Sucker 5000” on 24 May 2019 and 30 May 2019. Inverter reports 21.8 and 17.5 kwh respectively. While PVOutput has 2.18 and 23.8 kwh. Anyone have any ideas?

On the 24 May 2019 your average power was reported in only double digits all day. Your Power was in the expected range. The Output is calculated on the average power figure that is why the value is low for that date. Apparently you have just started sending your data to PVOutput and may have made some changes to the settings during the process. If you go through the daily data you will see the average power curve (yellow) starting low and each day approaching the power curve (green) then exceeding it.
Not sure why this is happening unless your inverter setting are being changed by your installer or manufacturer of the inverter. I have noticed that different inverters have very different characteristics. Mine is Solaredge and the Power and Average Power curves are almost identical within a few watts at any time of day for the past two and a half years.

Yes. I might have changed something in the beginning, but I haven’t recently, and I have the opposite problem on 30 May where the average power is greater than the power curve and I got a higher output rather than a lower one. So far these are the only 2 days I’ve had with clouds where the power has cycled up and down. Not sure where the weather data comes from as it is completely wrong saying most days have been cloudy when in fact most have been sunny since I’ve had the system. Today was cloudy with up and down power as well so I will keep uploading and see how it goes. Thanks for looking lwsmiser.

I did some more analysis for two of the days. It looks like it might be the scaling factor changes from day to day. 31/5/19 almost perfectly correlates the green power curve to the yellow average power curve. The yellow values are about 88% of the Green values. I’m not sure why it changes from day to day. The fact that you aren’t making any changes in the settings you control someone else may be…either the installer or the inverter company. My system never shows such large deviations between the two curves even on partly cloudy days. They are usually within 5 or 10 watts of each other.

I found the problem in the gw2pvo python script. He was trying to perform a correction to the 5 min total power generated for the day, but the factor he was using was causing errors in the power generated to that point which was messing with the average power reading and leading to incorrect total power for the day. First I removed the factor which means that the total energy was calculated as if the entire 5mins of generation was based on the reading at the end of that 5 minutes. This let to much more accurate numbers for total power generated. However I believe the better thing to do is to take an average between the current 5 min reading and the last 5 min reading and base the power for that 5 minutes on the average. I modified the gw_api.py file as follows (in the getDayReadings function):

    eday_kwh = 0
   #added last_sample to keep track of the prior reading
    last_sample = 0
    for sample in data['pacs']:
        date += timedelta(minutes=sample['minutes'])
        pgrid_w = sample['pac']
       #Changed the increase to be the average of the current and last sample multiplied by the 5 minute time period and unit conversion factors
        increase = abs(pgrid_w + last_sample)/2 * sample['minutes'] / 1000 / 60
        if increase > 0:
           #removed the factor from the eday_kwh increment
            eday_kwh += increase
            entries.append({
                'dt' : date,
                'pgrid_w': pgrid_w,
                'eday_kwh': round(eday_kwh, 3)
            })
       #record the current reading to be the last reading for the next iteration
        last_sample = pgrid_w

result['entries'] = entries

I think this should be accurate enough for me. Thanks for your help.

1 Like

I checked your June 30th output and it looks very much like mine. The differences between the reported power and the average are very close. However, the July 1st doesn’t look as good with the average lagging throughout the day by about 5 minutes. But looks aren’t everything. The important value is the actual energy produced.

Yes after you mentioned that your average power was the same as you actual power and I saw the variation on the 1st I decided to go with a slightly different calculation for the increase. Rather than averaging the last sample I just assume the last 5 min was the same as the power reported.

increase = pgrid_w * sample[‘minutes’] / 1000 / 60

This consistently make the average the same as the power. If you check my last few days you can see this. I think that either way makes it close to the number reported by the inverter. At some point I may review the correction code and make a change, but who knows when I will get around to that.

I think I’ve found the problems with the script and corrected them. If interested you can see the comments on the gw2pvo github page on Issues 14 and 23.