Fault recording method and device, inverter and energy storage equipment

By controlling the write position pointer to increase and determine the remaining recording space during the interrupt control period of the power grid equipment, and storing data to external media when the remaining space is insufficient, the problem of how the power grid equipment can efficiently and reliably record the operating data before and after the fault occurs, and a fast and accurate fault analysis is achieved.

CN120352710APending Publication Date: 2025-07-22GONEO GRP CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510412632.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

It is difficult for the prior art to efficiently and accurately record important data before and after power grid equipment failure in limited storage space for subsequent analysis and diagnosis.

Method used

When the number of executions of the interrupt control cycle reaches the fault recording condition and the timestamp information is received, the write position pointer in the temporary fault buffer is controlled to increase the index number by itself, and the remaining recording space is determined based on the index number of the write and start position pointer, and when the remaining space is less than the preset data amount, the fault recording data is stored through an external storage medium.

Benefits of technology

It realizes efficient and reliable recording of data at the moment before and after the failure, ensures data integrity and real-time, and quickly and effectively traces, locates and solves problems, providing important fault analysis guidance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120352710A_ABST
    Figure CN120352710A_ABST
Patent Text Reader

Abstract

The invention discloses a fault recording method and device, an inverter and energy storage equipment, and the fault recording method comprises the steps: controlling a write-in position pointer in a temporary fault buffer area to carry out index number self-increasing in a fault recording process when the execution frequency of an interruption control period reaches a fault recording condition and timestamp information is received, determining a residual wave recording space according to the current write-in index number and the current initial index number of the initial position pointer; and when the target equipment has a fault and the residual wave recording space is smaller than a first preset data volume, stopping fault wave recording, and storing the fault wave recording data through an external storage medium. Through the mode, the operation data of the target equipment in each interruption control period is refreshed in the temporary fault buffer area, and the index numbers of the storage data points are continuously updated, so that the data before and after the fault are efficiently and reliably recorded, and the fault analysis is quickly and effectively carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of simulation technology, and particularly to a fault recording method, apparatus, inverter, and energy storage device. Background Art

[0002] Under the background of the rapid development of current power electronics technology, the types of power converters are increasing day by day, especially the conversion technology between alternating current and direct current has become more efficient and diversified. With the popularization of microgrid systems, their internal structures usually include two parts: an AC bus and a DC bus to adapt to different types of power generation units (such as photovoltaic, wind power generation, etc.) and load requirements. However, in practical applications, PCS (Power Conversion System, energy storage converter) and other key components need to handle complex energy conversion tasks and must ensure stable operation under abnormal conditions such as grid faults or load mutations. The main challenge faced by existing technologies is how to efficiently and accurately record important data before and after faults in limited storage space for subsequent analysis and diagnosis.

[0003] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a fault recording method, apparatus, inverter, and energy storage device, aiming to solve the technical problem of how to efficiently and reliably record the operation data before and after a fault occurs in grid equipment.

[0005] To achieve the above object, this application proposes a fault recording method, and the method includes:

[0006] In response to a fault recording instruction for a target device, when the number of executions of the interrupt control cycle reaches the fault recording condition and timestamp information is received, control the write position pointer in the temporary fault buffer to increment the index number during the fault recording process;

[0007] Determine the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer;

[0008] When a fault exists in the target device and the remaining recording space is less than a first preset data volume, stop fault recording and store the fault recording data corresponding to the fault through an external storage medium.

[0009] In one embodiment, the step of determining the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer includes:

[0010] Determine the position comparison relationship between the write position pointer and the start position pointer according to the current write serial number of the write position pointer and the current start serial number of the start position pointer in the temporary fault buffer;

[0011] When the position comparison relationship is the first comparison relationship, perform space calculation according to the current write serial number and the current start serial number to determine the remaining recording space of the temporary fault buffer;

[0012] When the position comparison relationship is the second comparison relationship, perform space calculation according to the buffer recording space of the temporary fault buffer, the current write serial number, and the current start serial number to determine the remaining recording space of the temporary fault buffer.

[0013] In one embodiment, after the step of determining the remaining recording space of the temporary fault buffer according to the current write serial number of the write position pointer and the current start serial number of the start position pointer in the temporary fault buffer, the method further includes:

[0014] When the remaining recording space is less than the third preset data volume, control the start position pointer in the temporary fault buffer to increment the serial number during the fault recording process;

[0015] When the target device has no fault and the current start serial number of the start position pointer is greater than the target index value of the temporary fault buffer, reset the current start serial number of the start position pointer.

[0016] In one embodiment, before the step of controlling the write position pointer in the temporary fault buffer to increment the serial number during the fault recording process when the execution times of the interrupt control cycle reach the fault recording condition and the timestamp information is received, the method further includes:

[0017] Obtain the periodic recording data volume corresponding to the interrupt control cycle and the second preset data volume;

[0018] Determine the target execution times according to the periodic recording data volume and the second preset data volume;

[0019] When the execution times of the interrupt control cycle are not less than the target execution times, determine that the execution times of the interrupt control cycle reach the fault recording condition.

[0020] In one embodiment, before the step of stopping the fault recording and storing the fault recording data corresponding to the fault through an external storage medium when the target device has a fault and the remaining recording space is less than the first preset data volume, the method further includes

[0021] When a failure occurs in the target device, during the fault recording process, lock the index number of the starting position pointer to determine the locked index number of the starting position pointer.

[0022] Determine the remaining recording space of the temporary fault buffer according to the locked index number of the starting position pointer and the current written index number of the write position pointer during the fault recording process.

