Accuracy Improvement of Attitude Determination Systems Using EKF-Based Error Prediction Filter and PI Controller

Accurate attitude and heading reference system (AHRS) play an essential role in navigation applications and human body tracking systems. Using low-cost microelectromechanical system (MEMS) inertial sensors and having accurate orientation estimation, simultaneously, needs optimum orientation methods and algorithms. The error of attitude estimation may lead to imprecise navigation and motion capture results. This paper proposed a novel intermittent calibration technique for MEMS-based AHRS using error prediction and compensation filter. The method, inspired from the recognition of gyroscope’s error and by a proportional integral (PI) controller, can be regulated to increase the accuracy of the prediction. The experimentation of this study for the AHRS algorithm, aided by the proposed prediction filter, was tested with real low-cost MEMS sensors consists of accelerometer, gyroscope, and magnetometer. Eventually, the error compensation was performed by post-processing the measurements of static and dynamic tests. The experimental results present about 35% accuracy improvement in attitude estimation and demonstrate the explicit performance of proposed method.


Introduction
In the last decade, the development of the strap-down inertial navigation systems (INS) in various applications, such as unmanned aerial vehicles (UAV), missile guidance, body tracking systems, and underwater automatic vehicles, has led to the essential need to design low-weight, low-cost, and low-power-consumption INS with reliable and robust accuracy. With advancements in microelectromechanical system (MEMS) technologies, using the MEMS-based inertial measurement units (IMU) has become more prevalent due to their low-cost, low power consumption, and small size [1]. The main objective of AHRS is to estimate how the orientation of body frame relates to the navigation frame, which can be shown by quaternion vector or Euler angles. For researchers, the difficulties of the system are related to obtaining the nondivergent output and avoiding the error accumulation, which may come due to the time-integration of gyroscope outputs [1,2].
One of the most substantial problems in AHRS using the MEMS-based IMU is their dependency on drift and measurement errors, which lead to divergence of attitude and heading error over long time experiments. This paper presented a new method for predicting and bounding the AHRS error. The method attempted to anticipate the behavior of the error using mathematical investigation on the gyroscope's drift. Consequently, the error of each channel, namely roll, pitch, and yaw were estimated in low-amplitude signals. Also, a regulator was considered that consisted of a constant shifter and Sensors 2020, 20, 4055 3 of 16 CF and Kalman-based algorithms is accounted for by the EKF, with better results in attitude and position estimations. The authors of [20] compared Mahony and Madgwick and demonstrated that there is no significant difference between them. Apart from the mentioned filter-based AHRS algorithms, some researches have investigated the use of integration of AHRS with GPS signals to estimate more precise Euler angles. The method has shown significant results in airspace applications, but the method is significantly affected by pseudorange measurements of GPS and cannot respond to GPS-challengeable situations [21][22][23].

