A Fruit Fly-Optimized Kalman Filter Algorithm for Pushing Distance Estimation of a Hydraulic Powered Roof Support through Tuning Covariance

To measure the pushing distance of a hydraulic-powered roof support, and reduce the cost from a non-reusable displacement sensor embedded in pushing a hydraulic cylinder, an inertial sensor is used to measure the pushing distance, and a Kalman filter is applied to process the inertial data. To obtain better estimation performance, an improved fruit fly optimization algorithm (IFOA) is proposed to tune the parameters of the Kalman filter, processing noise covariance Q and observation noise covariance R. The key procedures of the proposed method, including state-space model, fitness function, and Kalman filter implementation, are presented. Finally, an artificial signal is utilized to verify the feasibility of the proposed method, and the tuning results of other algorithms, particle swarm optimization (PSO), genetic algorithm (GA), basic FOA, and 3D-FOA are compared. The proposed method is also applied in the pushing distance estimation scenario. The simulation and application results prove the effectiveness and superiority of the proposed method.


Introduction
As an essential equipment in a fully-mechanized coal mining working face [1], a hydraulic powered roof support connects with the scraper chain conveyor through the pushing link.Since the cutting machine rides on the scraper chain conveyor, it is evident that the straightness of the scraper chain conveyor directly affects the working efficiency of cutting machine [2], while the straightness is determined by the pushing distance, which is produced by the hydraulic powered roof support.The pushing distance is defined as the distance that the pushing link moves forward or backward.At present, the pushing distance is measured by a displacement sensor which is embedded in the hydraulic pushing cylinder to avoid being exposed in extreme conditions.
However, there are some fatal drawbacks of this approach.The displacement sensor, embedded into the hydraulic pushing cylinder, is non-replaceable due to the cumbersome mechanical structure and its unmaintainable installation method.As a consequence, it will be totally disabled once the sensor is broken, and the sensor cannot be replaced until all of the mining tasks are finished.Moreover, the method has poor accuracy, because the pushing distance is obtained either by using the pushing length of the hydraulic pushing cylinder directly, or calculated via trigonometry transformation.Both of the above methods produce large system errors.Thus, a novel pushing distance estimation approach, with comprehensive consideration of both estimation accuracy and extreme condition constraints, is much needed.
Inertial sensors are widely applied in navigation [3], robotics [4], and virtual reality [5], etc., due to their positive characteristics, such as being lightweight, their low power consumption, portability, and self-contained nature [6].They were originally proposed for aircraft navigation systems in the 1930s [7].Later, inertial sensors are growing popular both in scientific research and entertainment technologies.The scientific studies are not limited to applications [8], but also to their performance [9].Research on their performance improvement [10] and calibration analysis [11] provide more accurate estimation technologies for these interesting applications, e.g., equine lameness examinations [12], human arm motion tracking [13], and quantifying the evaluation of warfighter performance [14], etc.Although inertial sensors are successfully used in many fields, the application on displacement estimation is still a great challenge due to the cumulative errors [15].As improvements in inertial sensors and rapid development of signal processing methods continue, inertial sensors also provide a possibility for operation in some extreme conditions without accuracy requirements, e.g., a fully-mechanized coal mining working face.
The Kalman filter was proposed for linear filtering and prediction problems by Kalman in 1960 [16].It is a state estimator based on a state-space model [17].The Kalman filter is frequently used for inertial information processing due to uncertainty problems [18], including position estimation [19], as well as rotation estimation [20].For non-linear problems, researchers also proposed some mutation of the Kalman filter, e.g., the extended Kalman filter [21], unscented Kalman filter [22], etc.In recent years, the Kalman filter has also been applied in intelligent computation [23], as well as information fusion through distributed [24] or parallel [25] approaches.In addition to these applications, the Kalman filter contributes to magnetometer calibration [26], moving object tracking [27], and satellite attitude determination [28], as well.Unfortunately, the estimation performance of the Kalman filter is greatly influenced by the selection of the processing covariance matrix Q and the observation (measurement) covariance matrix R [29], and the research on tuning Q and R is very valuable [30].Thus, optimization algorithms should be applied to obtain better estimation performance through tuning the covariance.
Optimization algorithms have significant influence on computational performance.Recently, some interesting and efficient naturally-inspired optimization algorithms have been proposed.Krill herd (KH) was proposed by Gandomi and Alavi in 2012 [31].Based on the innovation, other algorithms, such as chaotic KH [32], stud KH [33], hybrid KH [34], chaotic particle-swarm KH [35], multi-stage KH [36], and opposition-based KH [37], etc., are successively developed.These algorithms are so efficient and flexible that they can be improved either by internal improvement, such as introducing a new migration operator [38] and a new information exchange process [39], or by combining other algorithms together, such as quantum-behaved particle swarm algorithms [40] and cuckoo search algorithms [41], etc. Monarch butterfly optimization (MBO) [42] and MBO-based algorithms [43,44] are also recently developed meta-heuristic algorithms, which simulate the migration of monarch butterflies.Other similar algorithms, moth search algorithms [45], earthworm optimization algorithms [46], cuckoo search algorithms [47,48], bat algorithms [49,50] and firefly algorithms [51,52], etc., also simulate the natural motion process and have contributed greatly to intelligent optimization algorithms in recent years.
Among these intelligent optimization algorithms, the fruit fly optimization algorithm (FOA) is a brand new intelligent optimization algorithm, which has a rapid convergence rate and easy implementation, proposed by Pan in 2012 [53].FOA simulates the intelligent foraging behavior of a fruit fly group in a food-finding process [54], which combines olfactory and vision searching methods [55].It has been widely applied in financial parameter optimization [56], forecasting [57], scheduling [58], etc.However, like other optimization algorithms, the basic FOA has the possibility of falling into local extremes, and it is difficult to jump out [55].
Bearing the above observations in mind, inertial sensors are utilized to measure the inertial information of a pushing link, and an improved fruit fly algorithm optimized Kalman filter (FOA-KF) is proposed to process the inertial information.To make it easy for jumping out of the local extreme, the basic FOA is modified by adding a perturbation intensity through a predict-update mechanism when falling into a local extreme.A simulation and application for the pushing distance estimation proves the effectiveness and superiority of the proposed method.
The rest of this paper is organized as follows: In Section 2, preliminaries of Kalman filter and basic FOA are presented.In Section 3, the framework of proposed method is described and an improved FOA is applied to optimize the Kalman filter covariance.In Section 4, an artificial inertial signal is estimated to verify the effectiveness and superiority of the proposed method, and an application of pushing distance estimation is performed.Some conclusions and outlooks are summarized in Section 5. Bearing the above observations in mind, an inertial sensor is utilized to measure the inertial information of the pushing link, and an improved fruit fly algorithm optimized Kalman filter (FOA-KF) is proposed to process the inertial information.To make it easier for jumping out of the local extreme, the basic FOA is modified by adding a perturbation intensity through a predict-update mechanism when falling into a local extreme.A simulation and application for the pushing distance estimation proves the effectiveness and superiority of the proposed method.

