Short-Term Photovoltaic Power Prediction Based on a Digital Twin Model

: Due to the influence of meteorological conditions, shipboard photovoltaic (PV) systems have problems such as large fluctuation and inaccurate prediction of the output power. In this paper, a short-term PV power prediction method based on a novel digital twin (DT) model and BiLSTM is proposed. Firstly, a PV mechanism model and a data-driven model were established, in which the data-driven model was updated iteratively in real time using the sliding time window update method; then, these two models were converged to construct a PV DT model according to the DS evidence theory. Secondly, a BiLSTM model was built to make short-term predictions of the PV power using the augmented dataset of the DT model as an input. Finally, the method was tested and verified by experiments and further compared with main PV prediction methods. The research results indicate the following: firstly, the absolute error of the DT model was smaller than that of the mechanism model and the data-driven model, being as low as 5.62 W after the data update of the data-driven model; thus, the DT model realized data augmentation and high fidelity. Secondly, compared to several main PV prediction models, the PV DT model combined with BiLSTM had the lowest RMSE, MAE, and MAPE; the best followability; and the smallest absolute error under different weather conditions, which was especially obvious under cloudy weather conditions. In summary, the method can accurately predict the shipboard PV power, which has great theoretical significance and application value for improving the economy and reliability of solar ship operation.


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 dure is described in detail in Section 5. Section 6 experimentally validates the effectiveness of the proposed method.Conclusions are enclosed in Section 7.

Research Idea
The research idea of this paper is illustrated in Figure 1.The essential and innovative work is to establish a PV DT model consisting of a mechanism model and a data-driven model, which provides an augmented dataset for a PV power prediction algorithm.Based on experimentally collected meteorological data related to PV power generation, such as temperature, irradiance, humidity, etc., the mechanism model and the data-driven model are first constructed.The PV DT model is then obtained by converging both of them using the Dempster-Shafer (DS) evidence theory, whereby the data-driven model is continuously updated using the sliding time window update method.The augmented dataset is then fed into a BiLSTM neural network for making a short-term prediction of the PV power.Finally, the PV DT model and BiLSTM prediction algorithm are comparatively analyzed and validated.
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.

Research Idea
The research idea of this paper is illustrated in Figure 1.The essential and innovative work is to establish a PV DT model consisting of a mechanism model and a data-driven model, which provides an augmented dataset for a PV power prediction algorithm.Based on experimentally collected meteorological data related to PV power generation, such as temperature, irradiance, humidity, etc., the mechanism model and the data-driven model are first constructed.The PV DT model is then obtained by converging both of them using the Dempster-Shafer (DS) evidence theory, whereby the data-driven model is continuously updated using the sliding time window update method.The augmented dataset is then fed into a BiLSTM neural network for making a short-term prediction of the PV power.Finally, the PV DT model and BiLSTM prediction algorithm are comparatively analyzed and validated.

Mechanism Model
The output power of an individual PV cell is low, so multiple cells are typically connected in series and parallel to form a PV array for higher output power.The equivalent circuit model of a PV cell is illustrated in Figure 2, where ph I is the photocurrent of the PV cell, sh R is the equivalent parallel resistance, s R is the equivalent series resistance, d I is the current through the diode, V is the PV output voltage, and I is the PV output current.Based on Kirchhoff's current law, the output current I of a PV cell can be de- rived as follows [23]:

