Skip to content

Cell Optimizer Model Try Protos

← Models · Cell Optimizer

Multi-objective optimisation to find Pareto-optimal cell designs that meet performance targets.


Multi-objective optimization using NSGA2 with PyBaMM simulations. The base cell design uses the same cell_parameters fields as the Cell Performance model; optimization targets are plain key/value entries.

Features

  • One-time capacity calibration on the base cell; calibration width factor extracted and reused for all designs in the loop (no per-evaluation calibration cost). Set skip_capacity_calibration: true to skip it.
  • NSGA2 (pymoo) for multi-objective Pareto optimization
  • PyBaMM SPMe (isothermal) for performance (capacity, energy, power, DCIR, ACIR) and cycle life
  • Design targets as plain key/value entries with condition parameters. Any combination of capacity_Ah, energy_Wh, power_W, dcir_mOhm, acir_mOhm, cycle_life_cycles, positive_electrode_porosity, negative_electrode_porosity, positive_electrode_density_g_cm3 and negative_electrode_density_g_cm3 can be targeted; there is no fixed limit on the number of targets.
  • Variable params as bounds; integer fields (positive_electrode_sheet_count, negative_electrode_sheet_count, jelly_roll_count, electrode_coating_side_count) are rounded from the float optimizer output, and every value is clamped to its bounds
  • Error threshold 2%: if best design's max relative error across targets exceeds 2%, success=False

Input Schema

Top-Level Input

The top-level input has exactly two required fields — everything else lives underneath them:

  • cell_parameters — Base cell design
  • simulation_parameters — Simulation config, optimization targets, and NSGA2 settings (see below). This is where variable_params, optimization_targets, target_weights, max_iterations, population_size, and use_pybamm_parameters actually live — there is no top-level design_targets or weights field.

Within simulation_parameters:

  • variable_params: dict[str, tuple[float, float]] (default {}) — Param name → (min, max) bounds; keys must be real cell_parameters field names. Must contain at least one parameter — an empty object is accepted on submission, but the run returns success=False with an error.
  • optimization_targets: dict[str, dict[str, Any]] — the targets to optimize (each a dict with target and conditions; see Design Target Entries below). If omitted, it defaults to all five of capacity_Ah (80 Ah), energy_Wh (260 Wh), power_W (1000 W), dcir_mOhm (1 mOhm) and cycle_life_cycles (1000 cycles), which makes each evaluation run every simulation, including cycle life, so the run takes considerably longer.
  • target_weights: dict[str, float] — Per-target weights used to rank designs (optional; any target without a weight gets 1.0)
  • max_iterations: int (default 20) — NSGA2 generations
  • population_size: int (default 10) — Population size
  • use_pybamm_parameters: str (default: "Chen2020") — PyBaMM parameter set. Supported values: "Chen2020" (default for NMC/graphite), "Prada2013" (for LFP), "custom" or an empty string (uses Chen2020 as base with custom overrides, including material OCV data), or any PyBaMM parameter set name. If any positive-electrode active material's name contains "LFP" (case-insensitive), Prada2013 is used as the base whatever this field says.
  • num_cycles: int, required (≥ 1) — must be supplied, but has no effect on the result (see Cycle Life below)
  • upper_voltage_cutoff_V / lower_voltage_cutoff_V: float, required — set the voltage cut-offs in the PyBaMM parameter set and the charge/discharge limits of the capacity calibration. The capacity, energy, DCIR, ACIR and power experiments end their steps at the cell_parameters cutoffs instead (upper_voltage_cutoff_V default 4.2 V, lower_voltage_cutoff_V default 3.0 V). The cycle-life experiment always cycles between 4.2 V and 2.0 V, whatever either pair is set to.

Cell Parameters

Structured nested input that mirrors the Cell Performance model's cell_parameters schema. Nested under cell_parameters in the top-level input.

Electrode Configuration (required)

Unknown fields are rejected.