Kalman Filter
Generally, the Kalman filter can be described in two stages: firstly, one-step prediction; and secondly, measurement correction.Considering the discrete-time dynamic model of pushing distance estimation, the state vector is x k = [p k , v k ] T , which indicates the current pushing distance and pushing velocity.The observation y k is the measured displacement.The details of mathematics are described as following steps. (

1) Prediction
The new best estimation is predicted using the previous best estimation (priori estimation), the process equation is: x where the state vector x− k is the prior estimation at time k and x+ k−1 is the posterior estimation at time k − 1; A k is the transition matrix; B k is control matrix; u k is the known control input; and w k is the processing noise, a zero-mean Gaussian processing noise with covariance Q = E(w k • w T k ).Since the processing equation contains processing noise w k .The error covariance matrix of priori estimation is added by processing the noisy covariance matrix, as shown in following equation: Similarly, P − k is the prior error covariance at time k and P + k−1 is the posteriori error covariance at time k − 1.The processing noise covariance Q is the processing noise covariance and needs to be tuned. (

2) Correction
The correction stage is essential for refining estimation with measurements.The measurement equation is shown as follows: where H k is the observation matrix.v k is the zero-mean Gaussian measurement noise with covariance The observation noise covariance R is unknown and waiting for tuning.
To correct estimation with measurement, the Kalman gain is very important to propagate the recursive procedure.The Kalman gain is: Then, based on the Kalman gain and measurements, the posterior estimation can be calculated as follows: Finally, the posterior error covariance is reassigned as follows: The processing noise covariance and observation noise covariance are set through experience, which sometimes leads to large estimation error.To tackle this problem, both Q and R should be optimized via varying estimation algorithms.

