# A New Hybrid Model Based on Fruit Fly Optimization Algorithm and Wavelet Neural Network and Its Application to Underwater Acoustic Signal Prediction

Authors: Hong Yang; Siliang Wang; Guohui Li; Tongtong Mao
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

The local predictability of underwater acoustic signal plays an important role in underwater acoustic signal processing, and it is the basis of nonstationary signal detection. Wavelet neural network model, with the advantages of both wavelet analysis and artificial neural network, makes full use of the time-frequency localization characteristics of wavelet analysis and the self-learning ability of artificial neural network; however, this model is prone to fall into local minima or creates convergence. To overcome these disadvantages, a new hybrid model based on fruit fly optimization algorithm (FOA) and wavelet neural network (WNN) is proposed in this paper. The FOA-WNN prediction model is constructed by optimizing the weights and thresholds of wavelet neural network, and the model is applied to underwater acoustic signal prediction. The experimental results show that the FOA-WNN prediction model has higher prediction accuracy and smaller prediction error, compared with wavelet neural network prediction model and BP neural network prediction model.


---

## Body

## 1. Introduction

An important feature of the underwater acoustic signal is local predictability. This feature plays an important role in underwater acoustic signal processing and is the basis for solving nonstationary signal detection [1]. Therefore, studying the prediction of underwater acoustic signal is very important meaning to underwater acoustic signal processing. If one chooses and adopts a more accurate prediction model, one will detect a lower SNR signal. Volterra series theory [2, 3] is used to establish a nonlinear dynamic model of the underwater acoustic signal, and the signal is predicted by one-step prediction and multistep prediction. In [4–7], radial basis function neural network (RBF) is used to establish the prediction model of underwater acoustic signal. These methods have achieved good prediction results, but there are still larger prediction errors. At present, the research direction on this issue is how to further improve the prediction accuracy.Wavelet neural network is combined with the characteristics of artificial neural network and wavelet analysis, and it has the advantages of self-learning ability and localization of wavelet transform. Therefore, it is widely used in nonlinear and nonstationary time series prediction and can effectively solve the local minimum problem [8]. A compact type wavelet neural network is used to predict sunspot numbers [9]. Gupta et al. [10] used wavelet neural network to predict the electric power load. Fruit fly optimization algorithm is a new method by observing the behavior of fruit flies to find the smell [11–13], and it can be well used to find the extremes of mathematical functions, for global optimization and the optimization of neural network’s parameters. As a new swarm intelligence algorithm, it is easy to understand. The program of this algorithm is also easy to implement, running time is shorter, parameters that need to be adjusted are less, and the prediction efficiency can be greatly improved [14]. In [15, 16], FOA is used to automatically determine optimal parameters of the least square support vector machine model and complete the prediction of random terms and periodic terms. And this algorithm is also used for analysis of calculated and measured data of both “acoustic Goos-Hänchen effect” induced at liquid-solid interface [17] and polarization state of inhomogeneous mode conversion wave created at anisotropic rock interface [18]. The adaptive wavelet threshold denoising method base on an improved fruit fly optimization algorithm is proposed in [19]. In order to decrease time-consuming and set the optimal threshold, FOA optimization is used to avoid falling into local extremes. In this paper, a new hybrid model based on fruit fly optimization algorithm and wavelet neural network (FOA-WNN) is proposed and applied to underwater acoustic signal prediction.


## 2. Fruit Fly Optimization Algorithm

Fruit fly optimization algorithm (FOA) is a method for deriving global optimum based on foraging behavior of fruit flies [11, 20]. As the fruit fly has obvious superiority over other species in olfactory and vision system, the fly group can find food quickly, then determine the position, and fly to the target. After the location of the food is determined, fruit flies gather with their companions. The detailed iterative process of FOA can be concluded as follows [20]:(1) Initialize the population position. Set the initial location of the flies group to (x0,y0); determine the number of fruit flies and the maximum number of iterations.(2) Set the random direction and distance of individual.(1)Xi=x0+RandomValueYi=y0+RandomValue.(3) Because the group does not know the location of the optimal solution, the distance between the group and the origin (Dist) is calculated firstly, and then the smell concentration judgment value (S) can be calculated as follows, which is the reciprocal of the distance.(2)Disti=Xi2+Yi2(3)Si=1Disti.(4) By substitutingS into the smell concentration judgment function (also called Fitness function), the smell concentration (Smell) of fruit fly location can be obtained.(4)Smelli=FunctionSi.(5) Find the individual with the highest Smell among all fly groups.(5)bestSmellbestIndex=max⁡Smell.(6) Keep the best concentration value and position coordinate (xi,yi), all fruit flies will fly toward it.(7) Repeat steps (2)–(5) to enter iterative optimization, and determine whether the taste concentration value at the current moment is better than the iterative flavor concentration value at the previous moment. If yes, execute step (6).(6)Smellbest=bestSmellxi=XbestIndexyi=YbestIndex.


## 3. Wavelet Neural Network

Wavelet neural network (WNN) is a kind of feed-forward neural network which combines BP neural network and wavelet transform. It is network framework is the topological structure of BP neural network, and it takes the wavelet basis function as the hidden layer excitation function [21]. WNN is combined with the time-frequency domain local properties of wavelet analysis and the self-learning, self-adaptive ability of neural network, so WNN has better generalization ability than neural network [22–24]. Wavelet neural network can be divided into two types: loose wavelet neural network and tight wavelet neural network [25]. Loose wavelet neural network means that before the neural network is trained, the data is processed by wavelet analysis and then trained by BP neural network. Tight wavelet neural network is the training of neural network by using wavelet basis function in wavelet analysis instead of excitation function in neural network. Tight wavelet neural network is used to establish prediction model in this paper. The structure of the three-layer tight wavelet neural network (hereinafter referred to as wavelet neural network) [26] is shown in Figure 1.Figure 1
The structure of wavelet neural network.In Figure1, xi is input signal, yk is output signal,m is the number of input layer nodes,s is the number of hidden layer nodes,n is the number of output layer nodes, ωij is the connection weight between input layer and hidden layer, ωjk is the connection weight between output layer and hidden layer, ϕ(x) is wavelet basis function, and hj is the output of hidden layer. The training algorithm flow of wavelet neural network is the same as that of BP neural network. Its training is divided into two parts: forward propagation and reverse error correction. The calculation steps are as follows [26]:Calculate the output of the hidden layerhj:(7)hj=h∑i=1i=mωijxi-bjaj,j=1,2,…,mwhere bj is the translation factor of the wavelet basis function, aj is the scaling factor of the wavelet basis, and h is the wavelet basis function. The wavelet basis function is the core of wavelet transform. The function expression of Morlet mother wavelet is as follows:(8)h=cos⁡1.75xe-x2/2.The output of the neural networkyk is calculated as(9)yk=∑j=1mωjkhj,k=1,2,…,n.By adjusting the parameters of the wavelet neural network by error, the error between the output of the wavelet neural network and the ideal result is(10)ek=yk′-ykwhere yk′ represents the ideal output of the wavelet neural network and yk represents the actual output of the wavelet neural network. The weights of the wavelet neural network and the coefficients of the wavelet basis function are adjusted according to ek, which are calculated as follows:(11)ωijn+1=ωijn+Δωijn+1ωjkn+1=ωjkn+Δωjkn+1ajn+1=ajn+Δajn+1bjn+1=bjn+Δbjn+1.The correction items of the weights of the neural network such asΔωij(n+1), Δωij(n+1), Δaj(n+1), and Δbj(n+1) can be calculated as follows by the network error:(12)Δωijn+1=-η∂e∂ωijnΔωjkn+1=-η∂e∂ωjknΔajn+1=-η∂e∂ajnΔbjn+1=-η∂e∂bjnwhere η is the learning rate.One training of wavelet neural network refers to the completion of one forward propagation and one reverse error correction. When the neural network is continuously trained and the output parameters meet the specified requirements, the wavelet neural network will stop training. The data is entered into trained wavelet neural network, and then the output signal will be got. The training process of wavelet neural network is shown in Figure2.Figure 2
The training process of wavelet neural network.


## 4. A New Hybrid Model Based on Fruit Fly Optimization Algorithm and Wavelet Neural Network (FOA-WNN)

The weights and thresholds of wavelet neural network are optimized by FOA, and nonlinear time series are normalized firstly. Define the initial position of the fruit flyXi=(xi1,xi2,…,xiN)T, Yi=(yi1,yi2,…,yiN)T, wherein i represents the number of fruit fly population andN represents the number of all weights and thresholds in the wavelet neural network. The direction and distance of the fruit fly movement are Initialized, following the steps to iterate. Optimized weights and thresholds are used into wavelet neural network for prediction. FOA-WNN prediction algorithm process is as follows:Step 1.
Load the data which is divided into training groups and testing groups, and initial processing, respectively.Step 2.
Initialize the population and iteration count of the fly optimization algorithm, the location of fruit flies, the random direction, and the distance of individual search.Step 3.
The optimal value is calculated by the fly optimization algorithm.Step 4.
The optimized weights and thresholds are substituted into the constructed wavelet neural network for training.Step 5.
The performance of the trained wavelet neural network is tested by using testing groups, and the error is calculated.The block diagram of FOA-WNN prediction model is shown in Figure3.Figure 3
The block diagram of FOA-WNN prediction model.


