Afef Ben Abdelghani

Sadok Maher

Dr Abdelbasset Massaoudi

Dr Ahmad Krama

Dr Qasim Darwish

Dr Rayane Khan

Dr Dabeeruddin Khalid

Eng Syed

Essid Lamjed

Energy management is an indispensable part of today's electrical systems and Smart Grid (SG) paradigms, especially with the high penetration of Renewable Energy Sources (RES). Thus, significant attention is paid from academia and industry to foster the synergy between these two paradigms as a means to accelerate the transition to a more diverse generation portfolio that includes an unprecedented amount of RES such as Photovoltaic (often shortened as PV) energy. Due to the ever-growing electricity consumption, stateof-the-art Artificial Intelligence (AI)-based techniques play a central role in providing necessary system flexibility to deal with the bulk integration of the PV energy for power-and-energy-efficient computing. AI lies at the core of forecasting methods to enhance the power delivery service between the grid-connected PV stations and end-consumers. In other words, the futuristic power grid infrastructure should rely on accurate PV Power Forecasting (PVPF) methods as a cornerstone of achieving unit commitment and stable energy supply. Nevertheless, designing effective energy management systems is complex because it involves designing components and hardware-software interfaces across the computing stack. So ubiquitous and complex are

The research presented in this dissertation benefited from the valuable insights and support of many people.

energy management mechanisms requiring a high level of scalability and generalization potential to gratify the load needs and cope with the meteorological factors' stochastic nature in tandem with optimal power grid stability. In an effort to break this stalemate, this research aims to explore the potential AI techniques for energy management between the energy-mix on the supply side and the load side. Consequently, the present work proposes efficient techniques to tackle the instability and intermittency of PV power production and its significant impact on the load demand.

First, a comprehensive overview of SG and energy management has been conducted. Next, various ML models-based PVPF have been introduced and applied to real-world scenarios to ensure an uninterrupted power supply. Afterward, innovative load forecasting methods have been proposed to cope with the volatile PV energy supply and accommodate the stochasticity of the customers' demand with efficient energy management strategies. Finally, SG stability methods have been proposed to predict the grid's state. This will aid in shaping the best strategies for preventive maintenance and risk hedging policies. This research thesis applies data science methods to the SG paradigm for effective dynamic control and management. vi

Résumé

La gestion de l'énergie est un élément indispensable des systèmes électriques d'aujourd'hui et des paradigmes des réseaux intelligents, en particulier avec la forte pénétration des sources d'énergies renouvelables. Ainsi, les universités et l'industrie accordent une attention particulière à la synergie entre ces deux paradigmes afin d'accélérer la transition vers un portefeuille de production plus diversifié comprenant une quantité importante d'énergies renouvelables telles que l'énergie Photovoltaïque (souvent abrégée en PV).

En raison de l'augmentation de la consommation énergetique, les techniques de pointe basées sur l'intelligence artificielle jouent un rôle central en fournissant la flexibilité nécessaire au système pour faire face à l'intégration en masse de l'énergie photovoltaïque. L'intelligence artificielle est au coeur des méthodes de prévision pour améliorer le service de livraison d'électricité entre les stations photovoltaïques connectées au réseau et les consommateurs finaux. En outre, l'infrastructure futuriste du réseau électrique devrait s'appuyer sur des méthodes précises de prévision de la puissance photovoltaïque pour l'engagement des unités et de l'approvisionnement énergétique stable.

Néanmoins, la conception de systèmes de gestion de l'énergie efficace est complexe, car elle implique la conception de composants et d'interfaces matériel-logiciel sur l'ensemble de la pile informatique. Les mécanismes de gestion de l'énergie sont si omniprésents et complexes, nécessitant un haut niveau d'évolutivité et un potentiel de généralisation pour satisfaire les besoins de charge et faire face à la nature stochastique des facteurs météorologiques en tandem avec une stabilité optimale du réseau électrique. Dans un effort pour sortir de cette impasse, cette recherche vise à explorer les techniques potentielles d'intelligence artificielle pour la gestion de l'énergie entre le mix énergétique entre l'offre énergétique et la demande énergétique. Par conséquent, le présent travail propose des techniques efficaces pour lutter contre l'instabilité et l'intermittence de la production d'énergie photovoltaïque et son impact significatif sur la demande de charge. Tout d'abord, un aperçu complet du réseau intelligent et de la gestion de l'énergie a été réalisé. Ensuite, diverses méthodes de prévision de la puissance photovoltaïque basées sur l'apprentissage automatique ont été introduites et appliquées à des scénarios du monde réel pour assurer une alimentation électrique ininterrompue. Par la suite, des méthodes innovantes de prévision de la charge ont été proposées pour faire vii face à l'approvisionnement en énergie photovoltaïque volatile et s'adapter à la stochasticité de la demande des clients avec des stratégies de gestion de l'énergie efficaces. Enfin, des méthodes de stabilité de réseau intelligent ont été proposées pour prédire l'état du réseau. Cela aidera à définir les meilleures stratégies pour les politiques de maintenance préventive et de couverture des risques. Cette thèse de recherche applique des méthodes de science des données au paradigme de réseau intelligents pour un contrôle et une gestion dynamiques efficaces. viii

Table of Contents

List of Tables Energy is a core element for societal prosperity, technological revolution, and economic growth in the world [START_REF] Shahsavari | Potential of solar energy in developing countries for reducing energyrelated emissions[END_REF]. Over the years, the exponential increase in global energy demand has become the leading cause of the rapid depletion of fossil fuels and increased Greenhouse Gas (GHG) emissions of conventional generators [START_REF] Geng | A bibliometric review: Energy consumption and greenhouse gas emissions in the residential sector[END_REF].

List of Abbreviations

To effectively satisfy the meteoric growth in energy consumption, the world has taken serious initiatives to deploy RES on a larger scale. For example, the European Union targets achieving 100% in 2050 [START_REF] Zervos | RE-thinking 2050: a 100% renewable energy vision for the European Union[END_REF]. The harnessing of RERs, e.g., Solar Energy (SE), wind energy, biomass energy, geothermal energy, etc., provides an excellent opportunity to mitigate GHG emissions and reduce global warming for sustainable development.

RESs are currently being implemented worldwide to meet the requirements of increased energy demand, mitigate environmental pollutants, and achieve socio-economic benefits for sustainable development.

SE hold out the greatest promise for mankind among all RES, being free, clean, and abundantly available [START_REF] Akhter | Review on forecasting of photovoltaic power generation based on machine learning and metaheuristic techniques[END_REF]. For these reasons, it keeps increasing its share in the energy mix in the face of diminishing conventional fossil fuel energy sources and rising environmental protection concerns [START_REF] Akhter | Review on forecasting of photovoltaic power generation based on machine learning and metaheuristic techniques[END_REF]. For electricity production, SE can be mainly harnessed using two different technologies: solar PV and solar thermal systems. Concentrating Solar-thermal Power (CSP) technology concentrates the sun's light energy to power a turbine by converting the focused sunlight into high-temperature heat, which produces steam [START_REF] Kumar | Global advancement of solar thermal energy technologies for industrial process heat and its future prospects: A review[END_REF]. Mirrors use steam to drive steam turbines for large-scale electricity generation. Thus, countries such as the United States have been implementing CSP plants for energy generation [START_REF] Cojocaru | Optimal scheduling in concentrating solar power plants oriented to low generation cycling[END_REF]. Nevertheless, CSP ultimately needs large installations to be efficient [START_REF] Powell | Hybrid concentrated solar thermal power systems: A review[END_REF].

In contrast, PV stations use incident light to excite free electrons in embedded semiconductors, called the photovoltaic effect. [START_REF] Das | Forecasting of photovoltaic power generation and model optimization: A review[END_REF]. To increase the energy generation of PV cells, they are connected in chains to build larger units named modules or panels. These panels are operational at various scales and are often used on rooftops or open spaces, integrated into buildings or vehicle designs, or arranged in massive arrays in solar power plants. Over the past decades, solar panels have been embraced use globally, and their demand has 1 increased as a direct consequence of their mass public appeal and reduction in tariff charge systems. However, the major hindrance of the deepening penetration of PV stations is the insufficient energy generation, and intermittent nature of solar energy [START_REF] Ahmed | A review and evaluation of the state-of-the-art in pv solar power forecasting: Techniques and optimization[END_REF].

To provide a secure and stable energy supply, the public grid needs an advanced coordination framework.

Thus, nations worldwide heavily invest in the integration of power management systems to efficiently accomplish the possible looming challenges in terms of instability and volatility of RES. According to the US energy department, the annual investment in SGs technology will reach more than $13.8 billion in 2024 [START_REF] Vinuesa | The role of artificial intelligence in achieving the sustainable development goals[END_REF].

The motivation for adopting this next-generation power system comes essentially from the flourishing sector of RES. Meanwhile, the foremost challenge in a SG with distributed energy resources is managing the intermittent nature of RESs. SGs are digitizing the grid elements with Information and Communication Technologies (ICT) as a fragment of the IoT framework conformable to the energy sector.

The structure of the SGs denotes four prominent folds, specifically, load, traditional energy, public grid, and RES. All the mentioned parts are connected with AI, which denotes the heart of the SG paradigm. The operational process pass by the AI hub. AI contribute to the system by an autonomous and fast distribution.

The communication of the system elements provides flexibility to the grid and ensures an optimal load supply balance [START_REF] Raza | A review on artificial intelligence based load demand forecasting techniques for smart grid and buildings[END_REF]. The grid integrity via AI ensures the required protection from cyber threats. The data generated in the generation process provide a reliable source with Advanced Metering Infrastructure (AMI).

The information received is used to tune and enhance AI techniques. The data management and control platforms are carried out through AI. Great importance has been addressed to AI techniques due to their crucial role in the overall energy sector. The information-sharing framework assigns core importance to AI since it presents critical success with edge computing support [START_REF] Massaoudi | Deep learning in smart grid technology: A review of recent advancements and future prospects[END_REF].

These radical transformations include distribution, transmission, and electricity generation [START_REF] Ali | State-of-the-art artificial intelligence techniques for distributed smart grids: A review[END_REF]. The improved version of the traditional grid covers the implementation of potential computing, advanced sensors, and meters with self-monitoring of variant energy suppliers and loads interconnected with high-level automation. Regarding the International Energy Agency (IEA) report, SGs are a strategic element for sustainable energy goals [START_REF] Ali | State-of-the-art artificial intelligence techniques for distributed smart grids: A review[END_REF]. The significant potential of SGs comes from implementing an embedded layer of ICT of bulk generation between the components of the system. This two-way communication paradigm uses smart meters and sensors to take decisional actions during the generation of transmission and distribution lines. The aim is to cover the weak points of energy heterogeneity and sensibility to environmental and operational conditions [START_REF] Chung | Distributed deep reinforcement learning for intelligent load scheduling in residential smart grid[END_REF]. This coordination platform provides a high-performance power supply due to the contentious supervision of detailed parts in the system.

Recently, the SG framework has experienced a vivid revival and has become a sign of countries' de-velopment since it provides a sustainable and stable electricity supply [START_REF] Massaoudi | Deep learning in smart grid technology: A review of recent advancements and future prospects[END_REF]. These latter include generating electricity from traditional and alternative energy sources, transmitting this energy from the centralized generators to the local grid, and distributing the flow of energy to homes and cities. For each of the mentioned elements, SGs control the operating process via the developed mechanism of supervision and decision-making.

The need for full automation in the system operation requires integrating learning-based modeling frameworks for each stage. It can be cited fault detection, load and power forecasting, cybersecurity, big data analysis, etc. Each factor should clearly define the elements' priorities in terms of environmental challenges, customer and market needs, infrastructure challenges, and innovative technologies such as AMI devices.

For achieving these items, the system adopts some fundamental aspects. Those aspects consist of digitalization, flexibility, resiliency, and intelligence. Such a system's efficiency will improve the penetration of alternative energy sources since the stability of the outdated grid is threatened by the internment change of weather. With SGs, precautions are taken for any slight perturbance to select the subsequent suitable decision-making. However, the transition to future grids cannot be achieved without the high connectivity of advanced power electronics and devices through high-performance computing and monitoring techniques.

With daily operations, a new massive amount of data is generated and stored in the system. An intelligent grid system's role is to manage this data and make it useful for monitoring and control. The static hierarchical grid needs require advanced methodologies for a safe and stable transition.

Literature review

In light of the bulk PV capacity expansion, the employment of PVPF for an efficient energy management system has been considered as the core element of the modern SG. AI-based PVPF emerged nowadays as a promising research direction. With the enormous integration of smart meters in electrical grids, machine learning methods take advantage of the large-scale and multi-source data representations to achieve a spectacular performance and high forecastability potential.

Unlike PV power generation, which is almost only determined by the weather conditions, the load is also dependant on other factors related to top particular microgrid patterns: building occupancy, seasonality, or consumers' behavior. As reported in the literature, electricity can not be stored in large amounts, which ultimately requires that PV generation and load demand must have a fair balance [START_REF] Aurangzeb | A pyramid-cnn based deep learning model for power load forecasting of similar-profile energy customers based on clustering[END_REF]. Thus, Load forecasting (LF) is undoubtedly the essence of strategic management operations in SG as it offers an optimization solution for operation costs, optimum load supply tradeoff, and power quality. LF is the analysis of historical data related to environmental conditions, charge graph behavior, and historical consumption.

LF output is an accurate prediction of microgrid consumption to determine preventive actions for stable operating conditions. Based on the time horizon, load demand forecasting can be classified into three ranges, short-term load forecasting (STLF) for hours to weeks, medium-term load forecasting for weeks to months, and long-term load forecasting starting from five years [START_REF] Massaoudi | Short-term electric load forecasting based on data-driven deep learning techniques[END_REF]. The estimated quantity of supply the load needs is ensured using LF techniques. An accurate LF prediction facilitates the coordination of SG and guarantees the budget-saving commitment and grid stability.

With the exponential growth of electricity operations and measurements in terms of size and complexity, generation schedules in the context of real-time operations are programmed for short-term, mid-term, and long-term power system operations. Therefore, it is mandatory to provide accurate predictions of PV generation output and load demand for ensuring uninterruptable power supply to the end-users. The rampant use of AI in power systems is an emerging trend to cover the knowledge gaps for better flexibility and reliability of the supply service [START_REF] Khodayar | Deep learning in power systems research: A review[END_REF]. Fig. 1.1 presents the timeline evolution of AI from its birth until the uptake of DL deployments.

Research objectives and challenges

This thesis' contributions broadly consist of tailoring intelligent computational methods for PV energy production and managing the electric power in the grid from both demand and supply sides, as shown in Fig. 1.2. This is mainly done by implementing state-of-the-art machine learning techniques to cope with the intermittent weather conditions and predict the PV power with high exactitude. The time series prediction and analysis tackle single-step forecasting, multistep forecasting, point forecasting, and interval forecasting. Although multiple methods have been proposed to solve the energy management paradigm using AI, there is a lack of comprehensive review and comparative analysis of the proposed methods. This dissertation first provides a comprehensive review of existing methods for energy management tools for SG. Moreover, this dissertation proposes two innovative PVPF methods using the virtue of prepossessing units and ML/DL models. Next, two efficient methods for load forecasting were comprehensively presented to secure adequate management of the demand side from the intermittent supply of PV power. Finally, a grid stability prediction system is designed to guarantee the efficient management of both supply and load sides. Using machine learning and DL technique methods, multiple simulation results are generated using Python and Matlab softwares on real-world datasets.

Outline of the dissertation

The remainder of this dissertation is as follows: Chapter 2 provides a systematic literature review of energy management, smart grid, and the available AI methods for energy management systems. Chapter 3 proposes two efficient PVPF methods and studies their performance via multiple simulation scenarios. Chapter 4 sheds light on an essential side of control management and optimization strategies for efficient use of PV power production. In other words, the load demand prediction has been addressed by proposing innovative tools on real datasets with case studies. Meanwhile, the grid stability prediction and assessment have been tackled

to enhance the proposed energy management paradigm by optimal balancing between PV generation and demand. The grid stability paradigm emerges nowadays as a central element of energy systems due to the high integration of PV systems, importing many uncertainties on the generated power flow. Section 5 concludes this thesis by giving the main findings and future work. This study's organization is illustrated in Fig. 1.3.

Contributions

The main contributions of this thesis can be summarized in terms of the following salient points:

• A bird's eye review of energy management, SG, and AI methods applied to the energy sector has been conducted.

• Efficient ML models have been proposed for PV power forecasting.

• Novel computational learning models have been introduced for load demand forecasting.

• To find optimal equilibrium between the supply and load, effective ML techniques have been proposed

for grid stability prediction and assessment.

The main contents of this thesis have been published in [1-4, 6, 7, 19, 25] Chapter 2

Overview of energy management and smart grid

Introduction

Due to the continuous industrial revolution and world population growth, the electrical grid faces many operational challenges in terms of power scalability, reliability, and autonomous control [START_REF] Sun | The dual control with consideration of security operation and economic efficiency for energy hub[END_REF]. For the time being, the power grid transformation for higher efficiency and flexibility enhancement reveals a strong consensus.

Meanwhile, the SG paradigm enables the dominant grid integration of volatile and intermittent RES [START_REF] Vinuesa | The role of artificial intelligence in achieving the sustainable development goals[END_REF].

The SG concept revolutionizes the traditional utility grid with high reliability, eco-friendly impact, human safety, and infrastructure protection. This interactive power system paves the way for customers and suppliers to exchange their benefits from a bidirectional coordination platform for electricity and information.

The SG framework provides a performance toolkit based on Information and Communication Technologies (ICT) [START_REF] Albano | Convergence of smart grid ict architectures for the last mile[END_REF][START_REF] Müller | Interfacing power system and ict simulators: Challenges, state-of-the-art, and case studies[END_REF]. The SG paradigm supervises and promotes grid operations at a high level of expertise [START_REF] You | A versatile software defined smart grid testbed: Artificial intelligence enhanced real-time co-evaluation of ict systems and power systems[END_REF].

In the present-day scenario, PV energy becomes the largest RES of carbon-free energy owing to fossil fuel resource depletion in the near future, and climate change concerns [START_REF] Ullah | Applications of artificial intelligence and machine learning in smart cities[END_REF]. To incorporate this immense PV potential, the SG requires experiencing a radical transformation to provide high-quality and highly reliable energy delivery to end-users. However, century-old control techniques and legacy mechanical meters can not meet the technical requirements of this renewable transition [START_REF] Vinuesa | The role of artificial intelligence in achieving the sustainable development goals[END_REF]. Moreover, the ICT uptake has entailed significant achievements in the evolution of smart meters, sensors, and data center development. This leads to more data that can be generated. Fortunately, AI techniques efficiently make use of the provided data to reap multiple socio-economic and financial benefits. AI methods drastically take the lead to manage all parts of the SG with high-efficiency [START_REF] Vinuesa | The role of artificial intelligence in achieving the sustainable development goals[END_REF].

AI systems have contributed to the realization of Sustainable Development Goals (SDGs), including the vital integration of RES. Furthermore, the decarbonization of fossil fuel systems via the deployment of Electric Vehicles (EVs) using Vehicle to Grid (V2G) and Grid to Vehicle (G2V) concepts requires smart infrastructure. This infrastructure supports a real-time demand response, charge scheduling, fair energy provision, congestion management, and market bidding optimization in which AI methodologies are mandatory for their implementation [START_REF] Rigas | Managing Electric Vehicles in the Smart Grid Using Artificial Intelligence: A Survey[END_REF]. Therefore, power systems-based AI gained tremendous interest from engineers and scientists to use their vast potential for the SG concept. The SG enormously requires intelligent management to allow diverse RES for bulk penetration to grid-connected systems and ensure well-organized scheduling generation capacity and effective management control. AI-based technologies work under the SG umbrella to provide the correct decision-making and guarantee self-controlled, pervasive networks with broadband ICT. The fusion of AI and SG presents a powerful tool for handling sophisticated problems. Computer reasoning competently carries out complex tasks with high expertise when automation is inefficient in interpreting nonlinear and narrow behavior. Cognitive scientists define AI as the fusion of science and engineering to benefit intelligent computational programming [START_REF] Vinuesa | The role of artificial intelligence in achieving the sustainable development goals[END_REF]. The AI applications include learning, reasoning, and taking actions to face complicated problems such as electric operations.

Nowadays, Computational Intelligence (CI) illustrates the core factor for the digital automation of SG systems taking advantage of the existing infrastructure in the level of hardware, software, and data availability [START_REF] Sun | From independence to interconnection-a review of ai technology applied in energy systems[END_REF]. In energy systems, AI applications include prediction, system modeling and control, and energy management. Predictive models investigate the power system behavior to generate forecasts about the system variability for a specific time horizon. Predictive Modelling (PM) techniques are applied to demand, renewable power prediction, fault detection prediction, etc. The ML concept involves Supervised Learning (SL) models such as Neural Networks, and Genetic Algorithms [START_REF] Bose | Artificial intelligence techniques in smart grid and renewable energy systems-some example applications[END_REF]. In contrast, system modeling consists of defining a symbolic function for a transformation process. For example, ES efficiently interferes with the model simulation using knowledge structure, and logic control [START_REF] Bose | Artificial intelligence techniques in smart grid and renewable energy systems-some example applications[END_REF]. Furthermore, system control and energy management employ robust AI algorithms to secure normal operations of power systems.

Doubtless, SG and AI are aroused substantial attention at a fast pace in the last decade. Furthermore, technology evolution creates a significant emergence for SG. For example, 5G network technology has become available on many continents around the globe. Many countries take advantage of this technology to increase the size of the data collected and use it for behavioral understanding and predictive applications. On another side, the computational work's potential is enormous, particularly the recent waves of quantum computing that deeply integrate the Internet Of Things (IoT) concept in electric systems that allow AI to be upgraded to AI2.0. Therefore, the improvement of AI techniques is accelerated to gratify the highperformance requirements and promote the usage of smart meters and controllers to improve and monitor the power quality in the SG.

The chapter is organized as follows: Section 2.2 depicts the pivotal role of energy management for the electrical system and utility grids. In section 2.3, the SG paradigm is comprehensively presented to give insightful breakthroughs of the ample opportunities it can give to the actual century-old utility grids.

In section 2.4, the standard AI classes for energy systems are reported, discussing their strengths and weaknesses. Finally, the chapter summary is provided in Section 3.4.

Primer of energy management

The scarcity of conventional energy resources in the near future and their increasing threats to the environment extremely require the transition towards RES [START_REF] Brockway | Estimation of global final-stage energyreturn-on-investment for fossil fuels with comparison to renewable energy sources[END_REF]. Several milestones have been reached that are indicative of a vital need for RES in the modern economy due to industrial expansion and technological development. Thus, nations around the globe are promoting the use of RES deployment [START_REF] Bogdanov | Radical transformation pathway towards sustainable electricity via evolutionary steps[END_REF].

The ongoing increase of renewable plants reveals technical issues on their deployment in the current power grid for their high sensitivity to weather parameters such as temperature, wind speed, and irradiation.

Traditionally, the utility grid concept is not perfectly adapted to emerge such sources in unidirectional energy flow due to partial observability and uncertainty issues. Furthermore, the high disruption of RES and their sensibility to weather conditions made controlling the mixed flow of energy a problematic task. The outdated grid faces a major collapse due to RES reliance. The bidirectional energy flow requires advanced technology to meet renewable incorporation requirements.

