Multi-market demand response from pump-controlled open canal systems: an economic MPC approach to pump-scheduling

Participation in demand response (DR) has been explored for many large energy-using assets based on day ahead electricity markets. In this manuscript, we propose the use of multiple electricity spot markets to enable price-based DR for open canal systems in the Netherlands, where many large pumping stations are used for ﬂ ood mitigation and control of groundwater levels. In the new strategy for pump-scheduling, we combine the day ahead and intraday electricity markets to be used in a hierarchical receding horizon economic Model Predictive Control (MPC). We formulate the decision problem as a Mixed-Integer Quadratic Problem (MIQP), to be solved to near global optimality. A cost-poten-tial analysis was performed for multiple market strategies and the automatic Frequency Restoration Reserves (aFRRs), using actual market and water system data. We show new insights into the trade-off between CO 2 emissions and operating cost, the difference between the German and Dutch markets, and temporal changes in market conditions due to renewable energy integration. We observe that the German energy market is rewarding DR more than the Dutch equivalent, due to the higher renewable energy market penetration. The proposed multi-market strategy leads to a cost decrease of 10 and 16% in the Netherlands in 2017 and 2019, respectively. When applying German market scenarios, we found a cost-saving potential of 56 and 50% in 2017 and 2019, respectively. The cost-saving potential for the aFRR market was found to be up to 12% in the Netherlands and 28% in Germany, through a conservative analysis. The results suggest that the proposed control system, optimising costs over the day ahead, intraday and possibly the aFRR markets, is pro ﬁ table compared to the current strategy in both the current and


Demand response in the Netherlands
With climate change mitigation as a driving force, renewable energy sources (RES) are becoming a larger part of the energy mix (International Energy Agency 2017). The Netherlands has passed a climate-law, in which the country commits to a 49% reduction of carbon-dioxide (CO 2 ) emission by 2030 and 95% reduction by 2050 (compared to emission levels in 1990) (Ministry of Economic Affairs and Climate Policy 2019). Solar and wind energy are promising RES, and are becoming more profitable due to technological advancements. While these generating-techniques are valuable for the energy transition, they bring some new challenges. One of these challenges is that the amount of energy generated at a certain time is as residential heating, energy storage and community integrated energy systems in order to explore technical feasibility and economic potential.
In this manuscript, we propose a new pump-scheduling strategy that combines both the DAM and IDM, and consider scenarios with both the Dutch and German markets over 2 years. We analyse market data from both countries, showing the effect of renewable energy market penetration on the correlation between the carbon intensity (CI) of electricity and the DAM price (Section 2.3). Actual open-source market data for the DAM, aFRR, and German IDM markets was used, and licensed Dutch IDM data were used. The MPC formulated (Section 3.2) results in a Mixed-Integer Quadratic Programme (MIQP), which is solved to near global optimality using Gurobi (Gurobi Optimization LLC 2018), and applied in a closed-loop simulation in receding horizon fashion. The MIQP formulation results from water system constraints that indicate pump-discharge and gate-discharge possibilities, electricity market participation is formulated continuously. The proposed multi-market strategy is compared with a reference strategy, where energy use is minimised and energy is traded on the future market for a monthly fixed price. The analysis was performed for the years 2017 and 2019 to show temporal changes in market conditions. More recent data were excluded to purely explore market changes due to the increase in renewable energy integration, and to exclude effects from the pandemic or the invasion of Ukraine. Besides participation on spot markets (Section 4.2), we present an estimate of the economic potential for participating on the aFRR market, for which the potential of successful activation for downward regulation is analysed (Section 4.3).

MARKET AND BALANCING MECHANISMS
We evaluate the following mechanisms for DR purposes: the DAM, IDM future market and aFRR market. The market mechanisms will be explained in the following section. Direct participation in the aFRR market is not simulated, but its potential is explored based on a post analysis using actual aFRR activation data (Section 4.3) and MPC simulations with participation on the DAM and IDM (Section 4.2).
The German market is taken as representative for a future Dutch market. The German RES mix is similar to the planned future mix in the Netherlands (Ministerie van Economische Zaken 2016; Fraunhofer Institute for solar energy systems ISE 2019), while the countries have a similar market structure, climate and socio-economically driven electricity consumption patterns. Germany uses similar market mechanisms as the Netherlands, although the markets do differ in some rules and in volume. Alternative markets have significantly different conditions: Denmark has a relatively small market dominated by RES, the Norwegian system is dominated by hydropower generation, the French market is dominated by nuclear generation, the Belgian mix does not contain a high share of intermittent renewables and the UK market contains a relatively low degree of interconnectivity with other markets. Therefore, we deem the German market as most feasible representative for a future Dutch market.