Mechanism Model
The output power of an individual PV cell is low, so multiple cells are typically connected in series and parallel to form a PV array for higher output power.The equivalent circuit model of a PV cell is illustrated in Figure 2, where I ph is the photocurrent of the PV cell, R sh is the equivalent parallel resistance, R s is the equivalent series resistance, I d is the current through the diode, V is the PV output voltage, and I is the PV output current.Based on Kirchhoff's current law, the output current I of a PV cell can be derived as follows [23]: where I 0 is the reverse saturation current of the diode; n is the ideality factor of the diode, 1 ≤ n ≤ 2; q is the electric charge, q = 1.602 × 10 −19 C; k is the Boltzmann constant, k = 1.381 × 10 −23 J/K; N s is the number of PV cells connected in series; and T is the temperature of the PV cell.
where 0 I is the reverse saturation current of the diode; n is the ideality factor of the diode, 1 2 n ≤ ≤ ; q is the electric charge,  ( ) ( ) where sco I represents the short-circuit current under standard irradiance and tempera- ture conditions; t h is the temperature coefficient, Although this model has been widely used for the theoretical analysis of PV output power, the parameters ph I , o I , s R , sh R , and n are dependent on temperature and ir- radiance and are not provided by PV cell suppliers.Therefore, calculation of these parameters is very difficult, which limits the engineering application of the model.In response, a simplified model was proposed by Babu, B. [27], and Formula (1) can be simplified as follows: The solutions 1 C and 2 C are obtained as follows: From the simplified model, the PV output current can be calculated because the values of sc I , oc V , m I , and m V are usually available from PV cell suppliers.However, these four parameters are still affected by changes in meteorological conditions and need to be revised.The revision for them with irradiance and temperature is given below.It is used as the PV mechanism model in this study.I ph and I o are variables affected by meteorological conditions such as irradiance and temperature.Their calculation formulas are as follows [10,13,[24][25][26]: (2) where I sco represents the short-circuit current under standard irradiance and temperature conditions; h t is the temperature coefficient, h t = 6.4 × 10 −4 1/ • C; T denotes the temperature of the PV cell; T re f represents the reference temperature; a 1 and b 1 are constants, a 1 = 1.336 × 10 4 • C and b 1 = 235 A/ • C 3 ; and S and S re f represent the actual irradiance and the reference irradiance, respectively.Although this model has been widely used for the theoretical analysis of PV output power, the parameters I ph , I o , R s , R sh , and n are dependent on temperature and irradiance and are not provided by PV cell suppliers.Therefore, calculation of these parameters is very difficult, which limits the engineering application of the model.In response, a simplified model was proposed by Babu, B. [27], and Formula (1) can be simplified as follows: The solutions C 1 and C 2 are obtained as follows: From the simplified model, the PV output current can be calculated because the values of I sc , V oc , I m , and V m are usually available from PV cell suppliers.However, these four parameters are still affected by changes in meteorological conditions and need to be revised.The revision for them with irradiance and temperature is given below.It is used as the PV mechanism model in this study.
where I ′ sc , V ′ oc , I ′ m , and V ′ m are the revisions of I sc , V oc , I m , and V m , respectively; T is the temperature of the PV cell; S is the irradiance; T re f = 25 • C; S re f = 1000MW/m 2 ; and a, b, and c are constants, a = 0.0025 1/ • C, b = 0.5, and c = 0.00288 1/ • C.

Data-Driven Model
Data feature extraction is crucial for PV power prediction.A PV power series has a strong time regularity, while meteorological parameter sequences present a strong randomness, which makes it very difficult to extract the features of PV data series.CNNs, known for their powerful feature extraction capability, have been widely popularized and applied in many fields such as image recognition, pattern classification, object detection, face recognition, and time series data analysis [28,29].In this paper, a CNN is used to construct the PV data-driven model.A CNN is a type of feedforward neural network that comprises an input layer, convolutional layers, pooling layers, fully connected layers, and an output layer, as shown in Figure 3 [30].

Data Update Based on Sliding Time Window Update Method
Traditional PV data-driven models do not update the model data, which cannot effectively extract the features in the latest data and reflect the actual operation of the system, resulting in low fidelity of the model.The PV data-driven model established in this paper uses a sliding time window update method to add the latest PV power generation data to the model, thus improving the fidelity of the model as well as the adaptability of data changes.
In order to ensure the efficiency of model training, the sliding time window update method needs to keep the size of the training data fixed when adding new data samples, i.e., replacing the old data samples with the same number of the latest data samples.To reduce the influence of data further away from the current moment on the description of the model feature, the data samples closest to the current moment are usually selected for model training to retain the latest data information on the timeline.This approach ensures that the data-driven model captures the latest information and adapts to data changes over time, thus improving the accuracy of the data-driven model [31,32].
The process of updating the PV data-driven model    Compared to conventional matrix operations, a significant advantage of CNNs is that they can process data with convolutional operations, which greatly enhances the computational speed.A CNN uses convolutional and pooling layers in parallel to efficiently extract local features from the input data while reducing the dimensionality of these features.This feature extraction mechanism allows the CNN to focus on relevant information and discard some unimportant details, thus improving feature extraction efficiency and performance.
Moreover, a CNN benefits from weight sharing, a key characteristic that reduces the number of parameters and complexity within the model.Weight sharing ensures that the same set of weights is used across different regions of the input data, enabling the network to learn and recognize patterns in a more generalized manner.This not only helps in reducing model complexity but also enhances the network's ability to generalize and make accurate predictions on unknown data.

Data Update Based on Sliding Time Window Update Method
Traditional PV data-driven models do not update the model data, which cannot effectively extract the features in the latest data and reflect the actual operation of the system, resulting in low fidelity of the model.The PV data-driven model established in this paper uses a sliding time window update method to add the latest PV power generation data to the model, thus improving the fidelity of the model as well as the adaptability of data changes.
In order to ensure the efficiency of model training, the sliding time window update method needs to keep the size of the training data fixed when adding new data samples, i.e., replacing the old data samples with the same number of the latest data samples.To reduce the influence of data further away from the current moment on the description of the model feature, the data samples closest to the current moment are usually selected for model training to retain the latest data information on the timeline.This approach ensures that the data-driven model captures the latest information and adapts to data changes over time, thus improving the accuracy of the data-driven model [31,32].
The process of updating the PV data-driven model M 1 to M 2 using a sliding time window is illustrated in Figure 4. Let us assume that the size of the training data samples is L, and the length of the sliding time window is n.When the number of newly added data samples reaches n, the replacement strategy is executed to form the new training data, and then, the PV data-driven model is retrained to update the model.method needs to keep the size of the training data fixed when adding new data samples, i.e., replacing the old data samples with the same number of the latest data samples.To reduce the influence of data further away from the current moment on the description of the model feature, the data samples closest to the current moment are usually selected for model training to retain the latest data information on the timeline.This approach ensures that the data-driven model captures the latest information and adapts to data changes over time, thus improving the accuracy of the data-driven model [31,32].
The process of updating the PV data-driven model

Digital Twin Model
The PV mechanism model developed in Section 3.1 has the advantages of stable model error and strong interpretability, but in most cases, its error is large.The PV datadriven model built in Sections 3.2 and 3.3 has a strong feature extraction capability for PV sequences with high modeling accuracy, but its interpretability is poor and the model error increases rapidly when the weather changes.Neither satisfies the requirements of a high-fidelity, high-precision PV model.In this section, the advantages of these two models are combined to construct a PV DT model.The Dempster-Shafer evidence theory is utilized to determine the weights of the mechanism model and the data-driven model and converge them.Meanwhile, the data-driven model is iteratively updated in real time

Digital Twin Model
The PV mechanism model developed in Section 3.1 has the advantages of stable model error and strong interpretability, but in most cases, its error is large.The PV datadriven model built in Sections 3.2 and 3.3 has a strong feature extraction capability for PV sequences with high modeling accuracy, but its interpretability is poor and the model error increases rapidly when the weather changes.Neither satisfies the requirements of a high-fidelity, high-precision PV model.In this section, the advantages of these two models are combined to construct a PV DT model.The Dempster-Shafer evidence theory is utilized to determine the weights of the mechanism model and the data-driven model and converge them.Meanwhile, the data-driven model is iteratively updated in real time using the sliding time window update method.The principle of the DS evidence theory is described next.
The Dempster-Shafer (DS) evidence theory is a data convergence method used to deal with uncertainty.It is based on a non-empty set of all possible outcomes for a given decision problem, known as the recognition framework [33].
The recognition framework is defined as a Θ finite set of M mutually exclusive and exhaustive proposition sets, denoted as follows [34,35]: On the basis of the recognition framework, the Power Set 2 Θ is defined as follows: (14)   where the symbol "∅" denotes the empty set, which belongs to any subset of the recognition framework.
The basic probability assignment (BPA) function represents the initial level of belief of an evidence body towards a proposition.It is defined as a mapping from the power set of the system's recognition framework to the interval [0, 1].The following conditions need to be satisfied: where m(H) indicates the basic support of the evidence H for the proposition.
The belief function Bel() and the plausibility function Pl() are the proposition description functions on the recognition framework and the BPA function, respectively.They are denoted as follows: where Bel(H) and Pl(H) represent the lower and upper bounds of probability, respectively.Therefore, H propositional uncertainty can be described by [Bel(H), Pl(H)].
The convergence condition for data using the DS evidence theory is that the evidence bodies from two different data sources are in the same recognition framework, so the convergence rule is defined as follows:

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 longterm 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.

Bi-Directional Long-Short Term Memory
Recently, RNNs and LSTM have been used in PV power prediction [19,21,22].Classi 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 gradien vanishing and exploding and improves the ability to preserve long sequences by addin gates within each cell state.These gates, namely the forget gate, input gate, and outpu gate, play crucial roles in filtering, preserving, and generating information, respectivel [36,37].The structure of LSTM is depicted in Figure 5.The input gate controls the influence of the current input on the memory cell.Its ex 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 f t at the time step t is as follows: where x t is the input sequence at the time step t, h t−1 is the previous hidden state or memory cell, σ(•) is the sigmoid activation function, W f is the weight matrix for the forget gate, and b f 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 W o represents the weight matrix of the output gate, b o represents the bias of the output gate, and o t 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.One limitation of an LSTM neural network is that it relies on the historical infor mation of the forward sequence.To address this limitation, the BiLSTM neural networ was introduced.It consists of two LSTM neural networks, one for processing the forwar sequence and the other for processing the backward sequence.By integrating informatio from both directions, the BiLSTM neural network can capture the intrinsic patterns of pas and future data, thus enhancing its predictive capability [38][39][40][41].In this paper, it is selecte as the PV power prediction algorithm.
In a BiLSTM network, the forward and backward sequences are first processed inde pendently in different hidden layers.The outputs of these hidden layers are then com bined and used as inputs to the output layer, thus improving the accuracy of the mode 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: th forward hidden state at the previous time step where LSTM() represents the operation of the traditional LSTM network, A refers t The hidden state at each layer of the BiLSTM network is composed of three parts: the forward hidden state at the previous time step A t−1 , the backward hidden state at the previous time step A i−1 , and the input at the current time step x t .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, A t refers to the forward hidden state, A i refers to the backward hidden state, a t represents the weight of the output from the hidden layer of the forward propagation unit, b t represents the weight of the output from the hidden layer of the backward propagation unit, and c t represents the bias optimization parameter of the hidden layer at current time step.

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 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.

Evaluation Metrics
Evaluation metrics for machine learning methods include mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), symmetric mean absolute percentage error (SMAPE), etc.This study adopts MAE, MAPE, and RMSE to evaluate the model performance.MAE is the average of absolute errors and is a basic indicator for error evaluation.MAPE can further 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.

