In France, most of the trains are electrical and some are fed by 1500V DC voltage. When a train is travelling, the power consumption creates a voltage drop. Therefore, below a certain limit, the train has to slow down its speed. This limitation prevents the increase of traffic in some area which needs an electric reinforcement. This paper proposes to use embedded storage systems to support the voltage of the catenary. The main issue is: how to size such an energy storage system? In this way, several aspects (e.g.: the energy management strategy) have to be taken into account. The paper deals with an optimization-based sizing method for the embedded energy storage systems. The proposed method takes into account the energy management strategy in the sizing by optimization. A comparison is made between the use of batteries or supercapacitors.