1.1 Energy Transition: Definition, Motivation, and Challenges

Facing the problem of global climate change and the scarcity of fossil sources requires the transition to a sustainable energy generation, distribution, and consumption system. Energy transition [1] aims at pushing towards replacing large, fossil-fuel plants with clean and renewable resources, such as wind and solar energy, with distributed generation. The latter allows generating electricity from sources, often renewable energy sources, near the point of use in contrary to centralized generation from power plants in traditional power grids.

Energy transition aims also at integrating more efficient technologies, practices, and services in order to reduce the energy losses and wastes. However, the increasing penetration rate of renewable energy into the grid entails to increase the uncertainty and complexity in both the business transactions and in the physical flows of electricity into the grid because of their intermittency due to their strong dependence on weather conditions. As an example, the electricity production of solar photovoltaic panels is high in the morning when demand is low, while it is low in the evening when the demand is high. This can impact the grid stability, i.e., the balance between supply and demand.

The energy consumption is continuing to increase as electrification rate grows. Therefore, the use of distributed energy resources (DERs) [2] through shifting users from being only consumers to be also producers, called prosumers, leads to increase significantly the grid capacity. A DER is a small-size energy generator used locally and is connected to a larger energy grid at the distribution level. DERs include solar photovoltaic panels, small natural gas-fuel generators, electric vehicles and controllable loads, such as electric water heaters. The major interest of a DER is that the energy it produces is consumed locally, i.e., close to the power source. This allows reducing the transmission wastes. A set of DERs that operates connected to the main grid or disconnect (island mode) is called a microgrid [3].

However, the energy transition faces multiple challenges such as ensuring:

• grid stability with a large penetration of renewable energy resources into the grid,

• active participation of users in order to optimize their energy consumption and to improve the balance between supply and demand,

• maximal use of renewable energy produced locally in particular during peak demand or load periods.

To cope with these challenges, the traditional electricity grid requires undergoing a transition to be more resilient, reliable, and efficient. This can be achieved by a transition towards a smart grid (SG) in which a two-way flow of power and data between suppliers and consumers is provided. SG [4] includes an intelligent layer that analyzes these data volumes produced by users and production side in order to optimize the consumption and the production according to weather conditions and the consumer profile and habits. The goal of this analysis and treatment is to maximize the grid flexibility, stability, efficiency, and safety.

Flexibility [5] can be defined as the ability of the electricity system to respond to fluctuations of supply and demand while, at the same time, maintaining system reliability. As an example, grid operators can use a set of photovoltaic panels, batteries, electrical vehicles, chargers, etc., in order to modify generation or consumption to stabilize grid frequency and voltage. Power retailers can reduce costs during peak demand periods by using stored energy or deleting (shifting) deferrable loads in order to reduce consumption based on price or incentive signals. Energy storage through distributed batteries can increase the resilience and reliability of grid thanks to their aggregated stored energy that can be used during outages or peak demands hours knowing that the majority of outages are caused by disturbances in the distribution system.

In addition, it is important to detect both internal and external faults during operations and react quickly in order to find a safe state to reach it. Internal faults are related to the system’s internal components (generators, converters, actuators, etc.), while external faults are related to environmental interactions not expected or not modeled during system development. Moreover, due to the extensive use of advanced Information and Communication Technologies (ICT), such as Internet of Things, in the SG, the latter becomes vulnerable to hacker attacks. Indeed the use of ICT allows hackers to have multiple entry points to the grid in order to infiltrate the control centers of several power plants. These attacks can impact significantly the reliability of the grid by turning off the power of entire cities (airports, road networks, hospitals, etc.).

Therefore, it is essential to develop advanced management and control tools in order to ensure the safety, reliability, efficiency, and stability of the SG. To this end, the intelligent layer of the SG uses artificial intelligence techniques and tools in order to achieve prediction [6, 7] and/or optimization [8], as it is discussed in the next section.

