Method and device for estimating signal-to-noise ratio of spread spectrum signal based on main lobe and side lobe, and medium
By analyzing the spectrum main and side lobe energy distribution of the spread spectrum signal, combined with simulation, the ideal signal distribution is obtained, and the signal-to-noise ratio is accurately estimated, which solves the problem of large signal-to-noise ratio estimation error in the existing technology and improves signal transmission performance.
Patent Information
- Application Number
- CN202410861633.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing spread spectrum signal signal-to-noise ratio estimation method only uses the main lobe of the spectrum and ignores the side-lobe signal energy, resulting in a large error between the signal-to-noise ratio estimation result and the true value, which affects the data decoding and transmission performance of the receiving system.
By collecting spread spectrum signals, performing carrier product and low-pass filtering, converting to the frequency domain to obtain the amplitude, determining the bandwidth and position of the main side lobes of the spectrum, calculating the signal energy within the main side lobes, and combining simulation to obtain the ideal signal distribution, select high-frequency part as a noise signal, calculate the average energy and calculate the signal-to-noise ratio.
It accurately estimates the signal-to-noise ratio of spread spectrum signals, reduces noise interference, improves the accuracy and practicality of estimation, reduces errors, and is suitable for various signal-to-noise ratio conditions.
Smart Images

Figure CN118740289A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal processing, and in particular to a method, device and medium for estimating a signal-to-noise ratio of a spread spectrum signal based on a main side lobe. Background Art
[0002] The rapidly developing Internet of Things technology plays an important role in smart cities, agriculture, healthcare and other fields, bringing opportunities for innovation and development to all walks of life. Wireless Internet of Things devices are equipped with various sensors to provide various data to the core network. The signal-to-noise ratio determines the quality of data transmission and is the first parameter measured when the wireless signal reaches the receiving end. The receiving system decides whether to perform low-error decoding on the received signal based on the signal-to-noise ratio estimation result. Spread spectrum signals have become a favored modulation technology for wireless transmission due to their excellent anti-interference ability, but too low a signal-to-noise ratio will also significantly increase the bit error rate.
[0003] There are many methods for SNR estimation, but there are many problems with the SNR estimation methods for spread spectrum signals. Since spread spectrum signals distribute the energy of effective signals over a larger bandwidth, existing methods only use the main lobe of the spectrum and ignore the signal energy dispersed in other side lobes, resulting in a large error between the final SNR estimation result and the true value, which seriously affects the data decoding and transmission performance of the receiving system. Summary of the invention
[0004] The purpose of the present invention is to overcome the defect that the existing method for estimating the signal-to-noise ratio of a spread spectrum signal only utilizes the main lobe of the spectrum and ignores the signal energy diffused to other side lobes, and to provide a method, device and medium for estimating the signal-to-noise ratio of a spread spectrum signal based on the main side lobe in the prior art.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes comprises the following steps:
[0007] Collect the spread spectrum signal transmitted by the wireless device through the signal collector;
[0008] The collected spread spectrum signal is multiplied by the carrier signal and low-pass filtered to obtain a baseband received signal;
[0009] The baseband received signal is transformed into the frequency domain, and the amplitude of the frequency domain transformation result is taken to obtain the amplitude spectrum;
[0010] Determine the bandwidth of the main side lobe of the spectrum according to the modulation mode of the spread spectrum signal, determine the position of the main side lobe by a search algorithm, and calculate the signal energy in the main side lobe;
[0011] An ideal spread spectrum signal is obtained through simulation, and the signal energy distribution in the main side lobe is obtained through the ideal spread spectrum signal to determine the average energy of the effective signal;
[0012] Select a section from the high frequency part of the amplitude spectrum as a noise signal, and calculate the average energy of the noise signal;
[0013] The average energy of the effective signal is divided by the average energy of the noise signal, and the logarithm is taken to obtain a signal-to-noise ratio estimation result of the collected spread spectrum signal.
[0014] Furthermore, the transforming of the baseband received signal into the frequency domain is specifically: transforming the baseband received signal into the frequency domain by using Fourier transform.
[0015] Furthermore, the number of Fourier transform points of the Fourier transform is greater than or equal to the sampling rate, and the calculation expression of the Fourier transform is:
[0016] Y(k)=FFT(y(n),N F ), N F ≥f s
[0017] In the formula, y(n) represents the sampling rate f s The baseband spread spectrum signal obtained after sampling, down conversion and low-pass filtering, N F Indicates the number of points for Fourier transform, FFT(y(n), N F ) represents N operations on y(n) F The Fourier transform of point Y(k) is the complex result of transforming the baseband spread spectrum signal into the frequency domain.
[0018] Furthermore, the calculation expression corresponding to the amplitude spectrum obtained by taking the amplitude of the frequency domain transformation result is:
[0019] Y A (k) = abs(Y(k))
[0020] Where Y(k) is the complex result of transforming the baseband spread spectrum signal into the frequency domain, abs() means calculating the amplitude of all elements in the complex sequence to obtain the corresponding real sequence, and Y A (k) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain.
[0021] Furthermore, the search algorithm determines the position of the main side lobe in the amplitude spectrum according to the signal bandwidth search, and the corresponding calculation expression is:
[0022]
[0023] L B =N F ·B w / fs
[0024] I c ∈[-2L B -Δf·N F / f s , -2L B +Δf·N F / f s ]
[0025] In the formula, I d Indicates the starting position of the main side lobe, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, B w Represents the bandwidth of the spread spectrum signal, L B Indicates B w At frequency resolution f s / N F The corresponding number of points, N F is the number of Fourier transform points, f s is the sampling rate, I c It represents the search starting point of the main sidelobe position, and Δf represents the carrier frequency offset of the spread spectrum signal.
[0026] Furthermore, the calculation expression of the average energy of the effective signal is:
[0027]
[0028] In the formula, Represents the average energy ratio of the signal in the main lobe of the ideal spread spectrum signal, I d Indicates the starting position of the main side lobe, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, B w Represents the bandwidth of the spread spectrum signal, L B Indicates B w At frequency resolution f s / N F The corresponding number of points, N F is the number of Fourier transform points, f s is the sampling rate, represents the amplitude spectrum of an ideal spread spectrum signal, It represents the average signal energy in the main and side lobes of the actual received spread spectrum signal. Subscripts v1 and v4 are side lobes, and subscripts v2 and v3 are main lobes. Indicates the average energy of the effective signal.
[0029] Furthermore, the calculation expression of the average energy of the noise signal is:
[0030]
[0031] In the formula, is the average energy of the noise signal, L G Indicates the signal length of the selected high-frequency part, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, N F is the number of Fourier transform points.
[0032] Furthermore, the calculation expression of the signal-to-noise ratio estimation result is:
[0033]
[0034] In the formula, SNR is the signal-to-noise ratio estimation result, is the average energy of the effective signal, is the average energy of the noise signal.
[0035] The present invention provides a spread spectrum signal signal-to-noise ratio estimation device based on main side lobes, comprising a memory and a processor, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of the above method.
[0036] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the above method.
[0037] Compared with the prior art, the present invention has the following advantages:
[0038] The present invention determines the corresponding relationship between the main-sidelobe signal energy and the sidelobe signal energy in the actual spread spectrum signal amplitude spectrum by analyzing the energy distribution of the main-sidelobe signal in the ideal spread spectrum signal amplitude spectrum; the noise interference is effectively removed by subtracting the sidelobe signal energy from the main lobe signal energy, and the average energy estimation value of the pure effective signal is obtained. According to the spectrum characteristics of the spread spectrum signal, the signal far away from the main sidelobe position is selected as the noise signal to obtain the average energy estimation value of the noise that does not contain the effective signal. The signal-to-noise ratio estimated by the present invention is close to the signal-to-noise ratio of the simulation setting, the estimation error is small under various signal-to-noise ratio conditions, the accuracy is high, and it has strong practicality and innovation. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic flow chart of a method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes provided in an embodiment of the present invention;
[0040] Figure 2 An amplitude spectrum diagram of a ZigBee signal provided in an embodiment of the present invention;
[0041] Figure 3 A schematic diagram of main sidelobe positions in a ZigBee signal amplitude spectrum provided in an embodiment of the present invention;
[0042] Figure 4 A schematic diagram of noise position in a ZigBee signal amplitude spectrum provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0044] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. 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.
[0045] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0046] Example 1
[0047] like Figure 1 As shown, this embodiment provides a method for estimating the signal-to-noise ratio of a spread spectrum signal based on a main sidelobe, comprising the following steps:
[0048] S1: Collect the spread spectrum signal transmitted by the wireless device through the signal collector;
[0049] S2: multiply the collected spread spectrum signal by the carrier signal and low-pass filter to obtain the baseband received signal;
[0050] S3: transform the baseband received signal into the frequency domain, and take the amplitude of the frequency domain transformation result to obtain the amplitude spectrum;
[0051] S4: Determine the bandwidth of the main side lobe of the spectrum according to the modulation mode of the spread spectrum signal, determine the position of the main side lobe through a search algorithm, and calculate the signal energy in the main side lobe;
[0052] S5: obtaining an ideal spread spectrum signal through simulation, obtaining the signal energy distribution in the main side lobe through the ideal spread spectrum signal, and determining the average energy of the effective signal;
[0053] S6: Select a section from the high frequency part of the amplitude spectrum as a noise signal, and calculate the average energy of the noise signal;
[0054] S7: Divide the average energy of the effective signal by the average energy of the noise signal, and take the logarithm to obtain a signal-to-noise ratio estimation result of the collected spread spectrum signal.
[0055] Specifically, in step S3, the baseband received signal is transformed into the frequency domain, specifically: the baseband received signal is transformed into the frequency domain by using Fourier transform.
[0056] The number of Fourier transform points of Fourier transform is greater than or equal to the sampling rate. The calculation expression of Fourier transform is:
[0057] Y(k)=FFT(y(n),N F ), N F ≥f s
[0058] In the formula, y(n) represents the sampling rate f s The baseband spread spectrum signal obtained after sampling, down conversion and low-pass filtering, N F Indicates the number of points for Fourier transform, FFT(y(n), N F ) represents N operations on y(n) F The Fourier transform of point Y(k) is the complex result of transforming the baseband spread spectrum signal into the frequency domain.
[0059] In step S3, the amplitude of the frequency domain transformation result is taken to obtain the calculation expression corresponding to the amplitude spectrum:
[0060] Y A (k) = abs(Y(k))
[0061] Where Y(k) is the complex result of transforming the baseband spread spectrum signal into the frequency domain, abs() means calculating the amplitude of all elements in the complex sequence to obtain the corresponding real sequence, and Y A (k) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain.
[0062] In step S4, the search algorithm determines the position of the main side lobe in the amplitude spectrum according to the signal bandwidth search, and the corresponding calculation expression is:
[0063]
[0064] L B =N F ·B w / f s
[0065] I c ∈[-2L B -Δf·N F / f s , -2L B +Δf·N F / fs ]
[0066] In the formula, I d Indicates the starting position of the main side lobe, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, B w Represents the bandwidth of the spread spectrum signal, L B Indicates B w At frequency resolution f s / N F The corresponding number of points, N F is the number of Fourier transform points, f s is the sampling rate, I c It represents the search starting point of the main sidelobe position, and Δf represents the carrier frequency offset of the spread spectrum signal.
[0067] In step S5, the calculation expression of the average energy of the effective signal is:
[0068]
[0069] In the formula, Represents the average energy ratio of the signal in the main lobe of the ideal spread spectrum signal, I d Indicates the starting position of the main side lobe, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, B w Represents the bandwidth of the spread spectrum signal, L B Indicates B w At frequency resolution f s / N F The corresponding number of points, N F is the number of Fourier transform points, f s is the sampling rate, represents the amplitude spectrum of an ideal spread spectrum signal, It represents the average signal energy in the main and side lobes of the actual received spread spectrum signal. Subscripts v1 and v4 are side lobes, and subscripts v2 and v3 are main lobes. Indicates the average energy of the effective signal.
[0070] In step S6, the calculation expression of the average energy of the noise signal is:
[0071]
[0072] In the formula, is the average energy of the noise signal, L G Indicates the signal length of the selected high-frequency part, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, N F is the number of Fourier transform points.
[0073] In step S7, the calculation expression of the signal-to-noise ratio estimation result is:
[0074]
[0075] In the formula, SNR is the signal-to-noise ratio estimation result, is the average energy of the effective signal, is the average energy of the noise signal.
[0076] According to the following Figure 1 The process shown takes ZigBee signal as an example to further describe the method of this embodiment.
[0077] (1) Collect the signal sent by the ZigBee device to obtain the baseband spread spectrum signal.
[0078] This embodiment uses a ZigBee wireless device equipped with a CC2530 chip, and the physical layer uses the IEEE802.15.4 protocol, namely direct sequence spread spectrum modulation. The complete signal frame sent by ZigBee is received by USRP N210 at a sampling rate of 10M, and the ZigBee baseband spread spectrum signal is obtained after down-conversion and low-pass filtering.
[0079] (2) Fourier transform to obtain the amplitude spectrum.
[0080] The ZigBee baseband spread spectrum signal is transformed into the frequency domain using Fourier transform, and the amplitude of the complex transformation result is taken to obtain the amplitude spectrum of the ZigBee baseband signal, such as Figure 2 shown.
[0081] (3) Determine the main lobe position.
[0082] According to the ZigBee protocol, the bandwidth of the signal lobe is 500kHz. Due to the existence of carrier frequency deviation, the amplitude spectrum is shifted left and right. According to the minimum amplitude value between each signal lobe, the position of the main side lobe is determined by the search algorithm, such as Figure 3 shown.
[0083] (4) Calculate the average energy of the effective signal based on the main lobe and side lobe energy distribution of the ideal signal.
[0084] Since the signal energy distribution ratio between the main lobe and side lobe of the spread spectrum signal is relatively fixed, the energy distribution of the noise signal on each main lobe and side lobe is relatively similar. The accurate effective signal average energy estimation value can be obtained by subtracting the side lobe energy from the main lobe energy and dividing it by the corresponding ratio difference.
[0085] (5) Select the high-frequency part to calculate the average energy of the noise signal.
[0086] Since the spread spectrum signal is modulated by the spread spectrum code, the spread spectrum code acts like a sampling function. The effective signal energy contained in the position far away from the main side lobe is the least, that is, the energy of the effective signal is concentrated in the low-frequency part. Therefore, the high-frequency part contains almost no effective signal energy. A section is intercepted as the noise signal, and the average energy of the noise signal is calculated, such as Figure 4 shown.
[0087] (6) Calculate the signal-to-noise ratio estimation result of the ZigBee signal frame.
[0088] Finally, the signal-to-noise ratio estimation value of the actually received ZigBee signal frame is calculated through the definition formula of the signal-to-noise ratio.
[0089] Example 2
[0090] This embodiment provides a spread spectrum signal signal-to-noise ratio estimation device based on main side lobes, comprising a memory and a processor, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of the spread spectrum signal signal-to-noise ratio estimation method based on main side lobes as described above.
[0091] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor to perform the above method for estimating the signal-to-noise ratio of a spread spectrum signal based on a main side lobe.
[0092] The computer program code for implementing the method of the present invention may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0093] In the context of the present invention, a machine-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0094] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes. It is characterized in that The following steps are involved: Collect the spread spectrum signal transmitted by the wireless device through the signal collector; The collected spread spectrum signal is multiplied by the carrier signal and low-pass filtered to obtain a baseband received signal; The baseband received signal is transformed into the frequency domain, and the amplitude of the frequency domain transformation result is taken to obtain the amplitude spectrum; Determine the bandwidth of the main side lobe of the spectrum according to the modulation mode of the spread spectrum signal, determine the position of the main side lobe by a search algorithm, and calculate the signal energy in the main side lobe; An ideal spread spectrum signal is obtained through simulation, and the signal energy distribution in the main side lobe is obtained through the ideal spread spectrum signal to determine the average energy of the effective signal; Select a section from the high frequency part of the amplitude spectrum as a noise signal, and calculate the average energy of the noise signal; The average energy of the effective signal is divided by the average energy of the noise signal, and the logarithm is taken to obtain a signal-to-noise ratio estimation result of the collected spread spectrum signal.
2. The method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes according to claim 1, It is characterized in that The transforming of the baseband received signal into the frequency domain specifically includes: transforming the baseband received signal into the frequency domain by using Fourier transform.
3. The method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes according to claim 2, It is characterized in that The number of Fourier transform points of the Fourier transform is greater than or equal to the sampling rate, and the calculation expression of the Fourier transform is: Y(k)=FFT(y(n),N F ),N F ≥f s In the formula, y(n) represents the sampling rate f s The baseband spread spectrum signal obtained after sampling, down conversion and low-pass filtering, N F Indicates the number of points for Fourier transform, FFT(y(n), N F ) represents N operations on y(n) F The Fourier transform of point Y(k) is the complex result of transforming the baseband spread spectrum signal into the frequency domain.
4. The method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes according to claim 1, It is characterized in that The calculation expression corresponding to the amplitude spectrum obtained by taking the amplitude of the frequency domain transformation result is: Y A (k)=abs(Y(k)) Where Y(k) is the complex result of transforming the baseband spread spectrum signal into the frequency domain, abs() means calculating the amplitude of all elements in the complex sequence to obtain the corresponding real sequence, and Y A (k) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain.
5. The method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes according to claim 1, It is characterized in that The search algorithm determines the position of the main side lobe in the amplitude spectrum according to the signal bandwidth search, and the corresponding calculation expression is: L B =N F ·B w / f s I c ∈[-2L B -Δf·N F / f s ,-2L B +Δf·N F / f s ] In the formula, I d Indicates the starting position of the main side lobe, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, B w Represents the bandwidth of the spread spectrum signal, L B Indicates B w At frequency resolution f s / N F The corresponding number of points, N F is the number of Fourier transform points, f s is the sampling rate, I c It represents the search starting point of the main sidelobe position, and Δf represents the carrier frequency offset of the spread spectrum signal.
6. The method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes according to claim 1, It is characterized in that The calculation expression of the average energy of the effective signal is: In the formula, Represents the average energy ratio of the signal in the main lobe of the ideal spread spectrum signal, I d Indicates the starting position of the main side lobe, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, B w Represents the bandwidth of the spread spectrum signal, L B Indicates B w At frequency resolution f s / N F The corresponding number of points, N F is the number of Fourier transform points, f s is the sampling rate, represents the amplitude spectrum of an ideal spread spectrum signal, It represents the average energy of the signal in the main side lobe of the actual received spread spectrum signal. The subscript v 1 and v 4 is the side lobe, subscript v 2 and v 3 For the main lobe, Indicates the average energy of the effective signal.
7. The method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes according to claim 1, It is characterized in that The calculation expression of the average energy of the noise signal is: In the formula, is the average energy of the noise signal, L G Indicates the signal length of the selected high-frequency part, Y A (*) is the amplitude spectrum obtained by taking the amplitude of the complex result in the frequency domain, N F is the number of Fourier transform points.
8. The method for estimating the signal-to-noise ratio of a spread spectrum signal based on main side lobes according to claim 1, It is characterized in that The calculation expression of the signal-to-noise ratio estimation result is: In the formula, SNR is the signal-to-noise ratio estimation result, is the average energy of the effective signal, is the average energy of the noise signal.
9. A spread spectrum signal signal-to-noise ratio estimation device based on main side lobes, It is characterized in that The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of any one of the methods according to claims 1 to 8.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and the computer program is used by a processor to execute the method according to any one of claims 1 to 8.
