Track circuit signal decoding method and device based on nonlinear transformation enhancement and storage medium
By introducing second and third harmonics through nonlinear transformation enhancement, and combining spectrum analysis and error correction, the frequency measurement error under complex CPFSK signal frequency combinations was solved, and high-precision track circuit signal decoding was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI RAILWAY COMM
- Filing Date
- 2024-11-20
- Publication Date
- 2026-05-22
AI Technical Summary
Existing technologies, when decoding CPFSK signals, especially when the frequency combinations are 15Hz, 20Hz, 30Hz, and 17.5Hz, suffer from peak amplitude variations that lead to frequency measurement errors. Furthermore, the FFT computation is intensive and has limited resolution, making it difficult to accurately measure the carrier center frequency f0.
A nonlinear transformation enhancement method is adopted, which introduces second and third harmonics through preprocessing, FFT calculation and spectrum analysis, calculates the rough values of carrier frequency and low frequency signal, and improves spectrum resolution and accuracy by combining table lookup and error correction.
While keeping the computational cost of FFT basically unchanged, the accuracy and resolution of frequency decoding are significantly improved, the error caused by incomplete spectrum lines is resolved, and the accurate decoding of low-frequency signals is ensured.
Smart Images

Figure CN122073553A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to track circuit signal decoding, and more particularly to a method, apparatus, and storage medium for enhancing track circuit signal decoding using nonlinear transformation. Background Technology
[0002] In the field of railway communication, CPFSK (Continuous Phase Frequency Shift Keying) signals are an important information medium. Currently, domestically produced 8 / 18 information track circuit equipment is mainly used. CPFSK signals are generally modulated into a carrier signal by a low-frequency signal (used to express information). Specifically, the carrier signal is generally f0±55Hz, where f0 is the center frequency of the carrier signal. Taking f0 as 550Hz as an example, the carrier outputs sine waves of 495Hz and 605Hz alternately. Specifically, according to the low-frequency signal fmod, the duration of adjacent consecutive 495Hz and 605Hz sine waves is adjusted to realize the change of the CPFSK signal, thereby realizing the transmission of information. Taking f0 as 550Hz and f0 = 7Hz as an example, the 495Hz and 605Hz sine waves alternate at a frequency of 7Hz (14 alternations are completed in one cycle).
[0003] In the subsequent decoding process, after sampling at a certain frequency, an FFT calculation is performed to obtain a spectrum. Then, the center frequency of the carrier signal and the frequency of the low-frequency signal are identified based on the spectrum, thereby achieving decoding. Specifically, spectral analysis of the 8 / 18 information frequency-shifted signal reveals that the spectral lines are symmetrically distributed around f0, with the maximum values on both sides. Depending on different frequency combinations, the distribution varies, as shown in Table 1.
[0004] Table 1
[0005]
[0006]
[0007] Taking the high-frequency band above f0 as an example, in most cases, such as Figure 1 As shown, there is a significant maximum value, which can be considered as the spectrum being a single peak. However, for fmod values of 15 Hz, 20 Hz, and 30 Hz, as... Figure 2 As shown, there are two spectral peaks with similar amplitudes; for fmod 17.5 Hz, there are three spectral peaks with similar amplitudes.
[0008] Since the spectral line at position f0 of the CPFSK signal is not at its maximum value, and the amplitude of the spectral line at position f0 for some frequency combinations is very low, direct measurement of the carrier frequency center position f0 is invalid.
[0009] Therefore, to accurately measure f0 in the frequency domain, it is necessary to measure the positions of symmetrical spectral lines on both sides and then take the average value. For signals with single-peak characteristics, this is relatively simple to implement; refer to... Figure 1 We can find the maximum value in both the high and low frequency bands. The position of the maximum value is the corresponding peak position. The average of the two peak positions is the position of f0.
[0010] However, for signals with fmod values of 15Hz, 20Hz, 30Hz, and 17.5Hz, the algorithm for directly finding the maximum peak value will encounter problems. This is because the actual signal is subject to interference, which will cause the peak amplitude to change, resulting in the maximum peak position on the high-frequency side and the maximum peak position on the low-frequency side not necessarily corresponding. Directly calculating the average value will lead to an error in the calculation of f0.
[0011] Furthermore, in the process of directly FFTing the signal to obtain the spectrum and then calculating fmod, the resolution is limited by the number of FFT calculation points because: spectral resolution = sampling frequency / number of FFT calculation points. To increase the resolution, the amount of FFT computation needs to be increased; or a spectrum shifting algorithm such as ZoomFFT can be used, but both of these require a significant increase in computational workload. Summary of the Invention
[0012] The purpose of this invention is to provide a method, apparatus, and storage medium for decoding track circuit signals based on nonlinear transformation enhancement.
[0013] The objective of this invention can be achieved through the following technical solutions:
[0014] A method for decoding track circuit signals based on nonlinear transform enhancement, comprising:
[0015] Step S1: Acquire track circuit signals;
[0016] Step S2: Preprocess the acquired track circuit signal, wherein the preprocessing process includes at least amplitude normalization;
[0017] Step S3: For the preprocessed signal, perform a first processing on the positive half-cycle signal and / or the negative half-cycle signal to obtain the target signal. The first processing is as follows: modify the signal value whose absolute value is greater than the pre-configured threshold to the pre-configured threshold.
[0018] Step S4: Perform FFT calculation on the target signal to obtain the spectrum;
[0019] Step S5: Calculate the approximate value of the center frequency of the carrier signal and the approximate value of the low-frequency signal based on the first harmonic in the spectrum diagram;
[0020] Step S6: Determine the approximate value of the center frequency of the target harmonic based on the approximate value of the center frequency of the carrier signal, wherein the target harmonic is a 2nd harmonic or a 3rd harmonic;
[0021] Step S7: Based on the approximate value of the center frequency of the target octave, identify the frequencies of the two spectral peaks of the target octave in the frequency diagram, and calculate the precise value of the center frequency of the target octave and the precise value of the low-frequency signal.
[0022] In step S1, the sampling frequency is at least 4096Hz.
[0023] The pretreatment also includes the removal of DC components.
[0024] When the positive half-cycle signal and the negative half-cycle signal are processed for the first time, the target frequency multiplication factor is 3 times the frequency multiplication factor.
[0025] Step S5 includes:
[0026] Step S5-1: Perform peak finding on the spectrum, determine the two largest peak frequencies as the first peak frequencies, and calculate the arithmetic mean of the two first peak frequencies as a rough value of the center frequency of the carrier signal;
[0027] Step S5-2: Calculate the spectral line between the two first peak frequencies as the first spectral line, and divide the difference between the two first peak frequencies by the first spectral line to obtain a rough value of the low-frequency signal.
[0028] Step S7 includes:
[0029] Step S7-1: Using the approximate value of the center frequency of the target harmonic, find the peak to the left and to the right in the spectrum to obtain the two second peak frequencies located to the left and right of the approximate value of the center frequency of the target harmonic, respectively.
[0030] Step S7-2: Calculate the arithmetic mean of the two second peak frequencies as the precise value of the center frequency of the carrier signal;
[0031] Step S7-3: Take the values of multiple low-frequency signals adjacent to the coarse value of the low-frequency signal, together with the coarse value of the low-frequency signal, as potential low-frequency signals, and look up the table to obtain the spectrum line corresponding to each potential low-frequency signal.
[0032] Step S7-4: Divide the frequency difference between the two second peak frequencies by the target octave, and then divide it by the spectral line corresponding to each potential low-frequency signal to obtain the calculated frequency value corresponding to each potential low-frequency signal.
[0033] Step S7-5: Calculate the error between the actual frequency value and the calculated frequency value of each potential low-frequency signal, and select the potential low-frequency signal with the smallest error as the accurate value of the low-frequency signal.
[0034] In step S3, the first processing is performed only on the positive half-cycle.
[0035] In step S3, both the positive and negative half-cycles undergo a first processing step.
[0036] A track circuit signal decoding device based on nonlinear transformation enhancement includes a memory, a processor, and a program stored in the memory, wherein the processor executes the program to implement the method described above.
[0037] A storage medium having a program stored thereon, which, when executed, implements the method described above.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] 1. By introducing second and third harmonics through the first processing method, the second and third harmonic images of the spectrum are obtained. This allows for the calculation of more accurate decoding results based on the second or third harmonic, on the basis of the decoding results based on the first harmonic. Thus, the resolution is multiplied while keeping the FFT computation amount of the relevant chips consistent.
[0040] 2. The sampling frequency is at least 4096Hz to ensure sufficient sampling accuracy, which is sufficient to support triple frequency calculation even at the highest carrier signal frequency.
[0041] 3. Take the values of multiple low-frequency signals adjacent to the coarse value of the low-frequency signal, along with the coarse value of the low-frequency signal, as potential low-frequency signals. In the subsequent calculation of the precise value of the low-frequency signal, calculate the frequency value of all potential low-frequency signals. This can solve the error caused by incomplete spectrum lines after frequency multiplication and improve the decoding accuracy of low-frequency signals. Attached Figure Description
[0042] Figure 1 The spectrum is in single-peak form, where the center frequency of the carrier signal is 550Hz and the frequency of the low-frequency signal is 7Hz.
[0043] Figure 2 The spectrum is in the form of a double peak, where the center frequency of the carrier signal is 550Hz and the frequency of the low-frequency signal is 15Hz.
[0044] Figure 3 This is a schematic diagram showing the first processing of both the positive and negative half-cycles simultaneously.
[0045] Figure 4 for Figure 3 The spectrum of the signal after the first processing, where the center frequency of the carrier signal is 550Hz and the frequency of the low-frequency signal is 15Hz;
[0046] Figure 5 This is a schematic diagram showing the first processing performed only on the positive half-cycle;
[0047] Figure 6 for Figure 5 The spectrum of the signal after the first processing, where the center frequency of the carrier signal is 550Hz and the frequency of the low-frequency signal is 15Hz;
[0048] Figure 7 This is a schematic diagram of the main steps of the method of the present invention. Detailed Implementation
[0049] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0050] A method for enhancing track circuit signal decoding using nonlinear transformation, such as Figure 7 As shown, it includes:
[0051] Step S1: Acquire track circuit signals;
[0052] The sampling frequency is at least 4096Hz to ensure sufficient sampling accuracy, which is enough to support triple frequency calculation even at the highest carrier signal frequency.
[0053] In this embodiment, a 16-bit analog-to-digital converter (ADC) is used with a fixed sampling frequency. For example, a sampling frequency of 4096Hz is used for a signal with a center frequency of 550Hz. This algorithm requires increasing the sampling frequency; if the third harmonic needs to be calculated, the sampling frequency needs to be more than three times the Nyquist sampling frequency to avoid spectral aliasing during FFT calculation.
[0054] Step S2: Preprocess the acquired track circuit signals, wherein the preprocessing process includes at least amplitude normalization;
[0055] Preprocessing also includes removing DC components. For example, each frame of signal after acquisition is preprocessed to form a maximum amplitude of 1, with the positive and negative signals being basically symmetrical.
[0056] S3: For the preprocessed signal, perform a first processing on the positive half-cycle signal and / or the negative half-cycle signal to obtain the target signal. The first processing involves modifying signal values whose absolute values are greater than a pre-configured threshold to the pre-configured threshold. In this embodiment, the pre-configured threshold is 0.5. Figure 3 The diagram shows the first processing performed simultaneously on both the positive and negative half-cycles. Figure 5 The diagram shows a process that only performs the first processing on the positive half-cycle.
[0057] Step S4: Perform FFT calculation on the target signal to obtain the spectrum;
[0058] Figure 3 The spectrum of the signal is as follows Figure 4 As shown, Figure 5 The spectrum of the signal is as follows Figure 6 As shown, it can be seen that in Figure 4 In addition to the original first harmonic image, there is also a third harmonic image. Figure 6 In addition to the first harmonic image, there are also second harmonic and third harmonic images.
[0059] Step S5: Based on the first harmonic in the spectrum, calculate the approximate value of the center frequency of the carrier signal and the approximate value of the low-frequency signal, including:
[0060] Step S5-1: Perform peak finding on the spectrum, determine the two largest peak frequencies as the first peak frequencies, and calculate the arithmetic mean of the two first peak frequencies as a rough value of the center frequency of the carrier signal;
[0061] Step S5-2: Calculate the spectral line between the two first peak frequencies as the first spectral line, and divide the difference between the two first peak frequencies by the first spectral line to obtain a rough value of the low-frequency signal.
[0062] The process is similar to that of existing technologies, so it will not be described in detail here. The only difference is that existing technologies directly use the approximate value of the center frequency of the carrier signal and the approximate value of the low-frequency signal in this application as the final result.
[0063] Step S6: Determine the approximate value of the center frequency of the target harmonic based on the approximate value of the center frequency of the carrier signal, wherein the target harmonic is a 2nd harmonic or a 3rd harmonic;
[0064] When performing the first processing on both the positive and negative half-cycle signals, the target frequency multiplication factor is 3. When performing the first processing only on the positive half-cycle, the frequency multiplication factor can be selected as 2 or 3 as needed. In this embodiment, the frequency multiplication factor is selected as 2.
[0065] Step S7: Based on the approximate value of the center frequency of the target octave, identify the frequencies of the two spectral peaks of the target octave in the frequency diagram, and calculate the precise value of the center frequency of the target octave and the precise value of the low-frequency signal, including:
[0066] Step S7-1: Using the approximate value of the center frequency of the target harmonic, find the peak to the left and to the right in the spectrum to obtain the two second peak frequencies located to the left and right of the approximate value of the center frequency of the target harmonic, respectively.
[0067] Step S7-2: Calculate the arithmetic mean of the two second peak frequencies as the precise value of the center frequency of the carrier signal;
[0068] Step S7-3: Take the values of multiple low-frequency signals adjacent to the coarse value of the low-frequency signal, together with the coarse value of the low-frequency signal, as potential low-frequency signals, and look up the table to obtain the spectrum line corresponding to each potential low-frequency signal.
[0069] Step S7-4: Divide the frequency difference between the two second peak frequencies by the target octave, and then divide it by the spectral line corresponding to each potential low-frequency signal to obtain the calculated frequency value corresponding to each potential low-frequency signal.
[0070] Step S7-5: Calculate the error between the actual frequency value and the calculated frequency value of each potential low-frequency signal, and select the potential low-frequency signal with the smallest error as the accurate value of the low-frequency signal.
[0071] By introducing second and third harmonics through the first processing method, the second and third harmonic images of the spectrum are obtained. This allows for the calculation of more accurate decoding results based on the second or third harmonic, building upon the decoding results based on the first harmonic. This ensures the accuracy of decoding even when the precision of the relevant chip decreases or environmental interference is significant.
[0072] The values of multiple low-frequency signals adjacent to the coarse value of the low-frequency signal are taken together with the coarse value of the low-frequency signal as potential low-frequency signals. In the subsequent calculation of the precise value of the low-frequency signal, the frequency value of all potential low-frequency signals is calculated. This can solve the error caused by incomplete spectrum lines after frequency doubling and improve the decoding accuracy of low-frequency signals.
[0073] If the aforementioned functions are implemented as 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 this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for decoding track circuit signals based on nonlinear transform enhancement, characterized in that, include: Step S1: Acquire track circuit signals; Step S2: Preprocess the acquired track circuit signal, wherein the preprocessing process includes at least amplitude normalization; Step S3: For the preprocessed signal, perform a first processing on the positive half-cycle signal and / or the negative half-cycle signal to obtain the target signal. The first processing is as follows: modify the signal value whose absolute value is greater than the pre-configured threshold to the pre-configured threshold. Step S4: Perform FFT calculation on the target signal to obtain the spectrum; Step S5: Calculate the approximate value of the center frequency of the carrier signal and the approximate value of the low-frequency signal based on the first harmonic in the spectrum diagram; Step S6: Determine the approximate value of the center frequency of the target harmonic based on the approximate value of the center frequency of the carrier signal, wherein the target harmonic is a 2nd harmonic or a 3rd harmonic; Step S7: Based on the approximate value of the center frequency of the target octave, identify the frequencies of the two spectral peaks of the target octave in the frequency diagram, and calculate the precise value of the center frequency of the target octave and the precise value of the low-frequency signal.
2. The method for decoding track circuit signals based on nonlinear transform enhancement according to claim 1, characterized in that, In step S1, the sampling frequency is at least 4096Hz.
3. The method for enhancing track circuit signal decoding using nonlinear transformation according to claim 1, characterized in that, The pretreatment also includes the removal of DC components.
4. The method for decoding track circuit signals using nonlinear transformation according to claim 1, characterized in that, When the positive half-cycle signal and the negative half-cycle signal are processed for the first time, the target frequency multiplication factor is 3 times the frequency multiplication factor.
5. The method for decoding track circuit signals based on nonlinear transform enhancement according to claim 1, characterized in that, Step S5 includes: Step S5-1: Perform peak finding on the spectrum, determine the two largest peak frequencies as the first peak frequencies, and calculate the arithmetic mean of the two first peak frequencies as a rough value of the center frequency of the carrier signal; Step S5-2: Calculate the spectral line between the two first peak frequencies as the first spectral line, and divide the difference between the two first peak frequencies by the first spectral line to obtain a rough value of the low-frequency signal.
6. The method for decoding track circuit signals based on nonlinear transform enhancement according to claim 5, characterized in that, Step S7 includes: Step S7-1: Using the approximate value of the center frequency of the target harmonic, find the peak to the left and to the right in the spectrum to obtain the two second peak frequencies located to the left and right of the approximate value of the center frequency of the target harmonic, respectively. Step S7-2: Calculate the arithmetic mean of the two second peak frequencies as the precise value of the center frequency of the carrier signal; Step S7-3: Take the values of multiple low-frequency signals adjacent to the coarse value of the low-frequency signal, together with the coarse value of the low-frequency signal, as potential low-frequency signals, and look up the table to obtain the spectrum line corresponding to each potential low-frequency signal. Step S7-4: Divide the frequency difference between the two second peak frequencies by the target octave, and then divide it by the spectral line corresponding to each potential low-frequency signal to obtain the calculated frequency value corresponding to each potential low-frequency signal. Step S7-5: Calculate the error between the actual frequency value and the calculated frequency value of each potential low-frequency signal, and select the potential low-frequency signal with the smallest error as the accurate value of the low-frequency signal.
7. The method for decoding track circuit signals based on nonlinear transform enhancement according to claim 1, characterized in that, In step S3, the first processing is performed only on the positive half-cycle.
8. The method for decoding track circuit signals based on nonlinear transform enhancement according to claim 1, characterized in that, In step S3, both the positive and negative half-cycles undergo a first processing step.
9. A track circuit signal decoding device based on nonlinear transform enhancement, comprising a memory, a processor, and a program stored in the memory, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-8.
10. A storage medium having a program stored thereon, characterized in that, When the program is executed, it implements the method as described in any one of claims 1-8.