1.2 Artificial Intelligence for Energy Transition

The AI methods are used for prediction and/or optimization. The goal of prediction is to predict the electrical energy consumption or demand [6, 7], the produced energy by wind turbines or photovoltaic panels, the health state [9] of a component or machine. The optimization aims mainly to perform cost minimization, peak reduction, and flexibility maximization. The cost minimization [8] aims at optimizing the energy consumption or/and the energy bill or price for a customer as well as the potential risk related to a cyber-attack or to a fault. The peak reduction problem [10] aims at ensuring the balance between the energy demand and energy production during the periods where the demand is very high. Flexibility maximization [11] aims at finding the maximal energy that can be deleted at a certain point of time based on energy-consuming and energy-producing devices in residential buildings. The flexibility is then used to ensure the balance between demand and supply.

The use of AI techniques to perform prediction and/or optimization within the energy transition faces several challenges. Prediction of energy consumption as a function of time plays an essential role for the efficiency of the decision strategies for energy optimization and saving. The variability introduced by the growing penetration of wind and solar generations hinders significantly the prediction accuracy. In addition, this energy prediction is performed at different time horizons and levels of data aggregation. The learnt models must be enough flexible in order to be easily extendable to these different time scales and aggregation levels.

In addition, the learnt model requires historical data about the building/user/renewable energy resources consumption behavior (users’ energy consumption behavior, building’s energy performance, weather conditions, etc.) such as energy prices, physical parameters of the building, meteorological conditions or information about the user behavior. However, sometimes there is no historical data available due, as example, to the appearance of new buildings. Therefore, the energy prediction must be performed without the use of historical data about the energy behavior of the building under consideration.

Finally, the built model in order to perform prediction and optimization requires adapting in response to building renovation and/or introduction of new technologies as well as user’s consumption behavior. This adaptation in the model’s parameters and/or structure is necessary in order to maintain the prediction accuracy and optimization efficiency.

1.3 Beyond State-of-the-Art: Contents of the Book

According to the aforementioned challenges discussed in the previous section, the book is structured into three main parts, where in each of them different AI methods (Artificial Neural Networks, Multi-Agent Systems, Hidden Markov Models, Fuzzy rules, Support Vector Machines, first order logic, etc.), energy transition challenges (availability of data, processing time, kind of learning, sampling frequency, time horizon and physical-scale granularity, etc.) operational conditions (centralized, distributed), and application objectives (prediction, control, optimization) as well as domains (demand side management, energy management, flexibility maximization, load monitoring, battery configuration, conversion system or power system monitoring, etc.) are discussed:

  • Artificial intelligence for Smart Energy Management (Chaps. 2, 3, 4, and 5),

  • Artificial intelligence for Reliable Smart Power Systems (Chaps. 6, 7, 8, and 9),

  • Artificial intelligence for Control of Smart Appliances and Power Systems (Chaps. 10, 11, 12, and 13).

1.3.1 Chapter 2: Large-Scale Building Thermal Modeling Based on Artificial Neural Networks: Application to Smart Energy Management

This chapter proposes a smart building energy management system (SBEMS) in order to help users to reduce their consumption, in particular by optimizing their use of heating, ventilation, and air condition system. The proposed SBEMS is based on the prediction of thermal dynamics in different instrumented and non-instrumented zones in a large scale building. This prediction is based on the use of neural networks. The latter have as inputs the electric power consumption for heating, in instrumented (equipped with sensors) and non-instrumented zones as well as the weather conditions (outdoor temperature, outdoor humidity, and solar radiation). The output of the neural networks is the estimated indoor temperature for both instrumented and non-instrumented zones. The inputs of the neural networks are discretized into segments, with minimal and maximal values, indicating different meaningful behaviors (states). Moving from one segment to another generates an event. A recommender is built as a finite state automaton composed by these states and events. At each state, a recommendation is provided to users in order to invite them to adopt a “green behavior and/or activity.” As an example, if the indoor temperature is in the upper level, then the recommendation could be to lower the thermostat for one graduation to save energy. The proposed approach is applied for smart energy management of student residential building. Different thermal behaviors are recorded in order to obtain a rich learning and testing data set. The proposed approach (neural networks and the recommender) is implemented and tested using a smart interactive interface composed of different levels (webpages) allowing users to obtain information about their thermal zone (energy consumed, its cost, average temperature, trend of electrical consumption, etc.) and to display the recommendations linked to the user activity and the quantity of energy saved thanks to the application of these recommendations.

