Operation of Power-to-X-Related Processes Based on Advanced Data-Driven Methods: A Comprehensive Review

: This study is a systematic analysis of selected research articles about power-to-X (P2X)-related processes. The relevance of this resides in the fact that most of the world’s energy is produced using fossil fuels, which has led to a huge amount of greenhouse gas emissions that are the source of global warming. One of the most supported actions against such a phenomenon is to employ renewable energy resources, some of which are intermittent, such as solar and wind. This brings the need for large-scale, longer-period energy storage solutions. In this sense, the P2X process chain could play this role: renewable energy can be converted into storable hydrogen, chemicals, and fuels via electrolysis and subsequent synthesis with CO 2 . The main contribution of this study is to provide a systematic articulation of advanced data-driven methods and latest technologies such as the Internet of Things (IoT), big data analytics, and machine learning for the efﬁcient operation of P2X-related processes. We summarize our ﬁndings into different working architectures and illustrate them with a numerical result that employs a machine learning model using historic data to deﬁne operational parameters for a given P2X process


Introduction
This paper contains a comprehensive review of the operation of power-to-X (P2X) industrial plants following the conceptualization of cyber-physical systems introduced in [1]. In the context of the so-called energy crises and the unquestionable consequences of climate change, it is critical to incorporate not only renewable energy sources but also cutting-edge energy efficient technologies as an attempt to protect current and future generations from the dangers of unlimited exploitation of human and natural resources [2,3]. In this gloomy context, a wave of helpful innovation is emerging, pointing to possible ways to provide energy resources away from fossil fuels. As a high-level political plan (although in many ways in contradiction with the actual implementation, as indicated in, e.g., [2]), Europe is trying to set the pace in developing the upcoming energy system that aims to cut greenhouse gas emissions, in particular, and a so-called green transition to a sustainable society, in general. The main claim is that the EU shall rely on energy that is safe, inexpensive, and environmentally sustainable. By doing so, it is estimated that power-to-X (P2X) and cogeneration will serve as the backbone of a resilient, decentralized, and carbon-neutral European energy system by 2050, enabling industry and citizens in Europe to produce clean heat and energy more locally in a reliable, cost-effective, and efficient manner [4].
Specifically, one of the primary strategies to quicken the energy transition is P2X, especially when coupled with other sectors. In a nutshell, P2X-related processes collect CO 2 from the atmosphere and combine it with hydrogen obtained via electrolysis supplied by renewable sources to produce a variety of synthetic fuels that are carbon-neutral. Sector coupling and P2X together pave the way for the decarbonization of different infrastructures can be achieved by the combination of H 2 (generated by electrolysis using the electricity generated by renewable energy sources) and CO 2 to generate synthetic natural gas (CH 4 ). This process is called methanation, and in this process, H 2 and CH 4 are produced by using the electricity from renewable sources [12]. This can be categorized as P2X; in this case, X is the gases (H 2 and CH 4 ). The CH 4 produced can be stored in the existing gas storage infrastructure to be used later.
Hydrogen itself can be the final product of P2X. A certain amount, sometimes up to 20%, can be blended directly in the existing natural gas grid and utilized by existing end-use equipment. A larger share of H 2 requires modifications to or conversions of the equipment due to different properties of H 2 compared to natural gas. An additional challenge is the lower energy density of H 2 , which decreases the energy transport and buffer capacity (linepack swing) of gas pipelines [13,14].
During another study, the author claims that P2X is a better option for the long-term storage of renewable energy sources, as H 2 and CH 4 can be stored for a long period of time compared to battery storage, and can also reduce the amount of CO 2 [15]. From the perspective of distribution system operators (DSOs), P2G solves the problem of integrating RES both temporally and spatially due to insufficient distribution system capacities. Numerous research papers [15] have addressed the coordination of gas and electricity networks using P2G and other technologies. Several studies [16] evaluate the potential of P2G on the transmission network in countries such as, for example, Germany. The authors predict about 80 percent reduction of CO 2 and about 110GW of energy by using P2X technology by 2050 in north Germany due to high-speed wind and offshore capabilities.
Some studies [17] show the requirements for predicting future locations for RES installations in different areas. They claim that using geographical information system (GIS) services can help predict RES installation locations for generating energy [18]. The above-mentioned studies mainly focus on the importance of RE and P2X technology for generating and storing energy (H 2 and CH 4 ) from RESs and also provide the importance of using GIS services to identify future RES installation locations. However, in our view, there is a research gap, as none of the studies have shown data-driven approaches for the collection of data from these renewable energy sources; also, there is a gap in future energy prediction using machine learning based on future data from methanation reactors.
In this study, we highlight the importance of some data-driven methods for the collection of data from methanation reactors, and later, we provide a machine learning algorithm to predict the future energy cost for electrolysis.

