Optimal Control of Microgrid Operation Based on Fuzzy Sliding Mode Droop Control

: In the application of microgrid systems that include wind power, photovoltaic systems, diesel generators, and battery storage, the cooperative control and optimisation of power distribution between power sources is a major issue. Recently, the droop control has been used widely in microgrids. However, droop control relies mainly on the line parameter model between the grid and the load. Therefore, to improve the performance of the microgrid, the optimal control of microgrid operation based on the fuzzy sliding mode droop control method is considered in this paper. To begin, system parameters were obtained by modeling droop control with self-learning fuzzy control strategy. Then, to improve the accuracy of the power distribution in the multi-micro source system, the nonlinear di ﬀ erential smoothing control method was employed. Finally, by comparing the self-learning fuzzy sliding mode control based on drooping strategy and the traditional droop control method, it was demonstrated that the method proposed can e ﬀ ectively reduce the ﬂuctuation of the bus voltage and improve the output voltage quality of the microgrid system.


Introduction
When a microgrid is operated in the island state, the distributed power source often adopts a maximum power tracking strategy to improve the power generation efficiency. Generally, single energy storage may not satisfy the grid demand. Thus, multiple energy storage systems are equipped to ensure the power balance of the whole grid. Recently, the overall system operation control of microgrids often uses droop control for power allocation.
The droop control relies mainly on the line parameter. Recently, many researches have drawn their attention to droop control. In the research of Krishnamurthy and Khorrami [1] and Mousa et al. [2] the traditional droop control method has been used to deal with the power distribution of the microgrid. In addition, droop coefficient adjustment parameters are proposed in the power droop control. In [3], by adding the correlation derivative, an improved droop control algorithm has been designed to improve system performance. Later, to realize the rational distribution of active power and reactive power, a control strategy based on droop control and load reactive power compensation has been proposed in [4]. In this way, the connection of communication equipment is reduced. In [5], to improve the accuracy of power allocation with different line impedance, a complicated impedance method has been proposed. In [6], a power allocation control strategy based on low-bandwidth communication has been proposed. In this paper, power weighting function is used to calculate accurate power allocation, 2 of 14 and when data transmission fails, the source side is required to re-use the droop control method to share the load. Recently, an improved reactive power control strategy has been proposed in [7]. Moreover, to improve responsive power distribution, the integral link has been introduced into the system droop control strategy. More recently, the authors of [8] have introduced virtual impedance into loop control, by which the power distribution is enhanced.
As is well known, it is difficult to achieve fast dynamic response, high stability, and robustness when the existing results are applied to power supply systems with the characteristics of multi-power supply. Therefore, a self-learning fuzzy control theory is proposed in this paper to model the traditional power-voltage droop control system. While considering the uncertainties of the unmatched parameters, a novel optimal control strategy based on fuzzy sliding mode droop control is proposed. A sliding mode droop controller with fast response is designed. The desired smoothing output trajectory is used to describe the state and control variables of the system. Moreover, the robust control of voltage and the accurate distribution of power are realized. Finally, the effectiveness of the method is demonstrated by a practical example.

Traditional Droop Control
A diagram of a conventional droop control used in a three-phase full-bridge inverter is shown in Figure 1. The traditional droop control mode uses an inductive capacitor (LC) ilter. It can be seen from Figure 1 that the droop control can be divided into two parts that include the primary circuit and the voltage and current double closed-loop control. droop control method to share the load. Recently, an improved reactive power control strategy has been proposed in [7]. Moreover , to improve responsive power distribution, the integral link has been introduced into the system droop control strategy. More recently, the authors of [8] have introduced virtual impedance into loop control, by which the power distribution is enhanced. As is well known, it is difficult to achieve fast dynamic response, high stability, and robustness when the existing results are applied to power supply systems with the characteristics of multi-power supply. Therefore, a self-learning fuzzy control theory is proposed in this paper to model the traditional power-voltage droop control system. While considering the uncertainties of the unmatched parameters, a novel optimal control strategy based on fuzzy sliding mode droop control is proposed. A sliding mode droop controller with fast response is designed. The desired smoothing output trajectory is used to describe the state and control variables of the system. Moreover, the robust control of voltage and the accurate distribution of power are realized. Finally, the effectiveness of the method is demonstrated by a practical example.