Market mechanisms
On the DAM, energy is traded on a day-to-day basis with bids made for the following day. Consumers buy energy in hourly blocks, and have a responsibility to consume it within the period for which it is purchased. Every day at 12:00 CET, bids are collected by the market operator and the market is cleared at the price where supply meets demand. In the Netherlands, energy is traded on the Amsterdam Power Exchange (APX)-Endex, an energy-exchange.
The IDM is a continuous market where participants trade quarterly, 30-min or hourly blocks of energy throughout the day, up to 5 min before delivery. On the IDM, buy-and sell-orders are matched individually, leading to different prices for all contracts. In this manuscript, the volume-weighted price over the 3 h before delivery (ID3-price) is used. In practice, every bid would have a different price. This would result in different prices for the IDM, depending on the time of trading or even the specific party traded with. The IDM allows a user to buy and sell energy throughout the day, correcting their day ahead plan while preventing them from causing imbalance. The IDM is seen as the market containing the highest potential to trade renewable energy in the future (De Jong et al. 2017).
Both the DAM and the IDM incentivise participants to adjust energy planning for favourable prices that reflect scarcity of supply and marginal cost of production. Minimising operational cost of energy will lead to a shift in energy use when prices change; a mechanisms known as price-based DR (Jordehi 2019). Figure 1 shows the 2-Dimensional Kernel Density Estimate (KDE) of the Dutch (Figure 1(a)) and German (Figure 1(b)) DAM and IDM price over recent years. The price difference between the two markets causes change in the scheduled energy use or production. The distribution of the Dutch prices is varying more over the years than the distribution of the German prices. A possible explanation is the maturity of the markets: the German market is more mature in volume and therefore possibly more stable.
The future market is where long-term or base-load products can be traded. Energy users trade here to reduce their risks, while producers trade here to ensure future sales and decrease vulnerability to electricity price decreases (TenneT 2017). The market does not reward flexibility in energy use, since the price is fixed. Currently RWS trades on this market, buying future contracts that guarantee a base-load over a longer period of time. We will compare the current future market strategy with a multi-market strategy, where energy is bought on both the DAM and IDM.
The proposed strategy, multi-market optimisation over the DAM and IDM, is one of the few possibilities in the context of market-based DR. The future market does not reward flexibility by applying a fixed price for energy, leaving only the DAM and IDM as regular markets. Combining multiple markets significantly increases performance of the strategy (Schwabeneder et al. 2021), while the increase in RES causes a growing relevance for both the DAM and IDM.

Grid balancing mechanisms
The Dutch Transmission System Operator (TSO), TenneT, is responsible for balancing the grid. It does so by employing balancing mechanisms, like the imbalance market. Because large volumes of energy cannot yet be stored with economic efficiency, power supply and demand have to be matched continuously. Imbalance on the grid can negatively affect power quality or can eventually result in damage to the infrastructure itself. TenneT balances the grid using back-up (emergency) production capacity or asking producers to reduce production. Another option is to ask large consumers to in-or decrease consumption, which is currently being applied to greenhouses, hospitals and small industries. Demand-side balancing of the grid is mostly implemented using automated control, powered by a near-real-time feed of the imbalance and energy price (Bertoldi et al. 2016) Positive contributions to the imbalance are rewarded, while negative contributions will be penalised. This is called 'passive contribution', and the feed is freely available while BRPs act on this market automatically (European Commission 2016b). To act profitably on the imbalance market, the balancing party would want to consume as much energy as possible within 15 min. For a pumping station like the one in IJmuiden, which takes about 15 min to boot-up and then preferably keeps running for at least 1 h, participation on the the imbalance market would probably result in minimum financial gains or even losses. Therefore, imbalance should be minimised using short-term trading and flexibility in energy use.
The aFRR is a reserve capacity market used to restore the grid frequency automatically when deviations from 50 Hz occur. On this market, BRP's can bid for upward regulation or downward regulation. Bidding is done per 15-min blocks, and the BRP gets a 15-min notice before activation. This market would be feasible for a pumping station to participate in, due to the 15-min ramp-up time. The aFRR does constrain its participants to a minimum bid of 1 MW, a constraint that can be avoided by partnering with an aggregator that combines multiple small bids into larger bids. Figure 2 shows the probability of occurrence of downward activation on the aFRR market for certain downward regulating prices and activation sequence lengths. The German market shows a higher profit potential for downward regulating services. Interestingly, the data show Journal of Hydroinformatics Vol 00 No 0, 4 corrected Proof small differences over the years, indicating that the increase in renewable energy generation does not increase the demand for downward regulation through the aFRR. The IDM, which is more easily accessible to BRPs, might be providing the necessary balancing while allowing BRPs to mitigate risks of trading for disadvantageous prices.