Similarly, with the global modernization and development of nations worldwide, domestic electricity consumption has dramatically increased from 14 TWh in one year to reach 997 TWh in 2018 [START_REF]International Energy Outlook[END_REF]. Yearly, the load demand is soaring by 3.5%, with expectations to reach a 50% increase in 2050 [START_REF]International Energy Outlook[END_REF]. The residual, industrial, and transportation sectors are the most dominant sectors for the current heavy consumption due to a surge in population and electrified technologies. Nonetheless, electricity production primarily uses gas turbines and vapor turbines as sources of energy. Following the ongoing increase in electricity demand, the extinction of these sources is significantly accelerated. The traditional utility grid has four phases, namely, generation, distribution, transmission, and supply. The transmission lines have a unidirectional energy flow where the electricity is delivered to customers via transportation lines. The high voltage in this phase over long distances is stepped down via transformers in the distribution lines. The distribution phase supplies the energy provided to customers in the final step. The four phases are linked sequentially to build an archaic system.

Smart grid technology

Although the SG paradigm presents a reliable and secure electricity supply, the complexity of SG requires advanced automation tools to control power systems. The high integration of RES into the electrical grid leads to intermittent power generation. This inherent intermittency requires AI techniques to cope with the stochastic meteorological variations and efficiently deal with the unprecedented amount of information from ubiquitous sensors and smart devices [START_REF] Mohamed-Seghir | Artificial intelligencebased weighting factor autotuning for model predictive control of grid-tied packed u-cell inverter[END_REF]. Prediction techniques present a suitable alternative for the PV owners and the grid operators leading to optimum generation-distribution-transmission power flow.

Taking as an example demand forecasting, stakeholders must provide an effective solution to carry out the load variations at different levels and meet the market demands [START_REF] Al Mamun | A comprehensive review of the load forecasting techniques using single and hybrid predictive models[END_REF]. However, generating accurate load forecasting is a challenging task due to the existence of several uncertain factors. These factors include social activities, economic indicators, and seasonal effects. The accuracy of load forecasting from AI techniques has a strong effect on the operation cost and the control strategies for power systems [START_REF] Syed | Averaging ensembles model for forecasting of short-term load in smart grids[END_REF]. Furthermore, the AI technique ensures the flexibility of electricity prices in deregulated markets to optimize the real-time pricing and billing in usage time. The structure of the SGs shown in Fig. 2.1, denotes four prominent folds, specifically, load, traditional energy, public grid, and RES. All the mentioned parts are connected with AI, which denotes the heart of the SGs paradigm. Researchers have long sought to investigate the different elements that increase the profitability of grid utility. AI methods provide the essential techniques to identify the power consumption behavior by users [START_REF] Ahmad | A review on renewable energy and electricity requirement forecasting models for smart grid and buildings[END_REF].

Using this identification ability, the consumers could ensure the reasonable pricing of the energy system and optimize their profitability from the electrical grid. AI tools make use of the power consumption analysis to prevent consumers from abnormal behavior detection. One of the fundamental goals for a sustainable SG system is to smooth the integration of RES in the electrical grid. Several challenges should be taken into consideration to prevent grid failure. Fig. 2.2 presents the main features of the SG paradigm. These features essentially lie in intelligence, market-enabling, efficiency, flexibility, sustainability, and reliability. AI paradigm could provide fault tolerance and self-healing system to control electrical systems. The safety of equipment against every environmental threat could be conducted using AI. Fault diagnosis and AI techniques could enlarge the life cycle of the equipment by the early treatment of the operating system before the complete failure. Furthermore, the power network security protection is assured by AI techniques to

prevent the system from any potential threats. Outages caused by the electric Distribution and Transmission (DT) failures frequently occur these last years [START_REF] Shadmand | Towards grid of microgrids: Seamless transition between grid-connected and islanded modes of operation[END_REF]. Blackouts can occur due to cybersecurity attacks and device failures from environmental conditions and sudden accidents where a branch of a tree falling in the ground causes a blackout of all the neighboring houses around [START_REF] Liang | The 2015 ukraine blackout: Implications for false data injection attacks[END_REF]. In an uncertain and complex environment, the SG system continuously deals with deep information flow leads to possible attacks on the physical power grid. AI ensures quick detection of malware and intrusion. Furthermore, the AI methods draw the best strategies for cybersecurity protection to protect energy systems. Some of the AI methods and their corresponding power grid applications are illustrated in Fig. 2.3. AI deployment contributes to the energy systems through budget optimization, self-automation, and efficient management in the SG era. More specifically, the most noticeable impact of AI deployment in power systems lies in greater improvement in terms of prediction accuracy, powerful security, and high performance.

AI models include different aspects based on the type of information used for data representation mapping.

These aspects are applied to different classes according to the data provided and the problem complexity. ML classes include Supervised Learning (SL), Semi-Supervised Learning (SSL), Unsupervised Learning (UL), and Reinforcement Learning (RL), as illustrated in Fig. 2.4. determine the exact value of labeled data from the data representation [START_REF] Mosavi | State of the art of machine learning models in energy systems, a systematic review[END_REF]. The regression accuracy is measured through error metrics [START_REF] Mosavi | State of the art of machine learning models in energy systems, a systematic review[END_REF]. Dimensionality reduction is employed to optimize feature numbers for the multi-labeled system. This optimization is conducted to identify the most suitable data representations for a specific task and avoid The Curse Of Dimensionality (COD) [44]. The COD occurs when the prediction system is overfitted [44]. The clustering defines the grouping of database samples to classes [START_REF] Huang | Locally weighted ensemble clustering[END_REF]. It could be used as a preprocessing stage for the enhancement of classification and prediction accuracy results. For UL, the clustering consists of grouping the inputs to sub-classes according to specific criteria [46]. AI contributes to the power grid by autonomous and fast equipment control. The communication of the system elements provides flexibility to the grid and ensures an optimal load supply balance. The grid integrity via AI ensures the required protection from cyber threats. The generated data provide a reliable source with AMI systems. The received information is used to tune and enhance AI techniques. The data management and control platform are carried out through AI. Great importance has been addressed to AI techniques due to their crucial role in grid transformation. The information-sharing framework assigns core importance to intelligence since it presents the key success with the support of edge computing [START_REF] Chen | Deep learning with edge computing: A review[END_REF].

In light of the inherent necessity of advanced tools, the system adopts some fundamental aspects. Those aspects consist of digitalization, flexibility, resiliency, and intelligence [START_REF] Ourahou | Review on smart grid control and reliability in presence of renewable energies: challenges and prospects[END_REF]. The efficiency of such a system will improve the penetration of alternative energy sources since the stability of the outdated grid is threatened by the internment change of weather. With AI, precautions are taken for any slight perturbance to select the next suitable decision-making. However, the transition to future grids cannot be achieved without the high connectivity of advanced power electronics and devices through high-performance computing and monitoring techniques. With daily operations, a tremendous amount of data is generated and stored in the system. The role of an intelligent grid system is to manage this data and make it useful for monitoring and control. The static hierarchical grid needs require AI techniques for a safe and stable transition.

AI methods for energy management

Recently, AI receives major attention from stakeholders and energy managers to boost their financial benefits in a highly competitive market [START_REF] Wirtz | Artificial intelligence and the public sector-applications and challenges[END_REF]. In the energy field, AI interferes in modeling, simulation, and prediction to cope with energy sources heterogeneity and operation complexity [START_REF] Mosavi | State of the art of machine learning models in energy systems, a systematic review[END_REF]. CI contributes to power systems with intelligent programming and advanced methodologies that emerge the SG-enabling strategies. Fault diagnosis, maintenance scheduling, restoration, remedial control, substation monitoring, and management excessively rely on AI to work efficiently and gratify the requirements for safe and secured power system operations [START_REF] Wirtz | Artificial intelligence and the public sector-applications and challenges[END_REF]. Similarly, the deployment of AMI increases exponentially the amount of data collected from the system operations. AMI architecture incorporates ICT technologies, smart meters, and data management platforms [START_REF] Boudet | Public perceptions of and responses to new energy technologies[END_REF]. Smart meter data analytics deployment overtakes consumption measurement to provide a massive database for further usage perspective. Using AI techniques, the collection of this rich information allows the SG paradigm to cope with people's lifestyles and decrease their electric bills. The research community takes advantage of the widespread popularity of AI techniques to resolve the operational problems of power systems. In the AI domain, the hybridization approach offers insights to improve the existing models. From a quantitative investigation, hybrid models are commonly implemented in energy systems as a clue for higher robustness and precision according to a fair assessment basis [START_REF] Fallah | Computational intelligence approaches for energy load forecasting in smart energy management grids: state of the art, future challenges, and research directions[END_REF]. Fig. 2.5

illustrates the frequently used ML models for SG linked to their most suitable platforms for deployment according to the number of citations from the Scopus engine.

According to Fig. According to Fig. 2.6, ANN and Swarm intelligence are still hot topics for scientists due to their mature development and high efficiency. The frequent use of ML models is explained by the increased popularity of open-sourced platforms dedicated to facilitating their implementation, such as Keras [START_REF] Chollet | Deep Learning mit Python und Keras: Das Praxis-Handbuch vom Entwickler der Keras-Bibliothek[END_REF]. On the other side, every method is preferred for a specific application of the SG area to perform a custom task better than the rest of the models due to a special inner mechanism. For example, DL takes advantage of its well-designed architectures to do feature engineering by default. This part is devoted to tackling the most relevant AI techniques used in SG operations for a flow and cohesion section. These techniques consist of ANN, Fuzzy Logic, Ensemble methods (EM), and hybrid models.

D T R F K N N S V M G B M P C A E M C N N G A N D L A R I M A S c i k i t -l e a r n X g b o o s t L i g h t G B M C a t B o o s t S p

Artificial neural networks-based

Conceptually, ANN model is an interconnection of interconnected processing units called neurons to mimics the present understanding of the human brain and its associated nervous system [START_REF] Hasson | Direct fit to nature: An evolutionary perspective on biological and artificial neural networks[END_REF]. The information processing passes through different computational layers, namely, input, hidden, and output layers. The computational stages are forward propagation in the input layers, followed by numerically weighted values optimization and backpropagation in the output layers. The N vector inputs pass through the activation function ϕ(.) with the initial weights w and bias b values of each node. The weights w k and the bias b k of elementary processors called perceptrons are adjusted through the loss function between the ground truth and the prediction values in every back-propagation.

ANN provides a universal approximator to learn from the unsupervised environments [START_REF] Ayoub | Ann model for energy demand and supply forecasting in a hybrid energy supply system[END_REF]. By numerical weighting, ANN solves the issue of exclusive and nonlinear relationships. Therefore, the ANN is denoted as one of the most promising solutions in energy management. There are numerous other advantages of this concept, particularly in higher-dimensional search space; still, the dilemma of ANN deployment consists of high model complexity, long training time for deep ANN, and higher computational effort [START_REF] Ayoub | Ann model for energy demand and supply forecasting in a hybrid energy supply system[END_REF]. Some authors in [START_REF] Ayoub | Ann model for energy demand and supply forecasting in a hybrid energy supply system[END_REF] implement the ANN model for the short-term demand prediction of a microgrid supply system using one-year historical data. The Backpropagation neural network (BP) is proposed to generate MAPE=2.12% [START_REF] Ayoub | Ann model for energy demand and supply forecasting in a hybrid energy supply system[END_REF]. The simulation results yield that the complexity of ANN does not necessarily produce a high forecasting accuracy [START_REF] Ayoub | Ann model for energy demand and supply forecasting in a hybrid energy supply system[END_REF]. The authors in [START_REF] Notton | Some applications of ann to solar radiation estimation and forecasting for energy applications[END_REF] demonstrate that ANN can forecast Global Horizontal Irradiance and Global Temporal Irradiance with a high exactitude. In the authors' work [START_REF] Notton | Some applications of ann to solar radiation estimation and forecasting for energy applications[END_REF], the forecasting horizon was set to 5 minutes ahead while the historical database was built from seven meteorological data centers. The authors in [START_REF] Jayamaha | Wavelet-multi resolution analysis based ann architecture for fault detection and localization in dc microgrids[END_REF] use ANN classifier for fault detection diagnostics in DC microgrids. Their work aims to stabilize the current, the frequency, and the phasor information to better integrate RES. The use of Wavelet Transform (WT) processing stands for capturing the dynamic changes during the faults. The ANN classifier determines the localization of the faults for fast detection and isolation of the faults in the system.

Fuzzy logic-based

Fuzzy Logic Control (FLC) is the development of the fuzzy set theory and its associated techniques. This supervisory technique mimics human cognition, and approximate reasoning [START_REF] Hannan | Fuzzy logic inverter controller in photovoltaic applications: Issues and recommendations[END_REF]. FLC involves uncertainty in engineering by attaching degrees of certainty contrary to binary logic. The Fuzzy control system involves four elements, particularly, fuzzification module, knowledge base, inference engine, and defuzzification module as shown in Fig. 2.7 [START_REF] Hannan | Fuzzy logic inverter controller in photovoltaic applications: Issues and recommendations[END_REF]. Due to the imprisoning robustness of FLC model and its great generalization capabilities, it has been widely integrated with energy systems [START_REF] Rizwan | Fuzzy logic based modeling and estimation of global solar energy using meteorological parameters[END_REF]. Paper [START_REF] Chojecki | Energy management system for residential buildings based on fuzzy logic: design and implementation in smart-meter[END_REF] proposed a smart meter with an autonomous energy management system using FL. The implementation of the FL system enables saving 34% of energy consumption during the peak period. However, the proposed controller is very sensitive to weather variations and the user's stochastic behavior.

Authors in [START_REF] Reza | Assuring cyber security in smart grid networks by fuzzy-logic based trust management model[END_REF] propose a trust management model-based fuzzy system. The proposed model is designed to secure the SG network against compromising lightweight devices by measuring the trustworthiness of devices. The trustworthiness of smart devices is FLC system has been deployed to facilitate the RES integration and monitoring of electricity distribution and production between different elements in the grid.

The simulation results lead to a classification accuracy of 80%. In [START_REF] Hong | Robust design of type-2 fuzzy logic-based maximum power point tracking for photovoltaics[END_REF], the authors introduce an Interval Type-2 Fuzzy Logic System (IT2FLS) based MPPT to maximize the PV generation. The proposed model not only tracks the maximum PV power but also pays attention to results uncertainty. The IT2FLS model contributes to the stability of the MPPT model while optimizing the PV power generation compared to Perturb and Observe (P&O) algorithm.

According to the reviewed articles, It has been demonstrated that Fuzzy systems have a flexible and suitable architecture where the fuzzy rules could be changed to serve any logical system. Therefore, FLC model provides high efficiency in modeling and controlling nonlinear dynamical systems that require a high level of expertise in deriving mathematical parametric equations. Furthermore, FLC exhibits several features, including the ease of implementation and the ability to cope with imprecise, incomplete, or uncertain information. However, the shortcomings of FL include its dependence on the problem formulation because it does not always provide a satisfactory performance due to misleading fuzzy rules and membership function parameters. Thus, careful attention must be put on fuzzy rules selection with all membership combinations. Moreover, since FLC is widely applied to control systems, the evaluation process is costly due to the fees of hardware implementation [START_REF] Jang | Neuro-fuzzy modeling and control[END_REF].

Ensemble methods-based

Model assembling targets building a strong model from base learners with higher generalization ability, overfitting avoidance, fault tolerance, and adaptability to solve complex problems. Ensemble learning techniques include two major classes based on the way of building base learners: competitive ensembles and cooperative ensembles [START_REF] Ren | Ensemble methods for wind and solar power forecasting-a state-of-the-art review[END_REF]. Competitive ensembles use multiple base predictors to constrict a powerful ensemble by averaging single base predictors' prediction. The prediction output could take into account purring the base predictors. The weak predictors' diversity is maintained by employing different parameters, initial conditions, kernel diversity, or data diversity [START_REF] Ren | Ensemble methods for wind and solar power forecasting-a state-of-the-art review[END_REF]. On the other side, for cooperative ensembles, the prediction task is partitioned into distinguished sub-folds. Then, the cooperative model computes each sub-fold individually. The prediction results are averaged to generate the final forecast output.

Cooperative ensemble forecasting includes two classes: Pre-processing and post-processing. In the preprocessing, the subsets of the cooperating ensembles are divided without considering the data characteristics.

Wavelet Decomposition and Empirical Mode Decomposition (EMD) are two popular time-series examples for pre-processing [START_REF] Huang | Forecasting hourly solar irradiance using hybrid wavelet transformation and elman model in smart grid[END_REF]. While in the post-processing, the data linearity is taken into account. The cooperative ensembles attribute the most suitable subsets for each base model according to their potential capabilities to carry out specific data characteristics. For example, ARIMA is used as a linear model and associated with a nonlinear model such as Generalized Auto-Regressive Conditional Heteroscedasticity (GARCH) model, SVM, and ANN [START_REF] Shi | Evaluation of hybrid forecasting approaches for wind speed and power generation time series[END_REF]. Ensemble learning techniques present efficient meta-algorithms for forecasting problems related to SG systems [START_REF] Huang | Forecasting hourly solar irradiance using hybrid wavelet transformation and elman model in smart grid[END_REF][START_REF] Shi | Evaluation of hybrid forecasting approaches for wind speed and power generation time series[END_REF].

The goal of using EM in energy systems consists of avoiding class imbalance, COD, and concept drift. This goal is conducted using two frameworks according to the dependency of inducers in the training stage [START_REF] Sagi | Ensemble learning: A survey[END_REF].

The dependent training uses transfer learning to correlate the actual inducer and the following inducers and acquire knowledge. On the other side, independent training separates the base learners to be trained individually. For example, Bootstrap Aggregation (Bagging) such as RF and DT, stacking, and blending approaches are the most well-known independent frameworks. While Boosting is one of the commonly used dependent frameworks in practical applications for its high efficiency, including Adaptative Boosting (AdaBoost), Categorical boosting (Catboost), and Gradient Boosting Machines (GBM) [START_REF] Persson | Multi-site solar power forecasting using gradient boosted regression trees[END_REF]. Bagging is an intelligent algorithm that employs a parallel generation of individual estimations to optimize the variance.

Although the Bagging approach demonstrates its prediction ability in high-variance data, studies approve that the risk of overfitting is high. Therefore, it is recommended to define a threshold when the learning rate stops improving. While using the Boosting approach, the accuracy is increasingly improved via sequential generation and weighted average.

Boosting is advantageous because the optimization accords more importance to the bias rather than the variance. The stacking approach consists of creating multiple prediction levels from heterogeneous models [START_REF] Wolpert | Stacked generalization[END_REF]. The output result is generated through a combination of meta-learner training folds and using an out-of-fold learning technique. Those folds are utilized as a base learner, and the information is transferred via the folds training. The boosting method prevents the system from overfitting and generates a high-quality prediction [START_REF] Zhou | Short-term photovoltaic power forecasting based on stackingsvm[END_REF]. However, The Stacking restraint lies in time-consuming with a substantial computational burden requirement. Blending is quite similar to Stacking because it uses the fold-training technique, but the validation set is made only from the training folds. The holdout set accelerates the training process to simplify the learning process [START_REF] Li | A novel wavelet-based ensemble method for short-term load forecasting with hybrid neural networks and feature selection[END_REF].

A novel predictive method for energy price classification was proposed in [START_REF] Filho | Energy price classification in north brazilian market using decision tree[END_REF]. The proposed method does not identify the exact value of electricity price, but it classifies the values to a specific threshold. Their work was extended to include an investigation of Classification and Regression Trees (CART) and C5.0 models.

The combination of EM provides high accuracy of 99.3%. Zhang et al. used a combination of two EM; specifically, RF and XGB, to provide generalization capabilities for fault detection of wind turbines [START_REF] Zhang | A data-driven design for fault detection of wind turbines using random forests and xgboost[END_REF]. RF model is implemented to rank the features according to their contribution to the domain knowledge, while XGB trains the model from three features.

Deep learning-based

DL is a promising branch of ML with breathtaking potential and widespread adoption from the research community and big tech companies. As a novel wave of ANN research, DL takes advantage of multiple processing layers, improved parallel calculation, and excellent representation ability to boost the performance of computational models using massive high dimensional data [START_REF] Lecun | Deep learning[END_REF][START_REF] Wang | A dnnbased cross-domain recommender system for alleviating cold-start problem in e-commerce[END_REF]. Neural networks architectures with different configurations and structures such as RNN, CNN, GAN, DBN, and auto-encoders are the typical DL models to solve complex problems in the area of SG and power electronics [START_REF] Wang | A review of deep learning for renewable energy forecasting[END_REF][START_REF] Massaoudi | Performance evaluation of deep recurrent neural networks architectures: Application to pv power forecasting[END_REF]. For instance, LSTM has been found very suitable for data-driven supervised learning with its three thresholds, specifically, input gate, output gate, and forget gate [START_REF] Massaoudi | Performance evaluation of deep recurrent neural networks architectures: Application to pv power forecasting[END_REF]. These gates tend to reduce the vanishing gradient from RNN, where the information is lost in-depth when it back-propagates. However, RNN-based structures, including LSTM and GRU, have limited potential in learning spatial features. Unlike LSTM networks, CNNs can solve the spatial dependencies using three sections, specifically, convolutional layers, pooling layers, and dense layers. Thus, the CNN method is well-known for its inherent ability to carry out data with different dimensionalities [4].

However, CNN algorithm faces serious learning problems with temporal data representations [4]. GAN has gained tremendous interest as a mainstream super-resolution model. GAN uses a generator and discriminator neural network to create synthetic data that follows the same distribution from the original data set [START_REF] Wang | Generative adversarial networks and convolutional neural networks based weather classification model for day ahead short-term photovoltaic power forecasting[END_REF].

More specifically, the generator network mimics the data distribution using noise vectors to confuse the discriminator in differentiating between fake and real images. The role of the discriminator is trained to distinguish generated fake image created by the generator from the original image following the two-player zero-sum game [START_REF] Wang | Generative adversarial networks: introduction and outlook[END_REF]. Despite the large popularity of GANs, the assessment of GANs is quite challenging and often limited to computer vision and image recognition applications.

In [START_REF] Wang | Generative adversarial networks and convolutional neural networks based weather classification model for day ahead short-term photovoltaic power forecasting[END_REF], the authors used GAN and CNN for day ahead PVPF. Wasserstein Generative Adversarial Networks with Gradient Penalty (WGANGP) is proposed to classify 33 meteorological weather types for generating synthetic training data. From the simulation results, it has been found that weather classification plays a measure role in determining the most suitable PVPF technique. In [START_REF] Afrasiabi | Advanced deep learning approach for probabilistic wind speed forecasting[END_REF], the authors proposed a DL approach for interval wind forecasting. The proposed model employs CNN, and GRU models to learn spatio-temporal representations for probabilistic forecasting. From the loss versus epoch variation, it is worth saying that the convergence of the model was reached in the first ten iterations, which may lead to serious over-fitting problems. In [START_REF] Khodayar | Interval deep generative neural network for wind speed forecasting[END_REF], the authors proposed an interval probability distribution learning model for wind forecasting. The proposed model, namely, deep mixture density neural network, employs restricted Boltzmann machines, rough set theory, and fuzzy sets to capture the intrinsic uncertainties from the wind data. It has been found that fuzzy type II inference system could supplement the DL models' robustness leading to an RMSE=0.419 (m/s) for 10-min ahead forecasting. Despite the intense competitiveness of the proposed forecasting system, serious Hyperparameter Optimization (HO) and high computational power are highly required in the proposed model application in real operational conditions. To overcome the mentioned problems for wind power forecasting, Spiking neural network (SNN) was introduced as one of the third generations ANN [START_REF] Wang | Probabilistic wind power forecasting based on spiking neural network[END_REF].

Despite the inherent characteristics of DL, overfitting persists as a complex problem. Overfitting happens with inadequate data size leading to poor generalization potential [START_REF] Srivastava | Dropout: a simple way to prevent neural networks from overfitting[END_REF]. Regularization techniques such as dropout and batch normalization tackle the overfitting problem by using shared weights or network capacity and internal co-variate shift reduction. Data augmentation can be mentioned as an efficient technique to reduce overfitting caused by data scarcity. Furthermore, DL models require extensive work on HO and model structure. Although DL is deeply investigated in power electronics, the reported limitations impede the latter concept from becoming a canonical approach in the industry.