Fruit Fly Optimization Algorithm
The fruit fly optimization algorithm is inspired by the food-searching mechanism of a fruit fly swarm due to the fact that the fruit fly is superior to other species in vision and osphresis.The fruit flies in a swarm send and receive information from neighbors, compare the current location and fitness, and fly toward the food with better fitness.The global optimization can be obtained via an appropriate iteration, as shown in Figure 1, and the standard foraging process of FOA can be summarized as follows.
where k H is the observation matrix.k v is the zero-mean Gaussian measurement noise with covariance The observation noise covariance R is unknown and waiting for tuning.
To correct estimation with measurement, the Kalman gain is very important to propagate the recursive procedure.The Kalman gain is: Then, based on the Kalman gain and measurements, the posterior estimation can be calculated as follows: ˆˆ( ) Finally, the posterior error covariance is reassigned as follows: ( ) The processing noise covariance and observation noise covariance are set through experience, which sometimes leads to large estimation error.To tackle this problem, both Q and R should be optimized via varying estimation algorithms.

Fruit Fly Optimization Algorithm
The fruit fly optimization algorithm is inspired by the food-searching mechanism of a fruit fly swarm due to the fact that the fruit fly is superior to other species in vision and osphresis.The fruit flies in a swarm send and receive information from neighbors, compare the current location and fitness, and fly toward the food with better fitness.The global optimization can be obtained via an appropriate iteration, as shown in Figure 1, and the standard foraging process of FOA can be summarized as follows.Step 1.1: Key initial parameters, population size PS, maximum generation number (maximum iterations) iter max , and location range parameter LR are generated.The initial location of the fruit fly swarm is represented as follows: Step 1.2: Individual fruit fly uses osphresis to search food, and the searching direction is randomly generated as follows: where FR is the fruit fly distance range.
Step 1.3: Since the food location cannot be known, the distance to the origin of coordinates Dist i and the smell concentration judgment value S i are calculated as follows: Step 1.4:The best fruit fly with maximum smell concentration searches for food according to the smell concentration judgment function (also known as fitness function), which is represented as follows: where bestSmell denotes the maximal smell concentration, bestIndex is the corresponding fruit fly number, and Smell is the smell concentration set of the group.
Step 1.5: Compare the smell concentration with the previous best smell concentration; if it is better than the last generation, update the current best location as follows: Otherwise, go back to Step 1.2 to find other better smell concentrations.
Step 1.6:If the searching process reaches the maximum generation number, the procedure will be terminated, otherwise, repeat Step 1.2 to Step 1.5.This optimization algorithm is very efficient to reach the global optimization, but it is also easy to fall into a local optimization.

Proposed Method
In this section, an improved FOA (IFOA) is proposed to avoid falling into a local extremum.The IFOA is applied to tune the parameters of the Kalman filter, i.e., processing noise covariance Q and observation noise covariance R. The whole procedure of pushing distance estimation based on the fruit fly algorithm-optimized Kalman filter (IFOA-KF) is presented.