EKF Model and Parameters
There are different orientation representations between the body and navigation frame. This paper considered the quaternion-based equations because of their nonsingularity and lower computation complexity compared to directed cosine matrix (DCM) with nine integration equations [12,24]. The system model of EKF, defined with state vector x k , is formulated in Equation (1).
where q 1 , q 2 , q 3 , and q 4 are the elements of quaternion vector of q = q 1 + q 2 → k , and model matrix of F k is defined as Equations (2) and (3). ω is the rotation angle for a time step, and matrix µ is the skew symmetric of quaternion form of angular velocity vector [12,25].
For the measurement model, the magnetometer and acceleration data are considered as the EKF measurement, as defined in Equation (4). H k is the measurement matrix, and z k consists of two elements, namely the normalized specific force and normalized horizontal component of the geomagnetic field. The first one is achieved from acclerometer and the second one from magnetometer output [12,25].
where s b and m b are considered as s b = s b s b and m b = a × b [12]. The b and n subscripts show the body and navigation coordinates. The m b is calculated from cross-product of vectors a and b. This calculation is necessary because the geomagnetic field is not parallel to the earth. Fortunately, the obtained m b is parallel to the magnetic north [12]. Parameters a and b are defined in Equations (5) and (6) [12].
As mentioned before, the measurement model predicts the gravitational acceleration and geomagnetism in the body frame. The predicted measurement is included two elements of g b and m b which are obtained from Equation (7). The horizontal element of m b is considered as the magnetometer measurement [12].ẑ The conversion matrix C b n between navigation to body frame is obtained from predicted quaternion states with following the Equation (8). The simplified form of measurement matrix is considered in Equation (9) [12,25].
Determination of the EKF parameters is required before the designing process. The important parameters of EKF are the measurements of noise covariance R k , process noise covariance Q k , and the initialization parameters comprised of initial states vector x 0 and initial error covariance P 0 . Initialization considers the initial orientation of the system, which can be characterized as wahba's problem. The most effective approach to the problem is the triad algorithm [26][27][28][29][30]. The algorithm deliniates the angle between two nonparallel vectors. To initialize the attitude determination system, the gravitional acceleration of the two vectors and the magnetic field of the earth are defined as, and m, respectively. The vectors are obtained from transforming the magnetometer and accelerometer's output from the body frame to the navigation frame with multiplying each one with C n b [26][27][28][29]. Two orthogonal matrices, from the body frame and from the navigation frame, are determined to calculate the transformation matrix of C b n for attitude initialization. The orthogonal matrices are defined as M b and M n , which are calculated as Equations (10) and (11) [12].
M n = g n g n g n ×m n g n ×m n ( g n g n ) × ( g n ×m n g n ×m n ) , According to the fact that M n = C n b M b and C n b = M n M T b , the C n b is calculated as the matrix in Equation (12).
Eventually, the parameters of quaternion vactor for the attitude initialization, q(0), are obtained in Equations (13) and (14), as explained completely by the authors of [31].
After the initialization of the states vector x 0 and the error covariance matrix P 0 , EKF needs to update the estimated states and estimated covariances. The measurement noise covariance was selected to vary with time with regard to α, which is the magnitude of the angle between the estimated gravitional acceleration, g n , and the measured specific force, s b [12]. The measurement noise covariance Sensors 2020, 20, 4055 5 of 16 matrix, R k , in Equation (15), consists of the measured noise covariances of the acceleration and magnetometer sensors [12].
where U changes as a results of the variation in α. The weight value, K r , and the constant shifter, K c , satisfy the performance accuracy of the attitude estimation algorithm [12].
The matrix Q is defined in Equation (17), assuming that the gyroscope uses the white gaussian noise model [25]. The proposed EKF with the time-varying noise covariance was considered for the attitude estimation in the AHRS. In the following section, the main innovation of this study regarding to prediction and compensation filter is described in detail.

Materials and Methods
The method considered in this study was based on the error prediction filter, which uses the output of AHRS algorithm inspired by proposed EKF-based method proposed by the authors of [12]. The mentioned AHRS algorithm was chosen due to its adaptability, precision, and time-varying noise covariance. The main objective of the proposed method was to improve the accuracy of the AHRS algorithms. Also, the designed filter can work with all kinds of orientation estimation methods. The attitude error prediction filter are described in Section 3.1, and the PI controller and regulator are described in Section 3.2.
The complete idea of paper is demonstrated in Figure 1. A 9-DoF MEMS-based IMU, consisting of accelerometers, gyroscopes, and magnetometers, was connected to the quaternion-based EKF system. The system used the gyroscopes data in the error prediction filter. Also, the accelerometer and magnetometer data were defined as EKF measurements. The quaternion-based EKF, as the state vector of the system, considered the four-dimensional quaternion vector. After the estimation of the state vector by EKF, the quaternions were transformed to Euler angles of roll, pitch, and yaw. As the initialization of the EKF was required, the initialization process is described in Section 2.1. As presented in Figure 1, the prediction error filter needs the gyroscope's angular rates to estimate and predict the orientation error. In the following steps, PI controller and regulator tune the filter output to obtain more accurate compensation.

Attitude Error Prediction Filter
The attitude error model is characterized as Equation (18), comprised of the roll error (δϕ), pitch error (δθ), and yaw error (δψ). The model depends on the conversion matrix between the body and the navigation frames, error of the angular velocity in the body frame, and the proportions of attitude in time step k.
where Ψ N = δϕ δ δψ T and δω B IB are the vector of error for the angular rate measurement from gyroscope, and ω N IN × is the skew symmetric form of the angular velocity vector in the navigation frame.
Sensors 2020, 20, 4055 described in Section 3.2. The complete idea of paper is demonstrated in Figure 1. A 9-DoF MEMS-based IMU, consisting of accelerometers, gyroscopes, and magnetometers, was connected to the quaternion-based EKF system. The system used the gyroscopes data in the error prediction filter. Also, the accelerometer and magnetometer data were defined as EKF measurements. The quaternion-based EKF, as the state vector of the system, considered the four-dimensional quaternion vector. After the estimation of the state vector by EKF, the quaternions were transformed to Euler angles of roll, pitch, and yaw. As the initialization of the EKF was required, the initialization process is described in Section 2.1. As presented in Figure 1, the prediction error filter needs the gyroscope's angular rates to estimate and predict the orientation error. In the following steps, PI controller and regulator tune the filter output to obtain more accurate compensation.