Basics
The starting point of P2X is the production of hydrogen by water electrolysis, as hydrogen acts as the main energy carrier. There are three main technologies for hydrogen production: alkaline electrolysis (AEL), polymer electrolyte membrane electrolysis (PEMEL), and solid oxide electrolysis (SOEL). AEL and PEM are already commercial, while SOEL is in the pre-commercial phase. The main technical differences are related to pressure, temperature, and dynamic operation. The operating temperature for AEL and PEMEL is about 50-80 • C, and it is 700-900 • C for SOEL. The maximum operating pressures for AEL, PEMEL, and SOEL are 1-60, 4-76, and 10 bar, respectively. PEMEL is the most capable for low part-loads and fast transitions, while AEL is also fast enough for grid frequency services but has limited part-loads. SOEL requires more time for start-up and ramping, but it is capable of a wide load range [19].
Hydrogen can be the final product of P2X, as it can be used directly as a fuel or raw material. Ammonia production and various chemical refining processes contribute to over 90% of the global hydrogen consumption of 73.9 Mt/a [20]. However, P2X can be extended by further processing bulk hydrogen into various products and materials.
While most (69%) of the realized P2X projects in Europe do not process hydrogen further, methane is the second most used route (22%) [21]. The third one is methanol, which accounts for 6% of the projects.
Production of methane (CH 4 ) has been heavily studied for a long time, but the focus is changing from syngas to CO 2 methanation. In addition to hydrogen and CO 2 , syngas also contains a considerable amount of CO, which changes the chemical process. In addition to the different input composition, the general nature of the operation changes from steady-state to transient P2X. There are two main technological options for CO 2 methanation: biological and catalytic. Methane has gained attention as it can be used to directly substitute natural gas with existing grid and end-use devices. Some commercial reactor concepts are already available [22].
Other possible end products with high potential demand are methanol, dimethyl ether (DME), and Fischer-Tropcsh (FT) products. A significant benefit compared to methane is that the end products are in liquid form, thus increasing the energy density and usage potential. Similar to the development of methanation, the main challenges are the shift from the well-known syngas to CO 2 -based processes, and transient operation of the plant. P2X processes for methanol and FT are more developed than those of DME [23].
The main structures for each of the P2X processes are fairly similar at the upper level. As an example, a simplified process chain for methanol [24,25] is presented in Figure 1. Renewable energy sources are the starting point; they provide the main energy input in the form of electricity. The produced hydrogen and CO 2 are compressed to the operational pressure of the synthesis. Intermediate storage might be required for both hydrogen and CO 2 , in which gases are stored above the synthesis pressure. After synthesis, there is transportation and storage demand for the produced methanol. In addition to the presented power and material flows, components consume and produce heat; thus, heat integration can be beneficial [26]. Water and CO 2 sources are also needed for electrolysis and CO 2 capture [27]. Waste heat from the components of the P2X system could also be utilized outside the plant via sector coupling. Heat, in general, such as steam, hot water, space heating, or district heat can be done using a P2X plant by two main methods: (1) heat is produced from the waste heat streams of P2X components, or (2) produced fuels are utilized to produce heat. The first method couples the heating strictly to the P2X system spatially and temporally, while the latter option has more freedom, as the fuels can be stored and transported rather easily for longer distances.
Nevertheless, including heat production and consumption increases the system complexity, thus requiring more advanced methods to design, analyze, and handle the data of the energy system. Palys et al. [28] studied how to supply heat and power for remote locations. The system was optimized using MILP analysis with current infrastructure and allowing investments for new units. Power-to-hydrogen, power-to-ammonia, and power-to-heat were the considered P2X options. Fuel cells and internal combustion engines were used for cogeneration, which was found to be an important part of the cost-optimal system. The optimal heat-to-power ratio of cogeneration was found to be dependent on the location. Mansour-Saatloo et al. [29] optimized power and heat management in decentralized multi-microgrids, which included power-to-hydrogen and power-to-heat units. Heat was also produced with separate cogeneration units. The privacy of the data related to microgrids was secured with an alternating direction method of the multipliers (ADMM), enabling decentralized optimization and scalability. In another contribution, Chen et al. [30] analyzed microgrids involving demand response and cogeneration units, finding that power-to-gas greatly increased the flexibility of the system. Thus, 16.94% more wind power could be utilized. Generally similar, various energy grid or dispatch problems that include P2X and cogeneration units without utilizing P2X waste heat have been studied extensively, for example, [31][32][33][34].
Studies considering the potential of P2X waste heat are more scarce. Ikäheimo et al. [35] created an investment and dispatch model that utilizes the waste heat of electrolysis and methanation as district heat. The temperature from electrolysis was increased using a heat pump. Production of both heat and fuels by P2G was found to be beneficial for system cost, making P2G attractive for the energy system. Karjunen et al. [36] mapped wind and bio-CO 2 resources and the corresponding power-to-methanol production. In addition, required heat pump and thermal energy storage capacities were studied for scenarios in which the whole district heat demand of the city of Oulu would be provided by the waste heat of electrolyzers. A heat pump was considered to increase the temperature of the waste heat.
For more comprehensive information, reviews are available for electrolysis [19], methanation [22], and power-to-liquids (methanol, DME, and FT) [23]. Examples of detailed process models can be found for alkaline water electrolysis [37], methanol synthesis [26], and methanation [38]. P2X technology is mainly at the pre-commercial state, with few MW-scale projects commissioned. Reviews of various projects are presented and analyzed by Heymann et al. [39] and Wulf et al. [21].

