[Ovmsdev] Charge Control

Tom Saxton tom at idleloop.com
Tue Apr 10 00:48:26 HKT 2012


Let's see if we can find the ambient temp in the log.

On your log file, do this command:

VMSParser -v -r C1MB -s "03/30/2012 19:31:30" -e "03/30/2012 20:29:13"

That will dump out all of the bytes in the v2.0 1-minute charge records,
C1MB, so we can correlate with what OVMS says.

It might also be worth dumping out some of the 1-minute drive records from a
drive segment with matching OVMS reports to look for the ambient temperature
there as well.

VMSParser -v -r DR1M

If you want to look at it, I've attached the C snippet that decodes the
relevant records. cbRecordHeader skips over the header bytes so that the
first byte shown after the last vertical bar in the log output is at offset
"cbRecordHeader + 0".

Otherwise, you can send me the log output and I'll take a look.

Is there a way I can get the OVMS records from my car so I can look for the
ambient temperature in the v1.5 1-minute charge records?

When charging at home, I use a timer so I'm charging off-peak and when there
aren't any other big loads on our panel. Also, all of our cars are EVs, so
we stagger times to avoid charging two (or possibly even three) at once. I
hope most owners who can charge at 240V/32A or higher are also using the
timer to charge off-peak.

   Tom

on 4/9/12 7:48 AM, Mark Webb-Johnson wrote:

