Monday, 5 June 2023

Application of machine learning algorithms to energy forecasting

 

Modern life and associated lifestyles require reliable and secure power supply. The need for continuity on essential and critical services which include but not limited to healthcare, financial systems, telecommunication, emergency response, navigation, transportation exert the need for reliable energy systems that guarantee continuity of power supply. At the same time, various governments across the globe are advocating for migration to clean energy systems from their ‘unclean’ counterparts which rely on fossil fuels and emit Carbon dioxide (CO2) and raise atmospheric CO2 levels, which warm the planet.  As the energy crisis and the environmental crisis become more serious, Distributed Generations (DGs), as the main forms of Renewable Energy Sources (RESs), have attracted much attention in issues related to energy management and sustainability of the power systems. Distributed energy resources (DERs), which include distributed generation (DG), distributed storage, and adjustable load, are a key component in microgrid operations.

A Microgrid is a small-scale self-controllable power system clustering DERs and loads within clearly defined electrical boundaries which can function in grid-connected or island mode. Microgrids can be clustered at distribution levels to enhance the economics and the reliability of small DGs such as microturbines and wind-generation turbines as well as DGs with power electronic (PE) interfaces such as photovoltaic (PV) arrays and fuel cells. However, the outputs of most of these renewable resources fluctuate depending on weather conditions and time of day, hence the majority of the DERs cannot guarantee a continuous and steady amount of power generation. Over and above this generation variability problem, electricity demand in these microgrids can be unpredictable, hence there is need for complex energy management and sustainability frameworks of the Microgrid.

The energy management and sustainability frameworks of the Microgrids involve active monitoring and resource scheduling of energy assets to ensure they operate at peak efficiency and with minimal energy waste. Traditional resource scheduling models applied to large-scale power systems cannot be applied directly to microgrids considering microgrids’ special characteristics, which include but not limited to, considerable size of non-dispatchable renewable energy resources; connection to the main grid as a backup generation/load for microgrid, and islanding capability of microgrid which could be for economic or reliability purposes. Thus, there is need for forecasting as well as close tracking of the microgrid load by its generation always to achieve this economic and reliable operation of the system.

Long-term load forecasting (LTLF) usually covers forecasting horizons of one to ten years, and sometimes up to several decades. Medium-term load forecasting (MTLF) encompasses a horizon of several months up to two years into the future. When a Microgrid load is forecasted at a time horizon of few seconds, minutes, hours, or even few weeks it is termed Short Term Load Forecasting (STLF). STLF for a microgrid can involve application of Machine Learning (ML) algorithms. Machine Learning is one of the types of Artificial Intelligence. It is a form of predictive analytics, or predictive modeling where the computer uses programmed algorithms that receive and analyze input data to predict output values within an acceptable range. ML algorithms have shown great performance in time series forecasting and hence can be used to forecast power using weather parameters as model inputs.

ML prediction involves four distinct stages. First, there is acquisition of historical input and output data, which is followed by preprocessing of the collected data into suitable format before it is used to train the prediction model. Then training of the prediction model follows the processing stage. The training process is required to develop the model and is achieved by selecting appropriate parameters for the model. Parameter types depend on the algorithms that will be utilized for the regression process, and parameter selection is impacted by the size of training data, the selection of input variables, and the performance indicators. Lastly, the final stage involves testing the model where testing data is loaded to the trained model to test the prediction performance of the model.

There are several models that can be used in applying ML algorithms to energy forecasting. Some of the models found in literature include but not limited to Artificial Neural Networks (ANNs); Decision Trees (DTs); Support-Vector Machines (MSVs); Regression Analysis; Bayesian Networks; Gaussian Processes, and Genetic Algorithms. The main area of focus in this research is to conduct STLF and Short-Term Generation Forecasting (STGF) for a Solar Photovoltaic (PV) Microgrid. The research uses two independent Machine Learning algorithms, namely, Support Vector Machines (SVM) and Enhanced Decision Tree Regression (EDTR). The result identifies the most efficient method based on their generalization ability (stability), accuracy and computational cost. Onyekachukwu Ezeagbai focused on SVM, while Christopher Beza handled EDTR. Both SVM and EDTR models can run regression analysis.

