Distribution transformer gear position identification method, system and device based on LightGBM classification and power flow calculation

The LightGBM classification algorithm and power flow calculation method are used to identify the distribution transformer adjustment situation, which solves the problem of insufficient accuracy and convenience in the existing technology, improves the accuracy and data support of distribution transformer adjustment diagnosis, and improves voltage qualification. Rate.

CN118381019BActive Publication Date: 2024-08-23JIANGSU ELECTRIC POWER RES INST +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410813847.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-08-23
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

The existing technology is insufficient in accuracy and convenience when identifying the gears of distribution transformers, which makes it difficult to adjust the voltage fluctuations of the distribution network, and the quality of maintenance data is poor, which affects the voltage qualification rate in the Taiwan area.

Method used

Using a method based on LightGBM classification algorithm and power flow calculation, by obtaining characteristic indicators such as short-term power outage, voltage difference coefficient of variation and power factor range, it can identify whether the distribution transformer is adjusted, and calculate its time gear, and then determine the gear adjustment. Time point and current gear.

Benefits of technology

It improves the accuracy and convenience of distribution transformer adjustment diagnosis, provides data support for lean management and control, helps operation and maintenance personnel formulate adjustment plans in advance, and improves distribution transformer adjustment management level and voltage qualification rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381019B
    Figure CN118381019B
Patent Text Reader

Abstract

The present invention discloses a distribution transformer gear position identification method, system and device based on LightGBM classification and power flow calculation, the method comprising: obtaining relevant data of the line to be diagnosed and the distribution transformer and medium and low voltage power outage events; extracting characteristic indicators according to the acquired data; inputting the extracted characteristic indicators into the distribution transformer gear adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of gear adjustment, if the distribution transformer is suspected of gear adjustment and the line to which the distribution transformer belongs has not been transferred, then the distribution transformer is a gear adjustment distribution transformer, otherwise the distribution transformer is a non-gear adjustment distribution transformer; using the distribution transformer gear position calculation method based on power flow calculation to calculate the gear position of the distribution transformer at the moment, calculating the gear adjustment time point and the gear position before and after the gear adjustment of the gear adjustment distribution transformer according to the gear position of the distribution transformer at the moment, and calculating the current gear position of the non-gear adjustment distribution transformer. The present invention can quickly and accurately identify whether the distribution transformer is geared and calculate the specific gear position of the distribution transformer, and provide data support for lean control of the distribution transformer gear position setting and adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distribution network distribution transformer gear position identification, and specifically relates to a distribution transformer gear position identification method, system and device based on LightGBM classification and power flow calculation. Background Art

[0002] The voltage qualification rate of the substation is one of the main standards for measuring the quality of electric energy, and it is used as a standard for assessing the voltage quality of the substation. According to the feedback from the special survey on empowering the grassroots, in recent years, with the continuous increase in the number of electricity users, the fluctuation of electricity load has become faster and faster, and the voltage fluctuation has also increased. In some areas, there are large voltage fluctuations in the distribution lines, and the distribution transformers (referred to as distribution transformers) need to be frequently adjusted. However, the PMS (Personal Asset Lean Management) system maintains the data quality of the distribution transformer gear position, and the substation operation and maintenance personnel need to shut down the power to check the actual gear position of the distribution transformer on site before formulating a gear adjustment plan, which further increases the pressure and difficulty of voltage regulation of the distribution transformer.

[0003] At present, the invention patent "Distribution transformer gear position identification method and system based on exponential nonlinear regression" (Announcement No.: CN113691174B) proposes a distribution transformer gear position identification method and system based on exponential nonlinear regression, which uses the distribution transformer daily voltage curve to normalize and divide the voltage interval for gear position calculation. The invention patent "Distribution transformer gear position identification method based on double-sided current measurement" (Publication No.: CN117517754A) proposes a distribution transformer gear position identification method based on double-sided current measurement. It is necessary to install a current transformer and calculate the primary and secondary current ratio of the distribution transformer to determine the transformer gear position in the three-phase balanced state. The existing technology simply calculates the distribution transformer gear position by using statistical methods or installing devices. The algorithm is relatively inaccurate, the installation device is not convenient, and it does not identify whether the distribution transformer is adjusted.

[0004] Therefore, it is of great application value to study a method and related technology that can quickly, accurately and conveniently identify whether the distribution transformer needs to be adjusted and calculate the specific gear of the distribution transformer, which can provide data support for the lean control of the distribution transformer gear setting and adjustment, and help the substation operation and maintenance personnel to grasp the distribution transformer gear in advance and formulate the adjustment plan in time, improve the management level of distribution transformer adjustment, and promote the improvement of the voltage qualification rate of the substation. Summary of the invention

[0005] Purpose of the invention: In order to solve the current problems of frequent gear adjustment of distribution transformers, poor quality of distribution transformer gear maintenance data, and difficulty in executing distribution transformer gear adjustment, the present invention proposes a distribution transformer gear identification method, system and device based on LightGBM classification and power flow calculation, which can quickly, accurately and conveniently identify whether the distribution transformer is adjusted and calculate the specific gear of the distribution transformer based on LightGBM classification and power flow calculation method.

[0006] Technical solution: In the first aspect, a method for identifying the gear position of a distribution transformer based on LightGBM classification and power flow calculation comprises the following steps:

[0007] Step 1: Obtain the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the line to be diagnosed; and obtain the measurement data of the line, the measurement data of the distribution transformer, and the medium and low voltage power outage events; the distribution transformer is located on the line to be diagnosed;

[0008] Step 2: Extract characteristic indicators based on the acquired data, including: whether there is a short-term power outage in the distribution transformer, the coefficient of variation of the first-order difference of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer;

[0009] Step 3: Input the extracted characteristic indicators into the distribution transformer adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of adjustment. If the distribution transformer is suspected of adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is an adjustment distribution transformer; otherwise, the distribution transformer is an unadjusted distribution transformer;

[0010] Step 4: Use the distribution transformer gear calculation method based on power flow calculation to calculate the gear position of the distribution transformer at the time. For the distribution transformer with gear adjustment, calculate the gear position of the distribution transformer before and after the gear adjustment according to the gear position at the time of the distribution transformer; for the distribution transformer without gear adjustment, calculate the current gear position of the distribution transformer according to the gear position at the time of the distribution transformer.

[0011] Furthermore, characteristic indicators are extracted based on the acquired data, including: whether there is a short-term power outage in the distribution transformer, the coefficient of variation of the first-order difference of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer. The specific indicators are calculated as follows:

[0012] Whether there is a short-term power outage in the distribution transformer: According to the medium and low voltage power outage events of the distribution transformer, including the power outage events of the distribution transformer and the power outage events of the users under the distribution transformer, if there is a short-term power outage in the distribution transformer or the users under the distribution transformer, the short-term power outage refers to the power outage and restoration time on that day is less than the threshold. , then there is a short-term power outage in the distribution transformer, otherwise there is no short-term power outage in the distribution transformer; whether there is a short-term power outage in the distribution transformer is used as an indicator of whether there is a short-term power outage in the distribution transformer ;No. Whether there is a short-term power outage indicator for each distribution transformer The calculation formula is as follows:

[0013] ,

[0014] Coefficient of variation of the first-order difference of distribution transformer voltage: Calculate the first-order difference of distribution transformer voltage based on the distribution transformer voltage measurement data, then calculate the standard deviation and mean of the first-order difference of distribution transformer voltage, and use the ratio of the standard deviation to the mean as the coefficient of variation of the first-order difference of distribution transformer voltage. ;No. The coefficient of variation of the first-order difference of the distribution transformer voltage The specific calculation process is as follows:

[0015] Get the A distribution transformer in the time period The voltage measurement data is sampled at equal intervals within the , the time intervals are , calculate the first-order difference of the distribution transformer voltage for:

[0016] ,

[0017] In the formula, Indicates The distribution transformer The first-order difference of voltage at a moment is calculated as follows:

[0018] ,

[0019] In the formula, Indicates The distribution variable The voltage at a moment;

[0020] Calculate the standard deviation of the first-order difference of the distribution transformer voltage and mean , the calculation formula is as follows:

[0021] ,

[0022] ,

[0023] The ratio of the above standard deviation to the mean is taken as the The coefficient of variation of the voltage first-order difference of a distribution transformer , the calculation formula is as follows:

[0024] ,

[0025] Maximum mean difference of line and distribution transformer voltage ratio: Calculate the ratio of line voltage to distribution transformer voltage at each moment based on distribution transformer voltage measurement data and line voltage measurement data, then calculate the first-order difference of the ratio of line voltage to distribution transformer voltage, take the moment when the absolute value of the first-order difference of the ratio of line voltage to distribution transformer voltage is the maximum, calculate the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment, and use the absolute value of the difference between the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment as the maximum mean difference index of the ratio of line voltage to distribution transformer voltage ;No. The maximum mean difference index of the voltage ratio between the line and the distribution transformer The specific calculation process is as follows:

[0026] Get the The distribution transformer voltage measurement data and The voltage measurement data of the distribution transformer line is used to calculate the ratio of the line voltage to the distribution transformer voltage at each moment. for:

[0027] ,

[0028] In the formula, Indicates The ratio of the line voltage of a distribution transformer to the distribution transformer voltage is calculated as follows:

[0029] ,

[0030] In the formula, , Respectively represent The distribution variable The distribution transformer voltage and the line voltage at each moment;

[0031] Calculate the first-order difference of the ratio of line voltage to distribution transformer voltage for:

[0032] ,

[0033] In the formula, Indicates The distribution variable The first-order difference of the ratio of the line voltage to the distribution transformer voltage at a certain moment is calculated as follows:

[0034] ,

[0035] The time corresponding to the maximum absolute value of the first-order difference of the ratio of the line voltage to the distribution transformer voltage is calculated as:

[0036] ,

[0037] Calculate the maximum moment The average value of the ratio of the line voltage to the distribution transformer voltage before and after is:

[0038] ,

[0039] ,

