A high-performance dynamic refresh method for real-time simulation waveforms of power systems

By intelligently adjusting the waveform refresh frequency and adopting floating-point number compression and multi-packet transmission technology, the problem of resource waste and response speed reduction in large-scale power system simulation data processing is solved, achieving efficient data processing and smooth visual experience.

CN119150592BActive Publication Date: 2025-03-25JIANGSU KUNYOU ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411661908.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-25
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

When processing large-scale power system simulation data, it is difficult to achieve fast and accurate waveform display, resulting in waste of system resources and reduced response speed.

Method used

By intelligently adjusting the waveform refresh frequency, using floating point compression and multi-packet transmission technology, the real-time simulation data of the power system is efficiently transmitted and processed, and the refresh frequency is dynamically adjusted to adapt to the changes in the waveform number.

Benefits of technology

It improves data processing efficiency, provides a richer and smoother visual experience, reduces network bandwidth usage, and enhances the adaptability and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150592B_ABST
    Figure CN119150592B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of monitoring technology for real-time simulation of power systems, and provides a high-performance dynamic refresh method for real-time simulation waveforms of power systems. The method of the present invention includes capturing real-time simulation data of the power system through network software, and sending the data to a host computer through a link layer message; using floating point compression and multi-packet transmission to transmit the data to the host computer for processing and display; the host computer receives the data, updates and maintains the data pool in real time; the host computer dynamically adjusts the refresh frequency according to the number of waveforms currently opened for viewing. The method can dynamically adjust the waveform refresh cycle according to the number of waveforms currently loaded by the system, thereby improving data processing efficiency and user interaction experience. The effect of the method is comparable to that of a traditional pure hardware oscilloscope. These technologies include an efficient server-host computer communication mechanism, a dynamic waveform refresh strategy, and an advanced data compression algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of monitoring of real-time simulation of electric power systems, and in particular to a high-performance dynamic refreshing method for real-time simulation waveforms of electric power systems. Background Art

[0002] In the field of power system simulation, real-time monitoring and analysis of power grid status is crucial to ensure the stable operation of the power grid. As the complexity of the power system increases, the requirements for real-time data processing and display also increase accordingly. Especially in large-scale power system simulation, how to quickly and accurately display the simulation results to users in the form of dynamic waveforms has become the key to improving system performance.

[0003] Traditionally, high-precision waveform display relies on pure hardware oscilloscopes, which are widely favored for their fast and accurate characteristics. Software-based waveform refresh technology often has a fixed refresh rate or adopts a unified processing strategy for all waveforms, which can easily cause a waste of system resources or a decrease in response speed when processing large amounts of data. Summary of the invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a high-performance dynamic refresh method for real-time simulation waveforms of power systems, which can be used to improve the performance and user experience of real-time simulation of power systems. By intelligently adjusting the waveform refresh frequency, it not only improves data processing efficiency, but also provides users with a richer and smoother visual experience.

[0006] To solve the above technical problems, the present invention provides the following technical solutions, a high-performance dynamic refresh method for real-time simulation waveforms of an electric power system, comprising: capturing real-time simulation data of the electric power system through network software, and sending the data to a host computer through a link layer message; using floating-point compression and multi-packet transmission to transmit the data to the host computer for processing and display; the host computer receives the data, and updates and maintains the data pool in real time; the host computer dynamically adjusts the refresh frequency according to the number of waveforms currently opened for viewing.

[0007] As a preferred solution of the high-performance dynamic refresh method for real-time simulation waveform of an electric power system described in the present invention, the real-time simulation data of the electric power system is captured, including that the real-time simulation data comes from the simulation software and hardware-in-the-loop simulation platform of the electric power system, the software is used to capture the data, and the high-frequency analog signal is processed and converted into a digital signal through a professional high-speed data acquisition card.

[0008] Real-time simulation data includes voltage amplitude, phase, frequency, current amplitude, phase, frequency, active power, reactive power, apparent power, as well as the system's switching status, protection device status, control signal status, and in certain cases, environmental factors that affect the performance of the power system.

