SearcharxivSearch

arXiv subjects

Henrik Madsen

Publications and source records attributed to Henrik Madsen.

At least 19 recordsLinked to original sources

Online forecast reconciliation using linear models

We present a framework for online and adaptive forecasting and hierarchical reconciliation using linear regression models. We begin by formalizing hierarchies using graphs, and motivated by their structure, formulate a multivariate linear model using the matrix normal distribution to characterize residuals. Parameter estimation is posed as a ridge regression problem and applied to hierarchical forecast reconciliation. The connections between ridge regression, Bayesian estimation and shrinkage for hierarchical reconciliation are discussed, and results for uncertainty quantification in parameters and forecasts are provided. Based on the ridge regression formulation, a recursive inference scheme inspired by recursive least squares is described. The algorithm is implemented in the PyOnlineForecast package. Finally, the proposed methodology is demonstrated on a case study for district heating load forecasting using a temporal hierarchy. Our results provide a reference for implementation of forecast reconciliation via multivariate linear models in an online setting. The case study furthermore highlights practical considerations of using temporal hierarchies in an online setting and demonstrates the usefulness of the proposed framework and implementation, both for district heating load forecasting and more generally for online hierarchical forecasting.

stat.ME

Scaling Demand-Side Flexibility Through Dynamic Tariffs

The ongoing electrification and integration of renewable energy sources in Denmark's distribution grids pose significant operational challenges, including insufficient reserve capacity, component degradation due to overload, voltage instability, and increasing infrastructure investment requirements. This article argues that implicit demand-side flexibility (DSF) incentivized through dynamic tariffs offers the most scalable and cost-effective approach to address these challenges in a modern distribution network. We demonstrate that while explicit flexibility mechanisms provide operational certainty, they cannot scale to address system-wide congestion across heterogeneous customer bases. Drawing on empirical consumption data showing strong price-responsive behavior, varying prices due to, e.g., regulatory frameworks including the Danish Market Model 3.0 and Tariff Model 3.0, and economic analysis, we demonstrate potential grid savings of 13--48 million DKK per constrained substation through deferred or avoided reinforcement. We argue that implicit DSF mechanisms represent the necessary pathway for revenue-neutral scalable flexibility solutions that can defer costly grid reinforcements while maintaining system reliability. Beyond direct grid savings, additional value streams include avoided peak generation costs, reduced connection delays, and lower outage risk, further strengthening the economic case. Critically, dynamic tariffs offer the mechanism through which real-time grid constraints can be communicated to consumers, enabling price signals that accurately reflect the actual state of the capacity of the distribution network at any given point in time and space.

stat.AP

Cross-Atlantic Research Agenda for Scalable Grid Architectures and Distributed Flexibility

Electric power systems are rapidly evolving into deeply digital, cyber-physical infrastructures in which large fleets of distributed energy resources must be coordinated as system-level flexibility across multiple spatial and temporal scales. Despite growing distributed energy resource deployment, existing grid and market architectures lack scalable, interoperable mechanisms to reliably translate device-level flexibility into grid-aware services, creating risks to reliability, affordability, and resilience at high penetration. We propose that scalable and reliable coordination of distributed energy resource-based flexibility in future power systems is fundamentally an architectural problem that can be addressed through laminar cyber-physical design using minimal, standardized interoperability interfaces that link device autonomy with system-level objectives. To assess this claim, we present and discuss a layered cyber-physical systems architecture and explicate its implementation through standards-based interfaces, Flexibility Functions, hierarchical control, and case studies spanning U.S. and Danish regulatory, market, and operational contexts. Empirical evidence from New York's Grid of the Future proceedings, Danish Smart Energy Operating System pilots, and operational aggregator deployments demonstrates that such architecture enables predictable, grid-aware flexibility while preserving device autonomy, interoperability, reliability, and quality of service. These results support a cross-Atlantic research agenda centered on joint testbeds, harmonized interoperability mechanisms, and coordinated policy experiments to accelerate the deployment of resilient, scalable, and flexible clean energy systems.

eess.SY

evalprob4cast: An R-package for evaluation of ensembles as probabilistic forecasts or event forecasts

For any forecasting application, evaluation of forecasts is an important task. For example, in the field of renewable energy sources there is high variability and uncertainty of power production, which makes forecasting and the evaluation hereof crucial both for power trading and power grid balancing. In particular, probabilistic forecasts represented by ensembles are popular due to their ability to cover the full range of scenarios that can occur, thus enabling forecast users to make more informed decisions than what would be possible with simple deterministic forecasts. The selection of open source software that supports evaluation of ensemble forecasts, and especially event detection, is currently limited. As a solution, evalprob4cast is a new R-package for probabilistic forecast evaluation that aims to provide its users with all the tools needed for the assessment of ensemble forecasts, in the form of metrics and visualization methods. Both univariate and multivariate probabilistic forecasts as well as event detection are covered. Furthermore, it offers a user-friendly design where all of the evaluation methods can be applied in a fast and easy way, as long as the input data is organized in accordance with the format defined by the package. While its development is motivated by forecasting of renewables, the package can be used for any application with ensemble forecasts.