1.3.2 Chapter 3: Automated Demand Side Management in Buildings: Lessons from Practical Trials

This chapter discusses the problem of demand side management (DSM) in particular within the context of energy transition (smart grids, distributed energy resources, etc.). It focuses on the use of artificial intelligence techniques to answer the challenges (response time, data available, privacy issues, etc.) related to this problem. It presents the DSM’s motivations and objectives around demand reduction (energy efficiency), demand response (local or self-consumption of energy generated by distributed energy resources), user engagement (interaction between energy companies and building occupants), engagement on investments, engagement on operations, price optimization, and providing ancillary services (load and production modulation, frequency regulation). The chapter divides the DSM problem into problem of forecasting and problem of automated control. Then, it divides the methods of the state of the art used for forecasting and control into artificial intelligence (data-driven, model-free) and model-based (model predictive control, model-based reinforcement learning, etc.). The goal is to discuss the advantages and drawbacks of these methods according to the challenges related to the problem of DSM within the context of energy transition. The chapter highlights the use of transfer learning in order to avoid the problem of lack of availability of data and to improve the model accuracy as well as its training or learning time. It provides also guidance to select the adapted methods for forecasting and control.

1.3.3 Chapter 4: A Multi-Agent Approach to Energy Optimization for Demand-Response Ready Buildings

This chapter proposes a distributed energy optimization approach as a multi-agent system in order to perform energy management in buildings that are equipped with a wide range of energy-consuming and energy-producing devices such as household appliances in residential buildings, photovoltaic, and local generators. The consuming energy-devices consist of fixed and flexible (sheddable and shiftable) load while energy-producing generators are curtailable local energy sources. Each type of devices is represented by an agent an objective function that incorporates user constraints and demand-response incentives. The optimization of the objective function is performed using the alternating direction method of multipliers. The goal of the optimization is to obtain the optimal energy flow (i.e., consumption and generation) that takes into account the incentives for demand-responses schemes, the electricity prices (real-time pricing or time-of-use pricing) while respecting user constraints (inconveniences). The advantage of the proposed approach is twofold: it takes into account both price-based demand response as well as incentive-based demand response together with consumers’ inconvenience when applicable and preserves user privacy since each agent performs its local optimization based on its local model. The proposed approach is applied to a prosumer building with a connection to an energy supplier (i.e., external tie) and equipped with a photovoltaic (PV) for local uses. Several scenarios simulating different consumption, production, and demand-response requests with time horizon of 24 h divided into 96 time periods (TP) of 15-min interval are conducted. The goal is to measure the reduction in energy bill and imported energy from grid for different fixed amounts of consumption (i.e., fixed load) that must be satisfied, and amounts of flexible consumption (i.e., shiftable load and sheddable load) that can be shifted or shed to some extent over a given time frame.

1.3.4 Chapter 5: A Review on Non-Intrusive Load Monitoring Approaches Based on Machine Learning