Figure 1.
Overview of the attitude and heading reference system (AHRS) method with error prediction filter, proprtional integral (PI) controller, and regulator.

Attitude Error Prediction Filter
The attitude error model is characterized as Equation (18), comprised of the roll error ( φ), pitch error ( ), and yaw error ( ). The model depends on the conversion matrix between the body and the navigation frames, error of the angular velocity in the body frame, and the proportions of attitude in time step k.
where = [δφ δϴ δψ] and are the vector of error for the angular rate measurement from gyroscope, and × is the skew symmetric form of the angular velocity vector in the navigation frame. For the simplification of the equations, we assumed that the error of the angular velocity from the gyroscope was near to zero. Equation (18) can be reduced to Equation (21), as shown below: To solve this integration equation, the trapezoidal method was considered. The right side of the equation, as a time-varying function f t, Ψ N , can be rewritten as the following Equation [24]: By approximating the Equation (24), the final discretized formula of Ψ N in the time step k can be calculated by Equation (25). The block diagram of the attitude error prediction filter is shown in Figure 2.
Herein, the filter needs to be initialized with the amounts of Ψ N 0 and . Ψ N 0 . Also, h is the system sampling time step. The initial amount of attitude error can be selected from the drift bias value in the specification of the gyroscope, and the initial change rate of attitude error can be a zero vector. The obtained Ψ N can be countinuous again as the error prediction signal.
Sensors 2020, 20, 4055 Herein, the filter needs to be initialized with the amounts of 0 and ̇0 . Also, h is the system sampling time step. The initial amount of attitude error can be selected from the drift bias value in the specification of the gyroscope, and the initial change rate of attitude error can be a zero vector. The obtained can be countinuous again as the error prediction signal.

PI Controller and Regulator
The calculated error signal ( ) is the prediction of the attitude error in three channels, namely roll, pitch and yaw. The proper PI controller can support the prediction while responding to the highfrequency changes in the error. Also, it can adjust the prediction to the estimated attitude from EKF system. The regulator, as a constant shifter, can regulate the final signal aligned to the estimated attitude. The standard form of PI controller was defined as Equation (26).

PI Controller and Regulator
The calculated error signal Ψ N (t) is the prediction of the attitude error in three channels, namely roll, pitch and yaw. The proper PI controller can support the prediction while responding to the high-frequency changes in the error. Also, it can adjust the prediction to the estimated attitude from EKF system. The regulator, as a constant shifter, can regulate the final signal aligned to the estimated attitude. The standard form of PI controller was defined as Equation (26).
Therefore, the estimated Ψ N from the error prediction filter is the PI controller input. The final anticipated error signal after using the regulator was calculated by: where the (•) is Hadmard (element-wise) product of vectors; parameters of K P_1 , K P_2 , and K P_3 are the proportion gains of PI controller; parameters of K I_1 , K I_2 , and K I_3 are the derivative gain of each channel; and ε 1 , ε 2 , and ε 3 are three constant values for the regulation of each roll, pitch, and yaw channel. If the final regulated signal is considered as two parts (the PI part and the regulator part), the signal can be rewritten as: The elements of the regulator vector were obtained from each bias signal according to the fact that their mean value should be zero over the experimental duration. The regulator constants were measured for the duration of the recorded data in the post-processing experiments.
The PI controller removes the steady state error, resulting in a standalone proportional controller. However, it may affect the speed of the response. For correcting the outputs of divergent systems using the PI controller, some criterias can be considered, namely rise time, overshooting, and transient response. Some investigation on overal stability of the system may also be needed. Therefore, determining the constant gains of PI controller is dependent on the precision of the sensors, drift of the gyroscopes, and overal stability of the system during the experiment.

