Abstract

In order to effectively monitor the stability of the microgrid, based on the advantages of the Monte Carlo algorithm, a dynamic interval power flow calculation method for microgrid is designed. First, based on the multilayer complex structure of the microgrid, the hierarchical topology of its interval structure is analyzed. Then, the micropower flow model is designed, the affine algorithm is used to accurately describe the relationship between the variables in the microgrid structure, and the dynamic interval affine calculation is completed. Therefore, in the dynamic interval of the microgrid, the Monte Carlo probability method is applied to obtain more random data. Based on this, a model is established for the probability of wind power generation and photovoltaic power generation to simulate the output characteristics of the microgrid. Finally, the voltage variable, active power variable, and reactive power variable are calculated and embedded in the iterative algorithm to realize the stochastic power flow calculation of the microgrid. After experimental verification, the voltage amplitude calculated using the method proposed in this article has a small error value compared to the actual voltage, with a minimum error value of 0.2, close to 0. Under the condition of convergence accuracy of 10−6, the minimum convergence frequency is 3 times, and the power flow calculation process time does not exceed 38 seconds. This proves that the algorithm has high calculation accuracy, good convergence performance and timeliness, and can provide certain technical support for the stable operation of microgrids.

1. Introduction

With the development of the social economy, the scale of the power grid is getting bigger and larger, and people’s requirements for the safety of power grid operation are getting higher and higher. With the rapid increase of the demand for power resources, the structure of the power grid has become more complex, and the construction area and use area of the power grid are increasing, which has brought great pressure to the power supply and distribution systems [1]. Power flow calculation can be used to analyze the structure of power system operation network topology and composition parameters, according to the established active power, active power, reactive power, and voltage known value and location parameters, through the current calculation, can test the power system planning scheme can meet the requirements of various operation mode, is a basic operation method of power system steady-state operation, is beneficial to promote the operation of the power grid [2]. Power flow calculation can be used to design the parameters and structure of the system, optimize the configuration of lines and transformer, improve the reliability and economy of the system, at the same time, can be used to analyze the system load situation and generating capacity, dispatching generator and load, realize the reasonable distribution and optimal control of the power system, to ensure the safe and stable operation of the power system, and optimize the scheduling is of great significance. As an important research field of microgrid technology, power flow computing is an important basis for analyzing the voltage distribution and network loss of microgrid and realizing the optimal dispatching of microgrid. In the distribution network, the distribution of microgrid is more complex, and the uncertainty of power flow and structural topology increases the difficulty of power flow calculation [3].

Microgrid generally consists of a micropower supply, an energy storage device, a load, power electronic conversion device, and a control system. Microgrids can effectively integrate various distributed power sources and improve the energy penetration rate [4, 5]. However, in the current power flow calculation process for microgrid, due to the complexity of the power grid, the power flow calculation results are not effective [6]. Therefore, many researchers have conducted research on this issue.

Lin et al. [7] believed that in the island microgrid controlled by droop, the voltage and frequency of the system are regulated by the droop node, resulting in the traditional power flow calculation method is generally not applicable to the island microgrid. Therefore, the power flow calculation model of an isolated microgrid is constructed, and a two-step algorithm to solve the cofactor is proposed. Two auxiliary factors are introduced to transform the original power flow equation into a set of overdetermined equations, a set of underdetermined equations, and a set of auxiliary factors, which are solved iteratively in two steps to realize the microgrid power flow calculation. Although this method can meet the requirements of power flow calculation, the calculation process is relatively complex, and there will be a large error between the voltage amplitude and the actual voltage. There is still room for improvement. Pan et al. [8] considered the unbalanced and unstable characteristics of some nodes in the microgrid, a probability load calculation method of three-phase unbalanced island-type microgrid based on the low-rank approximation method is proposed, in which the three asymmetries of the distribution network are taken as the influencing factors of uncertainty, and the optimal multiplier Newton Raphson method is used to solve the operation parameters. Combined with the low-order approximation method, the three-phase power flow is calculated, the variable statistical model of power flow distribution is constructed, and the power flow probability density and probability distribution results are calculated through the microgrid overflow characteristics. But in the actual power flow calculation, the calculation error convergence time of voltage amplitude is long, which affects the real-time monitoring of the microgrid. Yang et al. [9] designed a stochastic fuzzy power flow calculation method for distribution network based on the unified iteration method. Considering the loss of the voltage source converter and the uncertainty of the distributed generator set and load, a stochastic fuzzy power flow model is proposed, which adopts the accumulation method in the stochastic stage and fuzzy simulation technology in the fuzzy stage to accurately calculate the stochastic fuzzy power flow of the distribution network. However, the time spent in power flow calculation is too long, which reduces the application effect of this method.

