# Networked Control System Time-Delay Compensation Based on Time-Delay Prediction and Improved Implicit GPC

^{*}

## Abstract

**:**

## 1. Introduction

## 2. LS-SVM Time-Delay Prediction Model

_{sc}, the controller to the actuator time delay τ

_{ca}and the controller calculated time delay τ

_{c}, shown as in Figure 1.

_{sc}(k) can be measured, and the controller to actuator time delay τ

_{ca}(k) and controller computing time τ

_{c}(k) are unknown, but just moments before k is known, so the historical time delay can be used to predict the current network time delay. In the networked control system discussed in this paper, the controller and actuator are event driven, and the sensor is clock-driven; therefore, the forward and feedback channel time delay of networked control system can be combined for analysis [13]. The system total delay can be expressed as τ(k) = τ

_{ca}(k) + τ

_{sc}(k) + τ

_{c}(k). Because the time delay can be combined for analysis, the total system time delay τ(k) can be predicted through an appropriate prediction model.

_{t}

_{,}

_{n}−min X

_{t}

_{,}

_{n}), t = 1,2,…,n, S is the standard deviation, H is the Hurst parameter and A is a constant. Given the chart of the relationship between lg(R/S)

_{n}about lg n, the least squares method is used for calculating the slope, and then, the slope is Hurst parameter.

_{i}, y

_{i}}, i = 1, 2,⋯, N be a training set, based on the risk minimization principle; the regression problem can be expressed as a constrained optimization problem:

_{i}is a time-delay input set, y

_{i}is a time-delay output prediction set, x

_{i}and y

_{i}can be expressed as x

_{i}=[d

_{i}d

_{i}

_{+1}⋯ d

_{i}

_{+}

_{m}

_{−1}], y

_{i}= [d

_{i}

_{+}

_{m}] and m is the embedding dimension; and the current time and past m − 1 time-delay value can be used to predict the next time-delay value of the system. λ is the regularization parameter. b is the constant value deviation. The Lagrange function can be established to solve the above optimization problem:

_{i}is the Lagrange multiplier. Calculate the partial differential of w, b, e, a, and simplify it; then, the next equation can be obtained:

_{i},y

_{i}}, Equation (6) is used to calculate parameters a and b, at the same time. When the given set x combines with the actual training set x

_{i}, the following equation can be used to calculate y, the prediction output of the system.

^{2}, but the selection of two parameters lacks uniform standards and theoretical guidance; therefore, the selection of LS-SVM parameters is an unsolved problem [19]. At the same time, for the time-delay prediction problem, the embedding dimension m is an important parameter also; m that is too small will reduce the prediction accuracy; m that is too large will increase the computational complexity. The following Tables 1–3 give the mean square error (MSE) comparison of three different values of the parameters.

^{2}achieve the optimal values at the same time.

## 3. Genetic Algorithm

#### 3.1. Individual Coding

^{2}. The individual design is shown in Figure 4: the former n

_{1}bits represent m; the middle n

_{2}bits represent γ; the later n

_{3}bits represent σ

^{2}.

#### 3.2. Population Initialization

#### 3.3. Fitness Function

^{2}, so that it can improve the prediction precision of the delay; thus, the fitness function is related to the accuracy of the time-delay prediction model. Set the i-th group time-delay prediction mean square error as:

_{i}is the actual value and ${\widehat{y}}_{i}$ is the LS-SVM prediction value of the i-th time-delay. For easy calculating, the i-th prediction time-delay fitness function directly uses the mean square error:

#### 3.4. The Design of the Genetic Operator

#### 3.5. GA Optimized LS-SVM Time-Delay Prediction Method

- Step 1: Confirm the original character space of the optimized parameters, and the initial evolution algebra is zero.
- Step 2: Code the parameters m, γ, σ
^{2}. - Step 3: Generate h individual initial populations.
- Step 4: Convert the time-delay sequence, which is the original length, into the input and output matrix, according to x
_{i}=[d_{i}d_{i}_{+1}⋯ d_{i}_{+}_{m}_{−1}], y_{i}=[d_{i+m}] The LS-SVM algorithm is used to train and predict according to the parameters γ, σ^{2}, recording every group time-delay prediction accuracy and each individual fitness value. - Step 5: Choose the best R prediction performance individual for the next generation, and for the other individual, carry out the selection, crossover and mutation operators, producing a new population. The evolution algebra is increased one.
- Step 6: Judge whether this meets the end conditions, and if it meets them, jump to Step 7 or return to Step 4 otherwise.
- Step 7: Output the best individual m, γ, σ
^{2}, and adopt the optimum m, γ, σ^{2}as the LS-SVM algorithm parameters to build up the time-delay prediction model. Output the best prediction value.

