Electrode boiler model for ancillary service simulation

A generic component-based model of an industrial electrode boiler with internal control systems is presented. A mechanistic modelling approach was taken to include as much process and control information as possible and to generate detailed simulation results. The model is intended for qualitative studies of electrode boiler dynamics in the context of district heating generation and power grid ancillary services in collaboration with other electric power consuming units. An example boiler control scheme is designed and included in the simulation model as this is paramount to the dynamic response of the system. Simulations of standstill, load changes, and startup from hot and cold state show that the strictest ancillary service requirements can be fulfilled when the boiler is kept at operating temperature.


Introduction
Increasing penetration of renewable energy sources, such as wind and solar power, increases the demand for ancillary service provisions to stabilize the power grid frequency around its nominal value, for example 50 Hz (Energinet 2021).At the same time, district heating (DH) production from electrical power is gaining ground as it is becoming increasingly economically competitive with combustion-based DH generation.Furthermore, by including thermal energy storage, DH production and consumption can be decoupled, thus making heat production during times with low electric-power prices possible.
On the DH production side, the combination of heat pumps and electric boilers is particularly interesting in terms of ancillary service provision.Typically, the merit order will dispatch heat pumps before electric boilers, as the heat pumps produce "COP times" more thermal power than the boilers.Thus, this leaves room for the electric boilers to increase power consumption and for the heat pumps to reduce power consumption.Translated to ancillary service terms, the units can provide downward regulation and upward regulation, respectively.
In the western part of the Danish power grid -part of the European ENTSO-E area -the ancillary services are divided into three groups with different requirements to response times (ENTSO-E 2018).
• Frequency Containment Reserve (FCR) which has the fastest requirements of maximum 30 seconds from activation to full engagement.This is typically based on the producer's (or consumer's) own frequency measurement and proportional controller.
• Automatic Frequency Restoration Reserve (aFRR) which currently has a response requirement of 15 minutes but will be reduced to 5 minutes in the near future (Energinet 2022).The transmission system operator (TSO) has one balancing (PID) controller which closes the loop around the power imbalance and all its engaged producers/consumers in the grid.Hence the term "automatic".
• Manual Frequency Restoration Reserve (mFRR) which also has a response requirement of 15 minutes but is engaged manually -typically via the balance responsible party (BRP).
Electric boilers are simple and compact, and offer fast load changing abilities (Danish Energy Agency 2023).Some manufacturers promise power consumption responses that comply with all three mentioned ancillary service categories, e.g., (PARAT 2020).The purpose of the work behind this paper is to qualify this promise using a mechanistic modelling approach.
No publications on physical modelling of electric boiler models in this context are known to the authors of this paper.(Nielsen et al. 2016) make an economic assessment of electric boilers in a DH production context but do not describe the dynamic behaviour.In (Zhi et al. 2017) a (data driven) neural network model of a 20 MW electrode boiler is presented but without internal controllers and physical phenomena.This paper presents a dynamic component-based model of an electrode boiler with its internal controls.Focus is on dynamic closed-loop behaviour during standstill heating, start-up, and load changes.Although the presented model is technically speaking a water heater, it will be referred to as a boiler as this seems to be the common term in the context of district heating systems.3 Model The boiler system model shown in Figure 2 is constructed from components from the Modelica Standard Library (MSL) (Modelica Association 2020) and from the inhouse developed District Heating Library presented in section 3.1.Components include pumps, valves, a heat exchanger, sensors, internal control, and the electrode boiler vessel itself.
On the left side of the HX the DH pump (top) circulates cold return water from port_a to port_b through the HX On the right side of the HX, the boiler circulation pump circulates water through the boiler.The HX admission and shunt valves can be utilized to maintain a fixed or load dependent boiler inlet temperature.
Sensors and actuators are connected to busses through an expandable connector to allow for a centralized and replaceable control system, separate from the process model itself.The external bus inputs to pumps and valves are conditional, and the setpoints can be set within these actuator components.This makes it possible to simulate the process without any feedback control which can be useful as an initial validation of the process.For example, setting valve positions and pump speeds to their nominal values brings the "steady-state" values on the system level close to the expected nominal values.The quotation marks suggest that the tank models create a marginally stable openloop response which does not have a steady state until they overflow or become empty.