Hybrid models-based

Previous studies, to date, have been primarily focused on AI model' hybridization as a potentially viable approach since it gives individual models a massive upgrade in the majority of cases. Conceptually, hybrid techniques include two or more heterogeneous predictors. The rest of the models compensates for the weakness of a single predictor in capturing individual and group behavior from data. The evolution of AI passes through the fusion of techniques is a key solution to overcome narrow tasks in which conventional ML techniques generate poor accuracy. A variety of hybrid methods uses optimizers and predictors in the forecasting engine to minimize errors. The hybridization of ML techniques illustrates a promising approach, especially with narrow datasets. Fig. 2.8 presents a variety of hybrid techniques dedicated to SG applications. These techniques outperform conventional models and significantly ameliorate model uncertainty. There is extensive interest in hybrid models regarding the number of papers that dramatically increased during the last ten years. The authors in [START_REF] ¸unkaş | Short-term load forecasting using fuzzy logic and anfis[END_REF] depicted the load forecasting problem using an Adaptive Neuro-Fuzzy Inference System (ANFIS) and compared from FL model. A yearly dataset is widely used for the training part. ANFIS is a supervised adaptative MLP. It combines the self-learning capability from NN with the linguistic expression function of FL. The mechanism of this architecture consists of converting the series data into fuzzy inputs. In the inference system, these fuzzified data build the IF-THEN rules, the implication and defuzzification take place to indicate output weighting factors from the preceding part and then convert the fuzzy rules into crisp values. The proposed method in [START_REF] ¸unkaş | Short-term load forecasting using fuzzy logic and anfis[END_REF]provides accurate hourly load forecasts for the electric consumption data of Turkey using a monthly three years dataset from 2009 to 2011. Although both algorithms are very efficient in load prediction, ANFIS model outperforms FL [START_REF] ¸unkaş | Short-term load forecasting using fuzzy logic and anfis[END_REF]. However, the high complexity results in a long computational time. Some authors in [START_REF] Pourdaryaei | Short-term electricity price forecasting via hybrid backtracking search algorithm and anfis approach[END_REF] integrated an ANFIS model but with a two-stage feature selection with a hybrid Backtracking Search Algorithm (BSA). The proposed model deals with an electricity price prediction. BSA presents an efficient method for membership function tuning. The feature selection is held through a multi-objective binary-valued backtracking search algorithm to create various subsets from the dataset. Then, ANFIS model assesses the importance of each dataset.

Paper [START_REF] Tao | A hybrid wind power prediction method[END_REF] proposed a hybrid method for wind energy forecasting. The proposed method combines a Deep Belief Network (DBN) and Support Vector Regression (SVR). DBN is a supervised DL technique having l-layers and parabolic hidden cells [START_REF] Tao | A hybrid wind power prediction method[END_REF]. The construction of layers is made by Restricted Boltzmann Machine (RBM). The idea of this fusion is resumed in the fact that the wind consists of two levels: hourly average wind power level and turbulent residual error level. Thus, each predictor is concerned by a single level. Despite the transient stochastic variation, DBN-SVR model generates quite accurate results with an error MAE equal to 0.014. Furthermore, the proposed model outstrips individual models' accuracy (SVR and DBN). However, the proposed method is time-consuming [START_REF] Tao | A hybrid wind power prediction method[END_REF]. In a similar vein, the authors in [START_REF] Kim | A hybrid neural network model for power demand forecasting[END_REF] combine Long Short-Term Memory (LSTM) and CNN for power demand forecasting.

The hybrid approach, namely (c,1)-LSTM-CNN proved their high performance in various areas. For the energy field, this hybrid model uses dual-stage attention, and the inputs are passed through LSTM cells for features extraction with two hidden layers. Then, CNN model uses these data processed to make predictions.

Compared with S2S LST, ARIMA, and (c,1)-LSTM. The model shows a better performance according to MAPE and RMSE scores. However, the suggested model is high complexity for just a short horizon in which more sampler techniques can generate for the same range of accuracy. Paper [START_REF] Shao | Short-term wind speed forecasting using the wavelet decomposition and adaboost technique in wind farm of east china[END_REF] to the nature of rules deployed, parametric functions, the information processing stages, learning styles, and application domains. A clear understanding of the AI taxonomy mapping enables the users to select the most suitable algorithm for their applications and thus, improving the prediction system performance. It must be noted that all the algorithms mentioned in the flowchart are taken from real applications on power systems and SG. On the other side, the short-term prediction is investigated rather intensively. The efficiency of these methods is limited for further steps ahead in medium-and long-term predictions.

However, ES and meta-heuristic algorithms in AI have lost their popularity due to their high complexity and difficult implementation compared to ML models. Forecasting and prediction are the dominant sorts of using CI due to the availability and abundance of high-resolution data in most cases. Therefore, the prediction system is able to learn solely from concept examples. For particular problems, scare data limits the profitable use of ML due to high acquisition cost or low data storage efficiency. These problems include anomaly detection, predictive control, diagnosis, time series classification, etc. Data Augmentation (DA) is an effective approach to overcome poor data quality. DA uses basic approaches such as Fast Fourier transform and WT to convert the data into the time domain, frequency domain, or time-frequency domain [START_REF] Wen | Robuststl: A robust seasonal-trend decomposition algorithm for long time series[END_REF].

Moreover, several advanced methods were proposed in the literature to increase the limited labeled data using decomposition methods, model methods, and learning methods [START_REF] Hu | Learning data manipulation for augmentation and weighting[END_REF]. Table 2.1 present the advantages and limitations of the presented models.

Table 2.1: Comparative study of the proposed techniques [START_REF] Massaoudi | On the pivotal role of artificial intelligence toward the evolution of smart grids: A review of advanced methodologies and applications[END_REF]. All these models hide some limitations inner configuration, data exploration of the heavy computational complexities. Therefore, meta-heuristic optimization techniques were adopted due to their efficiency and scalability for various complex applications, including designing the perfect architectures of DL approaches.

Model Strengths Limitations

ANN

Evaluation procedure

In SG systems, the AI techniques' evaluation is highly important due to the intrinsic uncertainty of the heterogeneous parameters to the grid. The volatility of the SG environment may cause a considerable loss of accuracy, which threatens the whole SG system operations. The assessment of ML models is conducted using a diversity of score metrics [START_REF] Botchkarev | Performance metrics (error measures) in machine learning regression, forecasting and prognostics: Properties and typology[END_REF], etc. Score metrics are devoted to revealing a key idea on the model performance for unseen data in the testing phase. The growing interest in accuracy measures is demonstrated by a large number of ML techniques proposed. However, adopting the most convenient score function according to data characteristics and model proprieties is non-trivial for ML techniques. For the classification type, confusion matrix and classification accuracy are commonly used due to their simplicity and generalization capabilities for such tasks. However, for regression problems, the score functions diversity requires a better understanding of the forecasting system. Table 2.2 presents the mathematical equations of the most popular accuracy metrics from regression and classification problems [START_REF] Botchkarev | Performance metrics (error measures) in machine learning regression, forecasting and prognostics: Properties and typology[END_REF]. These methods were found to be the most suited indicators to truly reflect the performance of ML techniques [START_REF] Hyndman | Another look at measures of forecast accuracy[END_REF]. From Fig. 2.10, it can be concluded that the RMSE is the most reliable and widely used score metric followed by MAPE and MAE. Regardless of percentage errors, generally, the score metrics, the smaller, the better. Many researchers aim to make standard criteria for effectiveness measures. Nevertheless, the

y i ,
M AE = 1 N N -1 i=0 |y i -ŷi | Root Mean Squared Error RMSE RM SE = 1 N ( N -1 N =0 y i -ŷi ) 2 Mean Absolute Porcentage Error MAPE M AP E = 100(%) N N -1 N =0 | ŷi-yi yi | Coefficient of determination R 2 R 2 = 1 - n-1 n=0 ( ŷi-yi) 2 n-1 n=0 ( ȳi-yi) 2 , ȳ = n-1 i=0 y i Median absolute error MdAE M dAE = M d i=1,...,N (|y i -ŷi |) Standard deviation σ σ = N -1 i=0 (yi-ȳ) N Normalized Root Mean Squared Error nRMSE nRM SE = 100(%) √ 1 N N -1 N =0 (yi-ŷi) 2 ȳi Normalized Mean Absolute Error nMAE nM AE = 100(%) 1 n n-1 i=0 |yi-ŷi| ȳi Mean Bias Error MBE M BE = N i=1 (ŷi-yi) N Prediction Interval Coverage Probability PICP P ICP = 1 n n-1 i=0 ζ, ζ = 1, T i ∈ [L i , U i ] 0, T i / ∈ [L i , U i ] Prediction Interval Normalized Average Width PINAW P IN AW = 1 nR n-1 i=0 (U i -L i ) Average Coverage Error ACE ACE = P ICP -P IN C Classification Accuracy Accu- racy Accuracy = T P +T N T P +F P +T N +F N Precision Precision P recision = T P T P +F P Recall Recall Recall = T P T P +F N F1-socre F 1 F 1 = 2 × P recision×Recall P recision+Recall
selection of error metrics depends essentially on the nature of the data and the type of application deployed.

If the task estimated is classification, then it is preferable to use the ratio of the correct estimated samples by the forecasting horizon. On the other side, for regression, data exploration lies at the core of the goodness of prediction models. Therefore, the choice of which one is computed should be first given higher consideration This method a trained data from a part of the dataset to make predictions of another fold. Despite the efficiency of cross-validation, it is time-consuming. For multiple types of regression techniques, the best method for assessment use the determination coefficient (R-square) with automatic model selection. In [START_REF] Syntetos | The accuracy of intermittent demand estimates[END_REF],

the authors introduce two categories for score metrics selection which are Absolute Accuracy Measures (AAM) and Accuracy measures relative to another Method (AMRAM). AAM use their own mathematical function for calculation, such as RMSE and MAE. They are commonly used because they are simple and straightforward interpreted. AMRAM models involve the percentage of times better. This includes the percentage of time that one method is more accurate than one other. Despite all the work done, it must be mentioned that it is necessary to find a conventional method to assess the bench of prediction techniques.

Summary

AI-as a service provides potential benefits to the energy sector, including full automation of decision-making.

This chapter outlines the commonly emerging AI-driven edge computing for SG operations. A vast majority of case studies from the literature demonstrated that hybridization and assembling straighten AI techniques lead to better accuracy and robustness. Towards that end, power systems require logical reasoning and metaheuristic search methods to solve narrow problems effortlessly. On the other side, the forecasting horizon 29 plays an essential role in assigning the ML method to its suitable application. However, AI techniques are often oriented toward the Short-term horizon. Regarding the reviewed work from the previous studies, it can be observed that DL has acclaimed significant attention in the recent few years due to the high availability of IoT devices and smart meters. However, complex ANN architectures are computationally expensive and time-consuming. Therefore, parallel and distributed computing presents a highly active area of research to reduce the training time and computational complexity in order to have better adaptability to industrial applications of SG. From the reviewed articles, it has been found that the current development of AI deployment paves the way for SG's significant expansion. However, the AI progress faces several challenging points, including significant computational burden, higher complexity, and scalability, which requires further investigation.

The main content of this chapter has been published in [START_REF] Massaoudi | On the pivotal role of artificial intelligence toward the evolution of smart grids: A review of advanced methodologies and applications[END_REF], [START_REF] Massaoudi | Deep learning in smart grid technology: A review of recent advancements and future prospects[END_REF], and [START_REF] Massaoudi | Convergence of photovoltaic power forecasting and deep learning: State-of-art review[END_REF].

Chapter 3

PV power forecasting

Introduction

SE is the largest RES with an overall capacity of 1.5×1018 kW h/year reaching the earth's surface [START_REF] Mohanty | Forecasting of solar energy with application for a growing economy like india: Survey and implication[END_REF]. This enormous energy potential represents nearly 10,000 times the actual yearly world energy consumption [START_REF] Mohanty | Forecasting of solar energy with application for a growing economy like india: Survey and implication[END_REF].

However, the vagaries of weather lead to high intermittency and volatility of the generated PV power for energy practitioners [START_REF] Hong | Long term probabilistic load forecasting and normalization with hourly information[END_REF]. PV generation's intrinsic nonstationary and uncertain nature is mainly caused by erratic and time-varying solar irradiation behavior. Sudden fluctuations in PV generation can lead to reverse power flow, poor power quality, and voltage regulation problems.

Despite being a new concept, PVPF gained significant economic value, and the methodologies and best practices are progressively enhancing. Sound and realistic forecasts of the PV output can bring viable advantages for power systems such as fast dispatchability, grid balancing, high efficiency, PV plant operation monitoring, and secure ride-through unanticipated failures [START_REF] Massaoudi | Convergence of photovoltaic power forecasting and deep learning: State-of-art review[END_REF]. The dire necessity for accurate PVPF techniques shad light on the ample opportunities for integrating more large-scale distributed PV generators.

Thus, significant efforts from both industry and academia have been conducted to improve forecast quality.

However, forecasting distributed PV generation is quite challenging due to the discontinuous appearance of solar irradiation.

PV generation forecast methodologies can be taxonomized according to forecasting periods into three classes, specifically short-term forecasting (STF) required to be valid for seconds to one day, mediumterm forecasting for one day to weeks, and Long-Term Forecasting (LTF) that may be valid for years [START_REF] Abdel-Nasser | Accurate photovoltaic power forecasting models using deep lstmrnn[END_REF].

Broadly speaking, the STF of the PV generation output tends to be more precise than LTF. Furthermore, the forecasting methodologies can be classified as physical methods, statistical methods, AI methods, or a mix of them (hybrid models) [START_REF] Tao | Forecasting power output for grid-connected photovoltaic power system without using solar radiation measurement[END_REF]. The physical models use numerical weather prediction (NWP) models or satellite imagery alongside physical considerations such as meteorological or topological data. However, physical models are restricted to tedious mathematical approaches for specific PV plants, leading to poor generalization potential [START_REF] Tao | Forecasting power output for grid-connected photovoltaic power system without using solar radiation measurement[END_REF]. Statistical models employ prediction models such as Moving Average (MA)

and Autoregressive (AR) [START_REF] Diagne | Review of solar irradiance forecasting methods and a proposition for small-scale insular grids[END_REF]. AI methods employ computational intelligence to predict the PV output accurately, taking advantage of the evolved enhancement in hardware and software. The optimal models are often a combination of physical and statistical models [START_REF] Sansa | Pv power forecasting using different artificial neural networks strategies[END_REF]. According to the literature, it has been found that the combination of different forecasting models could enhance the performance and efficiency of the overall prediction paradigm [START_REF] Mohanty | Forecasting of solar energy with application for a growing economy like india: Survey and implication[END_REF][START_REF] Lobaccaro | A review of systems and technologies for smart homes and smart grids[END_REF]. In order to tackle the above problems, PVPF has been emphasized 3.2 Case study 1

Proposed methodology

Forecasting is a complex and narrow problem. Due to the volatility in weather states, short term PVPF are well suited to generate multiple forecasts based on various case scenarios. In this section, we focus on the proposed framework with more details. At the core of our method lies the Tabu search algorithm that identifies the optimal configuration for the hybrid NARX-LSTM algorithm.

NARX Neural Network

NARXNN is a specific type of dynamic neural network based on the linear Auto-Regressive exogenous (ARX) model. In dynamic networks, the output is affected by both previous input and output layers of the model.

Thus, this NARXNN model has been praised for its competitive potential to handle nonlinear problems due to its fast convergence and versatility, especially with time series data. The NARXNN architecture essentially comprises an input, feedback, and output layers. The NARXNN acquires the information from a feedback layer connected to the input layers. NARNN uses two tapped delay lines in the input and output layers. Alternatively, NARXNN employs a couple of tapped-delay links from the input/output samples [START_REF] Rangel | Enhanced prediction of solar radiation using NARX models with corrected input vectors[END_REF].

The parametric function of the network output is expressed as follows [START_REF] Lin | A delay damage model selection algorithm for NARX neural networks[END_REF]: computed as [START_REF] Khan | Comparative analysis of system identification techniques for nonlinear modeling of the neuron-microelectrode junction[END_REF]:

a(k) = f [b(k); ū(k); ā(k -1)] (3.1) a(k) = f [b(k), . . . , b(k -d E + 1); b(k), . . . , b(k -d a + 1)] (3.
σ(x) = 1 + exp(-σ) -1 (3.3)
From the literature, two configurations were proposed for training the NARXNN: Series-Parallel (SP) mode and Parallel (P) modes [START_REF] Menezes | Long-term time series prediction with the narx network: An empirical evaluation[END_REF]. The SP mode provides an embedded output memory using the information of the true output values. In the P mode, previous forecasting outputs were considered inputs to estimate future information by linking the feedback loop between input and output samples. The key favor of NARX-SP mode lies in the resulting network has a pure feed-forward network and static back-propagation network for better performance.

Paper [START_REF] Khan | Comparative analysis of system identification techniques for nonlinear modeling of the neuron-microelectrode junction[END_REF] demonstrated the high accuracy of the NARXNN model for efficient pattern recognition of the sequential data compared to the state-of-the-art reference models [START_REF] Abdulkadir | Empirical analysis of parallel-NARX recurrent network for long-term chaotic financial forecasting[END_REF]. Important to note, the NARXNN efficiency is essentially related to two tapped-delay lines from the input-output layers. In contrast to the standard RNN model, the NARXNN exclusively acquires the feedback signals to the output layers rather than including the hidden layers' information. Nonetheless, it has been demonstrated that this dynamic architecture proves its performance supremacy compared to the basic RNN models [START_REF] Siegelmann | Computational capabilities of recurrent narx neural networks[END_REF].

However, the significant limitation of the NARXNN lies in the large additional number of parameters coming from higher polynomial orders. Moreover, similarly to vanilla RNN, the exploding gradients are still the major weakness of the series-parallel identification mode [START_REF] Lin | A delay damage model selection algorithm for NARX neural networks[END_REF]. This limitation makes this dynamic model prone to over-fitting when processing extremely long temporal data. This vanishing gradient problem encounter when the gradient descent retracts in highly separated long-term regularities, leading to fading memory dilemma [START_REF] Lin | A delay damage model selection algorithm for NARX neural networks[END_REF].

Long Short-Term Memory

The LSTM model is a time RNN with a control gate structure to exhibit dynamic temporal behavior from time series related tasks. This specialized RNN model tends to avoid gradient disappearance and gradient explosion by filtering the feedback information. The LSTM prevents the learning system from the vanishing gradient problem. Fig. 3.3 illustrates the detailed structure of the LSTM cell. From Fig. 3.3, the LSTM cell includes the input gates I t to which define how much ratio of actual input could be added to the cell state, the forgetting gates f t , which calculates the forget rate of the memory unit given current input, and output gates o t responsible of controlling how the memory unit will affect the node output. This configuration is designed to handle sequential data using memory units effectively. The LSTM cells are devoted to guiding the RNN model to learn when to neglect inconsequential information and when to update memory units through new input samples. The LSTM gating structure is calculated with the following formulas [START_REF] Hochreiter | Long Short-Term Memory[END_REF]: First, the h t-1 , c t-1 , and x t process the input sequences to the LSTM cells. The LSTM gating structure influences the entered sequence to evaluate the learned information's importance. After connecting with f t , a new cell state c t is built. x t and h t-1 move to the forget layer to estimate the significance of the information. Here, the f t gate duty is to scrap or add temporal information allowing data to pass selectively.

I t = σ(W I x t + U i h t-1 + b I ) (3.4)
f t = σ(W f x t + U f h t-1 + b f ) (3.5)
o t = σ(W o x t + U o h t-1 + b o ) (3.6) c = f t c t-1 (3.7) h t = o t tanh(c t ) ( 3
Next, the forgetting gate actualizes the cell state c t with the beneficial information. The output layer uses the important information from the memory unit [START_REF] Hochreiter | Long Short-Term Memory[END_REF].

Tabu Search Algorithm

Meta-heuristic algorithms have largely fueled exponential interest in HO. Broadly speaking, the performance of ML models depends heavily on their hyperparameter configuration. Due to its simplicity, fast-convergence ability, and generalization potential, meta-heuristics have been broadly applied to HO. Proposed by F. Glover in 1986, meta-heuristic local search algorithm. The TSA is a local search approach with a flexible memory structure to avoid trapping the solution in local optima. This is done by forbidden recorded movements in the tabu list [START_REF] Mohammed | A tabu search based algorithm for the optimal design of multiobjective multi-product supply chain networks[END_REF]. The best candidate solution of the combinatorial optimization task in the neighborhood is selected. Fig. 3.4 presents the overall structure of TSA: Regarding Fig. 3.4, let A = {a 1 , ..., a M } with M is the cardinality of A. Let a set S(a q ), q ∈ {1, ..., M }, a fixed subset A\a q . a q present the symbol-neighborhood of a q . define w v (a q ), v = 1, ..., N as the vth symbolneighbor of a q . Assuming x m = [x m 1 , x m nt ] with x m i ∈ A denote a proposed solution in the mth iteration.

The (u, v)th neighborhood vector z m (u, v) of x m , u = 1, n t , v = 1, ..., N based on Euclidean distance can be written as [START_REF] Srinidhi | Layered tabu search algorithm for largemimo detection and a lower bound on ml performance[END_REF]:

z m (u, v) = [z m 1 (u, v), z m 2 (u, v)..., ..., z m nt (u, v)] (3.9)
The (u, v)th neighbor follows the condition [START_REF] Srinidhi | Layered tabu search algorithm for largemimo detection and a lower bound on ml performance[END_REF]:

z m i (u, v) =        x m i f or i = u w v (x m u ) f or i = u (3.10)
In the solution space, n t N vectors are generated from a defined vector in a specfic coordinate. Then, the TSA moves to the best vector among the area while fulfilling the non-move back towards the past solution space that has already been traced. The Tabu matrix (T ) of size n t M × N and t coordinates representing the tabu values of moves is computed as:

T =       t 1,1 t 1,(nt-1)M +1 • • • t 1,ntM . . . . . . . . . . . . t N,1 t N,(nt-1)M +1 • • • t N,ntM       (3.11)
Define g m the vector with the maximum-likelihood performance cost generate until the mth operation of TSA. The shift (u 1 , v 1 ) is accepted if one of the following conditions is respected [START_REF] Srinidhi | Layered tabu search algorithm for largemimo detection and a lower bound on ml performance[END_REF]:

ϕ(z m (u 1 , v 1 )) ≤ ϕ(g m ) (3.12) T (u 1 -1)M + q, v 1 = 0 (3.13)
where the term q is defined as a q = xu1m ,aq∈A . The next move is calculated as [START_REF] Srinidhi | Layered tabu search algorithm for largemimo detection and a lower bound on ml performance[END_REF]:

(u 2 , v 2 ) = arg u,v;u =u1,v =v1 ϕ(z m (u, v)) (3.14)
The iteration process is carried out until the optimal solution is met. TSA has many merits in terms of adaptability, robustness, and accuracy. The solid and super-quick neighborhood search capacity made the TSA well-known and widely used for complex problems [START_REF] Mohammed | A tabu search based algorithm for the optimal design of multiobjective multi-product supply chain networks[END_REF]. Therefore, TSA stands tied very closely to HO for PV stakeholders to enable unbiased ML method development with high scalability potential in real systems.

Proposed NARX-LSTM model

The

E n = Y t -Ŷt = y i t - n i=1 w i F it , (t = 1, . . . , n) (3.15)
where F and w denote the nonlinear mapping function of NARXNN and the corresponding weight value. A

Hankel matrix is build from the expansion of the error vector into a multi-dimensional data matrix in order to capture the dynamic change of the model variation as:

E * n = [e * 1 , ..., e * L ] =       e 1 e 2 • • • e L . . . . . . . . . . . . e K e K+1 • • • e K+L-1       (3.16)
where L ∈ [2 L L(n/2)] is the window length and K = n -L + 1 is the number of overlapping segments. At this stage, two types of transformations are computed for the Hankel error matrix: Min-Max transformation and Hilbert transformation (HT) [START_REF] Glaeske | Some applications of the convolution theorem of the hilbert transform[END_REF][START_REF] Massaoudi | Pls-cnn-bilstm: An end-toend algorithm-based savitzky-golay smoothing and evolution strategy for load forecasting[END_REF]. Let f (x) be the error function and H() the Hilbert transform operator. The HT g(x) of f (x) is calculated as [START_REF] Glaeske | Some applications of the convolution theorem of the hilbert transform[END_REF]:

g(y) = H(f (x)) = 1 π ∞ -∞ f (x)dx x -y = 1 π ∞ -∞ f (x -y)dx x (3.17)
The HT can be reformulated as a convolution by:

g(y) = 1 πX f (x) (3.18)
A fast algorithm based on convolution theorem is employed to develop the HT as [START_REF] Glaeske | Some applications of the convolution theorem of the hilbert transform[END_REF]:

g(y) = if f t[f f t( 1 πx )f f t(f (x)))] (3.19)
Where f f t() and if f t() denote the fast Fourier transform and the inverse fast Fourier transform respectively satisfying [START_REF] Glaeske | Some applications of the convolution theorem of the hilbert transform[END_REF]: .

f f t( 1 πx ) = -jsgn(f req) (3.20)
where f req and sgn indicate the frequency and the sign function respectively. Referring to Eq.3.19, the The vector error correction function (V ) is linked with the original database as entries to the LSTM model optimized by TSA, and the calculation formula is:

product f f t( 1 πx )f f t(f (x)))
X(t) = x i (t) + V [y(t); x i (t)] (3.21)
By using this approach, the LSTM model procures the learning capability of NARXNN to enhance the performance potential of the overall prediction paradigm. The LSTM gating structure utilizes the tangible information as:

