Stray-current corrosion from DC-electrified railways drives premature failure of buried metallic infrastructure (pipelines, foundations, tunnel reinforcement), causing resource waste, repair-driven carbon emissions and service disruptions that undermine the sustainability of urban transit corridors. Conventional impressed-current cathodic protection (ICCP) design relies on uniform-anode rules of thumb or closed commercial codes that cannot quantify the trade-off between protection uniformity, energy use and hardware cost. We present an open MATLAB framework that couples a custom 3D finite element method (FEM) solver with multi-objective particle swarm optimisation (MOPSO) and minimises three competing objectives simultaneously: total impressed current, RMS deviation from the protection target, and number of active anodes. A laboratory-calibrated coupling factor (CF=1.98, consistent with the image-method prediction of 2 for a highly conductive pipe inclusion) absorbs the pipe–soil interface kinetics into a single direct FEM solve, and a pre-computed Green’s-function basis accelerates each MOPSO evaluation by more than two orders of magnitude. The solver is validated against an instrumented prototype with RMSE =14.9 mV across ten Cu/CuSO4 saturated reference electrode (CSE) measurements, and applied to a 500 m DC traction line. At an identical total current of 20.30 A across five anodes, the optimised design achieves an RMSE of 86.6 mV against the −850 mV NACE target, whereas a conventional uniform layout produces severe over-protection (RMSE =1107 mV)—a twelve-fold reduction. The framework is recommended as a transparent, reproducible engineering tool that simultaneously extends pipeline service life and reduces rectifier energy demand, supporting UN Sustainable Development Goals 9 and 11 for sustainable urban-rail infrastructure.
Aussawamaykin et al. (Sun,) studied this question.