[0023] In one embodiment, after the step of determining the remaining recording space of the temporary fault buffer according to the locked index number of the starting position pointer and the current written index number of the write position pointer during the fault recording process, it further includes:

[0024] When the remaining recording space of the temporary fault buffer is not less than the first preset data volume, maintain the fault recording process and control the write position pointer to increment the index number during the fault recording process.

[0025] When the current written index number of the write position pointer is greater than the target index value of the temporary fault buffer, reset the current written index number of the write position pointer.

[0026] In one embodiment, the step of storing the fault recording data corresponding to the fault through an external storage medium includes:

[0027] Obtain the target storage location of the external storage medium.

[0028] Determine the starting write position in the temporary fault buffer according to the current starting index number of the starting position pointer.

[0029] Store the fault recording data corresponding to the fault at the target storage location in the external storage medium according to the starting write position.

[0030] In addition, to achieve the above object, the present application also proposes a fault recording device, the fault recording device includes: a control module, configured to respond to a fault recording instruction for a target device, and when the number of executions of the interrupt control cycle reaches the fault recording condition and receives timestamp information, control the write position pointer in the temporary fault buffer to increment the index number during the fault recording process;

[0031] A processing module, configured to determine the remaining recording space of the temporary fault buffer according to the current written index number of the write position pointer and the current starting index number of the starting position pointer in the temporary fault buffer;

[0032] The processing module is further configured to stop fault recording when the target device has a fault and the remaining recording space is less than the first preset data volume.

[0033] In addition, to achieve the above object, the present application further provides an inverter, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the fault recording method as described above.

[0034] In addition, to achieve the above object, the present application further provides an energy storage device, which includes the inverter as described above.

[0035] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the fault recording method as described above.

[0036] The present application provides a fault recording method. By responding to a fault recording instruction for a target device, when the number of executions of an interrupt control cycle reaches a fault recording condition and timestamp information is received, the write position pointer in a temporary fault buffer is controlled to increment the index number during the fault recording process; the remaining recording space of the temporary fault buffer is determined according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer; when a fault exists in the target device and the remaining recording space is less than a first preset data volume, the fault recording is stopped, and the fault recording data corresponding to the fault is stored through an external storage medium. By the above method, various operation data of the target device in each interrupt control cycle are refreshed in the temporary fault buffer, and the index number of the stored data points is continuously updated, so as to efficiently and reliably record the data before and after the fault, ensure data integrity and real-time performance, quickly and effectively trace, locate and solve problems, and provide important guiding information for the fault analysis of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0038] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0039] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the fault recording method of the present application;

[0040] Figure 2 Hardware topology schematic diagram of PCS provided in the first embodiment of this application;

[0041] Figure 3 Buffer schematic diagram of a single fault information provided in the first embodiment of this application;

[0042] Figure 4 Fault recording waveform schematic diagram provided in the first embodiment of this application;

[0043] Figure 5 Fault recording system interaction schematic diagram provided in the first embodiment of this application;

[0044] Figure 6 Fault information storage process schematic diagram provided in the first embodiment of this application;

[0045] Figure 7 Pointer position schematic diagram provided in the first embodiment of this application;

[0046] Figure 8 Pointer position schematic diagram provided in the first embodiment of this application;

[0047] Figure 9 Pointer position schematic diagram provided in the first embodiment of this application;

[0048] Figure 10 Pointer position schematic diagram provided in the first embodiment of this application;

[0049] Figure 11 Pointer position schematic diagram provided in the first embodiment of this application;

[0050] Figure 12 Pointer position schematic diagram provided in the first embodiment of this application;

[0051] Figure 13 Pointer position schematic diagram provided in the first embodiment of this application;

[0052] Figure 14 Flow schematic diagram provided in the second embodiment of the fault recording waveform method of this application;

[0053] Figure 15 Flow schematic diagram provided in the third embodiment of the fault recording waveform method of this application;

[0054] Figure 16 FLASH buffer schematic diagram provided in the third embodiment of this application;

[0055] Figure 17 Transfer process schematic diagram provided in the third embodiment of this application;

[0056] Figure 18 Fault recording data storage index number processing schematic diagram provided in the third embodiment of this application;

[0057] Figure 19 It is a schematic diagram for processing the read index number of fault recording data provided in the third embodiment of the present application;

[0058] Figure 20 It is a schematic diagram for processing the read index number of fault recording data provided in the third embodiment of the present application;

[0059] Figure 21 It is a schematic flowchart for the brief process of the fault recording method provided in the third embodiment of the present application;

[0060] Figure 22 It is a schematic diagram of the module structure of the fault recording device according to the embodiment of the present application;

[0061] Figure 23 It is a schematic diagram of the device structure of the hardware operating environment involved in the fault recording method according to the embodiment of the present application.

[0062] The realization of the purpose, functional features and advantages of the present application will be further described in combination with the embodiments with reference to the accompanying drawings. Specific embodiments

[0063] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0064] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the accompanying drawings of the specification and specific embodiments.

[0065] The main solution of the embodiment of the present application is: in response to a fault recording instruction for a target device, when the number of executions of the interrupt control cycle reaches the fault recording condition and a timestamp information is received, control the write position pointer in the temporary fault buffer to increment the index number during the fault recording process; determine the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer; when a fault occurs in the target device and the remaining recording space is less than a first preset data volume, stop the fault recording and store the fault recording data corresponding to the fault through an external storage medium.

