A Combined Wind Forecasting Model Based on SSA and WNN: Application on Real Case of Ningbo Zhoushan Port

: Wind energy is an effective way to reduce emissions in ports. However, port wind power generation exhibits strong intermittency and randomness. Predicting port wind speed enables timely scheduling of port operations and improves wind energy utilization efﬁciency. To achieve high accuracy and rapid prediction of port wind speed, this paper proposes a wind speed prediction model based on the Sparrow Search Algorithm (SSA) optimized Wavelet Neural Network (WNN). Firstly, the SSA is used to optimize the Mean Squared Error (MSE) as the ﬁtness function during the training process of the WNN model, obtaining the optimal ﬁtness value corresponding to the network parameters. Then, the obtained parameters are used as the network model parameters of WNN for wind speed prediction. To validate the effectiveness of the proposed method, the model is validated using the measured wind speed data from the Chuanshan Port Area of Ningbo-Zhoushan Port throughout 2022, and its performance is compared with three other models: SSA–BP, SSA–LSTM, and WNN. The results demonstrate that the proposed prediction model exhibits good performance in port wind speed prediction and outperforms the other comparative models in terms of prediction accuracy and convergence speed.


Introduction
Ports are critical nodes connecting land and water transportation.With the annual growth of port cargo throughput, the total emissions of greenhouse gases and atmospheric pollutants from ships and port operating equipment have increased rapidly [1].Although various emission reduction measures, including shore power, sea-rail intermodal transportation, and conversion of shore cranes to electricity, have been implemented, these measures fundamentally rely on fossil energy as the ultimate source of energy, leading to carbon emissions [2].Clean energy sources such as wind and solar power, which do not rely on fossil energy, can eliminate port carbon emissions fundamentally [3], making them an effective approach for ports to achieve carbon peak and carbon neutrality goals.Among them, wind power generation in ports has seasonal and periodic patterns [4] and ports have abundant wind energy resources.Therefore, port wind energy has gained increasing attention.For example, Gutierrez-Romero proposed the use of onshore and offshore wind turbines as well as solar energy to provide shore power for ships at Cartagena Port, emphasizing that wind resources deserve special attention despite the significant role of solar energy [5].
However, port wind energy exhibits strong randomness and intermittency [6].Furthermore, port operations themselves are highly stochastic, making the application of wind energy in ports more challenging [7].On the one hand, the intermittency of wind power generation can affect the safe and stable operation of the power system.On the other hand, the randomness of wind energy may result in underutilization of wind power, reducing its practical efficiency.Therefore, accurate wind speed prediction can improve the safety and economic efficiency of port power grids, as well as reduce port carbon emissions more effectively.De Paula et al. used a combination of artificial neural networks and statistical methods to predict wind speeds at Porto do Açu, with an average MAE of 1.834 for a time resolution of 30 days [8].Tascikaraoglu et al. used the WT-CST-WSF combination model to predict wind speeds at meteorological stations and airports in four states in the United States, with MAE and RMSE of 1.3186 and 1.7674, respectively, for a time resolution of 6 h [9].Zhen et al. used a wind speed forecasting model based on time-scale recognition and dynamic adaptive modeling to predict wind speeds in the Mojave Desert Rocks of Nevada, achieving RMSE and MAE of 0.8195 and 0.6340, respectively, for a time resolution of 15 min [10].Port operations are highly stochastic, and berth and operation plans are usually determined one day in advance.Therefore, predicting wind energy in port operating environments can provide more accurate and timely wind energy forecasts to support port scheduling decisions.
Wind speed prediction methods generally use machine learning or statistical approaches [11], without the need to establish physical models related to the actual environment, such as terrain, surface roughness, and meteorological conditions [12].Statistical methods typically establish mapping relationships between data by learning the patterns of historical wind speed data, including Kalman filtering [13,14], exponential smoothing [15], and AutoRegressive Integrated Moving Average (ARIMA) models [16,17].However, for data with large fluctuations and strong nonlinearity, especially port wind speed data, traditional statistical methods are greatly affected by external environmental factors, resulting in low prediction accuracy and limited predictive capability.Machine learning methods can continuously identify the features and patterns of data through learning wind speed data, thus enabling wind speed prediction.Deep learning has evolved from basic neural networks to intelligent algorithms, continuously improving prediction accuracy.Early wind speed prediction methods commonly used Support Vector Regression (SVR) [18], Random Forests [19], Long Short-Term Memory (LSTM) [20,21], and Backpropagation (BP) neural networks [22,23].However, these methods have limited prediction accuracy and are suitable for smaller datasets.Therefore, some improvements have been made based on neural networks, such as Aly's use of the Wavelet Neural Network (WNN) combination model to predict wind speeds in Halifax/Nova Scotia [24].These neural network models can better adapt to nonlinear systems.
However, in practical applications, the prediction results of neural networks generally depend on the weights, thresholds, and other parameters between the layers of the network model.The traditional method of parameter selection through trial and error is often inefficient and it is difficult to find the optimal parameters.Therefore, it is crucial to quickly obtain the optimal parameters of the network for accurate and rapid wind energy prediction.
Common parameter optimization methods during the prediction process include Dragonfly Algorithm (DA) [25], Whale Optimization Algorithm (WOA) [26], Particle Swarm Optimization (PSO) [27], and Sparrow Search Algorithm (SSA) [28].Swarm intelligence optimization algorithms have the advantage of avoiding getting trapped in local optima and achieving global optimization.However, parameter selection still relies heavily on experience.Among them, SSA has the ability to global search and enriches the population diversity to a greater extent, reducing the likelihood of the algorithm getting trapped in local optima.Therefore, this paper adopts SSA to optimize WNN and focuses on predicting wind energy in the Chuanshan Port Area of Ningbo-Zhoushan Port.
The innovations and contributions of this study are, firstly, the combination of SSA optimization algorithm and WNN neural network for wind speed prediction; secondly, we apply the methods to predicting wind speed in a port, taking Ningbo Zhoushan Port as a case study, which has not been considered by precious works.The model is also trained and tested by a real dataset with high authenticity and reliability, measured by actual LiDAR in the port area.
The structure of this paper is as follows: Section 2 introduces the algorithm principles of wind speed prediction methods, the steps of the optimization algorithm, and the calculation process of SSA-WNN.Section 3 presents the research object, the Chuanshan Port Area, and analyzes the measured wind speed data throughout 2022.Section 4 analyzes the prediction results and compares the recommended method with three other methods to validate its effectiveness and superiority.Finally, Section 5 concludes the paper.