The Monte Carlo algorithm takes probability thinking as the core of research, builds a corresponding probability model through numerical simulation and statistical checking, and tests the randomness of the corresponding simulation through random probability [1012].

Therefore, in order to further improve the effect of power flow calculation; this study designed a new dynamic interval power flow calculation method based on the Monte Carlo algorithm for the microgrid containing wind turbines and photovoltaic generators. The innovation of this paper is to use the Monte Carlo probability method to get more random data, the random data on the accuracy of random power calculation, and this paper through numerical simulation and statistical test to establish the corresponding probability model, in order to obtain the micropower grid dynamic interval tide calculation results, solve the problem of traditional method of current calculation error, and can save the time of tide calculation.

2. Interval Structure Topology of Microgrids

Based on the multilayer complex structure of the microgrid, the interval structure topology of the microgrid is expanded and analyzed as follows:(a)Conduct hierarchical analysis of the overall power grid and branch network to form a stable, simple and easy to operate hierarchical structure.(b)Release all the voltage of the whole circuit and set the starting voltage at both ends to be 0, so that the voltage value at both ends of the resistance is kept between 0 and 1.(c)Establish the load power balance matrix according to the voltage variation law of each branch of the microgrid, gradually move from the branch farthest away from the main circuit to the branch close to the main circuit, calculate its electrical power, and repeatedly operate until the voltage and power of the first layer are obtained, so as to relieve the pressure brought by the increase of branches to the grid.(d)The main circuit is set as P-Q and its decomposition is studied. Considering that the charges at both ends of the microgrid are equal and the load on the branch is serious, the iterative algorithm is used to reduce the charge movement and fundamentally control the voltage and power of each node [13].(e)Calculate the critical point of grid voltage in the microgrid, connect the power supply to make the current pass through, connect each branch, and then calculate the voltage of each layer of the power grid gradually from the starting layer according to the structure order of the matrix, and change its original voltage rule [1416].

Considering the instability and multilayer structure of the microgrid, the dynamic range of the microgrid is obtained through continuous iterative calculation. The main method is to set the interval as the initial interval, and then continuously iterate the calculation until it is close to the interval power flow result. Assuming is the voltage specific matrix of the microgrid, there are other matrices , and as the information content, is a specific vector, and , then its decomposed form is as follows:

Then continue the iterative calculation, then,

As can be seen from equation (2), the size of determines the order function of the iteration operator. Generally, the first half of the matrix is selected. Therefore, in order to make the iteration result as close to as possible, matrix and should be the same as possible.

3. Construction of Microgrid Power Flow Model

If the output power of the intermittent micropower is regarded as a fixed value, the power flow analysis of the microgrid can be approximated as a deterministic power flow calculation [1720]. The forward-backward generation method has the advantages of high computational efficiency and good convergence and is more suitable for power flow calculation of microgrids with radial network structures.

Micropower supply DG1 is mainly composed of a battery pack, control circuit, and output terminal. The control circuit, through the management and monitoring of the battery pack, realizes the control and adjustment of the voltage, current, and power of the output terminal, so as to ensure the stability and reliability of the output electric power. During use, the electric energy of DG1 will be sent to the conversion device. After the conversion process, the conversion device will output the required AC energy. A/D converter is used in the microgrid to connect to the microgrid, as shown in Figure 1.

The voltage and output power of the DG1 side and other parameters, dq0 steady-state power flow model is adopted here to describe this kind of micropower supply. Figure 2 shows the steady-state equivalent model of micropower supply DG1, where (a) is the d-axis equivalent circuit and (b) is the q-axis equivalent circuit.

The active and reactive power at the connection side between the inverter and the microgrid can be expressed as follows:

In this regard, the active and reactive power at the power supply side can be obtained through calculation as follows:

For the power balance between micropower supply DG1 and bus, the following conditions should also be met:

In the above formula, , , and can be obtained by power flow calculation of microgrid, and are obtained from the operating characteristics of DG1. By setting the control parameters of the inverter, the output and of the micropower supply can be adjusted not to exceed the limited value, which provides the basis for micropower control. The power flow model is used in the micropower supply and converter. According to the characteristics of the micropower supply, it is divided into different types of nodes to realize the power flow calculation of the microgrid [21].

4. Analysis of Affine Interval Structural Variables in Microgrids

Because the topology structure of the multiring power grid is very complex, which contains a large number of branches, nodes, loop, and other elements, which makes the workload of power flow calculation is large. In addition, in the scheduling and management of multiring power grids, there are some difficulties in information transmission and sharing among each ring network, which makes it difficult to obtain accurate correlation and difference information between each ring network in the process of power flow calculation, leading to a large error between the final power flow calculation results and the actual results. In order to solve this problem, this paper uses the affine algorithm to describe various variable structures in the microgrid structure, which makes the power flow calculation results closer to the actual results and improves the accuracy of the power flow calculation [22].

