Management of Distributed Renewable Energy Resources with the Help of a Wireless Sensor Network

: Photovoltaic (PV) and wind energy are widely considered eco-friendly renewable energy resources. However, due to the unpredictable oscillations in solar and wind power production, efﬁcient management to meet load demands is often hard to achieve. As a result, precise forecasting of PV and wind energy production is critical for grid managers to limit the impact of random ﬂuctuations. In this study, the kernel recursive least-squares (KRLS) algorithm is proposed for the prediction of PV and wind energy. The wireless sensor network (WSN) typically adopted for data collection with a ﬂexible conﬁguration of sensor nodes is used to transport PV and wind production data to the monitoring center. For efﬁcient transmission of the data production, a link scheduling technique based on sensor node attributes is proposed. Different statistical and machine learning (ML) techniques are examined with respect to the proposed KRLS algorithm for performance analysis. The comparison results show that the KRLS algorithm surpasses all other regression approaches. For both PV and wind power feed-in forecasts, the proposed KRLS algorithm demonstrates high forecasting accuracy. In addition, the link scheduling proposed for the transmission of data for the management of distributed renewable energy resources is compared with a reference technique to show its comparable performance. The efﬁcacy of the proposed KRLS model is better than other regression models in all assessment events in terms of an RMSE value of 0.0146, MAE value of 0.00021, and R 2 of 99.7% for PV power, and RMSE value of 0.0421, MAE value of 0.0018, and R 2 of 88.17% for wind power. In addition to this, the proposed link scheduling approach results in 22% lower latency and 38% higher resource utilization through the efﬁcient scheduling of time slots.