CI of electricity on the grid
Optimising on energy costs can lead to a decrease in emitted CO 2 (McPherson & Stoll 2020) due to the correlation between sustainable energy production and energy price. Two national markets are evaluated: the Dutch and the German market. The Netherlands has a low share of RES, while the German energy mix contains a larger share. The merit-order effect, where RES with low marginal costs of electricity are activated before more polluting sources with higher marginal costs, increases the correlation between CI and energy price in the German market.
Due to incorrect European Network for Transmission System Operators in Europe (ENTSO-E) Electricity generation by source time series, a CI time series of the grid was not easily estimated. First, historic solar and wind generation time series are calculated using 'Renewables.Ninja' capacity factor time series  for both the Netherlands and Germany. The yearly installed capacities were linearly interpolated over time in order to have time series of installed capacity. The resulting renewable energy generation time series are corrected with the yearly produced renewable energy volumes by scaling the time series to match the reported yearly produced generation volumes. For every hour, the emitted carbon from renewables is calculated based on the CI of electricity produced by renewable sources (Bonou et al. 2016;Pehl et al. 2017). The total emitted carbon per year is then calculated using the load and the reported yearly averaged CI (Centraal Bureau van de Statistiek 2019; European Environment Agency 2020). The yearly emitted carbon from renewables is then calculated, and subtracted from the total emitted carbon. Consequently, the emitted carbon from non-renewable sources remains. The yearly average 'rest' CI is calculated using the previously calculated nonrenewable carbon emission, and the amount of load not supplied by renewables. The yearly averaged CI is then linearly interpolated over the intermittent dates to a 'rest' CI time series. The CI time series of all generation is consequently calculated by dividing the emitted carbon at each hour by the load.
Figure 1(c) shows the estimated CI of the two national grids plotted over the DAM prices for 2017 and 2019. For both considered markets, a correlation can be seen between the DAM price and the CI of energy. In Germany, the spread of the CI is larger than in the Netherlands. The Netherlands contains relatively efficient coal-and gas-fired power plants, while Germany still uses brown-coal plants to produce electricity to some degree (ENTSO-E 2018). Also, Germany has a larger share of renewables which at some times can even fulfill all the electricity demand, leading to a strong correlation between DAM prices and CI.

METHODS: MODELLING THE WATER SYSTEM AND DR PARTICIPATION IN THE CASE STUDY AREA
We apply the multi-market strategy to the water system of the Noordzeekanaal-Amsterdam-Rijnkanaal (NZK-ARK). The NZK-ARK is a complex open canal system, containing multiple undershot gates and a pumping station at IJmuiden to enable the discharge of water into the North Sea, whether the sea water level is high or low. The system receives water from four waterboards (local water authorities) who discharge excess rainwater into the system, which is then pumped or sluiced out to the North Sea. The NZK-ARK is also used for ship traffic, which imposes a strict lower and upper bound on the water level. These constraints prevent cargo-ships from hitting the bottom and to make sure ships can pass bridges. Figure 3 shows the water system and its incoming and outgoing fluxes.
At IJmuiden, the gates are opened at a difference in water level of 16 cm, and closed at 12 cm (Janssen 2017). This difference in pressure is needed to overcome the difference in density of fresh and salt water together with internal friction. The gate is controlled automatically and has a maximum discharge of 500 m 3 s À1 , resulting from a physical constraint to ensure stability of the bed of the gate-complex. The pumping station in IJmuiden contains six pumps, with a combined maximum power consumption of around 5 MW. The pumps can only pump up to a certain water-level difference, when the height differential is too high they will automatically shut down. Currently, pumping station IJmuiden is controlled through an MPC that minimises energy use while energy is bought on the future market. In this MPC, the prediction horizon is 24 h, and the water level is kept between À0.3 mþNAP and À0.5 mþNAP. For DAM participation, a prediction horizon of at least 36 h is necessary to submit a full bid before market closure. In this manuscript, a prediction horizon of 48 h was applied to investigate the economic potential of DR for the water system.  Table 1 contains the Q-dH (discharge-pump height), and P-dH (power-pump height) relationships for each of the six pumps. To solve a single MPC problem for the whole pumping station, we formulate a single simplified Q-dH curve by using the separate Q-dH curves for the pumping station as described in Section 3.3. We used the P-dH curves in Table 1 to formulate a single equivalent PQH-curve for the pumping station, which describes pump power consumption as function of pump discharge and pump height. The novel method we have applied to formulate the representative PQH-curve is described in Section 3.3.