This chapter presents a survey about the problem of residential non-intrusive load monitoring (NILM) and discusses its challenges and requirements. Residential NILM aims at recognizing the individual household appliances that are active (consuming) from the total load in the house (the total consumption). This recognition is performed without the need for any additional sensor but only the total consumption provided by the smart meter. The goal of residential NILM is twofold. First, it allows inviting consumers to adapt a conservative “green” consumption behavior by optimizing their consumption according to their profile or activity (e.g., his presence and behavior). Second, it can improve their involvement in the demand-response program by scheduling their activities (consumption) while respecting their comfort. The chapter presents the three steps of a NILM framework: data acquisition, feature extraction, and inference and learning. Data acquired about the user consumption can be samples either at low or at high frequency. The sampling frequency determines the features that can be extracted in the second step of NILM framework. Indeed, the extracted features can be related either to the appliance stable consumption states or conditions such as the active power. In this case, low frequency sampling is adapted. However, features related to the transition dynamics between different stable states require a high frequency sampling rate because of the very short time laps of the transition. Contextual features, such as time of use or its duration, can also be extracted in order to better distinguish appliances of close consumption behaviors. Then, the chapter studies the machine learning approaches used to perform the appliance active state recognition. It divides them into event-based and probabilistic model-based. The chapter focuses on probabilistic model-based approaches, in particular hidden Markov models. For the latter, the chapter discusses their performances around their kind of learning (supervised, unsupervised, semi-supervised) and the used features (stable, transient, and contextual).

1.3.5 Chapter 6: Neural Networks and Statistical Decision Making for Fault Diagnosis in Energy Conversion Systems

This chapter presents a model-free approach based on the use of feed-forward neural networks (FNNs) in order to perform the fault diagnosis of DC-DC conversion systems. Indeed, DC-DC conversion systems, widely used in many applications, such as photovoltaic power pumps or in desalination units, undergo different faults impacting their efficiency, reliability, and lifetime. These faults can impact either their mechanical part (DC motor) or electrical part (DC-DC conversion). This chapter proposes the development of a model based on the use of FNNs with Gauss-Hermite activation functions in order to model the power conversion systems’ dynamics in normal operation conditions. In FNNs with Gauss-Hermite, the activation function satisfies the property of orthogonality as the case of Fourier series expansions. A fault is detected when the difference between the FNNs output and the real output is greater than a certain threshold. The latter is determined using the χ2 statistical change detection test with 98% confidence interval. For the fault isolation, the χ2 statistical change detection test is applied to the individual components of the DC-DC converter and DC motor energy conversion system. The fault is isolated by finding out the individual component that exhibits the highest score. The proposed approach has been tested using several simulation experiments in normal operation conditions and in presence of faults generated using an energy conversion system turning solar power into mechanical power.

1.3.6 Chapter 7: Support Vector Machine Classification of Current Data for Fault Diagnosis and Similarity-Based Approach for Failure Prognosis in Wind Turbine Systems

This chapter proposes a data-driven approach based on the combination of physical and reasoning models in order to perform the fault diagnosis and prognosis of wind turbine systems. The goal is to decrease the maintenance costs of wind turbines. The physical model is built using the Bond Graph (BG) methodology. This allows to exploit the already available knowledge about the wind turbine dynamics (the phenomena of transformation of wind power into mechanical power and then into electrical power, the phenomena of power conservation and dissipation, etc.). This model is then used to generate data sets about faults in critical components for which it is hard to obtain enough of data. The reasoning model is based on the use of a Multi-Class Support Vector Machine (MC-SVM) classifier. The goal of the latter is to detect online the occurrence of degradation. When degradations are detected, the fault prognosis is activated. The goal is to estimate the remaining useful life before the wind turbine reaches the failure threshold (end of life). This estimation is based on the geometrical degradation speed in the feature space. The chapter evaluates the proposed approach using two evaluation metrics: the prognosis horizon and αλ performance. The obtained results show that the proposed approach is able to perform the fault diagnosis and prognosis of four tested faults: unbalance caused by a deformation of the blade, unbalance in high speed shaft, stator eccentricity in the generator, and electrical faults in the stator resistance.

1.3.7 Chapter 8: Review on Health Indices Extraction and Trend Modeling for Remaining Useful Life Estimation