Introduction
The world is becoming increasingly reliant on energy as the social economy develops, and the energy problem has become a bottleneck in human society's progress [1]. According to contemporary scientific literacy works [2], the primary sources of energy linked with the petroleum family, contributing to about 78-80% of energy, are expected to be exhausted by 2050. Referring to some studies, gas, oil, and their products are expected to deplete in the next two decades, implying that these sources may not be able to meet energy requirements [3]. As the energy emergency intensifies, sustainable power sources such as wind and solar energy have gained the limelight. Global wind power generation reached 733 GW in 2020, an increase of 17.8% over 2019 [4]. Solar power generation reached 714 GW in 2020, an approximate increase of 21.6% from the previous year [5,6]. The boundless and unpolluted nature of eco-friendly energy sources such as photovoltaic (PV) and wind energy makes them the most suitable and fastest growing green energies. As a significant means of developing and utilizing renewable energy, PV and wind power strategies in MG operation, the inclusion of uncertainty has grabbed the attention and interest of academics and industries. In the literature, stochastic procedures, sensitivity analysis, and fuzzy modeling approaches have all been widely utilized strategies for dealing with a variety of unpredictable natural occurrences. The incorporation of solar and wind energy systems in remote MG control is examined in [16] and demonstrates that, if properly managed, increased hybrid renewable energy penetration can be a potential solution. A previous study in [17] presented a Monte Carlo-based stochastic approach to imitate the impact of renewable energy uncertainty under a stochastic situation. The study demonstrated that, when uncertainty is taken into consideration, a realistic solution may be found that accounts for the potential ambiguities inserted in the network. In [18], a multiobjective model was created to reduce power loss and the cost of the renewable energy system. A comparable study in [19] focused on MG optimization tactics and management change effects, as well as the influence of EVs on MG operations.
Models for PV or wind power production estimation have been presented in the literature [20]. Deterministic techniques, based on physical events, attempt to anticipate PV output by using software such as PVSyst and System Advisor Model considering the electrical model of the PV devices. The electrical, thermal, and optical characteristics of PV modules were utilized for the deterministic technique in [21]. In some cases, deterministic forecasting approaches fail to account for the vulnerabilities in the PV power data. Using an ensemble of deterministic forecasters is one of the most common methods giving rise to probabilistic ambiguity. The fundamental drawback of ensemble-based PV power forecasting models is the excessive computing cost, creating a real-time difficulty in practice. These methodologies may be lacking to completely extricate the nonlinear elements and static characteristics. Several researchers presented PV power output prediction models based on a single-layer feedforward ANN and recurrent neural network (RNN) [22]. With the help of meteorological data and weather classification, PV power production prediction models based on ANN were created in [23].
Wireless sensor networks have been widely employed to gather mission-critical information from various environments. Applications of wireless sensor networks (WSNs) are diverse, including spectrum sensing [24] and broadband data transmission [25]. A study in [26] proposed ferrite position identification technology that offers precise train location information and is unaffected by the wireless power transfer of electromagnetic interference. For data collection in PV and wind applications, the Internet of Things (IoT) and WSN, such as the IPv6-centric time-slotted channel hopping (6TiSCH) wireless network, can play a key role. Link scheduling strategies for 6TiSCH wireless networks have been examined in different studies. Despite the risk of a single point of failure at the sink node, a study on 6TiSCH wireless networks uses tree topology as it fits well in dense networks. Aloha-based scheduling and reservation-based scheduling algorithms were presented in [27]. The first one allocated a frequency channel for broadcasting advertisements for new neighbors and the latter one augmented Aloha-based scheduling with a dedicated slot for targeted advertisements based on gossip information. A decentralized adaptive multi-hop scheduling protocol for 6TiSCH wireless networks (DeAMON) was examined in [28]. When compared with earlier studies, the DeAMON guaranteed allocated scheduling with the least communication overhead between adjacent nodes. The relevance of a real-time weather monitoring system is expanding, and precise weather prediction has a crucial function for a PV or wind power plant. The IoT technologies are fast evolving, gaining popularity, and being mostly utilized in remote locations to collect data from the outside world and transfer it to a cloud server on a regular basis. The microcontroller, communication and sensing device, memory, and constrained battery capacity are all included in the sensor node. The sensor network is used in a variety of applications, including target tracking, event detection, and weather forecasting for renewable energy systems [29].
Accurate PV and wind power prediction are vital for ensuring safe operation and costeffectiveness in integrating electrical power networks with PV and wind energy systems. The optimal allotment of these PV and wind power frameworks is necessary during the planning stage, which necessitates the precise speculation of natural circumstances at their suggested positions [30]. By predicting the power output from PV and wind systems, the operators can keep track of the performance, take control actions, dispatch various distributed grids optimally, and monitor voltage control devices. The precise determination of PV and wind power production is often a perplexing task because of the fluctuating nature of solar intensity and weather. Field testing in [31] reveals that due to multi-path, fading, and noise, the connection quality of wireless networks in various smart grid locations, such as outdoor substations, power control rooms, and subterranean network transformer vaults, varies substantially with location and time. In addition to these concerns, the capacity of the WSN is limited in smart grid scenarios and other applications due to battery drain [32], wireless medium contention, and RF interference caused by concurrent transmissions. The above factors motivated us to investigate the performance and implications of link scheduling in WSNs. To address this issue, a link scheduling technique based on node attributes to execute the 6TiSCH wireless network with collisionfree link transmission is adopted. The performance/error indices of different studies for renewable energy forecasting are shown in Table 1.  [33] 10.06 Improved back-propagation learning ANN algorithm E. Izgi et al. [23] 2% decrease ANN D. Lee et al. [34] 1.816 LSTM network M. Abdel-Nasser et al. [35] 1.36 LSTM-RNN S. Das et al. [36] 8.9 ARIMA H. Zhou et al. [37] 2.11 Hybrid ensemble deep learning framework J. Wasilewski et al. [38] 17.408 Multi-layer perceptron (MLP) model T. Ouyang et al. [39] 17.45 Combined multivariate model F. Shahid et al. [40] 0.3068 Wavelet kernels-based (WN-LSTM) network Y. Zhang et al. [41] 9.5% improvement Combined prediction model based on NN Y. Tao et al. [42] 1.32 Gray correlation analysis and deep belief network Until now, various strategies for improving the accuracy of PV and wind power prediction have been developed [10,37]. PV power prediction models, proposed in [35,36,38] are only useful when the data at a specific time is ready ahead of assessing the PV power output. Deep neural networks (DNNs) have been employed for WSNs to achieve improved networking performance [43]. Various deep learning techniques such as reinforcement learning [44] can be applied to time-series data. Hochreiter and Schmidhuber developed the long short-term memory (LSTM) as a particular sort of RNN in 1997 which has a vanishing gradient drawback. The LSTM network is effective in a variety of time series learning applications, particularly nonlinear signal modeling. Statistical methods for predicting PV and wind power are often linear. They belong to a type of time-series prediction approach and are typically implemented. These models depend on using historic data to foster connections between explanatory factors in order to predict future values. The autoregressive (AR) and moving average (MA) models, as well as their generalizations such as the auto-regressive moving average (ARMA) and auto-regressive integrated moving average (ARIMA) models, belong to the family of statistical techniques. Linear regression algorithms cannot appropriately model the non-linear relationship in the data. Among the different regression models, the KRLS algorithm enhances the fitting of anticipated signals and decreases the RMSE and MAE values. Moreover, moving to a higher dimensional space has the advantage of increasing the likelihood of correlation to a linear model and can be solved using linear algorithms. Taking this into account, the goal of this study is to look into the KRLS approach, which may provide the linear processing of nonlinear data of PV and wind power production over time. The flaws in the wireless link, particularly the fast fading of the channel, are one of the biggest concerns of WSN. In addition to this, the difficult aspect of the WSN is packet loss, which can lead to plant instability due to transmission latency. There is less literature available that integrated RESs with the WSN and evaluated the transmission latency. In this study, we solve the latency problem as a result of proper priority allocation among member nodes. We solve the difficulty of capturing the uncertainty of PV and wind output using the KRLS algorithm. The mathematical model of the KRLS algorithm is introduced in Section 3. After that, different ML and statistical techniques are evaluated and compared with the KRLS algorithm. The accuracy of the predicted curve is based on RMSE, MAE, and R 2 values. Moreover, this method keeps the advantages of linear processing, such as a fast learning algorithm and the best solution.
The main contributions of this study are as:

1.
A PV and wind energy forecasting method that relies on a relatively-sized dataset of PV and wind energy collected by the data cloud center is proposed.

2.
When a sensor node of WSN fails due to low link quality or a drained battery, the adopted link scheduling reconfigures the 6TiSCH wireless network, and the network is maintained with alternate nodes.

