<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>In order to provide a feature 'complete charge by time', we need to be able to estimate how long the charge will take.</div><div><br></div><div>Looking at anonymised historical logs from ovms, we have records for a few hundred completed charges, over a range of temperatures and current/voltage conditions. The ovms logs are not perfect, but they do cover a large variety of conditions. Paranoid mode cars are excluded from the results (or, perhaps better written as can't be included because we can't see the data). I have cleaned them to remove overtly wrong data (-1Amp charges, aborted charges, etc). What remains are the records for 360 charges.</div><div><br></div><div>For privacy reasons, we've been dumping these logs after a couple of days, so I only have the last few days from TMC and then a several month batch from a few cars early on in the days of OVMS (from the <a href="http://www.openvehicles.com">www.openvehicles.com</a> development server). I am going to make arrangements to keep an anonymised form of this (basically the charges.csv format) in future, even from TMC, in order to get as much historical data as possible. I'm guessing that the more data, the better and more accurate model we can build.</div><div><br></div><div>I've attached to this eMail a csv containing the data, and a simple perl program I knocked up to display it in various ways. It would probably be better to do this in excel, but I haven't had time to do that yet.</div><div><br></div><div>The fields in the charges.csv are:</div><div><br></div><div><ul class="MailOutline"><li>$key - A unique key for the charge record (assuming no-one starts a charge in the same microsecond :-)</li><li>$mode - The charge mode</li><li>$wmax - The maximum Watts (current x voltage) seen as used during the charge</li><li>$s_tambient - The ambient temperature (celcius) at the start of the charge</li><li>$s_tbattery - The battery (ESS) temperature (celcius) at the start of the charge</li><li>$e_tambient - The ambient temperature (celcius) at the end of the charge</li><li>$e_tbattery - The battery (ESS) temperature (celcius) at the end of the charge</li><li>$s_soc - The SOC% (varies by mode) at the start of the charge</li><li>$e_soc - The SOC% (varies by mode) at the end of the charge</li><li>$soc = $e_soc-$s_soc - The increase in SOC%</li><li>$s_kmi - The ideal kilometers at the start of the charge</li><li>$e_kmi - The ideal kilometers at the end of the charge</li><li>$kmi = $e_kmi - $s_kmi - The increase in ideal kilometers as a result of the charge</li><li>$duration - The duration (in minutes) of the charge, as indicated by the car</li><li>$kwh - The kWh put into the battery (ESS), for the charge, as indicated by the car</li></ul></div><div><br></div><div>eg; <span class="Apple-tab-span" style="white-space:pre"> </span><font face="Andale Mono">20120220062307.716156,standard,5980,4,32,10,21,6,97,91,18,301,283,529,52</font></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>5.9kW charge, 4C ambient at start of charge, SOC 6% -> 97% (= +91% SOC), 18kmi -> 301kmi (= +283kmi), 529 minutes, 52kWh</div><div><br></div><div>My chargetables.pl code tries to crunch this data in a few ways. Here is the output from the small set we have:</div><div><br></div><div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font face="Andale Mono" size="2">NUMBER OF SAMPLES:</font></div><div><font face="Andale Mono" size="2">kWh,Temp 0 1 2 3 4 5 6 7 8 9 10 11 13 14 16 17 TOTAL</font></div><div><font face="Andale Mono" size="2"> 0 0 0 5 0 0 0 0 2 0 1 0 0 0 0 0 0 8</font></div><div><font face="Andale Mono" size="2"> 10 0 0 12 5 0 5 0 2 0 1 0 0 0 0 0 0 25</font></div><div><font face="Andale Mono" size="2"> 15 2 0 24 7 6 14 1 6 0 0 0 1 0 0 0 0 61</font></div><div><font face="Andale Mono" size="2"> 20 4 4 23 12 4 12 2 7 2 1 3 3 1 0 0 0 78</font></div><div><font face="Andale Mono" size="2"> 25 3 5 27 6 1 16 5 7 0 3 12 2 1 0 0 0 88</font></div><div><font face="Andale Mono" size="2"> 30 2 2 6 4 2 5 1 4 1 6 1 0 1 1 0 0 36</font></div><div><font face="Andale Mono" size="2"> 35 0 2 1 1 0 5 1 3 0 21 7 0 2 0 5 0 48</font></div><div><font face="Andale Mono" size="2"> 40 0 0 1 1 0 1 0 1 2 4 1 0 0 0 4 1 16</font></div><div><font face="Andale Mono" size="2"><br></font></div><div><font face="Andale Mono" size="2">KM(IDEAL)/MINUTE:</font></div><div><font face="Andale Mono" size="2">kWh,Temp 0 1 2 3 4 5 6 7 8 9 10 11 13 14 16 17</font></div><div><font face="Andale Mono" size="2"> 0 ----- ----- 0.19 ----- ----- ----- ----- 0.71 ----- 0.45 ----- ----- ----- ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 10 ----- ----- 0.20 0.32 ----- 0.49 ----- 0.63 ----- 0.78 ----- ----- ----- ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 15 0.33 ----- 0.18 0.26 0.40 0.60 0.67 0.54 ----- ----- ----- 0.39 ----- ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 20 0.18 0.11 0.20 0.25 0.44 0.48 0.37 0.63 0.51 0.91 0.78 0.55 0.86 ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 25 0.12 0.06 0.18 0.29 0.67 0.46 0.52 0.51 ----- 0.68 0.82 0.82 0.99 ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 30 2.84 0.04 0.20 0.23 0.42 0.51 0.57 0.60 0.56 0.75 0.88 ----- 1.06 1.01 ----- -----</font></div><div><font face="Andale Mono" size="2"> 35 ----- 0.08 0.20 0.19 ----- 0.45 0.28 0.41 ----- 0.78 0.79 ----- 1.11 ----- 0.69 -----</font></div><div><font face="Andale Mono" size="2"> 40 ----- ----- 0.19 0.27 ----- 0.39 ----- 0.59 0.58 0.83 0.62 ----- ----- ----- 1.07 0.37</font></div><div><font face="Andale Mono" size="2"><br></font></div><div><font face="Andale Mono" size="2">EFFICIENCY:</font></div><div><font face="Andale Mono" size="2">kWh,Temp 0 1 2 3 4 5 6 7 8 9 10 11 13 14 16 17</font></div><div><font face="Andale Mono" size="2"> 0 ----- ----- 74.6 ----- ----- ----- ----- 103.9 ----- 91.5 ----- ----- ----- ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 10 ----- ----- 78.1 81.9 ----- 90.4 ----- 80.8 ----- 97.2 ----- ----- ----- ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 15 ----- ----- 70.3 78.7 81.5 95.4 ----- 90.0 ----- ----- ----- 66.2 ----- ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 20 106.0 79.5 76.7 84.5 ----- 93.1 68.9 91.1 79.5 98.4 95.0 87.3 98.4 ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 25 0.0 37.5 71.1 86.2 ----- 87.2 72.9 90.4 ----- 80.3 89.2 74.5 90.4 ----- ----- -----</font></div><div><font face="Andale Mono" size="2"> 30 340.7 26.5 79.3 85.3 87.7 87.0 74.0 87.4 79.5 81.7 94.6 ----- 96.4 89.3 ----- -----</font></div><div><font face="Andale Mono" size="2"> 35 ----- 50.4 68.6 69.6 ----- 87.2 71.5 84.1 ----- 89.5 85.0 ----- 94.6 ----- 90.4 -----</font></div><div><font face="Andale Mono" size="2"> 40 ----- ----- 68.4 79.5 ----- 74.8 ----- 89.5 88.3 91.1 53.0 ----- ----- ----- 96.0 86.7</font></div></div></blockquote></div><div><br></div><div>It produces three tables. The axes on all are the same - kW along the top, and battery temperature down the side. The idea is to extract the charge records and put them in the matching bucket based on the rounded-down kW for maximum charge wattage seen, and rounded-down 5Celcius for battery temperature at the start of the charge.</div><div><br></div><div>The first table (NUMBER OF SAMPLES) just shows the number of charge records seen for each bucket.</div><div><br></div><div>The second table (KM(IDEAL)/MINUTE) shows how many ideal kilometers were added, an average, for each bucket.</div><div><br></div><div>The third table (EFFICIENCY) tries to calculate an efficiency by assuming a 53kWh battery (ESS) would be 100% SOC, and then looking at the change in SOC% over the charge to calculate how much was put into the battery (ESS), and comparing that to what the car says was taken from the wall (to the nearest kWh).</div><div><br></div><div>The numbers are all over the place in some areas (e.g.; 30C, 0..1kW, where there are only 2 samples).</div><div><br></div><div><div>The hypothesis is that charging efficiency depends primarily on battery/ambient temperature and kW available at the wall.</div><div><br></div><div>If we can store such a small table in the OVMS module in the car, when OVMS needs to complete a charge by say 5am, it can plug in the current temperature and available current/voltage and get out a charging efficiency (perhaps how many minutes for each extra 1% of SOC). Then, knowing that it needs 100-currentSOC% to charge, it can work out how many minutes that would be, add on say 1/2 hour for safety, and start the charge at the appropriate time. Neat, and no server connection required.</div></div><div><br></div><div>Thoughts? Anyone good at number crunching to play with this?</div><div><br></div><div>Regards, Mark.</div><div><br></div><div></div></body></html>