Water system modelling
In the MPC's internal model, we represent the canals of the system as simple storage components: i.e. a bucket with a fixed surface area that is used to describe the relationship between storage and water level in the canals. A similar model is currently being applied in the control system of the NZK-ARK. Large depth and width cause low flow speeds to occur, resulting in negligible friction (Goedbloed 2006). The incoming fluxes are the waterboard discharge and the discharge measured in Maarssen, the outgoing fluxes are the pump-and gate-discharge into the North Sea. Delay or routing is not taken into account and is assumed negligible due to the low flow speeds taking place in the system, leading to negligible friction.
The gate-complex in IJmuiden has seven square tubes, which contract in the middle to regulate discharge. They are 5.9 m wide and the height of the 'throat' of a tube is 4.8 m above the bottom. It has a maximum discharge of 500 m 3 s À1 , imposed for the stability of the bed and structure (HKV 2016). These seven square tubes can be (partially) closed to regulate the flow. The equation describing its behaviour is (Geerse & Kuiper 2015).
with Q max [t] as the maximum discharge at time t, n the amount of tubes, a the contraction coefficient, B the width of a tube, h k the height of the center of the tube, g the gravitational constant, h i [t] the water level of the NZK at time t and h o [t] the water level of the North Sea at time t. The pumping station in IJmuiden consists of six pumps: two fixed-speed pumps, two pumps with two settings, and two variable speed pumps. The combined maximum discharge is 260 m 3 s À1 . The pumping station is modelled by simplifying it to a single pump. Pump-characteristics are combined to estimate the equivalent characteristics. Since there are 6 pumps present in the pumping station, with different properties, multiple Q-dH curves and power-curves are used to describe the station. Table 1 shows these curves for all three types of pumps present in the station. To account for the effect of the wind on the water level, wind data of the Royal Netherlands Meteorological Institute (KNMI) station in IJmuiden has been used to estimate the water-level change.
We solve the MPC problem to determine the optimal control settings for multiple gates and the pumping station at IJmuiden. The gates and pumping stations are represented using a single gate and single pump with an aggregated Q-dH and QPHrelationship.

Economic MPC formulation with multiple markets
We propose a two-stage MPC for participating in DR through the use of both the DAM and IDM. The MPC involves buying energy on the DAM for 24 h and then iteratively deciding on how to deviate from this plan based on rewards on the IDM. As such it solves two optimisation problems in a receding horizon fashion subject to physical constraints for the water system. IDM trading occurs with a shrinking horizon stretching until the next DAM bid is made. The combination of both the DAM and IDM has been shown to significantly improve performance compared to participating in a single market (Schwabeneder et al. 2021). While the other alternative, the current strategy involving the future market, does not reward flexibility in consumption. The two-stage MPC applying the multi-market strategy is compared to a reference scenario without DR, where energy use is minimised and energy is purchased for a fixed price on the future market. Two objective functions belong to the proposed multi-market strategies, where an objective function is formulated for both the day ahead planning and the intraday trading phase. A third objective function is applied in the reference strategy without DR. For the DAM planning, an indication of the hourly prices of the next day is needed. In this research, we have assumed perfect knowledge, where we minimise costs based on the observed prices to estimate economic potential for DR participation. In future work we will include probabilistic forecasts of the DAM and IDM price, for example by generating price scenarios and apply tree-based MPC (Maestre et al. 2013). The economic objective function for DAM bidding is where and P[t] is the pumping power in kW, Dt the timestep size in seconds, g c is used to convert kWs to MWh, c da is the DAM price in [€/MWh], t is the timestep index, N is the prediction horizon length in number of timesteps, a p , b p , c p are the fitted parameters for the pump power-curve, dh w and h ns stand for the increment of water level at the gates and pumps due to wind effects and the water level of the North Sea, respectively. The IDM allows for extra flexibility since the market allows trading up to 5 min before consumption. This makes the IDM a valuable addition to the DAM, since unforeseen external disturbances on the water system could be made up for or exploited by trading the energy surpluses or deficits during the day. We used the ID3 IDM price, which is the volume-weighted price of a certain delivery hour in a 3-h window preceding delivery. The economic objective function used for IDM trading is |fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl ffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl ffl} day ahead bid preparation , where E plan [t] the energy bought on the DAM for time t, c id the IDM price, t d the timestep at which the next DAM bid starts. The first term allows for IDM trading, where deviations from the DAM bid are allowed at IDM prices for the time a DAM bid has been made (until t d ). The second term prepares the next DAM bid (starting at t d ) where costs are minimised based on DAM prices for the remaining length of the prediction horizon (N). We compare the proposed multi-market strategy with a reference strategy where energy is bought on the future market for a monthly fixed price. In the reference strategy, the objective is to minimise energy use of pumping, resembling the current strategy employed by RWS. The objective function for the reference scenario is: energy use minimisation (6) with P[t], Dt, N and g c as defined above.

