# Data-Driven Voltage Control in Isolated AC Microgrids Subject to Sensor Saturation
## 3 The DAILC Algorithm of Voltage Control Subject to Sensor Saturation
### Design of The DAILC Algorithm  
ILC is an efficient control strategy that enhances system performance significantly by analyzing historical data and iteratively adjusting control gains, effectively utilizing experiences from past control cycles to optimize current control performance. Typically, ILC is well-suited for tasks involving periodic, repetitive control processes. However, microgrid control systems operate under continuous control. Clearly, the original model (7) cannot be directly applied to microgrids. Therefore, based on the concept of microgrid iterative learning [35], this study makes the following targeted modifications to the model (7):  
\[\tilde{z}_{si}(\bar{\kappa}+1,\tilde{\rho})-\tilde{z}_{si}(\bar{\kappa},\tilde {\rho})=\aleph_{i}(\bar{\kappa},\tilde{\rho})(\tilde{v}_{si}(\bar{\kappa}, \tilde{\rho})-\tilde{v}_{si}(\bar{\kappa}-1,\tilde{\rho}))+\Delta\bar{h}_{i}( \bar{\kappa},\tilde{\rho}). \tag{7}\]  
Let \(\tilde{\rho}\) as the virtual iteration period, where \(\tilde{\rho}\) assumes integer values ranging from \(1\) to \(T\). The objective of this paper is to achieve voltage restoration in a microgrid, containing DGs, under conditions of sensor saturation and external disturbances, without requiring detailed model information of the microgrid. Ultimately, an adaptive iterative learning tracking controller based on input-output data is designed, ensuring that all DGs can maintain voltage levels close to nominal values. The objective of distributed voltage control is to adjust the voltage of all DGs to a predefined reference value [36]. To this end, this paperexplores a consensus control approach based on distributed pinning strategies. Initially, a reference node (also referred to as the leader node) \(\tilde{\varepsilon}_{0}(\tilde{\kappa})\) is introduced to capture the desired dynamic characteristics of the reference. Within this framework, the local neighborhood pinning error \(\tilde{t}_{i}(\tilde{\kappa},\tilde{\rho})\) can be described as follows:  
\[\tilde{t}_{i}(\tilde{\kappa},\tilde{\rho})=\sum_{j\in N_{i}}a_{ij}\Big{(} \tilde{\varepsilon}_{ij}(\tilde{\kappa},\tilde{\rho})-\tilde{\varepsilon}_{ si}(\tilde{\kappa},\tilde{\rho})\Big{)}+o_{i}(\tilde{\varepsilon}_{0}( \tilde{\kappa})-\tilde{\varepsilon}_{si}(\tilde{\kappa},\tilde{\rho})). \tag{8}\]  
where \(a_{ij}\) denotes the elements within the adjacency matrix \(\mathcal{A}\), and \(o_{i}\geq 0\) represents the pinning gain for the \(i\)-th DG. If DG \(i\) is connected to the virtual leader node, then \(o_{i}>0\). Otherwise, it is set to the nominal value \(o_{i}=0\). The \(\tilde{\varepsilon}_{0}(\tilde{\kappa})\) is considered the nominal value. To achieve consistent tracking solely using input-output data, this paper presents the implementation of a DAILC algorithm that integrates sensor saturation and disturbances, expressed as follows:  
\[\tilde{o}_{i}(\tilde{\kappa},\tilde{\rho})=\tilde{o}_{i}(\tilde{\kappa}, \tilde{\rho}-1)+\frac{\beta_{1}\hat{N}_{i}(\tilde{\kappa},\tilde{\rho})}{ \delta_{1}+\left|\hat{N}_{i}(\tilde{\kappa},\tilde{\rho})\right|^{2}}\tilde{t }_{i}(\tilde{\kappa}+1,\tilde{\rho}-1) \tag{9}\]  
where \(\hat{N}_{i}(\tilde{\kappa},\tilde{\rho})\) denotes the estimated value of the pseudo-derivative \(\hat{N}_{i}(\tilde{\kappa},\tilde{\rho})\). Additionally, \(\delta_{1}\) represents a weighting factor with positive characteristics, while \(\beta_{1}\) serves as a control parameter, the design of which is detailed later. To design a voltage recovery controller under conditions of sensor saturation, this study employs a distributed model-free iterative learning algorithm that relies solely on information from neighboring DREGUs. In devising the control strategy, we introduce pinning error \(\tilde{t}_{i}(\tilde{\kappa},\tilde{\rho})\), which encompasses not only the discrepancies with neighbors but also deviations from preset target values. By integrating these errors with PPDs, the microgrid voltage is effectively restored to its rated value based solely on the use of input-output data.