Traditional Droop Control
A diagram of a conventional droop control used in a three-phase full-bridge inverter is shown in Figure 1. The traditional droop control mode uses an inductive capacitor (LC) ilter. It can be seen from Figure 1

Droop Power Control
In power calculation, the output voltage and the current instantaneous values of the inverters measured by the corresponding sensors can be used. Firstly, park transformation of the current and the voltage can be carried out to obtain the instantaneous power values. After low-pass filtering, the instantaneous power is subtracted by the given power order to get the power difference. Then, under droop control, the required frequency reference and voltage reference can be obtained. Finally, the voltage synthesis is performed to obtain the three-phase reference voltage. The traditional droop power control structure is shown in Figure 2.

Droop Power Control
In power calculation, the output voltage and the current instantaneous values of the inverters measured by the corresponding sensors can be used. Firstly, park transformation of the current and the voltage can be carried out to obtain the instantaneous power values. After low-pass filtering, the instantaneous power is subtracted by the given power order to get the power difference. Then, under droop control, the required frequency reference and voltage reference can be obtained. Finally, the voltage synthesis is performed to obtain the three-phase reference voltage. The traditional droop power control structure is shown in Figure 2.   The droop control is described as follows:

Voltage and Current Control
The capacitor current reflects the instantaneous change of the inverter output voltage and the load disturbance. Therefore, the capacitor current is selected for the inner current-loop control.
It is shown in Figure 3 that the capacitor voltage should satisfy the following relationship: When the filter resistor, f R , is small, it may be ignored. In addition, the inductor current satisfies the following relationship: According to Equations (2) and (3), the voltage-current dual closed-loop controller design is shown in Figure 4.  The droop control is described as follows:

Voltage and Current Control
The capacitor current reflects the instantaneous change of the inverter output voltage and the load disturbance. Therefore, the capacitor current is selected for the inner current-loop control.
It is shown in Figure 3 that the capacitor voltage should satisfy the following relationship: When the filter resistor, R f , is small, it may be ignored. In addition, the inductor current satisfies the following relationship:

Voltage and Current Control
The capacitor current reflects the instantaneous change of the inverter output voltage and the load disturbance. Therefore, the capacitor current is selected for the inner current-loop control.
It is shown in Figure 3 that the capacitor voltage should satisfy the following relationship: When the filter resistor, f R , is small, it may be ignored. In addition, the inductor current satisfies the following relationship: According to Equations (2) and (3), the voltage-current dual closed-loop controller design is shown in Figure 4.  According to Equations (2) and (3), the voltage-current dual closed-loop controller design is shown in Figure 4.

Voltage and Current Control
The capacitor current reflects the instantaneous change of the inverter output voltage and the load disturbance. Therefore, the capacitor current is selected for the inner current-loop control.
It is shown in Figure 3 that the capacitor voltage should satisfy the following relationship: When the filter resistor, f R , is small, it may be ignored. In addition, the inductor current satisfies the following relationship: According to Equations (2) and (3), the voltage-current dual closed-loop controller design is shown in Figure 4.

Self-Learning Fuzzy Algorithm
A structural diagram of a self-learning fuzzy controller (SLFC) is shown in Figure 5. The self-learning fuzzy control system can learn sample information from the external environment and from its own control processes [9].