District Heating Library
The inhouse developed library District Heating Library (DHL) contains a collection of components for hydronic heating systems and is briefly presented here.Many of the components are based on Modelica Buildings Library (MBL) (Wetter et al. 2014) which offers free, robust and user friendly thermo-hydraulic components.The graphical appearance is an essential feature of the DHL, and we like the diagram view of the models to resemble process flow and heat balance diagrams in which the key simulation values are presented to the user directly in the diagram view.Examples of this can be seen in Figure 2 where

Electrode boiler model
The electrode boiler model itself is shown in Figure 3 and consists of two open tank models.The upper tank is connected to the lower tank via a throttle valve and can also overflow to the lower tank.
The lower tank is thermally connected to the ambient temperature (either fixed or via a conditional heat port) to simulate external heat loss.Using Newton's law of cooling, the thermal conductance, G l , is calculated from a desired heat loss settling time, t loss ≈ 5τ loss , as with the time constant, τ loss , the specific heat capacity, c p,w , and total mass of water in the boiler, m w .The heat capacity of the metal part is not considered explicitly but is "absorbed" in the calculated conductance.Additionally, the two tank volumes are thermally connected by a conductive heat transfer element to ensure steady-state equilibrium temperature.The thermal conductance is arbitrarily set to 5 times the conductance of the ambient heat loss to prioritize the internal temperature equilibrium over the external heat loss.For the sake of simplicity, the electric circuit is modelled with a constant DC source, a switch (as the main circuit breaker, MCB), and a variable conductance.Heat transfer from the electrodes to the water is simulated with a variable electrical conductor from MSL.According to Joule's law the relationship between supply voltage, U, electric conductance, G e , (the inverse of electric resistance, R), and electric power dissipation in the water is We assume that the conductance is proportional to the normalized water level (0-1) and the conductivity, σ , of the boiler water, i.e., The normalized level, L, is calculated as With the measured water level L w , the electrode length L e , and the elevation of the electrodes above the upper tank bottom z e .L is limited to values between zero and one, indicating zero to full electrode coverage.
The composition of the conditioned boiler water -and its thermophysical properties -is only known by the manufacturer but for the sake of simplicity we assume that σ is proportional to the conductivity of pure water, σ w (ρ, T ), which can be calculated using equations published by the International Association for the Properties of Water and Steam (IAPWS 1990) and (IAPWS 2019).
The density, ρ, can be calculated from the water pressure and temperature and combining equations ( 3) and ( 5) we get The fitting coefficient, k, can now be derived from equations ( 2) and ( 6), and the nominal values of power, voltage, water level (L = 1), temperature, and pressure As medium model, liquid incompressible water from MBL is used.Actuators and measurements are connected to a signal bus, implemented with an expandable connector.

Pump
The icon and diagram view of the DHL pump model is shown in Figure 4.It is based on the MBL model SpeedControlled_y and is augmented with conditional external inputs (bus, on/off or analogue speed setpoint), temperature and pressure sensors, and optional check valve and variable speed drive (VSD) to simulate ramp limits, minimum speed and start/stop/coastdown behaviour.All relevant pump information and setpoints are exposed on the PumpBus expandable connector which can also be conditionally enabled.

Valve
The valve model in Figure 5 is based on a replaceable MBL linear valve model and the position can be set internally or through different external connectors (Boolean/Real/bus).
An optional slew rate limiter can be used to simulate the valve stroke time and optional release/interlock expressions can force opening/closing of the valve.All relevant information is exposed on the ValveBus expandable connector.The port placement and icon of the DHL heat exchanger can be changed through a parameter.Figure 6 shows different appearances of the heat exchanger model.

Tee junction
The tee junction is an extension of the MBL Junction model with unchanged functionality.However, the graph-

Control
To study the transient behaviour of the boiler during activation of ancillary services, the internal controller models are just as important as the models of the physical process.Since the actual controller code is an intellectual property of each boiler manufacturer, and thus unavailable to the authors of this paper, a comparative plausible control structure is set up based on experience and on the required controlled variables for the exemplary boiler.In addition to the continuously controlled variables, the boiler system can transit between three operating states, described by the sequential function chart in Figure 8.
• Running -the boiler controls water level, electrical power consumption (or thermal output), and DH supply temperature.
• Stopped -pumps are stopped, controllers deactivated, upper tank drained, and MCB open.
• Standstill heating -90  The continuous and sequential controllers are organized in one controller model as shown in Figure 2 and Figure 9.

