# Power System Voltage Correction Scheme Based on Adaptive Horizon Model Predictive Control
## 2 Voltage Control Model Based on MPC  
### Voltage Prediction  
MPC finds a sequence of control actions applied within the control horizon in order to achieve the control objectives within the prediction horizon considering equality and inequality constraints. At each sampling point, only the first step of the so-computed sequence is applied. The principle of MPC is shown in Figure 1. The length of the control horizon and prediction horizon are \(t_{\mathrm{c}}\) and \(t_{\mathrm{p}}\) respectively. \(t_{\mathrm{s}}\) is the sampling interval. \(N_{\mathrm{c}}\) and \(N_{\mathrm{p}}\) are the number of sampling intervals within the control horizon and prediction horizon respectively, \(t_{\mathrm{c}}=N_{\mathrm{c}}t_{\mathrm{s}}\), \(t_{\mathrm{p}}=N_{\mathrm{p}}t_{\mathrm{s}}\). Real-time optimization requires reliable and quick decisions. A linear model based on trajectory analysis is applied to predict the trajectory of the system with different control sequences. The discrepancies arising from the model mismatch problems and system uncertainties can be resolved by the closed-loop feature of the centralized MPC-based controller [2]. The trajectory sensitivity analysis can provide valuable insights evaluating the effects of slight control variations on the system evolution. The detailed theory and analytical basis of trajectory sensitivity is discussed in [20]. The system model can be expressed by the differential-algebraic Equations (DAE) (1) and (2) subject to some constraints, the detailed introduction of the DAE model can be found in [1]. \[\dot{x} =f(x,y,u) \tag{1}\] \[0 =g(x,y,u) \tag{2}\]  
where \(x\) is the vector of state variables, which is related to the generator and its regulation system, the load recovery behavior et al., \(y\) is the vector of algebraic variables such as active and reactive powers \(P\) and \(Q\), voltage magnitudes \(V\) and phase angles \(\theta\), \(y\) = [\(P\), \(Q\), \(V\), \(\theta\)]. \(u\) is the vector of control variables. In this paper, the set points of automatic voltage regulators (AVR), the switching of shunt capacitors and the position of on-load tap changers (OLTCs) are considered as candidate control actions. The sensitivity Equations (3) and (4) are obtained by differentiating (1) and (2) with respect to \(u\). \[\dot{x}_{u}(t)=f_{x}(t)x_{u}(t)+f_{y}(t)y_{u}(t)+f_{u}(t) \tag{3}\]  
Figure 1: The principle of model predictive control. \[0=\mathbf{g}_{\mathbf{x}}(t)\mathbf{x}_{\mathbf{u}}(t)+\mathbf{g}_{\mathbf{y}}(t)\mathbf{y}_{\mathbf{u}}(t)+\mathbf{g}_ {\mathbf{u}}(t) \tag{4}\]  
where \(\mathbf{y}_{\mathbf{u}}(t)\) is composed of the trajectory sensitivity of all the algebraic variables with respect to the candidate control variables at a time instant \(t\), which can be obtained by solving (3) and (4). \(\mathbf{y}_{\mathbf{u}}(t)=[\mathbf{P}_{\mathbf{u}}(t),\,\mathbf{Q}_{\mathbf{u}}(t),\,\mathbf{V}_{\mathbf{u}}(t),\,\theta_{\mathbf{u}}(t)]\). When the time domain simulation of the system (1) and (2) is based on the trapezoidal numerical integration, the Jacobian obtained during the numerical integration process is the same as the coefficient matrix of solving the sensitivity Equations (3) and (4). When the result of time domain simulation is obtained, the calculation of trajectory sensitivity involves little extra computation [20]. When control action \(\Delta u\) is applied, the corresponding voltage variation at a sampling point \(k\) can be approximately expressed as \(\Delta\hat{V}_{k}=V_{u}(t_{n}+kt_{s})\Delta u\), \(V_{u}(t_{n}+kt_{s})\) is the voltage trajectory sensitivity at sampling point \(k\) with respect to control \(u\), and also one of the elements that constitute \(\mathbf{y}_{\mathbf{u}}(t)\).