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. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Per the repair manual, yours and mine are well within the spec.

    Internal resistance of each battery block/ Min.: 0 Ω, Max.: 0.255 Ω

    Always: 0.01 to 0.1 Ω
     
  2. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Hi usbseawolf2000,

    Master Cylinder Control Torque doesn't seem right. It is either a single byte PID or the formula is wrong. The value can not be greater than 0. If you depressed the brake fully, it should read about -496 Nm. If you released completely, it should read 0 Nm.

    Power Resource IB may be a single byte PID too. You can compare it against HV Battery Current, should be quite close. It should be 0 A in [N] but for HV Battery Current, there is some current even in [N] which accounts for the current to supply to DC-DC Converter.

    Aircon Consumption Power should be in kW. If you want it to be in Watts, just change the formula to 19.608 * P, max. is 5000 W.

    Vincent
     
  3. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Vincent,

    You are absolutely right. The equations for Master Cylinder Control Torque and Power Resource IB use only one variable.

    The original equation came back with the right result (brake all the way depressed = -496 Nm). I tested the first variables (Q and AD) and they are zeros so only second variables are used.

    [​IMG]

    I updated the spreadsheet with the simplified equation:

    Master Cylinder Control Torque = (4 * R) - 512
    Power Resource IB = (2 * AE) - 256

    For Aircon Consumption Power, I am not getting any data when I turn on the A/C. I'll have to check with different variable and play around.

    For MG1 and MG2 Torque Execute Values, can you confirm these equations (specifically -512) are correct?


    MG2 Torq Exc = 4 * J - 512
    MG1 Torq Exc = 4 * K - 512

    Dennis
     

    Attached Files:

  4. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    The original formula of -500 has a range of -500 to 520 Nm which do not agree with the Repair Manual. Your corrected formula has a range of -512 to 508 Nm which is in line with the RM.

    Can you also verify Short Circuit Wave Highest Value? Is it L or M?

    Vincent
     
  5. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    I got 5 Volts (maximum) using variable L. I did not try with M, will try tomorrow. I guess that's good. My HV battery has no leak.

    I wonder if we could use this as an indicator for those reported HV battery getting discharged overnight.

    Dennis
     
  6. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    That is a good question! My Gen 1 don't have this PID so I don't know the answer.

    I suppose if there were HV leakage, P3009 would be set? A good improvement over the Gen 1 is the inclusion of INF Code for the Gen 2 which tells you which area has the leak.

    I believe the INF Code can be found at 21C5 of 7E2 (need to be verified).

    Vincent
     
  7. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    I tried the variable M (without multiplication by 0.019608). I saw 0, 32 and 33. Not sure what it is for.

    As for the HV battery leakage detection, as long as the circuit shows more than 4V, it may not trigger P3009 as it appears to be an acceptable range in the repair manual.

    I will try the INF Code. If my Prius has nothing recorded then I will not be able to confirm.
     
  8. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Sorry, no respond from 21C5 of 7e2.
     
  9. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    I created 3 new display pages to switch with a swipe on the touch screen. Since it has not connected to the car, the data is blank.

    Mechanical <-> Electrical


    This view shows RPM of the gas engine, motor generator #1 and motor generator #2. As a bonus, I threw in the gas engine load, hybrid battery state of charge, and the amperage it charge/discharge.

    [​IMG]

    Power (Raw)


    This view shows the horsepower of the gas engine, motor generator #1, motor generator #2 and hybrid battery. As a bonus, I added the state of charge for the hybrid battery and gas engine RPM to know when it is really off.

    [​IMG]

    Power (Graph)


    This is the same Power view but in real-time graph. I left the ICE RPM and HV SOC in raw numbers since I prefer it that way.

    [​IMG]
     

    Attached Files:

  10. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Thanks!:)

    Yeah, the INF Code can only be read if you have certain DTC recorded. My warranty has already expired long ago so I have no problem doing experiment with my Gen 1 last year to purposely induce a DTC to get the INF Code.:D

    Vincent
     
  11. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Shouldn't it return 0 if nothing is there? What are the DTCs hat has INF Codes? How do I trigger them? Torque can clear both DTC but not sure about the INF Codes.
     
  12. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Wow! I caught the Energy Re-Circulation (heretical) mode in action.

    [​IMG]

    The Power flow screen really opened it up. MG1 was powering the wheels together with the ICE. MG2 was acting as a generator and HV battery was not used.

    I think I figured out the most efficient way to accelerate by keeping MG1 power as close to zero as possible. That means most of the ICE power are going to the wheels through mechanical path. This is very useful for highway speed climbing hills. On the downhill side, I just use the stealth warp allowing me to maintain speed without using any gas. That increased my MPG in my usual commute and I drove at higher speed! I am going to try that on my way back home to make sure it wasn't the tailwind.
     

    Attached Files:

    • Flow.jpg
      Flow.jpg
      File size:
      33.1 KB
      Views:
      1,937
    1 person likes this.
  13. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    510
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    I assume you calculate MG1 and MG2 power from torque and RPM? How about ICE power? How is it calculated?
     
  14. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Correct about MG1 and MG2. Maybe Vincent can simplify the current equation. LOL.

    MG2 Pwr = (256*A + B - 16383) * ((32*C + 0.125*D - 500)*0.7376) / 5252
    MG1 Pwr = (256*G + H - 16383) * ((32*I + 0.125*J - 500)*0.7376) / 5252

    For the ICE power, I am just using the Power Request from 21C3 at 7E2 (the power HV ECU request from the ICE). The request power and actual power should be the same, probably with a slight delay.

    I could use the actual ICE torque and RPM from 7E0 (Enhanced Powertrain) but I have not test them yet.
     
    1 person likes this.
  15. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    You got a point there, I was wondering it myself.:confused: Perhaps you can try mode $01 instead of mode $21?

    There are 5 INF Codes and each has 2 bytes. The formula is 256 * A + B.

    OK, if you are game for it, here is the link to my experiment:

    http://priuschat.com/forums/generat...-classic-prius-scanguageii-7.html#post1163123

    The Interlock which I referred to is the Service Plug. Please use HV insulated gloves that are rated 1000V or more.

    The INF Codes were later verified by Techstream when I had problem with my Battery ECU in March this year.

    http://priuschat.com/forums/generat...ight-p3030-p3000-p3005-p3006.html#post1311606

    I'm not sure about Torque but many generic scanners can only read and clear emission-related DTC and not manufacturer specific DTC.

    Anyway, in the event that Torque can't clear the DTC, restart 3 times should do it. If that doesn't work, just disconnect the Aux. negative terminal.

    Vincent
     
  16. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Vincent,

    I am not ready to go there yet. Was wondering if there is less adventurous alternative. I'll check with mode 01 and see if anything reply back. It is on CAN protocol right?

    [Edit]: Tried it during the lunch break. No response with 01C5 at 7E2. I tried 21C4 and 21C6 at 7E2 and got reply back. 21C5 does not respond! Perhaps, if it has a INF Code it may replay.
     
  17. 2009Prius

    2009Prius A Wimpy DIYer

    Joined:
    Mar 25, 2009
    2,705
    510
    63
    Location:
    USA
    Vehicle:
    2009 Prius
    Thanks! So the "Power Request" is for the ICE, not the HSD? When I get some free time I will take a look at all the different CAN ID/PIDs of various powers and see if I could get some sense out of them.
     
  18. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Repair manual said it a request from ICE. I floored it and the max I saw was 76.6 hp.
     
    1 person likes this.
  19. vincent1449p

    vincent1449p Active Member

    Joined:
    May 24, 2004
    894
    331
    0
    Location:
    Singapore
    Vehicle:
    2012 Prius c
    Thanks for trying!:)

    Yes, there are other low voltage malfunctions that have INF Codes but since you don't get any response, I suspect the result will be the same.

    From your results, it does not look like it is on CAN protocol. It may be on KWP but I 'm not sure.

    Vincent
     
  20. usbseawolf2000

    usbseawolf2000 HSD PhD

    Joined:
    Sep 22, 2004
    14,487
    3,000
    0
    Location:
    Fort Lee, NJ
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    During S1 when the engine is still warming up, it makes only 3hp. The timing advanced of the engine was retarded to make maximum heat but not power. I accelerated with 19hp requested but the car was still in S1. I saw the HV battery supplying the remaining 16hp.

    In that scenario, the request power does not represent the ICE power. It only last about 10-15 seconds. I'll start playing around with 7E0 to get the exact ICE power.

    On my way back home today, I used the same strategy to minimize the energy re-circulating. I climb highway inclines harder (between 2,400-2700 rpm depending on the speed, 60-70mph) and glided whenever possible by releasing and feathering the pedal.

    It is definitely more efficient than my previous strategy. I tried to stay below 2,000 rpm. I climbed highway hills at no less than 25 MPG and cruise around 50 MPG displayed on MFD. I also feather the pedal if the MFD displayed more than 75 MPG.

    The Power flow display has given me invaluable data. One thing I noticed... Below 40 mph speed, I have to accelerate very slowly to keep the MG1 and MG2 power less than ICE power. It is not practical to achieve at low speed. Prius needs to be more series hybrid below 40 mph by utilizing the electric motor and generator. Gas engine torque alone is not enough. I will play with accelerating at 50% series and 50% parallel (50% power from MG2, 50% of ICE power split by MG1 - leaving 50% ICE power to the wheels).

    I will see if I can create a new PID to monitor Parallel to Series hybrid ratio easier. The next thing I want to do is the total power at the wheel. If I add ICE + MG1 + MG2 + HV Battery power, that should give me the combined power at the wheel. That is going to be a very long equation!

    I have always wanted a display that would tell me when the friction brake pad will kick in. I should be able to do it by subtracting the Master Cylinder Torque from the Regen Brake Torque.!