Jump to content
Jason (ABRP)

Alpha Feedback - Nissan Leaf

Recommended Posts

Just noticed that there were more SOH - Ahr data in the picture from the post above from Stefan_K. Added that datapoint and it also gives 115,44 as maximum Ahr.

image.png.d4905cd860a4a0dee0332b7e17eccf37.png

Share this post


Link to post
Share on other sites
1 hour ago, Jilldris said:

Just noticed that there were more SOH - Ahr data in the picture from the post above from Stefan_K. Added that datapoint and it also gives 115,44 as maximum Ahr.

image.png.d4905cd860a4a0dee0332b7e17eccf37.png

I was the user who gave Jason the original figure.  I don't have a 40kWh Leaf and the number was based on what I could find online.  Your data gives a much more accurate estimate than my research.

Share this post


Link to post
Share on other sites
1 hour ago, Jilldris said:

Interesting. Was this the calculation used last weekend or have it been added later?

Sounds smart to use Ahr/Ahr_max to calculate SOH. However I see some discrepancy’s with our car, maybe the cars are different to some extent? Regarding Ahr_max I looked at some old saved data where I can see SOH and Ahr. When calculating Ahr at 100 SOH for our car it is 115,44, see below.

image.png.e2dd4c94606f05a8561857507995d89d.png

Also regarding GIDS. Our car charges usually to 490-500 GIDS when full, e.g. quite much more than 460.  
The formula also assumes that GIDS are 0 when the display shows 0% which is probably never the case. Our car rather have ~50 GIDS when the display shows 0%.

So for our car I would say that the formula would more be more like below (if I did not mess up the straight line equation :classic_tongue: )
SOC=(Gids/((Gids_max/Gids_min)*(Ahr/Ahr_min)-Gids_min))-(1/((Gids_max/Gids_min)*(Ahr/Ahr_min)-1))
Where
Gids_max=495
Gids_min=50
Ahr_max=115,44

This assumes the SOC window only shrinks from the top with decreasing SOH, does anyone knows if that is they case? Anyway it is probably a very good approximation.

 

Regarding the filter for faulty data. Thanks for the quick fix for that! Amazingly quick as always! 👍

image.png

I hope for Jason's sake that various models don't do completely different calculations for the battery statistics.  I have a 2016 24kWh Leaf ex Japan and I have a lot of data from both Leafspy logs and recorded off the dash.  For our car Gids_min is definitely zero but it clearly isn't for your later model.    Leafspy SOC is linear with Gids from about 97% down to 10% which I think reflects our battery SOH of around 90%.   Dash % is linear with Gids/Gids_max/SOH.

When you say "SOC window" do you mean Leafspy SOC or the dash battery %?

I think your equation isn't quite right.  I'd hazard a guess as it being 

(Gids-Gids_min)/(Gids_max-Gids_min)/(Ahr/Ahr_max)

Cheers

John

 

 

leafspy and dash SOC.png

Share this post


Link to post
Share on other sites

On the new battery computation, it definitely wasn't live last weekend, I just pushed the code this afternoon.  Based on the feedback, it seems I need to add some more computation parameters! Per the conversations, I've updated gids_max for the leaf40 to 115.4

For my own sanity, I wrote the equation out:

image.png.85625b3e207a25a51955ef12ef1bd9fa.png

