About me

Start scrolling to learn a bit about me and my current activities.

icon


I live in Lugano and I’m currently a reseacher at both University of Applied Sciences and Arts of Southern Switzerland, SUPSI and at Hive Power, which I co-founded. I graduated at PoliMi in 2014 in Energy Engineering, with a thesis on CFD. I received my Ph.D. at the École Polytechnique Fédérale de Lausanne, EPFL, with the thesis Model based forecasting for demand response strategies.


Publications

My current research activities focus on the energy sector field, spanning from demand side management to load and production forecasting.

Machine Learning and Forecasting

Distributed Control

Demand Side Management and Energy

For an exhaustive lis of my publications, please refer to scholar

Code

2020 Multivariate Boosted TRee

MBTR is a python package for multivariate boosted tree regressors trained in parameter space. The code is described in the accompaning paper L. Nespoli, V. Medici 2020. The package can handle arbitrary multivariate losses, as long as their gradient and Hessian are known. Gradient boosted trees are competition-winning, general-purpose, non-parametric regressors, which exploit sequential model fitting and gradient descent to minimize a specific loss function. The most popular implementations are tailored to univariate regression and classification tasks, precluding the possibility of capturing multivariate target cross-correlations and applying conditional penalties to the predictions. This package allows to arbitrarily regularize the predictions, so that properties like smoothness, consistency and functional relations can be enforced. The python code is available here.

drawing

2019 Scenario reduction for stochastic control

Code for optimal scenario tree reduction for multivariate data. The code reduces a set of scenarios (obtained from sampling a multivariate distribution, or from historical data) to a scenario tree, in which each node has an associate probability, such as at each point in time, the sum of the probabilities in all the branches of the tree is equal to 1. The algorithm implemented is based on the one described in N. Gröwe-Kuska et al. 2003, which rely on a greedy strategy to optimally reduce the scenarios, based on the Kantorovich distance. The code, available here, is implemented both in Matlab and in Python. The python verision also includes the retrieval of the graph representation of the scenrio tree. The graph is encoded in a networkx graph object.

drawing drawing

2017 Global Horizontal Irradiance Estimator

This code estimates the global horizontal irradiance (GHI) from the power measurements of one or more photovoltaic (PV) systems located in the same neighborhood, as described in the accompaning paper L. Nespoli, V. Medici 2017. The method is completely unsupervised and is based on a physical model of a PV plant. It can estimate the nominal power and orientation of multiple PV fields, using only the aggregated power signal from their PV power plant. Moreover, if more than one PV power plant is available, the different signals are reconciled using outliers detection and assessing shading patterns for each PV plant. The matlab code is available here.

drawing

Teaching

Smart Grid course 2021

Here you can find some of the lessons from the SUPSI’s Smart Grid introductory course I’ve written in 2021, as professor assitant. The lessons are sef-contained interactive colab notebooks, and can be accessed through the folloing links.

Posts

subscribe via RSS