3.
Different statistical and ML techniques, viz., Gaussian Process Regression (GPR), Linear Regression Model (LRM), Support Vector Machine (SVM), Tree Regression (TR), and NN are examined for the uncertainty of PV and wind power prediction. Moreover, a deep learning model, the LSTM network, is also used to predict the PV and wind power output.
The proposed KRLS forecasting method can handle regression issues with a smaller, non-static lexicon and obtain better outcomes than other ML models. The model-fitting approach makes it perfect for smart grid applications where numerous generators share a highly interconnected power system and spatial dependency is desired.
The remainder of this paper is organized as follows. In Section 2, a review of stateof-the-art technologies is presented. In Section 3, the methodology of the proposed link scheduling and KRLS technique is described. Section 4 includes an examination of different statistical and ML approaches. Finally, Section 5 provides the concluding remarks of this article.

Literature Review
Several approaches for dealing with sparse and uneven time series data have been established throughout the years, allowing analysis to build predictive models. Nevertheless, some of the common statistical procedures for imputation, including mean, moving average, last observation, and simple regression might establish bias and loss of accuracy [45]. Time series problems have been solved using statistical models, such as the Bayesian network and Gaussian processes, as well as classic ML methods such as support vector regression and K-nearest neighbor (KNN) [46]. In time series modeling, a variety of contemporary ML models including unique applications of convolutional networks and transformers [47] have shown promising outcomes. The gated RNNs and their evolving architectures, on the other hand, remain favored methods for time series data. Malhotra et al. [48] use a sequence autoencoder based on sequence-to-sequence models to produce latent representations of time series for future input to different classifier models, signifying the potential of pre-directed deep RNNs for time series categorization. In [38], a multi-layer perceptron model was utilized to anticipate wind power output 24 h ahead of time. In the meantime, researchers in [49] utilized the RNN to predict the PV power from a PV plant. In recent years, there has been a surge in interest in the usage of WSN in a variety of applications, which are designed and coded differently depending on the application. Before implementation, some aspects must be considered, such as the environment, the application's design objectives, cost, power consumption, hardware, and system constraints, to match the needs of the target applications [50,51]. Monitoring wind energy resources, which are the world's fastest expanding sources of power production today, is one of the most essential WSN applications, and there is a constant requirement to estimate the output power [52]. A study in [53] uses a neuro-fuzzy model-based fuzzy inference system to predict the generated power, and the prediction system uses the parameters measured by WSN. Authors in [54] used WSN to collect the meteorological data of wind power plants in real time. The improved fruit fly optimization algorithm and back propagation NN were used to improve wind power forecasting accuracy while retaining the stability and safety of the power system. The previous study in [55] utilized three unique techniques namely the ARIMA, radial basis function NN, and least squares support vector machine to forecast PV power output. Many ML techniques are employed in renewable energy forecasting, including linear regression, KNN regression, SVM regression, and decision-tree regression [56]. The most commonly employed ML algorithms were for solar and wind energy predictions. Statistical models offer more precise power forecasting predictions as real-time power generation data are taken into account and model parameters are constantly adjusted. The ARIMA offers a high degree of accuracy and a good ability to adapt to stationary and non-stationary time series. In [36], the ARIMA model was employed to predict the power output from the PV plant, considering the vulnerability to changing weather conditions. Despite the fact that the ARIMA model has evolved into the most general class of models for time series forecasting, it is unable to account for process behavior. The autoregressive moving average with the exogenous (ARMAX) model, which has been proven to be a useful tool in forecasting with time-series data, can be utilized to allow for exogenous inputs.
One of the most popular solutions is to use renewable energy sources which have been proven to be sustainable, cost-effective, eco-friendly, abundant, non-polluting, and renewable [57]. The ML and artificial intelligence technologies have been applied in forecasting as computer processing speed becomes faster. The ML methodologies, as compared to physical forecasting approaches, typically produce better outcomes [43,58], but on the other hand, necessitate a significant amount of data during the training process and a model with a vast range of training data is easy to overfit. Many researchers in recent years have applied a variety of means and tactics to achieve high forecasting accuracy.

Power Monitoring System with Wireless Sensor Networks
Recent advances in embedded systems and WSNs have made it possible to establish dependable and cost-effective power grid systems that can monitor and control the realtime performance of the grid. The cooperative and low-cost nature of WSNs provides technical advantages over typical (wired) electric monitoring systems, including flexible reconfiguration of networking and a reduced installation cost. The WSNs are becoming increasingly popular in IoT, and are mostly utilized in far-off areas to collect data from the surrounding environment and transfer the data to a sink node or base station on regular basis. In monitoring and data collecting systems for PV and wind applications, the IoT and WSN can play a key role. In this framework, the WSNs are utilized to convey critical information from the PV/wind power station to the monitoring center, and cloud data centers are used to store this vital information, as shown in Figure 1. At each PV module and wind turbine, the WSNs are used to collect the sensor data. The sensor nodes, in particular, gather the information and optionally preprocess the data. The sink node integrates the incoming data and delivers it to the power monitor center via internet networks. The monitoring center is a vital part of this framework because it accepts combined information from the sink nodes in the power plant and stores it in separate data units in the private cloud. Different sorts of utilizations for clients are accessible in the created framework. The information transmission channel utilizes the internet, which might include security information for the created framework. This plan is to cater to the various prerequisites of various clients. The cloud data center is liable for validation and information encryption [59]. The system administrator has the highest level of authority, with the ability to monitor the complete PV power plant and gain access to all statistical data and the forecasted power data for various locations. data units in the private cloud. Different sorts of utilizations for clients are accessible in the created framework. The information transmission channel utilizes the internet, which might include security information for the created framework. This plan is to cater to the various prerequisites of various clients. The cloud data center is liable for validation and information encryption [59]. The system administrator has the highest level of authority, with the ability to monitor the complete PV power plant and gain access to all statistical data and the forecasted power data for various locations. Each sink node receives sets of information, similar to a hub, and merges the information of different data. In the power monitoring center, an access interface is built to receive and evaluate data, as well as process the information stored in the cloud as shown in Figure 1. After receiving the data, the cloud data center runs the KRLS forecasting model to forecast PV and wind power production.