Static Tests and Results
Three experiments were performed to validate the proposed method in static mode, and today's orientation determination technology of smartphones were considered as true attitude references. We selected a smartphone as an orientation reference because of their accessibility, MATLAB and Simulink compatibility, and precise orientation estimation in static mode [32]. The iPhone 11 and Samsung S10 were chosen for comparison. These tests were performed on a table in which the main degrees and the true north were marked as −135, −90, −45, 0, 45, 90, 135, and 180 (see Figure 3). The zero degree for the heading test was fixed to the true navigation north. To compare the selected smartphones, three special trajectories were followed by locating both smartphones at the same time in each marked angle to obtain their angle error in static mode. Each trajectory was designed for one of the channels, and the complete experimental test was performed in three different scenarios for each angle. The results of root mean square error (RMSE) for the attitude determiner of each smartphone are shown in Table 1. Because of minimum RMSE for iPhone, this smartphone was chosen as the orientation reference of our experiments. All tests were done using data of IMU from MPU-9250, which, in this study, is referred to as "module." The proposed EKF-based AHRS algorithm was implemented in MATLAB and estimated the final orientation of the module from the recorded data in various durations between 60 s to 100 s. The module was connected to the laptop with a USB cable, and the data of magnetometer, gyroscope, and accelerometer were recorded by the MATLAB-based serial reader. Also, data of iPhone's IMU was recorded in the MATLAB cloud with the "MATLAB mobile" iOS application. The smartphone and module were located on the degree marked table at the same time, one time along the z axis, one time along the y axis, and finally, along the x axis. To obtain more accurate results, the trajectory for each experiment were selected in a way that allowed all angles to be measured. Figure 3 demonstrates marked table for the heading experiment, with the module and the iPhone rotated in the same trajectory on the mentioned marked table. Figures 4 and 5 shows the estimated roll, pitch, and heading angles, respectively. The estimated orientation from the time-varying noise covariance EKF-based AHRS method before and after performing the error prediction filter, PI controller, and regulator are shown. It can clearly be seen that the overall estimation was improved in many periods of time, making the total estimation more accurate. For each experiment, gains of the PI controller and amounts of the regulator are mentioned in the Table 2. (a)  Because of minimum RMSE for iPhone, this smartphone was chosen as the orientation reference of our experiments. All tests were done using data of IMU from MPU-9250, which, in this study, is referred to as "module." The proposed EKF-based AHRS algorithm was implemented in MATLAB and estimated the final orientation of the module from the recorded data in various durations between 60 s to 100 s. The module was connected to the laptop with a USB cable, and the data of magnetometer, gyroscope, and accelerometer were recorded by the MATLAB-based serial reader. Also, data of iPhone's IMU was recorded in the MATLAB cloud with the "MATLAB mobile" iOS application. The smartphone and module were located on the degree marked table at the same time, one time along the z axis, one time along the y axis, and finally, along the x axis. To obtain more accurate results, the trajectory for each experiment were selected in a way that allowed all angles to be measured. Figure 3 demonstrates marked table for the heading experiment, with the module and the iPhone rotated in the same trajectory on the mentioned marked table. Figures 4 and 5 shows the estimated roll, pitch, and heading angles, respectively. The estimated orientation from the time-varying noise covariance EKF-based AHRS method before and after performing the error prediction filter, PI controller, and regulator are shown. It can clearly be seen that the overall estimation was improved in many periods of time, making the total estimation more Sensors 2020, 20, 4055 9 of 16 accurate. For each experiment, gains of the PI controller and amounts of the regulator are mentioned in the Table 2. accurate results, the trajectory for each experiment were selected in a way that allowed all angles to be measured. Figure 3 demonstrates marked table for the heading experiment, with the module and the iPhone rotated in the same trajectory on the mentioned marked table. Figures 4 and 5 shows the estimated roll, pitch, and heading angles, respectively. The estimated orientation from the time-varying noise covariance EKF-based AHRS method before and after performing the error prediction filter, PI controller, and regulator are shown. It can clearly be seen that the overall estimation was improved in many periods of time, making the total estimation more accurate. For each experiment, gains of the PI controller and amounts of the regulator are mentioned in the Table 2.    Parameters of the PI controller and the constants of regulator vector were completely different in every experiment. Each variable had its own scale, as can be interpreted from Table 2. Apart from regulation constant values, which are predictable with mean value of each signal, PI parameters should be selected separately in each experiment. The highest amount of the integral gain was accounted for the pitch with the maximum error, as described in Table 3. For better understanding of the impact of the proposed compensation filter, Figure 6 demonstrates the absolute error between each estimated angle and iPhone reference orientation before and after performing the filter.