Operation
The operation of a P2X plant can be divided into two levels: scheduling and process control. Scheduling determines how the process interacts with the rest of the energy system, for example, when power is used to generate hydrogen. Process control determines how the rest of the plant is operated with the given hydrogen feed. The target of scheduling is to obtain the economic optimum, while process control is used to keep to process within the technical limits and optimize technical performance [40].
The scheduling of P2X systems is characterized by the variable energy input (wind and solar power) and the price of the energy [24]. The material source of CO 2 is often considered rather constant [41]. Additional complexity is created due to different transient capabilities of system components. As an example, distillation is a crucial part of methanol synthesis, and it is rather difficult to operate in a transient manner [41]. In contrast, electrolyzers are able to operate in a very flexible manner [19].
In terms of P2X process control, there are two extremes: (1) the load of the process follows inputs strictly, or (2) the load is constant, and variation of inputs is leveled out by storage. Storage may be applied for one or several gases [42] and/or for the electricity to produce hydrogen [43]. In any case, automation and control is required to start up, shut down, and maintain the process at a certain set point.
For scheduling, conventional optimization methods such as linear programming (LP) or mixed-integer linear programming (MILP) are used. These methods require simplified physical models that can be used as optimization constraints as defined by the optimization method. Process control requires knowledge about the design and off-design performance and the procedures for startup and load change. These two levels of operation, scheduling and process control, are interconnected.
Both scheduling and process control are affected by the environment in which the P2X plant is operated. The plant can be considered a standalone system, so it does not affect to the rest of the energy system, and its only purpose is to make the end product with as low cost as possible. In this case, the plant takes only the resources and prices as inputs, which is a common assumption for techno-economic analyses [26]. Several end products may be considered, such as heat, oxygen, or grid services, but the revenue from them is considered only to decrease the production cost of the main end product [44].
Instead of minimizing the cost of the end product, the target could be to maximize the revenues and the overall profitability of the P2X plant. This could also include operation as energy storage by returning electricity to the grid when needed. The difference compared to the previous option is mainly in the way the costs and revenues are allocated. Another option is that the plant acts as part of the energy system, and optimal operation is considered at the system level, as in [45]. This way, the total system cost can be minimized. However, the operation is not optimized from the point of view of a single P2X plant.
Process models for P2X plants are usually very complicated, and are thus too computationally heavy to be used for scheduling or real-time operation control. Therefore, process models are simplified to a simple set of equations and constraints that can be implemented in the scheduling software, while losing some of the details of the physical model. Another option is to create a surrogate model [46] through machine learning, which is computationally lightweight but can still represent the physical behavior accurately. Cui et al. [47] used a NARX model successfully for an e-methanol plant. Tahkola [48] studied and compared four different machine learning methods for an e-methane plant using a Keras neural network: ARX, NARX, LSTM, and GRU. The resulting NRMSE was 1.94-3.60%. Shokry et al. [49] trained an AI model with two different knowledge sets of a chemical process: (1) only input and output signals were available as training data, and (2) a mathematical model was available for the creation of training data.