The Proposed IFOA
The basic FOA is very efficient in finding the global optimization, while it is a common problem to fall into local extremum.To tackle this problem, Wang [59] adds a random perturbation to jump out of the local extremum, while the perturbation intensity is chosen randomly.Suppose that the basic FOA may fall into local optimum 1, as shown in Figure 2: a perturbation with high intensity may change the current location to another local optimum 2. While an appropriate perturbation intensity may reach to global optimum.In order to tackle this problem, the proposed IFOA utilizes a predict-update mechanism to determine if the perturbation intensity should be added or not.If the flag variable bPredict is true, the proposed IFOA should add the perturbation and predict the next location.If the flag variable bPredict is false, then go directly to the next step.To set the flag variable, the objective values with or without perturbation intensity should be compared.If the objective with perturbation intensity is better, then apply this perturbation intensity.If not, then set current perturbation intensity to zero, namely, without perturbation intensity.Thus, the perturbation intensity can be chosen via the following conditions: where f (•) is the objective function to be minimized.As shown above, if random perturbation ∆w = ∆w 1 , and f (∆w 1 ) < f (0), then the predicted random perturbation can be accepted and added to the current location, the next location may be a point near the global optimum or another local optimum.If random perturbation ∆w = ∆w 2 , and f (∆w 2 ) > f (0), then the predicted random perturbation can be rejected, which means the procedure just uses the original location.By recursive execution of this step, the final global optimum will be located.To adaptively set the perturbation intensity, varying adaptive methods can be applied, while this is beyond the research scope of the paper.Finally, the flowchart of IFOA is shown in Figure 3, and the whole procedure contains two parts: predict and update.The algorithm can be described in the following steps.
Step 2.1: Initialize all of the parameters, maximum iterative steps, population size, and location range of the fruit fly group, as well as the initial perturbation intensity ∆w.
Step 2.2: Randomly choose the location of the fruit fly group, and check the flag of the prediction procedure which indicates whether the random perturbation should be used.If using the prediction procedure, reset the flag, and add the perturbation with intensity ∆w.If not, go directly to the next step.
Step 2.3: Obtain a smell concentration judgment, and calculate the fitness function using the original distance with or without perturbation.
Step 2.4: If the result of the fitness produced using the original distance with perturbation is better, update the current location of individuals by the disturbed locations.Otherwise, skip to the next step.
Step 2.5: If the fitness value from the fruit fly with the best smell is better than that of the previous generation, then the global and local optimum can be updated.Otherwise, set the prediction flag to TRUE, and update the global and local optimum.
Step 2.6: If the current iterative procedure output meets the requirement, stop the searching process; if not, go back to Step 2.2.
From the figure and the above description, the prediction procedure, which determines the perturbation intensity, can be implemented from Step 2.2 to Step 2.3, and the update procedure, which updates the current location with the predicted perturbation intensity, can be implemented through Step 2.4 to Step 2.5.
procedure, reset the flag, and add the perturbation with intensity w.If not, go directly to the next step.
Step 2.3: Obtain a smell concentration judgment, and calculate the fitness function using the original distance with or without perturbation.
Step 2.4: If the result of the fitness produced using the original distance with perturbation is better, update the current location of individuals by the disturbed locations.Otherwise, skip to the next step.
Step 2.5: If the fitness value from the fruit fly with the best smell is better than that of the previous generation, then the global and local optimum can be updated.Otherwise, set the prediction flag to TRUE, and update the global and local optimum.
Step 2.6: If the current iterative procedure output meets the requirement, stop the searching process; if not, go back to Step 2.2.
From the figure and the above description, the prediction procedure, which determines the perturbation intensity, can be implemented from Step 2.2 to Step 2.3, and the update procedure, which updates the current location with the predicted perturbation intensity, can be implemented through Step 2.4 to Step 2.5.

The Optimized Kalman Filter Based on IFOA(IFOA-KF)
The tuning parameters, processing noise covariance Q , and observation noise covariance R indicate the uncertainty of the prediction model and the correction model, respectively.Both the processing noise covariance and observation noise covariance are unknown and need to be tuned for better estimation performance.Q is notoriously difficult but it helps to inject uncertainty into the state equations and assist the filter to learn from the measurement.There are three different options