Experiment Proportional Gain (K P ) Integral Gain (K I ) Regulation Constant (ε)
Roll experiment Parameters of the PI controller and the constants of regulator vector were completely different in every experiment. Each variable had its own scale, as can be interpreted from Table 2. Apart from regulation constant values, which are predictable with mean value of each signal, PI parameters should be selected separately in each experiment. The highest amount of the integral gain was accounted for the pitch with the maximum error, as described in Table 3. For better understanding of the impact of the proposed compensation filter, Figure 6 demonstrates the absolute error between each estimated angle and iPhone reference orientation before and after performing the filter.  Figure 5. Estimated heading, before and after proposed method compared to the iPhone reference. Parameters of the PI controller and the constants of regulator vector were completely different in every experiment. Each variable had its own scale, as can be interpreted from Table 2. Apart from regulation constant values, which are predictable with mean value of each signal, PI parameters should be selected separately in each experiment. The highest amount of the integral gain was accounted for the pitch with the maximum error, as described in Table 3. For better understanding of the impact of the proposed compensation filter, Figure 6 demonstrates the absolute error between each estimated angle and iPhone reference orientation before and after performing the filter. The proposed method utilized the gyroscope error model and the trapezoidal method to solve the integral equations of the filter, and finally, to obtain the signal of error for each attitude channel. The error signal was adjusted with the PI controller. Also, it was regulated by the regulation constant values, obtained from mean value of signal. The PI controller adjusted the high deviations of attitude and removed the error diverges, and it aligned the predicted error with the error signal. Finally, the regulation constant values removed the bias of the estimated error. The result of RMSE for each attitude channel is mentioned in Table 3. Table 3. RMSE of roll, pitch, and heading before and after the proposed filter in static test.

Channel
Before  The proposed method utilized the gyroscope error model and the trapezoidal method to solve the integral equations of the filter, and finally, to obtain the signal of error for each attitude channel. The error signal was adjusted with the PI controller. Also, it was regulated by the regulation constant values, obtained from mean value of signal. The PI controller adjusted the high deviations of attitude and removed the error diverges, and it aligned the predicted error with the error signal. Finally, the regulation constant values removed the bias of the estimated error. The result of RMSE for each attitude channel is mentioned in Table 3.

