A broadband spectrum scanning and splicing method and system
By separating the scanning and splicing of the broadband spectrum, the FPGA is responsible for data acquisition and processing, and the host computer performs splicing and reset processing, solving the spectrum jitter problems caused by the limitations of spectrum scanning and data transmission errors in traditional technology, achieving more efficient and Stable spectrum management.
Patent Information
- Application Number
- CN202411463400.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-21
AI Technical Summary
Traditional spectrum scanning technology has limitations in bandwidth and resolution. It is difficult for FPGAs to scan and splice at the same time when processing broadband spectrum data, and data transmission errors can easily lead to spectrum jitter.
Separate the scanning and splicing of the broadband spectrum. The FPGA is only responsible for the acquisition and processing of spectrum data. The upper computer performs spectrum splicing, and solves the spectrum jump problem caused by transmission errors through two reset processing.
It saves FPGA hardware resources, improves the accuracy and stability of spectrum splicing, and avoids spectrum jitter problems.
Smart Images

Figure CN119012369B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a broadband spectrum scanning and splicing method and system. Background Art
[0002] In modern wireless communication systems, effective management and utilization of spectrum resources are crucial. Wideband spectrum scanning technology allows rapid acquisition of spectrum information, providing support for spectrum management and monitoring. However, traditional spectrum scanning technology has certain limitations in terms of bandwidth and resolution.
[0003] The higher the resolution of the spectrum, the more data needs to be processed by FFT transformation, which means a greater amount of calculation and a larger space for storing data. FPGA, as an embedded signal processor, can be used for FFT calculations, but the storage space and computing units are limited, making it difficult to scan and splice the acquired spectrum information at the same time. If a processing unit is added to the FPGA, data transmission errors may occur during the data transmission process due to various uncertain factors, leading to spectrum jitter problems, which may result in errors in the final spectrum splicing results. Summary of the invention
[0004] The purpose of the present invention is to provide a broadband spectrum scanning and splicing method and system, which separates the scanning and splicing of the broadband spectrum. The FPGA is only responsible for the collection and processing of spectrum data, saving FPGA hardware resources. The host computer performs spectrum splicing, and during the splicing process, two reset processes are performed to solve the spectrum jitter caused by transmission errors caused by uncertain factors.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] On the one hand, the present application provides a broadband spectrum scanning and splicing method, and the host computer software performs the following steps:
[0007] S1, receiving the spectrum data packets uploaded by the FPGA spectrum scanning module in sequence and storing them in the data packet stream sequence;
[0008] S2, using a frame frequency synchronization algorithm to find the first data packet corresponding to the starting frequency point from the data packet stream sequence;
[0009] S3, starting from the first data packet, the data packets in the data packet stream sequence are tested for packet sequence number continuity, and if the packet sequence numbers are not continuous, step S2 is executed;
[0010] If the packet numbers are continuous, all the data packets corresponding to each frequency point are found from the data packet stream sequence, and then spliced and valid data are intercepted to obtain a single-frame frequency point spectrum;
[0011] S4, performing a legality check on the frequency spectrum of a single frame. If the frequency spectrum of a single frame is illegal, the frequency spectrum of the frame is discarded and the process jumps to step S2;
[0012] S5. All legal single-frame frequency spectra are spliced together to obtain a complete spectrum of the full frequency band.
[0013] In some specific implementations, the specific process of step S1 is:
[0014] S11, encapsulate the center frequency set required for full-band splicing into a control package and send it to the FPGA spectrum scanning module;
[0015] S12. Receive a spectrum data packet uploaded by the FPGA spectrum scanning module. The spectrum data packet is: the FPGA spectrum scanning module parses the control packet to obtain a center frequency set, controls the RF receiver according to the center frequency set, collects and processes spectrum data from the RF receiver, and encapsulates the spectrum data to obtain a spectrum data packet.
[0016] In some specific implementations, in step S11, the packet structure of the control packet includes: a Centerfreq field, used to configure the center frequency of the RF receiver; a ReceiverMode field, used to configure the working mode of the RF receiver to control the gain of the RF receiver; a VailidLen field, used to define the effective length under the current center frequency and bandwidth; and a lastfreq field, used to mark whether the frequency point is the end frequency.
[0017] In some specific implementations, the lastflag field is used to mark whether the current spectrum data packet is the end of the packet; the framenumber field is used to mark the packet sequence number of the current spectrum data packet; the bwidx field is used to indicate the bandwidth of the current spectrum data packet; the Freq field indicates the center frequency of the current spectrum data packet; the valid data length field, the VailidLen field, is used to define the valid length under the current center frequency and bandwidth; the lastfreq field is used to mark whether the center frequency of the current spectrum data packet is the end frequency; the Data field is used to store the spectrum data of the current spectrum data packet.
[0018] In some specific implementations, the specific process of obtaining the spectrum data packet in step S12 is as follows:
[0019] S121, the FPGA spectrum scanning module controls the radio frequency receiver in sequence according to the center frequency set;
[0020] S122, each time controlling a center frequency of the radio frequency receiver, waiting for the output of a lock indication signal of the radio frequency receiver;
[0021] S123, when receiving the lock indication signal output, start collecting the output signal, and perform ADC conversion on the collected output signal to obtain ADC data;
[0022] S124, performing digital down-conversion, decimation filtering, and fast Fourier transform processing on the ADC data in sequence to obtain a spectrum data stream, and filling the spectrum data stream into the Data field of the spectrum data packet in sequence.
[0023] In some specific implementations, the frame rate synchronization algorithm is:
[0024] Parse the received spectrum data packets in sequence, and traverse the Freq field of each spectrum data packet in the data packet stream sequence;
[0025] Find the spectrum data packet whose center frequency field jumps from the maximum frequency to the minimum frequency from the data packet stream sequence, and take the first data packet corresponding to the minimum frequency as the first data packet of the starting frequency point.
[0026] In some specific implementations, the specific process of step S3 is:
[0027] S31, traverse the lastflag field and the Freq field of each spectrum data packet in the data packet stream sequence to find all spectrum data packets at the same frequency point;
[0028] S32, traversing the framenumber fields of all spectrum data packets at the same frequency point, and detecting whether the packet numbers of all spectrum data packets at the same frequency point are continuous;
[0029] S33, if continuous, read spectrum data from the Data field of the spectrum data packet in sequence according to the packet sequence number, splice the read spectrum data in sequence to obtain single-frame spliced spectrum data, and intercept valid data from the single-frame spliced spectrum data to obtain a single-frame frequency point spectrum;
[0030] S34: If not continuous, discard all obtained single-frame frequency point spectra and jump to step S2.
[0031] In some specific implementations, the specific process of step S4 is:
[0032] S41, determining whether the frequency points corresponding to the current single-frame frequency point spectrum are in the center frequency set and whether the arrangement order of the frequency points corresponding to the current single-frame frequency point spectrum and the frequency points of the previous single-frame frequency point spectrum are consistent with the order in the center frequency set;
[0033] S42, if they are consistent, then the single-frame frequency spectrum is judged to be legal, and the legality detection of the next single-frame frequency spectrum is continued;
[0034] S43: If they are inconsistent, it is determined that the single-frame frequency point spectrum is illegal, all single-frame frequency point spectrums are discarded, and the process jumps to step S2.
[0035] In a second aspect, the present application provides a broadband spectrum scanning and splicing system, comprising:
[0036] FPGA spectrum scanning module, used to quickly collect and process the spectrum data output by the RF receiver, and encapsulate the processed spectrum data into spectrum data packets and upload them to the host computer;
[0037] The host computer includes:
[0038] The data packet receiving module is used to store the received spectrum data packets into the data packet stream sequence in sequence;
[0039] The frame frequency synchronization module uses the frame frequency synchronization algorithm to find the first data packet corresponding to the starting frequency point from the data packet stream sequence;
[0040] The single-frequency splicing module is used to detect the continuity of the packet sequence numbers of the data packets in the data packet stream sequence starting from the first data packet of the starting frequency point. If the packet sequence numbers are not continuous, the single-frequency splicing module is reset and the frame frequency synchronization module is jumped to execute;
[0041] If the packet numbers are continuous, all the data packets corresponding to each frequency point are found from the data packet stream sequence, and then spliced and valid data are intercepted to obtain a single-frame frequency point spectrum;
[0042] The full-band splicing module is used to detect the legitimacy of the single-frame frequency spectrum. If the single-frame frequency spectrum is illegal, the frame frequency spectrum is discarded and the frame synchronization module is jumped to;
[0043] All legal single-frame frequency spectra are spliced together to obtain a complete spectrum of the full frequency band.
[0044] In some specific implementations, the host computer further includes: a control module, which is used to encapsulate the center frequency set required for full-band splicing into a control package and send it to the FPGA spectrum scanning module;
[0045] The FPGA spectrum scanning module is also used to parse the control packet to obtain a center frequency set, and control the RF receiver according to the center frequency set, collect and process spectrum data from the RF receiver, and encapsulate the spectrum data to obtain a spectrum data packet.
[0046] The present invention has the beneficial effects:
[0047] The present application separates the scanning and splicing of broadband spectrum. The FPGA is only responsible for the collection and processing of spectrum data, and the host computer performs spectrum splicing and fault-tolerant processing. In this way, the FPGA only performs fast collection and processing of spectrum data, and the splicing process is placed in the host computer, saving FPGA hardware resources.
[0048] In order to avoid possible transmission errors that may occur during the transmission process of FPGA uploading spectrum data to the host computer, thereby causing spectrum jitter, the host computer software performs packet continuity detection on all data packets corresponding to each frequency point and legitimacy detection on single-frame frequency point spectra corresponding to all frequencies when splicing spectrum data. If the detection fails, a reset process is performed to re-start detection and splicing from the first data packet of the starting frequency point. Through two reset processes, the problem of spectrum jitter caused by data transmission errors caused by uncertain factors can be solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A flow chart of a broadband spectrum scanning and splicing method provided by an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of a data packet flow sequence provided by an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of all spectrum data packets at the same frequency point provided by an embodiment of the present invention;
[0052] Figure 4 A schematic diagram of a single-frame spliced spectrum provided by an embodiment of the present invention;
[0053] Figure 5 A schematic diagram of a single-frame frequency spectrum provided by an embodiment of the present invention;
[0054] Figure 6 A schematic diagram of a complete spectrum of all frequencies provided by an embodiment of the present invention;
[0055] Figure 7 A schematic diagram of the connection of a broadband spectrum scanning and splicing system provided by an embodiment of the present invention;
[0056] Figure 8 The embodiment of the present invention provides Figure 7 System module interaction diagram of the system. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0059] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0060] Additionally, descriptions of well-known structures, functions, and configurations may be omitted for clarity and conciseness.One of ordinary skill in the art will recognize that various changes and modifications may be made to the examples described herein without departing from the spirit and scope of the present disclosure.
[0061] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0062] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0063] Example 1
[0064] like Figure 1-Figure 8 As shown, this embodiment provides a broadband spectrum scanning and splicing method, and the host computer software performs the following steps:
[0065] S1, receiving the spectrum data packets uploaded by the FPGA spectrum scanning module in sequence and storing them in the data packet stream sequence;
[0066] Specifically, the spectrum scanning working process is as follows:
[0067] S11. The host computer software generates a center frequency set according to the center frequency and SPAN (bandwidth), and then encapsulates the center frequency set required for full-band splicing into a control package and sends the control package PKG_CTL to the FPGA spectrum scanning module through the data transmission bus between the FPGA spectrum scanning module and the host computer; when encapsulating the control package, each center frequency corresponds to a control package, that is, when it is sent to the FPGA spectrum scanning module, a control package set consisting of N control packages corresponding to the center frequency set is sent to the FPGA spectrum scanning module, and then parsed by it.
[0068] As shown in Table 1, the packet structure of the control packet includes: a Centerfreq field, which is used to configure the center frequency of the RF receiver; a ReceiverMode field, which is used to configure the working mode of the RF receiver to control the gain of the RF receiver; a VailidLen field, which is used to define the effective length under the current center frequency and bandwidth; and a lastfreq field, which is used to mark whether the frequency point is the end frequency.
[0069] Table 1 Package structure of control package PKG_CTRL
[0070]
[0071] As can be seen from Table 1, the contents after the 6th byte of the packet structure PKG_CTRL of the control packet (VailidLen, Revert, lastfreq and Reserve fields) are fields used by the software. In order to achieve asynchronous splicing without relying on request information during splicing and to meet the needs of multiple devices running on the same host computer, the FPGA returns these field data to the software as is, and the software uses its own saved field parameters to achieve asynchronous splicing.
[0072] S12. Receive a spectrum data packet uploaded by the FPGA spectrum scanning module. The spectrum data packet is: the FPGA spectrum scanning module parses the control packet to obtain a center frequency set, controls the RF receiver according to the center frequency set, collects and processes spectrum data from the RF receiver, and encapsulates the spectrum data to obtain a spectrum data packet.
[0073] As shown in Table 2, the packet structure of the spectrum data packet includes: the lastflag field, which is used to mark whether the current spectrum data packet is the end of the packet; the framenumber field, which is used to mark the packet sequence number of the current spectrum data packet; the bwidx field, which is used to indicate the bandwidth of the current spectrum data packet; the Freq field, which indicates the center frequency of the current spectrum data packet; the valid data length field, the VailidLen field, which is used to define the valid length under the current center frequency and bandwidth; the lastfreq field, which is used to mark whether the center frequency of the current spectrum data packet is the end frequency; the Data field, which is used to store the spectrum data of the current spectrum data packet. The chn, datasize, lastflag, framenumber, Freq, VailidLen, Revert, and lastfreq fields are filled with corresponding data during encapsulation.
[0074] Table 2 Packet structure of spectrum data packet PKG_RETURN
[0075]
[0076] It can be seen that the VailidLen, Revert, lastfreq and Reserve fields are parameters sent by the software and are returned to the host computer software as is in the spectrum data packet structure. The entire spectrum data packet is 2048 bytes long, including 48 bytes for the header and 2000 bytes for the data.
[0077] Specifically, in combination with Table 1 and Table 2, the specific process of obtaining the spectrum data packet in step S12 is:
[0078] S121, the FPGA spectrum scanning module parses the control packet, obtains a center frequency set, and controls the RF receiver in sequence according to the center frequency set;
[0079] S122, each time a center frequency of the RF receiver is controlled, wait for the lock indication signal output of the RF receiver; in order to avoid the output signal and the lock indication signal output being out of sync, the waiting time can be set to a delay of 10~20us to ensure that a stable output signal is collected;
[0080] S123, when receiving the lock indication signal output, start collecting the output signal, and perform ADC conversion on the collected output signal to obtain ADC data;
[0081] S124, performing digital down-conversion, extraction filtering, and fast Fourier transform processing on the ADC data in sequence to obtain a spectrum data stream, encapsulating the spectrum data stream into multiple spectrum data packets according to the packet structure PKG_RETURN of the spectrum data packet and uploading them to the upper computer software through the data transmission bus.
[0082] The spectrum splicing process is as follows:
[0083] S2, using a frame frequency synchronization algorithm to find the first data packet corresponding to the starting frequency point from the data packet stream sequence;
[0084] Specifically, the frame synchronization algorithm is: parse the received spectrum data packets in sequence, and traverse the Freq field of each spectrum data packet in the data packet stream sequence;
[0085] Find the spectrum data packets whose Freq field jumps from the maximum frequency to the minimum frequency from the data packet stream sequence, and take the first data packet corresponding to the minimum frequency as the first data packet of the starting frequency point.
[0086] The maximum frequency may be understood as the center frequency value of the center frequency field corresponding to the data packet whose field value in the end frequency field is the end frequency.
[0087] S3, starting from the first data packet, the data packets in the data packet stream sequence are tested for packet sequence number continuity, and if the packet sequence numbers are not continuous, step S2 is executed;
[0088] If the packet numbers are continuous, all the data packets corresponding to each frequency point are found from the data packet stream sequence, and then spliced and valid data are intercepted to obtain a single-frame frequency point spectrum;
[0089] The specific process of step S3 is:
[0090] S31, traverse the lastflag field and the Freq field of each spectrum data packet in the data packet stream sequence to find all spectrum data packets at the same frequency point;
[0091] S32, traversing the framenumber fields of all spectrum data packets at the same frequency point, and detecting whether the packet numbers of all spectrum data packets at the same frequency point are continuous;
[0092] S33, if continuous, read spectrum data from the Data field of the spectrum data packet in the order of the packet sequence number, splice the read spectrum data in sequence to obtain single-frame spliced spectrum data, copy the single-frame spliced spectrum data to the PKG_ONE_FFT package, intercept the valid data of the single-frame spliced spectrum data to obtain a single-frame frequency point spectrum, and store the single-frame frequency point spectrum in the PKG_CUT_FFT package; the PKG_ONE_FFT package has the same structure as the PKG_CUT_FFT package;
[0093] S34: If not continuous, discard all the obtained data packets of the single-frame frequency spectrum, and jump to step S2.
[0094] As shown in Table 3, after the software assembles a frame of spectrum, the packet structure of the single-frame spectrum data is PKG_CUT_FFT. This structure is a variable-length data packet, and the packet length Fftsize will change dynamically according to user adjustment.
[0095] Table 3 PKG_ONE_FFT packet structure
[0096]
[0097] S4, performing a legality check on the single-frame frequency spectrum. If the single-frame frequency spectrum is illegal, discard the frame frequency spectrum and jump to step S2;
[0098] The specific process of step S4 is:
[0099] S41, determining whether the frequency points corresponding to the current single-frame frequency point spectrum are in the center frequency set and whether the arrangement order of the frequency points corresponding to the current single-frame frequency point spectrum and the frequency points of the previous single-frame frequency point spectrum are consistent with the order in the center frequency set;
[0100] S42, if they are consistent, then the single-frame frequency spectrum is judged to be legal, and the legality detection of the next single-frame frequency spectrum is continued;
[0101] S43: If they are inconsistent, it is determined that the single-frame frequency point spectrum is illegal, all single-frame frequency point spectrums are discarded, and the process jumps to step S2.
[0102] S5. All legal single-frame frequency spectra are spliced together to obtain a complete spectrum of the full frequency band.
[0103] Specifically, the single-frame frequency spectrum of each frame that has passed legal detection is written into the corresponding position of the user data packet PKG_USER_SPEC in sequence until the single-frame frequency spectrum is detected to be the last frequency point (obtained by detecting the lastflag field in the PKG_CUT_FFT package), the splicing of the entire frequency band is completed, and PKG_USER_SPEC is returned to the user for drawing.
[0104] Table 4 Software full-band data packet structure PKG_USER_SPEC
[0105]
[0106] It is understandable that if Figure 2As shown in the figure, the spectrum data packets PKG_RETURN uploaded by the FPGA spectrum scanning module are received in sequence in the data packet stream sequence. The header of each spectrum data packet PKG_RETURN is the data of the framenumber field, and the data is the content of the data field. It can also be seen that the spectrum data output at each center frequency will be encapsulated into multiple spectrum data packets. For example, the PKG_RETURN-Cetern1 spectrum data packet indicates that the spectrum data output at the same center frequency Cetern1 is encapsulated into multiple spectrum data packets, which are arranged in order of 01, 02, ..., and similarly, the six PKG_RETURN-Cetern6 frequency packets are encapsulated into multiple spectrum data packets. The spectrum data packet indicates that the spectrum data output under the same center frequency Cetern6 is encapsulated into six spectrum data packets, which are arranged in order of 01, ..., 06. The spectrum data packet of PKG_RETURN-Cetern5 indicates the spectrum data output under the same center frequency Cetern5. If the software starts to splice data from the beginning, the frame rate synchronization algorithm is performed on these data, and the first packet header of the starting frequency is found in the data stream (that is, the packet with the packet header of 01 in PKG_RETURN-Cetern1), and then all the spectrum data packets of the starting frequency are aggregated to obtain the six spectrum data packets of PKG_RETURN-Cetern1, such as Figure 3 As shown, then by reading the packet number field of the packet header, it is determined whether the packet numbers of the six spectrum data packets are continuous. If they are continuous, they are spliced into a complete single-frame spliced spectrum data PKG_ONE_FFT-Cetern1, as shown Figure 4 As shown, according to the effective length of the VailidLen field in PKG_RETURN-Cetern1, PKG_ONE_FFT-Cetern1 is intercepted to obtain a frame of frequency spectrum, and stored in the single frame frequency spectrum data packet PKG_CUT_FFT-Cetern1 package, such as Figure 5As shown; then the obtained single-frame PKG_CUT_FFT-Cetern1 package is checked for legitimacy. When it is in the center frequency set, the single-frame frequency spectrum data in the PKG_CUT_FFT-Cetern1 package is filled into the corresponding position of the PKG_USER_SPEC package, and the next frame frequency spectrum data packet PKG_CUT_FFT-Cetern2 is judged to be legal. The center frequency of PKG_CUT_FFT-Cetern2 is in the center frequency set and is consistent with the frequency of PKG_CUT_FFT-Cetern1. When the order of the points is consistent with that in the center frequency set, the single-frame frequency spectrum data in the PKG_CUT_FFT-Cetern2 package is filled into the corresponding position of the PKG_USER_SPEC package, and so on, until the single-frame frequency spectrum data packet PKG_CUT_FFT-Cetern6 package of the end frequency is detected, and the PKG_CUT_FFT-Cetern6 package is legal, then the PKG_CUT_FFT-Cetern1 package, ..., PKG_CUT_FFT-Cetern6 package are spliced to obtain the following Figure 6 The full-band complete spectrum is shown, and the full-band complete spectrum is encapsulated into the PKG_USER_SPEC package, and PKG_USER_SPEC is returned to the user for drawing.
[0107] Example 2
[0108] like Figure 7 As shown, this embodiment provides a broadband spectrum scanning and splicing system, including: Figure 7 As shown, this embodiment provides a broadband spectrum scanning and splicing system, including a radio frequency receiver, an ADC analog-to-digital converter, an FPGA spectrum scanning module and a host computer, wherein the radio frequency receiver and the FPGA spectrum scanning module are connected to each other through a control bus, the radio frequency receiver transmits the analog signal to the ADC analog-to-digital converter, the ADC analog-to-digital converter and the FPGA spectrum scanning module are connected to each other through a high-speed data transmission bus, and the FPGA spectrum scanning module and the host computer are connected to each other through a data transmission bus.
[0109] ADC analog-to-digital conversion, used to perform ADC analog-to-digital conversion processing on the spectrum data output by the RF receiver;
[0110] FPGA spectrum scanning module is used to quickly collect and process spectrum data after ADC analog-to-digital conversion, and encapsulate the processed spectrum data into spectrum data packets and upload them to the host computer;
[0111] The host computer includes:
[0112] The data packet receiving module is used to store the received spectrum data packets into the data packet stream sequence in sequence;
[0113] The frame frequency synchronization module uses the frame frequency synchronization algorithm to find the first data packet corresponding to the starting frequency point from the data packet stream sequence;
[0114] The single-frequency splicing module is used to detect the continuity of the packet sequence numbers of the data packets in the data packet stream sequence starting from the first data packet of the starting frequency point. If the packet sequence numbers are not continuous, the single-frequency splicing module is reset and the frame frequency synchronization module is jumped to execute;
[0115] If the packet numbers are continuous, all the data packets corresponding to each frequency point are found from the data packet stream sequence, and then spliced and valid data are intercepted to obtain a single-frame frequency point spectrum;
[0116] The full-band splicing module is used to detect the legitimacy of the single-frame frequency spectrum. If the single-frame frequency spectrum is illegal, the frame frequency spectrum is discarded and the frame synchronization module is jumped to;
[0117] All legal single-frame frequency spectra are spliced together to obtain a complete spectrum of the full frequency band.
[0118] In some specific implementations, the host computer further includes: a control module, which is used to encapsulate the center frequency set required for full-band splicing into a control package and send it to the FPGA spectrum scanning module;
[0119] The FPGA spectrum scanning module is also used to parse the control packet to obtain a center frequency set, and control the RF receiver according to the center frequency set, collect and process spectrum data from the RF receiver, and encapsulate the spectrum data to obtain a spectrum data packet.
[0120] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. According to the technical essence of the present invention, within the spirit and principles of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiment still falls within the protection scope of the technical solution of the present invention.
Claims
1. A broadband spectrum scanning and splicing method, characterized in that: The host computer performs the following steps: S1, receiving the spectrum data packets uploaded by the FPGA spectrum scanning module in sequence and storing them in the data packet stream sequence; S11, encapsulate the center frequency set required for full-band splicing into a control package and send it to the FPGA spectrum scanning module; S12, receiving a spectrum data packet uploaded by the FPGA spectrum scanning module, wherein the spectrum data packet is: the FPGA spectrum scanning module parses the control packet to obtain a center frequency set, controls the RF receiver according to the center frequency set, collects and processes spectrum data from the RF receiver, and encapsulates the spectrum data to obtain a spectrum data packet; S2, using a frame frequency synchronization algorithm to find the first data packet corresponding to the starting frequency point from the data packet stream sequence; The frame rate synchronization algorithm is: Parse the received spectrum data packets in sequence, and traverse the Freq field of each spectrum data packet in the data packet stream sequence; Find the spectrum data packet that jumps from the maximum frequency to the minimum frequency in the Freq field from the data packet stream sequence, and take the first data packet corresponding to the minimum frequency as the first data packet of the starting frequency point; the maximum frequency is the center frequency value of the center frequency field corresponding to the data packet whose field value in the end frequency field is the end frequency; S3, starting from the first data packet, the data packets in the data packet stream sequence are tested for packet sequence number continuity, and if the packet sequence numbers are not continuous, step S2 is executed; If the packet numbers are continuous, all the data packets corresponding to each frequency point are found from the data packet stream sequence, and then spliced and valid data are intercepted to obtain a single-frame frequency point spectrum; The specific process of step S3 is: S31, traverse the lastflag field and the Freq field of each spectrum data packet in the data packet stream sequence to find all spectrum data packets at the same frequency point; S32, traversing the framenumber fields of all spectrum data packets at the same frequency point, and detecting whether the packet numbers of all spectrum data packets at the same frequency point are continuous; S33, if continuous, read spectrum data from the Data field of the spectrum data packet in sequence according to the packet sequence number, splice the read spectrum data in sequence to obtain single-frame spliced spectrum data, and intercept valid data from the single-frame spliced spectrum data to obtain a single-frame frequency point spectrum; S34, if not continuous, discard all obtained single-frame frequency point spectra and jump to step S2; S4, performing a legality check on the frequency spectrum of a single frame. If the frequency spectrum of a single frame is illegal, the frequency spectrum of the frame is discarded and the process jumps to step S2; The specific process of step S4 is: S41, determining whether the frequency points corresponding to the current single-frame frequency point spectrum are in the center frequency set and whether the arrangement order of the frequency points corresponding to the current single-frame frequency point spectrum and the frequency points of the previous single-frame frequency point spectrum are consistent with the order in the center frequency set; S42, if they are consistent, then the single-frame frequency spectrum is judged to be legal, and the legality detection of the next single-frame frequency spectrum is continued; S43, if not consistent, then determine that the single-frame frequency point spectrum is illegal, discard all single-frame frequency point spectrum, and jump to step S2; S5. All legal single-frame frequency spectra are spliced together to obtain a complete spectrum of the full frequency band.
2. A broadband spectrum scanning and splicing method according to claim 1, characterized in that In step S11, the packet structure of the control packet includes: a Centerfreq field, which is used to configure the center frequency of the RF receiver; a ReceiverMode field, which is used to configure the working mode of the RF receiver to control the gain of the RF receiver; a VailidLen field, which is used to define the effective length under the current center frequency and bandwidth; and a lastfreq field, which is used to mark whether the frequency point is the end frequency.
3. A broadband spectrum scanning and splicing method according to claim 2, characterized in that , The packet structure of the spectrum data packet includes: the lastflag field, which is used to mark whether the current spectrum data packet is the end of the packet; the framenumber field, which is used to mark the packet sequence number of the current spectrum data packet; the bwidx field, which is used to indicate the bandwidth of the current spectrum data packet; the Freq field, which indicates the center frequency of the current spectrum data packet, the valid data length field, the VailidLen field, which is used to define the valid length under the current center frequency and bandwidth; the lastfreq field, which is used to mark whether the center frequency of the current spectrum data packet is the end frequency, and the Data field, which is used to store the spectrum data of the current spectrum data packet.
4. A broadband spectrum scanning and splicing method according to claim 2, characterized in that ,The specific process of obtaining the spectrum data packet in step S12 is: S121, the FPGA spectrum scanning module controls the radio frequency receiver in sequence according to the center frequency set; S122, each time controlling a center frequency of the radio frequency receiver, waiting for the output of a lock indication signal of the radio frequency receiver; S123, when receiving the lock indication signal output, start collecting the output signal, and perform ADC conversion on the collected output signal to obtain ADC data; S124, performing digital down-conversion, decimation filtering, and fast Fourier transform processing on the ADC data in sequence to obtain a spectrum data stream, and filling the spectrum data stream into the Data field of the spectrum data packet in sequence.
5. A broadband spectrum scanning and splicing system, using a broadband spectrum scanning and splicing method as claimed in claim 1, characterized in that: include: The FPGA spectrum scanning module is used to quickly collect and process the spectrum data output by the RF receiver, and encapsulate the processed spectrum data into spectrum data packets and upload them to the host computer; the FPGA spectrum scanning module is also used to parse the control packet to obtain the center frequency set, and control the RF receiver according to the center frequency set, collect the processed spectrum data from the RF receiver, and encapsulate the spectrum data to obtain the spectrum data packet frame frequency synchronization module, and use the frame frequency synchronization algorithm to find the first data packet corresponding to the starting frequency point from the data packet stream sequence; The host computer includes: The data packet receiving module is used to store the received spectrum data packets into the data packet stream sequence in sequence; The control module is used to encapsulate the center frequency set required for full-band splicing into a control package and send it to the FPGA spectrum scanning module; The single-frequency splicing module is used to detect the continuity of the packet sequence numbers of the data packets in the data packet stream sequence starting from the first data packet of the starting frequency point. If the packet sequence numbers are not continuous, the single-frequency splicing module is reset and the frame frequency synchronization module is jumped to execute; If the packet numbers are continuous, all the data packets corresponding to each frequency point are found from the data packet stream sequence, and then spliced and valid data are intercepted to obtain a single-frame frequency point spectrum; The full-band splicing module is used to detect the legitimacy of the single-frame frequency spectrum. If the single-frame frequency spectrum is illegal, the frame frequency spectrum is discarded and the frame synchronization module is jumped to; All legal single-frame frequency spectra are spliced together to obtain a complete spectrum of the full frequency band.
Citation Information
Patent Citations
Spectrum sensing method and system
CN103052095A
Wideband dual-channel radio monitoring and receiving system and method for detecting signal
CN113810072A