1. Attachments are working again! Check out this thread for more details and to report any other bugs.

Measuring GenIII Prius energy (power) flow with OBD

Discussion in 'Gen 3 Prius Technical Discussion' started by FrankTiger, Sep 30, 2012.

  1. FrankTiger

    FrankTiger Member

    Joined:
    May 26, 2010
    63
    118
    0
    Location:
    Madrid, Spain
    Vehicle:
    2010 Prius
    Model:
    V
    Hi everyone [​IMG]

    I want to show you how I measure the energy (power) flow within our Prius using OBD PIDs.

    The first energy flow is the gasoline flow which converts to energy using 34780 joules per mililiter. Joules per second are watts, measuring power.

    In the following image there are the PIDs involved in measuring the gasoline injected into the ICE.

    [​IMG]
    Second step of the energy flow is around the ICE. Its energy output flows in two ways:

    * The output shaft connected with the crankshaft that goes into the PSD. Our Gen III Prius allows us to know what is the power along this shaft with a couple of PIDs

    * Heat that flows out through the radiator and the exhaust. The amount of energy lost in heat in the ICE is the difference between the gasoline energy and the shaft output energy.

    The scheme around the ICE is as follows:


    [​IMG]

    The PSD has four ways for the mechanical energy:

    * The ICE shaft, in which we already know the energy.

    * MG1. Our GenIII Prius gives us the mechanical energy of this motor using PIDs 7E2 2168 and 7E2 2162

    * MG2. Our GenIII Prius gives us the mechanical energy of this motor using same PIDs as for MG1

    * Output shaft. We can calculate the energy going or coming along this shaft coming from the other end.

    The difference between the energy input and the energy output into the PSD and output shaft tells us how much energy is lost in heat in the PSD and the transmission.

    The scheme around the PSD is as follows:
    [​IMG]
    Next is a complicated area, which is the electric energy flow.

    The mechanic energy that input each MG1 and MG2 is transformed in electricity that goes into the inverters. So far I have no information about that energy that goes between MG1/MG2/Inverters so I have to put them together as one unit in the electrical side.

    On the other side of the electrical area there are some components:

    * Hybrid battery. We already know how to measure the energy that goes into or flows out the hybrid battery using OBD PIDs.

    * AC Compressor. There is a specific PID to tell us how much energy goes into the AC compressor.

    * 12 Volt system. As I do not still know any PID around this system, I have to rely on measures taken with our car standing. It seems that the 12Volt system takes some 220watts when headlights are off (but radio and navigator on) and 330watts with LED headlights on. I will use these values as standard.

    * Heat. As in other schemes, knowing the output energy and the input energy of the electrical side, we can calculate the energy lost in heat (mainly in inverters)

    The scheme of the electrical energy is as follows:



    [​IMG]

    Coming back to the mechanical energy, that we left arriving to the wheels, next step are the wheels in which are the friction brakes (we can know the friction force using a OBD PID) and the tires. The energy lost in tire drag was discussed here in this post.

    The energy scheme around the wheels is:

    [​IMG]
    Last energy scheme is about the whole Prius interacting with the environment.

    For this scheme we have to rely on physic formulas for kinetic energy, potential gravity energy and aerodynamic drag energy that are well known around this forum.

    The scheme for the Prius energy as a whole interacting with the environment is:

    [​IMG]
    Now we already have all the components of the energy (power) flow so we can put them together in the next scheme:

    [​IMG]

    Just to show you some real values of the power flow measured in the Test Points described here, which are:

    [​IMG]

    In Test Point A [downslope at low speed with ICE stopped] the power flow is as follows:



    [​IMG]

    In this case, the scheme is read from right to left because ICE is not turning and the hybrid battery is charging.

    Gravity provides some 4kW; car deceleration provides 170W and aero drag takes 823W. The net power going into the wheels is 3244W. Out of that power 1549W are lost in tires friction heat, so 1695W goes into the PSD.

    In the PSD, MG2 takes 1395w of mechanical power and MG1 adds 115W of mechanical power. The remaining power around the PSD, 415W, is lost in heat in the PSD itself and in the transmission.

    On the electrical side, MG1 and MG2 provides a net of 1280W. This power splits in 659W for charging the hybrid battery, 330W for the 12Volt system and 292W are lost in heat in MG1/MG2/Inverters.


    A more interesting scheme is the Test Point B scheme, in which the car is climbing a slope of 4% at "high" speed and the ICE is close to the PWR area of the HSD indicator.

    Test Point B scheme is next:

    [​IMG]

    In this case, the gasoline flow puts some 55.5kW of chemical power into the ICE, that transforms 35.4% (=ICE efficiency) of it into mechanical power. The remaining chemical power goes into heat.

    The some 20kW of ICE mechanical power that goes into the PSD follows several paths:
    * Some 7kW are drained by MG1, and out of them, some 5kW are returned to mechanical power by MG2.
    * 2236W are lost in heat within the PSD and the transmission.
    * 15384W goes into the wheels.

    On the electrical side, 6931W of mechanical power are given by MG1, 4901W are put back into mechanical power by MG2, 777W go into charging the hybrid battery, 330W go into the 12Volt system and 924W are lost in heat within MG1/MG2/Inverters.

    The 15384W that go into the wheels follow these paths:
    * 2156W are lost in tire friction.
    * 9987W are used to climb the whole car
    * 2262W are lost in aero drag
    * 980W are used to accelerate the car

    I hope this post is interesting

    Big hugs from Frank





    PS. This is the English translation of the same post in the Spanish Prius forum: Mi Toyota Prius - Medida del flujo de potencia a través del OBD - FAQ Prius 3G
     
    GG707, Robert Holt, spiderman and 9 others like this.
  2. GasperG

    GasperG Senior Member

    Joined:
    May 13, 2011
    1,168
    597
    1
    Location:
    Slovenia
    Vehicle:
    2018 Prius
    Model:
    N/A
    All we need now is a phone app that will calculate this in real time as you drive. I see you are from Spain and you are linking to the same forum as user motoleon, he was asking on this forum if there is any interest in Android app for 3 gen Prius.
    There you have it a unique idea, that could sell :)

    In theory you could also see difference in fuel quality, if the difference would be big enough.
     
  3. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Hi Frank,

    I'm a little curious about some of your metrics:
    • fuel consumption - are you using engine rpm * injector timing * K (rate of fuel per pulse). My recording scanner has problems recording all of the metrics I want so I just use mass airflow times the stoichiometric ratio.
    • MG1/MG2 power - are you using the product of torque * rpm * K ?
    • power output from transmission - this is derived from models from kinetic, rolling and aerodynamic drag?
    • traction battery power - I could see current and voltage but you show three PIDs, what are they?
    About the PIDs, I recently read that more than one OBD protocol might be used depending upon the ECU. Are you finding a mix of KWP and CAN or is the ZVW30 using a consistent line protocol over the OBD? Are there any 'buffer' or 'gateway' ECUs that have to be polled to reach others?

    What rates of PID data are you seeing? For example, I'm seeing ~167 ms/PID which means I often have to play math tricks to deal with transient events. Have you already posted details about your data collection system?

    Excellent work!

    Thanks,
    Bob Wilson
     
    hybridbear likes this.
  4. GasperG

    GasperG Senior Member

    Joined:
    May 13, 2011
    1,168
    597
    1
    Location:
    Slovenia
    Vehicle:
    2018 Prius
    Model:
    N/A
  5. FrankTiger

    FrankTiger Member

    Joined:
    May 26, 2010
    63
    118
    0
    Location:
    Madrid, Spain
    Vehicle:
    2010 Prius
    Model:
    V
    Hi Gasper [​IMG]

    Yes! motoleon and I follow parallel tracks. We developed our own dataloggers in Windows Mobile 6 and we are trying to migrate to Android. He already shared a beta of his app with Android, but I am much behing and still playing with basic parts of the datalogger.

    Other than that, I am an engineer more interested in Prius mechanics and to collect as much data as possible, and later in my desktop PC process all of them. App like Torque are dedicated to show real time data in nice graphics, but this is not my interest now, as I am the only driver of the Prius and have to look outside rather than the small screen of the smartphone.

    There is one magic trick in my energy flow -> I know the potential gravity energy of every inch of my usual test trip, described here. This information allows me to calculate what I call "Net on road" power and, going into the Prius, the PSD & Transmission friction energy. In a mobile app, the elevation could be gained by GPS, but the precision is low and is usually fluctuating, introducing big errors in some of the data.

    About fuel quality, yes! I think a better fuel could be measured as an improvement in ICE efficiency. Absolute precision of my data I believe is about 98% but relative precision between the average of ten or twenty trips I think is much bigger.

    Big hugs from Frank
     
    hybridbear likes this.
  6. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    K = (2 * pi) / 60,0000 :: "K" is just a place holder for anything that is used to adjust units

    It is an old math trick when you don't have the scaling factor handy. <wink>

    Bob Wilson
     
  7. FrankTiger

    FrankTiger Member

    Joined:
    May 26, 2010
    63
    118
    0
    Location:
    Madrid, Spain
    Vehicle:
    2010 Prius
    Model:
    V
    Hi Bob [​IMG]

    I use a datalogger made in Windows Mobile 6 with a bluetooth ELM327. I developed the datalogger trying to maximize the speed which is about 19 queries per second that have from 29 to 35 answer frames. I am only using PIDS listed in Torque spreadsheet, and a few that I am still testing like 727 2103 that tells me when the Parking gearbox button is pressed.

    About your questions:

    • My formula for fuel consumption measured in ml/sec is [Engine Speed 7E0 2101 ->(J*256+K)/4] * [Injection volume (Cylinder 1) 7E0 213C -> (A*256+B)/32768] / 315 * [Boolean 7E0 2137 o<16]
    • The above fuel volume formula gives you the precise fuel to match the displayed TRIP fuel economy but for the distance computed using OBD speed values, which in my case is 2.2% short of the displayed distance in the TRIP.
    • MG1 & MG2 power calculated as MGx torque * MGx rpm [but rather than MGx rpm I am using a linear function of vehicle speed and ICE RPM]
    • Yes! The magic trick is that I already know the gravity potential energy for every inch of my usual test trip. It allows me to calculate the transmission power output.
    • The Pids for the battery are 7E2 2198 AB (Batt pack current val) 7E2 218A AB (same as the other) and 7E2 2181 (voltage)
    • My ELM327 tells me that it uses "AUTO, ISO 15765-4 (CAN 11/500)" Protocol for all the communications with the car.
    • I'm not sure if 7E2 (HSD ECU) polls 7E0 (ICE ECU) when we send a query to 7E2 involving a 7E0 managed parameter, but both reports the same value for the parameter.
    • About query speed, the most important 16 queries are repeated in a cycle which is complemented with some 2 to 5 with other queries less time critical, like temperatures. The main cycled repeats every 0.76 sec if I do not record accelerations, yaw rates nor friction brake parameters. If I go for the full set of 51 different PIDs, it repeats every 1.01 secs
    • Transient events are interpolated between exact values from PIDs in Excel.

    Big hugs from Frank
     
    hybridbear likes this.
  8. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,123
    15,389
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus

    Interesting! I had bought a wired ELM327 but got distracted from doing anything more with it.


    Excellent work!

    Bob Wilson
     
    seckwielen likes this.
  9. hybridbear

    hybridbear Member

    Joined:
    Aug 19, 2013
    267
    69
    0
    Location:
    Minneapolis
    Vehicle:
    2013 Prius
    Model:
    Persona
    Fascinating information. It's cool to see how much energy is lost to heat. The lower % of energy lost to heat from the electric motors shows why BEVs and PHEVs have MPGe numbers so much higher than even the most efficient gas engines.
     
  10. mrbigh

    mrbigh Prius Absolutum Dominium

    Joined:
    Sep 6, 2005
    3,686
    699
    2
    Location:
    Long Island, NY
    Vehicle:
    Other Electric Vehicle
    Very interesting and detailed work !!!!
     
  11. spiderman

    spiderman wretched

    Joined:
    Jul 5, 2009
    7,543
    1,558
    0
    Location:
    Alaska
    Vehicle:
    2010 Prius
    Model:
    II
    I like the pictures, thanks!
     
  12. FrankTiger

    FrankTiger Member

    Joined:
    May 26, 2010
    63
    118
    0
    Location:
    Madrid, Spain
    Vehicle:
    2010 Prius
    Model:
    V
    Hi everyone [​IMG]

    I want to show you how I measure the energy (power) flow within our Prius using OBD PIDs.

    The first energy flow is the gasoline flow which converts to energy using 34780 joules per mililiter. Joules per second are watts, measuring power.

    In the following image there are the PIDs involved in measuring the gasoline injected into the ICE.


    [​IMG]
    Second step of the energy flow is around the ICE. Its energy output flows in two ways:

    * The output shaft connected with the crankshaft that goes into the PSD. Our Gen III Prius allows us to know what is the power along this shaft with a couple of PIDs

    * Heat that flows out through the radiator and the exhaust. The amount of energy lost in heat in the ICE is the difference between the gasoline energy and the shaft output energy.

    The scheme around the ICE is as follows:


    [​IMG]

    The PSD has four ways for the mechanical energy:

    * The ICE shaft, in which we already know the energy.

    * MG1. Our GenIII Prius gives us the mechanical energy of this motor using PIDs 7E2 2168 and 7E2 2162

    * MG2. Our GenIII Prius gives us the mechanical energy of this motor using same PIDs as for MG1

    * Output shaft. We can calculate the energy going or coming along this shaft coming from the other end.

    The difference between the energy input and the energy output into the PSD and output shaft tells us how much energy is lost in heat in the PSD and the transmission.

    The scheme around the PSD is as follows:

    [​IMG]
    Next is a complicated area, which is the electric energy flow.

    The mechanic energy that input each MG1 and MG2 is transformed in electricity that goes into the inverters. So far I have no information about that energy that goes between MG1/MG2/Inverters so I have to put them together as one unit in the electrical side.

    On the other side of the electrical area there are some components:

    * Hybrid battery. We already know how to measure the energy that goes into or flows out the hybrid battery using OBD PIDs.

    * AC Compressor. There is a specific PID to tell us how much energy goes into the AC compressor.

    * 12 Volt system. As I do not still know any PID around this system, I have to rely on measures taken with our car standing. It seems that the 12Volt system takes some 220watts when headlights are off (but radio and navigator on) and 330watts with LED headlights on. I will use these values as standard.

    * Heat. As in other schemes, knowing the output energy and the input energy of the electrical side, we can calculate the energy lost in heat (mainly in inverters)

    The scheme of the electrical energy is as follows:



    [​IMG]

    Coming back to the mechanical energy, that we left arriving to the wheels, next step are the wheels in which are the friction brakes (we can know the friction force using a OBD PID) and the tires. The energy lost in tire drag was discussed here in this post.

    The energy scheme around the wheels is:


    [​IMG]
    Last energy scheme is about the whole Prius interacting with the environment.

    For this scheme we have to rely on physic formulas for kinetic energy, potential gravity energy and aerodynamic drag energy that are well known around this forum.

    The scheme for the Prius energy as a whole interacting with the environment is:


    [​IMG]
    Now we already have all the components of the energy (power) flow so we can put them together in the next scheme:


    [​IMG]

    Just to show you some real values of the power flow measured in the Test Points described here, which are:

    [​IMG]

    In Test Point A [downslope at low speed with ICE stopped] the power flow is as follows:



    [​IMG]

    In this case, the scheme is read from right to left because ICE is not turning and the hybrid battery is charging.

    Gravity provides some 4kW; car deceleration provides 170W and aero drag takes 823W. The net power going into the wheels is 3244W. Out of that power 1549W are lost in tires friction heat, so 1695W goes into the PSD.

    In the PSD, MG2 takes 1395w of mechanical power and MG1 adds 115W of mechanical power. The remaining power around the PSD, 415W, is lost in heat in the PSD itself and in the transmission.

    On the electrical side, MG1 and MG2 provides a net of 1280W. This power splits in 659W for charging the hybrid battery, 330W for the 12Volt system and 292W are lost in heat in MG1/MG2/Inverters.


    A more interesting scheme is the Test Point B scheme, in which the car is climbing a slope of 4% at "high" speed and the ICE is close to the PWR area of the HSD indicator.

    Test Point B scheme is next:


    [​IMG]

    In this case, the gasoline flow puts some 55.5kW of chemical power into the ICE, that transforms 35.4% (=ICE efficiency) of it into mechanical power. The remaining chemical power goes into heat.

    The some 20kW of ICE mechanical power that goes into the PSD follows several paths:
    * Some 7kW are drained by MG1, and out of them, some 5kW are returned to mechanical power by MG2.
    * 2236W are lost in heat within the PSD and the transmission.
    * 15384W goes into the wheels.

    On the electrical side, 6931W of mechanical power are given by MG1, 4901W are put back into mechanical power by MG2, 777W go into charging the hybrid battery, 330W go into the 12Volt system and 924W are lost in heat within MG1/MG2/Inverters.

    The 15384W that go into the wheels follow these paths:
    * 2156W are lost in tire friction.
    * 9987W are used to climb the whole car
    * 2262W are lost in aero drag
    * 980W are used to accelerate the car

    I hope this post is interesting

    Big hugs from Frank






    PS. This is the English translation of the same post in the Spanish Prius forum: Mi Toyota Prius - Medida del flujo de potencia a trav&eacute;s del OBD - FAQ Prius 3G

    Reposted 06May19 with images stored in PostImage.com instead of images stored in Imageshack
     
    tacopyro, CR94 and bwilson4web like this.
  13. bisco

    bisco cookie crumbler

    Joined:
    May 11, 2005
    107,700
    48,946
    0
    Location:
    boston
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
  14. CR94

    CR94 Senior Member

    Joined:
    Dec 2, 2014
    2,642
    1,134
    0
    Location:
    Northwestern S.C.
    Vehicle:
    2011 Prius
    Model:
    Two
    Fun stuff!