AN IMPROVED ARMA(1,1) TYPE FUZZY TIME SERIES APPLIED IN PREDICTING DISORDERING

. Fuzzy time series shows great advantages in dealing with incomplete or unreasonable data. But most of them are based on fuzzy AR time series model, so it is necessary to add MA variables to the fuzzy time series [10] to make it more accurate. An improved ARMA(1,1) type fuzzy time series based on fuzzy logic group relations including fuzzy MA variables along with fuzzy AR variables was proposed in this paper. To take full account of the errors, the prediction errors were added to the forecast fuzzy sets, and it made the ﬁrst-order fuzzy logical relationship sets more exact. In order to verify the advantage of the proposed method, it was applied to predict the stock prices of State Bank of India (SBI) and the packet disordering from a common source host in the Northeast University to www. yahoo. com. The experimental results showed that the proposed model was more precise than other models.

1. Introduction. The AR (autoregressive model) proposed by Yule [19] marks the birth of the time series analysis theory. Then Walker extended it to the general AR. The AR model, the MA (moving averages) model and the ARMA (autoregressive moving averages) model form the basis theories of the time series analysis. The ARI-MA model (Box-Jenkins model) [2] is considered as a milestone in the development of the time series.
In 1993, Song and Chissom [17] presented the fuzzy time series theory, which combined the fuzzy sets proposed by Zadeh [20] with the time series analysis theory, and it was applied to predict the university enrollment and the temperature. In 1996, Chen presented an simplified fuzzy time series model [4]. In 1998, Hwang et al. presented another first-order fuzzy time series [8]. In 2005, Yu et al. presented a bivariate fuzzy time series model to forecast Taiwan Futures Exchange (TAIEX) [18]. Many scholars have applied the fuzzy time series to solve the problems of incomplete or unreasonable data. It was widely used in many fields of social life. e.g. to predict stock prices [3] in economics; to predict air quality [14] in environmental science; to predict power generation [11] in industry; to predict traffic flow problem [1] in transport, etc. In this paper, it was applied to predict the packet disordering in network, which opened a new application direction of the fuzzy time series.
In Networked Control Systems (NCSs), the packets which are sent earlier may reach the receiving point later. It is called the packet disordering, i.e. a sequence of packets transmitted from a sensor arrive at the destination out of order. It means that the latest data to reach the target node is not necessarily the latest information. The results of packet disordering will lead to the lower data transmission rate and indirectly increase the network induced delay. Especially in the age of big data, a network has become more and more complicated and the data interaction has become more and more difficult. Therefore, if it is able to adjust control input based on the past packet disordering information in NCSs via an appropriate prediction method, the performance of the systems will be improved hugely. It is important to improve the data transmission rate.
In this paper, an improved ARMA(1,1) type fuzzy time series was proposed to predict the stock prices of SBI and the packet disordering. Firstly, the data were preprocessed and a new way to divide the universe of discourse based on cluster analysis algorithm was given. Secondly, the data were fuzzified applying the general triangular membership functions, and the fuzzy logical relationships were set up. Then, the trend-weighted algorithm was applied to calculate the prediction values. Next, ARMA(1,1) type fuzzy sets were set up according to the fuzzy sets of data and the fuzzy sets of the predicted errors. Finally, the prediction results were calculated. The improved ARMA(1,1) type fuzzy time series took full account of the errors, and it made first-order fuzzy logical relationship sets more exact. In order to verify the advantage of the prposed method, it was applied to forecast the stock prices of SBI and the predicted values of the proposed method were compared with some of the related previous methods. The results showed that the proposed method was more accurate. Then we applied the proposed method to predict the packet disordering, and compared the predicted values of the proposed method with the true values and these of the other methods. The results showed that the proposed method had higher prediction accuracy, and it was more convenient and more effective. It created a new field of the application of the fuzzy time series. And the prediction of the packet disordering is very important to increase the data transmission rate and reduce the network induced delay.
The highlights of the proposed method are listed as follows: 1. It improves clustering analysis algorithm to divide the universe of discourse and makes the data as evenly distributed as possible in each universe of discourse.
2. It proposes an improved ARMA(1,1) type fuzzy time series. It fully considers the errors and can further explain the practical significance of the fuzzy time series. It reduces the calculation order and improves the prediction accuracy.
3. ARMA(1,1) type fuzzy time series method is applied to predict the packet disordering of network. It creates a new field of the fuzzy time series application.
The rest of this paper is organized as follows. In Section 2, some concepts of the fuzzy time series and the packet disordering used in the paper are prepared. In Section 3, ARMA(1,1) type fuzzy time series is given. In Section 4, the proposed method is applied to forecast the stock prices of SBI and the packet disordering of a common source host in the Northeast University, and the predicted values of the proposed method are compared with the true values and some of the related previous methods. In Section 5, we draw conclusions of the proposed ARMA(1,1) type fuzzy time series method, and draw its limitations and future works.
2. Basic concepts. In this section, we introduce some basic concepts of the fuzzy time series and the packet disordering.
2.1. Basic concepts of the fuzzy time series.
where '•' is the composition operator. This relation is called a first-order model of f (t).