In the calculation process, for the microgrid voltage matrix , its affine expression is set as , and its structure can be expressed as follows:where represents the permutation ordinal number, represents the charge in column , whose value range is [−1, 1], represents the quantity, and represents the constant term, which controls the change of the current in the grid and keeps it within a fixed range. is the initial voltage. The change of is related to , and there is always a certain correlation, so it is further proved that affine arithmetic can make different variables have a certain relationship.

In the affine process, variables change with their expressions at any time. For example, if a hierarchical variable is set, its affine change process iswhere represents the center radius of the power grid structure, and represents the current noise, whose value is between [−1, 1].

If the affine algorithm is directly used for calculation in the process of calculating the dynamic interval of the microgrid, it is easy to ignore the instability of multiple variables in the microgrid structure, reduce the correlation between the variables, and have the expansion effect, leading to the error between the calculation results and the actual results [23]. To do further calculations, assume that there are nodes in the power grid, and arrange them in numerical order, the serial number is . There is another circuit whose node is , then its adjacent node is , and the adjacent node of the other circuit is . Therefore, the equation of the relationship between the two iswhere and represent the maximum and minimum electric power of a node; and represent the maximum and minimum voltage, respectively; is the voltage difference between and ; represents the resistance number in the matrix; is the magnitude of the current in the matrix.

In the dynamic interval of the microgrid, due to the instability of both voltage and current, the active power and reactive power should be transformed into affine form at the same time, and the active power is represented by and the reactive power is represented by . The expressions of relevant parameters are as follows:where and represent the power flow center of the dynamic interval of the microgrid; and represent the power at time ; , , , and denote the polycyclic coefficient.

When , the power is in a stable state and runs around the power flow center. When , reactive power and active power reach an equilibrium state, and a power flow solution exists.

Based on the above process, the affine calculation of the dynamic interval of the microgrid is completed; it can promote the accuracy of the power flow calculation.

5. Design of the Dynamic Interval Power Flow Calculation Method for Microgrid

5.1. Load Probability Model

In order to simulate the output characteristics of the microgrid, a load probability model should be built based on the dynamic interval of the microgrid [2426]. Assuming that all load random variables in the microgrid are normally distributed, the probability density function iswhere represents the mean and represents the variance.

5.2. Wind Power Generation Probability Model

Considering that the speed of the fan is affected by the output power, the corresponding research on the wind speed change of the fan is carried out [27]. The change probability of wind speed is calculated by the Weibull distribution curve, and its density function can be calculated as follows:where stands for wind speed; and represent the shape and scale parameters of Weibull distribution. The function relationship between output power of wind power generation and wind speed can be expressed as follows:where , , and is the rated power of the wind turbine, is the cut in wind speed, is the rated wind speed, and is the cut out wind speed. Thus, the probability density of active power of wind power generation can be expressed as follows:

5.3. Probability Model of Photovoltaic Power Generation

Photovoltaic power generation system usually adopts maximum frequency tracking, and its output power iswhere represents the total square area, represents the photoelectric conversion efficiency of photovoltaic cells, represents the hourly clear sky index, and and represent the system parameters depending on the square tilt angle, solar tilt angle, ground reflectance, latitude, and hour angle.(1)When and , if , the probability density function of photovoltaic cell output power isOtherwise, there is(2)When and , if , the probability density function of photovoltaic cell output power is

Otherwise, there is

In the above formula, , , and represent the upper limit value of , and and are the probability density function parameters of .

5.4. Calculation of Power Flow in Dynamic Interval

Using Monte Carlo simulation to generate a large number of input and output data points for the microgrid and embedding them in the iterative algorithm, can realize the random power flow calculation of microgrid [28].

In the dynamic interval of the microgrid, each node contains four quantities, which are active power (), reactive power (), voltage amplitude (), and voltage phase angle () [29]. According to the known and unknown conditions of these four quantities, the microgrid nodes can be divided into three categories:(1) node (known , )(2) node (known , )(3)Balance node (known , ).

5.4.1. Calculation of Voltage Variables

Based on the above analysis, in the dynamic interval power flow calculation of the microgrid, one node is determined as node, and the other nodes are nodes with known active power. The voltage quantity of node is the state variable for power flow calculation [3032].

5.4.2. Calculation of Active Power Variables

The active power at node is calculated as follows:where represents the number of nodes in the microgrid, and ,respectively, represent the voltage and current at node , and represents the mutual conductance between nodes and .

5.4.3. Calculation of Reactive Power Variables

The active power at node is calculated as follows:where represents the phase difference between voltage and current.

On this basis, the Jacobian matrix can be calculated as follows:where the elements of the Jacobian matrix of the -th node are as follows:where represents the self-conductance at node . In summary, the flow calculation process of dynamic interval power flow of microgrid can be constructed, as shown in Figure 3.

