Control method and system for anti-misjudgment five-prevention system and medium
By optimizing the performance of the SVM model, using RBF kernel functions and five-defense logic rules to generate training data sets, the problem of strong passivity of the abnormal detection method of intelligent substations is solved, the accuracy of abnormal detection is improved, and the accurate prediction of extreme data is ensured. .
Patent Information
- Application Number
- CN202411772202.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional intelligent substation abnormality detection methods are highly passive and cannot accurately predict extreme data, resulting in a decrease in the accuracy of abnormality detection.
The optimized SVM model is adopted, and the training data set is generated using RBF kernel function and five-defense logic rules. The kernel function width and penalty parameter C are adjusted through cross-validation to optimize the model performance to improve the accuracy of abnormal detection.
By optimizing the performance of the SVM model, it is possible to more accurately identify and predict equipment or system failures, improve the accuracy of abnormal detection of smart substation equipment, and ensure the accuracy of detection through cross-verification.
Smart Images

Figure CN119226910A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of abnormality detection of substations, and in particular to a control method, system and medium for a five-defense system to prevent misjudgment. Background Art
[0002] Anomaly detection of smart substation equipment is a key technology that is of great significance in identifying and predicting equipment or system failures.
[0003] Traditional anomaly detection methods are usually passive, triggering alerts only when indicators exceed preset thresholds or deviate significantly from historical data. However, this approach may not accurately predict extreme data, thus reducing the accuracy of anomaly detection. Summary of the invention
[0004] This application is to solve the above problems, and aims to provide a control method, system and medium for preventing misjudgment of the five-defense system, by using the optimized SVM model to judge the five-defense logic rules for new input data and output the judgment result, thereby improving the accuracy of abnormal detection of smart substation equipment. In order to achieve the above purpose, this application adopts the following scheme: The present application provides a control method for a five-defense system to prevent misjudgment, and the control method for the five-defense system to prevent misjudgment includes the following steps: Step 1: Use the RBF kernel function as the kernel function of SVM, where the expression of the RBF kernel function is: , where x and z are the input vectors, ||xz|| is the Euclidean distance between vectors x and z, is the RBF kernel function width; Step 2: Generate the corresponding training data set according to the system's five-defense logic rules, including normal input-output pairs and abnormal input-output pairs; Step 3: Use the training data set to train the SVM model, wherein the parameters of the SVM model include the penalty parameter C, the kernel function width And the kernel function type; Step 4: Cross-validate the trained SVM model to evaluate the performance of the model, including accuracy and recall; Step 5: According to the results of cross-validation, adjust the RBF kernel function width , to optimize the performance of the SVM model; Step 6: Use the optimized SVM model to judge the new input data according to the five-defense logic rules and output the judgment results.
[0005] Further, the RBF kernel function width is adjusted , including: Set a parameter search range, including minimum and maximum values; Generate multiple value; Use each The SVM model is trained and cross-validated. Select the one with the smallest cross validation error The value is used as the final parameter value.
[0006] Furthermore, within the parameter search range, multiple Values, including: Use the random search method to generate multiple value.
[0007] Furthermore, using each The SVM model is trained and cross-validated, including: Using Bayesian methods to combine prior knowledge and data, calculate The posterior distribution of .
[0008] from The final parameter value is drawn from the posterior distribution of .
[0009] Furthermore, using each After the steps of training the SVM model and performing cross-validation, the control method of the five-defense system against misjudgment includes: Use the optimization algorithm to minimize the training error and regularization term of the SVM model to obtain the optimal value.
[0010] Furthermore, the setting of the penalty parameter C of the SVM model specifically includes: According to the system's five-defense logic rules and the characteristics of the training data set, the search range of the penalty parameter C is preset; Within the search range of the penalty parameter C, multiple C values are generated with a certain step size; Use each C value to train the SVM model and perform cross-validation; The C value with the smallest cross-validation error is selected as the final penalty parameter value.
[0011] Furthermore, the indicator deviation sequence of the SVM model The following relations are satisfied: ,in Indicates The C value is The prediction results of the indicators With real indicators The deviation The last real indicator.
[0012] The present application also provides a control system for the five-defense system for preventing misjudgment, the control system comprising: The function determination module is configured to use the RBF kernel function as the kernel function of the SVM, where the expression of the RBF kernel function is: , where x and z are the input vectors, ||xz|| is the Euclidean distance between vectors x and z, is the RBF kernel function width; A generation module is configured to generate corresponding training data sets according to the five-defense logic rules of the system, including normal input-output pairs and abnormal input-output pairs; The parameter training module is configured to train the SVM model using the training data set, wherein the parameters of the SVM model include the penalty parameter C, the kernel function width And the kernel function type; The cross-validation module is configured to perform cross-validation on the trained SVM model and evaluate the performance of the model, including accuracy and recall; The optimization module is configured to adjust the RBF kernel function width according to the cross-validation result. , to optimize the performance of the SVM model; The output judgment module is configured to use the optimized SVM model to judge the new input data according to the five-defense logic rules and output the judgment result.
[0013] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements a control method for a five-defense system to prevent misjudgment as described in any one of the above items.
[0014] Compared with the prior art, the present invention has the following beneficial effects: This application uses the RBF kernel function as the kernel function of the SVM and generates a training data set according to the five-defense logic rules of the system, which can effectively improve the accuracy of anomaly detection of smart substation equipment. Traditional anomaly detection methods have certain limitations and cannot accurately predict extreme data, resulting in reduced accuracy of anomaly detection. However, this application adjusts the RBF kernel function width and optimizes the performance of the SVM model, which can more accurately identify and predict equipment or system failures, thereby improving the accuracy of anomaly detection. In addition, by cross-validating the trained SVM model and evaluating the performance of the model, the accuracy of anomaly detection can be further ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 It is a flow chart of the control method of the five-defense system for preventing misjudgment involved in the embodiment of the present application. DETAILED DESCRIPTION
[0017] The specific implementation methods of the present application are described in detail below with reference to the accompanying drawings.
[0018] It should be noted that, in the absence of conflict, the embodiments and technical features in the embodiments of the present application can be combined with each other, and the detailed description in the specific implementation method should be understood as an explanation of the purpose of the present application and should not be regarded as an improper limitation on the present application.
[0019] It should be understood that the orientation or position relationship is based on the orientation or position relationship shown in the drawings. These orientation terms are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application.
[0020] Fault analysis technology for smart substation equipment is a key technology that is of great significance in identifying and predicting equipment or system failures. The effective implementation of this technology requires multiple steps, from abnormality detection to fault diagnosis and then to fault prediction. The following is a brief introduction to these steps: Anomaly detection: First, the various indicators of the equipment or system need to be monitored and detected to determine whether they are abnormal. These indicators may cover parameters such as temperature, pressure, current, voltage, etc. Anomalies can be indicators exceeding the preset threshold or showing significant deviations compared with historical data.
[0021] Feature extraction: Once an anomaly is found, the next step is to extract features from these abnormal indicators. These features may include statistics such as the mean, variance, and rate of change of the indicator, or more complex features such as spectral features, time-frequency features, etc.
[0022] Model training: The extracted features will be used as input to train the machine learning model. Here, one of the commonly used methods is the support vector machine (SVM), which is a supervised learning algorithm used for classification and regression analysis. The SVM model can detect anomalies in new data by learning the characteristic patterns under normal operating conditions.
[0023] Fault diagnosis: The trained model can be used to classify new data to determine whether the device or system is in a normal state or has a fault. If the model identifies certain features that match known failure modes, further fault diagnosis and treatment can be performed.
[0024] Through the above steps, fault analysis technology can help detect potential faults of smart substation equipment in advance and take corresponding maintenance or repair measures to ensure its normal operation and reliability.
[0025] However, existing anomaly detection methods are usually passive and can only trigger alerts when indicators exceed preset thresholds or show significant deviations compared with historical data.
[0026] In view of this, the present application embodiment proposes a control method for preventing misjudgment of the five-defense system. Figure 1 : is a flow chart of a control method of a five-defense system for preventing misjudgment according to an embodiment of the present application, such as Figure 1 As shown, the control method of the five-defense system for preventing misjudgment includes the following steps: Step 1: Use the RBF kernel function as the kernel function of SVM, where the expression of the RBF kernel function is: , where x and z are the input vectors, ||xz|| is the Euclidean distance between vectors x and z, is the RBF kernel function width; Step 2: Generate the corresponding training data set according to the system's five-defense logic rules, including normal input-output pairs and abnormal input-output pairs; Step 3: Use the training data set to train the SVM model, wherein the parameters of the SVM model include the penalty parameter C, the kernel function width And the kernel function type; Step 4: Cross-validate the trained SVM model to evaluate the performance of the model, including accuracy and recall; Step 5: According to the results of cross-validation, adjust the RBF kernel function width , to optimize the performance of the SVM model; Step 6: Use the optimized SVM model to judge the new input data according to the five-defense logic rules and output the judgment results.
[0027] Specifically, in the data preparation stage, data on normal and abnormal working conditions are collected from smart substation equipment, including parameters such as current, voltage, and power. According to the five-defense logic rules, these data are marked as normal or abnormal to form a training data set. In the model selection and training stage, the support vector machine (SVM) is selected as the classification model because it has shown good performance in the field of anomaly detection. The RBF (radial basis function) kernel function is determined as the kernel function of the SVM because it can effectively handle nonlinear problems. The SVM model is trained using the training data set, and the penalty parameter C and the width of the RBF kernel function are adjusted to optimize the model performance. In the cross-validation stage, the training data set is divided into a training set and a validation set. The SVM model is trained using the training set, and then the model performance is evaluated using the validation set. The evaluation indicators include accuracy, recall, etc. to ensure that the model has good generalization ability. In the performance optimization stage, according to the results of cross-validation, the width of the RBF kernel function is adjusted to further improve the performance of the SVM model, and the optimal parameter configuration is automatically found through methods such as grid search. In the real-time monitoring and judgment stage, the optimized SVM model is used to monitor the smart substation equipment in real time and judge the input data according to the five-defense logic rules. When an abnormal situation is detected, the system will trigger an alarm and promptly notify the operation and maintenance personnel to take measures. In particular, the system can self-learn and adjust according to the actual abnormal detection results, and regularly update the training data set and model parameters to adapt to changes in the status of substation equipment.
[0028] By using the RBF kernel function as the kernel function of the SVM and generating a training data set according to the system's five-defense logic rules, the accuracy of anomaly detection in smart substation equipment can be effectively improved. Traditional anomaly detection methods have certain limitations and cannot accurately predict extreme data, resulting in reduced accuracy in anomaly detection. However, this application adjusts the RBF kernel function width and optimizes the performance of the SVM model, which can more accurately identify and predict equipment or system failures, thereby improving the accuracy of anomaly detection. In addition, by cross-validating the trained SVM model and evaluating the performance of the model, the accuracy of anomaly detection can be further ensured.
[0029] In some embodiments, the RBF kernel function width is adjusted , including: Set a parameter search range, including minimum and maximum values; Generate multiple value; Use each The SVM model is trained and cross-validated. Select the one with the smallest cross validation error The value is used as the final parameter value.
[0030] Specifically, when setting parameters, determine the parameter search range for adjusting the width of the RBF kernel function, set the minimum and maximum values, for example, if the current RBF width parameter range is [a, b], the minimum value can be a-ε, and the maximum value can be b+ε, where ε is a small positive number to ensure the validity of the search range. Within the set search range, generate multiple parameter values with a set step size. For example, if the step size is Δ, n parameter values can be generated within the search range, and these values can be expressed as a+iΔ, where i ranges from 0 to n-1. Model training and validation, use each generated parameter value to train the SVM model, and use the trained model for cross-validation to evaluate the performance of the model. Cross-validation usually includes dividing the data set into a training set and a validation set, then using the training set to train the model, and evaluating the model performance on the validation set. For each parameter value, calculate the cross-validation error, and you can use a mean square error (MSE) or other appropriate error metrics.
[0031] In some embodiments, multiple parameters are generated with a set step size within the parameter search range. values, including: using random search method to generate multiple value.
[0032] Specifically, in the step size setting, an appropriate step size Δ is set to generate multiple values within the parameter search range. The step size Δ can be selected based on experience or determined by a certain optimization method, for example, by random search, using a random search method to generate multiple values within the parameter search range. Random search can ensure that the generation of parameter values is random and uniform, thereby improving the efficiency and diversity of the search. In particular, the generation of parameter values uses a random number generator to generate multiple parameter values according to the set minimum value, maximum value and step size. For example, the randint function in the random library of Python can be used to generate parameter values, and each generated parameter value is used to train the SVM model.
[0033] In some embodiments, using each The SVM model is trained and cross-validated, including: Using Bayesian methods to combine prior knowledge and data, calculate The posterior distribution of .
[0034] from The final parameter value is drawn from the posterior distribution of .
[0035] Specifically, in order to implement the process of training the SVM model using each value and performing cross-validation, the following specific steps are followed. In the calculation of the posterior distribution, the posterior distribution of the RBF kernel function width parameter is calculated using the Bayesian method combined with prior knowledge and data. Prior knowledge can come from historical data, expert experience or other information sources. The posterior distribution can be expressed as a probability distribution of parameter values, which integrates prior knowledge and data information. In the process of extracting the posterior distribution, samples are extracted from the calculated posterior distribution as the final parameter value. The extraction can be performed by random sampling or other appropriate statistical methods. The extracted samples should conform to the probability characteristics of the posterior distribution to ensure that the selection of parameter values is reasonable.
[0036] In some embodiments, using each After the steps of training the SVM model and performing cross-validation, the control method of the five-defense system against misjudgment includes: Use the optimization algorithm to minimize the training error and regularization term of the SVM model to obtain the optimal value.
[0037] Specifically, when selecting an optimization algorithm, an optimization algorithm is determined to minimize the training error and regularization term of the SVM model. For example, commonly used optimization algorithms include gradient descent, Newton's method, conjugate gradient method, etc.
[0038] Secondly, define the objective function and combine the training error and regularization term of the SVM model into an objective function. The objective function usually contains two items, one is the part used to measure the prediction error of the model, and the other is the regularization term, which is used to prevent the model from overfitting. Use the selected optimization algorithm to minimize the objective function. During the optimization process, the algorithm will adjust the parameters of the SVM model to find the minimum value of the objective function. Once the optimization algorithm finds the minimum value of the objective function, this value will be used as the optimal parameter value, and the SVM model will be retrained using this optimal parameter value.
[0039] In some embodiments, the setting of the penalty parameter C of the SVM model specifically includes: According to the system's five-defense logic rules and the characteristics of the training data set, the search range of the penalty parameter C is preset; Within the search range of the penalty parameter C, multiple C values are generated with a certain step size; Use each C value to train the SVM model and perform cross-validation; The C value with the smallest cross-validation error is selected as the final penalty parameter value.
[0040] Specifically, the search range is preset first, the five-defense logic rules of the smart substation equipment and the characteristics of the training data set are analyzed, and according to the analysis results, the search range of the penalty parameter C is preset, including the minimum and maximum values. For example, the search range of C can be set to [C_min, C_max]. Within the preset search range, multiple C values are generated with a certain step size. For example, if the step size is ΔC, n C values can be generated within the search range, and these values can be expressed as C_min+iΔC, where i ranges from 0 to n-1. Model training and validation: Use each generated C value to train the SVM model, and use the trained model for cross-validation to evaluate the performance of the model. Cross-validation usually includes dividing the data set into a training set and a validation set, then using the training set to train the model, and evaluating the model performance on the validation set. For each C value, the cross-validation error is calculated, and the C value with the smallest cross-validation error can be selected as the final penalty parameter value using error metrics such as mean square error (MSE) or other appropriate error metrics.
[0041] In some embodiments, the indicator deviation sequence of the SVM model The following relations are satisfied: ,in Indicates The C value is The prediction results of the indicators With real indicators The deviation The last real indicator.
[0042] The present application also provides a control system for the five-defense system for preventing misjudgment, the control system comprising: The function determination module is configured to use the RBF kernel function as the kernel function of the SVM, where the expression of the RBF kernel function is: , where x and z are the input vectors, ||xz|| is the Euclidean distance between vectors x and z, is the RBF kernel function width; A generation module is configured to generate corresponding training data sets according to the five-defense logic rules of the system, including normal input-output pairs and abnormal input-output pairs; The parameter training module is configured to train the SVM model using the training data set, wherein the parameters of the SVM model include the penalty parameter C, the kernel function width And the kernel function type; The cross-validation module is configured to perform cross-validation on the trained SVM model and evaluate the performance of the model, including accuracy and recall; The optimization module is configured to adjust the RBF kernel function width according to the cross-validation result. , to optimize the performance of the SVM model; The output judgment module is configured to use the optimized SVM model to judge the new input data according to the five-defense logic rules and output the judgment result.
[0043] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements a control method for a five-defense system to prevent misjudgment as described in any one of the above items.
[0044] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the same. Although the present application has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions claimed to be protected by the present application.
Claims
1. A control method for preventing misjudgment of five-defense system, characterized in that: The control method of the five-prevention system for preventing misjudgment comprises the following steps: Step 1: Use the RBF kernel function as the kernel function of SVM, where the expression of the RBF kernel function is: , where x and z are the input vectors, ||xz|| is the Euclidean distance between vectors x and z, is the RBF kernel function width; Step 2: Generate the corresponding training data set according to the system's five-defense logic rules, including normal input-output pairs and abnormal input-output pairs; Step 3: Use the training data set to train the SVM model, where the parameters of the SVM model include the penalty parameter C, the kernel function width And the kernel function type; Step 4: Cross-validate the trained SVM model to evaluate the performance of the model, including accuracy and recall; Step 5: According to the results of cross-validation, adjust the RBF kernel function width , to optimize the performance of the SVM model; Step 6: Use the optimized SVM model to judge the new input data according to the five-defense logic rules and output the judgment results.
2. The control method of the five-defense system for preventing misjudgment according to claim 1 is characterized in that: Adjust the RBF kernel function width , including: Set a parameter search range, including minimum and maximum values; Generate multiple value; Use each The SVM model is trained and cross-validated. Select the one with the smallest cross validation error The value is used as the final parameter value.
3. The control method of the five-defense system for preventing misjudgment according to claim 2 is characterized in that: Generate multiple Values, including: Use the random search method to generate multiple value.
4. The control method of the five-defense system for preventing misjudgment according to claim 2 is characterized in that: Use each The SVM model is trained and cross-validated, including: Using Bayesian methods to combine prior knowledge and data, we can calculate The posterior distribution of from The final parameter value is drawn from the posterior distribution of .
5. The control method of the five-defense system for preventing misjudgment according to claim 1 is characterized in that: Use each After the steps of training the SVM model and performing cross-validation, the control method of the five-defense system against misjudgment includes: Use the optimization algorithm to minimize the training error and regularization term of the SVM model to obtain the optimal value.
6. The control method of the five-defense system for preventing misjudgment according to claim 1 is characterized in that: The setting of the penalty parameter C of the SVM model specifically includes: According to the system's five-defense logic rules and the characteristics of the training data set, the search range of the penalty parameter C is preset; Within the search range of the penalty parameter C, multiple C values are generated with a certain step size; Use each C value to train the SVM model and perform cross-validation; The C value with the smallest cross-validation error is selected as the final penalty parameter value.
7. The control method of the five-defense system for preventing misjudgment according to claim 6 is characterized in that: The indicator deviation sequence of the SVM model The following relations are satisfied: ,in Indicates The C value is The prediction results of the indicators With real indicators The deviation The last real indicator.
8. A control system for preventing misjudgment of five defense systems, characterized in that: The control system comprises: The function determination module is configured to use the RBF kernel function as the kernel function of the SVM, where the expression of the RBF kernel function is: , where x and z are the input vectors, ||xz|| is the Euclidean distance between vectors x and z, is the RBF kernel function width; A generation module is configured to generate corresponding training data sets according to the five-defense logic rules of the system, including normal input-output pairs and abnormal input-output pairs; The parameter training module is configured to train the SVM model using the training data set, wherein the parameters of the SVM model include the penalty parameter C, the kernel function width And the kernel function type; The cross-validation module is configured to perform cross-validation on the trained SVM model and evaluate the performance of the model, including accuracy and recall; The optimization module is configured to adjust the RBF kernel function width according to the cross-validation result. , to optimize the performance of the SVM model; The output judgment module is configured to use the optimized SVM model to judge the new input data according to the five-defense logic rules and output the judgment result.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements a control method for a five-defense system against misjudgment as described in any one of claims 1 to 7.