Wavelet Neural Network
The Wavelet Neural Network (WNN) is a network that has evolved from the error backpropagation neural network topology.It exhibits similarities to traditional neural network structures but possesses faster convergence speed, avoids local optima, and provides timefrequency local analysis characteristics [29].WNN can be implemented in two ways.The first approach involves performing wavelet analysis on the signal to obtain high-frequency and low-frequency signals at each layer, which are then loosely coupled with the neural network.The second approach replaces the traditional neural network activation function with a wavelet function, establishing a compact coupling between wavelet transformation and network coefficients.Due to its time-frequency analysis and self-learning properties, this study employs the compact coupling WNN for research purposes.
In WNN, during the forward propagation of the entire signal, the error is propagated in the opposite direction.The transfer function of the hidden layer nodes is represented by wavelet basis functions, and the weights and thresholds between the input layer and the hidden layer are replaced by the scale expansion factor and time shift factor of the wavelet basis functions, respectively.The topology structure of WNN is illustrated in Figure 1.
The innovations and contributions of this study are, firstly, the combination of SSA optimization algorithm and WNN neural network for wind speed prediction; secondly, we apply the methods to predicting wind speed in a port, taking Ningbo Zhoushan Port as a case study, which has not been considered by precious works.The model is also trained and tested by a real dataset with high authenticity and reliability, measured by actual LiDAR in the port area.
The structure of this paper is as follows: Section 2 introduces the algorithm principles of wind speed prediction methods, the steps of the optimization algorithm, and the calculation process of SSA-WNN.Section 3 presents the research object, the Chuanshan Port Area, and analyzes the measured wind speed data throughout 2022.Section 4 analyzes the prediction results and compares the recommended method with three other methods to validate its effectiveness and superiority.Finally, Section 5 concludes the paper.