Evaluation Metrics
Evaluation metrics for machine learning methods include mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), symmetric mean absolute percentage error (SMAPE), etc.This study adopts MAE, MAPE, and RMSE to evaluate the model performance.MAE is the average of absolute errors and is a basic indicator for error evaluation.MAPE can further investigate the ratio between errors and actual values.RMSE can accurately identify large or small errors in the predicted data.Their formulas are expressed as follows: where X real,i is the true value, X pred,i is the predicted value, and n is the data volume.

Experimental Data
Irradiance, temperature, and humidity are important meteorological parameters that affect PV power generation [36].In this study, a PV data collection and processing experimental platform was built, as shown in Figure 8, which contained several irradiance, temperature, and humidity sensors; an FPGA; and a PV simulator.Meteorological parameter data were first collected by sensors at intervals of 1 h from 7 a.m. to 5 p.m. every day in October 2022.They were then transferred to the FPGA via the UDP communication protocol, which was formed by programming the FPGA Verilog code.Finally, these data were imported into the PV simulator to calculate the PV power.Therefore, we constructed an experimental dataset consisting of meteorological parameters such as irradiance, temperature, and humidity and PV power.The dataset was divided into four data subsets: subset 1 was from 1 October 7 a.m. to 10 October 7 a.m. and was used to determine the initial BPA in the DS evidence theory; subset 2 and subset 3 were from 10 October 8 a.m. to 19 October 8 a.m.(before the data update) and 19 October 9 a.m. to 28 October 9 a.m.(after the data update) and were used to build and update the data-driven model in the DT model, respectively; subset 4 was from 29 October 7 a.m. to 31 October 5 p.m. and was used to validate the predictive effectiveness of the method.The meteorological parameters collected during October 2022 are shown in Figure 9, and the experimental data for 1 October 2022 are shown in Table 1 in detail.The meteorological parameters collected during October 2022 are shown in Figure 9, and the experimental data for 1 October 2022 are shown in Table 1 in detail.