The Optimized Kalman Filter Based on IFOA(IFOA-KF)
The tuning parameters, processing noise covariance Q, and observation noise covariance R indicate the uncertainty of the prediction model and the correction model, respectively.Both the processing noise covariance and observation noise covariance are unknown and need to be tuned for better estimation performance.Q is notoriously difficult but it helps to inject uncertainty into the state equations and assist the filter to learn from the measurement.There are three different options for Q tuning: (1) scalar quantity; (2) diagonal matrix; and (3) full matrix.In this paper, since the processing noise is mainly contributed by acceleration [60], Q is optimized as a scalar quantity.Observation matrix H k is a vector because the measured variable is the current pushing distance, thus, R is also a scalar quantity.As shown in Figure 4, the offline Kalman filter tuning procedure based on IFOA is presented, and the block diagram of the proposed method can be described as follows.
(1) State-Space Model Firstly, the state-space model of pushing distance estimation, as shown in Figure 4A, should be constructed.The state-space model can be represented by two equations: a processing equation and an observation equation.The processing equation of pushing distance estimation is obtained as follows: By linearization of above equation and comparing it with Equation (2), parameters of the processing model can be constructed.
and u k is the acceleration a k .
Since the only measurable state variable is displacement p k , the observation equation is shown as follows: Then, the observation matrix is vector based on IFOA is presented, and the block diagram of the proposed method can be described as follows.
(1) State-Space Model Firstly, the state-space model of pushing distance estimation, as shown in Figure 4A, should be constructed.The state-space model can be represented by two equations: a processing equation and an observation equation.The processing equation of pushing distance estimation is obtained as follows: By linearization of above equation and comparing it with Equation (2), parameters of the processing model can be constructed.
and k u is the acceleration k a .
Since the only measurable state variable is displacement k p , the observation equation is shown as follows: Then, the observation matrix is vector  (2) Fitness Function As analyzed in subsection 4.1, to apply IFOA in pushing distance estimation, the fitness function is the key point to tune the Kalman filter.In this paper, the fitness function is obtaining a better set of Q and R values resulting in lower mean squared error from the output of the Kalman filter.Thus, the fitness function of the tuning process is calculated as follows: where x is the current posterior estimation of the pushing distance, x is the real state of the pushing distance estimation system, and ( )  E are expectation operations, which obtain the sum of (2) Fitness Function As analyzed in subsection 4.1, to apply IFOA in pushing distance estimation, the fitness function is the key point to tune the Kalman filter.In this paper, the fitness function is obtaining a better set of Q and R values resulting in lower mean squared error from the output of the Kalman filter.Thus, the fitness function of the tuning process is calculated as follows: where x is the current posterior estimation of the pushing distance, x is the real state of the is the input port of the Kalman filter observation model, and the input port and output port are connected to each other.
(2) Fitness Function As analyzed in Section 4.1, to apply IFOA in pushing distance estimation, the fitness function is the key point to tune the Kalman filter.In this paper, the fitness function is obtaining a better set Appl.Sci.2016, 6, 299 9 of 18 of Q and R values resulting in lower mean squared error from the output of the Kalman filter.Thus, the fitness function of the tuning process is calculated as follows: where x + k is the current posterior estimation of the pushing distance, x is the real state of the pushing distance estimation system, and E(•) are expectation operations, which obtain the sum of the mean squared error.
(3) Kalman Filter The block diagram, as shown in Figure 4C, shows all of the procedures of a basic Kalman filter.In this paper, the acceleration signal obtained through the inertial sensor is treated as the control input u k .The measured displacement obtained through the built-in electro-hydraulic control system of the hydraulic powered roof support is the observable variable y k .During the parameter tuning process, the estimated state produced by the Kalman filter and the real state produced by the state-space model go through the fitness function, and obtain the mean square error.The mathematical description of the Kalman filter is presented as Equation ( 1) to Equation ( 6).
The flowchart of the proposed method, as shown in Figure 5, is presented and the pseudo-code is demonstrated as follows:

Simulation and Application
In this section, the proposed IFOA-KF is applied to a simulation with an artificial signal.The application of pushing distance estimation is demonstrated as well.

