Abnormality detection method and system based on energy storage system
By applying regular expressions and exception judgment rules in the energy storage system, abnormal information in the control log is automatically analyzed and extracted, and the problem of low abnormality checking efficiency of energy storage system is solved, rapid positioning and handling of abnormalities is achieved, and system operation efficiency is improved.
Patent Information
- Application Number
- CN202510032532.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-06-20
AI Technical Summary
The abnormality detection and analysis methods of existing energy storage systems are inefficient, resulting in analysis lag and is not conducive to rapid handling of abnormal problems.
Using a method based on regular expressions and exception judgment rules, the critical exception information in the energy storage system control log is automatically analyzed and extracted through programs to quickly identify the exception type and cause.
It realizes rapid analysis of the causes of abnormalities, reduces system downtime, improves operating efficiency, and solves the problems of low efficiency and time lag in the existing abnormality check process.
Smart Images

Figure CN120179442A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automatic control of energy storage systems, and particularly relates to an anomaly detection method and system based on an energy storage system. Background Art
[0002] The automatic generation control technology of energy storage systems refers to the automatic response to the active power control instructions issued by dispatching through devices such as communication systems, energy storage energy management systems, and energy storage bidirectional converters to ensure the frequency or power stability within a region. With the continuous development of the marketization of electrochemical energy storage, the current requirements for the functions and performance of energy storage energy management systems are also continuously increasing. They not only need to have functions such as monitoring, control, protection, and communication, but also for important functions such as active power response functions, they must also meet certain time indicators to meet the operating requirements of energy storage systems. Currently, most conventional energy storage energy management systems are software systems deployed on servers, and there may be abnormal situations in the control process during the daily operation of the system. The conventional method for troubleshooting and analysis is that system maintenance personnel analyze the system logs offline. Since the logs are generated in real time during the operation of the system, there are problems such as a large amount of information and complex information coupling relationships, which may lead to problems such as lag and inefficiency in analysis and are not conducive to the rapid analysis and processing of abnormal problems. Summary of the Invention
[0003] (1) Objectives of the Invention
[0004] The objective of the present invention is to provide an anomaly detection method and system based on an energy storage system. This method is based on regular expressions and anomaly judgment rules, and through program automatic analysis and extraction, it can effectively assist operation and maintenance personnel in quickly locating problems, reducing system downtime, and improving the overall operation efficiency.
[0005] (2) Technical Solutions
[0006] To solve the above problems, the first aspect of the present invention provides an anomaly detection method based on an energy storage system. The method is applied to the control log file of the energy storage system and includes:
[0007] Define the key anomaly information in the control log file;
[0008] Perform pattern matching on the control log file based on a preset regular expression, and automatically extract the key anomaly information in the control process; the pattern matching includes: matching the keyword string preset according to the regular expression with the key anomaly information in the control log text.
[0009] Analyze and judge the extracted key anomaly information using a preset anomaly judgment rule, and determine the corresponding anomaly type according to the judgment result.
[0010] Further, the abnormal types include: processing delay abnormality, control parameter refresh abnormality, and control precision parameter configuration abnormality, and corresponding abnormality judgment rules are set for each abnormal type.
[0011] Further, the key abnormal information of the processing delay abnormality includes a timestamp, and the analysis and judgment process is as follows:
[0012] According to the extracted timestamp information, calculate the time difference between the reception time of the issued instruction and the generation time of the AGC adjustment strategy;
[0013] If the time difference is greater than a first preset threshold, determine that the abnormal type is a processing delay abnormality.
[0014] Further, the key abnormal information of the control parameter refresh abnormality includes the actual output power and the actual power generation power, and the analysis and judgment process is as follows:
[0015] According to the extracted actual output power and actual power generation power information, calculate the difference between the actual output power and the actual power generation power as a second difference;
[0016] If the second difference is greater than a second preset threshold, determine that the abnormal type is a control parameter refresh abnormality.
[0017] Further, the key abnormal information of the control precision parameter configuration abnormality includes the target power, the actual power generation power, the rated power of the energy storage system, and the assessment accuracy, and the analysis and judgment process is as follows:
[0018] According to the extracted target power and actual power generation power, calculate the difference between the target power and the actual power generation power as a third difference; according to the extracted rated power of the energy storage system and the assessment accuracy, calculate the accuracy dead zone;
[0019] If the third difference is greater than the accuracy dead zone, determine that the abnormal type is a control precision parameter configuration abnormality.
[0020] Further, the method further includes generating an abnormal log of the abnormal type and storing it in an alarm record file.
[0021] Further, the first preset threshold is 45ms to 55ms, and the second preset threshold is 480kW to 520kW.
[0022] In addition, a second aspect of the present invention provides an abnormal detection system based on an energy storage system. The system is applied to the control log file of the energy storage system and includes:
[0023] A definition module for defining the key abnormal information in the control log file;
[0024] An extraction module, configured to perform pattern matching on a control log file based on a preset regular expression, and automatically extract key abnormal information during the control process;
[0025] An analysis and judgment module, configured to analyze and judge the extracted key abnormal information by using a preset abnormal judgment rule, and determine the corresponding abnormal type according to the judgment result.
[0026] Further, the key abnormal information of the processing process delay abnormality includes a timestamp, and the analysis and judgment module includes:
[0027] A first calculation unit, configured to calculate a time difference between the receiving time of a issued instruction and the generating time of an AGC adjustment strategy according to the extracted timestamp information;
[0028] A processing process delay abnormality judgment unit, configured to determine that the abnormal type is a processing process delay abnormality if the time difference is greater than a first preset threshold.
[0029] Further, the key abnormal information of the control parameter refresh abnormality includes an actual output power and an actual power generation power, and the analysis and judgment module includes:
[0030] A second calculation unit, configured to calculate a difference between the actual output power and the actual power generation power according to the extracted actual output power and actual power generation power information, as a second difference;
[0031] A control parameter refresh abnormality unit, configured to determine that the abnormal type is a control parameter refresh abnormality if the second difference is greater than a second preset threshold.
[0032] (III) Beneficial effects
[0033] The above technical solution of the present invention has the following beneficial technical effects: The present invention provides an abnormal detection method and system based on an energy storage system. This method performs pattern matching on a control log file through a regular expression, extracts key abnormal information such as timestamps, error codes, abnormal descriptions, etc., and then analyzes and judges the extracted key abnormal information by using a preset abnormal judgment rule to quickly identify the abnormal type and possible reasons. The present invention solves the problems of low efficiency and time lag in the existing manual offline analysis of logs during the abnormal troubleshooting process. By defining the key abnormal information in the control log, and then according to the designed regular expression and abnormal judgment rule, through automatic analysis and extraction by the program, it realizes quick analysis and positioning of the abnormal reason and improves the analysis efficiency. Description of the drawings
[0034] Figure 1 is a schematic flow chart of an abnormal detection method based on an energy storage system of the present invention;
[0035] Figure 2 It is the flowchart of the delay anomaly in the processing process of the embodiments of the present invention;
[0036] Figure 3 It is the flowchart of the anomaly of the control parameter refresh anomaly in the embodiments of the present invention;
[0037] Figure 4 It is the flowchart for identifying the anomaly of the control precision parameter configuration in the embodiments of the present invention;
[0038] Figure 5 Schematic diagram of the process of an anomaly detection system based on an energy storage system of the present invention;
[0039] Figure 6 Result graph of the program execution for the delay anomaly in the processing process of the embodiments of the present invention;
[0040] Figure 7 Result graph of the program for identifying the anomaly of the control parameter refresh in the embodiments of the present invention. Specific embodiments
[0041] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.
[0042] As Figure 1 shown, the first aspect of the present invention provides an anomaly detection method based on an energy storage system. The method is applied to the control log file of the energy storage system. Based on regular expressions, extraction of key information of log anomalies, and anomaly judgment rules, the method can quickly locate the cause of the anomaly in the automatic generation control process. It includes:
[0043] S1, defining the key information of anomalies in the control log file;
[0044] S2, performing pattern matching on the control log file based on a preset regular expression, and automatically extracting the key information of anomalies in the control process; the pattern matching includes: matching the keyword string preset according to the regular expression with the key information of the anomalies in the control log text. For example, matching the preset regular expression with the target power string in the control log;
[0045] S3, analyzing and judging the extracted key information of anomalies by using a preset anomaly judgment rule, and determining the corresponding anomaly type according to the judgment result. The anomaly types include: delay anomaly in the processing process, anomaly of control parameter refresh, and anomaly of control precision parameter configuration.
[0046] S4. Generate an exception log for the abnormal type and store it in the alarm record file. The three exception modules are printed separately. As long as an exception is detected, it will be printed and saved immediately for the convenience of operation and maintenance debugging personnel to view.
[0047] The automatic judgment processes for three typical abnormal types are as follows:
[0048] (1) Abnormal delay in the processing process
[0049] The key abnormal information for the abnormal delay in the processing process includes the timestamp. The analysis and judgment process for the extracted key abnormal information using the preset abnormal judgment rules is as follows:
[0050] According to the extracted timestamp information, calculate the time difference between the reception time of the issued instruction and the generation time of the AGC regulation strategy;
[0051] If the time difference is greater than the first preset threshold, determine that the abnormal type is an abnormal delay in the processing process. The first preset threshold is 45ms - 55ms, for example, 50s.
[0052] The following combines specific embodiments to introduce in detail the recognition of abnormal delay in the processing process. The process is as follows:
[0053] According to the system control usage requirements and the system print log content, define the description of the key abnormal information reflecting the abnormal delay in the processing process in the log as follows:
[0054] (1) The moment of receiving the remote regulation instruction: receiving the active power target value issued by the dispatcher;
[0055] (2) The moment of generating the AGC strategy: generating the AGC regulation strategy;
[0056] Design a regular expression for the information format of the control log as shown in Table 1, and then use the preset regular expression (determine the preset regular expression according to the control content) and the time difference calculation method to extract and calculate the time difference between "receiving the active power target value issued by the dispatcher" and "generating the AGC regulation strategy" from the log print information. For example, for a grid-connected energy storage system, a reasonable delay threshold (the first preset threshold) can be set to 50 milliseconds (the time difference parameter can be adjusted according to the actual control usage requirements on site). When the actual processing time difference is greater than the reasonable threshold, it is regarded as an abnormal processing process, print the abnormal information and store it in the alarm record log time_dely.log. The specific implementation logic block diagram is as Figure 2 shown.
[0057] Program design for the key information extraction part based on python:
[0058] Table 1 Program for the part of recognizing abnormal delay in the processing process implemented by python
[0059]
[0060] The content of the log for identifying the delay exception in the processing process is shown in Table 2, and the encoding format is gb2312.
[0061] Table 2 Example of the log for the delay exception in the processing process
[0062]
[0063] The execution result of the program for automatically analyzing and controlling the delay exception in the process is as Figure 6 shown. The time difference between "receiving the active power target value issued by the dispatching" and "generating the AGC regulation strategy" is 74 milliseconds, which is greater than the first preset threshold of 50 milliseconds. Then, it is regarded as a delay exception in the processing process, and the exception information is printed and stored in the alarm record log time_dely.log.
[0064] (2) Abnormality of the control parameter refresh
[0065] The key information of the abnormality of the control parameter refresh includes the actual output power and the actual power generation. The process of analyzing and judging the extracted key information of the abnormality by using the preset abnormality judgment rule is as follows:
[0066] According to the extracted information of the actual output power and the actual power generation, calculate the difference between the actual output power and the actual power generation as the second difference.
[0067] If the second difference is greater than the second preset threshold, it is determined that the abnormality type is the control parameter refresh abnormality. The second preset threshold is 480kW - 520kW, for example, 500kW.
[0068] The following combines specific embodiments to introduce in detail the identification of the control parameter refresh abnormality, and the process is as follows:
[0069] The key information in the log for identifying the control parameter refresh abnormality is "actual output P (actual output power)" and "actual power generation P (actual power generation)". The regular expression design is shown in Table 3. Extract and calculate the difference (the second difference) between the actual output P and the actual power generation P according to the power information printed in the log. According to the engineering practice experience, for the grid-connected energy storage system, the reasonable power deviation threshold (the second preset threshold) is set to 500kW. When the second difference is greater than the reasonable power deviation threshold, it is regarded as the control parameter refresh abnormality, and the abnormality information is printed and stored in the alarm record log data_refresh.log. The specific implementation logic block diagram is as Figure 3 shown.
[0070] Table 3 Part of the program for identifying the control parameter refresh abnormality implemented in Python
[0071]
[0072]
[0073] The content of the control parameter refresh exception recognition log is shown in Table 4, and the encoding format is gb2312.
[0074] Table 4 Control Parameter Refresh Exception Recognition Log
[0075]
[0076] The result generated by the program execution is as Figure 7 shown. Figure 7 In it, the second difference is approximately 1493.4 kW. If the second difference is greater than the second preset threshold of 500 kW, it is regarded as an abnormal control parameter refresh. Print the abnormal information and store it in the alarm record log data_refresh.log.
[0077] (3) Abnormal Configuration of Control Precision Parameters
[0078] The abnormal key information of the abnormal configuration of the control precision parameters includes the target power, the actual power generation, the rated power of the energy storage system, and the assessment accuracy. The process of analyzing and judging the extracted abnormal key information using the preset abnormal judgment rules is as follows:
[0079] According to the extracted target power and actual power generation, calculate the difference between the target power and the actual power generation as the third difference; according to the extracted rated power of the energy storage system and the assessment accuracy, calculate the accuracy dead zone;
[0080] If the third difference is greater than the accuracy dead zone, determine that the abnormal type is an abnormal configuration of control precision parameters.
[0081] The abnormal key information of the control log for the abnormal recognition of the control precision parameter configuration is "target power P", "actual power generation P (actual power generation)", "rated power of the energy storage system P", and "assessment accuracy (%)". Extract and automatically calculate the difference (the third difference) between the actual power generation P and the target power P according to the power information printed in the log. At the same time, calculate the product result of the set rated power of the energy storage system P and the assessment accuracy (%) (the assessment accuracy parameter can be set according to the actual use requirements on site), that is, the allowable accuracy dead zone (accuracy dead zone). If the third difference is greater than the accuracy dead zone, it is regarded as abnormal. Print the abnormal information and store it in the alarm record log precision_parameter.log. The specific implementation logic block diagram is as Figure 4 shown.
[0082] In addition, as Figure 5As shown in the figure, the second aspect of the present invention provides an abnormal detection system based on an energy storage system. The system is applied to the control log file of the energy storage system and includes:
[0083] A definition module 21 for defining the abnormal key information in the control log file;
[0084] An extraction module 22 for performing pattern matching on the control log file based on a preset regular expression and automatically extracting the abnormal key information during the control process;
[0085] An analysis and judgment module 23 for analyzing and judging the extracted abnormal key information by using a preset abnormal judgment rule, and determining the corresponding abnormal type according to the judgment result. The abnormal types include: abnormal delay in the processing process, abnormal refresh of control parameters, and abnormal configuration of control precision parameters.
[0086] A storage module 24 for generating an abnormal log from the abnormal type and storing it in the alarm record file.
[0087] Further, the abnormal key information of the abnormal delay in the processing process includes a timestamp. The analysis and judgment module 23 includes:
[0088] A first calculation unit 231 for calculating the time difference between the reception time of the issued instruction and the generation time of the AGC adjustment strategy according to the extracted timestamp information;
[0089] An abnormal delay in the processing process judgment unit 232 for determining that the abnormal type is an abnormal delay in the processing process if the time difference is greater than a first preset threshold.
[0090] Further, the abnormal key information of the abnormal refresh of control parameters includes the actual output power and the actual power generation. The analysis and judgment module 23 further includes:
[0091] A second calculation unit 233 for calculating the difference between the actual output power and the actual power generation according to the extracted actual output power and actual power generation information as a second difference;
[0092] An abnormal refresh of control parameters unit 234 for determining that the abnormal type is an abnormal refresh of control parameters if the second difference is greater than a second preset threshold.
[0093] Further, the abnormal key information of the abnormal configuration of control precision parameters includes the target power, the actual power generation, the rated power of the energy storage system, and the assessment accuracy. The analysis and judgment process 23 further includes:
[0094] A third calculation unit 235, configured to calculate a difference between the target power and the actual power generation according to the extracted target power and the actual power generation as a third difference; calculate a precision dead zone according to the extracted rated power of the energy storage system and the assessment accuracy.
[0095] A control precision parameter configuration anomaly unit 236, configured to determine that the anomaly type is a control precision parameter configuration anomaly if the third difference is greater than the precision dead zone.
[0096] The method provides an anomaly detection method and system based on an energy storage system. The method performs pattern matching on a log file through a regular expression to extract key information such as timestamps, error codes, anomaly descriptions, etc. Then, the extracted information is analyzed using a preset rule library to identify the anomaly type and possible causes. In the identification of processing delay anomalies, the system will record the records that exceed the set delay threshold according to the set delay threshold for further analysis. The identification of control parameter refresh anomalies focuses on the consistency of parameter updates to ensure that power parameters can be updated in a timely and accurate manner. Finally, the identification of control precision parameter configuration anomalies will check whether the parameter settings are within the allowable error range to ensure the accuracy of the control system. By setting these steps, the present invention can effectively assist operation and maintenance personnel in quickly locating problems, reducing system downtime, and improving the overall operation efficiency.
[0097] It should be understood that the above specific embodiments of the present invention are only used for exemplary illustration or explanation of the principles of the present invention, and do not constitute a limitation to the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention shall be included within the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries. The present invention has been described above with reference to the embodiments of the present invention. For those of ordinary skill in the art, other different forms of changes or variations can be made on the basis of the above description. It is not necessary and impossible to enumerate all the embodiments here. And the obvious changes or variations derived therefrom are still within the protection scope of the present invention. Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes. The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the flow in Figure 1 one flow or multiple flows and / or blocks Figure 1The functions specified in one or more boxes. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Those of ordinary skill in the art can understand that all or part of the steps in implementing the method of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, it includes the processes of the embodiments of the above various methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM for short), a random access memory (RAM for short), etc. The steps in the method of the embodiments of the present invention can be adjusted, combined, and deleted according to actual needs. The module units in the system terminal or device of the embodiments of the present invention can be combined, divided, and deleted according to actual needs.
Claims
1. An abnormality detection method based on an energy storage system, characterized in that: The method is applied to a control log file of an energy storage system, comprising: Define the abnormal key information in the control log file; Perform pattern matching on control log files based on preset regular expressions and automatically extract abnormal key information in the control process; The extracted abnormal key information is analyzed and judged using the preset abnormal judgment rules, and the corresponding abnormal type is determined according to the judgment results.
2. The abnormality detection method based on the energy storage system according to claim 1 is characterized in that: The abnormality types include: processing delay abnormality, control parameter refresh abnormality and control precision parameter configuration abnormality.
3. The abnormality detection method based on the energy storage system according to claim 2 is characterized in that: The abnormal key information timestamp of the abnormal delay in the processing process is analyzed and judged as follows: According to the extracted timestamp information, the time difference between the reception time of the issued instruction and the generation time of the AGC adjustment strategy is calculated; If the time difference is greater than a first preset threshold, it is determined that the abnormality type is a processing delay abnormality.
4. The abnormality detection method based on the energy storage system according to claim 2 is characterized in that: The abnormal key information of the control parameter refresh abnormality includes the actual output power and the actual generated power. The analysis and judgment process is as follows: Calculate the difference between the actual output power and the actual generated power according to the extracted actual output power and actual generated power information as a second difference; If the second difference is greater than a second preset threshold, it is determined that the abnormality type is a control parameter refresh abnormality.
5. The abnormality detection method based on the energy storage system according to claim 2 is characterized in that: The abnormal key information of the abnormal control accuracy parameter configuration includes target power, actual power generation, energy storage system rated power and assessment accuracy. The analysis and judgment process is as follows: According to the extracted target power and the actual power generation, the difference between the target power and the actual power generation is calculated as the third difference; according to the extracted energy storage system rated power and the assessment accuracy, the accuracy dead zone is calculated; If the third difference is greater than the accuracy dead zone, it is determined that the abnormality type is a control accuracy parameter configuration abnormality.
6. The abnormality detection method based on energy storage system according to claim 1, characterized in that: The method further comprises generating an exception log for the exception type and storing the log in an alarm record file.
7. The abnormality detection method based on the energy storage system according to claim 4 is characterized in that: The first preset threshold is 45ms-55ms, and the second preset threshold is 480kW-520kW.
8. An abnormality detection system based on an energy storage system, characterized in that: The system is applied to the control log file of the energy storage system, including: Definition module, used to define abnormal key information in control log files; The extraction module is used to perform pattern matching on the control log file based on a preset regular expression and automatically extract abnormal key information in the control process; The analysis and judgment module is used to analyze and judge the extracted abnormal key information using the preset abnormal judgment rules, and determine the corresponding abnormal type according to the judgment result.
9. The abnormality detection system based on the energy storage system according to claim 8, characterized in that: The abnormal key information of the abnormal delay in the processing process includes a timestamp, and the analysis and judgment module includes: A first calculation unit, used to calculate the time difference between the reception time of the issued instruction and the generation time of the AGC adjustment strategy according to the extracted timestamp information; The processing delay exception judgment unit is used to determine the exception type as a processing delay exception if the time difference is greater than a first preset threshold.
10. The abnormality detection system based on the energy storage system according to claim 8, characterized in that: The abnormal key information of the control parameter refresh abnormality includes the actual output power and the actual generated power, and the analysis and judgment module also includes: A second calculation unit, used to calculate the difference between the actual output power and the actual generated power according to the extracted actual output power and actual generated power information as a second difference; The control parameter refresh exception unit is used to determine that the exception type is a control parameter refresh exception if the second difference is greater than a second preset threshold.