Wavelet Neural Network
The Wavelet Neural Network (WNN) is a network that has evolved from the error back-propagation neural network topology.It exhibits similarities to traditional neural network structures but possesses faster convergence speed, avoids local optima, and provides time-frequency local analysis characteristics [29].WNN can be implemented in two ways.The first approach involves performing wavelet analysis on the signal to obtain high-frequency and low-frequency signals at each layer, which are then loosely coupled with the neural network.The second approach replaces the traditional neural network activation function with a wavelet function, establishing a compact coupling between wavelet transformation and network coefficients.Due to its time-frequency analysis and self-learning properties, this study employs the compact coupling WNN for research purposes.
In WNN, during the forward propagation of the entire signal, the error is propagated in the opposite direction.The transfer function of the hidden layer nodes is represented by wavelet basis functions, and the weights and thresholds between the input layer and the hidden layer are replaced by the scale expansion factor and time shift factor of the wavelet basis functions, respectively.The topology structure of WNN is illustrated in   The network consists of an input layer, a hidden layer, and an output layer.The input to the neural network is denoted as sequence X = (x1, x2, . .., xm), and the output is denoted as Y = (y1, y2, . .., yn), where m and n represent the number of input and output parameters, respectively.ωij and ωjk denote the connection weights between the layers of the neural network.h(x) represents the wavelet basis function, and in this study the Morlet wavelet function is used, which is expressed as: After the input vector X is processed according to Equation (1), the output values at the hidden layer are obtained as follows: where z represents the output values of the hidden layer nodes,•a and b are the scale expansion factor and time shift factor of the wavelet basis function, respectively, m is the number of input layer nodes, and l is the number of hidden layer nodes.The output values from the hidden layer continue to propagate forward through the WNN output layer, resulting in the following output: where y k represents the actual output values of the WNN, and n is the number of nodes in the output layer.
The Mean Squared Error (MSE) is used as the loss function for WNN, which is calculated as: where MSE represents the loss function, and ŷk represents the true values.

Sparrow Search Algorithm
The Sparrow Search Algorithm (SSA) is a swarm intelligence optimization algorithm inspired by the foraging behavior and regurgitation feeding behavior of sparrows.It exhibits strong global optimization capabilities, as well as good parallelism and fast convergence speed.
To obtain food, a population of sparrows is divided into explorers and followers.When there is no external interference, individual sparrows monitor each other, and explorers expand their foraging range to obtain food, while followers compete for food resources from companions with larger food resources to increase their predation rate.Explorers have higher energy reserves compared to followers, and the roles of individuals can be switched to maintain the proportion within the population.In the event of an attack by a predator that threatens the safety of the group, explorers guide followers to safe areas for foraging.Sparrows located at the edges of the population quickly move towards safer areas to obtain better positions, while sparrows in the middle of the population move randomly.Throughout the foraging process, individuals with higher energy reserves are given priority in acquiring food resources.
(1) During each iteration process, the position update for explorers is as follows: where X i,j represents the position of the i th sparrow in the j th dimension, t represents the iteration count, iter max is the maximum number of iterations, α (0, 1) and R 2 (0, 1) are random numbers, ST is set to 0.8, where R 2 represents a warning signal, ST represents a safety value, Q is a random number following a normal distribution, and L is a ddimensional row vector of ones.
(2) During each iteration process, the position update for followers is as follows: In Equation ( 6), X p represents the position of the best explorer, X worst represents the position of the worst individual in the current population, n represents the population size of the sparrows, A represents a d-dimensional row vector with elements randomly set to −1 or 1, and A + = A T AA T −1 .Additionally, i > n/2 represents the energy reserve of the i th follower with a relatively low fitness value, indicating the need to search for food in other safe areas.
(3) Assuming that 20% of the sparrow population is aware of predator attacks, the initial positions of these individuals are randomly generated within the population according to the following equation: where X best represents the current best position in the population, β is a step size control parameter with a mean of 0 and a variance of 1, representing a d-dimensional random row vector following a normal distribution.K [−1, 1] is a random number, and ε is a constant with a value of 10 −50 .f i represents the fitness value of the current individual, and f g and f w represent the current best and worst fitness values in the population.