Simulation with an Artificial Signal
For this simulation, we attempt to track the pushing distance with a Kalman filter, whose Firstly, the parallel model for pushing distance tracking is constructed using MATLAB (Matlab 2016b, Torrance, CA, USA), as shown in following Figure 6.The input acceleration is a sinusoidal function: u k = g • sin( k ⁄5), where g is a constant variable and given as g = 9.81.We simulate the process noise w and measurement noise v with random functions.Then, the simulated parameters go through the parallel plant model based on the state-space model described in Equations ( 12) and ( 13).The true output of the model is y, the measurement with measurement noise is y n , and the estimation using the Kalman filter is y e .Equations ( 12) and ( 13).The true output of the model is y , the measurement with measurement noise is n y , and the estimation using the Kalman filter is e y .Secondly, create the fitness function, which utilizes the above parallel model to simulate the measurement and estimation.Then calculate the mean squared error using Equation (12).
Finally, the simulation results can be obtained via the following configurations, which is listed in following Table 1: In this simulation, the parameters set for the FOA and 3D-FOA are the same.Some key parameters are given: maximum generations is 100, population size is 20, location range is [−1.0, 1.0], and food range is [−3.1, 3.1], etc.For the proposed IFOA, all of the parameters are the same as the FOA and 3D-FOA except the perturbation intensity w.In this simulation, perturbation intensity is given as a fixed value 3.1.To complete the optimization using GA, the MATLAB genetic algorithm toolbox is used, and the function (GAOPTIMSET) is utilized to set all of the options about GA evolution.For the simulation using PSO, import parameters should also be set properly, and the details about the parameters are listed in Table 3.Secondly, create the fitness function, which utilizes the above parallel model to simulate the measurement and estimation.Then calculate the mean squared error using Equation (12).
Finally, the simulation results can be obtained via the following configurations, which is listed in following Table 1: For comparison, four other optimization algorithms are also implemented and the comparison of the results are shown in Table 2.In this simulation, the parameters set for the FOA and 3D-FOA are the same.Some key parameters are given: maximum generations is 100, population size is 20, location range is [−1.0, 1.0], and food range is [−3.1, 3.1], etc.For the proposed IFOA, all of the parameters are the same as the FOA and 3D-FOA except the perturbation intensity ∆w.In this simulation, perturbation intensity is given as a fixed value 3.1.To complete the optimization using GA, the MATLAB genetic algorithm toolbox is used, and the function (GAOPTIMSET) is utilized to set all of the options about GA evolution.For the simulation using PSO, import parameters should also be set properly, and the details about the parameters are listed in Table 3.The proposed FOA obtained the minimal mean squared error (MSE) (0.020527), while GA and PSO obtained larger errors, and their calculation time is rather larger than the other three algorithms based on FOA.Especially, the basic FOA is the fastest, but is subtly rough to find the global optimal compared to the proposed method and 3D-FOA.Compared to 3D-FOA, the proposed FOA performed better both in the estimation accuracy and the computational time, since the covariances are optimized offline.Despite the proposed FOA being more complex than the basic FOA, it is still the best choice after a comprehensive tradeoff.
The estimation results of the pushing distance, as displayed in Figure 7, show that FOA, 3D-FOA, and the proposed FOA perform much better than PSO and GA, which is presented in the bottom-right due to the different magnitude of the estimated pushing distance.From the pushing distance estimation results, the difference between FOA, 3D-FOA, and the proposed FOA are not obvious.While the estimation errors, as shown in Figure 8, are capable of revealing the difference, the estimation errors of GA and PSO, as shown in the bottom-right figure, are quite large (MSE of GA PSO are 0.26777 and 0.39747, respectively).The proposed FOA, with the lowest MSE = 0.020527, is the most efficient.The proposed FOA obtained the minimal mean squared error (MSE) (0.020527), while GA and PSO obtained larger errors, and their calculation time is rather larger than the other three algorithms based on FOA.Especially, the basic FOA is the fastest, but is subtly rough to find the global optimal compared to the proposed method and 3D-FOA.Compared to 3D-FOA, the proposed FOA performed better both in the estimation accuracy and the computational time, since the covariances are optimized offline.Despite the proposed FOA being more complex than the basic FOA, it is still the best choice after a comprehensive tradeoff.
The estimation results of the pushing distance, as displayed in Figure 7, show that FOA, 3D-FOA, and the proposed FOA perform much better than PSO and GA, which is presented in the bottom-right due to the different magnitude of the estimated pushing distance.From the pushing distance estimation results, the difference between FOA, 3D-FOA, and the proposed FOA are not obvious.While the estimation errors, as shown in Figure 8, are capable of revealing the difference, the estimation errors of GA and PSO, as shown in the bottom-right figure, are quite large (MSE of GA PSO are 0.26777 and 0.39747, respectively).The proposed FOA, with the lowest MSE = 0.020527, is the most efficient.

Application in Pushing Distance Estimation
In addition to the simulation, the proposed method is also applied to the application of pushing distance estimation, based on the real parameters of the hydraulic pushing cylinder, theoretically, the velocity and the pushing distance of the pushing link.In this application, we use a high-precision displacement sensor to measure the pushing distance.The built-in electro-hydraulic control system of a hydraulic powered roof support is used to obtain the observable pushing distance.An inertial sensor is used to measure the inertial information of the pushing link.The detail of the equipment configuration is shown in Table 4.The inertial sensor, as shown in Figure 9A, is mounted on the pushing link, and the displacement sensor is installed along the direction of pushing operation.The theoretical pushing distance, velocity, and acceleration, as shown in Figure 9B, reveals the basic movement features of the pushing distance.The measured pushing distance from the high-precision displacement sensor, computed velocity via differential equation, and the measured acceleration by the inertial sensors are also presented.