i t = σ(W I (x t + V [y t ; x t ]) + U I h t-1 + b I ) (3.22) f t = σ(W f (x t + V [y t ; x t ]) + U f h t-1 + b f ) (3.23) o t = σ(W o (x t + V [y t ; x t ]) + U o h t-1 + b o ) (3.24) c = f t c t-1 (3.25) h t = o t tanh(c t ) (3.26)
where (i t , f t , o t ) present the enhanced input, forgetting, and output gates, respectively. c and c denote the cell state and the memory unit for NARX-LSTM, respectively.

The explanation for the use of NARXNN lies in its fruitful execution in dealing with the latching issue and nonlinear pattern recognition. Then again, LSTM cells decline the exploding gradient. For a superior comprehension of the proposed model, the data preparation is continued in four phases as demonstrated in

Simulation results

The feature engineering technique is carried out based on the Australian meteorological data. At that point, the experimental results are computed to demonstrate the accuracy of the proposed method fully. At last, a performance comparison is handled to assess the potential capabilities of the underlying technique. The core goal is to show the capacities of NARX-LSTM in following temporal patterns with high exactness.

Feature Engineering

To assess the capability of the proposed framework utilizing an actual data set, the simulation results employ two PV power systems from different locations to validate the speculation abilities of the NARX-LSTM model. However, this relationship isn't similarly divided. Different techniques have been proposed to gauge the variety of feature importance. In this investigation, the idea is to permit one parameter and gauge the increment of estimating blunder for each situation by the likelihood value (P-value) computation.

Elastic Net and Extreme Gradient Boosting (XGB) are employed to investigate the trustworthiness of the data representation [START_REF] Zou | Regularization and variable selection via the elastic net[END_REF]. These models rank the features according to their relative Probability value (P-value) following the feature inequality C(s): According to Table 3.5, it worth mentioning that the LSTM layers are fixed at 512, 256, and 36 units for the three LSTM levels, respectively. The dropout values are fixed at 0.1 for all the previously mentioned levels. The optimizer function is adam. The most reasonable activation function, Softplus, is determined as follows:

C(s) =      Keep if
f (x) = log(1 + exp(x)) (3.28)
It bears noting that the TSA is computationally demanding with a conversion speed of 18.95 min per iteration. Although intensive, the TSA usage could be demonstrated by the fact that the high-resolution dataset for a small time-step of 5 minutes causes an exhaustive calculation due to a large number of examined patterns. The final architecture of the proposed model is presented in Fig. 3.7. As indicated to Fig. 3.11, it can be clearly seen that the forecasting execution profoundly relies upon a specific period of the year. In particular, the prediction performance of NARX model decreases significantly during the winter days (Fig. 3.11. (d) and Fig. 3.12(d)). In comparison, NARX-LSTM provide a better accuracy among reference models. The performance superiority is observed on winter and spring days. With more detailed information comparing the original LSTM with the proposed model, it can be said that the error correction vector has essentially upgraded its exhibition in catching the pattern of the real PV power.

From Fig. 3.12, it has been found that the performance supremacy has been referred to NARX-LSTM. The comparison of the proposed NARX-LSTM model with the cited models is conducted based on hourly ahead daily PVPF. Accordingly, the NARX-LSTM execution is solely included with D 2 in this comparative experiment. Table 3.9 illustrates the prediction results of reference prediction models according to their mean nRMSE scores.

Probabilistic forecasting of PV power

Due to the bulk integration of RES, grid utilities draw near the boundaries of a controllable uncertainty.

With the increasing volatility from both of power supply and demand sides, probabilistic forecasting is essentially used to evaluate the intrinsic uncertainties of the PVPF accompanied with deterministic forecasting.

However, probabilistic forecasting is a problematic task due to the intermittent variability of the meteorological conditions during the hours of the day. More importantly, the inevitableness of prediction errors shed light on the importance of probabilistic forecasting. Therefore, the inherent and prominent uncertainty of PV power generation is tackled in this work using interval PVPF method. The loss function of individual point prediction in quantile regression is applied by the following formula:

(ξ|α) =        αξ i ξ 0 (α -1)ξ i , ξ < 0 (3.29)
where ξ denotes the quantile value which lies between 0 and 1 and ξ is defined as:

ξ = y i -f (x i ) (3.30)
f (x) denotes the estimated quantile model. The average function for a given data set can be described as:

(y, |α) = 1 N N i=1 (y i -f (x i )|α) (3.31)
The experimental results are conducted for two data sets to validate the not problem-specific of the forecasting model. The 1 st case scenario is simulated for 5-min daily prediction while the 2 nd case scenario is curried out for hourly daily prediction. The experiment outputs on D 1 and D 2 are shown in Fig. 3.16. As can be seen from Fig. 3.16, it has been found that for case I-II that the prediction intervals encloses most of the actual values. The interval forecasting yields accurate uncertainty results for 5 min and 1 hour ahead predictions. In Fig3.17, 90% prediction intervals are illustrated where they enclose the actual PV power for different weather conditions. In order to quantify the probabilistic results, the interval error measures for case I-II are resumed in Table 3.14. From an interval perspective, the error measures for D 1 and D 2 are computed in Table 3.14. More specifically, for PINC=90%, the NARX-LSTM generates a PICP=96% for 5 min ahead of daily forecasting.

While PICP=100% for hourly daily forecasting using D 2 data set. Regarding the error measures, a general conclusion can be drawn that the probabilistic forecasting with NARX-LSTM is high performing. However, it can be said that 5 min ahead probabilistic forecasting produces lower results (PICP=96.07% for PINC=90%) than hourly forecasting from (PICP=100% for PINC=90%). This variation is explained by the high volatility of the actual PV power on D 1 data set. In this study, the assessment procedure includes the multistep analysis. The proposed framework is validated for 1 hour, 2-hours, and 3-hours ahead. The results are shown in Table 3.15.

According to Table 3.15, it should be reported that the proposed NARX-LSTM model is firmly effective in interval prediction where all the true values are encased by the produced prediction intervals, particularly in one hour ahead and two-hour time range. The enlargement of the forecasting range to three hours ahead prompts losing sight of exactness in terms that some of the actual results surpass the forecasting intervals.

For instance, at 17:00, from the second case study, the real PV energy is 1193.5kW, while the prediction interval is [865.867,1175.649]. Notwithstanding, the increment of the forecasting horizon diminishes the prediction precision. As an end, the NARX-LSTM model demonstrates its appropriateness for single step, one hour and two hour ahead interval prediction.

Bayesian Regression

Bayesian modeling framework is based on Bayesian theorem [START_REF] Mandal | Forecasting power output of solar photovoltaic system using wavelet transform and artificial intelligence techniques[END_REF]. It permits to receive a posterior distribution of model parameters using conditional likelihood and prior distribution [START_REF] Mandal | Forecasting power output of solar photovoltaic system using wavelet transform and artificial intelligence techniques[END_REF] [START_REF] Dorogush | Catboost: gradient boosting with categorical features support[END_REF].

In CWT, the scale and transition are selected randomly. The continuous Wavelet W (a, b) formulate of a wavelet dilation a and time shifts b is calculated as:

W (x, y) = 1 √ a +∞ -∞ s(t)φ * ( t -b a )dt (3.32)
With φ and φ * indicate the mother wavelet and its intricate conjugate, respectively. s(t) denotes the signal at a time step t which is the PV generation in this situation. It merits referencing that the wavelet dilation adjusts the spread of wavelet and the time-shift wavelet computes the central position. There are various sorts of mother wavelets such as the Morlet Wavelet, Meyer Wavelet, and Mexican Hat Wavelet) [START_REF] Dorogush | Catboost: gradient boosting with categorical features support[END_REF]. According to DWT, the scales and transitions are controllable in terms the mother wavelet can be transformed conveniently. The CWT' mother wavelet W (x, y) can be calculated as:

W (x, y) = 2 -(x/2) T -1 t=0 s t φ * ( t -y 2x 2 x ) (3.33)
Where x and y denote the position and resolution level parameters, respectively. T is the series length.

CWT is frequently used either with Haar Wavelet or Daubechies Wavelet for a specific application In our case, the computational work is conducted through the PYWAVELETS library [START_REF] Dorogush | Catboost: gradient boosting with categorical features support[END_REF]. For the PV power application with CWT, Morlet Wavelet ψ a,b (t) for t timestep has been chosen with its parametric equation can be gotten as:

ψ a,b (t) = e -t 2 2 cos(5t) (3.34)
Since the accuracy of the CTW and DWT is nearly similar, the choice of CWT has been made based on its superior simplicity [START_REF] Dorogush | Catboost: gradient boosting with categorical features support[END_REF]. The CWT utilizes three levels of decomposition for the PV power output. The number of levels is concluded based on trial and error simulations.