P2X Plant as an Industrial Cyber-Physical System
Processes that are constituted by logical decision-making and physical relations are the definition of what is called cyber-physical systems (CPS) [1]. An important aspect under this concept is that every CPS is composed of three layers: physical, data, and decision. In the case of P2X plants, these layers are defined as follows. The relationship between layers is close, and data usually flow in a loop from physicaldata-decision-physical layers. Standardization of the plant and looking as a CPS simplifies the relation between layers, and finding strong points within them can be used to optimize the operation process. Usually, communication between layers can also be a key factor, as critical applications can benefit from fast connections.

Optimization Methods
Optimization consists of the selection of the best element from a given feasible space of possible solutions/settings. It involves minimization or maximization of one or multiple variables of a function following a set of constraints. Optimization methods can be divided into two major categories: deterministic and stochastic (see Figure 2). Deterministic methods can reach a definite answer without uncertainty, while stochastic methods reach an approximate answer [50]. Moreover, another significant difference between these two major classes, is that deterministic methods can take longer to compute, and for stochastic methods, a wide range of different algorithms and programming toolkits have been developed, which makes it easier to adapt the objective function depending on the application. A big disadvantage of stochastic methods is that, due to their way of searching the dominion space, they might get trapped in local minima (or maxima) when it comes to nonlinear functions.

Optimization Deterministic Stochastic
Branch methods

Relaxation and approximation methods
Heuristic methods Monte-carlo

Internet of Things
The Internet of Things (IoT) is one of the rapidly growing technological fields that is used to connect physical devices (objects) using different communication techniques; it is a key enabler of CPSs. IoT is based on connectivity, being it wired or wireless, which is necessary to virtualize physical processes and to enable the aforementioned data and decision layers. Connectivity should thus be flexible to meet the different requirements (mapped in Quality of Service) of sensors, device types, and applications. For instance, MQTT and HTTP are important communication protocols that are used for the efficient connection and sharing of information [52]. The data process of IoT can be organized into different blocks that work together to achieve a specific task [53]. In the following, we explain each of them in more detail.
Identification block: Identifies the devices in the IoT network via object IDs, which are the names and object addresses of devices [53,54].
Sensing block: Sensors are mostly used to acquire/collect data from the devices/objects. The data are then transmitted to the cloud (or other data processing unit) through a communication network [55,56].
Communication block: IoT devices, which potentially exist as a huge number of heterogeneous devices, exchange their respective data with the IoT platform and/or with each other. Examples of communication protocols used in in this block are CoAP and MQTT [53,57].
Computation block: Two specific parts, hardware and software, can be defined here. Hardware is used to build and (physically) run the the IoT applications (i.e., the actual computers). Well-known examples are Arduino, Raspberry Pi, and Intel Galileo. Software performs the logical (cyber) operations related to the applications, (e.g., the operating system that is active in the hardware). Another example of software is in the cloud platform to which the devices logically connect and send data for analysis [57].
Service block: There are four key elements in this block. One is the identity-related services that can, for example, broadcast data to other elements. Another is the aggregation services that aggregate and process data. The third one is the collaborative-aware services that make decisions and then take actions based on the information provided by aggregation services. Ubiquitous services offer collaborative-aware services [55,58,59].
Semantic block: This block is used for machines to get knowledge for the IoT services. Knowledge extraction can include finding and using resources, modeling processes, and recognizing and analyzing data to make decisions [55,57].

Artificial Intelligence
The field referred as to artificial intelligence (AI) has played a significant role in modern times, having a great impact in applications such as image recognition, medical expert systems, and weather forecasting [60]. Plenty of industrial applications are now being designed using AI methods. An important key factor for its acceptance is the simplicity of its deployment together with its accuracy in solving real-world problems. AI is usually based on three necessary components: data, model, and evaluation metric [9]. The amount of data and its quality are both important to properly train and test ML models in order to minimize loss functions. AI can be used to make/support decisions (e.g., expert systems), classify data (e.g., image classification), and predict outcomes (e.g., energy consumption forecasting). Overall, AI has proved to be a powerful tool to deal with many problems that cannot be solved deterministically or that are computationally expensive to be solved. In fact, as an applied statistical method based on data, AI/ML has now taken part in most ordinary internet application and also in electronic appliances. Integration of technologies in the framework of Industry 4.0 is expected to increase efficiency in factories, and if designed properly, it may support environmental targets such as CO 2 emissions [61].