[0066] In recent years, with the rapid development of power electronics technology, there are more and more types of power converters. The topology selection for converting AC to DC or DC to AC is becoming increasingly rich, and the efficiency is also getting higher and higher. At the same time, since the generated electrical energy cannot be directly stored and needs to be converted into other forms of energy for full utilization, efficient power converters are required to convert various kinds of energy. The microgrid mainly consists of two parts: an AC bus and a DC bus. On the one hand, when the electrical energy generated by the power generation unit in the microgrid is relatively large and the electricity demand is relatively small, the electrical energy on the AC side of the grid can be rectified by the energy storage converter and transformed to the DC side to supply power to the battery energy storage and DC loads, and the electrical energy is stored in the battery as chemical energy. On the other hand, when the electricity demand reaches the peak period, the electrical energy stored in the energy storage system can be connected to the AC bus through the inverter to supply power to the AC loads. Among them, the AC grid is the main part of the system and provides the main energy source.

[0067] The stability and reliability of each unit in the grid depend on the stability of the power generation unit and the dynamics of the load, that is, the PCS, photovoltaic grid-connected inverter, and wind power generation equipment, etc. The main function of the microgrid is to provide higher-quality and more stable electrical energy to users. Therefore, how to manage and operate this complex and large-scale system of new energy microgrid has become the goal of many scholars' research. When a three-phase grid fault occurs, or when the inverter operation fails due to overvoltage, overcurrent and other fault information caused by load mutation, resulting in equipment shutdown, how to quickly, accurately, safely and reliably record the data information before and after the fault moment is of great significance for later fault analysis.

[0068] In this application, by refreshing various operation data of the target device in each interruption control period in the temporary fault buffer area and continuously updating the index number of the stored data points, the data before and after the fault can be recorded efficiently and reliably, and the data integrity and real-time performance can be ensured, so as to quickly and effectively trace, locate and solve problems, providing important guiding information for the fault analysis of the device.

[0069] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, an inverter, etc. that can implement the above functions. Hereinafter, an inverter will be taken as an example to illustrate this embodiment and the following embodiments.

[0070] Based on this, the embodiment of this application provides a fault recording method, referring to Figure 1 , Figure 1 is the schematic flow chart of the first embodiment of the fault recording method of this application.

[0071] In this embodiment, the fault recording method includes steps S10 to S30:

[0072] Step S10, in response to a fault recording instruction for a target device, when the execution count of the interrupt control cycle reaches the fault recording condition and the timestamp information is received, control the write position pointer in the temporary fault buffer to increment the index number during the fault recording process.

[0073] It should be noted that the target device can be any running device that needs to perform fault recording, such as a power generation unit in the power grid, including but not limited to energy storage converters, photovoltaic grid-connected inverters, and wind power generation equipment, etc. In this embodiment, the energy storage converter is taken as an example for illustration, and the hardware circuit of the energy storage converter is as Figure 2 shown Figure 2 The energy storage converter shown in is an energy storage device with an inverter.

[0074] It can be understood that when the target device is running, a fault recording instruction for the target device will be initiated, aiming to perform real-time recording of the key operation data of the target device during operation. For example, data such as grid, load inverter voltage, current, temperature parameters, and control parameters of the inverter controller are all key operation data. The fault recording instruction can be initiated by the system itself when the target device starts running, or can be initiated by the user.

[0075] In specific implementation, the interrupt control cycle refers to a time interval driven by timing or events. During each interrupt control cycle, fault recording will be performed, that is, the key operation data of the target device will be refreshed in the RAM (Random Access Memory) buffer of the target device. The fault recording process refers to the process of continuously refreshing the key operation data of the target device to the RAM buffer under each interrupt control cycle.

[0076] It should be noted that the fault recording condition is the condition required to start fault recording. In this embodiment, the fault recording condition refers to that the recorded fault recording data after the execution count of the interrupt control cycle is less than a preset multiple of the size of a single fault recording data. In this embodiment, the size of a single fault recording data is known, and the preset count is set to 2 times in this embodiment, and can also be set to other values. For example, if the amount of recorded fault recording data in each interrupt control cycle is 1 and the size of a single fault recording data is 4, then when the execution count of the interrupt control cycle is not less than 8 times, it means that the execution count of the interrupt control cycle reaches the fault recording condition.

[0077] It can be understood that the timestamp information is determined by the time setting instruction issued by the EMS (Energy Management System). The time setting instruction contains the timestamp information, aiming to ensure the accuracy and traceability of the recorded fault recording data.

[0078] In specific implementation, when the number of executions of the interrupt control period does not meet the fault recording condition, the fault flag to be recorded is cleared, aiming to perform subsequent fault recording after the RAM buffer in the energy storage converter is full, ensuring that there is real data in the buffer.

[0079] It should be noted that when the timestamp information sent by the EMS is not received, the fault flag to be recorded is cleared, and fault recording is performed after correct timestamp information is obtained.

[0080] It can be understood that the write position pointer data_rec_now refers to the pointer in the RAM buffer that points to the position of the currently written data. As new data is continuously written, this pointer will move accordingly to indicate the next available data storage position; the temporary fault buffer is a temporary storage area for temporarily storing the fault recording data obtained from the target device and is a part of the RAM, that is, the RAM buffer.

[0081] It can be understood that after receiving the fault recording instruction for the target device, if the number of executions of the interrupt control period reaches the fault recording condition and the timestamp information is received, then when each interrupt control period arrives, fault recording is performed, and the key operating data of the target device is refreshed into the temporary fault buffer. Each time a new data block is written, the index number of the write position pointer will increment to track the latest write position and ensure that the data can be recorded continuously and orderly.

[0082] In specific implementation, as Figure 3 shown, M1 is a circular temporary fault buffer, and its size single_size = 2.5×N, where N is the number of sampling points in each power frequency cycle. Assuming that the sampling frequency and the control frequency are both Fs (such as Fs = 32 KHz), an interrupt will be generated every 1 / Fs time period. When the inverter device is running, when an interrupt occurs, the data to be recorded is refreshed in M1 in real time. K is the number of data for each data point, and the unit of each data is 16 bits, one word.

