# An Intelligent Control Strategy for a Highly Reliable Microgrid in Island Mode
## 2 Materials and Methods
### The Control Strategy for The Off-Grid Microgrid
#### 2.3.2 Adoptable Virtual Impedance Based on the Cloudy Model  
In order to make the equivalent output impedances of the inverter consistent, virtual negative resistance and virtual positive inductances are added to offset the circulation problem caused by unbalanced line impedances and reconstruction and make the equivalent output impedance purely inductive. In this paper, the virtual impedance is designed as:  
\[Z_{\varphi}=-R_{\varphi}+j\omega L_{\varphi}, \tag{15}\]  
Among them, \(R_{\varphi}\) is the virtual resistance and \(L_{\varphi}\) is the virtual inductance. Under the function of \(R_{\varphi}\) and \(L_{\varphi}\), the equivalent output impedances of the two inverters are adjusted, so that the equivalent output impedance balance is approximately purely inductive. Since the circulating currents are always changing under the influence of the switching function, and the line impedances are constantly changing under the influence of the environment, the circulating current values are not fixed. If a fixed value of the virtual impedance is used to suppress the changing circulating currents, the suppression effect is poor. The traditional virtual impedance method to suppress circulating current has the characteristics of fixed virtual impedance value and low flexibility. The membership cloud model theory has excellent self-adjustment performance in intelligent control. So an adaptive virtual impedance acquisition algorithm based on the membership cloud model is proposed in this paper, as shown in Figure 4.  
In Figure 4, the numerical input signals are the difference \(e\) and the deviation \(ec\) of the circulation current. The operating principle structure of the membership cloud model includes mainly three parts: cloudification which is used to cloud numerical input signal values, cloud uncertainty reasoning to get the expected output clouds based on uncertainty reasoning rules and obtaining numerical output signals. The first step is cloudification that the numerical input signal values are clouded as follows. A random function \(R(E_{x},\sigma)\) which follows a normal distribution is needed. Parameters \(E_{x}\) and \(\sigma\) in \(R(E_{x},\sigma)\) are the expected value and the standard deviation, respectively. If \(E_{n}\) and \(H_{e}\) are used to denote the expected value and the standard deviation, respectively, a normal random entropy \(E_{n}^{\prime}\) with \(E_{n}\) and \(H_{e}\) is obtained as:  
\[E_{n}^{\prime}=R(E_{n},H_{e}), \tag{16}\]  
Then the cloud droplet \(x_{i}\) is generated as:  
\[x_{i}=R\big{(}E_{x},E_{n}^{\prime}\big{)}, \tag{17}\]  
The membership function \(\mu_{i}\) can be obtained from Equation (18) which satisfies the normal distribution form:  
\[\mu_{i}=\exp\Bigg{\{}\frac{-\left(x_{i}-E_{x}\right)^{2}}{2\left(E_{n}^{ \prime}\right)^{2}}\Bigg{\}}, \tag{18}\]  
It means that the cloud droplet \(x_{i}\) has the degree of membership \(\mu_{i}\) in Equation (18). A lot of cloud droplets form a cloud \(G(E_{x},\,E_{n},\,H_{e})\). From Figure 4 it can be seen that there are two input signals \(e\) and \(ec\), which represent the circulating current difference and the deviation of the circulating current difference, respectively. The clouds of \(e\) and \(ec\) are expressed as \(e(E_{x},\,E_{n},\,H_{e})\) and \(ec(E_{x},\,E_{n},\,H_{e})\), which have seven clouds, respectively. Each digital characteristic is calculated by the golden section method [32]. Table 4 shows the digital characteristics for input signals \(e\) and \(ec\), respectively. The subscripts NB (negative big), NM (negative medium), NS (negative small), Z (zero), PS (positive small), PM (positive medium) and PB (positive big) are fuzzy language sets for the qualitative uncertainty reasoning. From Figure 4 it can be seen that there are two output signals \(L_{\
u}\) and \(R_{\
u}\). In the same way, the digital characteristics for output signals \(L_{\
u}\) and \(R_{\
u}\) can be obtained and are shown in Table 5.