> 
> From my testing last summer (31 Celsius in Hong Kong), the efficiency loss was
> much worse than 5%, especially at low charge currents:
> 
> http://www.teslamotorsclub.com/showthread.php/5655-Charging-in-High-Temperatur
> e-environments-13A-vs-32A-vs-70A-cost-of-air-conditioning
> 
> Here's were my results at around 31 Celsius:
> 
> 
> 
> Here is Tom's analysis of my log files, vs his in cool weather, at the time:
> 
> 
> 
> Bottom line is that ambient temperature is very important to the estimate.
> 
> Tom:
> 
> I agree that the log files would give us the best historical data for a
> jump-start on this. The issues are (a) getting the files, (b) ambient
> temperature.
> 
> I don't think (a) would be a problem. I'll submit my logs for inclusion (I've
> probably got 100 or 200 charges in there at temperatures from 5 Celcius up to
> 33 Celcius). 99% standard mode. I'm sure, that others would also submit, and
> we could pretty quickly build up a model.
> 
> For (b), we either need to find it in the logs files, approximate it from
> something in the log files, or use something like this to approximate it.
> 
> For example, I did a charge on my car at 19:31 on 30th March 2012. VMSParser
> shows:
> 
> 03/30/2012 19:31:30 | 1333107090 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 203.7V 0.01A
> 03/30/2012 19:31:30 | 1333107090 | C30M | range soc = 73%, 70A available
> 03/30/2012 19:31:31 | 1333107091 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.9V 0.00A
> 03/30/2012 19:31:32 | 1333107092 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.0V 0.02A
> 03/30/2012 19:31:33 | 1333107093 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.1V 0.00A
> 03/30/2012 19:31:34 | 1333107094 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.9V 0.00A
> 03/30/2012 19:31:35 | 1333107095 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.8V 0.02A
> 03/30/2012 19:31:36 | 1333107096 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.0V 0.01A
> 03/30/2012 19:31:37 | 1333107097 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.8V 0.00A
> 03/30/2012 19:31:38 | 1333107098 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.8V 0.01A
> 03/30/2012 19:31:39 | 1333107099 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.0V 0.00A
> 03/30/2012 19:31:40 | 1333107100 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.9V 0.02A
> 03/30/2012 19:31:41 | 1333107101 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.7V 0.00A
> 03/30/2012 19:31:42 | 1333107102 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.2V 0.04A
> 03/30/2012 19:31:43 | 1333107103 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.5V 0.00A
> 03/30/2012 19:31:44 | 1333107104 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.0V 0.02A
> 03/30/2012 19:31:45 | 1333107105 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.3V 0.00A
> 03/30/2012 19:31:46 | 1333107106 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.9V 0.02A
> 03/30/2012 19:31:47 | 1333107107 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.2V 0.00A
> 03/30/2012 19:31:48 | 1333107108 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.7V 0.01A
> 03/30/2012 19:31:49 | 1333107109 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.7V 0.00A
> 03/30/2012 19:31:50 | 1333107110 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 221.9V 0.01A
> 03/30/2012 19:31:51 | 1333107111 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 222.2V 0.00A
> 03/30/2012 19:31:52 | 1333107112 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 222.3V 0.23A
> 03/30/2012 19:31:52 | 1333107112 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 222.3V 0.23A
> 03/30/2012 19:31:53 | 1333107113 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 222.8V 0.18A
> 03/30/2012 19:31:54 | 1333107114 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 223.2V 0.19A
> 03/30/2012 19:31:55 | 1333107115 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 222.8V 2.23A
> 03/30/2012 19:31:56 | 1333107116 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 222.9V 2.52A
> 03/30/2012 19:31:57 | 1333107117 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 222.1V 5.71A
> 03/30/2012 19:31:58 | 1333107118 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 220.8V 16.96A
> 03/30/2012 19:31:59 | 1333107119 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 219.9V 27.05A
> 03/30/2012 19:32:00 | 1333107120 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 218.3V 36.99A
> 03/30/2012 19:32:01 | 1333107121 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 217.5V 46.94A
> 03/30/2012 19:32:03 | 1333107123 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 216.9V 47.74A
> 03/30/2012 19:32:04 | 1333107124 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 216.7V 47.75A
> 03/30/2012 19:32:05 | 1333107125 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 217.3V 47.79A
> 03/30/2012 19:33:05 | 1333107185 | C1MB | Coolant 30C ESS 28C - 29C charging
> at 216.7V 47.84A
> 03/30/2012 19:34:05 | 1333107245 | C1MB | Coolant 16C ESS 25C - 28C charging
> at 217.9V 48.12A
> 03/30/2012 19:35:05 | 1333107305 | C1MB | Coolant 16C ESS 22C - 27C charging
> at 218.1V 47.96A
> 03/30/2012 19:36:05 | 1333107365 | C1MB | Coolant 24C ESS 25C - 27C charging
> at 217.7V 47.97A
> 03/30/2012 19:37:05 | 1333107425 | C1MB | Coolant 26C ESS 26C - 27C charging
> at 218.8V 48.11A
> 03/30/2012 19:38:05 | 1333107485 | C1MB | Coolant 28C ESS 26C - 28C charging
> at 217.5V 47.92A
> 03/30/2012 19:39:05 | 1333107545 | C1MB | Coolant 28C ESS 27C - 28C charging
> at 217.7V 48.06A
> 03/30/2012 19:40:05 | 1333107605 | C1MB | Coolant 28C ESS 27C - 28C charging
> at 218.5V 48.11A
> 03/30/2012 19:41:05 | 1333107665 | C1MB | Coolant 28C ESS 27C - 28C charging
> at 218.9V 48.14A
> 03/30/2012 19:42:05 | 1333107725 | C1MB | Coolant 14C ESS 23C - 27C charging
> at 217.0V 47.81A
> 03/30/2012 19:43:05 | 1333107785 | C1MB | Coolant 23C ESS 24C - 26C charging
> at 216.8V 47.74A
> 03/30/2012 19:44:05 | 1333107845 | C1MB | Coolant 26C ESS 25C - 27C charging
> at 217.9V 47.98A
> 03/30/2012 19:45:05 | 1333107905 | C1MB | Coolant 26C ESS 26C - 27C charging
> at 216.9V 47.78A
> 03/30/2012 19:46:05 | 1333107965 | C1MB | Coolant 27C ESS 26C - 27C charging
> at 218.8V 48.14A
> 03/30/2012 19:47:05 | 1333108025 | C1MB | Coolant 28C ESS 26C - 27C charging
> at 216.7V 47.77A
> 03/30/2012 19:48:05 | 1333108085 | C1MB | Coolant 28C ESS 26C - 27C charging
> at 216.3V 48.09A
> 03/30/2012 19:49:05 | 1333108145 | C1MB | Coolant 17C ESS 24C - 27C charging
> at 216.4V 47.76A
> 03/30/2012 19:50:06 | 1333108206 | C1MB | Coolant 22C ESS 23C - 26C charging
> at 218.4V 48.26A
> 03/30/2012 19:51:06 | 1333108266 | C1MB | Coolant 24C ESS 24C - 26C charging
> at 218.4V 48.26A
> 03/30/2012 19:52:07 | 1333108327 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 217.7V 48.16A
> 03/30/2012 19:53:08 | 1333108388 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 219.1V 48.25A
> 03/30/2012 19:54:08 | 1333108448 | C1MB | Coolant 27C ESS 25C - 27C charging
> at 218.3V 48.27A
> 03/30/2012 19:55:09 | 1333108509 | C1MB | Coolant 27C ESS 26C - 27C charging
> at 217.0V 47.95A
> 03/30/2012 19:56:10 | 1333108570 | C1MB | Coolant 28C ESS 26C - 27C charging
> at 217.0V 48.03A
> 03/30/2012 19:57:10 | 1333108630 | C1MB | Coolant 14C ESS 23C - 26C charging
> at 218.0V 48.02A
> 03/30/2012 19:58:11 | 1333108691 | C1MB | Coolant 24C ESS 24C - 26C charging
> at 217.4V 47.98A
> 03/30/2012 19:59:12 | 1333108752 | C1MB | Coolant 25C ESS 24C - 26C charging
> at 216.6V 47.78A
> 03/30/2012 20:00:13 | 1333108813 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 216.9V 47.81A
> 03/30/2012 20:01:13 | 1333108873 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 218.7V 48.27A
> 03/30/2012 20:01:30 | 1333108890 | C30M | range soc = 79%, 70A available
> 03/30/2012 20:02:14 | 1333108934 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 218.4V 48.16A
> 03/30/2012 20:03:15 | 1333108995 | C1MB | Coolant 27C ESS 25C - 26C charging
> at 217.5V 47.79A
> 03/30/2012 20:04:15 | 1333109055 | C1MB | Coolant 17C ESS 24C - 26C charging
> at 217.3V 47.79A
> 03/30/2012 20:05:16 | 1333109116 | C1MB | Coolant 21C ESS 22C - 25C charging
> at 218.2V 47.85A
> 03/30/2012 20:06:17 | 1333109177 | C1MB | Coolant 24C ESS 24C - 25C charging
> at 217.3V 49.34A
> 03/30/2012 20:07:17 | 1333109237 | C1MB | Coolant 25C ESS 24C - 25C charging
> at 218.4V 45.78A
> 03/30/2012 20:08:18 | 1333109298 | C1MB | Coolant 26C ESS 24C - 26C charging
> at 220.4V 42.43A
> 03/30/2012 20:09:19 | 1333109359 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 220.0V 43.13A
> 03/30/2012 20:10:19 | 1333109419 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 219.6V 42.09A
> 03/30/2012 20:11:20 | 1333109480 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 218.3V 43.46A
> 03/30/2012 20:12:21 | 1333109541 | C1MB | Coolant 26C ESS 25C - 26C charging
> at 218.6V 41.73A
> 03/30/2012 20:13:22 | 1333109602 | C1MB | Coolant 14C ESS 22C - 25C charging
> at 220.4V 40.81A
> 03/30/2012 20:14:22 | 1333109662 | C1MB | Coolant 23C ESS 23C - 25C charging
> at 219.5V 33.66A
> 03/30/2012 20:15:23 | 1333109723 | C1MB | Coolant 24C ESS 24C - 25C charging
> at 218.9V 36.06A
> 03/30/2012 20:16:24 | 1333109784 | C1MB | Coolant 25C ESS 24C - 25C charging
> at 220.4V 35.36A
> 03/30/2012 20:17:24 | 1333109844 | C1MB | Coolant 26C ESS 24C - 25C charging
> at 221.0V 32.97A
> 03/30/2012 20:18:25 | 1333109905 | C1MB | Coolant 26C ESS 24C - 25C charging
> at 220.9V 32.17A
> 03/30/2012 20:19:26 | 1333109966 | C1MB | Coolant 26C ESS 24C - 25C charging
> at 219.4V 33.65A
> 03/30/2012 20:20:26 | 1333110026 | C1MB | Coolant 13C ESS 22C - 25C charging
> at 218.9V 37.86A
> 03/30/2012 20:21:27 | 1333110087 | C1MB | Coolant 22C ESS 22C - 24C charging
> at 219.2V 28.58A
> 03/30/2012 20:22:28 | 1333110148 | C1MB | Coolant 24C ESS 23C - 24C charging
> at 220.6V 27.84A
> 03/30/2012 20:23:28 | 1333110208 | C1MB | Coolant 24C ESS 23C - 25C charging
> at 219.7V 27.55A
> 03/30/2012 20:24:29 | 1333110269 | C1MB | Coolant 25C ESS 24C - 25C charging
> at 221.3V 28.81A
> 03/30/2012 20:25:30 | 1333110330 | C1MB | Coolant 26C ESS 24C - 25C charging
> at 219.6V 24.53A
> 03/30/2012 20:26:30 | 1333110390 | C1MB | Coolant 26C ESS 24C - 25C charging
> at 219.1V 26.89A
> 03/30/2012 20:27:31 | 1333110451 | C1MB | Coolant 26C ESS 24C - 25C charging
> at 220.6V 26.35A
> 03/30/2012 20:28:32 | 1333110512 | C1MB | Coolant 26C ESS 24C - 25C charging
> at 220.5V 24.03A
> 03/30/2012 20:29:13 | 1333110553 | IDLE | range soc = 84% ESS 23C - 25C,
> 2.691V min, 1.205V max
> 
> and OVMS reported:
> 
> 2012-03-30 18:24:07.142047 +0800 info  main: #10 C EV915 rx msg S
> 81,K,-1,0,done,standard,250,219,48,67,100,10,7,4,0
> 2012-03-30 18:24:07.144289 +0800 info  main: #10 C EV915 rx msg D
> 136,32,3,42,78,29,3272,65163,45,0,25,2,113,113
> ==> Driving PEM:42, MOTOR:78, BATTERY:29, AMBIENT:25
> 
> 2012-03-30 19:23:57.730154 +0800 info  main: #10 C EV915 rx msg S
> 81,K,-1,0,done,standard,250,234,48,67,100,10,7,4,0
> 2012-03-30 19:23:57.732294 +0800 info  main: #10 C EV915 rx msg D
> 104,8,4,34,56,29,3284,65175,0,3379,24,2,102,113
> ==> Stopped PEM:34, MOTOR:56, BATTERY:29, AMBIENT:24
> 
> 2012-03-30 19:33:57.348051 +0800 info  main: #10 C EV915 rx msg S
> 82,K,217,48,charging,standard,253,237,48,2,100,0,5,1,0
> 2012-03-30 19:33:57.374906 +0800 info  main: #10 C EV915 rx msg D
> 124,8,4,42,55,28,3284,65175,0,3986,25,2,120,120
> ==> Charging PEM:42, MOTOR:55, BATTERY:28, AMBIENT:25
> 
> 2012-03-30 19:44:11.802571 +0800 info  main: #10 C EV915 rx msg S
> 84,K,217,48,charging,standard,262,245,48,12,100,2,5,1,0
> 2012-03-30 19:44:11.805104 +0800 info  main: #10 C EV915 rx msg D
> 124,8,4,43,53,27,3284,65175,0,4581,29,2,118,118
> ==> Charging PEM:43, MOTOR:53, BATTERY:27, AMBIENT:29
> 
> 2012-03-30 19:53:11.578629 +0800 info  main: #10 C EV915 rx msg S
> 87,K,219,48,charging,standard,270,253,48,21,100,4,5,1,0
> 2012-03-30 19:53:11.582720 +0800 info  main: #10 C EV915 rx msg D
> 124,8,4,43,52,26,3284,65175,0,5142,28,2,120,120
> ==> Charging PEM:43, MOTOR:52, BATTERY:26, AMBIENT:28
> 
> 2012-03-30 20:03:55.020585 +0800 info  main: #10 C EV915 rx msg S
> 91,K,218,48,charging,standard,282,262,48,32,100,6,5,1,0
> 2012-03-30 20:03:55.022789 +0800 info  main: #10 C EV915 rx msg D
> 124,8,4,43,51,26,3284,65175,0,5777,27,2,114,114
> ==> Charging PEM:43, MOTOR:51, BATTERY:26, AMBIENT:27
> 
> 2012-03-30 20:14:03.376116 +0800 info  main: #10 C EV915 rx msg S
> 93,K,220,37,charging,standard,290,270,48,42,100,7,5,1,0
> 2012-03-30 20:14:03.378258 +0800 info  main: #10 C EV915 rx msg D
> 124,8,4,43,49,25,3284,65175,0,6374,29,2,112,112
> ==> Charging PEM:43, MOTOR:49, BATTERY:25, AMBIENT:29
> 
> 2012-03-30 20:24:01.668658 +0800 info  main: #10 C EV915 rx msg S
> 95,K,221,28,charging,standard,296,277,48,52,100,8,5,1,0
> 2012-03-30 20:24:01.681265 +0800 info  main: #10 C EV915 rx msg D
> 124,8,4,42,48,25,3284,65175,0,6980,29,2,120,120
> ==> Charging PEM:42, MOTOR:48, BATTERY:25, AMBIENT:29
> 
> 2012-03-30 20:33:59.497056 +0800 info  main: #10 C EV915 rx msg S
> 96,K,0,0,done,standard,299,280,48,57,100,9,9,4,0
> 2012-03-30 20:33:59.505736 +0800 info  main: #10 C EV915 rx msg D
> 108,8,4,34,47,25,3284,65175,0,7577,27,2,119,119
> ==> Charged PEM:34, MOTOR:47, BATTERY: 25, AMBIENT:27
> 
> I reckon the actual ambient temperature was probably 24 or 25 Celcius. It goes
> up during the charge, presumably because the HVAC is spewing out hot air
> around the ambient sensor at the front of the car (which is in the garage so
> will build up heat).
> 
> I think my data above is not a very good example, as I wasn't driving hard so
> the battery temperature was unusually low. My first instinct was that it would
> be good to use as an approximation for ambient, but actually not. The theory
> is that when the ambient temperature is hot or cold, the car has to use
> HVAC/heater to keep the battery at the temperature it needs, and that uses
> power which reduces charging efficiency. Battery temperature is a side-effect,
> and won't help to predict energy usage.
> 
> So, I still think ambient temperature is the correct thing to use as a
> predictor for charging efficiency (along with current+voltage).
> 
> The question is, looking at historical logs how can we approximate that? Only
> looking at charges that occurred an hour after a drive would work, but would
> remove 95% of my charges, like anyone else who plugs in when they get home ;-)
> 
> Regards, Mark.
> 
> On 8 Apr, 2012, at 4:22 PM, Dominik Westner wrote:
> 
>> I already did some tests calculating the remaining charge time and had it
>> implemented in the iPhone app.
>> 
>> First I took the simple approach to linearly estimate the remaining time by
>> taking the charge current and voltage and calculate the energy per sec. Then
>> take the missing energy from the current SOC. This will give you an
>> approximation of the remaining time.
>> 
>> If you are looking at +/- 1 hour. This already should work from my
>> experience.
>> 
>> I tried to make it better by taking into account that the charging curve is
>> not linear, but more on a logarithmic scale. This worked a bit better. I also
>> figured that there is some loss when charging, which I set to 5% (this
>> probably varies by temperature).
>> 
>> What I did not know is the fact that once finished charging the batteries
>> will be rebalanced for 30 minutes. Is this still shown as charging in OVMS?
>> If yes, this would explain, why I've been off for about 30 - 60 minutes with
>> my calculation.
>> 
>> I also did not take the age of the battery into account, which should be an
>> important factor, too.
>> 
>> I think that it might be better to use a formula which tries to approximate
>> the charging curve instead of using a fixed lookup table. At least it also
>> could be fine tuned a bit easier by just setting a couple of parameters
>> through the app to change the calculation.
>> 
>> Greetings
>> 
>> Dominik
>> 
>> On 08.04.2012, at 06:16, Tom Saxton wrote:
>> 
>>> I think your model would work pretty well.
>>> 
>>> To calculate charge time, you also have to take into account the current
>>> tapering near the top of the charge.
>>> 
>>> We can get most of the required data from log files. The only tricky bit is
>>> getting the ambient temperature, which I don't think anyone has identified
>>> in the log files. You could get a good approximating by only considering
>>> charge sessions that start a least an hour of the most recent drive and then
>>> use the starting temperature of the coolant as a proxy for ambient
>>> temperature.
>>> 
>>> Range mode is the trickiest and the most important to time, they are also
>>> done less often, so it's harder to get data. I'd be happy to collect logs
>>> and extract data if we can get owners to contribute logs for a variety of
>>> charging levels and ambient temperatures.
>>> 
>>>   Tom
>>> 
>>> on 4/6/12 5:52 PM, Mark Webb-Johnson wrote:
>>> 
>>>> The core question I have here is whether it is possible to build a static
>>>> table saying that at this temperature, this available voltage+currrent, the
>>>> charging efficiency is X%? Something accurate enough to give us a charge
>>>> time
>>>> prediction (given temperature, kWh needed by the pack, available
>>>> voltage+current) of +/- 1 hour?
>>>> 
>>>> I'm assuming the temperature should be ambient, as that is more important
>>>> overt the duration of a reasonable charge than pack temperature?
>>>> 
>>>> If we can have such a table, with steps of 5 degrees celcius between -10C
>>>> and
>>>> +40C, and say 10 current levels, that is only 100 entries - and we would
>>>> only
>>>> need 1 byte for each entry. The module could then put in the current
>>>> temperature, current/voltage level, and get out an efficiency factor. It
>>>> could
>>>> estimate the kWh the pack needs (by mode and SOC/ideal-miles difference),
>>>> then
>>>> multiply by efficiency factor, and get out an estimate of how many minutes
>>>> is
>>>> required to achieve that.
>>>> 
>>>> Without this table, we could do the lookup on the server, but that would
>>>> mean
>>>> having to set it _every_ night from the App/Server - as it would depend on
>>>> the
>>>> SOC% the car was actually at.
>>>> 
>>>> If we could build this data, where could we get the data from?
>>>> 
>>>> Regards, Mark.
>>>> 
>>>> Begin forwarded message:
>>>> 
>>>>> From: Mark Webb-Johnson <mark at webb-johnson.net>
>>>>> Subject: Re: [Ovmsdev] Charge Control
>>>>> Date: 6 April, 2012 8:25:51 PM GMT+08:00
>>>>> To: OVMS Developers <ovmsdev at lists.teslaclub.hk>
>>>>> 
>>>>> 
>>>>> Bennett Leeds and I have had a discussion off-list (I'm not sure if he is
>>>>> on
>>>>> this list or not), and he brings up a valid point about balancing the pack
>>>>> perhaps not occurring if we cut short the charge with a SOC limit.
>>>>> 
>>>>> Looking here:
>>>>> 
>>>>> http://www.teslamotorsclub.com/showthread.php/3848-Tesla-Roadster-Battery-
>>>>> Car
>>>>> e?p=41995&viewfull=1#post41995
>>>>> 
>>>>> it seems that this approach may be non-optimal. For clarity, let me
>>>>> cut-and-paste the Tesla reply here:
>>>>> 
>>>>> For simplicity¹s sake, I will refer to all SOC (State Of Charge) numbers
>>>>> as a
>>>>> percentage of a full (100%) charge. I cannot provide exact percentages, as
>>>>> there are many variables which can cause these numbers to vary slightly,
>>>>> however, I will get as close as I can.
>>>>> 
>>>>> When plugging in a nearly empty car that is set to Storage mode, the
>>>>> charge
>>>>> will generally stop at around 20%. The car will then settle into its
>>>>> normal
>>>>> Storage mode rhythm, topping up and discharging between 10% and 50% as the
>>>>> car sees fit. Oftentimes it will keep a tighter envelope based on
>>>>> parameters
>>>>> that I am not aware of.
>>>>> 
>>>>> Most important to remember is that Storage mode is not intended to be a
>>>>> driving mode. This charge setting is primarily meant to optimize battery
>>>>> life
>>>>> while the car is under storage conditions for two weeks or more.
>>>>> 
>>>>> Storage mode does not attempt to balance the pack, and you will cause an
>>>>> imbalance in the pack by driving and charging in this mode regularly.
>>>>> 
>>>>> This will penalize you when you do occasionally charge the car fully in
>>>>> the
>>>>> other modes, as you will not have the full range of the car available to
>>>>> you
>>>>> until the car has a chance to balance its battery. Additionally, the car¹s
>>>>> range will not be as accurate if driven while in Storage mode vs. having
>>>>> charged it in Standard mode after storing the car, then driving it.
>>>>> 
>>>>> Allowing the car to sit plugged in after it has finished charging in
>>>>> Standard
>>>>> mode automatically balances the pack, and it may take a few rounds of this
>>>>> to
>>>>> bring an imbalanced pack back to its full potential after many partial
>>>>> charges. This is one of the major reasons we recommend keeping the car in
>>>>> Standard mode whenever possible. Partial charges in any mode, while not on
>>>>> their own bad for the battery, do not give the car an opportunity to
>>>>> balance
>>>>> its battery, and over time can prevent you from accessing the car¹s full
>>>>> range potential.
>>>>> 
>>>>> When balanced, Standard mode charges the car to about 87%, with Range and
>>>>> Performance modes getting the car to about 97%. These two percentages are
>>>>> very much affected by the balance between bricks in the battery. An
>>>>> imbalanced pack will not fill up all the way in any mode, nor will it be
>>>>> able
>>>>> to discharge as far. Additionally, the range predictions will not be as
>>>>> accurate.
>>>>> 
>>>>> Your voltages are about right.
>>>>> 4.10 volts = full standard mode (187-195 ideal miles)
>>>>> 4.15 volts = full range mode
>>>>> 4.20 volts = maximum of the cells that we never touch
>>>>> As you may know, there is much more to it than just using voltage to
>>>>> calculate range with Lithium batteries. This is something that is
>>>>> incredibly
>>>>> complicated, and not something that I am qualified to discuss in detail,
>>>>> as I
>>>>> do not have the full picture.
>>>>> 
>>>>> It is important to remember that SOC is not the only factor in maximizing
>>>>> battery life. For instance most lithium batteries are shipped at around
>>>>> 30-50% SOC in consumer electronics, and part of the reasoning is that they
>>>>> are less susceptible to damage from extreme temperatures at these charge
>>>>> levels. It is also safer to store them at these levels. Part of the
>>>>> benefit
>>>>> of Storage mode is that there is less work required from the HVAC system
>>>>> to
>>>>> keep the batteryhappy and safe, and therefore, less energy is consumed
>>>>> while
>>>>> stored.
>>>>> 
>>>>> We chose ~90% as a Standard full charge level because it offers most of
>>>>> the
>>>>> longevity benefit of keeping the car at a lower state of charge, while
>>>>> still
>>>>> allowing a high degree of autonomy. I understand that you are interested
>>>>> in
>>>>> taking extra steps to maximize your battery¹s life, so I do have some
>>>>> suggestions for you.
>>>>> 
>>>>> I would not recommend that you continue to use Storage mode as a means of
>>>>> maintaining a lower state of charge. As I explained earlier, this mode is
>>>>> not
>>>>> optimized for this type of use.
>>>>> 
>>>>> Think of battery degradation this way. It is very much a function of time
>>>>> spent at voltage and temperature. For instance, you do not want to charge
>>>>> a
>>>>> car all the way in performance mode, and then let it sit in the sun all
>>>>> day.
>>>>> Between the higher thermal limits and the high SOC, you are causing the
>>>>> battery a relatively high amount of degradation .In fact, the car will
>>>>> eventually allow itself to discharge to Standard levels if left in
>>>>> Performance mode to prevent inadvertent damage to the battery. If you
>>>>> start
>>>>> driving right away after charging in Performance or Range Mode, and don¹t
>>>>> let
>>>>> it sit, you would minimize the damage incurred, as the time spent at these
>>>>> extremes is an important part of the calculation.
>>>>> 
>>>>> Similarly, if you top off to full in Standard mode, then jump in the car
>>>>> right away and bring the SOC down quickly, you will minimize the small
>>>>> amount
>>>>> of degradation that occurs at ~90%.
>>>>> 
>>>>> If you prefer to keep a lower average SOC in an attempt to maximize the
>>>>> life
>>>>> of your battery, I would instead suggest that you stay in Standard mode
>>>>> and
>>>>> utilize the Roadster¹s built in charge timer and current limiting options
>>>>> to
>>>>> find an average SOC that works for you. For instance, try starting your
>>>>> charge at a time that allows the car to top off to a level you are
>>>>> comfortable with right before you need to leave. Alternately, you can use
>>>>> the
>>>>> Current limiting function to adjust the amount of time it takes the car
>>>>> reaches a target SOC, or even a combination of these two options. The car
>>>>> will remember the settings you select based on your location, so once you
>>>>> find something that works for your commute, you can set it and forget it.
>>>>> 
>>>>> Just remember that the car does benefit from being allowed to sit fully
>>>>> charged in Standard mode, and should be allowed to do so frequently,
>>>>> especially if being used on a daily basis. Leaving the car plugged in in
>>>>> Standard mode after it is done charging will initiate this balancing
>>>>> program
>>>>> automatically. This doesn¹t take much time, 30 minutes or so should do. It
>>>>> may take several of these balancing cycles to bring the car back to a
>>>>> balanced state if it has become imbalanced, which is something that a lack
>>>>> of
>>>>> regular Standard mode top ups and subsequent balancing cycles can induce.
>>>>> 
>>>>> It would therefore be a good idea to set the car to ³Charge on Plug In²
>>>>> instead of ³Charge at X time² in the charge timing menu for at least a few
>>>>> Standard mode charges per week to keep the pack balanced. There are simply
>>>>> too many variables for me to be able to predict how often you would need
>>>>> to
>>>>> do this, and we do not have a recommended procedure for alternate desired
>>>>> average SOC levels.
>>>>> 
>>>>> I hope this helps answer your questions, and gives you a better idea of
>>>>> how
>>>>> to maximize battery life under your driving conditions.
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Dan Myggen
>>>>> 
>>>>> From what he is saying, it appears optimal to time the charge to bring it
>>>>> to
>>>>> full charge in standard mode 30 minutes before you leave. That would leave
>>>>> the car sitting at high charge rate for the least amount of time, but
>>>>> allow
>>>>> enough time for balancing to occur if necessary.
>>>>> 
>>>>> This sounds exactly like our finish-charging-by approach. Rather than set
>>>>> the
>>>>> charge start time, you set the finish time, and the system works out how
>>>>> long
>>>>> it should take then adds on a 30-to-60 minute safety margin (which would
>>>>> also
>>>>> allow for battery balancing to occur).
>>>>> 
>>>>> Does this make sense? Or is Dan Myggen's advise wrong?
>>>>> 
>>>>> Regards, Mark
>>>>> 
>>>>> On 5 Apr, 2012, at 7:45 PM, Mark Webb-Johnson wrote:
>>>>> 
>>>>>> 
>>>>>> I'm now starting to think about the v1.3 firmware, which is intended to
>>>>>> add
>>>>>> the following:
>>>>>> 
>>>>>> Log charge history
>>>>>> Log drive history
>>>>>> Sophisticated control of charge time
>>>>>> 
>>>>>> We don't really have TOU metering in Hong Kong, so not much use for me,
>>>>>> but
>>>>>> part [3] would be fun nevertheless. Most charge control in EVs is pretty
>>>>>> basic, and it might be interesting to see how sophisticated this can be
>>>>>> made
>>>>>> without complications.
>>>>>> 
>>>>>> I don't know if this is workable or not, so put my thoughts out into the
>>>>>> open for discussion.
>>>>>> 
>>>>>> For charge time, the consensus seems to be that people want to enter the
>>>>>> time to FINISH charge, vs the current time to START charge. To do that,
>>>>>> we
>>>>>> need an estimate of how long the charge will take. For that, we either
>>>>>> need
>>>>>> a sophisticated model or a collection of historical data we can lookup to
>>>>>> find something approximate. Hence item [1] on my list.
>>>>>> 
>>>>>> Elon talked about the car learning about you. Where you park. Where you
>>>>>> charge. etc. So, if always leave home at 7:00am to go to the office on
>>>>>> Mondays through Fridays, perhaps the car can learn? Or, at least suggest
>>>>>> based on what it has seen... Hence item [2] on my list.
>>>>>> 
>>>>>> For [1], we would store such things as temperatures, SOC start, SOC end,
>>>>>> charge mode, charge current, charge voltage and duration. The can bus
>>>>>> charge
>>>>>> message seem to include this information.
>>>>>> 
>>>>>> For [2], we would store such things as date/time of drive, duration
>>>>>> (time,
>>>>>> distance, and elevation change), battery usage. We seem limited in this
>>>>>> from
>>>>>> what we have decoded on the can bus so far.
>>>>>> 
>>>>>> Regardless of the above, [1] and [2] would be useful information for any
>>>>>> owner, anyway.
>>>>>> 
>>>>>> Privacy is an issue. Two problems - (a) protection of my charge/drive
>>>>>> history, (b) the use of 'shared' charge history for [3]. My suggestion is
>>>>>> to
>>>>>> keep drive and charge history private. Perhaps it could just be stored as
>>>>>> paranoid mode blobs. But, there should be an option to allow anonymised
>>>>>> sharing of charge history for the use of [3]. My thinking is that if you
>>>>>> share your data anonymously, then your lookup includes the pool of others
>>>>>> anonymous charge history. if you choose not to share, then your lookup is
>>>>>> only against your own charge history.
>>>>>> 
>>>>>> I did toy with the idea of using the server to control this. So, at 3am
>>>>>> the
>>>>>> server sends a command to the car to start the charge, etc. That would
>>>>>> simplify the firmware in the car, but has a major problem of GPRS
>>>>>> connectivity - if the cellular signal was lost the charge wouldn't start.
>>>>>> Bad. So, I think it best to have the historical database in the server,
>>>>>> the
>>>>>> calculations in the App, and the settings downloaded to the car while it
>>>>>> has
>>>>>> cellular signal (after which it just follows them autonomously).
>>>>>> 
>>>>>> The Tesla Roadster currently offers you a choice of charge on plug-in, or
>>>>>> start charge at a particular time. It also allows you to limit charge
>>>>>> current and set charge mode. My thinking is to extend this by making it
>>>>>> per
>>>>>> day-of-the-week for a few defined locations, and to provide an override
>>>>>> for
>>>>>> the 'current' day/night. If the override is not set, and you are in one
>>>>>> of
>>>>>> the defined locations, then the system looks up the day of the week and
>>>>>> controls charge based on what you have set. The UI for this is quite
>>>>>> simple
>>>>>> - presumably a screen with tabs/selector for day or the week, and then
>>>>>> controls to set charge mode, current limit, and time to start/complete
>>>>>> by.
>>>>>> One developer also had the good idea that a charge SOC limit would be
>>>>>> useful
>>>>>> (e.g.; please stop charge when it gets to 70% / 220km ideal).
>>>>>> 
>>>>>> How do we handle night vs day charging? Is this only for overnight, or do
>>>>>> we
>>>>>> base it on when you plugin?
>>>>>> 
>>>>>> Is this workable? Useful?
>>>>>> 
>>>>>> Really interested in people's feedback on this.
>>>>>> 
>>>>>> Mark.
>>>>>> 
>>>>>> _______________________________________________
>>>>>> OvmsDev mailing list
>>>>>> OvmsDev at lists.teslaclub.hk
>>>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> OvmsDev mailing list
>>>> OvmsDev at lists.teslaclub.hk
>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>> 
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>> 
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk
>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: decode_temps.cpp
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20120409/d581d572/attachment-0001.pl>


More information about the OvmsDev mailing list