[0040] In the formula, , Respectively At the maximum moment The average value and maximum moment of the ratio of the front line voltage to the distribution transformer voltage The average value of the ratio of the rear line voltage to the distribution transformer voltage; For the At the maximum moment The corresponding sampling point number;

[0041] The absolute value of the average difference between the line voltage and the distribution transformer voltage before and after the maximum moment is taken as the The maximum mean difference index of the voltage ratio between the line and the distribution transformer , the calculation formula is as follows:

[0042] ,

[0043] Correlation coefficient between distribution transformer and line voltage: Based on the distribution transformer voltage measurement data and line voltage measurement data, the correlation coefficient between distribution transformer voltage and line voltage is calculated using the Pearson correlation coefficient formula as an indicator of the correlation coefficient between distribution transformer and line voltage. ;No. The correlation coefficient index between the distribution transformer and the line voltage The calculation formula is as follows:

[0044] ,

[0045] in, For the The voltage correlation coefficient between a distribution transformer and its line, , Respectively The average voltage of each distribution transformer and its associated lines, , For the The first The distribution transformer voltage and the line voltage at each moment;

[0046] Distribution transformer power factor range: According to the distribution transformer active power and reactive power data, the square root of the sum of the squares of active power and reactive power is taken as the apparent power. The power factor of the distribution transformer at each moment is calculated by dividing the active power by the apparent power. The difference between the maximum and minimum power factor of the distribution transformer is taken as the distribution transformer power factor range index. ;No. Power factor extreme difference index of each distribution transformer The specific calculation process is as follows:

[0047] Get the A distribution transformer in the time period Active power measurement sequence within for:

[0048] ,

[0049] In the formula, , Respectively represent Active power measurement sequence of the first distribution transformer and the The distribution variable Active power at a moment;

[0050] Get the A distribution transformer in the time period Reactive power measurement sequence within for:

[0051] ,

[0052] In the formula, , Respectively represent The reactive power measurement sequence of the distribution transformer and the The distribution variable Reactive power at a given moment;

[0053] The square root of the sum of the squares of active power and reactive power is taken as apparent power, and the power factor of the distribution transformer at each moment is calculated by dividing the active power by the apparent power. Power factor sequence of a distribution transformer for:

[0054] ,

[0055] In the formula, Indicates The distribution variable The power factor at a certain moment is calculated as follows:

[0056] ,

[0057] The first The difference between the maximum and minimum power factors of the first distribution transformer is taken as the Distribution transformer power factor extreme difference index , the calculation formula is as follows:

[0058] ,

[0059] Standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer: Based on the voltage data and electrical distance data of all distribution transformers under the line, the electrical distance between the distribution transformer and other distribution transformers under the line is calculated cyclically, and the distribution transformer with the smallest distance from other distribution transformers is selected. The standard deviation of the ratio of the distribution transformer voltage to the distribution transformer voltage with the smallest distance is used as the standard deviation index of the voltage ratio between the distribution transformer and the adjacent distribution transformer. ;No. Standard deviation index of voltage ratio between a distribution transformer and its adjacent distribution transformers The specific calculation process is as follows:

[0060] Get the line The electrical distance data of the distribution transformer is calculated cyclically. The electrical distance between a distribution transformer and other distribution transformers under the line , filter out The distribution transformer with the smallest distance to other distribution transformers ;

[0061] Get the The first The voltage data of the distribution transformer The voltage of the distribution transformer is the smallest with the The standard deviation of the ratio of the distribution transformer voltage is used as the standard deviation index of the ratio of the distribution transformer voltage to the adjacent distribution transformer voltage. , the calculation formula is as follows:

[0062] ,

[0063] In the formula, For the The distribution transformer voltage is The moment with the smallest distance The ratio of the distribution transformer voltage; For the The voltage of the distribution transformer is the smallest with the The average value of the ratio of the distribution transformer voltages; The calculation formula is as follows:

[0064] ,

[0065] In the formula, , For the The first The distribution transformer voltage and the distance at the moment are the smallest A distribution transformer voltage; , Respectively The smallest distance between the transformer and The rated voltage of a distribution transformer.

[0066] Furthermore, the extracted characteristic indicators are input into the distribution transformer adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of adjustment. If the distribution transformer is suspected of adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is an adjustment distribution transformer, otherwise the distribution transformer is an unadjusted distribution transformer. The specific steps are as follows:

[0067] Step s31: Use the LightGBM classification algorithm to train the distribution transformer adjustment recognition model, including:

[0068] A random partitioning method is used to select a part of the samples in the historical sample data set as the training set, and the remaining samples are used as the test set. The characteristic indicators of the distribution transformer in the training set are used as the model input, and whether the distribution transformer is adjusted is used as the model output. The LightGBM classification algorithm is used to train the distribution transformer adjustment recognition model. This model is hereinafter referred to as the LightGBM distribution transformer adjustment recognition model.

[0069] The recognition accuracy of the classification model is evaluated using the test set, and the harmonic mean of precision and recall is used. Scores are evaluated until Score exceeds threshold , save the trained LightGBM variable pitch recognition model; The scores are defined as follows:

[0070] ,

[0071] In the formula, is the number of actual transformer shifts and predicted transformer shifts; is the number of distribution transformers that are actually not adjusted but are predicted to be adjusted; is the number of distribution transformers that are actually adjusted but predicted to be not adjusted;

[0072] Step s32: input the extracted feature index into the trained LightGBM distribution transformer gear adjustment recognition model to identify whether the distribution transformer is suspected of gear adjustment;

[0073] Step s33: If the distribution transformer is suspected to be adjusted and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a adjusted distribution transformer; if the distribution transformer is suspected to be adjusted but the line to which the distribution transformer belongs has been transferred, the distribution transformer is a non-adjusted distribution transformer; if the distribution transformer is suspected to be non-adjusted, the distribution transformer is a non-adjusted distribution transformer. Whether the line has been transferred can be judged by referring to the transfer operation identification method in the invention patent "A medium-voltage distribution network transfer operation identification method, device and equipment" (publication number: CN113642601A).

[0074] Furthermore, the gear position calculation method for the distribution transformer at a certain time is used to calculate the gear position based on the power flow calculation, and the specific steps include:

[0075] Step a: Perform power flow calculation on the line to which the distribution transformer belongs. If the power deviation rate at the head end of the line is lower than the threshold, the high-voltage side voltage of the distribution transformer estimated by the power flow calculation is used as the estimated value of the high-voltage side voltage of the distribution transformer; if the power deviation rate at the head end of the line is higher than the threshold, the electrical distance data is used to obtain the nearest high-supply and high-meter distribution transformer, and the voltage of the nearest high-supply and high-meter distribution transformer is used as the estimated value of the high-voltage side voltage of the distribution transformer;

[0076] Step b: using the correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer to perform clock shift, and taking the ratio of the standardized estimated value of the high-voltage side voltage of the distribution transformer to the standardized actual value of the low-voltage side voltage of the distribution transformer after clock shift as the distribution transformer moment ratio;

[0077] Step c: Perform Gaussian distribution verification on historical ratio and gear data, give the gear ratio classification range, smooth the ratio curve at the time of the gear ratio change, archive it according to the gear ratio classification range, and calculate the gear at the time of the gear ratio change.

[0078] Furthermore, the power flow calculation is performed on the line to which the distribution transformer belongs. If the power deviation rate at the head end of the line is lower than the threshold, the high-voltage side voltage of the distribution transformer estimated by the power flow calculation is used as the estimated value of the high-voltage side voltage of the distribution transformer; if the power deviation rate at the head end of the line is higher than the threshold, the high-supply and high-meter distribution transformer closest to the distribution transformer is obtained by using the electrical distance data, and the voltage of the high-supply and high-meter distribution transformer closest to the distribution transformer is used as the estimated value of the high-voltage side voltage of the distribution transformer. The specific steps include:

[0079] Obtain the topological structure, line parameters, distribution transformer parameters, and measurement data of the line to which the distribution transformer belongs, use the forward and backward method to calculate the power flow, and estimate the voltage and power estimates of all nodes of the line;

[0080] The measured power value at the head end of the line and the estimated power value at the head end of the line are divided by the rated power of the line for standardization, and then the power deviation rate at the head end of the line is calculated using the average absolute error between the measured power value at the head end of the line and the estimated power value after standardization. The calculation formula for the power deviation rate at the head end of the line is as follows:

[0081] ,

[0082] In the formula, is the power deviation rate at the line head end, is the rated power of the line, and For the The measured and estimated power values ​​at the head end of the line at the sampling points are: Indicates the number of sampling points within the data time period;

[0083] If the power deviation rate at the head end of the line Below threshold , then the voltage on the high-voltage side of the distribution transformer estimated by the power flow calculation is As the estimated value of the voltage on the high-voltage side of the distribution transformer;

[0084] If the power deviation rate at the head end of the line Above threshold , obtain the electrical distance data of all nodes under the line, and cyclically calculate the electrical distance between the distribution transformer and all high-voltage distribution transformers under the line , select the high-voltage power supply and high-voltage distribution transformer with the smallest electrical distance As the nearest high-supply and high-meter distribution transformer; Voltage As the estimated value of the voltage on the high-voltage side of the distribution transformer.

[0085] Further, the clock shift is performed using the correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer, and the ratio of the standardized estimated value of the high-voltage side voltage of the distribution transformer to the actual value of the low-voltage side voltage of the distribution transformer after the clock shift is used as the distribution transformer moment ratio. The specific steps include:

[0086] Assume that The offset of the clock offset of the actual value of the low-voltage side voltage of the distribution transformer is , calculate the The correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer after clock offset is calculated as follows:

[0087] ,

[0088] in, For the Estimated voltage value and clock offset of the high voltage side of the distribution transformer The correlation coefficient of the actual value of the low-voltage side voltage of the distribution transformer after , Respectively The actual value of the low-voltage side voltage of the distribution transformer and the The average value of the estimated voltage on the high-voltage side of the distribution transformer, , Respectively The actual value of the low-voltage side voltage of the distribution transformer and the Estimated voltage value of the high voltage side of the distribution transformer, The value range is 0, 1, -1, 2, and -2, which respectively represent that the actual value of the low-voltage side voltage of the distribution transformer is not shifted, shifted backward by 1 time point, shifted forward by 1 time point, shifted backward by 2 time points, and shifted forward by 2 time points;

