Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Regenerative braking hysteresis and/or "energy buffer" (miles don't tick up or down)

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
TL; DR - Pulling a snippet of a quote from another thread ... I was wondering if anyone else has experienced this regen hysteresis, and may have gathered data via the API or some 3rd party service like TeslaFi monitoring your drive? or better yet perhaps even the CAN bus?

I've also (recently) noticed that there seems to be some hysteresis on the indicated miles. For my ~600 foot, less than 1 mile descent (which I regen heavily all the way down) on my way to work, I never see the miles go up (not even by a single count). However, they also don't go down at all for the next 5 miles or so on the flat. I am sure for a long enough descent EVENTUALLY it would show an increase in miles (I've never tried it), but the kind of related point is that I think there is some smoothing of this rated miles number that Tesla does behind the scenes - just based on that experience. So I could imagine this sort of "hiding" being gradually revealed could also cause rated miles to go up when the car is parked.

I recently did a test during a stretch of my commute where I decelerate significantly coming off the highway, and then also have a fairly decent stretch of downhill section.


Observations
I was able to recreate the aforementioned hysteresis to the extent that I did not see the battery range miles (to two decimal places) in the API increase (nor decrease) for a stretch of ~3 miles of driving over ~4 minutes. In fact, it was close enough to exactly 4 minutes that it made me wonder if it might be linked to time and not amount of energy. I had the API being polled every ~10s over the course of 10 minutes to capture this ~4 minute stretch. This stretch was ~1 miles of mainly regen, followed by ~2 miles of driving in the flats ~47mph.


Theory
What I suspect is happening is the infamous "energy buffer" (which is really just a number they track internally, not a separate area of the battery) is incremented when regen is happening, and this only gets transferred from the buffer to the battery gauge displayed range if the buffer gets "too full" for whatever amount that may be (seems an absolute max might be 4 kWh for Model 3 based on people looking at CAN bus, if this is what that is, and then what delay you see would depend on how much was in it to start with, and what their threshold is before 'transferring'. e.g. if they are targetting 2 kWh in the buffer +/- 1 kWh at any time, and you regen 1 kWh, then you'd see that 'transfer' over once the buffer grew from 2 to 3 kWh. 1 kWh would be about 4-5 miles depending on which trim you have).

Likewise, I suspect the opposite happens where, if the energy buffer is "a little bit too full", then when you drive and use power, the power may come from the invisible energy buffer rather than get subtracted from the battery range display.

This seems to be what is happening here with long stretches of regen anyways. While you regen, no range is added so the energy must be being counted somewhere. Then after you stop regen and start using power, no range is being subtracted, so again the energy needs to be being subtracted from somewhere. It seems likely or at least possible anyways, that it is happening for all regen, not just large amounts of regen. This leads me to think that trying to compare (a) changes in displayed battery gauge miles over a trip, with (b) "energy used" (measured by whatever means*) would seem to always have some potential for error of anywhere from 0 to 4 kWh!


RFC/D (request for comments and/or data)
Anyways, I was wondering if someone had some good data on this ... or if I asked the question if someone would go looking through their data for more data points :D Maybe from TeslaFi ... or someone snooping the CAN bus?




*Footnote on 'measuring' energy used:
When I say by "whatever means" of trying to 'measure' energy used, this could be, e.g. (a) a recharge event measuring how much AC or DC energy is required to replace the energy used by the trip, or (b) trying to divine the DC energy consumed as reported by the trip meter in distance and consumption (X mi * Y Wh/mi = Z Wh used).

For the latter, (b), I believe that the underlying numbers used to display the trip stats to the user DO get updated during regen unlike the battery range which appears to stall for stretches. I have seen the trip consumption drop significantly after short regen events, especially early in a trip, when these changes would be more noticeable.

I think there is likely an underlying watt-hour-meter used for this along side the odometer to report trip statistics. Or perhaps it is two watt-hour-meters, split into two halves to separately count power delivered from the battery and regen power sent back to the battery.

Tesla Bjørn has a video where someone with a laptop was looking at CAN bus data from his car, and one of the stats I thought I remembered hearing him list off was lifetime regen energy... Turns out I looked up the video ... and it was total AC and DC charging he claimed they could see (for cars after 2016), and if you subtract that from total charge energy which is also available, you are left with the difference being regen. They said ~15% regen is typical for Norway.

Anyways.

Post your anecdotes or your data from the API or CAN bus! or links to such info! :D
 

ewoodrick

Well-Known Member
Apr 13, 2018
5,285
3,735
Buford, GA
I'm pretty sure that it is simply a matter of how an average is calculated. It it is a 30 minute average, 1 mile of driving isn't going to show up at the beginning. Only over time will it tend to appear.
 

derotam

Member
Oct 31, 2018
833
707
Oak Hill, VA
I don't have anything other than an additional question...What about the energy used in your trip meter...does that go down with significant regen? The Wh/mile goes down so that metric is tracking the regen energy, but does the kWh used track too?
 
  • Like
Reactions: darth_vad3r

gecko10x

Member
Jan 22, 2018
265
163
WV
... might be linked to time and not amount of energy.

Based on my experience, I believe it updates at a set number of miles (maybe 1 or 1/2), not time or energy.

I say this because I just happen to have a 1/2-3/4 mile downhill stretch with a stop light at the bottom. My display updates just after I turn at the light, no matter how long I sit at the light (or don't).
 

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
Based on my experience, I believe it updates at a set number of miles (maybe 1 or 1/2), not time or energy.

I say this because I just happen to have a 1/2-3/4 mile downhill stretch with a stop light at the bottom. My display updates just after I turn at the light, no matter how long I sit at the light (or don't).

Are you talking about the trip meter? It doesn’t update while stopped, it updates every 0.1 mile (or 0.1 kilometre) that ticks off on your trip.

The battery gauge is a mapping of underlying kWh of energy estimated to be in your battery and usually only ticks up or down in 0.1 kWh ticks, which depending on your trim will be ~0.43 to ~0.48 miles (you can see this in the API data).
 

Saghost

Well-Known Member
Oct 9, 2013
8,217
7,010
Delaware
Not sure what to make of your theory. What I can tell you is that the car always adds range from regen in blocks of three or four miles.

I got 22 miles back coming down Mt Washington, always in three or four miles blocks, and I've seen the same behavior before on steep downgrades.
 

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
I don't have anything other than an additional question...What about the energy used in your trip meter...does that go down with significant regen? The Wh/mile goes down so that metric is tracking the regen energy, but does the kWh used track too?

Ooh LOL. The kWh rounded to no decimal places that I never look at because it has less accuracy than multiplying the distance x consumption? LOL. I actually normally look at “since h:mm” which doesn’t show that ... that’s a decent question. It should, at a minimum, eventually update when the gauge does, but I would expect it to actually update every tick of 0.1 in your trip, and to go down if your regen takes you below a rounding threshold (e.g. 1.6 kWh - 200 Wh regen would take you from “2 kWh” to “1 kWh”).
 

gecko10x

Member
Jan 22, 2018
265
163
WV
Are you talking about the trip meter? It doesn’t update while stopped, it updates every 0.1 mile (or 0.1 kilometre) that ticks off on your trip.

No, talking about the battery gauge.

The battery gauge is a mapping of underlying kWh of energy estimated to be in your battery and usually only ticks up or down in 0.1 kWh ticks, which depending on your trim will be ~0.43 to ~0.48 miles (you can see this in the API data).

OK. Sounds like we agree then.
 

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
Not sure what to make of your theory. What I can tell you is that the car always adds range from regen in blocks of three or four miles.

I got 22 miles back coming down Mt Washington, always in three or four miles blocks, and I've seen the same behavior before on steep downgrades.

Thanks, what trim do you have? It could be adding in 1.0 kWh increments which round to 3 or 4 when added to your existing range.

An SR+ is about 4.78 miles on the dash per 1 kWh.
An LR AWD is about 4.25 mi.

I’m guessing you have an LR?
 

Saghost

Well-Known Member
Oct 9, 2013
8,217
7,010
Delaware
Thanks, what trim do you have? It could be adding in 1.0 kWh increments which round to 3 or 4 when added to your existing range.

An SR+ is about 4.78 miles on the dash per 1 kWh.
An LR AWD is about 4.25 mi.

I’m guessing you have an LR?

Ludicrous Raven X. So my numbers may not line up exactly with any 3, but I'm sure it does the same things behind the scenes.
 
  • Like
Reactions: darth_vad3r

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
I'm pretty sure that it is simply a matter of how an average is calculated. It it is a 30 minute average, 1 mile of driving isn't going to show up at the beginning. Only over time will it tend to appear.

What is the “it” that is an average? The trip meter? Ya, the consumption is an average, over the trip distance, and it updates ever 0.1 tick in your trip. The battery gauge isn’t an average over time. You can see it tick down “live” in the API quickly or slowly depending on the drive state power.
 

derotam

Member
Oct 31, 2018
833
707
Oak Hill, VA
Ooh LOL. The kWh rounded to no decimal places that I never look at because it has less accuracy than multiplying the distance x consumption? LOL. I actually normally look at “since h:mm” which doesn’t show that ... that’s a decent question. It should, at a minimum, eventually update when the gauge does, but I would expect it to actually update every tick of 0.1 in your trip, and to go down if your regen takes you below a rounding threshold (e.g. 1.6 kWh - 200 Wh regen would take you from “2 kWh” to “1 kWh”).

Yes, that number that you never look at, haha... I agree, that IF that value is going to update down at all it would update every 0.1 mile. I thought about this as I was driving in to work this morning but I don't really have a good downhill that isn't out of the way to actually experiment with.
 
  • Like
Reactions: darth_vad3r

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
Ludicrous Raven X. So my numbers may not line up exactly with any 3, but I'm sure it does the same things behind the scenes.

Thanks.

If you are curious about your numbers for internal consumption constant and battery gauge rated miles “ticks” you can fairly easily calculate this without driving.

To calculate your increment, go to the energy app, and look at the average consumption in miles and projected range in Wh/mi.

Multiply the two to get a number in Wh that’s an estimate of energy left in your pack. Divide that by the rated miles on your display (ideal on an S would be different, check your display settings). This should give you a number, C, slightly lower than where the “rated” line is in the energy app.

If you repeat this 3 or 6 times (for last 5, 10, 30mi and 10, 25, 50km) you’ll get 6 different numbers that are pretty close to each other (x 1.609344 to get Wh/mi from Wh/km). If you average all 6 numbers I think it should be pretty close to a round number, like for the 3, which is 219, 234, and 245 for SR+, LR RWD, AWD.

Then to get the ticks that rated miles normally update at ...
If you take that internal constant consumption number, C, and do: 100 Wh / C, you will get a number in miles that your display will tend to always tick down at (e.g. 0.48). Oh, actually you have to cut a percentage off of C ... seems to be aprox 4.5%. So multiply the answer above by 1.047. This might be due to factoring in losses in/out of the battery and/or some other shenanigans going on with the energy buffer.
 
  • Informative
Reactions: AlanSubie4Life

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
Yes, that number that you never look at, haha... I agree, that IF that value is going to update down at all it would update every 0.1 mile. I thought about this as I was driving in to work this morning but I don't really have a good downhill that isn't out of the way to actually experiment with.

I’ll keep it on “since last charge” next time I drive home from work and see if I can notice!
 

GregRF

Squirrel Power
Supporting Member
Jul 22, 2014
521
1,045
CA
Here is a drive with a nice downhill drive from TeslaFi:
upload_2019-8-28_8-57-58.png


In the file it shows a jump in range from 221.94 miles to 225.32 miles. It than stays at 225.32 for a long time even while the battery level percentage varies from 72% to 73% and back to 72%.

So this file added a 3.38 mile increment, so roughly 0.8kW?
 
  • Like
Reactions: darth_vad3r

GregRF

Squirrel Power
Supporting Member
Jul 22, 2014
521
1,045
CA
I’ll keep it on “since last charge” next time I drive home from work and see if I can notice!

I believe it does. I live up a small mountain road. Every morning when I leave and if I use very little of the HVAC system I can get to the bottom of my road 3.1 miles later with 0 kWh/mile used. But my battery-guess-O-mileage will have lost a mile, sometimes two.
 

AlanSubie4Life

Efficiency Obsessed Member
Oct 22, 2018
10,419
12,664
San Diego
Thanks.

If you are curious about your numbers for internal consumption constant and battery gauge rated miles “ticks” you can fairly easily calculate this without driving.

To calculate your increment, go to the energy app, and look at the average consumption in miles and projected range in Wh/mi.

Multiply the two to get a number in Wh that’s an estimate of energy left in your pack. Divide that by the rated miles on your display (ideal on an S would be different, check your display settings). This should give you a number, C, slightly lower than where the “rated” line is in the energy app.

If you repeat this 3 or 6 times (for last 5, 10, 30mi and 10, 25, 50km) you’ll get 6 different numbers that are pretty close to each other (x 1.609344 to get Wh/mi from Wh/km). If you average all 6 numbers I think it should be pretty close to a round number, like for the 3, which is 219, 234, and 245 for SR+, LR RWD, AWD.

Then to get the ticks that rated miles normally update at ...
If you take that internal constant consumption number, C, and do: 100 Wh / C, you will get a number in miles that your display will tend to always tick down at (e.g. 0.48). Oh, actually you have to cut a percentage off of C ... seems to be aprox 4.5%. So multiply the answer above by 1.047. This might be due to factoring in losses in/out of the battery and/or some other shenanigans going on with the energy buffer.

I wanted to rate this both informative and confusing and funny. But I stuck with informative.
:)


I understand all the math...but...
What exactly do you mean by “number in miles that your display will always tick down at”? Which display? The battery gauge only ticks in round miles...

I understand you are just deriving the number of rated miles per 0.1kWh here, but where would that be displayed?
 
  • Funny
Reactions: darth_vad3r

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
Here is a drive with a nice downhill drive from TeslaFi:
View attachment 447416

In the file it shows a jump in range from 221.94 miles to 225.32 miles. It than stays at 225.32 for a long time even while the battery level percentage varies from 72% to 73% and back to 72%.

So this file added a 3.38 mile increment, so roughly 0.8kW?

Yes, I’d say that 3.38 is most likely 800 Wh added to your battery gauge for an LR AWD, is that what you have? 800 / 3.38 is 236.7.

Hmm. Mind confirming your trim? And if you could toss me a dozen or couple dozen battery range miles numbers from that file that would be nice. The numbers don’t quite exactly line up with my guess of 245 Wh/mi derated by ~4.5%. This number might differ per trim, or per car ... or perhaps even differ for the same car over time.
 

darth_vad3r

Well-Known Sith
May 6, 2019
1,574
1,126
Canada
I wanted to rate this both informative and confusing and funny. But I stuck with informative.
:)


I understand all the math...but...
What exactly do you mean by “number in miles that your display will always tick down at”? Which display? The battery gauge only ticks in round miles...

I understand you are just deriving the number of rated miles per 0.1kWh here, but where would that be displayed?

Unfortunately, in the car it is only displayed rounded to the nearest mile, but trust me — under the hood it is ticking down in smaller increments :)

If you access the API (directly, or indirectly via a 3rd party service like TeslaFi) you can see the battery range in miles will tend to usually only change in this set increment.
 

GregRF

Squirrel Power
Supporting Member
Jul 22, 2014
521
1,045
CA
Yes, I’d say that 3.38 is most likely 800 Wh added to your battery gauge for an LR AWD, is that what you have? 800 / 3.38 is 236.7.

Hmm. Mind confirming your trim? And if you could toss me a dozen or couple dozen battery range miles numbers from that file that would be nice. The numbers don’t quite exactly line up with my guess of 245 Wh/mi derated by ~4.5%. This number might differ per trim, or per car ... or perhaps even differ for the same car over time.

LR RWD.

Perhaps its 780 Wh, .1% of a 78 kWh pack (75 useable) giving 230 Wh/mi and 325 mile range at 75 kWh. (Though I never got the bump from 310 to 325.

See attached for the table.
 

Attachments

  • downhill_drive1.txt
    6 KB · Views: 2
  • Like
Reactions: darth_vad3r

Products we're discussing on TMC...

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top