SSA-WNN Neural Network
Based on the characteristics of WNN error backpropagation, continuously adjusting the weights and thresholds in the neural network can improve the accuracy of the WNN model.Therefore, this study adopts SSA to optimize the parameters of WNN and address the issues of slow convergence speed and susceptibility to local optima.The specific steps of the SSA-WNN neural network computation process are as follows: (1) Data preprocessing: Normalize the original wind speed data to the range −1, 1 .This normalization confines the preprocessed data within a certain range, avoiding convergence issues caused by outlier data.The normalization is performed using the following equation: where X i represents the normalized sample value, X i represents the sample value before normalization, max(x) represents the maximum value in the sample data, and min(x) represents the minimum value in the sample data.
(2) Initialize WNN by determining the number of nodes in the input layer, hidden layer, and output layer.
(3) Initialize SSA parameters: Determine the dimension of SSA, maximum iteration count (iter max ), population size (pop), the proportion of explorers within the population (20%), and the safety value (0.8).
(4) Define the fitness function and calculate the fitness values of individuals.In this case, the Mean Squared Error (MSE) is defined as the fitness function, where smaller values indicate lower errors.The function's minimum point corresponds to the point of minimum error, which determines the position of the current global optimal solution.
(5) SSA Iterative Update.The individuals in good fitness positions are considered explorers, allowing them to have priority access to food and provide foraging directions for followers.The position of explorers is updated using Equation ( 5), while the positions of followers are updated after foraging using Equation (6).Additionally, the last 20% of the population consists of sparrows that are aware of predator attacks.Their positions are randomly generated, and their updates depend on Equation (7), which considers the current individual's fitness value and the global best fitness value.
(6) After updating the positions, the fitness values of the individuals are compared with the current best fitness value.If the maximum iteration limit is reached, the algorithm selects the optimal solution; otherwise, the iteration process continues.(7) The optimal solution obtained through SSA optimization represents the weights, biases, and thresholds of the WNN.The neural network is trained using these values, and the analysis continues until the desired accuracy is achieved.The predicted values are then outputted.
The flowchart of the SSA-WNN algorithm is shown in Figure 2. the population consists of sparrows that are aware of predator attacks.Their positions are randomly generated, and their updates depend on Equation (7), which considers the current individual's fitness value and the global best fitness value.( 6) After updating the positions, the fitness values of the individuals are compared with the current best fitness value.If the maximum iteration limit is reached, the algorithm selects the optimal solution; otherwise, the iteration process continues.(7) The optimal solution obtained through SSA optimization represents the weights, biases, and thresholds of the WNN.The neural network is trained using these values, and the analysis continues until the desired accuracy is achieved.The predicted values are then outputted.
The flowchart of the SSA-WNN algorithm is shown in Figure 2.

Study Area and Wind Speed Data
In this study, the Ningbo Zhoushan Port Chuan Shan Port Area is chosen as the research area.This port area is the second-largest single-container port in the world.Since 2017, it has handled over 10 million TEUs (20-feet equivalent units) of containers annually, resulting in approximately 1.2 million tons of CO2 emissions from container handling