Metaheuristics
Metaheuristic methods (sometimes considered a subfield of AI) are search techniques that fall behind heuristics definitions without being problem-dependent. Usually employed for optimization, metaheuristic techniques perform an intelligent search of the search space for a given function without the need to make a rigorous mathematical model [62]. Additionally, metaheuristic algorithms have proven to be flexible and computationally cheap. In terms of the intelligent search provided by metaheuristics, many principles or techniques have been proposed. Algorithms can be based on evolutionary programming, trajectories, nature, ancient-inspired, among others. For different applications, some might be more effective than others, and adaptation from one application to another is a simple task as long as the objective function, the boundaries, and the restrictions are well-defined. Moreover, similar to machine learning methods, the algorithms count with different parameters that can impact how the space search is done. A good practice is to tune the parameters over multiple rounds in order to find the optimal solution and to check several times that the algorithm is not trapped in a local minimum. Metaheuristics are also good candidate for industrial applications in P2X; they often require multi-objective optimization to solve energy scheduling problems.

Machine Learning
Machine learning (ML) is an artificial intelligence discipline that enables machines to automatically learn from data and previous experiences while looking for patterns to make accurate predictions with minimal human involvement.
The working of machine learning is explained in Figure 3. Initially, the machine learning algorithm is trained with the training dataset (old data) in order to create a model. Here, the machine learning algorithms are trained with previous datasets. Once the machine learning model is trained, input data are provided for calculations and future prediction. Once predictions are obtained from the input data, these predictions are evaluated and matched with the actual results. If the predictions are close to the actual information, then decisions are made based on the predictions. In case the predictions are not close to the actual information (accuracy), then the machine learning algorithm is trained again with more historic data (training data), and the same procedure is applied again to get better prediction accuracy that is close to the actual information.

Working of IoT and Big Data
In CPSs, IoT devices acquire and communicate a huge amount of data that needs to then be processed in an efficient way to obtain information about the physical process under consideration. IoT and big data usually refer to two different, although related, ICTs [63]. IoT devices acquire data, which can be structured, unstructured, or semi-structured, that, in aggregate, results in so-called big data [64]. As handling, processing, and storage of the big data created by the interconnect IoT machines are unfeasible for traditional data processing technologies, new techniques have been developed [65]. In particular, the massive amount of data needs sufficiently large data processing and storage units, which are commonly associated with cloud computing [66]. Cellular networks such as 5G are also seen as a key enabler for cyber-physical systems [1]. They are expected to offer the required speed, reliability and latency for different sets of applications, either for industries or for humans [67,68]. The working of IoT and big data is depicted in Figure 4.  It is also important to highlight the key requirements for big data in IoT considering both functional and non-functional aspects. The main points are listed next.
Connectivity: To enable IoT, connectivity (either wired or wireless) shall be ubiquitous. Only if data can be transferred can big data exist. In practice, devices are connected wirelessly using 4G/5G or Wi-Fi to the internet, where the big data are processed in the cloud [69].
Storage: As expected, big data require large data storage units in order to process the IoT-generated data streams [70].
Quality of service (QoS): This is the quantifiable performance requirement related to different applications; it is also related to big data processing [71].
Real-time analytics: Time-sensitive operation of different processes requires minimal delays from the communication and data processing units related to IoT and big data. New network topologies, communication protocols, and data processing methods have been developed focusing on real-time processing of data streams [68,72].
Benchmarks: With the digitalization of many processes, their newly deployed cyberphysical operation must have its performance evaluated. In this case, benchmarking is necessary to test the effectiveness of the IoT and big data methods used [73].

Example: Theoretical Architecture for Deep Learning-Based Activation of Electrolyzers
This section explains the advanced architecture of a P2G system by including advanced data-driven methods such as IoT, big data, and machine learning. It is important to highlight that the proposed example is only an illustration of the systematic methodology reviewed in the previous sections. In this case, a very detailed description of the simulation from which data are generated is beyond the scope of this review article; the scenario is a simplification of a previously presented case [6]. The proposed solution is schematically presented in Figure 5.