Field Type Description
positive_electrode_mass_loading_mg_cm2 float Positive mass loading [mg/cm²]
negative_electrode_mass_loading_mg_cm2 float Negative mass loading [mg/cm²]
positive_electrode_sheet_count int Positive sheet count
negative_electrode_sheet_count int Negative sheet count
jelly_roll_count int Number of jelly rolls (default: 1)
electrode_coating_side_count int Number of coating sides (default: 2)
positive_electrode_specific_heat_capacity_J_kg_K float Positive electrode specific heat capacity [J/kg/K]
negative_electrode_specific_heat_capacity_J_kg_K float Negative electrode specific heat capacity [J/kg/K]
positive_electrode_thermal_conductivity_W_m_K float Positive electrode thermal conductivity [W/m/K]
negative_electrode_thermal_conductivity_W_m_K float Negative electrode thermal conductivity [W/m/K]
positive_electrode_electronic_conductivity_S_m float Positive electrode electronic conductivity [S/m]
negative_electrode_electronic_conductivity_S_m float Negative electrode electronic conductivity [S/m]
positive_coating_thickness_um float Positive electrode coating thickness [µm]
negative_coating_thickness_um float Negative electrode coating thickness [µm]
positive_electrode_active_materials list of objects Positive formulation: each item needs name, mass_fraction, density_g_cm3, specific_capacity_mAh_g, nominal_voltage_V
negative_electrode_active_materials list of objects Negative formulation (same shape as above)
positive_electrode_binders list of objects Each item needs name, mass_fraction, density_g_cm3
negative_electrode_binders list of objects Each item needs name, mass_fraction, density_g_cm3
positive_electrode_conductive_agents list of objects Each item needs name, mass_fraction, density_g_cm3
negative_electrode_conductive_agents list of objects Optional — defaults to [] (only positive-side conductive agents are required)

Formulation constraint: for each electrode, sum(active_materials.mass_fraction) + sum(binders.mass_fraction) + sum(conductive_agents.mass_fraction) must equal 1.0 (tolerance 1e-6). This isn't checked when the request is submitted: when the job starts, a formulation that doesn't sum to 1 makes the job fail with the error message.

Dimensions

Field Type Description
form_factor string "Pouch", "Prismatic", "Cylindrical", or "Coin" (default: "Pouch")
cell_width_mm float or None Cell width or diameter for cylindrical [mm]
cell_height_mm float or None Cell height [mm]
cell_thickness_mm float or None Cell thickness [mm] (for pouch/prismatic)
cell_diameter_mm float or None Cell diameter [mm] (for cylindrical/coin)

Electrode Dimensions (Optional)

Field Type Description
positive_electrode_width_mm float or None Positive electrode width [mm]. If provided, used directly for area calculation instead of deriving from cell dimensions. Also used for negative electrode if negative-specific dimensions not provided. If None, calculated from electrode area (square root of area).
positive_electrode_height_mm float or None Positive electrode height [mm]. If provided, used directly for area calculation instead of deriving from cell dimensions. Also used for negative electrode if negative-specific dimensions not provided. If None, calculated from electrode area (square root of area).
negative_electrode_width_mm float or None Negative electrode width [mm]. If provided, used directly for area calculation. If not provided, positive electrode width is used.
negative_electrode_height_mm float or None Negative electrode height [mm]. If provided, used directly for area calculation. If not provided, positive electrode height is used.

Note: When electrode-specific dimensions are not provided, PyBaMM parameter building calculates electrode width/height from the electrode area (using sqrt(area)), matching the Cell Performance model. This ensures consistent PyBaMM parameter generation across models.

Separator Dimensions (Optional)

Field Type Description
separator_sheet_count float or None Separator sheet count. If not provided, calculated as pos_count + neg_count + 1
separator_sheet_width_mm float or None Separator sheet width [mm]. If not provided, uses positive electrode width + overhang
separator_sheet_height_mm float or None Separator sheet height [mm]. If not provided, uses positive electrode height + overhang

Separator dimension derivation logic:

  • If both separator_sheet_width_mm and separator_sheet_height_mm are provided, they are used directly.
  • Otherwise, separator dimensions are derived from positive electrode dimensions plus overhang (4 × electrode_overhang_mm total, accounting for 2 × overhang per side).
  • For cylindrical cells, separator area approximates positive electrode area.

Simulation Parameters

Nested under simulation_parameters in the top-level input.

OCV Model Configuration

Parameter Type Default Description
positive_electrode_ocv_model str "interpolant" OCV model for positive electrode: "polynomial", "interpolant", or "msmr"
negative_electrode_ocv_model str "interpolant" OCV model for negative electrode: "polynomial", "interpolant", or "msmr"