In this chapter, an overview of approaches used for fault prognosis is presented. These approaches aim at estimating the remaining useful life before the failure (end of life) occurs. The interest of fault prognosis is twofold: alerting supervision operators of the future occurrence of a failure, and giving them a sufficient time to plan the maintenance actions. The chapter focuses on fault prognosis as a horizontal approach allowing to link fault diagnosis and fault prognosis. It classifies these approaches into three major categories: expert, physical model-based, and data-driven approaches. Then, it focuses on data-driven approaches by showing how the health indices are built and evaluated. Indeed, health indices are used to follow the evolution (decrease) of the system health (ability) to perform a task. Therefore, it is used to estimate the remaining useful life. The chapter presents some meaningful criteria (monotonicity, trendability, prognosability, prognosis horizon, relative accuracy) in order to evaluate the built health indices and the estimated remaining useful life. The chapter compares the performances of several major approaches of fault prognosis and discusses their limits as well as their future challenges.

1.3.8 Chapter 9: How Machine Learning Can Support Cyber-Attack Detection in Smart Grids

This chapter provides an overview of the major components of smart grids, kinds of attacks against them, and the machine learning techniques used for the attack detection. Through the presentation of the different components (generation, transmission, distribution, communication, consumption) of a smart grid, the chapter highlights its vulnerability to cyber-attacks against its cyber and physical layers. The chapter classifies these attacks around three categories: attacks on confidentiality (gaining access to data belonging to others), attacks on integrity (someone other than the legitimate device fraudulently claims to be that component), and attacks on availability (generating lots of traffic to overwhelm the capacity of target devices to render the services). Then, the chapter presents the detection methods that are used for the attack detection. They are classified into signature-based, anomaly-based, and specification-based detection. It highlights the advantages and drawbacks of three decision (attack detection) structures: centralized, partially distributed (hierarchical), and fully distributed. Then, the chapter focuses on Machine Learning approaches (Support Vector Machine, Neural Networks, K means, Hoeffding tree, etc.) used for the attack detection. It discusses the use of these methods (classification and regression) by dividing them into supervised, unsupervised, and semi-supervised learning approaches. The chapter shows the advantages and drawbacks of these different categories of approaches for the detection of the different attacks that can occur in smart grids. The chapter ends by discussing the open problems and the challenges to be addressed related to the problem of cyber security in smart grids.

1.3.9 Chapter 10: Neurofuzzy Approach for Control of Smart Appliances for Implementing Demand Response in Price Directed Electricity Utilization

This chapter proposes an approach in order to conduct the demand-response program at the appliance level by considering the evolution of electricity prices. Indeed, the amount of consumption of a set of aggregated loads is determined by a set of used appliances by the corresponding consumers. The proposed approach is based on two steps. In the first step, an extreme learning machine (ELM) is used in order to predict the future price of electricity during the time use of an appliance. To this end, a rolling time window of the ten previous prices of electricity is used as well as the current price. After the reception of a new current price, it replaces the oldest one in order to keep tracking the prices evolution with a fixed size of training set. The second step is a set of fuzzy rules. The goal of these rules is to determine the period of use (full, reduced) of an appliance according to the predicted and current electricity prices as well as the appliance’s operational variables. The advantage of this approach is its short time of training and processing in order to provide the output (the decision on the period of use of an appliance). Therefore, it is adapted for the implementation of demand-response program since the latter requires quick decision making. The proposed approach is applied to the demand-response program for heat, ventilation, and air condition appliance. The approach considers as input the actual temperature, the minimum desired temperature, the maximum desired temperature, and time for reaching the minimum desired temperature from the current temperature. Its output is the operational time of the appliance.

1.3.10 Chapter 11: Using Model-Based Reasoning for Self-Adaptive Control of Smart Battery Systems