stat.AP

Estimation of Building Energy Demand Characteristics using Bayesian Statistics and Energy Signature Models

This work presents a scalable Bayesian modeling framework for evaluating building energy performance using smart-meter data from 2,788 Danish single-family homes. The framework leverages Bayesian statistical inference integrated with Energy Signature (ES) models to characterize thermal performance in buildings. This approach quantifies key parameters such as the Heat Loss Coefficient (HLC), solar gain, and wind infiltration, while providing full posterior distributions to reflect parameter uncertainty. Three model variants are developed: a baseline ES model, an auto-regressive model (ARX-ES) to account for thermal inertia, and an auto-regressive moving average model (ARMAX-ES) that approximates stochastic gray-box dynamics. Results show that model complexity improves one-step-ahead predictive performance, with the ARMAX-ES model achieving a median Bayesian R^2 of 0.94 across the building stock. At the single-building level, the Bayesian approach yields credible intervals for yearly energy demand within $\pm1\%$, enabling more robust diagnostics than deterministic methods. Beyond improved accuracy, the Bayesian framework enhances decision-making by explicitly representing uncertainty in building performance parameters. This provides a more realistic foundation for investment prioritization, demand forecasting, and long-term energy planning. The method is readily applicable to other building typologies or geographies, offering a scalable tool for data-driven energy management under uncertainty.

stat.AP

Sequential Methods for Error Correction of Probabilistic Wind Power Forecasts

Reliable probabilistic production forecasts are required to better manage the uncertainty that the rapid build-out of wind power capacity adds to future energy systems. In this article, we consider sequential methods to correct errors in wind power production forecast ensembles derived from numerical weather predictions. We propose combining neural networks with time-adaptive quantile regression to enhance the accuracy of wind power forecasts. We refer to this approach as Neural Adaptive Basis for (time-adaptive) Quantile Regression or NABQR. First, we use NABQR to correct power production ensembles with neural networks. We find that Long Short-Term Memory networks are the most effective architecture for this purpose. Second, we apply time-adaptive quantile regression to the corrected ensembles to obtain optimal median predictions along with quantiles of the forecast distribution. With the suggested method, we beat state-of-the-art methods and achieve accuracy improvements up to 40% in mean absolute terms in an application to day-ahead forecasting of on- and offshore wind power production in Denmark. In addition, we explore the value of our method for applications in energy trading. We have implemented the NABQR method as an open-source Python package to support applications in renewable energy forecasting and future research.

stat.ME

A Lightweight Energy Management Method for Hybrid PV/Battery/Load Systems

In this paper, a computationally lightweight algorithm is introduced for hybrid PV/Battery/Load systems that is price responsive, responds fast, does not require powerful hardware, and considers the operational limitations of the system. The method is applied to two buildings equipped with PV and battery. Simulation results show that the method can give results that are up to 3.9% more expensive than the Model predictive control (MPC) approach while the runtime of the program is up to 1000 times less than the MPC. Also, while the runtime of the proposed method is in the range of the self-consumption maximization (SCM) approach as the fastest method, its electricity cost is about 3.2% cheaper than the SCM method. Simulation results also show that in case of providing grid services by the battery the difference between electricity cost of the proposed approach and MPC can reduce which makes the method good for such applications.

eess.SY

nabqr: Python package for improving probabilistic forecasts

We introduce the open-source Python package NABQR: Neural Adaptive Basis for (time-adaptive) Quantile Regression that provides reliable probabilistic forecasts. NABQR corrects ensembles (scenarios) with LSTM networks and then applies time-adaptive quantile regression to the corrected ensembles to obtain improved and more reliable forecasts. With the suggested package, accuracy improvements of up to 40% in mean absolute terms can be achieved in day-ahead forecasting of onshore and offshore wind power production in Denmark.

cs.LG

Exploring reinforcement learning for incident response in autonomous military vehicles