These fields, and the per-material OCV data (soc_pct, ch_ocv_V, dch_ocv_V on an active material, at least two points), apply only when use_pybamm_parameters is "custom" or an empty string and the active material carries OCV data. With a named parameter set, including the default "Chen2020", the parameter set's own OCP curves are used and the OCV model fields and material OCV data are ignored. On the same path, when several materials of one electrode carry OCV data, their curves are combined into one blended OCP weighted by each material's capacity, and every one of them must set max_lithium_conc_mol_m3, or the run fails. When exactly one material of an electrode carries OCV data, its max_lithium_conc_mol_m3 (if set) becomes that electrode's maximum concentration in PyBaMM.

There is no ..._ocv_polynomial_degree or ..._ocv_msmr_n_sites input field on this model.

OCV Model Options:

  • "interpolant" (default): PCHIP interpolation of the tabulated OCV data.
  • "polynomial": Polynomial fit to OCV data. The degree is chosen from the start of the material name: LFP / LFMP = 18, LTO = 16, LMO = 14, NMC / NCA = 10, Graphite = 12, and 12 for any other name. A blended electrode uses the highest degree among its materials.
  • "msmr": Not usable on this model. MSMR needs a site count, which this model never supplies, so selecting "msmr" on the path above fails the run with msmr_n_sites is required for ocp_mode='msmr'.

Calibration, Temperature and Solver Settings

Parameter Default Description
skip_capacity_calibration false When true, the one-time capacity calibration is skipped and every design uses the uncalibrated electrode width
calibration_rate_C 0.05 C-rate (relative to the theoretical capacity) of the calibration charge/discharge
first_cycle_coulombic_loss_pct 5.0 First-cycle coulombic loss used for initial electrode balancing [%]
mesh_resolution {"x_n": 10, "x_s": 10, "x_p": 10, "r_n": 10, "r_p": 10} PyBaMM mesh points for the calibration simulation
ambient_temperature_K 298.15 Ambient temperature [K]; also the temperature of the capacity and energy simulations when their target omits temperature_K
initial_cell_temperature_K null Initial cell temperature [K]; falls back to ambient_temperature_K
reference_cell_temperature_K 298.15 PyBaMM reference temperature [K]
cell_contact_resistance_Ohm null Contact resistance [Ohm]. Falls back to cell_parameters.cell_contact_resistance_Ohm, then to 1e-4 Ohm. The older contact_resistance_Ohm field is forwarded here when it is set explicitly and this field is not.
solver_atol / solver_rtol 1e-4 / 1e-4 Solver tolerances for the calibration and the performance simulations (the cycle-life simulation uses 1e-3 / 1e-3)

Inputs With No Effect

perform_rpt, rpt_dcir and rpt_power are accepted but have no effect in this model. The same applies to num_cycles, data_sampling_period_s, start_soc_pct, cell_thermal_expansion_coefficient_m_K, anode_potential_safety_threshold_V and temperature_safety_threshold_K. Every simulation runs the isothermal model, so enable_thermal, cell_cooling_surface_area_m2 and cell_heat_transfer_coefficient_W_m2_K have no effect either, nor do the thermal properties in cell_parameters: positive_electrode_specific_heat_capacity_J_kg_K, negative_electrode_specific_heat_capacity_J_kg_K, positive_electrode_thermal_conductivity_W_m_K, negative_electrode_thermal_conductivity_W_m_K, the matching ..._foil_specific_heat_capacity_J_kg_K and ..._foil_thermal_conductivity_W_m_K fields, separator_specific_heat_capacity_J_kg_K and separator_thermal_conductivity_W_m_K. The cycle-life simulation runs without degradation sub-models, so the ageing toggles (enable_sei, enable_swelling, enable_particle_cracking, enable_lam) and the SEI, particle-mechanics, cracking and LAM parameters have no effect.

Design Target Entries

Each entry in simulation_parameters.optimization_targets is a plain object of numbers and strings. Only c_rate (must be a positive finite number) and direction (must be "charge" or "discharge") are checked, when the job starts rather than when the request is submitted: an invalid value makes the job fail with the error message. Other keys are read as-is when the design is evaluated. Condition keys left out fall back to the defaults in brackets.

