1. Introduction
The United Nations Conference on Trade and Development reported that greenhouse gas (GHG) emissions from shipping have increased by 20% in the last decade, emitting as much as 1.1 billion tons in 2023 and accounting for nearly 3% of global GHG emissions. The International Maritime Organization (IMO) has mandated that GHG emissions from shipping be reduced by at least 50% by 2050. Therefore, renewable energy sources such as solar and wind have been increasingly used in ship power systems [
1]. In particular, solar energy has been more widely applied on ships due to its cost-effectiveness and government supportive policies [
2]. For example, PV systems are installed on conventional diesel ships to form an integrated energy supply system to reduce the use of fossil fuels, as well as to be used as auxiliary energy sources to provide power for lighting and other auxiliary equipment [
3,
4,
5]. Studies show that the installation of PV systems on river cruise ships and dry bulk carriers not only reduces fuel consumption but also extends the service life of ship equipment [
6]. The installation of PV systems on ships can reduce the dependence on traditional energy sources, lower carbon emissions, and satisfy the EU carbon emission reduction regulations, which is of great significance in promoting the green transformation of shipping [
7]. However, shipboard photovoltaic (PV) systems are affected by meteorological conditions and the ship’s sailing attitude, resulting in large fluctuations in PV output power, which will impact the stable operation of ship power systems in island mode. Therefore, accurate and fast prediction of the PV output power to provide a reference for real-time scheduling of energy storage systems (ESSs) is crucial to ensure the stable operation of solar ships [
8,
9].
The main PV models currently available are mechanism and data-driven models. In terms of mechanism models, they have evolved from single-diode models to dual-diode models. Marcelo, G.V. [
10] built a single-diode PV model which takes into account the effect of series and parallel resistances and ensures that the maximum output power of the model matches the maximum power of actual PV cells. Yan, J. [
11] utilized a single-diode model to simulate PV power generation and proposed a maximum power point tracking technique based on an improved perturb and observe method, which significantly improved the efficiency of the PV energy utilization. Raya-Armenta [
12] introduced two new physical equations to represent series and parallel resistances, which significantly improved the model accuracy. Mohammad, H. [
13] proposed a parameter extraction method for a five-parameter dual-diode model of PV cells based on information provided by PV manufacturers. Although the above mechanism models provide a theoretical understanding of PV cells, they only focus on the internal characteristics of PV cells in the modeling process and cannot adapt to system component changes, PV panel aging, and dynamic changes in meteorological conditions; thus, their accuracy is usually low in practical applications. In terms of data-driven models, they do not need to be aware of the internal characteristics of PV cells and, in most cases, have a higher modeling accuracy than mechanism models [
14]. Patra, J.C. [
15] studied a novel Chebyshev neural network to simulate a dual-junction PV cell, which outperformed the commercial software ATLAS in predicting the characteristics of DJ solar cells. Based on a convolutional neural network (CNN) and long short-term memory (LSTM), a PV power prediction model was used for power system generation planning and reserve estimation [
16]. Rubasinghe, O. [
17] developed a novel sequence-to-sequence hybrid CNN-LSTM PV model, which had high accuracy and could be used as a PV output power prediction model. The accuracy of the above data-driven models is usually high, but they rely heavily on historical data and may not be adequate in situations with limited available data, sudden changes in meteorological conditions, or violent ship swings. In addition, data-driven models are not as interpretable as mechanism models with clear physical descriptions and specific mathematical expressions.
Recently, machine learning methods have been used for PV power predictions. Zhu, H. [
18] proposed a PV power prediction method combining wavelet decomposition and an artificial neural network (ANN) which takes into account the effects of solar irradiance and the historical output power of PV cells. However, the ANN only established direct mapping between the input data and the output predicted power without considering the temporal correlation of the data series. Zhou, S.Y. [
19] predicted PV power based on a recurrent neural network (RNN), which improved time series prediction by keeping the memory of the previous information and incorporating it into the current computation, resulting in a significant increase in model prediction accuracy compared to ANNs [
20]. However, RNNs still suffer from gradient vanishing during long sequences training. Akhter, M.N. and Cantillo-Luna, S. [
21,
22] proposed a novel PV power prediction method, LSTM-RNN, which takes into account meteorological parameters such as wind speed, temperature, and humidity and achieves good prediction results. Although LSTM captures forward feature information in the time series of the PV output power, it ignores reverse feature information, which leads to incomplete information capture and affects the prediction accuracy. Bi-directional long short-term memory (BiLSTM), upgraded from LSTM, can comprehensively capture information from the forward and reverse directions, which is expected to improve the prediction accuracy of the PV power.
Considering the above, the purpose of this paper is to present a novel PV digital twin (DT) model combined with BiLSTM to improve the prediction accuracy of PV power. It is organized as follows:
Section 2 introduces the research idea.
Section 3 presents the PV DT model.
Section 4 expounds on the theoretical principle of BiLSTM. The experimental procedure is described in detail in
Section 5.
Section 6 experimentally validates the effectiveness of the proposed method. Conclusions are enclosed in
Section 7.
4. Bi-Directional Long-Short Term Memory
Recently, RNNs and LSTM have been used in PV power prediction [
19,
21,
22]. Classic RNNs have some limitations, such as the difficulty they encounter in remembering long-term dependencies and their inability to effectively relate old information to new inputs. LSTM, a variant of classic RNNs, aims to solve these limitations. It mitigates the gradient vanishing and exploding and improves the ability to preserve long sequences by adding gates within each cell state. These gates, namely the forget gate, input gate, and output gate, play crucial roles in filtering, preserving, and generating information, respectively [
36,
37]. The structure of LSTM is depicted in
Figure 5.
The forget gate in LSTM networks has the function of selectively filtering and retaining information from the processing of the previous memory cell. The output or activation of the forget gate
at the time step
is as follows:
where
is the input sequence at the time step
,
is the previous hidden state or memory cell,
is the sigmoid activation function,
is the weight matrix for the forget gate, and
is the bias term for the forget gate.
The input gate controls the influence of the current input on the memory cell. Its expression is as follows:
where
represents the candidate value for the cell state,
represents the new cell state,
is the hyperbolic tangent function,
represents the weight matrix of the input gate,
represents the weight matrix of the cell state,
represents the bias of the input gate,
represents the bias of the cell state, and
represents the state of the input gate.
The output gate controls the output state of the memory cell. Its expression is as follows:
where
represents the weight matrix of the output gate,
represents the bias of the output gate, and
represents the output state of the output gate.
One limitation of an LSTM neural network is that it relies on the historical information of the forward sequence. To address this limitation, the BiLSTM neural network was introduced. It consists of two LSTM neural networks, one for processing the forward sequence and the other for processing the backward sequence. By integrating information from both directions, the BiLSTM neural network can capture the intrinsic patterns of past and future data, thus enhancing its predictive capability [
38,
39,
40,
41]. In this paper, it is selected as the PV power prediction algorithm.
In a BiLSTM network, the forward and backward sequences are first processed independently in different hidden layers. The outputs of these hidden layers are then combined and used as inputs to the output layer, thus improving the accuracy of the model. The structure of a typical BiLSTM network is shown in
Figure 6.
The hidden state at each layer of the BiLSTM network is composed of three parts: the forward hidden state at the previous time step
, the backward hidden state at the previous time step
, and the input at the current time step
. The combination process of the hidden states at each layer can be represented as follows:
where
LSTM() represents the operation of the traditional LSTM network,
refers to the forward hidden state,
refers to the backward hidden state,
represents the weight of the output from the hidden layer of the forward propagation unit,
represents the weight of the output from the hidden layer of the backward propagation unit, and
represents the bias optimization parameter of the hidden layer at current time step.
5. Experimental Procedure
The flowchart of the short-term PV power prediction based on the DT model is shown in
Figure 7. As can be seen from
Figure 7, the detailed steps are as follows:
Step 1. Collect meteorological parameters such as irradiance, temperature, and humidity via sensors.
Step 2. Transmit meteorological parameters to the FPGA via the UDP communication protocol and then import them into a PV simulator to generate the PV power data.
Step 3. Construct a PV dataset consisting of meteorological parameters and the PV power data.
Step 4. Build the PV mechanism model based on the analysis of the working principle, physical properties, capacity, and series and parallel connections of the PV power generation.
Step 5. Build the PV data-driven model based on CNN, train it with the PV dataset, and update the PV data-driven model using the sliding time window method. This is performed by importing the latest data from the sliding time window into the CNN model for rebuilding the data-driven model.
Step 6. Establish the PV DT model. According to the BPA, the weights of the mechanism model and the data-driven model are first calculated, and then, these two models are converged using DS evidence theory to obtain the DT model.
Step 7. Build the BiLSTM prediction model of the PV power, using the experimental dataset and the augmented dataset of the DT model as inputs to achieve PV power prediction.
Step 8. Evaluate the model performance with metrics such as RMSE, MAE, and MAPE to verify the effectiveness of the method.