Improving the lithium-ion diffusion and electrical conductivity of LiFePO4 cathode material by doping magnesium and multi-walled carbon nanotubes