A multi-interval integrated wave recording management system and method for a distribution DTU
By designing a channel data recording and waveform file storage solution for sub-threads in the power distribution DTU equipment, combined with multi-level management of sub-queues, the problem of multi-interval fault information management is solved, and independent management of fault information and efficient storage and retrieval of fault information are realized.
Patent Information
- Application Number
- CN202210025894.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-11
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-01-11
AI Technical Summary
The prior art is difficult to effectively manage multi-interval fault information of power distribution DTU equipment, especially when the same line is superimposed or multiple lines fail at the same time, resulting in the loss of fault information or abnormal coverage.
By designing a sub-threading scheme for channel data recording and waveform file storage in power distribution DTU equipment, combining multi-level queue management of multi-level historical waveform data and fault information reporting data, the mutual decoupling of multi-space historical fault information storage and retrieval is achieved.
It realizes complete independent management of multi-interval fault information of power distribution DTU equipment, avoids the loss of fault information and abnormal coverage, and ensures the accuracy and reliability of fault location and rapid isolation.
Smart Images

Figure CN114565212B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to a power distribution DTU device, and relates to a multi-interval comprehensive recording management system and method. Background Art
[0002] DTU is mainly used in ring network cabinets, switchgear, box-type substations, etc. in distribution networks. Combined with the distribution master station, it can quickly and reliably locate and isolate distribution network faults and restore power supply to non-faulty sections. It is a new generation of distribution automation remote terminal device that integrates control, protection and communication functions.
[0003] In actual engineering applications, DTU can access up to 16 lines. In order to accurately locate and quickly isolate line faults at the distribution master station, relevant specifications clearly state that the fault information of DTU equipment must be managed independently by line intervals; fault information includes COMTRADE files of recording channel data and other related fault information report data. To achieve independent management of fault information by intervals, DTU must consider that in the case of superimposed faults on the same line, the fault information will not be lost due to lack of time to store; at the same time, it must also be considered that in the case of simultaneous faults on multiple lines, the fault information between the lines will not affect each other, resulting in abnormal coverage; finally, it must be considered that the COMTRADE waveform file sent to the master station only contains the channel data of the faulty line, and can provide an independent fault information query interface by interval for the LCD and other human-machine interfaces and external communication protocol modules. The existing technology cannot meet the multi-interval fault recording requirements of DTU equipment for 16 lines.
[0004] Therefore, a new technical solution is needed to solve the above technical problems. Summary of the invention
[0005] Purpose of the invention: The purpose of the present invention is to provide a multi-interval integrated recording and management system for distribution DTU, which implements thread-based design for channel data recording and waveform file storage according to different real-time requirements, combines multi-interval historical waveform data and fault information report data with queue-based multi-level management, and realizes the mutual decoupling of multi-interval historical fault information storage and retrieval, ultimately achieving the purpose of completely independent management of multi-interval fault information of distribution DTU.
[0006] The present invention also provides a corresponding distribution DTU multi-interval comprehensive recording management method, which also performs thread-dividing design according to different real-time requirements through channel data recording and waveform file storage, and combines the multi-interval historical waveform data and fault information report data with sub-queue multi-level management to achieve mutual decoupling of multi-interval historical fault information storage and retrieval, and finally achieves the purpose of completely independent management of multi-interval fault information of distribution DTU.
[0007] Technical solution: The multi - interval integrated wave recording management system for distribution DTU provided by the present invention can adopt the following technical solutions:
[0008] The multi - interval integrated wave recording management system for distribution DTU includes a channel data recording task module, an intermediate waveform data interval - by - interval cache writing disk module, and a waveform file storage task module;
[0009] The channel data recording task module includes a task cycle module, a trigger module, a channel data recording module, and a judgment module;
[0010] The task cycle module is used to schedule and execute regularly in each task cycle, and scan the fault trigger logic by interval at the same time;
[0011] The trigger module is used to judge whether the fault wave recording is triggered and set the fault wave recording start flag;
[0012] The channel data recording module is used to query the fault wave recording start flags of all intervals in each task cycle, record the intermediate waveform data by interval, and operate the write pointer at the same time;
[0013] The judgment module is used to judge whether the number of points of the fault wave recording reaches the specified number of points. If it reaches, the channel data recording is stopped;
[0014] The intermediate waveform data interval - by - interval cache writing disk module includes a cache writing disk module and a write pointer module;
[0015] The cache writing disk module is used to set an intermediate waveform data cache writing disk queue in the intermediate waveform data of each interval;
[0016] The write pointer module is used to record the cache of the intermediate waveform data; when the channel data recording module completes the recording of a fault wave recording, the intermediate waveform data is written to the current memory address pointed to by the write pointer in the intermediate waveform data cache writing disk queue, and the channel data recording task module operates the write pointer to move to the next position;
[0017] The waveform file storage task module includes a task cycle module, a detection module, a waveform data conversion module, a writing disk module, and a multi - interval historical waveform data and fault information report data multi - queue multi - level management module;
[0018] The task cycle module is used to schedule and execute when the system CPU is idle, and query the read pointer and write pointer in the intermediate waveform data cache writing disk queue of all intervals at the same time;
[0019] The detection module is used to judge whether the read pointer and write pointer in the intermediate waveform data cache writing disk queue are equal;
[0020] The waveform data conversion module is used to convert the new intermediate waveform data to be written to the disk into the COMTRADE file format;
[0021] The disk writing module is used to perform disk writing operations on the intermediate waveform file converted into the COMTRADE file format;
[0022] The multi - interval historical waveform data and fault information report data sub - queue multi - level management module is used to manage the multi - interval historical waveform data and fault information report data.
[0023] Beneficial effects: Through the multi - thread design of channel data recording and waveform file storage according to different real - time requirements, combined with the sub - queue multi - level management of multi - interval historical waveform data and fault information report data, the present invention realizes the decoupling of the storage and retrieval of multi - interval historical fault information, and finally achieves the purpose of completely independent management of multi - interval fault information of distribution DTU.
[0024] The present invention also provides a method for multi - interval integrated fault recording management of distribution DTU, including the following steps:
[0025] Step 01: Regularly schedule and execute in each task cycle, and scan the fault trigger logic at intervals simultaneously;
[0026] Step 02: Judge whether the fault recording is triggered and set the fault recording start flag;
[0027] Step 03: Query the fault recording start flags of all intervals in each task cycle, record the intermediate waveform data at intervals, and operate the write pointer at the same time;
[0028] Step 04: Judge whether the number of recorded waveform points reaches the specified number. If not, return to Step 02. After reaching, stop the channel data recording task;
[0029] Step 05: Set an intermediate waveform data cache disk - writing queue in the intermediate waveform data of each interval;
[0030] Step 06: Record the cache of the intermediate waveform data; when the channel data recording task completes the recording of a fault recording, the intermediate waveform data is written to the current memory address pointed to by the write pointer in the intermediate waveform data cache disk - writing queue, and the channel data recording task operates the write pointer to move to the next position;
[0031] Step 07: Schedule and execute the waveform file storage task during the idle time of the system CPU, and query the read pointer and write pointer in the intermediate waveform data cache disk - writing queues of all intervals at the same time;
[0032] Step 08: Judge whether the read pointer and write pointer in the intermediate waveform data cache disk - writing queue are equal. If not, start the disk - writing operation of new intermediate waveform data;
[0033] Step 09: Extract the new intermediate waveform data to be written to disk and convert it into the COMTRADE file format;
[0034] Step 10: Extract the converted COMTRADE file, perform the disk writing operation, and manage the multi-interval historical waveform data and fault information report data. Determine whether the read pointer is equal to the write pointer. If they are equal, the file disk writing operation is completed.
[0035] Beneficial effects: In the present invention, the channel data recording and waveform file storage are designed with separate threads according to different real-time requirements, combined with the hierarchical management of multiple queues for multi-interval historical waveform data and fault information report data, realizing the decoupling of the storage and retrieval of multi-interval historical fault information, and finally achieving the purpose of completely independent management of multi-interval fault information of the distribution DTU. Brief Description of the Drawings
[0036] Figure 1 It is the flowchart of the channel data recording task in the multi-interval integrated wave recording management system and method of the distribution DTU of the present invention.
[0037] Figure 2 It is the schematic diagram of the intermediate waveform data cache queue in the multi-interval integrated wave recording management system and method of the distribution DTU of the present invention.
[0038] Figure 3 It is the flowchart of the waveform file storage task in the multi-interval integrated wave recording management system and method of the distribution DTU of the present invention.
[0039] Figure 4 It is the schematic diagram of the first-level fault information management queue divided by fault type within the interval in the multi-interval integrated wave recording management system and method of the distribution DTU of the present invention.
[0040] Figure 5 It is the schematic diagram of the second-level fault information management queue divided by interval between lines in the multi-interval integrated wave recording management system and method of the distribution DTU of the present invention.
[0041] Figure 6 It is the schematic diagram of the third-level fault information management queue unified by all intervals of the DTU device in the multi-interval integrated wave recording management system and method of the distribution DTU of the present invention. Detailed Embodiments
[0042] The following further describes the present invention in detail with reference to the drawings and specific embodiments.
[0043] Embodiment 1
[0044] Please refer to Figure 1 and Figure 2 and in combination with Figure 3 shown, this embodiment discloses a multi-interval integrated wave recording management system for a distribution DTU, including a channel data recording task module, an intermediate waveform data interval-based cache writing module, and a waveform file storage task module;
[0045] The priority of the channel data recording task module is higher than that of other module tasks such as LCD liquid crystal display and external communication protocol in the system CPU. By waking up the channel data recording task regularly, the channel data recording task can be scheduled and executed periodically, including a task cycle module, a trigger module, a channel data recording module, a judgment module, and a stop channel data recording module;
[0046] The task cycle module is used to schedule and execute regularly in each task cycle. At the same time, the channel data recording task scans the fault trigger logic of 16 intervals in turn in each execution cycle;
[0047] The trigger module is used to judge whether the fault recording wave triggers the recording wave condition. If the trigger is set, the fault recording wave start mark is set, and according to the specific fault trigger attribute, the type of this fault is obtained. The fault types are divided into start recording wave fault, action recording wave fault, and maintenance recording wave fault;
[0048] The channel data recording module is used to query the fault recording wave start mark of 16 intervals in each task cycle. If it is set to 1, according to the analog and digital channel configurations and recording wave frequency configurations of each interval, the intermediate waveform data is recorded, and at the same time, the write pointer is operated to start the channel data recording task;
[0049] The judgment module is used to judge whether the number of points of the fault recording wave reaches the configured maximum number of recording wave points. If not, continue to record;
[0050] The stop channel data recording module is used to stop the channel data recording. When the number of points of the fault recording wave reaches the configured maximum number of recording wave points, the channel data recording is stopped;
[0051] The intermediate waveform data interval cache write disk module includes a cache write disk module and a write pointer module;
[0052] The cache write disk module is used to set an intermediate waveform data cache write disk queue in the intermediate waveform data of each interval. The intermediate waveform data of each interval is managed independently. If faults occur in multiple intervals at the same time, the intermediate waveform data will not overwrite each other. An appropriate number of depths are set for each intermediate waveform data cache write disk queue to ensure that when faults continuously occur in a single interval, the intermediate waveform data will not be abnormally overwritten, and the intermediate waveform data cache write disk queue is managed in a FIFO manner and a cyclic overwrite manner; judge the fault recording wave start marks of 16 intervals. When set to 1, write the intermediate waveform data into the corresponding interval's intermediate waveform data cache write disk queue;
[0053] The write pointer module is used to record the cache of intermediate waveform data; when the channel data recording module completes the recording of a fault recording, the new intermediate waveform data is written to the current memory address pointed to by the write pointer in the write disk queue of the intermediate waveform data cache, and the channel data recording task module operates the write pointer to move to the next position;
[0054] The priority of the waveform file storage task module is lower than the priorities of the LCD liquid crystal display and the external communication protocol task in the system CPU. When the channel data recording module completes the recording of a new intermediate waveform data and writes it to the corresponding write disk queue of the intermediate waveform data cache, the waveform file storage task is awakened at this time. Because the priority of the waveform file storage task is the lowest, this waveform file storage task is scheduled to execute when the system CPU is idle; it includes a task cycle module, a judgment module, a waveform data conversion module, a write disk module, and a multi-interval historical waveform data and fault information report data multi-queue multi-level management module;
[0055] The task cycle module is used to schedule and execute when the system CPU is idle, and at the same time query the read pointer and write pointer in the write disk queues of 16 intermediate waveform data caches at intervals;
[0056] The judgment module is used to judge whether the read pointer and write pointer in the write disk queue of the intermediate waveform data cache are equal. If they are not equal, there is new intermediate waveform data that needs to be saved to disk. At this time, the waveform file storage task reads the new intermediate waveform data according to the position of the read pointer in the write disk queue of the intermediate waveform data cache;
[0057] The waveform data conversion module is used to convert the new intermediate waveform data to be written to disk into the COMTRADE file format;
[0058] The write disk module is used to perform the write disk operation on the intermediate waveform file converted into the COMTRADE file format, generate a waveform file name according to the line interval number, power grid fault number, start time, and fault type information recorded in the intermediate waveform data, and write the waveform file to the disk to generate historical waveform data;
[0059] The multi-queue multi-level management module for multi-interval historical waveform data and fault information report data is used to manage multi-interval historical waveform data and fault information report data; define the format of the complete set of fault information report data of the DTU device, including: line interval number, power grid fault number, start time, fault type, protection action event, complete set of fault parameters, self-check event, change event, protection setting value, etc. data, provide the device with a complete record of the fault information report data during the primary line fault process, and this fault information report data is also recorded in the intermediate waveform data for generating the current complete set of fault information report;
[0060] At this time, it is the read pointer of the write queue of the intermediate waveform data cache for the file storage task operation. When the intermediate waveform data is read and the write disk operation is completed, the read pointer is moved to the next position, and it is judged whether the read pointer is equal to the write pointer. When the read pointer is not equal to the write pointer, the conversion and write disk operation of the new intermediate waveform data continue to loop until all the new intermediate waveform data is written to the disk. When the read pointer is equal to the write pointer, the write queue of the intermediate waveform data cache has been read empty, and the waveform file storage task ends this execution.
[0061] Please refer to Figure 4 and Figure 5 and in combination with Figure 6 as shown, the sub-queue multi-level management of the multi-interval historical waveform data and the fault information report data is specifically as follows:
[0062] Provide the recording channel and trigger logic configuration according to the interval, and configure the digital and analog channel information and the fault trigger logic of each line respectively;
[0063] Scan the fault trigger logic of each line according to the interval, record the data according to the channel configuration information of this line, and store the historical waveform data in the COMTRADE file format, that is, the COMTRADE file, and generate the corresponding complete set of fault reports; the complete set of fault reports contains the interval attribute information, and the stored waveform file name contains the interval attribute, that is, the corresponding COMTRADE file can be uniquely indexed from the complete set of fault reports;
[0064] When the device is initialized and powered on, by traversing the complete set of fault report information of all intervals saved in the non-volatile RAM, the first-level management queues of the three types of faults of each interval are established respectively; then scan the retrieval queues in the three first-level sub-queues of this interval in the interval order to establish the second-level queues; finally scan the retrieval queues in the 16 second-level sub-queues of the DTU device to establish the third-level queues;
[0065] Set the first-level queue, write the complete set of fault information reports into the storage queue corresponding to the fault type of the interval in the first-level queue, and update the retrieval queue; this first-level queue is set to manage the fault information data of a single type of fault inside a single interval, and at the same time includes a storage queue and a retrieval queue. The fault information data is managed in three sub-queues according to the fault type by line, and is divided into three types of fault information data: starting recording wave, action recording wave, and maintenance recording wave. Each type of fault information data maintains a management queue independently. The operations of adding, deleting, and circularly overwriting each type of fault information data are independent of each other. The maximum length of the historical records of each management queue can be configured separately through parameters;
[0066] The storage queue for the overall group of fault reports is managed in a FIFO manner. When the number of nodes in the management queue reaches the maximum historical number, it is managed in a cyclic overwrite manner; the retrieval queue is managed using a doubly linked list. In the information of each linked list node, the index is the relative index number of the overall group of fault reports in the storage queue. The linked list is sorted in the order of the start times of the overall group of fault reports corresponding to the nodes, that is, the head node of the linked list is the overall group of fault reports triggered first, and the tail node of the linked list is the overall group of fault reports triggered most recently. By traversing the retrieval queue of the overall group of fault information reports for starting the recording wave, all the starting fault information of this line can be accessed in sequence; that is, the index of a certain linked list node in the retrieval queue = the relative storage position of the overall group of fault reports in the storage queue;
[0067] Set up a second-level queue, write the overall group of fault information reports into the retrieval queue corresponding to the interval in the second-level management queue, and update the retrieval queue; this second-level queue is set to manage all the fault information within a single interval, and it includes a storage queue and a retrieval queue at the same time. The fault information data is managed in queues according to the line intervals. An independent fault information management queue is created for each interval of each line. The operations of adding, deleting, and cyclic overwriting of the fault information data in each interval are independent of each other;
[0068] The storage queue of this second-level queue is managed in a FIFO manner. When the number of nodes in the management queue reaches the maximum historical number, it is managed in a cyclic overwrite manner. The retrieval queue is managed using a doubly linked list. In the information of each linked list node, the index is the relative index number of the overall group of fault reports in the storage queue. The linked list is sorted in the order of the start times of the overall group of fault reports corresponding to the nodes, that is, the head node of the linked list is the overall group of fault reports triggered first, and the tail node of the linked list is the overall group of fault reports triggered most recently. By traversing the retrieval queue of the overall group of fault information reports for starting the recording wave, all the starting fault information of this line can be accessed in sequence; the second-level queue is created by traversing the three sub-queues of the first-level queue and is arranged in order in the queue according to the order of the fault start times. For tasks such as LCD liquid crystal display, PRINT serial port printing, HMI, and external communication protocol, a fault information access interface for independent query according to the interval number is provided. That is, the length of the second-level management queue for each interval is the sum of the lengths of the three sub-queues of the first-level queue corresponding to that interval,
[0069] That is, the index of a certain linked list node in the second-level retrieval queue = the relative storage position of the overall group of fault reports in the storage queue;
[0070] The index of a certain linked list node in the second-level retrieval queue = the starting offset of the first-level queue + the relative storage position within the first-level queue;
[0071] Set up a third-level queue, write the entire set of fault information reports into the retrieval queue in the third-level management queue, and update the retrieval queue; this third-level queue is set to manage the fault information of all 16 intervals of the DTU device, and at the same time includes a storage queue and a retrieval queue. The third-level queue is generated by traversing the second-level queues of all intervals and is arranged in order according to the sequence of fault start times, so as to provide an access interface for the total fault information of the device for LCD liquid crystal display, PRINT serial port printing, HMI, and external communication protocol tasks, that is, the third-level management queue simultaneously includes the fault information of the second-level queues of 16 lines;
[0072] The storage queue of this third-level queue is managed in a FIFO manner. When the number of nodes in the management queue reaches the maximum historical number, it is managed in a cyclic overwrite manner. The retrieval queue is managed by a doubly linked list. In the information of each linked list node, the index is the relative index number of the entire set of fault reports in the storage queue. The linked list is sorted according to the sequence of the start times of the corresponding entire set of fault reports, that is, the head node of the linked list is the earliest triggered entire set of fault reports, and the tail node of the linked list is the latest triggered entire set of fault reports. By traversing the retrieval queue of the start recording entire set of fault information reports, the access to all start fault information of this line is realized in sequence. The length of the third-level queue is the sum of the lengths of the second-level sub-queues of all intervals and is used to record the total fault information of the DTU device;
[0073] That is, the index of a certain linked list node in the third-level retrieval queue = the storage relative position of the entire set of fault reports in the storage queue;
[0074] The index of a certain linked list node in the third-level retrieval queue = the starting offset of the second-level queue + the storage relative position within the second-level queue;
[0075] The index of a certain linked list node in the third-level retrieval queue = the starting offset of the second-level queue + the starting offset of the first-level queue + the storage relative position within the first-level queue.
[0076] The length information of the second-level queue of each interval can be calculated through configuration information, that is, the length of the second-level queue = the sum of the lengths of the first-level start queue, the first-level action queue, and the first-level maintenance queue. The starting offset of the second-level queue of each interval can also be calculated through the following formula:
[0077] The starting offset of the second-level queue of interval n = ∑ the lengths of the second-level queues of intervals (1, 2,..., n - 1);
[0078] Through the node information of the retrieval queue in the third-level queue, the actual storage position of the entire set of fault reports in the corresponding first-level queue is finally indexed, that is, by traversing the third-level retrieval queue, the fault information of all lines of the DTU device can be accessed in sequence.
[0079] When the DTU device is running, taking the case where a startup type fault occurs on line 1 in the first-level queue and the fault information of this time needs to be recorded as an example, according to the first-level queue, the generated set of fault report information is written into the first-level startup storage queue of line 1, and then the storage index information is inserted into the first-level startup retrieval queue of line 1 to complete the update of the first-level queue; then according to the second-level queue, the storage index information is inserted into the second-level retrieval queue of line 1 to complete the update of the second-level queue, and finally according to the third-level queue, the storage index information is inserted into the third-level retrieval queue of the DTU device to complete the update of the third-level queue.
[0080] When the DTU device is running, considering the situation where the disk storage space quota for storing COMTRADE waveform files is insufficient and a historical fault information record needs to be deleted, taking the deletion of the initial fault information data on the device as an example, find the first node from the third-level index queue, which is the initial fault information at the current fault startup moment of the DTU device. According to the formula of the third-level retrieval queue index, the relative storage position of this fault information in the first-level queue can be calculated. Through the set of fault report information recorded in the relative storage position, the corresponding COMTRADE waveform file stored on the disk and the set of fault report data stored in the non-volatile memory are deleted. Finally, the index information corresponding to the set of fault reports is sequentially deleted from the first-level index queue, the second-level index queue, and the third-level index queue to complete the update operation of the management queue for deleting a historical fault information record this time.
[0081] Embodiment 2
[0082] Corresponding to the distribution DTU multi-interval integrated waveform recording management system in Embodiment 1, this Embodiment 2 provides a distribution DTU multi-interval integrated waveform recording management method. Please refer to Figure 1 and Figure 2 and in combination with Figure 3 as shown, the method includes the following steps:
[0083] Step 01: Set the priority of the channel data recording task to be higher than the priorities of the LCD liquid crystal display and the external communication protocol task in the system CPU. By waking up the channel data recording task regularly, the channel data recording task is scheduled to execute periodically, and at the same time, the channel data recording task scans the fault trigger logics of 16 intervals in sequence in each execution cycle.
[0084] Step 02: Determine whether the fault waveform recording is triggered. If the fault waveform recording is triggered, set the fault waveform recording start flag, and obtain the type of this fault according to the specific fault trigger attribute, that is, startup waveform recording, action waveform recording, and maintenance waveform recording.
[0085] Step 03: Query the fault recording start flags of all intervals in each task cycle. If set to 1, start recording intermediate waveform data according to the analog and digital channel configurations and recording frequency configurations of 16 intervals. At the same time, operate the write pointer to start the channel data recording task;
[0086] Step 04: Determine whether the number of recorded waveform points has reached the specified number. If not, return to Step 02. After reaching, stop the channel data recording task and set the completion flag. Judge the completion flags of 16 intervals. If set to 1, write the intermediate waveform data of the corresponding interval into the disk write queue of the intermediate waveform data cache;
[0087] Step 05: Set the disk write queue of the intermediate waveform data cache for 16 intervals. The intermediate waveform data of each interval is managed independently, and an appropriate number of depths are set for each disk write queue of the intermediate waveform data cache to ensure that when a single interval has continuous superimposed faults, the intermediate waveform data will not be abnormally overwritten. The disk write queue of the intermediate waveform data cache is managed in a FIFO manner. When the number of management queue nodes reaches the maximum historical number, it is managed in a cyclic overwrite manner;
[0088] Step 06: Record the cache of the intermediate waveform data; when the channel data recording task completes the recording of a fault recording, the intermediate waveform data is written to the current memory address pointed to by the write pointer in the disk write queue of the intermediate waveform data cache, and the channel data recording task operates the write pointer to move to the next position;
[0089] Step 07: Set the priority of the waveform file storage task to be lower than the priorities of the LCD liquid crystal display and the external communication protocol task in the system CPU. When the channel data recording task ends the recording of a new intermediate waveform data and writes it into the corresponding disk write queue of the intermediate waveform data cache, wake up the waveform file storage task. Because the priority of the waveform file storage task is the lowest, this waveform file storage task is scheduled to execute when the system CPU is idle. At the same time, the waveform file storage task queries the read pointer and write pointer in the disk write queue of the intermediate waveform data cache of 16 intervals;
[0090] Step 08: Determine whether the read pointer and write pointer in the disk write queue of the intermediate waveform data cache are equal. If not, start the disk write operation of the new intermediate waveform data. If equal, return to Step 07 to continue the loop;
[0091] Step 09: The waveform file storage task extracts the new intermediate waveform data to be written to the disk according to the position of the read pointer in the disk write queue of the intermediate waveform data cache, converts it into the COMTRADE file format, generates a waveform file according to the line interval number, power grid fault number, start time, and fault type information recorded in the intermediate waveform data, and writes the waveform file to the disk to generate historical waveform data;
[0092] Step 10: Extract the converted COMTRADE file, perform the disk writing operation, and manage the multi-interval historical waveform data and fault information report data. Define the data format of the overall fault information report data for the DTU device, including: line interval number, power grid fault number, start time, fault type, protection action event, overall fault parameters, self-check event, change event, protection setting values, etc. Provide a complete record of the fault information report data for the primary line fault process of the device. This fault information report data is also recorded in the intermediate waveform data for generating the overall fault information report for this time. At this time, the read pointer of the disk writing queue for caching the intermediate waveform data in the waveform file storage task operates. After reading the intermediate waveform data and ending the disk writing operation, move the read pointer to the next position and determine whether the read pointer is equal to the write pointer. If the read pointer is not equal to the write pointer, continue to loop for the conversion and disk writing operation of the new intermediate waveform data until all new intermediate waveform data has completed disk writing. When the read pointer is equal to the write pointer, the disk writing queue for caching the intermediate waveform data is already emptied, and the waveform file storage task ends this execution.
[0093] The management of the multi-interval historical waveform data and fault information report data specifically includes the following steps:
[0094] Step S01: Provide the recording channel and trigger logic configuration for each interval, and configure the digital and analog channel information and fault trigger logic for each line respectively;
[0095] Step S02: Scan the fault trigger logic of each line according to the interval, record the data according to the channel configuration information of this line, and store the historical waveform data in the COMTRADE file format, that is, the COMTRADE file, and generate the corresponding overall fault report; the overall fault report contains interval attribute information, and the stored waveform file name contains interval attributes, that is, the corresponding COMTRADE file can be uniquely indexed from the overall fault report;
[0096] Step S03: When the device is initialized and powered on, by traversing the overall fault report information of all intervals saved in the non-volatile RAM, establish the first-level management queue for the three types of faults of each interval respectively; then scan the retrieval queue in the three first-level sub-queues of this interval in the interval order to establish the second-level queue; finally, scan the retrieval queue in the 16 second-level sub-queues of the DTU device to establish the third-level queue;
[0097] Step S04: Set up the first-level queue, write the entire set of fault information reports into the storage queue corresponding to the interval fault type in the first-level queue, and update the retrieval queue. The first-level queue is set to manage the fault information data of a single fault type within a single interval, and includes a storage queue and a retrieval queue. The fault information data is managed in three sub-queues according to the fault type by line, namely, starting waveform recording, action waveform recording, and maintenance waveform recording. Each type of fault information data maintains a separate management queue, and the operations of adding, deleting, and circularly overwriting each type of fault information data are independent of each other. The maximum length of the historical records of each management queue can be configured separately through parameters.
[0098] The storage queue of the entire set of fault reports is managed in a FIFO manner. When the number of nodes in the management queue reaches the maximum historical number, it is managed in a circular overwrite manner. The retrieval queue is managed using a doubly linked list. In the information of each linked list node, the index is the relative index number of the entire set of fault reports in the storage queue. The linked list is sorted according to the chronological order of the start times of the entire set of fault reports corresponding to the nodes, that is, the head node of the linked list is the earliest triggered entire set of fault reports, and the tail node of the linked list is the latest triggered entire set of fault reports. By traversing the retrieval queue of the starting waveform recording entire set of fault information reports, all the starting fault information of this line can be accessed in sequence. That is, the index of a certain linked list node in the retrieval queue = the relative storage position of the entire set of fault reports in the storage queue.
[0099] Step S05: Set up the second-level queue, write the entire set of fault information reports into the retrieval queue corresponding to the interval in the second-level management queue, and update the retrieval queue. The second-level queue is set to manage all the fault information within a single interval, and includes a storage queue and a retrieval queue. The fault information data is managed in queues according to line intervals. An independent fault information management queue is created for each interval of each line. The operations of adding, deleting, and circularly overwriting the fault information data of each interval are independent of each other.
[0100] The storage queue of the second-level queue is managed in a FIFO manner. When the number of management queue nodes reaches the maximum historical number, it is managed in a circular overwrite manner. The retrieval queue is managed using a doubly linked list. In the information of each linked list node, the index is the relative index number of the entire group of fault reports in the storage queue. The linked list is sorted in the order of the start times of the corresponding entire group of fault reports, that is, the head node of the linked list is the entire group of fault reports triggered first, and the tail node of the linked list is the entire group of fault reports triggered most recently. By traversing the retrieval queue of the entire group of fault information reports for starting the oscillograph, all the starting fault information of this line can be accessed in sequence. The second-level queue is created by traversing the three sub-queues of the first-level queue and is arranged in order in the queue according to the sequence of fault start times. It provides a fault information access interface for external devices such as LCD liquid crystal display, PRINT serial port printing, HMI, and protocol specifications such as external communication protocols for independent query by interval number. That is, the length of the second-level management queue for each interval is the sum of the lengths of the three sub-queues of the first-level queue for the corresponding interval.
[0101] That is, the index of a certain linked list node in the second-level retrieval queue = the relative storage position of the entire group of fault reports in the storage queue;
[0102] The index of a certain linked list node in the second-level retrieval queue = the starting offset of the first-level queue + the relative storage position within the first-level queue;
[0103] Step S06: Set the third-level queue, write the entire group of fault information reports into the retrieval queue of the third-level management queue, and update the retrieval queue. The third-level queue is set to manage the fault information of all 16 intervals of the DTU device and includes both a storage queue and a retrieval queue. The third-level queue is generated by traversing the second-level queues of all intervals and is arranged in order in the queue according to the sequence of fault start times. It provides a device total fault information access interface for external devices such as LCD liquid crystal display, PRINT serial port printing, HMI, and protocol specifications such as external communication protocols. That is, the third-level management queue simultaneously includes the fault information of the second-level queues of 16 lines.
[0104] The storage queue of the third - level queue is managed in a FIFO manner. When the number of management queue nodes reaches the maximum historical number, it is managed in a circular overwrite manner. The retrieval queue is managed by a doubly - linked list. In the information of each linked - list node, the index is the relative index number of the whole - set fault report in the storage queue. The linked list is sorted in the order of the start times of the corresponding whole - set fault reports, that is, the head node of the linked list is the whole - set fault report triggered first, and the tail node of the linked list is the whole - set fault report triggered most recently. By traversing the retrieval queue of the start - recording whole - set fault information reports, all the start - fault information of this line can be accessed in sequence. The length of the third - level queue is the sum of the lengths of all the second - level sub - queues of all intervals, which is used to record the total fault information of the DTU device;
[0105] That is, the index index of a certain linked - list node in the third - level retrieval queue = the relative storage position of the whole - set fault report in the storage queue;
[0106] The index index of a certain linked - list node in the third - level retrieval queue = the starting offset of the second - level queue+the relative storage position within the second - level queue;
[0107] The index index of a certain linked - list node in the third - level retrieval queue = the starting offset of the second - level queue+the starting offset of the first - level queue+the relative storage position within the first - level queue.
[0108] The length information of the second - level queue of each interval can be calculated through the configuration information, that is, the length of the second - level queue = the length of the first - level start queue+the length of the first - level action queue+the length of the first - level maintenance queue. The starting offset of the second - level queue of each interval can also be calculated through the following formula:
[0109] The starting offset of the second - level queue of interval n = ∑ the lengths of the second - level queues of intervals (1, 2, …, n - 1);
[0110] Through the node information of the retrieval queue in the third - level queue, the actual storage position of the whole - set fault report in the corresponding first - level queue can be finally indexed, that is, all the fault information of all lines of the DTU device can be accessed in sequence by traversing the third - level retrieval queue.
[0111] Step S07: When the DTU device is running, taking the case where a start - type fault occurs on line 1 in the first - level queue and this fault information needs to be recorded as an example. According to the first - level queue, the generated whole - set fault report information is written into the first - level start storage queue of line 1, and then the storage index information is inserted into the first - level start retrieval queue of line 1 to complete the update of the first - level queue; then according to the second - level queue, the storage index information is inserted into the second - level retrieval queue of line 1 to complete the update of the second - level queue, and finally according to the third - level queue, the storage index information is inserted into the third - level retrieval queue of the DTU device to complete the update of the third - level queue.
[0112] When the DTU device is running, considering the situation where the disk storage space quota for storing COMTRADE waveform files is insufficient, it is necessary to delete a historical fault information record. Taking the deletion of the initial fault information data on the device as an example, in the third-level index queue, find the first node, which is the initial fault information at the current fault start time of the DTU device. According to the formula of the third-level retrieval queue index, the relative storage position of this fault information in the first-level queue can be calculated. Through the entire set of fault report information recorded in the relative storage position, delete the corresponding COMTRADE waveform file stored on the disk and the entire set of fault report data stored in the non-volatile memory. Finally, delete the index information of the corresponding entire set of fault reports from the first-level index queue, the second-level index queue, and the third-level index queue in sequence to complete the update operation of the management queue for deleting a historical fault information record this time.
Claims
1. A multi-interval integrated wave recording management system for a distribution DTU, comprising: Channel data recording task module, intermediate waveform data interval cache writing disk module, waveform file storage task module; The channel data recording task module includes a task cycle module, a trigger module, a channel data recording module, and a judgment module; The task cycle module is used to schedule and execute regularly in each task cycle, and at the same time scan the fault trigger logic at intervals; The trigger module is used to judge whether the fault recording is triggered and set the fault recording start flag; The channel data recording module is used to query the fault recording start flags of all intervals in each task cycle, record the intermediate waveform data at intervals, and operate the write pointer at the same time; The judgment module is used to judge whether the number of points of the fault recording reaches the specified number of points, and stop the channel data recording if it reaches; The intermediate waveform data interval cache writing disk module includes a cache writing disk module and a write pointer module; The cache writing disk module is used to set an intermediate waveform data cache writing disk queue in the intermediate waveform data of each interval; The write pointer module is used to record the cache of the intermediate waveform data; When the channel data recording module completes the recording of a fault recording, the intermediate waveform data is written to the current memory address pointed to by the write pointer in the intermediate waveform data cache writing disk queue, and the channel data recording task module operates the write pointer to move to the next position; The waveform file storage task module includes a task cycle module, a detection module, a waveform data conversion module, a writing disk module, and a multi-interval historical waveform data and fault information report data sub-queue multi-level management module; The task cycle module is used to schedule and execute when the system CPU is idle, and at the same time query the read pointer and write pointer in the intermediate waveform data cache writing disk queue of all intervals; The detection module is used to judge whether the read pointer and write pointer in the intermediate waveform data cache writing disk queue are equal; The waveform data conversion module is used to convert the new intermediate waveform data to be written to the disk into the COMTRADE file format; The writing disk module is used to perform a writing disk operation on the intermediate waveform file converted into the COMTRADE file format; The multi-interval historical waveform data and fault information report data sub-queue multi-level management module provides the recording channel and trigger logic configuration at intervals, and configures the digital and analog channel information and fault trigger logic of each line; Set multi-level queues to manage multi-interval historical waveform data and fault information report data; the multi-level queues include a first-level queue, a second-level queue, and a third-level queue; The first-level queue includes a storage queue and a retrieval queue; the fault information data is managed in three sub-queues according to the fault type of the line, and is divided into three types of fault information data: start recording wave, action recording wave, and maintenance recording wave, The second-level queue manages the fault information data in queues according to the line interval, and the third-level queue manages the fault information of all intervals in the DTU device, which is used to record the total fault information of the DTU device.
2. The distribution DTU multi-interval integrated recording wave management system according to claim 1, characterized in that: The length of each intermediate waveform data cache write disk queue is set so that the intermediate waveform data is not overwritten in the case of continuous superposition of faults in a single interval; the intermediate waveform data cache write disk queue is managed in a FIFO (First In First Out) manner. When the number of queue nodes reaches the maximum number, the oldest node is cyclically overwritten.
3. The integrated multi-interval fault recording management system for distribution DTU according to claim 1, characterized in that: The sub-queue multi-level management module for multi-interval historical waveform data and fault information report data scans the fault trigger logic of each line according to the interval, records data according to the channel configuration information of this line, stores the historical waveform data in the COMTRADE file format to form a COMTRADE file, and generates the corresponding complete set of fault reports; the complete set of fault reports contains interval attribute information, and the stored waveform file name contains interval attributes, that is, the corresponding COMTRADE file can be uniquely indexed from the complete set of fault reports.
4. The integrated multi-interval fault recording management system for distribution DTU according to claim 3, characterized in that: A first-level queue is set up, and each type of fault information data maintains an independent management queue. The operations of adding, deleting, and cyclically overwriting each type of fault information data are independent of each other. The maximum length of the historical records of each management queue can be configured separately through parameters; The management queues of the three types of fault information data are managed in a FIFO (First In First Out) manner inside. When the number of management queue nodes reaches the maximum historical number, the oldest node is cyclically overwritten; The index formula for a certain node in the first-level queue is: First-level queue node index = relative storage sequence number in the queue; A second-level queue is set up, and each interval of each line creates an independent fault information management queue. The operations of adding, deleting, and cyclically overwriting the fault information data of each interval are independent of each other. The maximum length of the historical records of each management queue is equal to the sum of the lengths of starting fault recording, action fault recording, and maintenance fault recording within the interval, that is, the length of the second-level management queue of each interval is the sum of the lengths of the three sub-queues of the first-level queue corresponding to the interval; The second-level queue is created by traversing the three sub-queues of the first-level queue and is arranged in order in the queue according to the sequence of fault starting moments. It provides a fault information access interface for external devices and protocol specifications to query independently according to the interval number. The index formula for a certain node in the second-level queue is: Second-level queue node index = first-level sub-queue starting offset + first-level queue node index; A third-level queue is set up, and the length of the third-level queue is the sum of the lengths of the second-level sub-queues of all intervals; the third-level queue is generated by traversing the second-level queues of all intervals and is arranged in order in the third-level queue according to the sequence of fault starting moments. It provides a device total fault information access interface for external devices and protocol specifications; The index formula for a certain node in the third-level queue is: Third-level queue node index = second-level sub-queue starting offset + second-level node index.
5. A multi-interval integrated wave recording management method for a distribution DTU, characterized in that, Including the following steps: Step 01: Provide oscillographic channel and trigger logic configuration at intervals, configure digital and analog channel information and fault trigger logic for each line; schedule and execute regularly in each task cycle, and scan the fault trigger logic at intervals simultaneously; Step 02: Determine whether the fault recording is triggered and set the fault recording start flag; Step 03: Query the fault recording start flags of all intervals in each task cycle, record the intermediate waveform data at intervals, and operate the write pointer simultaneously; Step 04: Determine whether the number of recorded points reaches the specified number. If not, return to Step 02. After reaching, stop the channel data recording task; Step 05: Set the intermediate waveform data cache write disk queue in the intermediate waveform data of each interval; Step 06: Record the cache of the intermediate waveform data; when the channel data recording task completes the recording of a fault recording, write the intermediate waveform data to the current memory address pointed to by the write pointer in the intermediate waveform data cache write disk queue, and the channel data recording task operates the write pointer to move to the next position; Step 07: Schedule and execute the waveform file storage task during the idle time of the system CPU, and query the read pointer and write pointer in the intermediate waveform data cache write disk queue of all intervals simultaneously; Step 08: Determine whether the read pointer and write pointer in the intermediate waveform data cache write disk queue are equal. If not, start the write disk operation of the new intermediate waveform data; Step 09: Extract the new intermediate waveform data to be written to disk and convert it to the COMTRADE file format; Step 10: Extract the converted COMTRADE file, perform the write disk operation, and determine whether the read pointer and write pointer are equal. If equal, complete the file write disk operation; Step 11: Set up a multi-level queue, and manage the historical waveform data and fault information report data of multiple intervals simultaneously. The multi-level queue includes a first-level queue, a second-level queue, and a third-level queue; the first queue includes a storage queue and a retrieval queue, and manages the fault information data according to the fault type of each line into three sub-queues, namely start recording wave, action recording wave, and maintenance recording wave. The second-level queue manages the fault information data according to the line interval sub-queue, and the third-level queue manages the fault information of all intervals in the DTU device, which is used to record the total fault information of the DTU device.
6. The multi-interval integrated oscillographic management method for a distribution DTU according to claim 5, characterized in that: The length of each intermediate waveform data cache write disk queue is considered to ensure that the intermediate waveform data is not overwritten in the case of continuous superimposed faults in a single interval. The intermediate waveform data cache write disk queue is managed in a FIFO (First In First Out) manner. When the number of queue nodes reaches the maximum number, the oldest node is cyclically overwritten.
7. The multi-interval integrated oscillographic management method for a distribution DTU according to claim 5, characterized in that: The management of multi-interval historical waveform data and fault information report data scans the fault trigger logic of each line according to the interval, records data according to the channel configuration information of this line, and stores the historical waveform data in the format of COMTRADE files to form COMTRADE files, and generates corresponding complete set of fault reports; the complete set of fault reports contains interval attribute information, and the stored waveform file name contains interval attributes, that is, the corresponding COMTRADE file can be uniquely indexed from the complete set of fault reports.
8. The integrated recording management method for multiple intervals of a power distribution DTU according to claim 7, characterized in that, The management of multi-interval historical waveform data and fault information report data includes the following steps: S01. Provide oscillographic channel and trigger logic configuration according to the interval, and configure the digital and analog channel information and fault trigger logic of each line respectively; S02. Scan the fault trigger logic of each line according to the interval, record data according to the channel configuration information of this line, and store the historical waveform data in the format of COMTRADE files, that is, COMTRADE files, and generate corresponding complete set of fault reports; the complete set of fault reports contains interval attribute information, and the stored waveform file name contains interval attributes, that is, the corresponding COMTRADE file can be uniquely indexed from the complete set of fault reports; S03. Set the first-level queue, and maintain a management queue for each type of fault information data separately. The operations of adding, deleting, and circularly overwriting each type of fault information data are independent of each other. The maximum length of the historical records of each management queue can be configured separately through parameters; The management queues of the three types of fault information data are managed in the FIFO (First In First Out) manner internally. When the number of nodes in the management queue reaches the maximum historical number, the oldest node is circularly overwritten; The index formula of a certain node in the queue is: the index of the first-level queue node = the relative storage sequence number in the queue; S04. Set the second-level queue, and create an independent fault information management queue for each interval of each line. The operations of adding, deleting, and circularly overwriting the fault information data of each interval are independent of each other. The maximum length of the historical records of each management queue is equal to the sum of the lengths of starting oscillography, action oscillography, and maintenance oscillography within the interval, that is, the length of the second-level management queue of each interval is the sum of the lengths of the three sub-queues of the first-level queue corresponding to the interval; The second-level queue is created by traversing the three sub-queues of the first-level queue, and is arranged in order in the queue according to the sequence of the fault start time. For tasks such as LCD liquid crystal display, PRINT serial port printing, HMI, and external communication protocol, a fault information access interface for independent query according to the interval number is provided. The index formula of a certain node in the queue is: The index of the second-level queue node = the starting offset of the first-level sub-queue + the index of the first-level queue node; S05. Set the third-level queue, and the length of the third-level queue is the sum of the lengths of the second-level sub-queues of all intervals; The third-level queue is generated by traversing the second-level queues of all intervals, and is arranged in order in the queue according to the sequence of the fault start time, so as to provide an access interface for the total device fault information for tasks such as LCD liquid crystal display, PRINT serial port printing, HMI, and external communication protocol; The index formula for a certain node in the queue is: The index of the third-level queue node = The starting offset of the second-level sub-queue + The index of the second-level node.
Citation Information
Patent Citations
Integrated data recording and analyzing device and COMTRADE (Common Format for Transient Data Exchange for Power System) split file method
CN102957202A
Power fault recording storage method and device
CN103019957A