Self-Learning Fuzzy Algorithm
A structural diagram of a self-learning fuzzy controller (SLFC) is shown in Figure 5. The selflearning fuzzy control system can learn sample information from the external environment and from its own control processes [9]. In this paper, a single variable system is taken as an example to improve the fuzzy relations, R  .
(1) Domain normalization Domain normalization randomly selects the input, ( ) r k , and the output, ( ) y k , at the time, k . The corresponding error is: The change of the error is: The normalized quantities are * e and * ec . Normalizing the measurements e and ec gives:   In this paper, a single variable system is taken as an example to improve the fuzzy relations, R ∼ .
(1) Domain normalization Domain normalization randomly selects the input, r(k), and the output, y(k), at the time, k. The corresponding error is: The change of the error is: The normalized quantities are e * and ec * . Normalizing the measurements e and ec gives: e > e * , It can be written as: where Changing p r (i.e.， p e or p ec ), the distribution of membership functions can be changed. u ec will also change as the normalized quantities * e and * ec change.
When the rule relationship in Equation (10) is considered, there are 49 rules. The corresponding fuzzy rules are shown in Table 1.  It can be written as: where Changing r p (i.e., e p or ec p ), the distribution of membership functions can be changed. u A i ∼ (e s ) and (ec s ) will also change as the normalized quantities e * and ec * change.
(3) Learning of fuzzy rule relation R ∼ C is denoted as the linguistic variable u. When the fuzzy subset on domain U is C l ∼ , then the rule can be expressed as: When the rule relationship in Equation (10) is considered, there are 49 rules. The corresponding fuzzy rules are shown in Table 1. The domain U is provided with m discrete values u k (k = 1,2,...m), Energies 2019, 12, 3600 6 of 14 The mean control amount is: Which is normalized to: where u * = max{|u l |}. The original output control amount scale factor is set to k u ; after normalization, the scale factor is as follows: Thus, solving the ambiguity, a direct fuzzy relation R ∼ D is obtained. According to Equation (14), we have: (4) Learning fuzzy rules Direct fuzzy control rule: where (u s ) ij is the determined direct control quantity, and the fuzzy state is established. e s and ec s are two amounts for fuzzy intersection A i The membership function relationship is determined.
(5) Rule Establishment Degree The control rule (Equation (16)) is used to express the uncertainty of whether a rule is established or not. Accordingly, it can be defined as the degree of the rule establishment.

Modeling the Traditional Droop Control based on a Fuzzy Algorithm
Self-learning fuzzy control has fast dynamic responses. For uncertainties of multi-power systems and distributed energy sources, the self-learning fuzzy droop control method can achieve a rapid response.
Through the above analysis, the droop control system for the fuzzy drooping frequency module and voltage module can be described as: where k m1 ,k m2 ,k n1 , and k n2 are the correction factors. The frequency blur droop control module is shown in Figure 7.
Energies 2019, 12, 3600 7 of 14 The frequency blur droop control module is shown in Figure 7. The voltage amplitude fuzzy droop control module is shown in Figure 8. Through the voltage amplitude and frequency self-learning fuzzy droop control module, the voltage amplitude and frequency stability can be achieved correspondingly. The self-learning fuzzy control algorithm domain is normalized, and it is necessary to select the appropriate membership function. The fuzzy control rules are first designed, and then the appropriate defuzzification method is chosen.
The fuzzy subset takes the form of a triangle membership function. The fuzzy subset is divided as follows: NB, NM, NS, ZO, PS, PM, and PB. The first three elements represent the negative direction deviation. ZO is the deviation close to zero, and the last three items represent the positive direction deviation. The fuzzy drooping frequency module is the same as the voltage module fuzzy set; Through the analysis of the operating environment and the collection of experimental data, the fuzzy control rules of the droop coefficients 1 k and 2 k are shown in Table 2. The design principle is to reduce the time required for the system to reach stability while minimizing the steady-state error [10].  The voltage amplitude fuzzy droop control module is shown in Figure 8. The frequency blur droop control module is shown in Figure 7. The voltage amplitude fuzzy droop control module is shown in Figure 8. Through the voltage amplitude and frequency self-learning fuzzy droop control module, the voltage amplitude and frequency stability can be achieved correspondingly. The self-learning fuzzy control algorithm domain is normalized, and it is necessary to select the appropriate membership function. The fuzzy control rules are first designed, and then the appropriate defuzzification method is chosen.
The fuzzy subset takes the form of a triangle membership function. The fuzzy subset is divided as follows: NB, NM, NS, ZO, PS, PM, and PB. The first three elements represent the negative direction deviation. ZO is the deviation close to zero, and the last three items represent the positive direction deviation. The fuzzy drooping frequency module is the same as the voltage module fuzzy set; Through the analysis of the operating environment and the collection of experimental data, the fuzzy control rules of the droop coefficients 1 k and 2 k are shown in Table 2. The design principle is to reduce the time required for the system to reach stability while minimizing the steady-state error [10].  Through the voltage amplitude and frequency self-learning fuzzy droop control module, the voltage amplitude and frequency stability can be achieved correspondingly. The self-learning fuzzy control algorithm domain is normalized, and it is necessary to select the appropriate membership function. The fuzzy control rules are first designed, and then the appropriate defuzzification method is chosen.
The fuzzy subset takes the form of a triangle membership function. The fuzzy subset is divided as follows: NB, NM, NS, ZO, PS, PM, and PB. The first three elements represent the negative direction deviation. ZO is the deviation close to zero, and the last three items represent the positive direction deviation. The fuzzy drooping frequency module is the same as the voltage module fuzzy set; k m1 and k n1 are replaced by k 2 instead of k m2 and k n2 .
Through the analysis of the operating environment and the collection of experimental data, the fuzzy control rules of the droop coefficients k 1 and k 2 are shown in Table 2. The design principle is to reduce the time required for the system to reach stability while minimizing the steady-state error [10]. The standard Mamdani type [11] inference algorithm is chosen. The fuzzy control rule of if e and ec then k 1 and if e and ec then k 2 is adopted. According to the defined fuzzy input, output, and triangle membership function rules, the fuzzy logic designer is used to model the fuzzy drooping. The output surface of the fuzzy droop control coefficients k 1 and k 2 is shown in Figure 9.