Link Scheduling
Time Slotted Channel Hopping (TSCH) wireless network scheduling methods are classified as centralized or decentralized. Centralized scheduling approaches are frequently used to address the high-performance requirements of mission-critical applications. This necessitates the collection of global network and traffic data by a central entity, a procedure that takes time and adds to signaling overhead. In the centralized scheduling methods, the sink node, which serves as a central entity, is aware of the attributes of member (sensor) nodes in the TSCH network. With the centralized scheduling mechanism, a single point of failure at the sink node could cause a disruption of the entire network operation without prior notice. Compared with centralized scheduling, the decentralized scheduling algorithm offers greater scalability and is devoid of single-point failure, but it can result in more packet collisions. Different types of network topologies can be utilized for link transmission. For dense networks, tree topology is preferred as it provides enough scalability. A parent node generally has one or more child nodes and the rank of the parent node is higher than the child node. Furthermore, the parent node can be a hub node to child nodes. Figure 2 depicts the 6TiSCH networks with 40 nodes. The parent node and its child node are up to 20 m apart. Each sink node receives sets of information, similar to a hub, and merges the information of different data. In the power monitoring center, an access interface is built to receive and evaluate data, as well as process the information stored in the cloud as shown in Figure 1. After receiving the data, the cloud data center runs the KRLS forecasting model to forecast PV and wind power production.

