Optimised operation of storage systems integrated with MV photovoltaic plants, considering the impact on the battery lifetime