[0009] As a preferred solution of the high-performance dynamic refresh method of the real-time simulation waveform of the power system described in the present invention, the sending of data through the link layer message includes that the server quickly captures the real-time simulation data of the power system through high-performance network software, and sends the waveform sampling data to the host computer through the link layer message.

[0010] As a preferred solution of the high-performance dynamic refresh method for real-time simulation waveform of a power system described in the present invention, wherein: the floating point number compression includes, when the number of waveforms is large and a single Ethernet packet cannot accommodate all waveform data, a two-level optimization strategy is adopted;

[0011] Floating point compression: compresses the floating point numbers in the waveform data. Through algorithm optimization, the floating point numbers are compressed from double precision to single precision, reducing the byte size required for each waveform data point, allowing more waveform data to be transmitted in the same size Ethernet packet, and compressing double precision floating point numbers into single precision floating point numbers;

[0012] Set the data to D, D is a single-precision floating point number, and the data range is [Dmin, Dmax]. Then convert the floating point number to a fixed point number I according to the following formula:

[0013] ,

[0014] The outermost calculation is rounded down, and n is 16. Through the above method, the data volume can be reduced from the original 8 bytes per data point to 2 bytes, and the compression ratio reaches 75%. At the same time, the compression algorithm strikes a balance between the compression ratio and the loss of data precision, ensuring that the accuracy and effectiveness of the waveform data are not destroyed.

[0015] As a preferred solution of the high-performance dynamic refresh method for real-time simulation waveform of a power system described in the present invention, the multi-packet transmission includes, when one Ethernet packet cannot carry all necessary waveform data, dividing the entire data according to the maximum load capacity of the Ethernet packet, generating multiple data packets, and sending them in sequence according to the sequence number order;

[0016] When receiving data packets, the host computer caches the data according to the packet header information and temporarily stores the received data packets in the cache area; checks whether all data packets have been received in the cache area; when all data packets are received, the load part of the data packets is spliced ​​in sequence to reconstruct complete waveform data; and verifies data integrity through checksums to ensure that the data has not been tampered with or damaged during transmission.

[0017] As a preferred solution of the high-performance dynamic refresh method for real-time simulation waveform of a power system described in the present invention, wherein: the real-time updating and maintaining of the data pool includes real-time updating and maintaining a data pool for a period of 1 second, the data pool contains all waveform data within the last second, and the data pool adopts a dynamic sliding window and double buffering strategy;

[0018] Maintain the data pool data structure. The data pool is regarded as a circular buffer with a length of N, where N represents the number of sampling points required within 1 second. When the data is updated, each time a new data block is received, the existing data in the data pool is shifted left by M bits, where M is the number of data points in the new data block. The newly received data block is inserted into the end of the data pool, i.e., the entrance. When the left shift operation causes the data to exceed the buffer range, a circular overwrite is performed to ensure that the length of the data pool is always N.

[0019] The double buffering strategy includes that new data is first written into the background buffer, and at the display refresh time, the pointers of the foreground buffer and the background buffer are exchanged.

[0020] As a preferred solution of the high-performance dynamic refresh method for real-time simulation waveform of a power system described in the present invention, the dynamic adjustment of the refresh frequency includes setting the data refresh rate of the server to always be maintained at 100 frames per second, and the display refresh frequency F of the host computer is adjusted according to the number of waveforms W, and the formula is as follows:

[0021] ,

[0022] The host computer uses a timer or timer interrupt mechanism. According to the calculated refresh frequency, when the number of waveforms exceeds the preset value, the refresh frequency is reduced to reduce the usage of the CPU and GPU and prevent system freezes; when the number of waveforms is lower than the preset value, the refresh frequency is increased to provide a smoother display effect.

[0023] Another object of the present invention is to provide a high-performance dynamic refresh system for real-time simulation waveforms of power systems, which can be integrated with existing power system simulation platforms or used as an independent waveform display and analysis tool. The present invention can be widely used in various links of the power industry, especially in large-scale power system monitoring and fault analysis, showing great potential.

