A method, system and medium for optimizing transmission of power line carrier signals
By using zero crossing detection circuit and data reordering encoding technology in the power line transmission system, the problem of packet loss and demodulation difficulty in existing power line communication is solved, and efficient and stable power line communication is achieved.
Patent Information
- Application Number
- CN202410672935.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-05-28
AI Technical Summary
When existing power line communication technology reduces signal interference and improves communication quality, it cannot effectively solve the phenomenon of packet loss, and increases the communication cost and demodulation difficulty.
By using a zero crossing detection circuit in the power line transmission system, the zero crossing point of the power line signal is detected, and the data to be transmitted is carried out in combination with the maximum transmission unit to be transmitted, and the data is modulated into an analog signal using the zero crossing point as a marking symbol for optimized transmission.
It effectively improves the anti-interference ability and transmission stability of power line communication, reduces the difficulty of understanding and demodulation speed, increases communication efficiency, stability and availability, and avoids the irreversible impact caused by continuous packet loss.
Smart Images

Figure CN118473459B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power line communication, and in particular to a method and system for optimizing transmission of power line carrier signals. Background Art
[0002] Power line carrier signal is the signal transmission method of power line communication. Power line communication is a technology that uses power lines to transmit data. It uses existing power line facilities as a transmission medium to transmit data signals to the target location through power lines, thereby achieving the purpose of data communication. This communication method is widely used in home, industry, commerce and other fields. In power line communication, data signals are converted into signals that can be transmitted on power lines through modulation technology. Once the signal is injected into the power line, it will propagate through the line to the target location, and then be received by devices such as demodulators and restored to the original data signal.
[0003] However, there are various complex signal interferences in the process of power line communication, such as electrical equipment interference, line attenuation and noise, cross-phase interference and external antenna interference. In the existing power line communication process, most of them reduce the impact of signal interference and improve communication quality from the perspective of signal filtering or uncontrolled increase in signal transmission power. However, it is unable to improve the packet loss phenomenon in the communication process and greatly increases the cost of power line communication, and also increases the demodulation difficulty at the demodulation end. Summary of the invention
[0004] In order to solve the technical problems that in the existing power line communication process of the prior art, most of the methods reduce the influence of signal interference and improve the communication quality from the perspective of signal filtering or uncontrolled increase of signal transmission power, but cannot improve the packet loss phenomenon in the communication process and greatly increase the power line communication cost, and also increase the demodulation difficulty of the demodulation end, the present invention provides a power line carrier signal optimization transmission method and system.
[0005] The technical solution provided by the embodiment of the present invention is as follows:
[0006] First aspect
[0007] A power line carrier signal optimization transmission method provided by an embodiment of the present invention is applied to a power line transmission system with a zero-crossing detection circuit, wherein the zero-crossing detection circuit includes a rectifier bridge, a first resistor, an optical coupler, a second resistor and a zero-crossing signal output terminal, the alternating current is connected to the first resistor through the rectifier bridge, the first resistor and the ground wire are respectively connected to the first pin and the second pin of the optical coupler, wherein a light-emitting diode is arranged between the first pin and the second pin, the third pin of the optical coupler is grounded, the fourth pin of the optical coupler is connected to the power supply through the second resistor, a phototransistor is arranged between the third pin and the fourth pin, and the zero-crossing signal output terminal is led out from between the fourth pin and the second resistor;
[0008] Methods include:
[0009] S1: Acquire power line signals and data to be transmitted;
[0010] S2: Detect the power line signal through a zero-crossing point detection circuit to obtain multiple zero-crossing points;
[0011] S3: taking the maximum transmission unit of the power line as the maximum packet loss allowable length, and re-arranging the data to be transmitted based on discrete cosine transform in combination with the maximum packet loss allowable length, so that the same data to be transmitted is located at non-adjacent transmission positions;
[0012] S4: performing non-equivalent redundant coding on the rearranged data to be transmitted;
[0013] S5: constructing a signal transmission window between adjacent zero-crossing points;
[0014] S6: Combining the signal transmission window and the corresponding zero-crossing point, using the zero-crossing point as a marker symbol to modulate the redundantly encoded data to be transmitted into an analog signal;
[0015] S7: Transmit the analog signal to the receiving end through the power line, completing the optimized transmission of the power line carrier signal, i.e., the analog signal.
[0016] Second aspect
[0017] An embodiment of the present invention provides a power line carrier signal optimization transmission system, comprising:
[0018] processor;
[0019] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the power line carrier signal optimization transmission method as described in the first aspect is implemented.
[0020] The third aspect
[0021] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the power line carrier signal optimization transmission method as described in the first aspect is implemented.
[0022] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0023] In the present invention, a physical circuit based on an optocoupler is used for zero-crossing detection, and the zero-crossing points can be accurately collected in a low-cost, high-efficiency and anti-interference manner. Thereafter, the zero-crossing points in the power line are effectively utilized in the modulation process of the data to be transmitted, and the zero-crossing points are used as marking signals to modulate the redundantly encoded data to be transmitted into analog signals. A signal transmission window is constructed between every two zero-crossing points for orderly signal transmission, and the analog signal cycle can be quickly identified at the receiving end, which greatly reduces the demodulation difficulty and speed, and can also increase the anti-interference ability of signal transmission, and can easily cope with various real-time and complex power line communications. Before the data to be transmitted is transmitted, the data to be transmitted is arranged based on discrete cosine transform in combination with the maximum allowed packet loss length in a manner such that the data of the same data to be transmitted are located at non-adjacent transmission positions, and non-equivalent redundant coding is performed on the rearranged data to be transmitted, thereby increasing the redundant coding length of important data and ensuring that the data to be transmitted can be accurately transmitted to the receiving end under complex interference conditions. Even if interfered with, the irreversible impact caused by continuous packet loss can be avoided. Through this rearrangement and non-equivalent redundant coding method, the non-retransmission mechanism can be restored even if the signal is interfered with, thereby greatly improving the efficiency, stability and availability of power line communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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.
[0025] Figure 1 A schematic diagram of a flow chart of a method for optimizing transmission of power line carrier signals provided by an embodiment of the present invention;
[0026] Figure 2 A schematic diagram of the structure of a zero-crossing detection circuit provided by an embodiment of the present invention;
[0027] Figure 3 A schematic diagram of the structure of a power line transmission system provided by an embodiment of the present invention;
[0028] Figure 4 A schematic structural diagram of a power line carrier signal optimization transmission system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0030] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0031] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0032] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0033] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0034] Reference Manual Attached Figure 1 , which shows a schematic diagram of a flow chart of a method for optimizing transmission of power line carrier signals provided by an embodiment of the present invention. Figure 2 , which shows a schematic diagram of the structure of a zero-crossing detection circuit provided by an embodiment of the present invention. Figure 3 , showing a schematic structural diagram of a power line transmission system provided by an embodiment of the present invention.
[0035] Figure 2 In the example, the input end is connected to alternating current AC, i.e., a power line signal, which then flows into the rectifier bridge BRIDGE for rectification, and then the rectified signal flows into the first resistor R1. The first resistor and the ground wire are respectively connected to the first pin 1 and the second pin 2 of the optocoupler, a light-emitting diode VD is arranged between the first pin and the second pin, the third pin of the optocoupler is connected to the ground 3, the fourth pin 4 of the optocoupler is connected to the power supply DC through the second resistor R2, a phototransistor VT is arranged between the third pin and the fourth pin, and the zero-crossing signal output end is led out from between the fourth pin and the second resistor. The zero-crossing point detected by the zero-crossing detection circuit flows into the power line transmission system, and the power line carrier signal is transmitted in combination with the zero-crossing point, thereby improving the anti-interference ability and transmission stability of the carrier signal.
[0036] An embodiment of the present invention provides a method for optimizing transmission of a power line carrier signal, which is applied to a power line transmission system with a zero-crossing detection circuit, wherein the zero-crossing detection circuit includes a rectifier bridge, a first resistor, an optocoupler, a second resistor and a zero-crossing signal output terminal, the alternating current is connected to the first resistor through the rectifier bridge, the first resistor and the ground wire are respectively connected to the first pin and the second pin of the optocoupler, wherein a light-emitting diode is arranged between the first pin and the second pin, the third pin of the optocoupler is grounded, the fourth pin of the optocoupler is connected to a power supply through the second resistor, a phototransistor is arranged between the third pin and the fourth pin, and the zero-crossing signal output terminal is led out from between the fourth pin and the second resistor.
[0037] It should be noted that this circuit uses a rectifier bridge to convert an AC signal into a DC signal, and uses an optocoupler for electrical isolation, so that the detected zero-crossing signal can be effectively isolated and transmitted with other circuits. When the AC signal passes through the rectifier bridge, the light-emitting diode inside the optocoupler will emit a light signal according to the change of the input signal. After this light signal passes through the photosensitive diode, it can generate an output signal related to the change of the input signal, thereby realizing accurate detection of the zero-crossing point. The advantage of this structure is that it has a high anti-interference ability. The use of optocouplers realizes electrical isolation, improves the stability and safety of the system, and also enables the zero-crossing signal to be isolated and transmitted with other circuits, enhancing the reliability and flexibility of the overall system.
[0038] In a possible implementation, the power line transmission system further includes a transmitting end, a receiving end and a controller, the zero-crossing signal output end of the zero-crossing detection circuit is connected to the controller, and the controller is connected to the receiving end through the transmitting end.
[0039] It can be understood that the zero-crossing signal output end of the zero-crossing detection circuit is connected to the controller, and the controller is connected to the transmitting end and the receiving end. The controller plays a coordination and control role. It receives the zero-crossing signal from the zero-crossing detection circuit, then modulates the data to be transmitted in combination with the zero-crossing signal, and then sends the modulated signal to the receiving end. By combining the zero-crossing detection with the data transmission process, accurate control and management of power line communication is achieved, thereby improving the efficiency and reliability of communication.
[0040] The method can be implemented by a power line carrier signal optimization transmission device, which can be a terminal or a server. The processing flow of the power line carrier signal optimization transmission method can include the following steps:
[0041] S1: Obtain power line signals and data to be transmitted.
[0042] Among them, the power line signal is an AC signal, and there is a zero crossing point in each cycle. The data to be transmitted refers to the specific information or content that needs to be transmitted on the power line. These data can be various forms of information, such as text files, audio files, video files or other forms of digital data. In power line communication, the data to be transmitted is properly encoded and modulated, and then transmitted to the receiving end through the power line to complete the data transmission process.
[0043] In a possible implementation manner, after S1, the method further includes:
[0044] The data to be transmitted is preprocessed including denoising.
[0045] It should be noted that the signal is processed for noise. Specifically, the denoising process can be done by digital filtering, signal smoothing, noise reduction algorithms, etc., to eliminate interference and noise components in the signal. By removing noise, the accuracy and reliability of the data can be improved, thereby improving the performance of the power line communication system. To reduce the impact of noise on data transmission. This may include filtering, noise reduction and other technologies to improve the quality and stability of the signal.
[0046] S2: Detect the power line signal through the zero-crossing point detection circuit to obtain multiple zero-crossing points.
[0047] Among them, the "zero crossing point" refers to the point where the AC signal crosses the horizontal line on the waveform and changes direction. In a sine waveform, these points correspond to the value of the voltage signal passing through the zero point (0V). In the zero crossing detection circuit, by detecting these zero crossing points, the periodic changes of the AC signal can be determined. This periodic change is often used for synchronization and timing data transmission, because the zero crossing point is an important feature in the AC signal and can be used to identify the periodicity and phase information of the signal. Therefore, by detecting the zero crossing point, the power line signal can be effectively synchronized and demodulated, thereby achieving reliable data transmission.
[0048] S3: Taking the maximum transmission unit of the power line as the maximum packet loss allowable length, and re-arranging the data to be transmitted based on discrete cosine transform in combination with the maximum packet loss allowable length, so that the same data to be transmitted is located at non-adjacent transmission positions.
[0049] Specifically, first, the maximum transmission unit in power line communication is determined, that is, the maximum amount of data that can be sent in a single transmission, which also determines the maximum allowable packet loss length, that is, the amount of data loss that can be tolerated during the transmission process. Next, according to this maximum packet loss allowable length, the data to be transmitted is rearranged based on discrete cosine transform. Discrete cosine transform is a signal processing technology used to convert data from time domain to frequency domain. It is widely used in data compression and signal processing. By transforming the data, the data can be converted into a set of frequency domain coefficients, including baseband coefficients and high-frequency coefficients. In the rearrangement process, different parts of the same data to be transmitted are scattered and placed in non-adjacent transmission positions. The purpose of this is to increase the stability of data transmission. Even if packet loss occurs, the impact on the entire data can be minimized because different parts of the data are scattered to different transmission positions. This rearrangement technology can improve the anti-interference ability and fault tolerance of the data, thereby improving the reliability of power line communication.
[0050] In a possible implementation, S3 specifically includes:
[0051] S301: Determine the data type of the data to be transmitted, where the data type includes text data, audio data and image data.
[0052] S302: When the data type of the data to be transmitted is text data, convert the data to be transmitted into a text digital signal; otherwise, proceed to S303.
[0053] Text data is usually not suitable for direct processing using discrete cosine transform, because the characteristics of text data are very different from those of audio and image data. Discrete cosine transform is usually used to process continuous signals, while text data is a discrete sequence of symbols, and their properties and data distribution methods are different. Therefore, text data is converted into a form that makes it suitable for digital signals of discrete cosine transform.
[0054] S303: Perform discrete cosine transform on the text digital signal, audio data and image data respectively to generate corresponding transform coefficients, wherein the transform coefficients include base frequency coefficients and high frequency coefficients.
[0055] Among them, the baseband coefficient represents the low-frequency information in the signal, which usually corresponds to the overall trend or large changes in the signal. The high-frequency coefficient reflects the subtle changes and fast-changing parts in the signal, corresponding to the details and textures in the signal. In a one-dimensional discrete cosine transform, there is 1 baseband coefficient and N-1 high-frequency coefficients after the transformation. By performing discrete cosine transform on the data, the original data can be converted into the form of baseband coefficients and high-frequency coefficients, so as to better represent and process the frequency domain information of the data, providing a basis for subsequent data processing and transmission.
[0056] S304: Generate rectangular storage units with the same number of storage units as the number of transformation coefficients of each data to be transmitted, and fill the data to be transmitted into the corresponding rectangular storage units, respectively. The side length d of the storage unit is:
[0057]
[0058] Wherein, N represents the number of transformation coefficients of any data to be transmitted, and t represents the total number of storage units, i.e., the number of data packets.
[0059] S305: Rearrange the storage units in the rectangular storage unit in combination with the maximum packet loss allowable length to generate sub-storage units, where the side length e of the sub-storage unit is:
[0060]
[0061] Where k represents the maximum allowed packet loss length.
[0062] It should be noted that the size of the sub-storage unit is reasonably set according to the expected packet loss and data coefficient situation to enhance the ability to resist continuous packet loss. A larger k value can make the length of resisting continuous packet loss longer, but it will also cause the coefficient dispersion interval to become shorter. The purpose of this is to make the lost data more dispersed even if continuous packet loss occurs during data transmission, effectively solving the problem of demodulation failure at the receiving end caused by easy packet loss in power line communication, thereby improving the stability and reliability of data transmission. And make the length of the packet loss data moderate within the range of the maximum allowed length of packet loss.
[0063] S306: Sequentially number the sub-storage units from outside to inside in a clockwise direction.
[0064] S307: Fill the transformation coefficients of the data to be stored into the rectangular storage units in sequence according to the numbers.
[0065] It should be noted that the reordering process can enhance the ability of the data to be transmitted to resist sudden continuous packet loss, avoid data transmission interruption or delay, and affect the reliability and performance of communication. Continuous packet loss refers to the continuous loss of multiple data packets over a period of time. It will lead to serious consequences such as data transmission interruption, increased communication delay, data loss and network congestion, affecting the reliability and performance of communication.
[0066] S4: Perform unequal redundant encoding on the rearranged data to be transmitted.
[0067] Among them, non-equivalent redundant coding refers to using different coding methods for different types of data, and determining different redundant coding schemes based on the importance of the data and the degree of impact on the transmission quality. The purpose of redundant coding is to add redundant information during data transmission to improve data reliability and fault tolerance. By adding redundant information at the sending end, the receiving end can perform error correction or recovery when receiving partially lost or damaged data, thereby reducing the impact of data transmission errors.
[0068] In power line communication, since the channel may have noise and interference, as well as packet loss, the use of non-equivalent redundant coding can more effectively protect the integrity and reliability of data. Different types of data may have different requirements for transmission quality, so the appropriate redundant coding strategy can be flexibly selected according to the characteristics and importance of the data type to maximize the success rate and quality of data transmission.
[0069] In a possible implementation, S4 specifically includes:
[0070] S401: extracting base frequency coefficients in each rectangular storage unit to form a first sequence, extracting a preset number of high frequency coefficients in each rectangular storage unit to form a second sequence, and extracting the remaining high frequency coefficients to form a third sequence.
[0071] S402: Establishing redundancy constraints as follows:
[0072]
[0073] in, respectively represent the number of bits of the first sequence, the second sequence and the third sequence, represent the redundancy of the first sequence, the second sequence and the third sequence respectively, represents the number of bits of the first sequence, the second sequence and the third sequence with redundancy, and p represents the bit length of the transmission data packet.
[0074] It should be noted that when performing redundant coding, the size of redundancy needs to be controlled to ensure that the size of the transmission data packet does not grow indefinitely. The formula expresses the constraint relationship between redundancy and the bit length of the transmission data packet, that is, in the three protection levels, the bit length of the transmission data packet with redundancy cannot exceed the preset maximum value p. The purpose of the constraint is to improve the reliability and fault tolerance of data transmission while avoiding excessive redundant information that leads to reduced transmission efficiency and waste of bandwidth. By limiting redundancy, the size of the transmission data packet can be controlled as much as possible on the basis of ensuring a certain degree of data redundancy, thereby balancing the reliability and efficiency of data transmission.
[0075] S403: In combination with the redundancy constraint condition, non-equivalent redundant coding is performed on the majority of the first sequence, the second sequence and the third sequence respectively through convolution coding, and the code rate r of each sequence is determined to obtain the redundancy R of each sequence:
[0076]
[0077] in, They represent the constraint length, number of information bits and code rate of convolutional coding respectively.
[0078] Among them, the redundancy of the first sequence, the second sequence and the third sequence decreases in sequence.
[0079] The use of convolutional code types can enhance the ability to resist burst loss, and more redundant encoding is performed on data that has a great impact on data reconstruction during transmission, which is beneficial for ensuring a certain data quality when some data cannot be recovered.
[0080] S404: Redundancy encoding is performed on the corresponding sequence in combination with redundancy and code rate.
[0081] Specifically, first, the data is divided into three sequences: the first sequence contains the base frequency coefficients, the second sequence contains the pre-set number of high-frequency coefficients, and the remaining high-frequency coefficients constitute the third sequence. Next, a redundancy constraint is established to ensure that the redundant information of each sequence will not make the bit length of the transmission data packet exceed the preset maximum value p, thereby balancing reliability and efficiency. Then, the three sequences are non-equivalently redundantly encoded by convolutional coding to generate corresponding redundant codes. The use of convolutional codes can enhance the system's fault tolerance to burst loss, and even if part of the data cannot be recovered, the quality of data transmission can be guaranteed. The setting of redundancy and code rate makes the redundancy of the sequence decrease in sequence, which means that the sequence with a greater impact on data reconstruction will be given more redundant information to improve its reliability during transmission. Finally, according to the set redundancy and code rate, each sequence is redundantly encoded to generate corresponding redundant data to improve the fault tolerance and reliability of data transmission.
[0082] S5: Construct a signal transmission window between adjacent zero-crossing points.
[0083] It should be noted that a signal transmission window is constructed between adjacent zero crossing points. The zero crossing point is the point in the power line signal where the value changes from positive to negative, or from negative to positive, and they represent the change in signal amplitude. The signal transmission window refers to the time window in which the system is ready to transmit data during the time period between these zero crossing points. The purpose of constructing a signal transmission window is to find a suitable time to transmit data within the cycle of the power line signal. By setting a transmission window between adjacent zero crossing points, it can be ensured that the timing of data transmission is accurately aligned with the signal cycle, thereby effectively transmitting data. The advantage of this is that the accuracy and reliability of data transmission can be improved, while maximizing the use of the signal cycle time to ensure the efficiency of data transmission.
[0084] S6: Combining the signal transmission window and the corresponding zero-crossing point, the zero-crossing point is used as a marker symbol to modulate the redundantly encoded data to be transmitted into an analog signal.
[0085] It should be noted that the zero crossing point is used as a time marker to construct a signal transmission window between adjacent zero crossing points. Then, the system modulates the redundantly encoded data into analog signals and embeds these analog signals into the corresponding signal transmission windows. During the transmission process, each zero crossing point is used as the starting point of the signal to mark the transmission cycle of the analog signal. The purpose of this is to ensure that the transmission of the analog signal is synchronized with the cycle of the power line signal, thereby improving the accuracy and reliability of data transmission. At the receiving end, demodulation can be performed according to the mark, effectively reducing the difficulty of demodulation and improving the demodulation speed.
[0086] In a possible implementation, S6 specifically includes:
[0087] S601: In combination with the zero-crossing point moment, the data to be transmitted is modulated by a pulse amplitude modulation mode so that the cycle length of the modulated signal is between adjacent zero-crossing points:
[0088]
[0089] in, represents the initial analog signal after modulation, Indicates the distance between time t and the jth zero crossing point Length of time, Represents a unit pulse signal, represents the data point to be transmitted after the i-th redundant coding, .
[0090] It should be noted that in pulse amplitude modulation, we use the data points to be transmitted Mapped to the analog signal between adjacent zero crossings, a pulse is generated between each zero crossing, and a pulse is generated according to the data point to be transmitted. To adjust the pulse amplitude. is an impulse function, indicating that at time t, the distance from zero The pulse function is usually defined as taking the value 1 for a short period of time and 0 for the rest of the time. It determines the shape and duration of the pulse. The process of pulse amplitude modulation is to change the pulse function to the data point to be transmitted. Multiply and add the results to get the final modulated signal So, the formula can be interpreted as: for each zero crossing , the data points to be transmitted Converted into analog signals through pulse amplitude modulation, and all these signals are superimposed together to obtain the final modulated signal .
[0091] S602: Generate a marker signal different from the pulse signal of the analog signal at two zero-crossing points of the signal transmission window:
[0092]
[0093] in, represents the marking signal, A represents the rectangular pulse amplitude, rect() represents the rectangular pulse function, Indicates the duration of the rectangular pulse, represents the jth zero-crossing point, .
[0094] It should be noted that the rectangular pulse function has Appears at and lasts for , with an amplitude of A. At the beginning and end of the cycle, this rectangular pulse function will suddenly appear and last for a period of time to mark the beginning and end of the cycle. Using a rectangular pulse function as a marker signal can more clearly define the position of the marker in the time domain, making it easier to identify and demodulate, and can also increase the signal's anti-interference ability to a certain extent. It can also be distinguished from the unit pulse signal of the demodulated data to be transmitted, increase the distinction between the marker and the carrier signal, make it easier to identify during demodulation, and reduce the difficulty of demodulation.
[0095] S603: Combine the marking signal and the corresponding initial analog signal in time sequence to form an analog signal :
[0096] .
[0097] It should be noted that through the pulse amplitude modulation mode, the system maps the data points to be transmitted to the analog signal between adjacent zero crossings, and generates a marker signal at each zero crossing to mark the beginning and end of the cycle. These marker signals use rectangular pulse functions to clearly define the position of the marker in the time domain, enhancing the signal recognition and demodulation capabilities. Finally, the system merges the marker signal with the modulated analog signal in time sequence to form the final analog signal, making the signal transmission process more stable and reliable, and easy to identify and demodulate.
[0098] In a possible implementation manner, after S6, the method further includes:
[0099] The modulated analog signal is filtered by a moving average filter.
[0100] It should be noted that the modulated signal may contain additional spectral components. In order to reduce interference and bandwidth occupancy, the signal is usually filtered through a filter. The filter can also be a bandpass, low-pass or high-pass filter to remove unnecessary spectral components.
[0101] S7: Transmit the analog signal to the receiving end through the power line, completing the optimized transmission of the power line carrier signal, i.e., the analog signal.
[0102] It can be understood that the modulated analog signal is transmitted to the receiving end through the power line, completing the optimized transmission process of the power line carrier signal. This means that the data processed and encoded in the previous steps has been converted into an analog signal and transmitted to the receiving end through the power line to complete the data transmission. This process ensures the stability and reliability of the data in the power line communication, thereby achieving optimized transmission.
[0103] In a possible implementation manner, after S7, the method further includes:
[0104] Real-time acquisition of power line noise power and calculation of signal-to-noise ratio :
[0105]
[0106] in, Indicates the transmission power of the analog signal, Represents the noise power.
[0107] Collect the demodulation accuracy of the receiving end.
[0108] When the demodulation accuracy is less than the preset demodulation accuracy, the transmission power of the analog signal is increased to improve the signal-to-noise ratio until the demodulation accuracy meets the preset demodulation accuracy.
[0109] It should be noted that in this process, power adjustment is performed dynamically according to the real-time situation of the channel, and the power level of the transmitted signal is dynamically adjusted to maximize the quality and reliability of the signal. Specifically, when the channel noise is high, the power of the transmitted signal can be increased to increase the ratio between the signal and the noise, thereby improving the anti-interference ability of the signal. When the channel noise is low, the power of the transmitted signal can be appropriately reduced to save energy and reduce interference. Specifically, a target signal-to-noise ratio threshold can be set, and when the actual signal-to-noise ratio is lower than the threshold, the transmission power is increased. When the actual signal-to-noise ratio is higher than the threshold, the transmission power is reduced.
[0110] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0111] In the present invention, a physical circuit based on an optocoupler is used for zero-crossing detection, and the zero-crossing points can be accurately collected in a low-cost, high-efficiency and anti-interference manner. Thereafter, the zero-crossing points in the power line are effectively utilized in the modulation process of the data to be transmitted, and the zero-crossing points are used as marking signals to modulate the redundantly encoded data to be transmitted into analog signals. A signal transmission window is constructed between every two zero-crossing points for orderly signal transmission, and the analog signal cycle can be quickly identified at the receiving end, which greatly reduces the demodulation difficulty and speed, and can also increase the anti-interference ability of signal transmission, and can easily cope with various real-time and complex power line communications. Before the data to be transmitted is transmitted, the data to be transmitted is arranged based on discrete cosine transform in combination with the maximum allowed packet loss length in a manner such that the data of the same data to be transmitted are located at non-adjacent transmission positions, and non-equivalent redundant coding is performed on the rearranged data to be transmitted, thereby increasing the redundant coding length of important data and ensuring that the data to be transmitted can be accurately transmitted to the receiving end under complex interference conditions. Even if interfered with, the irreversible impact caused by continuous packet loss can be avoided. Through this rearrangement and non-equivalent redundant coding method, the non-retransmission mechanism can be restored even if the signal is interfered with, thereby greatly improving the efficiency, stability and availability of power line communication.
[0112] Reference Manual Attached Figure 4 , showing a schematic structural diagram of a power line carrier signal optimization transmission system provided by the present invention.
[0113] The present invention further provides a power line carrier signal optimization transmission system 20, which is applied to the above-mentioned power line carrier signal optimization transmission method, comprising:
[0114] Processor 201.
[0115] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201, the power line carrier signal optimization transmission method of the method embodiment is implemented.
[0116] The power line carrier signal optimization transmission system 20 provided by the present invention can execute the above-mentioned power line carrier signal optimization transmission method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0117] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0118] In the present invention, a physical circuit based on an optocoupler is used for zero-crossing detection, and the zero-crossing points can be accurately collected in a low-cost, high-efficiency and anti-interference manner. Thereafter, the zero-crossing points in the power line are effectively utilized in the modulation process of the data to be transmitted, and the zero-crossing points are used as marking signals to modulate the redundantly encoded data to be transmitted into analog signals. A signal transmission window is constructed between every two zero-crossing points for orderly signal transmission, and the analog signal cycle can be quickly identified at the receiving end, which greatly reduces the demodulation difficulty and speed, and can also increase the anti-interference ability of signal transmission, and can easily cope with various real-time and complex power line communications. Before the data to be transmitted is transmitted, the data to be transmitted is arranged based on discrete cosine transform in combination with the maximum allowed packet loss length in a manner such that the data of the same data to be transmitted are located at non-adjacent transmission positions, and non-equivalent redundant coding is performed on the rearranged data to be transmitted, thereby increasing the redundant coding length of important data and ensuring that the data to be transmitted can be accurately transmitted to the receiving end under complex interference conditions. Even if interfered with, the irreversible impact caused by continuous packet loss can be avoided. Through this rearrangement and non-equivalent redundant coding method, the non-retransmission mechanism can be restored even if the signal is interfered with, thereby greatly improving the efficiency, stability and availability of power line communication.
[0119] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0120] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0121] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0122] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0123] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0124] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0125] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0127] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0130] 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 for enabling 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), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0131] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the power line carrier signal optimization transmission method as described in the method embodiment is implemented.
[0132] A computer-readable storage medium provided by the present invention can implement the steps and effects of the power line carrier signal optimization transmission method of the above method embodiment. To avoid repetition, the present invention will not go into details.
[0133] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0134] In the present invention, a physical circuit based on an optocoupler is used for zero-crossing detection, and the zero-crossing points can be accurately collected in a low-cost, high-efficiency and anti-interference manner. Thereafter, the zero-crossing points in the power line are effectively utilized in the modulation process of the data to be transmitted, and the zero-crossing points are used as marking signals to modulate the redundantly encoded data to be transmitted into analog signals. A signal transmission window is constructed between every two zero-crossing points for orderly signal transmission, and the analog signal cycle can be quickly identified at the receiving end, which greatly reduces the demodulation difficulty and speed, and can also increase the anti-interference ability of signal transmission, and can easily cope with various real-time and complex power line communications. Before the data to be transmitted is transmitted, the data to be transmitted is arranged based on discrete cosine transform in combination with the maximum allowed packet loss length in a manner such that the data of the same data to be transmitted are located at non-adjacent transmission positions, and non-equivalent redundant coding is performed on the rearranged data to be transmitted, thereby increasing the redundant coding length of important data and ensuring that the data to be transmitted can be accurately transmitted to the receiving end under complex interference conditions. Even if interfered with, the irreversible impact caused by continuous packet loss can be avoided. Through this rearrangement and non-equivalent redundant coding method, the non-retransmission mechanism can be restored even if the signal is interfered with, thereby greatly improving the efficiency, stability and availability of power line communication.
[0135] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0136] There are a few points to note:
[0137] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention. Other structures may refer to the general design.
[0138] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0139] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0140] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for optimizing transmission of power line carrier signals, characterized in that: The invention is applied to a power line transmission system having a zero-crossing detection circuit, wherein the zero-crossing detection circuit comprises a rectifier bridge, a first resistor, an optical coupler, a second resistor and a zero-crossing signal output terminal, the alternating current is connected to the first resistor through the rectifier bridge, the first resistor and the ground wire are respectively connected to the first pin and the second pin of the optical coupler, wherein a light-emitting diode is arranged between the first pin and the second pin, the third pin of the optical coupler is grounded, the fourth pin of the optical coupler is connected to the power supply through the second resistor, a phototransistor is arranged between the third pin and the fourth pin, and the zero-crossing signal output terminal is led out from between the fourth pin and the second resistor, and the method comprises: S1: Acquire power line signals and data to be transmitted; S2: Detecting the power line signal through the zero-crossing point detection circuit to obtain multiple zero-crossing points; S3: taking the maximum transmission unit of the power line as the maximum packet loss allowable length, and re-arranging the data to be transmitted based on discrete cosine transform in combination with the maximum packet loss allowable length, so that the same data to be transmitted is located at non-adjacent transmission positions; S4: performing non-equivalent redundant coding on the rearranged data to be transmitted; S5: constructing a signal transmission window between adjacent zero-crossing points; S6: Combining the signal transmission window and the corresponding zero-crossing point, using the zero-crossing point as a marker symbol to modulate the redundantly encoded data to be transmitted into an analog signal; S7: transmitting the analog signal to a receiving end through the power line, thereby completing the optimized transmission of the power line carrier signal, i.e., the analog signal; Wherein, the S3 specifically includes: S301: Determine the data type of the data to be transmitted, wherein the data type includes text data, audio data and image data; S302: If the data type of the data to be transmitted is text data, convert the data to be transmitted into a text digital signal; otherwise, proceed to S303; S303: Performing discrete cosine transform on the text digital signal, audio data and image data respectively to generate corresponding transform coefficients, wherein the transform coefficients include base frequency coefficients and high frequency coefficients; S304: Generate rectangular storage units with the same number of storage units as the number of transformation coefficients of each data to be transmitted, and fill the data to be transmitted into the corresponding rectangular storage units, respectively. The side length d of the storage unit is: Where N represents the number of transform coefficients of any data to be transmitted, t sz Indicates the total number of storage units, i.e., the number of data packets; S305: Rearrange the storage units in the rectangular storage unit in combination with the maximum allowed packet loss length to generate sub-storage units, where the side length e of the sub-storage unit is: Wherein, k represents the maximum allowed length of packet loss; S306: Sequentially number the sub-storage units from outside to inside in a clockwise direction; S307: Fill the transformation coefficients of the data to be transmitted into the rectangular storage unit in sequence according to the numbers; Wherein, the S4 specifically includes: S401: extracting fundamental frequency coefficients in each rectangular storage unit to form a first sequence, extracting a preset number of high frequency coefficients in each rectangular storage unit to form a second sequence, and extracting the remaining high frequency coefficients to form a third sequence; S402: Establishing redundancy constraints as follows: Wherein, (t1, t2, t3) represent the number of bits of the first sequence, the second sequence and the third sequence respectively, (R1, R2, R3) represent the redundancy of the first sequence, the second sequence and the third sequence respectively, (x, y, z) represent the number of bits of the first sequence, the second sequence and the third sequence with redundancy, and p represents the bit length of the transmission data packet; S403: In combination with the redundancy constraint condition, non-equivalent redundant coding is performed on the majority of the first sequence, the second sequence and the third sequence respectively through convolution coding, and the code rate l of each sequence is determined to obtain the redundancy R of each sequence: Wherein, (n, g, l) represent the constraint length, number of information bits and code rate of the convolutional coding respectively; S404: Redundancy encoding is performed on the corresponding sequence according to the redundancy and code rate.
2. The power line carrier signal optimization transmission method according to claim 1, characterized in that: The power line transmission system also includes a transmitting end, a receiving end and a controller. The zero-crossing signal output end of the zero-crossing detection circuit is connected to the controller, and the controller is connected to the receiving end through the transmitting end.
3. The power line carrier signal optimization transmission method according to claim 1, characterized in that: After S1, the following is also included: The data to be transmitted is preprocessed including denoising.
4. The power line carrier signal optimization transmission method according to claim 1, characterized in that: The S6 specifically includes: S601: In combination with the zero-crossing point instant, the data to be transmitted is modulated by a pulse amplitude modulation mode so that the length of the modulated signal cycle is between adjacent zero-crossing points: Where s(t) represents the initial analog signal after modulation, tz j Indicates the distance between time t and the jth zero crossing point z j duration, p() represents the unit pulse signal, d i represents the i-th redundantly encoded data point to be transmitted, i = 1, 2, ..., n r ; S602: Generate a marking signal different from the pulse signal of the analog signal at two zero-crossing points of the signal transmission window: Wherein, m(t) represents the marking signal, A represents the rectangular pulse amplitude, rect() represents the rectangular pulse function, τ represents the duration of the rectangular pulse, z j represents the jth zero-crossing point, j = 1, 2, ..., J, J represents the number of zero-crossing points; S603: Combine the marking signal and the corresponding initial analog signal in time sequence to form the analog signal x(t): x(t)=s(t)+m(t).
5. The method for optimizing transmission of power line carrier signals according to claim 1, characterized in that: After S6, the method further includes: The modulated analog signal is filtered by a moving average filter.
6. The power line carrier signal optimization transmission method according to claim 2, characterized in that: After S7, the method further includes: The noise power of the power line is collected in real time, and the signal-to-noise ratio SNR is calculated: Among them, P s represents the transmission power of the analog signal, P n represents the noise power; Collecting the demodulation accuracy of the receiving end; When the demodulation accuracy is less than the preset demodulation accuracy, the transmission power of the analog signal is increased to improve the signal-to-noise ratio until the demodulation accuracy meets the preset demodulation accuracy.
7. A power line carrier signal optimization transmission system, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for optimizing transmission of power line carrier signals according to any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the power line carrier signal optimization transmission method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for improving reliability of power line carrier signal transmission
CN104144001A
Power line carrier communication method based on frequency domain processing
CN108173799A