SV sampling data compression transmission method and device
The compression and decompression of SV sampling data using a floating-point format addresses high bandwidth issues in power systems, achieving efficient data transmission with minimal accuracy loss and cost savings.
Patent Information
- Application Number
- CN202411228995.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-01-03
AI Technical Summary
The high communication bandwidth and flow requirements of SV sampling data transmission in power systems, as per the IEC-61850 standard, lead to increased construction and operation costs in scenarios like line longitudinal differential protection and distribution network 5G networking differential protection.
A method and device for compressing 4-byte SV sampling data into 2-byte compressed data using a floating-point format, followed by decompression to restore the data to meet IEC-61850 specifications, utilizing a sampling data compression and decompression module.
The method achieves a 50% compression rate, reducing communication bandwidth and traffic resources while maintaining data accuracy within one thousandth of the original, compatible with various protection devices and preserving waveform characteristics for small signals.
Smart Images

Figure CN119254843A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of relay protection for power systems, and more specifically, to a method and device for compressing and transmitting SV sampling data. Background Art
[0002] Relay protection is an important measure to detect faults or abnormal conditions in the power system, thereby issuing alarm signals or directly isolating and removing the faulty part. Most of the various relay protection algorithms need to calculate and judge based on the analog data such as current and voltage collected on the primary cable. Therefore, various protection, measurement and control, and stabilization control equipment in the substation have the need to collect and transmit analog data on the primary cable.
[0003] The IEC-61850 standard proposes the SV (Sample Value) message protocol for the transmission of sampled data. In the part of the encoding method of analog quantity, various analog quantity acquisition devices are required to sample the sampled data at a frequency of 4000Hz, convert all data into primary values according to the current transformer hardware configuration, and encode them in units of 1mA, 10mV, and signed four-byte integers. In this way, the interconnection and interoperability of sampled data between different manufacturers and different equipment in the substation is realized.
[0004] The SV message protocol of the IEC-61850 standard has a high communication bandwidth occupation after encoding. Taking the merging unit as an example, a merging unit in a substation is generally responsible for collecting various types of analog data within an interval, and the SV message sent after encoding occupies a bandwidth of about 10Mbps. However, in some usage scenarios such as line longitudinal differential protection and distribution network 5G networking differential protection, there are certain restrictions on the bandwidth and flow of sampling transmission. Higher bandwidth and flow occupation will lead to higher construction and operation costs of communication equipment. Summary of the invention
[0005] In order to solve the deficiencies in the prior art, the present invention provides a SV sampling data compression transmission method, which can solve the technical problem of high communication bandwidth and flow requirements when transmitting sampling data in the prior art.
[0006] The present invention adopts the following technical solution.
[0007] A method for compressing and transmitting SV sampling data comprises the following steps:
[0008] Step 1, taking the 4-byte SV sampling data as the original sampling data, compressing it according to the algorithm to obtain the compressed sampling data and then sending it;
[0009] Step 2: After receiving the compressed sampled data, the sampled data is decompressed according to the algorithm to restore the sampled data that complies with the SV message specification.
[0010] Preferably, in step 1, the original sampled data is 4-byte signed integer sampled data, and the original sampled data is compressed to obtain 2-byte compressed sampled data. The specific process is as follows:
[0011] (1) Convert the four-byte signed integer sampling data into a single-precision floating point format;
[0012] (2) Extract the first sign bit from the sampled data in single-precision floating point format;
[0013] (3) In the sampled data in single-precision floating-point format, the first 3 bits of the 8-bit exponent are removed and the last 5 bits are extracted;
[0014] (4) In the sampled data in single-precision floating-point format, the last 13 bits of the 23 bits of the mantissa are removed, and the first 10 bits are extracted;
[0015] (5) The extracted sign bit 1 bit, exponent bit 5 bits, and decimal bit 10 bits are concatenated together to form 2 bytes (16 bits) of compressed sampling data.
[0016] Preferably, in step 1, when the original sampled data is a special value 0, it is written as 2 bytes of 0 after compression.
[0017] Preferably, in step 1, when the original sampled data is a special value 1, its value is changed to 2 and then compressed according to steps (1) to (5).
[0018] Preferably, in step 1, when the original sampled data is a special value -1, its value is changed to -2 and then compressed according to steps (1) to (5).
[0019] Preferably, in step 2, the received 2-byte compressed sample data is decompressed, and the specific process is as follows:
[0020] (1) Extract the 1-bit sign bit, 5-bit exponent bit, and 10-bit decimal bit from the 2-byte compressed sample data;
[0021] (2) Apply for a 4-byte memory space and fill it with: the extracted sign bit 1 bit, binary 0b100, the extracted exponent bit 5 bits, the extracted decimal bit 10 bits, and hexadecimal 0x100, to form a 4-byte single-precision floating-point format sampled data;
[0022] (3) Convert the reassembled single-precision floating-point format sampling data into 4-byte signed integer sampling data that complies with the IEC-61850SV message specification.
[0023] Preferably, in step 2, when the compressed sample data is a special value 0, it is directly written as 4 bytes of 0 after decompression.
[0024] The present invention also proposes an SV sampling data compression transmission device using the SV sampling data compression transmission method, comprising: a sampling data compression module, a sampling data decompression module;
[0025] The sampling data compression module is used to compress 4-byte SV sampling data;
[0026] The sample data decompression module is used to decompress the compressed sample data.
[0027] The present invention also provides a terminal, comprising a processor and a storage medium;
[0028] The storage medium is used to store instructions;
[0029] The processor is used to operate according to the instructions to execute the steps of the SV sampling data compression transmission method.
[0030] The present invention also proposes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the SV sampling data compression transmission method are implemented.
[0031] The beneficial effects of the present invention are that, compared with the prior art, the present invention has at least the following beneficial effects:
[0032] The present invention provides a method for compressing and transmitting SV sampling data, which can realize the compressed transmission of sampling data required by various protection, measurement and control, stabilization and control devices in the substation. The compression method is simple to calculate and has a high compression rate. It can compress the original sampling data from 4 bytes to 2 bytes with a compression rate of 50%, effectively saving the communication bandwidth and traffic resources when transmitting sampling data, and can reduce the communication requirements and corresponding costs in relay protection application scenarios such as line longitudinal optical differential protection and distribution network 5G differential protection;
[0033] The compression algorithm proposed in the present invention is designed based on the floating-point type, and can still retain sufficient waveform characteristics for small signal analog sampling data with low amplitude, without causing small signal distortion problems; the precision loss of the sampled data after decompression by the algorithm proposed in the present invention is less than one thousandth, which can meet the use requirements of various common protection principles of relay protection. When the transformer ratios of different acquisition devices are inconsistent, because the original sampled data has been converted to a primary value according to the SV message specification in the IEC-61850 standard, the receiver can directly use the sampled data transmitted by different acquisition devices after decompression, without the need to convert the primary and secondary ratios for different acquisition devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of a method for compressing and transmitting SV sampling data in the present invention;
[0035] Figure 2 It is a system structure diagram of a SV sampling data compression transmission device in the present invention;
[0036] Figure 3 It is a schematic diagram of the data structure of the sampled data during compression and decompression in the present invention;
[0037] Figure 4 It is a schematic diagram of sampling data and error ratio in the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0039] like Figure 1 As shown, the present invention proposes a SV sampling data compression transmission method, which includes the following steps:
[0040] Step 1: compress the original sampled data of the SV message specification into 2-byte compressed sampled data according to the algorithm and then send it;
[0041] In computers, data is stored in binary format, that is, information is recorded through the connection or interruption of a series of physical circuits. Each physical circuit unit that can represent connection or interruption is called a bit, and the state of connection or interruption corresponds to the number 1 or 0. In computers, 8 bits are put together as the minimum processing unit of data, and 8 bits are called 1 byte.
[0042] Therefore, when a number is represented in a computer, the number of bytes it occupies needs to be considered. The smaller the number of bytes, the fewer resources are spent on storage or transmission, but at the same time, the less space a byte takes up, the fewer numbers it can represent.
[0043] When storing numbers, commonly used data types include integers and floating points;
[0044] Integer: directly records the original data in binary, does not support decimal points, and is a 4-byte signed integer that can represent integers in the range of -2^31 to -2^31;
[0045] Floating point: Use scientific notation to record data (such as 1.0x2n ), which can represent decimals. According to the specification, commonly used floating-point types include 4-byte single-precision floating-point float and 8-byte double-precision floating-point double.
[0046] Floating point and integer have different ways of recording the same value. Even though 4-byte integer and 4-byte single-precision floating point float both occupy 4 bytes, their data types are encoded differently, and the actual value of each bit is different after being stored in the computer. However, these two commonly used data types usually have standard conversion interfaces in computers, which can directly convert data formats.
[0047] The original sampling data in the present invention is 4-byte signed integer sampling data. The 4-byte data corresponds to the specification description of SV message sampling data in the IEC61850 specification, which requires that the analog quantity sampling data of electric power be converted into a primary value. The obtained data type is a 4-byte signed integer, and the data unit is 1mA / 10mV. The compression object of the present invention is 4-byte SV message sampling data.
[0048] The original sampling data is compressed. The specific process is as follows:
[0049] (1) Convert the original sampled data of 4-byte signed integer into sampled data of single-precision floating point format;
[0050] (2) Extract the first sign bit from the sampled data in single-precision floating point format;
[0051] (3) In the sampled data in single-precision floating-point format, the first 3 bits of the 8-bit exponent are removed and the last 5 bits are extracted;
[0052] (4) In the sampled data in single-precision floating-point format, the last 13 bits of the 23 bits of the mantissa are removed, and the first 10 bits are extracted;
[0053] (5) The extracted sign bit 1 bit, exponent bit 5 bits, and decimal bit 10 bits are concatenated together to form 2 bytes (16 bits) of compressed sampling data.
[0054] Further preferably, for the special value 0, it is directly written as 2 bytes of 0 after compression.
[0055] Further preferably, for the special value 1, its value is changed to 2 and then compression processing is performed according to steps (1) to (5).
[0056] Further preferably, for the special value -1, its value is changed to -2 and then processed according to steps (1) to (5).
[0057] The data structure obtained after compression by the algorithm proposed in the present invention has an exponential part that ensures the data range requirement, that is, meets the maximum 32-bit signed integer; and the decimal part ensures that the data precision error is less than one thousandth.
[0058] Step 2: After receiving the compressed sampled data, the original sampled data that complies with the SV message specification is restored after being decompressed according to the algorithm.
[0059] Decompress the received 2-byte compressed sampling data. The specific process is as follows:
[0060] (1) Extract the 1-bit sign bit, 5-bit exponent bit, and 10-bit decimal bit from the 2-byte compressed sample data;
[0061] (2) Apply for a 4-byte memory space and fill it with: the extracted sign bit 1 bit, binary 0b100, the extracted exponent bit 5 bits, the extracted decimal bit 10 bits, and hexadecimal 0x100, to form a 4-byte single-precision floating-point format sampled data;
[0062] (3) Convert the reassembled single-precision floating-point format sampling data into 4-byte signed integer sampling data that complies with the IEC-61850SV message specification.
[0063] Preferably, when the compressed sample data is a special value 0, it is directly written as 4 bytes of 0 after decompression.
[0064] like Figure 2 As shown, the present invention also proposes an SV sampling data compression transmission device, which is used to implement the proposed SV sampling data compression transmission method. The device includes: a sampling data compression module and a sampling data decompression module;
[0065] The sampling data compression module is used to compress the 4-byte SV sampling data of analog quantities such as current and voltage;
[0066] The sampling data decompression module is used to decompress the compressed sampling data.
[0067] In order to verify the beneficial effects of the present invention, the following simulation experiment is used to illustrate:
[0068] After data compression, the error caused by compression is that the mantissa currently only retains 10 bits. When the valid digits of the integer data exceed the limit, the omitted part will cause errors. Therefore, the error value generated by the compression algorithm satisfies:
[0069] The error value generated by the compression algorithm = the mantissa compensated after decompression – the mantissa omitted from the original value
[0070] The compensation mantissa is fixed to 0x1000 according to the half value of the omitted interval, that is, 1 / 2 of the omitted mantissa segment. Therefore, it can be seen that the maximum absolute value of the error occurs when the mantissa is all 0 and all 1, and because the value when the mantissa is all 0 is smaller than when it is all 1, the error ratio caused by the same absolute value of the error is the maximum position when the mantissa is all 0. Figure 4 As shown, Figure 4 This is the error ratio calculation result when the step is 1 starting from 2048. It can be seen that the calculated error ratio is the largest each time when the mantissa is all 0.
[0071] Here are some examples:
[0072] When the value is 2048 (all digits are 0), it is converted to float type data, and its memory value is 0x45000000. After compression and decompression, the memory value is 0x45001000. After conversion, it is 2049, the absolute value of the error is 1, and the error ratio is 1 / 2048=0.00048828125.
[0073] When the value is 1048576 (all 0s in the mantissa), it is converted to float type data, and its memory value is 0x49800000. After compression and decompression, the memory value is 0x 49801000. After conversion, it is 1049088, the absolute value of the error is 512, and the error ratio is 512 / 1048576=0.00048828125.
[0074] When the value is 1055987 (the mantissa is not all 0), it is converted to float type data, and its memory value is 0x4980E798. After compression and decompression, the memory value is 0x4980 F000. After conversion, it is 1056256. The absolute value of the error is 269, and the error ratio is 269 / 1055987=0.000254738, which is less than 0.00048828125.
[0075] For small signal errors:
[0076] When the data value is less than 2048, the absolute value of the error is less than 1, which is a decimal, and will further affect the accuracy when it is finally converted to an integer. When the value is 1024, the absolute value of the error is 0.5. If the carry is 1, the error ratio is 1 / 1024=0.0009765625, that is, the accuracy is close to one thousandth. It can be seen that when the value is smaller, the accuracy caused by the conversion between floating point and integer is more affected, and may exceed one thousandth of the accuracy.
[0077] However, the sampled data is a primary value. The unit of the current / voltage analog data in the SV message is 1mA / 10mV. Therefore, the primary analog data corresponding to 1024 is about 1A / 10V. Compared with the rated value of the primary value of the power system, such as 1000A, 220kV, etc., this data itself is a very small signal. Therefore, the error of 1mA / 10mV corresponding to the carry 1 can be directly ignored.
[0078] The beneficial effect of the present invention is that compared with the prior art, the sampling data compression method proposed in the present invention is simple to calculate and has a high compression rate, which effectively saves communication bandwidth and traffic resources when transmitting sampling data, and can reduce the communication requirements and corresponding costs in relay protection application scenarios such as line longitudinal optical differential protection and distribution network 5G differential protection. The accuracy loss of the sampled data after decompression by the algorithm proposed in the present invention is less than one thousandth, which can meet the use requirements of various common protection principles of relay protection.
[0079] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0080] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0081] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0082] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for compressing and transmitting SV sampling data, characterized in that: The following steps are involved: Step 1, taking the 4-byte SV sampling data as the original sampling data, compressing it according to the algorithm to obtain the compressed sampling data and then sending it; Step 2: After receiving the compressed sampled data, the sampled data is decompressed according to the algorithm to restore the sampled data that complies with the SV message specification.
2. The SV sampling data compression transmission method according to claim 1, characterized in that: In step 1, the original sampled data is 4-byte signed integer sampled data. After compressing the original sampled data, 2-byte compressed sampled data is obtained. The specific process is as follows: (1) Convert the four-byte signed integer sampling data into a single-precision floating point format; (2) Extract the first sign bit from the sampled data in single-precision floating point format; (3) In the sampled data in single-precision floating-point format, the first 3 bits of the 8-bit exponent are removed and the last 5 bits are extracted; (4) In the sampled data in single-precision floating-point format, the last 13 bits of the 23 bits of the mantissa are removed, and the first 10 bits are extracted; (5) The extracted sign bit 1 bit, exponent bit 5 bits, and decimal bit 10 bits are concatenated together to form 2 bytes (16 bits) of compressed sampling data.
3. The SV sampling data compression transmission method according to claim 1, characterized in that: In step 1, when the original sample data is a special value 0, it is written as 2 bytes of 0 after compression.
4. The SV sampling data compression transmission method according to claim 2, characterized in that: In step 1, when the original sampled data is a special value 1, its value is changed to 2 and then steps (1) to (5) are compressed.
5. The SV sampling data compression transmission method according to claim 2, characterized in that: In step 1, when the original sample data is a special value -1, its value is changed to -2 and then compressed according to steps (1) to (5).
6. The SV sampling data compression transmission method according to claim 1, characterized in that: In step 2, the received 2-byte compressed sample data is decompressed. The specific process is as follows: (1) Extract the 1-bit sign bit, 5-bit exponent bit, and 10-bit decimal bit from the 2-byte compressed sample data; (2) Apply for a 4-byte memory space and fill it with: the extracted sign bit 1 bit, binary 0b100, the extracted exponent bit 5 bits, the extracted decimal bit 10 bits, and hexadecimal 0x100, to form a 4-byte single-precision floating-point format sampled data; (3) Convert the reassembled single-precision floating-point format sampling data into 4-byte signed integer sampling data that complies with the IEC-61850SV message specification.
7. The SV sampling data compression transmission method according to claim 1, characterized in that: In step 2, when the compressed sample data is a special value of 0, it is directly written as 4 bytes of 0 after decompression.
8. An SV sampling data compression transmission device using the SV sampling data compression transmission method according to any one of claims 1 to 7, characterized in that: include: Sampling data compression module, sampling data decompression module; The sampling data compression module is used to compress 4-byte SV sampling data; The sample data decompression module is used to decompress the compressed sample data.
9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