[0024] As a preferred solution of the high-performance dynamic refresh system of real-time simulation waveform of a power system described in the present invention, it includes a server 100 and a host computer 200, wherein the server 100 includes:

[0025] The data acquisition module 110 uses a high-precision timer and a high-performance computing unit to ensure that the simulation data is collected at a fixed sampling rate;

[0026] The data compression module 120 implements a floating point number compression algorithm to compress the simulation data from double precision floating point numbers to fixed point numbers;

[0027] The data packing and multi-packet transmission module 130 divides the compressed data according to the maximum load of the Ethernet packet, generates multiple data packets, and uses a high-performance network programming interface to send data at the link layer, bypassing the TCP / IP protocol stack and reducing transmission delay;

[0028] The host computer 200 includes:

[0029] The data receiving module 210 includes a network interface and a data reassembly program. The network interface uses Qt's QUdpSocket or a custom network module to receive data packets sent by the server at the link layer. The data reassembly program sorts and splices multiple packets of data according to the sequence number according to the packet header information to reassemble the complete waveform data.

[0030] The data pool management module 220 implements dynamic sliding windows, uses a circular buffer to store waveform data within the last second, and uses two DataPool instances for data update and graphic display;

[0031] The dynamic waveform refresh module 230 dynamically sets the timer interval according to the current waveform quantity to control the refresh frequency.

[0032] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, it implements the steps of a high-performance dynamic refresh method for real-time simulation waveforms of an electric power system.

[0033] A computer-readable storage medium stores a computer program thereon, characterized in that when the computer program is executed by a processor, the steps of a high-performance dynamic refresh method for real-time simulation waveforms of an electric power system are implemented.

[0034] The beneficial effects of the present invention are: reducing bandwidth occupancy, by compressing floating point numbers, significantly reducing the amount of data required for a single transmission, and effectively alleviating the pressure on network bandwidth. Improving transmission efficiency, the multi-packet transmission strategy enables a large amount of data to be effectively segmented and transmitted continuously, ensuring the integrity of the data while improving the efficiency of the transmission process. Enhancing system adaptability: This flexible data processing method enables the system to better adapt to power system simulations of different scales, especially when processing large-scale data, and maintain high efficiency and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0036] Figure 1 A schematic flow chart of a high-performance dynamic refresh method for real-time simulation waveforms of an electric power system provided by an embodiment of the present invention.

[0037] Figure 2 A schematic diagram of a framework of a high-performance dynamic refresh method for real-time simulation waveforms of an electric power system provided by an embodiment of the present invention.

[0038] Figure 3 A waveform interface schematic diagram of a high-performance dynamic refresh method for real-time simulation waveforms of an electric power system provided by an embodiment of the present invention.

[0039] Figure 4 A schematic diagram of working modules of a high-performance dynamic refresh system for real-time simulation waveforms of an electric power system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0042] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0043] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0044] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0045] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0046] Example 1, reference Figure 1 , which is the first embodiment of the present invention, and provides a high-performance dynamic refresh method for real-time simulation waveform of a power system, comprising:

[0047] S1: Capture the real-time simulation data of the power system through network software and send the data to the host computer through link layer messages.

[0048] Furthermore, real-time simulation data comes from the simulation software and hardware-in-the-loop simulation platform of the power system, which uses software to capture data and processes high-frequency analog signals and converts them into digital signals through professional high-speed data acquisition cards;

[0049] Real-time simulation data includes voltage amplitude, phase, frequency, current amplitude, phase, frequency, active power, reactive power, and apparent power; it also includes the system's switching status, the status of protection devices, the status of control signals, and in certain cases, environmental factors that affect the performance of the power system.

[0050] It should be noted that the sending of data through the link layer message includes that the server quickly captures the real-time simulation data of the power system through high-performance network software, and sends the waveform sampling data to the host computer through the link layer message:

[0051] ,

[0052] in, Represents multi-point data aggregated within the packet transmission time interval, Indicates the transmission frequency, Indicates the time interval between data packet transmissions. Indicates time, Represents the data of a single sampling point after information filtering and normalization.

[0053] S2: Use floating point compression and multi-packet transmission to transmit data to the host computer for processing and display.

