## 2 Problem Formulation
### Distributed Secondary Control Framework for Voltage and Reactive Power  
Since the output voltage of DG is a local variable, the droop-based primary control causes voltage deviations from its nominal value. The voltage droop controller is unable to achieve accurate reactive power sharing among DGs operating in parallel owing to the influence of different line impedances. To overcome the drawbacks of primary control, secondary control is necessary to compensate for voltage deviations as well as maintain reactive power sharing. Conventional control strategy for voltage restoration and reactive power sharing is a centralized architecture, which requires a two-way communication network to collect information from all DGs and then calculate the average value of voltage and reactive power [26]. Such a centralized strategy may cause communication congestion and any single point failure can destroy the stability of the system. Different from the centralized way, this paper designs a MAS-based distributed control scheme which is depicted in Figure 2.  
As illustrated in Figure 2, the voltage and reactive power secondary control scheme proposed in this paper involves the estimation layer and the compensation layer. In the estimation layer, the global average information of voltage and reactive power can be obtained by a state observer employing a MAS-based ternary self-triggered control law (which will be presented in Section 3) in a fully distributed manner and then sent to the compensation layer. In the compensation layer, the reference signal \(V_{i}^{*}\) is adjusted by PI controllers and then sent to the primary control level to realize voltage restoration and reactive power sharing. Unlike the conventional centralized structure, the MAS-based secondary control scheme can regulate the voltage and reactive power in the time scale of seconds, which improves the real-time response capability of the microgrid system. In the estimation layer, the average estimates of voltage and reactive power on \(DG_{i}\) can be defined as \(x_{i}^{AVE}=\left\{V_{i}^{AVE},\ Q_{i}^{AVE}\right\}\). The state observer on \(DG_{i}\) receives its neighbors' estimated information \(x_{j}^{AVE}\) (\(j\in N_{i}\)) via the communication network. Then, the observer updates its own estimates by processing the control input \(u_{i}\) generated by the ternary self-triggered control law with its local voltage and reactive power measurements \(x_{i}=\left\{v_{i}^{\alpha d},\ Q_{i}\right\}\). According to the proving process and related conclusions in [27; 28], when the communication topology is an undirected connected graph and the designed control law ensures the state variables \(x_{i}^{AVE}\) (\(i\)=1,..., \(N\)) to achieve consensus, the average value of voltage and reactive power of overall DGs can be acquired by the state observer, which can be expressed as  
\[\left\{ \begin{array}{l}\lim\limits_{t\rightarrow\infty}V_{i}^{AVE}(t)=\frac{ 1}{N}\lim\limits_{I\rightarrow\infty}\sum\limits_{i=1}^{N}v_{i}^{\alpha d}(t) \\ \lim\limits_{t\rightarrow\infty}Q_{i}^{AVE}(t)=\frac{1}{N}\lim\limits_{I \rightarrow\infty}\sum\limits_{i=1}^{N}Q_{i}(t)\end{array} \right. \tag{6}\]  
where \(i=1,\ \ldots,N\), and \(N\) is the total number of DGs. In the compensation layer, \(DG_{i}\) measures the voltage error and compensates for the voltage deviation caused by the droop technique. The average estimate of reactive power is used as the reference to realize reactive power sharing among DGs. The voltage compensation \(\delta V_{i}\) and reactive power compensation \(\delta Q_{i}\) obtained by the PI controller can be represented as follows  
\[\left\{ \begin{array}{l}\delta V_{i}=\left(K_{PVi}^{AVE}+\frac{K_{IVi}^{AVE}} {s}\right)\left(V_{norm}-V_{i}^{AVE}\right)\\ \delta Q_{i}=\left(K_{PQi}^{AVE}+\frac{K_{IOi}^{AVE}}{s}\right)\left(Q_{i}^{AVE }-Q_{i}\right)\end{array} \right. \tag{7}\]  
where \(K_{PVi}^{AVE}\) and \(K_{IVi}^{AVE}\) are the proportional and integral coefficients of voltage compensation for \(DG_{i}\), respectively.