## 4. Improved Implicit GPC Time-Delay Compensation Algorithm

_{min}≤ d(k) ≤ d

_{max}is the whole time-delay of the NCS; u(k) is the input; y(k) is the output; v(k) is the interference; and a

_{i}(k), b

_{i}(k), c

_{i}(k) are the time-varying parameters of the system.

#### 4.1. The Identification of the Time-Varying Parameters

^{2}I, θ(0) = 0, δ

^{2}is a sufficiently large constant and I is the unit matrix. Through the above method, the time-varying parameters a

_{i}(k), b

_{i}(k), c

_{i}(k) of the system can be identified.

#### 4.2. Improved Implicit GPC

_{r}(k + j) is the input reference trajectory. The GPC algorithm calculates y(k + j), needed to solve the Diophantine equation. To avoid complex calculation, an improved implicit GPC algorithm is presented in this paper. This algorithm directly identifies the controller parameters and does not need to solve the inverse matrix of the GPC algorithm. The algorithm, given the d

_{th}optimal prediction value, is:

- Step 1: Set the initial value.
- Step 2: Update the input time-delay sequence, and put the newest measurement of the time delay into the time-delay sequence.
- Step 3: The GA-optimized LS-SVM algorithm is used to estimate the network time delay at the current time.
- Step 4: Identify time-varying parameters through the prediction time delay by Equations (16) and (17).
- Step 5: Calculate the optimal prediction value by Equation (18).
- Step 6: Calculate the current real control value by Equations (31).
- Step 7: According to Equation (32), the control value
**u**(k + n | k) is calculated and sent to the actuator; - Step 8: Repeat Step 2 to Step 7 until the end of the simulation.

## 5. Simulation

^{2}is 10 bits; the m value range is from one to 20; the γ value range is from 0.01 to 1000; the σ

^{2}value is range from 0.01 to 100; after GA optimized, m = 9, γ = 339.8592 and σ

^{2}= 2.347; the MSE is 1.26 for the actual and predicted time delay. Figure 7 is the curve of fitness. Figure 8 is a 100 groups’ comparison of the predicted and actual time delay. Figure 9 shows the comparison of the predicted and actual time delay with auto regression (AR) algorithm in the literature [13]; the order of p is nine; the MSE is 10.2791 for the actual and predicted time delay. From the contrast in Figure 8, Figure 9 and the MSE, it can be shown that the time-delay prediction precision of the GA-optimized LS-SVM prediction method is better than the AR algorithm in the literature [13].