[0054] Furthermore, when the number of waveforms is so large that a single Ethernet packet (1500 bytes) cannot accommodate all waveform data, the present invention adopts a two-level optimization strategy to ensure the efficiency and integrity of data transmission.

[0055] The first is floating point compression, which compresses the floating point numbers in the waveform data. Waveform data is usually represented by double-precision floating point numbers (64 bits). To reduce the amount of data, a floating point compression algorithm is used to compress double-precision floating point numbers into fixed-point numbers in a specific format.

[0056] The compression process is as follows:

[0057] a) For each double-precision floating-point number, obtain a single-precision floating-point number by type conversion;

[0058] b) The variables of power system simulation all have ranges. For example, the short-circuit current of equipment generally does not exceed 10 times the rated current. Assuming the data is D, D is a single-precision floating-point number, and the data range is [Dmin, Dmax], the floating-point number is converted to a fixed-point number I according to the following formula:

[0059] ,

[0060] The outermost calculation is rounded down, and n is 16. Through the above method, the data volume can be reduced from the original 8 bytes per data point to 2 bytes, and the compression ratio reaches 75%. At the same time, the compression algorithm strikes a balance between the compression ratio and the loss of data precision, ensuring that the accuracy and effectiveness of the waveform data are not destroyed.

[0061] Furthermore, the multi-packet transmission includes that when one Ethernet packet cannot carry all necessary waveform data, the system will automatically distribute the data into multiple Ethernet packets; they will be sent in sequence, and the host computer will reassemble the scattered data packets according to the packet header information to ensure the integrity and continuity of the data;

[0062] When the compressed data still cannot be transmitted in one Ethernet packet, a multi-packet transmission strategy is adopted. The packet splitting strategy is as follows. First is the packet header design. The header of each data packet contains the following information:

[0063] a) Packet identifier: used to identify a complete data transmission process.

[0064] b) Sequence number: The order of the current data packet in the entire transmission sequence.

[0065] c) Total number of packets: The total number of data packets that need to be sent for this transmission.

[0066] d) Timestamp: The time when data is sampled, used for data reorganization and synchronization.

[0067] e) Check code: used for data verification to ensure data integrity.

[0068] f) Data payload: contains compressed waveform data.

[0069] Then comes the multi-packet transmission process, as follows:

[0070] The entire data is divided into multiple data packets according to the maximum load capacity of the Ethernet packet, and sent in sequence according to the sequence number.

[0071] Finally, there is the data reassembly process, which is as follows: when the upper computer receives a data packet, it performs the following operations according to the packet header information: data caching, temporarily storing the received data packet in the cache; integrity check, checking whether all data packets have been received in the cache; data reassembly, when all data packets have been received, splicing the load part of the data packet in sequence to reassemble the complete waveform data; data verification, verifying the data integrity through the checksum to ensure that the data has not been tampered with or damaged during transmission.

[0072] S3: The host computer receives data, updates and maintains the data pool in real time.

[0073] Furthermore, the real-time updating and maintaining of the data pool includes, after the host computer receives the data, updating and maintaining a data pool for 1 second in real time. The data pool adopts a dynamic sliding window and double buffering strategy, which is specifically described as follows:

[0074] Dynamic sliding window technology: Maintain the data pool data structure. The data pool can be regarded as a circular buffer with a length of N, where N represents the number of sampling points required within 1 second (for example, if the sampling rate is 1000Hz, then N=1000). When the data is updated, each time a new data block is received, the existing data in the data pool is shifted left by M bits, where M is the number of data points in the new data block. The newly received data block is inserted into the end (entrance) of the data pool. If the left shift operation causes the data to exceed the buffer range, a circular overwrite is performed to ensure that the data pool length is always N. Through the dynamic sliding window, the data pool can reflect the waveform data within the last 1 second in real time, ensuring the continuity and integrity of the data.

[0075] Double buffering strategy: Maintain two buffers: the front buffer (for display) and the back buffer (for data update). New data is first written to the back buffer. At the display refresh time, the pointers of the front and back buffers are exchanged. The double buffering strategy avoids direct operation of the display buffer during the data update process, prevents flickering and tearing of the display, and provides a smooth visual effect.

