Nonsensical values battery stateful

  • ajszilasi@gmail.com
  • Topic Author
More
04 May 2023 06:25 - 04 May 2023 15:56 #12101 by ajszilasi@gmail.com
Nonsensical values battery stateful was created by ajszilasi@gmail.com
Hello, Firstly, my understanding is that I have written a script where I am charging a battery stateful object in one minute intervals at 100W. Could someone please confirm that my understanding of my script is correct? Secondly battery statefuli producing nonsensical values  as at a certain execution the charging power goes from 100 W to 456 KW and therefore the battery goes from a SOC of 20.74% approx to full charge (90% SOC) Please see the screenshot below and the attached script. Is there something that I am not understanding here or is this a bug in pySAM?

 

 

File Attachment:

File Name: charging-test.py
File Size:1 KB
Last edit: 04 May 2023 15:56 by pgilman.

Please Log in or Create an account to join the conversation.

  • pgilman
More
04 May 2023 16:06 #12106 by pgilman
Replied by pgilman on topic Nonsensical values battery stateful
Hi Anton,

My test of your script results in a series of SOC values ranging from 20.0165 to 20.8264 with a -0.1 kW through the entire series.

Best regards,
Paul.


C:\>python charging-test.py
-0.09999999999987032 Power
20.016540739509317 SOC
-0.1000000000001335 Power
20.033081016576528 SOC
-0.09999999999990307 Power
20.049620831240336 SOC
-0.099999999999883 Power
20.06616018353955 SOC
-0.09999999999997185 Power
20.08269907351297 SOC
-0.09999999999993386 Power
20.099237501199333 SOC
-0.09999999999986893 Power
20.115775466637402 SOC
-0.1000000000000112 Power
20.132312969865964 SOC
-0.10000000000019202 Power
20.14885001092378 SOC
-0.10000000000004133 Power
20.165386589849543 SOC
-0.1000000000002632 Power
20.181922706682055 SOC
-0.10000000000021902 Power
20.198458361460006 SOC
-0.10000000000034433 Power
20.21499355422215 SOC
-0.1000000000001347 Power
20.231528285007162 SOC
-0.09999999999982427 Power
20.248062553853742 SOC
-0.09999999999998294 Power
20.26459636080068 SOC
-0.09999999999997193 Power
20.28112970588666 SOC
-0.09999999999989105 Power
20.29766258915037 SOC
-0.09999999999997451 Power
20.314195010630534 SOC
-0.09999999999971772 Power
20.330726970365788 SOC
-0.09999999999982495 Power
20.34725846839488 SOC
-0.0999999999999931 Power
20.363789504756504 SOC
-0.10000000000005332 Power
20.380320079489312 SOC
-0.10000000000023981 Power
20.396850192632 SOC
-0.10000000000004788 Power
20.41337984422317 SOC
-0.10000000000011469 Power
20.42990903430152 SOC
-0.09999999999986836 Power
20.446437762905656 SOC
-0.1000000000000804 Power
20.462966030074305 SOC
-0.1000000000002461 Power
20.4794938358461 SOC
-0.09999999999999508 Power
20.496021180259607 SOC
-0.09999999999983009 Power
20.512548063353478 SOC
-0.1000000000001869 Power
20.529074485166422 SOC
-0.10000000000002325 Power
20.54560044573698 SOC
-0.09999999999984198 Power
20.562125945103762 SOC
-0.09999999999994445 Power
20.578650983305426 SOC
-0.09999999999996019 Power
20.595175560380564 SOC
-0.09999999999978734 Power
20.611699676367746 SOC
-0.09999999999992888 Power
20.62822333130562 SOC
-0.09999999999974545 Power
20.64474652523272 SOC
-0.09999999999973996 Power
20.66126925818766 SOC
-0.09999999999987784 Power
20.67779153020904 SOC
-0.09999999999985568 Power
20.69431334133541 SOC
-0.09999999999970596 Power
20.710834691605314 SOC
-0.09999999999999892 Power
20.727355581057388 SOC
-0.09999999999996068 Power
20.743876009730137 SOC
-0.09999999999990994 Power
20.760395986839356 SOC
-0.10000000000009265 Power
20.7769155434424 SOC
-0.09999999999999662 Power
20.793434679571334 SOC
-0.0999999999999825 Power
20.809953395258276 SOC
-0.09999999999987344 Power
20.82647169053531 SOC


 

Please Log in or Create an account to join the conversation.

  • pgilman
More
04 May 2023 16:10 #12107 by pgilman
Replied by pgilman on topic Nonsensical values battery stateful
Hi Anton,

I deleted the duplicate post on this subject, but noticed that you mentioned you are using PySAM 4.0.0. The latest version is 4.1.0 -- I don't think there were changes to BatteryStateful between Versions 4.0 and 4.1, but I would recommend using the latest version.

nrel-pysam.readthedocs.io/en/main/versions.html

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

  • ajszilasi@gmail.com
  • Topic Author
More
04 May 2023 17:01 - 04 May 2023 17:20 #12108 by ajszilasi@gmail.com
Replied by ajszilasi@gmail.com on topic Nonsensical values battery stateful
Paul,

Thank you for your quick response. This is very weird it must be something on my system.

Im using Python3 with version 4.0.0 with python3. I'm trying to install version 4.1.0 specifically but am getting this error despite the latest release being published

 
Last edit: 04 May 2023 17:20 by pgilman.

Please Log in or Create an account to join the conversation.

  • pgilman
More
04 May 2023 17:23 #12109 by pgilman
Replied by pgilman on topic Nonsensical values battery stateful
Hi Anton,

Please try the command all lowercase as shown here: nrel-pysam.readthedocs.io/en/main/installation.html

The following command should work:
Code:
pip install nrel-pysam==4.1.0

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

  • ajszilasi@gmail.com
  • Topic Author
More
04 May 2023 19:20 #12110 by ajszilasi@gmail.com
Replied by ajszilasi@gmail.com on topic Nonsensical values battery stateful
Paul,

Again thank you for your quick response.

Both of the issues which I described above appear to be a mac issue, I just tried installing pysam 4.1.0 and then running charging-test.py on my windows machine and they both work just fine I do not get nonsensical values in the latter on my windows machine.

This begs the question to me is there an example virtual environment setup or docker container which you would recommend for me to run pysam on?

Many thanks

Please Log in or Create an account to join the conversation.

Moderators: pgilman
Powered by Kunena Forum