[0089] If the correlation coefficient Greater than or equal to threshold , then for The actual value of the low-voltage side voltage of each distribution transformer is not clock-shifted;

[0090] If the correlation coefficient Less than threshold , then for The actual value of the low-voltage side voltage of the distribution transformer is shifted backward by 1 time point, forward by 1 time point, backward by 2 time points, and forward by 2 time points. The correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer after clock shift is calculated respectively. , , , ,Pick , , , , The offset corresponding to the maximum value is recorded as ;

[0091] Normalize the estimated voltage value on the high voltage side of the distribution transformer and the clock offset The normalized ratio of the actual value of the low-voltage side voltage of the distribution transformer after the transformation is taken as the distribution transformer ratio at that moment;

[0092] No. The distribution variable The formula for calculating the transformation ratio at a certain moment is as follows:

[0093] ,

[0094] In the formula, For the The distribution variable The ratio of the moment, , Respectively The rated voltage of the distribution transformer and the The rated voltage corresponding to the estimated value of the high-voltage side voltage of the distribution transformer is: , The clock offset After The actual value of the low-voltage side voltage of the distribution transformer and the Estimated value of the high-voltage side voltage of a distribution transformer.

[0095] Furthermore, the Gaussian distribution verification of the historical ratio and gear data is performed, the gear ratio classification range is given, the ratio curve at the time of the gear ratio change is smoothed, the gear ratio is archived according to the gear ratio classification range, and the gear at the time of the gear ratio change is calculated. The specific steps include:

[0096] The historical transformation ratio and gear position data were verified by Gaussian distribution, and the relationship between transformation ratio and gear position obeyed Gaussian distribution;

[0097] According to the 3sigma principle in Gaussian distribution, the transformation ratio classification range corresponding to each gear is given;

[0098] The median filtering method is used to smooth the distribution transformer ratio curve at the moment of distribution transformer transformation, and the abnormal points and noise of the distribution transformer ratio curve are eliminated;

[0099] Archive according to the gear ratio classification range and calculate the gear at the time of gear change.

[0100] Furthermore, for the gear-shifting distribution transformer, the gear-shifting time point of the distribution transformer and the gear positions before and after the gear-shifting distribution transformer are calculated according to the gear position at the time of the distribution transformer, and the specific steps are as follows:

[0101] According to the calculation results of the distribution transmission gear calculation method based on power flow calculation, A distribution transformer in the time period The time slots are: , where For the The distribution variable The gear position at the moment;

[0102] Calculate the first-order difference of the gear position of the distribution transformer at each time, and take the time point corresponding to the maximum absolute value of the first-order difference of the gear position of the distribution transformer as the gear adjustment time point of the distribution transformer. The time point of the gear shifting The calculation formula is: , where Indicates The distribution variable The first-order difference of the gear position at each moment; the average gear position of the distribution transformer before the gear adjustment time point is taken as the gear position before the gear adjustment, and the average gear position of the distribution transformer after the gear adjustment time point is taken as the gear position after the gear adjustment. The gear positions of the distribution transformer before and after the distribution transformer is adjusted are:

[0103] ,

[0104] ,

[0105] In the formula, , Respectively At the time of the adjustment The average values ​​of the front and rear gears are rounded to the nearest integer; For the At the maximum moment The corresponding sampling point number.

[0106] Furthermore, for the unadjusted gear transformer, the current gear position of the gear transformer is calculated according to the gear position at the time of the gear transformer change, and the specific steps are as follows:

[0107] There are two situations where the distribution transformer is not adjusted: the distribution transformer is suspected to be not adjusted, and the distribution transformer is suspected to be adjusted and the line to which the distribution transformer belongs is transferred;

[0108] If the distribution transformer is suspected of not being adjusted, the average value of the distribution transformer gear position at that moment is taken as the current gear position of the distribution transformer; The current gear position of each transformer is:

[0109] ,

[0110] In the formula, For the A distribution transformer in the time period The average value of the time and gear within the range is rounded off to the nearest integer;

[0111] If the distribution transformer is suspected of being adjusted and the line to which the distribution transformer belongs is switched, the average value of the gear position before the time point corresponding to the maximum absolute value of the first-order difference of the distribution transformer gear position is taken as the current gear position of the distribution transformer. The current gear position of each transformer is:

[0112] ,

[0113] In the formula, For the The time point corresponding to the maximum absolute value of the first-order difference of the distribution transformer gear The average value of the previous gear is rounded off; For the At the maximum moment The corresponding sampling point number.

[0114] In the second aspect, a distribution transformer gear position identification system based on LightGBM classification and power flow calculation includes:

[0115] A data acquisition module is used to acquire the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the line to be diagnosed; and to acquire the measurement data of the line, the measurement data of the distribution transformer, and the medium and low voltage power outage events; the distribution transformer is located on the line to be diagnosed;

[0116] The feature extraction module extracts feature indicators based on the acquired data, including: whether there is a short-term power outage in the distribution transformer, the first-order difference variation coefficient of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer;

[0117] The gear adjustment identification module inputs the extracted characteristic indicators into the gear adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of gear adjustment. If the distribution transformer is suspected of gear adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a gear adjustment distribution transformer, otherwise the distribution transformer is a non-gear adjustment distribution transformer;

[0118] The gear calculation module uses the gear calculation method based on power flow calculation to calculate the gear position of the distribution transformer at the time. For the distribution transformer with gear adjustment, the gear adjustment time point of the distribution transformer and the gear position before and after the distribution transformer gear adjustment are calculated according to the gear position at the time of the distribution transformer; for the distribution transformer without gear adjustment, the current gear position of the distribution transformer is calculated according to the gear position at the time of the distribution transformer.

[0119] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for identifying a distribution and transmission gear position based on LightGBM classification and power flow calculation as described in the first aspect are implemented.

[0120] In a fourth aspect, a storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by at least one processor, the steps of the distribution and transmission gear identification method based on LightGBM classification and power flow calculation as described in the first aspect are implemented.

[0121] The present invention has the following beneficial effects:

[0122] (1) The present invention proposes a distribution transformer gear position identification method based on LightGBM classification and power flow calculation, which can identify whether the distribution transformer is shifting gears and calculate the specific gear position of the distribution transformer, providing data support for lean control of distribution transformer gear position setting and adjustment;

[0123] (2) The present invention uses the LightGBM classification algorithm to identify the gear adjustment of the distribution transformer, which greatly improves the accuracy of the distribution transformer gear adjustment diagnosis. Compared with the existing identification methods, the present invention can quickly, accurately and conveniently identify whether the distribution transformer is geared;

[0124] (3) The present invention proposes a method for calculating the gear position of a distribution transformer based on power flow calculation, which can accurately calculate the gear position of the distribution transformer at a given moment, and then calculate the current gear position of the distribution transformer and the gear positions before and after the distribution transformer is adjusted, thereby solving the problem of poor quality of the distribution transformer gear position maintenance data;

[0125] (4) The present invention has simple calculation and clear principle, and can realize the identification of distribution transformer gear adjustment and gear position calculation, helping operation and maintenance personnel to grasp the distribution transformer gear position in advance and formulate gear adjustment plans in time, providing a powerful tool for distribution transformer gear adjustment management, and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0126] Figure 1 It is a flow chart of a method for identifying a distribution transformer gear position based on LightGBM classification and power flow calculation according to the present invention;

[0127] Figure 2 It is a schematic diagram of the training results of the LightGBM gearshift recognition model of the present invention;

[0128] Figure 3 is a schematic diagram of a voltage curve of a distribution transformer PB1 in an embodiment of the present invention;

[0129] Figure 4 1 is a schematic diagram of a momentary gear position curve of the distribution transformer PB1 in an embodiment of the present invention. DETAILED DESCRIPTION

[0130] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0131] Embodiment 1:

[0132] In this embodiment, a distribution transformer gear adjustment sample in a certain city is taken as an example to further illustrate a distribution transformer gear position identification method proposed in the present invention.

[0133] Figure 1 The application of the distribution transformer gear position identification method based on LightGBM classification and power flow calculation in the medium voltage distribution network is described, including but not limited to the distribution transformer gear position identification and gear position calculation in the medium voltage distribution network. Figure 1 As shown, this embodiment adopts a distribution transformer gear identification method based on LightGBM classification and power flow calculation. In the following description, the detailed description is expanded from two parts: the training of the distribution transformer gear identification model based on LightGBM classification and the application of the distribution transformer gear identification method based on LightGBM classification and power flow calculation. In this embodiment, 2839 distribution transformer gear adjustment samples in a certain city are used to train the distribution transformer gear identification model based on LightGBM classification; all distribution transformers under 5 lines in a certain city are used to apply the distribution transformer gear identification method based on LightGBM classification and power flow calculation.

[0134] First, this embodiment provides specific steps for training a transmission gear recognition model based on LightGBM classification.

[0135] Step 1: Obtain the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the line to be diagnosed; and obtain the measurement data of the line, the measurement data of the distribution transformer, and the medium and low voltage power outage events; the distribution transformer is located on the line to be diagnosed;

[0136] In the model training of this embodiment, 2839 distribution transformer adjustment samples were obtained in a certain city, and the ratio of adjusted distribution transformers to non-adjusted distribution transformers was about 1:6. The topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the lines involved in the distribution transformer adjustment samples were obtained from the PMS (equipment asset lean management) system and the marketing system; the 96-point power, voltage, and current data of the lines involved in the distribution transformer adjustment samples were obtained from the D5000 system; the 96-point power, voltage, and current data of the distribution transformers involved in the distribution transformer adjustment samples were obtained from the power consumption collection system; the distribution transformer power outage events and the power outage events of users at the lower level of the distribution transformers involved in the distribution transformer adjustment samples were obtained from the power supply reliability system.