[0076] S4: The host computer dynamically adjusts the refresh frequency according to the number of waveforms currently opened for viewing.

[0077] Furthermore, the dynamic adjustment of the refresh frequency includes the host computer dynamically adjusting the refresh frequency according to the number of waveforms currently opened for viewing;

[0078] The host computer dynamically adjusts the refresh frequency according to the number of waveforms currently opened for viewing. The specific strategy is as follows:

[0079] The data refresh rate of the server is set to always be 100 frames per second (100Hz). The display refresh rate F of the host computer is adjusted according to the number of waveforms W. The formula is as follows:

[0080] ,

[0081] The host computer uses a timer or timer interrupt mechanism to calculate the refresh frequency. When the number of waveforms exceeds the preset value, the refresh frequency is reduced to reduce the CPU and GPU usage and prevent system freezes; when the number of waveforms is lower than the preset value, the refresh frequency is increased to provide a smoother display effect. This strategy optimizes system performance while ensuring data real-time, providing users with a smooth interactive experience.

[0082] Example 2, reference Figure 2-Figure 3 , which is an embodiment of the present invention, provides a high-performance dynamic refresh method for real-time simulation waveforms of an electric power system. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0083] The specific implementation method is to integrate the dynamic waveform refresh technology of the present invention into the power system simulation software. The server side uses high-performance hardware and software to optimize data capture and transmission. The server side includes: 1) Data acquisition module, which uses high-precision timers and high-performance computing units to ensure that simulation data is collected at a fixed sampling rate (such as 100Hz). 2) Data compression module, which implements floating-point compression algorithm and compresses simulation data from double-precision floating-point numbers to fixed-point representation. 3) Data packaging and multi-packet transmission module, which divides the compressed data according to the maximum load of the Ethernet packet (about 1500 bytes) to generate multiple data packets. Use a high-performance network programming interface (such as RAW Socket under Linux or WinPcap library under Windows) to send data at the link layer, bypassing the TCP / IP protocol stack and reducing transmission delays.

[0084] The host computer runs a specially developed software module to receive and process data in real time, and dynamically adjust the waveform refresh frequency according to the current number of waveforms. Considering the cross-platform requirements in actual applications, the system operating environment supports both Linux and Windows operating systems. The development environment uses the Qt framework and QWT (Qt Widgets for Technical Applications) library to make full use of its efficient graphics rendering and cross-platform features. The high-performance implementation based on Qt has the following advantages: 1) Efficient graphics rendering: The graphics rendering engine of the Qt framework is highly optimized and can quickly process and display complex waveform data, providing a smooth user interaction experience. 2) Low memory usage: Compared with Java or browser technology, Qt applications usually occupy less memory at runtime, which enables the host computer to process large amounts of waveform data more efficiently and maintain good performance even in resource-constrained environments.

[0085] The host computer includes the following modules: 1) Data receiving module, including network interface and data reassembly program. The network interface uses Qt's QUdpSocket or a custom network module to receive data packets sent by the server at the link layer. The data reassembly program sorts and splices multiple packets of data according to the sequence number according to the packet header information to reassemble the complete waveform data. 2) Data pool management module, including dynamic sliding window implementation, uses a ring buffer to store waveform data within the last 1 second. Two DataPool instances are used, one for data update (back buffer) and one for graphic display (foreground buffer). 3) Dynamic waveform refresh module, dynamically sets the timer interval according to the current number of waveforms to control the refresh frequency. In terms of graphics rendering, the QwtPlot and QwtPlotCurve classes of the QWT library are used for waveform drawing. QWT provides efficient curve drawing functions and supports real-time updates of large amounts of data.