Regression is a technique used for analyzing the impact of change in one or many variables on the change of another variable and it’s used in variety of science and engineering disciplines for the same.   Simple linear regression explains the relationship between a single dependent variable and one independent variables. Multiple regression on the other hand involves the analysis of more than one dependent variable and several independent variables. The variable(s) which impact(s) another is called predictor variable (generally denoted by Xs) and the variable which is impacted is called response variable (generally denoted by Y). This research paper is dealing with multiple regression since the datasets contain multiple predictor variables and a single response variable. 

The method adopted in this research to determine correlation between variables is to come up with the “best fit” regression equation which goes through the dataset with predictor variables and a response variable. This best fit is the equation that is closest to all if not most of the data points and has least total vertical distance from the data points. The generalization of the whole dataset into this single equation results into an error. This error is summed and squared to eliminate discrepancy and is called a Root Mean Square Error (RMSE). The main objective of regression is to minimize the RMSE. The equation with the minimum RMSE is declared the regression equation for the dataset. Introduction of predictor values in future results in a prediction of the dependent variable


Efficient DC-DC Converter design for DC Distribution in Building-Integrated Photovoltaic (BIPV) Systems

 Building-Integrated Photovoltaic (BIPV) Systems BIPV is the integration of photovoltaic (PV) cells into a building envelope, such as the roof or the façade. The façade may include windows, awnings, and outward-facing concrete. It differs from Building-Applied PV (BAPV) in that the PV is integrated during construction, rather than applied afterward. BIPV is seeing increased incorporation into the construction of new buildings as a principal or ancillary source of electrical power. Since BIPV modules are installed during, not after, the construction phase, BIPV systems have a profound impact compared to conventional BAPV on the electrical installation and construction planning of a building.

Methods of predicting the economic viability of BIPV systems in urban areas have already been developed. An analysis of buildings in Germany in a 2 km² urban area revealed that building façades provide almost triple the area of building roofs, and receive 41% of the total irradiation. It was found that 17% of all building surfaces analyzed were economically viable; i.e. 0.3 km² of surfaces could be exploitable for photovoltaic installations, corresponding to an installed capacity of 47 MW.

In an ever-expanding world with a growing interest in zero carbon-emission energy, it is now more important than ever to consider BIPV when designing new buildings. From 2020 on, the European Energy Performance of Buildings Directive (EPBD) requires that all new buildings in the 28 member states are Near-Zero Energy Buildings (NZEB). The implementation of this 5 can be a combination of reducing energy usage in the building, as well as increasing energy generation on-site. One use case under the EPBD where BIPV would provide an excellent solution is skyscrapers. As they have relatively small footprints, there is extremely limited space for roof-mounted PV panels. This is where façade-integrated BIPV systems can provide an excellent solution during the building phase, as it is much easier to integrate BIPV modules into something like a skyscraper during construction than after it is already built.

Going one step further, we can reduce the energy usage of the building by adopting DC rather than conventional AC distribution. By doing this, both module-level and central converters within the system can be simplified, reducing costs and resulting in increased compactness, efficiency, and reliability.

Synchronized and Democratized (SYNDEM) Smart Grid Enabled by Virtual Synchronous Machines

Over the last few decades, there has been a substantial drive towards the reconfiguration of conventional power systems to accommodate a greater number of Distributed Generation (DG) units that harness renewable or non-polluting resources. This shift is attributed, in part, to the depletion of conventional energy sources and the growing public demand for environmental conservation. Most nations have acknowledged this trend and are investing heavily in exploring the potential of Distributed Energy Resources (DER). The increase in demand for energy, driven by technological advancements and the constant growth of the world's population, coupled with the need for reliable and safe power supplies, has prompted specialists to explore alternatives to the traditional power systems model. Moreover, the widespread energy crisis and frequent large-scale power outages have exposed the limitations of central power generation. As a result, there is a need to invest more in developing a reliable DG system that is financially viable, has a lesser environmental impact, and provides flexible power generation methods. The future of power systems appears to be a combination of distributed generation and centralized power generation methods.

The smart grid paradigm consists of a combination of conventional centralized generation and newer and more varied distributed generation. Due to the complex and dynamic nature of the DERs, the current control techniques have proven to be incapable of coping with the ever changing nature of the diversified loads and renewable energy resources such as Photo Voltaic (PV), Wind Turbines, Electric Vehicles (EV), and Battery Energy Storage Systems (BESS). Therefore, a revolutionizing and paradigm shifting control technique called Synchronized and Democratized (SYNDEM) soft architecture is introduced to address the challenges brought on by an ever more interdependent grid.