Link Scheduling
Time Slotted Channel Hopping (TSCH) wireless network scheduling methods are classified as centralized or decentralized. Centralized scheduling approaches are frequently used to address the high-performance requirements of mission-critical applications. This necessitates the collection of global network and traffic data by a central entity, a procedure that takes time and adds to signaling overhead. In the centralized scheduling methods, the sink node, which serves as a central entity, is aware of the attributes of member (sensor) nodes in the TSCH network. With the centralized scheduling mechanism, a single point of failure at the sink node could cause a disruption of the entire network operation without prior notice. Compared with centralized scheduling, the decentralized scheduling algorithm offers greater scalability and is devoid of single-point failure, but it can result in more packet collisions. Different types of network topologies can be utilized for link transmission. For dense networks, tree topology is preferred as it provides enough scalability. A parent node generally has one or more child nodes and the rank of the parent node is higher than the child node. Furthermore, the parent node can be a hub node to child nodes. Figure 2 depicts the 6TiSCH networks with 40 nodes. The parent node and its child node are up to 20 m apart. The member nodes in the 6TiSCH network are allocated across a 60 m × 60 m square area and the operating conditions are established based on [28]. Different factors such as transmitted power, wavelength, the frequency band for typical 6TiSCH networks, and scale parameter for Rayleigh fading are set to 0.002 Watt (3 dBm), 0.125 m, 2.4 GHz, and 1. Each node in a slot frame can send a number of packets in the range of 1~3.
The time inside a slot frame for all the connection transmissions by the proposed link scheduling method can be represented as: where The member nodes in the 6TiSCH network are allocated across a 60 m × 60 m square area and the operating conditions are established based on [28]. Different factors such as transmitted power, wavelength, the frequency band for typical 6TiSCH networks, and scale parameter for Rayleigh fading are set to 0.002 Watt (3 dBm), 0.125 m, 2.4 GHz, and 1. Each node in a slot frame can send a number of packets in the range of 1~3. The time inside a slot frame for all the connection transmissions by the proposed link scheduling method can be represented as: where , ⁄ , ⁄ , and are defined as the time taken by all the link communication, time spent measuring interference-plus-noise (IPN) and delivering measured data to the sink node, time spent performing optimization techniques to assign priorities, and time required for all link broadcasts to ultimately reach the sink node. ⁄ is separated into a time allotment; for estimating IPN and for transmitting member node attributes. In the same way, ⁄ is also divided; for performing optimization and for sending priorities of member nodes [60]. The 6TiSCH wireless communication within the dense network is executed in tree topology which enables the flexible scaling of WSN. At the point when a parent hub flops in activity with a specific child node, another parent node within the communication range is utilized. Data transmission and subsequent affirmation require a cell that is associated with timeslot offset and channel offset. In Figure 3, cell usage of the 6TiSCH wireless network is described. Figure 3a depicts a 6TiSCH wireless network with dense nodes in a tree topology. The rank of the sink node is set to 1 and the parent node and its child node are only 20 m apart. The TSCH employs a combination of frequency channel hopping and time-division multiple access (TDMA) to mitigate the effects of wireless interference and multi-path fading, and separates time into different slot frames. TSCH divides the total transmissions into a channel distribution/usage (CDU) matrix having the dimensions of time and frequency. Timeslot offset and frequency offset address each cell of the CDU matrix. Every action of the node, transmitting/receiving in each timeslot, is determined by the TSCH schedule. Wireless interference between concurrent transmissions is greatly influenced by the cell/action allocation mechanism of the TSCH schedule.
In Figure 3b, the slot frame configuration considering channel offsets and timeslot offsets is presented for link transmission scheduling in the 6TiSCH network. The channel state information of the link at time slot t for link scheduling is expressed along the The 6TiSCH wireless communication within the dense network is executed in tree topology which enables the flexible scaling of WSN. At the point when a parent hub flops in activity with a specific child node, another parent node within the communication range is utilized. Data transmission and subsequent affirmation require a cell that is associated with timeslot offset and channel offset. In Figure 3, cell usage of the 6TiSCH wireless network is described. Figure 3a depicts a 6TiSCH wireless network with dense nodes in a tree topology. The rank of the sink node is set to 1 and the parent node and its child node are only 20 m apart. The TSCH employs a combination of frequency channel hopping and time-division multiple access (TDMA) to mitigate the effects of wireless interference and multi-path fading, and separates time into different slot frames. TSCH divides the total transmissions into a channel distribution/usage (CDU) matrix having the dimensions of time and frequency. Timeslot offset and frequency offset address each cell of the CDU matrix. Every action of the node, transmitting/receiving in each timeslot, is determined by the TSCH schedule. Wireless interference between concurrent transmissions is greatly influenced by the cell/action allocation mechanism of the TSCH schedule.
In Figure 3b, the slot frame configuration considering channel offsets and timeslot offsets is presented for link transmission scheduling in the 6TiSCH network. The channel state information of the link at time slot t for link scheduling is expressed along the channel offsets axis. T IPN , T M , T O , T S , and T B are included in the cell configuration. Timeslots from t 1 to t 6 represent T IPN , T M , T O , and T S , and timeslots from t 7 to t 12 represent T B . At each member node, the first time slot is used to measure IPN. Each member node with an omni-directional antenna sends out a dummy signal with the same transmission power as that of packet transmission. Member nodes situated in the vicinity of the 6TiSCH network are likely to have higher IPN levels than those on the edge and are subject to higher IPN unless proper link transmission priorities are provided to the member nodes. The IPN on the first channel offset over the first time slot is measured by each member node in the 6TiSCH network. During time slots, each member node uses a different cell to broadcast to the sink node within a slot frame. The time slot T O is used to determine the best priority for member nodes that are only active during the slotted frame in question. The sink node transmits over the time slot T S after the evaluation of member node priorities. Sensor nodes for data transmission can only be accessed by one link out of a set of links. After the Appl. Sci. 2022, 12, 6908 9 of 25 completion of set-up timeslots from t 1 to t 6 , data transmission is performed at the time slot t 7 . On the first channel offset, node 2, with higher priority, except for the sink node, begins transmission to the sink node. Node 2 transmits to node 1 (sink), while node 3 cannot transmit to the sink node that has to receive a packet from node 2. Node 6 recognizes that it is farther than 40 m from node 2 and transmits data to node 3. The same process is continued in the proceeding time slots. different cell to broadcast to the sink node within a slot frame. The time slot is used to determine the best priority for member nodes that are only active during the slotted frame in question. The sink node transmits over the time slot after the evaluation of member node priorities. Sensor nodes for data transmission can only be accessed by one link out of a set of links. After the completion of set-up timeslots from to , data transmission is performed at the time slot . On the first channel offset, node 2, with higher priority, except for the sink node, begins transmission to the sink node. Node 2 transmits to node 1 (sink), while node 3 cannot transmit to the sink node that has to receive a packet from node 2. Node 6 recognizes that it is farther than 40 m from node 2 and transmits data to node 3. The same process is continued in the proceeding time slots.    Figure 4 depicts the time slot compliant with the 6TiSCH network standard. The upper time slot is for the Tx (transmitter) and the lower time slot is for the Rx (receiver). After the time interval of TsTxOffset, the data packet is transferred by the transmitting sensor node. The receiving sensor node accepts the incoming data packets before the time period of TsTxOffset. When the data packet is properly received, Rx sends an acknowledge (ACK) signal to Tx after the delay time interval. As a result, a single time slot is used to carry out data packet transmission between a child node and a parent node.
Appl. Sci. 2022, 12, 6908 10 of 25 Figure 4 depicts the time slot compliant with the 6TiSCH network standard. The upper time slot is for the Tx (transmitter) and the lower time slot is for the Rx (receiver). After the time interval of TsTxOffset, the data packet is transferred by the transmitting sensor node. The receiving sensor node accepts the incoming data packets before the time period of TsTxOffset. When the data packet is properly received, Rx sends an acknowledge (ACK) signal to Tx after the delay time interval. As a result, a single time slot is used to carry out data packet transmission between a child node and a parent node. Node parameters such as rank, IPN, and the number of packets to transmit are taken into account when determining node priority. The rank characteristic is significant because the high-rank nodes near the sink node, e.g., the rank 0 node, are often the source of data that incurs traffic bottlenecks. The number of data packets transmitted is considered for the assessment of hub node parameters. Data packets are created and used for transmission between the parent node and each child node. As a result, high-rank nodes communicate in each slot frame and are prioritized more than low-rank nodes. IPN factor is also considered during the link scheduling. When a node has a high IPN, it is more likely to be an interfering node reducing the total throughput of the 6TiSCH network. Higher priorities are provided to nodes with high IPN values, allowing their data packets to be broadcasted in early time allotments [61].
The main three attributes for the link scheduling optimization are rank, IPN, and the number of packets to transmit. The rank of the nodes used to define the priorities of N member nodes is given as where represents the priority of node i and represents the rank of node i, respectively. The sink node that has the highest priority and is assigned to rank 1 is also considered in Equation (2). Priority of member nodes is given as Node parameters such as rank, IPN, and the number of packets to transmit are taken into account when determining node priority. The rank characteristic is significant because the high-rank nodes near the sink node, e.g., the rank 0 node, are often the source of data that incurs traffic bottlenecks. The number of data packets transmitted is considered for the assessment of hub node parameters. Data packets are created and used for transmission between the parent node and each child node. As a result, high-rank nodes communicate in each slot frame and are prioritized more than low-rank nodes. IPN factor is also considered during the link scheduling. When a node has a high IPN, it is more likely to be an interfering node reducing the total throughput of the 6TiSCH network. Higher priorities are provided to nodes with high IPN values, allowing their data packets to be broadcasted in early time allotments [61].
The main three attributes for the link scheduling optimization are rank, IPN, and the number of packets to transmit. The rank of the nodes used to define the priorities of N member nodes is given as where pn i represents the priority of node i and RN i represents the rank of node i, respectively. The sink node that has the highest priority and is assigned to rank 1 is also considered in Equation (2). Priority of member nodes is given as where IPN i is the IPN measured at node i. The free space equation is used to calculate interference from node j to node (4) i. The study in [62] describes the interference from member node j to member node i as follows where λ represents wavelength, L ij represents the distance between node i and node j, P TR represents transmit power, and B represents the Rayleigh block fading random variable parameter, respectively [63]. IPN i is expressed as The priorities of all nodes based on the number of packets to transmit within a specific slot frame are assessed as max (pn 1 ,pn 2 ,···pn N+1 ) where PT i is the number of packets to transmit by node i. For the proposed link scheduling algorithm, the priorities of member nodes are determined by the optimization established on the united objectives as follows: where W 1 , W 2 , and W 3 represent the weights of individual objectives. These weights are subject to , normalized components are applied in Equation (7). Assuming , Equation (7) can be expressed as max (pn 1 ,pn 2 ,···pn N+1 ) After the completion of broadcasting, link scheduling commences with the priorities of the nodes established by the sink node. The priority of the child node determines the link between the parent node and the child node. Link scheduling is implemented based on the node priority.