Data Augmentation Effects of the PV DT Model
According to the DS evidence theory, the convergence of the mechanism model and the data-driven model must first determine the weights of these two models, and the model weights are calculated as the BPA.In this paper, the BPA is determined as the inverse ratio of the error between the output power calculated or derived from the PV mechanism model and data-driven model and the actual output power and the inverse ratio of the RMSE.The BPAs of the mechanism and data-driven models obtained from data subset 1 and data subset 2 are shown in Tables 2 and 3, respectively.Based on the BPAs listed in Tables 2 and 3, the weights of the mechanism and datadriven models before and after the data update were calculated, as shown in Table 4.According to the model weights listed in Table 4, the PV DT model was obtained by converging the mechanism and data-driven models based on the DS evidence theory.The comparisons of the output powers of the PV mechanism model, data-driven model, and DT model with the actual PV power before the data update and after the data update are illustrated in Figures 10 and 11  From Figures 10 and 11, it can be seen that compared with the actual PV output power, the error of the mechanism model was the largest, and the error of the data-driven model was smaller, but the power curve of the DT model was well fitted, with minimum error.Further analysis of the absolute error revealed that the errors of both the data-driven model and the DT model were further reduced after the data update compared to before the data update; in particular, the error of the DT model had a lowest average value of only 5.62 W, as shown in Figure 11b.Therefore, the DT model built in this study realized data augmentation with high fidelity.

