The capacity of electrical distribution systems of hosting photo-voltaic (PV) generation is limited due to the requirements of distribution system operators (DSOs) to respect statutory voltage levels along feeders and not exceed line current limits. Traditional ways to perform voltage regulation in distribution systems are on- load tap changers, voltage series regulators, and coordinated control of the reactive power set-points of PV converters, that however is ineffective in low voltage distribution systems due to the large R/X ratio of the longitudinal parameters of lines. The problem of line current congestions is normally tackled by curtailing PV generation, a practice that is however inefficient because it decreases the capacity factor of PV plants. Thanks to their decreasing cost, battery energy storage systems are gaining of interest as they can provide both voltage control and congestion management, avoiding the use of multiple countermeasures among those listed above. Distributed battery energy storage systems for grid control could be owned and operated by distribution system operators directly, and become a new safeguarding asset for grids. The battery fleet and control infrastructure can be designed to meet industrial-grade operational standards for control accuracy, reliability, and maintenance. This feature would not be possible with behind-the-meter PV self-consumption equipment installed by end customers (which can also relieve grid congestions by promoting the consumption of locally generated electricity) because this asset would not belong to the operator. In this report, we describe a method to plan the deployment of grid-connected batteries in distribution systems with the objective of accommodating a target level of PV generation capacity. The method deter- mines the location, energy capacity and power rating of the batteries with the minimum capital costs such that their injections can restore suitable nodal voltages and line currents in the network. The method is tractable thanks to leveraging an exact convex formulation of the optimal power flow problem and a convex battery model that includes the notion of charging/discharging efficiency. We apply the method to a low voltage (LV) and medium voltage (MV) distribution network, modeled according to the specifications of the CIGRE’s benchmark systems. The analysis is carried out for different levels of installed distributed PV generation capacity, from zero up to 3 times the generation hosting capacity of the grid. Uniform clear-sky conditions are considered as they are conducive to the largest yield from distributed PV generation. In the considered case studies, it is shown that for very large values of PV penetration levels (i.e., twice the PV hosting capacity), the total power rating of the deployed battery systems grows in a 1-to-1 ratio with the installed PV capacity. For less extreme values of installed PV capacity, the growth is generally smaller. The total energy capacity of batteries grows faster than for the power rating due to the typical peak production patterns of PV generation, that typically occur in the middle of the day and last for several hours. In particular, once the injection from a PV plant determines an over-current or over-voltage, it needs to be postponed and stored until it persists (e.g., hours), thus determining large energy capacity requirements. Using distributed battery storage to Research supported by the ”joint activities on scenarios and modelling” program of the Swiss competence center on energy research (SCCER-JASM) 1 mitigate grid congestions caused by distributed PV generation is an energy-intensive application that can be coupled with power-intensive applications, like primary frequency regulation, by leveraging algorithms for the provision of multiple ancillary services.