[0137] Step 2: Extract six characteristic indicators, including whether there is a short-term power outage in the distribution transformer, the coefficient of variation of the first-order difference of the distribution transformer voltage, the maximum mean difference of the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer;

[0138] In the model training of this embodiment, six characteristic indicators are calculated for 2839 distribution transformer adjustment samples in a certain city, including whether there is a short-term power outage in the distribution transformer, the first-order difference variation coefficient of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer. The specific calculation is as follows:

[0139] (1) Whether there is a short-term power outage in the distribution transformer: Obtain the medium and low voltage power outage events of the distribution transformer, including the power outage events of the distribution transformer and the power outage events of the users under the distribution transformer. If there is a short-term power outage in the distribution transformer or the users under the distribution transformer, where the short-term power outage means that the power outage and restoration time on the same day is less than 15 minutes, then there is a short-term power outage in the distribution transformer; otherwise, there is no short-term power outage in the distribution transformer. Whether there is a short-term power outage in the distribution transformer is used as an indicator of whether there is a short-term power outage in the distribution transformer ;No. Whether there is a short-term power outage indicator for each distribution transformer The calculation formula is as follows:

[0140] .

[0141] (2) Coefficient of variation of the first-order difference of distribution transformer voltage: Obtain the distribution transformer voltage measurement data, calculate the first-order difference of the distribution transformer voltage, and then calculate the standard deviation and mean of the first-order difference of the distribution transformer voltage. The ratio of the standard deviation to the mean is used as the coefficient of variation of the first-order difference of the distribution transformer voltage. . No. The coefficient of variation of the first-order difference of the distribution transformer voltage The specific calculation process is as follows:

[0142] Get the A distribution transformer in the time period The voltage measurement data is sampled at equal intervals within the , the time intervals are ,in For 1 day, For 15 minutes, is 96, calculate the first-order difference of the distribution transformer voltage for:

[0143] ,

[0144] In the formula, Indicates The distribution variable The first-order difference of voltage at a moment is calculated as follows:

[0145] ,

[0146] In the formula, Indicates The distribution variable The voltage at a moment;

[0147] Calculate the standard deviation of the first-order difference of the distribution transformer voltage and mean , the calculation formula is as follows:

[0148] ,

[0149] ,

[0150] The ratio of the above standard deviation to the mean is taken as the The coefficient of variation of the voltage first-order difference of a distribution transformer , the calculation formula is as follows:

[0151] .

[0152] (3) Maximum mean difference of line-to-distribution transformer voltage ratio: Obtain distribution transformer voltage measurement data and line voltage measurement data, calculate the ratio of line voltage to distribution transformer voltage at each moment, then calculate the first-order difference of the ratio of line voltage to distribution transformer voltage, take the moment when the absolute value of the first-order difference of the ratio of line voltage to distribution transformer voltage is the maximum, calculate the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment, and use the absolute value of the difference between the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment as the maximum mean difference index of the ratio of line voltage to distribution transformer voltage . No. The maximum mean difference index of the voltage ratio between the line and the distribution transformer The specific calculation process is as follows:

[0153] Get the The distribution transformer voltage measurement data and The voltage measurement data of the distribution transformer line is used to calculate the ratio of the line voltage to the distribution transformer voltage at each moment. for:

[0154] ,

[0155] In the formula, Indicates The ratio of the line voltage of a distribution transformer to the distribution transformer voltage is calculated as follows:

[0156] ,

[0157] In the formula, , Respectively represent The distribution variable The distribution transformer voltage and the line voltage at each moment;

[0158] Calculate the first-order difference of the ratio of line voltage to distribution transformer voltage for:

[0159] ,

[0160] In the formula, Indicates The distribution variable The first-order difference of the ratio of the line voltage to the distribution transformer voltage at a certain moment is calculated as follows:

[0161] ,

[0162] The time corresponding to the maximum absolute value of the first-order difference of the ratio of the line voltage to the distribution transformer voltage is calculated as:

[0163] ,

[0164] Calculate the maximum moment The average value of the ratio of the line voltage to the distribution transformer voltage before and after is:

[0165] ,

[0166] ,

[0167] In the formula, , Respectively At the maximum moment The average value and maximum moment of the ratio of the front line voltage to the distribution transformer voltage The average value of the ratio of the rear line voltage to the distribution transformer voltage; Indicates that the corresponding Maximum moment of distribution change The sampling time point number.

[0168] The absolute value of the average difference between the line voltage and the distribution transformer voltage before and after the maximum moment is taken as the The maximum mean difference index of the voltage ratio between the line and the distribution transformer , the calculation formula is as follows:

[0169] .

[0170] (4) Correlation coefficient between distribution transformer and line voltage: Obtain distribution transformer voltage measurement data and line voltage measurement data, and calculate the correlation coefficient between distribution transformer voltage and line voltage as the correlation coefficient index between distribution transformer and line voltage. . No. The correlation coefficient index between the distribution transformer and the line voltage The calculation process is as follows:

[0171] ,

[0172] in, is the voltage correlation coefficient between the ith distribution transformer and its line, , Respectively The average voltage of each distribution transformer and its associated lines, , For the The first The distribution transformer voltage and the line voltage at a certain moment.

[0173] (5) Distribution transformer power factor range: Obtain the active power and reactive power data of the distribution transformer, take the square root of the sum of the squares of the active power and reactive power as the apparent power, calculate the power factor of the distribution transformer at each moment by dividing the active power by the apparent power, and take the difference between the maximum and minimum power factor of the distribution transformer as the distribution transformer power factor range index. . No. Power factor extreme difference index of each distribution transformer The specific calculation process is as follows:

[0174] Get the A distribution transformer in the time period Active power measurement sequence within for:

[0175] ,

[0176] In the formula, , Respectively represent Active power measurement sequence of the first distribution transformer and the The distribution variable Active power at a moment;

[0177] Get the A distribution transformer in the time period Reactive power measurement sequence within for:

[0178] ,

[0179] In the formula, , Respectively represent The reactive power measurement sequence of the distribution transformer and the The distribution variable Reactive power at a moment;

[0180] The square root of the sum of the squares of active power and reactive power is taken as apparent power, and the power factor of the distribution transformer at each moment is calculated by dividing the active power by the apparent power. Power factor sequence of a distribution transformer for:

[0181] ,

[0182] In the formula, Indicates The distribution variable The power factor at a certain moment is calculated as follows:

[0183] ,

[0184] The first The difference between the maximum and minimum power factors of the first distribution transformer is taken as the Distribution transformer power factor extreme difference index , the calculation formula is as follows:

[0185] .

[0186] (6) Standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer: Obtain the voltage data and electrical distance data of all distribution transformers under the line, cyclically calculate the electrical distance between the distribution transformer and other distribution transformers under the line, select the distribution transformer with the smallest distance to other distribution transformers, and use the standard deviation of the ratio of the distribution transformer voltage to the distribution transformer voltage with the smallest distance as the standard deviation index of the voltage ratio between the distribution transformer and the adjacent distribution transformer. . No. Standard deviation index of voltage ratio between a distribution transformer and its adjacent distribution transformers The specific calculation process is as follows:

[0187] Get the line The electrical distance data of the distribution transformer is calculated cyclically. The electrical distance between a distribution transformer and other distribution transformers under the line , filter out The distribution transformer with the smallest distance to other distribution transformers ;

[0188] Get the The first The voltage data of the distribution transformer The voltage of the distribution transformer is the smallest with the The standard deviation of the ratio of the distribution transformer voltage is used as the standard deviation index of the ratio of the distribution transformer voltage to the adjacent distribution transformer voltage. , the calculation formula is as follows:

[0189] ,

[0190] In the formula, For the The distribution transformer voltage is The moment with the smallest distance The ratio of the distribution transformer voltage; For the The voltage of the distribution transformer is the smallest with the The average value of the ratio of the distribution transformer voltages. The calculation formula is as follows:

[0191] ,

[0192] , For the The first The distribution transformer voltage and the distance at the moment are the smallest A distribution transformer voltage; , Respectively The smallest distance between the transformer and The rated voltage of a distribution transformer.

[0193] Step 3: Mark whether the distribution transformer is adjusted according to historical samples, input the extracted feature indicators into the LightGBM classification algorithm for model training, save the trained LightGBM distribution transformer adjustment recognition model, and apply it to the actual distribution transformer adjustment recognition, including the following steps:

[0194] In the model training of this embodiment, according to 2839 samples of distribution transformers in a certain city that are marked as whether they are adjusted, the ratio of adjusted distribution transformers to non-adjusted distribution transformers is about 1:6. , , , , , As the model input, whether the distribution transformer is adjusted is taken as the model output, and the LightGBM classification algorithm is used for model training.

[0195] When training the LightGBM model, a random partitioning method is used to select 80% of the samples as the training set and 20% of the samples as the test set. A LightGBM gearshift recognition model is constructed for model training. The precision and recall rate are harmonized to achieve the average value. The score evaluates the recognition accuracy of the classification model until Score exceeds threshold , save the trained LightGBM variable pitch recognition model; The scores are defined as follows:

[0196] ,

[0197] In the formula, is the number of actual transformer shifts and predicted transformer shifts; is the number of distribution transformers that are actually not adjusted but are predicted to be adjusted; It is the number of distribution transformers that are actually adjusted but predicted to be not adjusted.

[0198] This embodiment uses four classification algorithms, namely Lightweight Gradient Boosting Machine (LightGBM), Extreme Gradient Boosting Machine (XGboost), Gradient Boosting Decision Tree (GBDT), and BP Neural Network (BP), to compare the distribution transformer gear shift recognition model to evaluate the classification performance of the LightGBM distribution transformer gear shift recognition model. The four classification algorithms are trained on the training set, and the trained models are applied to the test set to obtain the performance evaluation indicators of the four classification algorithms, such as Figure 2 As shown. Figure 2 As can be seen from the figure, the precision, recall, and The score is higher than the other three algorithms, and If the score exceeds 90%, the trained LightGBM gearshift recognition model will be saved and subsequently applied to actual gearshift recognition.