Key Target / Conditions
capacity_Ah target [Ah], c_rate [1.0], temperature_K [ambient_temperature_K]
energy_Wh target [Wh], c_rate [1.0], temperature_K [ambient_temperature_K]
power_W target [W], direction ["discharge"], pulse_duration_s [10.0], soc_pct [50], temperature_K [298.15]
dcir_mOhm target [mOhm], c_rate [1.0], direction ["discharge"], pulse_duration_s [10.0], soc_pct [50], temperature_K [298.15]
acir_mOhm target [mOhm], c_rate [1.0], direction ["discharge"], soc_pct [50], temperature_K [298.15] — 1 s pulse, resistance taken at 0.1 s
cycle_life_cycles target [cycles], charge_c_rate [1.0], discharge_c_rate [1.0], temperature_K [298.15], target_soh_pct [80]
positive_electrode_porosity, negative_electrode_porosity, positive_electrode_density_g_cm3, negative_electrode_density_g_cm3 target only — taken from the equilibrium calculation, with no PyBaMM simulation

For power_W, the target value is also the power applied during the pulse: the simulation discharges (or charges) at the target power for pulse_duration_s.

Warning: power_W and cycle_life_cycles targets do not produce usable results.

  • power_W: the achieved power is read at the end of the 600 s rest that follows the pulse, when the current is zero, so every design reports 0.0 W. The target can never be met, and the run ends with success=False whenever power_W is a target.
  • cycle_life_cycles: the cycle-life simulation runs with no degradation, so it measures no capacity loss and every design typically reports the 1000-cycle fallback. The value does not reflect the design's cycle life.

Leave both targets out of optimization_targets. The default optimization_targets (used when the field is omitted) includes both, so set the targets explicitly.

Cycle Life

The cycle-life estimate does not simulate num_cycles cycles. It runs three charge/discharge cycles at charge_c_rate / discharge_c_rate between 4.2 V and 2.0 V, compares the last cycle's discharge capacity with the first, and extrapolates the per-cycle capacity loss linearly to target_soh_pct:

  • If the state of health after the three cycles is already at or below target_soh_pct, the result is the number of cycles simulated (3).
  • Otherwise the extrapolated cycle count is reported, with a floor of 100 cycles; if no capacity loss is measured, the result is 1000 cycles.
  • If the solver fails or fewer than two cycles complete, the result is 100 cycles; if the capacities cannot be read from the solution, it is 1000 cycles.

Output Schema

Output

  • success: True if optimization completed and best design error ≤ 2%
  • summary:
    • target_kpis: Target values per targeted KPI (same keys as optimization_targets, e.g. capacity_Ah, energy_Wh, power_W, dcir_mOhm, acir_mOhm, cycle_life_cycles)
    • optimizing_params: Per-param {lower, upper, init}
    • best_design: {kpis, optimized_params} — kpis use unitized keys
    • pareto_front: List of {kpis, optimized_params} — the top max(population_size, 10) designs by weighted error (sum of each target's relative error times its weight) across all evaluated designs (not only NSGA2's final population, and not a strict Pareto-optimal set), sorted best-first
    • error: Max (unweighted) relative error across targets for the best design (0–1)
  • num_evaluated: Number of successful evaluations
  • error: Error message when success=False (e.g. exceeding 2% threshold, all evaluations failing, or an NSGA2 exception message)
  • traceback: Always null

Pass/Fail Logic

  • success=True when NSGA2 completes, at least one design evaluated successfully, and summary.error ≤ 0.02 (2%)
  • success=False when:
    • NSGA2 raises an exception
    • Every design evaluation fails (num_evaluated=0)
    • Best design's max relative error across targets exceeds 2%
    • The run raises an error before or outside the design loop (for example while building the base PyBaMM parameters); error carries the message

Invalid inputs, such as an out-of-range c_rate, an unknown direction or mass fractions that don't sum to 1, don't produce a success=False result: the job fails when it starts and reports the error message.

Example Parameters (Seed)

The seeded default uses an 80 Ah pouch baseline with a single capacity_Ah target. Variables: positive_electrode_mass_loading_mg_cm2, positive_electrode_sheet_count.