PV Power Prediction Results
In this section, the established PV DT model combined with BiLSTM is used for PV power prediction, which is compared with the main PV power prediction models such as CNN, LSTM, gate recursive unit (GRU), and CNN-Attention.The effectiveness of the proposed method is evaluated and validated through the metrics RMSE, MAE, and MAPE.
The RMSEs of PV prediction models using the original experimental dataset and the augmented dataset of the DT model are shown in Tables 5 and 6, respectively;  From Figures 10 and 11, it can be seen that compared with the actual PV output power, the error of the mechanism model was the largest, and the error of the data-driven model was smaller, but the power curve of the DT model was well fitted, with minimum error.Further analysis of the absolute error revealed that the errors of both the data-driven model and the DT model were further reduced after the data update compared to before the data update; in particular, the error of the DT model had a lowest average value of only 5.62 W, as shown in Figure 11b.Therefore, the DT model built in this study realized data augmentation with high fidelity.

PV Power Prediction Results
In this section, the established PV DT model combined with BiLSTM is used for PV power prediction, which is compared with the main PV power prediction models such as CNN, LSTM, gate recursive unit (GRU), and CNN-Attention.The effectiveness of the proposed method is evaluated and validated through the metrics RMSE, MAE, and MAPE.
The RMSEs of PV prediction models using the original experimental dataset and the augmented dataset of the DT model are shown in Tables 5 and 6, respectively;  From Figures 10 and 11, it can be seen that compared with the actual PV output power, the error of the mechanism model was the largest, and the error of the data-driven model was smaller, but the power curve of the DT model was well fitted, with minimum error.Further analysis of the absolute error revealed that the errors of both the data-driven model and the DT model were further reduced after the data update compared to before the data update; in particular, the error of the DT model had a lowest average value of only 5.62 W, as shown in Figure 11b.Therefore, the DT model built in this study realized data augmentation with high fidelity.