[0083] In a feasible implementation manner, before step S10, steps A11 to A13 may be included:

[0084] Step A11, obtaining the periodic recording data volume corresponding to the interrupt control period and the second preset data volume.

[0085] It should be noted that the periodic recording data volume corresponding to the interrupt control period refers to the data volume that can be recorded into the temporary fault buffer under each interrupt control period; the second preset data volume refers to the data volume of a single fault recording data.

[0086] Step A12: Determine the target execution times according to the cyclic recording data volume and the second preset data volume.

[0087] It should be noted that, based on the second preset data volume, multiply it by a preset multiple, and divide the calculated data volume by the cyclic recording data volume, so as to obtain the number of times of recording during the interrupt control cycle when the RAM buffer in the energy storage converter is full. In this embodiment, the target execution times refer to the number of times of recording during the interrupt control cycle when the RAM buffer in the energy storage converter is full.

[0088] Step A13: When the execution times of the interrupt control cycle are not less than the target execution times, determine that the execution times of the interrupt control cycle meet the fault recording condition.

[0089] It should be noted that when the execution times of the interrupt control cycle are not less than the target execution times, it indicates that fault recording has been performed under multiple interrupt control cycles. At this time, the RAM buffer in the energy storage converter is full, and it is determined that the execution times of the interrupt control cycle meet the fault recording condition.

[0090] Step S20: Determine the remaining recording space of the temporary fault buffer according to the current writing index number of the writing position pointer and the current starting index number of the starting position pointer in the temporary fault buffer.

[0091] It should be noted that the current writing index number refers to the specific position number pointed to by the writing position pointer data_rec_now. When a new data block is written, the current writing index number will increase. The starting position pointer data_rec_start is a pointer pointing to the starting position of the fault data record corresponding to the fault when the fault occurs. It identifies from which position to start recording the fault data; when no fault occurs, the starting position pointer data_rec_start will be adjusted according to requirements to make room for the newly written data block. The current starting index number refers to the specific position number pointed to by the starting position pointer currently, and it represents the starting point of the fault data record corresponding to the fault. The remaining recording space indicates the size of the space in the temporary fault buffer that can still be used to store new fault data during the current fault recording process. In this embodiment, the current writing index number and the current starting index number are the real-time positions of the two pointers respectively.

[0092] It can be understood that when a real fault occurs, it is necessary to record the data of the first preset cycle before the fault occurs and the data of the second preset cycle after the fault occurs, so as to obtain the fault recording data of the fault. In this embodiment, the first preset cycle is described by taking 1.5 cycles as an example, and the second preset cycle is described by taking 1 cycle. A cycle refers to a complete fluctuation process of alternating current, and the size of the cycle can be set according to requirements. One cycle includes the data of N points, the size of the data of one point represents the cycle recording data volume corresponding to one interruption control cycle, and the data of one point includes multiple data. As Figure 4 shown, the data storage size before the fault is 1.5 cycles of data, and the data storage size after the fault is 1 cycle of data.

[0093] In specific implementation, since it is necessary to completely record the fault recording data corresponding to the fault after a real fault occurs, it is necessary to ensure in real time that the remaining recording space is sufficient to record the data of the second preset cycle after the fault occurs. It is necessary to calculate the remaining recording space of the temporary fault buffer according to the current writing index number of the writing position pointer and the current starting index number of the starting position pointer in the temporary fault buffer.

[0094] In a feasible implementation manner, before step S20, steps B11 to B12 may be included:

[0095] Step B11, when the remaining recording space is less than the third preset data volume, control the starting position pointer in the temporary fault buffer to increment the index number during the fault recording process.

[0096] It should be noted that the third preset data volume refers to the data volume corresponding to the data of the second preset cycle after the fault occurs in this embodiment. When the remaining recording space is less than the third preset data volume, it is necessary to move the starting pointer position to make more space. During the fault recording process, when each data block is written, the current starting index number of the starting position pointer will increase, so as to release some space for subsequent writing data, ensuring that the data after the fault can be completely recorded after a real fault occurs.

[0097] Step B12, when the target device has no fault and the current starting index number of the starting position pointer is greater than the target index value of the temporary fault buffer, reset the current starting index number of the starting position pointer.

[0098] It should be noted that the target index value refers to the maximum index value single_size of a single temporary fault buffer. When the target device has no fault, it means that the target device has not had a fault until the current moment. At this time, when it is judged that the current starting index number of the starting position pointer is greater than the target index value, the current starting index number of the starting position pointer is cleared.

[0099] Step S30, when a fault occurs in the target device and the remaining recording space is less than the first preset data volume, stop fault recording, and store the fault recording data corresponding to the fault through an external storage medium.

[0100] It should be noted that the first preset data volume refers to the cycle recording data volume corresponding to an interruption control cycle; the external storage medium refers to an external FLASH memory, which is a non-volatile storage device used to store important fault recording data for a long time.

[0101] It can be understood that when a fault exists in the target device, after the fault recording data corresponding to the fault is completely recorded, if it is determined that the remaining recording space is less than the first preset quantity, stop fault recording at this time, and store the fault recording data corresponding to the fault to the external storage medium through the EMS system.

