Distributed microcomputer relay protection method and system for intelligent micro-grid
Through machine learning algorithms, the optimization model is built and the setting value of the microcomputer relay protection system is optimized, which solves the problem of untimely troubleshooting in the existing technology, and achieves rapid fault response and data support.
Patent Information
- Application Number
- CN202411211575.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-29
AI Technical Summary
The existing microcomputer relay protection system cannot adapt effectively in the event of a failure, resulting in erroneous operation or untimely operation, and cannot meet the protection needs of all situations.
Two optimization models are constructed using machine learning algorithms, which are used for power-off-sensitive load switching processes and internal fault handling of microgrids. By optimizing the setting value, faults are predicted and automatic adjustments are automatically adjusted, manual intervention is reduced and switching and disconnection speeds are improved.
By optimizing the setting value, rapid switching and disconnection in the case of failure is achieved, the frequency of manual intervention is reduced, the system response speed and accuracy is improved, and data support is provided for fault analysis and performance evaluation.
Smart Images

Figure CN119050969A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of relay protection, and in particular to a distributed microcomputer relay protection method and system for an intelligent microgrid. Background Art
[0002] Microgrid refers to a small power supply network that mainly uses distributed power sources and uses energy storage and control devices for real-time regulation to achieve power balance within the network. It can be connected to the grid or off-grid. The core principle of microcomputer relay protection is to use microprocessor technology to detect and judge various fault conditions in the power system, and take effective control measures to ensure the normal operation of the power system and meet the user's requirements for protection of different electrical equipment or lines.
[0003] Some existing microcomputer relay protection systems automatically adjust the switching of protection functions to match appropriate setting values through a pre-stored setting value rule base. Although this method can improve the adaptability of the system to a certain extent, the setting values of the pre-stored rule base cannot adapt to all situations and cannot meet the switching needs in some fault situations, resulting in erroneous operation or untimely operation. Summary of the invention
[0004] The present invention adopts a machine learning algorithm to construct two optimization models, respectively targeting the power outage-sensitive load switching process and the process of microgrid internal faults that need to be disconnected from the main power grid, to predict the faults of the power grid and the microgrid, and automatically optimize the setting values, reduce the frequency of manual intervention, and increase the speed of switching and disconnection to solve the problems in the background technology.
[0005] The technical solution provided by the present invention is: a distributed microcomputer relay protection method for a smart microgrid, the method comprising:
[0006] S1. Obtain historical setting values and fault reports of the first type microcomputer relay protection device and the second type microcomputer relay protection device from the database;
[0007] S2, detect the main grid, optimize the setting value of the first type of microcomputer relay through the trained optimization model, and quickly switch the microgrid to the island mode when the main grid fails;
[0008] S3, detecting the microgrid, optimizing the setting value 2 of the second type of microcomputer relay through the trained optimization model 2, and quickly disconnecting the faulty microgrid from the main grid;
[0009] S4, storing the optimized setting value 1, setting value 2 and log;
[0010] The first type of microcomputer relay protection devices are a number of microcomputer relay protection devices connected to power-off sensitive loads;
[0011] The second type of microcomputer relay protection devices are several microcomputer relay protection devices connecting the main power grid and the microgrid.
[0012] Preferably, the historical setting values include historical setting value 1 of the first type of microcomputer relay protection device and historical setting value 2 of the second type of microcomputer relay protection device;
[0013] The fault report includes one or more of fault type data, load type data, fault frequency data, and a relationship between a set value and a fault.
[0014] Preferably, before step S2, the method further comprises the following steps:
[0015] Construct optimization model 1: Select random forest algorithm to construct optimization model 1;
[0016] Y1=RF(params); where params represents the parameters of optimization model 1;
[0017] Eigenvalue extraction:
[0018] The load type data is quantified by using one-hot encoding: X loadtype = one-hot-encoding(L), where L is the payload type, X loadtype One-hot encoding for the payload type;
[0019] Calculate the failure frequency: Among them, M F is the number of failures, N is the total operating time;
[0020] Extract the relationship characteristics between the setting value and the fault frequency: C = Correlation (S, M F ), where C is the correlation coefficient between the setting value and the number of faults, and S is the setting value;
[0021] Select data from multiple time points in the fault report, including load type data, fault frequency data, and the relationship between the setting value and the fault, to form a historical data set. After quantifying the load type data, fault frequency data, and the relationship between the setting value and the fault, perform normalization processing to form a sample set.
[0022] Training and optimizing the model:
[0023] Divide the sample set into a training set and a test set;
[0024] Use the training set to train the optimization model, and use the test set to evaluate the accuracy of the optimization model;
[0025] When the fault type output by the optimized output model 1 is a power-off sensitive load, the optimized setting value 1 is optimized. The specific optimization steps are: T1′=T1(1-Δt1), where T1′, T1, and Δt1 are the optimized setting value 1, the setting value 1 before optimization, and the optimized variable 1, respectively.
[0026] Preferably, the setting value 1 is the switching time of the first type microcomputer relay protector, and the setting value 2 is the disconnection time of the second type microcomputer relay.
[0027] Preferably, the main grid is detected, and the setting value of the first type of microcomputer relay is optimized by a trained optimization model, and when a failure occurs in the main grid, the microgrid is switched to the island mode, including the following steps:
[0028] The optimized setting value is sent to the first type of microcomputer relay, and the first type of microcomputer relay is actuated by the optimized setting value;
[0029] The voltage peak value, voltage valley value and grid frequency of the main grid are sampled multiple times to determine whether the main grid has a fault and to feed back the main grid fault value Q;
[0030] When the peak voltage value of the main grid is greater than the preset voltage upper threshold or the voltage valley value of the main grid is less than the voltage lower threshold, that is: U 峰 >U max Or U 谷 min , it means there is a problem with the voltage of the main power grid;
[0031] When the grid frequency of the main grid is greater than the preset upper frequency threshold or less than the lower frequency threshold, that is, f s >f max Or, f s <f min , it means that there is an imbalance between the power generation and load of the main power grid;
[0032] When there is a problem with the grid voltage or an imbalance between power generation and load, Q is assigned a value of 1, otherwise it is assigned a value of 0;
[0033] When Q=1, using the optimized setting value 1, the first type of microcomputer relay protection disconnects from the main power grid and switches to the island mode, including the following steps:
[0034] According to the inverse time algorithm, the optimized setting value 1 is used to calculate the corresponding optimized preset current value, which is:
[0035] Among them, TDS, I′ p , I, and C are the time constant, the optimized preset current value, the fault current value, and the slope of the inverse time curve respectively;
[0036] The relationship between the optimized setting value 1 and the corresponding preset current value is:
[0037] By modifying the original preset current value of the first type microcomputer relay protection device to I′ p , to adjust the action time so that the first type of microcomputer relay protection device uses the setting value one (switching time) to switch;
[0038] When Q=0, the first type of microcomputer relay protection does not operate.
[0039] Preferably, the detecting the microgrid is to detect the internal fault of the microgrid, which specifically includes the following steps:
[0040] Acquire microgrid operation data to form a learning sample database, wherein the microgrid operation data includes voltage values, current values, and frequency values of the microgrid in normal and abnormal states;
[0041] Set a network switching value Z, wherein the initial value of Z is 0;
[0042] Perform DWT transformation on the data in the learning sample database to extract time-frequency features;
[0043] Construct a multi-layer restricted Boltzmann machine: stack multiple RBM layers to form a DBN. Each layer of RBM is responsible for extracting abstract features at different levels. The bottom layer RBM learns simple features, and the top layer RBM learns complex features. Through unsupervised learning, pre-training is performed using data in the learning sample database.
[0044] Combine the pre-trained DBN with an artificial neural network, where the input of the ANN is the abstract features extracted by the DBN;
[0045] Use the data of abnormal microgrid conditions in the learning sample database to fine-tune the entire DBN+ANN network in a supervised manner to optimize the DBN+ANN network's ability to identify specific fault types;
[0046] After data preprocessing and DWT feature extraction, the real-time data of the microgrid collected in real time is input into the trained DBN+ANN network for fault detection and classification;
[0047] When a fault occurs in the microgrid, Z is assigned a value of 1;
[0048] The real-time data includes one or more of current, voltage, and frequency.
[0049] Preferably, the supervised fine-tuning of the entire DBN+ANN network includes:
[0050] Through the back-propagation algorithm, the gradient of the loss function relative to the network parameters is calculated and the network parameters are updated;
[0051] The loss function where y i , are the true value and the model predicted value respectively; the network parameters are the weight matrix, bias vector and activation function parameters in DBN and ANN.
[0052] Preferably, the step S3 further includes the following steps:
[0053] Constructing optimization model 2:
[0054] The optimization model 2 uses a random forest algorithm to construct an initial model, and the optimization model 2 is: Y2=RF(params′); wherein params′ represents the parameters of the optimization model 2;
[0055] Training optimization model 2:
[0056] Acquire microgrid historical data from a database, wherein the microgrid historical data includes voltage, current, and frequency under different fault levels and fault types;
[0057] The microgrid historical data is transformed through DWT to extract fault characteristic values;
[0058] Encode the fault type and fault level, specifically represented by a two-tuple (v, k), where v and k represent the fault type and fault level respectively;
[0059] Input the fault feature value of the corresponding binary group into the optimization model 2 for training;
[0060] The hyperparameters of model 2 are adjusted and optimized through the cross-validation algorithm;
[0061] Use the trained optimization model 2 to predict the newly input microgrid data and identify the type and level of faults;
[0062] The method of optimizing the setting value 2 of the second type of microcomputer relay by the trained optimization model 2 to improve the speed of rapid disconnection of the microgrid from the main grid includes the following steps:
[0063] Input the optimized setting value 2 into the second type microcomputer relay protection device;
[0064] Set the fault level threshold. When the fault level output by the optimization model 2 is greater than the fault level threshold, optimize the setting value 2. The specific optimization process is: When the setting value is adjusted to T2′=T2(1-Δt2), U, T, and Δt are respectively the output fault level of optimization model 2, fault level threshold, setting value 2 before optimization, and optimization variable 2;
[0065] The second type of microcomputer relay protection uses the optimized setting value two, and when the microgrid fails, it separates the microgrid from the main grid.
[0066] The present invention also provides a technical solution: a distributed microcomputer relay protection system for a smart microgrid, wherein the system is used to execute the distributed microcomputer relay protection method for the smart microgrid.
[0067] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the distributed microcomputer relay protection method for the smart microgrid.
[0068] Beneficial effects of the present invention:
[0069] 1. The present invention first collects historical setting values and fault reports of first-category and second-category microcomputer relay protection devices from a database, and trains optimization model 1 by using data such as historical setting values and fault reports. This model is used to optimize the setting values of the first-category microcomputer relays. Similarly, historical data is used to train optimization model 2, which is aimed at the second-category microcomputer relays, i.e., those located at the connection point between the main power grid and the microgrid. The optimized setting value 1, setting value 2 and operation log are stored, which provides data support for future fault analysis and system performance evaluation, and is also convenient for regulatory compliance inspection and historical tracking.
[0070] 2. The present invention optimizes the setting value 1 of the first type of microcomputer relay through a trained optimization model, and switches the microgrid to the island mode when a fault occurs in the main power grid; specifically, the optimized setting value 1 is sent to the first type of microcomputer relay, and the corresponding preset current value is calculated using the optimized setting value 1 according to the inverse time algorithm; then, the original preset current value of the first type of microcomputer relay protection device is modified to the preset current value I′ corresponding to the optimized setting value 1. p , in order to achieve the effect of switching the first type of microcomputer relay protector using the optimized setting value one, and quickly switch the power-off sensitive load to the island mode; similarly, the setting value two of the second type of microcomputer relay protector is optimized by the trained optimization model two; by using a multi-layer restricted Boltzmann machine (DBN) combined with an artificial neural network (ANN) to detect the internal faults of the microgrid, when the internal fault of the microgrid occurs, the second type of microcomputer relay protector uses the optimized setting value two to quickly disconnect the microgrid from the main grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 is a flow chart of the method of the present invention;
[0072] Figure 2 It is a flow chart of the switching process of the first type of microcomputer relay protection device in the present invention;
[0073] Figure 3 This is a flow chart of the switching process of the second type of microcomputer relay protection device in the present invention. DETAILED DESCRIPTION
[0074] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0075] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0076] refer to Figure 1 The present invention provides a distributed microcomputer relay protection method for a smart microgrid, the method comprising:
[0077] S1. Obtain historical setting values and fault reports of the first type microcomputer relay protection device and the second type microcomputer relay protection device from the database;
[0078] S2, detect the main grid, optimize the setting value of the first type of microcomputer relay through the trained optimization model, and quickly switch the microgrid to the island mode when the main grid fails;
[0079] S3, detecting the microgrid, optimizing the setting value 2 of the second type of microcomputer relay through the trained optimization model 2, and quickly disconnecting the faulty microgrid from the main grid;
[0080] S4, storing the optimized setting value 1, setting value 2 and log;
[0081] The first type of microcomputer relay protection devices are a number of microcomputer relay protection devices connected to power-off sensitive loads;
[0082] The second type of microcomputer relay protection devices are several microcomputer relay protection devices connecting the main power grid and the microgrid.
[0083] The historical setting values include historical setting value 1 of the first type microcomputer relay protector and historical setting value 2 of the second type microcomputer relay protector; the fault report includes one or more of fault type data, load type data, fault frequency data and the relationship between the setting value and the fault.
[0084] The construction of optimization model 1 and the optimization process of setting value 1 are as follows:
[0085] Select the random forest algorithm to build the optimization model 1; Y1 = RF (params); where params represents the parameters of the optimization model 1;
[0086] The load type data is quantified by using one-hot encoding: X loadtype = one-hot-encoding(L), where L is the payload type, X loadtype One-hot encoding for the payload type;
[0087] Calculate the failure frequency: Among them, M F is the number of failures, N is the total operating time;
[0088] Extract the relationship characteristics between the setting value and the fault frequency: C = Correlation (S, M F ), where C is the correlation coefficient between the setting value and the number of faults, and S is the setting value;
[0089] Select data from multiple time points in the fault report, including load type data, fault frequency data, and the relationship between the setting value and the fault, to form a historical data set;
[0090] The load type data, fault frequency data and the data on the relationship between the setting value and the fault are quantified and then normalized to form a sample set;
[0091] The sample set is divided into a training set and a test set; the optimization model is trained using the training set, and the accuracy of the optimization model is evaluated using the test set;
[0092] When the fault type output by the optimized output model 1 is a power-off sensitive load, the optimized setting value 1 is optimized, and the optimized setting value 1 is: T1′=T1(1-Δt1), where T1′, T1, and Δt1 are the optimized setting value 1, the setting value 1 before optimization, and the optimized variable 1, respectively.
[0093] For example, the switching time of the original microcomputer relay protector is 5 milliseconds, that is, the setting value before optimization is 5 milliseconds, and the optimization variable is 0.3, then the setting value after optimization is 3.5 milliseconds, thereby improving the switching speed.
[0094] The setting value 1 is the switching time of the microcomputer relay protector connected to the power-off sensitive load. The so-called power-off sensitive load is sensitive to voltage sag. A voltage drop of several cycles will cause the load to trip. Such equipment includes computers and PLCs.
[0095] refer to Figure 2,The setting value of the first type of microcomputer relay is optimized by the ,trained optimization model. ,When a fault occurs in the main grid, the microgrid is switched to the island mode.
[0096] The specific steps include:
[0097] 1. Send the optimized setting value to the first type of microcomputer relay;
[0098] 2. Sample the voltage peak value, voltage valley value and grid frequency of the main grid multiple times to determine whether the main grid has a fault and feedback the main grid fault value Q;
[0099] The process of calculating the main grid fault value is as follows: when the peak value of the main grid voltage collected is greater than the preset voltage upper limit threshold or the voltage valley value of the main grid is less than the voltage lower limit threshold, that is: U 峰 >U max Or U 谷 min , it means there is a problem with the voltage of the main power grid;
[0100] When the main grid frequency collected is greater than the preset upper frequency threshold or less than the lower frequency threshold, f s >f max or s <f min , it means that there is an imbalance between the power generation and load of the main power grid;
[0101] When there is a problem with the grid voltage and / or an imbalance between generation and load, Q is assigned a value of 1, otherwise it is assigned a value of 0;
[0102] 3. When Q=1, using the optimized setting value 1, the first type of microcomputer relay protection disconnects from the main power grid and switches to the island mode, including the following steps:
[0103] First, according to the inverse time algorithm, the optimized setting value 1 is used to calculate the corresponding optimized preset current value, which is:
[0104] Among them, TDS, I′ p , I, and C are the time constant, the optimized preset current value, the fault current value, and the slope of the inverse time curve, respectively.
[0105] The time constant, the preset current value and the inverse time curve are all preset in the first type microcomputer relay protection device.
[0106] The relationship between the optimized setting value 1 and the corresponding preset current value is:
[0107] Then, by modifying the original preset current value of the first type microcomputer relay protection device to I′p , so that the first type of microcomputer relay protection device uses the setting value of one for switching;
[0108] When Q=0, the first type of microcomputer relay protection does not operate.
[0109] In this embodiment, a multi-layer restricted Boltzmann machine (DBN) is used in combination with an artificial neural network (ANN) to detect internal faults of a microgrid:
[0110] First, collect the operating data of the microgrid in normal and abnormal conditions, including but not limited to voltage, current and frequency values. Perform necessary cleaning and standardization on the collected data to remove noise and outliers and ensure data quality.
[0111] Then, the collected data is subjected to discrete wavelet transform (DWT) to extract time-frequency features. Multiple restricted Boltzmann machine layers are stacked to form a deep belief network. Each layer is responsible for extracting different levels of abstract features, learning step by step from simple to complex. Through unsupervised learning, each layer of RBM is pre-trained with a large amount of normal operation data to capture the deep structure of the data.
[0112] Combine the pre-trained DBN with an artificial neural network, where the input of the ANN is the high-level abstract features extracted by the DBN. Use data containing fault states to perform supervised fine-tuning on the entire DBN+ANN network to optimize the model's ability to identify specific fault types.
[0113] Finally, the real-time collected microgrid data (such as current, voltage, and frequency) are subjected to the same preprocessing and DWT transformation to extract features. The processed features are input into the trained DBN+ANN model for real-time fault detection and classification. When the system detects a fault, the corresponding Z value is set to 1, indicating that the fault is found.
[0114] Through the above steps, internal faults can be detected and classified accurately and quickly, so as to respond in time and ensure the stable operation of the system.
[0115] The process of fine-tuning described above is as follows:
[0116] Through the back propagation algorithm, the gradient of the loss function relative to the network parameters is calculated and the network parameters are updated; the loss function where y i , are the true value and the model predicted value respectively; the network parameters are the weight matrix, bias vector and activation function parameters in DBN and ANN.
[0117] refer to Figure 3In order to solve the problem of rapid disconnection of a faulty microgrid and a main grid, the present invention also provides the following solution:
[0118] First, construct optimization model 2: use random forest algorithm to construct the initial model, and the optimization model 2 is: Y2=RF(params′); wherein params′ represents the parameters of optimization model 2, including the number of trees, the depth of the trees, and the leaf nodes, etc. In this embodiment, the number of trees is set to 100, the depth is unlimited, and the number of leaf nodes is 20.
[0119] Training optimization model 2: obtaining microgrid historical data from a database, wherein the microgrid historical data includes voltage, current, and frequency under different fault levels and fault types; converting the microgrid historical data through DWT to extract fault feature values;
[0120] Encode the fault type and fault level, specifically represented by a two-tuple (v, k), where v and k represent the fault type and fault level respectively;
[0121] Input the fault feature values of the corresponding binary groups into the optimization model 2 for training; adjust the hyperparameters of the optimization model 2 through the cross-validation algorithm;
[0122] Use the trained optimization model 2 to predict the newly input microgrid data and identify the type and level of faults;
[0123] Set the fault level threshold. When the fault level output by the optimization model 2 is greater than the fault level threshold, optimize the setting value 2. The specific optimization process is: When the setting value is adjusted to T2′=T2(1-Δt2), U, T, and Δt are the output fault level of optimization model 2, fault level threshold, setting value 2 before optimization, and optimization variable 2, respectively.
[0124] The optimized setting value 2 is input into the second type microcomputer relay protection device. The second type microcomputer relay protection device uses the optimized setting value 2. When the microgrid fails, the microgrid is separated from the main grid.
[0125] Among them, when the setting value two is known, the corresponding preset current value is calculated to replace the original preset current value, thereby achieving the effect of the second type of microcomputer relay protector using the setting value two for switching. The specific process refers to the process of the first type of microcomputer relay protector using the setting value two for switching above.
[0126] The present invention also provides a distributed microcomputer relay protection system for a smart microgrid, wherein the system is used to execute a distributed microcomputer relay protection method for the smart microgrid.
[0127] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the distributed microcomputer relay protection method for the smart microgrid.
[0128] The embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. The embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU), the above-mentioned functions defined in the method of the present application are executed. It should be noted that the above-mentioned computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of an electrical, magnetic, optical, electromagnetic, infrared segment, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wire segments, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, electrical wire, optical cable, RF, etc., or any suitable combination of the foregoing.
[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be deformed or modified in any way.
Claims
1. A distributed microcomputer relay protection method for a smart microgrid, characterized in that: The method comprises: S1. Obtain historical setting values and fault reports of the first type microcomputer relay protection device and the second type microcomputer relay protection device from the database; S2, detecting the main power grid, optimizing the setting value of the first type of microcomputer relay through the trained optimization model, and improving the speed of the microgrid switching to the island mode when the main power grid fails; S3, detecting the microgrid, optimizing the setting value 2 of the second type of microcomputer relay through the trained optimization model 2, and improving the speed of the microgrid being quickly disconnected from the main grid; S4, storing the optimized setting value 1, setting value 2 and log; The first type of microcomputer relay protection devices are a number of microcomputer relay protection devices connected to power-off sensitive loads; The second type of microcomputer relay protection devices are several microcomputer relay protection devices connecting the main power grid and the microgrid.
2. The distributed microcomputer relay protection method for the smart microgrid according to claim 1 is characterized in that: The historical setting values include the historical setting value 1 of the first type of microcomputer relay protection device and the historical setting value 2 of the second type of microcomputer relay protection device; The fault report includes one or more of fault type data, load type data, fault frequency data, and a relationship between a set value and a fault.
3. The distributed microcomputer relay protection method for the smart microgrid according to claim 1 is characterized in that: Before step S2, the method further includes the following steps: Construct optimization model 1: Select random forest algorithm to construct optimization model 1; Y1=RF(params); where params represents the parameters of optimization model 1; Eigenvalue extraction: The load type data is quantified by using one-hot encoding: X loadtype = one-hot-encoding(L), where L is the payload type, X loadtype One-hot encoding for the payload type; Calculate the failure frequency: Among them, M F is the number of failures, N is the total operating time; Extract the relationship characteristics between the setting value and the fault frequency: C = Correlation (S, M F ), where C is the correlation coefficient between the setting value and the number of faults, and S is the setting value; Select data from multiple time points in the fault report, including load type data, fault frequency data, and the relationship between the setting value and the fault, to form a historical data set. After quantifying the load type data, fault frequency data, and the relationship between the setting value and the fault, perform normalization processing to form a sample set. Training and optimizing the model: Divide the sample set into a training set and a test set; Use the training set to train the optimization model, and use the test set to evaluate the accuracy of the optimization model; When the fault type output by the optimized output model 1 is a power-off sensitive load, the optimized setting value 1 is optimized. The specific optimization steps are: T1′=T1(1-Δt1), where T1′, T1, and Δt1 are the optimized setting value 1, the setting value 1 before optimization, and the optimized variable 1, respectively.
4. The distributed microcomputer relay protection method for the smart microgrid according to claim 3 is characterized in that: The setting value 1 is the switching time of the first type of microcomputer relay protection device, and the setting value 2 is the disconnection time of the second type of microcomputer relay.
5. The distributed microcomputer relay protection method for the smart microgrid according to claim 4 is characterized in that: The main grid is detected, and the setting value of the first type of microcomputer relay is optimized by a trained optimization model. When a failure occurs in the main grid, the microgrid is switched to an island mode, including the following steps: The optimized setting value is sent to the first type of microcomputer relay, and the first type of microcomputer relay is actuated by the optimized setting value; The voltage peak value, voltage valley value and grid frequency of the main grid are sampled multiple times to determine whether the main grid has a fault and to feed back the main grid fault value Q; When the peak voltage value of the main grid is greater than the preset voltage upper threshold or the voltage valley value of the main grid is less than the voltage lower threshold, that is: U 峰 >U max Or U 谷 min , it means there is a problem with the voltage of the main power grid; When the grid frequency of the main grid is greater than the preset upper frequency threshold or less than the lower frequency threshold, that is, f s >f max or s <f min , it means that there is an imbalance between the power generation and load of the main power grid; When there is a problem with the grid voltage or an imbalance between power generation and load, Q is assigned a value of 1, otherwise it is assigned a value of 0; When Q=1, using the optimized setting value 1, the first type of microcomputer relay protection disconnects from the main power grid and switches to the island mode, including the following steps: According to the inverse time algorithm, the optimized setting value 1 is used to calculate the corresponding optimized preset current value, which is: Among them, TDS, I′ p , I, and C are the time constant, the optimized preset current value, the fault current value, and the slope of the inverse time curve respectively; The relationship between the optimized setting value 1 and the corresponding preset current value is: By modifying the original preset current value of the first type microcomputer relay protection device to I′ p , so that the first type of microcomputer relay protection uses the setting value one switching; When Q=0, the first type of microcomputer relay protection does not operate.
6. The distributed microcomputer relay protection method for the smart microgrid according to claim 4 is characterized in that: The microgrid detection is to detect the internal fault of the microgrid, which specifically includes the following steps: Acquire microgrid operation data to form a learning sample database, wherein the microgrid operation data includes voltage values, current values, and frequency values of the microgrid in normal and abnormal states; Set the network switching value Z, the initial value of Z is 0; Perform DWT transformation on the data in the learning sample database to extract time-frequency features; Construct a multi-layer restricted Boltzmann machine: stack multiple RBM layers to form a DBN. Each layer of RBM is responsible for extracting abstract features at different levels. The bottom layer RBM learns simple features, and the top layer RBM learns complex features. Through unsupervised learning, pre-training is performed using data in the learning sample database. Combine the pre-trained DBN with an artificial neural network, where the input of the ANN is the abstract features extracted by the DBN; Use the data of abnormal microgrid conditions in the learning sample database to fine-tune the entire DBN+ANN network in a supervised manner to optimize the DBN+ANN network's ability to identify specific fault types; After data preprocessing and DWT feature extraction, the real-time data of the microgrid collected in real time is input into the trained DBN+ANN network for fault detection and classification; When a fault occurs in the microgrid, Z is assigned a value of 1; The real-time data includes one or more of current, voltage, and frequency.
7. The distributed microcomputer relay protection method for the smart microgrid according to claim 1 is characterized in that: The effective supervision of fine-tuning of the entire DBN+ANN network includes: Through the back-propagation algorithm, the gradient of the loss function relative to the network parameters is calculated and the network parameters are updated; The loss function in are the true value and the model predicted value respectively; the network parameters are the weight matrix, bias vector and activation function parameters in DBN and ANN.
8. The distributed microcomputer relay protection method for the smart microgrid according to claim 1 is characterized in that: The step S3 also includes the following steps: Constructing optimization model 2: The optimization model 2 uses the random forest algorithm to construct an initial model, and the optimization model 2 is: Y2=RF(params′); wherein params′ represents the parameters of the optimization model 2; Training optimization model 2: Acquire microgrid historical data from a database, wherein the microgrid historical data includes voltage, current, and frequency under different fault levels and fault types; The microgrid historical data is transformed through DWT to extract fault characteristic values; Encode the fault type and fault level, specifically represented by a two-tuple (v, k), where v and k represent the fault type and fault level respectively; Input the fault feature value of the corresponding binary group into the optimization model 2 for training; The hyperparameters of model 2 are adjusted and optimized through the cross-validation algorithm; Use the trained optimization model 2 to predict the newly input microgrid data and identify the type and level of faults; The method of optimizing the setting value 2 of the second type of microcomputer relay by the trained optimization model 2 to improve the speed of rapid disconnection of the microgrid from the main grid includes the following steps: Input the optimized setting value 2 into the second type microcomputer relay protection device; Set the fault level threshold. When the fault level output by the optimization model 2 is greater than the fault level threshold, optimize the setting value 2. The specific optimization process is: When the setting value is adjusted to T2′=T2(1-Δt2), U, T, and Δt are respectively the output fault level of optimization model 2, fault level threshold, setting value 2 before optimization, and optimization variable 2; The second type of microcomputer relay protection uses the optimized setting value two, and when the microgrid fails, it separates the microgrid from the main grid.
9. The distributed microcomputer relay protection system of the smart microgrid is characterized by: The system is used to execute the distributed microcomputer relay protection method for the smart microgrid as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the distributed microcomputer relay protection method for the smart microgrid as described in any one of claims 1 to 8.
