pydpeet.add_efficiency_coulomb#

pydpeet.add_efficiency_coulomb(df, df_blocks_charge, df_blocks_discharge, config=None, max_time_diff_in_secs=300, ignore_threshold_values=False, verbose=True)[source]#

Calculate the Coulomb Efficiency of a battery based on the given data.

The Coulomb efficiency is calculated as the total discharge divided by the total charge. The time difference between a charge block and the subsequent discharge block is taken into account. If a charge block does not have a corresponding discharge block within the given time difference, it is ignored. Similarly, if a discharge block does not have a corresponding charge block within the given time difference, it is ignored.

Parameters:

df (pandas.DataFrame): Input DataFrame containing battery test data df_blocks_charge (list[pandas.DataFrame] or pandas.DataFrame): List of DataFrames containing charge blocks df_blocks_discharge (list[pandas.DataFrame] or pandas.DataFrame): List of DataFrames containing discharge blocks config (BatteryConfig, optional): Configuration object containing battery test parameters max_time_diff_in_secs (int, optional): Maximum time difference in seconds between charge and discharge blocks ignore_threshold_values (bool, optional): Whether to ignore voltage thresholds when computing Coulomb efficiency verbose (bool, optional): If True, print debug messages

Returns:

pandas.DataFrame: DataFrame with added ‘CoulombEfficiency’ column

Parameters:
Return type:

DataFrame