-
Stability analysis of nonlinear stochastic flexibility function in smart energy systems
Authors:
Seyed Shahabaldin Tohidi,
Tobias K. S. Ritschel,
Georgios Tsaousoglou,
Uffe Høgsbro Thygesen,
Henrik Madsen
Abstract:
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…
▽ More
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 map** 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.
△ Less
Submitted 23 May, 2024;
originally announced May 2024.
-
An algorithm for distributed time delay identification based on a mixed Erlang kernel approximation and the linear chain trick
Authors:
Tobias K. S. Ritschel,
John Wyller
Abstract:
Time delays are ubiquitous in industry and nature, and they significantly affect both transient dynamics and stability properties. Consequently, it is often necessary to identify and account for the delays when, e.g., designing a model-based control strategy. However, identifying delays in differential equations is not straightforward and requires specialized methods. Therefore, we propose an algo…
▽ More
Time delays are ubiquitous in industry and nature, and they significantly affect both transient dynamics and stability properties. Consequently, it is often necessary to identify and account for the delays when, e.g., designing a model-based control strategy. However, identifying delays in differential equations is not straightforward and requires specialized methods. Therefore, we propose an algorithm for identifying distributed delays in delay differential equations (DDEs) that only involves simulation of ordinary differential equations (ODEs). Specifically, we 1) approximate the kernel in the DDEs (also called the memory function) by the probability density function of a mixed Erlang distribution and 2) use the linear chain trick (LCT) to transform the resulting DDEs into ODEs. Finally, the parameters in the kernel approximation are estimated as the solution to a dynamical least-squares problem, and we use a single-shooting approach to approximate this solution. We demonstrate the efficacy of the algorithm using numerical examples that involve the logistic equation and a point reactor kinetics model of a molten salt nuclear fission reactor.
△ Less
Submitted 12 May, 2024;
originally announced May 2024.
-
Adaptive flexibility function in smart energy systems: A linearized price-demand map** approach
Authors:
Seyed Shahabaldin Tohidi,
Henrik Madsen,
Georgios Tsaousoglou,
Tobias K. S. Ritschel
Abstract:
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 guarant…
▽ More
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.
△ Less
Submitted 15 February, 2024; v1 submitted 6 December, 2023;
originally announced December 2023.
-
Mathematical meal models for simulation of human metabolism
Authors:
Tobias K. S. Ritschel,
Asbjørn Thode Reenberg,
Peter Emil Carstensen,
Jacob Bendsen,
John Bagterp Jørgensen
Abstract:
We present and critically discuss five commonly used mathematical models of the meal glucose rate of appearance in humans. Such models are key to simulation of the metabolism in healthy people, people with diabetes, and obese people, and they are central to develo** effective treatments and prevention strategies. Furthermore, we discuss important aspects of systematic mathematical modeling of hu…
▽ More
We present and critically discuss five commonly used mathematical models of the meal glucose rate of appearance in humans. Such models are key to simulation of the metabolism in healthy people, people with diabetes, and obese people, and they are central to develo** effective treatments and prevention strategies. Furthermore, we discuss important aspects of systematic mathematical modeling of human metabolism, including meal consumption modeling, stoichiometry and reaction kinetics, and general-purpose model components.
△ Less
Submitted 31 July, 2023;
originally announced July 2023.
-
Quantitative modeling and simulation of biochemical processes in the human body
Authors:
Jacob Bendsen,
Peter Emil Carstensen,
Asbjørn Thode Reenberg,
Tobias K. S. Ritschel,
John Bagterp Jørgensen
Abstract:
We present a whole-body model of human metabolism that utilizes a system of organs and blood vessels to simulate the enzymatic reactions. The model focuses on key organs, including the brain, heart and lungs, liver, gut, and kidney, as well as muscle and adipose tissue. The model equations are formulated using stoichiometry and Michaelis-Menten kinetics to describe the enzymatic reactions. We demo…
▽ More
We present a whole-body model of human metabolism that utilizes a system of organs and blood vessels to simulate the enzymatic reactions. The model focuses on key organs, including the brain, heart and lungs, liver, gut, and kidney, as well as muscle and adipose tissue. The model equations are formulated using stoichiometry and Michaelis-Menten kinetics to describe the enzymatic reactions. We demonstrate how the model can be used to simulate the effects of prolonged fasting and intermittent fasting on selected metabolite concentrations and glucose flux. Furthermore, by simulating intermittent fasting the effect on the carbohydrate, the protein and the lipid storage is examined. We propose this method as a simple and intuitive approach for modeling the human metabolism, which is general, systematic and easy to incorporate. This could have potential applications in PK/PD drug development and in understanding metabolic disorders.
△ Less
Submitted 30 July, 2023;
originally announced July 2023.
-
A Newton-like Method based on Model Reduction Techniques for Implicit Numerical Methods
Authors:
Tobias K. S. Ritschel
Abstract:
In this paper, we present a Newton-like method based on model reduction techniques, which can be used in implicit numerical methods for approximating the solution to ordinary differential equations. In each iteration, the Newton-like method solves a reduced order linear system in order to compute the Newton step. This reduced system is derived using a projection matrix, obtained using proper ortho…
▽ More
In this paper, we present a Newton-like method based on model reduction techniques, which can be used in implicit numerical methods for approximating the solution to ordinary differential equations. In each iteration, the Newton-like method solves a reduced order linear system in order to compute the Newton step. This reduced system is derived using a projection matrix, obtained using proper orthogonal decomposition, which is updated in each time step of the numerical method. We demonstrate that the method can be used together with Euler's implicit method to simulate CO$_2$ injection into an oil reservoir, and we compare with using Newton's method. The Newton-like method achieves a speedup of between 39% and 84% for systems with between 4,800 and 52,800 state variables.
△ Less
Submitted 13 March, 2023;
originally announced March 2023.
-
Software principles and concepts applied in the implementation of cyber-physical systems for real-time advanced process control
Authors:
Anders H. D. Andersen,
Zhanhao Zhang,
Steen Hørsholt,
Tobias K. S. Ritschel,
John Bagterp Jørgensen
Abstract:
Cyber-physical systems (CPSs) for real-time advanced process control (RT-APC) are a class of control systems using network communication to control industrial processes. In this paper, we use simple examples to describe the software principles and concepts used in the implementation of such systems. The key software principles are 1) shared data in the form of a database, files, or shared memory,…
▽ More
Cyber-physical systems (CPSs) for real-time advanced process control (RT-APC) are a class of control systems using network communication to control industrial processes. In this paper, we use simple examples to describe the software principles and concepts used in the implementation of such systems. The key software principles are 1) shared data in the form of a database, files, or shared memory, 2) timers and threads for concurrent periodic execution of tasks, and 3) network communication between the control system and the process, and communication between the control system and the internet, e.g., the cloud to enable remote monitoring and commands. We show how to implement such systems for Linux operating systems applying the C programming language and we also comment on the implementation using the Python programming language. Finally, we present a complete simulation experiment using a real-time simulator.
△ Less
Submitted 5 July, 2023; v1 submitted 27 February, 2023;
originally announced February 2023.
-
Modeling, scientific computing and optimal control for renewable energy systems with storage
Authors:
Nicola Cantisani,
Tobias K. S. Ritschel,
Christian A. Thilker,
Henrik Madsen,
John Bagterp Jørgensen
Abstract:
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 mo…
▽ More
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.
△ Less
Submitted 17 December, 2022;
originally announced December 2022.
-
Model-based control algorithms for the quadruple tank system: An experimental comparison
Authors:
Anders H. D. Andersen,
Tobias K. S. Ritschel,
Steen Hørsholt,
Jakob Kjøbsted Huusom,
John Bagterp Jørgensen
Abstract:
We compare the performance of proportional-integral-derivative (PID) control, linear model predictive control (LMPC), and nonlinear model predictive control (NMPC) for a physical setup of the quadruple tank system (QTS). We estimate the parameters in a continuous-discrete time stochastic nonlinear model for the QTS using a prediction-error-method based on the measured process data and a maximum li…
▽ More
We compare the performance of proportional-integral-derivative (PID) control, linear model predictive control (LMPC), and nonlinear model predictive control (NMPC) for a physical setup of the quadruple tank system (QTS). We estimate the parameters in a continuous-discrete time stochastic nonlinear model for the QTS using a prediction-error-method based on the measured process data and a maximum likelihood (ML) criterion. In the NMPC algorithm, we use this identified continuous-discrete time stochastic nonlinear model. The LMPC algorithm is based on a linearization of this nonlinear model. We tune the PID controller using Skogestad's IMC tuning rules using a transfer function representation of the linearized model. Norms of the observed tracking errors and the rate of change of the manipulated variables are used to compare the performance of the control algorithms. The LMPC and NMPC perform better than the PID controller for a predefined time-varying setpoint trajectory. The LMPC and NMPC algorithms have similar performance.
△ Less
Submitted 9 December, 2022;
originally announced December 2022.
-
State Estimation for Continuous-Discrete-Time Nonlinear Stochastic Systems
Authors:
Marcus Krogh Nielsen,
Tobias K. S. Ritschel,
Ib Christensen,
Jess Dragheim,
Jakob Kjøbsted Huusom,
Krist V. Gernaey,
John Bagterp Jørgensen
Abstract:
State estimation incorporates the feedback in optimization based advanced process control systems and is very important for the performance of model predictive control. We describe the extended Kalman filter, the unscented Kalman filter, the ensemble Kalman filter, and a particle filter for continuous-discrete time nonlinear systems involving stochastic differential equations. Continuous-discrete…
▽ More
State estimation incorporates the feedback in optimization based advanced process control systems and is very important for the performance of model predictive control. We describe the extended Kalman filter, the unscented Kalman filter, the ensemble Kalman filter, and a particle filter for continuous-discrete time nonlinear systems involving stochastic differential equations. Continuous-discrete time nonlinear systems is a natural way to model physical systems controlled by digital controllers. We implement the state estimation methods in Matlab, illustrate and evaluate their performance using simulations of the modified four-tank system. This system is non-stiff and the state estimation methods are implemented numerically using an explicit numerical integration scheme. We evaluate the accuracy of the state estimation methods in terms of the mean absolute percentage error over the simulation horizon. Each method successfully estimates the states and unmeasured disturbances of the simulated modified four-tank system. The key contribution is an overview and comparison of state estimation methods for continuous-discrete time nonlinear stochastic systems. This can guide efficient implementations.
△ Less
Submitted 5 December, 2022;
originally announced December 2022.
-
Estimating a Personalized Basal Insulin Dose from Short-Term Closed-Loop Data in Type 2 Diabetes
Authors:
Sarah Ellinor Engell,
Tinna Björk Aradóttir,
Tobias K. S. Ritschel,
Henrik Bengtsson,
John Bagterp Jørgensen
Abstract:
In type 2 diabetes (T2D) treatment, finding a safe and effective basal insulin dose is a challenge. The dose-response is highly individual and to ensure safety, people with T2D titrate by slowly increasing the daily insulin dose to meet treatment targets. This titration can take months. To ease and accelerate the process, we use short-term artificial pancreas (AP) treatment tailored for initial ti…
▽ More
In type 2 diabetes (T2D) treatment, finding a safe and effective basal insulin dose is a challenge. The dose-response is highly individual and to ensure safety, people with T2D titrate by slowly increasing the daily insulin dose to meet treatment targets. This titration can take months. To ease and accelerate the process, we use short-term artificial pancreas (AP) treatment tailored for initial titration and apply it as a diagnostic tool. Specifically, we present a method to automatically estimate a personalized daily dose of basal insulin from closed-loop data collected with an AP. Based on AP-data from a stochastic simulation model, we employ the continuous-discrete extended Kalman filter and a maximum likelihood approach to estimate parameters in a simple dose-response model for 100 virtual people. With the identified model, we compute a daily dose of basal insulin to meet treatment targets for each individual. We test the personalized dose and evaluate the treatment outcomes against clinical reference values. In the tested simulation setup, the proposed method is feasible. However, more extensive tests will reveal whether it can be deemed safe for clinical implementation.
△ Less
Submitted 25 November, 2022;
originally announced November 2022.
-
State Estimation Methods for Continuous-Discrete Nonlinear Systems involving Stochastic Differential Equations
Authors:
Marcus Krogh Nielsen,
Tobias K. S. Ritschel,
Ib Christensen,
Jess Dragheim,
Jakob Kjøbsted Huusom,
Krist V. Gernaey,
John Bagterp Jørgensen
Abstract:
In this work, we present methods for state estimation in continuous-discrete nonlinear systems involving stochastic differential equations. We present the extended Kalman filter, the unscented Kalman filter, the ensemble Kalman filter, and a particle filter. We implement the state estimation methods in Matlab. We evaluate the performance of the methods on a simulation of the modified four-tank sys…
▽ More
In this work, we present methods for state estimation in continuous-discrete nonlinear systems involving stochastic differential equations. We present the extended Kalman filter, the unscented Kalman filter, the ensemble Kalman filter, and a particle filter. We implement the state estimation methods in Matlab. We evaluate the performance of the methods on a simulation of the modified four-tank system. We implement the state estimation methods for non-stiff systems, i.e., using an explicit numerical integration scheme. The implementation of the extended Kalman filter utilises the Joseph stabilising form for numerical stability. We evaluate the accuracy of the state estimation methods in terms of the mean absolute percentage error over the simulation horizon. We show that each method successfully estimates the states and unmeasured disturbances of the simulated modified four-tank system. Finally, we present conclusions.
△ Less
Submitted 5 May, 2022;
originally announced May 2022.
-
Large-scale Virtual Clinical Trials of Closed-loop Treatments for People with Type 1 Diabetes
Authors:
Tobias K. S. Ritschel,
Asbjørn Thode Reenberg,
John Bagterp Jørgensen
Abstract:
We propose a virtual clinical trial for assessing the safety and efficacy of closed-loop diabetes treatments prior to an actual clinical trial. Such virtual trials enable rapid and risk-free pretrial testing of algorithms, and they can be used to compare different treatment variations for large and diverse populations. The participants are represented by multiple mathematical models, consisting of…
▽ More
We propose a virtual clinical trial for assessing the safety and efficacy of closed-loop diabetes treatments prior to an actual clinical trial. Such virtual trials enable rapid and risk-free pretrial testing of algorithms, and they can be used to compare different treatment variations for large and diverse populations. The participants are represented by multiple mathematical models, consisting of stochastic differential equations, and we use Monte Carlo closed-loop simulations to compute detailed statistics of the closed-loop treatments. We implement the virtual clinical trial using high-performance software and hardware, and we present an example trial with two mathematical models of one~million participants over 52~weeks (i.e., two~million simulations), which can be completed in 2~h 9~min.
△ Less
Submitted 3 May, 2022;
originally announced May 2022.
-
Nonlinear Model Predictive Control and System Identification for a Dual-hormone Artificial Pancreas
Authors:
Asbjørn Thode Reenberg,
Tobias K. S. Ritschel,
Emilie B. Lindkvist,
Christian Laugesen,
Jannet Svensson,
Ajenthen G. Ranjan,
Kirsten Nørgaard,
John Bagterp Jørgensen
Abstract:
In this work, we present a switching nonlinear model predictive control (NMPC) algorithm for a dual-hormone artificial pancreas (AP), and we use maximum likelihood estimation (MLE) to identify model parameters. A dual-hormone AP consists of a continuous glucose monitor (CGM), a control algorithm, an insulin pump, and a glucagon pump. The AP is designed with a heuristic to switch between insulin an…
▽ More
In this work, we present a switching nonlinear model predictive control (NMPC) algorithm for a dual-hormone artificial pancreas (AP), and we use maximum likelihood estimation (MLE) to identify model parameters. A dual-hormone AP consists of a continuous glucose monitor (CGM), a control algorithm, an insulin pump, and a glucagon pump. The AP is designed with a heuristic to switch between insulin and glucagon as well as state-dependent constraints. We extend an existing glucoregulatory model with glucagon and exercise for simulation, and we use a simpler model for control. We test the AP (NMPC and MLE) using in silico numerical simulations on 50 virtual people with type 1 diabetes. The system is identified for each virtual person based on data generated with the simulation model. The simulations show a mean of 89.3% time in range (3.9-10 mmol/L) and no hypoglycemic events.
△ Less
Submitted 28 February, 2022;
originally announced February 2022.
-
High-performance Uncertainty Quantification in Large-scale Virtual Clinical Trials of Closed-loop Diabetes Treatment
Authors:
Asbjørn Thode Reenberg,
Tobias K. S. Ritschel,
Bernd Dammann,
John Bagterp Jørgensen
Abstract:
In this paper, we propose a virtual clinical trial for assessing the performance and identifying risks in closed-loop diabetes treatments. Virtual clinical trials enable fast and risk-free tests of many treatment variations for large populations of fictive patients (represented by mathematical models). We use closed-loop Monte Carlo simulation, implemented in high-performance software and hardware…
▽ More
In this paper, we propose a virtual clinical trial for assessing the performance and identifying risks in closed-loop diabetes treatments. Virtual clinical trials enable fast and risk-free tests of many treatment variations for large populations of fictive patients (represented by mathematical models). We use closed-loop Monte Carlo simulation, implemented in high-performance software and hardware, to quantify the uncertainty in treatment performance as well as to compare the performance in different scenarios or of different closed-loop treatments. Our software can be used for testing a wide variety of control strategies ranging from heuristical approaches to nonlinear model predictive control. We present an example of a virtual clinical trial with one million patients over 52 weeks, and we use high-performance software and hardware to conduct the virtual trial in 1 h and 22 min.
△ Less
Submitted 28 February, 2022;
originally announced February 2022.
-
A one-size-fits-all artificial pancreas for people with type 1 diabetes based on physiological insight and feedback control
Authors:
Tobias K. S. Ritschel,
Asbjørn Thode Reenberg,
Emilie B. Lindkvist,
Christian Laugesen,
Jannet Svensson,
Ajenthen G. Ranjan,
Kirsten Nørgaard,
Bernd Dammann,
John Bagterp Jørgensen
Abstract:
We propose a model-free artificial pancreas (AP) for people with type 1 diabetes. The algorithmic parameters are tuned to a virtual population of 1,000,000 individuals, and the AP repeatedly estimates the basal and bolus insulin requirements necessary for maintaining normal blood glucose levels. Therefore, the AP can be used without healthcare personnel or engineers customizing the algorithm to ea…
▽ More
We propose a model-free artificial pancreas (AP) for people with type 1 diabetes. The algorithmic parameters are tuned to a virtual population of 1,000,000 individuals, and the AP repeatedly estimates the basal and bolus insulin requirements necessary for maintaining normal blood glucose levels. Therefore, the AP can be used without healthcare personnel or engineers customizing the algorithm to each user. The estimates are based on bodyweight, measurements from a continuous glucose monitor (CGM), and estimates of the meal carbohydrate contents. In a virtual clinical trial with all 1,000,000 individuals (i.e., a Monte Carlo closed-loop simulation), the AP achieves a mean time in range of more than 87% and almost 89% of the participants satisfy several glycemic targets.
△ Less
Submitted 27 February, 2022;
originally announced February 2022.
-
Nonlinear model reduction of dynamical power grid models using quadratization and balanced truncation
Authors:
Tobias K. S. Ritschel,
Frances Weiß,
Manuel Baumann,
Sara Grundel
Abstract:
In this work, we present a nonlinear model reduction approach for reducing two commonly used nonlinear dynamical models of power grids: the effective network (EN) model and the synchronous motor (SM) model. Such models are essential in real-time security assessments of power grids. However, as power grids are often large-scale, it is necessary to reduce the models in order to utilize them in real-…
▽ More
In this work, we present a nonlinear model reduction approach for reducing two commonly used nonlinear dynamical models of power grids: the effective network (EN) model and the synchronous motor (SM) model. Such models are essential in real-time security assessments of power grids. However, as power grids are often large-scale, it is necessary to reduce the models in order to utilize them in real-time. We reformulate the nonlinear power grid models as quadratic systems and reduce them using balanced truncation based on approximations of the reachability and observability Gramians. Finally, we present examples involving numerical simulation of reduced EN and SM models of the IEEE 57 bus and IEEE 118 bus systems.
△ Less
Submitted 26 May, 2020;
originally announced May 2020.