{
  "cell_parameters": {
    "positive_electrode_mass_loading_mg_cm2": 25.126,
    "negative_electrode_mass_loading_mg_cm2": 18.0,
    "positive_electrode_sheet_count": 18,
    "negative_electrode_sheet_count": 19,
    "jelly_roll_count": 1,
    "electrode_coating_side_count": 2,
    "form_factor": "Pouch",
    "cell_width_mm": 535.0,
    "cell_height_mm": 98.0,
    "cell_thickness_mm": 9.012,
    "positive_electrode_width_mm": 503.546,
    "positive_electrode_height_mm": 88.971,
    "positive_coating_thickness_um": 87.3,
    "negative_coating_thickness_um": 115.3,
    "positive_electrode_active_materials": [
      {
        "name": "NMC811_Generic_v1",
        "mass_fraction": 0.89,
        "density_g_cm3": 4.8,
        "specific_capacity_mAh_g": 200.0,
        "nominal_voltage_V": 3.77
      }
    ],
    "negative_electrode_active_materials": [
      {
        "name": "Graphite_Generic_v1",
        "mass_fraction": 0.91,
        "density_g_cm3": 2.26,
        "specific_capacity_mAh_g": 365.0,
        "nominal_voltage_V": 0.1
      }
    ],
    "positive_electrode_binders": [
      {
        "name": "PVDF_Generic_v1",
        "mass_fraction": 0.055,
        "density_g_cm3": 1.78
      }
    ],
    "negative_electrode_binders": [
      {
        "name": "CMC_Generic_v1",
        "mass_fraction": 0.045,
        "density_g_cm3": 1.6
      },
      {
        "name": "SBR_Generic_v1",
        "mass_fraction": 0.045,
        "density_g_cm3": 0.94
      }
    ],
    "positive_electrode_conductive_agents": [
      {
        "name": "CarbonBlack_Generic_v1",
        "mass_fraction": 0.055,
        "density_g_cm3": 1.9
      }
    ],
    "negative_electrode_conductive_agents": [],
    "positive_electrode_specific_heat_capacity_J_kg_K": 1000.0,
    "negative_electrode_specific_heat_capacity_J_kg_K": 1000.0,
    "positive_electrode_thermal_conductivity_W_m_K": 1.0,
    "negative_electrode_thermal_conductivity_W_m_K": 1.0,
    "positive_electrode_electronic_conductivity_S_m": 1000000.0,
    "negative_electrode_electronic_conductivity_S_m": 1000000.0,
    "positive_electrode_foil_thickness_um": 14.0,
    "negative_electrode_foil_thickness_um": 12.0,
    "positive_electrode_foil_density_g_cm3": 2.7,
    "negative_electrode_foil_density_g_cm3": 8.96,
    "positive_electrode_foil_electronic_conductivity_S_m": 37700000.0,
    "negative_electrode_foil_electronic_conductivity_S_m": 59600000.0,
    "positive_electrode_foil_specific_heat_capacity_J_kg_K": 897.0,
    "negative_electrode_foil_specific_heat_capacity_J_kg_K": 385.0,
    "positive_electrode_foil_thermal_conductivity_W_m_K": 237.0,
    "negative_electrode_foil_thermal_conductivity_W_m_K": 401.0,
    "separator_thickness_um": 18.0,
    "separator_porosity": 0.4,
    "separator_density_g_cm3": 0.95,
    "separator_specific_heat_capacity_J_kg_K": 1978.0,
    "separator_thermal_conductivity_W_m_K": 0.16,
    "upper_voltage_cutoff_V": 4.2,
    "lower_voltage_cutoff_V": 2.8
  },
  "simulation_parameters": {
    "optimization_targets": {
      "capacity_Ah": {
        "target": 80.0,
        "c_rate": 1.0,
        "temperature_K": 298.15
      }
    },
    "target_weights": {
      "capacity_Ah": 1.0
    },
    "variable_params": {
      "positive_electrode_mass_loading_mg_cm2": [20.0, 35.0],
      "positive_electrode_sheet_count": [14, 24]
    },
    "max_iterations": 5,
    "population_size": 8,
    "num_cycles": 10,
    "upper_voltage_cutoff_V": 4.2,
    "lower_voltage_cutoff_V": 2.8,
    "use_pybamm_parameters": "Chen2020"
  }
}

Notes on this payload: the active material, binder and conductive agent lists are required for both electrodes (the negative electrode's conductive agents may be empty, and default to []), and each electrode's mass fractions must sum to 1 (tolerance 1e-6) — here 0.89 + 0.055 + 0.055 for the positive and 0.91 + 0.045 + 0.045 for the negative electrode. variable_params lives under simulation_parameters, not at the top level: the top level only has cell_parameters and simulation_parameters, so a top-level variable_params key is silently ignored and the run fails with "variable_params must contain at least one parameter to optimize". num_cycles is required, but has no effect.


← Back to Models