The SYNDEM grid architecture seeks to harmonize the integration of energy sources, storage systems, and flexible loads in a synchronized and democratized manner. This is achieved by operating power electronic converters in these sources and loads as Virtual Synchronous Machines (VSM). VSMs can be used to provide the necessary inertia and damping to power systems that conventional generators provide, thereby making them more resilient. The proposed method internalizes the model of a Synchronous Machine (SM), to virtually achieve the behavior of machine inertia, damping, and self-synchronizing in a way that is simpler to tune and customize. The resulting system, comprising the inverter/rectifier, filter inductors and capacitors, and the associated controller, is referred to as a synchronverter. By adopting the synchronverter concept, the inverter can provide the same level of stability and performance as a synchronous generator while leveraging the benefits of power electronics, such as flexible operation and high efficiency.  The goal of this project is to construct, simulate, and comprehend a SYNDEM smart grid.

The project successfully designed and modeled the SYNDEM smart grid using Matlab/Simulink and presented the simulation results, including successes like the implementation of MPPT for solar, and challenges encountered like the incomplete integration of a realistic wind turbine. Through the application of VSMs to three different DERs and a flexible load, the SYNDEM paradigm has been explored, and the benefits of VSMs have been showcased.  The simulation scenarios analyzed demonstrated the behavior of the systems under different conditions and loads, providing insight into real and reactive power flows, frequency response via droop modes, and regulation of DC bus voltages. The results showed that the frequency oscillation was inherent to the single-phase VSM designs used, and the inertia of the DERs was tuned to reduce this oscillation. In the simulations, the VSMs have been shown to operate in tandem on the microgrid scale, while participating in grid reliability through droop response and providing virtual inertia.  Autonomous operation was demonstrated as well, as the VSMs did not require inter-communication to achieve stability.  The VSMs also properly self-synchronized, without the need for an external PLL.  Overall, the project demonstrated the successful implementation and operation of a variety of devices via the synchronverter concept.



Artificial Intelligence in Smart Grid - Short Term Load Forecasting using Decision Tree Regressor and the K-Nearest Neighbors Regressor

 The course ECE 563, AI in Smart Grid, focuses on examining artificial intelligence (AI) and Machine Learning (ML) and their application in power and energy systems. It covers fundamental computational techniques for implementing AI and ML using Python Programming Language. Therefore, the goal of this Project was to analyze the load and temperature data recorded by various utility companies in the United States (U.S.). The dataset contained information from Twenty (20) zones, each with a unique hourly load pattern and Eleven (11) temperature stations, each located differently. The initial aim was to identify any patterns or correlations between the temperature stations and load values in each zone. If a strong correlation was found between a temperature station and the load values of a specific zone, that station's temperature data was used to predict the load values for that zone. However, if there was no strong correlation, a methodology was prescribed for selecting a station's temperature data to use in a machine learning algorithm to predict load values for each load zone. Two machine learning algorithms were used to predict load values in each load zone in this project. The first algorithm was the Decision Tree Regressor, and the second algorithm was the K-Nearest Neighbors Regressor (KNN Regressor).

 A Decision Tree Regressor is a supervised learning algorithm that is used for regression problems. It works by recursively splitting the dataset into smaller subsets based on the most significant features until a stopping criterion is reached. Each split is based on a decision rule that maximizes the difference between the target variable's values. Once the tree is constructed, it can be used to make predictions on new data by traversing the tree from the root node to the leaf node that corresponds to the observation being predicted. The predicted value is the average of the target values in the leaf node. Decision Tree Regressors are intuitive and easy to interpret, and they can capture nonlinear relationships between the features and the target variable. However, they can be prone to overfitting and may not generalize well to new data if the tree is too complex.

The KNN Regressor is also used for regression tasks. In KNN Regressor, the output value of an unknown sample is estimated by the average value of the output of the K-nearest neighbors of that sample in the training dataset. To make a prediction with KNN Regressor, the algorithm finds the K training samples that are closest to the new data point, based on a distance metric (e.g., Euclidean distance). The predicted value is then the mean (or median) of the output values of those K nearest neighbors. KNN Regressor can be useful when the relationship between the input and output is not well defined or has a complex pattern. However, the choice of K (the number of neighbors to consider) can affect the performance of the algorithm, and it is usually chosen through cross-validation. Additionally, KNN Regressor requires storing the entire training dataset, which can be memory-intensive for large datasets.