6. Experimental Test and Analysis

In order to test the practical application performance of the dynamic interval power flow calculation method based on the Monte Carlo algorithm, the following experimental verification process is designed.

This experiment uses the microgrid containing the wind turbine and the photovoltaic generator as the experimental test object. The microgrid consists of 32 nodes, including three wind turbines and two photovoltaic cells. The structure of the microgrid is shown in Figure 4.

The node where the wind turbine resides is regarded as the PQ node, and the node where the PV unit resides is regarded as the PV node. Therefore, in the experiment, the node voltage calculated by the power flow is compared with the actual voltage, so as to check the validity of the power flow calculation.

In order to avoid experimental results that are too single, In this paper, the low-rank approximation method (comparison method 1) based on the optimal multiplied three-phase probabilistic power flow calculation method is introduced, based on unified iterative distribution network random fuzzy power flow calculation method (comparison method 2) as a comparison method and the experimental method for performance verification.

First, the analysis errors of the voltage amplitude of the microgrid by different methods are compared, and the results are shown in Figure 5.

According to Figure 5, the voltage amplitude error calculated by the method designed in this paper is lower than that of the two methods compared. In particular, at nodes 4, 16, and 24, the error value of the present method is below 0.2 and close to 0. Therefore, it can be preliminarily explained that the microgrid dynamic interval power flow calculation method based on the Monte Carlo algorithm has a small error value, accurate voltage calculation, and has certain effectiveness.

The convergence accuracy of different methods is set as 10−1, 10−2, ..., 10−10, the convergence times of the power flow calculation method under different convergence accuracies are recorded, and the results are shown in Figure 6.

By analyzing the results shown in Figure 6, it shows that the convergence time advantage of the method designed in this paper is higher than that of the other two methods. For example, when the convergence accuracy is 10−6, the proposed method can converge only 3 times, while comparison method 1 needs 4 times and comparison method 2 needs 5 times. When the convergence accuracy is further improved, the convergence times of the two comparison methods increase significantly, but the proposed method still maintains good convergence performance.

Finally, in order to verify the calculation timeliness of different methods, the time consumption of the power flow calculation process is taken as an index to verify the different methods. The specific calculation results are shown in Table 1.

According to the results shown in Table 1, with the increase of the experiment number, the power flow calculation process takes more than 43 s after applying the comparison method 1, the power flow calculation process takes more than 60 s, and the power flow calculation process takes no more than 38 s. It can be proved that the power flow calculation process time cost required by this method is less and can be quickly converged under high precision, which can meet different accuracy requirements and has higher timeliness.

Comprehensive analysis, the micropower grid Monte Carlo algorithm, can solve the traditional calculation method between the voltage amplitude and the actual voltage is larger, the convergence time, the power flow calculation, some node voltage calculation error value can reach 0.2, in the convergence accuracy of 10-6 convergence frequency is at least 3 times, the power flow calculation process is not more than 38 s. It is proved that the design method has high accuracy in power flow calculation for microgrid, which can achieve fast convergence under high precision, and takes less time. It has the characteristics of high accuracy, high convergence, and low time consumption, and has better practical application effect, and can provide certain technical support for the operation stability of microgrid.

7. Conclusion

Power flow calculation can be used for microgrid reliability evaluation and optimization control, in order to solve the traditional calculation method of voltage amplitude and the actual voltage error value, convergence more, the power flow calculation time is insufficient, this study is designed based on Monte Carlo algorithm microgrid dynamic interval power flow calculation method. After analyzing the hierarchical topology of microgrid interval structure, the micropower flow model is designed, and the dynamic interval affine calculation is completed by the affine arithmetic method. Then, in microgrid dynamic range, the probability of using the Monte Carlo method to generate data is determined through the establishment of a probability model of wind power and a photovoltaic power generation probability model to simulate the output characteristics of micropower grid, and then calculate the voltage variables, active power, and reactive power variables on the basis of random trend microgrid computing.

According to the experimental results, the design method has high accuracy in power flow calculation, which can achieve fast convergence under high accuracy, takes less time, and has the characteristics of high accuracy, good convergence performance, and good timeliness. The calculated results of the power flow in the dynamic interval of the microgrid can be used to calculate the dynamic change range of the voltage of each node in the microgrid and can provide some reference for the analysis and control of the steady-state operation of the microgrid.

However, due to time constraints, the tests in this paper are only carried out in a small range. For the practical application performance of the design method, more tests are needed, and effective power flow calculation should be carried out with the goal of microgrid operation optimization, considering the energy flow direction and permeability when the microgrid is connected to the grid, in order to provide strong technical support for the long-term development of China’s power system.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The author declares that there are no conflicts of interest regarding the publication of this article.