Catboost classical gradient boosting also suffers from overfitting caused by the prediction shift in the learned model, also known as a special kind of target leakage [START_REF] Wen | Robuststl: A robust seasonal-trend decomposition algorithm for long time series[END_REF]. Furthermore, categorical features with discrete sets of values that are not necessarily comparable to each other cannot be directly handled by binary trees [START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

A popular method to incorporate categorical features in GBDT method consists of transforming them to numerical values. However, this conversion process often leads to target leakage and prediction shifts. To remedy this issue, CatBoost was introduced as a fusion of OGB and ordered target statics. The CatBoost model uses a more efficient strategy that reduces over-fitting and allows the use of the whole dataset for training. Namely, they perform a random permutation of the dataset, and the average label value for each example with the same category value placed before the given one in the permutation is computed.

Several studies prove the high efficiency compared to the Gradient Boosted Decision Trees (GBDT) models in terms of computational intensity and complexity restraints [START_REF] Madaan | Predicting ayurveda-based constituent balancing in human body using machine learning methods[END_REF]. For high dimensional data representation, Catboost provides a fast convergence to the optimal candidate solution compared to the reference models [START_REF] Madaan | Predicting ayurveda-based constituent balancing in human body using machine learning methods[END_REF].

Proposed model

The arbitrary power outputs in PV power generation reflects the an urgent demand for precise PVPF for day-ahead production scheduling. The proposed framework consists of multiple prepossessing blocks with different functionalities. The loop body of the proposed architecture is presented in Fig. 3.18.

According to Fig. 3.18, the proposed framework is conducted in three basic stages. In the 1 st stage, the information is collected and cleaned to eliminate outliers and missing records. The 2 nd stage lies on the feature significance' assessment by the BRR algorithm. The wavelet transformation provides the timefrequency information to the data representation. The predictions produced by Catboost model are linked to Inverse CWT. In the 3 rd stage, the forecasting performance of the proposed model is assessed using CV, Figure 3.18: Proposed model architecture [START_REF] Massaoudi | A hybrid bayesian ridge regression-cwt-catboost model for pv power forecasting[END_REF].

error criteria, and simulation graphs.

Simulation results

Exploratory data analysis and preprocessing

In this case scenario, the DKASC data is used for verification [START_REF] Botchkarev | Performance metrics (error measures) in machine learning regression, forecasting and prognostics: Properties and typology[END_REF]. Obviously, weather sensors may measure erroneous data due to various reasons such as periodic maintenance and dust. The misleading information generated from a faulty measurement has a drastic impact on the forecasting model in the sense that it concludes with erroneous assumptions. In order to overcome this issue, the Not A Number (NAN) values and the outliers are removed from the rows data. For the sake of ensuring intrinsic information with high quality, the data passes with an extensive cleaning process to remove the undesired samples. The score metrics scores deployed involve the R 2 , RMSE, MAE, and MdAE [START_REF] Botchkarev | Performance metrics (error measures) in machine learning regression, forecasting and prognostics: Properties and typology[END_REF].

Numerical modeling

The input values are arranged by their significance utilizing Bayesian Ridge Regression (BRR) model. The BRR model attributes weights to each variable as per their impact on the domain knowledge. According to Moreover, the precise values of R 2 are concluded in Table 3.17. compared to Table 3.16 from the previous simulation. Notwithstanding these reductions, the model is still well-performing since all the folds have an R% threshold of 90.23%. In this manner, the proposed model affirms its high adequacy on consistent weather disturbance. Nevertheless, in extreme weather situations, forecasting models face a relatively challenging task to cope with sudden variations for the majority of ML models. The CWT model evaluation against the PV power high frequencies reflects its role in improving the accuracy results. The assessment of the proposed model is given in Fig. 3.22 with quantitative results in Table 3.18.

Summary

Increasingly high penetration level of PV generation arises in SG. The forecasting of the high intermittency and randomness of PV energy in SG is a persisting challenge. To tackle energy management under uncertainty, two efficient methods have been proposed for this chapter. Firstly, an efficient method based on the combination of NARXNN and LSTM is optimized by TSA. Numerical results show that the proposed approach achieves better prediction accuracy than the traditional methods. Moreover, the NARX-LSTM model showed excellent performance and good generalization capabilities from two different locations and utility scales-secondly, a novel predictive model based on Bayesian Ridge Regression, CWT, and Catboost models. CWT is employed to enhance the feature representation of the original data. Case studies based on the measured datasets from utility-scale PV-power systems from the US and Australia have been used to validate the proposed models' efficiency. To further extend the energy management under uncertainty, the demand side has been given a particular focus in the next chapter to stabilize the PV energy-based supply system and the energy consumption side.

The main content of this chapter has been published in [START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF], [START_REF] Massaoudi | A hybrid bayesian ridge regression-cwt-catboost model for pv power forecasting[END_REF], [START_REF] Massaoudi | Medium and long-term parametric temperature forecasting using real meteorological data[END_REF], [START_REF] Massaoudi | Enhanced random forest model for robust short-term photovoltaic power forecasting using weather measurements[END_REF], [START_REF] Massaoudi | Enhanced deep belief network based on ensemble learning and tree-structured of parzen estimators: An optimal photovoltaic power forecasting method[END_REF], and [START_REF] Massaoudi | Performance evaluation of deep recurrent neural networks architectures: Application to pv power forecasting[END_REF].

Chapter 4

Control management and optimization 4.1 Introduction

The transition to a climate-neutral world with large-scale RES deployment, such as PV farms, has heavily influenced the users' power consumption behavior and electricity generating and distribution companies.

Further, the steady growth in energy consumption leads to uncertain and volatile load demand. The demand profiling is essentially driven by the meteorological factors, industrial and socio-economic and demographic elements, and contextual variables such as customer behavior [START_REF] Mamun | A Comprehensive Review of the Load Forecasting Techniques Using Single and Hybrid Predictive Models[END_REF]. Thus, a precise and trustworthy load forecast is a guarantee to keep the balance between power generation (PV power) and demand. Furthermore, it helps in the correct and efficient scheduling of power system operations [START_REF] Koponen | Assessing and comparing short term load forecasting performance[END_REF].

As a part of power planning, load forecasting plays a fundamental role in achieving safe operation and scientific management of the system. Accurate load forecasting is a basic guarantee for improving the utilization of generation equipment and the effectiveness of economic dispatch. Furthermore, it has important significance for the optimal combination of units, economic dispatch, utility asset management, grid stability, etc. According to the forecasting horizon, the significant benefits for the grid utility from the short-term load forecasting (STLF) are accorded to hourly predictions since it directly affects the load profile and yields ultimately to more economic profits [START_REF] Hernandez | A survey on electric power demand forecasting: future trends in smart grids, microgrids and smart buildings[END_REF]. Automated and accurate STLF is essential for daily dispatching of the power grid. However, the non-stationary characteristics of the load series add to the challenge of this task.

Alongside load forecasting, grid stability assessment present the key solution to mitigating PV fluctuations with a set of control management strategies. PGS can be classified into voltage stability, transient stability, frequency stability, rotor angle stability, resonance stability, and converter-driven stability [START_REF] Hatziargyriou | Definition and classification of power system stability revisited & extended[END_REF]. Voltage stability refers to the electric system's capability to supply the system's reactive power close to nominal value at all buses in the system after facing unexpected perturbation. Transient stability is the ability of synchronous machines, when subjected to a critical collapse, such as islanding, and grid faults, to maintain in its synchronism state [START_REF] Hatziargyriou | Definition and classification of power system stability revisited & extended[END_REF]. Frequency stability is concerned with an electric system's capability to conserve its normal frequency behavior irrespective of the existing disturbance. Rotor angle stability lies in the EPS's potential to conserve synchronism under small disturbances [START_REF] Hatziargyriou | Definition and classification of power system stability revisited & extended[END_REF]. Converter-driven stability refers to system-wide stability problems driven by fast dynamic interactions of power electronics-based systems with slow-and fast-response components. Resonance stability encompasses Sub-Synchronous Resonance (SSR), whether associated with an electromechanical resonance or an entirely electrical resonance [START_REF] Hatziargyriou | Definition and classification of power system stability revisited & extended[END_REF]. In the smart grid era, the power system stability can be carried out by ample energy storage to take care of any eventuality. According to Fig. 4.4, the SG-CBiLSTM framework is introduced as follows: The data is gained from a publicly released web source and cleaned from erroneous values in the data preprocessing and feature engineering stage. At that point, a data augmentation technique is adopted to improve the meaning of the information and enhance the learning capacity of the entire framework. Moreover, data transformation s led to transform all the data to its numeric form using the on-hot encoder function. Then, data smoothingbased SG filter and data normalization were carried out to eliminate the noise from the load demand and normalize the data under an interval [0,1]. At this level, the SG filter can dismiss the noise proficiently alongside minimal distortion from the real load information. All the system inputs are given likelihood values to assess their relevance to the load demand determination. Over a particular edge, the features are kept, and the rest are ignored. Thereafter, the object determination stage split the data into training, validation, and testing intervals. The HO is mandatory for CBiLSTM model to provide more exact outcomes. The last stage is the evaluation of the model. In this stage, the point forecast assessment is conducted utilizing error measurements. Besides, K-fold cross-validation technique is utilized in this investigation as a reliable way to assess the proposed model exactness to an obscure testing information [START_REF] Wong | Reliable accuracy estimates from k-fold cross validation[END_REF]. K-fold cross-validation schemes are frequently used in complex problems [START_REF] Massaoudi | A hybrid bayesian ridge regression-cwt-catboost model for pv power forecasting[END_REF][START_REF] Massaoudi | Medium and long-term parametric temperature forecasting using real meteorological data[END_REF]. The methodology of K-fold cross-validation is outlined in

Weekday W d = W ORKDAY (Datetime) [1,7] Hour H t = HOU R(DateT ime) [1,24]
Season of the year S=SEASON(Datetime) [

W n = W EEKN U M BER(DateT ime) [1,52] Weekend W n d = IF (W d > 5 T hen Y es , Else, N o) Boolean Weather data Temperature T t • C 0, 3] Week number
As per Table 4.1, the total features are the DateTime components and hourly lagged load for the last twenty-three hours. The Boolean features are transformed to numerical values using hot encoder function.

At that point, the load demand is smoothed via SG filter to improve the pattern recognition of the forecasting system. The cleaned information is sent to the feature engineering phase. Four case studies were examined according to the value of the polynomial function specifically three, five, seven, and ten. The load demand and its smoothed derivations are shown in Fig. 4.7. The analysis of the most significant features in the data set is a fundamental stage for a better explainability of framework execution. This procedure exploits the P-values for each feature to map the domain representation and assess the weights for each feature input. Thus, the irrelevant and redundant inputs are discarded from the feature vectors. These artificial features are associated in tandem with the temperature to make a prediction. The data augmentation technique is commonly utilized for low-dimensional frameworks to follow the irregularity and trends of the target variation and acquire more information about domain knowledge. The ranking of the feature is fundamental at this stage to make the framework more proficient with less computational time due to the high number of features. The PLS technique strategy is utilized to diminish the data dimension. PLS is a straightforward dimensionality reduction technique that maps the variables in new feature space with lower dimensions. The Variable Importance of consumption Patterns (VIP) for thirty-two features is illustrated in Fig. 4 [START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF][START_REF] Massaoudi | A hybrid bayesian ridge regression-cwt-catboost model for pv power forecasting[END_REF]4,[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF][START_REF] Massaoudi | Accurate smart-grid stability forecasting based on deep learning: Point and interval estimation method[END_REF][START_REF] Massaoudi | An effective ensemble learning approach-based grid stability assessment and classification[END_REF][START_REF] Akhter | Review on forecasting of photovoltaic power generation based on machine learning and metaheuristic techniques[END_REF][START_REF] Kumar | Global advancement of solar thermal energy technologies for industrial process heat and its future prospects: A review[END_REF][START_REF] Cojocaru | Optimal scheduling in concentrating solar power plants oriented to low generation cycling[END_REF][START_REF] Vinuesa | The role of artificial intelligence in achieving the sustainable development goals[END_REF][START_REF] Raza | A review on artificial intelligence based load demand forecasting techniques for smart grid and buildings[END_REF][START_REF] Massaoudi | Deep learning in smart grid technology: A review of recent advancements and future prospects[END_REF][START_REF] Ali | State-of-the-art artificial intelligence techniques for distributed smart grids: A review[END_REF][START_REF] Chung | Distributed deep reinforcement learning for intelligent load scheduling in residential smart grid[END_REF][START_REF] Aurangzeb | A pyramid-cnn based deep learning model for power load forecasting of similar-profile energy customers based on clustering[END_REF][START_REF] Massaoudi | Short-term electric load forecasting based on data-driven deep learning techniques[END_REF]. Thus, the selected threshold is VIP=0.5. The rest of the simulation results adopted a feature representation including 20 feature inputs. The data is split into three sets: training, validation, and testing sets with a proportion of 75%, 15%, and 10%, respectively. More precisely, the training, validation, and testing instances comprise 77814, 15562, and 10376 samples, respectively.

with x ∈ [1,

Model construction and parameter settings

In this part, the assessment of the proposed SG-CBiLSTM model is reported. The simulation results were conducted using PYTHON programming, and Keras library [START_REF] Chollet | Deep Learning mit Python und Keras: Das Praxis-Handbuch vom Entwickler der Keras-Bibliothek[END_REF]. Keras is a high-level framework specialized in DL. All simulations were run on a Lenovo Intel ®i7 ®Nvidia Geforce GTX 1650@ 2.30 GHz.

The simulation analysis-based on trial and error method is firstly adopted to limit the solution space as much as possible for the optimization process. This method is conducted by selecting arbitrary extreme of our proposed SG-CBiLSTM model is initially led compared with the single CBiLSTM using the proposed framework explained in the previous section. Secondly, the supremacy of the proposed method was verified compared with various reference models. To yield believable outcomes, each case study is repeated 10 times and the results are averaged. The experimental outcomes as demonstrated in Fig. 4.9. As indicated by Fig. 4.9, the proposed SG-CBiLSTM can trace the actual load demand with high accuracy by only utilizing the temperature and the synthetic data. Further, the SG filter verified its capacity to enhance the performance of the prediction framework. As shown in Fig. 4.9, the SG-CBiLSTM method achieved the best accuracy for P=10 where the difference between the estimated curve and the real curve is the littlest compared to the single CBiLSTM and the other models for different P values. Nonetheless, the polynomial degree variates the mistakes from a forecast to another. It can be said that the higher the signal is smoothed, the more accuracy is acquired. A quantitative comparison of the proposed method execution under different P values is resumed in Table 4.4. Table 4.4: Performance analysis on the impact of different SG parameters on the forecasting accuracy [4].

Models

MSLE MAPE(%) nRMSE(%) As per Table 4.4, the best results have been accorded to 10 SG-CBiLSTM, which accomplishes the most reliable forecasts compared to 3 SG-CbiLSTM, which ranges to RMSE=1.36% and MAPE=59.85%. This prompts presume that the SG filters are vital components for accomplishing better accuracy. Interestingly, the choice of the most appropriate parameters s compulsory to accomplish the ideal outcomes.

In the pursuit of a fair evaluation, it will be viewed as the ten SG-CBiLSTM as a source of perspective for the proposed prediction framework. For the sake of straightforwardness and stream of perusing, the 10 polynomial SG-CBiLSTM is referred to as the SG-CBiLSTM hereinafter. The loss function is the training and validation of the model simulation is a fundamental basis to follow the learning accumulation in the model development. The parametric equation of the loss function is determined as given [START_REF] Shi | Deep Learning for Household Load Forecasting-A Novel Pooling Deep RNN[END_REF]: Table 4.5: Forecasting accuracy of different models [4]. As per Tables 4.5-4.6, the 10-CV outcomes obviously exhibit that our proposed system altogether beat stand-alone models according to the score errors. The SG-CBiLSTM accomplishes a high mean testing value of R 2 =99.18% compared to 86,96%, 89,43%, and 95,41% for CBiLSTM, CNN, BiLSTM individually. The general increment of the performance for the DL models revealed in Table 4 Regarding Fig. 4.13, the test results obviously prove that the high supremacy of the proposed model compared to the state-of-art models for hourly STLF due to the slight difference between the real and produced predictions. To assess the prediction accuracy, Table 4.7 shows the score measurement of the proposed SG-CBiLSTM and benchmarks. accomplishes an R 2 = 98.56%. Due to the complex nonlinear relationship between the load demand and its derivatives, the ELM model accomplishes the littlest execution precision with an R 2 = 83.98%. Additionally, it is clear that the proposed model is best compared to reference algorithms. The proposed SG-CBiLSTM is proved to be more prominent to improve the unit commitment between the load and the supply sides.

Loss(ŷ, y) = 2 1 B 1 O B i=1 O j=1 (ŷ -y) 2 (4.1
Model BiLSTM CNN Fold R 2 (%) nMAE(%) nRMSE(%) R 2 (

Multi-step Validation

In this work, the model execution is evaluated for multi-step forecasting utilizing numerous case studies.

The multi-step validation is pivotal to assess the robustness under an extended time range. The analyzed prediction ranges comprise 1h, 12h, one day, and 36h ahead. In the simulations results, we conserve the similar repartition of the database with 75%, 10%, and 25% for the training, validation, and testing sets of the entire dataset. For multi-step-ahead forecasting, the structure of the proposed SG-CBiLSTM model conserves the shape of CNN layers compared with one-step forecasting. For the on-step-ahead, the n anticipated yields xi+1 = f (x i , , x i-1 , ..., x i-n ) takes into consideration the real values of the load data.

Notwithstanding, in multi-step-ahead forecasting, the previously produced predictions are included as inputs as xi+2 = f (x i+1 , x i , x i-1 , ..., x i-n ) . The experimental results of multi-step forecasting for ISO-NE data were repeated ten times, and the results are averaged in Table 4.8. Besides, the error between the forecasted and real load demand referring to the prediction range is illustrated in Fig. 4.14. As indicated in Table 4.8, it can be remarked that the most reasonable scale is the hourly LF. Focusing on the error measures ,the hourly ahead produced outcomes presents an R 2 = 99.11% and nRMSE=0.54% compared to R 2 = 87.22% and nRMSE=3.59 % for 36h ahead. Therefore, the minimum error measure is generated by single-step forecasting, and the maximum error value is produced by 36h forecasting ahead, as illustrated in 4.14. In this study, it is noteworthy to say that the minimal accuracy is accorded to sequential dependencies of 36h ahead with an R 2 = 87.22%. This shows the limitation of the proposed for long prediction ranges, which require more examination.

Case study 2

In this investigation, a Stacked Generalization method between XGB, LGBM, and Multilayer Perceptron

Proposed methodology

One of the most captivating problems this thesis faces is finding the right combination of models ingredients to boost the overall forecasting system without compromising its computational efficiency and memory limitations. To bridge this knowledge gap, an efficient ensemble model is comprehensively introduced for STLF.

Stacked XGB-LGBM-MLP Method: In this part, the proposed model lies in the fusion of XGB,

LGBM, and MLP networks to construct an excellent meta-learner. Stacked Generalization (Stacking)is characterized as an undeniable level nonlinear strategy for combination [START_REF] Wolpert | Stacked generalization[END_REF]. This mix procedure applies nonlinear weightings for low-level predictors to support the prediction framework exactness. The numerical simulations verify that in many cases, Stacking procedure accomplishes preferred outcomes rather than any other base learners [START_REF] Ma | Selected an Stacking ELMs for Time Series Prediction[END_REF][START_REF] Luo | Short-term wind speed forecasting via stacked extreme learning machine with generalized correntropy[END_REF]. The Stacked scheme has two-layered structures (level 0, and level 1) as illustrated in Fig. 4.15. Regarding Fig. 4.16, the level-0 learners comprise XGB and LGBM models while the meta-learner is an MLP model. The idea of the proposed approach is hierarchically coupling ensemble methods and Neural

Networks represented by MLP model to frame a multimodal forecasting framework. The idea of choosing XGB and LGBM as base models are conducted due to their high performance in other forecasting applications. It has been remarked that the stronger the forecasting potential of each heterogeneous base model, the higher performance of the overall stacking ensemble. The goal here is to construct an excellent prediction paradigm to cope with nonlinear system variations, explicitly for STLF task. A binary combination of level-0 models takes into consideration the input parameters, precisely, the temperature and the DateTime to be introduced to the XGB and LGBM models. These two methods produce expectations for each test set using an Out-Of-Fold (OOF) method. In other words, the training part uses a sub-fold for a CV-such as fashion training which is different from the validation part to prevent the over-fitting issue. A mean value The evaluation stage is conducted to analyze the performance of the forecasting system using point forecasting assessment, K-fold cross-validation, and visualization graphs.

Simulation results

In view of a publicly accessible datasets, a real case scenarios were led to evaluate the proposed method and outline the prediction performance of the hybrid model. Besides, a comparative analysis with other reference methods is conducted. Further, the high exactness of the proposed strategy with the recent hybrid STLF procedure for the equivalent database has been demonstrated.

Data Analysis and Processing:

The high performance of a forecasting system is basically linked to two factors: the quality of the input data and the forecasting engine. In this manner, data analysis and feature engineering are mandatory for enhancing the data quality of the underlying system. o check the effectiveness of the proposed approach, two real datasets are utilized. For the primary contextual investigation, the data are taken on an open-access base from a power supply industry in the city of Johor, Malaysia [START_REF] Efendi | A new linguistic out-sample approach of fuzzy time series for daily forecasting of Malaysian electricity load demand[END_REF]. The The temperature behavior is presented as the vital marker of the load demand variation.

For the second scenario, the utilized dataset comes from ISO New England control area, and its eightwholesale load (ISO-NE) records [START_REF] Carneiro | Performance Analysis of Google Colaboratory as a Tool for Accelerating Deep Learning Applications[END_REF]. The underlying database contains Boston, Bridgeport, Burlington, For the information preprocessing, the dataset was cleaned from records anomalies and strange values.

Subsequently, some temporal inputs have been uploaded in the categorical shape. Therefore, the DateTime was transformed into numerical quantities and partitioned to individual system inputs (hour, day, month, year) to improve the continuous forecasting of temporal labels and facilitate the prediction procedure. At that point, the information is divided into two folds for training and testing. The final data representation incorporates the yearly, monthly, daily, and hourly DateTime inputs liked to the temperature variation while the outcomes lie in the load estimations.

Hyperparameter Optimization: In this examination, multiple HO methods have been analyzed to choose the most reasonable method for STLF. Customarily, the hyperparameter values were chosen using on trial and error method. This is computed by interpreting the model performance and dynamically limiting the search space. Meanwhile, manual tuning is often a tedious task leading to inadmissible results. To tackle these issues, Grid Search method (GS) is utilized as an automatic HO procedure to track all the possible values in the solution space. The GS method technique is possibly utilized when the dimension of the search space is moderately low. Moreover, GS is computationally problematic since all cases in the solution space are explored and mimicked. On the other hand, the utilization of meta-heuristics for HO can essentially decrease the computational expense and the fair amount of time associated with GS. In this investigation, five methods were surveyed and compared for HO. Specifically, PSO, SA, ES, RS, and BO [START_REF] Blanke | Hyperactive: A hyperparameter optimization and meta-learning toolbox for machine-/deep-learning models[END_REF].

Comparative results

The determination of the most appropriate HO techniques is vital for achieving satisfactory performance without compromising computational cost-effectiveness. Despite the importance of this topic, the HO does not receive significant attention. In this regard, 5 HO methods are examined in order to choose the most appropriate HO technique for the proposed framework. A predefined search space for all the elements of the proposed Stacked XGB-LGBM-MLP has been computed separately. The simulated environment is conducted utilizing a Lenovo Intel ®i7 ®Nvidia Geforce GTX 1650@ 2.30 GHz. For the simulation, Python programming language and Hyperactive library have been utilized [START_REF] Blanke | Hyperactive: A hyperparameter optimization and meta-learning toolbox for machine-/deep-learning models[END_REF]. The search space comprises nine chosen parameters, explicitly, the number of estimators, the learning rate, maximum depth of both XGB and

LGBM, the maximum of iterations, and the hidden layer size for MLP model. The search space is enormous due to the number of candidate solutions from assigned hyperparameter values to reach the near-ideal solutions. Table 4.9 illustrates the model' configuration. As per Table 4.9, it is noteworthy to say that the fine-tuning of the hyperparameters is computationally requesting for all the proposed models but with different ranges. The quickest calculations for HO are ES and SA, which experimentally decreased the computational expense compared to the other techniques with a consuming time of 82 minutes and 133 minutes, respectively. On the opposite side, the best procedure, as indicated by the highest R 2 value, is RS technique. This is clarified by the fact that expanding the running time prompts higher opportunities to acquire near-ideal results. Despite the RS prevalence, evolution strategy is computationally costly compared with the other HO techniques. Considering the HO method concurred with a higher R 2 value for the rest of the hyperparameter tuning problems in this study, The RS method is embraced since it produces the best outcomes. The increase of the error is due to the high value at the load peak. The relationship between real load and performance compared to single methods. The simulation results have been compared to 11 techniques proposed with the same testing conditions and settings and reported in [START_REF] Sadaei | Short-term load forecasting by using a combined method of convolutional neural networks and fuzzy time series[END_REF]. These techniques include hybrid Convolutional Neural Networks-Fuzzy Time Series (FTS-CNN), Seasonal Auto-regressive Integrated Moving Average (SARIMA), Probabilistic Weighted Fuzzy Time Series (PWFTS), Weighted Fuzzy Time Series (WFTS), Integrated Weighted Fuzzy Time Series (IWFTS), and LSTM Neural Networks [START_REF] Sadaei | Short-term load forecasting by using a combined method of convolutional neural networks and fuzzy time series[END_REF]. The LSTM architecture includes two layers with 256 and 64 units respectively, sequence input layer, dropout layer with a forgetting rate of 0.4, a Softmax function, a batch size of 72, a fully connected layer and regression layer, a maximum of iterations of 1000 with an early stopping function. The reference models were embraced from [START_REF] Sadaei | Short-term load forecasting by using a combined method of convolutional neural networks and fuzzy time series[END_REF] where it has been accounted that the lagged hours remarkably influence the system effectiveness.

Subsequently, the tested LSTM 1,2,3 were assigned to three configurations according to Regarding Fig. 4.25, it can be concluded that the horizon extension for more than 24 hours decreases the accuracy of the forecasting system, especially after the first 30 hours of prediction. Therefore, the proposed architecture only fits the short-term forecasting horizon for one day. forecasting dependencies. However, the proposed model still follows the real load demand with the same behavior. In general, the effect of longer forecasting dependencies is a severe dilemma that limits the capabilities of ML models associated with the scalability of forecasting systems.

nd case study

In the second case study, ISO-NE dataset has been used in order to assess the effectiveness of the proposed model on a larger set. The goal of this section is to quantify the sensitivity and robustness of the model with large data for 11 years. The aforementioned adopted methodology is kept the same for the model construction. To make the comparison more intuitive, a single step ten-fold CV was conducted to follow the variations of the models' performance. Here, the results were performed using Google Collaboratory (Collab) in order to alleviate the computational effort from using the large ISO-NE dataset [START_REF] Carneiro | Performance Analysis of Google Colaboratory as a Tool for Accelerating Deep Learning Applications[END_REF]. Collab was used as a cloud service with a GPU-centric application. According to Table 4.16, The LGBM generates the best performances compared to XGB and MLP models with a mean R 2 =94,13%. Hence, a significant enhancement has been demonstrated for the proposed technique that achieves a mean R 2 =97,73%. The forecasting results can always be kept above R 2 =97,37%.

Power grid stability assessment

In this subsection, power grid stability prediction has been emphasized using two case studies and multiple testing scenarios as shown in fig4.

Proposed methodology

The proposed model is conducted via the combination of SA, Bidirectional mechanism, and Gated recurrent unit. The acquired information by the proposed method is proceeded by six phases as shown in Fig. 4.29.

In the data processing phase, the acquired data is cleaned from empty and misleading samples. The data is transformed into time-series data, and the feature inputs are evaluated to guarantee the relevance of feature representation. Then, the data normalization is conducted to unify the range of data. In the split data phase, the data is divided into three folds: training, validation, testing. The HO of the proposed model by the SA algorithm is conducted in the optimization phase. Next, the BiGRU model employs the set of optimal hyperparameters for the model constriction phase. The final results generation consists of employing the prediction engine to produce point and interval SGSP. The final phase consists of assessing the quality of 4.18 resumes the models' hyperparameters.

Simulation results

In this section, the performance comparisons between our BiGRU and some other data-driven forecasting 4.18: hyperparameters settings for the simulated models [START_REF] Massaoudi | Accurate smart-grid stability forecasting based on deep learning: Point and interval estimation method[END_REF].

Base models hyperparameter settings

BiGRU

The number of LSTM units for the first and second layers is 512 and 256 with a dropout of 0.1 The optimizer function is Adam; The activation is Softplus.

LSTM

The number of LSTM units for the first and second layers are 256 and 128 with a dropout of 0.1 respectively;

The optimizer function is Adam; The activation is Sigmoid.

XGB

The number of estimators is 50; The learning rate is 0.001; The tree complexity is 2; The gamma value is 0.5; The max depth is 6.

ANN

The maximum iterations are 200; The hidden layer size is 100, the solver is Adam.

ELM

The maximum iterations are 1000; The hidden layer sizes is 96, and 30; The activation function is relu, the solver is Adam.

LGBM

The number of estimators is 100; the learning rate is 0.002. and interval mechanism.

Point prediction

The where ξ is the quantile value quantified between 0 and 1 and ξ is calculated as: 4.20.

ξ = y i -f (x i ) (4.4)
The error measures are computed and shown in Table 4.20. Notably, for PINC=90%, the BiGRU generates a PICP=90.23%. The calculated ACE of the proposed BiGRU equals 0.23% which is the least error compared to LSTM and GRU, respectively. Regarding the error measures, a general conclusion can be drawn that the interval forecasting with BiGRU generates a higher performance in terms of lower ACE than the state-of-the-art.

Case study 2

This study tends to supplement the recent works by proposing an efficient Ensemble Stacking Classifier (SEC)-based to cope with the grid instability with a minimum error ratio.

Proposed methodology

Stacking paradigm is a model combination technology that realizes the diversity of heterogeneous base learners to generate an efficient and robust classifier [START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF]. The core intuition behind SEC model implies that According to Fig. 4.36, XGBoost and Catboost models are selected in the first base learners to their high performance in related power systems applications [START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF]. In the first stage, each of these models conducts a leave-one-out or cross-validation (CV) in training set to generate new meta-features for the meta-learner bloc [START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF]. In the second stage, these meta-features were mapped to the real classification tag. A new training set and testing set were formed to train the meta-learner.

LGBM was selected as the meta-learner to train a new model to perform the final prediction. It can be mentioned that the goal of the five-fold CV in the first stage is to ensure that the diversity distribution of the new training set and the new testing set. Thus, the meta-learner model acquires diverse feature representations and directly combines the multiple sources of features as inputs.

Feature engineering

A grid stability simulation database is employed to validate the proposed SEC approach. This dataset is collected from the 4-node network with star topology by the Department of Computer Science, Karlsruhe Institute of Technology [START_REF] Arzamasov | Smart grid stability[END_REF]. The data is open-sourced from the UCI database repository electrical grid stability simulated dataset [START_REF] Arzamasov | Smart grid stability[END_REF]. Each item stands for the predictive attributes on the scale of [0, 10]. The dataset contains 10000 samples representing local stability analysis. The collected inputs include 12 features, specifically, : the reaction time of the energy producer (tau 1) and three consumers (tau2, tau3, tau4), the nominal power produced (p1) or consumed (p2, p3, p4), the price elasticity coefficient for each network participant (g1, g2, g3, g4). The system's output (stab) denotes the state of the grid (stable/unstable).

The acquired data is cleaned from empty and misleading samples. Since the data has different scales, data normalization is essential to unify the range of data. In our problem, the data ranges between 0 and 1 according to the following formula [4].

x n = x r -x min x max -x min (4.6)

Where; x t denotes the normalized value, x r is the real value. Here, x min x max the minimum and maximum values. The final data is divided into three folds; 70% of the data is devoted to training and validation. The remaining 30% are used for testing purposes.

Simulation results

The simulation results are conducted in Python in a Lenovo laptop; i9 generation, NVIDIA GeForce GTX 1650. The hyperparameters of the proposed model and the benchmarks are tuned using Random Search method. The ten-fold cross-validation (10-CV) results are provided in Table 4.21. As illustrated from 4.38, the proposed SEC model achieved the highest F1 score. In order to quantify the metric scores for stable and unstable classes, Table 4.24 is presented. metrics. In order to show the computational timing, Table 4.25 resumes the training and testing time of the proposed SEC and some other benchmarks. According to Table 4.25, the SEC requires a long time to be sufficiently trained (6485 seconds). However, the testing time is 2.42 seconds which is considered fast. Therefore, the most significant shortcoming of the proposed SEC is resumed in its computational burden. However, this burden is compensated by its high efficiency and effectiveness to predict the PGS, which can be helpful in various power system aspects.

Summary

Load forecasting and power grid stability play a major role in the energy management paradigm due to the bulk integration of PV energy. However, Load forecasting is challenging due to the volatile nature of the endusers. This chapter dives into the nitty-gritty of load patterns to propose efficient forecasting methods for condition monitoring and control management. Firstly, two hybrid methods have been proposed for STLF.

The first hybrid model employs the stacked generalization approach between XGB, LGBM, and MLP. The The main content of this chapter has been published in [START_REF] Massaoudi | Accurate smart-grid stability forecasting based on deep learning: Point and interval estimation method[END_REF], [START_REF] Massaoudi | An effective ensemble learning approach-based grid stability assessment and classification[END_REF], [START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF], and [START_REF] Massaoudi | Pls-cnn-bilstm: An end-toend algorithm-based savitzky-golay smoothing and evolution strategy for load forecasting[END_REF].

Chapter 5

Conclusion

This chapter concludes the dissertation and propose several directions for future research work.

Summary

The main objective of this dissertation is to provide a set of efficient forecasting tools to estimate the PV power variation. Beyond this, our ultimate goal consists of proposing innovative prediction tools for the load demand side to maintain power grid stability. These prediction paradigms work together for enhancing the energy management service between the supply side and load side under the SG umbrella.

To achieve these targets, the first chapter addresses energy management and SG's status while focusing on the recent progress of research on artificial intelligence techniques. As reported, SG lies at the core of energy management systems using advanced methodologies from the border spectrum of information and to predict the point PV power in the short-term range. These studies can pinpoint that the PVPF can be accurately performed using both ensemble models and DL models. However, the supply side variations from the PV generators could impact the demand side and end-consumers. Thus, demand management is

2. 1

 1 Comparative study of the proposed techniques [1]. . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Some exemplary score errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Classes of score metrics [1]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 The related characteristics of the PV plant [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Data types [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Feature importance for system inputs on D 1 and D 2 [2]. . . . . . . . . . . . . . . . . . . . . . 3.4 Development settings [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Search space and TSA results of the proposed SG-CBiLSTM [2]. . . . . . . . . . . . . . . . . 3.6 Score performance comparison on D 1 [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Score performance comparison on D 2 [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8 Computational complexity of each model on the testing set [2]. . . . . . . . . . . . . . . . . . 3.9 Comparison of 1-hour ahead PVPF results [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10 Score performance comparison using D 1 [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11 Score performance comparison using D 2 [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.12 Comparison of 3-hour ahead PVPF results [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13 Comparison of 6-hour ahead PVPF results [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14 Performance evaluation of probabilistic forecasting for case I-II [2]. . . . . . . . . . . . . . . . 3.15 Results of multi-step probabilistic forecasting for 1hour(1-h), 2 hours (2-h) and 3 hours (3-h) forecasting horizons [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.16 Evaluation scores [3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.17 Evaluation scores [3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.18 Evaluation scores [3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Generated feature vectors [4]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 hyperparameter settings of the proposed model [4]. . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Layer description of CBiLSTM [4]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Performance analysis on the impact of different SG parameters on the forecasting accuracy [4]. 4.5 Forecasting accuracy of different models [4]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Forecasting results of the proposed model [4]. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Forecasting results of different models on ISO-New England data set [4]. . . . . . . . . . . . . 4.8 Results of Multistep forecasting on ISO-NE dataset [4]. . . . . . . . . . . . . . . . . . . . . . 4.9 hyperparameter settings of experimental models [5]. . . . . . . . . . . . . . . . . . . . . . . . 4.10 Cross-validation results for case study 1 [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11 Evaluation errors for case study 1 [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12 Evaluation measures for the stacked model and other benchmarks for one day ahead [5]. . . . 4.13 hyperparameters settings for reference models [5]. . . . . . . . . . . . . . . . . . . . . . . . . . 4.14 Forecasts and actual load demand [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15 Influence of the prediction range of the proposed model and benchmarks [5]. . . . . . . . . . . 4.16 Performance evaluation results for reference models with 10-CV [5]. . . . . . . . . . . . . . . . 4.17 Performance evaluation results for THE proposed framework with 10-CV [5]. . . . . . . . . . xiii 4.18 hyperparameters settings for the simulated models [6]. . . . . . . . . . . . . . . . . . . . . . . 4.19 Comparative study of various prediction techniques [6]. . . . . . . . . . . . . . . . . . . . . . 4.20 Performance evaluation of interval forecasting [6]. . . . . . . . . . . . . . . . . . . . . . . . . . 4.21 Accuracy measures for SEC for 10-CV. FN, M, and SD are the fold number, mean, and standard derivation respectively [7]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.22 Confusion Matrix for the proposed model and benchmarks [7]. . . . . . . . . . . . . . . . . . 4.23 Comparative study of various prediction techniques [7]. . . . . . . . . . . . . . . . . . . . . . 4.24 Classification report for the proposed model and benchmarks [7]. . . . . . . . . . . . . . . . . 4.25 Computational time (second) for PGS prediction [7]. . . . . . . . . . . . . . . . . . . . . . . . xiv List of Figures 1.1 Artificial Intelligence timeline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Proposed methodology of this dissertation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Organization of the thesis presentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Existing power grid and futuristic smart grid paradigms. . . . . . . . . . . . . . . . . . . . . . 2.2 Characteristics of SG paradigm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 AI applications for power systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Machine learning classes and usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Machine learning models with their open-source libraries [1]. . . . . . . . . . . . . . . . . . . . 2.6 Pictorial representation of the AI Models applied to SG in 2019-2020 [1]. . . . . . . . . . . . . 2.7 Fuzzy inference system structure [1]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.8 Representation of hybrid two-method models comprising GA, ensembles, ANN, FL, SVM, DL, and ARIMA [1]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.9 Taxonomy of AI techniques applied to smart grids [1]. . . . . . . . . . . . . . . . . . . . . . . 2.10 Commonly used score metrics for regression assessment [1]. . . . . . . . . . . . . . . . . . . . 3.1 PV power forecasting methodology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Structure of NARX network [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 LSTM memory block, including the input, output, and forget gates [2]. . . . . . . . . . . . . . 3.4 Framework of the proposed TSA algorithm [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Main framework of the proposed hybrid NARX-LSTM [2]. . . . . . . . . . . . . . . . . . . . . 3.6 General flow chart of developed NARX-LSTM algorithm [2]. . . . . . . . . . . . . . . . . . . 3.7 Optimal configuration of (a)NARXNN model (b) LSTM model [2]. . . . . . . . . . . . . . . . 3.8 Different possible scenario for D 1 dataset [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9 Different possible scenario for D 2 dataset [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.10 Scatter plots ((a), (b)) and error distributions ((c), (d)) of actual and predicted PV output for D 1 and D 2 [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.11 PV power forecast results in 5 min ahead daily forecasting using D 1 [2]. . . . . . . . . . . . . 3.12 PV power forecast result in 1-hour ahead forecasting horizons using D 2 [2]. . . . . . . . . . . 3.13 Variation of PV parameters [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14 Multistep forecasting tests of NARX-LSTM model using D 1 and D 2 datasets for different forecasting horizons [2]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.15 Box-and-Whisker plots of nRMSE and nMAE errors for different forecasting horizons with D 1 (case I) and D 2 (case II) of NARX-LSTM model [2]. . . . . . . . . . . . . . . . . . . . . . 3.16 The PI forecasting curves of the proposed NARX-LSTM model with D 1 and D 2 [2]. . . . . . 3.17 90% Prediction interval results on D 2 and D 2 [2]. . . . . . . . . . . . . . . . . . . . . . . . . . 3.18 Proposed model architecture [3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.19 Assessment of variable contributions using BRR [3]. . . . . . . . . . . . . . . . . . . . . . . . 3.20 Real and predicted PV power output in steady weather conditions [3]. . . . . . . . . . . . . . 3.21 10-fold CV for the proposed model [3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.22 Real and predicted PV power output in unsteady weather conditions [3]. . . . . . . . . . . . . xv

Figure 1 . 1 :

 11 Figure 1.1: Artificial Intelligence timeline.

Figure 1 . 2 :

 12 Figure 1.2: Proposed methodology of this dissertation.

Figure 1 . 3 :

 13 Figure 1.3: Organization of the thesis presentation.

Figure 2 . 1 :

 21 Figure 2.1: Existing power grid and futuristic smart grid paradigms.

Figure 2 . 2 :

 22 Figure 2.2: Characteristics of SG paradigm.

Figure 2 . 3 :

 23 Figure 2.3: AI applications for power systems.

Figure 2 . 4 :

 24 Figure 2.4: Machine learning classes and usage.

  a r k M L l i b P y t o r c h T h e a n o K e r a s S t a t s m o d e l s M o d e l O p e n S o u r c e L i b r a r y

Figure 2 . 5 :

 25 Figure 2.5: Machine learning models with their open-source libraries [1].

Figure 2 . 6 :

 26 Figure 2.6: Pictorial representation of the AI Models applied to SG in 2019-2020 [1].

Figure 2 . 7 :

 27 Figure 2.7: Fuzzy inference system structure [1].

Figure 2 . 8 :

 28 Figure 2.8: Representation of hybrid two-method models comprising GA, ensembles, ANN, FL, SVM, DL, and ARIMA [1].

  Abbreviations: ACO=Ant Colony Optimization, Ada= Adaptive boosting, ABC = Ant Bee Colony, AODE= Aggregating One-Dependence Estimators classifier, ANFIS= Adaptive neuro-Fuzzy Inference System, ANN=Artificial Neural Network, ARIMA= AutoRegressive Integrated Moving Average, ARIMAX= AutoRegressive Integrated Moving Average process with eXogenous inputs, ARMA= AutoRegressive Moving Average, BAC= Bayesian Actor-Critic, BBN= Bayesian Belief Network, Bio= Biological swarm chasing algorithm, BNN= Bayesian Neural Network, CRfs= Conditional random fields, CRO-SL= Coral Reefs Optimization algorithm with Substrate Layers, CNN-WT= Convolutional Neural Network-Wavelet Transform, DCNN= Deep Convolutional Neural Network, DQL = Deep Q-Learning, DBN= Deep Belief Networks, DRN= Deep Residual Networks, DWT= Discrete Wavelet Transform, DWWC= Dynamically Weighted Wavelet Coefficients, ELM= Extreme Learning Machine, ESN= Echo State Networks FA = Firefly Algorithm, Faster R-CNN= Faster Region-based Convolutional Neural Network, FCRBM= Factored Conditional Restricted Boltzmann Machine, FLC = Fuzzy Logic Controller, FIS= Fuzzy Inference System, GA= Genetic Algorithm, GARCH=Generalized Autoregressive Conditional Heteroskedastic, GASVM= Genetic Functionality Support Vector Machine, Glowworm= Glowworm swarm based optimization, GBM= Gradient Boosting Machine, GBRT= Gradient Boosted Regression Tree, GBTD= Gradient Boosting Theft Detector, GP= Gaussian Process, GRU= Gated Recurrent Unit, GWO= Grey Wolf Optimization, HMM= Hidden Markov Models, IPSO= Improved Particle Swarm Optimization, KNN= K-Nearest Neighbors, , LightGBM = Light Gradient Boosting Method, LSSVM= Least Squares Support Vector Machines, LSTM= Long Short-Term Memory, LES= Least-Squares Estimation, NN= Neural Networks, PDRNN= Pooling-based Deep Recurrent Neural Network, SD-EMD= Similar Days-selection-Empirical Mode Decomposition, Neuro-Fuzzy= Artificial neural networks-Fuzzy logic, LES= Linear exponential smoothing, MLP= MultiLayer Perceptron, MSS= Model Structure Selection, HNN= Hybrid Neural Network, MNB= Multinomial Naïve Bayes, NARX=Temporal difference learning, NB=Naïve bayes, NN=Neural Networks, PCA= Principal Component Analysis, PSO= Particle Swarm Optimization, QR=Quantile Regression, RBFNN=Radial Basis Function Neural Networks, RF=Random Forest, RFL= Reinforcement learning, RVR= Relevance Vector Regression, SARSA= State-Action-Reward-State-Action, SA=Simulated Annealing, SARIMAX= Seasonal AutoRegressive Integrated Moving Average process with eXogenous inputs, SDAs= Stacked Denoising Autoencoders, SELM= Stacked extreme learning machine, SMEL= Stacking Heterogeneous Ensemble Learning model, SMO= Spider Monkey Optimization, SMLE= Semiparametric Maximum Likelihood Estimator, STARMA= Space Time AutoRegressive Moving Average, STPAR= Smooth transition periodic autoregressive, SVM= Support Vector Machines, TES=Triple Exponential Smoothing, TD learning= Temporal Difference learning, TDNN= Time Delay Neural Network, VARMAX= Vector AutoRegressive Moving Average with eXogenous inputs, VMD= Variational Mode Decomposition, WNN= Weighted Nearest-Neighbor, WPT= Wavelet Packet Transform, WT= Wavelet Transform, XGBoost= Extreme Gradient Boosting.

Figure 2 . 9 :

 29 Figure 2.9: Taxonomy of AI techniques applied to smart grids [1].

  -Ability to approximate continuously differentiable functions -Fault tolerance ability -Easy to overfitting -Local minima can reduce the model performance -The complex structure of a large-scale FL -High Flexibility and consistency -Efficient computation -Universal approximation capability -Accurate and practical -Hard to define the optimal fuzzy rule base -A large number of parameters to tune -Can be affected by the curse of dimensionality EM -Easy to understand -Non-parametric -Better generalization capability of multiple models -Previous knowledge of system/ May overfit data It can get stuck in local minima -The training cost is too high DL -offer unsupervised feature engineering -High robustness and reliability -Requires a large amount of training data labels -Previous knowledge of system -Results can be incomprehensible HM -Better generalization capabilities -High accuracy -Overcoming the limitations of each method used alone -More complex structure -High computational burden -Difficult to implement

  ŷi and ȳ are the actual truth, the forecasted value, and the normalization factor, respectively. R 2 , n, and k are the determination coefficient, the forecast horizon, and the k t h sample, respectively. PINC denotes Prediction Interval Nominal Confidence. T P denotes True Positive, T N denotes true negative, F N denotes False Negative, and F N denotes the False Positive. Performance metrics are employed for the model selection stage to judge the suitability of the model face to a specific task, training stage to follow the learning structure, or in the tuning and adjustment stage to enhance the model efficiency. Authors in[START_REF] Botchkarev | Performance metrics (error measures) in machine learning regression, forecasting and prognostics: Properties and typology[END_REF] classified the score metrics into seven-folds according to the nature of the data. These folds include measures based on percentage errors, absolute forecasting errors, scaled errors, symmetric errors, measures based on relative errors, relative measures, and other error measures as shown in Table2.3[START_REF] Hyndman | Another look at measures of forecast accuracy[END_REF][START_REF] Armstrong | Error measures for generalizing about forecasting methods: Empirical comparisons[END_REF].The purpose of suggesting a new type of score metrics is needed for preventing some mathematical errors such as the zero-denominator error. The widely used ML score metrics for regression evaluation in the recent research articles are ranked according to their use for SG applications in Fig.2.10.

Figure 2 . 10 :

 210 Figure 2.10: Commonly used score metrics for regression assessment [1].

  using two case studies and multiple testing scenarios as shown in fig3.1. The proposed models are dedicated to both small and large data sizes. By incorporating Nonlinear Auto-Regressive with exogenous input Neural Network (NARXNN) into deep LSTM, we introduce an accurate interval model for point prediction of unstable solar power datasets. The first proposed model takes advantage of the enormous capabilities of DL by implementing NARX-LSTM model and Tabu-Search algorithm for HO. The second model uses wavelet transform, Catboost, and ridge regression to build an effective prediction model for PVPF.

Figure 3 . 1 :

 31 Figure 3.1: PV power forecasting methodology.

2 )

 2 where ū(k) ∈ R and ā(k) ∈ R are the model input and output at k time-step. d E ≥ 1 and d a ≥ 1 denote the input and output memory orders respectively with {d E , d a } ∈ N * . The feedback loop enhances the ability of the forecasting model in recognizing hidden time-series patterns. Fig. 3.2 presents the NARXNN structure.

Figure 3 . 2 :

 32 Figure 3.2: Structure of NARX network [2].

Figure 3 . 3 :

 33 Figure 3.3: LSTM memory block, including the input, output, and forget gates [2].

. 8 )

 8 x t and c t are the inputs and the memory cells. (b f ,b I ,b o ), (W f ,W I ,W o ), and (U f ,U I ,U o ) denote the biases, recurrent weights, and input weights for each gate, respectively. The parameter deontes the related multiplication operation. h t-1 denote the hidden states for the corresponding gates x in the actual time-step. Assuming x = [x 1 , . . . , x t ] denote the input features for LSTM unit with x t ∈ R k . K presents the dimensional vector of the real data set at the t th time-step.

Figure 3 . 4 :

 34 Figure 3.4: Framework of the proposed TSA algorithm [2].

  proposed model (NARX-LSTM) denotes the fusion of NARXNN and LSTM algorithms. The proposed NARX-LSTM algorithm combines the key characteristics of LSTM and NARX to improve the forecasting system. For this current special architecture, NARXNN is linked with embedded memory cells that make jump-ahead connections in the time-unfolded network. The NARXNN is employed hereinafter to quantify the residual error correction values. The residual error correction is used to reduce the error values of the final output. Assuming that the additional tapped time delays from NARXNN enhance the efficiency of the forecasting system using the error Hankel matrix. Assuming E n = [e 1 , ..., e n ] be the error vector between the real values Y t = [y 1 , ..., y n ] and the forecasted values of NARXNN Ŷt = [ŷ 1 , ..., ŷn ]. The core calculation formula of the residual error is as follows:

  denotes special filtering of Fourier transform and the inputs. The computation of the inverse Fourier transform on the product leads to produce the HT of the error vector. HT is employed for its effectiveness for nonstationary and nonlinear time series data. The proposed framework comprises two essential steps: In the first step, the NARXNN acquire the meteorological indicators data to generate initial PV generation' predictions as Ŷ = [ŷ 1 , ŷ2 , . . . , ŷn ]. The former estimations generated from NARXNN are employed to compute the error values and generate the vector error correction. The vector error correction is computed by assembling the Min-Max transform and HT of the error values vector produced by NARXNN.

Fig. 3

 3 Fig. 3.5.

Figure 3 . 5 :

 35 Figure 3.5: Main framework of the proposed hybrid NARX-LSTM [2].

Figure 3 . 6 :

 36 Figure 3.6: General flow chart of developed NARX-LSTM algorithm [2].

Figure 3 . 7 :

 37 Figure 3.7: Optimal configuration of (a)NARXNN model (b) LSTM model [2].

Figure 3 . 8 :

 38 Figure 3.8: Different possible scenario for D 1 dataset [2].

Figure 3 . 9 :

 39 Figure 3.9: Different possible scenario for D 2 dataset [2].

( a ) 2 Figure 3 . 10 :

 a2310 Figure 3.10: Scatter plots ((a), (b)) and error distributions ((c), (d)) of actual and predicted PV output for D 1 and D 2 [2].

Figure 3 . 11 :

 311 Figure 3.11: PV power forecast results in 5 min ahead daily forecasting using D 1 [2].

Figure 3 . 12 :

 312 Figure 3.12: PV power forecast result in 1-hour ahead forecasting horizons using D 2 [2].

Tables 3 . 6 - 3 . 7

 3637 resume the error values on D 1 and D 2 respectively.

Figure 3 . 13 :

 313 Figure 3.13: Variation of PV parameters [2].

(a) 1 2 Figure 3 . 14 :

 12314 Figure 3.14: Multistep forecasting tests of NARX-LSTM model using D 1 and D 2 datasets for different forecasting horizons [2].

Fig. 3 .

 3 Fig. 3.15 shows the variation of the performance for a multistep analysis based on nMAE and nRMSE for ten fold cross-validation on D 1 and D 2 .

  (a) nMAEs for case I. (b) nMAEs for case II. (c) nRMSEs for case I. (d) nRMSEs for case II.

Figure 3 . 15 :

 315 Figure 3.15: Box-and-Whisker plots of nRMSE and nMAE errors for different forecasting horizons with D 1 (case I) and D 2 (case II) of NARX-LSTM model [2].

( a )

 a Prediction intervals for case I using D 1 . (b) Prediction intervals for case II using D 2 .

Figure 3 . 16 :

 316 Figure 3.16: The PI forecasting curves of the proposed NARX-LSTM model with D 1 and D 2 [2].

  (a) NARX-LSTM at 5 min ahead with PINC=90% on D 1 . (b) NARX-LSTM at 1-hour ahead with PINC=90% on D 2 .

Figure 3 . 17 :

 317 Figure 3.17: 90% Prediction interval results on D 2 and D 2 [2].

Fig. 3 . 19 ,

 319 Fig. 3.19, The horizontal irradiation and the previous PV power are the most significant attributes since they generate positive weights values with the predominance of the horizontal irradiation. The simulation results are computed using 248503 rows data by a LENOVO Ideapad L340 with the only positive values with the superiority of the horizontal irradiation. Fig. 3.20 presents the curve shaping of one-day PVPF in normal weather states. Moreover, Table.3.16 introduce the resume of the core calculation formula of score metrics.

  3.16 introduce the resume of the core calculation formula of score metrics.

Figure 3 . 19 :

 319 Figure 3.19: Assessment of variable contributions using BRR [3].

Fig. 4 .

 4 5 represent the 10-fold cross-validation (CV) curve of the proposed method.

Figure 3 . 20 :

 320 Figure 3.20: Real and predicted PV power output in steady weather conditions [3].

Figure 3 .

 3 Figure 3.21: 10-fold CV for the proposed model [3].

Figure 3 . 22 :

 322 Figure 3.22: Real and predicted PV power output in unsteady weather conditions [3].

Fig. 4 .

 4 1 presents the common machine learning applications to stability analysis and control. These applications are categorized based on stability control fault diagnosis, stability assessment, and security assessment.

Figure 4 . 1 :

 41 Figure 4.1: AI applications for power grid stability.

Figure 4 . 3 :

 43 Figure 4.3: The adopted methodology for the proposed SG-CBiLSTM model [4].

Figure 4 . 4 :

 44 Figure 4.4: High-level flowchart of SG-CBiLSTM algorithm [4].

Fig. 4

 4 Fig. 4.5.

Figure 4 . 5 :

 45 Figure 4.5: 10-fold cross-validation methodology [4].

( a )

 a Electric load(MW) between 2003-2014. (b) Hourly temperature( • C) between 2003-2014.

Figure 4 . 6 :

 46 Figure 4.6: Load and temperature variation between 2003-2011 (103753 instances) for the ISO-NE data set [4].

Figure 4 . 7 :

 47 Figure 4.7: Comparative results of SGCBiLSTM model with different polynomial functions [4].

Figure 4 . 8 :

 48 Figure 4.8: Variable importance of load patterns with a threshold value (red line) equal to VIP=0.5 [4].

Figure 4 . 9 :

 49 Figure 4.9: Performance comparison of SG-CBiLSTM model with a variety of polynomial filters p={3,5,7,10} [4].

  ) where B, O denote the output matrix size. Here, the proposed model is trained with a training set stating from 2 nd , March 2003 with the first 75% portion of the whole set. To follow the loss values when the proposed SG-BiLSTM fetches the next batch of data. It has been adopted the MAPE as a loss function with an Adam optimizer [142]. The training process was selected at hundred epochs with an early-stopping function. This function is adopted to automatically follow the best-trained model without looking for the most appropriate epoch number. Fig. 4.5 displays the variation of the training loss of the first fourty epochs for the training and testing sets.

Figure 4 . 10 :

 410 Figure 4.10: Loss trend of the SG-CBiLSTM model [4].

  .5 is clarified by embracing the data augmentation methodology for the first database. Moreover, employing the S-G filter with the 10 th polynomial fitting supports the CBiLSTM precision with an R 2 12.22%. An outline of the 10-CV outcomes regarding the R 2 has appeared in Fig. 4.11 feature the accuracy upgrade of the SG-BiLSTM model.

Figure 4 . 11 :

 411 Figure 4.11: Box plot of ten-fold CV of four models in terms of R 2 (%).

Figure 4 . 12 :

 412 Figure 4.12: Hourly predictions of the forecasting system [4].

Figure 4 . 13 :

 413 Figure 4.13: Simulation results of SG-CBiLSTM and reference models over multiple steps ahead [4].

Figure 4 . 14 :

 414 Figure 4.14: Multi-step STLF error variation with the Error (%)= 100*(ŷ norm -y norm ) [4].

(

  figures out how to beat eleven reference models for STLF.

Figure 4 . 15 :

 415 Figure 4.15: Graphical representation of the stacking generalization approach [5].

Figure 4 . 16 :

 416 Figure 4.16: Schematic representation of the level-0 of stacked architecture framework built from base learners: XGB and LGBM [5].

Figure 4 . 18 :

 418 Figure 4.18: Flowchart of the proposed Stacked XGB-LGBM-MLP method [5].

  gathered data comprises high-resolution data with 17519 samples and a sampling frequency of one hour. The database comprises a time period from 01/01/2009 to 01/01/2011. The measured hourly temperature ( • C) and load demand (MW) as demonstrated in Fig. 4.19.

( a )

 a Electric load(MW) between 2009-2011 (b) Hourly temperature( • C) between 2009-2011.

Figure 4 . 19 :

 419 Figure 4.19: The time series data between 2009-2011 (17519 samples) [5].

  Concord, Portland, Providence, Windsor Locks, and Worcester registrations. The data reported from ISO-NE are employed for energy management and market enabling. The obtained information incorporates the hourly temperature and load taken from 2003 to 2014. The total vector rows utilized is 103775. The two datasets were partitioned into training data and testing data at a ratio of 80% and 20%, respectively. The testing set for the first and second case scenario contains 1755 and 103774 vector rows individually. The objective of utilizing these datasets with various sizes lies in investigating the model accuracy on small and large training samples.

  individually. Moreover, the Stacked XGB-LGBM MLP model confirms its ability to deliver a more robust prediction solution compared to the rest of the models in terms of MAE, R 2 , MAPE, and MSLE error values. A daily STLF is computed and appeared in Fig. 4.20.

Figure 4 . 20 :

 420 Figure 4.20: Actual and predicted demand for 31/12/09 [5].

Figure 4 . 23 :

 423 Figure 4.23: Comparison of MAPE performance for ML models [5].

Figure 4 . 24 :

 424 Figure 4.24: RMSE and MAPE values for the reference models and the proposed technique [5].

Figure 4 . 25 :

 425 Figure 4.25: Actual and predicted demand for 31/12/09 and 01/01/10 [5].

Figure 4 .

 4 Figure 4.26: 10-fold CV graph for Stacked XGB-LGBM-MLP [5].

Figure 4 . 27 :

 427 Figure 4.27: Box-and-Whisker plot of RMSE errors for STLF models [5].

Fig. 4 .

 4 Fig. 4.26 presents the high stability of the proposed XGB-LGBM-MLP model with a minimum R 2 equal to 95%. The mean RMSE and MAE for Stacked XGB-LGBM-MLP are 481,03 MW and 691,40 MW, respectively. Fig. 4.27 presents a Box-and-Whisker plot of RMSE values for STLF.According to Fig.4.27, the proposed technique achieved a significant improvement compared to standalone models with a lower RMSE value. The simulation results show that the prediction potential could be enhanced by augmenting the size of the data. Nevertheless, the Stacked XGB-LGBM-MLP also has good robustness under the condition of the small dataset. It can be seen that the stacking ensemble learning model combines the merits of every stand-alone model to overcome the limitations of low-precision prediction of single models. Therefore, it can be deduced that the proposed stacking technique is perfectly tailored for STLF.

28 .

 28 The proposed models are dedicated to both small and large data sizes. The first proposed model takes advantage of the enormous capabilities of DL by implementing a deep bidirectional GRU model and Simulated Annealing algorithm for data smoothing. The second model uses Cataboost, XGB, and LGBM to build an effective classifier for grid stability.

Figure 4 . 28 :

 428 Figure 4.28: Methodology of grid stability prediction.

4. 3 . 1

 31 Case study 1For having improved generalized SG Stability Prediction (SGSP), this study employs a DL model, specifically, Bidirectional Gated Recurrent Unit (BiGRU) for SGSP. Both point and interval forecasting of the PGS are depicted. This study employed Simulated Annealing (SA) optimization algorithm for automatic hyperparameter tuning to select the most suitable parameters from a predefined search space.

Figure 4 . 30 :

 430 Figure 4.30: Flowchart of the proposed forecasting process [6].

  methods, including LSTM, Extreme Learning Machine (ELM), Deep artificial Neural Network (ANN), Light Gradient Boosting Machine (LGBM), and Extreme Gradient boosting (XGB) have been demonstrated. Point forecasting predicts single values of stability index values, while interval forecasting quantifies the uncertainties associated with the stability index values. The simulation results are conducted via a point Table

  point forecasting assessment of the proposed model is conducted in this subsection. The scatter plot and the error distribution of the proposed BiGRU model are shown in Fig. 4.31.

Figure 4 .

 4 Figure 4.31: (a)Scatter plot and (b)error distribution of BiGRU model [6].

Figure 4 . 33 :

 433 Figure 4.33: Performance analysis of prediction models [6].

Figure 4 . 34 :

 434 Figure 4.34: Error variations [6].

  -f (x i )|α) (4.5) After adding a risk uncertainty-based BiGRU model, the forecasting system becomes able to perform quantile regression. The interval forecasting model is implemented in Keras by modifying the loss function as Eq. 4.5 to provide uncertainties from point GSI prediction. The experimental results are the lower/upper quantiles obtained by the BiGRU model are estimated and shown in Fig. 4.36.

Figure 4 . 35 :

 435 Figure 4.35: The constructed prediction intervals for grid stability index [6].

  incorporating the outputs of different classifiers renders more accurate predictions. To this end, the proposed model introduces a combination of XGBoost, Catboost, and LGBM to enhance the overall generalization ability of SEC technique. By interpreting training data from various angles, the SEC model would achieve an excellent performance of classification. A simplified flowchart of the detailed ensemble steps as illustrated in Fig. 4.36:

Figure 4 . 36 :

 436 Figure 4.36: Flowchart of the proposed ensemble method [7].

  proposed method achieved almost 3% higher accuracy when compared to LGBM. The Closest performance to the proposed technique is conducted by Catboost model, which achieved 98.36% of overall accuracy. The supremacy of the proposed SEC can also be presented through a bar graph representation in Fig.4.37.

Figure 4 . 37 :

 437 Figure 4.37: Comparative results [7].

Figure 4 . 38 :

 438 Figure 4.38: Radar plot comparison for the proposed model with other benchmarks based on F1 score [7].

Fig 4 .

 4 Fig 4.39 is presented. According to Fig. 4.39, it is clearly shown that the proposed technique has the highest performance

Figure 4 . 39 :

 439 Figure 4.39: Score performance comparison [7].

  Stacked XGB-LGBM-MLP has outperformed 11 reference models. It worth noting that a comparative study with HO methods reveals that the Random Search method can achieve the optimal model configuration despite being computationally extensive. The second approach lies in the combination of a deep learning model, namely, PLS-CNN-BiLSTM. The numerical results demonstrate the performance capability of deep learning methods to achieve state-of-the-art performance for single and multi-step predictions. Next, the grid stability assessment has been conducted. An accurate classifier-based LGBM-XGB and Catboost have been proposed to detect and identify the stabilities in the grid. Moreover, an efficient regressor-based SA-BiGRU method has been introduced to predict the stability index accurately. It was shown through several case studies that on real datasets the supremacy and high efficiency of the proposed models compared to available techniques.

  communication technologies. Several intelligent methods have been analyzed, including Fuzzy logic, Shallow networks, ensemble methods, DL methods, and Hybrid methods. It has been found that DL-based PVPF emerged nowadays as a promising research direction. With the enormous integration of smart meters in electrical grids, DL takes advantage of the large-scale and multi-source data representations to achieve a spectacular performance and high forecastability potential compared to the the-state-of-the-art. In the second chapter, Two case studies have been depicted for PVPF using meteorological data. The first case proposed a DL model combining Long-Short Term Memory (LSTM), Nonlinear Auto-Regressive exogenous model (NARX), and Tabu Search algorithm, named NARX-LSTM. The NARX-LSTM achieved state-of-the-art performance for both point and interval forecasting for small and large-scale PV systems. In the second case study, an ensemble learning model has been proposed using Bayesian Regression, Continuous Wavelet Transform, and Categorical boosting. The ensemble model above analyses the feature correlations

Table 2 .

 2 2: Some exemplary score errors.

	Name	Abbre-	equation
		viation
	Regression
	Mean Absolute Error	MAE

Table 2 .

 2 3: Classes of score metrics[START_REF] Massaoudi | On the pivotal role of artificial intelligence toward the evolution of smart grids: A review of advanced methodologies and applications[END_REF].

	Class	Advantages	Shortcomings
	Absolute errors	-Popularity	-Scale dependencies.
		-Simplicity	-High sensibility to outliers.
			-Low reliability with different datasets.
	Percentage errors -High Reliability	-Biased error measures
			-High sensibility to outliers.
			-Possible errors due the division by zero
			-Asymmetry problems
	Scaled errors	-Symmetrical	-Possible errors due the division by 0
		-Not effected by outliers
	Symmetric errors -Less calculation errors	-Non-symmetric values
		-Reliability	-Possible errors due the division by 0
			-Less usage
	Relative errors	-High Reliability	-Possible errors due the division by 0
	Relative measures -Ease of Interpretability	-Possible errors due the division by 0
			-Less reliability

for the zero-denominator error (RMSE, MAPE, MASE). Cross-Validation (CV) method is also an effective method for avoiding biased data.

Table 3 .

 3 1. D 1 : the available database from Desert Knowledge Alice Springs Center (DKASC) in Central Australia (23.7618°S, 133.8749°E)[113]. Beginning in September 2008, the DKASC comprises an exhibition facility of 38 destinations to construct a high certainty level of PV plants with various brands from competitive companies[START_REF] Ingenhoven | Analysis of Photovoltaic Performance Loss Rates of Six Module Types in Five Geographical Locations[END_REF]. These destinations consist of real-life monitoring of PV technologies from various sorts, models, and setups as introduced in Tables 3.1-4.2. The specific characteristics of the two years from DKASC's public-facing repository were profoundly investigated to focus on the PV power yield from DKASC online portal (DKASC 2019). The data representation of our framework includes ambient temperature Celsius (T in (°C)), Wind direction (Wd in °), Horizontal Radiation (Ir in (W/m 2 )), Diffuse horizontal radiation (DIr in (W/m 2 )), and Relative humidity (Rh in (%)) while the output is the active power (kW). 1: The related characteristics of the PV plant[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	System specification		Characteristics
					D 1
	Array rating			191.74 kW
	Average of Powering			141house
		Location		475 South Stuart Highway, Alice Springs, Australia
	PV technology	(Mono/Poly)crystalline Silicon Thin Film (CdTe/CIGS)
		Array area				4 * 38.37m 2
	Type of tracker	Fixed: Ground Mount, Single Axis, Dual Axis
	Inverter size/type		46 kW, SMA/Sunny Mini Central 6000A
					D 2
	Array rating			5.87 MWp
		Location		South of Windsor Road between First Street and the railroad tracks
		Array area				20.8 acres
	Average of powering	2% of the electrical demand for the Urbana campus
	Number of panels			18867 panels
	Carbon reduction		6000 metric tons/year
				Table 3.2: Data types [2].
	PV	Data timestep Training	Testing	Sim-	Time window
	station			year	year	ples
	Case study	D 1	5min	2017	2018	183680	3/31/2017 23:55 -01/01/2019
	I						00:00
	Case study	D 2	1hour	2016	2017	15068	01/02/2016 04:00 -28/10/2017
	II						23:00

2. D 2 : Urbana-Champaign solar farm-Flyover (UCF) dataset from USA (40°06'07.3°N 88°13'37.5°W)

[START_REF] Kuzmiakova | Machine-learning-for-solar-energy-prediction[END_REF]

.The climate information is gathered from the National Oceanographic and Atmospheric Administration (NOAA). Beginning from its first year of activity, The UCF plant creates around 7.28 megawatt-hours (MWh). This last is viewed as the biggest solar array installation for Urbana campus.

The pre-owned information comprises T, Rh, Cloud coverage (Cc), visibility, Wind speed (Ws), station Pressure (P), Altimeter indication (A), and PV power. More insights regarding the attributes of UCF is found in Tables 3.1-4.2.

It can be said that the data set is cleaned from absent values and smoothed from sensors breakdown' measurements. The input factors have an immediate connection with the anticipated PV power yield.

Table 3 .

 3 3: Feature importance for system inputs on D 1 and D 2[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	, IXGB(s) + ElasticN et(s) ≥ t	(3.27)
	Keep if, IXGB(s) + ElasticN et(s) < t

where IXGB(s), ElasticN et(s) and t denote the calculated P-value by XGB and Elastic Net, and feature selection threshold respectively. Table

4

.1 presents the numerical measures of P values for the collected meteorological features.

Table 4 .

 4 1, the irradiation from D 1 and the temperature and relative humidity from D 2 significantly affects the PV power prediction. For effortlessness, the time series data representation incorporates all the collected meteorological features as inputs associated with the date features (minute/hour/day/month/year) to predict the future PV power. The date features are numerically transformed using a one-hot encoder to fit the model prerequisites. The overall database should be divided into two data sets, which are training and testing. A complete year {2017 D1 , 2016 D2 } is committed to model training and the remainder of {2018 D1 , 2017 D2 } is utilized for testing purposes.

Table 3 .

 3 5: Search space and TSA results of the proposed SG-CBiLSTM[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	Model	Configuration	Search Space	TSA
		LSTM layer 1	[64, 512]	512
		LSTM layer 2	[36, 256]	256
	LSTM	LSTM layer 3	[36, 256]	36
		Dropout 1	[0.1, 0.5]	0.1
		Dropout 2	[0.1,0.5]	0.1
		Dropout 2	[0.1,0.5]	0.1
		activation	[Sigmoid,Softplus,Selu,Elu,Softmax] Softplus
		optimizer	[adam,SGD, RMSprop]	adam
		Time (min)		189.52
		Time/iteration (min)		18.95

Table 3 .

 3 6: Score performance comparison on D 1[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	Weather	Model	R 2 (%)±SD nRMSE (%)±SD nMAE (%)±SD
		NARX-LSTM	99.4	2.39	1.46
		LSTM	95.04	7.98	6.38
		XGB	96.91	6.05	4.8
	Sunny
		LGBM	97.52	3.98	4.35
		NARX	97.86	4.67	3.26
		NARX-LSTM	99.27	2.14	1.23
		LSTM	95.88	5.6	3.82
		XGB	94.53	6.58	4.31
	Partially cloudy
		LGBM	96.51	3.92	4.23
		NARX	77.85	11.47	6.15
		NARX-LSTM	99.29	2.33	1.5
		LSTM	95.59	6.59	4.93
		XGB	95.82	6.15	4.56
	Cloudy/foggy
		LGBM	96.77	3.95	4.44
		NARX	78.24	13.14	8.04
		NARX-LSTM	97.4	1.07	0.62
		LSTM	95.28	1.62	1.12
		XGB	92.2	1.9	1.14
	Rainy
		LGBM	36.12	4.14	3.92
		NARX	68.62	4.15	2.27
		NARX-LSTM 98.84±0.83	1.98±0.53	1.20±0.35
		LSTM	95.45±0.32	5.45±2.37	4.06±1.93
		XGB	94.86±1.75	5.17±1.90	3.99±1.76
	Overall
		LGBM	81.73±26.34	4.62±0.49	3.94±0.02
		NARX	80.64±10.66	8.36±4.01	4.93±2.29

Table 3 .

 3 7: Score performance comparison on D 2[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF]. accuracy other single methods. The NARX-LSTM generate a mean nRMSE=1.98% and nRMSE=1.33% on D 1 and D 2 respectively. The model performance is The simulated results affirm the outstanding potential of the proposed NARX-LSTM in temporal dependencies prediction. Table3.8 illustrate the execution time for the proposed model and benchmarks using the testing set.

	Weather	Model	R 2 (%)±SD nRMSE (%)±SD nMAE (%)±SD
		NARX-LSTM	99.83	1.54	1.39
		LSTM	95.72	6.74	4.3
	Sunny	XGB	90.25	9.76	5.65
		LGBM	98.42	4.47	3.04
		NARX	92.81	7.92	8.65
		NARX-LSTM	99.91	1.09	0.96
		LSTM	95.11	7.14	4.64
	Partially cloudy	XGB	81.5	12.56	8.45
		LGBM	97.84	5.05	4.08
		NARX	90.13	10.11	9.01
		NARX-LSTM	99.62	1.88	1.63
		LSTM	88.67	10.34	6.84
	Cloudy/foggy	XGB	83.94	12.6	7.49
		LGBM	84.06	13.19	7.82
		NARX	80.38	12.36	10.59
		NARX-LSTM	99.41	0.82	0.67
		LSTM	57.89	5.09	2.88
	Rainy	XGB	54.42	5.49	3.16
		LGBM	48.98	7.7	4.58
		NARX	87.67	7.46	4.25
		NARX-LSTM 99.69±0.19	1.33±0.41	1.16±0.37
		LSTM	84.35±15.52	7.33±1.90	4.67±1.42
	Overall	XGB	77.53±13.7	10.10±2.90	6.19±2.02
		LGBM	82.33±20.09	7.60±3.45	4.88±1.79
		NARX	87.75±4.63	9.65±1.83	8.37±2.26

Regarding the numerical results introduced in Tables 3.6-3.7, it can be concluded that the NARX-LSTM provides a better

Table 3

 3

.8, the basic ANN offers the least calculation time. The proposed model generally more computationally requesting than the individual LSTM (case I), while on D 2 , the proposed model took less time than the original LSTM. Notwithstanding the more extended testing computation of the proposed NARX-LSTM model, it is effectively pertinent to true case scenarios (particularly with the advancement of distributed computing). As the investigation endeavors to offer a fair evaluation of NARX-LSTM model, a reasonable examination is led with the recently provided benchmark models, explicitly, Ensemble of Methods (ENS), improved ANN, Grey-Box model (GB), Correlation model, Extreme Learning Machines (ELM), modified LSTM, Differential Polynomial Neural Network (D-PNN), Auto-encoders LSTM (AE-LSTM), and Wavelet transform-Radial Basis function neural network-Particle Swarm Optimization (WT-RBFNN-PSO).

Table 3 .

 3 9: Comparison of 1-hour ahead PVPF results [2].

	Model	nRMSE %
	ENS [120]	7.16
	Improved ANN [121]	3.76
	GB [120]	7.36
	Correlation model [122]	5.68
	ELM [122]	10.14
	Modified LSTM [123]	8.83
	D-PNN [124]	13.42
	AE-LSTM [125]	8.39
	WT-RBFNN-PSO [126]	1.85
	NARX-LSTM	1.33
	As per

Table 3

 3

.9, the NARX-LSTM model could accomplish the best outcomes based on the overall forecasting performance in point forecasting with 1h forecasting range. The mean nRSME of NARX-LSTM is nRMSE=1.33%, while the nearest model (WT-RBFNN-PSO) achieves a mean nRMSE=1.85%. For better visibility of the proposed model superiority among all top-of-the-line models based on hourly ahead daily PVPF, Fig.

3

.13 illustrates a comparison results of all models based on nRMSE score.

Table 3 .

 3 10: Score performance comparison using D 1[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	Horizon Fold	R 2 (%)	nRMSE (%) nMAE (%)
		train	test	train test	train test
	Mean 99.89 99.88 0.97 0.99	0.49 0.49
	1 hour
	SD	0.02	0.05	0.1	0.19	0.09 0.09
	Mean 99.6 99.57 1.85 1.93	0.79	0.8
	6 hours
	SD	0.05	0.06	0.11 0.13	0.1	0.1
	Mean 98.86 98.73 3.13 3.31	1.17 1.21
	12 hours
	SD	0.07	0.12	0.1	0.15	0.08	0.1

Table 3 .

 3 11: Score performance comparison using D 2[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	Horizon Fold	R 2 (%)	nRMSE (%) nMAE (%)
		train	test	train	test	train test
	Mean 93.64 93.56 7.22	7.26	3.68	3.7
	3 hours
	SD	0.28	0.59	0.15	0.33	0.14 0.11
	Mean 93.73 93.53 7.17	7.27	3.72 3.77
	6 hours
	SD	0.27	0.58	0.15	0.26	0.17 0.17
	Mean 84.31 83.23 11.34 11.69	6.14 6.33
	24 hours
	SD	1.11	1.41	0.42	0.43	0.42 0.33

According to 3.10, the performance of NARX-LSTM decreases with the increase of the forecasting horizon. A clear conclusion can be drawn that the proposed technique delivers more accurate single-step predictions than multiple steps predictions. However, from the simulation results on hourly daily ahead pre-dictions, it is concretely evident that the proposed NARX-LSTM could generate accurate results with an R 2 = 99.89 ± 0.02 and R 2 = 99.69 ± 0.19 for D 1 and D 2 respectively. While the worse results are achieved for 12-hours and 24-hours ahead with R 2 = 98.86 ± 0.07 and R 2 = 84.31 ± 1.11 for D 1 and D 2 respectively.

Table 3

 3

	.12 resumes the

Note:

The best information criterion is in boldface.

Table 3 .

 3 13: Comparison of 6-hour ahead PVPF results [2].

	Model	nRMSE % nMAE %
	WT-GRNN [126]	12.38	9.78
	WT-GRNN-PSO [126]	12.39	10.02
	WT-RBFNN [126]	12.77	10.29
	WT-RBFNN-PSO [126]	10.95	9.03
	NARX-LSTM (D 1 )	1.93	0.80
	NARX-LSTM (D 2 )	7.27	3.77
	Note: The best information criterion is in boldface.

Table 3 .

 3 [START_REF] Kumar | Global advancement of solar thermal energy technologies for industrial process heat and its future prospects: A review[END_REF] presents the performance comparison of the proposed model with other benchmarks. The performance improvement of reconciled forecasts over reference models is validated with nMAE=3.70%. On the other side, according to Table3.13, the performance of the proposed model is best with the dominance of NARX-LSTM on D 1 data set. The NARX-LSTM generates an nRMSE=1.93 % and nMAE=0.80% on D 1 , while the reported performance errors on D 2 are equal to nRMSE=7.27% and nMAE=3.77% for 6-hour daily PVPF. The proposed model is found highly accurate with good competi-

	tiveness skills for a single step and multistep point forecasting. Nonetheless, a longer time horizon requires
	further investigations.

while WT-RBFNN-PSO (nRMSE=6.85%) is outperforming the NARX-LSTM (nRMSE=7.26%) in terms of lower nRMSE values.

Table 3 .

 3 14: Performance evaluation of probabilistic forecasting for case I-II[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	PINC PICP PINAW	ACE	Pinball Loss(%)
			D 1
	90%	96.07%	0.3071	6.08%	0.16
	80%	95.09%	0.0437	1.51%	0.98
	70%	73.52%	0.0142	3.52%	1.08
			D 2
	90%	100%	0.2634	3.02%	0.12
	80%	98.02%	0.0387	18.02%	0.32
	70%	96.04%	0.039	26.04%	0.43

Table 3 .

 3 [START_REF] Das | Forecasting of photovoltaic power generation and model optimization: A review[END_REF]: Results of multi-step probabilistic forecasting for 1hour(1-h), 2 hours (2-h) and 3 hours (3-h) forecasting horizons[START_REF] Massaoudi | An effective hybrid narx-lstm model for point and interval pv power forecasting[END_REF].

	Time (hh:mm) Actual value(kW)	1-h ahead	2-h ahead	3-h ahead
		D 1

  . Bayesian Ridge Regression (BRR) is found well suited to handle hierarchical data structure and multicollinearity. The BRR is seen as a derivative of the old posterior Bayes regression with variable prior distribution on the structure of the regression vector. It has been reported that Catboost has a better accuracy than XGB model in terms of execution time and memory limitations.For datasets with a large number of features, XGB can-not run due to memory limitations, and Catboost converges toa good solution in the shortest timeContinuous Wavelet TransformMany solid theoretical and empirical results indicate that Wavelet Transform is considered one of the most efficient solutions for time-series analytics. Wavelet transform tools are proposed to overcome the limitations of Fourier Transform and short-time Fourier transform for signal processing. The WT empowers the multires-

olution analysis in both the time and frequency domain. WT provides a superior grant time and frequency resolution for the whole signal. To manage non-stationary and nonlinear signals, The wavelet transformation is categorized into two families; specifically, Continuous WT (CWT) and Discrete WT (DWT)

Table 3 .

 3

	Values	14.55	3.81	2	0.1	0.99	18.51

16: Evaluation scores

[START_REF] Massaoudi | A hybrid bayesian ridge regression-cwt-catboost model for pv power forecasting[END_REF]

.

Score metrics MSE RMSE MAE MdAE R 2 (%) Maximum error (kW)

From Fig.

3

.20, the curves harmonization leads to conclude that the hybrid model is well-suited for PVPF. The shape of the forecasted points curve follows the actual one with a small variation from the 150-160 time step. Regarding Table

.

3.16, the RMSE and the MSE values are 3.81 and 14.55 respectively which is reasonable for real-world energy operations. Further, the squared R-value is 0.99 which reflects the high model' effectiveness.

Table 3 .

 3 17: Evaluation scores[START_REF] Massaoudi | A hybrid bayesian ridge regression-cwt-catboost model for pv power forecasting[END_REF].

	Fold number	1	2	3	4	5	6	7	8	9	10
	R 2 (%)	98.7 99.2 95.33 90.23 95.07 98.51 99.28 98.85 99.51 99.53
	Concerning

Table 3

 3

.17, the validation process from a 10 fold CV shows that the precision generally diminishes during sunlight production. The squared R records a lower value of 90.23% with a 9% decrease

Table 3 .

 3 18: Evaluation scores[START_REF] Massaoudi | A hybrid bayesian ridge regression-cwt-catboost model for pv power forecasting[END_REF].

	Score metrics MSE RMSE MAE MdAE R 2 (%) Maximum error (kW)
	Values	15.29	3.91	2.01	0.19	0.99	23.28

Table 4 .

 4 1: Generated feature vectors[4].

	Data fold	Augmented data	Formula	Unit/range
		Load(t-1), . . . , Load(t-23)	L (t-1) , . . . , L (t-23)	MW
	Load forecast
		Load demand	L t	MW
		Year	Y t = Y EAR(DateT ime)	[2003,2014]
		Month	M t = M ON T H(DateT ime)	[1,12]
		Day	D=DAY(DateTime)	[1,31]
	Datetime

Table 4 .

 4 6: Forecasting results of the proposed model[4].

	%)	nMAE(%)	nRMSE(%)

Table 4 .

 4 7: Forecasting results of different models on ISO-New England data set[4].Regarding Table4.7, the proposed SG-CBiLSTM model achieves the best accuracy comparing to reference models on the scale of the nRMSE, nMAE, MAPE, and R 2 execution measures. The R 2 comes to 99.22% due to SG filtering. Moreover, the model performance was marginally near the BiLSTM-AE model, which

	Mean values of 10 times nRMSE(%)±SD nMAE(%)±SD R 2 (%)±SD
	SG-CBiLSTM	1.22±0.20	0.89±0.23	99.22±0.29
	BiGRU	2.71±0.27	2.94±0.37	95.93 ±1.10
	BiLSTM-AE	1.76±0.11	1.16 ±0.05	98.56±0.18
	ConvLSTM-AE	4.13±0.31	3.13±0.11	85.21±0.23
	RNN	3.77±0.32	2.82±0.25	93.35±1.06
	ELM	5.86±0.30	4.45±0.24	83.98 ±1.74

Table 4 .

 4 8: Results of Multistep forecasting on ISO-NE dataset [4].

	Mean values of 10 times One-step Twelve-step Twenty four-step Thirty-six-step
		nRMSE(%)	0.54	3.3	2.26	3.59
		nMAE(%)	1.23	2.14	1.34	2.02
		R 2 (%)	99.11	87.39	94.26	87.22
		0.3
		1-step	12-step	24-step	36-step
		0.25
		0.2
	(%)	0.15
	Error	0.1
		0.05
		0
		1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
		-0.05		Samples

Table 4 .

 4 9: hyperparameter settings of experimental models[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	ML	Score	Default	Search space	SA PSO BO RS ES
	Method	Function	value
		Number of	100	[100, 500, 750, 1000, 1500,	1500 1000 100 2000 2000
	XGB	estimators		2000, 2500, 3000]
		Learning rate	0.1	[10 -3 ,10 -2 , 0.1, 0.3, 0.2, 0.5,	0.1 0.3 0.2 0.1 0.3
				0.8, 1]
		Max depth	3	-2∼ 12/step = 1	4	2	7	12	3
		Number of	100	[100, 500, 750, 1000, 1500,	750 2000 1500 500 2500
	LGBM	estimators		2000, 2500, 3000]
		Learning rate	0.1	[10 -3 ,10 -2 , 0.1, 0.2, 0.3,	0.5 0.2 0.3 0.3 0.001
				0.5,0.8, 1.0]
		Max depth	-1	-2∼ 12/step = 1	2	-1	4	11	3
		Max	200	1000∼ 3000/step = 500	2500 2000 2000 1000 1500
	MLP	iterations
		Hidden layer	100	[100, 200, 300, 400, 500]	100 200 500 200 300
		sizes
			R 2 (%)		90	91	88	98	89
			Time(min)		133 204 212 259 82
			Time/iteration(min)	4.42 6.79 7.07 8.62 2.71

Table 4 .

 4 10: Cross-validation results for case study 1[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	Model		MLP			LGBM			XGB
	Fold number	MAE	RMSE	R 2	MAE	RMSE	R 2	MAE	RMSE	R 2
		(MW)	(MW)	(%)	(MW)	(MW)	(%)	(MW)	(MW)	(%)
	0	771,15	1003,47 88,05 714,62	943,51	89,44 802,91	1059,83 86,67
	1	766,97	1017,14 87,16 724,45	973,56	88,24 814,18	1090,52 85,24
	2	736,62	991,25	88,44 705,14	949,31	89,40 790,72	1057,65 86,84
	3	758,88	1013,63 87,68 726,33	970,30	88,71 798,82	1060,68 86,51
	4	744,16	988,11	88,36 705,20	939,96	89,47 792,17	1056,48 86,69
	5	759,27	1007,75 87,77 710,56	949,88	89,14 791,84	1056,93 86,55
	6	762,86	1000,71 87,91 709,99	942,76	89,27 793,99	1054,44 86,58
	7	780,16	1028,25 87,44 716,76	959,15	89,07 799,85	1068,04 86,45
	8	790,56	1029,11 87,74 727,56	962,48	89,27 807,24	1068,88 86,77
	9	744,61	989,23	88,30 711,90	941,29	89,41 788,60	1046,00 86,92
	Mean	761,52	1006,87 87,89 715,25	953,22	89,14 798,03	1061,95 86,52
	SD	15,92	14,35	0,39	7,91	11,72	0,37	7,78	11,37	0,45
	Computational		3238.38			3664.78			3643.24
	Time (second)

Table 4 .

 4 11: Evaluation errors for case study 1[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	Stacked XGB-LGBM-MLP model
	Fold number	MAE(MW) RMSE(MW) R 2 (%)
	0	489,74	707,29	94,05
	1	477,22	683,82	94,45
	2	480,60	687,10	94,24
	3	487,03	707,94	94,17
	4	481,47	690,45	94,35
	5	483,04	718,25	93,88
	6	488,27	696,69	94,33
	7	475,68	675,73	94,47
	8	475,64	680,11	94,84
	9	471,58	666,61	94,84
	Mean	481,03	691,40	94,31
	SD	5,75	15,29	0,25
	Computational Time (second)		2033.08
	As indicated by

Table 4 .

 4 10, the investigation of the prediction execution of each base model exhibits thatLGBM produces the best forecasting results in terms of the error measurements. The average R 2 for LGBM model is R 2 =89,14% compared to R 2 =87,89% and R 2 =86,52% for MLP and XGB models respectively. The registered results comprises a mean RMSE=1006,87 MW, 953,22 MW and 1061,95 MW for MLP, LGBM, and XGB, respectively. Consequently, the stacked XGB-LGBM-MLP prevails to perform best of all standalone models with a mean R 2 =94,31% as revealed in Table4.11. The high forecasting precision accomplished by the stacked generalization approach is confirmed from a lower mean RMSE=691,40 MW. The stacked XGB-LGBM-MLP model can utilize the merits of different models with various training mechanisms and effectively achieve the complementarity between the benefits of various models. The relative stability of the proposed technique with a minimum Standard Derivation SD=0,25% compared to its derivatives reveals the model's effectiveness against the unpredictable perturbations. For a real testing environment on a 24-hour ahead, Table4.12 illustrate the score measurement results.

Table 4 .

 4 12: Evaluation measures for the stacked model and other benchmarks for one day ahead[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	Model	RMSE (MW)	MAE	R 2	MdAE	MAPE	MSLE
			(MW)	(%)	(MW)	(%)	(10 -2 )
	XGB	5641.67	5220.20	0.87	4455.34	12.77	1,8
	LGBM	2143.23	1765.14	0.98	1404.88	3.85	0,23
	MLP	5135.50	4623.32	0.89	4344.50	10.36	1,47
	Stacked XGB-LGBM-MLP	1509.74	1070.67	0.99	597.64	2.69	0,17
	According to

Table 4 .

 4 12, the RMSE value of the proposed approach is the minimum by a value of RMSE= 1509.74 MW compared with an RMSE =5641.67 MW, RMSE=2143.23 MW, and RMSE=5135.50

MW for the single XGB, LGBM, and MLP models, respectively. The MAE value of the proposed approach is likewise the lowest, equal to 1070.67 MW compared to 5220.20 MW and 1764.14 MW for XGB and LGBM

  24, 48, 72 former lags fed as feature inputs. The best performance of LSTM is attributed to lagged hour 168. Besides, KNN, and RF are added to the list of reference models. The configurations of benchmarks are resumed in Table 4.18. A delineation of the proposed strategy compared with the reference models is displayed in Fig. 4.23 Moreover,

Fig. 4.24 shows a graphical histogram shape of MAPE and RMSE values of the Stacked XGB-LGBM-MLP compared to the benchmarks' models.

Table 4 .

 4 [START_REF] Powell | Hybrid concentrated solar thermal power systems: A review[END_REF] presents the numerical RMSE and MAPE values of all of the cited methods.According to Table.4.14, The superiority of the proposed method is expressed by a decrease of an RMSE of 192,96 MW compared to FTS-CNN. The stacked approach proves its ability to forecast accurately and robustly since the meta-learner and base learners analyses data patterns from different feature spaces and structures. The extension of the forecasting period was investigated to explore the influence of the prediction horizon on prediction accuracy. Fig.4.25 illustrates the prediction results for 48 hours.

Table 4 .

 4 14: Forecasts and actual load demand[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	Model	RMSE (MW) MAPE (%)
	Stacked XGB-LGBM-MLP	1509.74	2.69
	FTS-CNN	1702.70	2.89
	SARIMA	2501.25	4.23
	PWFTS	2162.57	4.00
	WFTS	4419.11	9.09
	IWFTS	4663.17	7.69
	LSTM	2037.49	3.45
	LSTM model 1	2044.68	4.21
	LSTM model 2	2483.71	4.23
	LSTM model 3	2279.23	3.88
	RF	5308.89	8.16
	KNN	5851.56	9.24

Table 4 .

 4 [START_REF] Das | Forecasting of photovoltaic power generation and model optimization: A review[END_REF], resumes the quantification of the score metrics for two days of forecasts.

Table 4 .

 4 [START_REF] Das | Forecasting of photovoltaic power generation and model optimization: A review[END_REF]: Influence of the prediction range of the proposed model and benchmarks[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	Horizon RMSE (MW) MAE (MW) R 2	MdAE (MW) MAPE (%)
	24 hours	1509,74	1070,67	0.99	597,64	2,69
	48 hours	3033.57	1984.33	0.94	1253.52	4.96
	According to Table 4.15, the 48-hours ahead forecasting is conducted with an RMSE=3033.57 MW
	compared to an RMSE=1509.74 MW for one day-ahead forecasting. The MAE is 1984.33 MW compared
	to 1070.67. The RMSE value approximately decreases to half, which presents a major problem for longer

Table 4 .

 4 The output results of the proposed models individually assessed are given in Table4.[START_REF] Ahmed | A review and evaluation of the state-of-the-art in pv solar power forecasting: Techniques and optimization[END_REF]. Additionally, the proposed XGB-LGBM-MLP model results for 10 fold CV are resumed in Table4.17, and the resulted mean R 2 score is plotted shown in Fig.4.26. 16: Performance evaluation results for reference models with 10-CV[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	Model		XGB			LGBM			MLP
	Fold	MAE	RMSE	R 2	MAE	RMSE	R 2	MAE	RMSE	R 2
	number	(MW)	(MW)	(%)	(MW)	(MW)	(%)	(MW)	(MW)	(%)
	0	680,86	923,13	89,67	499,24	699,55	94,07	983,12	1223,75	81,85
	1	679,10	931,23	99,78	499,49	711,96	94,03	950,65	1196,69	83,12
	2	668,59	912,48	90,10	483,88	682,19	94,47	946,90	1185,69	83,28
	3	664,57	921,06	89,92	501,88	722,47	93,80	992,68	1248,93	81,47
	4	681,95	943,98	89,36	503,28	726,16	93,71	839,45	1116,10	85,13
	5	657,03	900,76	90,49	498,37	701,10	94,24	927,56	1168,89	83,99
	6	650,13	884,33	90,67	487,10	685,76	94,39	982,65	1226,55	82,04
	7	673,56	914,08	89,64	495,53	693,51	94,04	999,57	1234,09	81,12
	8	666,06	905,12	90,49	491,19	684,10	94,57 1017,51	1274,83	81,14
	9	661,34	90,02		490,69	699,92	94,03	979,11	1223,37	81,75
	Mean	668,32	90,01	0,90	495,06	700,67	94,13	961,92	1209,89	82,49
	SD	10,07	15,96	0,40	6,20	14,64	0,27	48,13	42,68	1,27

Table 4 .

 4 17: Performance evaluation results for THE proposed framework with 10-CV[START_REF] Massaoudi | A novel stacked generalization ensemble-based hybrid lgbm-xgb-mlp model for short-term load forecasting[END_REF].

	Stacked XGB-LGBM-MLP model
	Fold number MAE(MW) RMSE(MW) R 2 (%)
	0	312,39	439,58	97,66
	1	310,47	443,55	97,68
	2	301,60	421,25	97,89
	3	306,20	470,11	97,37
	4	307,31	458,15	97,49
	5	311,68	434,53	97,87
	6	300,63	422,21	97,87
	7	301,56	421,81	97,79
	8	301,18	414,26	98,01
	9	298,03	430,46	97,74
	Mean	305,01	435,59	97,73
	SD	5,00	16,84	0,18

Table 4 .

 4 20: Performance evaluation of interval forecasting[START_REF] Massaoudi | Accurate smart-grid stability forecasting based on deep learning: Point and interval estimation method[END_REF].Here f (x) is the forecasted quantile model. The average function for a given data set is computed as:

	Model PINC(%) PICP(%) ACE(%)
	LSTM	90	92.06	2.06
	GRU	90	91.67	1.67
	BiGRU	90	90.23	0.23

Table 4 .

 4 21: Accuracy measures for SEC for 10-CV. FN, M, and SD are the fold number, mean, and standard derivation respectively[START_REF] Massaoudi | An effective ensemble learning approach-based grid stability assessment and classification[END_REF].The overall accuracy achieved by the proposed SEC model is 98.96%±0.14, while the precision is 99.18%± 0.19. In order to verify the competitiveness of the proposed model, a series of tests have been conducted.The proposed model is compared to single models, including LGBM, XGB. Furthermore, Random Forest (RF), Multilayer Perception (MLP), Support Vector Classifier (SVC), and K-Nearest Neighbors (KNN) were simulated and compared to the proposed model. Table4.22 presents the confusion matrix of the proposed model and benchmarks.

	FN Accuracy AUC Recall Prec.	F1	Kappa
		(%)	(%)	(%)	(%)	(%)	(%)
	0	99.01	99.95	99.29	99.14 99.22	97.83
	1	98.74	99.94	99.14	98.88 99.01	97.27
	2	99.05	99.96	99.29	99.22 99.25	97.94
	3	98.88	99.96	98.92	99.33 99.12	97.58
	4	98.93	99.95	99.18	99.14 99.16	97.68
	5	98.9	99.95	99.37	98.92 99.14	97.63
	6	99.21	99.97	99.37	99.4	99.38	98.3
	7	99.1	99.96	99.25	99.33 99.29	98.04
	8	98.76	99.92	99.1	98.96 99.03	97.32
	9	99.05	99.96	99.07	99.44 99.25	97.94
	M	98.96	99.95	99.2	99.18 99.19	97.75
	SD	0.14	0.01	0.14	0.19	0.11	0.31

Table 4 .

 4 23: Comparative study of various prediction techniques[START_REF] Massaoudi | An effective ensemble learning approach-based grid stability assessment and classification[END_REF].

	Model	Accuracy(%) Recall(%) Precision(%) F1 score(%)
	LGBM	96	97.56	96.22	96.88
	Catboost	98.36	98.97	98.47	98.72
	XGB	93.06	96.97	92.52	94.69
	ET	95.59	98.32	94.94	96.6
	MLP	97.25	98.13	97.59	97.85
	RF	94.49	96.57	94.87	95.71
	SVC	79.82	88.27	82.03	84.74
	KNN	82.03	88.57	84.11	86.28
	Proposed	98.96	99.2	99.18	99.19
	Regarding

Table 4 .

 4 [START_REF] Massaoudi | Short-term electric load forecasting based on data-driven deep learning techniques[END_REF], the proposed SEC model is clearly outperforming the rest of the models. The

Table 4 .

 4 24: Classification report for the proposed model and benchmarks[START_REF] Massaoudi | An effective ensemble learning approach-based grid stability assessment and classification[END_REF].According to Table4.24, the proposed SEC model achieved the highest results with an accuracy of 99.1% and 99.4% for Stable (S) and unstable (F) classes, respectively. For better visualization of the metric scores,

	Classifier	Label	Precision (%) Recall(%) F1-score(%)
		Stable	93	100	96
	GRU	Instable	100	96	98
		Stable	93	99	96
	LSTM	Instable	99	96	98
		Stable	97	100	99
	MLSTM	Instable	100	99	99
		Stable	95.4	93.7	94.6
	LGBM	Instable	96.5	97.4	97
		Stable	98.5	97.4	97.9
	XGB	Instable	98.5	99.1	98.8
		Stable	78.9	93.9	85.8
	RF	Instable	83.8	55.8	67
		Stable	96.1	96	96
	MLP	Instable	97.7	97.8	97.7
		Stable	95.1	98.3	96.7
	ET	Instable	96.8	91.1	93.9
		Stable	83.8	55.8	67
	SVC	Instable	78.9	93.9	85.8
		Stable	77.8	70.6	74
	KNN	Instable	84.1	88.6	86.3
		Stable	99.1	98.9	99
	Proposed	Instable	99.4	99.5	99.4

Table 4 .

 4 25: Computational time (second) for PGS prediction[START_REF] Massaoudi | An effective ensemble learning approach-based grid stability assessment and classification[END_REF].

	Time	MLP SVC XGB LGBM Proposed
	Training (s) 416.41 4.54 29.86	7.91	6485.39
	Testing (s)	0.93	1.18	0.61	0.65	2.42

Acknowledgments

Electrical and Computer Engineering Department (ECEN), for providing an excellent environment to carry out this research. ix

Funding resources

Graduate study was supported by NPRP grants NPRP10-0101-170082 and NPRP10-0101-170085 from the Qatar National Research Fund (a member of Qatar Foundation), the co-funding by IBERDROLA QSTP LLC, sponsorship by Texas A&M Energy Institute Fellowship, and ministry of higher education and scientific research in Tunisia.

x

List of publications 0.1 Journal articles

Point PV Power Forecasting This part handles the numerical validation of the model performance utilizing 2 datasets from various countries (USA and Australia) with different timesteps of information procurement. The feasibility of NARX-LSTM model is carried out using Python coding. Keras and Sckit-learn libraries are employed to facilate the model implementation [START_REF] Chollet | keras-team/keras: Deep learning for humans[END_REF][START_REF] Varoquaux | Scikit-learn[END_REF]. The model is assessed on single-step and multiple steps ahead respectively. The simulation environment setup is depicted in Table 3.4. The TSA is executed utilizing Hyperactive library [START_REF] Blanke | Hyperactive: A hyperparameter optimization and meta-learning toolbox for machine-/deep-learning models[END_REF]. This framework uses a defined search space to distinguish the optimal hyperparameters for a particular database. To avoid the extensive computational requirement, Trial and Error (T&E) experiments tests were directed to limit the search space. It can be noted that the configuration of twenty NARXNN neurons, a four delay value, a Levenberg-Marquardt optimization algorithm, and three LSTM layers create the best outcomes. Then, LSTM cells, dropout ranges, activation, and optimizer functions are calculated utilizing TSA optimization. The search space for TSA and the optimization results are resumed in Table 3.5. To confirm the framework universality for a PV plant with a higher scale, the automatic search system is led uniquely for D 1 .

Load demand forecasting

In this subsection, load forecasting has been tackled using two case studies and multiple testing scenarios, as shown in fig4.

Case study 1

The proposed SG-CBilSTM is composed by a virtue of processing units characterized in three principal The final results of the trial and error method show that three convolutional layers with a kernel size equal to 1 × 1 associated with three successive BiLSTM layers achieve better results according to the highest the R 2 criteria. For the rest of the optimization work, ES is employed to tune the critical hyperparameters of the proposed computing framework, specifically, the batch size, the number of units, the number of training epochs [START_REF] Chollet | Deep Learning mit Python und Keras: Das Praxis-Handbuch vom Entwickler der Keras-Bibliothek[END_REF][START_REF] Xie | Evolving cnn-lstm models for time series prediction using enhanced grey wolf optimizer[END_REF].To tune these hyperparameters, Hyperactive library is employed on open source [START_REF] Blanke | Hyperactive: A hyperparameter optimization and meta-learning toolbox for machine-/deep-learning models[END_REF] The general architecture of reference models is fixed through repeated training. While, the units' number, the batch size, and the activation function are selected using the ES method.

Experimental results

The feasibility of the proposed methodology is depicted in this part. The numerical outcomes at this level are initially led by introducing the exhibition of the proposed structure independently and with several contextual analyses of various SG filter configurations. Second, a comparative study is computed and presented where the computational configurations are unified for the sake of reasonable assessment. The Once MLP is trained, the forecasting framework only considers the output results generated at this stage.

It merits saying that the training system takes more time to fit all the sub-folds with different meta-learners and base learners. Moreover, the higher level of predictors does not guarantee better outcomes as well as the total stacking concept. The detailed model synoptic is outlined in Fig. 4.17. The performance evaluation of the proposed model for different time scales ahead is conducted in this part.

The proposed model was computed using Python coding. Several Python libraries were incorporated in the model design, including Scikit-learn, LightLBM, and XGB [START_REF] Varoquaux | Scikit-learn[END_REF][START_REF] Ali | Home -pycaret[END_REF]. Besides, the stacked generalization was build using Vecstack package [START_REF] Ivanov | vecstack: Python package for stacking (machine learning technique)[END_REF]. The simulation results were generated from a Lenovo Intel ®i7 9 th Generation ®Nvidia Geforce GTX 1650@ 2.30 GHz@16GB RAM. The HO was conducted using RS tool for the sake of enhancing the forecasting accuracy by the comprehensive selection of the most suitable parameters [START_REF] Pedregosa | Scikit-learn: Machine Learning in Python Fabian[END_REF]. To evaluate the proposed method effectiveness, the model is trained and compared to individual models, explicitly, XGB, MLP, and LGBM [START_REF] Seabold | Statsmodels: Econometric and Statistical Modeling with Python[END_REF]. Initially, these methods were utilized as benchmarks to check the viability of the proposed approach. Clearly, the stacked estimations significantly depend mainly on the prediction performance of the base models. The simulation procedure was repeated ten times for providing higher reliability to the forecasting system. To make the comparison more intuitive, a single step ten-fold CV(10-CV) was led to follow the varieties of the models' exhibition. The results of 10-fold CV is computed and illustrated in Table 4.10 for the ingredients of the proposed method. Furthermore, Table 4.11

Model constriction

In this section, feature engineering of the publicly available data set has been conducted to tailor the provided data to the ML tool. The model constriction was simulated in a Python 3.7 environment running using a Lenovo laptop i-7 GPU Nvidia Geforce 1650 GTX operating at 3.40 GHz with 16 GB RAM. Next, the used error metrics were presented to verify the model performance compared to the state-of-the-art.

Dataset and model constriction

In our experiment, the Electrical Grid Stability Simulated dataset is employed to validate the proposed SEC approach. This dataset is collected from the 4-node star system by the Department of Computer Science, Karlsruhe Institute of Technology [START_REF] Arzamasov | Smart grid stability[END_REF]. The data is open-sourced from the UCI Database Repository

Interval prediction

The inherent uncertainty in predicting GSI is essentially conducted to quantify the uncertainties of the PVPF associated with point forecasting. Interval forecasting is a challenging task due to the weather parameters' essential to use PV energy production wisely.

To bridge this knowledge gap, the third chapter proposes two innovative methods for load forecasting.

The first proposed model makes use of a hybrid DL model combining convolutional Bidirectional LSTM, Savitzky-Golay filter, Partial Least square method, and evolution strategy optimizer. In comparison, the second model employs Light gradient boosting, Multilayer perceptron, and Extreme gradient boosting methods.

The proposed hybrid models have achieved excellent performance results for one-day-ahead load forecasting.

However, it can be mentioned that the HO step is primordial for their effectiveness. To achieve an optimal balance between the load demand and energy supply without compromising the grid stability prediction (GSP), two efficient GSP techniques were proposed assessment, classification, and prediction of the state of stability using ML techniques. The proposed methods' high performance was demonstrated using the electrical grid stability simulated dataset.

Future work

The future work of this thesis will embrace the following issues:

• Proposing efficient ML techniques for energy systems' reliability assessment and control.

• Big Data tools will be considered to foster the synergy between the large availability of data from smart meters and ML techniques to use these data for efficient energy management systems.

• Investigation of the implementation of advanced technologies with less training data requirement and more performance capabilities on embedded systems for commercialization purposes.