[0102] In a specific implementation, taking the PCS as the target device as an example, the process of storing fault information is described. Figure 5 For each system or device included in the process of storing fault information, the specific storage process is as Figure 6 shown. The fault recording module (i.e., PCS) refreshes data such as grid, load inverter voltage, current, temperature parameters, and control parameters of the inverter controller in the RAM buffer for each interruption control cycle, and continuously updates the index number of the stored data points. When a fault occurs, record the time at the moment of fault occurrence, and record the data of two cycles after the fault occurs. At the same time, notify the data storage module (i.e., EMS) to read the data. The EMS that receives the notification stores the data read from the RAM of the PCS into the external FLASH.

[0103] In a feasible implementation manner, before step S30, steps C11 - C12 may be included:

[0104] Step C11, when a fault occurs in the target device, lock the index number of the starting position pointer during the fault recording process to determine the locked index number of the starting position pointer.

[0105] It should be noted that when a fault exists in the target device, at this time, it is necessary to completely record the fault recording data corresponding to the fault, lock the index number of the starting position pointer, ensure that the position of the starting pointer does not change, and use the current starting index number of the starting position pointer at the time of locking as the locked index number, which serves as the starting point for data recording of this fault. In this embodiment, the locking of the starting position pointer is released only after the fault recording data of this fault is stored by the external storage medium.

[0106] Step C12: Determine the remaining recording space of the temporary fault buffer according to the locked index number of the starting position pointer and the current writing index number of the writing position pointer during the fault recording process.

[0107] It should be noted that after a fault occurs, the remaining recording space of the temporary fault buffer is determined by calculating the space based on the locked index number of the starting position pointer and the current index number of the writing position pointer during the fault recording process.

[0108] In a feasible implementation manner, after step C12, steps D11 to D12 may be included:

[0109] Step D11: When the remaining recording space of the temporary fault buffer is not less than the first preset data volume, maintain the fault recording process and control the writing position pointer to increment the index number during the fault recording process.

[0110] It should be noted that after a fault occurs and the fault recording data of the fault is stored, when the remaining recording space is not less than the first preset data volume, the recording process is maintained, and the key operation data of the target device is continuously refreshed to the temporary fault buffer. At the same time, the writing position pointer data_rec_now is controlled to increment the index number during the fault recording process.

[0111] Step D12: When the current writing index number of the writing position pointer is greater than the target index value of the temporary fault buffer, reset the current writing index number of the writing position pointer.

[0112] It should be noted that when the current writing index number of the writing position pointer data_rec_now is greater than the target index value of the temporary fault buffer, the current writing index number of the writing position pointer is cleared to ensure the implementation of the circular buffer.

[0113] It can be understood that Figures 7 to 13 Taking... as an example, the moving process of the index numbers of the writing position pointer data_rec_now and the starting position pointer data_rec_start during the fault recording process is described. Figures 7 to 9As shown, when the system is just initialized, the index numbers of the write position pointer data_rec_now and the start position pointer data_rec_start are equal. Whenever the interrupt control period enters, the data is refreshed in real time to the RAM buffer. At this time, the write position pointer data_rec_now is incremented according to the number of data written in a single interrupt. When the size of the remaining recording space spare_size is always greater than the data size after the fault (i.e., the data of one cycle) BUFF_SIZE_AFTER_ERR, the start position pointer data_rec_start remains unchanged. When the next interrupt enters and the size of the remaining recording space spare_size starts to be less than BUFF_SIZE_AFTER_ERR, the start position pointer data_rec_start starts to be incremented according to the number of recorded data points of the data size after the fault in a single interrupt, as Figures 9 to 10 shown. In this way, the data size before the fault and the data size after the fault are always kept as fixed values. When no fault occurs, the data is refreshed in real time to the RAM buffer, and the index numbers of the start position pointer data_rec_start and the write position pointer data_rec_now are incremented. At this time, the difference between the index number of the data recording start position and the current write position remains fixed and loops. When a fault occurs, as Figures 11 to 13 shown, the index number of the start position pointer data_rec_start remains fixed, and the data after the fault continues to be written. Therefore, the index number of the write position pointer data_rec_now is incremented. When the remaining recording space spare_size is less than the number of data points of one point, the writing stops.

[0114] This embodiment provides a fault recording method. In this embodiment, in response to a fault recording instruction for a target device, when the number of executions of the interrupt control period reaches the fault recording condition and the timestamp information is received, the write position pointer in the temporary fault buffer is controlled to increment the index number during the fault recording process; the remaining recording space of the temporary fault buffer is determined according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer; when a fault exists in the target device and the remaining recording space is less than the first preset data volume, the fault recording is stopped, and the fault recording data corresponding to the fault is stored through an external storage medium. By the above method, various operation data of the target device in each interrupt control period are refreshed in the temporary fault buffer, and the index numbers of the stored data points are continuously updated, so as to efficiently and reliably record the data before and after the fault, ensure the integrity and real-time nature of the data, quickly and effectively trace, locate and solve problems, and provide important guiding information for the fault analysis of the device.

[0115] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 14 , step S20, the fault recording method further includes steps S21 to S23:

[0116] Step S21, determine the position comparison relationship between the write position pointer and the start position pointer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer.

[0117] It should be noted that the current write index number of the write position pointer is compared with the current start index number of the start position pointer to determine the magnitude relationship between the two, and the magnitude relationship between the two is the position comparison relationship between the write position pointer and the start position pointer.

[0118] Step S22, when the position comparison relationship is the first comparison relationship, perform a space calculation according to the current write index number and the current start index number to determine the remaining recording space of the temporary fault buffer.

[0119] It should be noted that when the position comparison relationship is the first comparison relationship, it indicates that the current start index number is greater than the current write index number, and the remaining recording space spare_size = the current start index number data_rec_start of the start position pointer - the current write index number data_rec_now of the write position pointer.

