pydpeet.add_soc#

pydpeet.add_soc(df, df_primitives, neware_bool=True, standard_method=None, methods=None, config=None, lower_soc_for_voltage=0, upper_soc_for_voltage=1, lower_voltage_for_soc=0, upper_voltage_for_soc=0, verbose=True, restart_for_testindex=True)[source]#

Computes the Soc (State of Charge) for a battery cell, from the given dataframe. It therefore integrates the current over time, using the trapezoid rule. As a capacity reference value, the first calculated capacity value is used, which is updated once the soc reaches a point with a new calculated capacity value.

The resulting DataFrame has additional ‘SOC_<method_name>’ columns.

Parameters:

df (pandas.DataFrame): Input DataFrame containing battery test data standard_method (SocMethod, optional): Standard SOC method to use if no other methods are provided methods (list[SocMethod], optional): List of additional SOC methods to use config (BatteryConfig, optional): Configuration object containing battery test parameters lower_soc_for_voltage (float, optional): Lower SOC value for voltage bounds (default: 0) upper_soc_for_voltage (float, optional): UpperSOC value for voltage bounds (default: 1) lower_voltage_for_soc (float, optional): Lower voltage bound for SOC computation (default: 0) upper_voltage_for_soc (float, optional): Upper voltage bound forSOC computation (default: 0) verbose (bool, optional): If True, print debug messages. Defaults to False. restart_for_testindex (bool, optional): If True, restart the computation if a new TestIndex block is encountered. Defaults to True.

Returns:

pandas.DataFrame: DataFrame with added ‘SOC_<method_name>’ columns

Parameters:
Return type:

DataFrame