PV Power Prediction Results
In this section, the established PV DT model combined with BiLSTM is used for PV power prediction, which is compared with the main PV power prediction models such as CNN, LSTM, gate recursive unit (GRU), and CNN-Attention.The effectiveness of the proposed method is evaluated and validated through the metrics RMSE, MAE, and MAPE.
The RMSEs of PV prediction models using the original experimental dataset and the augmented dataset of the DT model are shown in Tables 5 and 6, respectively; Table 6 contains the RMSEs before and after the data update of the DT model.For comparative analysis, the RMSEs of the prediction models in Tables 5 and 6 are summarized as shown in Figure 12, where "experimental" and "digital" represent the original experimental dataset and the augmented dataset of the DT model, respectively, and "before" and "after" represent the status before and after the data update of the DT model, respectively.analysis, the RMSEs of the prediction models in Tables 5 and 6 are summarized as shown in Figure 12, where "experimental" and "digital" represent the original experimental dataset and the augmented dataset of the DT model, respectively, and "before" and "after" represent the status before and after the data update of the DT model, respectively.As can be seen from Table 5, when the prediction models adopted the experimental dataset for sunny, rainy, and cloudy weather conditions, the RMSEs of the LSTM and CNN models were large, indicating that the predictions of these models deviated greatly from the true values and were poor, whereas the RMSEs of the GRU, CNN-Attention, and BiLSTM models were small and close, indicating that their predictions worked well.In addition, the RMSEs of these models were much larger under cloudy weather conditions than under sunny and rainy conditions, showing that it is difficult to accurately predict PV power in complex and changeable cloudy weather.It can be seen from Table 6 that when the prediction models adopted the augmented dataset, before the data update of the DT model, the RMSEs of the LSTM and CNN models were still large, and the RMSEs of the GRU, CNN-Attention, and BiLSTM models were small and relatively close.However, the RMSEs of all models decreased compared with the experimental dataset, with the RMSE of the BiLSTM model in particular decreasing significantly.After the data update of the DT model, most of the RMSEs of these models were further reduced, and the prediction effects of these models were significantly improved.In particular, compared with the dataset before the DT model update and the experimental dataset, the RMSE of the BiLSTM model decreased by 6 and 14.1 for sunny weather conditions, 6 and 17.3 for rainy weather conditions, and significantly decreased by 23.9 and 56.9 for cloudy weather conditions, respectively.The prediction effect of the BiLSTM model was thus significantly improved.Figure 6 further illustrates these results.As can be seen from Table 5, when the prediction models adopted the experimental dataset for sunny, rainy, and cloudy weather conditions, the RMSEs of the LSTM and CNN models were large, indicating that the predictions of these models deviated greatly from the true values and were poor, whereas the RMSEs of the GRU, CNN-Attention, and BiLSTM models were small and close, indicating that their predictions worked well.In addition, the RMSEs of these models were much larger under cloudy weather conditions than under sunny and rainy conditions, showing that it is difficult to accurately predict PV power in complex and changeable cloudy weather.It can be seen from Table 6 that when the prediction models adopted the augmented dataset, before the data update of the DT model, the RMSEs of the LSTM and CNN models were still large, and the RMSEs of the GRU, CNN-Attention, and BiLSTM models were small and relatively close.However, the RMSEs of all models decreased compared with the experimental dataset, with the RMSE of the BiLSTM model in particular decreasing significantly.After the data update of the DT model, most of the RMSEs of these models were further reduced, and the prediction effects of these models were significantly improved.In particular, compared with the dataset before the DT model update and the experimental dataset, the RMSE of the BiLSTM model decreased by 6 and 14.1 for sunny weather conditions, 6 and 17.3 for rainy weather conditions, and significantly decreased by 23.9 and 56.9 for cloudy weather conditions, respectively.The prediction effect of the BiLSTM model was thus significantly improved.Figure 6 further illustrates these results.
The MAEs and MAPEs of the prediction models are shown in Figures 13 and 14, respectively.Similar to the RMSE, both the MAE and MAPE values of the prediction models decreased significantly with the DT augmented dataset compared to the experimental dataset, and both decreased further after the data update of the DT model.Among these prediction models, the prediction effect of BiLSTM combined with the DT model (after the data update) was still the most prominent; the MAE and MAPE were very low under sunny and rainy weather conditions, and both were also greatly reduced under cloudy conditions.The MAEs and MAPEs of the prediction models are shown in Figures 13 and 14, respectively.Similar to the RMSE, both the MAE and MAPE values of the prediction models decreased significantly with the DT augmented dataset compared to the experimental dataset, and both decreased further after the data update of the DT model.Among these prediction models, the prediction effect of BiLSTM combined with the DT model (after the data update) was still the most prominent; the MAE and MAPE were very low under sunny and rainy weather conditions, and both were also greatly reduced under cloudy conditions.The above results and analyses show that the evaluation metrics of RMSE, MAE, and MAPE of the DT model combined with BiLSTM were all reduced to a very low level, and the PV prediction effect was significantly improved.The prediction results and prediction errors under sunny, rainy, and cloudy weather conditions were compared and analyzed to further verify the proposed method, as shown in Figures 15-17, respectively, where the comparison models CNN-Attention, GRU, LSTM, CNN, and BiLSTM used the experimental datasets.The MAEs and MAPEs of the prediction models are shown in Figures 13 and 14, respectively.Similar to the RMSE, both the MAE and MAPE values of the prediction models decreased significantly with the DT augmented dataset compared to the experimental dataset, and both decreased further after the data update of the DT model.Among these prediction models, the prediction effect of BiLSTM combined with the DT model (after the data update) was still the most prominent; the MAE and MAPE were very low under sunny and rainy weather conditions, and both were also greatly reduced under cloudy conditions.The above results and analyses show that the evaluation metrics of RMSE, MAE, and MAPE of the DT model combined with BiLSTM were all reduced to a very low level, and the PV prediction effect was significantly improved.The prediction results and prediction errors under sunny, rainy, and cloudy weather conditions were compared and analyzed to further verify the proposed method, as shown in Figures 15-17, respectively, where the comparison models CNN-Attention, GRU, LSTM, CNN, and BiLSTM used the experimental datasets.The above results and analyses show that the evaluation metrics of RMSE, MAE, and MAPE of the DT model combined with BiLSTM were all reduced to a very low level, and the PV prediction effect was significantly improved.The prediction results and prediction errors under sunny, rainy, and cloudy weather conditions were compared and analyzed to further verify the proposed method, as shown in Figures 15-17, respectively, where the comparison models CNN-Attention, GRU, LSTM, CNN, and BiLSTM used the experimental datasets.As we can see from Figures 15-17, the power curve of the DT model combined with BiLSTM fits well with the actual power generation under sunny, rainy, and cloudy weather conditions, and the prediction error is also the smallest, showing excellent prediction performance.Specifically, under sunny weather conditions, during the peak period of PV output (9-14 o'clock), the prediction error of GRU is the smallest, while that of DT-BiLSTM and CNN-Attention is slightly larger; during the trough periods of PV output (7-8 o'clock and 15-17 o'clock), the prediction error of DT-BiLSTM is much smaller than that of GRU and CNN-Attention and reaches a very low level.In summary, DT-BiLSTM has the best prediction effect under sunny weather conditions.Under rainy weather conditions, during the peak period of PV output (9-16 o'clock), DT-BiLSTM makes similar predictions as CNN-Attention with smaller prediction errors; during the trough periods of PV output (7-8 o'clock and 17 o'clock), the prediction error of DT-BiLSTM is significantly smaller than that of CNN-Attention.DT-BiLSTM also shows the best prediction under rainy weather conditions.Under cloudy weather conditions, the power fluctuation is very extreme.During the peak period of PV output (11-15 o'clock), the prediction error of DT-BiLSTM is the smallest, followed by CNN-Attention and GRU.In the trough periods of PV output (7-10 o'clock and 16-17 o'clock), the prediction error of DT-BiLSTM and GRU is the smallest, followed by CNN-Attention.In summary, DT-BiLSTM also achieves the best prediction effect under cloudy weather conditions.

Conclusions
This paper proposed a method for the short-term prediction of PV power based on a DT model combined with BiLSTM.The DT model was composed of a mechanism model and a data-driven model converged by DS evidence theory for augmenting the PV power dataset.The BiLSTM network model was used for short-term prediction of the PV power.The following conclusions can be drawn: (1) The PV DT model implements data augmentation, which has the advantages of strong followability, small error deviation, and strong interpretability compared to mechanism and data-driven models, and the fidelity of the data-driven model is further improved after the data update.(2) The PV DT model combined with BiLSTM achieves an accurate prediction of the PV power.Compared with several main PV prediction models, our method had the lowest values for the evaluation indexes of RMSE, MAE, and MAPE under sunny, rainy, and cloudy weather conditions, and the prediction results fit well with the actual values, with a small absolute error value, which was especially obvious under cloudy weather.
In conclusion, the proposed DT model combined with BiLSTM shows excellent prediction accuracy under different weather conditions and can be used for the short-term prediction of ship PV power generation, providing a reference basis for energy management and scheduling of ship power systems and guaranteeing the stable and reliable operation of solar ships.In the future, datasets from different regions and ship routes will be collected to verify the generalizability of the proposed method.PV DT modeling techniques will be further studied in depth.Refined modeling will be carried out on the basis of a single-diode mechanism model with high universality in order to better simulate the actual operation of PV, and the data-driven model will adopt new types of networks with superior performance to improve the fidelity of the PV DT model and the accuracy of PV power prediction.

Figure 1 .
Figure 1.Block diagram of the research idea.

Figure 1 .
Figure 1.Block diagram of the research idea.

N
is the number of PV cells connected in series; and T is the temperature of the PV cell.

Figure 2 .
Figure 2. Equivalent circuit of a PV cell.
; T denotes the temperature of the PV cell; ref T represents the reference temperature; 1 S and ref S represent the actual irradiance and the reference irradiance, respectively.

Figure 2 .
Figure 2. Equivalent circuit of a PV cell.

1 M to 2 M
using a sliding time window is illustrated in Figure4.Let us assume that the size of the training data samples is L , and the length of the sliding time window is n .When the number of newly added data samples reaches n , the replacement strategy is executed to form the new training data, and then, the PV data-driven model is retrained to update the model.

Figure 4 .
Figure 4. Sliding time window update method.

1 M to 2 M
using a sliding time window is illustrated in Figure4.Let us assume that the size of the training data samples is L , and the length of the sliding time window is n .When the number of newly added data samples reaches n , the replacement strategy is executed to form the new training data, and then, the PV data-driven model is retrained to update the model.

Figure 4 .
Figure 4. Sliding time window update method.

Figure 4 .
Figure 4. Sliding time window update method.
1 tA − , the backward hidden state at th previous time step1 iA − , and the input at the current time step tx .The combination pro cess of the hidden states at each layer can be represented as follows:

Figure 7 .
Figure 7. Flowchart of short-term PV power prediction based on the DT model.

Figure 7 .
Figure 7. Flowchart of short-term PV power prediction based on the DT model.

Figure 10 .Figure 11 .
Figure 10.Comparison of the output power of the DT model, mechanism model, and data-driven model with actual PV power before the data update.(a) Power.(b) Absolute error.

Figure 10 .Figure 10 .Figure 11 .
Figure 10.Comparison of the output power of the DT model, mechanism model, and data-driven model with actual PV power before the data update.(a) Power.(b) Absolute error.

Figure 11 .
Figure 11.Comparison of the output power of the DT model, mechanism model, and data-driven model with actual PV power after the data update.(a) Power.(b) Absolute error.

Figure 15 .Figure 16 .Figure 17 .
Figure 15.Comparison of the predicted and actual PV power under sunny conditions.(a) Predicted output power.(b) Absolute error.
) where C t represents the candidate value for the cell state, C t represents the new cell state, tanh(•) is the hyperbolic tangent function, W i represents the weight matrix of the input gate, W c represents the weight matrix of the cell state, b i represents the bias of the input gate, b c represents the bias of the cell state, and i t represents the state of the input gate.The output gate controls the output state of the memory cell.Its expression is as follows:

Table 2 .
BPAs of the mechanism and data-driven models obtained from data subset 1.

Table 3 .
BPAs of the mechanism and data-driven models obtained from data subset 2.

Table 4 .
Weights of the mechanism and data-driven models before and after the data update.

Table 6
contains the RMSEs before and after the data update of the DT model.For comparative

Table 6
contains the RMSEs before and after the data update of the DT model.For comparative

Table 5 .
RMSEs of different models with the experimental dataset (Unit: W).

Table 6 .
RMSEs of different models with the augmented dataset of the DT model (Unit: W).

Table 5 .
RMSEs of different models with the experimental dataset (Unit: W).

Table 6 .
RMSEs of different models with the augmented dataset of the DT model (Unit: W).