Sequential control
The implementation of the three operating states and six corresponding transitions, using Modelica StateGraph (Otter et al. 2005), is shown in Figure 10.The states are connected to the run/stop and auto/manual signals of the relevant pumps, valves, and continuous controllers in the system model.To mention a few transitions: • Transitions to running state are enabled if the thermal/electrical setpoint is above the minimum continuous load, e.g., 0.5 MW and the system run command is true and the boiler water temperature is below the maximum limit • Transitions to standstill heating state are enabled if the run command is true and the temperatures are below maximum limits but the power setpoint is below minimum continuous load

Power and level control
The power and level controllers are shown in Figure 11.
The level controller controls the water level in the upper tank with the throttle valve.When the controller is deactivated, the valve is opened to drain the tank to put the boiler into an operationally safe state.A temperature limiter forces the throttle valve to open if the maximum internal operating temperature is exceeded.This would be the case if, for instance, cooling of the dissipated power with DH return water fails.The controller manipulates the lower output limit of the level controller since this ensures direct "contact" with the level controller output and prevents integrator windup.The level setpoint is provided by the thermal or electrical power controllers in a cascade configuration.If the thermal power controller is activated, the electric power controller is in manual mode with its output tracking the output of the thermal power controller.The same applies to the opposite case and enables bumpless switching between the two controllers.The power and heat flow rate setpoints are max/min limited to the minimumto-maximum continuous load and rate limited such that a change from zero to maximum load takes 15 seconds (fast enough to comply with the FCR requirements).The logic circuitry around the controllers ensures that the power controllers are deactivated if the level controller is deactivated (or set to manual mode) or if the boiler is not in Each PID controller is succeeded by a control station block -which can be used to simulate an operator intervention -supplying a tracking reference value and Boolean track signal to the controllers.

DH supply temperature control
Figure 12 shows the DH supply temperature controller.When the boiler is in running state and the internal temperature is above 70 • C the controller is activated, and the DH pump is started.The DH pump, control valve and recirculation valve are controlled in a split-range configuration that produces a smooth DH flow from zero to maximum. Figure 13 shows the pump speed and valve positions as a function of the temperature controller output (top) and the resulting DH flow (bottom).From zero to 20 % controller output the pump runs at minimum speed (20 %) and the valves control the flow.From 20 to 100 % the pump controls the flow.

Boiler circulation control
The boiler circulation controller, shown in Figure 14, controls the boiler circulation pump speed and the boiler inlet temperature.The pump speed setpoint is proportional to the electric power or heat flow rate setpoint -depending on the mode of operation.This load dependence was chosen to reduce the recirculation rate and throttling loss at low boiler load.The boiler inlet temperature is controlled with the HX admission and shunt valves.When one is opened, the other closes.

Standstill temperature control
The standstill temperature controller (Figure 15) controls the internal boiler temperature during standstill to maintain a high electric conductivity of the boiler water and, thus, a enables fast start-up response.When the standstill heating state is active, the isolation valve is opened, and the standstill pump controls the temperature in an on/off fashion.

Simulation results
Figure 16 shows the BaseCase simulation model in which the system is simulated to steady state with nominal conditions.The block to the right contains the electrode boiler system (shown in Figure 2) with its internal controllers.Setpoints are set inside the controller blocks but can optionally be taken from the system bus -for example when the boiler is controlled by an outer master controller.All simulation variations (step-responses, part load, failure conditions etc.) extend from the base case with modified boundary conditions (setpoints etc.), cf.Listing 1.The model is parameterized as a 40 MW boiler.Based on information from (PARAT 2020) the boiler height and diameter are set to 6 and 3 metres, respectively.Nominal mass flow rates are calculated from nominal temperatures and heat flow rates.Valve stroke times and pump data are estimated from experience.The key model parameters are summarized in table 1.The following simulation results show the behaviour of the model in different situations.The main interest is to study internal behaviour of the boiler model and to evaluate its response during activation of ancillary services.The simulation models contains 7,366 equations, the translated model has 89 differentiated variables, and the sizes of nonlinear systems are {4, 3, 2, 2}.The integration time of the presented models using DASSL is approximately 0.5 seconds in Dymola 2023x Refresh 1 running on a normal laptop PC.

