The problem
Fast charging is limited by heating, by voltage limits and, especially at low temperature or high SOC, by lithium plating on the anode, which causes fast ageing and safety risk. Standard CC-CV charging is simple but conservative in some regions and aggressive in others. Optimising the current profile against a model of these limits can shorten charge time without raising degradation risk, which is a central question in EV battery research.
Objectives
- Build a coupled electrical, thermal and anode-potential model of a lithium-ion cell.
- Formulate the charging problem with time, temperature, voltage and plating constraints.
- Solve it with direct numerical optimisation and compare with CC-CV and multistage CC.
- Study how optimal profiles change with ambient temperature and cooling.
- Assess sensitivity of the optimised profile to model parameter errors.
What you need
Tools and toolboxes
- MATLAB — Cell model as ODE functions, simulation with ode15s and result analysis.
- Optimization Toolbox — fmincon for the direct-transcription optimal-control problem with non-linear constraints.
- Simulink — Closed-loop validation of the optimised profile and baseline chargers on a separate plant model, with logging.
- Simscape Battery — Optional: a table-based battery plant with thermal port for checking profiles at module level.
Software
- MATLAB R2023b or later
- Optimization Toolbox
- Simulink
- Simscape Battery (optional)
Extra parts and data
- Published cell parameter set and test data, for example from a public dataset such as NASA PCoE or CALCE, or a peer-reviewed parameterisation — The single-particle and thermal model parameters must come from a real cell for the anode-potential constraint to mean anything.
Key concepts
- Lithium plating
- When the anode surface potential falls below zero volts against lithium, lithium metal can deposit instead of intercalating. It is most likely at high current, low temperature and high SOC.
- Single particle model with electrolyte (SPMe)
- A reduced electrochemical model representing each electrode as one spherical particle plus electrolyte dynamics. It estimates anode surface concentration and potential, which an equivalent circuit cannot.
- Direct transcription
- The continuous control problem is discretised in time so current at each interval becomes a decision variable, turning it into a non-linear programme that fmincon can solve.
- CC-CV charging
- Constant current until a voltage limit, then constant voltage while current tapers. It is the industry baseline and enforces only the voltage constraint directly.
Step-by-step guide
- 1
Define the problem and baselines
Choose a cell, for example a cylindrical NMC cell, and a goal such as charging from 10 to 80 per cent SOC as fast as possible. Set constraints: terminal voltage below the maximum, cell temperature below for example 45 °C, and anode surface potential above a safety margin above zero volts. Define baselines: CC-CV at several C-rates and a published-style multistage CC profile. Fix ambient cases, for example 10, 25 and 40 °C, and a cooling coefficient.
Checkpoint: A formal problem statement with objective, constraints, baselines and test conditions.
- 2
Implement the electrochemical model
Implement an SPMe in MATLAB using a finite-difference or polynomial approximation for solid-phase diffusion in each particle, Butler–Volmer kinetics and an electrolyte concentration approximation. Compute terminal voltage and anode surface overpotential. Take parameters from the chosen published parameterisation. Solve with ode15s and verify that a 1C discharge gives a sensible voltage curve and capacity. Use a parameter set from one source rather than mixing sources.
Checkpoint: Simulated 1C discharge capacity and voltage curve within a stated tolerance of the reference data.
- 3
Add the thermal model and coupling
Add a lumped thermal state with heat from ohmic, reaction and entropic terms and convection to ambient. Make diffusion and kinetic parameters temperature dependent with Arrhenius factors. Check the coupled model against a reference temperature rise during a constant-current charge if data is available, or against a simple energy calculation otherwise. Check that temperature dependence does not cause the solver to fail at the coldest ambient case before moving on.
Checkpoint: Temperature rise during a 1C charge is plausible and the anode potential falls as expected with higher current and lower temperature.
- 4
Evaluate the baselines
Simulate CC-CV at, for example, 1C, 2C and 3C and the multistage profile at each ambient. Record charge time to 80 per cent, peak temperature, minimum anode potential and time spent below the plating margin. This shows which baselines violate the plating limit, typically high-rate CC at low temperature. Use the same starting SOC, temperature and cooling for every case, and treat the baseline that meets all constraints in the shortest time as the reference the optimiser must beat.
Checkpoint: A baseline table with charge time and constraint margins at each ambient, with violations highlighted.
- 5
Formulate the optimisation
Discretise time into intervals, for example 60 intervals with free final time or a fixed grid with a time-minimising objective, and make current in each interval a decision variable. Simulate the model inside the objective and constraint functions, or use multiple shooting for robustness. Express voltage, temperature and anode potential limits as non-linear inequality constraints for fmincon with the sqp or interior-point algorithm.
Checkpoint: fmincon converges from a CC initial guess with all constraints satisfied, and the exit flag is reported.
- 6
Solve and interpret the optimal profiles
Solve for each ambient case. Plot current, voltage, temperature and anode potential. Interpret the shape: typically high current at low SOC where plating risk is small, then a taper as anode potential approaches its margin, with different shapes at different temperatures. Check that the solution is not stuck in a poor local optimum by starting from several initial guesses. Report solver time per problem.
Checkpoint: Optimised profiles for each ambient, with active constraints identified and consistent results from different initial guesses.
- 7
Validate in closed loop
Implement the optimised profile as a lookup against SOC or time in Simulink and run it on a plant with slightly different parameters, for example a Simscape Battery table-based cell or the SPMe with perturbed parameters. Compare with baselines on the same plant. This checks whether the margin built into the constraints is enough when the model is not exact.
Checkpoint: Optimised profiles reduce charge time versus the safe baselines on the validation plant without plating margin violations, or the violations are reported and explained.
- 8
Sensitivity and robustness
Perturb key parameters such as diffusion coefficient, reaction rate and heat-transfer coefficient by plausible amounts and re-evaluate the fixed optimised profile. Measure how quickly constraint violations appear. Then re-optimise with a tighter margin and show the trade-off between robustness and charge time. Use a Monte Carlo set of parameter samples and report the fraction that violate each constraint. Explain which parameter errors are most dangerous for plating, since these determine where extra margin is needed.
Checkpoint: A plot of charge time against plating margin with violation rates under parameter uncertainty.
- 9
Effect of cooling and ambient
Re-solve the problem for different cooling coefficients and ambient temperatures, and show how much charge time improves with better cooling or with pre-heating the battery before charging at low ambient. Link this to thermal-management design: at low temperature, warming is often more valuable than higher current. Model pre-heating as a starting-temperature change with its energy cost counted, so the comparison with faster charging includes the heater energy. Present results as a table and a short design guideline.
Checkpoint: A table of optimal charge time against ambient and cooling with the dominant constraint identified for each.
- 10
Report
Present the model and its validation, the problem formulation, optimal profiles, closed-loop validation, robustness analysis and design implications. State the limitations: plating is inferred from a model, no long-term ageing test is included and one chemistry is studied. Avoid claiming lifetime benefits without ageing data; state them as hypotheses for experimental work. Include the parameter source, discretisation and solver settings so the optimisation can be repeated.
Checkpoint: A thesis chapter with reproducible optimisation scripts and conclusions limited to what the simulation supports.
Testing & validation
- Electrochemical model voltage and capacity against reference data.
- Baseline charge time and constraint margins.
- Optimisation convergence and consistency from several initial guesses.
- Closed-loop validation on a perturbed plant.
- Robustness of optimised profiles to parameter uncertainty.
Expected results
Optimised fast-charge current profiles that respect temperature, voltage and plating constraints, compared quantitatively with CC-CV and multistage charging, with robustness margins and cooling implications.
Research angle for your PhD
Research questions: how much faster can a cell charge from 10 to 80 per cent under temperature and plating constraints than with safe CC-CV, how does this change with ambient and cooling, and what margin keeps the profile safe under realistic parameter error? Metrics: charge time, minimum anode potential, peak temperature and violation rate under uncertainty. Baselines: CC-CV and multistage CC. Validation: closed-loop tests on a perturbed plant and comparison with public data. Results that include robustness margins and Indian ambient conditions, and an honest separation of model-based claims from ageing claims, are suitable for publication.
Take it further
- Include an SEI growth model and optimise a combined time and ageing objective.
- Implement the constraint-aware charger as MPC with an online state estimator.
- Extend to a module with cell-to-cell variation in temperature and capacity.
- Compare with published experimental fast-charge ageing results for the same chemistry.
Viva and review questions
Why can't an equivalent-circuit model enforce the plating limit?
An equivalent circuit predicts only terminal voltage; plating depends on the anode surface potential, which needs an electrochemical model that tracks surface concentration.
Why is plating more likely at low temperature?
Diffusion and reaction kinetics slow down, so lithium accumulates at the anode surface and its potential falls more for the same current.
Why start fmincon from several initial guesses?
The problem is non-convex and may have local optima, so consistent results from different starting points give confidence in the solution.
Learn it at DIYguru
These DIYguru courses and programmes teach what this project needs.
