-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify energy and emission calculations and make them more principled #954
Comments
@shankari @JGreenlee @the-bay-kay and I met yesterday to start talking about ways in which we could re-vamp the calculations for energy and CO2 in both the phone dashboard and online dashboards. There are several main points which we considered:
We also discussed different units of measure related to energy (BTU vs kWH). Which, in terms of physics, all travel uses energy, but I'm guessing we're most interested in showing the non-human-powered energy use on the dashboards? Next steps:
|
I've begun looking into grid mixes, and found a good dashboard with relatively coarse regions(~25 in the US): epaDashboard , the source data from this could be one option for our location-based grid tuning efforts |
While it does not have information on emissions, the National Transit Database NTD has a variety of data on a transit-agencies, sort-able by city. Each profile entry (ex) does contain a breakdown of the fleet - though it's pretty general in its vehicle categories. I think we'd have to make several compromises using this database - we'd need generalized emission calculations for each vehicle type, and agency "coverage" may not be obvious when querying the database. For example, you couldn't tell if a rural town is covered by a neighboring city's metro (e.g., Boulder Creek is covered by the Santa Cruz metro). Furthermore, some cities have multiple metro agencies in one region, which may cause some issues. I'm adding this to the thread as a fallback option, if we don't find another dataset. The NTD is thorough in the number of agencies and fleets covered, it's just missing some of the data we're looking for! EDIT: The American Public Transit Agency (APTA) has a great public transit vehicle database! This seems to be a courser-grain study (150 agencies participating in US, 10 in Canada), but they have details on each vehicle's make and model. We would still need to find / generate emission numbers for each vehicle type, but this feels like a step in the right direction! |
It seems the Federal Transit Association (FTA) does regular assessments of Greenhouse Gas (GHG) missions, based on fleets. If we want to use the transit databases mentioned above, Table 2-3 on this report may be of interest. It seems there are talks to do another programmatic assessment of GHG emissions in the next year or two (link). Comments on this docket item closed a few weeks ago, but one memo did point to this excel sheet used to calculate emission estimations, based on zone and vehicle category. I'll update this comment with more details - the hope is to find a version of these databases that is query-able by location / zone! EDIT: This NDT database seems like a great resource for the amount and type of fuel consumed by various transit agencies. Unfortunately, there's no data on which modes of transportation were studied - hopefully I can find where the numbers came from here. |
We also asked around within NREL, and were referred to the following resources:
|
From #1047's discussion, I ended up making this slide while I was waiting for a process to run to get my ideas on paper - throwing it here since we won't get to it until we tackle this! |
@nataliejschultz the last comment here: #954 (comment) has "EPA eGRID for domestic and IEA for intl" but there is also a WattTime (or similar) API that we have access to through the NREL library. We should get access to it, and investigate it to see how well it works. |
From our discussion today -- handling hybrid vehicles: As a bridge until we have the bandwidth to add custom vehicles, and as a default once we do, I think we can get an estimate of fuel-use-breakdown for a hybrid vehicles from GREET of which I've worked with in the work I've done with TEMPO and models vehicle efficiencies and emissions (both operational and full fuel pathways). There are 2 cases to consider - HEVs and PHEVs
Going forward, we need to:
@shankari @JGreenlee for visibility |
WattTime Data API: takes latitude + longitude as an input and “returns the details of the grid region serving that location, if known”. I was able to create an account with the API, and by “details of the grid region”, I think they just mean the name of the grid serving that location. For example, I made a request using a lat/lon in Steamboat Springs, CO.
This was the response I got:
I tried to get more information through a “signal index” request:
And got this response:
We may be able to get slightly more detailed information with the paid version, but the library hasn’t gotten back to me about this yet. They also have a SDK that might be useful if we decide to use it. |
That seems promising! From what I just read it seems like MOER is basically a measure of CO2 (in pounds) per MWh, which is certainly something we can work with. I think we may want to use "historical" rather than "index" because that would allow us to pass start/end times as parameters. So we'd get a measure of MOER at the specific time of travel rather than the time at which the calculation is being performed. |
I also think that we want |
wrt transit mix, here's a data source. It is definitely not as cool as WattTime; there is no API to query and I don't know if we have historical numbers.
It also looks like it might be exposed via an API through a third-party API provider (https://dev.socrata.com/) Maybe we should build an API like WattTime that makes integrating with the energy/carbon of transit modes easier! |
Although I don't think the NTD will have the bounds of each transit agency, I do see that there is a full list where each entry is registered to a particular city. We already get the name of cities from OSM / Overpass so theoretically we should be able to lookup the transit agency (or multiple transit agencies) for by city name. (In the case of multiple agencies in the same city, which we cannot disambiguate, maybe we take a weighted average?) However, this data could use some cleaning... just on the first page I noticed "Middleotwn Ohio" (mispelled) and "Academy Lines" (duplicated as both an llc and inc) |
Much better than city names, I found that the agencies are also listed by UACE (Urban area codes, which I have learned are Census-designated and updated every 10 years) |
As a first pass, we could aggregate the mileage across all the transit agencies in the urban area. We could also try to validate a matching of the city name, but I know that it will fail in my local area, where the city is shown as "San Jose", although the transit agency covers all of Santa Clara county, including my town of Mountain View. EDIT: My daughter also suggested that we could look at the bus stops along the route in OSM and see which agency they are run by. But we just spot checked, and the OSM says "VTA" instead of "Valley Transportation Authority". |
For every mode we want to calculate variables a) gas fuel type (ICE or HEV) including gas cars, traditional hybrids, motorcycles, mopeds gallons = distance_miles / mpge
# each gallon contains 33.7 kwH and emits 8.91 kg CO2
energy = gallons * 33.7
carbon = gallons * 8.91 b) electric fuel type (BEV) including e-cars, e-bikes, e-scooters energy = distance_miles / mpkwh
aoer = watttime_lookup( ... ) # lbs/MWh
carbon = energy * (aoer / 1000) * 0.453592 c) plug-in hybrids (PHEV)
d) transit
some pseudocode def calc_energy_and_carbon(distance, fuel_type):
distance_miles = distance / 1609.34
if fuel_type == 'electric':
energy = distance_miles / mpkwh
aoer = watttime_lookup( ... ) # lbs/MWh
carbon = energy * (aoer / 1000) * 0.453592
return [energy, carbon]
gallons = distance_miles / mpge
if fuel_type == 'gas':
# each gallon contains 33.7 kwH and emits 8.89 kg CO2
return [gallons * 33.7, gallons * 8.89]
if fuel_type == 'diesel':
# each gallon contains 38.1 kwH and emits 10.18 kg CO2
return [gallons * 38.1, gallons * 10.18] |
Rich modes, which are provided by a Carbon intensity is basically a product of i) energy intensity, ii) the fuel type(s) of the mode, and iii) if applicable, the mix of the grid at the time&location of travel. I think that to keep the platform as flexible as possible, (i) and (ii) should be properties of the rich mode, replacing Transit needs to be handled differently altogether. Since we will attempt to localize on a per-trip basis, we will not know MPGe or Wh/km ahead of time. I think these modes should have something like: |
Couple of high-level points:
|
Update: The library got back to me, saying: " I'm confirming that your WattTime API account has been provisioned with access to real-time, historical, and forecasted marginal emissions data. " However, when I tried to make a historical call for aoer with these params:
I got an error message: Running the same request and changing the params to request moer works just fine:
|
@nataliejschultz that's because they have given you access to the marginal data. that is |
Regarding accessing the aoer data, the library representative said: "it would be an additional $10,000/year to access this data. Unfortunately the Library doesn’t have the funds to cover this cost.....if there is enough interest in aoer, we might look into moving to providing this data only at our next subscription renewal. This unfortunately isn’t until February, but is something we will look into and reach out to the registered WattTime users about." |
Unfortunately, I don't think Watttime will be of any use to us without AOER data. If it is not in the budget, we may have to consider falling back to the EPA eGrid Power Profiler which we had talked about before. However it is not as granular and it is only for the U.S. Are there any other options? |
Functions for calculating the estimated footprint of a trip, both in terms of energy usage (kwh) and carbon emissions (kg_co2). e-mission/e-mission-docs#954
I will reply to the library representative, but:
|
We also need to figure out the proportion of transit and the load factor across the world. Here's one source. It doesn't have exactly what we want, but the source that the pull this from (particularly PMT) might also have some data on VMT?! There is also this: Maybe BRT ridership can be a proxy for transit ridership in general? This seems like the best source, but even it has fleet composition only in Europe. |
Up to now, we've had base modes only for the purpose of having a designated color and icon for any rich modes that get defined. All of the MET and carbon footprint info was defined for each and every rich mode (in the label-options JSON) Now, base modes will have a base "met" and "footprint". The mets are copied over from what was in e-mission-phone (reformatted to Python). Rich modes previously had a 'kgCo2PerKm' value. As part of the effort to de-couple energy calculations from carbon calculations (e-mission/e-mission-docs#954), this is replaced by a 'footprint' field, which has energy intensities broken down by fuel type. For transit, we describe the mapping to mode(s) in the NTD. Rich modes can still override "footprint" or "met", or any of these properties. It will no longer be necessary to include "met_equivalent" in rich modes. If "met" is not present, it will be implied as being the met of the base mode. Now our "base modes" and "rich modes" line up better and we can describe it as an inheritance pattern.
We already query the OSM / Nominatim API for places in order to reverse-lookup the location. We use this to extract a short "display_name" (e.g. "Vine Street, Cincinnati"). However, this is all we have been using it for; the rest of the response was discarded For looking up the mix of energy on the grid at a location (e-mission/e-mission-docs#954), we'd like to have the ZIP code. In addition, other fields in the 'address' section of the response may prove useful down the line
I pulled more emissions factors today, and converted the factors I had before to kg/MWh, I have annotated with the vehicle I assumed, if we have more than one vehicle type using a given fuel, I can check on if they are different enough to need to be separate intensities (diesel is not that different, CNG, for some reason, seems to be).
|
@Abby-Wheelis For the jet fuel, the assumed vehicle is "passenger". does that mean that it is PkmT? It just seems a bit weird that the EF is reported on a per-vehicle basis for buses and on a per passenger basis for planes (from a transportation system perspective, planes are just buses that fly). What is the load factor that is assumed for 'Jet Fuel'? |
Ah, whoops! I meant passenger plane (as in not freight plane) let me fix that |
Great!
Why does the emission factor of the fuel depend on what type of vehicle is consuming it? I thought that tailpipe emissions from burning the fuel, and emissions from production of the fuel, would be consistent regardless of vehicle.
What vehicle types besides buses use CNG? |
I think you can have cars that run on CNG. They are somehat popular in India for sure (maybe Asia in general?) but I have not seen one in the US. https://www.carwale.com/new/cng-cars/ |
Yes, cars are one of the other CNG vehicles listed in GREET - it is my impression that they account for as many possibilities as possible, not just what vehicles are actually on the road. I chose to average "intercity" and "transit" busses for this value, they are only about 1% different.
Looking specifically at CNG busses vs cars, the emissions attributed to feedstock and fuel production seem to be the same, and CO2 emissions for operation are extremely similar (follows the theory that fuel burned = carbon emitted), but vehicle operation differs in terms of the CH4 and N2O emitted. I looked into it a bit, and CH4 emissions are commonly attributed to cold-starting a vehicle and NG fueled vehicles seem to emit more than gas fueled vehicles article here - I would instinctively attribute the difference to the fact that a car engine is probably fairly different from a bus engine, but I will admit that I don't know much about engines. |
Currently, there is an error thrown when setting the Carbon Dataset, though it does not seem to hault the function of the app. However, noting the error in the recent migration of Profile raised a broader issue:
@shankari left this feedback on #e-mission-phone#994, and I'm pulling it into a dedicated issue for additional consideration and attention during the upcoming dashboard migrations.
The text was updated successfully, but these errors were encountered: