# Predicting Spare Parts Inventory of Hydropower Stations and Substations Based on Combined Model

Authors: Zhenguo Ma; Bing Tang; Keqi Zhang; Yuming Huang; Danyi Cao; Jiaohong Luo; Jianyong Zhang
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In this paper, a combined model is proposed to predict spare parts inventory in accordance with equipment characteristics and defect elimination records. Fourier series is employed to process the periodicity of the data, autoregressive moving average (ARMA) is used to deal with the linear autocorrelation of the data, and backpropagation (BP) neural network is used to settle the nonlinearity of the data. The prediction results, comparisons, and error analyses show that the combined model is accurate and meets the practical requirements. The combined model not only fully utilizes the information contained in the data but also provides a reasonable decision basis for the procurement of spare parts, making the inventory in a safe state and saving holding costs.


---

## Body

## 1. Introduction

As an important part of the power grid, the stable operation of hydroelectric power stations and substations is of great significance to the safety of the power grid [1, 2]. To ensure the stable operation of the system, the inventory of equipment spare parts needs to be in a safety status. When the quantity of inventory is insufficient, it cannot guarantee the system’s demand for spare parts and the timely elimination of defects, and when the quantity of inventory is too much, it will occupy too much storage space and capital.Effective inventory forecasting not only ensures stable system operation but also reduces inventory costs and improves capital utilization of enterprises. There are a large number of research results on inventory forecasting, the forecasting objects are distributed in different industries such as supply chain, supply side, and demand side, and the forecasting methods are often focused on single-quantity model or improved single-quantity model [3].There have been many research results for forecasting the spare parts demand for hydropower stations and substations. In these studies, scholars have gradually shifted from research on the management and optimization of inventories to that on inventory forecasting. Inventory management is receiving more and more attention as a condition for sustainable production. From the point of view of analytical techniques, researches on inventory management are focused on descriptive analytics, as well as on predictive and prescriptive analytics [4]. These applications and studies could be developed as an optimal resource allocation method that helps the inventory managers and engineers to optimize their inventory policy. For some power equipment, the long service life often leads to an excessive intermittent demand for spare parts, which is a challenge for inventory control, and to solve this problem, a regular review inventory control system is theoretically considered to be an optimal approach [5]. In [4, 5], the authors did not make full use of the information contained in the data. With the improvement of data mining techniques, many studies started to use machine learning [6], deep learning [7], and classification methods [4, 8] to make simple predictions about the inventory, and these predictions bring benefits to the actual inventory management such as improving the reliability of the system, decreasing the failure rate of the equipment, and reducing the cost of operation and maintenance.The application of artificial intelligence technology in spare parts inventory forecasting technology has significantly improved the accuracy of forecasting results. Ding [9] proposed an algorithmic model based on the modified BP neural network for grid material demand forecasting. The author simply improved the BP model to improve convergence. Similar studies based on artificial intelligence methods are machine learning [6, 10], deep learning [7], and so forth.Qualitative forecasting models such as the expert meeting method [11] and the Delphi method [12] rely too much on experience and expert scoring, for short-term predictions of large data volumes are not valid, so their applicability and reliability are relatively poor. Quantitative models focus on mathematical models that use historical data or factor variables to forecast demand and apply certain mathematical methods to reveal the regular links between relevant variables, which have a high degree of objectivity. The conventional quantitative forecasting models are the autoregressive moving average (ARMA) model [13, 14], regression analysis [15, 16], and gray forecasting model [17].Although fruitful results have been achieved based on these quantitative models, we have to consider the following three aspects. The first one is prediction accuracy. Any forecasting models have their limitations, which originate from the model itself or the data. For example, the ARMA model is suitable for time series with linear relationships and does not predict well for data with nonlinear relationships. While data often have multiple characteristics such as linear relationships, nonlinear relationships, and periodic characteristics at the same time, and if a single forecasting model is adopted, it will inevitably reduce the forecasting accuracy. An effective way to solve this kind of problem is to combine multiple models. Study [18] showed that when combining two single forecasting methods, its error was reduced by 7.2%, and when the combination of methods was increased to five, its error was reduced by 16.3%. Using an appropriate combination of forecasting models can overcome the limitations of a single model and improve the accuracy and diversify the forecasting risk as much as possible [19–21]. Researchers [19] used the recursive least square method combined with the 2RC model to obtain the best prediction of the state of charge of lithium batteries. However, in literature [20, 21], researchers considered fewer influencing factors. When the influencing factors are added, it will increase the difficulty of the study. The second one is that any prediction should be considered from a practical point of view. For solving practical problems, it is also necessary to start from the actual problem of the enterprise; for example, in power companies, the prediction value of spare parts must be slightly higher than the real value to prevent the failure of protection devices caused by insufficient spare parts when an unexpected event occurs, resulting in a power failure. The third point is that many factors affect inventory, such as internal and external factors. In this paper, we consider the inventory problem under 10 factors in a comprehensive manner, which is shown in Section 4.1. The proposed combined prediction model based on the above three aspects is the main innovation of this paper.At present, power enterprises like DH Hydropower Station and JC Power Supply Company stockpile spare parts using the agreed inventory procurement [22]. This form of procurement relies on experience to speculate on the approximate demand rather than some theoretical model, such as the minimum life-cycle cost (LCC) [23] for spare parts for the next year. It has the disadvantage of insufficient spare parts inventory caused by both internal and external factors, which often leads to insufficient spare parts inventory and the need for temporary procurement. There is also overpurchase of certain spare parts, which causes inventory backlog and increases the cost of holding materials, thus taking up a lot of capital and storage space.Based on the above reasons, this paper proposes a combined model to predict the inventory for the DH Hydropower Station excitation unit and substation relay protection equipment in JC Power Supply Company. To the best of our knowledge, no literature combines Fourier series, ARMA, and BP neural network to study inventory prediction, and there is no literature that uses this kind of mixed model to design a prediction scheme for inventory materials in Hydropower Station and substations. Moreover, the mixed model developed in this paper has a high prediction accuracy compared with the models developed by using the ARMA method alone and combining ARMA and BP neural network, and the model validity is good because the RMSE and MAE of the mixed model given in this paper are smallest. The first part is about the current status of research on the issue. The second part is about the related works, including the principle of Fourier series form of sequence, ARMA model, and BP neural network. In the third section, we put forward a combined model based on the Fourier series, ARMA, and BP neural network for inventory. The fourth part is the simulation of the real case and comparisons, and the last section is about the conclusions and a brief perspective of the future work.


## 2. Related Works

### 2.1. Fourier Series of Time Series

When analyzing defect elimination records, we find that the spare parts have a certain periodicity in usage; for example, during the rainy season, the usage of certain spare parts is higher than usual. To make the prediction more accurate, the periodic characteristics of the data need to be extracted using the Fourier series [24].Let the sequencex1,x2,…,xn, which can be considered as a point in an n-dimensional space coordinate system, form a set of bases for any n-dimensional orthogonal vectors for a given n-dimensional space. Thus, the sequence xt,t=1,2,…,n can be represented by a linear combination of orthogonal trigonometric functions as(1)yt=∑k=0m/2akcos2kπtm+aksin2kπtm+εt.Equation (1) means that the Fourier series form of the sequence xt is yt. The coefficients ak,bk can be calculated by the following equation:(2)ak=1m∑i=1mxicos2kπtm,k=0ork=m2,m is even number,2m∑i=1mxicos2kπtm,k=1,2,…,m−12,bk=2m∑i=1mxisin2kπtm,k=0,1,2,…,m−12,where εt=yt−xt∼N0,σε2. yt is data with certain seasonal periodicity characteristics, and the periodicity can be adjusted by adjusting the value of parameter m.


### 2.2. ARMA Model

ARMA model is a relatively mature forecasting model for studying linear time series, which requires time series data to be stationary to build the model, and has certain requirements on the magnitude of the data. Its model expression is(3)yt=ϕ1yt−1+⋯ϕpyt−p+ut+θ1ut−1+⋯+θqut−q,ϕp≠0,θq≠0,Eut=0,Varut=σu2,Eutus=0,s≠t,Eysut=0,∀s<t,where yt is the time series, p is the autoregressive order, q is the moving average order, and ϕii=1,…p,θjj=1,…q is the coefficient to be determined. ut is the error.The stationarity of the data is an important prerequisite for ARMA, and it can be verified by the Augmented Dickey-Fuller (ADF) test [25]. If the data are not stationary, stationary processing can be performed by using the n th-order difference method with the following equation:(4)Δnyt=∑i=0n−1n−iCniyt+i=∑i=0n−1n−iCniyt+n−i.To obtain the best prediction model, the Akaike information criterion (AIC) [26–28] can be used to determine the parameters p and q of the model. Different AIC values can be obtained when fitting the data by selecting different p and q.(5)AIC=−2lnσ^t2p,q+2p+qN,where σ^t2p,q is the variance of residuals and ARMA (p,q) is considered the best prediction model when AIC has the smallest value.


### 2.3. BP Neural Network Model

The learning process of the BP neural network consists of two processes: forward propagation of signal and backward propagation of error. By continuously adjusting the value of network weights, the final output of the network is made as close as possible to the desired output for training purposes. Therefore, it can capture the nonlinear features and trends in it well when dealing with time series and thus is widely used for time series prediction. It is composed of an input layer, an output layer, and one or more hidden layers, each of which consists of several neurons, and the individual neurons of adjacent layers are fully connected. Figure1 shows a typical multilayer neural network.Figure 1
Multilayer BP neural network diagram.The input vector isy=y1,y2,…,ym, the output vector is Y=Y1,Y2,…,Yn, and the input of each neuron in the l th hidden layer is hl=h1l,h2l,…,htl, where t is the number of neurons in the l th layer. Let wijl be the connection weight between the neuron from the j th neuron in the l−1 th layer and the i th neuron in the l th layer and bil be the bias of the i th neuron in the l th layer. Then,(6)netil=∑j=1t−1wijlhjl−1+bil,where hil=fnetil, where netil is the output of the i th neuron in l th layer and f⋅ is the neuronal activation function. Usually a nonlinear activation function is used in multilayer neural networks.To ensure the prediction accuracy of the BP neural network, the loss function is defined as follows:(7)lfk=1n∑i=1nxai−xpki2,where xpk denotes the predicted value of the BP model after the k th round of training. The function lfk means the root mean square error of the true value xa and xpk. A smaller lfk indicates adequate training and more accurate prediction.


## 2.1. Fourier Series of Time Series

When analyzing defect elimination records, we find that the spare parts have a certain periodicity in usage; for example, during the rainy season, the usage of certain spare parts is higher than usual. To make the prediction more accurate, the periodic characteristics of the data need to be extracted using the Fourier series [24].Let the sequencex1,x2,…,xn, which can be considered as a point in an n-dimensional space coordinate system, form a set of bases for any n-dimensional orthogonal vectors for a given n-dimensional space. Thus, the sequence xt,t=1,2,…,n can be represented by a linear combination of orthogonal trigonometric functions as(1)yt=∑k=0m/2akcos2kπtm+aksin2kπtm+εt.Equation (1) means that the Fourier series form of the sequence xt is yt. The coefficients ak,bk can be calculated by the following equation:(2)ak=1m∑i=1mxicos2kπtm,k=0ork=m2,m is even number,2m∑i=1mxicos2kπtm,k=1,2,…,m−12,bk=2m∑i=1mxisin2kπtm,k=0,1,2,…,m−12,where εt=yt−xt∼N0,σε2. yt is data with certain seasonal periodicity characteristics, and the periodicity can be adjusted by adjusting the value of parameter m.


## 2.2. ARMA Model

ARMA model is a relatively mature forecasting model for studying linear time series, which requires time series data to be stationary to build the model, and has certain requirements on the magnitude of the data. Its model expression is(3)yt=ϕ1yt−1+⋯ϕpyt−p+ut+θ1ut−1+⋯+θqut−q,ϕp≠0,θq≠0,Eut=0,Varut=σu2,Eutus=0,s≠t,Eysut=0,∀s<t,where yt is the time series, p is the autoregressive order, q is the moving average order, and ϕii=1,…p,θjj=1,…q is the coefficient to be determined. ut is the error.The stationarity of the data is an important prerequisite for ARMA, and it can be verified by the Augmented Dickey-Fuller (ADF) test [25]. If the data are not stationary, stationary processing can be performed by using the n th-order difference method with the following equation:(4)Δnyt=∑i=0n−1n−iCniyt+i=∑i=0n−1n−iCniyt+n−i.To obtain the best prediction model, the Akaike information criterion (AIC) [26–28] can be used to determine the parameters p and q of the model. Different AIC values can be obtained when fitting the data by selecting different p and q.(5)AIC=−2lnσ^t2p,q+2p+qN,where σ^t2p,q is the variance of residuals and ARMA (p,q) is considered the best prediction model when AIC has the smallest value.


## 2.3. BP Neural Network Model

The learning process of the BP neural network consists of two processes: forward propagation of signal and backward propagation of error. By continuously adjusting the value of network weights, the final output of the network is made as close as possible to the desired output for training purposes. Therefore, it can capture the nonlinear features and trends in it well when dealing with time series and thus is widely used for time series prediction. It is composed of an input layer, an output layer, and one or more hidden layers, each of which consists of several neurons, and the individual neurons of adjacent layers are fully connected. Figure1 shows a typical multilayer neural network.Figure 1
Multilayer BP neural network diagram.The input vector isy=y1,y2,…,ym, the output vector is Y=Y1,Y2,…,Yn, and the input of each neuron in the l th hidden layer is hl=h1l,h2l,…,htl, where t is the number of neurons in the l th layer. Let wijl be the connection weight between the neuron from the j th neuron in the l−1 th layer and the i th neuron in the l th layer and bil be the bias of the i th neuron in the l th layer. Then,(6)netil=∑j=1t−1wijlhjl−1+bil,where hil=fnetil, where netil is the output of the i th neuron in l th layer and f⋅ is the neuronal activation function. Usually a nonlinear activation function is used in multilayer neural networks.To ensure the prediction accuracy of the BP neural network, the loss function is defined as follows:(7)lfk=1n∑i=1nxai−xpki2,where xpk denotes the predicted value of the BP model after the k th round of training. The function lfk means the root mean square error of the true value xa and xpk. A smaller lfk indicates adequate training and more accurate prediction.


## 3. Combined Model

For the time seriesxt, in this paper, it not only reflects periodicity but also reflects certain linear autocorrelation and nonlinear nature of the residuals. To make the prediction accurate, in this section, we construct a combined model to forecast the data. The idea of the model is shown in Figure 2.Figure 2
The flowchart of the combined model.


### 3.1. Data Processing

For a given time series dataxt, firstly, it can be transformed into a time series wt with periodic properties by using the Fourier series of the time series in equation (1) and then verify the smoothness of the data to predict the autocorrelation part of the series. The data processing in this study is shown in Algorithm 1.Algorithm 1: Data processing.
Input:xtStep1. Get yt from xt by equation (1)Step2. ADF testif yt is stationary, thenwt←ytelsewt←yt−yt−1endOutput:wt


### 3.2. Prediction of Linear Autocorrelation

For the smooth time serieswt with periodic characteristics, the ARMA model is used to get w^t, and w^t is the predicted result of the linear autocorrelation of the time series. The residual et is also calculated, which is the input of the prediction of the nonlinear residual. The linear autocorrelation prediction process is shown in Algorithm 2.Algorithm 2: Prediction of a linear autocorrelation.
Input:wtStep1. Calculate p and q for ARMA (p,q)for p = 0 to M % M is a positive integerfor q = 0 to K % K is a positive integerAICp,q=−2lnσ^t2p,q+2p,q/Nendendif AIC is minimumoutput p,qStep2. Forecast the time series wt using ARMA (p,q).Step3. Get w^t % prediction valuesStep4. et=wt−w^t % residualsOutput:w^t and et


### 3.3. Prediction of Nonlinear Autocorrelation

In this section, we are going to construct BP neural network model to forecast the residuals, and the main steps are shown in Algorithm3.Algorithm 3: Prediction of the nonlinear residual.
Input:etStep1. Configure BP neural networkStep2. Construct the training set i,ei,i=1,2,…,nStep3. Train BP modelWhile lfk+1−lfk>ϵ or lf⋅>αTrain BP modelDetermine the BP modelStep4. Get predicted values of the residuals e^tOutput:e^t


### 3.4. Combined Model

Taking together Algorithms1–3, we can generate a combined model to computer the predicted results X^t for the time series xt. The details are listed in Algorithm 4.Algorithm 4: Combined model.
Input:xtStep1. Get wt by Algorithm 1Step2. Obtain w^t and et via Algorithm 2Step3. Calculate e^t by Algorithm 3Step4. Compute X^t:if xt is smoothing, thenX^t=e^t+w^telseX^t=e^t+w^t+x^t−11EndOutput:X^tNote:1the case of first-order difference.


## 3.1. Data Processing

For a given time series dataxt, firstly, it can be transformed into a time series wt with periodic properties by using the Fourier series of the time series in equation (1) and then verify the smoothness of the data to predict the autocorrelation part of the series. The data processing in this study is shown in Algorithm 1.Algorithm 1: Data processing.
Input:xtStep1. Get yt from xt by equation (1)Step2. ADF testif yt is stationary, thenwt←ytelsewt←yt−yt−1endOutput:wt


## 3.2. Prediction of Linear Autocorrelation

For the smooth time serieswt with periodic characteristics, the ARMA model is used to get w^t, and w^t is the predicted result of the linear autocorrelation of the time series. The residual et is also calculated, which is the input of the prediction of the nonlinear residual. The linear autocorrelation prediction process is shown in Algorithm 2.Algorithm 2: Prediction of a linear autocorrelation.
Input:wtStep1. Calculate p and q for ARMA (p,q)for p = 0 to M % M is a positive integerfor q = 0 to K % K is a positive integerAICp,q=−2lnσ^t2p,q+2p,q/Nendendif AIC is minimumoutput p,qStep2. Forecast the time series wt using ARMA (p,q).Step3. Get w^t % prediction valuesStep4. et=wt−w^t % residualsOutput:w^t and et


## 3.3. Prediction of Nonlinear Autocorrelation

In this section, we are going to construct BP neural network model to forecast the residuals, and the main steps are shown in Algorithm3.Algorithm 3: Prediction of the nonlinear residual.
Input:etStep1. Configure BP neural networkStep2. Construct the training set i,ei,i=1,2,…,nStep3. Train BP modelWhile lfk+1−lfk>ϵ or lf⋅>αTrain BP modelDetermine the BP modelStep4. Get predicted values of the residuals e^tOutput:e^t


## 3.4. Combined Model

Taking together Algorithms1–3, we can generate a combined model to computer the predicted results X^t for the time series xt. The details are listed in Algorithm 4.Algorithm 4: Combined model.
Input:xtStep1. Get wt by Algorithm 1Step2. Obtain w^t and et via Algorithm 2Step3. Calculate e^t by Algorithm 3Step4. Compute X^t:if xt is smoothing, thenX^t=e^t+w^telseX^t=e^t+w^t+x^t−11EndOutput:X^tNote:1the case of first-order difference.


## 4. Experiment, Results, and Comparisons

### 4.1. Experimental Data

The spare parts in this paper are the liquid crystal display (LCD), the central processing unit (CPU), and DC220V Power Supply (DCPS), which are installed in the excitation system of hydroelectric generating units and substation relay protection equipment. They have the following features:A wide variety and distribution and high value and integrationIt is difficult to obtain monitoring data, and the operation and maintenance (O&M) process requires a lot of manpower. It has a long procurement cycleService life is influenced by environmental factors and human factorsThe data from the defect elimination records stored in DH Hydropower Station and JC Power Supply Company contain 10 field variables: Component Name, Installation Date, Manufacturer, Damage Date, Design Life, Temperature, Humidity, Installation Location, Interval, and O&M (Operation and Maintenance) Shift, where Design Life is a numeric variable, Installation Date and Damage Date are temporal variables, and the others are textual variables.The overall trend in the annual usage of a certain relay protection equipment is smooth, and we can consider the data as a time series. Each year, in the case of high temperature and high humidity or low temperature and high humidity, the use of spare parts will increase; that is, the data will reflect a certain periodicity. At the same time, the service life of the equipment, that is, Damage Date minus Installation Date, will be affected by the working conditions. Therefore, the data will reflect a certain nonlinear characteristic.


### 4.2. Inventory Prediction Based on ARMA Only

In this section, only the ARMA model is used to forecast three kinds of components. We can find that all data are stationary after testing by the ADF method. The parametersp and q are determined according to AIC in (5), the details are listed in Table 1, and the forecast results are shown in Figure 3.Table 1
Parameters of the ARMA model.
EquipmentAICpqLCD322.21311CPU370.75021DCPS403.56110Figure 3
Prediction values based on the ARMA model. (a) Prediction values for LCD based on ARMA (1, 1). (b) Prediction values for CPU based on ARMA (2, 1). (c) Prediction values for DCPS based on ARMA (1, 0).
(a)(b)(c)From Figure3, we can conclude that the predicted values match too poorly with the true values. This indicates that the data have a weak linear autocorrelation, especially for the data of CPU and DCPS. But the ARMA model can only deal with data with linear relationships by nature; therefore, it can be concluded that the prediction based on this model only is invalid.


### 4.3. Inventory Prediction Based on ARMA and BP

To deal with the nonlinear relationships in the data, a BP neural network model is added to the ARMA model. The settings of the parameters in the ARMA model are shown in Table1.In the BP neural network, the input and output layers have one node each, and three hidden layers include a fully connected layer containing 10 nodes, a discarded layer with a discard rate of 20%, and a fully connected layer with 15 nodes, respectively. Training termination conditionsε=0.001,α=0.05. To avoid the gradient explosion and gradient disappearance problems in BP neural networks, simplify the computation process and improve the computation speed, and the activation function that we adopt in this paper is the Rectified Linear Unit (ReLU) [29, 30]:(8)fx=max0,x.The predicted values for LCD, CPU, and DCPS based on the ARMA model and the BP neural network are shown in Figure4.Figure 4
Prediction values based on the ARMA model and BP neural network. (a) Prediction values for LCD based on the ARMA (1, 1) +BP. (b) Prediction values for CPU based on the ARMA (2, 1) +BP. (c) Prediction values for DCPS based on the ARMA (1, 0) +BP.
(a)(b)(c)Comparing Figures3 and 4, we can see that the degree of agreement of the predicted values based on the ARMA model and BP neural network is higher than the ARMA model’s, which indicates that there is indeed a nonlinear relationship in the data.At the same time, it can be seen from Figure4 that the results are not bad for LCD, but for CPU, there are more cases where the predicted values are lower than the true values, and for DCPS, throughout the forecast curve, there are several cases where peaks and valleys occur at the same time point, resulting to a large difference in predictions, which is due to the fact that the ARMA and BP neural network model have not fully explored the information of the data.


### 4.4. Inventory Prediction Based on the Combined Model

According to the experience of operation and maintenance, in periods of high temperature and humidity, or low temperature and humidity, the demand for spare parts is higher, and the data reflect a certain periodicity. Figure5 is the description of the loss function of the BP neural network versus the training time. The smaller the loss function values are, the more accurate the neural network model is and the better the prediction result is. In Figure 5, we conclude that the data after the Fourier series extraction of features will make the BP neural network have smaller loss function values.Figure 5
The relationship between loss function and training times.In this section, we are going to implement a combined model to forecast the number of spare parts. We setn=48 for the Fourier series in Algorithm 1. In Algorithm 2, we recalculate the AIC of ARMA, the values of p and q are obtained and shown in Table 2, and in Algorithm 3, we adopt the same BP neural network used in Section 4.3. The prediction results are shown in Figure 6.Table 2
Parameters of the ARMA model.
EquipmentAICpqLCD327.92514CPU395.59913DCPS400.58721Figure 6
Predicted values based on the combined model for: (a) LCD, ARMA (1, 4); (b) CPU, ARMA (1, 3); (c) DCPS, ARMA (2, 1).
(a)(b)(c)As can be seen from Figure6, the predicted and true values of the three devices are in good agreement with the trend of change. Moreover, the predicted values are all slightly greater than or equal to the true values. Such prediction results are in line with the safety requirements of hydropower stations and substations for spare parts, and this prediction model is more advantageous for the stability of the system. Comparing Figures 3–6, we can draw a conclusion that the periodical and nonlinear features in the data play a major role.Through the comparison of predicted results, the combined model we constructed in Section3 is the best one for this type of predicting problem.


### 4.5. Error Analyses

To further illustrate the validity of the combined model, we conduct error analysis for the three prediction models in this paper. The corresponding root means square error (RMSE) and means absolute error (MAE) under the three methods are discussed, which are calculated as follows:(9)RMSE=1n∑i=1nxai−xpi2,MAE=1n∑i=1nxai−xpi,where xp and xa denote the predicted and true values, respectively. If the RMSE and MAE of a certain algorithm are smaller, it means that the algorithm is more effective. The RMSEs and MAEs of the three prediction models are shown in Table 3.Table 3
RMSE and MAE of three prediction methods.
EquipmentRMSEMAEARMAARMA + BPCombined modelARMAARMA + BPCombined modelLCD1.13650.84160.67700.87510.62510.4583CPU1.36930.91280.79050.95830.58330.5416DCPS1.74401.56791.19021.45831.29160.9167From Table3, it is known that the RMSE and MAE based on the combined model are both minimal, which further illustrates the effectiveness of the combined model.


## 4.1. Experimental Data

The spare parts in this paper are the liquid crystal display (LCD), the central processing unit (CPU), and DC220V Power Supply (DCPS), which are installed in the excitation system of hydroelectric generating units and substation relay protection equipment. They have the following features:A wide variety and distribution and high value and integrationIt is difficult to obtain monitoring data, and the operation and maintenance (O&M) process requires a lot of manpower. It has a long procurement cycleService life is influenced by environmental factors and human factorsThe data from the defect elimination records stored in DH Hydropower Station and JC Power Supply Company contain 10 field variables: Component Name, Installation Date, Manufacturer, Damage Date, Design Life, Temperature, Humidity, Installation Location, Interval, and O&M (Operation and Maintenance) Shift, where Design Life is a numeric variable, Installation Date and Damage Date are temporal variables, and the others are textual variables.The overall trend in the annual usage of a certain relay protection equipment is smooth, and we can consider the data as a time series. Each year, in the case of high temperature and high humidity or low temperature and high humidity, the use of spare parts will increase; that is, the data will reflect a certain periodicity. At the same time, the service life of the equipment, that is, Damage Date minus Installation Date, will be affected by the working conditions. Therefore, the data will reflect a certain nonlinear characteristic.


## 4.2. Inventory Prediction Based on ARMA Only

In this section, only the ARMA model is used to forecast three kinds of components. We can find that all data are stationary after testing by the ADF method. The parametersp and q are determined according to AIC in (5), the details are listed in Table 1, and the forecast results are shown in Figure 3.Table 1
Parameters of the ARMA model.
EquipmentAICpqLCD322.21311CPU370.75021DCPS403.56110Figure 3
Prediction values based on the ARMA model. (a) Prediction values for LCD based on ARMA (1, 1). (b) Prediction values for CPU based on ARMA (2, 1). (c) Prediction values for DCPS based on ARMA (1, 0).
(a)(b)(c)From Figure3, we can conclude that the predicted values match too poorly with the true values. This indicates that the data have a weak linear autocorrelation, especially for the data of CPU and DCPS. But the ARMA model can only deal with data with linear relationships by nature; therefore, it can be concluded that the prediction based on this model only is invalid.


## 4.3. Inventory Prediction Based on ARMA and BP

To deal with the nonlinear relationships in the data, a BP neural network model is added to the ARMA model. The settings of the parameters in the ARMA model are shown in Table1.In the BP neural network, the input and output layers have one node each, and three hidden layers include a fully connected layer containing 10 nodes, a discarded layer with a discard rate of 20%, and a fully connected layer with 15 nodes, respectively. Training termination conditionsε=0.001,α=0.05. To avoid the gradient explosion and gradient disappearance problems in BP neural networks, simplify the computation process and improve the computation speed, and the activation function that we adopt in this paper is the Rectified Linear Unit (ReLU) [29, 30]:(8)fx=max0,x.The predicted values for LCD, CPU, and DCPS based on the ARMA model and the BP neural network are shown in Figure4.Figure 4
Prediction values based on the ARMA model and BP neural network. (a) Prediction values for LCD based on the ARMA (1, 1) +BP. (b) Prediction values for CPU based on the ARMA (2, 1) +BP. (c) Prediction values for DCPS based on the ARMA (1, 0) +BP.
(a)(b)(c)Comparing Figures3 and 4, we can see that the degree of agreement of the predicted values based on the ARMA model and BP neural network is higher than the ARMA model’s, which indicates that there is indeed a nonlinear relationship in the data.At the same time, it can be seen from Figure4 that the results are not bad for LCD, but for CPU, there are more cases where the predicted values are lower than the true values, and for DCPS, throughout the forecast curve, there are several cases where peaks and valleys occur at the same time point, resulting to a large difference in predictions, which is due to the fact that the ARMA and BP neural network model have not fully explored the information of the data.