Water system constraints
There are various safety and performance constraints (e.g. water level and discharge limits) that need to be dealt with explicitly by the model predictive controller. Although the lower bound on water level is a strict constraint for transport purposes, it may be tolerable to marginally violate the upper bound for small time periods. Therefore, the upper bound of the water-level constraint was relaxed with a slack variable, and a penalty for exceeding the upper bound was introduced in the objective function. This was done to improve robustness of the computational model, so the problem would not become infeasible in high-water situations but rather the small violations could be analysed a posteriori. The lower and upper water-level bound constraints are reformulated as: where the discretised slack variable s[t] represents the constraint violations on the maximum water height h max at timestep t.
The upper bound relaxation is implemented as a lazy constraint, meaning it is only active when a constraint violation on the un-relaxed upper-bound occurs. The penalty function: Sums up the discrete slack variables (i.e. bound violations per timestep), which automatically minimises the time and magnitude of constraint violations. This is added to the economic cost in the MPC optimisation problem in Equations (4)-(6). The constant g s was chosen a posteriori to be sufficiently high, in order to prevent compromises between energy costs and constraint violation.
The water level associated with a given storage is calculated using a mass balance: the difference in water level is equal to the net flux that leaves or enters the body, divided by the surface area of the wetted water body. Because water is assumed in-compressible, a mass balance can be expressed in terms of volume.
where h[t] is the water level of the NZK-ARK at time t in m þ NAP, Dt the timestep size in seconds, A nzk the surface area of the NZK-ARK in m 2 , Q in [t] the incoming discharge of the ARK (the discharge in Maarssen, water coming from the Oranjesluizen and pumped discharge from the waterboards) at time t in m 3 /s, Q g [t] the discharge from the gates, and Q p [t] the discharge of the pumping station in IJmuiden at time t in m 3 /s. The gates can only discharge when the water level of the North Sea is lower than the water level of NZK-ARK, and the pumping station can only discharge when the water level of the North Sea is higher than the water level of the NZK-ARK. To ensure this, a big-M formulation is applied. Two binary variables, z g and z p are introduced, which indicate the possibility of using the gates or pumping station, respectively, where h ns is the water level of the North Sea, dH g,min the minimum water level difference needed to discharge with the gate, and dH p,min the minimum water level difference needed to discharge with the pumps. The big-M constants, M g and M p were chosen sufficiently large.
The discharge of the gate is a decision variable in the optimisation problem. The gate discharge relationship in Equation (1) was simplified through piecewise linearisation (PL). The feasible gate discharge region and the PL can be seen in Figure 4(a). The majority of the feasible region is constrained by the upper bound on gate discharge, rather than the Q-dH relationship. The gate discharge is bound to [0, 500], and the upper bound on gate discharge is multiplied with the binary variable z g that indicates gate discharge possibilities with Q g [t] being the gate discharge at time t, and a g and b g being the fitted parameters for the PL of the upper bound on gate discharge. Pump discharge capacity given a certain pump height is generally described through the use of Q-dH curves, where the (maximum) discharge is a function of the pump height. In the case of IJmuiden, six pumps are present with different curves describing their maximum discharge as a function of pump height. In order to represent the pumping station as one big pump, the different Q-dH relationships of the 6 separate pumps found in Table 1 are aggregated. For a given water-level difference dH p , the maximum discharge of the six pumps combined is equal to the sum of the maximum discharges for the individual pumps.
with Q p [t] being combined pump discharge for the pumping station, and Q i the maximum discharge of pump i as function of the pump-height dH p . The resulting quadratic description of the Q-dH relationship is approximated through PL, as shown in Figure 4(b). The PL is applied as an upper bound constraint on pump discharge, where the total upper bound is multiplied with the binary variable z p indicating pump discharge possibilities.
with a g and b p representing the coefficients of the PL-approximation of the Q-dH relationship.
In practice, the power consumption of the pump station can vary, depending on multiple operating conditions like pump configuration, pump height and discharge. The derived Q-dH curve for the pumping station acts as upper bound constraint for discharge at a given head difference. However, when deciding a combination of (Q p , dH p ), energy use should be considered. Although the energy use of the pumping station could be directly represented using binary variables to act as an on/off switch for every separate pump, this results in computationally infeasible large scale mixed-integer nonlinear programmes (Menke et al. 2016). A novel approach that is in-between was applied. In the approach, the pumping station was represented using a single aggregate power curve so that the resulting MPC optimisation problem is a non-convex Mixed-Integer Quadratic Problem (MIQP). Discretising the feasible domain in Equation (17) results in solving a MIQP for each aggregate (Q p , dH p ) combination, optimising individual pump combinations and their respective discharges in order to minimise pump power consumption. Gurobi (Gurobi Optimization LLC 2018) was used to solve the MIQP. The function: was fitted through these points, where parameters of the least squares fit were found to be: a p ¼ 0.033, b p ¼ 0.061 and c p ¼ 11.306. This equivalent power curve was used in the objective function as described in Equation (3).