[0199] Next, specific steps for applying the method for identifying the gear position of a distribution transformer based on LightGBM classification and power flow calculation in an embodiment of the present invention are given.

[0200] Step 1: Obtain the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the line to be diagnosed; and obtain the measurement data of the line, the measurement data of the distribution transformer, and the medium and low voltage power outage events; the distribution transformer is located on the line to be diagnosed;

[0201] In the model application of this embodiment, the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of 5 lines are obtained; as well as the measurement data of the lines, the measurement data of the distribution transformers, and the medium and low voltage power outage events. The topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the lines involved in the distribution transformer adjustment samples are obtained from the PMS (equipment asset lean management) system and the marketing system; the 96-point power, voltage, and current data of the lines involved in the distribution transformer adjustment samples are obtained from the D5000 system; the 96-point power, voltage, and current data of the distribution transformer involved in the distribution transformer adjustment samples are obtained from the power consumption collection system; the distribution transformer power outage events involved in the distribution transformer adjustment samples and the power outage events of users at the lower level of the distribution transformer are obtained from the power supply reliability system.

[0202] Step 2: Extract six characteristic indicators, including whether there is a short-term power outage in the distribution transformer, the coefficient of variation of the first-order difference of the distribution transformer voltage, the maximum mean difference of the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer;

[0203] In the model application of this embodiment, six characteristic indicators are calculated for the distribution transformers under the five lines, including whether there is a short-term power outage in the distribution transformer, the first-order difference variation coefficient of the distribution transformer voltage, the maximum mean difference of the line and distribution transformer voltage ratio, the distribution transformer and line voltage correlation coefficient, the distribution transformer power factor extreme difference, and the standard deviation of the distribution transformer and adjacent distribution transformer voltage ratio. The calculation process of the six characteristic indicators in the model application is consistent with the model training, and the indicator calculation is as follows:

[0204] (1) Whether there is a short-term power outage in the distribution transformer: Obtain the medium and low voltage power outage events of the distribution transformer, including the power outage events of the distribution transformer and the power outage events of the users under the distribution transformer. If there is a short-term power outage in the distribution transformer or the users under the distribution transformer, where the short-term power outage means that the power outage and restoration time on the same day is less than 15 minutes, then there is a short-term power outage in the distribution transformer; otherwise, there is no short-term power outage in the distribution transformer. Whether there is a short-term power outage in the distribution transformer is used as an indicator of whether there is a short-term power outage in the distribution transformer ;

[0205] (2) Coefficient of variation of the first-order difference of distribution transformer voltage: Obtain the distribution transformer voltage measurement data, calculate the first-order difference of the distribution transformer voltage, and then calculate the standard deviation and mean of the first-order difference of the distribution transformer voltage. The ratio of the standard deviation and mean of the first-order difference of the distribution transformer voltage is used as the coefficient of variation of the first-order difference of the distribution transformer voltage. ;

[0206] (3) Maximum mean difference of line-to-distribution transformer voltage ratio: Obtain distribution transformer voltage measurement data and line voltage measurement data, calculate the ratio of line voltage to distribution transformer voltage at each moment, then calculate the first-order difference of the ratio of line voltage to distribution transformer voltage, take the moment when the absolute value of the first-order difference of the ratio of line voltage to distribution transformer voltage is the maximum, calculate the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment, and use the absolute value of the difference between the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment as the maximum mean difference index of the ratio of line voltage to distribution transformer voltage ;

[0207] (4) Correlation coefficient between distribution transformer and line voltage: Obtain distribution transformer voltage measurement data and line voltage measurement data, and calculate the correlation coefficient between distribution transformer voltage and line voltage as the correlation coefficient index between distribution transformer and line voltage. ;

[0208] (5) Distribution transformer power factor range: Obtain the active power and reactive power data of the distribution transformer, take the square root of the sum of the squares of the active power and reactive power as the apparent power, calculate the power factor of the distribution transformer at each moment by dividing the active power by the apparent power, and take the difference between the maximum and minimum power factor of the distribution transformer as the distribution transformer power factor range index. ;

[0209] (6) Standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer: Obtain the voltage data and electrical distance data of all distribution transformers under the line, cyclically calculate the electrical distance between the distribution transformer and other distribution transformers under the line, select the distribution transformer with the smallest distance to other distribution transformers, and use the standard deviation of the ratio of the distribution transformer voltage to the distribution transformer voltage with the smallest distance as the standard deviation index of the voltage ratio between the distribution transformer and the adjacent distribution transformer. .

[0210] Step 3: Apply the trained LightGBM gearshift identification model to the actual gearshift identification, and output a list of suspected gearshifts.

[0211] In the model application of this embodiment, the trained LightGBM distribution transformer adjustment recognition model is applied to the distribution transformer adjustment recognition under 5 lines, and the indicators of the distribution transformer under 5 lines are , , , , , As the model input, the output is a list of suspected gear adjustment and distribution transformer, and the statistical results are as follows:

[0212] Table 1 Application results of LightGBM transmission gear shift recognition model

[0213]

[0214] As can be seen from Table 1, there are suspected gear adjustment and distribution transformers on lines KX1, KX3 and KX4, but there are no suspected gear adjustment and distribution transformers on lines KX2 and KX5.

[0215] Step 4: If the distribution transformer is suspected to be shifted and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a shifted distribution transformer, and the distribution transformer shift time point and the shift position before and after the distribution transformer shift are calculated using the distribution transformer shift position calculation method based on power flow calculation. Otherwise, the distribution transformer is a non-shifted distribution transformer and the current gear position of the distribution transformer is calculated. The following steps are included:

[0216] S41: If the distribution transformer has a gear adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a gear adjustment distribution transformer, and the gear adjustment time point of the distribution transformer and the gear position before and after the distribution transformer gear adjustment are calculated. The specific steps are as follows:

[0217] If the distribution transformer is suspected of being adjusted and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a adjusted distribution transformer; whether the line has been transferred can be judged by referring to the transfer operation identification method in the invention patent "A method, device and equipment for identifying transfer operation of medium-voltage distribution network" (publication number: CN113642601A);

[0218] The gear position of the distribution transformer at the time is calculated using the gear position calculation method based on power flow calculation (the specific calculation method is described in detail below). The gear position of the i-th distribution transformer in the time period T is:

[0219] ,

[0220] In the formula, is the i-th distribution transformer in the The gear position at the moment;

[0221] Through the first-order difference of the gear position at the distribution transformer, the time point corresponding to the maximum absolute value of the first-order difference of the distribution transformer gear position is used as the distribution transformer gear adjustment time point; the i-th distribution transformer gear adjustment time point The calculation formula is as follows:

[0222] ,

[0223] In the formula, Indicates The distribution variable The first-order difference of the gear position at each moment is calculated as follows:

[0224] ,

[0225] The average value of the gear position of the distribution transformer before the gear adjustment time point is taken as the gear position before the gear adjustment, and the average value of the gear position of the distribution transformer after the gear adjustment time point is taken as the gear position after the gear adjustment. The gear position of the distribution transformer before the gear adjustment and the gear position of the distribution transformer after the gear adjustment of the i-th distribution transformer are:

[0226] ,

[0227] ,

[0228] In the formula, , are the i-th distribution transformer at the time of the adjustment The average of the front and rear gears is rounded to the nearest integer; is the maximum time of the i-th distribution transformer The corresponding sampling point number.

[0229] S42: If the distribution transformer is suspected of not adjusting the gear, or if the distribution transformer is suspected of adjusting the gear and the line to which the distribution transformer belongs is transferred, the distribution transformer is regarded as an unadjusted distribution transformer, and the current gear of the distribution transformer is calculated. The specific steps are as follows:

[0230] If the distribution transformer is suspected of not being adjusted, or if the distribution transformer is suspected of being adjusted and the line to which the distribution transformer belongs is transferred, the distribution transformer is considered to be an unadjusted distribution transformer;

[0231] If the distribution transformer is suspected of not adjusting the gear, the gear position of the distribution transformer at the time is calculated using the distribution transformer gear position calculation method based on power flow calculation (the specific calculation method is described in detail below); the average gear position of the distribution transformer at the time is rounded as the current gear position of the distribution transformer; the current gear position of the i-th distribution transformer is:

[0232] ,

[0233] In the formula, The average value of the gear position of the i-th distribution transformer in the time period T is rounded off to the nearest integer;

[0234] If the distribution transformer is suspected of shifting and the line to which the distribution transformer belongs has shifted, whether the line has shifted can be judged by referring to the shift operation identification method in the invention patent "A method, device and equipment for identifying shift operations in a medium-voltage distribution network" (publication number: CN113642601A); the distribution transformer gear calculation method based on power flow calculation is used to calculate the gear position of the distribution transformer at the moment (the specific calculation method is described in detail below), and the gear average value before the time point corresponding to the maximum absolute value of the first-order difference of the distribution transformer gear position is taken as the current gear position of the distribution transformer. The current gear position of the i-th distribution transformer is:

[0235] ,

[0236] In the formula, is the time point corresponding to the maximum absolute value of the first-order difference of the i-th distribution transformer in the distribution transformer gear The average value of the previous gear is rounded off; is the maximum time of the i-th distribution transformer The corresponding sampling point number.

[0237] In the model application of this embodiment, the power transfer operation of line KX1, line KX2, line KX3, line KX4, and line KX5 is identified, and it is identified that power transfer occurs on line KX3, while power transfer does not occur on the other four lines. Line KX1 and Line KX4 have distribution transformers suspected of being adjusted and the lines to which the distribution transformers belong have not been re-switched. Use the above steps to calculate the adjustment time point and the gear position before and after the adjustment of the distribution transformers on these two lines, as well as the current gear position of the distribution transformers that have not been adjusted, and take the gear position after the adjustment of the distribution transformer as the current gear position; Line KX3 has a distribution transformer suspected of being adjusted and the line to which the distribution transformer belongs has been re-switched or the distribution transformer is suspected of not being adjusted, then the distribution transformers on this line are all un-adjusted distribution transformers. Use the above steps to calculate the current gear position of the distribution transformers on this line that are suspected of not being adjusted or the distribution transformers are suspected of being adjusted and the line to which the distribution transformers belong have been re-switched; Line KX2 and Line KX5 have no suspected adjustment of distribution transformers. Use the above steps to calculate the current gear position of the distribution transformers that have not been adjusted on these two lines. The following gives the distribution transformer adjustment situation, whether the line is re-switched, and the current gear situation on these five lines, as shown in Table 2 below:

[0238] Table 2 Application results of LightGBM transmission gear shift recognition model

[0239]

[0240] As can be seen from Table 2, the LightGBM distribution transformer adjustment identification model identified that lines KX1, KX3, and KX4 had suspected adjustment of distribution transformers, and line KX3 was transferred, so lines KX1 and KX4 had adjustment of distribution transformers, and lines KX1 and KX4 had 1 and 3 distribution transformers adjusted, respectively. Lines KX2, KX3, and KX5 did not adjust the gear. And the current gear positions of all distribution transformers under lines KX1, KX2, KX3, KX4, and KX5 were calculated. For example, the number of distribution transformers in gears 1, 2, 3, 4, and 5 under line KX1 was 35, 11, 9, 0, and 0, respectively, of which 1 distribution transformer adjusted from gear 4 to gear 3, and the current gear position was gear 3. The prefecture-level cities checked the results in Table 2 and found that the gear positions of these 5 lines were consistent with the results of the LightGBM distribution transformer adjustment identification model, and the diagnosis was correct.

[0241] The specific steps of the method for calculating the gear position of the distribution transformer based on the power flow calculation in the present invention are given below. Figure 1 The method for calculating the gear position of a distribution transformer based on power flow calculation includes the following steps:

[0242] Step A, performing power flow calculation on the line to which the distribution transformer belongs, if the power deviation rate at the head end of the line is lower than the threshold, taking the distribution transformer high-voltage side voltage estimated by the power flow calculation as the distribution transformer high-voltage side voltage estimation value, including the following steps:

[0243] Obtain the topological structure, line parameters, distribution transformer parameters, and measurement data of the line to which the distribution transformer belongs, use the forward and backward method to perform power flow calculation, and estimate the voltage and power estimates of all nodes of the line. The principle of power flow calculation will not be repeated here;

[0244] The measured power value at the head end of the line and the estimated power value at the head end of the line are divided by the rated power of the line for standardization, and then the power deviation rate at the head end of the line is calculated using the average absolute error between the measured power value at the head end of the line and the estimated power value after standardization. The calculation formula for the power deviation rate at the head end of the line is as follows:

[0245] ,

[0246] In the formula, is the power deviation rate at the line head end, is the rated power of the line, and are the measured and estimated values ​​of the line head-end power at the j-th sampling point, and k represents the number of sampling points in the data time period.

[0247] If the power deviation rate at the head end of the line Below threshold , then the voltage on the high-voltage side of the distribution transformer estimated by the power flow calculation is As the estimated value of the voltage on the high-voltage side of the distribution transformer.

[0248] In the model application of this embodiment, power flow calculation is performed on line KX1, line KX2, line KX3, line KX4, and line KX5, and the line head end power deviation rate threshold is taken. 5%, only the line head-end power deviation rate of line KX2, line KX4, and line KX5 Below threshold , then the voltage on the high-voltage side of the distribution transformer estimated by the power flow calculation under lines KX2, KX4, and KX5 is As the estimated value of the high-voltage side voltage of all distribution transformers under lines KX2, KX4, and KX5. The power deviation rate at the head end of lines KX1 and KX3 is higher than the threshold.

[0249] Step B: If the power deviation rate at the head end of the line is higher than the threshold, the electrical distance data is used to obtain the nearest high-voltage power supply and high-meter distribution transformer, and the voltage of the nearest high-voltage power supply and high-meter distribution transformer is used as the estimated value of the high-voltage side voltage of the distribution transformer, including the following steps:

[0250] If the power deviation rate at the head end of the line Above threshold , obtain the electrical distance data of all nodes under the line, and cyclically calculate the electrical distance between the distribution transformer and all high-voltage distribution transformers under the line , select the high-voltage power supply and high-voltage distribution transformer with the smallest electrical distance As the nearest high-supply and high-meter distribution transformer;

[0251] The nearest high-supply and high-power distribution transformer Voltage As the estimated value of the voltage on the high-voltage side of the distribution transformer.

[0252] In the model application of this embodiment, the power deviation rate of the first end of line KX1 and line KX3 Below threshold , threshold If the value is 5%, the electrical distance data of all nodes under line KX1 and line KX3 are obtained, and the electrical distances between the distribution transformers under line KX1 and line KX3 and all high-voltage distribution transformers under their respective lines are calculated cyclically. , select the high-voltage power supply and high-voltage distribution transformer with the smallest electrical distance As the nearest high-supply and high-meter distribution transformer; Voltage As the estimated value of the high-voltage side voltage of the distribution transformer, the algorithm source of the estimated value of the high-voltage side voltage of the distribution transformer is statistically analyzed for lines KX1, KX2, KX3, KX4, and KX5, as shown in Table 3:

[0253] Table 3 Algorithm source for voltage estimation value on the high voltage side of distribution transformer

[0254]

[0255] As can be seen from Table 3, the voltage on the high-voltage side of the distribution transformer is estimated by using the high-voltage supply meter for lines KX1 and KX3, and the voltage on the high-voltage side of the distribution transformer is estimated by using the power flow calculation for lines KX2, KX4, and KX5.

[0256] Step C: clock shift is performed using the correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer, and the ratio of the standardized estimated value of the high-voltage side voltage of the distribution transformer to the standardized actual value of the low-voltage side voltage of the distribution transformer after the clock shift is used as the distribution transformer moment ratio, including the following steps:

[0257] Assume that the clock offset of the actual value of the low-voltage side voltage of the i-th distribution transformer is , calculate the estimated voltage value and clock offset of the high-voltage side of the ith distribution transformer The correlation coefficient of the actual value of the low-voltage side voltage of the distribution transformer after ; Correlation coefficient The calculation formula is as follows:

[0258] ,

[0259] in, The estimated voltage value and clock offset of the high-voltage side of the i-th distribution transformer The correlation coefficient of the actual value of the low-voltage side voltage of the distribution transformer after , are the average values ​​of the actual voltage on the low-voltage side of the ith distribution transformer and the estimated voltage on the high-voltage side of the ith distribution transformer, , are the actual value of the low-voltage side voltage of the i-th distribution transformer and the estimated value of the high-voltage side voltage of the i-th distribution transformer, respectively. It is 0, 1, -1, 2, and -2, which respectively represent that the actual value of the low-voltage side voltage of the distribution transformer is not shifted, shifted backward by 1 time point, shifted forward by 1 time point, shifted backward by 2 time points, and shifted forward by 2 time points.

[0260] If the correlation coefficient Greater than or equal to threshold , then the actual value of the low-voltage side voltage of the i-th distribution transformer is not clock offset;

[0261] If the correlation coefficient Less than threshold , the correlation coefficient between the estimated value of the voltage on the high-voltage side of the distribution transformer and the actual value of the voltage on the low-voltage side of the distribution transformer after clock shift is calculated by shifting the actual value of the voltage on the low-voltage side of the distribution transformer backward by 1 time point, forward by 1 time point, backward by 2 time points, and forward by 2 time points. , , , ,Pick , , , , The offset corresponding to the maximum value is recorded as ;

[0262] Normalize the estimated voltage value on the high voltage side of the distribution transformer and the clock offset The standardized ratio of the actual value of the low-voltage side voltage of the distribution transformer after the transformation is taken as the distribution transformer ratio at that moment. The distribution variable The formula for calculating the transformation ratio at a certain moment is as follows:

[0263] ,

[0264] In the formula, is the i-th distribution transformer in the The ratio of the moment, , are the rated voltage of the ith distribution transformer and the rated voltage corresponding to the estimated value of the high-voltage side voltage of the ith distribution transformer, , The clock offset The actual value of the low-voltage side voltage of the i-th distribution transformer and the estimated value of the high-voltage side voltage of the i-th distribution transformer are obtained.

[0265] In the model application of this embodiment, the correlation coefficients of the estimated values ​​of the high-voltage side voltage of all distribution transformers under the five lines KX1, KX2, KX3, KX4, and KX5 and the actual values ​​of the low-voltage side voltage of the distribution transformer are clock offset, and the correlation coefficient threshold Taking the distribution transformer PB1 under line KX4 as an example, it is necessary to shift back 2 time points to give the voltage curve of the distribution transformer high-voltage side voltage estimate and the actual value of the distribution transformer low-voltage side voltage after the shift, as shown in Figure 3 The ratio of the normalized estimated value of the voltage on the high-voltage side of the distribution transformer to the normalized actual value of the voltage on the low-voltage side of the distribution transformer after clock offset is taken as the distribution transformer instantaneous transformation ratio.

[0266] Step D: Perform Gaussian distribution verification on historical ratio and gear data to give a gear ratio classification range. Smooth the ratio curve at the time of the gear ratio change, archive it according to the gear ratio classification range, and calculate the gear at the time of the gear ratio change, including the following steps:

[0267] The historical transformation ratio and gear position data were verified by Gaussian distribution, and the relationship between transformation ratio and gear position obeyed Gaussian distribution;

[0268] According to the 3sigma principle in Gaussian distribution, the transformation ratio classification range corresponding to each gear is given.

[0269] The median filtering method is used to smooth the distribution transformer ratio curve at the moment of distribution transformer transformation, and the abnormal points and noise of the distribution transformer ratio curve are eliminated;

[0270] Archive according to the gear ratio classification range and calculate the gear at the time of gear change.

