1 Introduction

The ecological and energetic transition is driving a deep transformation of the energy and utility industry, promoting a shift from centralized to distributed generation systems. This transformation is supported by advanced digital technologies and requires the introduction of new paradigms for energy management and control, including a radical change in the user role, advancing the definition of the control problems from the device level to a system level, and by the integration of different energy vectors.

A paradigm shift in the consumers’ function is promoted by the decentralization of the energy production and the integration of small scale generation, giving them an active role by becoming local producers, as well as by modifying proactively their consumption patterns. In this new scenario, the consumer is asked to abandon the perspective of “Energy as a Commodity”, where energy is considered as always available and cost-effective on demand, toward the paradigm of “Energy-as-a-Service”. This new paradigm requires to move the focus of management, optimization, and control problems from the device-level to the system level, e.g., as in smart grids, promoting a scenario in which the production of various forms of utilities is more and more integrated. A step-ahead in system flexibility is built indeed on a cross-sectorial integration of different energy vectors and on the development of tools and technologies that enable efficient utilization of multi-dimensional energy systems. For this reason, significant research efforts must be devoted to alternative energy carriers, e.g., compressed air, heating and cooling networks, and to their integration. The concept of energy hub fosters efficiency improvement for multiple energy carrier systems through analysis tools, dynamic modeling, and the control of interacting subsystems [1]. As reported in the review [2], the optimal management and control of energy hubs is one of the most important open issues.

This requires to extend the idea of smart grids to Smart Thermal Energy Grid (Smart-TEG): the generation nodes are composed of multiple integrated units that require coordination and control to fulfill the demand of the various consumers, which in turn may vary (in part) their demand based on optimization criteria.

2 The Smart-TEG Problem

In this work we focus on smart-TEG in industrial scenarios. A typical case is represented by industrial parks: their energy-centers generate electrical power and thermal energy that are distributed across the site to companies. Some of these, at the same time, are provided with on-site generation units (GUs) to guarantee a degree of autonomy. In this scenario, local generation units and the industrial-park energy facilities can be combined together to improve the overall efficiency of the network of subsystems, managing and controlling these units in a wider context, i.e., as nodes of a more extended grid.

The thermal and electricity demand defined by the production scheduling must be fulfilled at any time, however the mix between on-site generated energy and net exchange with the main grid must be optimized, as well as the commitment of the GUs and their operating point. The control of the integrated generation units become a necessary element to operate them safely and efficiently.

While the eco-design, retrofitting, and revamping of energy system produce the greatest improvement on the efficiency, an enhanced management and control of existing GUs can provide beneficial results with a lower capital investment. By exploiting the integration of the multi-generation systems on the plant and by extending the grid outside company boundaries the overall efficiency can be improved greatly. Therefore, the focus has to be moved on the synergies among various forms of energy. The presence of various energy carriers, the complexity of interconnections at different levels among the subsystems require the development of intelligent technologies for its management and control, e.g., by inheriting and transposing solutions from the smart grid context.

Most of the ideas and approaches discussed in this work can be extended to a broader class of problems of industrial and scientific interest e.g., multi-line (parallel) plants with raw material or energy/power constraints; water/steam supplier (consumer) networks.

Despite the relevance of these problems, many issues are still present regarding coordination and control of these systems. Classical centralized solutions are limited by computational issues, lack of scalability and privacy concerns. The industrial need for an extension of dynamic optimal management strategies, from subsystem to plant-wide level, is well known: new strategies and methods must be put in place to approach plant-wide optimal management.

3 Optimization-Based Hierarchical Control Solutions

To address the optimal control and management of a smart-TEG, a hierarchical approach is here adopted. The overall problem is decomposed by considering the temporal separation that exists among the system dynamics, and the different horizon of the problems at various levels. Several sub-problems can be identified to achieve the overall target: (i) the unit commitment (UC) and scheduling of the generation units; (ii) the optimization of the operating point for each unit; (iii) the dynamic coordination of interacting units; (iv) the regulation and control of the single unit. The interaction among the different layers is taken into account to provide an integrated solution.

Model-based optimization and control is assumed as a common framework for the development of the solution strategies at the different layers: model predictive control (MPC) and, in general, receding horizon formulations are used.