This chapter discusses the use of model-based reasoning, in particular the first order logic, for the fault diagnosis and configuration of smart battery systems. The latter become increasingly important within the context of energy transition through their use in distributed energy resources, electric and autonomous cars. The chapter highlights the interest of performing the fault diagnosis and reconfiguration for smart battery systems in order to guarantee their safety during operation and to extend their lifetime. The chapter describes in detail a smart battery system comprising n batteries and k-1 wire cells. The different valid and invalid configurations are presented. The invalid configurations correspond to the ones that cause harm on side of batteries or the electronic or do not deliver the specified properties. Then, the chapter details the use of a model-based reasoning, in particular the first order logic, in order to avoid these invalid configurations in presence of faults (a battery run out of power when being used causing the given voltage to drop, or the required current cannot be delivered due to a faulty battery). The chapter shows how the developed approach sets up the right reconfiguration (connect, disconnect, or re-charge batteries) for fulfilling given electrical requirements (required voltage and current) and a diagnosis problem during operation of such battery systems.

1.3.11 Chapter 12: Data-Driven Predictive Flexibility Modeling of Distributed Energy Resources

This chapter treats the problem of the use of distributed energy resources (DERs) in order to assist conventional generators in providing ancillary grid services such as instantly overcoming local supply shortages, reducing costs during peak price hours, maintaining grid stability, etc. To this end, the chapter proposes an approach allowing quantifying the available load flexibility of an ensemble of DERs, in particular air conditioners and electric water heaters, to provide grid services. The proposed approach uses the notion of virtual battery (VB) in which the aggregated load flexibility of the ensemble of DERs is represented (stored) in the form of thermal energy. The modeling of the VB (first order) is based on the following components: Stacked Auto Encoder (SAE), Long-Short-Term-Memory (LSTM) network, Convolution Network (ConvNet), and Probabilistic Encoder and Decoder. They are used to find the VB model’s parameters (self-dissipation rate and lower and upper power limits) allowing quantifying the load flexibility that best tracks the regulation signal by respecting the consumer comfort. The aim of this model is to estimate the state of charge (soc) of the VB at time t with the initial soc and the regulation signal as input. In addition, the proposed approach combines two transfer learning Net2Net strategies, namely Net2WiderNet and Net2DeeperNet in order to update the VB’s parameters in the case of adding or removing DERs. Both of these two strategies are based on initializing the “target” network to represent the same function as the “source” network. The proposed approach is applied in order to quantify the soc of a set of 100 air conditioner devices and 150 electric water heaters by considering uncertainties in the water draw profile.

1.3.12 Chapter 13: Applications of Artificial Neural Networks in the Context of Power Systems

This chapter treats the use of machine learning techniques, in particular artificial neural networks (ANNs), to predict power flows (the bus voltage and the line current magnitudes), in power grids. The chapter focuses on the interest of using ANNs in order to provide an accurate estimation of line loadings and bus voltages magnitudes in distribution grids with a high percentage of distributed energy resources (DER). The estimation accuracy of power flows is crucial in order to identify fast and in reliable manner the critical loading situations and the energy losses in particular in low voltage (LV) grids. The goal is to improve the real-time monitoring of power systems, in particular at low and medium voltage level, for grid planning and operation. The chapter uses the open-source simulation tool Pandapower in order to generate suitable training and test sets for the built ANNs. Two ANNs are trained, one to estimate line loading and the other to estimate voltage magnitude. The estimation accuracy and the computation time of these ANNs are considered as performance criteria. The chapter presents the obtained results around the use of the trained ANNs for two case-studies: the estimation of grid losses and the grid equivalents. The grid equivalent aims at approximating the interaction at the interconnection of two interconnected areas operated by two different grid operators. The chapter highlights clearly the interest of using ANNs in order to address the challenges of power systems analysis related to the intermittent nature of DER and their increasing rate in power grids within the context of energy transition, the changing load behavior in particular with the increasing role of users as local producers, and the huge number of grid assets and their incomplete measurements.