Disclosure of Invention
In order to solve the problem that the transmission signals of a ground system and a downhole instrument of a rotary steering system of an oil drilling instrument cannot be decoded by adopting an overhigh matching threshold value, the invention provides a time and frequency mixed coding error-proofing decoding method.
An error-proofing decoding method for time and frequency hybrid coding, comprising the steps of:
s1, acquiring sampling data transmitted to a rotary steering system by a ground system, matching the sampling data with a standard pulse sequence with a frequency of 3 omega, and if the correlation is smaller than a set threshold value, turning to a step S2; if the correlation is larger than a set threshold value, continuously comparing the correlation, and when the correlation begins to decline, determining the point of the maximum value of the correlation as a first pulse sequence of the signal, and marking the frequency and time of the pulse signal; immediately jumping to a state, repeating the steps, sequentially finding out a second pulse sequence, a third pulse sequence and a fourth pulse sequence of the signal with the frequency of 3 omega, completing the analysis of a group of signals, and exiting;
s2, matching the sampled data with a standard pulse sequence with a frequency of 3 omega, and matching the sampled data with the standard pulse sequence with the frequency of 2 omega when the correlation is smaller than a set threshold value; if the correlation between the sampling data and the standard pulse sequence with the frequency 2 ω is greater than the set threshold, go to step S3; if the correlation between the sampling data and the standard pulse sequence with the frequency 2 ω is smaller than the set threshold, the step S7 is executed;
s3, continuously comparing the correlation, and marking the frequency and time of the maximum value of the correlation when the correlation begins to decline;
s4, in a set time period, if the correlation between the sampled data and the standard pulse sequence of the frequency 2 omega is greater than the correlation between the sampled data and the standard pulse sequence of the frequency omega, turning to the step S5; if the correlation between the sampled data and the standard pulse sequence at the frequency 2 ω is smaller than the correlation between the sampled data and the standard pulse sequence at the frequency ω, the step S6 is executed;
s5, determining that the frequency of the ground transmission signal is 2 omega, determining the frequency and the time marked in the step S3 as a first pulse sequence of the signal with the frequency of 2 omega, jumping to a state, repeating the step S3, sequentially searching a second pulse sequence, a third pulse sequence and a fourth pulse sequence of the signal with the frequency of 2 omega, and exiting;
s6, determining that the frequency of the ground transmission signal is omega, taking the frequency and time marked in the step S3 as a first pulse sequence of the signal frequency omega, jumping to a state, repeating the step S3, sequentially searching a second pulse sequence, a third pulse sequence and a fourth pulse sequence of the signal frequency omega, and exiting;
s7, if the correlation between the sampled data and the standard pulse sequence with the frequency 2 omega is smaller than a threshold value, searching the sampled data of which the correlation between the sampled data and the standard pulse sequence with the frequency omega is larger than the threshold value, marking the frequency and the time when the correlation is maximum, sequentially searching a second pulse sequence, a third pulse sequence and a fourth pulse sequence with the frequency omega for the first pulse sequence with the signal frequency omega in a jump state, and exiting.
In time and frequency mixed coding, if the detection threshold is low at the time of decoding, the frequency of the signal is extremely likely to be detected erroneously. However, the pulse sequences of the different frequency signals are different in time, and the different frequency signals are different in magnitude even if the correlation is higher than the threshold value when they are matched with the standard pattern. The invention identifies the signal by the correlation comparison with the standard pulse signals with the frequencies of 3 omega, 2 omega and omega, thereby avoiding the problem of low decoding rate caused by independently depending on the improvement of the threshold value.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Time and frequency mixed coding, and the error decoding caused by the low matching threshold value has the following three conditions:
1. misinterpretation of a signal at frequency 3 ω into a signal at frequency ω and a signal at frequency 2 ω;
2. the signal of frequency ω is misinterpreted as a signal of frequency 2 ω;
3. the signal of frequency 2 ω is misinterpreted as a signal of frequency ω.
The invention is to analyze the three kinds of error decoding, so as to avoid misinterpretation.
The complete set of signals communicated by the ground system and the rotary steering system comprises four pulse sequences, and the time interval of every two pulse sequences comprises information, namely different time intervals correspond to different commands, so the decoding core is to detect the frequency and the time interval of the four pulse sequences of the set of signals. Since each set of complete signals has its own frequency, the decoding software needs to automatically identify each set of signal frequencies, which are highly susceptible to error for lower matching thresholds. Since the decoding process identifies four pulse sequences one by one, and the frequency of each group of signals is consistent, when the first pulse sequence is decoded, the frequency and time point of the signals can be confirmed, so that the core point of the invention is how to decode the frequency and time point of the first pulse sequence.
The same information quantity is transmitted, and when the frequency is higher, the information can be transmitted in a shorter time, so that the decoding end firstly uses the high-frequency standard pulse sequence to match with the received signal under the condition of not knowing the signal frequency. Since it is necessary to accurately capture the time of occurrence of each pulse sequence to finally obtain exact information, a matching calculation is performed after each acquisition of sample data.
When the ground system transmits information to the rotary guide system, the acquired data and the standard pulse are compared in a correlation mode, if the correlation between the acquired data and the standard pulse sequence is gradually increased along with the increase of the acquired data, after the correlation reaches the highest point, the correlation between the acquired data and the standard pulse begins to be reduced, the point of the maximum correlation between the acquired data and the standard pulse is a pulse point, the frequency and the time of the point are recorded, and the pulse sequence analysis is completed.
An error-proofing decoding method of time and frequency hybrid coding, as shown in fig. 1, includes the following steps:
an error-proofing decoding method for time and frequency hybrid coding, comprising the steps of:
s1, acquiring sampling data transmitted to a rotary steering system by a ground system, matching the sampling data with a standard pulse sequence with a frequency of 3 omega, and if the correlation is smaller than a set threshold value, turning to a step S2; if the correlation is larger than a set threshold value, continuously comparing the correlation, and when the correlation begins to decline, determining the point of the maximum value of the correlation as a first pulse sequence of the signal, and marking the frequency and time of the pulse signal; and immediately jumping to a state, repeating the steps, sequentially finding out a second pulse sequence, a third pulse sequence and a fourth pulse sequence of the signal with the frequency of 3 omega, completing the analysis of a group of signals, and exiting.
Since the misinterpretation of signals with frequencies 2 ω and ω as signals with frequencies 3 ω does not occur, however. Therefore, once the synchronization head of the frequency is found, the decoding cannot be wrong, the state should be quickly jumped, the problem that the first synchronization head is wrongly discarded if the correlation of the second synchronization head is higher than that of the synchronization head is avoided, the problem that the frequency 3 omega signal is misinterpreted to be the frequency omega signal and the frequency 2 omega signal can be effectively solved, and the software complexity is reduced.
S2, matching the sampled data with a standard pulse sequence with a frequency of 3 omega, and matching the sampled data with the standard pulse sequence with the frequency of 2 omega when the correlation is smaller than a set threshold value; if the correlation between the sampling data and the standard pulse sequence with the frequency 2 ω is greater than the set threshold, go to step S3; if the correlation between the sampled data and the standard pulse sequence at the frequency 2 ω is smaller than the set threshold, the process proceeds to step S7.
And S3, continuously comparing the correlation, and marking the frequency and time of the maximum value of the correlation when the correlation begins to decline.
S4, in a set time period, if the correlation between the sampled data and the standard pulse sequence of the frequency 2 omega is greater than the correlation between the sampled data and the standard pulse sequence of the frequency omega, turning to the step S5; if the standard pulse train correlation of the sampled data with the frequency 2 ω is smaller than the standard pulse train correlation of the sampled data with the frequency ω, the process proceeds to step S6.
S5, determining that the frequency of the ground transmission signal is 2 omega, determining the frequency and the time marked in the step S3 as a first pulse sequence of the signal with the frequency of 2 omega, jumping to a state, repeating the step S3, sequentially searching a second pulse sequence, a third pulse sequence and a fourth pulse sequence of the signal with the frequency of 2 omega, and exiting.
S6, determining the frequency of the ground transmission signal as omega, taking the frequency and time marked in the step S3 as a first pulse sequence of the signal frequency as omega, jumping to a state, repeating the step S3, sequentially searching a second pulse sequence, a third pulse sequence and a fourth pulse sequence of the signal frequency omega, and exiting.
S7, if the correlation between the sampled data and the standard pulse sequence with the frequency 2 omega is smaller than a threshold value, searching the sampled data of which the correlation between the sampled data and the standard pulse sequence with the frequency omega is larger than the threshold value, marking the frequency and the time when the correlation is maximum, sequentially searching a second pulse sequence, a third pulse sequence and a fourth pulse sequence with the frequency omega for the first pulse sequence with the signal frequency omega in a jump state, and exiting.
Since the signal of the frequency ω and the signal of the frequency 2 ω are misinterpreted with each other, the sampled data is matched with the standard pulse sequence of the frequency 2 ω regardless of whether the correlation is greater than the threshold value, and the magnitude of the correlation is compared.
Since the signal of the frequency ω and the signal of the frequency 2 ω are misinterpreted with each other, the setting of the time period in step S4 means that the data amount collected during the time period is combined with one pulse train of which the data amount of the previous pulse train of the frequency 2 ω is greater than the frequency ω and two pulse trains of which the data amount is less than the frequency 2 ω, so that the pulse train of the frequency ω can be prevented from being misinterpreted as the pulse train of the frequency 2 ω, and the possibility that the two pulse trains of the frequency 2 ω are combined together and misinterpreted as the pulse train of the frequency ω can be eliminated.