[0086] Through the implementation of the present invention, even when the power system is large-scale and the amount of data is huge, the fast and accurate transmission and display of real-time simulation data can be guaranteed. In terms of real-time performance, due to the use of link layer communication and efficient data compression algorithms, data transmission delays are minimized, meeting the strict real-time requirements of power system simulation. In terms of stability, the application of dynamic waveform refresh strategy and double buffering technology ensures the stable operation of the system under high load conditions and avoids interface freezes or crashes. In terms of user experience, the high refresh rate waveform display and smooth interactive interface improve user satisfaction with the system and help to monitor and analyze the power system more quickly.

[0087] By integrating with the existing power system simulation platform, or as an independent waveform display and analysis tool, the present invention can be widely used in various links of the power industry. Including: 1) Large-scale power system monitoring. In the real-time monitoring of ultra-high voltage and ultra-high voltage power grids, a large amount of waveform data needs to be processed and displayed. The high-performance dynamic refresh technology provided by the present invention can meet this demand. 2) Fault analysis, when a power system fault occurs, the waveform data can be quickly and accurately acquired and displayed, which is of great significance for fault location and analysis. 3) Teaching and scientific research, as a power system simulation teaching and scientific research tool, the implementation of the present invention helps to improve teaching quality and scientific research efficiency.

[0088] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0089] Embodiment 3, the third embodiment of the present invention, is different from the first two embodiments in that:

[0090] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0091] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0092] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0093] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0094] Example 4, reference Figure 4 , which is an embodiment of the present invention, provides a high-performance dynamic refresh system for real-time simulation waveforms of a power system, characterized in that it includes a server end 100 and a host computer 200, wherein the server end includes:

[0095] The data acquisition module 110 uses a high-precision timer and a high-performance computing unit to ensure that the simulation data is collected at a fixed sampling rate;

[0096] The data compression module 120 implements a floating point number compression algorithm to compress the simulation data from double precision floating point numbers to fixed point numbers;

[0097] The data packing and multi-packet transmission module 130 divides the compressed data according to the maximum load of the Ethernet packet (about 1500 bytes) to generate multiple data packets. It uses a high-performance network programming interface (such as RAW Socket under Linux or WinPcap library under Windows) to send data at the link layer, bypassing the TCP / IP protocol stack and reducing transmission delay;

[0098] The host computer 200 includes:

[0099] The data receiving module 210 includes a network interface and a data reassembly program. The network interface uses Qt's QUdpSocket or a custom network module to receive data packets sent by the server at the link layer. The data reassembly program sorts and splices multiple packets of data according to the sequence number according to the packet header information to reassemble the complete waveform data.

[0100] The data pool management module 220 implements dynamic sliding windows, uses a circular buffer to store waveform data within the last second, and uses two DataPool instances, one for data update (back buffer) and one for graphic display (foreground buffer);

[0101] The dynamic waveform refresh module 230 dynamically sets the timer interval according to the current waveform quantity to control the refresh frequency. In terms of graphics rendering, the QwtPlot and QwtPlotCurve classes of the QWT library are used to draw waveforms. QWT provides an efficient curve drawing function and supports real-time update of large amounts of data.

[0102] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for dynamically refreshing real-time simulation waveforms of a power system, characterized in that: include, The server captures the real-time simulation data of the power system through network software and sends the data to the host computer through link layer messages; The server uses floating point compression and multi-packet transmission to transmit data to the host computer for processing and display; The host computer receives data, updates and maintains the data pool in real time; The real-time updating and maintaining of the data pool includes real-time updating and maintaining a data pool for 1 second, the data pool contains all waveform data within the last second, and the data pool adopts a dynamic sliding window and double buffering strategy; Maintain the data pool data structure. The data pool is regarded as a circular buffer with a length of N, where N represents the number of sampling points required within 1 second. When the data is updated, each time a new data block is received, the existing data in the data pool is shifted left by M bits, where M is the number of data points in the new data block. The newly received data block is inserted into the end of the data pool, i.e., the entrance. When the left shift operation causes the data to exceed the buffer range, a circular overwrite is performed to ensure that the length of the data pool is always N. The double buffering strategy includes that new data is first written into the background buffer, and at the display refresh time, the pointers of the foreground and background buffers are exchanged; The host computer dynamically adjusts the refresh frequency according to the number of waveforms currently opened for viewing; The dynamic adjustment of the refresh frequency includes setting the data refresh rate of the server to always be 100 frames per second, and the display refresh frequency F of the host computer is adjusted according to the number of waveforms W, and the formula is as follows: The host computer adopts a timer or a timer interrupt mechanism. According to the calculated refresh frequency, when the number of waveforms exceeds the preset value, the refresh frequency is reduced; when the number of waveforms is lower than the preset value, the refresh frequency is increased.