Study Area and Wind Speed Data
In this study, the Ningbo Zhoushan Port Chuan Shan Port Area is chosen as the research area.This port area is the second-largest single-container port in the world.Since 2017, it has handled over 10 million TEUs (20-feet equivalent units) of containers annually, resulting in approximately 1.2 million tons of CO 2 emissions from container handling equipment [30].The port area plans to install two 6.25 MW wind turbines to provide electricity for the container handling equipment [31].
A laser radar station was established in the field in 2021, with coordinates at 29 • 53 9.69 N, 122 • 1 41.48 E. The geographical locations of the port area and the wind farm laser radar are shown in Figure 3. equipment [30].The port area plans to install two 6.25 MW wind turbines to provide electricity for the container handling equipment [31].
A laser radar station was established in the field in 2021, with coordinates at 29°53′9.69″N, 122°1′41.48″E. The geographical locations of the port area and the wind farm laser radar are shown in Figure 3.In Figure 4a, the plot shows the daily wind speed data at a 10-min interval for the entire year of 2022, with a total of 52,560 data points.Figure 4b illustrates the distribution of wind speeds throughout the year.It can be observed that the wind speeds in the Chuan Shan Port Area exhibit strong nonlinearity and fluctuation.The wind speeds are concentrated between 3 m/s and 6 m/s, with an average wind speed of 5.1 m/s.The maximum recorded wind speed is 31.6 m/s, and there are a few outliers with wind speeds exceeding 20 m/s.These outlier data points pose a challenge for direct prediction using the original dataset, as they can significantly affect the accuracy of the predictions.To address this issue, 720 data points from 5 days with unusually high wind speeds caused by factors such as typhoons are excluded to ensure that the dataset maintains consistent importance and distribution.
where  ‾ is the sample mean and n is the number of samples.
where  is the sample standard deviation and  is some sample.The laser radar measures wind speeds at heights ranging from 30 m to 140 m with a sampling period of 10 min.The hub height of the planned wind turbines in the port area is 125 m.Therefore, this study focuses on analyzing wind speeds at 125 m.The wind speed data for the entire year of 2022 is shown in the following figures.
In Figure 4a, the plot shows the daily wind speed data at a 10-min interval for the entire year of 2022, with a total of 52,560 data points.Figure 4b illustrates the distribution of wind speeds throughout the year.It can be observed that the wind speeds in the Chuan Shan Port Area exhibit strong nonlinearity and fluctuation.The wind speeds are concentrated between 3 m/s and 6 m/s, with an average wind speed of 5.1 m/s.The maximum recorded wind speed is 31.6 m/s, and there are a few outliers with wind speeds exceeding 20 m/s.These outlier data points pose a challenge for direct prediction using the original dataset, as they can significantly affect the accuracy of the predictions.To address this issue, 720 data points from 5 days with unusually high wind speeds caused by factors such as typhoons are excluded to ensure that the dataset maintains consistent importance and distribution.
where X is the sample mean and n is the number of samples.
where S is the sample standard deviation and X i is some sample.The results are presented in Table 1.The results are presented in Table 1.Based on the daily wind speed data from January to December 2022, the monthly wind speed distribution at the height of 125 m is shown in the rose diagram in Figure 5. Based on the daily wind speed data from January to December 2022, the monthly wind speed distribution at the height of 125 m is shown in the rose diagram in Figure 5. From the diagram, it can be observed that the wind speeds for most months are mainly distributed between 0 m/s and 10 m/s.Months such as February, March, April, June, September, November, and December exhibit more diverse colors, indicating greater variability in wind speed.On the other hand, months such as January, May, July, August, and October show more concentrated colors, indicating relatively stable wind speeds.Regarding wind direction, March, April, June, July, August, October, and December show more consistent wind directions.Specifically, March, April, June, July, and August exhibit SSE (south-southeast) wind directions, October exhibits N (north), and December exhibits NNW (north-northwest).The rose diagram clearly illustrates the wind From the diagram, it can be observed that the wind speeds for most months are mainly distributed between 0 m/s and 10 m/s.Months such as February, March, April, June, September, November, and December exhibit more diverse colors, indicating greater variability in wind speed.On the other hand, months such as January, May, July, August, and October show more concentrated colors, indicating relatively stable wind speeds.Regarding wind direction, March, April, June, July, August, October, and December show more consistent wind directions.Specifically, March, April, June, July, and August exhibit SSE (south-southeast) wind directions, October exhibits N (north), and December exhibits NNW (north-northwest).The rose diagram clearly illustrates the wind speed distribution characteristics for each month, reflecting the seasonal variations in wind speed.
The processed dataset, consisting of 51,840 data points, is divided into a 4320 × 12 matrix as the dataset.The dataset is split into a training set (80%) and a testing set (20%) using an 8:2 ratio.To prevent overfitting during training, a 6-fold cross-validation is performed to determine the network model structure and hyperparameters.The SSA-WNN model has 10 input nodes, eight hidden nodes, and two output nodes.The first 10 columns (January to October) are used as the training set, while the last two columns (November and December) are used as the testing set.

Result Analysis 4.1. Prediction Results
The SSA-WNN algorithm is used to predict wind energy in the Chuan Shan Port Area.The results obtained are shown in Figure 6.The plot uses the wind speeds on 1 November and 1 December as coordinates.The red circles represent the actual wind speed values, while the blue circles represent the predicted values.The lines connecting the actual and predicted values represent the errors, with longer lines indicating larger errors.From the figure, it can be seen that the wind speeds on 1 November are concentrated between 7 m/s and 9 m/s, while the wind speeds on 1 December are concentrated between 9 m/s and 10.5 m/s.The prediction errors are generally below 0.5 m/s.Taking the leftmost group of data points in the scatter plot as an example, the red circle and blue circle representing the actual and predicted wind speeds are very close, and the line connecting them is short.The coordinates for the red circle are (2.609,9.202), and for the blue circle are (2.433,9.213), indicating that the predicted wind speed values for this group of data points on 1 November and 1 December are 2.433 m/s and 2.609 m/s, respectively.The results show a good agreement between the predicted values and the actual values for this group of data points.
speed distribution characteristics for each month, reflecting the seasonal variations in wind speed.
The processed dataset, consisting of 51,840 data points, is divided into a 4320 × 12 matrix as the dataset.The dataset is split into a training set (80%) and a testing set (20%) using an 8:2 ratio.To prevent overfitting during training, a 6-fold cross-validation is performed to determine the network model structure and hyperparameters.The SSA-WNN model has 10 input nodes, eight hidden nodes, and two output nodes.The first 10 columns (January to October) are used as the training set, while the last two columns (November and December) are used as the testing set.

