Coding and decoding processing method for converting micropower wireless analog signal into IP signal
By sampling, compressing and channel encoding the micro-power wireless analog signals in the power system, the complexity and compatibility problems of converting signals into IP signals on the micro-power devices are solved, and efficient and reliable data transmission and access to the power system are achieved.
Patent Information
- Application Number
- CN202510559347.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In data communication networks, in the process of converting micro-power wireless analog signals into IP signals, the prior art has challenges in the high complexity of protocol implementation, compatibility issues, and efficient execution of complex logic in resource-constrained environments. Especially in power systems, how to efficiently and reliably convert and transmit data on micro-power devices is a difficult problem.
By sampling the micro-power wireless analog signal at the micro-power receiving end of the power system, it organizes it into a protocol data structure defined by the transmission protocol, and compresses data according to the signal type, maps it to the information elements and information bodies of the 104 protocol, and then forms an IP data packet after channel encoding, and decoding is performed on the decoding end.
It realizes efficient and reliable conversion of analog signals into IP signals on micro-power devices, reduces energy consumption and bit error rates, ensures the integrity and correctness of data transmission in complex networks, and supports seamless access to power monitoring systems.
Smart Images

Figure CN120378514A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication processing, and specifically to a coding and decoding processing method for converting a micro-power wireless analog signal into an IP signal. Background Art
[0002] The establishment and operation of a data communication network hinge on the effective control and processing of the data transmission process. This encompasses managing how data packets are routed between network nodes, ensuring data arrives at the destination in sequence or in a timely manner, and performing necessary format conversions, error detection, and flow control during data transmission. These communication control and processing mechanisms form the basis for constructing a reliable and efficient data exchange system. Their complexity and importance are increasingly prominent, especially when faced with diverse network environments, different transmission media, and growing communication demands.
[0003] In the above communication control and processing, protocols play a crucial role. Various communication protocols are the "language" and "rule book" of data communication. They define in detail the structure of data units, the steps and timing of interactions between communication parties, as well as mechanisms such as error handling and connection management. For example, the Transmission Control Protocol, network protocols, and various application layer protocols work together to enable different devices to communicate effectively based on common agreements. However, with the expansion of the network scale and the increase in the types of protocols, the implementation complexity of protocols, compatibility issues between different protocols, and how to efficiently execute complex protocol logic in resource-constrained environments all pose new technical challenges, and more optimized and flexible protocol application and processing methods need to be sought. Summary of the Invention
[0004] The purpose of the present invention is to provide a coding and decoding processing method for converting a micro-power wireless analog signal into an IP signal. At the micro-power receiving end of the power system, a sensing node samples the micro-power wireless analog signal to obtain an original digital value; organizes the original digital value, timestamp, and identifier information into a protocol data structure defined by the transmission protocol; compresses the key data in the protocol data structure according to the analog signal type; maps the compressed data to the information elements and information bodies of the 104 protocol to generate a complete specification frame; performs channel coding on the specification frame to add redundant information; uses the channel-coded specification frame as the payload, adds an IP header and a transport layer header to form an IP data packet; hands the IP data packet to the underlying wireless module driver for transmission according to the protocol. The decoding end decodes the IP data packet.
[0005] To achieve the above objective, the present invention provides the following technical solution:
[0006] A coding and decoding processing method for converting a micro-power wireless analog signal into an IP signal, including:
[0007] At the micro-power receiving end of the power system, the sensing node samples the micro-power wireless analog signal to obtain the original digital value;
[0008] Organize the original digital value, timestamp, and identifier information into the protocol data structure defined by the transmission protocol;
[0009] Data compress the key data in the protocol data structure according to the analog signal type;
[0010] Furthermore, data compression includes:
[0011] Select a compression algorithm according to the type of analog signal to meet the resource constraints of the micro-power device, including:
[0012] For the slowly changing analog signal data, differential coding is adopted, including: maintaining a variable at the sending end to store the previously successfully sent sampling value S n-1 , collecting a new sampling value S n , calculating the difference △S, encoding the difference, and compressing the encoded difference and the header information;
[0013] For the periodic and patterned analog signal data, a model-based coding method is adopted, including: identifying a representative periodic waveform in the signal as a template, only sending the template once during transmission, and only compressing and sending the reference to the template and the deviation analysis signal between the current waveform and the template in the subsequent transmission;
[0014] For the analog signal data with low real-time requirements, an offline compression algorithm is adopted, including: for the analog signal data that does not need to be transmitted and processed immediately, caching the data, and using the compression algorithm to compress the data in the cache when there is more idle time or energy.
[0015] Map the compressed data to the information elements and information bodies of the 104 protocol to generate a complete specification frame;
[0016] Furthermore, generating a complete specification frame includes:
[0017] Put the compressed data into the corresponding information element format when generating the ASDU, and decompress it at the receiving end after receiving the ASDU;
[0018] According to the mapping rule, combine the type identifier, transmission reason, common address, information object address, and the byte sequence of the information elements including the measured value, timestamp, and quality descriptor to form a complete ASDU byte block;
[0019] Construct the APCI through the start character, length field, and control field;
[0020] Combine the APCI and ASDU to obtain the IEC 104 protocol frame that is ultimately transmitted in the TCP / IP payload.
[0021] Perform channel coding on the protocol frame to add redundant information;
[0022] Further, construct a channel coding algorithm for the micro-power device according to the error correction capability, computational complexity, and introduced redundancy ratio, including:
[0023] The channel encoder receives the protocol frame and selects a coding algorithm according to the coding calculation amount and code rate. The coding algorithm generates a new bit sequence containing the original information bits and redundant check bits according to the rules, which is the channel-coded protocol frame;
[0024] When configuring the channel coding, determine the code rate according to the expected channel quality, requirements for data reliability, tolerance for power consumption and bandwidth.
[0025] Take the channel-coded protocol frame as the payload, add an IP header and a transport layer header to form an IP packet;
[0026] Further, construct a transport layer header, including: source port number, destination port number, sequence number, acknowledgment number, window size, checksum;
[0027] Construct an IP header, including: version, header length, differentiated services, total length, identification, protocol, header checksum, source IP address, and destination IP address;
[0028] Concatenate the IP header, transport layer header, and the channel-coded protocol frame in sequence to obtain a complete IP packet.
[0029] Hand over the IP packet to the underlying wireless module driver for transmission according to the protocol.
[0030] Further, it also includes decoding processing:
[0031] The hardware receives and demodulates the wireless signal;
[0032] Extract the IP packet from the received wireless data, parse the IP header and the transport layer header, and extract the protocol frame;
[0033] Perform channel decoding on the protocol frame to correct transmission errors;
[0034] Parse the IEC 104 protocol frame to extract the ASDU and information elements;
[0035] Restore the information elements of the protocol frame to the original data structure, including the original numerical value, timestamp, identifier information;
[0036] Decompress the compressed data to restore the original numerical value;
[0037] Provide the restored digital value to the upper-layer application.
[0038] Further, call a decoding algorithm that matches the channel coding algorithm used at the sending end, and the decoding algorithm performs calculations on the received coded bit sequence;
[0039] If the number of errors is within the error correction capability of the decoding algorithm, the algorithm automatically restores the original uncoded protocol frame;
[0040] If it is detected that the number of errors exceeds the decoding ability, the protocol frame will be marked as invalid and directly discarded.
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0042] 1. The amount of data after compression directly affects the size of subsequent channel coding and IP encapsulation, and thus determines the number of data packets transmitted wirelessly and the transmission duration. By compressing the key data in the protocol data structure according to the analog signal type, it is ensured that on a micro-power and bandwidth-limited wireless link, the key information of the analog signal can be effectively transmitted to the IP network with the lowest energy consumption and the fastest speed.
[0043] 2. By performing channel coding on the protocol frame, redundant information is added, greatly improving the reliability of wireless transmission. Even in an environment of noise, interference, or signal fading, the bit error can be effectively reduced, ensuring that the collected power data can be accurately transmitted to the receiving end; secondly, the retransmission requirement caused by transmission errors is significantly reduced; thirdly, by increasing the code rate when the channel quality is good, the effective data transmission efficiency is indirectly improved.
[0044] 3. The entire decoding processing chain works in coordination to ensure that the analog data collected from the micro-power wireless sensor node can be accurately, reliably, and timely restored to actionable information meaningful to the power system, overcoming the inherent challenges of micro-power wireless transmission, and ensuring the integrity and correctness of the data during the process of traversing complex networks. Brief Description of the Drawings
[0045] Figure 1 It is a flowchart of the encoding and decoding processing method for converting a micro-power wireless analog signal into an IP signal provided by an embodiment of the present invention;
[0046] Figure 2 It is a flowchart of generating a complete protocol frame provided by an embodiment of the present invention;
[0047] Figure 3 It is a flowchart of the decoding process provided by an embodiment of the present invention. Detailed Embodiments
[0048] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0049] Embodiment 1:
[0050] In order to improve the efficiency of collecting and analyzing micro-power wireless signals, a certain power company introduced the encoding and decoding processing method for converting micro-power wireless analog signals into IP signals provided by the present invention. The method flow is as Figure 1 shown, and the specific implementation is as follows:
[0051] At the micro-power wireless receiving end of the power system, the wireless sensor node samples the micro-power wireless analog signal to obtain the original digital value. Table 1 shows the transformer winding temperature monitoring data;
[0052] Table 1. Transformer winding temperature monitoring data
[0053]
[0054] First, convert the continuous analog signal into a discrete digital signal. The sampling rate needs to meet the Nyquist sampling theorem (greater than twice the highest frequency of the signal) to avoid aliasing, but too high a sampling rate will increase the data volume and power consumption. The micro-power scenario needs to be balanced; on the other hand, the resolution determines the accuracy of the digital signal and also affects the data volume;
[0055] Furthermore, in this embodiment, only when the signal change exceeds a preset threshold does it enter the high-sampling / high-resolution mode, and the rest of the time it remains in the low-power monitoring state, significantly reducing the average energy consumption; at the same time, integrating multiple sampling mechanisms, switching the working mode according to the signal bandwidth and dynamic range to meet the requirements of different scenarios with the minimum power consumption.
[0056] After the data collection is completed, organize the original digital value, timestamp, and identifier information into the protocol data structure defined by the transmission protocol;
[0057] Furthermore, the next key task is to identify, extract, and reshape meaningful data elements from the data collected by the sensor, that is, the original digital value (the value representing the analog quantity) collected by the sender sensor, the relevant timestamp, and identifier information (such as sensor ID, measurement point address). Subsequently, organize this information rigorously according to the data structure defined by the predetermined transmission protocol.
[0058] Furthermore, define a compact data structure to carry the digitized analog quantity, and this structure should include:
[0059] Data identifier: Indicates which analog quantity this data represents (e.g., sensor type, measurement point number);
[0060] Timestamp: Precisely records the time of analog quantity sampling, which is crucial for subsequent data analysis and event sequencing; on micro-power devices, time synchronization is a challenge and may require a lightweight time synchronization mechanism or rely on the gateway's timestamp;
[0061] Value: The digital value after ADC conversion. Appropriate value types (such as integer, floating-point) can be adopted according to the actual analog quantity range and precision;
[0062] Status / flag bit (optional): Represents the validity of the data, alarm status, or other relevant information;
[0063] Data serialization: Converts the defined data structure instance into a byte stream for easy transmission over the network; Selecting an efficient serialization method can reduce the data volume.
[0064] Furthermore, the power system relies on standardized protocols (such as IEC 60870-5-104) to achieve data exchange between different devices and systems. Converting the data of micro-power nodes into a format compliant with these protocols enables the data to be seamlessly received and processed by existing power monitoring systems.
[0065] Data compression is performed on the key data in the protocol data structure according to the analog signal type;
[0066] Furthermore, in the environment where micro-power devices are resource-constrained, creatively applying different compression strategies to minimize the amount of transmitted data is a direct manifestation of the core technology of "changing the coding format and expanding the transmission bandwidth".
[0067] Furthermore, to achieve efficient data compression suitable for micro-power devices, careful design is required in algorithm selection and application strategies. The core principle is low computational complexity and low memory occupancy.
[0068] Furthermore, for slowly changing analog signal data, differential coding is adopted, including: maintaining a variable at the sending end to store the previously successfully sent sampling value S n-1 , collecting a new sampling value S n , calculating the difference △S, encoding the difference, and compressing the encoded difference and header information;
[0069] Furthermore, since the range of the difference is usually smaller than that of the sampling value, it can be represented with fewer bits. For example, if S nIf 12 bits are required for representation, but the difference is within the range of ±16 most of the time, then only a few bits (such as signed 5 bits) are needed to represent this difference.
[0070] Further, for periodic and patterned analog signal data, a model-based coding method is adopted, including: identifying a representative periodic waveform in the signal as a template, transmitting the template only once, and only transmitting a reference to the template and the deviation analysis signal between the current waveform and the template subsequently;
[0071] Further, for some data that does not need to be transmitted and processed immediately (for example, the log data of the device, non-urgent historical waveform records), the micro-power device can cache the data. When there is more idle time or energy (for example, connected to an external power source, in a maintenance window period), a relatively complex compression algorithm can be used to compress a batch of data in the cache, and then send the compressed data block at one time. Table 2 shows the advantages of this method in terms of time consumption and data reduction.
[0072] Table 2. Comparison of Compressed Data
[0073]
[0074] The amount of compressed data directly affects the size of subsequent channel coding and IP encapsulation, and thus determines the number of data packets and the transmission duration of wireless transmission. By performing efficient byte optimization in this link, it is ensured that the key information of the analog signal is effectively transmitted to the IP network on the micro-power and bandwidth-limited wireless link with the lowest energy consumption and the fastest speed.
[0075] Map the compressed data to the information elements and information bodies of Protocol 103 or Protocol 104 to generate a complete protocol frame. The specific process is as Figure 2 shown;
[0076] Further, the IEC 60870-5 protocol family (101, 103, 104, etc.) defines the transmission formats and protocols for data such as remote control, telemetry, and teleindication in the power system. Its core is the application service data unit (ASDU). The ASDU carries the actual application data (such as measurement values, status, alarms) and their attribute information. The goal of this step is to fill the micro-power data collected into the ASDU structure and add the necessary protocol control information to form a complete protocol frame.
[0077] Further, generating a complete protocol frame includes:
[0078] Put the compressed data into the corresponding information element format when generating the ASDU, and then decompress it after the receiving end receives the ASDU;
[0079] According to the mapping rules, combine the type identifier, transmission reason, common address, information object address, and the byte sequences of information elements including measurement values, timestamps, and quality descriptors to form a complete ASDU byte block;
[0080] Construct the APCI through the start character, length field, and control field;
[0081] Combine the APCI and ASDU to obtain the IEC 104 protocol frame that is ultimately transmitted in the TCP / IP payload.
[0082] Furthermore, place the filled ASDU into the complete protocol frame structure. For the IEC 104 protocol based on IP, its frame structure is built on top of TCP / IP and mainly includes an Application Layer Protocol Control Information (APCI) field and one or more ASDUs.
[0083] Furthermore, according to the mapping rules, combine the type identifier, transmission reason, common address, information object address, and the byte sequences of information elements including measurement values, timestamps, quality descriptors, etc. to form a complete ASDU byte block, and the number field of the information object needs to be calculated and filled.
[0084] Furthermore, constructing the APCI is a unique header of the IEC 104 protocol, which is used to control the connection and manage the data flow. It contains:
[0085] Start character: fixed value 0x68;
[0086] Length field: indicates the total length of the APCI and ASDU;
[0087] Control field: contains the send / receive sequence number (Sequence Number) and control commands (such as acknowledgment, test, stop, etc.); this is the key to realizing reliable transmission, flow control, and connection management in the IEC 104 protocol.
[0088] Furthermore, place the APCI field in the front, followed by the constructed ASDU byte block, which is the IEC 104 protocol frame that is ultimately transmitted in the TCP / IP payload.
[0089] Map according to the data structures defined in the commonly used IEC 60870-5-103 or IEC 60870-5-104 protocols in the power system, and finally generate a complete protocol frame. This step is the key to realizing the seamless connection between the micro-power wireless data acquisition and the existing power system monitoring system, converting the byte stream obtained from the low-level communication into the "power language" that can be understood by the high-level application.
[0090] Perform channel coding on the protocol frame to add redundant information; use the protocol frame after channel coding as the payload, and add an IP header and a transport layer header to form an IP data packet.
[0091] Furthermore, construct a channel coding algorithm for the micro-power device according to the error correction ability, computational complexity, and introduced redundancy ratio, including:
[0092] The channel encoder receives the protocol frame and selects an encoding algorithm according to the encoding calculation amount and code rate. The encoding algorithm generates a new bit sequence containing the original information bits and redundant check bits according to the rules, which is the protocol frame after channel coding.
[0093] When configuring channel coding, determine the code rate according to the expected channel quality, the requirement for data reliability, and the tolerance for power consumption and bandwidth.
[0094] Furthermore, add redundant information to the compressed data to improve the anti-interference ability of wireless transmission and reduce the bit error rate. This can reduce retransmissions caused by errors and indirectly improve the effective data transmission efficiency.
[0095] Furthermore, select an FEC coding method suitable for the micro-power wireless environment, such as a convolutional code, a low-complexity implementation of a low-density parity-check code (LDPC), etc.
[0096] Furthermore, the coding strength (code rate) needs to be dynamically adjusted according to the actual channel quality. When the channel is good, reduce the redundancy to improve the effective data transmission rate; when the channel is poor, increase the redundancy to improve the reliability.
[0097] Furthermore, the coding output of the software needs to be closely coordinated with the modulation method supported by the hardware module. For example, if the hardware supports a more advanced modulation method (such as QAM), theoretically more data can be transmitted under the same bandwidth, but this requires higher signal quality and also requires stronger FEC to ensure reliability. The design of software coding should consider the modulation ability of the hardware and be optimized.
[0098] First, it greatly improves the reliability of wireless transmission, effectively reducing bit errors even in an environment with noise, interference, or signal fading, ensuring that the collected power data can be accurately transmitted to the receiving end; second, it significantly reduces the retransmission requirements caused by transmission errors; third, by increasing the code rate when the channel quality is good, it indirectly improves the effective data transmission efficiency; although the total number of transmitted bits may increase due to redundancy, the number of effective information bits transmitted within a given time is maximized, making better use of the limited wireless bandwidth; finally, this adaptive channel coding enables robustness to complex and changing wireless environments, adjusting the transmission strategy according to environmental changes without manual intervention, improving the adaptability and stability of the method.
[0099] Further, the step of obtaining the IP data packet includes:
[0100] Construct the transport layer header, including: source port number, destination port number, sequence number, confirmation number, window size, and checksum;
[0101] Construct IP header, including: version, header length, differentiated service, total length, identifier, protocol, header checksum, source IP address and destination IP address;
[0102] The IP header, transport layer header, and channel-coded protocol frame are concatenated in sequence to obtain a complete IP data packet.
[0103] Furthermore, the IEC 60870-5-104 protocol standard specifies the use of TCP as the transport layer protocol. TCP provides reliable, connection-oriented, and ordered data transmission services. Although the TCP header overhead is relatively large and requires the maintenance of the connection state machine, which consumes more resources, in order to comply with the standards of the power system, the 104 protocol transmission must usually be based on TCP. The software needs to implement the simplified sender logic of the TCP protocol, including: establishing a TCP connection with the target IP address and port; maintaining the sending and receiving sequence numbers; handling the establishment, maintenance, and disconnection of the connection; constructing the TCP header of the transport layer: including the source port number, destination port number, sequence number, acknowledgment number, window size, checksum, and other fields; using the protocol frame after channel coding as the TCP payload.
[0104] Furthermore, considering UDP in an extreme micro-power scenario, constructing a UDP header includes: source port number, destination port number, length, and checksum (the checksum is optional in UDP, but it is recommended to enable it to provide data integrity check when the wireless link may be unreliable).
[0105] Furthermore, an IP header is added before the transport layer header and the payload (the protocol frame after channel coding). The IP header fields include:
[0106] Version: IPv4 or IPv6. Considering future compatibility and the application of 6LoWPAN, IPv6 is the recommended direction, but it requires the support of the entire network infrastructure;
[0107] Header length, differentiated services, total length: fill the relevant length and QoS fields of the IP packet;
[0108] Identification, flag, and fragment offset: If the IP packet needs to be fragmented, these fields are used for reassembly (in micro-power scenarios, it is necessary to avoid sending packets that are too large and need to be fragmented);
[0109] Lifetime: The maximum number of hops an IP packet can go through in the network, used to prevent dead loops;
[0110] Protocol: Indicates which transport layer protocol the IP payload is;
[0111] Header checksum: used to verify the integrity of the IP header (removed in IPv6 and guaranteed by the link layer or transport layer);
[0112] Source IP address: the IP address of the sensor node or its gateway / device;
[0113] Destination IP address: The IP address of the data receiving server or gateway.
[0114] Furthermore, the constructed IP header, transport layer header and channel-coded protocol frame payload are sequentially concatenated to form a complete IP data packet.
[0115] Encapsulating the channel-coded protocol frame into an IP data packet is a decisive step in converting data from the local device format to a universal network communication format. After digitization, compression, standardization, and error protection, the analog signal sampling data from the micro-power wireless sensor node is finally given a standard network identity and becomes an IP data packet that can be routed and transmitted in the power communication network. This greatly simplifies system integration and management, improves the scalability and flexibility of the network, and enables the data collected by micro-power nodes scattered throughout to be conveniently, reliably, and efficiently transmitted to the remote control center or server.
[0116] Furthermore, the method also includes decoding processing, the specific process is as follows Figure 3 As shown, the specific implementation includes:
[0117] The hardware receives and demodulates the wireless signal;
[0118] Extract IP packets from received wireless data, parse IP headers and transport layer headers, and extract protocol frames;
[0119] Channel decode the protocol frame and correct transmission errors;
[0120] Parse 104 protocol frames and extract ASDU and information elements;
[0121] Restore the information elements of the protocol frame to the original data structure, including the original digital value, timestamp, and identifier information;
[0122] Decompress the compressed data and restore the original digital value;
[0123] Provide the recovered digital value to the upper layer application.
[0124] Further, at the receiving end of the power system (usually a gateway, concentrator, or server with stronger processing capabilities), the receiving module continuously listens for signals from the micro-power wireless sensor nodes. A successful decoding processing chain ensures that the data encapsulated and encoded layer by layer can be correctly restored and provided for upper-layer applications to use.
[0125] Further, the wireless hardware at the receiving end (including antennas, RF front-ends, filters, low-noise amplifiers, etc.) captures the weak 230 MHz wireless signal; the RF front-end of the hardware amplifies and down-converts the signal, converting it into an intermediate-frequency or baseband signal; subsequently, the ADC of the receiving chip digitizes the analog signal; finally, the digital demodulator (DSP or dedicated hardware) executes complex algorithms (matching the modulation method at the sending end) to extract the original digital bit stream from the digitized waveform. This step successfully overcomes the interference and fading of the wireless channel and is the basis for all subsequent digital processing.
[0126] Further, after the wireless hardware successfully demodulates the original bit stream, these bit streams are sent to the network protocol stack software of the receiving-end device to identify and strip information such as the frame headers, frame tails, and check codes of the wireless link layer, and extract the complete IP data packet from the wireless frame, including IP header parsing and transport layer header parsing.
[0127] Further, the received protocol frame is still channel-coded and may have suffered bit flips due to noise interference during wireless transmission. The goal of this step is to detect and correct these errors using the redundant information introduced by the coding. The software calls the decoding algorithm that matches the channel coding algorithm used at the sending end. The decoding algorithm calculates the received coded bit sequence. If the number of errors is within the error correction capability of the decoding algorithm, the algorithm can automatically restore the original, uncoded protocol frame bit sequence. Error detection (such as CRC check) is usually also performed. If an uncorrectable error (the number of errors exceeds the decoding ability) is detected, the protocol frame will be marked as invalid or directly discarded.
[0128] Further, after channel decoding and confirmation of no errors (or errors have been corrected), the obtained is the original power protocol frame (usually in the 104 protocol format). In this step, the software needs to understand the structure of the protocol and extract meaningful power system data from it, including:
[0129] Analyze the structure of the 104 protocol frame, including checking the start character, length field, and parsing the APCI control field (processing sequence numbers, control commands, etc.).
[0130] Analyze the common address of the ASDU (determine the data source device) and the ASDU type identifier (determine the data type, such as measurement values, status quantities, alarms, etc.).
[0131] According to the ASDU type, further analyze the information objects and information elements it contains. For example, for a measured value ASDU, extract the information object address (to determine the specific measurement point), and analyze the information elements including the measured value, timestamp, and quality descriptor.
[0132] Furthermore, the information elements extracted and parsed from the protocol frame have a format defined by the protocol. This step is to convert this protocol-formatted data back into the original data structure or standard data type that is more easily processed and represented within the receiving end.
[0133] Furthermore, it is necessary to execute the corresponding decompression algorithm to restore the original, uncompressed digital sampling values, including: according to the compression algorithm identifier in the data header (if it exists), call the corresponding decompression function. For example, for differential coding, it is necessary to use the received difference and the previous restored value to calculate the current value; for model coding, it is necessary to reconstruct the waveform according to the transmitted model parameters. The digital values restored in this step are the numerical representations after ADC sampling and before compression at the sending end, and they are closest to the discretization result of the original analog signal.
[0134] Furthermore, after processing all the above steps, we finally obtain accurate, reliable, original digital values (or the physical quantity values they represent) with precise timestamps and clear sources. These data are organized into a format that can be directly used by the receiving-end application program, such as being used as function call parameters, filled into database records, or pushed into a message queue. Upper-layer applications can utilize these data for real-time monitoring, historical storage, trend analysis, fault diagnosis, visual display, etc.
[0135] The entire decoding processing chain works together, and its most core beneficial effect is: ensuring that the analog data collected from the micro-power wireless sensing nodes can be accurately, reliably, and timely restored into actionable information that is meaningful for the power system. It overcomes the inherent challenges of micro-power wireless transmission (weak signal, vulnerable to interference), and ensures the integrity and correctness of the data during the process of traversing a complex network (wireless + IP). By converting the data into a protocol format that conforms to the power industry standard and finally restoring it into usable digital values, this decoding process enables the micro-power acquisition system to seamlessly integrate into the existing power monitoring and management system, providing high-quality data support for the stable operation of the power grid, fault early warning, energy efficiency optimization, etc.
[0136] This encoding and decoding processing method, which integrates intelligent sampling, efficient data compression, power protocol standardization, channel coding, and IP encapsulation, has brought revolutionary improvements to the acquisition, conversion, and transmission of micro-power wireless analog signals in the power system. On the premise of the lowest energy consumption and the optimal utilization of limited wireless bandwidth, it overcomes the challenges of resource constraints of micro-power devices and unstable wireless channels, ensuring that the analog acquisition data can be converted into IP data streams that meet the requirements of the power system in a standardized, reliable, and efficient manner. This not only greatly reduces the operation and maintenance costs of on-site devices, improves the success rate and real-time performance of data transmission, but also enables these widely distributed analog information, which was originally difficult to access, to seamlessly integrate into the existing power automation and information networks, laying a solid data foundation for achieving more comprehensive, accurate, and intelligent power grid state perception, fault diagnosis, and refined management.
[0137] Embodiment 2:
[0138] A certain power company introduced the encoding and decoding processing method for converting micro-power wireless analog signals into IP signals provided by the present invention to improve the transmission efficiency of micro-power wireless analog signals. The specific implementation method is as follows:
[0139] At the micro-power receiving end of the power system, the sensing node samples the micro-power wireless analog signal to obtain the original digital value; Table 3 shows the feeder line voltage monitoring data.
[0140] Table 3. Feeder Line Voltage Monitoring Data
[0141]
[0142] Organize the original digital value, timestamp, and identifier information into a protocol data structure defined by the transmission protocol;
[0143] Compress the key data in the protocol data structure according to the analog signal type;
[0144] Furthermore, the data compression includes:
[0145] Select a compression algorithm according to the type of analog signal to meet the resource limitations of micro-power devices, including:
[0146] For slowly changing analog signal data, differential coding is used, including: maintaining a variable at the sending end to store the previously successfully sent sampling value S n-1 , collecting a new sampling value S n , calculating the difference △S, encoding the difference, and compressing the encoded difference and header information;
[0147] For periodic and patterned analog signal data, a model-based coding method is adopted, including: identifying a representative periodic waveform in the signal as a template, transmitting the template only once, and subsequently only compressing and transmitting the reference to the template and the deviation analysis signal between the current waveform and the template;
[0148] For analog signal data with low real-time requirements, an offline compression algorithm is adopted, including: for analog signal data that does not need to be transmitted and processed immediately, caching the data, and when there is more idle time or energy, using a compression algorithm to compress the data in the cache.
[0149] Map the compressed data to the information elements and information bodies of the 104 protocol to generate a complete protocol frame;
[0150] Further, generating a complete protocol frame includes:
[0151] Put the compressed data into the corresponding information element format when generating the ASDU, and decompress the data after the receiving end receives the ASDU;
[0152] According to the mapping rules, combine the type identifier, transmission cause, common address, information object address, and the byte sequences of information elements including measured values, timestamps, and quality descriptors to form a complete ASDU byte block;
[0153] Construct the APCI through the start character, length field, and control field;
[0154] Combine the APCI and ASDU to obtain the final 104 protocol frame transmitted in the TCP / IP payload.
[0155] Perform channel coding on the protocol frame to increase redundant information;
[0156] Further, construct the channel coding algorithm for micro-power devices according to the error correction ability, computational complexity, and introduced redundancy ratio, including:
[0157] The channel encoder receives the protocol frame and selects a coding algorithm according to the coding calculation amount and code rate. The coding algorithm generates a new bit sequence containing the original information bits and redundant check bits according to the rules, which is the channel-coded protocol frame;
[0158] When configuring the channel coding, determine the code rate according to the expected channel quality, the requirement for data reliability, and the tolerance for power consumption and bandwidth.
[0159] Use the channel-coded protocol frame as the payload and add the IP header and transport layer header to form an IP packet;
[0160] Further, construct a transport layer header, including: source port number, destination port number, sequence number, acknowledgment number, window size, and checksum;
[0161] Construct an IP header, including: version, header length, differentiated services, total length, identification, protocol, header checksum, source IP address, and destination IP address;
[0162] Concatenate the IP header, transport layer header, and the channel-coded protocol frame in sequence to obtain a complete IP data packet.
[0163] Deliver the IP data packet to the underlying wireless module driver for transmission according to the protocol. As shown in Table 4, this method has advantages in terms of transmission efficiency and energy consumption due to the smaller data volume.
[0164] Table 4. Comparison of Transmitted Data
[0165]
[0166] Further, it also includes decoding processing:
[0167] The hardware receives and demodulates the wireless signal;
[0168] Extract the IP data packet from the received wireless data, parse the IP header and transport layer header, and extract the protocol frame;
[0169] Perform channel decoding on the protocol frame to correct transmission errors;
[0170] Parse the IEC 104 protocol frame and extract the ASDU and information elements;
[0171] Restore the information elements of the protocol frame to the original data structure, including the original numerical value, timestamp, and identifier information;
[0172] Decompress the compressed data to restore the original numerical value;
[0173] Provide the restored numerical value to the upper-layer application.
[0174] Further, call a decoding algorithm that matches the channel coding algorithm used by the sending end. The decoding algorithm performs calculations on the received coded bit sequence;
[0175] If the number of errors is within the error correction capability of the decoding algorithm, the algorithm automatically restores the original, uncoded protocol frame;
[0176] If it is detected that the number of errors exceeds the decoding capability, the protocol frame will be marked as invalid and directly discarded.
[0177] Although embodiments of the present invention have been shown and described, those of ordinary skill in the art will appreciate that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for encoding and decoding the conversion of a micro-power wireless analog signal into an IP signal, characterized in that, including: At the micro-power receiving end of the power system, the sensing node samples the micro-power wireless analog signal to obtain the original digital value; Organize the original digital value, timestamp, and identifier information into the protocol data structure defined by the transmission protocol; Data compress the key data in the protocol data structure according to the analog signal type; map the compressed data to the information elements and information bodies of the IEC 104 protocol to generate a complete specification frame; Perform channel coding on the specification frame to add redundant information; use the channel-coded specification frame as the payload, and add an IP header and a transport layer header to form an IP data packet; Hand over the IP data packet to the underlying wireless module driver for transmission according to the protocol.
2. The encoding and decoding processing method for converting a micro-power wireless analog signal into an IP signal according to claim 1, characterized in that, Data compression includes: Select a compression algorithm according to the type of analog signal to meet the resource limitations of micro-power devices, including: For slowly changing analog signal data, differential coding is adopted, including: maintaining a variable at the sending end to store the previously successfully sent sampling value S n-1 , collecting a new sampling value S n , calculating the difference △S, encoding the difference, and compressing the encoded difference and the header information; For periodic and patterned analog signal data, use a model-based coding method, including: identifying a representative periodic waveform in the signal as a template, only sending the template once during transmission, and only compressing and sending the reference to the template and the deviation analysis signal between the current waveform and the template subsequently; For analog signal data with low real-time requirements, use an offline compression algorithm, including: for analog signal data that does not need to be transmitted and processed immediately, cache the data, and when there is more idle time or energy, use the compression algorithm to compress the data in the cache.
3. The encoding and decoding processing method for converting a micro-power wireless analog signal into an IP signal according to claim 1, wherein, Generating a complete specification frame includes: Put the compressed data into the corresponding information element format when generating the ASDU, and decompress it at the receiving end after receiving the ASDU; According to the mapping rules, combine the type identifier, transmission reason, common address, information object address, and the byte sequence of the information elements including the measured value, timestamp, and quality descriptor to form a complete ASDU byte block; Construct the APCI through the start character, length field, and control field; Combine the APCI and ASDU to obtain the final IEC 104 specification frame transmitted in the TCP / IP payload.
4. The encoding and decoding processing method for converting a micro-power wireless analog signal into an IP signal according to claim 1, wherein Construct the channel coding algorithm for micro-power devices according to the error correction ability, computational complexity, and introduced redundancy ratio, including: The channel encoder receives the specification frame and selects the coding algorithm according to the coding calculation amount and code rate. The coding algorithm generates a new bit sequence containing the original information bits and redundant check bits according to the rules, which is the channel-coded specification frame; When configuring the channel coding, determine the code rate according to the expected channel quality, requirements for data reliability, tolerance for power consumption and bandwidth.
5. The encoding and decoding processing method for converting a micro-power wireless analog signal into an IP signal according to claim 1, characterized in that: Construct the transport layer header, including: source port number, destination port number, sequence number, acknowledgment number, window size, checksum; Construct the IP header, including: version, header length, differentiated services, total length, identification, protocol, header checksum, source IP address, and destination IP address; Concatenate the IP header, transport layer header, and the channel-coded specification frame in sequence to obtain a complete IP data packet.
6. The encoding and decoding processing method for converting a micro-power wireless analog signal into an IP signal according to claim 1, characterized in that It also includes: The hardware receives and demodulates the wireless signal; Extract IP data packets from the received wireless data, parse the IP header and the transport layer header, and extract the protocol frames; Perform channel decoding on the protocol frames to correct transmission errors; Parse the IEC 104 protocol frames and extract the ASDU and information elements; Restore the information elements of the protocol frames to the original data structure, including the original numerical values, timestamps, and identifier information; Decompress the compressed data to restore the original numerical values; Provide the restored numerical values to the upper-layer applications.
7. The encoding and decoding processing method for converting a micro-power wireless analog signal into an IP signal according to claim 6, wherein: Invoke a decoding algorithm that matches the channel coding algorithm used by the sending end, and the decoding algorithm calculates on the received encoded bit sequence; If the number of errors is within the error correction capability of the decoding algorithm, the algorithm automatically restores the original, unencoded protocol frames; If it is detected that the number of errors exceeds the decoding capability, the protocol frames will be marked as invalid and directly discarded.