Data Acquisition and Communication Network Architecture
The IoT-based system is then composed of four interlinked stages. During the first stage, the IoT sensor devices are implemented in the whole physical infrastructure (renewable energy sources, electrolysis process, and hydrogen and methane storage) of the P2X process for data collection. During this stage, the data are from various parts of the proposed architecture, for example, solar panels, wind turbines, air pressure, atmospheric temperature, electricity price, the amount of electricity provided to the electrolysis process and CO 2 capture, how much H 2 is generated and stored, how much H 2 and CO 2 are utilized to generate methanol, and how much methanol is produced.
In the second stage, the generated data in Stage 1 are transmitted and stored in cloud storage for further processing; this step requires wired or wireless connectivity to the internet, or in some cases, to local computing units based on edge computing or private networks [1].
In the third stage the huge amount of stored data are directed to big data analytics tools for further processing. The big data consist of all formats (structured, semi-structured, and unstructured) of data. The data generated by the IoT services then create opportunities to improve industrial services. For example, the data generated from IoT sensors can be analyzed in real-time for better presentation of information as part of an expert system in order to improve future decisions and system operations. The big data process can be further divided into different phases, which are presented next.

•
Initial phase: The data acquisition stage is where big data generated during the previous phase is stored considering the specification of the end application. The master node of the Hadoop cluster is then sent the acquired data. Data need to be prepared due to the variety of data formats from the heterogeneous devices. In data preparation, accurate and incomplete data are handled, and incomplete data are either fixed or removed. Data collection is executed via Flume, which compiles, combines, and sends massive amounts of data to the Hadoop master node. Flume keeps track of the data it receives in one or more channels. • Second phase: Following that, the data are sent to an outside Hadoop Distributed File System (HDFS) repository. Data are then serialized and written in the required format by storing individual blocks of large files on numerous data nodes connected to the master node. HDFS is capable of storing any type of data: structured, unstructured, or semi-structured. To conform to the desired format, the serializers rearrange and modify the Flume data, which are kept in various HDFS clusters for processing. The HDFS clusters are made up of DataNodes. The actual data and file system metadata are jointly stored in these DataNodes. The two run on the same set of nodes, allowing jobs to be handled on nodes where the data are present. YARN is used to analyze data stored in HDFS. • Third phase: SQL queries are executed during this phase, which can be executed on HDFS data using the tools Hive and Impala. Specifically, HIVE is utilized for data querying, data selection, analysis, and computation on the pertinent data. • Last phase: The last step is data analytics and involves sharing the processed data to be used as a decision-support tool. Scalable Advanced Massive Online Analysis (SAMOA) is employed as a distributed streaming machine learning framework to perform data analytics in Hadoop.
The fourth stage is the prediction stage. In this stage, the processed data from big data storage are provided to the machine learning or to the expert system, either as a training dataset or decision-support tool.