Cold start
In the first simulation the boiler system is initialized in stopped state without standstill heating.All initial temperatures are 20 °C and the upper tank is empty.At five minutes, the boiler receives a start signal and an electric power setpoint of 40 MW.
Figure 17 (top) shows the electric power consumption and its setpoint (blue) together with the thermal power output delivered to the DH system (red).The power consumption takes 3-4 minutes to reach its setpoint.The five-minute offset between the electrical and thermal power transient is because the DH temperature controller is not activated until the internal boiler temperature reaches 70 • C. The middle figure shows the level setpoint (blue) and the corresponding water level (red).The blue slope is caused by rate limitation of the power setpoint and the integral time of the power controller providing the level setpoint.The ∼20 second delay of the level is a combination of • The water level starting at −z e (electrode elevation above the tank bottom) • The throttle valve closing (bottom figure, blue) • The circulation pump starting (bottom figure, red) The fact that the throttle valve position settles on about 25 % to maintain the steady-state level suggests that the valve sizing is a bit off.Instead, 50 % is preferable as this would give a symmetric process gain during level increase (valve closing) and decrease (valve opening) for a constant pump speed.
Figure 18 (top) shows the DH supply temperature (red) and its setpoint.The bottom figure shows the temperature controller output (blue), the DH valves (green and magenta), and the DH pump speed (red).When the DH temperature controller is activated at approximately 10 minutes, the pump ramps to its minimum speed (20 %) After another couple of minutes, the DH temperature approaches its setpoint and the DH valves start to actively control the supply temperature.Subsequently, as the heat flow rate increases, the pump speed increases to keep the temperature on its setpoint.As expected, the electric power response, following a cold start, is not fast enough to comply with the 30 second FCR requirements.However, it is fully capable of fulfilling aFRR and mFRR requirements.

Standstill
The "slow" response during cold start is mainly attributed to the relatively low electric conductivity at low temperatures.Figure 20 shows the conductivity of pure water (at 5 bara) as a function of temperature.Standstill heating is activated by setting the boiler run command to true and the electric power setpoint to zero. Figure 21 shows the on/off control of the boiler temperature during standstill (top, red) to a setpoint of 80 • C (top, blue).The standstill pump starts when the temperature drops below 77 • C and stops when the temperature reaches 83 • C. With t loss set to 7 days the 6 • C cooling (heat loss) phase takes 4-5 hours.The bottom figure shows the standstill valve (red) and pump (blue), and the boiler circulation pump (green).As the boiler temperature measurement is located on the pipe leaving the boiler, it can only provide a representative reading of the (uniform) boiler temperature when water flows through it.For that reason, the boiler circulation pump runs continuously at low speed.

Warm start
Figure 22 shows the electric power and level responses during a warm start (red) compared to a cold start (blue).Now the power response is only approximately 15 seconds compared to 3-4 minutes.The improvement can be explained by: 1.The water conductivity is improved by the standstill heating preceding the warm start.
2. During standstill heating the water level is maintained slightly below the electrodes, whereas in stopped stated (cold), the upper tank is emptied.This causes a startup penalty while the boiler circulation pump fills up the inner tank.

Load reduction
The FCR requirements apply to both load increases and reductions.The following figures show the simulated response during a power setpoint reduction to minimum stable load (0.5 MW). Figure 23 shows the power and heat flow rate (top), the level (middle) and throttle valve position, and circulation pump speed (bottom).The power consumption reaches and undershoots its setpoint within 15 seconds.The level undershoot causes the electrodes to be unconvered, resulting in zero power consumption.As the boiler circulation pump speed is low at minimum power, the water level only recovers slowly.

Discussion
The mechanistic, component-based modelling approach generates a lot of interesting results, not attainable with data-driven approaches.It reveals several details of the closed-loop behaviour which could not easily be found by prior scrutiny.
Although the simulations show good results, improvements to the model and the control strategy are always possible.
During normal operation, level control is strictly speaking unnecessary.The electric/thermal power controllers could just as well actuate the throttle valve directly, and this would enable a faster power control, as the controller cascade would be omitted.However, during standstill the level needs to be controlled slightly below the electrode tips.This could be arranged by placing the level controller "in parallel" with the power and heat flow rate controllers, switching to level control in the relevant situations.
The boiler circulation pump speed was made loaddependent to reduce the throttling loss at low loads.However, this results in load-dependent process gain from throttle valve to tank level and slow process response at low load.This could be changed, for instance, to a mid-range control scheme in which the circulation pump keeps the valve position around 50 %.This would give a more symmetric level increase/decrease response.Also, more emphasis could be given to refining the relationship between the water properties and the conductance.This would require more insight into the chemical part of the boiler and probably the involvement of the boiler manufacturer.
The electric part of the model was made with a DC circuit for simplicity.To connect the model to a power grid model this must be extended -for example by using AC components from libraries such as (Franke and Wiesmann 2014) or (Baudette et al. 2018).
Finally, matching actual operating data from a real electrode boiler, geometry, valve stroke times, pump curves, and the detailed control scheme would have to be replicated as this is paramount in that context.