Kernel Recursive Least Square Model
The KRLS handles the nonlinear issues as a nonlinear online prediction model by depicting samples from the actual space to the high-dimensional space using the kernel functions [64]. It adapts and dynamically updates the model depending on time series data, lowering model complexity and computation time. Since its inception, it has become a popular approach for online prediction due to its natural recursive shape, being an extension of the traditional RLS algorithm via the kernel method [65]. The ARMAX model is used in this work to represent the prediction linearly.
where y k represents the measured signal and u represents the desired response; δ x , z o , and are unidentified coefficients that have to be recursively estimated; and x 0 and z o , are the input and output orders of the system, respectively. The following is a simplified vector representation of Equation (9): The variables α ∧ β are defined in Equations (11) and (12). α contains the previous sample points, β contains the values of model parameters, and γ k represents the state noise in the feature space.
α T k = y k−1 · · · y k−x 0 , ∧ u k−1 · · · u k−z o 1] (11) where the regression vector is denoted by the letter α k ∈ Q (x 0 +z o +1)×1 , and the transpose operator is denoted by the letter T. Figure 5 presents the prediction scheme of the proposed forecasting model.
where represents the measured signal and represents the desired response; , , and are unidentified coefficients that have to be recursively estimated; and and , are the input and output orders of the system, respectively. The following is a simplified vector representation of Equation (9): The variables ∧ are defined in Equations (11) and (12). contains the previous sample points, contains the values of model parameters, and represents the state noise in the feature space.
where the regression vector is denoted by the letter ∈ ( )× , and the transpose operator is denoted by the letter T. Figure 5 presents the prediction scheme of the proposed forecasting model.
where is the Mercer kernel, represents the matrix of all inputted samples, is the regularization parameter, addresses the reproducing kernel Hilbert space (RKHS) related to the Mercer kernel, and (0.98 in this case) is the forgetting factor. The Gaussian kernel, polynomial kernel, and sigmoid kernel are the three most regularly used kernels evaluated for their ability to improve prediction accuracy [66]. The Gaussian kernel is given by where represents the scaling factor, and is the new forthcoming information. The polynomial kernel is given as where K is the Mercer kernel, χ represents the matrix of all k inputted samples, R is the regularization parameter, H addresses the reproducing kernel Hilbert space (RKHS) related to the Mercer kernel, and Ψ (0.98 in this case) is the forgetting factor. The Gaussian kernel, polynomial kernel, and sigmoid kernel are the three most regularly used kernels evaluated for their ability to improve prediction accuracy [66]. The Gaussian kernel is given by where ρ represents the scaling factor, and α is the new forthcoming information. The polynomial kernel is given as where c is a positive value and p is the order of polynomial kernel and the sigmoid kernel is given by where s and t are appropriate positive constants. The fundamental concept is that the input data are mapped with high-dimensional feature space (i.e., RKHS). This interaction allows linear inner products to be transformed into RKHS by just modifying their inner product to kernels [67]. The linear approach is then used to solve the transformed feature space. Kernel-based algorithms offer the benefit of being able to find a global solution by solving a convex optimization problem. In addition, if the data have no linear relationship, LR algorithms may not be able to accurately model it. This problem can be solved using the kernel technique, which is more likely to respond to a linear model. The kernel technique, on the other hand, experiences the overfitting issue due to the high dimensionality of data induced by the Hilbert space.
The computational complexity of KRLS increases as the dimensions of the kernel matrix extend linearly with the number of observations. The approximate linear dependency (ALD) criterion is used to decrease the complexity [68]. The Matlab TM kernel adaptive filtering toolbox was used to implement the KRLS-ALD method [69].
Utilizing Equation (10), the projected model can be written aŝ For the q-side ahead prediction, Equation (18) can be composed aŝ The % FIT criterion is given by and is used to evaluate the performance of the algorithm. Equation (17) quantifies the variation of y caught by the q-side ahead of forecasting. Moreover, % FIT computes how precisely the q-side ahead of forecasting is determined.

