Virtual terminal self-matching method and system based on improved K-NN algorithm
Through the improved K-NN algorithm and simulated annealing algorithm, the problem of automatic matching of virtual terminals in smart substations is solved, the design efficiency and accuracy are improved, and the safe operation of the power grid is ensured.
Patent Information
- Application Number
- CN202410774053.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-27
AI Technical Summary
In smart substations, automatic matching between virtual terminals is an important issue. It is difficult to quickly and accurately connect virtual terminals with existing technology, which affects the safe operation of the power grid.
The improved K-NN algorithm is used, combined with the mathematical description of the virtual connection system and the simulated annealing algorithm, to construct a virtual terminal attribute vector through the IED name, Chinese description and data index, calculate the optimal distance weight and realize automatic matching between virtual terminals.
It improves the efficiency of engineering design and the accuracy and speed of invisible loop design, ensuring the safe operation of the power grid.
Smart Images

Figure CN118709334A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of power transmission and transformation engineering design, and in particular to a virtual terminal self-matching method and system based on an improved K-NN algorithm. Background Art
[0002] With the large-scale promotion and application of smart substations, traditional conventional substations are gradually replaced. The secondary design of substations has also changed with the replacement of electrical cables with a large number of optical cables. With the emergence of Generic Object Oriented Substation Event (GOOSE) and Sampled Values (SV) technology, the secondary circuit has changed from visual real wiring to invisible virtual wiring. These invisible circuits are also called virtual circuits, which are the connection logic design of intelligent devices. All functions are constructed through the connection of virtual terminals, similar to the terminal block of the electrical circuit. After the virtual terminal connection is completed, the correct information transmission can be completed between devices. The common output form is the virtual terminal table. The connection of the secondary logic circuit in the smart substation comes from the signal connection between the intelligent electronic devices (IED), that is, the matching connection of the output virtual terminals and the input virtual terminals between the IEDs. How to quickly realize the automatic matching and connection of virtual terminals is an important topic in current engineering design. Summary of the invention
[0003] The purpose of the present invention is to provide a virtual terminal self-matching method and system based on an improved K-NN algorithm. The device and method combine the characteristics of instance-based learning and predictive classification of the improved (K-Nearest Neighbor) K-NN learning algorithm, aiming at the problem of matching IED receiving and sending virtual terminals, and utilizing sample data of the substation configuration description model (Substation Configuration Description) SCD configuration file of the existing smart substation to achieve automatic matching between virtual terminals, improve engineering design efficiency, enhance the accuracy and speed of invisible loop design, and ensure safe operation of the power grid.
[0004] To achieve this purpose, the present invention designs a virtual terminal self-matching method based on an improved K-NN algorithm, which comprises the following steps:
[0005] Step 1: Decompose the virtual terminal matching problem of the smart substation into the matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side;
[0006] Step 2: Decompose the index format of the smart substation virtual terminal into a set format;
[0007] Step 3: Match the input virtual terminal for receiving optical fiber signals between IED devices with the output virtual terminal for sending optical fiber signals on the opposite side, and mathematically describe it as a virtual connection system consisting of input and output virtual terminals constructed by IED name, IED Chinese description and IED data index;
[0008] Step 4: Design the virtual terminal automatic matching overall framework according to the input virtual terminal of the sending IED extracted from the ICD file provided by the equipment manufacturer and the output virtual terminal of the IED connected thereto;
[0009] Step 5: Define the virtual terminal matching attribute vector according to the virtual connection system composed of input and output virtual terminals and the setting format of the virtual terminal constructed by the IED name, IED Chinese description and IED data index, and then calculate the optimal distance attribute weight of the virtual terminal and the nearest neighbor solution corresponding to the optimal distance attribute weight based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching;
[0010] Step 6: According to the classification decision rules in the K-NN algorithm, a virtual terminal matching classification decision rule is formulated, and automatic matching between virtual terminals is achieved according to the virtual terminal matching classification decision rule and the solution of the virtual terminal nearest neighbor.
[0011] A virtual terminal self-matching system based on an improved K-NN algorithm includes a virtual terminal matching problem decomposition module, a virtual terminal index format specification and composition decomposition module, a virtual terminal matching mathematical description module, an overall framework design module, a weighted attribute distance measurement calculation module and a classification decision rule formulation module:
[0012] The virtual terminal matching problem decomposition module is used to decompose the virtual terminal matching problem of the smart substation into matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side;
[0013] The virtual terminal index format specification and composition decomposition module is used to decompose the smart substation virtual terminal index format into a set format;
[0014] The virtual terminal matching mathematical description module is used to mathematically describe the matching between the input virtual terminal for receiving the optical fiber signal between the IED devices and the output virtual terminal for sending the optical fiber signal on the opposite side as a virtual connection system composed of input and output virtual terminals constructed by the IED name, IED Chinese description and IED data index;
[0015] The overall framework design module is used to design the virtual terminals to automatically match the overall framework according to the input virtual terminals of the sending IED extracted from the ICD file provided by the equipment manufacturer and the output virtual terminals of the IED connected thereto;
[0016] The weighted attribute distance metric calculation module is used to define a virtual terminal matching attribute vector according to a virtual connection system composed of input and output virtual terminals and a setting format of the virtual terminal constructed by the IED name, the IED Chinese description and the IED data index, calculate the optimal distance attribute weight of the virtual terminal based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching, and obtain the solution of the nearest neighbor corresponding to the optimal distance attribute weight according to the optimal distance attribute weight;
[0017] The classification decision rule formulation module is used to formulate virtual terminal matching classification decision rules according to the classification decision rules in the K-NN algorithm, and realize automatic matching between virtual terminals according to the virtual terminal matching classification decision rules and the solution of the virtual terminal nearest neighbor.
[0018] Beneficial effects of the present invention:
[0019] The present invention combines the characteristics of instance-based learning and predictive classification of the K-NN learning algorithm, aims at the problem of matching the receiving and sending virtual terminals of IED, and uses the sample data of the SCD configuration file of the existing smart substation to realize automatic matching between virtual terminals, improve engineering design efficiency, enhance the accuracy and speed of invisible loop design, and ensure the safe operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 The schematic diagram of decomposition of virtual terminal matching problem based on typical intervals;
[0021] Figure 2 It is the general format of GOOSE virtual terminal;
[0022] Figure 3 This is the general format diagram of SV virtual terminal;
[0023] Figure 4 It is a flow chart of virtual terminal matching based on K-NN learning algorithm;
[0024] Figure 5 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION
[0025] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0026] Example 1
[0027] The present invention designs a virtual terminal self-matching method based on an improved K-NN (K-Nearest Neighbor) algorithm, which comprises the following steps:
[0028] Step 1: Decompose the virtual terminal matching problem of the smart substation into the matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side;
[0029] Step 2: Decompose the index format of the smart substation virtual terminal into a set format;
[0030] Step 3: Match the input virtual terminal for receiving optical fiber signals between IED devices with the output virtual terminal for sending optical fiber signals on the opposite side, and mathematically describe it as a virtual connection system consisting of input and output virtual terminals constructed by IED name, IED Chinese description and IED data index;
[0031] Step 4: Design the virtual terminal automatic matching overall framework according to the input virtual terminal of the sending IED extracted from the ICD file provided by the equipment manufacturer and the output virtual terminal of the IED connected thereto;
[0032] Step 5: Define the virtual terminal matching attribute vector according to the virtual connection system composed of input and output virtual terminals and the setting format of the virtual terminal constructed by the IED name, IED Chinese description and IED data index, and then calculate the optimal distance attribute weight of the virtual terminal based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching, and obtain the solution of the nearest neighbor corresponding to the optimal distance attribute weight according to the optimal distance attribute weight;
[0033] Step 6: According to the classification decision rules in the K-NN algorithm, a virtual terminal matching classification decision rule is formulated, and automatic matching between virtual terminals is achieved according to the virtual terminal matching classification decision rule and the solution of the virtual terminal nearest neighbor.
[0034] Step 7: Engineering test verification;
[0035] The specific method of step 1: decomposing the virtual terminal matching problem of the smart substation into the matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side is:
[0036] The virtual terminal matching problem of the entire station is decomposed into the virtual terminal matching problem between typical interval IEDs (Intelligent Electronic Devices), and then decomposed into the matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side.
[0037] The virtual terminal matching problem is decomposed as follows Figure 1As shown, the matching between virtual terminals of the whole station should first be decomposed into the matching of virtual terminals of typical intervals of different voltage levels and different wiring types according to the voltage level and main wiring mode. For example, the 220kV double busbar and double segmented wiring type of a 500kV substation can be decomposed into 220kV busbar, 220kV busbar, 220kV segment and 220kV line typical intervals. The typical intervals can be decomposed into several sub-problems. For example, the virtual terminals of the GOOSE input of the 220kV segment-intelligent terminal I are matched with the main transformer protection A, the first set of busbar protection of the 220kVI-III busbar and the first set of busbar protection of the 220kVII-IV busbar.
[0038] Step 2: The specific method of decomposing the index format of the smart substation virtual terminal into the set format is as follows:
[0039] The virtual terminals in the smart substation include GOOSE virtual terminals and SV virtual terminals;
[0040] The virtual terminal index format is decomposed into a setting format consisting of IED device name, Chinese description, device equipment, node information, data object, and data attributes, such as Figure 2 , Figure 3 As shown;
[0041] The GOOSE virtual terminal index format is "Idinst", " / ", "Prefix", "InClass", "InInst", ".", "Doname1", ".", "Doname2"
[0042] The format of SV (Sampled Values) virtual terminal index is "Idinst", " / ", "Prefix", "InClass", "InInst", ".", "Doname1"
[0043] Idinst is the IED device name, Prefix is the Chinese description, InClass is the device equipment, InInst is the node information, Doname1 is the data object, and Doname2 is the data attribute.
[0044] The following is an example of a specifically defined GOOSE input virtual terminal: "PIGO / GOINGGIO1.SPCSO1.stVal" is the data index of the virtual terminal GOOSE input, and the Chinese description it expresses is "Locked reclosing switch-1". The logical device instance Idinst = "PIGO", and the identification method of the process layer input adopts a specific naming rule. "GOIN" is used as the prefix to indicate the GOOSE input, and "GGIO" is used as the identifier of the general input logical node (InClass), and the instance number of the logical node is set to inInst = 1. The data object uses "SPCSO" to represent the general data object (doName), and the data attribute (daName) is marked as "stVal".
[0045] The specific method of step 3: matching the input virtual terminal for receiving the optical fiber signal between the IED devices with the output virtual terminal for sending the optical fiber signal on the opposite side and mathematically describing the virtual connection system composed of the input and output virtual terminals constructed by the IED name, the IED Chinese description and the IED data index is:
[0046] Mathematically describe the virtual connection information in smart substation;
[0047] Define variables: D = {D1, D2, ... D k ,...,D t}, D represents all virtual connection relationships of the smart substation. The subscript t means that there are t IED devices in the variable D that need to make virtual connections to the virtual terminals. k Represents the set of all virtual connections received by a specific IED (kth).
[0048] Each element in the set D is unique and non-repeating, such that:
[0049] D=D1∪D2∪...∪D t-1 ∪D t (1)
[0050] The number of virtual connections in D is equal to the sum of the number of virtual connections contained in D1-Dt; any D k , which can be expressed as shown in formula 2:
[0051] D k ={L1,L2,...L k ,...,L n} (2)
[0052] n is D k The number of virtual matches that exist internally, L k D kThe kth virtual connection exists inside. For any intelligent electronic device (IED), its kth virtual connection should contain complete virtual terminal information. The IED name, IED Chinese description and IED data index together construct a virtual connection system consisting of input and output virtual terminals. This formula is expressed as when the virtual terminals of the smart substation are matched, the front is the input virtual terminal and the back is the output virtual terminal. L k It is expressed as shown in formula 3:
[0053]
[0054] Where:
[0055] is the virtual terminal for input, is the virtual terminal for output;
[0056] P ied_name_in is the name of the IED that inputs the virtual terminal, P desc_in The Chinese description of the IED for the input virtual terminal and the P ref_in The data index of the IED of the input virtual terminal;
[0057] P ied_name_out is the name of the IED output virtual terminal, P desc_out The Chinese description of the IED output virtual terminal and P ref_out It is the data index of the IED of the output virtual terminal.
[0058] The specific method of step 4: extracting the input virtual terminal of the sending IED from the ICD file provided by the equipment manufacturer and the output virtual terminal of the IED connected thereto to design the virtual terminal automatic matching overall framework is as follows:
[0059] Extract the input virtual terminals of the sending IED and the output virtual terminals of the connected IED from the IED Capability Description file (ICD) provided by the equipment manufacturer, and combine this information as a test data set. Use the virtual terminal matching information in the SCD (Substation Configuration Description) file of the existing smart substation as a reference sample set. The process of automatic virtual terminal matching is as follows: Figure 4 Shown
[0060] The step 5: defining the virtual terminal matching attribute vector according to the virtual connection system composed of input and output virtual terminals and the setting format of the virtual terminal constructed by the IED name, the IED Chinese description and the IED data index, and then calculating the optimal distance attribute weight of the virtual terminal and the solution of the nearest neighbor corresponding to the optimal distance attribute weight based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching is as follows:
[0061] The present invention adopts a simulated annealing optimization algorithm to simulate the cooling process of material annealing, simulates the objective function as the internal energy of the material, uses the change of temperature to control the solution iteration, and finally generates the optimal distance attribute weight.
[0062] Step 5-1:
[0063] For virtual matching L k , define the virtual terminal matching attribute vector L = [l1,l2,l3,...,l 11 ,l 12 ]. Among them, l1-l6 are the attributes of the input virtual terminal, l7-l 12 To output the properties of the virtual terminal.
[0064] Calculate the distance between the virtual terminal combination to be matched and the SCD sample data as the matching attribute vector L of the two virtual terminals i and L j The distance between vc , its virtual connection distance can be expressed as shown in formula 4:
[0065] d vc (L i ,L j )=w1d ij,1 +w2d ij,2 +...+w 12 d ij,12 (4)
[0066] Among them, w i is the attribute distance weight, w i ≥0 and d ij,n is the distance between two attribute vectors, n=1,2,3...12;
[0067] Step 5-2: Objective function construction
[0068] The sample data in the virtual terminal matching training data set is the SCD file of the smart substation that has completed the virtual terminal matching. The sample data of the logical data combination that correctly matches the IED virtual terminal to be matched is set to XR. K For the data in the sample data XR, define the function f(L K) is 1, otherwise it is 0. Then, define the objective function M, and add the attribute distance weight W to f(L K ) function, forming f(L K ,W), so that the objective function is maximized, as shown in Equation 8.
[0069] M(W)=maxf(L K ,W) (5)
[0070] Step 5-3: Initialize the solution
[0071] According to the value range of variable W, that is, w i ≥0 and The initial solution W0 is randomly generated and the objective function value M(W) is calculated.
[0072] Step 5-4: Perturbation and iteration
[0073] Temperature cooling is performed based on the cooling function, and the temperature value is updated. The cooling function selects exponential cooling, as shown in the formula.
[0074] T k =αT k-1 (6)
[0075] Where: T k is the temperature of the kth iteration; α is a constant, 0<α<1, and is 0.8 in the present invention;
[0076] Applying a disturbance to the current solution W, a candidate solution can be randomly generated near the current solution. Let the generated candidate solution be W*, and calculate the objective function value M(W*), and calculate the increment Δf=M(W * )-M(W), if Δf<0, then replace solution W and objective function M(W) with candidate solution W* and its objective function M(W*), otherwise generate a random number (0-1) and compare it with temperature exp(-ΔT / T). If the random number is less than exp(-ΔT / T), the candidate solution is also used; if it is greater than exp(-ΔT / T), the original solution is kept, T is temperature, and ΔT is the change in temperature.
[0077] Step 5-5 Termination
[0078] The algorithm is terminated based on the current temperature. If the temperature cools to the set minimum temperature, the algorithm is terminated based on the current temperature. - 3 T0, then terminate.
[0079] The simulated annealing algorithm can be used to evaluate each candidate solution generated, and then update the current candidate solution and the historical optimal value according to the Monte Carlo (Metropolis) criterion to determine the optimal attribute distance weight and the nearest neighbor solution corresponding to the optimal attribute distance weight.
[0080] The specific method of step 6: formulating a virtual terminal matching classification decision rule according to the classification decision rule in the K-NN algorithm, and realizing automatic matching between virtual terminals according to the virtual terminal matching classification decision rule and the solution of the virtual terminal nearest neighbor is:
[0081] The classification decision rule in the K-NN algorithm is majority voting. The present invention adopts the voting principle of "the minority obeys the majority, and one point counts as one vote"; if a virtual terminal of an IED to be matched is input The nearest neighbor solution corresponds to a virtual terminal of an IED output Then the output virtual terminal Cast a vote; select the IED output virtual terminal with the most votes And use it as the IED input virtual terminal to be matched Then, the voting and automatic matching steps are repeated for each IED input virtual terminal to be matched. When the error rate of automatic matching is lower than the preset standard, the present invention is 3%, and the automatic matching result is selected as the virtual connection of the IED to be matched. When the error rate of automatic matching is higher than the preset standard, manual matching is performed.
[0082] The specific method of engineering test verification in step 7 is:
[0083] In order to test the practicality and effectiveness of the proposed improved K-NN virtual terminal automatic matching method, a virtual terminal matching example test is carried out through a substation project. A 220kV substation is selected as an example. Taking a 220kV line bay as an example, a 220kV line bay includes 220kV line merging unit A, 220kV line merging unit B, 220kV line intelligent terminal A, 220kV line intelligent terminal B, 220kV line measurement and control device, 220kV line protection device A and 220kV line protection device B and other IED devices.
[0084] The improved K-NN algorithm is used to perform a matching test on the 220kV line interval of the 220kV substation. The distance measurement weight in the matching calculation process should be significantly greater than other weights after the weight settings of the IED name, Chinese description and logical device are calculated by the simulated annealing algorithm. The sample set selection should follow the scheme neighbor principle, that is, the engineering design scheme involved in the SCD configuration file of the sample set should be similar or consistent with the design scheme involved in the IED to be matched. The SV input of the 220kV line protection device A and the corresponding SV output matching table of the 220kV line merging unit A are selected, and the first 9 input and output matching sets are intercepted. The automatic matching results are shown in Table 1 below.
[0085] Table 1 220kV line protection device A (PCS-931A-FA-GR) SV input matching set
[0086]
[0087] From the analysis of Table 1, it can be seen that the connections of input IN2 and IN3 that should not match also show no match in the test, and the virtual terminals in the SV input data set of the PCS-931A-FA-GR device have all been correctly matched to the corresponding line merging unit output virtual terminals.
[0088] Example 2
[0089] like Figure 5 As shown, a virtual terminal self-matching system based on an improved K-NN algorithm includes a virtual terminal matching problem decomposition module, a virtual terminal index format specification and composition decomposition module, a virtual terminal matching mathematical description module, an overall framework design module, a weighted attribute distance measurement calculation module and a classification decision rule formulation module:
[0090] The virtual terminal matching problem decomposition module is used to decompose the virtual terminal matching problem of the smart substation into matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side;
[0091] The virtual terminal index format specification and composition decomposition module is used to decompose the smart substation virtual terminal index format into a set format;
[0092] The virtual terminal matching mathematical description module is used to mathematically describe the matching between the input virtual terminal for receiving the optical fiber signal between the IED devices and the output virtual terminal for sending the optical fiber signal on the opposite side as a virtual connection system composed of input and output virtual terminals constructed by the IED name, IED Chinese description and IED data index;
[0093] The overall framework design module is used to design the virtual terminals to automatically match the overall framework according to the input virtual terminals of the sending IED extracted from the ICD file provided by the equipment manufacturer and the output virtual terminals of the IED connected thereto;
[0094] The weighted attribute distance metric calculation module is used to define the virtual terminal matching attribute vector according to the virtual connection system composed of input and output virtual terminals and the setting format of the virtual terminal constructed by the IED name, the IED Chinese description and the IED data index, and then calculate the optimal distance attribute weight of the virtual terminal and the nearest neighbor solution corresponding to the optimal distance attribute weight based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching;
[0095] The classification decision rule formulation module is used to formulate virtual terminal matching classification decision rules according to the classification decision rules in the K-NN algorithm, and realize automatic matching between virtual terminals according to the virtual terminal matching classification decision rules and the solution of the virtual terminal nearest neighbor.
[0096] Example 3
[0097] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of a virtual terminal self-matching method based on an improved K-NN algorithm are implemented.
[0098] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
Claims
1. A virtual terminal self-matching method based on an improved K-NN algorithm, characterized in that: It includes the following steps: Step 1: Decompose the virtual terminal matching problem of the smart substation into the matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side; Step 2: Decompose the index format of the smart substation virtual terminal into a set format; Step 3: Match the input virtual terminal for receiving optical fiber signals between IED devices with the output virtual terminal for sending optical fiber signals on the opposite side, and mathematically describe it as a virtual connection system consisting of input and output virtual terminals constructed by IED name, IED Chinese description and IED data index; Step 4: Design the virtual terminal automatic matching overall framework according to the input virtual terminal of the sending IED extracted from the ICD file provided by the equipment manufacturer and the output virtual terminal of the IED connected thereto; Step 5: Define the virtual terminal matching attribute vector according to the virtual connection system composed of input and output virtual terminals and the setting format of the virtual terminal constructed by the IED name, IED Chinese description and IED data index, calculate the optimal distance attribute weight of the virtual terminal based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching, and obtain the solution of the nearest neighbor corresponding to the optimal distance attribute weight according to the optimal distance attribute weight; Step 6: According to the classification decision rules in the K-NN algorithm, a virtual terminal matching classification decision rule is formulated, and automatic matching between virtual terminals is achieved according to the virtual terminal matching classification decision rule and the solution of the virtual terminal nearest neighbor.
2. According to claim 1, a virtual terminal self-matching method based on an improved K-NN algorithm is characterized in that: The specific method of decomposing the virtual terminal matching problem of the smart substation into the matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side is: The virtual terminal matching problem of the whole station is decomposed into the virtual terminal matching problem between typical IED intervals, and then decomposed into the matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side.
3. The virtual terminal self-matching method based on the improved K-NN algorithm according to claim 1 is characterized in that: The specific method of decomposing the index format of the smart substation virtual terminal into the set format in step 2 is: The virtual terminals in the smart substation include GOOSE virtual terminals and SV virtual terminals; Decompose the virtual terminal index format into a setting format including IED device name, Chinese description, device equipment, node information, data object, and data attribute; The index format of GOOSE virtual terminal is "Idinst", " / ", "Prefix", "InClass", "InInst", ".", "Doname1", ".", "Doname2"; The index format of SV virtual terminal is "Idinst", " / ", "Prefix", "InClass", "InInst", ".", "Doname1"; Idinst is the device name of IED, Prefix is the Chinese description of IED, InClass is the device equipment of IED, InInst is the node information of IED, Doname1 is the data object of IED, and Doname2 is the data attribute of IED.
4. The virtual terminal self-matching method based on the improved K-NN algorithm according to claim 1 is characterized in that: The specific method of matching the input virtual terminal for receiving the optical fiber signal between the IED devices with the output virtual terminal for sending the optical fiber signal on the opposite side and mathematically describing the virtual connection system composed of the input and output virtual terminals constructed by the IED name, the IED Chinese description and the IED data index is as follows: Mathematically describe the virtual connection information in smart substation; Define variables: D = {D1, D2, ... D k ,...,D t }, D represents all virtual connection relationships of the smart substation; the subscript t means that there are t IED devices in the variable D that need to make virtual connections to the virtual terminals; D k represents the set of all virtual connections received by the kth IED; Each element in the set D is unique and non-repeating, such that: D=D1∪D2∪...∪D t-1 ∪D t (1) And the number of virtual connections in D is equal to D 1- D t The sum of the number of virtual connections included; any D k , which can be expressed as shown in formula 2: D k ={L1,L2,...L k ,...,L n } (2) n is D k The number of virtual matches that exist internally, L k D k The kth virtual match exists inside; for any IED, its kth virtual connection should contain complete virtual terminal information, and a virtual connection system consisting of input and output virtual terminals is constructed by the IED name, IED Chinese description and IED data index; L k It is expressed as shown in formula 3: Where: is the virtual terminal for input, is the virtual terminal for output; P ied_name_in The name of the IED for inputting the virtual terminal, P desc_in The Chinese description of the IED for the input virtual terminal and the P ref_in The data index of the IED of the input virtual terminal; P ied_name_out is the name of the IED output virtual terminal, P desc_out The Chinese description of the IED output virtual terminal and P ref_out It is the data index of the IED of the output virtual terminal.
5. The virtual terminal self-matching method based on the improved K-NN algorithm according to claim 1 is characterized in that: The specific method of designing the virtual terminal automatic matching overall framework according to the input virtual terminal of the sending IED and the output virtual terminal of the IED connected thereto extracted from the ICD file provided by the equipment manufacturer in step 4 is as follows: Extract the input virtual terminals of the sending IED and the output virtual terminals of the IED connected to it from the ICD file provided by the equipment manufacturer, and combine this information as a test data set; The virtual terminal matching information in the SCD file of the existing smart substation is used as a benchmark sample set for reference.
6. The virtual terminal self-matching method based on the improved K-NN algorithm according to claim 1, characterized in that: The step 5 defines the virtual terminal matching attribute vector according to the virtual connection system composed of input and output virtual terminals and the setting format of the virtual terminal constructed by the IED name, the IED Chinese description and the IED data index, and then calculates the optimal distance attribute weight of the virtual terminal and the solution of the nearest neighbor corresponding to the optimal distance attribute weight based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching. The specific method is: The simulated annealing optimization algorithm is used to obtain the optimal attribute weights; the specific steps are: Step 5-1: For virtual matching L k , define the virtual terminal matching attribute vector L = [l1,l2,l3,...,l 11 ,l 12 ]; where l1-l6 are the attributes of the input virtual terminal, l7-l 12 To output various attributes of virtual terminals; Calculate the distance between the virtual terminal combination to be matched and the SCD sample data as the matching attribute vector L of the two virtual terminals i and L j The distance between vc , its virtual connection distance can be expressed as shown in formula 4: d vc (L i ,L j )=w1d ij,1 +w2d ij,2 +...+w 12 d ij,12 (4) Among them, w i is the attribute distance weight, w i ≥0 and d ij,n is the distance between two attribute vectors, n=1,2,3...12; Step 5-2: The sample data in the virtual terminal matching training data set is the SCD file of the smart substation that has completed the virtual terminal matching. The sample data of the logical data combination that correctly matches the IED virtual terminal to be matched is set to XR; if any matching input and output L K For the data in the sample data XR, define the function f(L K ) is 1, otherwise it is 0; then, define the objective function M, and add the attribute distance weight W to f(L K ) function, forming f(L K ,W), so that the objective function is maximized, as shown in Formula 5; M(W)=maxf(L K ,W) (5) Step 5-3: According to the value range of variable W, that is, w i ≥0 and Randomly generate the initial solution W0 and calculate the objective function value M(W); Step 5-4: Perform temperature cooling based on the cooling function and update the temperature value. The cooling function selects exponential cooling, as shown in Formula 6. T k =αT k-1 (6) Where: T k is the temperature of the kth iteration; α is a constant, 0<α<1, and is 0.8 in the present invention; Applying a disturbance to the current solution W, a candidate solution can be randomly generated near the current solution. Let the generated candidate solution be W*, and calculate the objective function value M(W*), and calculate the increment Δf=M(W * )-M(W), if Δf<0, then replace solution W and objective function M(W) with candidate solution W* and its objective function M(W*), otherwise generate a random number and compare it with temperature exp(-ΔT / T); if the random number is less than exp(-ΔT / T), then use the candidate solution; if it is greater than exp(-ΔT / T), then keep the original solution, T is temperature, ΔT is the change in temperature; Step 5-5: Determine whether to terminate the algorithm based on the current temperature. If the temperature cools to the set minimum temperature, the minimum temperature set in the present invention is 1e -3 T0, then terminate; After evaluating each candidate solution generated by the simulated annealing algorithm, the current candidate solution and the historical optimal value are updated according to the Metropolis criterion to determine the optimal attribute distance weight and the nearest neighbor solution corresponding to the optimal attribute distance weight.
7. The virtual terminal self-matching method based on the improved K-NN algorithm according to claim 1 is characterized in that: The specific method of step 6 formulating the virtual terminal matching classification decision rule according to the classification decision rule in the K-NN algorithm, and realizing the automatic matching between virtual terminals according to the virtual terminal matching classification decision rule and the solution of the virtual terminal nearest neighbor is: The classification decision rule in the K-NN algorithm is majority voting, which adopts the voting principle of "the minority obeys the majority, and one point counts as one vote"; if a virtual terminal of an IED to be matched is The nearest neighbor solution corresponds to a virtual terminal of an IED output Then the output virtual terminal Cast a vote; select the IED output virtual terminal with the most votes As the virtual terminal of the IED input to be matched Then, such voting and automatic matching steps are repeated for each IED input virtual terminal to be matched; when the error rate of automatic matching is lower than a preset standard, the automatic matching result is selected as the virtual connection of the IED to be matched.
8. A virtual terminal self-matching system based on an improved K-NN algorithm, characterized in that: It includes a virtual terminal matching problem decomposition module, a virtual terminal index format specification and composition decomposition module, a virtual terminal matching mathematical description module, an overall framework design module, a weighted attribute distance measurement calculation module and a classification decision rule formulation module: The virtual terminal matching problem decomposition module is used to decompose the virtual terminal matching problem of the smart substation into matching between the input virtual terminal receiving the optical fiber signal between each IED device and the output virtual terminal sending the optical fiber signal on the opposite side; The virtual terminal index format specification and composition decomposition module is used to decompose the smart substation virtual terminal index format into a set format; The virtual terminal matching mathematical description module is used to mathematically describe the matching between the input virtual terminal for receiving the optical fiber signal between the IED devices and the output virtual terminal for sending the optical fiber signal on the opposite side as a virtual connection system composed of input and output virtual terminals constructed by the IED name, IED Chinese description and IED data index; The overall framework design module is used to design the virtual terminals to automatically match the overall framework according to the input virtual terminals of the sending IED extracted from the ICD file provided by the equipment manufacturer and the output virtual terminals of the IED connected thereto; The weighted attribute distance metric calculation module is used to define a virtual terminal matching attribute vector according to a virtual connection system composed of input and output virtual terminals and a setting format of the virtual terminal constructed by the IED name, the IED Chinese description and the IED data index, calculate the optimal distance attribute weight of the virtual terminal based on the simulated annealing algorithm of the overall framework of virtual terminal automatic matching, and calculate the solution of the nearest neighbor corresponding to the optimal distance attribute weight according to the optimal distance attribute weight; The classification decision rule formulation module is used to formulate virtual terminal matching classification decision rules according to the classification decision rules in the K-NN algorithm, and realize automatic matching between virtual terminals according to the virtual terminal matching classification decision rules and the solution of the virtual terminal nearest neighbor.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.
Citation Information
Cited By
Intelligent substation virtual terminal automatic connection method and system based on SCHO-GO algorithm
CN120850494A
Automatic matching method and system for virtual terminals of intelligent substation
CN121682296A