[0120] Step S23, when the position comparison relationship is the second comparison relationship, perform a space calculation according to the buffer recording space of the temporary fault buffer, the current write index number, and the current start index number to determine the remaining recording space of the temporary fault buffer.

[0121] It should be noted that when the position comparison relationship is the second comparison relationship, it indicates that the current start index number is not less than the current write index number. Obtain the buffer recording space single_size of the temporary fault buffer, and the remaining recording space spare_size = the buffer recording space single_size + the current start index number data_rec_start of the start position pointer - the current write index number data_rec_now of the write position pointer. In this embodiment, the buffer recording space refers to the size of a single temporary fault buffer.

[0122] This embodiment provides a fault recording method. In this embodiment, the position comparison relationship between the write position pointer and the start position pointer is determined according to the current write serial number of the write position pointer and the current start serial number of the start position pointer in the temporary fault buffer; when the position comparison relationship is the first comparison relationship, space calculation is performed according to the current write serial number and the current start serial number to determine the remaining recording space in the temporary fault buffer; when the position comparison relationship is the second comparison relationship, space calculation is performed according to the buffer recording space in the temporary fault buffer, the current write serial number, and the current start serial number to determine the remaining recording space in the temporary fault buffer. Through the above method, the remaining recording space can be accurately calculated, laying a foundation for the accurate recording of fault data.

[0123] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar content as that in the above-mentioned first and second embodiments can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 15 , step S30, the fault recording method further includes steps S31 to S33:

[0124] Step S31, when a fault occurs in the target device and the remaining recording space is less than the first preset data volume, stop fault recording and obtain the target storage location of the external storage medium.

[0125] It should be noted that the external storage medium can store the fault recording data corresponding to n faults. The overall buffer of the external storage medium is as Figure 16 shown, where index is the position of the buffer for the fault recording data to be stored next time, and read_flag is a flag indicating whether each fault recording data has been read by the EMS main control. At this time, the EMS system obtains the target storage location in the external storage medium for storing the fault recording data corresponding to this fault.

[0126] Step S32, determine the start write position in the temporary fault buffer according to the current start serial number of the start position pointer.

[0127] It should be noted that the current start serial number of the start position pointer is obtained, and this current start serial number is the start recording position of the fault recording data corresponding to the fault. At this time, this position is used as the start write position for data transfer from the temporary fault buffer.

[0128] Step S33, store the fault recording data corresponding to the fault at the target storage location in the external storage medium according to the start write position.

[0129] It should be noted that starting from the starting write position, the fault recording data corresponding to the fault is transferred to the target storage position in the external storage medium in units of N words. When the number of untransferred data in the temporary fault buffer is less than N, it is stored at the target storage position in the external storage medium at one time.

[0130] It is understandable that the overall process of data transfer is as follows Figure 17 As shown, when a fault occurs, when the fault recording data corresponding to the fault is recorded in RAM, the fault recording RAM storage completion flag will be set, and the storage task will be notified to let EMS read the data in RAM and store it in the external FLASH. Before storing in FLASH, first obtain the storage index number of the fault recording to be stored in the external FLASH according to the preset storage strategy (that is, the storage position. Since N pieces of fault information are stored in the external FLASH, it is necessary to determine the location of the fault recording data corresponding to the next storage fault according to the storage strategy, and try to keep multiple useful fault recording information without being overwritten). Then obtain the starting write position of the fault recording data storage, that is, the position of the data_rec_start index number in the buffer recorded at the time of the fault. Start storing from the current position every N words. When the number of stored data is less than N, store the remaining data at one time. When all data are stored in FLASH, calculate the CRC32 check of the entire fault recording data, and store the check data for credibility check when reading data. At the same time, set the fault recording data FLASH storage completion flag and mark it as readable.

[0131] In this embodiment, the target storage location can be obtained through a preset storage strategy, and the preset storage strategy includes but is not limited to the following strategies: 1. Storage according to time: take out the fault recording storage location index number with the earliest timestamp, and use the location as the target storage location. 2. Storage according to the index number of the fault recording data storage: read the sequential index number of the fault record, and the index number is self-incremented as the location index number of the next fault recording data record, thereby determining the target storage location. When the fault recording data is subsequently read, it can also be read in the following manner: 1. Read according to time: take out the index number of the fault recording data with the earliest storage time; 2. Read according to the index number of the fault recording data storage, and read the sequential index number of the fault record.

[0132] In the specific implementation, Figure 18As shown in the figure, when storing the fault recording data, first find the number of unread fault recording data, and determine the storage strategy of the fault data record. If it is stored by time, take out the index number of the fault recording data with the earliest storage time. Otherwise, read out the sequential index number of the fault record, increment the index number, and use it as the position index number for the next fault recording data record, and store the current fault recording data at the current buffer.

[0133] It should be noted that as Figure 19 shown in the figure, when reading the fault recording data, first find the number of unread fault recording data. If N is not 0, if it is read by time, take out the index number of the fault recording data with the earliest storage time. Otherwise, read out the sequential index number of the fault record, and send the data in the current buffer to the EMS main control.

[0134] It can be understood that as Figure 20 shown in the figure, when the EMS reads the fault recording data stored last time, first read out the buffer of all the fault recording data read flags. If it is stored by time, take out the index number of the fault recording data with the latest storage time. Otherwise, read out the sequential index number of the fault record, which is the index number index of the fault recording data stored last time, and the current stored fault recording data can be read out corresponding to this index.