Unmanned vehicles able to conduct advanced operations without human intervention are being developed at a fast pace for many purposes. Not surprisingly, they are also expected to significantly change how military operations can be conducted. To leverage the potential of this new technology in a physically and logically contested environment, security risks are to be assessed and managed accordingly. Research on this topic points to autonomous cyber defence as one of the capabilities that may be needed to accelerate the adoption of these vehicles for military purposes. Here, we pursue this line of investigation by exploring reinforcement learning to train an agent that can autonomously respond to cyber attacks on unmanned vehicles in the context of a military operation. We first developed a simple simulation environment to quickly prototype and test some proof-of-concept agents for an initial evaluation. This agent was then applied to a more realistic simulation environment and finally deployed on an actual unmanned ground vehicle for even more realism. A key contribution of our work is demonstrating that reinforcement learning is a viable approach to train an agent that can be used for autonomous cyber defence on a real unmanned ground vehicle, even when trained in a simple simulation environment.

cs.CR

Optimal price signal generation for demand-side energy management

Renewable Energy Sources play a key role in smart energy systems. To achieve 100% renewable energy, utilizing the flexibility potential on the demand side becomes the cost-efficient option to balance the grid. However, it is not trivial to exploit these available capacities and flexibility options profitably. The amount of available flexibility is a complex and time-varying function of the price signal and weather forecasts. In this work, we use a Flexibility Function to represent the relationship between the price signal and the demand and investigate optimization problems for the price signal computation. Consequently, this study considers the higher and lower levels in the hierarchy from the markets to appliances, households, and districts. This paper investigates optimal price generation via the Flexibility Function and studies its employment in controller design for demand-side management, its capability to provide ancillary services for balancing throughout the Smart Energy Operating System, and its effect on the physical level performance. Sequential and simultaneous approaches for computing the price signal, along with various cost functions are analyzed and compared. Simulation results demonstrate the generated price/penalty signal and its employment in a model predictive controller.

eess.SY

Stability analysis of nonlinear stochastic flexibility function in smart energy systems

Demand-side management provides a great potential for improving the efficiency and reliability of energy systems. This requires a mechanism to connect the market level and the demand side. The flexibility function is a novel approach that bridges the gap between the markets and the dynamics of physical assets at the lower levels of the energy systems and activates demand-side flexibility with the purpose of decision-making as well as for offering a new framework for balancing and grid services. Employing this function as a key for many decision-making and control algorithms reveals that a mathematically rigorous stability analysis is required for it. In this paper, we investigate the stability properties of two nonlinear flexibility functions, as a dynamic mapping between electricity price and power consumption. Specifically, we analyze the stability of a deterministic flexibility function and an Itô stochastic flexibility function. Simulation results are also provided to demonstrate the dynamics of the flexibility functions and to show that the analytical results hold.

eess.SY

Adaptive flexibility function in smart energy systems: A linearized price-demand mapping approach

This paper proposes an adaptive mechanism for price signal generation using a piecewise linear approximation of a flexibility function with unknown parameters. In this adaptive approach, the price signal is parameterized and the parameters are changed adaptively such that the output of the flexibility function follows the reference demand signal provided by the involved aggregator. This is guaranteed using the Lyapunov stability theorem. The proposed method does not require an estimation algorithm for unknown parameters, that eliminates the need for persistency of excitation of signals, and consequently, simplifies offering the flexibility services. Furthermore, boundedness of the price signal is ensured using a projection algorithm in the adaptive system. We present simulation results that demonstrate the price generation results using the proposed approaches.

eess.SY

Optimal Forecast Reconciliation with Uncertainty Quantification

We propose to estimate the weight matrix used for forecast reconciliation as parameters in a general linear model in order to quantify its uncertainty. This implies that forecast reconciliation can be formulated as an orthogonal projection from the space of base-forecast errors into a coherent linear subspace. We use variance decomposition together with the Wishart distribution to derive the central estimator for the forecast-error covariance matrix. In addition, we prove that distance-reducing properties apply to the reconciled forecasts at all levels of the hierarchy as well as to the forecast-error covariance. A covariance matrix for the reconciliation weight matrix is derived, which leads to improved estimates of the forecast-error covariance matrix. We show how shrinkage can be introduced in the formulated model by imposing specific priors on the weight matrix and the forecast-error covariance matrix. The method is illustrated in a simulation study that shows consistent improvements in the log-score. Finally, standard errors for the weight matrix and the variance-separation formula are illustrated using a case study of forecasting electricity load in Sweden.

stat.ME

Nash Equilibrium of Joint Day-ahead Electricity Markets and Forward Contracts in Congested Power Systems

Uncertainty in the output power of large-scale wind power plants (WPPs) can face the electricity market players with undesirable profit variations. Market players can hedge themselves against these risks by participating in forward contracts markets alongside the day-ahead markets. The participation of market players in these two markets affects their profits and also the prices and power quantities of each market. Moreover, limitations in the transmission grid can affect the optimal behavior of market players. In this paper, a Cournot Nash equilibrium model is proposed to study the behavior of market players in the forward contract market and the day-ahead electricity market in a congested power system with large-scale integration of WPPs. The proposed method is applied to a test system, and the results are discussed.