MPC optimisation problem
For our system, two aspects of important are (1) water-level constraints cannot be violated at any time step and (2) financial optimality needs to be close to global optimality since we are exploring economic potential for the approach. As such mathematical optimisation methods that certify closeness to global optimality and satisfy physical constraints are applied. To calculate optimal control settings for pumps and gates, the model is expressed as a non-convex MIQP, to be solved with certification on bounds to global optimality with Gurobi (Gurobi Optimization LLC 2018). The NonConvex parameter was set to 2, the MIPGap set to 2%, the Absolute MIPGap set to €1, À, and the time limit set to 15 min. Figure 5 shows the percentage that combined termination conditions occurred for the individual optimisation problems. The figure shows that in all scenarios over 99.8% of the optimisation problems is solved at the termination conditions, rather than cut-off at the time limit.

RESULTS AND DISCUSSION
We simulate two 1-year periods, where costs are minimised using the multi-market strategy. We also simulate a reference scenario without DR, where energy use is minimised and energy costs are calculated using a monthly fixed future market price. For the electricity markets, two years of real market data were used (2017, 2019). The hydrological forcings (incoming discharge and sea water level) of the system for the period (01-04-2017-31-03-2018) are used for both 2017 and 2019 simulations. The hydrological data were kept the same in order to be able to distinctly study the effect of a changing market and RES market penetration on DR profitability. Actual DAM and IDM data are used, where for the IDM the ID3 IDM price was aggregated from the separate bids. For both the market data and the hydrological forcings, perfect forecasts are assumed. The use of perfect forecasts gives a economic potential, where actual performance in practice would also rely on forecast accuracy. Given the uncertain nature of renewables and their influence on electricity prices, a stochastic problem is likely to give superior results. This is out of the scope of this manuscript, which focuses on the economic potential of DR. For the reference scenarios, the monthly-averaged future market price is assumed. In practice, the actual price depends on the time the contract was signed and for how long, and can therefore differ significantly per user. In the Dutch case, this is the ENDEX market price while the Phelix-DE market price was used in the German case. The combination of minimising energy use while buying on the future market is equivalent to the current strategy applied by RWS. Figure 6 shows the actual and planned (at the time of the day ahead bid) fluxes (a and c), energy use and electricity prices (b and d) of water system using the multi-market strategy. The figure shows both the Dutch (left) and the German (right) market scenarios. The MPC tends to focus pumping on times where the water-level difference with the North Sea is low when prices are positive, decreasing energy use. Both the gates and pumps do not violate the big-M constraint, forcing water to flow downwards and be pumped upwards only. In the depicted day, the North Sea is too high for the gates to be used. Negative prices can be seen in the German DAM, while they only occur in the Dutch IDM. Minimising cost when negative prices occur effectively leads to a maximisation of energy use. In the Dutch market, the MPC decides to sell energy bought for October 28 on the IDM for advantageous prices, and buys extra energy for October 29 for negative prices, counteracting a positive imbalance on the grid. On the German market, the MPC already maximises energy use on the DAM, restricting trade options on the IDM. However, some energy is sold on October 29 where positive prices occur on the IDM, counteracting a negative imbalance on the grid.