Prediction Results
The SSA-WNN algorithm is used to predict wind energy in the Chuan Shan Port Area.The results obtained are shown in Figure 6.The plot uses the wind speeds on 1 November and 1 December as coordinates.The red circles represent the actual wind speed values, while the blue circles represent the predicted values.The lines connecting the actual and predicted values represent the errors, with longer lines indicating larger errors.
From the figure, it can be seen that the wind speeds on 1 November are concentrated between 7 m/s and 9 m/s, while the wind speeds on 1 December are concentrated between 9 m/s and 10.5 m/s.The prediction errors are generally below 0.5 m/s.Taking the leftmost group of data points in the scatter plot as an example, the red circle and blue circle representing the actual and predicted wind speeds are very close, and the line connecting them is short.The coordinates for the red circle are (2.609,9.202), and for the blue circle are (2.433,9.213), indicating that the predicted wind speed values for this group of data points on 1 November and 1 December are 2.433 m/s and 2.609 m/s, respectively.The results show a good agreement between the predicted values and the actual values for this group of data points.To further analyze the prediction results, three evaluation metrics are used: Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE).The formulas for calculating these metrics are provided in Equations ( 11)-( 13), respectively: where n is the number of samples, y k is the current sample's predicted value, and ŷk is the current sample's actual value.The evaluation metrics are analyzed for the entire testing dataset, with RMSE, MAE, and MAPE values of 0.5236 m/s, 0.2486 m/s, and 3.229%, respectively.

Comparative Analysis
To validate the superiority of the proposed algorithm, a comparison is made with three other neural network models: SSA-LSTM, SSA-BP, and WNN.For the SSA-LSTM algorithm, the first 41,472 data points are used as the training set, and the remaining 10,368 data points are used as the testing set.The training data sequence length is set to 10, and a one-step ahead prediction is performed.The optimization algorithm used is Adam, and the optimized parameters are the number of LSTM hidden nodes, the number of training iterations, and the learning rate.For the SSA-BP and WNN algorithms, the number of input nodes, hidden nodes, and output nodes is set to 10, 8, and 2, respectively.The first 10 columns (January to October) are used as the training set, while the last two columns (November and December) are used as the testing set.The learning rate and convergence error for SSA-BP are set to 0.05 and 0.1, respectively.The convergence curves for the four models, depicting the root mean square error (RMSE) as a function of the number of iterations, are shown in Figure 7.To further analyze the prediction results, three evaluation metrics are used: Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE).The formulas for calculating these metrics are provided in Equations ( 11)- (13), respectively: where n is the number of samples,  is the current sample's predicted value, and  is the current sample's actual value.The evaluation metrics are analyzed for the entire testing dataset, with RMSE, MAE, and MAPE values of 0.5236 m/s, 0.2486 m/s, and 3.229%, respectively.

Comparative Analysis
To validate the superiority of the proposed algorithm, a comparison is made with three other neural network models: SSA-LSTM, SSA-BP, and WNN.For the SSA-LSTM algorithm, the first 41,472 data points are used as the training set, and the remaining 10,368 data points are used as the testing set.The training data sequence length is set to 10, and a one-step ahead prediction is performed.The optimization algorithm used is Adam, and the optimized parameters are the number of LSTM hidden nodes, the number of training iterations, and the learning rate.For the SSA-BP and WNN algorithms, the number of input nodes, hidden nodes, and output nodes is set to 10, 8, and 2, respectively.The first 10 columns (January to October) are used as the training set, while the last two columns (November and December) are used as the testing set.The learning rate and convergence error for SSA-BP are set to 0.05 and 0.1, respectively.The convergence curves for the four models, depicting the root mean square error (RMSE) as a function of the number of iterations, are shown in Figure 7. From the figure, it can be observed that the SSA-WNN, SSA-LSTM, and SSA-BP algorithms converge quickly, with convergence iterations of 15, 18, and 37, respectively.
The WNN model without optimization has the slowest convergence, requiring 62 iterations.Furthermore, at the point of convergence for each algorithm, the RMSE values are in the order of SSA-WNN < SSA-LSTM < SSA-BP < WNN.This indicates that the SSA-WNN algorithm achieves the fastest convergence and the highest prediction accuracy among the four algorithms.
Due to the large number of data points and their concentration in the testing set, it is difficult to observe them clearly.Therefore, in the figure, the wind speeds on 1 November and 1 December from the testing set were selected for comparison.The wind speed predictions obtained using SSA-WNN, SSA-LSTM, SSA-BP, and WNN models were compared with the actual wind speed values, as shown in Figure 8.
From the figure, it can be observed that the SSA-WNN, SSA-LSTM, and SSA-BP algorithms converge quickly, with convergence iterations of 15, 18, and 37, respectively.The WNN model without optimization has the slowest convergence, requiring 62 iterations.Furthermore, at the point of convergence for each algorithm, the RMSE values are in the order of SSA-WNN < SSA-LSTM < SSA-BP < WNN.This indicates that the SSA-WNN algorithm achieves the fastest convergence and the highest prediction accuracy among the four algorithms.
Due to the large number of data points and their concentration in the testing set, it is difficult to observe them clearly.Therefore, in the figure, the wind speeds on 1 November and 1 December from the testing set were selected for comparison.The wind speed predictions obtained using SSA-WNN, SSA-LSTM, SSA-BP, and WNN models were compared with the actual wind speed values, as shown in Figure 8.The x-axis in the above figures represents time, ranging from 00:00:00 to 23:50:00 with 10-min intervals, while the y-axis represents wind speed values.It can be observed that, for the wind speeds on 1 November and 1 December in the testing set, the model trained using the SSA-WNN algorithm shows closer agreement between the predicted and actual values compared to the models using SSA-LSTM, SSA-BP, and WNN algorithms.This indicates a better prediction performance of the SSA-WNN model, effectively capturing the future variations and accurately understanding the changing patterns of wind speeds in the port area.In Figure 8b it is more evident that the unoptimized WNN model exhibits larger errors between the predicted and actual values, highlighting the significant improvement in prediction accuracy achieved by the SSA optimization algorithm for neural networks.
Statistical information for the November and December data is provided in Tables 2 and 3 below.Table 4 provides a comparison of evaluation metrics for the four models using the testing set (November and December wind speeds).The SSA-WNN model achieves the lowest RMSE, MAE, and MAPE values compared to the other models.Particularly, compared to the unoptimized WNN model, the SSA-WNN model shows an improvement of 1.0993 m/s, 0.3962 m/s, and 5.329% in terms of RMSE, MAE, and MAPE respectively.This highlights the significance of SSA optimization for enhancing the performance of the WNN model.In the comparative analysis, the SSA-WNN algorithm outperforms the other algorithms in terms of prediction accuracy and convergence speed, demonstrating its superiority for wind speed prediction in the port area.