Conclusion
A component-based model of an electrode boiler and its related internal controllers was presented.It is easy to parameterize, and simulations between zero and full load show good agreement with expected responses.With the presented parameters an exemplary 40 MW boiler model complies with the FCR ancillary service requirements both during load reduction and load increase from warm conditions.
The simulated model provides great insight into the process and automation details of the electrode boiler system.It consists of several sub-components making it easy to study its behaviour in detail.The short simulation time makes the model suitable for integration in a larger system simulation model.
The outcome of the work is a generic, component-based model of an electric boiler for general studies of internal DOI 10.3384/ecp204589 Proceedings of the Modelica Conference 2023 October 9-11, 2023, Aachen, Germany phenomena -not to exactly replicate the operating characteristics of one specific boiler model since this would require complete insight into the controller code from the manufacturer.The controlled model is used to verify the plausibility of FCR compatible responses.2 Electrode boilers -working principle Electrode boilers are a sub-type of electric boilers in which the medium to be heated (water) acts as an electric resistance.Various types of electrode boilers of different designs are available from various manufacturers.The type of electrode boiler presented in this work is inspired by Norwegian manufacturer PARAT Halvorsen AS and is illustrated in Figure 1.It consists of two concentric tanks -an inner/upper and an outer/lower -containing purified, conditioned water.Electrodes connected to a medium voltage AC supply are immersed in the upper tank, in which the water level is controlled with a valve allowing to drain the upper tank to the lower tank.A pump circulates water from the lower tank, via a DH heat exchanger (HX) to the upper tank.The water surrounding the electrodes acts as an electric heating resistance and the thermal power transferred from the electrodes to the water is proportional to the water level.Increasing the water level covers more of the electrode surface and lowers the resistance between the electrodes.Water on the DH-side of the HX removes the generated heat.

Figure 4 .Figure 5 .
Figure 4. Icon and diagram view of pump model.

Figure 6 .
Figure 6.Different appearances of the heat exchanger model. name

Figure 7 .
Figure 7. Change of icon using the primitivesVisible annotation.
The following controlled variables are defined • Electric power consumption • DH heat flow rate • DH supply temperature • Water level of the inner tank • Maximum internal temperature • Boiler inlet temperature • Standstill temperature Controllers for water conditioning (conductivity, makeup, blowdown), pressurization, and inertization are omitted in the context of this work.

Figure 11 .
Figure 11.Power and level controllers.

Figure 13 .
Figure 13.Split-range control of DH pump and valves (top) to produce an almost linear flow (bottom).

Figure 17 .
Figure 17.Power and level during cold start.

Figure 19 (Figure 18 .
Figure19 (bottom)  shows the boiler inlet temperature (red) and its setpoint (blue) which are controlled by

Figure 20 .
Figure 20.Conductivity of pure water at 5 bara as a function of temperature.

Figure 22 .
Figure 22.Power and level during warm start (red) compared to cold start (blue).

Figure 23 .Figure 24 .
Figure 23.Power and level during a load reduction.

Figure 25 (Figure 25 .
Figure 25 (top) shows the internal boiler temperatures decreasing from 118 • C at 40 MW to approximately 90 • C at 0.5 MW.At 19 minutes the controlled boiler inlet

Figure 26
Figure 26 shows a part of the diagram view of the simulation.The DH recirculation results in an HX inlet temperature of 87.2 • C. Since the boiler inlet temperature is the mixture temperature of the boiler-side HX inlet (91.5 • C) and outlet (88.9 • C) temperatures it is not possible to reach the 80 • C setpoint.

Figure 26 .
Figure 26.DH recirculation causing a high boiler inlet temperature.
C, water level is controlled slightly below the electrode tips to prevent arcing from water surface ripples, and power consumption is approximately zero.This enables short start-up time. •

Table 1 .
Key model parameters.