## 6. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Tian, Z.-D.; Gao, X.-W.; Li, K. A Hybrid Time-delay Prediction Method for Networked Control System. Int. J. Autom. Comput.
**2014**, 11, 19–24. [Google Scholar] - Lü, J.-H.; Chen, G.-R. A time-varying complex dynamical network model and its controlled synchronization criteria. IEEE Trans. Autom. Control.
**2005**, 50, 841–846. [Google Scholar] - Vatanski, N.; Georges, J.P.; Aubrun, C.; Rondeau, E.; Jämsä-Jounela, S.L. Networked control with delay measurement and estimation. Control Eng. Pract.
**2009**, 17, 231–244. [Google Scholar] - Qi, X.-M.; Zhang, C.-J.; Gu, J. Robust fault detection filter for non-linear state-delay networked control system. Int. J. Autom. Control.
**2012**, 6, 215–230. [Google Scholar] - Shi, Y.; Huang, J.; Yu, B. Robust tracking control of networked control systems: Application to a networked DC motor. IEEE Trans. Ind. Electron.
**2013**, 60, 5864–5874. [Google Scholar] - Xu, F.-X.; Cheng, Y.; Ren, H.-L.; Wang, S.-L. Research on Adaptive Neural Network Control System Based on Nonlinear U-Model with Time-Varying Delay. Math. Probl. Eng.
**2014**, 2014, 420713. [Google Scholar] - Han, C.-W.; Fuzzy, Neural; Network-based, Time. Delay Prediction for Networked Control Systems. Appl. Math Inf. Sci.
**2014**, 8, 407–413. [Google Scholar] - Yang, R.-N.; Liu, G.-P.; Shi, P.; Thomas, C.; Basin, M.V. Predictive output feedback control for networked control systems. IEEE Trans. Ind. Electron.
**2014**, 61, 512–520. [Google Scholar] - Song, H.-B.; Liu, G.-P.; Yu, L. Networked predictive control of uncertain systems with multiple feedback channels. IEEE Trans. Ind. Electron.
**2013**, 60, 5228–5238. [Google Scholar] - Yu, W.-W.; Chen, G.-R.; Lü, J.-H. On pinning synchronization of complex dynamical networks. Automatica
**2009**, 45, 429–435. [Google Scholar] - Zhou, J.; Lu, J.-A.; Lü, J.-H. Pinning adaptive synchronization of a general complex dynamical network. Automatica
**2008**, 44, 996–1003. [Google Scholar] - Yu, W.-W.; Chen, G.-R.; Lü, J.-H.; Kurths, J. Synchronization via pinning control on general complex networks. SIAM J. Control Optim.
**2013**, 51, 1395–1416. [Google Scholar] - Shi, W.-G.; Shao, C.; Sun, Z.-Y. Improved GPC network-control algorithm based on AR model time-delay prediction. Control Decis.
**2012**, 27, 470–480, In Chinese. [Google Scholar] - Tang, B.; Liu, G.-P.; Gui, W.-H.; Wang, Y.-L. State-space model based generalized predictive control for networked control systems, Proceedings of 17th IFAC World Congress, Seoul, Korea, 6–11 July 2008; pp. 13006–13001.
- Liu, G.-P.; Xia, Y.-Q.; Chen, J.; Rees, D.; Hu, W.-S. Networked predictive control of systems with random network delays in both forward and feedback channels. IEEE Trans. Ind. Electron.
**2007**, 54, 1282–1297. [Google Scholar] - Tran, Q.N.; Özkan, L.; Backx, A. Generalized predictive control tuning by controller matching. J. Process Control.
**2015**, 25, 1–18. [Google Scholar] - Tian, Z.-D.; GAO, X.-W.; Li, K. Networked control system time-delay compensation algorithm based on predictive control. Syst. Eng. Electron.
**2013**, 35, 2165–2169, In Chinese. [Google Scholar] - Pan, J.-S.; Hong, M.-Z.; Zhou, Q.-F.; CAI, J.-Y.; Wang, H.-Z.; Luo, L.-K.; Yang, D.-Q.; Dong, J.; Shi, H.-X.; Ren, J.-L. Integrated application of uniform design and least-squares support vector machines to transfection optimization. BMC Biotechnol.
**2009**, 9, 52–57. [Google Scholar] - Ayat, N.E.; Cheriet, M.; Suen, C.-Y. Automatic model selection for the optimization of the SVM kernels. Pattern Recognit.
**2005**, 38, 1733–1745. [Google Scholar] - Qi, H.-L.; Zhao, H.; Liu, W.-W.; Zhang, H.-B. Parameters optimization and nonlinearity analysis of grating eddy current displacement sensor using neural network and genetic algorithm. J. Zhejiang Univ. Sci. A
**2009**, 10, 1205–1212. [Google Scholar] - Xiang, C.-S.; Zhou, Z.-Y. A joint optimization algorithm and its application in chaotic time series prediction. J. Cent. South Univ. (Sci. Technol.)
**2012**, 43, 581–587. [Google Scholar]

m | γ | σ^{2} | MSE |
---|---|---|---|

2 | 10 | 0.001 | 9.0126 |

4 | 10 | 0.001 | 4.6340 |

6 | 10 | 0.001 | 1.8533 |

8 | 10 | 0.001 | 1.9399 |

10 | 10 | 0.001 | 1.9049 |

m | γ | σ^{2} | MSE |
---|---|---|---|

4 | 1 | 0.001 | 58.7254 |

4 | 10 | 0.001 | 4.6340 |

4 | 100 | 0.001 | 2.9191 |

4 | 1,000 | 0.001 | 2.8989 |

4 | 10,000 | 0.001 | 2.8987 |

m | γ | σ^{2} | MSE |
---|---|---|---|

4 | 10 | 0.001 | 4.6340 |

4 | 10 | 0.01 | 4.4829 |

4 | 10 | 0.1 | 4.9062 |

4 | 10 | 1 | 12.6718 |

4 | 10 | 10 | 28.6581 |

© 2015 by the authors; licensee MDPI, Basel, Switzerland This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Tian, Z.-D.; Li, S.-J.; Wang, Y.-H.; Yu, H.-X.
Networked Control System Time-Delay Compensation Based on Time-Delay Prediction and Improved Implicit GPC. *Algorithms* **2015**, *8*, 3-18.
https://doi.org/10.3390/a8010003

**AMA Style**

Tian Z-D, Li S-J, Wang Y-H, Yu H-X.
Networked Control System Time-Delay Compensation Based on Time-Delay Prediction and Improved Implicit GPC. *Algorithms*. 2015; 8(1):3-18.
https://doi.org/10.3390/a8010003

**Chicago/Turabian Style**

Tian, Zhong-Da, Shu-Jiang Li, Yan-Hong Wang, and Hong-Xia Yu.
2015. "Networked Control System Time-Delay Compensation Based on Time-Delay Prediction and Improved Implicit GPC" *Algorithms* 8, no. 1: 3-18.
https://doi.org/10.3390/a8010003