Discussion
Errors have a significant influence on the predicted wind output, which is of great importance to the energy usage schedule in port operation.To figure out the influence of different errors, wind power generation errors resulting from wind speed errors of 0.5 m/s, 1 m/s and 1.5 m/s are calculated respectively, according to the following equations: where P denotes power in W, A is the swept area, i.e., A = 1 2 π * R 2 (π = 3.14159, R is the radius of the wind blade and is taken as 95 m), V is the wind speed, Cp is a kind of wind energy conversion rate value which is 30% here, D is the density of the air (with the increase in elevation and the decrease, the value of D is 1.21 Kg/m 3 in the present study), η is the coefficient, and η value is taken as 1.W denotes power generation in W•s, and t denotes time in s.
From Equations ( 14) and ( 15), when the wind speed error is 0.5 m/s, 1 m/s, 1.5 m/s, with single wind turbine running for 10 min, the theoretical values of power generation error are 192,977 W•s, 1,543,814 W•s, 5,210,372 W•s, respectively.It can be seen that the difference between the results are significant, due to the cubic relationship between wind speed and wind power.A large error in wind generation prediction can lead to dispatch between wind generation and usage, resulting economic loss.
Besides, the grid connected wind power generation system is applied in the ports with different cargo handling equipment.With different equipment, transient disturbances, harmonic distortion and other problems will occur, thus, accurate prediction of the wind speed can be better combined with the control strategy of the system to reduce the problems that may occur in the system, so as to improve its power quality.
In the present study, to improve the accuracy of wind speed prediction, the SSA-WNN model was employed for port wind forecasting, and RMSE, MAE, and MAPE were adopted as evaluation metrics.In the previous research works of Pan et al., 2022, a prediction model based on spatio-temporal graph transformer network (STGTN) was proposed for shortterm wind speed prediction of Danish offshore wind farms [32].The wind speed data contains 14,400 data points from 111 wind turbine nodes.The prediction results of the STGTN model on May 20 have MAE, RMSE, and MAPE of 0.3508 m/s, 0.4486 m/s, and 7.9280%, respectively, which is comparable to the prediction result of the STGTN model in the present study.Comparing with SSA-WNN, RMSE is closer, but the values of MAE and MAPE are larger than SSA-WNN, so the SSA-WNN algorithm performs better.Zhen et al. introduced an ultra-short-term wind speed prediction model based on time scale identification and dynamic adaptive modeling [10].The RMSE, MAE, and MAPE are 0.8195 m/s, 0.6340 m/s, and 6.32%, respectively, for predicting 15-min wind speeds, which is worse than the SSA-WNN model in the present study.An RWT-ARIMA model was proposed to predict wind speed using data measured at the meteorological station in Malin Head, County Donegal, Republic of Ireland, on a 10-min time scale [17].The evaluation metrics of MAE, RMSE, and MAPE are 0.2268 m/s, 0.3204 m/s, and 2.94%, respectively, which are smaller than those of the SSA-WNN model.However, the model was applied to a small scale dataset and is hard to be applied in real cases, such as in ports.The proposed method in the present study are suitable for the application in real cases and have a better performance compared with other research studies.