The architecture for the smart-TEG management considers a multi-layer approach. In the top layer, the UC problem and the economic dispatch optimization is dynamically solved, considering networked systems sharing a set of common resources. The optimization at this level can benefit from decomposition and parallelization strategies, based on distributed and decentralized approaches, see Sect. 3.3.

At the lower layers, hierarchical and distributed control levels based on MPC are defined: advanced control solutions for single generation units are developed to enable the integration with the upper layers, and a control scheme for the coordination of homogeneous ensemble of subsystems is also proposed. The latter exploits subsystem configuration to reach a top-down integration, from scheduling to dynamical control, which is scalable and flexible.

At any level, the proper modeling of the systems becomes a fundamental and critical task: an extensive discussion is carried out in [3] [Part II], whereas a brief digression on hybrid models for UC optimization is given in the following section.

3.1 Unit Commitment and Control of Generation Units

The coordination of the generation units in a node of the smart-TEG, i.e., inside a company, is itself a local problem of UC and control for the set of interacting sub-systems. A two-level hierarchical scheme is here proposed. The hierarchical control structure, see Fig. 1, includes a high layer that aims to optimize the performance of the integrated plant on a day-ahead basis with a longer sampling time (typically 15 min.) and a low-level regulator to track the set-points. The model used at the high level is sketched in Fig. 2.

Fig. 1
figure 1

Hierarchical scheme for unit commitment and control

Fig. 2
figure 2

Operating modes of interacting GUs

For a proper management of the UC it is necessary to extend the mathematical description of the system to include not just the production modes, but also start-up and shut-down dynamics, as well as any other particular operating mode. This high-level model is devised as a discrete hybrid automaton [4], combining discrete and continuous states and inputs, that permits to merge the finite state machine describing the operating modes of the unit and their transitions, with the continuous dynamics of the system inside each mode. Here the transition is defined by a combination of continuous state dynamics, describing the mode dwell times, and exogenous Boolean commands.

The high-level optimizer determines the future modes of operation of the systems, as well as the optimal production profile for the whole future optimization. The receding horizon optimization is formulated as a mixed-integer linear program (MILP), due to the presence of both continuous and discrete decision variables, a linear objective function defining the operating cost, and linear inequalities enforcing demand satisfaction.

The lower level is a dynamic MPC that operates on each individual system to guarantee that the process constraints are fulfilled, with a faster sampling time. For the dynamic control of the sub-system, specific controllers can be designed for the different operating modes: a linear MPC is implemented for normal production modes (see [5]; or [6] where multi-rate approach is adopted), while to address the nonlinearity of the system in the start-up phase, a linear parameter-varying MPC approach [5] is proposed for the optimization of a nonlinear system subjected to hard constraints. This method, exploiting the linearization of the system along the predicted trajectory, is able to address nonlinear system with the advantage of the computational time with respect to NMPC strategy, as an approximation of the SQP optimization stopped at the first iteration. The scheme has been validated on an industrial use-case. An extensive presentation is reported in [5].

3.2 An Ensemble-Model Approach for Homogeneous Units

Energy plants are typically characterized by a number of similar subsystems operating in parallel: this ensures reliability, continuity of service in case of unexpected breakdowns or planned maintenance, and modularity of operation. In particular, when the demand fluctuation range is wide, a unique GU is forced to operate far from its most efficient working conditions: so, instead of operating at inefficient low regimes at low demand, a set of cooperative units can be opportunely committed to run in the most efficient configuration.

These units are characterized to be homogeneous, i.e., similar but not identical, with the same types of inputs and outputs but slightly different parameters and dynamics: e.g., GUs of different producers or product generations.

Fig. 3
figure 3

Multi-layer solution for parallel homogeneous units