[0135] This embodiment provides a fault recording method. In this embodiment, when a fault exists in the target device and the remaining recording space is less than the first preset data volume, stop the fault recording and obtain the target storage location of the external storage medium; determine the starting writing position in the temporary fault buffer according to the current starting index number of the starting position pointer; store the fault recording data corresponding to the fault at the target storage location in the external storage medium according to the starting writing position. Through the above method, the fault recording data can be recorded efficiently and accurately, laying a foundation for subsequent fault tracing.

[0136] Exemplarily, to help understand the implementation process of the fault recording method obtained by combining this embodiment with the above-mentioned Embodiment 1 and Embodiment 2, please refer to Figure 21 , Figure 21A schematic flowchart of a fault recording method is provided. Specifically: when the number of executions of the interrupt control cycle is less than twice the size of a single fault recording data, the fault flag to be recorded is cleared at this time, that is, after the buffer is full, normal logic fault recording is performed to ensure that there is real data in the buffer. When the time setting instruction from the EMS is not received, the fault flag to be recorded is also cleared, that is, recording is performed after a correct timestamp is obtained. When the recording cycle arrives and there is a fault to be recorded at this time, the fault recording RAM data update flag is set, and at the same time, the size of the current remaining buffer spare_size is calculated. When the remaining buffer is less than the size of one data point, the EMS is notified to start flash storage of the fault recording data. Otherwise, the fault recording data is refreshed into the RAM buffer in real time, and the pointer data_rec_now of the current data buffer written into the RAM is incremented. When data_rec_now is greater than the maximum value single_size of a single fault recording buffer, data_rec_now is cleared to ensure the implementation of the circular buffer. When no fault occurs and the number of remaining buffers spare_size is less than the size of the post-fault data, data_rec_start is incremented. When data_rec_start is greater than the maximum value single_size of a single fault recording buffer, data_rec_start is cleared.

[0137] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the fault recording method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.

[0138] This application also provides a fault recording device. Please refer to Figure 22 , and the fault recording device includes:

[0139] The control module 10 is used to respond to a fault recording instruction for a target device, and when the number of executions of the interrupt control cycle reaches the fault recording condition and the timestamp information is received, control the write position pointer in the temporary fault buffer to increment the index number during the fault recording process.

[0140] The processing module 20 is used to determine the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer.

[0141] The processing module 20 is further used to stop fault recording when there is a fault in the target device and the remaining recording space is less than a first preset data volume.

[0142] Optionally, the processing module 20 is further used to:

[0143] Determine the position comparison relationship between the write position pointer and the start position pointer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer; when the position comparison relationship is the first comparison relationship, perform a space calculation according to the current write index number and the current start index number to determine the remaining recording space of the temporary fault buffer; when the position comparison relationship is the second comparison relationship, perform a space calculation according to the buffer recording space of the temporary fault buffer, the current write index number, and the current start index number to determine the remaining recording space of the temporary fault buffer.

[0144] Optionally, the processing module 20 is further configured to:

[0145] When the remaining recording space is less than the third preset data volume, control the start position pointer in the temporary fault buffer to increment the index number during the fault recording process; when the target device has no fault and the current start index number of the start position pointer is greater than the target index value of the temporary fault buffer, reset the current start index number of the start position pointer.

[0146] Optionally, the control module 10 is further configured to:

[0147] Obtain the periodic recording data volume corresponding to the interrupt control period and the second preset data volume; determine the target execution times according to the periodic recording data volume and the second preset data volume; when the execution times of the interrupt control period are not less than the target execution times, determine that the execution times of the interrupt control period reach the fault recording condition.

[0148] Optionally, the processing module 20 is further configured to:

[0149] When the target device has a fault, lock the index number of the start position pointer during the fault recording process to determine the locked index number of the start position pointer; determine the remaining recording space of the temporary fault buffer according to the locked index number of the start position pointer and the current write index number of the write position pointer during the fault recording process.

[0150] Optionally, the processing module 20 is further configured to:

[0151] When the remaining recording space of the temporary fault buffer is not less than the first preset data volume, maintain the fault recording process and control the write position pointer to increment the index number during the fault recording process; when the current write index number of the write position pointer is greater than the target index value of the temporary fault buffer, reset the current write index number of the write position pointer.

[0152] Optionally, the processing module 20 is further configured to:

[0153] Obtain the target storage location of the external storage medium; determine the starting write location in the temporary fault buffer according to the current starting index number of the starting position pointer; and store the fault recording data corresponding to the fault at the target storage location in the external storage medium according to the starting write location.

[0154] The fault recording device provided by this application adopts the fault recording method in the above embodiment, and can solve the technical problem of how to efficiently and reliably record the operation data before and after the fault when the power grid equipment fails. Compared with the prior art, the beneficial effects of the fault recording device provided by this application are the same as those of the fault recording method provided by the above embodiment, and other technical features in the fault recording device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.

[0155] This application provides an inverter, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the fault recording method in the first embodiment above.

[0156] Next, refer to Figure 23 , which shows a schematic structural diagram of an inverter suitable for implementing the embodiments of this application. The inverter in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 23 The inverter shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.

[0157] As Figure 23As shown, the inverter may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the inverter are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the inverter to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an inverter with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or had alternatively.

[0158] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.

[0159] The inverter provided in the present application adopts the fault recording method in the above embodiment, and can solve the technical problem of how to efficiently and reliably record the operation data before and after a fault occurs in grid equipment. Compared with the prior art, the beneficial effects of the inverter provided in the present application are the same as those of the fault recording method provided in the above embodiment, and other technical features in the inverter are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.

[0160] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0161] In addition, this application provides an energy storage device, and the energy storage device includes an inverter as described above.

[0162] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0163] This application provides a computer-readable storage medium, having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the fault recording method in the above embodiments.