2.2.
Basic concepts of the packet disordering. To further understand the problem of packet disordering, we introduce relative displacement of two packets (λ h+1−j h+1−i ) and the displacement value of the packet (d k h+1−i ). Definition 2.3. For any x h−i , relative displacement (RD) is defined as follows. 1.
h+1−i is the RD of two packets x h−i and x h−j . Definition 2.4. The displacement value of the packet x k−i is denoted as d k h+1−i . It is the summation of all the packets' RD values.
If d k h+1−i = 0, the packet disordering happens. For example, for the packet x k−i arriving at before and inclusive of the To further understand the problem of the packet disordering, we show a sequence of disordering packets In the same way we can derive the displacement values of rest packets (0, 1, 2, −2, −1) In the example, x k−4 arrives on time, x k−3 arrives late for one place, x k−2 arrives late for two place, x k−1 arrives early for two place, x k arrives early for one place.
3. ARMA(1,1) Type Fuzzy Time Series. In this section, an improved AR-MA(1,1) type fuzzy time series is proposed. It considers the errors fully, reduces the calculation order and improves the prediction accuracy. The algorithm is now presented as follows.
3.1. The data preparing. To make the data more stable, the change rates of the data x i are calculated applying the following formula.
Then the data are arranged in an ascending sequence excluding duplicate data and get a set of n different data. The ascending sequence is shown as: a 1 , a 2 , . . . a n 3.2. Defining and dividing the universe of discourse. First, a 1 , a 2 , . . . a n are dealed with the following steps.
Step 1: Calculate the distance Calculate the distance d i between each datum applying formula (3).
Then calculate the average of the distance average d, applying formula (4): where average d expresses the average of the distance between every pair of the adjacent data in the ascending data sequence a 1 , a 2 , . . . a n .
Step 2: Cluster the data Firstly, every a i is put into a cluster. Then, deal them with the following cases. Case 1: Assume that the current cluster is the first cluster and the current circumstance is shown as: {a 1 }, {a 2 }, · · · , {a n } If d 1 < average d, and d 1 < d 2 , then put a 2 into the current cluster which a 1 belongs to. Otherwise, regard {a 2 } as the current cluster.
Case 2: Assume that the current cluster is not the first cluster and there is only one datum in the current cluster and the adjacent clusters. The current circumstance can be shown as: If d i−1 < average d, and d i−1 < d i , then put a i into the current cluster which a i−1 belongs to, as {a i−1 , a i } . Otherwise, regard {a i } as the current cluster.
Case 3: Assume that the current cluster is not the first cluster and there are more than one data in the current cluster. The current circumstance can be shown as: denotes the average of the distance between every pair of the adjacent data in the current cluster), then put a i into the current cluster which a i−1 belongs to, as · · · , {a k , · · · , a i−2 , a i−1 , a i }, {a i+1 }, · · · . Otherwise, regard {a i } as the current cluster.
Do it from a 1 to a n .
Step 3: Define and divide the universe of discourse According to the results clustered in Step 2, determine endpoints of the universe of discourse based on the following rules: Rule 1: If the current cluster is the first or the last cluster, there is only one datum in the cluster, and there is also one datum in the adjacent cluster, shown as: The current cluster is changed into the universe of discourse as [a 1 −d 1 /2, a 1 +d 1 /2) or [a n − d n−1 /2, a n + d n−1 /2].
Rule 2: If the current cluster is the first or the last cluster, there is one datum in the cluster, and there are more than one data in the cluster adjacent to it, shown as: Rule 3: If the current cluster is the first or the last cluster, there are more than one data in the cluster, shown as: {a 1 , a 2 , · · · a k }, · · · , or · · · , {a m , · · · , a n−1 , a n } The current cluster is changed into the universe of discourse as [a 1 , a k ) or [a m , a n ].
Rule 4: If the current cluster is neither the first nor the last cluster, there is one datum in the cluster, and there is also one datum in the each adjacent cluster, shown as: The current cluster is changed into the universe of discourse as [a i − d i−1 , a i + d i ).
Rule 5: If the current cluster is neither the first nor the last cluster, there is one datum in the cluster, and there is one datum in one adjacent cluster, but more than one data in the other adjacent cluster, shown as: The current cluster is changed into the universe of discourse as [a i−1 , Rule 6: If the current cluster is neither the first cluster nor the last cluster, there are more than one datum in the cluster, shown as: The current cluster is changed into the universe of discourse as [a i , a k ).
Do it, until all the clusters are changed into the universe of discourse.
3.3. Fuzzification of the historical data and set up fuzzy logical relationships.
Fuzzification of the historical data. Let A 1 , A 2 , · · · , A n be fuzzy sets and all these sets are labeled by possible linguistic values. Then the historical data are fuzzified by the universe of discourse and expressed in the forms of linguistic values. According to the expert's practical experience, the general triangular membership functions expressed as below, we can obtain the fuzzy sets.
where U i is the interval element and the number above it represents the membership degree of U i to A i . If a datum z i ∈ U i , then its corresponding fuzzy set is A i .

3.3.2.
Setting up the fuzzy logical relationships. Applying the fuzzified time series data, the fuzzy logical relationship (FLR) is established by the following rule: If A i is the fuzzy set of t = n and A j is the fuzzy set of t = n + 1, then the fuzzy logical relation is denoted as A i → A j . Here A i represents the current state and A j represents the next state. Then we put the fuzzy logical relationships into the fuzzy logical relationship sets, where the different states corresponding to the same A i are put into one fuzzy logical relationship set. For example, if there are two next states A j and A k corresponding to the same state A i , set up the fuzzy logical relationship set A i → A j , A k .
3.4. The calculation of the predictive values. First, the fuzzy data are inverse fuzzify . Assume m i is the midpoint of U i . Applying the midpoints, the fuzzy data are inverse fuzzify based on the following rules: Case 1: There is only one state A j corresponding to the current state A i (as A i → A j ). Then the predicted rate of change is m i . Case 2: There is more than one state corresponding to the current state A i (as A i → A j , A k , · · · ). The trend-weighted method [6] is applied to calculate the weights. The formula to produce a weight matrix is shown as: For example, the weights are shown in Table 1. Applying formula (6), we can get the normalized weight matrix: Then applying formula 7 calculate the predicted rate of change(PRC).
where m j , m k , m l are the midpoints of the fuzzy intervals U j , U k , U l , respectively. b t represents PRC of time t. Then we calculate the predicted values applying formula (8).
3.5. Setting up the fuzzy logical relationships. Applying equation (9), the error between the real value x(t) and the forecast value y(t) is calculated.
where e(t) represents the error between x(t) and y(t).
Then, put e(t) into the universe of discourse E t applying the automatic clustering algorithm (shown in Section 3.2) and fuzzify e(t) applying the general triangular membership functions (5).
3.6. Setting up ARMA(1,1) type fuzzy time series. At time t, the corresponding data fuzzy set A t and the corresponding error fuzzy set E t are used as fuzzy pairs (A t , E t ). Assume A t+1 state corresponding to the current state (A t , E t ),then set up ARMA(1,1) fuzzy logical relationship (AFLR) as The fuzzy set corresponding to the test data is searched for the same fuzzy set in the fuzzy ARMA (1, 1) mapping set that has been established and the predictive fuzzy set is obtained. Then get the predicted value applying formula(7) and formula (8). If (A t , E t ) is not found in the fuzzy ARMA (1,1) mapping, search the data fuzzy set A t in FLRs and get the predicted value. 4. Simulation. In this section, we verify the effectiveness and advantages of the proposed method by forecasting the stock prices of SBI from Jun. 5 to Jul. 31, 2012, and by forecasting the packet disordering. Finally comparison results are shown to manifest the proposed method's superiority.

4.1.
Predicating the stock price of SBI. We apply ARMA(1,1) type fuzzy time series proposed in this paper to predicate the stock price of SBI from Jun. 5 to Jul. 31, 2012, and compare the predicted values of our proposed method with the real values and the predicted values of [4], [18] and [16] Table 2. First, calculate the rate of change applying formulas (2), the results are shown in the third column of Table 2.
Then, Define and divide the universe of discourse, according to the method in Section 3.2. We first calculate the distance between each datum applying formula (3), then calculate the value of average d, applying formula (4), the result is average d = 0.2149. According to the automatic clustering algorithm in the second step of Section 3.2, we cluster the rate of change into clusters. According to the third step of Section 3.2, we define and divide the universe of discourse (U i ). The U i and the midpoints (m i ) of each interval shown as follows: The fuzzy sets A 1 , A 2 , · · · , A n can be defined on U by general triangular membership functions (5). The first-order fuzzy logical relationships can be set up as Section 3.3, and the fuzzified values can be divided into different fuzzy logical relationship sets (FLRs) shown as follows: The predicted values are calculated by using the midpoints of the universe of discourse and the formula (8), and calculate the errors between the real values and the forecast values using the formula (9). 4.1.2. Set up ARMA(1,1) type fuzzy time series. The prediction errors calculated in Section 4.1.1 is divided into 14 universes of discourse E i , according to the method of Section 3.2. Then. we establish the AFLR using (A t , E t ) and based on the method in Section 3.6. The AFLRs are shown as follows: Based on the clusters in Section 4.1.1 and the AFLRs above, we predicate the stock prices of SBI by using the method in Section 3.6. The results are shown in Table 2 M Calculate the mean square error (MSE) applying the formula (10) . The comparison of the forecasting results are shown in Table 3. We can see that the proposed method provides the smallest MSE than other methods. In Fig 1, we compare the predicted values of the proposed method with those of other methods more directly.  It can be seen that the method of this paper is not only simple, but also has a small error and high precision. It is more suitable for promotion.

4.2.
Predicating the packet disordering. In this section, the ARMA(1,1) type fuzzy time series is applied to predict the packet disordering, and the predicted values of the proposed method are compared with the real values and these of other method. It further validates that the ARMA (1,1) type fuzzy time series model proposed in this paper can be applied more widely.
In this study, actual packets are sent applying internet control message protocol (ICMP). The source host (like a sensor) sends out a series of ICMP echo requests to the destination host (like a actuator), and the destination host returns ICMP echo replying messages with delays called RTTs. An ICMP echo message is regarded as an exploring packet. In the experiment, a common source host in the Northeast University is used. The destination host is www.yahoo.com. RTTs are collected as time delays by applying the modified ping program. The probing packet size was set 32 bytes in the experiment [12]. 4.2.1. Setting up first-order fuzzy time series. First, calculate the rate of change applying formula(2), then calculate the distance between each datum applying formula(3), and calculate the value of average d applying the formula (4), the result is average d = 0.65. Next, applying the method in Step 2 in Section 3.2, the rate of change is clustered. Finally, applying the method in Step 3 in Section 3.2, the clusters are transformed into the universes of discourse, and the midpoint in each universe of discourse is calculated. Set up fuzzy sets applying the general triangular membership functions (5). The first-order fuzzy logical relationships can be set up applying the method in Section 3.3, and the fuzzified values can be divided into different FLRS. Calculate predicted values, applying formula (8), and calculate the errors according to formula (9)  Next, the future 300-step disordering displacement values are predicted, applying Definition 2.3. The predicted time delays and displacement values are separately shown in Fig 3. From Fig 3, we can see that the rest of the predictions are consistent with the real values in addition to a misjudgment and an omission. The prediction disordering displacement values of ARMA(1,1) type fuzzy time series can relatively correspond to reality.

5.
Conclusion. This paper combines fuzzy time series with ARMA(1,1) model, improves its prediction algorithm, and applies it to predict the stock price of SBI from Jun. 5 to Jul. 31 and the packet disordering prediction of network control. From the comparison of the predicted results, it can be seen that the method proposed in this paper greatly improves the prediction accuracy and creates a new field of fuzzy time series prediction. Because of the limited level, there are some deficiencies in the selection of data, and we will improve the means of data selection in the future and attempt to create multivariate fuzzy time series model.