Results and Discussion
This section presents the efficacy of the proposed KRLS forecasting algorithm and the proposed link scheduling model. Generally, the WSN has sensor nodes and a sink node. The data collected by the cloud data center are used for regression techniques: GPR, LRM, SVM, TR, NN, and LSTM network. Data on PV and wind power on a half-hourly basis was acquired from the Korea Meteorological Administration in South Korea (from 1 January 2019 to 31 December 2019). In total, 70% of the data for one day was selected to be utilized as training and validation data in the proposed forecasting models' training phase, while the remaining 30% was used to evaluate the prediction performances. MATLAB R2022a was used for WSN and the proposed link scheduling technique. In this section, the proposed PV and wind forecasting model is compared with prediction methods by using regression techniques. To achieve effective power prediction performance, the proposed forecasting model for PV and wind power production utilizes a large training dataset. The prediction result for different regression learning models for both PV and wind systems, viz., GPR, LR, SVM, TR, NN, LSTM, and the proposed forecasting model are shown in Tables 2 and 3. Figures 6-11 represent the actual, training, and forecasting of PV energy using GPR, LR, SVM, TR, NN, and LSTM techniques. Figures 12-17 represent the actual, training, and forecasting of wind energy using GPR, LR, SVM, TR, NN, and LSTM techniques.
The plots in Figures 18 and 19 show the results obtained by using the proposed KRLS model. As shown in Table 2, the linear regression (LR) model for the PV energy prediction underperforms in terms of the MAE and RMSE when compared with the proposed forecasting model. Among all the models in this study, the SVM-based model, as shown in Figure 8, shows poor performance for PV power prediction, the TR model, shown in Figure 14, has poor performance for wind power prediction; while the proposed forecasting models shown in Figures 18 and 19 demonstrate the best performance in both cases. In terms of MAE, the proposed forecasting model for the wind system shown in Table 3 outperforms LR, TR, GPR, SVM, LSTM, and NN by 6.07%, 20.28%, 7.49%, 20.4%, 11.48%, and 94.61% respectively, while the improvement ratios in terms of RMSE are 94.2%, 95.07%, 94.35%, 94.8%, 94.5%, and 29.47%, respectively.                . Actual, training, and prediction of PV power using TR. Figure 10. Actual, training, and prediction of PV power using NN. Figure 10. Actual, training, and prediction of PV power using NN. Figure 11. Actual, training, and prediction of PV power using LSTM. Figure 12. Actual, training, and prediction of wind power using GPR. Figure 13. Actual, training, and prediction of wind power using LR. Figure 11. Actual, training, and prediction of PV power using LSTM.
Appl. Sci. 2022, 12, 6908 16 of 25 Figure 11. Actual, training, and prediction of PV power using LSTM. Figure 12. Actual, training, and prediction of wind power using GPR. Figure 13. Actual, training, and prediction of wind power using LR.             Figure 16. Actual, training, and prediction of wind power using NN. Figure 16. Actual, training, and prediction of wind power using NN. Figure 17. Actual, training, and prediction of wind power using LSTM.
The plots in Figures 18 and 19 show the results obtained by using the proposed KRLS model. As shown in Table 2, the linear regression (LR) model for the PV energy prediction underperforms in terms of the MAE and RMSE when compared with the proposed forecasting model. Among all the models in this study, the SVM-based model, as shown in Figure 8, shows poor performance for PV power prediction, the TR model, shown in Figure 14, has poor performance for wind power prediction; while the proposed forecasting models shown in Figures 18 and 19 demonstrate the best performance in both cases. In terms of MAE, the proposed forecasting model for the wind system shown in Table 3 outperforms LR, TR, GPR, SVM, LSTM, and NN by 6.07%, 20.28%, 7.49%, 20.4%, 11.48%, and 94.61% respectively, while the improvement ratios in terms of RMSE are 94.2%, 95.07%, 94.35%, 94.8%, 94.5%, and 29.47%, respectively.   The plots in Figures 18 and 19 show the results obtained by using the proposed KRLS model. As shown in Table 2, the linear regression (LR) model for the PV energy prediction underperforms in terms of the MAE and RMSE when compared with the proposed forecasting model. Among all the models in this study, the SVM-based model, as shown in Figure 8, shows poor performance for PV power prediction, the TR model, shown in Figure 14, has poor performance for wind power prediction; while the proposed forecasting models shown in Figures 18 and 19 demonstrate the best performance in both cases. In terms of MAE, the proposed forecasting model for the wind system shown in Table 3 outperforms LR, TR, GPR, SVM, LSTM, and NN by 6.07%, 20.28%, 7.49%, 20.4%, 11.48%, and 94.61% respectively, while the improvement ratios in terms of RMSE are 94.2%, 95.07%, 94.35%, 94.8%, 94.5%, and 29.47%, respectively. Figure 18. Actual, training, and prediction of PV power using the proposed KRLS algorithm. Figure 18. Actual, training, and prediction of PV power using the proposed KRLS algorithm.
The actual and trained curves shown in Figures 18 and 19 marked with blue and red lines follow the same trajectory, indicating the accuracy of the proposed KRLS model. Green lines in Figures 18 and 19 indicate the prediction curve and the accuracy of the prediction is verified by the different error indices shown in the Tables 2 and 3. In terms of MAE, the proposed KRLS model for the PV system outperforms LR, TR, GPR, SVM, LSTM, and NN by 99.75%, 98.73%, 98.76%, 99.45%, 99.75%, 97.58%, and 98.61%, Figure 19. Actual, training, and prediction of wind power using the proposed KRLS algorithm.
The actual and trained curves shown in Figures 18 and 19 marked with blue and red lines follow the same trajectory, indicating the accuracy of the proposed KRLS model. Figures 18 and 19 indicate the prediction curve and the accuracy of the prediction is verified by the different error indices shown in the Tables 2 and 3. In terms of  MAE, the proposed KRLS model for the PV system outperforms LR, TR, GPR, Tables 2 and 3 to validate the performance of the proposed forecasting model for PV and wind power. Moreover, in Tables 2 and 3, the hourly prediction dataset of PV power produces an RMSE value of 0.0146, MAE of 0.000211, and R 2 score of 99.7%. The results demonstrate that the proposed forecasting model of PV and wind power outperforms other statistical and ML techniques.

