The aim of this research project is to propose and validate effective forecasting and optimal control algorithms to ensure efficient and secure operation of low voltage distribution grids, as well as flexibility provision from distribution grids to the upstream medium/high voltage grids, under uncertainties. In this respect, a two-levels rolling optimization framework to ensure optimal (most economic) and secure operation of distribution grids under uncertainties will be developed and experimentally validated. The first level (prescheduling optimization) deals with prescheduling of controllable resources in a time ahead basis (day ahead or few hours ahead basis), whereas the second level (online optimization) deals with real time online scheduling of all the controllable resources. Moreover, an appropriate forecasting system will be developed to provide day-ahead and near real-time forecast of uncertain parameters, in accordance with the optimization framework. Finally, we will validate the proposed methodology and demonstrate its effectiveness under realistic uncertainty sources (e.g., PV power generation), stochastic consumption, and distribution grid contingences (e.g., unplanned outage of grid components) for a low voltage distribution grid.