Frame synchronization method, apparatus and device for BPSK signal demodulation
By generating a reference signal and calculating the window energy during BPSK signal decoding, the problem of inaccurate determination of the phase reversal point of the received signal is solved, ensuring the synchronization performance and decoding accuracy of the receiver.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU ANYKA MICROELECTRONICS CO LTD
- Filing Date
- 2023-07-26
- Publication Date
- 2026-05-15
AI Technical Summary
In BPSK signal decoding, due to noise interference and nonlinear factors at the radio frequency end, the phase transition point of the received signal is not an integer multiple of the period, which makes it impossible for conventional methods to accurately determine the phase flip position, resulting in frame synchronization information errors and affecting the synchronization performance of the receiver.
By acquiring the reference signal parameters of the target received signal, a reference signal is generated, and the window energy is calculated in the sliding correlation window. The phase reversal point is determined by using the window energy to meet the preset energy conditions, thus ensuring the accuracy of frame synchronization information.
Regardless of where the phase flip point of the received signal is, the phase flip can be accurately determined, ensuring the receiver's synchronization performance and guaranteeing correct decoding.
Smart Images

Figure CN116886483B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data decoding technology, and in particular to a frame synchronization method, apparatus and device for BPSK signal demodulation. Background Technology
[0002] Currently, RFID (Radio Frequency Identification) technology is widely used. For example, in RFID Type B transmission mode, the tag uses BPSK encoding, and the reader uses a BPSK receiver for decoding. In BPSK decoding, accurate determination of frame synchronization information is required for BPSK data decoding.
[0003] In existing technologies, the length of the sampling point or the period width are usually used to identify whether the received signal has a phase flip, thereby obtaining frame synchronization information.
[0004] However, in practical systems, due to factors such as noise interference or nonlinearity at the radio frequency end, the "transition" point of the received signal waveform phase is not a complete "pi phase," resulting in the pulse width of the waveform being a non-integer multiple of the period. If conventional methods based on sampling point length or period width are used, non-integer multiples of the period cannot be identified, thus failing to accurately determine the phase reversal position. This leads to errors in determining frame synchronization information, resulting in decreased receiver synchronization performance and decoding errors. Summary of the Invention
[0005] Therefore, it is necessary to provide a frame synchronization method, apparatus, and device for BPSK signal demodulation that can accurately determine the phase reversal position of the received signal to ensure the synchronization performance of the receiver, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a frame synchronization method for BPSK signal demodulation. The method includes:
[0007] The target received signal is acquired. If the first waveform of the target received signal meets a preset waveform width threshold requirement, reference signal parameters are determined based on the target received signal, and a reference signal is generated based on the reference signal parameters. The correlation window of the target received signal is slid, and the window energy at different positions of the correlation window is calculated in combination with the reference signal. The window energy is used to characterize the phase correlation between the first waveform of the target received signal and the second waveform of the reference signal located in the correlation window. If the window energy corresponding to the target position meets a preset energy condition, the phase reversal point of the target received signal is determined based on the phase sample number of the target received signal corresponding to the target position, so as to determine the frame synchronization information of the target received signal based on the phase reversal point.
[0008] In one embodiment, the process of determining whether the window energy corresponding to the target position meets the preset energy condition includes: determining the energy change amount based on the window energy corresponding to the target position and the preset comparison energy value; comparing the energy change amount with the preset phase switching threshold; if the energy change amount is greater than or equal to the preset phase switching threshold, then it is determined that the preset energy condition is met.
[0009] In one embodiment, the preset comparison energy value includes a preset maximum energy value and a preset minimum energy value; determining the energy change based on the window energy corresponding to the target position and the preset comparison energy value includes: when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, subtracting the preset maximum energy value from the window energy corresponding to the target position to obtain the energy change; when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window increases from low to high, subtracting the window energy corresponding to the target position from the preset minimum energy value to obtain the energy change.
[0010] In one embodiment, the method further includes: determining the preset phase switching threshold based on the window length and phase switching coefficient of the relevant window; wherein the value of the phase switching coefficient is within the range of values greater than 0 and less than 1.
[0011] In one embodiment, the phase switching coefficient includes a first switching coefficient and a second switching coefficient, and the preset phase switching threshold includes a first phase switching threshold and a second phase switching threshold; determining the preset phase switching threshold based on the window length of the relevant window and the phase switching coefficient includes: using the product of the window length of the relevant window and the first switching coefficient as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window is from high to low; using the product of the window length of the relevant window and the second switching coefficient as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window is from low to high.
[0012] In one embodiment, determining the phase reversal point of the target received signal based on the phase sample number of the target received signal corresponding to the target location includes: determining the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculating a first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase reversal point based on the first difference.
[0013] In one embodiment, the frame synchronization information includes at least one of the start bit of the SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of the EOF; the determination of the frame synchronization information of the target received signal based on the phase reversal point includes: if the window energy corresponding to the target position drops to meet the preset energy condition, then the phase reversal point corresponds to the start bit of the SOF, the start position of the data symbol of the received data included in the target received signal, or the start bit of the EOF; wherein, when the start bit of the SOF is not determined, the phase reversal point corresponds to the start bit of the SOF; when the start bit of the SOF is determined and the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; when the start bit of the SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of the EOF.
[0014] In one embodiment, the frame synchronization information includes at least one of the start position of the high-level bit of the SOF and the end bit of the EOF; the frame synchronization information for determining the target received signal based on the phase reversal point includes: if the window energy corresponding to the target position rises to meet the preset energy condition, then the phase reversal point corresponds to the start position of the high-level bit of the SOF or the end bit of the EOF; wherein, if the start position of the high-level bit of the SOF is not determined, the phase reversal point corresponds to the start position of the high-level bit of the SOF; if the start position of the high-level bit of the SOF is determined, the phase reversal point corresponds to the end bit of the EOF.
[0015] In one embodiment, the window length of the relevant window is less than or equal to the number of phase samples corresponding to a preset data symbol.
[0016] In one embodiment, calculating the window energy at different positions of the correlation window includes: performing an XOR operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the correlation window at the current position to obtain multiple correlation values; and accumulating the target correlation value among the multiple correlation values based on the result of the XOR operation to obtain the window energy corresponding to the correlation window at the current position.
[0017] In one embodiment, a multiple correlation value is obtained by performing an XOR operation on the phase sample values of the target received signal and the reference signal in the relevant window window at the current location. This includes: comparing the phase sample values of the target received signal and the reference signal in the relevant window window at the current location, identifying phase samples with the same phase sample value as a first identifier value, and identifying phase samples with different phase sample values as a second identifier value; correspondingly, based on the result of the XOR operation, the target correlation value among the multiple correlation values is accumulated to obtain the window energy corresponding to the relevant window window at the current location, including: counting the number of phase samples identified as the first identifier value to obtain the window energy.
[0018] In one embodiment, the process of determining whether the first waveform of the target received signal meets the preset waveform width threshold requirement includes: determining whether there are target square wave waveforms in the first waveform of the target received signal with a number greater than a preset number threshold; wherein the high level duration of the target square wave waveform is greater than or equal to a first preset threshold and less than a second preset threshold; if so, it is determined that the first waveform of the target received signal meets the preset waveform width threshold requirement.
[0019] In one embodiment, the reference signal parameter includes the target high-level duration; the determination of the reference signal parameter based on the target received signal includes: determining the high-level duration of each target square wave waveform; averaging the high-level durations of each target square wave waveform to obtain the target high-level duration.
[0020] In one embodiment, the reference signal parameter further includes a target waveform period; the determination of the reference signal parameter based on the target received signal includes: for each target square wave waveform, determining the waveform period of each target square wave waveform according to the number of phase samples of the target received signal corresponding to consecutive high levels of the target square wave waveform and the number of phase samples of the target received signal corresponding to consecutive low levels of the target square wave waveform; averaging the waveform periods of each target square wave waveform to obtain the target waveform period.
[0021] In one embodiment, the reference signal parameter further includes a target waveform period; the determination of the reference signal parameter based on the target received signal includes: using the square wave signal period adopted by the pre-agreed receiver and transmitter as the target waveform period.
[0022] In one embodiment, the generation of the reference signal based on the reference signal parameters includes: generating a periodic binary signal as the reference signal based on the duration of the target high level and the period of the target waveform.
[0023] Secondly, this application also provides a frame synchronization device for BPSK signal demodulation. The device includes:
[0024] The acquisition module is used to acquire the target received signal, and when the first waveform of the target received signal meets the preset waveform width threshold requirement, determine the reference signal parameters based on the target received signal, and generate a reference signal based on the reference signal parameters.
[0025] The calculation module is used to slide a correlation window on the target received signal and, in conjunction with the reference signal, calculate the window energy at different positions where the correlation window slides; the window energy is used to characterize the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal located in the correlation window.
[0026] The determination module is used to determine the phase reversal point of the target received signal based on the phase sample number of the target received signal corresponding to the target location, when the window energy corresponding to the target location meets the preset energy conditions, so as to determine the frame synchronization information of the target received signal based on the phase reversal point.
[0027] In one embodiment, the determining module is specifically used to: determine the energy change based on the window energy corresponding to the target position and a preset comparison energy value; compare the energy change with a preset phase switching threshold, and if the energy change is greater than or equal to the preset phase switching threshold, then determine that the preset energy condition is met.
[0028] In one embodiment, the preset comparison energy value includes a preset maximum energy value and a preset minimum energy value; the determining module is specifically configured to: when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, subtract the preset maximum energy value from the window energy corresponding to the target position to obtain the energy change; when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from low to high, subtract the window energy corresponding to the target position from the preset minimum energy value to obtain the energy change.
[0029] In one embodiment, the device further includes a coefficient determination module, used to: determine the preset phase switching threshold based on the window length of the relevant window and the phase switching coefficient; wherein the value of the phase switching coefficient is within the range of values greater than 0 and less than 1.
[0030] In one embodiment, the phase switching coefficient includes a first switching coefficient and a second switching coefficient, and the preset phase switching threshold includes a first phase switching threshold and a second phase switching threshold; the coefficient determination module is configured to: use the product of the window length of the relevant window and the first switching coefficient as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window is from high to low; use the product of the window length of the relevant window and the second switching coefficient as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window is from low to high.
[0031] In one embodiment, the determining module is specifically configured to: determine the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculate a first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase reversal point based on the first difference.
[0032] In one embodiment, the frame synchronization information includes at least one of the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of EOF; the determining module is specifically configured to: if the window energy corresponding to the target position drops to meet the preset energy condition, then the phase reversal point corresponds to the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, or the start bit of EOF; wherein, if the start bit of SOF is not determined, the phase reversal point corresponds to the start bit of SOF; if the start bit of SOF is determined and the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; if the start bit of SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of EOF.
[0033] In one embodiment, the frame synchronization information includes at least one of the start position of the high-level bit of the SOF and the end bit of the EOF; the determining module is specifically configured to: if the window energy corresponding to the target position rises to meet the preset energy condition, then the phase reversal point corresponds to the start position of the high-level bit of the SOF or the end bit of the EOF; wherein, if the start position of the high-level bit of the SOF is not determined, the phase reversal point corresponds to the start position of the high-level bit of the SOF; if the start position of the high-level bit of the SOF is determined, the phase reversal point corresponds to the end bit of the EOF.
[0034] In one embodiment, the window length of the relevant window is less than or equal to the number of phase samples corresponding to a preset data symbol.
[0035] In one embodiment, the calculation module is specifically used to: perform an XOR logic operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window at the current position to obtain multiple correlation values; and based on the result of the XOR logic operation, perform an accumulation operation on the target correlation value among the multiple correlation values to obtain the window energy corresponding to the relevant window at the current position.
[0036] In one embodiment, the calculation module is specifically used to: compare the phase sample values of the target received signal in the relevant window at the current position with the phase sample values of the reference signal, identify the phase samples with the same phase sample values as the first identifier value, and identify the phase samples with different phase sample values as the second identifier value; count the number of phase samples identified as the first identifier value to obtain the window energy.
[0037] In one embodiment, the acquisition module is specifically used to: determine whether there are target square wave waveforms in the first waveform of the target received signal with a number greater than a preset number threshold; wherein the high level duration of the target square wave waveform is greater than or equal to a first preset threshold and less than a second preset threshold; if so, determine that the first waveform of the target received signal meets the preset waveform width threshold requirement.
[0038] In one embodiment, the reference signal parameter includes the target high-level duration; the acquisition module is specifically used to: determine the high-level duration of each of the target square wave waveforms; and average the high-level durations of each of the target square wave waveforms to obtain the target high-level duration.
[0039] In one embodiment, the reference signal parameter further includes a target waveform period; the acquisition module is specifically configured to: for each target square wave waveform, determine the waveform period of each target square wave waveform based on the number of phase samples of the target received signal corresponding to consecutive high levels of the target square wave waveform and the number of phase samples of the target received signal corresponding to consecutive low levels of the target square wave waveform; and average the waveform periods of each target square wave waveform to obtain the target waveform period.
[0040] In one embodiment, the reference signal parameter further includes a target waveform period; the acquisition module is specifically used to: take the square wave signal period adopted by the pre-agreed receiver and transmitter as the target waveform period.
[0041] In one embodiment, the acquisition module is specifically used to: generate a periodic binary signal as the reference signal based on the duration of the target high level and the period of the target waveform.
[0042] Thirdly, this application also provides a computer device, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described in any of the first aspects above.
[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0044] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0045] The aforementioned frame synchronization method, apparatus, and device for BPSK signal demodulation include a receiver that acquires a target received signal. If the first waveform of the target received signal meets a preset waveform width threshold, reference signal parameters are determined based on the target received signal, and a reference signal is generated based on these parameters. A sliding correlation window is used to move the target received signal, and the window energy at different positions is calculated in conjunction with the reference signal. If the window energy at the target position meets a preset energy condition, the phase reversal point of the target received signal is determined based on the phase sample number of the target received signal at the target position. The frame synchronization information of the target received signal is then determined based on this phase reversal point. Since the window energy characterizes the phase correlation between the first waveform of the target received signal and the second waveform of the reference signal within the correlation window, if the preset energy condition is met based on the window energy at the target position, a phase reversal can be determined, and the phase reversal point of the target received signal can be determined based on the phase sample number at the target position, thereby accurately acquiring frame synchronization information. In this process, the calculation of window energy is independent of whether the phase transition point of the target received signal waveform is a complete pi phase. Therefore, no matter where the phase flip occurs in the target received signal, it can be accurately determined based on the calculated window energy, thereby ensuring the synchronization performance of the receiver and guaranteeing correct decoding. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart illustrating a frame synchronization method for BPSK signal demodulation in one embodiment.
[0048] Figure 2 This is a flowchart illustrating the process of determining reference signal parameters in one embodiment;
[0049] Figure 3 This is a schematic diagram of another process for determining reference signal parameters in one embodiment;
[0050] Figure 4 This is a schematic diagram of a binary reference signal waveform in one embodiment;
[0051] Figure 5 This is a flowchart illustrating the calculation of window energy in one embodiment;
[0052] Figure 6 This is a schematic diagram of the sliding of a related window in one embodiment;
[0053] Figure 7 This is a flowchart illustrating the process of determining whether a preset energy condition is met in one embodiment.
[0054] Figure 8 This is a schematic diagram comparing phase switching points in one embodiment;
[0055] Figure 9 This is a flowchart illustrating the process of determining the phase reversal point in one embodiment;
[0056] Figure 10 This is a schematic diagram illustrating the process of finding a phase switching point in one embodiment.
[0057] Figure 11 This is a schematic diagram of another method for finding the phase switching point in one embodiment;
[0058] Figure 12 This is a schematic diagram of the frame format in one embodiment;
[0059] Figure 13 This is a schematic diagram of another frame format in one embodiment;
[0060] Figure 14 This is a flowchart illustrating another frame synchronization method for BPSK demodulation in one embodiment;
[0061] Figure 15 This is a structural block diagram of a frame synchronization device for BPSK signal demodulation in one embodiment;
[0062] Figure 16 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0064] In RFID Type B transmission mode, the tag uses BPSK encoding, and the reader uses a BPSK receiver for decoding. Accurately determining the frame synchronization position is crucial for BPSK decoding. In existing technologies, the frame synchronization point is typically obtained by identifying phase flips through the sampling point length / period width.
[0065] In practical systems, due to noise interference or nonlinear factors at the radio frequency end, the phase "jump" point of the BPSK received signal waveform is not the "pi phase," resulting in a non-ideal pulse width (non-integer multiple of the period). Conventional methods based on sampling point length / period width are easily affected by noise, leading to incorrect synchronization positions and an inability to accurately identify phase reversal points, thus degrading the receiver's synchronization performance.
[0066] In view of this, embodiments of this application provide a frame synchronization method for BPSK signal demodulation to accurately determine the phase reversal point of the received signal, ensure the synchronization performance of the receiver, and ensure correct decoding.
[0067] It should be noted that the frame synchronization method for BPSK signal demodulation provided in this application can be executed by a frame synchronization device for BPSK signal demodulation. This device can be implemented as part or all of a receiver through software, hardware, or a combination of both. The receiver can be a BPSK receiver and can be located in an electronic device. The electronic device can be, for example, an electronic device based on RFID Type B transmission mode. In the following method embodiments, the execution subject is described as a receiver.
[0068] In one embodiment, such as Figure 1 As shown, a frame synchronization method for BPSK signal demodulation is provided, including the following steps:
[0069] Step 101: Obtain the target received signal. If the first waveform of the target received signal meets the preset waveform width threshold requirement, determine the reference signal parameters based on the target received signal, and generate the reference signal according to the reference signal parameters.
[0070] The receiver can acquire the signal output by the transmitter as the target received signal. To determine the frame synchronization information of the target received signal, a reference signal related to the target received signal needs to be generated, and then the frame synchronization information is determined based on the reference signal.
[0071] Optionally, the receiver can be located in the PCD (Proximity Coupling Device) receiver. The transmitter can be a PICC (Proximity Card).
[0072] In one optional embodiment, the process of acquiring the target received signal may include: acquiring an initial received signal; performing analog-to-digital conversion on the initial received signal to obtain an I-channel signal and a Q-channel signal; and determining the target received signal based on the I-channel signal and the Q-channel signal.
[0073] Optionally, the receiver may be equipped with an ADC (analog-to-digital converter) to take the initially received signal as the initial received signal and perform analog-to-digital conversion on the initial received signal to obtain relatively orthogonal I-channel and Q-channel signals.
[0074] In one implementation, determining the target received signal based on the I-channel signal and the Q-channel signal includes: taking the I-channel signal and the Q-channel signal with the largest amplitude as the target received signal; or, merging the I-channel signal and the Q-channel signal to obtain the target received signal.
[0075] Optionally, to facilitate the determination of the phase reversal point, the target received signal can be shaped into a "binary" waveform to further determine the frame synchronization information. Specifically, in this embodiment, the target received signal can be shaped based on a waveform threshold T_AM to transform the first waveform of the target received signal into a binary waveform. For example, if the waveform is greater than or equal to the threshold T_AM, the output result is logic "1"; if it is less than the threshold T_AM, the output result is logic "0", thus obtaining the target received signal with a binary waveform.
[0076] Furthermore, based on the waveform characteristics of the target received signal, reference signal parameters are determined, and a reference signal is generated based on these parameters. Optionally, the reference signal is a square wave; therefore, the reference signal parameters may include the square wave width and / or the period of the square wave, etc.
[0077] The reference signal and the target received signal are time-aligned.
[0078] Step 102: Slide the correlation window of the target received signal and calculate the window energy at different positions of the correlation window, in conjunction with the reference signal. The window energy is used to characterize the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal located within the correlation window.
[0079] Set the correlation window. Slide the correlation window in the target received signal; simultaneously, the same correlation window can also be slid in the reference signal. Due to the existence of phase reversal points, the window energy of the correlation window varies depending on its position.
[0080] Among them, within the correlation window, the window energy of the correlation window is the highest when the first waveform of the target received waveform and the second waveform of the reference signal are completely consistent (i.e., completely correlated); conversely, the window energy of the correlation window is the lowest when the first waveform of the target received waveform and the second waveform of the reference signal are completely inconsistent (i.e., completely uncorrelated).
[0081] When the first waveform undergoes a phase change, during the sliding process of the correlation window, the first waveform and the second waveform will gradually change from "fully correlated" to "uncorrelated", and the window energy will gradually change.
[0082] Therefore, based on window energy, the phase reversal point in the target received signal can be determined.
[0083] Step 103: If the window energy corresponding to the target position meets the preset energy condition, determine the phase reversal point of the target received signal according to the phase sample number of the target received signal corresponding to the target position, so as to determine the frame synchronization information of the target received signal based on the phase reversal point.
[0084] The receiver is equipped with preset energy conditions. Thus, for the window energy at the target location, it can be determined whether the window energy meets the preset energy conditions, thereby determining whether the target received signal has undergone a phase reversal point at the target location, and thus determining the frame synchronization information.
[0085] Here, the target position refers to the location of the segment of the target received signal, including the phase reversal point, captured by the correlation window of the energy calculation window. Optionally, the target position can be characterized by the start and end phase points of the segment of the target received signal captured by the correlation window.
[0086] Optionally, frame synchronization information includes the position of SOF (Start Of Frame), the position of Start in each character format, and the position of EOF (End of Frame).
[0087] In the above method, the receiver can obtain the target received signal. When the first waveform of the target received signal meets the requirements of the preset waveform width threshold, the reference signal parameters are determined based on the target received signal, and a reference signal is generated according to the reference signal parameters. When sliding the correlation window of the target received signal and combining the reference signal, the window energy at different positions where the correlation window slides is calculated. When the window energy corresponding to the target position meets the preset energy condition, the phase flip point of the target received signal is determined according to the phase sample number of the target received signal corresponding to the target position, so as to determine the frame synchronization information of the target received signal based on the phase flip point. Among them, since the window energy is used to characterize the phase correlation degree between the first waveform of the target received waveform located in the correlation window and the second waveform of the reference signal; thus, if it is determined that the window energy corresponding to the target position meets the preset energy condition, it can be determined that a phase flip occurs here, and further, based on the phase sample number corresponding to the target position, the phase flip point of the target received signal can be determined, so as to accurately obtain the frame synchronization information. In this process, the calculation of the window energy has nothing to do with whether the jump point of the waveform phase of the target received signal is a complete pi phase. Therefore, no matter where the target received signal undergoes a phase flip, it can be accurately judged based on the calculated window energy, thereby ensuring the synchronization performance of the receiver and ensuring correct decoding.
[0088] In one embodiment, the process of determining whether the first waveform of the target received signal meets the requirements of the preset waveform width threshold includes: determining whether there are target square-wave waveforms with a quantity greater than the preset quantity threshold in the first waveform of the target received signal; if so, it is determined that the first waveform of the target received signal meets the requirements of the preset waveform width threshold. The high-level duration of the target square-wave waveform is greater than or equal to the first preset threshold and less than the second preset threshold.
[0089] Among them, the first waveform of the target received signal after binary shaping includes multiple square-wave waveforms. Each square-wave waveform includes a continuous high level and a continuous low level, and the continuous low level is located after the continuous high level.
[0090] Define the first preset threshold B_thre1 and the second preset threshold B_thre2. For a certain square-wave waveform among the square-wave waveforms, detect the width from the rising edge to the falling edge therein, that is, the high-level duration b(i) of this square-wave waveform. Further, if it is determined that b(i) >= B_thre1 and b(i) < B_thre2, then this square-wave waveform is the target square-wave waveform.
[0091] Within a certain window, if there are target square-wave waveforms with a quantity greater than the preset quantity threshold, the receiver considers that the reference waveform of the carrier is found, and at this time, it is determined that the requirements of the preset waveform width threshold are met.
[0092] Optionally, the preset quantity threshold, the first preset threshold, and the second preset threshold can be determined based on the actual situation, and no specific limitation is made here.
[0093] In this embodiment of the application, by setting a first preset threshold and a second preset threshold, a target square wave waveform that meets the conditions can be quickly determined from the first waveform, and then a reference signal can be determined based on this, so as to improve the efficiency and accuracy of determining the reference signal.
[0094] The process of determining the reference signal parameters is explained below.
[0095] Please refer to Figure 2 This illustration shows a flowchart of a method for determining reference signal parameters according to an embodiment of this application. Determining reference signal parameters based on a target received signal includes:
[0096] Step 201: Determine the duration of the high level of each target square wave waveform.
[0097] Step 202: Average the duration of the high level of each target square wave waveform to obtain the duration of the target high level.
[0098] The reference signal parameters include the target high-level duration ref_h, which can be obtained by averaging the widths of all detected target square wave waveforms within a certain window. The width of the target square wave waveform is also the high-level duration of each target square wave waveform. As mentioned above, the receiver can detect the width from the rising edge to the falling edge of the target square wave waveform, thereby determining the high-level duration of that target square wave waveform.
[0099] For example, the target high-level duration ref_h is:
[0100]
[0101] Where i is the index number and N is the statistical number of the target square wave waveforms that meet the requirements.
[0102] In addition, the reference signal parameters may also include the target waveform period ref period .
[0103] In one possible implementation, please refer to Figure 3 This illustration shows another flowchart for determining reference signal parameters provided in an embodiment of this application. Determining reference signal parameters based on the target received signal includes:
[0104] Step 301: For each target square wave waveform, determine the waveform period of each target square wave waveform based on the number of phase samples of the target received signal corresponding to the continuous high level of the target square wave waveform and the number of phase samples of the target received signal corresponding to the continuous low level of the target square wave waveform.
[0105] Step 302: Average the waveform periods of each target square wave to obtain the target waveform period.
[0106] The receiver samples the target received signal, which can therefore include multiple sampled phase samples. It is understood that the different phase values of each phase sample form the first waveform of the target received signal. For each target square wave in the first waveform, a consecutive high level corresponds to multiple phase samples of the target received signal; this number of phase samples can be denoted as the first phase sample count. Similarly, a consecutive low level of each target square wave also corresponds to multiple phase samples of the target received signal; this number of phase samples can be denoted as the second phase sample count.
[0107] For each target square wave waveform, the receiver can count the number of first phase samples and the number of second phase samples, and the waveform period ref_N(i) of the target square wave waveform can be obtained based on the sum of the two.
[0108] Therefore, the target waveform period in the reference signal parameters can be averaged to obtain:
[0109]
[0110] In another possible implementation, the reference signal parameters are determined based on the target received signal, including using the period of the square wave signal adopted by the pre-agreed receiver and transmitter as the target waveform period.
[0111] The receiver and transmitter can define the transmitted and received signals based on a protocol. This protocol defines a strict carrier signal period, which is 1 / 847.5kHz. When the sampling rate is 13.56MHz, one period corresponds to 16 phase samples.
[0112] Therefore, the period of the square wave signal used by the pre-agreed receiver and transmitter can also be used as the target waveform period.
[0113] In one embodiment, generating a reference signal based on reference signal parameters includes: generating a periodic binary signal as a reference signal based on the duration of the target high level and the period of the target waveform.
[0114] Once the duration of the target high level and the target waveform period are determined, the duration of the reference signal low level is also determined. Therefore, the reference signal can be generated based on the duration of the target high level and the target waveform period.
[0115] Optionally, the receiver can also determine the duration of the target low level and the target waveform period in the same way, and then generate a periodic binary signal as a reference signal based on the duration of the target low level and the target waveform period.
[0116] For example, using the period as ref period The number of continuous high-level samples is N1, and the number of continuous low-level samples is N2, generating a periodic binary reference waveform, such as... Figure 4 As shown. Here, the data symbol rate is 105.9375 kHz, and taking the target waveform period as an example, the sampling rate is 13.56 MHz; each target waveform period has 16 phase samples. One symbol corresponds to 8 periods of reference signal; high level represents digital logic "1", and low level represents digital logic "0". It should also be noted that, ideally, within one square wave period of the reference signal waveform, the number of high-level samples N1 = 8; and the number of low-level samples N2 = 8. When non-ideal factors exist, the duration of high / low levels may deviate to some extent.
[0117] The process of calculating window energy is explained below.
[0118] In one embodiment, such as Figure 5 The diagram illustrates a flowchart of a method for calculating window energy according to an embodiment of this application. Calculating the window energy at different positions where the relevant window has been slid over includes:
[0119] Step 501: Perform an XOR operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window at the current position to obtain multiple relevant values.
[0120] The current position is the location of the currently related window.
[0121] Step 502: Based on the result of the XOR logical operation, the target correlation value among multiple correlation values is accumulated to obtain the window energy corresponding to the correlation window at the current position.
[0122] In one embodiment, the length of the correlation window is defined as N_Corr, and the window length of the correlation window is less than or equal to the number of phase samples corresponding to a preset data symbol.
[0123] For example, such as Figure 6 As shown, a schematic diagram of a related window sliding is illustrated. Figure 6 Taking one data symbol as an example corresponding to 8 square wave cycles, and the window length of the correlation window N_Corr = 128.
[0124] When the correlation window slides to its current position, the receiver can determine the phase sample values of the target received signal in the correlation window at the current position, as well as the phase sample values of the reference signal in the correlation window at the current position. Then, a XOR operation is performed on a phase sample value of the target received signal and a phase sample value of the reference signal at the same position. Each calculation yields a correlation value y(j), thus obtaining multiple correlation values.
[0125] If two phase sample values are equal, the correlation value calculated here can be used as the target correlation value. By summing the target correlation values from multiple correlation values, the window energy corresponding to the correlation window at the current position can be obtained.
[0126] In one embodiment, performing an XOR operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window window at the current location includes: performing an XOR operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window window at the current location to obtain multiple correlation values, including: comparing each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window window at the current location, identifying phase samples with the same phase sample value as a first identifier value, and identifying phase samples with different phase sample values as a second identifier value; correspondingly, based on the result of the XOR operation, accumulating the target correlation values among the multiple correlation values to obtain the window energy corresponding to the relevant window window at the current location, including: counting the number of phase samples identified as the first identifier value to obtain the window energy.
[0127] Taking a first identifier value of 1 and a second identifier value of 0 as an example, the process of comparing the phase sample values of the target received signal and the phase sample values of the reference signal in the relevant window at the current location and performing an XOR logical operation is as follows:
[0128]
[0129] Where ref(j) is the j-th phase sample value of the generated reference signal in the current window. S(j) is the j-th phase sample value of the target received signal in the current window.
[0130] The accumulated window energy Y(i) is obtained as follows:
[0131]
[0132] Where l is the index of the phase sample at the latest position in the correlation window. Correspondingly, l-N_Corr+1 is the index of the phase sample at the initial position in the correlation window.
[0133] Understandably, taking a window containing 128 phase samples as an example, in an ideal situation, when the first waveform of the reference signal is completely consistent with the first waveform of the target received signal (completely correlated), the correlation value Y(i) corresponding to the correlation window is 128. When the two are completely inconsistent (completely uncorrelated), Y(i) is 0. In practical systems, the value of Y(i) is between 0 and 128.
[0134] Same reference Figure 6 As shown, if the duration of the high / low level of a square wave is defined as T, in a real system, non-ideal factors exist, causing the phase switching point to be less than 2*T periods. In existing algorithms, the period threshold for phase switching is defined as 1.5T; when the waveform width exceeds 1.5T, a phase reversal can be considered. However, if the waveform phase switching point is not the "pi" phase, the waveform width may not exceed 1.5T, or even remain at a non-ideal width for several periods (e.g., ...). Figure 6 (Multiple 1.3*T cycles). In this embodiment, a method for calculating window energy is proposed, overcoming the difficulty in locking synchronization. Under the influence of the relevant window, the window energy gradually decreases or increases, thereby accurately determining the phase reversal point based on the window energy.
[0135] The following explains the process of determining whether the window energy corresponding to the target position meets the preset energy conditions. This is illustrated by cases where the window energy gradually decreases and gradually increases.
[0136] In one embodiment, such as Figure 7 The diagram illustrates a flowchart of an embodiment of this application for determining whether a preset energy condition is met. The process of determining whether the window energy corresponding to the target location meets the preset energy condition includes:
[0137] Step 701: Determine the energy change based on the window energy corresponding to the target location and the preset comparison energy value.
[0138] Step 702: Compare the energy change with the preset phase switching threshold. If the energy change is greater than or equal to the preset phase switching threshold, then the preset energy condition is met.
[0139] As mentioned above, when a phase abrupt change occurs in the first waveform of the target received signal, the first waveform of the target received signal and the second waveform of the reference signal will gradually change from "fully correlated" to "uncorrelated" under the sliding action of the correlation window. Correspondingly, the window energy Y(i) of the correlation window will gradually decrease from its maximum value (e.g., 128) to its minimum value (e.g., 0) during the sliding calculation. Ideally, if the window length of the correlation window is one sign length, then the "slope" formed by the value of the correlation window decreasing from the maximum value to the minimum value (or increasing from the minimum value to the maximum value) has an "angle" of 45°. When the window energy changes to a preset phase switching threshold, the "phase reversal point" can be found. A comparison diagram of window energy decrease and phase switching point can be found in the following example. Figure 8 As shown.
[0140] Based on this, in the embodiments of this application, a preset phase switching threshold can be set to determine whether the preset energy conditions are met.
[0141] Because there are multiple frame synchronization positions in the target received signal, the phase reversal at each frame synchronization position is different. In some cases, the two waveforms in the correlation window window change from "correlated" to "uncorrelated," while in other cases, the two waveforms in the correlation window window change from "uncorrelated" to "correlated." Mapped to the window energy, this corresponds to situations where the window energy gradually decreases and the window energy gradually increases.
[0142] The following section will first explain the situation where the two waveforms in the relevant window gradually decrease from "correlated" to "uncorrelated", that is, the window energy gradually decreases.
[0143] In one embodiment, determining the energy change based on the window energy corresponding to the target location and a preset comparison energy value includes: when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, subtracting the preset maximum energy value from the window energy corresponding to the target location to obtain the energy change.
[0144] Optionally, the receiver can compare the window energy calculated multiple times in succession. When the window energy is determined to gradually decrease, it can be determined that during the sliding process, the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, that is, from correlated to uncorrelated.
[0145] The preset comparison energy value includes the preset maximum energy value Max. Optionally, Max = N_Corr.
[0146] The energy change ΔY(i) during the process of two waveforms changing from correlated to uncorrelated. down for:
[0147] ΔY(i)down =Max-Y(i) (5)
[0148] Furthermore, the energy change can be compared with a preset phase switching threshold. In this embodiment, the preset phase switching threshold can be determined based on the window length of the relevant window and the phase switching coefficient. The phase switching coefficient is within a range greater than 0 and less than 1.
[0149] For cases where the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal within the relevant window window decreases from high to low, the phase switching coefficient includes a first switching coefficient, and the preset phase switching threshold includes a first phase switching threshold. Determining the preset phase switching threshold based on the window length of the relevant window and the phase switching coefficient includes: using the product of the window length of the relevant window and the first switching coefficient as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether a preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal within the relevant window window decreases from high to low.
[0150] Let the first switching coefficient be β, and the window length of the relevant window be N_Corr. Then the first phase switching threshold Thre1 is: Thre1 = β * N_Corr. Here, β is a real number with a range of 0 < β < 1. Optionally, β can be 0.5.
[0151] More generally, the first phase switching threshold Thre1 can be defined as any value less than the window length.
[0152] The energy change ΔY(i) down If the energy change is greater than or equal to the first phase switching threshold Thre1, then the preset energy condition is met.
[0153]
[0154] When F(i) equals 1, the preset energy condition is satisfied. Furthermore, the sample number corresponding to the latest phase sample in the relevant window when F(i) equals 1 can be denoted as i_current.
[0155] Then, the phase reversal point k of the target received signal can be determined based on the phase sample number i_current of the target received signal corresponding to the target position.
[0156] Please refer to Figure 9 This document illustrates a flowchart of a process for determining a phase reversal point according to an embodiment of this application. The process involves determining the phase reversal point of the target received signal based on the phase sample number of the target received signal corresponding to the target location, including:
[0157] Step 901: Determine the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location.
[0158] Step 902: Calculate the first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase reversal point based on the first difference.
[0159] The sample number of the latest phase sample determined by the receiver (corresponding to the phase sample at the latest time within the relevant window) is denoted as i_current. As the window energy gradually decreases, the phase flip point k is:
[0160] k = i_current - β * N_Corr, when F(i) = 1 (7)
[0161] It is understandable that k can represent the sample number of the phase reversal point.
[0162] For easier understanding, please refer to Figure 10 The diagram illustrates the search for the phase switching point when the window energy decreases. Here, β is set to 0.5.
[0163] The following explanation focuses on the situation where the two waveforms in the relevant window change from "unrelated" to "related", that is, the window energy gradually increases.
[0164] In one embodiment, determining the energy change based on the window energy corresponding to the target location and a preset comparison energy value includes: when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window increases from low to high, subtracting the window energy corresponding to the target location from the preset minimum energy value to obtain the energy change.
[0165] Optionally, the receiver can compare the window energy calculated multiple times in succession. When the window energy is determined to gradually increase, it can be determined that during the sliding process, the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, that is, from uncorrelated to correlated.
[0166] The preset comparison energy value includes a preset minimum energy value, Min. Optionally, Min = 0.
[0167] The energy change ΔY(i) during the process of two waveforms changing from uncorrelated to correlated. up for:
[0168] ΔY(i) up =Y(i)-Min (8)
[0169] Furthermore, the energy change can be compared with a preset phase switching threshold.
[0170] For cases where the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal within the relevant window increases from low to high, the phase switching coefficient includes a second switching coefficient, and the preset phase switching threshold includes a second phase switching threshold. Determining the preset phase switching threshold based on the window length of the relevant window and the phase switching coefficient includes: using the product of the window length of the relevant window and the second switching coefficient as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether a preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal within the relevant window increases from low to high.
[0171] Let the second switching coefficient γ be the second phase switching threshold Thre2, which is: Thre2 = γ * N_Corr. Here, γ is a real number with a range of 0 < γ < 1. Optionally, γ can be 0.5.
[0172] Optionally, β and γ can take the same value or different values.
[0173] More generally, the second phase switching threshold Thre2 can be defined as any value less than the window length.
[0174] The energy change ΔY(i) up If the energy change is greater than or equal to the second phase switching threshold Thre2, then the preset energy condition is met.
[0175]
[0176] When F(i) equals 1, the preset energy condition is met. Similarly, the sample number corresponding to the latest phase sample in the relevant window when F(i) equals 1 can be denoted as i_current. Then, based on the phase sample number i_current of the target received signal corresponding to the target position, the phase flip point k of the target received signal can be determined:
[0177] k = i_current - γ*N_Corr, when F(i) = 1 (10)
[0178] For easier understanding, please refer to Figure 11 The diagram illustrates the search for the phase switching point when the window energy increases. Here, γ is set to 0.5.
[0179] In this embodiment, considering the actual phase flipping situation at the frame synchronization position, a method for determining the phase flip point is provided for two scenarios: gradually increasing window energy and gradually decreasing window energy. Based on the window energy corresponding to the target position and a preset comparison energy value, the energy change is determined. Then, the energy change is compared with a preset phase switching threshold. If the energy change is greater than or equal to the preset phase switching threshold, the preset energy condition is satisfied. Therefore, it is possible to quickly and accurately determine whether the window energy of the current window meets the preset energy condition. Furthermore, when the preset energy condition is met, the phase flip point can be determined directly by calculating the first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, greatly reducing the complexity of determining the phase flip point and simplifying and efficiently determining each phase flip point of the target received signal.
[0180] Before explaining the process of determining the frame synchronization information of the target received signal based on the phase reversal point, we will first explain the frame synchronization information.
[0181] The RFID Type B standard includes frame synchronization information for frame synchronization and data demodulation. In BPSK modulation, this frame synchronization information manifests as phase reversal. For example:
[0182] (1) For the SOF (Start of Frame) signal, its first bit toggles to a low level; after 10 or 11 symbols, its phase toggles to a high level, and the signal ends. For an example, see [reference needed]. Figure 12 The diagram shows a schematic of the frame format of the SOF portion sent by the PICC to the PCD in the ISO / IEC 14443-1 standard.
[0183] (2) For the Start position in the data section, the first bit is toggled low. See also... Figure 12 .
[0184] (3) In the EOF (End of Frame) signal, when the last data character transitions to the EOF identifier, there is a phase flip from high to low. For example, see [reference needed]. Figure 13 The diagram shows a schematic of the frame format of the EOF portion sent by the PICC to the PCD in the ISO / IEC 14443-1 standard.
[0185] Therefore, in this embodiment of the application, the frame synchronization information may include at least one of the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of EOF; and at least one of the start position of the high-level bit of SOF and the end bit of EOF.
[0186] In one embodiment, determining the frame synchronization information of the target received signal based on the phase reversal point includes: if the window energy corresponding to the target position drops to meet a preset energy condition, then the starting bit of the SOF corresponding to the phase reversal point, the starting position of the data symbol of the received data included in the target received signal, or the starting bit of the EOF.
[0187] Specifically, when the start bit of SOF is not determined, the phase reversal point corresponds to the start bit of SOF; when the start bit of SOF is determined but the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; when the start bit of SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of EOF.
[0188] In one embodiment, determining the frame synchronization information of the target received signal based on the phase reversal point includes: if the window energy corresponding to the target position rises to meet a preset energy condition, then the phase reversal point corresponds to the start position of the high-level bit of the SOF or the end bit of the EOF.
[0189] Where the starting position of the high-level bit of SOF is not determined, the phase reversal point corresponds to the starting position of the high-level bit of SOF; where the starting position of the high-level bit of SOF is determined, the phase reversal point corresponds to the ending bit of EOF.
[0190] For ease of understanding, the frame synchronization method for BPSK demodulation provided in this application is described below with a complete embodiment. Please refer to... Figure 14 The method includes:
[0191] (1) Parameter definition; including correlation window length N_Corr, waveform shaping threshold T_AM; phase switching coefficients β, γ (β, γ are real numbers, with a value range of 0<β<1, 0<γ<1); phase switching thresholds Thre1, Thre2; waveform bandwidth thresholds B_thre1, B_thre2.
[0192] (2) The ADC in the receiver outputs I / Q digital signals. The signal with the largest amplitude from the I and Q signals is selected as the input signal for decoding. Alternatively, the two signals can be combined to obtain the input signal for subsequent decoding processing.
[0193] (3) Based on the threshold T_AM, the waveform of the input signal is shaped to form a binary data waveform.
[0194] (4) Based on the thresholds B_thre1 and B_thre2, determine the square wave waveform that meets the conditions, and then based on the above formula 1, determine the high-level duration of the reference signal, thereby generating the reference signal.
[0195] (5) Optionally, step (4) can also use formulas 1 and 2 to determine the high-level duration and waveform cycle of the reference signal, thereby generating the reference signal.
[0196] (6) Slide the correlation window between the input signal and the reference signal and calculate the window energy within the correlation window, as shown in formulas 3 and 4 above;
[0197] (7) When the window energy Y(i) decreases from a larger energy value and the amount of decrease satisfies the threshold Thre1 condition, it can be considered that the phase reversal condition is satisfied; as shown in formulas 5 and 6 above.
[0198] (8) Calculate the phase reversal position k; as shown in Formula 7. The position of this sample point is the phase reversal sampling point from "correlated" to "uncorrelated" with the reference waveform; this sample point can be used as one of the frame synchronization positions.
[0199] In RFID, when the PCD receives a frame from the PICC, this location corresponds to:
[0200] 1) The first bit position of SOF or EOF (high to low). Or, 2) The first bit position of the Start symbol in the data frame (high to low).
[0201] (9) Optionally, when the window energy Y(i) rises from a smaller energy value and satisfies the threshold Thre2 condition, as shown in Formulas 8 and 9 above, it can be considered that the phase reversal condition is satisfied.
[0202] (10) Calculate the phase reversal position k, as shown in Formula 10. The position of this sample point is the phase reversal sampling point from "unrelated" to "related" with the reference waveform; this sample point can be used as the second frame synchronization position.
[0203] In RFID, when the PCD receives a frame from the PICC, this position corresponds to the point in the SOF or EOF information where the low level transitions to a high level.
[0204] In this embodiment, the phase flip position of the input signal can be accurately locked, significantly improving the efficiency and accuracy of synchronization position determination. In RFID, this can greatly improve the frame synchronization performance of the reader in decoding the BPSK signal of the tag, thereby enhancing decoding capability and receiving sensitivity.
[0205] In addition, this solution is applicable to all decoding modules that use BPSK modulation and have frame synchronization characteristics, so as to improve the performance of frame synchronization and time synchronization.
[0206] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0207] Based on the same inventive concept, this application also provides a frame synchronization device for BPSK signal demodulation, which implements the frame synchronization method for BPSK signal demodulation described above. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations of one or more embodiments of the frame synchronization device for BPSK signal demodulation provided below can be found in the limitations of the frame synchronization method for BPSK signal demodulation described above, and will not be repeated here.
[0208] In one embodiment, such as Figure 15 As shown, a frame synchronization device for BPSK signal demodulation is provided. The frame synchronization device 1500 for BPSK signal demodulation includes: an acquisition module 1501, a calculation module 1502, and a determination module 1503, wherein:
[0209] The acquisition module 1501 is used to acquire the target received signal, and when the first waveform of the target received signal meets the preset waveform width threshold requirement, determine the reference signal parameters based on the target received signal, and generate a reference signal according to the reference signal parameters.
[0210] The calculation module 1502 is used to slide the correlation window of the target received signal and calculate the window energy at different positions of the correlation window by combining the reference signal; the window energy is used to characterize the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal located in the correlation window.
[0211] The determination module 1503 is used to determine the phase reversal point of the target received signal based on the phase sample number of the target received signal corresponding to the target position, when the window energy corresponding to the target position meets the preset energy conditions, so as to determine the frame synchronization information of the target received signal based on the phase reversal point.
[0212] In one embodiment, the determining module 1503 is specifically used to: determine the energy change based on the window energy corresponding to the target position and the preset comparison energy value; compare the energy change with the preset phase switching threshold, and if the energy change is greater than or equal to the preset phase switching threshold, then determine that the preset energy condition is met.
[0213] In one embodiment, the preset comparison energy value includes a preset maximum energy value and a preset minimum energy value; the determining module 1503 is specifically used to: when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, subtract the preset maximum energy value from the window energy corresponding to the target position to obtain the energy change; when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from low to high, subtract the window energy corresponding to the target position from the preset minimum energy value to obtain the energy change.
[0214] In one embodiment, the device further includes a coefficient determination module 1503, used to: determine a preset phase switching threshold based on the window length of the relevant window and the phase switching coefficient; wherein the value of the phase switching coefficient is within the range of values greater than 0 and less than 1.
[0215] In one embodiment, the phase switching coefficient includes a first switching coefficient and a second switching coefficient, and the preset phase switching threshold includes a first phase switching threshold and a second phase switching threshold; the coefficient determination module 1503 is used to: use the product of the window length of the relevant window and the first switching coefficient as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low; and use the product of the window length of the relevant window and the second switching coefficient as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window increases from low to high.
[0216] In one embodiment, the determining module 1503 is specifically used to: determine the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculate the first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase reversal point based on the first difference.
[0217] In one embodiment, the frame synchronization information includes at least one of the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of EOF; the determining module 1503 is specifically configured to: if the window energy corresponding to the target position drops to meet a preset energy condition, then the phase reversal point corresponds to the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, or the start bit of EOF; wherein, when the start bit of SOF is not determined, the phase reversal point corresponds to the start bit of SOF; when the start bit of SOF is determined and the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; when the start bit of SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of EOF.
[0218] In one embodiment, the frame synchronization information includes at least one of the start position of the high-level bit of SOF and the end bit of EOF; the determining module 1503 is specifically used to: if the window energy corresponding to the target position rises to meet the preset energy condition, then the phase reversal point corresponds to the start position of the high-level bit of SOF or the end bit of EOF; wherein, when the start position of the high-level bit of SOF is not determined, the phase reversal point corresponds to the start position of the high-level bit of SOF; when the start position of the high-level bit of SOF is determined, the phase reversal point corresponds to the end bit of EOF.
[0219] In one embodiment, the window length of the relevant window is less than or equal to the number of phase samples corresponding to a preset data symbol.
[0220] In one embodiment, the calculation module 1502 is specifically used to: perform an XOR logic operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window at the current position to obtain multiple correlation values; based on the result of the XOR logic operation, perform an accumulation operation on the target correlation value among the multiple correlation values to obtain the window energy corresponding to the relevant window at the current position.
[0221] In one embodiment, the calculation module 1502 is specifically used to: perform an XOR logic operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window window at the current position to obtain multiple related values, including: comparing each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window window at the current position, marking phase samples with the same phase sample value as a first identifier value, and marking phase samples with different phase sample values as a second identifier value; counting the number of phase samples marked as the first identifier value to obtain the window energy.
[0222] In one embodiment, the acquisition module 1501 is specifically used to: determine whether there are target square wave waveforms in the first waveform of the target received signal with a number greater than a preset number threshold; wherein the high-level duration of the target square wave waveform is greater than or equal to a first preset threshold and less than a second preset threshold; if so, determine that the first waveform of the target received signal meets the preset waveform width threshold requirement.
[0223] In one embodiment, the reference signal parameters include the target high-level duration; the acquisition module 1501 is specifically used to: determine the high-level duration of each target square wave waveform; and average the high-level duration of each target square wave waveform to obtain the target high-level duration.
[0224] In one embodiment, the reference signal parameters further include the target waveform period; the acquisition module 1501 is specifically used to: for each target square wave waveform, determine the waveform period of each target square wave waveform based on the number of phase samples of the target received signal corresponding to the continuous high level of the target square wave waveform and the number of phase samples of the target received signal corresponding to the continuous low level of the target square wave waveform; and average the waveform periods of each target square wave waveform to obtain the target waveform period.
[0225] In one embodiment, the reference signal parameters further include the target waveform period; the acquisition module 1501 is specifically used to: take the square wave signal period adopted by the pre-agreed receiver and transmitter as the target waveform period.
[0226] In one embodiment, the acquisition module 1501 is specifically used to: generate a periodic binary signal as a reference signal based on the duration of the target high level and the period of the target waveform.
[0227] The modules in the frame synchronization device for BPSK signal demodulation described above can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0228] In one embodiment, a computer device is provided, which may be an electronic device, and its internal structure diagram may be as follows: Figure 16As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a frame synchronization method for BPSK signal demodulation. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0229] Those skilled in the art will understand that Figure 16 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0230] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0231] Acquire the target received signal; if the first waveform of the target received signal meets the preset waveform width threshold requirement, determine the reference signal parameters based on the target received signal, and generate the reference signal according to the reference signal parameters.
[0232] By sliding the correlation window of the target received signal and combining it with the reference signal, the window energy at different positions of the correlation window is calculated; the window energy is used to characterize the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal located in the correlation window.
[0233] When the window energy corresponding to the target location meets the preset energy conditions, the phase reversal point of the target received signal is determined according to the phase sample number of the target received signal corresponding to the target location, so as to determine the frame synchronization information of the target received signal based on the phase reversal point.
[0234] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0235] The energy change is determined based on the window energy corresponding to the target location and the preset comparison energy value. The energy change is compared with the preset phase switching threshold. If the energy change is greater than or equal to the preset phase switching threshold, the preset energy condition is determined to be met.
[0236] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0237] When the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, the difference between the preset maximum energy value and the window energy corresponding to the target position is used to obtain the energy change; when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window window increases from low to high, the difference between the window energy corresponding to the target position and the preset minimum energy value is used to obtain the energy change.
[0238] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0239] The preset phase switching threshold is determined based on the window length of the relevant window and the phase switching coefficient; wherein the value of the phase switching coefficient is within the range of greater than 0 and less than 1.
[0240] In one embodiment, the phase switching coefficient includes a first switching coefficient and a second switching coefficient, and the preset phase switching threshold includes a first phase switching threshold and a second phase switching threshold; when the processor executes the computer program, it also performs the following steps:
[0241] The product of the window length of the relevant window and the first switching coefficient is used as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low; the product of the window length of the relevant window and the second switching coefficient is used as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window increases from low to high.
[0242] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0243] Determine the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculate the first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase flip point based on the first difference.
[0244] In one embodiment, the frame synchronization information includes at least one of the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of EOF; the processor, when executing the computer program, also implements the following steps:
[0245] If the window energy corresponding to the target position drops to meet the preset energy condition, the phase reversal point corresponds to the start bit of the SOF, the start position of the data symbol of the received data included in the target received signal, or the start bit of the EOF. Specifically, if the start bit of the SOF is not determined, the phase reversal point corresponds to the start bit of the SOF; if the start bit of the SOF is determined but the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; if the start bit of the SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of the EOF.
[0246] In one embodiment, the frame synchronization information includes at least one of the start position of the high-level bit of SOF and the end bit of EOF; the processor also performs the following steps when executing the computer program:
[0247] If the window energy corresponding to the target position rises to meet the preset energy condition, the phase reversal point corresponds to the start position of the high-level bit of SOF or the end bit of EOF; wherein, if the start position of the high-level bit of SOF is not determined, the phase reversal point corresponds to the start position of the high-level bit of SOF; if the start position of the high-level bit of SOF is determined, the phase reversal point corresponds to the end bit of EOF.
[0248] In one embodiment, the window length of the relevant window is less than or equal to the number of phase samples corresponding to a preset data symbol.
[0249] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0250] Perform an XOR operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window at the current position to obtain multiple correlation values; based on the result of the XOR operation, accumulate the target correlation value among the multiple correlation values to obtain the window energy corresponding to the relevant window at the current position.
[0251] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0252] The phase sample values of the target received signal in the relevant window at the current location are compared with the phase sample values of the reference signal. Phase samples with the same phase sample value are marked as the first identifier value, and phase samples with different phase sample values are marked as the second identifier value. The number of phase samples marked as the first identifier value is counted to obtain the window energy.
[0253] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0254] Determine whether there are target square wave waveforms in the first waveform of the target received signal that the number of such waveforms is greater than a preset threshold; wherein the high-level duration of the target square wave waveform is greater than or equal to a first preset threshold and less than a second preset threshold; if so, determine that the first waveform of the target received signal meets the preset waveform width threshold requirement.
[0255] In one embodiment, the reference signal parameters include the duration of the target high level; the processor, when executing the computer program, also implements the following steps:
[0256] Determine the duration of the high level of each target square wave waveform; average the duration of the high level of each target square wave waveform to obtain the duration of the target high level.
[0257] In one embodiment, the reference signal parameters further include the target waveform period; the processor, when executing the computer program, also performs the following steps:
[0258] For each target square wave waveform, the waveform period of each target square wave waveform is determined based on the number of phase samples of the target received signal corresponding to the continuous high level of the target square wave waveform and the number of phase samples of the target received signal corresponding to the continuous low level of the target square wave waveform. The average of the waveform periods of each target square wave waveform is then used to obtain the target waveform period.
[0259] In one embodiment, the reference signal parameters further include the target waveform period; the processor, when executing the computer program, also performs the following steps:
[0260] The period of the square wave signal used by the pre-agreed receiver and transmitter is taken as the target waveform period.
[0261] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0262] Based on the duration of the target high level and the period of the target waveform, a periodic binary signal is generated as a reference signal.
[0263] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0264] Acquire the target received signal; if the first waveform of the target received signal meets the preset waveform width threshold requirement, determine the reference signal parameters based on the target received signal, and generate the reference signal according to the reference signal parameters.
[0265] By sliding the correlation window of the target received signal and combining it with the reference signal, the window energy at different positions of the correlation window is calculated; the window energy is used to characterize the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal located in the correlation window.
[0266] When the window energy corresponding to the target location meets the preset energy conditions, the phase reversal point of the target received signal is determined according to the phase sample number of the target received signal corresponding to the target location, so as to determine the frame synchronization information of the target received signal based on the phase reversal point.
[0267] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0268] The energy change is determined based on the window energy corresponding to the target location and the preset comparison energy value. The energy change is compared with the preset phase switching threshold. If the energy change is greater than or equal to the preset phase switching threshold, the preset energy condition is determined to be met.
[0269] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0270] When the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, the difference between the preset maximum energy value and the window energy corresponding to the target position is used to obtain the energy change; when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window window increases from low to high, the difference between the window energy corresponding to the target position and the preset minimum energy value is used to obtain the energy change.
[0271] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0272] The preset phase switching threshold is determined based on the window length of the relevant window and the phase switching coefficient; wherein the value of the phase switching coefficient is within the range of greater than 0 and less than 1.
[0273] In one embodiment, the phase switching coefficient includes a first switching coefficient and a second switching coefficient, and the preset phase switching threshold includes a first phase switching threshold and a second phase switching threshold; when the computer program is executed by the processor, it further implements the following steps:
[0274] The product of the window length of the relevant window and the first switching coefficient is used as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low; the product of the window length of the relevant window and the second switching coefficient is used as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window increases from low to high.
[0275] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0276] Determine the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculate the first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase flip point based on the first difference.
[0277] In one embodiment, the frame synchronization information includes at least one of the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of EOF; when the computer program is executed by the processor, it further implements the following steps:
[0278] If the window energy corresponding to the target position drops to meet the preset energy condition, the phase reversal point corresponds to the start bit of the SOF, the start position of the data symbol of the received data included in the target received signal, or the start bit of the EOF. Specifically, if the start bit of the SOF is not determined, the phase reversal point corresponds to the start bit of the SOF; if the start bit of the SOF is determined but the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; if the start bit of the SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of the EOF.
[0279] In one embodiment, the frame synchronization information includes at least one of the start position of the high-level bit of SOF and the end bit of EOF; when the computer program is executed by the processor, it also performs the following steps:
[0280] If the window energy corresponding to the target position rises to meet the preset energy condition, the phase reversal point corresponds to the start position of the high-level bit of SOF or the end bit of EOF; wherein, if the start position of the high-level bit of SOF is not determined, the phase reversal point corresponds to the start position of the high-level bit of SOF; if the start position of the high-level bit of SOF is determined, the phase reversal point corresponds to the end bit of EOF.
[0281] In one embodiment, the window length of the relevant window is less than or equal to the number of phase samples corresponding to a preset data symbol.
[0282] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0283] Perform an XOR operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window at the current position to obtain multiple correlation values; based on the result of the XOR operation, accumulate the target correlation value among the multiple correlation values to obtain the window energy corresponding to the relevant window at the current position.
[0284] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0285] The phase sample values of the target received signal in the relevant window at the current location are compared with the phase sample values of the reference signal. Phase samples with the same phase sample value are marked as the first identifier value, and phase samples with different phase sample values are marked as the second identifier value. The number of phase samples marked as the first identifier value is counted to obtain the window energy.
[0286] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0287] Determine whether there are target square wave waveforms in the first waveform of the target received signal that the number of such waveforms is greater than a preset threshold; wherein the high-level duration of the target square wave waveform is greater than or equal to a first preset threshold and less than a second preset threshold; if so, determine that the first waveform of the target received signal meets the preset waveform width threshold requirement.
[0288] In one embodiment, the reference signal parameters include the duration of the target high level; when the computer program is executed by the processor, it also performs the following steps:
[0289] Determine the duration of the high level of each target square wave waveform; average the duration of the high level of each target square wave waveform to obtain the duration of the target high level.
[0290] In one embodiment, the reference signal parameters further include the target waveform period; when the computer program is executed by the processor, it also performs the following steps:
[0291] For each target square wave waveform, the waveform period of each target square wave waveform is determined based on the number of phase samples of the target received signal corresponding to the continuous high level of the target square wave waveform and the number of phase samples of the target received signal corresponding to the continuous low level of the target square wave waveform. The average of the waveform periods of each target square wave waveform is then used to obtain the target waveform period.
[0292] In one embodiment, the reference signal parameters further include the target waveform period; when the computer program is executed by the processor, it also performs the following steps:
[0293] The period of the square wave signal used by the pre-agreed receiver and transmitter is taken as the target waveform period.
[0294] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0295] Based on the duration of the target high level and the period of the target waveform, a periodic binary signal is generated as a reference signal.
[0296] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0297] Acquire the target received signal; if the first waveform of the target received signal meets the preset waveform width threshold requirement, determine the reference signal parameters based on the target received signal, and generate the reference signal according to the reference signal parameters.
[0298] By sliding the correlation window of the target received signal and combining it with the reference signal, the window energy at different positions of the correlation window is calculated; the window energy is used to characterize the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal located in the correlation window.
[0299] When the window energy corresponding to the target location meets the preset energy conditions, the phase reversal point of the target received signal is determined according to the phase sample number of the target received signal corresponding to the target location, so as to determine the frame synchronization information of the target received signal based on the phase reversal point.
[0300] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0301] The energy change is determined based on the window energy corresponding to the target location and the preset comparison energy value. The energy change is compared with the preset phase switching threshold. If the energy change is greater than or equal to the preset phase switching threshold, the preset energy condition is determined to be met.
[0302] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0303] When the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low, the difference between the preset maximum energy value and the window energy corresponding to the target position is used to obtain the energy change; when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window window increases from low to high, the difference between the window energy corresponding to the target position and the preset minimum energy value is used to obtain the energy change.
[0304] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0305] The preset phase switching threshold is determined based on the window length of the relevant window and the phase switching coefficient; wherein the value of the phase switching coefficient is within the range of greater than 0 and less than 1.
[0306] In one embodiment, the phase switching coefficient includes a first switching coefficient and a second switching coefficient, and the preset phase switching threshold includes a first phase switching threshold and a second phase switching threshold; when the computer program is executed by the processor, it further implements the following steps:
[0307] The product of the window length of the relevant window and the first switching coefficient is used as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window decreases from high to low; the product of the window length of the relevant window and the second switching coefficient is used as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received waveform and the second waveform of the reference signal in the relevant window window increases from low to high.
[0308] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0309] Determine the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculate the first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase flip point based on the first difference.
[0310] In one embodiment, the frame synchronization information includes at least one of the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of EOF; when the computer program is executed by the processor, it further implements the following steps:
[0311] If the window energy corresponding to the target position drops to meet the preset energy condition, the phase reversal point corresponds to the start bit of the SOF, the start position of the data symbol of the received data included in the target received signal, or the start bit of the EOF. Specifically, if the start bit of the SOF is not determined, the phase reversal point corresponds to the start bit of the SOF; if the start bit of the SOF is determined but the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; if the start bit of the SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of the EOF.
[0312] In one embodiment, the frame synchronization information includes at least one of the start position of the high-level bit of SOF and the end bit of EOF; when the computer program is executed by the processor, it also performs the following steps:
[0313] If the window energy corresponding to the target position rises to meet the preset energy condition, the phase reversal point corresponds to the start position of the high-level bit of SOF or the end bit of EOF; wherein, if the start position of the high-level bit of SOF is not determined, the phase reversal point corresponds to the start position of the high-level bit of SOF; if the start position of the high-level bit of SOF is determined, the phase reversal point corresponds to the end bit of EOF.
[0314] In one embodiment, the window length of the relevant window is less than or equal to the number of phase samples corresponding to a preset data symbol.
[0315] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0316] Perform an XOR operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the relevant window at the current position to obtain multiple correlation values; based on the result of the XOR operation, accumulate the target correlation value among the multiple correlation values to obtain the window energy corresponding to the relevant window at the current position.
[0317] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0318] The phase sample values of the target received signal in the relevant window at the current location are compared with the phase sample values of the reference signal. Phase samples with the same phase sample value are marked as the first identifier value, and phase samples with different phase sample values are marked as the second identifier value. The number of phase samples marked as the first identifier value is counted to obtain the window energy.
[0319] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0320] Determine whether there are target square wave waveforms in the first waveform of the target received signal that the number of such waveforms is greater than a preset threshold; wherein the high-level duration of the target square wave waveform is greater than or equal to a first preset threshold and less than a second preset threshold; if so, determine that the first waveform of the target received signal meets the preset waveform width threshold requirement.
[0321] In one embodiment, the reference signal parameters include the duration of the target high level; when the computer program is executed by the processor, it also performs the following steps:
[0322] Determine the duration of the high level of each target square wave waveform; average the duration of the high level of each target square wave waveform to obtain the duration of the target high level.
[0323] In one embodiment, the reference signal parameters further include the target waveform period; when the computer program is executed by the processor, it also performs the following steps:
[0324] For each target square wave waveform, the waveform period of each target square wave waveform is determined based on the number of phase samples of the target received signal corresponding to the continuous high level of the target square wave waveform and the number of phase samples of the target received signal corresponding to the continuous low level of the target square wave waveform. The average of the waveform periods of each target square wave waveform is then used to obtain the target waveform period.
[0325] In one embodiment, the reference signal parameters further include the target waveform period; when the computer program is executed by the processor, it also performs the following steps:
[0326] The period of the square wave signal used by the pre-agreed receiver and transmitter is taken as the target waveform period.
[0327] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0328] Based on the duration of the target high level and the period of the target waveform, a periodic binary signal is generated as a reference signal.
[0329] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0330] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0331] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A frame synchronization method for BPSK signal demodulation, characterized in that, The method includes: Acquire a target received signal; if the first waveform of the target received signal meets a preset waveform width threshold requirement, determine reference signal parameters based on the target received signal, and generate a reference signal according to the reference signal parameters. In the sliding correlation window of the target received signal, and in conjunction with the reference signal, the window energy at different positions of the correlation window is calculated; this includes: performing an XOR logic operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the correlation window at the current position to obtain multiple correlation values; based on the result of the XOR logic operation, accumulating the target correlation value among the multiple correlation values to obtain the window energy corresponding to the correlation window at the current position; the window energy is used to characterize the phase correlation degree between the first waveform of the target received signal and the second waveform of the reference signal located in the correlation window; The energy change is determined based on the window energy corresponding to the target location and the preset comparison energy value. The energy change is compared with a preset phase switching threshold. If the energy change is greater than or equal to the preset phase switching threshold, then the preset energy condition is determined to be met. When the window energy corresponding to the target location meets the preset energy condition, the phase reversal point of the target received signal is determined according to the phase sample number of the target received signal corresponding to the target location, so as to determine the frame synchronization information of the target received signal based on the phase reversal point; including: determining the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculating a first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase reversal point based on the first difference.
2. The method according to claim 1, characterized in that, The preset comparison energy value includes a preset maximum energy value and a preset minimum energy value; determining the energy change based on the window energy corresponding to the target position and the preset comparison energy value includes: When the phase correlation between the first waveform of the target received signal and the second waveform of the reference signal in the relevant window window decreases from high to low, the difference between the preset maximum energy value and the window energy corresponding to the target position is used to obtain the energy change. When the phase correlation between the first waveform of the target received signal and the second waveform of the reference signal in the relevant window window increases from low to high, the difference between the window energy corresponding to the target position and the preset minimum energy value is used to obtain the energy change.
3. The method according to claim 1, characterized in that, The method further includes: The preset phase switching threshold is determined based on the window length and phase switching coefficient of the relevant window. The phase switching coefficient is within the range of values greater than 0 and less than 1.
4. The method according to claim 3, characterized in that, The phase switching coefficient includes a first switching coefficient and a second switching coefficient, and the preset phase switching threshold includes a first phase switching threshold and a second phase switching threshold; determining the preset phase switching threshold based on the window length of the relevant window and the phase switching coefficient includes: The product of the window length of the relevant window and the first switching coefficient is used as the first phase switching threshold; wherein, the first phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received signal and the second waveform of the reference signal in the relevant window is from high to low. The product of the window length of the relevant window and the second switching coefficient is used as the second phase switching threshold; wherein, the second phase switching threshold is used to determine whether the preset energy condition is met when the phase correlation between the first waveform of the target received signal and the second waveform of the reference signal in the relevant window is from low to high.
5. The method according to claim 1, characterized in that, The frame synchronization information includes at least one of the start bit of SOF, the start position of the data symbol of the received data included in the target received signal, and the start bit of EOF; determining the frame synchronization information of the target received signal based on the phase flip point includes: If the window energy corresponding to the target position drops to meet the preset energy condition, then the phase reversal point corresponds to the start bit of the SOF, the start position of the data symbol of the received data included in the target received signal, or the start bit of the EOF. Wherein, if the start bit of the SOF is not determined, the phase reversal point corresponds to the start bit of the SOF; if the start bit of the SOF is determined but the start position of the data symbol is not determined, the phase reversal point corresponds to the start position of the data symbol; if the start bit of the SOF and the start position of the data symbol are determined, the phase reversal point corresponds to the start bit of the EOF.
6. The method according to claim 1, characterized in that, The frame synchronization information includes at least one of the start position of the high-level bit of SOF and the end bit of EOF; determining the frame synchronization information of the target received signal based on the phase flip point includes: If the window energy corresponding to the target position rises to meet the preset energy condition, then the phase reversal point corresponds to the start position of the high-level bit of the SOF or the end bit of the EOF. Wherein, if the starting position of the high-level bit of the SOF is not determined, the phase reversal point corresponds to the starting position of the high-level bit of the SOF; if the starting position of the high-level bit of the SOF is determined, the phase reversal point corresponds to the ending bit of the EOF.
7. The method according to claim 1, characterized in that, The window length of the relevant window is less than or equal to the number of phase samples corresponding to a preset data symbol.
8. The method according to claim 1, characterized in that, The XOR operation is performed on the phase sample values of the target received signal and the phase sample values of the reference signal in the relevant window at the current position to obtain multiple relevant values, including: The phase sample values of the target received signal and the phase sample values of the reference signal in the relevant window at the current position are compared. The phase sample values with the same phase sample value are marked as the first identification value, and the phase sample values with different phase sample values are marked as the second identification value. Correspondingly, the result of the XOR logical operation is used to accumulate the target correlation value among multiple correlation values to obtain the window energy corresponding to the correlation window at the current position, including: The number of phase samples identified by the first identifier value is used to obtain the window energy.
9. The method according to claim 1, characterized in that, The process of determining whether the first waveform of the target received signal meets the preset waveform width threshold requirement includes: Determine whether there are target square wave waveforms in the first waveform of the target received signal that have a number greater than a preset number threshold; wherein the high level duration of the target square wave waveform is greater than or equal to a first preset threshold and less than a second preset threshold; If so, then it is determined that the first waveform of the target received signal meets the preset waveform width threshold requirement.
10. The method according to claim 9, characterized in that, The reference signal parameters include the duration of the target high level; The step of determining the reference signal parameters based on the target received signal includes: Determine the duration of the high level of each of the target square wave waveforms; The duration of the high level of each target square wave waveform is averaged to obtain the duration of the target high level.
11. The method according to claim 10, characterized in that, The reference signal parameters further include the target waveform period; determining the reference signal parameters based on the target received signal includes: For each of the target square wave waveforms, the waveform period of each target square wave waveform is determined according to the number of phase samples of the target received signal corresponding to the continuous high level of the target square wave waveform and the number of phase samples of the target received signal corresponding to the continuous low level of the target square wave waveform. The average of the waveform periods of each target square wave is used to obtain the target waveform period.
12. The method according to claim 10, characterized in that, The reference signal parameters further include the target waveform period; determining the reference signal parameters based on the target received signal includes: The period of the square wave signal used by the pre-agreed receiver and transmitter is taken as the target waveform period.
13. The method according to claim 11 or 12, characterized in that, The step of generating the reference signal based on the reference signal parameters includes: Based on the duration of the target high level and the period of the target waveform, a periodic binary signal is generated as the reference signal.
14. A frame synchronization device for BPSK signal demodulation, characterized in that, The device includes: The acquisition module is used to acquire the target received signal, and when the first waveform of the target received signal meets the preset waveform width threshold requirement, determine the reference signal parameters based on the target received signal, and generate a reference signal according to the reference signal parameters; The calculation module is used to slide a correlation window of the target received signal and, in conjunction with the reference signal, calculate the window energy at different positions of the correlation window. Specifically, it performs an XOR logic operation on each phase sample value of the target received signal and each phase sample value of the reference signal in the correlation window at the current position to obtain multiple correlation values. Based on the result of the XOR logic operation, it accumulates the target correlation value among the multiple correlation values to obtain the window energy corresponding to the correlation window at the current position. The window energy is used to characterize the phase correlation degree between the first waveform of the target received signal and the second waveform of the reference signal located in the correlation window. The determination module is used to determine the amount of energy change based on the window energy corresponding to the target location and the preset comparison energy value; The energy change is compared with a preset phase switching threshold. If the energy change is greater than or equal to the preset phase switching threshold, then the preset energy condition is determined to be met. The determining module is further configured to, when the window energy corresponding to the target location meets a preset energy condition, determine the phase reversal point of the target received signal based on the phase sample number of the target received signal corresponding to the target location, so as to determine the frame synchronization information of the target received signal based on the phase reversal point; specifically, it is configured to determine the sample number corresponding to the latest phase sample of the target received signal in the relevant window window corresponding to the target location; calculate a first difference between the sample number corresponding to the latest phase sample and the preset phase switching threshold, so as to determine the phase reversal point based on the first difference.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 13.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.
17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.