Application in Pushing Distance Estimation
In addition to the simulation, the proposed method is also applied to the application of pushing distance estimation, based on the real parameters of the hydraulic pushing cylinder, theoretically, the velocity and the pushing distance of the pushing link.In this application, we use a high-precision displacement sensor to measure the pushing distance.The built-in electro-hydraulic control system of a hydraulic powered roof support is used to obtain the observable pushing distance.An inertial sensor is used to measure the inertial information of the pushing link.The detail of the equipment configuration is shown in Table 4.The inertial sensor, as shown in Figure 9A, is mounted on the pushing link, and the displacement sensor is installed along the direction of pushing operation.The theoretical pushing distance, velocity, and acceleration, as shown in Figure 9B, reveals the basic movement features of the pushing distance.The measured pushing distance from the high-precision displacement sensor, computed velocity via differential equation, and the measured acceleration by the inertial sensors are also presented.Through the proposed IFOA-KF, the measured acceleration can be used to estimate pushing distance, as shown in Figure 10.The IFOA optimized the processing and observation covariance, and the final optimized parameters are listed in Table 5.

Covariances Values
For a pushing operation of the hydraulic powered roof support, the maximum pushing distance, theoretically, should be 500 mm, as shown in Figure 10A.If the proposed IFOA-KF is not utilized, the directly computational result (the blue curve) will be terribly affected by cumulative errors, and the estimated pushing distance increases rapidly to an unreasonable magnitude.By using the proposed IFOA-KF, the estimated pushing distance, the green curve, is rather close to the real measured pushing distance.Figure 10B also presents the details of the estimation performance at the final stage of the pushing operation.It can be seen that the cumulative error is very limited.Through the proposed IFOA-KF, the measured acceleration can be used to estimate pushing distance, as shown in Figure 10.The IFOA optimized the processing and observation covariance, and the final optimized parameters are listed in Table 5.For a pushing operation of the hydraulic powered roof support, the maximum pushing distance, theoretically, should be 500 mm, as shown in Figure 10A.If the proposed IFOA-KF is not utilized, the directly computational result (the blue curve) will be terribly affected by cumulative errors, and the estimated pushing distance increases rapidly to an unreasonable magnitude.By using the proposed IFOA-KF, the estimated pushing distance, the green curve, is rather close to the real measured pushing distance.Figure 10B also presents the details of the estimation performance at the final stage of the pushing operation.It can be seen that the cumulative error is very limited.With careful design of the application conditions, the final estimation error can be perfectly reduced; as shown in Figure 11, the error of measurement is 14.7467, while the estimation error of the proposed IFOA-KF is only 1.0425.Thus, the application proves the special performance of the proposed method.

Conclusions and Future Work
To tackle the measurement problem of the pushing distance for a hydraulic-powered roof support, this paper proposed an improved fruit fly optimization algorithm (IFOA) to fine-tune processing the noise covariance and observation noise covariance of a Kalman filter, and the optimized Kalman filter is applied to estimate the pushing distance.In the proposed IFOA, the perturbation with a certain intensity is added to the current searching location to avoid the local optimum.Moreover, the flowchart of the IFOA is presented, and the details, state-space model, fitness function, and Kalman filter implementation procedure are demonstrated.To verify the performance of the proposed method, other optimization algorithms (GA, PSO, basic FOA, and 3D-FOA) are utilized to process a simulated artificial signal.A comparison of the results proved the effectiveness and superiority of the proposed method.Finally, the proposed IFOA-KF is applied for pushing distance estimation, and the estimation results also proved the state-of-art performance of the proposed IFOA-KF.With careful design of the application conditions, the final estimation error can be perfectly reduced; as shown in Figure 11, the error of measurement is 14.7467, while the estimation error of the proposed IFOA-KF is only 1.0425.Thus, the application proves the special performance of the proposed method.With careful design of the application conditions, the final estimation error can be perfectly reduced; as shown in Figure 11, the error of measurement is 14.7467, while the estimation error of the proposed IFOA-KF is only 1.0425.Thus, the application proves the special performance of the proposed method.

Conclusions and Future Work
To tackle the measurement problem of the pushing distance for a hydraulic-powered roof support, this paper proposed an improved fruit fly optimization algorithm (IFOA) to fine-tune processing the noise covariance and observation noise covariance of a Kalman filter, and the optimized Kalman filter is applied to estimate the pushing distance.In the proposed IFOA, the perturbation with a certain intensity is added to the current searching location to avoid the local optimum.Moreover, the flowchart of the IFOA is presented, and the details, state-space model, fitness function, and Kalman filter implementation procedure are demonstrated.To verify the performance of the proposed method, other optimization algorithms (GA, PSO, basic FOA, and 3D-FOA) are utilized to process a simulated artificial signal.A comparison of the results proved the effectiveness and superiority of the proposed method.Finally, the proposed IFOA-KF is applied for pushing distance estimation, and the estimation results also proved the state-of-art performance of the proposed IFOA-KF.