Findings
In the present study, to improve the accuracy of wind speed prediction, the SSA-WNN model was employed for port wind forecasting.The characteristics of annual wind speeds in the port area were analyzed, and RMSE, MAE, and MAPE were used as evaluation metrics.A comparison analysis between the proposed method and other traditional methods, such as SSA-LSTM, SSA-BP, and WNN algorithms, was conducted.The results showed that the SSA-WNN algorithm achieved the fastest convergence in the convergence curve, and its RMSE was the lowest.In the wind speed prediction plots for 1 November and 1 December, the SSA-WNN algorithm exhibited predictions that were closer to the actual values compared to the other algorithms.In the evaluation metric table, the SSA-WNN model showed the most ideal performance, particularly when compared to the unoptimized WNN model, with improvements of 1.0993 m/s, 0.3962 m/s, and 5.329% in terms of RMSE, MAE, and MAPE, respectively.This indicates the significant importance of the SSA optimization algorithm for enhancing the performance of the WNN model.Moreover, the SSA-WNN algorithm demonstrated improved prediction accuracy and convergence speed when compared to other algorithms, highlighting its superiority in port wind speed prediction.

Future Work
There are certain limitations in this study.Firstly, the focus was solely on investigating the impact of the SSA optimization algorithm on neural networks, without comparing it with other optimization algorithms.Additionally, no hybrid models were incorporated in the neural network analysis.Furthermore, the study did not consider unexpected events such as typhoons or other natural disasters in the prediction process, but rather focused on normal wind speed prediction scenarios.Besides, the prediction results solely focused on wind speed and did not include the prediction of other wind energy resources in the port area, such as wind direction and wind power density.Therefore, these limitations are considered to be studied in future works.Besides, the power quality of grid-connected wind power generation system needs to be addressed by combining the system control strategy and wind speed prediction, so as to reduce the harmonic distortion.

Figure 3 .
Figure 3. Geographical locations of the port area and wind farm laser radar.The laser radar measures wind speeds at heights ranging from 30 m to 140 m with a sampling period of 10 min.The hub height of the planned wind turbines in the port area is 125 m.Therefore, this study focuses on analyzing wind speeds at 125 m.The wind speed data for the entire year of 2022 is shown in the following figures.In Figure4a, the plot shows the daily wind speed data at a 10-min interval for the entire year of 2022, with a total of 52,560 data points.Figure4billustrates the distribution of wind speeds throughout the year.It can be observed that the wind speeds in the Chuan Shan Port Area exhibit strong nonlinearity and fluctuation.The wind speeds are concentrated between 3 m/s and 6 m/s, with an average wind speed of 5.1 m/s.The maximum recorded wind speed is 31.6 m/s, and there are a few outliers with wind speeds exceeding 20 m/s.These outlier data points pose a challenge for direct prediction using the original dataset, as they can significantly affect the accuracy of the predictions.To address this issue, 720 data points from 5 days with unusually high wind speeds caused by factors such as typhoons are excluded to ensure that the dataset maintains consistent importance and distribution.

Figure 3 .
Figure 3. Geographical locations of the port area and wind farm laser radar.

Figure 4 .
Figure 4. Wind speeds in Chuan Shan Port Area in 2022.(a) Raw wind speed data for the entire year.(b) Wind speed distribution.

Figure 4 .
Figure 4. Wind speeds in Chuan Shan Port Area in 2022.(a) Raw wind speed data for the entire year.(b) Wind speed distribution.

Figure 5 .
Figure 5. Wind speed distribution rose diagram at 125 m height.

Figure 5 .
Figure 5. Wind speed distribution rose diagram at 125 m height.

Wind speed on 1 Figure 6 .
Figure 6.Wind speed scatter plot.

Table 1 .
Characteristics of input wind data.

Table 1 .
Characteristics of input wind data.

Table 2 .
Characteristics of prediction results in November.

Table 3 .
Characteristics of prediction results in December.

Table 4 .
Evaluation Metrics for Comparative Models.