I'm writing a program that downloads PGE Green Button data and calculates the bill for each of the available tariff options, with consideration of net-metering, etc. I've yet to find any detailed algorithm published on how exactly PGE performs its bill calculations. If anyone has such a reference, please do share

Take, the daily baseline allotment vs rate computation. Is it: (1) a strict daily calculation, (2) a piecemeal calculation breaking up discontinuities when rates/seasons change, or (3) a summation of the daily allotment for the full billing cycle calculation without regard to mid billing cycle rate adjustments.?

Please humor an exaggerated example with a mid-billing cycle seasonal change to illustrate why this matters so much. Suppose the following:

Billing days: 30

Day 1-15: 10 kwh baseline per day

day 16-30: 20 kwh baseline per day

Power usage:

Day 1: 200Kwh used

day 2-29: no power used

Day 30: 300Kwh used

Method (1) -- strict daily baseline vs usage:

Calculate bill for 200 kwh at 2000% of baseline using Day1-15 rate table

Calculate bill for 300 kwh at 1500% of baseline using Day16-30 rate table

Method (2) -- piecemeal by rate period:

Day1-15: Baseline of 10*15= 150kwh. Thus, calculate bill for 200kwh at 133.3% of baseline for this piecemeal period using day1-15 rate table.

Day16-30: Baseline of 20*15= 300kwh. Thus, calculate bill for 300kwh at 100% of baseline for this piecemeal period using day16-30 rate table.

Method (3) -- baseline usage covers entire billing period:

Total baseline = 10*15 + 20*15 = 450 kwh. Total consumption is 500 kWh, therefore,

Calculate bill for 200kwH at 111.1% of baseline using Day1-15 rate table

Calculate bill for 300kwh at 111.1% of baseline using Day16-30 rate table

I believe that Method (2) is correct, but, I'm not really sure.

What is so maddeningly frustrating is that PGE Green Button data doesn't match perfectly with what shows up in my net-metering bill! Further, the net-metering summary report given each month has absolutely no mention of tiering to help reverse engineer it.