Photovoltaic inverter island detection method and system
Patent Information
- Application Number
- CN202411855352.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-12-17
AI Technical Summary
When existing photovoltaic inverters perform island detection through active frequency offset method, the fixed chopping coefficient cannot effectively match the power output by the photovoltaic power generation system and the power consumed by the local load, resulting in poor detection effect.
By acquiring the data of photovoltaic power and load power in real time, a prediction model is constructed to predict future power trends, and the chopping coefficient of the active frequency offset method is dynamically adjusted according to the prediction results to match the degree of match between photovoltaic power and load power.
It improves the sensitivity and accuracy of the island detection of photovoltaic inverter, avoids adverse effects on the power quality of the power grid, and enhances the stability of the photovoltaic power generation system.
Smart Images

Figure CN119315553B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power grid island detection, and in particular to a photovoltaic inverter island detection method and system. Background Art
[0002] The islanding effect refers to the phenomenon that after a microgrid is suddenly disconnected from the main grid, the microgrid continues to work and forms a self-sufficient power supply island together with the surrounding loads. As the core of the distributed photovoltaic power generation system, the photovoltaic inverter can quickly detect the islanding effect in the microgrid and disconnect from the microgrid to ensure the safety of personnel and equipment.
[0003] Active frequency offset method is a commonly used island detection method. It accelerates the offset effect of grid voltage frequency by applying a disturbance signal to the output current of the photovoltaic inverter, and has the advantage of a small blind area for island detection. At present, when the photovoltaic inverter uses the active frequency offset method to detect grid islands, its chopping coefficient is fixed, ignoring the fact that the matching degree between the power output of the photovoltaic power generation system and the power consumed by the local load changes over time. When the matching degree between the photovoltaic power and the load power is low, the fixed chopping coefficient will have too much impact on the power quality of the grid when the same disturbance signal is applied to the output current; when the matching degree is high, setting a fixed chopping coefficient will result in insufficient sensitivity for island detection, resulting in poor island detection effect of the active frequency offset method for photovoltaic power generation systems. Summary of the invention
[0004] In order to solve the above technical problems, a photovoltaic inverter island detection method and system are provided to solve the existing problems.
[0005] The solution to the technical problem of the present application is to provide a photovoltaic inverter island detection method and system, including the following steps:
[0006] In a first aspect, an embodiment of the present application provides a photovoltaic inverter islanding detection method, the method comprising the following steps:
[0007] Real-time acquisition of the photovoltaic power at each moment in each cycle output by the photovoltaic inverter, as well as the load power consumed by the local load at each moment in each cycle, and real-time acquisition of the grid frequency measured by the photovoltaic inverter;
[0008] For photovoltaic power, obtain the photovoltaic power vector and photovoltaic historical data set at each moment;
[0009] Determine the photovoltaic trend value at each moment of each cycle according to the trend change of the elements in the photovoltaic power vector and the short-term fluctuation degree of the elements; analyze the time interval between each moment of each cycle and the corresponding moment of the elements in the photovoltaic power vector, and determine the photovoltaic fluctuation value at each moment of each cycle in combination with the photovoltaic trend value;
[0010] Determine the importance of photovoltaic characteristics at any moment in the photovoltaic historical data set according to the difference between the photovoltaic power vector at each moment in each cycle and any moment in the photovoltaic historical data set, and the degree of difference in the photovoltaic fluctuation value;
[0011] Based on the photovoltaic power vector and photovoltaic feature importance at any moment in the photovoltaic historical data set, a prediction model is constructed, and the photovoltaic power vector is predicted to obtain the photovoltaic power prediction vector at the next moment corresponding to each moment in each cycle;
[0012] For the load power, the load power prediction vector of the next moment corresponding to each moment of each cycle is obtained accordingly;
[0013] According to the differences between each element in the photovoltaic power prediction vector and the elements in the same position in the load power prediction vector, as well as the similarities between the photovoltaic power prediction vector and the load power prediction vector, the adjustment factor at each moment of each cycle is determined; based on the adjustment factor, the chopping coefficient of the active frequency offset method at each moment of each cycle is determined, and in combination with the grid frequency, island detection is performed on the photovoltaic power generation system.
[0014] Preferably, the step of obtaining the photovoltaic power vector and photovoltaic historical data set at each moment includes:
[0015] The photovoltaic power at each moment in each cycle and at multiple moments before it is recorded as the photovoltaic power vector at each moment;
[0016] The photovoltaic power vectors at multiple moments before each moment are respectively combined to form the photovoltaic historical data set at each moment.
[0017] Preferably, determining the photovoltaic trend quantity at each moment of each cycle includes:
[0018] Randomly select the photovoltaic powers of the last multiple moments from the photovoltaic power vector to form a local photovoltaic vector at each moment of each cycle;
[0019] Performing a linear fit on the local photovoltaic vector to obtain the slope of the fitting line;
[0020] The difference between each element in the local photovoltaic vector and the corresponding predicted value on the fitting straight line is recorded as the fitting error of each element in the local photovoltaic vector;
[0021] Calculating the mean and standard deviation of the fitting errors for all elements in the local photovoltaic vector;
[0022] Calculating the difference between the fitting error and the mean value, and recording it as the deviation of each element; and counting the number of elements in the local photovoltaic vector whose deviation is greater than the standard deviation;
[0023] The sum of the square of the slope and the number of elements at each moment in each cycle is calculated and recorded as the first sum; the calculation result of the exponential function with the natural constant as the base and the first sum as the exponent is used as the photovoltaic trend quantity at each moment in each cycle.
[0024] Preferably, determining the photovoltaic fluctuation value at each moment of each cycle includes:
[0025] The ratio of the time corresponding to each element in the local photovoltaic vector to the number of all elements in the local photovoltaic vector is recorded as the photovoltaic ratio;
[0026] Calculating the product of the photovoltaic ratio of each element in the local photovoltaic vector and the fitting error thereof, and recording the sum of the products of all elements in the local photovoltaic vector at each moment in each cycle as a second sum value;
[0027] The product of the second sum value and the photovoltaic trend value is used as the photovoltaic fluctuation value at each moment of each cycle.
[0028] Preferably, determining the importance of photovoltaic characteristics at any time in the photovoltaic historical data set includes:
[0029] The distance between the local photovoltaic vector at each moment in each cycle and any moment in the photovoltaic historical data set is recorded as the distance difference;
[0030] The difference between the photovoltaic fluctuation value at each moment in each cycle and any moment in the photovoltaic historical data set is recorded as the fluctuation difference;
[0031] Calculate the time difference between each moment in each cycle and any moment in the photovoltaic historical data set;
[0032] Calculating the cumulative sum of the fluctuation difference and the time difference; multiplying the distance difference by the cumulative sum as the trend difference degree at any moment in the photovoltaic historical data set;
[0033] The result of calculating an exponential function with a natural constant as the base and the opposite number of the photovoltaic fluctuation value as the exponent is calculated and recorded as a first exponential value; and the ratio of the first exponential value to the trend difference is used as the importance of the photovoltaic characteristics at any time in the photovoltaic historical data set.
[0034] Preferably, the method for determining the value of each element in the photovoltaic power prediction vector is: ,in, is the photovoltaic power prediction vector output by the random forest algorithm. element values, represents the number of decision trees; Indicates The sum of the importance of photovoltaic features at all times extracted by the decision tree; Indicates The first PV power prediction vector output by the decision tree element value; is the normalization function.
[0035] Preferably, determining the adjustment factor at each moment of each cycle includes:
[0036] Calculate the similarity between the photovoltaic power prediction vector and the load power prediction vector at the next moment corresponding to each moment in each cycle;
[0037] Calculate the difference between any element in the photovoltaic power prediction vector at the next moment corresponding to each moment in each cycle and the element at the corresponding position in its load power prediction vector;
[0038] The product of the difference value of any element and the position number of any element in the photovoltaic power prediction vector is recorded as the power difference degree of any element;
[0039] The calculation result of the exponential function with the natural constant as the base and the similarity as the exponent is recorded as the second exponential value, and the sum of the ratios of the second exponential values of all elements to the power difference is used as the adjustment factor at each moment in each cycle.
[0040] Preferably, the chopping coefficient of the active frequency shift method at each moment of each cycle is determined by a calculation method as follows: ,in, For the Cycle No. The chopping coefficient of the active frequency shift method at time, To preset the initial chopping coefficient, For the Cycle No. The adjustment factor for time, is the normalization function.
[0041] Preferably, the performing island detection on the photovoltaic power generation system includes:
[0042] Inject disturbance signal into the output current of photovoltaic inverter , again, the grid frequency is measured by the photovoltaic inverter. If the grid frequency exceeds the preset threshold range, an island phenomenon occurs. Otherwise, no island phenomenon occurs.
[0043] In a second aspect, an embodiment of the present application further provides a photovoltaic inverter island detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the photovoltaic inverter island detection methods described above when executing the computer program.
[0044] This application has at least the following beneficial effects:
[0045] The present application determines the photovoltaic trend quantity at each moment of each cycle according to the trend change of the elements in the photovoltaic power vector and the degree of short-term fluctuation of the elements; analyzes the time interval between each moment of each cycle and the corresponding moment of the elements in the photovoltaic power vector, and determines the photovoltaic fluctuation value at each moment of each cycle in combination with the photovoltaic trend quantity; accordingly, obtains the load fluctuation value at each moment of each cycle, and its beneficial effect is that by selecting the change trend of photovoltaic power and load power at different time scales, the frequent short-term fluctuations of photovoltaic power and load power are reflected; according to the difference of the photovoltaic power vector between each moment of each cycle and any moment in the photovoltaic historical data set, and the degree of difference of the photovoltaic fluctuation value, the importance of photovoltaic characteristics at any moment in the photovoltaic historical data set is determined, and its beneficial effect is that the difference between the data characteristics of the photovoltaic power vector at different time scales at each moment and the historical data is taken into account, thereby reflecting the reference degree of historical data for subsequent photovoltaic power prediction; based on the photovoltaic power vector and the importance of photovoltaic characteristics at any moment in the photovoltaic historical data set, a prediction model is constructed, and the photovoltaic power vector is predicted, Obtain the photovoltaic power prediction vector of the next moment corresponding to each moment of each cycle; for the load power, correspondingly obtain the load power prediction vector of the next moment corresponding to each moment of each cycle, and its beneficial effect is that the reference degree contained in the sample selected by the decision tree in the prediction model is used, and the corresponding photovoltaic feature importance and load feature importance are used as the weight of the prediction value, thereby increasing its important role in the prediction model and improving the accuracy of the prediction; according to the difference between each element in the photovoltaic power prediction vector and the elements in the same position in the load power prediction vector, and the similarity between the photovoltaic power prediction vector and the load power prediction vector, determine the adjustment factor at each moment of each cycle; determine the chopping coefficient of the active frequency offset method at each moment of each cycle, and combine the grid frequency to perform island detection on the photovoltaic power generation system, and its beneficial effect is that the matching of the predicted photovoltaic power and the predicted load power is considered, so as to select a suitable chopping coefficient, and then determine the disturbance signal to be applied, so as to ensure the speed of island detection, and at the same time avoid the large-scale adjustment of the disturbance signal in a short time, which affects the power quality of the grid, and improves the effect of island detection of photovoltaic inverters. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] A photovoltaic inverter islanding detection method of the present application is further described in detail below in conjunction with the accompanying drawings.
[0047] Figure 1 A flowchart of a photovoltaic inverter islanding detection method provided in an embodiment of the present application;
[0048] Figure 2 A flowchart of the steps of a method for obtaining photovoltaic fluctuation values at each moment in each cycle provided in an embodiment of the present application;
[0049] Figure 3 A flowchart of the steps of a method for obtaining the importance of photovoltaic characteristics at any time in a photovoltaic historical data set provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clear, the following is a further detailed description of a photovoltaic inverter island detection method and system proposed in the present application in combination with the accompanying drawings and implementation examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0052] See also Figure 1 , which shows a flowchart of a photovoltaic inverter island detection method provided by an embodiment of the present application, the method comprising the following steps:
[0053] Step 1: Real-time acquisition of the photovoltaic power at each moment in each cycle output by the photovoltaic inverter, the load power consumed by the local load at each moment in each cycle, and real-time acquisition of the grid frequency measured by the photovoltaic inverter.
[0054] The photovoltaic inverter can convert the electric energy output by the photovoltaic power generation system. When the power grid is operating normally, the photovoltaic power generation system and the power grid jointly provide electric energy to the local load. However, when the power grid suddenly stops supplying electricity, the photovoltaic power generation system does not detect the power outage and continues to supply electric energy to the local load. The photovoltaic system and the local load form an independent power supply "island".
[0055] Island detection generally includes passive island detection methods and active island detection methods. The active island detection method controls the photovoltaic inverter to introduce certain disturbances to its output power, frequency or phase, so as to detect the occurrence of islanding after the power grid power-off. When the power grid is operating normally, due to the clamping effect of the power grid, the disturbance signals applied to the output power, the common point frequency or phase of the photovoltaic power generation system by controlling the inverter hardly exist; but when the power grid is powered off, the disturbance signals applied to the output power, the common point frequency or phase of the photovoltaic power generation system by controlling the inverter will cause them to exceed the normal operating range respectively. Once exceeding the normal operating range, the island protection circuit will immediately stop the operation of the inverter.
[0056] Through the photovoltaic inverter installed in the photovoltaic power generation system, the photovoltaic power output by the photovoltaic inverter is collected. Through the watt-hour meter installed at the local load end, the load power consumed by the local load is collected. The collection time interval is t, and the collection period is T. Secondly, the power grid frequency is collected inside the photovoltaic inverter, and the collection frequency is f. According to the time sequence, the photovoltaic power, load power, and power grid frequency at each moment within each period are obtained.
[0057] Preferably, in this embodiment, the collection time interval is 15 min, the collection period is 1 day, and the collection frequency is 200 Hz. As other implementation manners, the implementer can set them according to the actual situation.
[0058] Thus, the photovoltaic power, load power, and power grid frequency at each moment within each period are obtained.
[0059] Step 2: Determine the photovoltaic trend quantity at each moment of each period according to the trend change situation of the elements in the photovoltaic power vector and the short-time fluctuation degree of the elements; analyze the time interval situation between each moment of each period and the corresponding moment of the elements in the photovoltaic power vector, and combine the photovoltaic trend quantity to determine the photovoltaic fluctuation value at each moment of each period; correspondingly, obtain the load fluctuation value at each moment of each period.
[0060] As a common method for active island detection, the power matching degree has a great influence on its island detection effect. When the difference between the photovoltaic power and the load power is large, the power matching degree is low, and the active frequency drift method can quickly detect whether the photovoltaic power generation system is in the island state by using a small chopping coefficient; when the difference between the photovoltaic power and the load power is small, the power matching degree is high, and a larger chopping coefficient needs to be set to improve the sensitivity of island detection.
[0061] In photovoltaic power generation systems, the photovoltaic power and load power vary greatly, and their changing trends in the same time period are also quite different, so the power matching degree varies greatly. Using the active frequency offset method with a fixed chopping coefficient to detect islanding in photovoltaic power generation systems not only affects the detection speed, but also reduces the power quality of the power grid, resulting in poor detection results.
[0062] Considering the influence of the power matching degree of the photovoltaic power generation system on the island detection effect, it is necessary to predict the photovoltaic power and the load power to accurately judge the changing trend of the power matching degree, and then select the chopping coefficient according to the power matching degree to enhance the island detection effect of the photovoltaic inverter.
[0063] The photovoltaic power of the photovoltaic power generation system and the load power of the local load have certain regular characteristics when changing over time, and the changing trends of photovoltaic power and load power are different in different time periods. Therefore, when predicting and analyzing the changing trends of photovoltaic power and load power, it is necessary to clarify the fluctuation characteristics of photovoltaic power and load power.
[0064] Since the load power is greatly affected by the working state of the user's electrical appliances, the load power change is highly random, so the fluctuation characteristics of the photovoltaic power and the load power at different times are different. Therefore, in order to analyze the changing trends of the photovoltaic power and the load power at different time scales, the photovoltaic power and the load power at different time scales are randomly selected to form the local photovoltaic vector and the local load vector, which are as follows:
[0065] The photovoltaic power and load power at each moment in each cycle and at multiple moments before that are recorded as the photovoltaic power vector and the load power vector at each moment respectively;
[0066] Preferably, in this embodiment, the photovoltaic power and load power at each moment in each cycle and the 11 moments before it are recorded as the photovoltaic power vector and load power vector at each moment. As other implementation methods, the implementer can set them according to actual conditions.
[0067] Randomly select the photovoltaic power and load power at the last multiple moments from the photovoltaic power vector and the load power vector at each moment of each cycle to form a local photovoltaic vector and a local load vector at each moment of each cycle;
[0068] Preferably, in this embodiment, the photovoltaic power vector at each moment of each cycle and the last load power vector in each moment are respectively The photovoltaic power and load power at each moment constitute the local photovoltaic vector and local load vector at each moment of each cycle, where The value of An integer in the interval.
[0069] Furthermore, since the load power is greatly affected by the working state of the user's electrical appliances, when the types of household appliances and the working states of the appliances are similar at different times, the change trends of the load power are closer. Since users use electrical appliances differently in different time periods, the load power varies in different time periods.
[0070] Secondly, users use different electrical appliances for different lengths of time, resulting in great differences in the similarity of local load power fluctuations at different time scales. At the same time, when the weather changes are relatively stable, the temperature and light changes over a long period of time have a certain degree of continuity; while in cloudy and windy weather, the changes in light and temperature will undergo short-term mutations, resulting in short-term and drastic fluctuations in the photovoltaic power output of the photovoltaic power generation system. Therefore, there are also large differences in the degree of fluctuation of photovoltaic power at different time scales.
[0071] Considering that in photovoltaic power generation systems, the fluctuation characteristics of photovoltaic power and load power at different time scales have similar influences on the prediction of their data change trends, the same analysis method can be used to predict and analyze the changes in load power and photovoltaic power.
[0072] Furthermore, the flowchart of the step of the method for obtaining the photovoltaic fluctuation value at each moment of each cycle provided by the embodiment of the present application is as follows: Figure 2 shown.
[0073] First, we take photovoltaic power as an example for analysis, specifically:
[0074] Perform linear fitting on the local photovoltaic vector at each moment of each cycle to obtain the slope of the fitting line;
[0075] Preferably, in this embodiment, the least square method is used for linear fitting, wherein the least square method is a well-known technology and will not be described in detail here.
[0076] The difference between each element in the local photovoltaic vector at each moment of each cycle and the corresponding predicted value on the fitting line is recorded as the fitting error of each element;
[0077] Preferably, in this embodiment, the absolute value of the difference between each element in the local photovoltaic vector at each moment in each cycle and the corresponding predicted value on the fitting straight line is recorded as the fitting error of each element.
[0078] Calculate the mean and standard deviation of the fitting errors of all elements in the local photovoltaic vector at each moment of each cycle;
[0079] Calculate the difference between the fitting error and the mean value, and record it as the deviation of each element; count the number of elements in the local photovoltaic vector at each moment of each cycle whose deviation is greater than the standard deviation;
[0080] Preferably, in this embodiment, the absolute value of the difference between the fitting error and the mean is calculated and recorded as the deviation of each element.
[0081] It should be noted that the number of elements reflects the short-term fluctuation of photovoltaic power.
[0082] Calculate the sum of the square of the slope and the number of elements at each moment of each cycle, and record it as the first sum; use the calculation result of the exponential function with the natural constant as the base and the first sum as the exponent as the photovoltaic trend quantity at each moment of each cycle;
[0083] For the local load vector at each moment, the same method as the photovoltaic trend quantity is used to obtain the load trend quantity at each moment of each cycle;
[0084] The ratio of the time corresponding to each element in the local photovoltaic vector to the number of all elements in the local photovoltaic vector is recorded as the photovoltaic ratio;
[0085] Calculate the product of the photovoltaic ratio of each element in the local photovoltaic vector at each moment of each cycle and the fitting error thereof, and record the sum of the products of all elements in the local photovoltaic vector at each moment of each cycle as a second sum value;
[0086] The product of the second sum value and the photovoltaic trend value is used as the photovoltaic fluctuation value at each moment of each cycle;
[0087] The ratio of the time corresponding to each element in the local load vector to the number of all elements in the local load vector is recorded as the load ratio;
[0088] Calculate the product of the load ratio and the fitting error of each element in the local load vector at each moment of each cycle, and record the sum of the product values of all elements in the local load vector at each moment of each cycle as the third sum value;
[0089] The product of the third sum and the load trend value is used as the load fluctuation value at each moment of each cycle;
[0090] Preferably, in this embodiment, the calculation formula of the photovoltaic fluctuation value at each moment of each cycle is: ,in, For the Cycle No. The photovoltaic fluctuation value at the moment, For the Cycle No. The slope of the fitting line corresponding to the local photovoltaic vector at time , For the Cycle No. The number of elements in the local photovoltaic vector at a moment where the deviation is greater than the standard deviation is the th cycle and the moment corresponding to the th element in the local photovoltaic vector at that moment, is the th cycle and the moment, and the fitting error of the th element in the local photovoltaic vector at that moment, is the th cycle and the total number of all elements in the local photovoltaic vector at that moment, is the exponential function with the base of the natural constant; secondly, is the first sum value, is the photovoltaic trend quantity, is the photovoltaic ratio.
[0091] It should be noted that the greater the slope, the greater the change trend of the photovoltaic power in the local time period, and thus the greater the degree of fluctuation. Secondly, the greater the fitting error and the number of elements, the more intense the short-term fluctuation of the photovoltaic power in the local time period, and the later the moment when the short-term fluctuation occurs, the greater the impact on the subsequent photovoltaic power prediction, and the greater the obtained photovoltaic fluctuation value, indicating that the short-term fluctuation of the photovoltaic power in the local time period is more frequent, and the greater the degree of fluctuation of the photovoltaic power output by the photovoltaic power generation system. Correspondingly, if the load fluctuation value is greater, it indicates that the short-term fluctuation of the load power in the local time period is more frequent, and the degree of fluctuation of the load power is relatively large.
[0092] Thus, the photovoltaic fluctuation value and the load fluctuation value at each moment of each cycle are obtained.
[0093] Step 3: Determine the photovoltaic feature importance of any moment in the photovoltaic historical data set according to the difference situation of the photovoltaic power vector between each moment of each cycle and any moment in its photovoltaic historical data set, and the difference degree of its photovoltaic fluctuation value; based on the photovoltaic power vector and the photovoltaic feature importance of any moment in the photovoltaic historical data set, construct a prediction model, and predict the photovoltaic power vector to obtain the photovoltaic power prediction vector of the next moment corresponding to each moment of each cycle; for the load power, correspondingly obtain the load power prediction vector of the next moment corresponding to each moment of each cycle.
[0094] Furthermore, the step flowchart of the method for obtaining the photovoltaic feature importance of any moment in the photovoltaic historical data set provided by the embodiments of the present application is as Figure 3 shown.
[0095] Analyze the similarity of the changes in photovoltaic power and load power in different local time periods, and then reflect the changes in photovoltaic power and load power at different time scales, and determine the fluctuation similarity, specifically:
[0096] The photovoltaic power vector and the load power vector at multiple moments before each moment are respectively combined into a photovoltaic historical data set and a load historical data set at each moment;
[0097] Preferably, in this embodiment, the local photovoltaic vector and the local load vector of 1000 moments before each moment are respectively used to form a photovoltaic historical data set and a load historical data set at each moment; as other implementation methods, the implementer can set them according to the actual situation.
[0098] The distance between the local photovoltaic vector at each moment of each cycle and the local photovoltaic vector at any moment in the photovoltaic historical data set is recorded as the distance difference;
[0099] Preferably, in this embodiment, the DTW distance between the local photovoltaic vector at each moment in each cycle and the local photovoltaic vector at any moment in the photovoltaic historical data set is recorded as the distance difference.
[0100] The difference between the photovoltaic fluctuation value at each moment in each cycle and any moment in the photovoltaic historical data set is recorded as the fluctuation difference;
[0101] Preferably, in this embodiment, the absolute value of the difference between the photovoltaic fluctuation value at each moment in each cycle and any moment in the photovoltaic historical data set is recorded as the fluctuation difference.
[0102] Calculate the time difference between each moment in each cycle and any moment in the photovoltaic historical data set;
[0103] It should be noted that, in the present embodiment, photovoltaic power data for one day is collected, and there are photovoltaic power data at 96 moments in total. The photovoltaic power data at 0:00 to 24:00 each day are numbered from sequence number 1, and the photovoltaic power data at each moment of the previous day are also numbered from sequence number 1 to sequence number 96. Therefore, there are local photovoltaic vectors at the same moment in the photovoltaic historical data set, that is, there is a situation where the sequence numbers are consistent, and the time difference is the absolute value of the difference between the sequence number corresponding to each moment in each cycle and the sequence number corresponding to any moment in the photovoltaic historical data set.
[0104] Calculating the cumulative sum of the fluctuation difference and the time difference; taking the product of the distance difference and the cumulative sum as the trend difference degree at any moment in the photovoltaic historical data set;
[0105] Calculate the result of an exponential function with a natural constant as the base and the opposite number of the photovoltaic fluctuation value as the exponent, and record it as a first exponential value; take the ratio of the first exponential value to the trend difference as the importance of the photovoltaic characteristics at any moment in the photovoltaic historical data set;
[0106] For the local load vector and the load fluctuation value at any time in the load history data set, the same method as the photovoltaic characteristic importance is adopted to obtain the load characteristic importance at any time in the load history data set.
[0107] Preferably, in this embodiment, the calculation formula for the importance of photovoltaic characteristics at any time in the photovoltaic historical data set is: ,in, For the Cycle No. The photovoltaic historical data set at the time The importance of photovoltaic characteristics at each moment, For the Cycle No. The photovoltaic fluctuation value at the moment, For the Cycle No. The local photovoltaic vector at time , For the Cycle No. The photovoltaic historical data set at the time The local photovoltaic vector at the moment, For the Cycle No. The moment is the first The fluctuation difference between the moments For the Cycle No. The moment and its photovoltaic historical data set The time difference between the moments is an exponential function with a natural constant as base, Indicates the calculated distance, To preset a value greater than 0 to avoid the denominator being 0, in this embodiment, The value is 0.1. As other implementation methods, the implementer can set it according to the actual situation. is the first index value, is the cumulative sum, is the trend difference.
[0108] It should be noted that the larger the photovoltaic fluctuation value, the greater the uncertainty of the change in the corresponding local photovoltaic vector, and the smaller the reference degree for the prediction; the smaller the distance difference, the closer the change trend between the two local photovoltaic vectors, the higher the similarity, and the greater the reference degree for the subsequent photovoltaic power prediction; secondly, the smaller the cumulative sum, the smaller the fluctuation difference between the two local photovoltaic vectors and the closer the time period, the smaller the resulting trend difference, which means that the corresponding local photovoltaic vector in the photovoltaic historical data set is more important for the prediction of photovoltaic power, the greater the importance of the obtained photovoltaic characteristics, the greater the reference degree of the corresponding local photovoltaic vector for subsequent predictions; accordingly, the greater the importance of the obtained load characteristics, the greater the reference degree of the corresponding local load vector for subsequent predictions.
[0109] Furthermore, a random forest model is constructed based on the importance of the photovoltaic characteristics and the importance of the load characteristics, specifically:
[0110] The photovoltaic power vectors at all times in the photovoltaic historical data set at each moment of each cycle are used as the total training samples, and the photovoltaic feature importance at all times in the photovoltaic historical data set is used as the input feature of the random forest algorithm to construct multiple decision trees and obtain the random forest model corresponding to the trained photovoltaic power;
[0111] The load power vectors at all times in the load history data set at each moment of each cycle are used as the total training samples, and the load feature importance at all times in the load history data set is used as the input feature of the random forest algorithm to construct multiple decision trees to obtain the random forest model corresponding to the trained load power;
[0112] Preferably, in this embodiment, the number of decision trees in the random forest algorithm is set to 200, the number of samples in each decision tree is 100, the maximum depth of the decision tree is 50, and the photovoltaic power prediction length output by each decision tree is 4, wherein the construction of the random forest algorithm is a well-known technology and will not be repeated here.
[0113] Based on the photovoltaic power vector at each moment, the trained random forest model corresponding to the photovoltaic power is used for prediction to obtain the photovoltaic power prediction vector at the next moment. The method for determining the value of each element in the photovoltaic power prediction vector is as follows:
[0114] ,in, is the photovoltaic power prediction vector output by the random forest algorithm. element values, represents the number of decision trees; Indicates The sum of the importance of photovoltaic features at all times in the decision tree; Indicates The first PV power prediction vector output by the decision tree element value; is the normalization function.
[0115] Based on the load power vector at each moment, the trained random forest model corresponding to the load power is used for prediction to obtain the load power prediction vector at the next moment. The method for determining the value of each element in the load power prediction vector is as follows:
[0116] ,in, is the load power prediction vector output by the random forest algorithm. element values, represents the number of decision trees; Indicates The sum of the importance of load features at all times in a decision tree; Indicates The load power prediction vector output by the decision tree is element value; is the normalization function.
[0117] Preferably, in this embodiment, the sigmoid function is used for normalization processing, wherein the sigmoid function is a well-known technology and will not be described in detail here. As other implementation methods, the implementer may adopt other methods of the prior art, such as the tanh function, etc., and this embodiment does not impose any special restrictions on this.
[0118] It should be noted that, by taking a weighted average of the prediction results of each decision tree, if the reference degree of the local photovoltaic vector contained in the photovoltaic power vector at the corresponding moment selected by each decision tree is greater, that is, the greater the importance of the photovoltaic feature, the higher the weight of the element value in the corresponding predicted photovoltaic power prediction vector, thereby enhancing its important role in the random forest algorithm; accordingly, if the reference degree of the local load vector contained in the load power vector at the corresponding moment selected by each decision tree is greater, that is, the greater the importance of the load feature, the higher the weight of the element value in the corresponding predicted load power prediction vector, thereby improving the accuracy of the prediction, so as to subsequently set an accurate chopping factor, thereby obtaining a suitable disturbance signal and improving the effect of island prediction.
[0119] At this point, the photovoltaic power prediction vector and the load power prediction vector at the next moment corresponding to each moment in each cycle are obtained.
[0120] Step 4: Determine the adjustment factor at each moment in each cycle according to the difference between each element in the photovoltaic power prediction vector and the elements at the same position in the load power prediction vector, as well as the similarity between the photovoltaic power prediction vector and the load power prediction vector.
[0121] Furthermore, considering that a large adjustment of the interference current has a great impact on the power quality of the power grid, it is necessary to reduce the adjustment amplitude of the interference current while ensuring the accuracy of island detection; analyze the matching degree between the photovoltaic power prediction vector and the load power prediction vector, and determine the adjustment factor of the chopping coefficient of the active frequency shift method, which is specifically:
[0122] Calculate the similarity between the photovoltaic power prediction vector and the load power prediction vector at the next moment corresponding to each moment in each cycle;
[0123] Preferably, in this embodiment, the cosine similarity between the photovoltaic power prediction vector and the load power prediction vector at the next moment corresponding to each moment in each cycle is calculated. As other implementation methods, the implementer can adopt other methods of the prior art, such as the Pearson correlation coefficient, the Spearman correlation coefficient, etc. This embodiment does not impose any special restrictions on this.
[0124] Calculate the difference between any element in the photovoltaic power prediction vector at the next moment corresponding to each moment in each cycle and the element at the corresponding position in its load power prediction vector;
[0125] Preferably, in this embodiment, the absolute value of the difference between any element in the photovoltaic power prediction vector at the next moment corresponding to each moment in each cycle and the element at the corresponding position in the load power prediction vector is calculated.
[0126] The product of the difference value of any element and the position number of any element in the photovoltaic power prediction vector is recorded as the power difference degree of any element;
[0127] The calculation result of the exponential function with the natural constant as the base and the similarity as the exponent is recorded as the second exponent value; the sum of the ratios of the second exponent values of all elements in the photovoltaic power prediction vector to the power difference is used as the adjustment factor at each moment in each cycle.
[0128] Preferably, in this embodiment, the calculation formula of the adjustment factor at each moment of each cycle is: ,in, For the Cycle No. The adjustment factor for time, For the Cycle No. The photovoltaic power prediction vector at the next moment corresponding to the moment, For the Cycle No. The load power prediction vector at the next moment corresponding to the moment, is the first element values, is the load power prediction vector element values, is the serial number corresponding to the element in the photovoltaic power prediction vector, is the number of all elements in the photovoltaic power prediction vector, To calculate the similarity, is an exponential function with a natural constant as base, To preset a value greater than 0 to avoid the denominator being 0, in this embodiment, The value is 1. As other implementation methods, the implementer can set it according to the actual situation. is the second index value, is the power difference.
[0129] It should be noted that the smaller the difference between the load power and the photovoltaic power, the higher the power matching degree of the power grid, the greater the difficulty of island detection, and the larger the chopping coefficient needs to be set to improve the sensitivity of island detection. Therefore, the larger the adjustment factor of the chopping coefficient, the larger the phase difference between the interference current and the grid current, the faster the frequency deviation occurs when the grid frequency is disturbed, and the higher the island detection accuracy of the photovoltaic inverter. The larger the difference between the load power and the photovoltaic power, the lower the power matching degree of the grid, and the smaller the interference can detect the island state. A smaller chopping coefficient is required to quickly detect the island state. The smaller the difference between the interference current and the grid current obtained later, the smaller the impact on the power quality of the grid, and the effect of island detection is improved. In addition, the greater the similarity between the photovoltaic power prediction vector and the load power prediction vector, the more similar the changes of the two, and the smaller the change of the power matching degree of the grid. Therefore, the role of each element in the photovoltaic power prediction vector and the load power prediction vector in calculating the chopping coefficient is improved to avoid the subsequent large change of the interference current causing the decline of the power quality of the grid. At the same time, the larger the position number of the corresponding element, the lower the accuracy of its prediction, and the smaller the impact on the adjustment factor of the chopping coefficient.
[0130] At this point, the adjustment factor at each moment in each cycle is obtained.
[0131] Step 5: Based on the adjustment factor, determine the chopping coefficient of the active frequency shift method at each moment of each cycle, and perform island detection on the photovoltaic power generation system in combination with the grid frequency.
[0132] Further, based on the adjustment factor, the chopping coefficient in the active frequency shift method at each moment of each cycle is determined, specifically:
[0133] The calculation method for determining the chopping coefficient in the active frequency deviation method at each moment of each cycle is: ,in, For the Cycle No. The chopping coefficient of the active frequency shift method at time, To preset the initial chopping coefficient, For the Cycle No. The adjustment factor for time, is the normalization function.
[0134] Preferably, in this embodiment, the tanh function is used for normalization processing, wherein the tanh function is a well-known technology and will not be described in detail here; secondly, the initial chopping coefficient is preset The value is 0.05. As other implementation methods, the implementer can set it according to the actual situation.
[0135] It should be noted that the larger the adjustment factor, the larger the resulting chopping coefficient. The chopping coefficient is calculated by taking the power matching degree of the grid on a longer time scale in the photovoltaic power prediction vector and the load power prediction vector as a reference, so as to subsequently obtain the interference current that satisfies the island detection in a longer time, ensure the speed of the island detection, and avoid large adjustments of the interference current in a short time, which affects the power quality of the grid.
[0136] Furthermore, based on the chopping coefficient and in combination with the active frequency shift method, the photovoltaic power generation system is subjected to island detection, specifically:
[0137] Inject disturbance signal into the output current of photovoltaic inverter , the grid frequency at each moment is measured again by the photovoltaic inverter. If the grid frequency exceeds the preset threshold interval, an island phenomenon occurs. If the grid frequency does not exceed the preset threshold interval, no island phenomenon occurs.
[0138] Preferably, in this embodiment, the preset threshold interval is , that is, if the grid frequency satisfy , indicating that there is no island phenomenon in the photovoltaic power generation system. or , indicating that the photovoltaic power generation system has an island phenomenon.
[0139] It should be noted that the active frequency shift method is a well-known technology and will not be described in detail here.
[0140] It should be noted that by injecting a disturbance signal into the photovoltaic inverter, under normal circumstances, the frequency of the output interference current of the photovoltaic inverter is clamped by the power grid, so that the impact of its disturbance signal on the grid frequency is very small; in the island state, the grid frequency is no longer clamped by the power grid, and the disturbance signal causes the grid frequency to exceed the preset threshold range.
[0141] Based on the same inventive concept as the above method, an embodiment of the present application also provides a photovoltaic inverter island detection system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned photovoltaic inverter island detection methods are implemented.
[0142] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0144] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the present application. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application without departing from the content of the technical solution of the present application, shall fall within the protection scope of the technical solution of the present application.
Claims
1. A photovoltaic inverter island detection method, characterized in that: The method comprises the following steps: Real-time acquisition of the photovoltaic power at each moment in each cycle output by the photovoltaic inverter, as well as the load power consumed by the local load at each moment in each cycle, and real-time acquisition of the grid frequency measured by the photovoltaic inverter; For photovoltaic power, obtain the photovoltaic power vector and photovoltaic historical data set at each moment; Determine the photovoltaic trend value at each moment of each cycle according to the trend change of the elements in the photovoltaic power vector and the short-term fluctuation degree of the elements; analyze the time interval between each moment of each cycle and the corresponding moment of the elements in the photovoltaic power vector, and determine the photovoltaic fluctuation value at each moment of each cycle in combination with the photovoltaic trend value; Determine the importance of photovoltaic characteristics at any moment in the photovoltaic historical data set according to the difference between the photovoltaic power vector at each moment in each cycle and any moment in the photovoltaic historical data set, and the degree of difference in the photovoltaic fluctuation value; Based on the photovoltaic power vector and photovoltaic feature importance at any moment in the photovoltaic historical data set, a prediction model is constructed, and the photovoltaic power vector is predicted to obtain the photovoltaic power prediction vector at the next moment corresponding to each moment in each cycle; For the load power, the load power prediction vector of the next moment corresponding to each moment of each cycle is obtained accordingly; Determine the adjustment factor at each moment of each cycle according to the difference between each element in the photovoltaic power prediction vector and the elements at the same position in the load power prediction vector, as well as the similarity between the photovoltaic power prediction vector and the load power prediction vector; determine the chopping coefficient of the active frequency offset method at each moment of each cycle based on the adjustment factor, and perform island detection on the photovoltaic power generation system in combination with the grid frequency; Determining the photovoltaic trend quantity at each moment of each cycle includes: Randomly select the photovoltaic powers of the last multiple moments from the photovoltaic power vector to form a local photovoltaic vector at each moment of each cycle; Performing a linear fit on the local photovoltaic vector to obtain the slope of the fitting line; The difference between each element in the local photovoltaic vector and the corresponding predicted value on the fitting straight line is recorded as the fitting error of each element in the local photovoltaic vector; Calculating the mean and standard deviation of the fitting errors of all elements in the local photovoltaic vector; Calculating the difference between the fitting error and the mean value, and recording it as the deviation of each element; and counting the number of elements in the local photovoltaic vector whose deviation is greater than the standard deviation; The sum of the square of the slope and the number of elements at each moment in each cycle is calculated and recorded as the first sum; the calculation result of the exponential function with the natural constant as the base and the first sum as the exponent is used as the photovoltaic trend quantity at each moment in each cycle.
2. A photovoltaic inverter island detection method as claimed in claim 1, characterized in that: The step of obtaining the photovoltaic power vector and photovoltaic historical data set at each moment includes: The photovoltaic power at each moment in each cycle and at multiple moments before it is recorded as the photovoltaic power vector at each moment; The photovoltaic power vectors at multiple moments before each moment are respectively combined to form the photovoltaic historical data set at each moment.
3. A photovoltaic inverter island detection method as claimed in claim 1, characterized in that: The step of determining the photovoltaic fluctuation value at each moment of each cycle includes: The ratio of the time corresponding to each element in the local photovoltaic vector to the number of all elements in the local photovoltaic vector is recorded as the photovoltaic ratio; Calculating the product of the photovoltaic ratio of each element in the local photovoltaic vector and the fitting error thereof, and recording the sum of the products of all elements in the local photovoltaic vector at each moment in each cycle as a second sum value; The product of the second sum value and the photovoltaic trend value is used as the photovoltaic fluctuation value at each moment of each cycle.
4. A photovoltaic inverter island detection method as claimed in claim 1, characterized in that: The step of determining the importance of photovoltaic characteristics at any time in the photovoltaic historical data set includes: The distance between the local photovoltaic vector at each moment in each cycle and any moment in the photovoltaic historical data set is recorded as the distance difference; The difference between the photovoltaic fluctuation value at each moment in each cycle and any moment in the photovoltaic historical data set is recorded as the fluctuation difference; Calculate the time difference between each moment in each cycle and any moment in the photovoltaic historical data set; Calculating the cumulative sum of the fluctuation difference and the time difference; multiplying the distance difference by the cumulative sum as the trend difference degree at any moment in the photovoltaic historical data set; The result of calculating an exponential function with a natural constant as the base and the opposite number of the photovoltaic fluctuation value as the exponent is calculated and recorded as a first exponential value; and the ratio of the first exponential value to the trend difference is used as the importance of the photovoltaic characteristics at any time in the photovoltaic historical data set.
5. A photovoltaic inverter island detection method as claimed in claim 1, characterized in that: The method for determining the value of each element in the photovoltaic power prediction vector is: ,in, is the photovoltaic power prediction vector output by the random forest algorithm. element values, represents the number of decision trees; Indicates The sum of the importance of photovoltaic features at all times extracted by the decision tree; Indicates The first PV power prediction vector output by the decision tree element value; is the normalization function.
6. A photovoltaic inverter island detection method as claimed in claim 1, characterized in that: Determining the adjustment factor at each moment of each cycle includes: Calculate the similarity between the photovoltaic power prediction vector and the load power prediction vector at the next moment corresponding to each moment in each cycle; Calculate the difference between any element in the photovoltaic power prediction vector at the next moment corresponding to each moment in each cycle and the element at the corresponding position in its load power prediction vector; The product of the difference value of any element and the position number of any element in the photovoltaic power prediction vector is recorded as the power difference degree of any element; The calculation result of the exponential function with the natural constant as the base and the similarity as the exponent is recorded as the second exponential value, and the sum of the ratios of the second exponential values of all elements to the power difference is used as the adjustment factor at each moment in each cycle.
7. A photovoltaic inverter island detection method as claimed in claim 1, characterized in that: The chopping coefficient of the active frequency shift method at each moment of each cycle is determined by the following calculation method: ,in, For the Cycle No. The chopping coefficient of the active frequency shift method at time, To preset the initial chopping coefficient, For the Cycle No. The adjustment factor for time, is the normalization function.
8. A photovoltaic inverter island detection method as claimed in claim 1, characterized in that: The island detection of the photovoltaic power generation system comprises: Inject disturbance signal into the output current of photovoltaic inverter , again, the grid frequency is measured by the photovoltaic inverter. If the grid frequency exceeds the preset threshold range, an island phenomenon occurs. Otherwise, no island phenomenon occurs.
9. A photovoltaic inverter island detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the photovoltaic inverter island detection method as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Photovoltaic inverter islanding detection method and device
CN105738730A