Battery energy storage systems (BESSs) are expected to play a major role in the power grid of the near future. These devices, capable of storing and returning electrical energy, are valuable assets to a grid that integrates more and more distributed, intermittent and renewable generation. Compared to renewable energy sources, however, battery storage systems are still in an early stage of deployment and the way to exploit them in an optimal way is still subject of research. In this respect, this thesis develops two lines of investigation to reach an optimal utilisation of these devices. In its first part, the thesis proposes a control framework to operate a utility-scale BESS connected to a distribution feeder. This control framework allows to provide a set of services: dispatch of the operation of such feeder, load levelling, frequency response. It is structured in a period-ahead and a real-time phase. The former plans the BESS operation for a given time horizon through the solution of optimization problems. These take into account the BESS state of energy as well as forecast scenarios of quantities such as the feeder prosumption and of the BESS energy needs due to the frequency response service. The real-time phase determines the BESS power injections a resolution as fast as 1 second and, in the case of the dispatch, relies on model predictive control. Moreover, the thesis proposes the formulation of a framework for the simultaneous deployment of multiple services. The objective of this is to maximise the BESS exploitation in the presence of uncertainty. All the proposed methods are validated experimentally, on the 560 kWh/720 kVA BESS installed on EPFL campus. This extensive validation demonstrates their effectiveness and deployability. In its second part, the thesis discusses the integration of electrochemical models in the control of BESSs. Such models, compared to more conventional equivalent circuits or empirical ones, can provide deeper insight in the processes occurring within Li-ion cells - the founding elements of BESSs - and by consequence a more effective operation of BESSs. The thesis proposes a method to identify the parameters of one of such models - the single particle model - and, again, validates it experimentally. Moreover, in its final chapter, the thesis provides a proof-of-concept by simulations of the advantages of the integration of electrochemical models in the control framework proposed in its first part and, in general, in BESS control.