## 4.4. Inventory Prediction Based on the Combined Model

According to the experience of operation and maintenance, in periods of high temperature and humidity, or low temperature and humidity, the demand for spare parts is higher, and the data reflect a certain periodicity. Figure5 is the description of the loss function of the BP neural network versus the training time. The smaller the loss function values are, the more accurate the neural network model is and the better the prediction result is. In Figure 5, we conclude that the data after the Fourier series extraction of features will make the BP neural network have smaller loss function values.Figure 5
The relationship between loss function and training times.In this section, we are going to implement a combined model to forecast the number of spare parts. We setn=48 for the Fourier series in Algorithm 1. In Algorithm 2, we recalculate the AIC of ARMA, the values of p and q are obtained and shown in Table 2, and in Algorithm 3, we adopt the same BP neural network used in Section 4.3. The prediction results are shown in Figure 6.Table 2
Parameters of the ARMA model.
EquipmentAICpqLCD327.92514CPU395.59913DCPS400.58721Figure 6
Predicted values based on the combined model for: (a) LCD, ARMA (1, 4); (b) CPU, ARMA (1, 3); (c) DCPS, ARMA (2, 1).
(a)(b)(c)As can be seen from Figure6, the predicted and true values of the three devices are in good agreement with the trend of change. Moreover, the predicted values are all slightly greater than or equal to the true values. Such prediction results are in line with the safety requirements of hydropower stations and substations for spare parts, and this prediction model is more advantageous for the stability of the system. Comparing Figures 3–6, we can draw a conclusion that the periodical and nonlinear features in the data play a major role.Through the comparison of predicted results, the combined model we constructed in Section3 is the best one for this type of predicting problem.


## 4.5. Error Analyses

To further illustrate the validity of the combined model, we conduct error analysis for the three prediction models in this paper. The corresponding root means square error (RMSE) and means absolute error (MAE) under the three methods are discussed, which are calculated as follows:(9)RMSE=1n∑i=1nxai−xpi2,MAE=1n∑i=1nxai−xpi,where xp and xa denote the predicted and true values, respectively. If the RMSE and MAE of a certain algorithm are smaller, it means that the algorithm is more effective. The RMSEs and MAEs of the three prediction models are shown in Table 3.Table 3
RMSE and MAE of three prediction methods.
EquipmentRMSEMAEARMAARMA + BPCombined modelARMAARMA + BPCombined modelLCD1.13650.84160.67700.87510.62510.4583CPU1.36930.91280.79050.95830.58330.5416DCPS1.74401.56791.19021.45831.29160.9167From Table3, it is known that the RMSE and MAE based on the combined model are both minimal, which further illustrates the effectiveness of the combined model.


## 5. Conclusions and Prospect

According to the prediction results and their comparison, the data of defect elimination records have certain periodic characteristics, linear autocorrelation, and nonlinear relationship, so extraction of the periodic characteristics via the Fourier series is a key step. The ARMA model does its work in processing the linear autocorrelation, and this is the main part of the forecasting results. The BP neural network model fully exploits the nonlinear relationship of the data, and its purpose is to improve the prediction accuracy. Three different methods take full advantage of their respective strengths and make the combined model perform well.The combined model was used in inventory forecasting for three different devices at the same time, and all of them demonstrated good forecasting results, which indicate that this model has some strong portability and stability. The analysis of the forecasting results also shows that the model has some advantages over the single model or two models in forecasting.The combined model used in this paper embodies three practical applications: the first is the accurate calculation, high portability, and stability; the second is to improve inventory management capability and save inventory cost and storage space; the third is the ideas in this paper that can be generalized to another field, such as the primary equipment of power system.For electric power enterprises, the problem of predicting inventory of equipment without monitoring devices has a high practical value, and subsequent research efforts can add more influencing factors, such as product batches, idle time, and extreme weather conditions, but data on these influencing factors are currently unavailable. Under the many factors, we can reconstruct the prediction model and choose the remaining useful life (RUL) [31, 32] of the equipment as the main influence variable while considering the life-cycle costing (LCC) [23, 33] of the equipment to achieve a more accurate prediction of the equipment inventory, which is more conducive to the operation and maintenance of relay protection equipment, as well as reducing inventory expenditures.



---

*Source: 1643807-2022-04-07.xml*