In this context, the aim is to design a solution which is both robust and flexible, guaranteeing modularity and scalability with the objective of jointly sustaining a common load. A multi-layer scheme is proposed, see Fig. 3, and it is composed as follows: (i) a high-level optimization of the load partition—defined by the sharing factors \({\alpha }\)—and the generator schedule—considering activation dynamics by a hybrid model; (ii) at medium level, a robust tube-based MPC that tracks a time-varying demand using a centralized, but aggregate, model—the ensemble model—whose order does not scale with the number of subsystems; (iii) at low-level, decentralized controllers to stabilize the generators. In Fig. 3, the decentralized lowest-level controllers are not shown and the closed-loop nonlinear systems are indicated by \(\mathcal {S}_{ i}^\mathrm{CL}\). The multi-rate nature of the scheme is highlighted in the figure by the presence of different time indices \((h, k, \kappa )\) respectively for the high/medium/low layers, discretized with time step \((T_\mathrm{H}> T > \tau )\). Without delving too much into technicalities, that can be found in [7, 8], three main elements characterize this control solution: (i) the sharing factors to partition load and inputs to the subsystems; (ii) the ensemble model to manage the overall system in a scalable way; (iii) the robust medium-level MPC to manage intrinsic modeling mismatch.

The sharing factors. To partitioning the demand to the \(N_\mathrm{G}\) subsystems that constitute the plant, the sharing factors \(\alpha _{ i}\) are introduced. These are characterized by the following properties: \(0 \le \alpha _i\le 1\) and \(\sum _{i=1}^{N_\mathrm{G}}\alpha _{ i} =1\). Thus, given the overall input of the medium level, \(\bar{u}\), the local input to the generic subsystem i can be defined by \(u_{ i} = \alpha _{ i} \bar{u}\). The sharing factors are computed in receding horizon by the top-layer optimizer, based on the forecast of the demand.

The ensemble model. The sharing factors are essential in the derivation of the global model of the ensemble. For assumption, each controlled sub-system can be described by a state-space linear model. To compose the ensemble model, it is required to define an artificial reference model, which has the same state vector for each subsystem. While homogeneity implies by definition coherent inputs and outputs, the state vectors might differ: thus, reference-model state might be defined by a proper transformation. By design reference-model the state and output matrices are the same for each sub-system. Instead, the input matrix is derived by enforcing gain consistency conditions [9], which guarantee the same static gain of the original system. It has to be remarked that during transient the gain consistency does not hold and, due to model mismatch, a disturbance term must be introduced. Based on these reference models, the ensemble model can be defined considering the parallel configuration and the sharing factor definition.

The robust medium-level MPC. Due to the presence of this disturbance term, a robust medium-level MPC must be designed to dynamically controls the overall input to follow the time-varying demand. A tube-based MPC approach [10] is used: based on the ensemble model, it can be dynamically modified by the high-level optimization following sharing factors trajectories [7]. By enforcing both local and global constraints, we can guarantee that also each sub-system respects local bounds.

In specific conditions, e.g., with sharp demand variations, abrupt changes of ensemble configuration may lead to medium-level MPC infeasibility: a nonlinear optimization addresses MPC infeasibility considering the sharing factors as temporary decision variables and driving the system to the new required configuration via a feasible path.

Fig. 4
figure 4

Ensemble total output and demand

Fig. 5
figure 5

Local output and demand

Fig. 6
figure 6

Operating modes

Fig. 7
figure 7

Sharing factors

The results for a set of 5 water-tubes boilers operating in parallel are here reported: the Figs. 4 and 5 show how the medium level MPC can track the gas demand both globally and locally, while in Figs. 6 and 7 the optimal unit commitment, i.e. operating mode evolution, and the best sharing factors are shown. In Fig. 7 the transitional configuration computed by the medium-level nonlinear optimization are also reported, compared with high-level optimization.

Note that this control scheme enables the dynamical modification of the ensemble configuration and plug and play operations.

3.3 A Distributed Unit Commitment Optimization

The UC optimization aims to compute the best operating strategy for coordinating the subsystems. We explicitly consider the smart-TEG as composed of different companies owning and controlling a subset of subsystems, that must cooperate to guarantee the fulfillment of a global demand, while restricting the number and type of information communicated across the network. A centralized optimization is most of all limited by flexibility and robustness to network variations, and privacy concerns. The centralized formulation, in fact, implies that all the companies participating in the network provide to the central computation unit their cost function and their constraint sets. This correspond to actually disclose their preferences and limitations, as well as the models of the internal GU and the company KPIs. To overcome these issues, a distributed multi-agent optimization is here proposed. A peculiarity of smart-TEG is that the network of energy generation agent is characterized by different hierarchical levels, see Fig. 8, based on the ability to reach (almost) all the consumers or just a local cluster of them, and defined by the piping network and steam flow direction. Thus, the units are classified as either Central GUs or Local GUs.