[0271] In this embodiment, the historical transformation ratio and gear position data of 2839 distribution transformers in the above-mentioned city are verified by Gaussian distribution. The relationship between the transformation ratio and the gear position obeys Gaussian distribution. According to the 3sigma principle in Gaussian distribution, the transformation ratio classification range corresponding to each gear position is given, as shown in Table 4 below:

[0272] Table 4 Transformation ratio classification range corresponding to gear position

[0273]

[0274] The archived transformation ratio in Table 4 is the transformation ratio mean, and the transformation ratio classification range is calculated by the transformation ratio mean and the transformation ratio standard deviation using the 3 sigma principle.

[0275] The median filtering method is used to smooth the distribution transformer ratio curve to eliminate abnormal points and noise in the distribution transformer ratio curve; the distribution transformer ratio is archived according to the gear ratio classification range, and the distribution transformer gear is calculated. Taking the distribution transformer PB1 under line KX4 as an example, the distribution transformer ratio and distribution transformer gear curve are given, such as Figure 4 The distribution transformer PB1 was adjusted at 10:45:00, and the transformation ratio after filtering changed from 0.9886~1.0132 to 1.0132~1.0366. According to the gear ratio classification range, it was archived, and the corresponding gear was adjusted from 3 gears to 2 gears. The gears of the distribution transformer at the time of distribution were: 3 gears before 10:45:00 and 2 gears after 10:45:00.

[0276] Embodiment 2:

[0277] Based on the same inventive concept as the method embodiment, this embodiment provides a distribution transformer gear position identification system based on LightGBM classification and power flow calculation, including:

[0278] A data acquisition module is used to acquire the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the line to be diagnosed; and to acquire the measurement data of the line, the measurement data of the distribution transformer, and the medium and low voltage power outage events; the distribution transformer is located on the line to be diagnosed;

[0279] The feature extraction module extracts feature indicators based on the acquired data, including: whether there is a short-term power outage in the distribution transformer, the first-order difference variation coefficient of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer;

[0280] The gear adjustment identification module inputs the extracted characteristic indicators into the gear adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of gear adjustment. If the distribution transformer is suspected of gear adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a gear adjustment distribution transformer, otherwise the distribution transformer is a non-gear adjustment distribution transformer;

[0281] The gear calculation module uses the gear calculation method based on power flow calculation to calculate the gear position of the distribution transformer at the time. For the distribution transformer with gear adjustment, the gear adjustment time point of the distribution transformer and the gear position before and after the distribution transformer gear adjustment are calculated according to the gear position at the time of the distribution transformer; for the distribution transformer without gear adjustment, the current gear position of the distribution transformer is calculated according to the gear position at the time of the distribution transformer.

[0282] It should be understood that the distribution transformer gear identification system in the embodiment of the present invention can implement all the technical solutions in the above-mentioned method embodiment, and the functions of its various functional modules can be specifically implemented according to the methods in the above-mentioned method embodiments. The specific implementation process can refer to the relevant description in the above-mentioned embodiments, which will not be repeated here.

[0283] Embodiment 3:

[0284] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for identifying distribution and transmission gears based on LightGBM classification and power flow calculation as described in Example 1 of the present invention are implemented.

[0285] Embodiment 4:

[0286] This embodiment provides a storage medium, which stores a computer program. When the computer program is executed by at least one processor, it implements the steps of the distribution and transmission gear identification method based on LightGBM classification and power flow calculation as described in Example 1 of the present invention.

[0287] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, devices (systems), computer equipment or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0288] The present invention is described with reference to a flowchart of a method according to an embodiment of the present invention. It should be understood that each process in the flowchart and a combination of processes in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A device that specifies functions in a process or multiple processes.

[0289] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A function specified in a process or multiple processes.

[0290] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.

Claims

1. A method for identifying gear positions of distribution transformers based on LightGBM classification and power flow calculation. It is characterized in that The following steps are involved: Step 1: Obtain the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the line to be diagnosed; and obtain the measurement data of the line, the measurement data of the distribution transformer, and the medium and low voltage power outage events; The distribution transformer is located on the line to be diagnosed; Step 2: Extract characteristic indicators based on the acquired data, including: whether there is a short-term power outage in the distribution transformer, the coefficient of variation of the first-order difference of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer; Step 3: Input the extracted characteristic indicators into the distribution transformer adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of adjustment. If the distribution transformer is suspected of adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is an adjustment distribution transformer; otherwise, the distribution transformer is an unadjusted distribution transformer; Step 4: Use the distribution transformer gear calculation method based on power flow calculation to calculate the gear position of the distribution transformer at the time. For the distribution transformer with gear adjustment, calculate the gear position of the distribution transformer before and after the gear adjustment according to the gear position at the time of the distribution transformer; for the distribution transformer without gear adjustment, calculate the current gear position of the distribution transformer according to the gear position at the time of the distribution transformer.

2. According to claim 1, a method for identifying distribution transformer gear positions based on LightGBM classification and power flow calculation, Features: The characteristic indicators extracted according to the acquired data include: whether there is a short-term power outage in the distribution transformer, the first-order difference variation coefficient of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the distribution transformer and the adjacent distribution transformer voltage ratio. The specific indicators are calculated as follows: Whether there is a short-term power outage in the distribution transformer: According to the medium and low voltage power outage events of the distribution transformer, including the power outage events of the distribution transformer and the power outage events of the users under the distribution transformer, if there is a short-term power outage in the distribution transformer or the users under the distribution transformer, the short-term power outage refers to the power outage and restoration time on that day is less than the threshold. , then there is a short-term power outage in the distribution transformer, otherwise there is no short-term power outage in the distribution transformer; Coefficient of variation of the first-order difference of distribution transformer voltage: Calculate the first-order difference of distribution transformer voltage based on the distribution transformer voltage measurement data, then calculate the standard deviation and mean of the first-order difference of distribution transformer voltage, and take the ratio of the standard deviation to the mean as the coefficient of variation of the first-order difference of distribution transformer voltage; Maximum mean difference of line and distribution transformer voltage ratio: Calculate the ratio of line voltage to distribution transformer voltage at each moment based on distribution transformer voltage measurement data and line voltage measurement data, then calculate the first-order difference of the ratio of line voltage to distribution transformer voltage, take the moment when the absolute value of the first-order difference of the ratio of line voltage to distribution transformer voltage is the maximum, calculate the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment, and use the absolute value of the difference between the average value of the ratio of line voltage to distribution transformer voltage before and after the maximum moment as the maximum mean difference indicator of the ratio of line voltage to distribution transformer voltage; Correlation coefficient between distribution transformer and line voltage: Based on the distribution transformer voltage measurement data and the line voltage measurement data, the correlation coefficient between the distribution transformer voltage and the line voltage is calculated using the Pearson correlation coefficient formula as an indicator of the correlation coefficient between the distribution transformer and the line voltage; Distribution transformer power factor extreme difference: Based on the active power and reactive power data of the distribution transformer, the square root of the sum of the squares of the active power and the reactive power is taken as the apparent power. The power factor of the distribution transformer at each moment is calculated by dividing the active power by the apparent power. The difference between the maximum and minimum power factor of the distribution transformer is taken as the distribution transformer power factor extreme difference index. Standard deviation of the voltage ratio between a distribution transformer and an adjacent distribution transformer: Based on the voltage data and electrical distance data of all distribution transformers under the line, the electrical distance between the distribution transformer and other distribution transformers under the line is calculated cyclically, and the distribution transformer with the smallest distance from other distribution transformers is selected. The standard deviation of the ratio of the distribution transformer voltage to the voltage of the distribution transformer with the smallest distance is used as the standard deviation indicator of the voltage ratio between the distribution transformer and the adjacent distribution transformer.

3. According to claim 1, a method for identifying distribution transformer gear positions based on LightGBM classification and power flow calculation, Features: The extracted characteristic indicators are input into the distribution transformer adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of adjustment. If the distribution transformer is suspected of adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is an adjustment distribution transformer, otherwise the distribution transformer is an unadjusted distribution transformer. The specific steps are as follows: Step s31: Use the LightGBM classification algorithm to train the distribution transformer adjustment recognition model, including: A random partitioning method is used to select a part of the samples in the historical sample data set as the training set, and the remaining samples are used as the test set. The characteristic indicators of the distribution transformer in the training set are used as the model input, and whether the distribution transformer is adjusted is used as the model output. The LightGBM classification algorithm is used to train the distribution transformer adjustment recognition model. The recognition accuracy of the classification model is evaluated using the test set, and the F-value, which is the harmonic mean of precision and recall, is used. 1 Scores are evaluated until F 1 Score exceeds threshold , save the trained transmission gear recognition model; where F 1 The scores are defined as follows: , Wherein, TP is the number of actual distribution transformer shift adjustment and predicted distribution transformer shift adjustment; FP is the number of actual distribution transformer not shift adjustment and predicted distribution transformer shift adjustment; FN is the number of actual distribution transformer shift adjustment and predicted distribution transformer not shift adjustment; Step s32: input the extracted characteristic index into the trained distribution transformer gear adjustment recognition model to identify whether the distribution transformer is suspected of gear adjustment; Step s33: If the distribution transformer is suspected to be adjusted and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a adjusted distribution transformer; if the distribution transformer is suspected to be adjusted but the line to which the distribution transformer belongs has been transferred, the distribution transformer is a non-adjusted distribution transformer; if the distribution transformer is suspected to be non-adjusted, the distribution transformer is a non-adjusted distribution transformer.

4. According to claim 1, a method for identifying distribution transformer gear positions based on LightGBM classification and power flow calculation, Features: The gear position calculation method of the distribution transformer based on power flow calculation is used to calculate the gear position of the distribution transformer at the time, and the specific steps are as follows: Step a: Perform power flow calculation on the line to which the distribution transformer belongs. If the power deviation rate at the head end of the line is lower than the threshold, the high-voltage side voltage of the distribution transformer estimated by the power flow calculation is used as the estimated value of the high-voltage side voltage of the distribution transformer; if the power deviation rate at the head end of the line is higher than the threshold, the electrical distance data is used to obtain the nearest high-supply and high-meter distribution transformer, and the voltage of the nearest high-supply and high-meter distribution transformer is used as the estimated value of the high-voltage side voltage of the distribution transformer; Step b: using the correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer to perform clock shift, and taking the ratio of the standardized estimated value of the high-voltage side voltage of the distribution transformer to the standardized actual value of the low-voltage side voltage of the distribution transformer after clock shift as the distribution transformer moment ratio; Step c: Perform Gaussian distribution verification on historical ratio and gear data, give the gear ratio classification range, smooth the ratio curve at the time of the gear ratio change, archive it according to the gear ratio classification range, and calculate the gear at the time of the gear ratio change.