Evaluation of DR profitability
The summarised performance of different scenarios can be seen in Table 2. It shows the relative costs of the proposed multimarket strategy compared to the reference future market strategy. The relative energy use, the relative CO 2 emission, the average price of the used energy, the average CI of the used energy, and the percentage of energy that was used for negative energy prices are shown in the picture. In both markets, optimising costs over the DAM and IDM leads to a significant cost decrease. In the German market the difference between spot and future market participation is the largest, which can be explained by the higher share of renewable energy generation. Inflexible supply can lead to higher price volatility (Mosquera-López & Nursimulu 2019), rewarding flexibility. Uncertainty in energy generation makes a guaranteed base-load more expensive. Inflexibility in energy use is penalised when there is a higher market penetration of renewable energy and a lack of storage solutions, leading to negative energy prices.
Also, the large difference in relative costs between the market strategies can be explained by the increased price on carbon emission allowance (TenneT 2018). This increased price creates a larger price difference between renewable (with low CI) and fossil energy (with high CI). Due to their unpredictable nature, renewable energy makes up a higher share of the spot markets volume. This makes the increased carbon emission price mostly noticeable in the future market, where base-load contracts can be supplied through the use of fossil sources, explaining the relatively low spot market prices in Germany compared to the future market prices. If both future (i.e. Endex, Phelix-De) and spot markets (i.e. DAM, IDM) have a low penetration of renewable energy, like in the Dutch scenario, the spot market would experience the same price increase as the future market. This would explain why the difference between the German DAM and future market is higher than the difference between their Dutch equivalents.
In both the Dutch and German scenario, energy use is higher for the spot market scenarios than in the reference scenarios (where energy use is minimised), explaining the increase in carbon emission. The carbon emission does increase more slowly than the energy use, indicating a lower average CI of the used energy. The average price and CI of the used energy can be seen in Table 2, in both markets the average price of the used energy is lower for the spot market scenarios. The increase in energy use does not lead to an increase in costs. In the German case, the average price for the spot market scenarios is about a third of the average price for the reference scenarios. Also, a significant percentage of energy was used for negative prices, causing the MPC problem to maximise energy use. This explains the low average price, high cost savings and high amount of extra energy use.
Even though the average price of the energy differs significantly between the future and spot market scenarios, the average CI of the used energy is relatively similar. This shows that the base-level of the CI of the energy is not low enough to make up for the extra amount of energy being used. This holds for both the Dutch and the German markets. However, the average CI of the used energy is somewhat lower for the spot market scenarios, which can be explained by the correlation between CI and energy price shown in Figure 1(c). In the German 2019 scenario, a 29% increase in energy use leads to a 5% CO 2 emission increase. This indicates that Germany is nearing a point where an increase in energy use would not lead to increased CO 2 emissions. Something that can possibly already be realised by limiting the energy use maximisation when negative prices occur, even though it is optimal for balancing the markets. However, these numbers should be taken as an indication since the CI time series was estimated as described in Section 2.3 and not measured.
The relative cost differences show the influence of a higher future market price on the potential cost savings through DR. Higher uncertainty in generation due to renewables make future prices carry more risk-premiums, rewarding flexibility on the spot market while penalising inflexibility on base-load contracts. The rows show four scenarios of applying the multi-market MPC in DE and NL, using market data from 2 different years. The profitability of the multi-market strategy is divided by the profitability of the reference strategy without DR.

