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

Gen2 Prius: Custom PIDs for Torque (Android App) with formulas

Discussion in 'Gen 2 Prius Technical Discussion' started by usbseawolf2000, Jun 24, 2011.

  1. ehybrid

    ehybrid Junior Member

    Joined:
    Nov 8, 2011
    17
    4
    0
    Location:
    Melbourne, Australia
    Vehicle:
    2009 Prius
    Model:
    N/A
    If the latest version isn't on the market, can you let me know where to get it? I've tried quoting all the fields (well spotted, all the staring I've done at it, I still missed that) however it still doesn't work. I'm about to start divide and conquering to see if I can isolate it to a single cell, bit painful with the delete/add process & it messing up my homescreen each time though... Wish there was some way of saving display layouts...

    Sounds odd that the "master cylinder torque" includes the regen component. Shouldn't the regen component be through the drive shaft, and the master cylinder done via the brake pads, which wouldn't go through the drive shaft -- i'm assuming there's a torque sensor on the brake cylinders on each wheel (due to the relationship with brake fluid pressure wouldn't be particularly reliable). I accept it as "right" btw, I'm just interested in the rationale because I like knowing everything :)

    Ben.
     
  2. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    2,996
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    It is on Android Market. I use Excel with a macro to export out to CSV. Less headache that way.

    Separating it into two lists is a great idea. I will get to it.


    It is actually the pressure of the brake pedal. If you view the data of Master Cylinder Torque by adding it as a gauge, the value goes up even when you regen-brake. That's how I knew it is actually the pressure from your foot pushing.
     
  3. ehybrid

    ehybrid Junior Member

    Joined:
    Nov 8, 2011
    17
    4
    0
    Location:
    Melbourne, Australia
    Vehicle:
    2009 Prius
    Model:
    N/A
    I found openoffice calc has a tick box to quote all 'text fields' which matches byte-for-byte with your spreadsheet...

    Makes sense, now you say it that way. :)

    Hopefully some of the formulas I rewrote can help you with the second list (I was hoping my list was 'exactly' the second list, so your list would only need the metric removed)... I've still got a bug where it's ignoring all the PID's from the batteries/motor controllers don't get read though, taking some time to figure out.

    Finally, a little off-topic, is there a way to "save" your dashboard layouts in torque? I'm sick of having to re-drag gauges in and would really like to be able to try out some of the setups you guys use rather than having to do it all by hand.

    Ben.
     
  4. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    It is the other way round.

    They are related but I'm not sure you can add them directly this way. Here is a quote from the NCF.

    The brake force required by the driver needs to be calculated and not read directly from the Master cylinder torque.

    Vincent
     
  5. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Regenerative brake request torque.

    Regenerative brake execution torque.

    If HV ECU cannot supply the requested torque, the balance must be made up by the hydraulic brake. Therefore, I think this equation may be what you want:

    Hydraulic brake force = Regenerative brake request torque - Regenerative brake execution torque

    Vincent
     
    lopezjm2001 and usbseawolf2000 like this.
  6. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    510
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Sorry may have missed earlier. What are the formulas for
    Regenerative brake request torque and
    Regenerative brake execution torque

    ?
     
  7. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    You can find it in the google spreasheet.

    Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8
    0 Name ShortName ModeAndPID Equation Min Value Max Value Units Header
    1 Request Regenerative Brake Torque Req Regen Torq 21C3 4 * F 0 186 Nm 7E2
    2 Regenerative Brake Torque Regen Torq 21C3 4 * E 0 186 Nm 7E2


    Vincent
     
    1 person likes this.
  8. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    2,996
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Thanks, I'll test it out.
     
  9. thatguy

    thatguy New Member

    Joined:
    Sep 15, 2011
    19
    7
    0
    Location:
    Virginia
    Vehicle:
    2005 Prius
    Model:
    N/A
    I've been playing with the two options for displaying friction brake losses and have come to the conclusion that they provide similar data with a few exceptions. Depending on what you want to use the data for I think either gauge can be useful. I use the friction brake power gauge to maximize my regenerative breaking and to notify me if skid control has activated.

    Master Cyl Option: RPM * (Regenerative Brake Execution Torque + Master Cylinder Torque)
    ((( 256 * A ) + B ) - 16383 ) * (( 4 * R - 512 ) + ( 4 * E )) / 9549 shortens to:
    ((( 256 * A ) + B ) - 16383 ) * (( R - 128 ) + E ) / 2387.25

    Request Option: RPM * (Regenerative Brake Execution Torque - Regenerative brake request torque)
    ((( 256 * A ) + B ) - 16383) *( 4 * ( E - F ) ) / 9549 shortens to:
    ((( 256 * A ) + B ) - 16383) * ( E - F ) / 2387.25

    When driving without braking both show 0.0.

    When under heavy braking or if the HV SOC is high (near or above 80%) both options show similar numbers indicating -5 to -70kW of hydraulic braking losses. They do not show the exact same number but I suspect that is due more to poll timing than a formulaic difference. I have not done a high-speed emergency brake test to determine the maximum of the loss numbers; -70kW is the highest I have seen in my occasional glances.

    When braking moderately (regenerating less than 20kW into the batteries) the Master Cyl option shows low numbers that generally fluctuate somewhere between -0.4kW and -1.5kW. The request option shows 0.0. Based on the brake operation text you found I suspect the request is more accurate in this regime but I have not come up with a good noninvasive test to verify the theory.

    When braking below 7 mph Master Cyl gives realistic data (-1 kW to -6 kW) while Request gives 0 kW. I believe this indicates that when the car is too slow to regeneratively brake it does not request any regenerative braking from the HV ECU so the value provided is zero.

    If braking after the skid control has triggered (bump while braking oddity) Master Cyl provides realistic data (-5 to -60kW) while Request reads 0 kW. I suspect that, like the less than 7 mph case above, the regenerative request is zero.

    So where does this leave us? The Request option is probably more accurate in everyday usage because it will not give the small, likely incorrect, values while under light braking. Unfortunately it will not tell you when skid-control has been enabled and thus all your braking will be done on the friction brakes. I will likely stick with the Master Cyl option and just try to ignore values below 2 kW when my regen braking is below 15kW.
     
    1 person likes this.
  10. kid06

    kid06 Junior Member

    Joined:
    Dec 3, 2011
    1
    1
    0
    Location:
    Venice - Italy
    Vehicle:
    2006 Prius
    Model:
    N/A
    I would like to say thank you. I'm currently developing apps reading canbus for J2ME platform (cheap mobile phone, not smartphone).

    With a nokia 3110c actually I can log about 14 PID/s using a cheap chinese elm 327 BT interface.

    My contribution: Suppling the supposed lenght of answer in the query makes answer time short (pag 61 in elm manual). Torque do it? Is it anywere in config?

    Here a piece of log from my j2me apps (timestamp in msec. t=3 secs circa). As you can see I used yours suggested pids. :)

    ->

    #PID 0105;1322843416009;58
    #PID 21F3;1322843416071;0C390E80
    #PID 21CD;1322843416140;000000800F3F501D00501E
    #PID 21C3;1322843416195;3FFF0FA000003FFF0FA00000000000000080933791008000424745467300807D7D494901800000
    #PID 21C4;1322843416244;0040006C4C489806048080FF200000000000
    #PID 21CE;1322843416316;73806E866E866E866D866C866F866D866D866A866E866A866C866B866E866E00
    #PID 21D0;1322843416384;0E0000000000000000866A0986700D1716161615151515151515161617000000
    #PID 21CF;1322843416458;848980C55DA300080000847B84A4847B0000
    #PID 21D3;1322843416515;0000000002
    #PID 0105;1322843416575;58
    #PID 21F3;1322843416624;0C390E80
    #PID 21CD;1322843416668;000000800F3F501D00501E
    #PID 21C3;1322843416740;3FFF0FA000003FFF0FA00000000000000080933791008000424745467300807D7D494901800000
    #PID 21C4;1322843416817;0040006C4C489806048080FF200000000000
    #PID 21CE;1322843416882;73806E866C866F866B866D866B866D866A866B866A866D8668866B866D866F00
    #PID 21D0;1322843416947;0E000000000000000086680A866F011716161615151515151515161617000000
    #PID 21CF;1322843417012;848980C55DA300080000846D84A484890000
    #PID 21D3;1322843417077;0000000002
    #PID 0105;1322843417119;58
    #PID 21F3;1322843417173;0C390E80
    #PID 21CD;1322843417235;000000800F40501D00501E
    #PID 21C3;1322843417300;3FFF0FA000003FFF0FA00000000000000080933791008000424745467300807D7D494901800000
    #PID 21C4;1322843417370;0040006C4C48980604807FFF200000000000
    #PID 21CE;1322843417457;73806E866E866B866E866B866F866B866D866A86698669866C8666866F866C00
    #PID 21D0;1322843417540;0E000000000000000086680B866E001716161615151515151515161617000000
    #PID 21CF;1322843417601;848980C55DA300080000847B84A4847B0000
    #PID 21D3;1322843417649;0000000002
    #PID 0105;1322843417696;58
    #PID 21F3;1322843417769;0C390E80
    #PID 21CD;1322843417823;000000800F40501D00501E
    #PID 21C3;1322843417900;3FFF0FA000003FFF0FA00000000000000080933791008000424645467300807D7D494901800000
    #PID 21C4;1322843417965;0040006C4C489806048080FF200000000000
    #PID 21CE;1322843418052;73806B866D866B866B866B866D866B866B866C866A86698669866B866D866F00
    #PID 21D0;1322843418136;0E0000000000000000866909866E001716161615151515151515161617000000
    #PID 21CF;1322843418218;848980C55DA300080000847B84A4847B0000
    #PID 21D3;1322843418277;0000000002
    #PID 0105;1322843418335;58
    #PID 21F3;1322843418398;0C390E80
    #PID 21CD;1322843418438;000000800F41501D00501E
    #PID 21C3;1322843418516;3FFF0FA000003FFF0FA00000000000000080933791008000424645467300807D7D494901800000
    #PID 21C4;1322843418590;0040006C4C489806047F80FF200000000000
    #PID 21CE;1322843418672;738064866E866B866B866A866D866B866C866A866D8668866C8668866A866B00
    #PID 21D0;1322843418760;0E0000000000000000866809866E001716161615151515151515161617000000
    #PID 21CF;1322843418819;848980C55DA300080000847B84A4847B0000
    #PID 21D3;1322843418903;0000000002
    #PID 0105;1322843418959;58
     
    donbright likes this.
  11. comatoes

    comatoes #GreenLife

    Joined:
    Jun 2, 2011
    288
    16
    5
    Location:
    USA
    Vehicle:
    2007 Prius
    Model:
    II
    I still am unable to load your custom PIDS.. I copied it onto my sd card, and I select load predefined set, but it only gives me the option for Gen II or Gen II prius, not load off of sd card.. any help?
     
  12. LeviSmith

    LeviSmith Member

    Joined:
    Aug 19, 2009
    108
    38
    0
    Location:
    NY
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Advanced
    I had that trouble too. It wasn't clear to me that I had to spend the $5 to get the full version to be able to import the pids.

    Levi

     
  13. comatoes

    comatoes #GreenLife

    Joined:
    Jun 2, 2011
    288
    16
    5
    Location:
    USA
    Vehicle:
    2007 Prius
    Model:
    II
    I did spend the $5 for the app months ago.. it still doesn't let me :-/
     
  14. LeviSmith

    LeviSmith Member

    Joined:
    Aug 19, 2009
    108
    38
    0
    Location:
    NY
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Advanced
    And you're using the full version right? I noticed I was accidentally using the old shortcut I had made and running the free version after I bought mine.

    And you unzipped the file so you have a csv, right?

    I may have removed spaces when I was playing, but I have /mnt/sdcard/.torque/extendedpids/USBSeawolf2000Gen2Prius.csv

     
  15. comatoes

    comatoes #GreenLife

    Joined:
    Jun 2, 2011
    288
    16
    5
    Location:
    USA
    Vehicle:
    2007 Prius
    Model:
    II
    Yep, I removed spaces also, but to no avail..
     
  16. jpadc

    jpadc Type before I think too often

    Joined:
    Sep 9, 2008
    343
    34
    0
    Location:
    Indianapolis and Northern Wisconsin
    Vehicle:
    2008 Prius
    Model:
    N/A
    Are you on a Mac computer or did you download the file from one. Maybe you need to fix the line endings in the .csv file - Just a thought...
     
  17. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    2,996
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Did you get it to work? I would double check the path.
     
  18. comatoes

    comatoes #GreenLife

    Joined:
    Jun 2, 2011
    288
    16
    5
    Location:
    USA
    Vehicle:
    2007 Prius
    Model:
    II
    Yep, I got it. I had them in the wrong directory on the sdcard. Thanks!
     
  19. FreydNot

    FreydNot Member

    Joined:
    Dec 16, 2010
    210
    37
    0
    Location:
    Seattle, WA USA
    Vehicle:
    2008 Prius
    Model:
    N/A
    I'm just getting started using Torque with my 2008 Prius. I have the app installed on my Samsung Vibrant (T-Mobile version of the Galaxy S). My Bluetooth Kiwi should show up in the next few days. Right now I am just beginning to set everything up.

    Can someone recommend the proper settings for the initial vehicle data for a gen2 Prius? Here is are my guesses:

    Engine Displacement: 1.4 l
    Weight: 1360 KG
    Boost Adjustment: 0
    Max dial RPM: 7000
    Volumetric Efficiency %: 51.0 (This is the gen3 value. What is the gen2 value?)
    Fuel Cost: 0.84 (the default, this isn't what we pay at the pump is it?)
    Accumulated Distance: (my odo number converted into KM)
    MPG Trim: 1.0 (none, the default)

    I plan to document my discoveries for other newcomers once I get a basic understanding of how it all works and what values are good for what.
     
  20. jpadc

    jpadc Type before I think too often

    Joined:
    Sep 9, 2008
    343
    34
    0
    Location:
    Indianapolis and Northern Wisconsin
    Vehicle:
    2008 Prius
    Model:
    N/A
    Any of you guys know if the Prius ECU keeps track of oil pressure and, if so, how to get Torque to report it?