Design of Fuzzy Droop Controller Based on Sliding Mode Algorithm
Sliding mode control (SMC) is also called variable structure control. A nonlinear control strategy method [12,13] is used by establishing a sliding surface. The sliding mode has invariance [14]. To reflect whether the system is away from the switching surface or not, the constant velocity approach law and the exponential approach law [15] are used. The standard Mamdani type [11] inference algorithm is chosen. The fuzzy control rule of if e and ec then 1 k and if e and ec then 2 k is adopted.
According to the defined fuzzy input, output, and triangle membership function rules, the fuzzy logic designer is used to model the fuzzy drooping. The output surface of the fuzzy droop control coefficients 1 k and 2 k is shown in Figure 9.

Design of Fuzzy Droop Controller Based on Sliding Mode Algorithm
Sliding mode control (SMC) is also called variable structure control. A nonlinear control strategy method [12,13] is used by establishing a sliding surface. The sliding mode has invariance [14]. To reflect whether the system is away from the switching surface or not, the constant velocity approach law and the exponential approach law [15] are used.

Sliding Mode Droop Control System Design
where x v is the aching process and y v is the sliding process. The sum of the two is the sliding mode control rate. Among them, the design, x v , is designed as:

Sliding Mode Droop Control System Design
The precise control of power distribution and voltage stability are the goals of fuzzy droop control strategy; where ∆u c = u * c − u c and ∆Q c = Q * − Q. The error is integrated and the integral sliding surface is set as follows: m = ∆u c + k m ∆u c dt, n = ∆Q + k n ∆Qdt, where k m and k n are constants.
where v x is the aching process and v y is the sliding process. The sum of the two is the sliding mode control rate. Among them, the design, v x , is designed as: where a, b, c, d are constants.
The parameters a and c determine the speed of the approach. The parameters b and d determine the ability to overcome the disturbance. The larger the a and c values are, the faster the reaching speed and the dynamic response is achieved; the smaller the b and d values are, the less the chattering of the sliding mode control can be reduced. The saturation function is expressed by the following equation: where λ is the error bandwidth. The joint formula is expressed as The following equation can be obtained Finally, through the Lyapunov stability criterion, the stability and convergence effects of the proposed control strategy are verified. The following functions are constructed: Equation (25) shows that V ≥ 0 is constant. Substituting Equation (19) into Equation (25), it can be obtained that Equation (26) shows that v is always negative, and the system will reach the sliding surface at a particular time and reach a steady state.
As shown in Figure 10, a self-learning fuzzy droop control structure diagram based on the sliding mode control is proposed.
where λ is the error bandwidth. (23) The following equation can be obtained  Equation (26) shows that v is always negative, and the system will reach the sliding surface at a particular time and reach a steady state.
As shown in Figure 10, a self-learning fuzzy droop control structure diagram based on the sliding mode control is proposed.