Conclusions and Future Work
To tackle the measurement problem of the pushing distance for a hydraulic-powered roof support, this paper proposed an improved fruit fly optimization algorithm (IFOA) to fine-tune processing the noise covariance and observation noise covariance of a Kalman filter, and the optimized Kalman filter is applied to estimate the pushing distance.In the proposed IFOA, the perturbation with a certain intensity is added to the current searching location to avoid the local optimum.Moreover, the flowchart of the IFOA is presented, and the details, state-space model, fitness function, and Kalman filter implementation procedure are demonstrated.To verify the performance of the proposed method, other optimization algorithms (GA, PSO, basic FOA, and 3D-FOA) are utilized to process a simulated artificial signal.A comparison of the results proved the effectiveness and superiority of the proposed method.Finally, the proposed IFOA-KF is applied for pushing distance estimation, and the estimation results also proved the state-of-art performance of the proposed IFOA-KF.
This work is very valuable for pushing distance estimation, and solves the problem of a non-reusable displacement sensor on a fully-mechanized coal mining working face.However, the error elimination is still a challenge.Our future work will focus on optimization of the error elimination, and applying this approach to other similar scenarios, such as inertial sensor information estimation, Kalman-based position tracking, and supporting height estimation of hydraulic supports, etc.

Figure 1 .
Figure 1.Food searching process of a fruit fly swarm.Dist i indicates distance to the original coordinates, and smell i indicates the smell concentration.

Figure 2 .
Figure 2. Principle of random perturbation with different perturbation intensity.Suppose the next location without perturbation is a point near local optimum 1.The next location with perturbation intensity ∆w 1 is a point near the global optimum.The next location with perturbation intensity ∆w 2 is a point near local optimum 2. The objective is to minimize the objective function f (•).

Figure 4 .
Figure 4. Block diagram of the offline Kalman filter tuning procedure based on IFOA; (A) the statespace model of pushing distance estimation; (B) the diagram of proposed IFOA; (C) the basic Kalman

Figure 4 .
Figure 4. Block diagram of the offline Kalman filter tuning procedure based on IFOA; (A) the state-space model of pushing distance estimation; (B) the diagram of proposed IFOA; (C) the basic Kalman filter.Appl.Sci.2016, 6, 299 9 of 19 is the output port of the state-space model; Appl.Sci.2016, 6, 299 9 of 19 filter.Measurement is the output port of the state-space model; Measurement is the input port of the Kalman filter observation model, and the input port and output port are connected to each other.

Figure 6 .
Figure 6.Parallel model for pushing distance tracking with varying optimization methods.

Figure 6 .
Figure 6.Parallel model for pushing distance tracking with varying optimization methods.

Figure 7 .
Figure 7.The estimation results of pushing distance using different optimization algorithms with an artificial signal.Figure 7. The estimation results of pushing distance using different optimization algorithms with an artificial signal.

Figure 7 .
Figure 7.The estimation results of pushing distance using different optimization algorithms with an artificial signal.Figure 7. The estimation results of pushing distance using different optimization algorithms with an artificial signal.

Figure 8 .
Figure 8.The estimation error of different optimization algorithms.

Figure 8 .
Figure 8.The estimation error of different optimization algorithms.

Figure 9 .
Figure 9. Experiment configuration and data collection.(A) The sensor installation on the hydraulic powered roof support; and (B) the theoretical data and measured data.

Figure 9 .
Figure 9. Experiment configuration and data collection.(A) The sensor installation on the hydraulic powered roof support; and (B) the theoretical data and measured data.

Figure 10 .
Figure 10.Estimation results of the application; (A) the pushing distance estimation of the whole procedure; and (B) the details of the pushing distance estimation.

Figure 10 .
Figure 10.Estimation results of the application; (A) the pushing distance estimation of the whole procedure; and (B) the details of the pushing distance estimation.

Figure 10 .
Figure 10.Estimation results of the application; (A) the pushing distance estimation of the whole procedure; and (B) the details of the pushing distance estimation.

Table 2 .
Comparison of the estimation results produced by different algorithms.

Table 2 .
Comparison of the estimation results produced by different algorithms.