aFRR potential analysis
To investigate the potential for pumping station IJmuiden to be active on the aFRR market, we perform an analysis on the previous results where the pumping station is active on the DAM and IDM. The simulation data were used to determine if and when there was room within the constraints to realise a larger pump discharge. We assume the upper limit on the possible discharge to be the amount of water flowing into the system while being constrained by the Q-h curve of the pumping station, i.e. the added pumped volume would never lower the water level in the system. This ensures that water-constraints would not be violated by the additional use of the pumps, leading to a conservative estimate of extra pump capabilities. The extra room for pump use is translated into the amount of energy corresponding to this combination of maximum discharge and pump height. The energy already bought on the DAM and IDM is subtracted from this amount. The resulting data are used for two different analyses. In the first analysis, all DR events resulting in extra power consumption of more than 1 MW are selected to analyse aFRR potential during individual market participation (i.e. in the absence of an aggregator). In the second analysis, all DR events are selected to analyse aFFR potential when cooperating with an aggregator, thus allowing for small bids to be placed. In both cases, we selected the periods where downward activation in the aFRR market occurred simultaneously with a negative downward activation price. This allows us to calculate the maximum additional amount of energy that could have been profitably used for grid balancing purposes per timestep. Table 3 shows the summary of results for the aFRR potential analysis. The results show that the aFRR market has the potential to compensate a part of the energy cost for pumping station IJmuiden. Although cost savings seem small, this analysis does not take the selling of energy due to aFRR participation into account. The DAM and IDM bids are not corrected for the energy bought on the aFRR, and the remaining pump schedule remained unchanged. Besides that, the maximum amount of pumping for aFRR purposes was constrained to keep the water level equal. Re-optimising pump schedules and spotmarket participation after aFRR activation would result in a less conservative estimate of the actual economic potential for aFRR participation. This will be left for future work. The results show that partnering with an aggregator could allow for substantial extra cost savings and regulating volume compared to participating on the market as a single bidder. The supplied downward regulating volume decreased from 2017 to 2019 in both the Dutch and German market scenarios. This indicates that the IDM is capable of supplying the necessary extra regulating volume due to renewable energy generation. The IDM is more accessible to BRPs, and carries relatively lower risk of disadvantageous prices due to the possibility to trade before delivery.

CONCLUSION
In this manuscript, we propose an economic two-stage MPC scheme to enable a large flood defense pumping station to participate in DR services. We explore how participating on the DAM gives more certainty of supply and costs while the IDM allows for short-notice trading, to make up for or exploit unforeseen events or dealing with uncertainties in the state of the open canal system. Therefore, a multi-market strategy is proposed, where pumping is scheduled a day ahead by buying energy on the DAM and then adjusted in a receding horizon fashion (every hour) when energy prices of the IDM are rewarding. We show that a larger profit can be realised for the pumping station when energy prices are more volatile, which can be expected to accompany a higher RES market penetration.
To demonstrate this, we explore the difference between the German and Dutch markets, whose grids have a significantly different energy mix. We show that the proposed MPC is able to counteract both positive and negative imbalances on the grid through price-based DR. We also explore the effect of temporal market changes by using both 2017 and 2019 market data. A 56 and 50% cost decrease was found in the German market scenarios for the years 2017 and 2019, respectively, compared to the reference scenario. Negative energy prices on the German market were found to result in increased energy use and CO 2 emissions. The Dutch market scenario shows a 10 and 16% cost decrease in 2017 and 2019, respectively. The difference in potential cost-saving shows that the German market rewards flexibility more than the Dutch market. We have shown that CO 2 savings are not yet present or well quantifiable in both German and Dutch cases. The efficiency of pumping is timedependent due to tides, resulting in an increased energy use when shifting pumping schedules for DR while the CI of the grid does not decrease enough for CO 2 emission savings to be present. Besides that, negative energy prices can lead to a significant increase in energy use. Although this is optimal from a market-perspective, it might not be preferred by the stakeholders. Also, generation by source time series are incorrect in the ENTSO-E transparancy platform, requiring us to estimate the CI time series through renewable energy production, observed load and reported CI estimates. We show that participating in the aFRR market has economic potential, resulting in cost savings of up to 28% in the aggregated German scenario in 2017 based on our conservative analysis. Receiving a warning signal 15 min before activation makes the market feasible for the pumping station to participate in. The analysis shows that aggregating participants, allowing them to circumvent the 1 MW minimum-bid constraint through pooling, results in higher participation and lower costs. In both German and Dutch markets, the aFRR economic potential decreased from 2017 to 2019. The supplied downward regulating volume decreased as well, indicating that the IDM could be providing the extra balancing services required for renewable energy.
To conclude, we have shown that the economic potential for DR applied to open water systems is significant. However, it would be interesting to quantify the impact of uncertainty in system state, hydrological forcings (e.g. incoming discharge and sea water level) and energy prices. Operationalising the strategy in a feasible way would probably require the consideration of uncertainty. However, this manuscript focuses on the economic potential of DR participation, leaving the consideration of uncertainty for future work. It is also known that variable speed pumps and more efficient configurations of more smaller pumps, in comparison to a single large pump, can expand the envelope for participation in DR (Menke et al. 2017). Therefore, cost benefit analysis for the upgrading of the pumping station should be evaluated also explicitly considering performance in DR.

DATA AVAILABILITY STATEMENT
All relevant data are available from an online repository or repositories (http://doi.org/10.4121/19650591) (van der Heijden 2022).