Self-Learning Fuzzy Droop Control Strategy Simulation Based on Sliding Mode Control
To verify the effectiveness of the optimal method, the microgrid included a photovoltaic energy storage battery, reactive power compensation equipment, and load. The total installed capacity of the 600 kW wind turbine and the photovoltaic system was 500 kW, which was divided into five branches and simulations. In the simulation, when the five chapters were equivalent to one office, the capacity was the sum of the five branches. The capacity of the diesel generator was 500 kW, and the multi-energy storage unit, using lithium batteries, had a capacity of 1000 kW/h. The reactive power compensation device was composed of 10 sets of 20 kVar capacitors. The line impedance was equivalent to a lumped parameter. The initial load was 800 kW. The specific parameters of the microgrid platform are shown in Table 3. The microgrid model is shown in Figure 11. was the sum of the five branches. The capacity of the diesel generator was 500 kW, and the multienergy storage unit, using lithium batteries, had a capacity of 1000 kW/h. The reactive power compensation device was composed of 10 sets of 20 kVar capacitors. The line impedance was equivalent to a lumped parameter. The initial load was 800 kW. The specific parameters of the microgrid platform are shown in Table 3. The microgrid model is shown in Figure 11.  Simulation Results and Analysis: A simulation waveform diagram of the system, incorporating a nonlinear load, is show in Figure  12. It shows the output voltage of the source side unit using traditional droop control. The steadystate bus voltage is 305.4 V before the load changes, while the system preset voltage is 311 V, and the deviation is about 5.6 V. Moreover, the voltage waveform shows a significant distortion at 0.2 s. Simulation Results and Analysis: A simulation waveform diagram of the system, incorporating a nonlinear load, is show in Figure 12. It shows the output voltage of the source side unit using traditional droop control. The steady-state bus voltage is 305.4 V before the load changes, while the system preset voltage is 311 V, and the deviation is about 5.6 V. Moreover, the voltage waveform shows a significant distortion at 0.2 s. The voltage wave based on the fuzzy sliding mode droop control strategy is shown in Figure 13. At first, the bus voltage is 305.4 V in steady state before load change and is 302.8 V after load change; the deviation is 2.6 V. Then, when the load changes at 0.2 s, the output voltage distortion becomes smaller. Finally, the moving point of the system reaches the sliding surface quickly, and the system The voltage wave based on the fuzzy sliding mode droop control strategy is shown in Figure 13. At first, the bus voltage is 305.4 V in steady state before load change and is 302.8 V after load change; the deviation is 2.6 V. Then, when the load changes at 0.2 s, the output voltage distortion becomes smaller. Finally, the moving point of the system reaches the sliding surface quickly, and the system reaches a stable state. The voltage wave based on the fuzzy sliding mode droop control strategy is shown in Figure 13. At first, the bus voltage is 305.4 V in steady state before load change and is 302.8 V after load change; the deviation is 2.6 V. Then, when the load changes at 0.2 s, the output voltage distortion becomes smaller. Finally, the moving point of the system reaches the sliding surface quickly, and the system reaches a stable state. When a nonlinear load is connected to the distribution network, it will cause harmonics that affect the normal operation of the electrical equipment. Moreover, it will cause equipment damage and economic loss. This method has an effect on the reduction fluctuation range of the voltage and on the improvement of the output voltage.
It can be seen from Table 4 that the fuzzy sliding mode droop control proposed in this paper can effectively reduce the voltage harmonic distortion rate under the influence of the load disturbances. The setting effect is better than the traditional droop control, which ensures a better output voltage that satisfies the requirements of the power quality. The current waveform under the traditional droop control is shown in Figure 14. When a nonlinear load is added to the system at 0.2 s, the current waveform is severely distorted, causing circulating current. When a nonlinear load is connected to the distribution network, it will cause harmonics that affect the normal operation of the electrical equipment. Moreover, it will cause equipment damage and economic loss. This method has an effect on the reduction fluctuation range of the voltage and on the improvement of the output voltage.
It can be seen from Table 4 that the fuzzy sliding mode droop control proposed in this paper can effectively reduce the voltage harmonic distortion rate under the influence of the load disturbances. The setting effect is better than the traditional droop control, which ensures a better output voltage that satisfies the requirements of the power quality. The current waveform under the traditional droop control is shown in Figure 14. When a nonlinear load is added to the system at 0.2 s, the current waveform is severely distorted, causing circulating current. Experiment 2: Unbalanced load Simulation process: The system was run in normal operation mode, operating with a linear load in balanced three-phase mode. An unbalanced linear load was added when the time reached 0.2 s. Figure 15 is the waveform diagram when the system is added to the three-phase unbalanced Experiment 2: Unbalanced load Simulation process: The system was run in normal operation mode, operating with a linear load in balanced three-phase mode. An unbalanced linear load was added when the time reached 0.2 s. Figure 15 is the waveform diagram when the system is added to the three-phase unbalanced load. Figure 15 is the output voltage waveform of the source side unit under the traditional droop control. It can be seen that the amplitude of the output three-phase voltage waveform is not equal at 0.2 s. Experiment 2: Unbalanced load Simulation process: The system was run in normal operation mode, operating with a linear load in balanced three-phase mode. An unbalanced linear load was added when the time reached 0.2 s. Figure 15 is the waveform diagram when the system is added to the three-phase unbalanced load. Figure 15 is the output voltage waveform of the source side unit under the traditional droop control. It can be seen that the amplitude of the output three-phase voltage waveform is not equal at 0.2 s.  Figure 16 shows the voltage waveform of the source unit under the fuzzy sliding mode droop control. After adding a three-phase unbalanced load, the output voltage waveform is smooth and the degree of deviation from the preset voltage value of the system is small. Moreover, the voltage can be maintained at the moment of inputting the load, which greatly improves the bus voltage fluctuation caused by the traditional droop control method.  Figure 16 shows the voltage waveform of the source unit under the fuzzy sliding mode droop control. After adding a three-phase unbalanced load, the output voltage waveform is smooth and the degree of deviation from the preset voltage value of the system is small. Moreover, the voltage can be maintained at the moment of inputting the load, which greatly improves the bus voltage fluctuation caused by the traditional droop control method. The output power experiment should be tested to verify the effectiveness of power distribution based on the self-learning fuzzy sliding mode droop control strategy.
Simulation process: During normal operation, the system was run in three-phase balance mode with a linear load. Then the load was changed at 0.2 s. Figure 17 shows the power curves when traditional droop control is applied. The red curve is a vanadium redox flow battery (VRFB) unit with a rated power of 3kW. The green curve is the power of the diesel generation unit with 3 kW. The purple curve is the super-capacitor (SC) unit power with 1.5 kW. When the load changes at 0.2 s, the system needs 0.15 s to adjust the power, and the system reaches stability at 0.35 s, which has a low power distribution accuracy. It can be seen that the traditional droop control is insufficient when the system is affected by the uncertainty of the microgrid parameters because of the low speed response and large power fluctuation. The output power experiment should be tested to verify the effectiveness of power distribution based on the self-learning fuzzy sliding mode droop control strategy.
Simulation process: During normal operation, the system was run in three-phase balance mode with a linear load. Then the load was changed at 0.2 s. Figure 17 shows the power curves when traditional droop control is applied. The red curve is a vanadium redox flow battery (VRFB) unit with a rated power of 3kW. The green curve is the power of the diesel generation unit with 3 kW. The purple curve is the super-capacitor (SC) unit power with 1.5 kW. When the load changes at 0.2 s, the system needs 0.15 s to adjust the power, and the system reaches stability at 0.35 s, which has a low power distribution accuracy. It can be seen that the Simulation process: During normal operation, the system was run in three-phase balance mode with a linear load. Then the load was changed at 0.2 s. Figure 17 shows the power curves when traditional droop control is applied. The red curve is a vanadium redox flow battery (VRFB) unit with a rated power of 3kW. The green curve is the power of the diesel generation unit with 3 kW. The purple curve is the super-capacitor (SC) unit power with 1.5 kW. When the load changes at 0.2 s, the system needs 0.15 s to adjust the power, and the system reaches stability at 0.35 s, which has a low power distribution accuracy. It can be seen that the traditional droop control is insufficient when the system is affected by the uncertainty of the microgrid parameters because of the low speed response and large power fluctuation.  Figure 18 shows the power adjustment curves when the self-learning fuzzy sliding mode droop control is applied. The red curve represents the super-capacitor (SC) unit power control curve with a rated power of 1.5 kW. The blue curve is the vanadium redox flow battery (VRFB) unit power control curve with a rated power of 3 kW. The green curve represents the power control of the diesel power generation unit with a rated power of 3 kW. When the load changes at 0.2 s, the power adjustment time is only 0.1 s, and the system reaches stability at 0.3 s. It is shown that the power overshoot of the inverter output is small. In addition, the active power output value can track the reference command value better. Hence, there is a lower oscillation degree. Moreover, the setting time is shorter. Therefore, the output power of the system is optimized under the proposed method, by which the stability of the system and power distribution accuracy is improved.  Figure 18 shows the power adjustment curves when the self-learning fuzzy sliding mode droop control is applied. The red curve represents the super-capacitor (SC) unit power control curve with a rated power of 1.5 kW. The blue curve is the vanadium redox flow battery (VRFB) unit power control curve with a rated power of 3 kW. The green curve represents the power control of the diesel power generation unit with a rated power of 3 kW. When the load changes at 0.2 s, the power adjustment time is only 0.1 s, and the system reaches stability at 0.3 s. It is shown that the power overshoot of the inverter output is small. In addition, the active power output value can track the reference command value better. Hence, there is a lower oscillation degree. Moreover, the setting time is shorter. Therefore, the output power of the system is optimized under the proposed method, by which the stability of the system and power distribution accuracy is improved.