Dynamic Test and Results
A dynamic test was designed to validate the performance of the proposed method in a real dynamic situation. A regular ground vehicle was selected to perform the experiment in the marked path. The experiment was performed in a region of Montreal. This time, the orientation reference was measured by a VN-100 Rugged IMU and AHRS board with the specifications pointed in Table 4. The MPU-9250 and VN-100 Rugged AHRS reference were mounted on top of the car, and they were connected to a laptop to record the true and measured data with two USB cables. The VN-100 Rugged board was connected to the VectorNav software as a control center Graphic User Interface (GUI). Figure 7 demonstrates the location and experiment's route with starting and final points and shows the equipment used in this experiment.   The mentioned dynamic accuracy experiment was performed in 250 s. The inertial and magnetic data of the MPU-9250 and the AHRS reference data of VN-100 board were recorded during the experimental path. The experiment's route was selected according to smooth inclination. Figure 8 demonstrates the attitude estimation before and after the proposed method compared to the true reference.
(a) The mentioned dynamic accuracy experiment was performed in 250 s. The inertial and magnetic data of the MPU-9250 and the AHRS reference data of VN-100 board were recorded during the experimental path. The experiment's route was selected according to smooth inclination. Figure 8 demonstrates the attitude estimation before and after the proposed method compared to the true reference.  The mentioned dynamic accuracy experiment was performed in 250 s. The inertial and magnetic data of the MPU-9250 and the AHRS reference data of VN-100 board were recorded during the experimental path. The experiment's route was selected according to smooth inclination. Figure 8 demonstrates the attitude estimation before and after the proposed method compared to the true reference.  Figure 9 illustrates the absolute orientation error before and after the error prediction method. The proposed algorithm had the most significant effect on the heading error, and the error in roll and pitch was decreased. Figure 10 demonstrates that the attitude error prediction filter proposed in this paper could estimate the orientation error. The prediction signal for each channel was obtained after the PI controller and regulation.   Figure 9 illustrates the absolute orientation error before and after the error prediction method. The proposed algorithm had the most significant effect on the heading error, and the error in roll and pitch was decreased. Figure 10 demonstrates that the attitude error prediction filter proposed in this paper could estimate the orientation error. The prediction signal for each channel was obtained after the PI controller and regulation.  Figure 9 illustrates the absolute orientation error before and after the error prediction method. The proposed algorithm had the most significant effect on the heading error, and the error in roll and pitch was decreased. Figure 10 demonstrates that the attitude error prediction filter proposed in this paper could estimate the orientation error. The prediction signal for each channel was obtained after the PI controller and regulation.  These prediction signals were obtained with defining the parameters of PI controller and the regulator. The proportional gain, integral gain, and regulation constant values are defined in the Table 5 for the described dynamic experiment. By determining these parameters as Table 5, the most optimum error prediction signals were obtained. Sensors 2020, 20, These prediction signals were obtained with defining the parameters of PI controller and the regulator. The proportional gain, integral gain, and regulation constant values are defined in the Table 5 for the described dynamic experiment. By determining these parameters as Table 5, the most optimum error prediction signals were obtained. The RMSE was calculated for each orientation channel, as described in Table 6. The static test was more challengeable for the roll and the pitch channels because of more movement along the x and y axes in the designed static experiment. However, due to the dynamic test with ground vehicle, the heading was more affected in this experiment. After performing the proposed AHRS error prediction method, the RMSE result for the roll and the pitch channels were decreased about 80% and 43%, respectively, and the heading's precision improved by approximately 66%.
The Figures 6 and 9 show the results of error compensation. However, it can be seen that in some phases of the trajectories, the attitude errors were not corrected. To analyze this, we need to consider the essence of the PI controller. The PI controller created some oscillations on the output of the system due to the integration part. Therefore, the error prediction system demonstrates the better performance in the overall investigation than in short-term phases. In other words, the PI controller tuned the predicted error signal to have the overall robust and stable attitude, which may have led to the lack of change in some parts.

Channel Proportional Gain (K P ) Integral Gain (K I ) Regulation Constant (ε)
Roll The RMSE was calculated for each orientation channel, as described in Table 6. The static test was more challengeable for the roll and the pitch channels because of more movement along the x and y axes in the designed static experiment. However, due to the dynamic test with ground vehicle, the heading was more affected in this experiment. After performing the proposed AHRS error prediction method, the RMSE result for the roll and the pitch channels were decreased about 80% and 43%, respectively, and the heading's precision improved by approximately 66%. The Figures 6 and 9 show the results of error compensation. However, it can be seen that in some phases of the trajectories, the attitude errors were not corrected. To analyze this, we need to consider the essence of the PI controller. The PI controller created some oscillations on the output of the system due to the integration part. Therefore, the error prediction system demonstrates the better performance in the overall investigation than in short-term phases. In other words, the PI controller tuned the predicted error signal to have the overall robust and stable attitude, which may have led to the lack of change in some parts.

Conclusions
The designed error prediction and compensation filter were implemented and tested with a low-cost IMU module. Two experiments were designed to validate the performance of designed method, one for static and one for dynamic validation. In the static test, the performance was compared to an iPhone smartphone orientation reference, the method demonstrated between 65% and 80% accuracy improvement in all orientation channels. For the dynamic test, the precise AHRS determiner board was selected as a true reference and the experiment was performed with ground vehicle, which showed about 60-80% error deduction in roll and heading, and about 43% accuracy improvement in pitch channel. Consequently, the proposed method demonstrated the significant improvement in the roll and the heading and moderate progress in the pitch estimation.
Although the presented method showed progress in error reduction of all channels in both static and dynamic tests, the error prediction can be modified to use other inertial sensors apart from the gyroscope. Also, because the method extremely depends on parameters of PI controller and regulator, finding a reliable mathematical solution for calculating them can be investigated for more accurate results. Determining the overshooting, overall stability, and other parameters for transfer function of the PI controller can play an active role in designing the prediction filter. Furthermore, the possibility of real-time calibration by estimating the parameters of error prediction filter warrants future investigations. Author Contributions: F.F. designed the algorithm, prepared the literature review, and wrote contents of the paper. R.L.J. contributed to modifying the algorithm and supervising the project. The experiments, simulations, analysis, and final conclusion was performed by F.F. All authors have read and agreed to the published version of the manuscript.