question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add cycle number and charge/discharge tags in solution data

See original GitHub issue

Summary Automatically provide information on cycle number and whether the data describe charge / discharge

Motivation After running an experiment, some data post-processing is needed to append information on cycle number and charge/discharge, which can be useful for further data analysis. These features could be automatically extracted and included in sol.data

Additional context Using Pandas and Numpy, I have added a couple of lines to add these features after importing the data into a DataFrame, although I do realize they may not fully describe all existing use cases for more complex charge/discharge cycles:

df["Charge/Discharge"] = np.where(df["Current [A]"] >=0, "D", "C") df["Cycle number"] = np.ceil(df["Charge/Discharge"].ne(df["Charge/Discharge"].shift()).cumsum() / 2).astype("int32")

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
tinosulzercommented, Oct 27, 2021

The way solution.data is constructed is not super straightforward, it has to evaluate pybamm symbols (variables). We could add a variable which is the sign of the current. Adding a variable for cycle number is harder

1reaction
tinosulzercommented, Oct 27, 2021

Are you aware of solution.cycles and (e.g.) solution.cycles[0].steps, which give an easy way of splitting cycles and steps?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cyclic Charge-Discharge Setup Parameters
Controls the number of charge-discharge cycles to be executed. Each cycle consists of one charge step and one discharge step. Sample Period. The...
Read more >
Adding constraint to limit battery cycling to 1 charge and 1 ...
One possible solution is to limit the integral of the binary variable to be less ... label='Limit') plt.plot(m.time,discharge.value,'b:' ...
Read more >
BU-808: How to Prolong Lithium-based Batteries
Table 2 estimates the number of discharge/charge cycles Li-ion can deliver at various DoD levels before the battery capacity drops to 70 percent....
Read more >
The Charging Cycles of Lithium-ion Polymer Batteries - Grepow
It refers to the number of charge and discharge cycles of the battery. Let us look at an example: Let us say there...
Read more >
A database of battery materials auto-generated using ... - Nature
In addition, capacity data that feature information about cycles and current can be useful for predictions such as capacity degradation. In ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found