Fig. 8
figure 8

Central and Local GUs with bus assumption. On top (with red background) Central GUs, at the bottom Local GUs (orange). Different subsystems are present in each node (Boilers, Steam Turbines (ST), CHP). Consumers are depicted as triangles

A MILP can be formulated for the unit commitment problem, as discussed in Sect. 3.1.

Such constraint-coupled optimization problems can be decomposed by addressing its dual problem, defined through a Lagrangian relaxation. The dual program is indeed a decision coupling problem on the vector of Lagrange multipliers, while the dual function exhibits decoupled sub-problems, see [11], preserving the agents’ privacy: local constraints and objective function are not shared.

As a non-convex optimization, the MILP presents a duality gap, as strong duality does not hold. It is demonstrated that this can be bounded and small if the ratio between coupling constraints and agents is less than 1, see [12] and references therein. Therefore, we assume that the distribution network for each utility can be modeled as an informatics fieldbus to which the single agents are connected, see Fig. 8, thus limiting the number of coupling constraints.

Decentralized hierarchical schemes based on projected sub-gradient method for the solution to the dual problem have been proposed in [11, 12]. To guarantee recovering a primal feasible solution, a modified version of the problem, in which the resource vector of the coupling constraints is contracted by a penalization term, is considered. This tightening term guarantees finite-time feasibility. However this feasible solution may be sub-optimal with respect to the centralized one. Similarly to [12], we propose in this work a the tightening update algorithm aimed to reduce this sub-optimality.

A fully distributed approach can improve the privacy preservation by limiting the information exchanged among the network [13]. To achieve the full distribution, a local copy of the vectors of Lagrange multipliers and of the penalization vector is introduced: only these local estimations are shared across the network by a peer-to-peer communication. The algorithm in [13] guarantees feasibility, leaving an open issue regarding solution sub-optimality. In this work, supported by this finite-time feasibility guarantee, we propose a distributed algorithm with performance focus, that can reach an optimal solution close to centralized method.

To permit an improvement of the global cost, we are forced to relax slightly the privacy concerns, playing with the intrinsic trade-off that exists between information sharing and optimality. The agents are obliged to disclose their local contribution to the coupling constraint and the local cost to their neighbors. Thanks to distributed average consensus routines, that permit the estimation of the overall feasibility and cost improvement, each agent achieves a “common knowledge” from which it is impossible to recognize and determine the specific contribution of any other agent, thus preserving privacy. Rather, this is essential to empower each agent to evaluate autonomously the feasibility and optimality of the current iteration, and take the opportune actions.

Both the proposed decentralized and distributed algorithm show an improvement in the global cost of the smart-TEG with respect to state of the art approaches. A possible drawback of the proposed distributed algorithm is related to a highly intense—but local—data exchange requirement to achieve an enhancement in optimality performance.

Detailed discussion about the algorithms and results can be found in [3].

4 Conclusions

This chapter aimed to give an overview of the hierarchical architecture for the management and control of smart-TEG. This research work has addressed the solutions to enable efficient utilization of multi-dimensional energy systems, developing control algorithms, tools, and technologies at different levels. The multi-layer approach presented in Sect. 3.1 is shown to be effective in optimizing the scheduling and the unit commitment of a set of interacting generation units, by exploiting the hybrid model for representing all the operating modes, but also for the dynamic regulation of each subsystem. Moreover, when homogeneous units are present, as discussed in Sect. 3.2, the ensemble-model approach can guarantee a scalable solution, with plug&play features. In addition, decentralized and distributed algorithms for the high-level unit commitment problem with performance focus have been introduced.

The current hierarchical approach is designed to consider the low-level controllers as decentralized: a possible future extension of the scheme can benefit by replacing the lower layer with a distributed cooperative MPC approach, in which the different subsystems can exchange with the others their predicted solutions. Future work will consider also the improvement of the multi-layer scheme for homogeneous units by comparing the overall performance with the implementation of an additional low-level shrinking MPC control to further address the local model mismatch. We also envision to extend the high level optimization including also the ensemble dynamics. Currently the ensemble algorithm is designed for linear models at the lower levels, an extension to nonlinear system is foreseen.