Data Processing Using Machine Learning
Training data were produced with a MATLAB model of 10.0 MW electrolysis, hydrogen storage, and methane synthesis. A constant efficiency of 65% was assumed for electrolysis, and stoichiometry was considered for synthesis, with 100% conversion of input gases. A minimum part-load of 80% was assumed for the synthesis, and the system is not allowed to shut down synthesis. The capacity of the hydrogen storage is 4.0 h, determined based on the maximum hydrogen consumption of the synthesis. The feed rate of hydrogen to synthesis is a function of storage level and minimum part-load of the synthesis. Capital costs of 750 EUR/kW, 500 EUR/kW, and 600 EUR/kg were assumed for the electrolyzer, synthesis, and hydrogen storage, respectively. Historical hourly prices were used for the input electricity. The model is based on the power-to-gas model from [6] and extended to enable optimization of operation with variable electricity prices. As indicated before, the idea of this numerical example is to provide a simple illustration of how the proposed articulation of the recent advances in ICT could be used in a P2X process in general and could be experimentally tested, and how this may stimulate further research in this unexplored field.
In a nutshell, the proposed framework is developed based on learning the optimized operational settings for given inputs. In the language of the machine learning community [9], our numerical example illustrates a way to find a model (empirical function) using "neural networks" based on labeled data that minimizes a loss (error) function. Specifically, the model needs to indicate the electricity price threshold in the day-ahead market at which electrolysis should be switched on in order to fill the storage unit (i.e., charging the storage). In the same way, the electricity price discharging threshold is found. This optimal solution should run daily and should also consider the initial state of the storage unit (how much it is filled with hydrogen).
To generate the dataset to run the supervised learning, an in-house, time-consuming, reduced brute force method was used to determine the operation of the electrolyzer in order to minimize the levelized cost of methane (end product). An example for one week of operation is presented in Figure 6. As can be seen, the hydrogen storage is charged during the periods with cheaper electricity and discharged when electricity is more expensive. For the rest of the time, hydrogen is produced to only maintain the minimum part-load of the synthesis. The dataset to be employed in our AI/machine learning model consists of 310,690 days, and each day is divided into 24 h associated with given electricity prices. Each 24 h cycle is also initiated with a random storage level (in terms of percentage) and with random hourly electricity price of 0-100 EUR/MWh. Note that what is important to train the model is not the actual price, but covering of the input space, which consists of 25 variables (24 hourly prices and the storage level) for given fixed operational and cost parameters (as described above). The outputs are the optimal charging and discharging thresholds (T1, T2). The schematic of the model is shown in Figure 7. In this case, the training data were obtained from the MATLAB model, and they contain 310,690 rows and 27 columns. Columns 1 to 24 are electricity prices, Column 25 refers to the initial state of hydrogen buffer storage, Column 26 is the price threshold to charge storage, and Column 27 is the price threshold to maintain minimum part-load of the synthesis.
The outcome dataset was then used for training a deep learning algorithm. The parameters of the algorithm were as follow:  In term of computational time, the model took about 185 s for training, about 9 s per epoch. The problem was treated as a regression, and the R2 score was around −0.566. The comparison between curves obtained performing the regression testing and data for limit T1 can be seen in Figure 8, which shows the upper limits of the price spot to produce hydrogen based on the the 24 h spot price and hydrogen buffer store. The variability of the data reflects the model outcome, as the trend is not easily followed.
It is clear that the trained model could be improved, but this example is only illustrative of the framework proposed based on the systematic review carried out in this paper. In summary, this result is not intended to improve or extend the state-of-the-art methods, but only to point out how the most recent advances in ICT can improve automated decisionmaking by reducing computationally demanding optimization through new AI methods. We expect that these results will open the path for the needed research and development of cyber-physical operation of industrial processes, aiming at more sustainable energy consumption, possibly by going beyond market prices and focusing more on renewable (intermittent) generation as inputs; this will lead to a more dynamic energy system, which would greatly benefit from the proposed framework for AI-based operation instead of highly complex optimization methods that hardly work in real-time.

Conclusions
This article reviewed the use of recent developments in ICT, such as IoT, big data, and machine learning, in the operations of P2X processes. Specifically, this study focused on renewable electricity production that would benefit in the long term by using the latesttechnology P2X and how to effectively deploy recent ICTs to support its operation. In this sense, we described how data are gathered, distributed, and processed in P2X scenarios and also introduced existing technologies for implementing such CPSs.
The importance of this research area is enormous. P2X technology has great potential for electric grid load-balancing, renewable integration, and the hydrogen economy by connecting the power and gas vectors in a flexible utility network capable of storing energy from multiple sources and using it for a variety of applications. It must be made abundantly clear that RES-based energy systems, which will gradually phase out fossil fuels, require dependable long-term storage (P2G fulfilling the required criteria only). By producing H 2 as an intermediate product, converting energy through electrolysis, and storing the fuel until a period of high power consumption, at which point it is converted back into electricity or used for other purposes, P2G differs from other storage technologies. A further step is considered to produce synthetic natural gas (SNG) to be injected into the gas grid, which has advantages over hydrogen and electricity in terms of storage, transport, and uses. This enables cross-sector integration of surplus, low-value renewable energy in energydemanding sectors such as transportation and industry, facilitating further decarbonization of these industries while simultaneously opening up new sources of system flexibility in the power sector. In our understanding, the coordination required by such integration requires the pervasive use of the ICT tools described here.

Acknowledgments:
The authors gratefully acknowledge the public financing of Business Finland for the 'HYGCEL' project.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

P2X
power-to-X P2G power-to-gas