Conclusions
In this paper, the optimal control of microgrid operation based on the fuzzy sliding mode droop control method was considered. The method implemented double closed loop control. For the inner loop, slide mode control with integral sliding mode surface was designed, which can reduce chattering of the sliding mode. For the outer loop, a self-learning fuzzy droop voltage and power controller was implemented. According to the instantaneous value of the power and its reference, the controller can guarantee the stablility of the bus voltage with high accuracy and good power distribution.
Moreover, the control algorithm can adjust the parameters online, the calculation accuracy is high, and the inverter output voltage reference value can be compensated in real time.When load fluctuation occurs, the method proposed can reduce voltage error and improve power distribution accuracy as well.

Conclusions
In this paper, the optimal control of microgrid operation based on the fuzzy sliding mode droop control method was considered. The method implemented double closed loop control. For the inner loop, slide mode control with integral sliding mode surface was designed, which can reduce chattering of the sliding mode. For the outer loop, a self-learning fuzzy droop voltage and power controller was implemented. According to the instantaneous value of the power and its reference, the controller can guarantee the stablility of the bus voltage with high accuracy and good power distribution. Moreover, the control algorithm can adjust the parameters online, the calculation accuracy is high, and the inverter output voltage reference value can be compensated in real time. When load fluctuation occurs, the method proposed can reduce voltage error and improve power distribution accuracy as well.
Author Contributions: Y.Z. and Z.W. proposed the algorithms and designed the experiments; Y.Z. and N.T. conducted the experiments; Y.L. and Y.Z. collected and analyzed the data; Y.Z., Y.L., X.J., and Z.W. contributed reagents, materials, and analysis tools; Y.Z. wrote the paper.