And I believe that makes sense.  It also works out to the prior equation when Gids_min is 0 (like in @JohnT's Leaf).  So, here's what I've got right now:

  if model is not None:
    if model == 24:
      carmodel = "nissan:leaf:12:24:other"
      gids_max = 281
      gids_min = 0
      ahr_max = 65.4
    elif model == 30:
      carmodel = "nissan:leaf:16:30:other"
      gids_max = 365
      gids_min = 0
      ahr_max = 83.5
    elif model == 40:
      carmodel = "nissan:leaf:18:40:other"
      gids_max = 495
      gids_min = 50
      ahr_max = 115.4
  soc = (gids-gids_min)/((gids_max-gids_min)*ahr/ahr_max)

If we can fill in any other model parameters, I'd be happy to update for the rest of them!

@Stefan_K, I just checked on the server, and it appears to be up and running.  That message ("OK!") is the message that Torque Pro requires, I send a different one to LeafSpy, so you shouldn't be getting that response from the server.  Can you double check that you have set the path correctly (http://abetterrouteplanner.com:4441/leaf## - where ## is your battery size)?

 

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, Jason (ABRP) said:

On the new battery computation, it definitely wasn't live last weekend, I just pushed the code this afternoon.  Based on the feedback, it seems I need to add some more computation parameters! Per the conversations, I've updated gids_max for the leaf40 to 115.4

For my own sanity, I wrote the equation out:

image.png.85625b3e207a25a51955ef12ef1bd9fa.png

And I believe that makes sense.  It also works out to the prior equation when Gids_min is 0 (like in @JohnT's Leaf).  So, here's what I've got right now:


  if model is not None:
    if model == 24:
      carmodel = "nissan:leaf:12:24:other"
      gids_max = 281
      gids_min = 0
      ahr_max = 65.4
    elif model == 30:
      carmodel = "nissan:leaf:16:30:other"
      gids_max = 365
      gids_min = 0
      ahr_max = 83.5
    elif model == 40:
      carmodel = "nissan:leaf:18:40:other"
      gids_max = 495
      gids_min = 50
      ahr_max = 115.4
  soc = (gids-gids_min)/((gids_max-gids_min)*ahr/ahr_max)

If we can fill in any other model parameters, I'd be happy to update for the rest of them!

@Stefan_K, I just checked on the server, and it appears to be up and running.  That message ("OK!") is the message that Torque Pro requires, I send a different one to LeafSpy, so you shouldn't be getting that response from the server.  Can you double check that you have set the path correctly (http://abetterrouteplanner.com:4441/leaf## - where ## is your battery size)?

 

Yes this are my settings!

Screenshot_20190211-104729.png

Share this post


Link to post
Share on other sites

Very strange, are you receiving data on the site? (IE Going to "View Live Data", you see data from your car?) I'll troubleshoot the server further tonight as I have time.

Share this post


Link to post
Share on other sites
3 hours ago, Jason (ABRP) said:

One note, you should not send me your password via LeafSpy, I don't need it, and it's unnecessarily insecure.  

I didn't know that the pw is transmitted. I changed it. 🙂

Share this post


Link to post
Share on other sites

I confirm that this morning I got the same behavior as Stefan.  Same error message in leafspy and no data in live mode. 

Share this post


Link to post
Share on other sites
On 2/10/2019 at 11:14 PM, JohnT said:

I hope for Jason's sake that various models don't do completely different calculations for the battery statistics.  I have a 2016 24kWh Leaf ex Japan and I have a lot of data from both Leafspy logs and recorded off the dash.  For our car Gids_min is definitely zero but it clearly isn't for your later model.    Leafspy SOC is linear with Gids from about 97% down to 10% which I think reflects our battery SOH of around 90%.   Dash % is linear with Gids/Gids_max/SOH.

When you say "SOC window" do you mean Leafspy SOC or the dash battery %?

I think your equation isn't quite right.  I'd hazard a guess as it being 

(Gids-Gids_min)/(Gids_max-Gids_min)/(Ahr/Ahr_max)

Cheers

John

 

 

leafspy and dash SOC.png

@JohnT I mean the Dash battery %.

Yes that equation looks better. :classic_biggrin:

Intresting data. So with the 24kWh version it is possible to drive the car until LeafSpy shows 0 Gids and it is not until then the dash shows 0%?

@Jason (ABRP) These equations will then be used to calculate the actual "ABRP %" shown in ABRP when you use live data? Which will hopefully correspond quite good with the Leaf Dash%, However how will the correlation to avalible energy be? Is avalible energy calculated as "ABRP %" multiplied with a constant for each Leaf type? Or are you calculating avalible energy as (Gids-Gids_min)*GidsEnergyConstant?

Edited by Jilldris

Share this post


Link to post
Share on other sites

These equations are currently being used to calculate the actual ABRP % currently, and yes, I'm using separate constants for each Leaf model.  I pasted the code up above somewhere with the constants I'm using.  

@Stefan_K and @JohnT, I checked the log and I had a stupid little error in the processing (Didn't properly convert the variable type to a number before asking it to do the math).  It should be better now, let me know if you continue to see issues.

Share this post


Link to post
Share on other sites
7 hours ago, Jason (ABRP) said:

@Stefan_K and @JohnT, I checked the log and I had a stupid little error in the processing (Didn't properly convert the variable type to a number before asking it to do the math).  It should be better now, let me know if you continue to see issues.

Hi, ist Workshop! 🙂 👍

And because of the need I figured out how to use it on one device. So I split the screen so I could use it on one device 💡

And it worked. 

Screenshot_20190213-115137.png

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Give a try to saving ABRP to your home screen, that'll get rid of the address bar at the top of the webpage.  You should get a small popup at the bottom of the screen with the offer when you first load up the page.

Guess I need to look at making sure the mapless display doesn't bleed over onto its buttons on very small displays, haha!

  • Like 1

Share this post


Link to post
Share on other sites

By the way, how is the new computation working for you all? If possible, do we have folks with each model (24/30/40)to check in on the accuracy compared to the dash %?

Share this post


Link to post
Share on other sites
3 hours ago, Jason (ABRP) said:

By the way, how is the new computation working for you all? If possible, do we have folks with each model (24/30/40)to check in on the accuracy compared to the dash %?

I had a brief look yesterday Jason. The battery% was about 2% different to the dash.  I'll look at the leafspy data over the weekend. 

Share this post


Link to post
Share on other sites
On 2/14/2019 at 2:59 PM, Jason (ABRP) said:

By the way, how is the new computation working for you all? If possible, do we have folks with each model (24/30/40)to check in on the accuracy compared to the dash %?

It is my parents that drive the Leaf 40kWh. I will see if I can check during the weekend if I am there how the new computation works. But maybe more people here also have 40kWh Leaf?

I am trying to get my father to use ABRP but he think is it a little difficult. I hope that if we get the ABRP% to match the display % it will make more sense for him. The splitscreen tip from Stefan_K was also good, he likes having Leafspy up to check battery temp. Splitscreen for LeafSpy and mapless mode seems nice to avoid having to use two devices. 

Share this post


Link to post
Share on other sites
On 2/15/2019 at 2:59 AM, Jason (ABRP) said:

By the way, how is the new computation working for you all? If possible, do we have folks with each model (24/30/40)to check in on the accuracy compared to the dash %?

Hi Jason, I did some more testing today (24 kWh)  and the computed battery % was always slightly over what I saw on the dash.  Around 1% at 70% battery level for example, less at lower levels, with my Ahr sitting at 58.45.  I'm pretty happy with that but in terms of the equation Gidmax may be more like 283 rather than 281.  I don't often charge right up to 100% but next time I do I'll be sure to check immediately with Leafspy and ABRB. 

 

 

Share this post


Link to post
Share on other sites

I'm having trouble getting any information on the Live screen on ABRB while driving a route.   I'm not sure what I am doing wrong yet but I'm sure it is my error.  Possibly something to do with GPS not being active on one or other of the two devices even though I thought it was. 

I have attached a spreadsheet with some calculations from today's test, along with a photo of Leafspy at the end of the trip (I couldn't remember how to do a screen shot on my old S2 that I use as the second device).  

ABRB calculated the trip as consuming 3.3 kWh while my actual on basically the same route was around 4.4 kWh.  Part of this may be the fact that the aircon was on and consuming around 1kW according to the Leafspy screen shot taken after I stopped.  I appreciate that there is a compromise between making the user setup simple and model accuracy but the reference consumption @ 110km/h makes it difficult to judge the effect of fixed loads such as climate control at much slower speeds.  That said, I don't think it is a major issue.

I can't get my head around the fact that I get very accurate modelling of battery levels in ABRB and yet the plan summary shows quite different km/kWh to what I achieve in practice.  There is no way I'd expect 8.3 km/kWh on this trip, even with climate control turned off.  It is mixed urban and rural including some significant changes in elevation.  If the consumption is being accurately reported then the planned usage points back to a battery capacity of around 17 kWh.  The actual capacity is somewhere around 21kWh and I did the planning based on 10% battery degradation in the settings.

In summary, I'm very happy that ABRB does a great job but until the plan summary consumption more closely matches reality there is a lingering doubt that it is just coincidental that my trip charge levels match the ABRB plan.

 

 

 

  

abrb1.ods

20190216_083733.jpg

Share this post


Link to post
Share on other sites
On 2/13/2019 at 10:14 AM, Jilldris said:

@JohnT I mean the Dash battery %.

Yes that equation looks better. :classic_biggrin:

Intresting data. So with the 24kWh version it is possible to drive the car until LeafSpy shows 0 Gids and it is not until then the dash shows 0%?

@Jason (ABRP) These equations will then be used to calculate the actual "ABRP %" shown in ABRP when you use live data? Which will hopefully correspond quite good with the Leaf Dash%, However how will the correlation to avalible energy be? Is avalible energy calculated as "ABRP %" multiplied with a constant for each Leaf type? Or are you calculating avalible energy as (Gids-Gids_min)*GidsEnergyConstant?

Yes, for the 24 and 30 kWh models Gids is universally believed to be a measure of the available energy remaining, in 80Wh units.  Low battery warning accours at 49 Gids, Very Low Battery Warning at 19 Gids and the turtle appears at 5 Gids 🙂

Edited by JohnT

Share this post


Link to post
Share on other sites
4 hours ago, JohnT said:

Yes, for the 24 and 30 kWh models Gids is universally believed to be a measure of the available energy remaining, in 80Wh units.  Low battery warning accours at 49 Gids, Very Low Battery Warning at 19 Gids and the turtle appears at 5 Gids 🙂

Thanks! I understand. What made me confused was that the car would show in the dash that there is battery remaing until you reach 0 Gids, eg even past the point you have reach turtle. But maybee I missunderstood that? Beacuse is there even a % number in the dash for remaining battery in Leaf24/30kWh as in the Leaf40kWh?   

Share this post


Link to post
Share on other sites
12 hours ago, Jilldris said:

Thanks! I understand. What made me confused was that the car would show in the dash that there is battery remaing until you reach 0 Gids, eg even past the point you have reach turtle. But maybee I missunderstood that? Beacuse is there even a % number in the dash for remaining battery in Leaf24/30kWh as in the Leaf40kWh?   

The very early Leafs don't display a battery percentage but that changed around 2013.  On my car (2016 24kWh) the percentage display blanks out when you get to very low battery levels so I was extrapolating to say that 0% is also 0 Gids.  But the indications are that this is the case.

Share this post


Link to post
Share on other sites
1 hour ago, JohnT said:

The very early Leafs don't display a battery percentage but that changed around 2013.  On my car (2016 24kWh) the percentage display blanks out when you get to very low battery levels so I was extrapolating to say that 0% is also 0 Gids.  But the indications are that this is the case.

Ah ok! 👍

Share this post


Link to post
Share on other sites
On 2/15/2019 at 1:31 PM, Jilldris said:

It is my parents that drive the Leaf 40kWh. I will see if I can check during the weekend if I am there how the new computation works. But maybe more people here also have 40kWh Leaf?

I am trying to get my father to use ABRP but he think is it a little difficult. I hope that if we get the ABRP% to match the display % it will make more sense for him. The splitscreen tip from Stefan_K was also good, he likes having Leafspy up to check battery temp. Splitscreen for LeafSpy and mapless mode seems nice to avoid having to use two devices. 

That's actually really good feedback, we often get feedback from very involved power users who learn all the little features and bugs and how to really use the website.  Better is feedback from those who don't go to that level, so if you wouldn't mind I'd love to hear more about your father's feedback.  What specifically does he find difficult? Anything we could do to make it easier for him?

@JohnT

On 2/15/2019 at 10:09 PM, JohnT said:

I'm having trouble getting any information on the Live screen on ABRB while driving a route.   I'm not sure what I am doing wrong yet but I'm sure it is my error.  Possibly something to do with GPS not being active on one or other of the two devices even though I thought it was. 

I have attached a spreadsheet with some calculations from today's test, along with a photo of Leafspy at the end of the trip (I couldn't remember how to do a screen shot on my old S2 that I use as the second device).  

ABRB calculated the trip as consuming 3.3 kWh while my actual on basically the same route was around 4.4 kWh.  Part of this may be the fact that the aircon was on and consuming around 1kW according to the Leafspy screen shot taken after I stopped.  I appreciate that there is a compromise between making the user setup simple and model accuracy but the reference consumption @ 110km/h makes it difficult to judge the effect of fixed loads such as climate control at much slower speeds.  That said, I don't think it is a major issue.

I can't get my head around the fact that I get very accurate modelling of battery levels in ABRB and yet the plan summary shows quite different km/kWh to what I achieve in practice.  There is no way I'd expect 8.3 km/kWh on this trip, even with climate control turned off.  It is mixed urban and rural including some significant changes in elevation.  If the consumption is being accurately reported then the planned usage points back to a battery capacity of around 17 kWh.  The actual capacity is somewhere around 21kWh and I did the planning based on 10% battery degradation in the settings.

In summary, I'm very happy that ABRB does a great job but until the plan summary consumption more closely matches reality there is a lingering doubt that it is just coincidental that my trip charge levels match the ABRB plan.

 

This one brings up an important point.  There are two pieces at play to calculate a route, one is the consumption model which spits out a power (in kW) for an input speed, and the other is the capacity of the battery.  At the moment, I've set the battery capacity, and tuned the consumption model based on real-world inputs to where the achievable range matches the real-world experiences.  My guess is that I've set the battery capacity too low, but since I adjusted the consumption curve to match you're getting accurate %'s but the energy usage doesn't match.

What I suppose I need to do is go back upthread to where the Gids were listed out and do 

(Gids_max - Gids_min)*80Wh

To set the available battery capacity for each model, then re-adjust the consumption model to match.  This will be important when I analyze all the LeafSpy data you've all contributed, as there's no raw power information in the LeafSpy stream, so I have to figure out the power consumption from the battery % reported.

Share this post


Link to post
Share on other sites
1 hour ago, Jason (ABRP) said:

That's actually really good feedback, we often get feedback from very involved power users who learn all the little features and bugs and how to really use the website.  Better is feedback from those who don't go to that level, so if you wouldn't mind I'd love to hear more about your father's feedback.  What specifically does he find difficult? Anything we could do to make it easier for him?

@JohnT

This one brings up an important point.  There are two pieces at play to calculate a route, one is the consumption model which spits out a power (in kW) for an input speed, and the other is the capacity of the battery.  At the moment, I've set the battery capacity, and tuned the consumption model based on real-world inputs to where the achievable range matches the real-world experiences.  My guess is that I've set the battery capacity too low, but since I adjusted the consumption curve to match you're getting accurate %'s but the energy usage doesn't match.

What I suppose I need to do is go back upthread to where the Gids were listed out and do 


(Gids_max - Gids_min)*80Wh

To set the available battery capacity for each model, then re-adjust the consumption model to match.  This will be important when I analyze all the LeafSpy data you've all contributed, as there's no raw power information in the LeafSpy stream, so I have to figure out the power consumption from the battery % reported.

Thanks Jason, that makes more sense now.  I presume you do mean power rather than energy in your comment about the leafspy information stream.  However if by chance you do mean energy then you have that in Gid (0,08 kWh) units. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


Contact Us

Bo - Lead Developer and Tesla owner: bo@abetterrouteplanner.com

Jason - New Car Models, Developer and Bolt owner : jason@abetterrouteplanner.com

Idreams - Forums Administrator, Forums Developer and Tesla owner : idreams@abetterrouteplanner.com

×
×
  • Create New...