## 5. Data Simulation and Analysis

In this paper, we use normalized pretreatment ship radiated noise signal where the sampling rate is 20 kHz, and there are a total of 2048 data points. 1380 points are randomly selected as experimental data and the time domain waveform is shown in Figure4.Figure 4
Waveform of underwater acoustic signal.The 1380 data points are divided into prediction data and test data. The first four observed values are used as input vector, and the fifth observed value is used as output vector. 1380 data points can be divided into 1372 sets of data, wherein the former 996 sets of data are used as the test data, and the latter 376 sets of data are used as the forecast data. Then the parameters of wavelet neural network are set up. The best hidden layer nodes and the number of layers are determined by trial-and-error method. The number of nodes in the input layer is 4, the number of nodes in the hidden layer is 15, and the number of nodes in the output layer is 1. That is, the structure of the wavelet neural network is 4-15-1. The learning probabilities are 0.01 and 0.001, respectively, and the number of iterations is 200.Fruit fly population location (x0,y0), which is the weights and thresholds of WNN, is initialed. The iteration of FOA is 1000, and the population size is 20. Set the random direction and distance of individual search. The optimal weights and thresholds are obtained by fruit fly optimization algorithm. The optimal value is substituted into wavelet neural network for iterative computation. Prediction can be done by the test data, and then the final prediction result shown in Figure 5 can be got.Figure 5
FOA-WNN prediction results.The red line in Figure5 represents the predicted value of underwater acoustic signal, and the blue line represents the actual value of underwater acoustic signal. It can be seen that the FOA-WNN model proposed in this paper has good fitting to the original data and can predict the value of underwater acoustic signal well. The plot of error of prediction is shown in Figure 6.Figure 6
The prediction error of FOA-WNN.The different number of hidden layers is set. Then the same experiment is done. Lastly, the change of program’s running time in the case of different hidden layers is recorded. The running time for different hidden layers is shown in Table1. The experimental results show that the more the hidden layers are, the longer the running time of neural network is and the lower the efficiency of the neural network is.Table 1
The running time of different hidden layer number.
The number of hidden layers Time (s) 1 4.93 5 6.22 10 7.48 15 8.65 20 9.42 25 10.74 30 12.07 35 13.05 40 14.39 45 15.45 50 16.77In order to facilitate comparison, BP neural network and WNN prediction model are used to predict the same time series of underwater acoustic signal. Predicted results of underwater acoustic signal for each model are shown in Figure7. The partial enlargement is shown in Figure 8.Figure 7
Predicted results of underwater acoustic signal for each model.Figure 8
Local predicted result of underwater acoustic signal for each model.In order to verify the prediction result, the RMS error (RMSE) and mean absolute error (MAE) are used to estimate the result of prediction model. The RMSE can be used to measure the deviation between the observed value and the true value, which reflects the discrete degree of the data. The smaller the RMSE is, the smaller the deviation is. The mean absolute error is a good reflection of the actual situation of the prediction error. The smaller the MAE is, the more accurate the data fitting is.The RMS error (RMSE) is(13)RMSE=1N∑i=1NYpred-Yreal2.The mean absolute error (MAE) is(14)MAE=1N∑i=1NYpred-Yrealwhere Ypred is forecast data and Yreal is original data. In order to avoid the difference of each prediction result and the error of randomness, we take the average value of 10 times of prediction as the error value of final prediction. Compared with the three models, the RMSE and MAE of each model are shown in Table 2.Table 2
Error comparison of RMSE and MAE in three models.
Models RMSE MAE BP 0.0701 0.0534 WNN 0.0573 0.0468 FOA-WNN 0.0498 0.0387As shown in Table2, the RMSE and MAE of the FOA-WNN prediction model are 0.0498 and 0.0387, respectively; those of the WNN prediction model are 0.0573 and 0.0468, respectively; and those of the BP neural network prediction model are 0.0701 and 0.0534, respectively. These results show that the FOA-WNN has the highest accuracy. Therefore, the fruit fly optimization algorithm combined with the wavelet neural network model in this paper can predict the underwater acoustic signal more accurately, and it is a good forecasting model.


## 6. Conclusions

In order to overcome these disadvantages of wavelet neural network model being prone to fall into local minimum or convergence problems, a new hybrid model based on fruit fly optimization algorithm and wavelet neural network is proposed. The FOA-WNN prediction model is constructed by optimizing the weights and thresholds of wavelet neural network, and it is applied to underwater acoustic signal prediction. The experimental results show that the proposed model can improve the prediction precision compared with wavelet neural network prediction model and BP neural network prediction model in predicting the same underwater acoustic signal. It can also be applied to other fields after conducting some modification and has high application value.



---

*Source: 3136267-2018-06-06.xml*