Torque

Forums

Forums

How do multi-frame ...
 
Notifications
Clear all

How do multi-frame messages work with a Prius?

4 Posts
2 Users
0 Reactions
26 Views
(@freydnot)
Posts: 9
Active Member
Topic starter
 

I am trying to log HV battery voltage and internal resistance in my 2008 Prius.

From the looks of things there are only two PIDs involved. 21CE seems to have 31 bytes of information and 21D0 has 29 bytes of information.

Name	ShortName	ModeAndPID	Equation	Min Value	Max Value	Units	Header
HV Battery Block-01 Voltage	HV Block1	21CE	(2.56 * D)  + (0.01 * E)  - 327.68	0	18	Volt	7E3
HV Battery Block-02 Voltage	HV Block2	21CE	(2.56 * F) + (0.01 * G) - 327.68	0	18	Volt	7E3
HV Battery Block-03 Voltage	HV Block3	21CE	(2.56 * H) + (0.01 * I) - 327.68	0	18	Volt	7E3
HV Battery Block-04 Voltage	HV Block4	21CE	(2.56 * J) + (0.01 * K) - 327.68	0	18	Volt	7E3
HV Battery Block-05 Voltage	HV Block5	21CE	(2.56 * L) + (0.01 * M) - 327.68	0	18	Volt	7E3
HV Battery Block-06 Voltage	HV Block6	21CE	(2.56 * N) + (0.01 * O) - 327.68	0	18	Volt	7E3
HV Battery Block-07 Voltage	HV Block7	21CE	(2.56 * P) + (0.01 * Q) - 327.68	0	18	Volt	7E3
HV Battery Block-08 Voltage	HV Block8	21CE	(2.56 * R) + (0.01 * S) - 327.68	0	18	Volt	7E3
HV Battery Block-09 Voltage	HV Block9	21CE	(2.56 * T) + (0.01 * U) - 327.68	0	18	Volt	7E3
HV Battery Block-10 Voltage	HV Block10	21CE	(2.56 * V) + (0.01 * W) - 327.68	0	18	Volt	7E3
HV Battery Block-11 Voltage	HV Block11	21CE	(2.56 * X) + (0.01 * Y) - 327.68	0	18	Volt	7E3
HV Battery Block-12 Voltage	HV Block12	21CE	(2.56 * Z) + (0.01 * AA) - 327.68	0	18	Volt	7E3
HV Battery Block-13 Voltage	HV Block13	21CE	(2.56 * AB) + (0.01 * AC) - 327.68	0	18	Volt	7E3
HV Battery Block-14 Voltage	HV Block14	21CE	(2.56 * AD) + (0.01 * AE) - 327.68	0	18	Volt	7E3
Internal Resistance R01	IR1	21D0	0.001 * P	0	10	Ohm	7E3
Internal Resistance R02	IR2	21D0	0.001 * Q	0	10	Ohm	7E3
Internal Resistance R03	IR3	21D0	0.001 * R	0	10	Ohm	7E3
Internal Resistance R04	IR4	21D0	0.001 * S	0	10	Ohm	7E3
Internal Resistance R05	IR5	21D0	0.001 * T	0	10	Ohm	7E3
Internal Resistance R08	IR6	21D0	0.001 * U	0	10	Ohm	7E3
Internal Resistance R07	IR7	21D0	0.001 * V	0	10	Ohm	7E3
Internal Resistance R08	IR8	21D0	0.001 * W	0	10	Ohm	7E3
Internal Resistance R09	IR9	21D0	0.001 * X	0	10	Ohm	7E3
Internal Resistance R10	IR10	21D0	0.001 * Y	0	10	Ohm	7E3
Internal Resistance R11	IR11	21D0	0.001 * Z	0	10	Ohm	7E3
Internal Resistance R12	IR12	21D0	0.001 * AA	0	10	Ohm	7E3
Internal Resistance R13	IR13	21D0	0.001 * AB	0	10	Ohm	7E3
Internal Resistance R14	IR14	21D0	0.001 * AC	0	10	Ohm	7E3

I am concerned about update speed and data integrity. My PLX Kiwi Bluetooth averages around 11 PIDs/second. What exactly counts as a PID in this measurement? Does reading all 31 bytes of 21CE count as a single PID read? Or does it count as 31 reads?

If I only requested 1 byte of data in 21CE, would all 31 bytes be transferred? To ask another way, if I am reading 1 of the variables in a multi-frame PID do I get the rest of the variables for "free"?

