UDCnom

Post Reply
User avatar
tom91
Posts: 2962
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bicester, Oxfordshire
Has thanked: 328 times
Been thanked: 847 times

UDCnom

Post by tom91 »

So reading the code and not having used UDCnom yet i was wondering if there is a bit of explaination the coding, reading code just made it more confusing.

Code: Select all

   if (udcnom > 0)
   {
      s32fp udcdiff = udcfp - udcnom;
      s32fp factor = FP_FROMINT(1) + FP_DIV(udcdiff, udcnom);
      //increase fweak on voltage above nominal
      fweak = FP_MUL(fweak, factor);
      //decrease boost on voltage below nominal
      boost = FP_DIV(boost, factor);
   }
If I am correct, as soon as UDCnom is set to a value other the zero will values for Fweak and Boost will change based on the factor.

So would the equation for the factor be: (UDC measured - UDCnom) /UDCnom ?

No the comment really throws me off, as I would expect the boost to need to increase to keep the resultant effective voltage the same?

From wiki: boost At full throttle an effective voltage of 1700/37813*355=16V is generated. Thus a lower voltage is a lower effective voltage. :idea:
Creator of SimpBMS
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1913 times
Contact:

Re: UDCnom

Post by johu »

Hi Tom,

the second comment is indeed wrong. So say udcnom=500, fweak=100, boost=2000 and measured udc (udcfp) is 480. Then udcdiff=-20 and factor is 1+(-20/500)=0.96. Then fweak is lowered to 100*0.96=96 and boost INCREASED to 2000/0.96=2083. Code correct, comment wrong.

Thats why "Clean Code" advises against comments: they add redundancy. I happily adhere to their advise, usually :P
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
tom91
Posts: 2962
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bicester, Oxfordshire
Has thanked: 328 times
Been thanked: 847 times

Re: UDCnom

Post by tom91 »

No wonder having different packs make certain tunes feel vastly different.

Will start using UDCnom now as standard.
Creator of SimpBMS
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1913 times
Contact:

Re: UDCnom

Post by johu »

Yes I certainly recommend it. Especially on non-LFP packs whos voltage changes a lot over the discharge cycle.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jon volk
Posts: 574
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 3 times

Re: UDCnom

Post by jon volk »

Great info! I definitely need to update my setting in this case.
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
tom91
Posts: 2962
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bicester, Oxfordshire
Has thanked: 328 times
Been thanked: 847 times

Re: UDCnom

Post by tom91 »

I would be careful, as depending on at what battery voltage you sought out most limits this will determine your true UDC nom.

So i would lean more to the cautious side, however on large drive units from experience you need to drop alot of voltage (having ran with 280V systems using a 360ishV proven tune) to notice a big impact on performance down low.
Creator of SimpBMS
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
jon volk
Posts: 574
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 3 times

Re: UDCnom

Post by jon volk »

I’ve been thinking about this value a bit. If fweak determines the speed at which maximum power is generated, wouldn’t it be more consistent to keep this value the same and scale fslipmax with pack voltage?
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
johu
Site Admin
Posts: 7182
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 552 times
Been thanked: 1913 times
Contact:

Re: UDCnom

Post by johu »

Thats what happens if you use udcnom AND also use fconst and fslipconstmax. Those two will start increasing the slip above fweakcalc until it peaks at fconst.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jon volk
Posts: 574
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 3 times

Re: UDCnom

Post by jon volk »

Great. I’m going to have to look at the calculations to understand it.
Formerly 92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 574
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 3 times

Re: UDCnom

Post by jon volk »

So based on your example configuration, I put the numbers in a spreadsheet in an attempt to better quantify the changes. Care to take a quick look at the logic here and see if it's accurately representing what's happening between udc/udcnom/fslip/fconst/etc?
Attachments
Boost-Slip calcs.xlsx
(10.88 KiB) Downloaded 152 times
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada
Been thanked: 1 time

Re: UDCnom

Post by dima »

I believe your excel formula is a bit wrong E14 should be

Code: Select all

=1+(E13/E11)
jon volk
Posts: 574
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 3 times

Re: UDCnom

Post by jon volk »

Indeed, good catch.

Updated the file in case anyone else may find it useful for setting things up or if anyone else catches an error.
Attachments
Boost-Slip calcs.xlsx
(10.94 KiB) Downloaded 122 times
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada
Been thanked: 1 time

Re: UDCnom

Post by dima »

Is it possible to put something similar for ampnom?
Post Reply