2. A method for dynamically refreshing a real-time simulation waveform of a power system according to claim 1, characterized in that: The real-time simulation data of the power system is captured, the real-time simulation data comes from the simulation software and hardware-in-the-loop simulation platform of the power system, the software is used to capture the data, and the high-frequency analog signal is processed and converted into a digital signal through a professional high-speed data acquisition card; Real-time simulation data includes voltage amplitude, phase, frequency, current amplitude, phase, frequency, active power, reactive power, apparent power, as well as the system's switching status, protection device status, control signal status, and environmental factors that affect the performance of the power system.

3. A method for dynamically refreshing a real-time simulation waveform of a power system as claimed in claim 2, characterized in that: The sending of data to the host computer via the link layer message includes: the server quickly captures the real-time simulation data of the power system via high-performance network software, and sends the waveform sampling data to the host computer via the link layer message.

4. A method for dynamically refreshing a real-time simulation waveform of a power system as claimed in claim 3, characterized in that: The floating point number compression includes, when there are a large number of waveforms, resulting in a single Ethernet packet being unable to accommodate all waveform data, using a two-level optimization strategy; Floating point compression compresses the floating point numbers in the waveform data. Through algorithm optimization, the floating point numbers are compressed from double precision to single precision, reducing the byte size required for each waveform data point, allowing more waveform data to be transmitted in the same size Ethernet packet, and compressing double precision floating point numbers into single precision floating point numbers.

5. A method for dynamically refreshing a real-time simulation waveform of a power system as claimed in claim 4, characterized in that: The multi-packet transmission includes, when one Ethernet packet cannot carry all the waveform data, dividing the entire data according to the maximum load capacity of the Ethernet packet, generating multiple data packets, and sending them in sequence according to the sequence number order; When receiving data packets, the host computer caches the data according to the packet header information and temporarily stores the received data packets in the cache area; checks whether all data packets have been received in the cache area; when all data packets are received, the load part of the data packets is spliced ​​in sequence to reconstruct complete waveform data; and verifies data integrity through checksums to ensure that the data has not been tampered with or damaged during transmission.

6. A system using a method for dynamically refreshing a real-time simulation waveform of a power system as claimed in any one of claims 1 to 5, characterized in that: The system comprises a server side (100) and a host computer (200), wherein the server side (100) comprises: A data acquisition module (110) uses a high-precision timer and a high-performance computing unit to ensure that simulation data is collected at a fixed sampling rate; A data compression module (120) implements a floating point number compression algorithm to compress simulation data from double precision floating point numbers to fixed point numbers; The data packaging and multi-packet transmission module (130) divides the compressed data according to the maximum load of the Ethernet packet to generate multiple data packets, and uses a high-performance network programming interface to send the data at the link layer, bypassing the TCP / IP protocol stack; The host computer (200) comprises: The data receiving module (210) includes a network interface and a data reassembly program. The network interface uses Qt's QUdpSocket or a custom network module to receive data packets sent by the server at the link layer. The data reassembly program sorts and splices multiple packets of data according to the sequence number based on the packet header information to reassemble the complete waveform data. The data pool management module (220) implements a dynamic sliding window, uses a circular buffer to store waveform data within the last second, and uses two DataPool instances for data update and graphic display; The dynamic waveform refresh module (230) dynamically sets the timer interval according to the current number of waveforms to control the refresh frequency.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of a method for dynamically refreshing a real-time simulation waveform of a power system according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for dynamically refreshing a real-time simulation waveform of a power system according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Power quality meter and method of waveform anaylsis and compression

    US20110112779A1

  • Computationally efficient compression of floating-point data

    US20130007076A1