eess.SY

Can occupant behaviors affect urban energy planning? Distributed stochastic optimization for energy communities

To meet carbon emission reduction goals in line with the Paris agreement, planning resilient and sustainable energy systems has never been more important. In the building sector, particularly, strategic urban energy planning engenders large optimization problems across multiple spatiotemporal scales leading to necessary system scope simplifications. This has resulted in disconnected system scales, namely, building occupants and smart-city energy networks. This paper intends on bridging these disjointed scales to secure both resilient and more energy-efficient urban planning thanks to a holistic approach. The intent is to assess the aggregated impact of user behavior stochasticities on optimal urban energy planning. To this end, a stochastic energy community sizing and operation problem is designed, encompassing multi-level utilities founded on energy hub concepts for improved energy and carbon emission efficiencies. To secure the scalability of our approach, an organic spatial problem distribution suitable for field deployment is put forth, validated by a proof of concept. Uncertainty factors affecting urban energy planning are particularly examined through a local sensitivity analysis, namely, economic, climate, and occupant-behavior uncertainties. Founded on historical measurements a typical Dutch energy community composed of 41 residential buildings is designed. Results disclose a fast-converging distributed stochastic problem, where boilers are showcased as the preferred heating utility, and distributed renewable energy and storage systems were identified as unprofitable for the community. Occupant behavior was particularly exposed as the leading uncertainty factor impacting energy community planning. This demonstrates the relevance and value of our approach in connecting occupants to cities for improved, and more resilient, urban energy planning strategies.

eess.SY

Structural hierarchical learning for energy networks

Many sectors nowadays require accurate and coherent predictions across their organization to effectively operate. Otherwise, decision-makers would be planning using disparate views of the future, resulting in inconsistent decisions across their sectors. To secure coherency across hierarchies, recent research has put forward hierarchical learning, a coherency-informed hierarchical regressor leveraging the power of machine learning thanks to a custom loss function founded on optimal reconciliation methods. While promising potentials were outlined, results exhibited discordant performances in which coherency information only improved hierarchical forecasts in one setting. This work proposes to tackle these obstacles by investigating custom neural network designs inspired by the topological structures of hierarchies. Results unveil that, in a data-limited setting, structural models with fewer connections perform overall best and demonstrate the coherency information value for both accuracy and coherency forecasting performances, provided individual forecasts were generated within reasonable accuracy limits. Overall, this work expands and improves hierarchical learning methods thanks to a structurally-scaled learning mechanism extension coupled with tailored network designs, producing a resourceful, data-efficient, and information-rich learning process.

cs.LG

Hierarchical learning, forecasting coherent spatio-temporal individual and aggregated building loads

Optimal decision-making compels us to anticipate the future at different horizons. However, in many domains connecting together predictions from multiple time horizons and abstractions levels across their organization becomes all the more important, else decision-makers would be planning using separate and possibly conflicting views of the future. This notably applies to smart grid operation. To optimally manage energy flows in such systems, accurate and coherent predictions must be made across varying aggregation levels and horizons. With this work, we propose a novel multi-dimensional hierarchical forecasting method built upon structurally-informed machine-learning regressors and established hierarchical reconciliation taxonomy. A generic formulation of multi-dimensional hierarchies, reconciling spatial and temporal hierarchies under a common frame is initially defined. Next, a coherency-informed hierarchical learner is developed built upon a custom loss function leveraging optimal reconciliation methods. Coherency of the produced hierarchical forecasts is then secured using similar reconciliation technics. The outcome is a unified and coherent forecast across all examined dimensions. The method is evaluated on two different case studies to predict building electrical loads across spatial, temporal, and spatio-temporal hierarchies. Although the regressor natively profits from computationally efficient learning, results displayed disparate performances, demonstrating the value of hierarchical-coherent learning in only one setting. Yet, supported by a comprehensive result analysis, existing obstacles were clearly delineated, presenting distinct pathways for future work. Overall, the paper expands and unites traditionally disjointed hierarchical forecasting methods providing a fertile route toward a novel generation of forecasting regressors.

cs.LG

Modeling, scientific computing and optimal control for renewable energy systems with storage

This paper presents models for renewable energy systems with storage, and considers its optimal operation. We model and simulate wind and solar power production using stochastic differential equations as well as storage of the produced power using batteries, thermal storage, and water electrolysis. We formulate an economic optimal control problem, with the scope of controlling the system in the most efficient way, while satisfying the power demand from the electric grid. Deploying multiple storage systems allows flexibility and higher reliability of the renewable energy system.

math.OC