I am trying to log the 14 battery block voltages to establish a baseline of my Hybrid Battery health. The gist is you pull a snapshot of the data for all 14 blocks, figure the average of those 14 blocks and then plot a histogram of the delta between each block and the average. This can help spot a dying battery in the block before it goes critical and triggers a CEL. You can see an example here: http://priuschat.com/forums/gen-ii-prius-technical-discussion/95370-gen2-prius-custom-pids-torque-android-app-formulas-2.html#post1372645

For this to work it is critical that all 14 data points are sampled at the same time. Otherwise a battery's voltage can change during the time between samples making the data inaccurate. I suspect all 14 values are currently not sampled at the same time when Torque logs them.

There are two other PIDs that are easier to track battery health (since there are only two). They are found in 21D0 which we know from the custom PID list above has at least 29 bytes of data. They are:

HV Battery Block Lowest Volt	HVB Min V	21D0	(2.56 * J) + (0.01 * K)  - 327.68	0	15	Volt	7E3
HV Battery Block Highest Volt	HVB Max V	21D0	(2.56 * M) + (0.01 * N) - 327.68	0	23	Volt	7E3

There is a good write up about this method here: http://www.artsautomotive.com/publications/7-hybrid/140-predictive-battery-failure-analysis-for-the-prius-hybrid

The idea is the delta between high voltage and low voltage indicates the health of the High Voltage hybrid battery back. I believe anything consistently over 1.2v triggers a CEL and causes the dealer to require total Hybrid Battery replacement (DIY replacement of individual batteries in a block can be done much cheaper).

When I log only those two PIDs and leave Torque on a screen that has no gauges on it I get data that shows abnormally high deltas and also occurrences where the low voltage data point is actually higher than the corresponding high voltage data point. That should never happen. I have confirmed this does not happen with a program called PriiDash which uses a higher speed wired USB connection to the car and a Linux computer.

I guess I have three questions.
1) what counts as a PID when measuring the average PID/second?

2) is there a speed savings by logging a subset of a multi-frame PID?

3) are all bytes of a multi-frame PID acquired at the same exact period of time? If not, can they be?

Edit: also, if I am logging and displaying the identical set of custom PIDs, is there a speed penalty? In other words, is the data for the screen re-pulled even it the log function already pulled the data?

 
Posted : 02/01/2012 11:44 am
 Ian
(@admin)
Posts: 6539
Member Admin
 

Hi, a bit brief, but this should answer what you want to know

21C3 is a PID, this is 1 PID and is the request that is sent. The speed of the PID retrieval is subject to data transfer so you may not get 31 PIDs/sec for multiframe CAN messages as you would for say 010D (mode 1 speed). It will be a little slower, but should not be drastically slower.

There are muti frames returned for this from the ECU, and are glued together to give you your variable speace (a, b, c, aa, ab, ac, etc). Now the data for the PID is returned as captured from the ECU, so it is down to the ECU implementation on how the data is captured and sent back for that PID.

Generally speaking, when you're getting a 'block' of data back, that data has been sampled at 'the same time' on the ECU itself (typically there may be a couple of uS difference between each reading due to ADC sampling/conversion, etc) but this will be done ECU side and will typically be 'instant'. This may not be the case on the prius ECU (you would need to check the ECU technical documentation for it), but I would see no reason why the ECU would not sample the data 'in one go' before sending it (this is certainly how other PIDs work)

If you want 10 'sensors' for a single 21C3 PID, then that should result in only 1 request for those 10 'sensors (a, b, c, AA, etc)'.

 
Posted : 03/01/2012 8:47 am
(@freydnot)
Posts: 9
Active Member
Topic starter
 

For the moment I will assume the Prius ECU is sampling the all of the data instantly.

If I understand correctly, if I tell Torque to log 14 individual values returned by 21C3, I will not see any difference in the general speed of gauge updates as if I were logging a single value returned by 21C3. This is helpful.

Does this also go for logging and displayed "sensors"? If I log and display all 14 values returned by 21C3, will both screen and log use the same data supplied by the single request for PID 21C3 and the subsequent return of multi-frame data?

As far as the PIDs per second benchmark goes, it sounds like it is actually measuring how many PID requests go out and are answered in a second (regardless of how many bytes of data are returned). It also sounds like returning a multi-byte data group is much faster than requesting each byte individually. This is a very good thing.

 
Posted : 03/01/2012 9:00 am
 Ian
(@admin)
Posts: 6539
Member Admin
 

Hi

If you want to log consistently between each update from the ECU, then you'll need to enable the 'synchronous logging' option in the file logging preferecnes, otherwise logging will be done asynchronously (which is not what you will want for your purposes).

 
Posted : 03/01/2012 9:49 pm
Share:

  Follow me on twitter