Green lines in
Simulations for cloud data consumption in the WSN are implemented to verify the performance of the proposed link scheduling. In Figure 20, cell usage of the proposed algorithm, DeAMON with priority, and DeAMON are shown. The proposed algorithm requires only 67 time slots including the first 11 time slots of the slot frame, whereas the DeAMON needs 86 time slots. The simulation result shows that by the proposed technique the cell utilization or usage in each timeslot is generally higher than that of the DeAMON. This is due to non-conflict parallel transmissions which are possible due to the proper allocation of priorities to member nodes. The algorithm proposed in this study achieves low latency due to the proper priority allocation of member nodes. Figure 21 shows the packet delivery ratio (PDR) performance of the proposed link scheduling algorithm according to link success probability (LSP). Figures 22 and 23 show the (PV and wind power) forecasting performance of the proposed link scheduling algorithm according to LSP. As shown in Figures 22 and 23, when the LSP increases, the RMSE of PV and wind power forecasting for all techniques is reduced, and among the different approaches, the proposed KRLS method produces the least RMSE. Moreover, it can be seen that a lower LSP results in a higher performance margin, and a higher LSP results in a modest drop in the performance margin. Figures 22 and 23 clearly indicate that the proposed KRLS approach performs better than the other ML methods. The proposed link scheduling algorithm for the WSN performs much better than the DeAMON with priority and DeAMON because of the reconfigurability when a parent node suffers from a node failure. In addition, the proposed algorithm can find an alternative parent node.

Conclusions
Many governments and experts throughout the world are focusing their efforts on developing new alternative energy sources that are eco-friendly. One of the most popular solutions is to use renewable energy sources, which has been proven to be sustainable, cost-effective, abundant, non-polluting, and renewable. However, the nature of energy generated by renewable energy sources is sporadic and has created various obstacles. This work proposes a forecasting model for PV and wind power production, utilizing the PV and wind data collected by the cloud data center. The forecasting model was evaluated

Conclusions
Many governments and experts throughout the world are focusing their efforts on developing new alternative energy sources that are eco-friendly. One of the most popular solutions is to use renewable energy sources, which has been proven to be sustainable, cost-effective, abundant, non-polluting, and renewable. However, the nature of energy generated by renewable energy sources is sporadic and has created various obstacles. This work proposes a forecasting model for PV and wind power production, utilizing the PV and wind data collected by the cloud data center. The forecasting model was evaluated and validated using real-time data collected by the cloud data center. Moreover, a link scheduling algorithm for the 6TiSCH wireless network was proposed for efficient cell usage of channel offsets in WSNs. The real data was used by the KRLS algorithm and other regression techniques. The proposed KRLS forecasting model was validated by calculating and analyzing different types of error/performance indices, including RMSE, MAE, and R 2 . Using the real-world dataset, the forecasting performance of the proposed KRLS forecasting model was compared with other ML and regression models. All the different regression models underperform relative to the simulated results, however, the proposed KRLS forecasting model shows an impressively executed performance with high accuracy in terms of RMSE, MAE, and R 2 values. For the majority of the experimental parameters, the SVM-based model underperforms. The proposed KRLS forecasting model outperformed other regression models in all assessment events, with an RMSE value of 0.0146, MAE value of 0.00021, and R 2 of 99.7% for PV energy, and RMSE value of 0.0421, MAE value of 0.0018, and R 2 of 88.17% for wind energy. The proposed link scheduling algorithm for 6TiSCH WSN adapts to topology changes in the network and reconfigures the scheduling, providing high reliability in dynamic environments. The proposed link scheduling algorithm incurs 22% lower latency and 38% higher resource utilization through the efficient scheduling of time slots. The link scheduling algorithm can provide a viable solution for a variety of industrial control and monitoring applications. Integration of the ESS with the proposed KRLS forecasting scheme will be a focus of future work as well as considering different environmental factors for PV and wind power forecasting. In addition to this, we hope to further improve the deep learning process and wireless sensor network communication dependability.