pyprobe.analysis.base.degradation_mode_analysis_functions module#
A module containing functions for degradation mode analysis.
- ocv_curve_fit(SOC, fitting_target_data, x_pe, ocp_pe, x_ne, ocp_ne, fitting_target, optimizer, x_guess)#
Fit half cell open circuit potential curves to full cell OCV data.
- Parameters:
SOC (NDArray[np.float64]) – The full cell SOC.
fitting_target_data (NDArray[np.float64]) – The full cell OCV data.
x_pe (NDArray[np.float64]) – The cathode stoichiometry data.
ocp_pe (NDArray[np.float64]) – The cathode OCP data.
x_ne (NDArray[np.float64]) – The anode stoichiometry data.
ocp_ne (NDArray[np.float64]) – The anode OCP data.
fitting_target (str) – The target for the curve fitting.
optimizer (str) – The optimization algorithm to use.
x_guess (NDArray[np.float64]) – The initial guess for the fitting parameters.
- Returns:
The optimized fitting parameters.
- Return type:
NDArray
- calc_electrode_capacities(x_pe_lo, x_pe_hi, x_ne_lo, x_ne_hi, cell_capacity)#
Calculate the electrode capacities.
- Parameters:
x_pe_lo (float) – The cathode stoichiometry at lowest cell SOC.
x_pe_hi (float) – The cathode stoichiometry at highest cell SOC.
x_ne_lo (float) – The anode stoichiometry at lowest cell SOC.
x_ne_hi (float) – The anode stoichiometry at highest cell SOC.
cell_capacity (float)
- Returns:
NDArray: The cathode capacity.
NDArray: The anode capacity.
NDArray: The lithium inventory.
- Return type:
Tuple[float, float, float]
- calc_full_cell_OCV(SOC, x_pe_lo, x_pe_hi, x_ne_lo, x_ne_hi, x_pe, ocp_pe, x_ne, ocp_ne)#
Calculate the full cell OCV.
- Parameters:
SOC (NDArray[np.float64]) – The full cell SOC.
x_pe_lo (float) – The cathode stoichiometry at lowest cell SOC.
x_pe_hi (float) – The cathode stoichiometry at highest cell SOC.
x_ne_lo (float) – The cathode stoichiometry at lowest cell SOC.
x_ne_hi (float) – The anode stoichiometry at highest cell SOC.
x_pe (NDArray[np.float64]) – The cathode stoichiometry data.
ocp_pe (NDArray[np.float64]) – The cathode OCP data.
x_ne (NDArray[np.float64]) – The anode stoichiometry data.
ocp_ne (NDArray[np.float64]) – The anode OCP data.
- Returns:
The full cell OCV.
- Return type:
NDArray
- calc_full_cell_OCV_composite(SOC, z_pe_lo, z_pe_hi, z_ne_lo, z_ne_hi, x_pe, ocp_pe, x_c1, ocp_c1, x_c2, ocp_c2, comp1_frac)#
Calculate the full cell OCV.
- Parameters:
SOC (NDArray[np.float64]) – The full cell SOC.
z_pe_lo (float) – The cathode stoichiometry at the lowest cell SOC.
z_pe_hi (float) – The cathode stoichiometry at the highest cell SOC.
z_ne_lo (float) – The anode stoichiometry at the lowest cell SOC.
z_ne_hi (float) – The anode stoichiometry at the highest cell SOC.
x_pe (NDArray[np.float64]) – The cathode stoichiometry data.
ocp_pe (NDArray[np.float64]) – The cathode OCP data.
x_c1 (NDArray[np.float64]) – The anode component 1 stoichiometry data.
ocp_c1 (NDArray[np.float64]) – The anode component 1 OCP data.
x_c2 (NDArray[np.float64]) – The anode component 2 stoichiometry data.
ocp_c2 (NDArray[np.float64]) – The anode component 2 OCP data.
comp1_frac (float) – The fraction of the first anode component.
- Returns:
The full cell OCV.
- Return type:
NDArray[np.float64]
- calculate_dma_parameters(cell_capacity, pe_capacity, ne_capacity, li_inventory)#
Calculate the DMA parameters.
- Parameters:
pe_stoich_limits (NDArray[np.float64]) – The cathode stoichiometry limits.
ne_stoich_limits (NDArray[np.float64]) – The anode stoichiometry limits.
pe_capacity (NDArray[np.float64]) – The cathode capacity.
ne_capacity (NDArray[np.float64]) – The anode capacity.
li_inventory (NDArray[np.float64]) – The lithium inventory.
cell_capacity (ndarray[Any, dtype[float64]])
- Returns:
The SOH, LAM_pe, LAM_ne, and LLI.
- Return type:
Tuple[float, float, float, float]
- average_OCV_curves(charge_SOC, charge_OCV, charge_current, discharge_SOC, discharge_OCV, discharge_current)#
Average the charge and discharge OCV curves.
- Parameters:
charge_capacity (NDArray[np.float64]) – The charge capacity data.
charge_OCV (NDArray[np.float64]) – The charge OCV data.
discharge_capacity (NDArray[np.float64]) – The discharge capacity data.
discharge_OCV (NDArray[np.float64]) – The discharge OCV data.
charge_SOC (ndarray[Any, dtype[float64]])
charge_current (ndarray[Any, dtype[float64]])
discharge_SOC (ndarray[Any, dtype[float64]])
discharge_current (ndarray[Any, dtype[float64]])
- Returns:
An average between the charge and discharge OCV curves.
- Return type:
Tuple[NDArray[np.float64], NDArray[np.float64]]