pydpeet.add_resistance_internal#
- pydpeet.add_resistance_internal(df, config=None, verbose=True)[source]#
Calculate the internal resistance of a battery from given test data.
The internal resistance is calculated from the voltage and current differences between consecutive points. The calculation is only performed when the following conditions are met:
The time difference is positive (i.e. time is increasing)
The absolute time difference is less than or equal to max_time_diff
The absolute current difference is greater than or equal to min_current_diff
The absolute voltage difference is greater than or equal to min_voltage_diff
If ignore_negative_resistance_values is True, any calculated internal resistances with a value less than or equal to zero are set to NaN. (mainly for a bug in Neware)
Parameters: df (pandas.DataFrame): Input DataFrame containing battery test data config (BatteryConfig): Configuration object containing parameters for internal resistance calculation ignore_negative_resistance_values (bool, optional): Whether to set calculated internal resistances with a value less than or equal to zero to NaN (should only appear for Neware cells)
Returns: pandas.DataFrame: DataFrame with added ‘InternalResistance[ohm]’ column
- Parameters:
df (DataFrame)
config (BatteryConfig)
verbose (bool)
- Return type:
DataFrame