• Optimization of the size of a smart grid integrated thermal storage system. • Implementation of a lumped parameter model based on historical measured data series. • Maximization of the overnight energy production through sensible heat thermal storage. • Investment profitability in terms of CO 2 reduction, share of energy from cogeneration, economics. The Smart Polygeneration Microgrid (SPM) at the Savona Campus of the University of Genoa consists of several renewable and traditional electrical and thermal generating units integrated with electric batteries; buildings and facilities are connected by an electrical grid and a district heating network. Thermal and electrical power flows are managed by a proper Energy Management System (EMS) which includes models for all the SPM components ensuring operational costs minimization in compliance with networks constraints. The present study focuses on the integration of a thermal energy storage (TS) system in the SPM: to this aim, a new thermal storage model based on a stepped two-zone approach has been built inside the dynamic EMS solver. The TS is conceived for recovering additional heat from two 65kW el cogenerative gas turbines (CGT), thus minimizing the operation time of the backup gas heaters (GH): the analysis is aimed at inferring the best TS size in terms of different key parameters, expressed through properly defined economic and energy criteria, including overall energy consumption, reduced greenhouse emissions, minimum payback period. The model is applied to energy demand data (heat and electricity) as measured at 15 min time steps along 2 years. The present dynamic analysis shows that an optimized size TS based on sensible heat can increase the CGT operation hours up to 34% yearly and reduce the equivalent CO 2 emissions by 4%.