[0164] The computer-readable storage medium provided in this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0165] The above computer-readable storage medium can be included in the inverter; or it can exist separately without being assembled into the inverter.

[0166] The above computer-readable storage medium carries one or more programs, which, when executed by an inverter, cause the inverter to: in response to a fault recording instruction for a target device, when the number of executions of the interruption control cycle reaches the fault recording condition and timestamp information is received, control the write position pointer in the temporary fault buffer to increment the index number during the fault recording process; determine the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer; when a fault exists in the target device and the remaining recording space is less than a first preset data volume, stop the fault recording, and store the fault recording data corresponding to the fault through an external storage medium.

[0167] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., connected through the Internet using an Internet service provider).

[0168] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0169] The modules involved in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0170] The readable storage medium provided by the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above fault recording method, which can solve the technical problem of how to efficiently and reliably record the operation data before and after a fault occurs in power grid equipment. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the fault recording method provided by the above embodiments, and will not be elaborated here.

[0171] The present application also provides a computer program product, including a computer program, and the steps of the above fault recording method are implemented when the computer program is executed by a processor.

[0172] The computer program product provided by the present application can solve the technical problem of how to efficiently and reliably record the operation data before and after a fault occurs in power grid equipment. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the fault recording method provided by the above embodiments, and will not be elaborated here.

[0173] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or any direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. A fault recording method, characterized in that The method includes: In response to a fault recording instruction for a target device, when the number of executions of the interrupt control cycle reaches the fault recording condition and timestamp information is received, controlling the write position pointer in the temporary fault buffer to increment the index number during the fault recording process; Determining the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer; When a fault exists in the target device and the remaining recording space is less than a first preset data volume, stopping the fault recording and storing the fault recording data corresponding to the fault through an external storage medium.

2. The method according to claim 1, wherein, The step of determining the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer includes: Determining the position comparison relationship between the write position pointer and the start position pointer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer; When the position comparison relationship is a first comparison relationship, performing space calculation according to the current write index number and the current start index number to determine the remaining recording space of the temporary fault buffer; When the position comparison relationship is a second comparison relationship, performing space calculation according to the buffer recording space of the temporary fault buffer, the current write index number, and the current start index number to determine the remaining recording space of the temporary fault buffer.

3. The method according to claim 1, characterized in that After the step of determining the remaining recording space of the temporary fault buffer according to the current write index number of the write position pointer and the current start index number of the start position pointer in the temporary fault buffer, it further includes: When the remaining recording space is less than a third preset data volume, controlling the start position pointer in the temporary fault buffer to increment the index number during the fault recording process; When no fault exists in the target device and the current start index number of the start position pointer is greater than the target index value of the temporary fault buffer, resetting the current start index number of the start position pointer.

4. The method according to claim 1, characterized in that Before the step of, in response to the number of executions of the interrupt control cycle reaching the fault recording condition and receiving timestamp information, controlling the write position pointer in the temporary fault buffer to increment the index number during the fault recording process, it further includes: Obtaining the cycle recording data volume corresponding to the interrupt control cycle and a second preset data volume; Determining a target number of executions according to the cycle recording data volume and the second preset data volume; When the number of executions of the interrupt control cycle is not less than the target number of executions, determining that the number of executions of the interrupt control cycle reaches the fault recording condition.

5. The method according to any one of claims 1 to 4, characterized in that Before the step of, when a fault exists in the target device and the remaining recording space is less than a first preset data volume, stopping the fault recording and storing the fault recording data corresponding to the fault through an external storage medium, it further includes When a failure occurs in the target device, during the fault recording process, lock the index number of the starting position pointer to determine the locked index number of the starting position pointer. Determine the remaining recording space of the temporary fault buffer according to the locked index number of the starting position pointer and the current writing index number of the writing position pointer during the fault recording process.

6. The method according to claim 5, wherein After the step of determining the remaining recording space of the temporary fault buffer according to the locked index number of the starting position pointer and the current writing index number of the writing position pointer during the fault recording process, it further includes: When the remaining recording space of the temporary fault buffer is not less than the first preset data volume, maintain the fault recording process and control the writing position pointer to increment the index number during the fault recording process. When the current writing index number of the writing position pointer is greater than the target index value of the temporary fault buffer, reset the current writing index number of the writing position pointer.

7. The method according to any one of claims 1 to 4, characterized in that, The step of storing the fault recording data corresponding to the fault through an external storage medium includes: Obtain the target storage location of the external storage medium. Determine the starting writing position in the temporary fault buffer according to the current starting index number of the starting position pointer. Store the fault recording data corresponding to the fault at the target storage location in the external storage medium according to the starting writing position.

8. A fault recording device, characterized in that, The fault recording device includes: A control module, configured to respond to a fault recording instruction for a target device, and when the number of executions of the interrupt control cycle reaches the fault recording condition and receives timestamp information, control the writing position pointer in the temporary fault buffer to increment the index number during the fault recording process. A processing module, configured to determine the remaining recording space of the temporary fault buffer according to the current writing index number of the writing position pointer and the current starting index number of the starting position pointer in the temporary fault buffer. The processing module is further configured to stop fault recording when the target device has a fault and the remaining recording space is less than the first preset data volume.

9. An inverter, characterized in that, The inverter includes: a memory, a processor, and a fault recording program stored on the memory and executable on the processor, and the fault recording program is configured to implement the steps of the fault recording method according to any one of claims 1 to 7.

10. A energy storage device, characterized in that, The energy storage device includes the inverter according to claim 9.

Citation Information

Cited By

  • Wave recording measurement method for fault protection of power distribution internet of things

    CN121307770A

  • Embedded recording method and system for dual-period data before and after failure of fan master control system

    CN121785961A