TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

PG&E E9-A versus EV-A calculator using PG&E downloaded data

Discussion in 'Model S: Battery & Charging' started by CraigHughes, Apr 30, 2013.

  1. CraigHughes

    CraigHughes Member

    Joined:
    Feb 9, 2013
    Messages:
    24
    Location:
    NorCal
    I've banged a quick-and-dirty comparison tool together for folks to allow comparing PG&E's current E9-A rate plan versus the upcoming EV-A rate plan.

    The basic concept is you download hourly historical usage data from PG&E (doesn't matter what rate plan you were on at the time, you can download E-1 data and the tool will adjust for you), and then optionally add in extra daily charging hours, and the tool will process your actual historical usage data, add in the theoretical car charging time, apply E9-A and EV-A rates for each time slice, and then give you the total you would have paid under each plan.

    I haven't bothered adding -B comparisons, but could do so I guess pretty easily.

    I haven't bothered adding anything for people with solar who might be generating during the day to offset usage. Adding this would probably be trickier, because you'd have to know what time of day how much was being generated. That data I guess might be in your PG&E downloaded data but since I don't have solar I have no example to look at. Happy to look at someone's data if they do have net metering to see if I can extract solar generation and use it.

    Anyway, for me, it looks like EV will be about 30% cheaper than E9, based on my electric usage from 2008 until just before I got my Model S, and then adding 50 miles per day of car driving to that 2008-2013 baseline:

    Total E9: 14815.92 Total EV: 8328.86

    In other words, if I use electricity going forward like I used it from 2008-2013, but add in 50 miles per day of electricity, then I can expect that over the next 5 years, I'll pay about $14,815.92 under E9-A, or only $8,328.86 if I switch to EV.

    The code is here on Github. To use it right now, you kinda probably need to be a computerish person who knows or can figure out how to install node.js

    If you're not, and you don't mind sharing your PG&E usage data with me, send me your XML data downloaded from PG&E and I can run the program for you on my machine and give you the results.

    Note it's a bit rough around the edges -- if anyone has any feedback, let me know and I'll try and fold it in.
     
  2. napabill

    napabill Active Member

    Joined:
    Apr 30, 2009
    Messages:
    1,324
    Location:
    Napa, California, United States
    How does one go about downloading hourly historical usage data? I've logged into my PG&E "My Energy" page and don't see an obvious place to cause a download of data. I'd like to take you up on running it for me once I get the data.
     
  3. Merrill

    Merrill Active Member

    Joined:
    Jan 23, 2013
    Messages:
    2,096
    Location:
    Sonoma, California
    Me to, I have TOU and net metering. So I pay more for electricity from 12 to 6, but that is when I generate the most from solar so in the summer I get credit. If you could tell me what info,you need I would love to have you do the math.
     
  4. roblab

    roblab Active Member

    Joined:
    Jul 15, 2008
    Messages:
    2,022
    Location:
    Angwin (Napa Valley) CA
    At a meeting with PG&E a couple months ago, outlining the new EV plan, when I stated that I am a solar generator on E7, they said, "Stay where you are. You can't do any better." The EV plan was not designed for people who are generating to net zero.
     
  5. CraigHughes

    CraigHughes Member

    Joined:
    Feb 9, 2013
    Messages:
    24
    Location:
    NorCal
    #5 CraigHughes, Apr 30, 2013
    Last edited: Apr 30, 2013
    Log in to pge.com, then click "My usage" on the menu. Then in the bottom right corner there's a "Green Button Download My Data" button. Click that. Then you want the "For developers and third parties (.xml file)",
    "Export usage for a range of days" and select the max possible range it lets you select. Start by setting the year to the earliest possible, then page back through months until they're greyed out.

    ...that's the easy way but won't give you maximum data. It should be good enough to give you a decent estimate. You can get more data if you're adventurous, going way further back in time if you look under "For your review in a spreadsheet program (.csv file)" and see what the latest date available is. Make a note. Now, open your browser's "Downloads" window, and check the URL for the previous XML download. You'll see it's something like:

    https://pge.opower.com/ei/app/modules/customer/1234567/energy/download?bill=2013-5&exportFormat=ESPI_AMI&from=03%2F30%2F2012&to=04%2F30%2F2013

    Now: You need to put the date of the oldest possible data into that URL in the "from=" part. Important to know: "%2F" means "/" in URL-speak. So if the oldest date you could access was March 18, 2008, you'd change that URL to:


    https://pge.opower.com/ei/app/modules/customer/4036925/energy/download?bill=2013-5&exportFormat=ESPI_AMI&from=03%2F18%2F2008&to=04%2F30%2F2013

    Notice how the part just after "from=" changed. Paste that URL into your browser's address bar, and it'll download the much larger dataset. The UI doesn't let you just select that maximum date range for no good reason though. PG&E... sigh...

    So anyway, send me either your small ZIP file of about a year's data, or the bigger one. Also, if you had any major changes in your energy situation during the timespan, let me know, like for example "I got my Tesla on 2013/03/14" or "I brought my solar panels online on 2012/05/12" or whatever. If you want me to add some amount of daily car charging to the historic data, let me know how much daily. I use data from before I had my Tesla, and just add 50 miles per day, every day, starting charging at midnight. Also, I need you to tell me what PG&E baseline region you're in. That's kind of semi-complicated to figure out. It depends on your county, your altitude above sealevel, and the phase of the moon. The document that describes the regions is this:

    http://www.pge.com/tariffs/tm2/pdf/ELEC_PRELIM_A.pdf

    I'm in the "normal" part of San Mateo county, below 1,500 feet altitude, so that makes me zone "T".

    Be aware that the XML data contains the address at which you get service, so if that's sensitive, you can unzip the file, open the electricity data in a text editor, and just delete the line that says:

    <title type="text">123 SOME RD SOMECITY CA SOMEZIP</title>

    In my file, it's line 14 -- should be near the top there somewhere. If you have multiple meters or multiple service addresses, then there might be multiple such lines in the file. I completely ignore that line right now, so it's fine if you just nuke it. There's some chance that using that address I could figure out automatically what baseline region you're in -- but given the descriptions in the PDF above, I'd say unless PG&E lets you just do a lookup it'd be super hard to calculate it.

    If you want, just post the file here and I'll pick it up. If you prefer, you can email it to me at [email protected] for slightly more privacy.

    Eventually, I'll try seeing if I can put the whole thing online where you can just use PG&E's mechanism for sharing data with analytic websites to get the data more easily -- but PG&E makes it super hard for a developer to sign up for that connectivity, so.... PG&E.... sigh...


    ...But, on the plus side I've added some code to my analyzer that now spits out a bit more info: your per-day summer vs winter cost, which can help you figure out if you want to switch to EV before or after the summer :) Doing a per-day calculation will also make things a bit more easy to understand given the arbitrary date ranges if you use the maximum data option.


    - - - Updated - - -

    Yeah, if your net is $0, then PG&E isn't going to start paying you, so E-7 will probably continue to leave you at $0.

    - - - Updated - - -

    I found this on the PG&E website to help figure out your baseline region:

    Understanding Baseline Quantities
     
  6. CraigHughes

    CraigHughes Member

    Joined:
    Feb 9, 2013
    Messages:
    24
    Location:
    NorCal
    I found a bug in how I was calculating baseline usage for E9 which punished it pretty badly. I was using their baseline as per month, when it's actually per day, so off by a factor of about 30x, which pushed pretty much all E9 usage into tier 3 super fast. I've fixed it now, and my own data now shows:

    Without car charging:
    E9 per day: $5.66 EV per day: $4.78

    With 50 miles per day:
    E9 per day: $9.38 EV per day: $6.50


    So still EV looks like it'll be about 70% of the cost of E9 for me, but it's not as dramatic as it used to be when I was miscalculating so badly. I'm still not calculating baseline probably exactly the same way PG&E does (they seem a little vague as to how to calculate it). I basically just count baseline from the chart in the rate schedule * number of days in the month, and then fill the 0-100% bucket, then the 101-130% bucket, then 131-200%, then the 200+% bucket.
     
  7. CraigHughes

    CraigHughes Member

    Joined:
    Feb 9, 2013
    Messages:
    24
    Location:
    NorCal
    I've now implemented calculations for E1, E6, E7, E9 and EV, and tweaked the output to be a IMO a bit more informative/helpful.

    Code:
    Rate: E1
    Summer    Cost: $7010.64     Per day: $11.49
    Winter    Cost: $9126.48     Per day: $13.58
    Total    Cost: $16137.12     Per day: $12.59
    Rate: E6
    Summer    Cost: $7185.56     Per day: $11.78
    Winter    Cost: $8577.94     Per day: $12.76
    Total    Cost: $15763.50     Per day: $12.30
    Rate: E7
    Summer    Cost: $6686.34     Per day: $10.96
    Winter    Cost: $8025.64     Per day: $11.94
    Total     Cost: $14711.98    Per day: $11.48
    Rate: E8
    Summer    Cost: $6959.59     Per day: $11.41
    Winter    Cost: $7481.49     Per day: $11.13
    Total     Cost: $14441.08    Per day: $11.26
    Rate: E9
    Summer    Cost: $5582.90     Per day: $9.15
    Winter    Cost: $6436.79     Per day: $9.58
    Total     Cost: $12019.69    Per day: $9.38
    Rate: EV
    Summer    Cost: $3752.77     Per day: $6.15
    Winter    Cost: $4576.09     Per day: $6.81
    Total     Cost: $8328.86     Per day: $6.50
    
     
  8. goaliemanshark

    Joined:
    Mar 18, 2011
    Messages:
    162
    When i type in "./parse.js" it gives me the error, "." is not recognized.

    I'm doing something obviously stupidly wrong aren't i?
     
  9. CraigHughes

    CraigHughes Member

    Joined:
    Feb 9, 2013
    Messages:
    24
    Location:
    NorCal
    If you type "node -v" instead, without the quotes, what does it say?
     
  10. goaliemanshark

    Joined:
    Mar 18, 2011
    Messages:
    162
  11. CraigHughes

    CraigHughes Member

    Joined:
    Feb 9, 2013
    Messages:
    24
    Location:
    NorCal
    That's good :)

    Now try:

    "node parse.js" instead of "./parse.js" -- could be permissions aren't set to executable or something.
     
  12. napabill

    napabill Active Member

    Joined:
    Apr 30, 2009
    Messages:
    1,324
    Location:
    Napa, California, United States
    I just sent off my data to CraigHuges in an email. Would really like to make the switch to a TOU schedule so assume E-9 is the way to go. Will be looking at a solar installation in a couple of weeks.
     
  13. Lloyd

    Lloyd Active Member

    Joined:
    Jan 12, 2011
    Messages:
    4,885
    Location:
    San Luis Obispo, CA
    When you install solar, you will automatically be placed on a TOU rate.
     
  14. rcc

    rcc Model S 85KW, VIN #2236

    Joined:
    Aug 1, 2012
    Messages:
    413
    Location:
    San Jose, CA
    Not in NoCal. You can stay on the E1 rate if you want to. That's my plan given how often people are at home during the day.
     
  15. CraigHughes

    CraigHughes Member

    Joined:
    Feb 9, 2013
    Messages:
    24
    Location:
    NorCal
  16. Klaus

    Klaus Member

    Joined:
    Apr 20, 2013
    Messages:
    444
    Thank you, Craig!

    Just for reference, the layout is a little skewed when I open the web site on my iPad using Safari.

    image.jpg

    Klaus
     
  17. Musterion

    Musterion 18h 03m 37s −24° 23′ 12″

    Joined:
    Jan 10, 2013
    Messages:
    337
    Location:
    M8
    Hi Craig, I was wondering if you have updated the EV-A rates to the final "live" ones at http://www.pge.com/tariffs/tm2/pdf/ELEC_SCHEDS_EV.pdf ?

    If I'm reading the github right, it wasn't modified after the final rates were announced, but I'm not sure what your web portal uses.

    I called PG&E and they confirmed even though I have all my data via smartmeter they can't do the calculation for anything besides E-1 and E-6 and encouraged me to do it myself. So your tool seems the best thing out there for some time!

    I did confirm that PG&E will allow you to switch back off of any EV plan so one can also do the experiment.
     
  18. liuping

    liuping Active Member

    Joined:
    Jul 23, 2013
    Messages:
    1,858
    Location:
    San Diego
    That's surprising. For SDG&E here in San Diego, the EV rates are really good when combined with Solar. They charge higher rates during the day (so we earn more credits) and lower super off peak rates (so we use less credits).

    I don't think SDG&E particularly likes it, since they get less money, but it's great for Solar+EV users...
     
  19. gregincal

    gregincal Active Member

    Joined:
    Oct 26, 2012
    Messages:
    2,136
    Location:
    Santa Cruz, CA
    Schedule EV eliminates tiers and if you are at baseline usage then all time periods are more expensive.
     
  20. Benjamin Brooks

    Joined:
    Jan 21, 2013
    Messages:
    443
    Location:
    San Jose, California, United States
    Yeah, would be interested to see the tool output with the final rate numbers plugged in... thanks!
     

Share This Page