5. According to claim 4, a method for identifying distribution transformer gear positions based on LightGBM classification and power flow calculation, Features: The power flow calculation is performed on the line to which the distribution transformer belongs. If the power deviation rate at the head end of the line is lower than the threshold, the high-voltage side voltage of the distribution transformer estimated by the power flow calculation is used as the estimated value of the high-voltage side voltage of the distribution transformer; if the power deviation rate at the head end of the line is higher than the threshold, the high-supply and high-meter distribution transformer closest to the distribution transformer is obtained by using the electrical distance data, and the voltage of the high-supply and high-meter distribution transformer closest to the distribution transformer is used as the estimated value of the high-voltage side voltage of the distribution transformer. The specific steps include: Obtain the topological structure, line parameters, distribution transformer parameters, and measurement data of the line to which the distribution transformer belongs, use the forward and backward method to calculate the power flow, and estimate the voltage and power estimates of all nodes of the line; The measured power value at the head end of the line and the estimated power value at the head end of the line are divided by the rated power of the line for standardization, and then the power deviation rate at the head end of the line is calculated using the average absolute error between the measured power value at the head end of the line and the estimated power value after standardization. The calculation formula for the power deviation rate at the head end of the line is as follows: , Where P dkx is the power deviation rate at the line head end, p e is the rated power of the line, p j and is the measured value and estimated value of the line head-end power at the jth sampling point, and k represents the number of sampling points in the data time period; If the line head end power deviation rate P dkx Below threshold , then the high-voltage side voltage U of the distribution transformer estimated by the power flow calculation is cl As the estimated value of the voltage on the high-voltage side of the distribution transformer; If the line head end power deviation rate P dkx Above threshold , then obtain the electrical distance data of all nodes under the line, and cyclically calculate the electrical distance S between the distribution transformer and all high-voltage distribution transformers under the line. jg , select the high-voltage power supply and high-voltage distribution transformer with the smallest electrical distance gl As the nearest high-supply and high-meter distribution transformer; gl The voltage U gl As the estimated value of the voltage on the high-voltage side of the distribution transformer.

6. According to claim 4, a method for identifying distribution transformer gear positions based on LightGBM classification and power flow calculation, Features: The clock shift is performed using the correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer, and the ratio of the standardized estimated value of the high-voltage side voltage of the distribution transformer to the standardized actual value of the low-voltage side voltage of the distribution transformer after the clock shift is used as the distribution transformer moment ratio. The specific steps include: Assume that the clock offset of the actual value of the low-voltage side voltage of the i-th distribution transformer is , calculate the correlation coefficient between the estimated value of the high-voltage side voltage of the ith distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer after clock offset. The calculation formula is as follows: , in, For the Estimated voltage value and clock offset of the high voltage side of the distribution transformer The correlation coefficient of the actual value of the low-voltage side voltage of the distribution transformer after , Respectively The actual value of the low-voltage side voltage of the distribution transformer and the The average value of the estimated voltage on the high-voltage side of the distribution transformer, , Respectively The actual value of the low-voltage side voltage of the distribution transformer and the Estimated voltage value of the high voltage side of the distribution transformer, The value range is 0, 1, -1, 2, and -2, which respectively represent that the actual value of the low-voltage side voltage of the distribution transformer is not shifted, shifted backward by 1 time point, shifted forward by 1 time point, shifted backward by 2 time points, and shifted forward by 2 time points; If the correlation coefficient Greater than or equal to threshold , then for The actual value of the low-voltage side voltage of each distribution transformer is not clock-shifted; If the correlation coefficient Less than threshold , then for The actual value of the low-voltage side voltage of the distribution transformer is shifted backward by 1 time point, forward by 1 time point, backward by 2 time points, and forward by 2 time points. The correlation coefficient between the estimated value of the high-voltage side voltage of the distribution transformer and the actual value of the low-voltage side voltage of the distribution transformer after clock shift is calculated respectively. , , , ,Pick , , , The offset corresponding to the maximum value is recorded as ; Normalize the estimated voltage value on the high voltage side of the distribution transformer and the clock offset The normalized ratio of the actual value of the low-voltage side voltage of the distribution transformer after the transformation is taken as the distribution transformer ratio at that moment; No. The distribution transformer The formula for calculating the transformation ratio at a certain moment is as follows: , In the formula, For the The distribution transformer The ratio of the moment, , Respectively The rated voltage of the distribution transformer and the The rated voltage corresponding to the estimated value of the high-voltage side voltage of the distribution transformer is: , The clock offset After The actual value of the low-voltage side voltage of the distribution transformer and the Estimated value of the high-voltage side voltage of a distribution transformer.

7. According to claim 4, a method for identifying distribution transformer gear positions based on LightGBM classification and power flow calculation, Features: The Gaussian distribution verification of the historical transformation ratio and gear position data is performed, the gear ratio classification range is given, the transformation ratio curve at the time of the transformation is smoothed, the transformation is archived according to the gear ratio classification range, and the gear position at the time of the transformation is calculated. The specific steps include: The historical transformation ratio and gear position data were verified by Gaussian distribution, and the relationship between transformation ratio and gear position obeyed Gaussian distribution; According to the 3sigma principle in Gaussian distribution, the transformation ratio classification range corresponding to each gear is given; The median filtering method is used to smooth the distribution transformer ratio curve at the moment of distribution transformer transformation, and the abnormal points and noise of the distribution transformer ratio curve are eliminated; Archive according to the gear ratio classification range and calculate the gear at the time of gear change.

8. According to claim 1, a method for identifying distribution transformer gear positions based on LightGBM classification and power flow calculation, Features: For the gear-shifting distribution transformer, the gear-shifting time point of the distribution transformer and the gear positions before and after the distribution transformer gear-shifting are calculated according to the gear position at the distribution transformer moment. The specific steps are as follows: According to the calculation results of the distribution transmission gear calculation method based on power flow calculation, A distribution transformer in the time period The time slots are: , where For the The distribution transformer The gear position at the moment; Calculate the first-order difference of the gear position of the distribution transformer at each time, and take the time point corresponding to the maximum absolute value of the first-order difference of the gear position of the distribution transformer as the gear adjustment time point of the distribution transformer. The time point of the gear shifting The calculation formula is: , where Indicates The distribution transformer The first-order difference of the time slot, For the The time point of the gear shifting The corresponding sampling point serial number; the average value of the gear position of the distribution transformer before the distribution transformer gear adjustment time point is rounded as the gear position before the distribution transformer gear adjustment, and the average value of the gear position of the distribution transformer after the distribution transformer gear adjustment time point is rounded as the gear position after the distribution transformer gear adjustment.

9. According to claim 1, a method for identifying gear positions of distribution transformers based on LightGBM classification and power flow calculation, Features: For the unadjusted gear distribution transformer, the current gear position of the distribution transformer is calculated according to the gear position at the time of the distribution transformer. The specific steps are as follows: There are two situations where the distribution transformer is not adjusted: the distribution transformer is suspected to be not adjusted, and the distribution transformer is suspected to be adjusted and the line to which the distribution transformer belongs is transferred; If the distribution transformer is suspected of not being adjusted, the average value of the distribution transformer gear position at the time is rounded up as the current gear position of the distribution transformer; If the distribution transformer is suspected of being adjusted and the line to which the distribution transformer belongs is transferred, the gear average value before the time point corresponding to the maximum absolute value of the first-order difference of the distribution transformer gear position is rounded up as the current gear position of the distribution transformer.

10. A distribution gear identification system based on LightGBM classification and power flow calculation, It is characterized in that include: Data acquisition module, which obtains the topological structure, distribution transformer ledger, line parameters, distribution transformer parameters, and electrical distance data of the line to be diagnosed; And obtain the measurement data of the line, the measurement data of the distribution transformer and the medium and low voltage power outage events; The distribution transformer is located on the line to be diagnosed; The feature extraction module extracts feature indicators based on the acquired data, including: whether there is a short-term power outage in the distribution transformer, the first-order difference variation coefficient of the distribution transformer voltage, the maximum mean difference between the line and distribution transformer voltage ratio, the correlation coefficient between the distribution transformer and the line voltage, the extreme difference of the distribution transformer power factor, and the standard deviation of the voltage ratio between the distribution transformer and the adjacent distribution transformer; The gear adjustment identification module inputs the extracted characteristic indicators into the gear adjustment identification model based on the LightGBM classification algorithm to identify whether the distribution transformer is suspected of gear adjustment. If the distribution transformer is suspected of gear adjustment and the line to which the distribution transformer belongs has not been transferred, the distribution transformer is a gear adjustment distribution transformer, otherwise the distribution transformer is a non-gear adjustment distribution transformer; The gear calculation module uses the gear calculation method based on power flow calculation to calculate the gear position of the distribution transformer at the time. For the distribution transformer with gear adjustment, the gear adjustment time point of the distribution transformer and the gear position before and after the distribution transformer gear adjustment are calculated according to the gear position at the time of the distribution transformer; for the distribution transformer without gear adjustment, the current gear position of the distribution transformer is calculated according to the gear position at the time of the distribution transformer.

11. A computer device, It is characterized in that It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the distribution and transmission gear identification method based on LightGBM classification and power flow calculation as described in any one of claims 1 to 9 are implemented.

12. A storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by at least one processor, the steps of the distribution and transmission gear identification method based on LightGBM classification and power flow calculation as described in any one of claims 1 to 9 are implemented.