CN114448529A - Wi-Fi channel detection system and method - Google Patents

Wi-Fi channel detection system and method Download PDF

Info

Publication number
CN114448529A
CN114448529A CN202210148125.3A CN202210148125A CN114448529A CN 114448529 A CN114448529 A CN 114448529A CN 202210148125 A CN202210148125 A CN 202210148125A CN 114448529 A CN114448529 A CN 114448529A
Authority
CN
China
Prior art keywords
channel
signal
frequency
sampling
channels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210148125.3A
Other languages
Chinese (zh)
Inventor
崔洪玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shimin Technology Co ltd
Original Assignee
Shimin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shimin Technology Co ltd filed Critical Shimin Technology Co ltd
Priority to CN202210148125.3A priority Critical patent/CN114448529A/en
Publication of CN114448529A publication Critical patent/CN114448529A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/382Monitoring; Testing of propagation channels for resource allocation, admission control or handover

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

The invention provides a Wi-Fi channel detection system and a method, wherein the system comprises: the phase-locked loop circuit outputs at least one local oscillator signal with set frequency in a time-sharing manner under the control of the microcontroller; the mixer circuit mixes the local oscillator signal with the input Wi-Fi signal to obtain an intermediate frequency signal; the low-pass filter filters the intermediate frequency signal; the microcontroller is provided with an A/D converter which samples the filtered intermediate frequency signal; and the microcontroller determines a Wi-Fi channel occupied by the Wi-Fi signal according to the AD sampling result corresponding to different phase-locked loop frequency settings. Thus, the ultrahigh frequency and ultrahigh frequency signals of the Wi-Fi signals are subjected to down-conversion through the mixer circuit to obtain intermediate frequency signals, and then sampling and identification are carried out; this greatly reduces the sampling rate of the a/D converter and the computational power requirements of the microcontroller; reliable performance and low cost.

Description

Wi-Fi channel detection system and method
Technical Field
The invention relates to the technical field of wireless communication, in particular to a Wi-Fi channel detection system and a Wi-Fi channel detection method.
Background
The Wi-Fi-based visible light communication technology (VLC) needs to down-convert ultrahigh frequency or ultrahigh frequency Wi-Fi signals of a frequency band of 2.4GHz to 5GHz to a high frequency range in an LED response frequency, and visible light is used as a signal transmission medium for communication. Since the bandwidth of the LEDs is very limited and relatively fixed, there is a need to accurately detect the Wi-Fi channel before down-conversion.
However, the existing Wi-Fi channel detection is to perform spectrum analysis after sampling Wi-Fi signals directly by the nyquist criterion, which is very strict on the sampling rate of an a/D converter and the computational power of a processor.
Disclosure of Invention
The invention solves the problem that the existing Wi-Fi channel detection has high requirements on sampling rate and computing resources.
To solve the above problems, the present invention provides a Wi-Fi channel detection system, which includes:
the phase-locked loop circuit outputs at least one local oscillator signal with set frequency in a time-sharing manner under the control of the microcontroller; the mixer circuit mixes the local oscillator signal with an input Wi-Fi signal to obtain an intermediate frequency signal; the low-pass filter filters the intermediate frequency signal; the microcontroller is provided with an A/D converter which samples the filtered intermediate frequency signal; and the microcontroller determines a Wi-Fi channel occupied by the Wi-Fi signal according to the AD sampling result corresponding to different phase-locked loop frequency settings.
Therefore, ultrahigh frequency and ultrahigh frequency signals of the Wi-Fi signals are down-converted into intermediate frequency signals through the mixer circuit, and then sampling and identification are carried out, so that the requirements on the sampling rate of the A/D converter and the calculation force of the microcontroller are greatly reduced; reliable performance and low cost.
Preferably, the system further comprises:
the input end of the radio frequency single-pole double-throw switch is connected with the mixer circuit, one output end of the radio frequency single-pole double-throw switch is connected with the low-pass filter, and the other output end of the radio frequency single-pole double-throw switch is used as the output end of a system; and the microcontroller controls the radio frequency single-pole double-throw switch to conduct the frequency mixer circuit and the low-pass filter when a Wi-Fi channel is detected, and conducts the frequency mixer circuit and the output end of the system after the Wi-Fi channel occupied by the Wi-Fi signal is determined.
Preferably, the microcontroller controls the local oscillator signal frequency output by the phase-locked loop circuit through a three-wire serial interface.
Secondly, a Wi-Fi channel detection method based on the Wi-Fi channel detection system is provided, which comprises the following steps:
the method comprises the steps that a microcontroller acquires the center frequency of an available Wi-Fi channel;
the microcontroller controls a local oscillation signal output by the phase-locked loop circuit, so that the frequency of the local oscillation signal is the same as the central frequency;
the microcontroller reads an AD sampling result which is output by the A/D converter and corresponds to the central frequency;
the microcontroller controls a phase-locked loop to traverse and output local oscillator signals of the center frequency of all the available Wi-Fi channels, and a corresponding AD sampling result is obtained;
and determining the occupied Wi-Fi channels according to the AD sampling results corresponding to all the available Wi-Fi channels.
Thus, ultrahigh frequency and ultrahigh frequency signals of the Wi-Fi signals are down-converted into intermediate frequency signals, and then sampling and identification are carried out; this greatly reduces the requirements on sampling rate and computational power; reliable performance and low cost.
Preferably, the microcontroller controls the radio frequency single-pole double-throw switch to conduct the mixer circuit and the low-pass filter when the Wi-Fi channel is detected; and after the Wi-Fi channel occupied by the Wi-Fi signal is determined, the output ends of the mixer circuit and the system are conducted.
Preferably, the AD sampling frequency and the sampling duration of the AD sampling result corresponding to each of the available Wi-Fi channels are the same.
Preferably, determining the occupied Wi-Fi channel according to the AD sampling results corresponding to all the available Wi-Fi channels includes:
determining a signal fluctuation degree coefficient according to the AD sampling result;
sequencing the fluctuation degree coefficients of the available Wi-Fi channels according to the frequency band range of the available Wi-Fi channels;
carrying out binarization on the sorted fluctuation degree coefficients according to the average value of the fluctuation degree coefficients to obtain a binarization sequence of the fluctuation degree coefficients;
and determining the occupied Wi-Fi channel according to the binarization sequence of the fluctuation degree coefficient.
Preferably, determining a signal fluctuation degree coefficient according to the AD sampling result includes:
acquiring a first threshold value;
and calculating the fluctuation degree coefficient according to the first threshold and the AD sampling result.
Preferably, the calculation formula of the fluctuation degree coefficient is:
Figure BDA0003509388980000031
wherein F is the coefficient of fluctuation degree, xk,xk+1And k is the sampling value in the AD sampling result, the serial number of the sampling value is k, and n is the total number of the sampling value.
Wherein the function δ:
Figure BDA0003509388980000032
the threshold is a first threshold, and the value of the first threshold is determined according to the actual situation or preset.
Preferably, determining the occupied Wi-Fi channel according to the binarization sequence of the fluctuation degree coefficient comprises:
acquiring binarization templates of all the available Wi-Fi channels;
and if the binarization sequence of the fluctuation degree coefficient is matched with the binarization template, determining that the Wi-Fi signal occupies the Wi-Fi channel corresponding to the binarization template.
Drawings
FIG. 1 is a schematic diagram of a Wi-Fi channel detection system according to an embodiment of the invention;
FIG. 2 is a flow chart of a Wi-Fi channel detection method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an example Wi-Fi channel distribution according to an embodiment of the invention;
FIG. 4 is a flowchart of a Wi-Fi channel detection method S500 according to an embodiment of the invention;
FIG. 5 is a signal fluctuation distribution histogram according to an embodiment of the present invention;
FIG. 6 is a binarization sequence diagram of an exemplary fluctuation degree coefficient according to an embodiment of the present invention;
FIG. 7 is a flowchart of a Wi-Fi channel detection method S510 according to an embodiment of the invention;
FIG. 8 is a flowchart of a Wi-Fi channel detection method S530 according to an embodiment of the invention;
fig. 9 is a binarization sequence diagram of the fluctuation degree coefficient of the channel 1 according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
The Wi-Fi-based visible light communication technology carries out down-conversion on ultrahigh frequency or ultrahigh frequency Wi-Fi signals in a frequency band of 2.4GHz to 5GHz to a high frequency range in an LED response frequency, and visible light is used as a signal transmission medium for communication.
Therefore, when the intermediate frequency signals transmitted by the coaxial cable are recovered, the signals from the same wireless hotspot can be up-converted to different Wi-Fi channels, so that the interference caused by channel congestion is avoided, and the communication quality is improved.
However, since the bandwidth of the LED is very limited and relatively fixed, the occupied Wi-Fi channel needs to be accurately determined before down-conversion is performed, otherwise, once the Wi-Fi channel is inaccurate, the occupied Wi-Fi channel cannot fall into the response frequency of the LED after down-conversion.
However, in the existing Wi-Fi channel detection, the Wi-Fi signal is usually directly sampled by the nyquist criterion and then subjected to frequency spectrum analysis, so that the requirements on the sampling rate of an A/D converter and the computational power of a processor are very strict; to meet such a requirement means that expensive a/D converters and processors are used, which causes great inconvenience.
The embodiment of the application provides a Wi-Fi channel detection system which is used for detecting a Wi-Fi channel occupied by a Wi-Fi signal. Fig. 1 is a schematic structural diagram of a Wi-Fi channel detection system according to an embodiment of the present invention; wherein, the Wi-Fi channel detection system comprises:
the phase-locked loop circuit comprises a phase-locked loop circuit 1, a mixer circuit 2, a low-pass filter 3 and a microcontroller 4, wherein the phase-locked loop circuit 1 outputs at least one local oscillator signal with a set frequency in a time-sharing manner under the control of the microcontroller 4; the frequency mixer circuit 2 mixes the local oscillation signal with the input Wi-Fi signal to obtain an intermediate frequency signal; the low-pass filter 3 filters the intermediate frequency signal; the microcontroller 4 is provided with an A/D converter 5, and the A/D converter 5 samples the filtered intermediate frequency signal; and the microcontroller 4 determines the Wi-Fi channel occupied by the Wi-Fi signal according to the AD sampling results corresponding to different set frequencies.
The Wi-Fi signal is accessed to the signal input end of the frequency mixer circuit, and the local oscillator signal generated by the phase-locked loop circuit is accessed to the local oscillator input end of the frequency mixer circuit. The output end of the low-pass filter is connected with an ADC (analog-to-digital converter) detection pin of the microcontroller.
Preferably, the ADC samples the output signal of the low-pass filter, processes the AD sampling result, and determines the Wi-Fi channel occupied in the current communication according to the code logic.
And the output of the low-pass filter is connected with an ADC pin of the microcontroller.
The microcontroller adopts STM32F103C8T6, and an ADC unit is integrated in the microcontroller, so that the ADC can be controlled by a timer and a DMA bus to realize high-speed and stable continuous sampling. Thus, the STM32F103C8T6 microcontroller can provide enough memory and computing power to process the sampled data.
Thus, the ultrahigh frequency and ultrahigh frequency signals of the Wi-Fi signals are down-converted into intermediate frequency signals through the mixer circuit, and then sampling and identification are carried out; this greatly reduces the sampling rate of the a/D converter and the computational power requirements of the microcontroller; reliable performance and low cost.
Preferably, as shown in fig. 1, the system further comprises: a radio frequency single-pole double-throw switch 6, the input end of which is connected with the mixer circuit 2, one output end of which is connected with the low-pass filter 3, and the other output end of which is used as the output end of the system; the microcontroller 4 controls the radio frequency single-pole double-throw switch to conduct the mixer circuit 2 and the low-pass filter 3 when a Wi-Fi channel is detected, and conducts the mixer circuit 2 and the output end of the system after the Wi-Fi channel occupied by the Wi-Fi signal is determined.
The input end of the radio frequency single-pole double-throw switch is connected with an intermediate frequency signal output by the mixer. The output of the radio frequency single-pole double-throw switch is divided into two paths, one path of output is used as the effective signal output of the whole channel detection circuit, and the other path of output is connected with the input end of the low-pass filter. The microcontroller controls the on-off of the radio frequency single-pole double-throw switch; the microcontroller controls the conducting direction of the radio frequency single-pole double-throw switch by changing the level of the enabling end of the radio frequency single-pole double-throw switch.
Therefore, when a Wi-Fi channel occupied by an input Wi-Fi signal needs to be detected, the intermediate frequency signal is input into a low-pass filter for filtering and subsequent processing, so that the occupied Wi-Fi channel is accurately detected; and directly outputting an intermediate frequency signal after the Wi-Fi channel is detected. Therefore, two mutually independent functions of Wi-Fi channel detection and intermediate frequency signal output can be realized through the switching of the radio frequency single-pole double-throw switch, and the use flexibility of the Wi-Fi channel detection system is greatly improved.
Therefore, the radio frequency single-pole double-throw switch can realize the isolation of the detection circuit and the effective signal path of the system, and reduce the influence of the detection circuit on the quality of the effective signal in a non-channel detection state.
Preferably, the microcontroller 4 controls the local oscillation signal frequency of the phase-locked loop circuit 1 through a three-wire serial interface.
Therefore, when the system enters a channel detection state, the microcontroller controls the radio frequency single-pole double-throw switch to conduct a signal path from the mixer circuit to the low-pass filter, in the channel detection process, the microcontroller controls and changes the output signal frequency of the phase-locked loop, the central frequency of all available Wi-Fi channels is traversed, and the AD sampling result is calculated and processed by the microcontroller to obtain a binary table for measuring the signal intensity of each channel. After sampling of each channel is completed, the microcontroller judges the Wi-Fi channel used in the current communication according to the code logic, if the judgment is successful, the microcontroller controls the phase-locked loop to output the working frequency of the corresponding channel, and if not, the microcontroller restores the working frequency before channel detection. After the channel detection process is finished, the microcontroller controls the radio frequency single-pole double-throw switch to be disconnected with the low-pass filter, and the system outputs an intermediate frequency signal corresponding to the Wi-Fi working channel.
The embodiment of the application provides a Wi-Fi channel detection system method, which is performed on the basis of the Wi-Fi channel detection system provided by the invention, and the Wi-Fi channel detection method is described in detail below.
As shown in fig. 2, a Wi-Fi channel detection method based on the Wi-Fi channel detection system includes:
s100, the microcontroller acquires the center frequency of the available Wi-Fi channel;
different open channels are reserved according to different protocol standards, and the open channels are available Wi-Fi channels; the center of the frequency of the channel is the frequency of the center position of the Wi-Fi channel.
The microcontroller stores the center frequency of the available Wi-Fi channel in advance and can directly acquire the center frequency when the center frequency needs to be used.
For example, Wi-Fi working under 802.11g protocol is used, channels opened and used in China are 1-13, and are uniformly distributed in a frequency band of 2412MHz-2472MHz, the center frequency of the channels is separated by 5MHz, and the frequency ranges covered by the channels are mutually overlapped. The specific distribution is shown in fig. 3.
S200, controlling a local oscillation signal output by a phase-locked loop circuit by a microcontroller to enable the frequency of the local oscillation signal to be the same as the central frequency;
i.e., the local oscillator signal that causes the phase-locked loop circuit to output the center frequency of the available Wi-Fi channel.
S300, reading an AD sampling result which is output by the A/D converter and corresponds to the central frequency by the microcontroller;
i.e., the local oscillator signal that causes the phase-locked loop circuit to output the center frequency of the available Wi-Fi channel. The AD sampling result is thus the AD sampling result for this available Wi-Fi channel/center frequency.
It should be noted that, in order to ensure sampling, the duration of the local oscillator signal of the center frequency output by the phase-locked loop circuit should be no less than the sampling duration.
S400, the microcontroller controls a phase-locked loop to traverse and output local oscillator signals of the center frequencies of all the available Wi-Fi channels, and corresponding AD sampling results are obtained;
namely, the steps S200-S300 are executed again, the center frequency of one available Wi-Fi channel is changed every time the steps S200-S300 are executed, and the AD sampling result of the available Wi-Fi channel is obtained; the loop is repeated until the AD sampling results of all the available Wi-Fi channels are obtained.
Taking Wi-Fi working under 802.11g protocol as an example, channels openly used in China are 1-13, that is, all 13 AD sampling results of Wi-Fi channels 1-13 are obtained.
And S500, determining the occupied Wi-Fi channels according to the AD sampling results corresponding to all the available Wi-Fi channels.
The signal strength of different Wi-Fi channels can be reflected through the AD sampling result, so that the Wi-Fi channel occupied by the Wi-Fi signal is determined.
For example, a Wi-Fi signal conforming to an 802.11g protocol has a channel bandwidth of 20MHz, and an intermediate frequency signal obtained by mixing the Wi-Fi signal with a local oscillator signal of the current channel center frequency contains a DC-10MHz frequency component. And inputting the obtained intermediate frequency signal into a low-pass filter, intercepting a low-frequency part, inputting the low-frequency part into an ADC (analog to digital converter), and detecting the amplitude of the signal. At the moment, the ADC performs sampling at a frequency meeting the sampling theorem to obtain an intensity sequence of the input signal within a period of time, and the microcontroller performs calculation processing on the sampling sequence. And repeating the steps, traversing all available Wi-Fi channels, and determining the number of the occupied channel in the current communication according to the signal intensity distribution.
Therefore, complete frequency spectrum information of Wi-Fi signals does not need to be acquired, and only the signal strength near the center frequency of each channel needs to be detected, so that the requirement on computing power is greatly reduced.
Therefore, ultrahigh frequency and ultrahigh frequency signals of the Wi-Fi signals are down-converted into intermediate frequency signals, and then sampling and identification are carried out; this greatly reduces the requirements on sampling rate and computational power; reliable performance and low cost.
Preferably, the microcontroller controls the radio frequency single-pole double-throw switch to conduct the mixer circuit and the low-pass filter when the Wi-Fi channel is detected; and after the Wi-Fi channel occupied by the Wi-Fi signal is determined, the output ends of the mixer circuit and the system are conducted.
Therefore, the isolation between the detection circuit and the effective signal path of the system can be realized, and the influence of the detection circuit on the quality of the effective signal in a non-channel detection state is reduced.
Preferably, the AD sampling frequency and the sampling duration of the AD sampling result corresponding to each of the available Wi-Fi channels are the same. Thus, a signal strength sequence with the same number of points can be obtained as the AD sampling result.
Preferably, as shown in fig. 4, S500, determining occupied Wi-Fi channels according to AD sampling results corresponding to all the available Wi-Fi channels includes:
s510, determining a signal fluctuation degree coefficient according to the AD sampling result;
wherein, the fluctuation degree coefficient is used for directly reflecting the intensity of the sampled signal; the larger the coefficient of fluctuation is, the larger the signal intensity is.
S520, binarizing the fluctuation degree coefficient according to the average value of the fluctuation degree coefficient to obtain a binarization sequence of the fluctuation degree coefficient;
due to the overlapping of different WiFi channels, signal fluctuations can also be detected at the center frequencies of the left and right adjacent channels of the channel currently occupied by the communication. Binarizing the sorted fluctuation degree coefficients according to the average value of the fluctuation degree coefficients, wherein if the fluctuation degree coefficients are larger than the average value of the fluctuation degree coefficients, the binarization is 1; smaller than the mean value of the coefficient of fluctuation degree, is binarized to 0.
The fluctuation degree coefficient is binarized, so that the fluctuation degree coefficient can be converted into a form that the size relation can be easily identified by a computer, and the identification and judgment are convenient.
Wherein, the obtained fluctuation degree coefficient is used for measuring the fluctuation condition of the signal in the channel in the sampling time. After the signal strength of all channels is evaluated, a histogram representing the fluctuation distribution of the signal is obtained as shown in fig. 5. And carrying out binarization on the histogram by taking the average value as a threshold value, and finally obtaining a binarization table for judging the strength of each channel signal as a binarization sequence of the fluctuation degree coefficient. As shown in fig. 6, the binarization sequence of the fluctuation degree coefficient is such that the channel fluctuation degree coefficient with the sequence number of 5/6/7 is binarized into 1 and the rest is 0.
S530, determining the occupied Wi-Fi channel according to the binarization sequence of the fluctuation degree coefficient.
If one available Wi-Fi channel is occupied, the adjacent available Wi-Fi channel also has strong signal strength, and based on this, if the binaryzation of several consecutive sequence numbers are all 1, the occupied Wi-Fi channel is likely to be one of the Wi-Fi channels. In this way, a determination can be made of the Wi-Fi channel that is occupied.
Thus, through sequencing and binarization, a binarization sequence of the fluctuation degree coefficient which is easy to identify can be obtained, so that the occupied Wi-Fi channel can be easily determined; simple, convenient and has low requirement on computing power.
In this way, in the sampling process, the sampling duration of each channel is set to be the same, and the sampling rate of the ADC is kept consistent. After sampling of each channel is finished, a signal intensity sequence with the same number of points is obtained. The absolute value of the difference of the sequence is calculated and then averaged, and the noise with the result smaller than a specific threshold value is filtered in the process of difference calculation so as to eliminate the influence of ADC noise.
Preferably, as shown in fig. 7, S510, determining a signal fluctuation degree coefficient according to the AD sampling result;
s511, acquiring a first threshold;
the first threshold may be determined experimentally or may be determined according to actual conditions. Or the determined Wi-Fi channel may be selected first, then a plurality of times of AD sampling results of the Wi-Fi channel are obtained, and the selection of the first threshold is comprehensively judged according to the plurality of times of AD sampling results, so that the value of the first threshold may maximize the number of times of obtaining an accurate result by final judgment.
S512, calculating the fluctuation degree coefficient according to the first threshold and the AD sampling result.
And filtering the noise of which the difference result is smaller than the first threshold value through the first threshold value so as to eliminate the influence of ADC noise.
Preferably, the calculation formula of the fluctuation degree coefficient is:
Figure BDA0003509388980000101
wherein F is the coefficient of fluctuation degree, xk,xk+1And k is the sampling value in the AD sampling result, the serial number of the sampling value is k, and n is the total number of the sampling value.
Therefore, the fluctuation degree coefficient can be directly calculated, and the size of the sampled signal intensity can be directly reflected through the parameter; the larger the coefficient of fluctuation is, the larger the signal intensity is.
Therein, a function δ is defined:
Figure BDA0003509388980000102
the threshold is a first threshold, and the value of the first threshold is determined according to the actual situation or preset.
By this function, noise whose result is less than a certain threshold can be filtered out to eliminate the effect of ADC noise.
Preferably, as shown in fig. 8, S530, determining an occupied Wi-Fi channel according to the binarization sequence of the fluctuation degree coefficient includes:
s531, acquiring binarization templates of all the available Wi-Fi channels;
for example, Wi-Fi working under 802.11g protocol is used, channels opened and used in China are 1-13, and are uniformly distributed in a frequency band of 2412MHz-2472MHz, the center frequency of the channels is separated by 5MHz, and the frequency ranges covered by the channels are mutually overlapped. The histogram obtained in the above detection manner will obtain signal fluctuations higher than the average value at the center frequency of the current communication channel and the center frequencies of the adjacent channels on both sides, except for channel 1 and channel 13. Taking channel 6 as an example, the result of binarizing the histogram in the normal case is shown in fig. 6. The binarization templates of the rest channels can be analogized in turn. Similarly, for the edge channels 1 and 13, taking channel 1 as an example, the result after histogram binarization (binarization template) is as shown in fig. 9.
It should be noted that, in the exemplary channels 1-13, the channel center frequencies are separated by 5MHz, so that the center frequency of the current communication channel and the center frequencies of adjacent channels on both sides may obtain a signal fluctuation degree coefficient higher than the average value, that is, three consecutive serial numbers in the binarization template are all 1 (two consecutive serial numbers of channels on both ends are all 1).
S532, if the binarization sequence of the fluctuation degree coefficient is matched with the binarization template, determining that the Wi-Fi signal occupies the Wi-Fi channel corresponding to the binarization template.
If the channel 6 in the example is the same as the binarization sequence of the fluctuation degree coefficient, the Wi-Fi channel is determined to be the channel 6.
It should be noted that matching the binarization sequence of the fluctuation degree coefficient with the binarization template is substantially to determine whether three consecutive serial numbers are all 1 (two consecutive serial numbers are all 1 for channels at both ends), and substantially to determine that three consecutive serial numbers are all 1 for matching (two consecutive serial numbers are all 1 for channels at both ends); thus, the binarized template of the channel corresponding to the middle sequence number of the consecutive three sequence numbers is matched.
Thus steps S531-S532, can also be described as: and judging whether the continuous three serial numbers of the binarization sequence of the fluctuation degree coefficient are all 1 (the two continuous serial numbers of the channel at the two ends are all 1) or not, if so, determining that the channel corresponding to the middle serial number (the top serial number of the two continuous serial numbers at the two ends) of the continuous three serial numbers is the occupied Wi-Fi channel.
Preferably, if the binarization sequence of the fluctuation degree coefficient is not matched with the binarization template, selecting a part of channels for sampling again; until the binarization sequence of the fluctuation degree coefficient is matched with a certain binarization template or the cycle number reaches a threshold value.
That is to say, if the condition that three consecutive serial numbers are all 1 (two consecutive serial numbers are both 1 in the channels at both ends) does not occur in the binarization sequence of the fluctuation degree coefficient, it is determined that an error occurs in the whole sampling process, and the available Wi-Fi channel with a possibly too large error is re-sampled and calculated and then is determined again; if not, the loop continues until the above condition is met or the number of loops reaches a threshold.
And if the circulation reaches the threshold value, judging that the hardware connection problem exists.
The selection standard of the resampled channel takes the 1-13 channel condition that three consecutive serial numbers are all 1 (the two consecutive serial numbers are all 1) as an example:
if only 1 channel detection result is above the average:
if the channel is channel 1, resampling channel 1 and channel 2; if the channel is channel 13, resampling channel 12 and channel 13; other channels, this and the channels on both sides will be resampled.
If there are two consecutive channel detections above the average:
if the two channels are channel 1 and channel 2 respectively, the currently occupied channel is channel 1; if the two channels are channels 12, 13, respectively, then the currently occupied channel is channel 13; the other channels, will resample the channels on both sides of these two consecutive channels.
If the detection results of 3 consecutive channels are higher than the average: and selecting an intermediate channel as a final result.
If the detection results of 4 consecutive channels are higher than the average: these 4 channels are resampled.
If there are 5 or more consecutive channel samples above the average: and judging that the hardware connection problem exists.
If the detection result contains a plurality of groups of continuous channels higher than the average value: the above strategies are adopted for each group of consecutive channels, respectively.
If the sampling round is repeated according to the rule, and still cannot be concluded, the sampling is repeated according to the rule on the basis of the latest sampling result, the nesting time is limited to n (n is a natural number larger than 2), and the parameter can be set inside the program. And if the upper limit value is exceeded, judging that the hardware connection problem exists and exiting the channel detection program.
By means of the resampling, the problem that the judgment result is influenced by overlarge errors can be solved, and therefore occupied Wi-Fi channels can be accurately judged.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the application are described in a relevant manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. Reference is made to the preceding description of the embodiments.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A Wi-Fi channel detection system, comprising:
the phase-locked loop circuit outputs at least one local oscillator signal with set frequency in a time-sharing manner under the control of the microcontroller; the mixer circuit mixes the local oscillator signal with an input Wi-Fi signal to obtain an intermediate frequency signal; the low-pass filter filters the intermediate frequency signal; the microcontroller is provided with an A/D converter which samples the filtered intermediate frequency signal; and the microcontroller determines a Wi-Fi channel occupied by the Wi-Fi signal according to the AD sampling result corresponding to different phase-locked loop frequency settings.
2. The Wi-Fi channel detection system of claim 1, further comprising:
the input end of the radio frequency single-pole double-throw switch is connected with the mixer circuit, one output end of the radio frequency single-pole double-throw switch is connected with the low-pass filter, and the other output end of the radio frequency single-pole double-throw switch is used as the output end of a system; and the microcontroller controls the radio frequency single-pole double-throw switch to conduct the frequency mixer circuit and the low-pass filter when a Wi-Fi channel is detected, and conducts the frequency mixer circuit and the output end of the system after the Wi-Fi channel occupied by the Wi-Fi signal is determined.
3. The Wi-Fi channel detection system of claim 1 or claim 2, wherein the microcontroller controls the local oscillator signal frequency output by the phase-locked loop circuit via a three-wire serial interface.
4. A Wi-Fi channel detection method based on the Wi-Fi channel detection system of any one of claims 1-3, comprising:
the method comprises the steps that a microcontroller acquires the center frequency of an available Wi-Fi channel;
the microcontroller controls a local oscillation signal output by the phase-locked loop circuit, so that the frequency of the local oscillation signal is the same as the central frequency;
the microcontroller reads an AD sampling result which is output by the A/D converter and corresponds to the central frequency;
the microcontroller controls a phase-locked loop to traverse and output local oscillator signals of the center frequency of all the available Wi-Fi channels, and a corresponding AD sampling result is obtained;
and determining the occupied Wi-Fi channels according to the AD sampling results corresponding to all the available Wi-Fi channels.
5. The Wi-Fi channel detection method of claim 4, wherein the microcontroller controls the rf single-pole double-throw switch to turn on the mixer circuit and the low-pass filter during Wi-Fi channel detection; and after the Wi-Fi channel occupied by the Wi-Fi signal is determined, the output ends of the mixer circuit and the system are conducted.
6. The Wi-Fi channel detection method of claim 4, wherein an AD sampling frequency and a sampling duration of the AD sampling result corresponding to each of the available Wi-Fi channels are the same.
7. The Wi-Fi channel detection method according to any one of claims 4-6, wherein the determining an occupied Wi-Fi channel based on AD sampling results corresponding to all of the available Wi-Fi channels comprises:
determining a signal fluctuation degree coefficient according to the AD sampling result;
sequencing the fluctuation degree coefficients of the available Wi-Fi channels according to the frequency band range of the available Wi-Fi channels;
carrying out binarization on the sorted fluctuation degree coefficients according to the average value of the fluctuation degree coefficients to obtain a binarization sequence of the fluctuation degree coefficients;
and determining the occupied Wi-Fi channel according to the binarization sequence of the fluctuation degree coefficient.
8. The Wi-Fi channel detection method of claim 7, wherein determining a signal fluctuation degree coefficient from the AD sampling result comprises:
acquiring a first threshold value;
and calculating the fluctuation degree coefficient according to the first threshold and the AD sampling result.
9. The Wi-Fi channel detection method of claim 8, wherein the fluctuation degree coefficient is calculated by:
Figure FDA0003509388970000021
wherein F is the coefficient of fluctuation degree, xk,xk+1And k is a serial number of the sampling value, and n is the total number of the sampling value in the AD sampling result.
10. The Wi-Fi channel detection method of claim 7, wherein determining an occupied Wi-Fi channel based on the binarization sequence of the fluctuation degree coefficient comprises:
acquiring binarization templates of all the available Wi-Fi channels;
and if the binarization sequence of the fluctuation degree coefficient is matched with the binarization template, determining that the Wi-Fi signal occupies the Wi-Fi channel corresponding to the binarization template.
CN202210148125.3A 2022-02-17 2022-02-17 Wi-Fi channel detection system and method Pending CN114448529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210148125.3A CN114448529A (en) 2022-02-17 2022-02-17 Wi-Fi channel detection system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210148125.3A CN114448529A (en) 2022-02-17 2022-02-17 Wi-Fi channel detection system and method

Publications (1)

Publication Number Publication Date
CN114448529A true CN114448529A (en) 2022-05-06

Family

ID=81373068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210148125.3A Pending CN114448529A (en) 2022-02-17 2022-02-17 Wi-Fi channel detection system and method

Country Status (1)

Country Link
CN (1) CN114448529A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000261512A (en) * 1999-01-05 2000-09-22 Matsushita Electric Ind Co Ltd Receiver and phase extract circuit
CN1905421A (en) * 2005-07-26 2007-01-31 中兴通讯股份有限公司 Power detecting method and apparatus of wireless communication system
CN1960201A (en) * 2005-09-01 2007-05-09 Atmel德国有限公司 Method and device for determining the occupation by a signal of an adjacent channel
TW200721751A (en) * 2005-10-28 2007-06-01 Silicon Lab Inc Performing blind scanning in a receiver
US20070149155A1 (en) * 2005-12-23 2007-06-28 Intermec Ip Corp. System and method for detecting narrow bandwidth signal content to determine channel occupancy
CN101299644A (en) * 2008-06-13 2008-11-05 深圳市远望谷信息技术股份有限公司 Antenna channel detection method based on six-port circuit
US20140105153A1 (en) * 2011-06-03 2014-04-17 Lg Electronics Inc. Data transmitting method using power detection, and device thereof
CN104969562A (en) * 2013-07-30 2015-10-07 罗德施瓦兹两合股份有限公司 Measurement apparatus and measurement method for determining an active channel
CN105208512A (en) * 2015-08-28 2015-12-30 深圳Tcl数字技术有限公司 Parameter setting method and device for establishing wireless connections
CN107395199A (en) * 2017-09-18 2017-11-24 江汉大学 A kind of phase-locked loop circuit
CN107919929A (en) * 2017-11-16 2018-04-17 宇龙计算机通信科技(深圳)有限公司 A kind of channel detection method and equipment based on wave beam
CN110996401A (en) * 2019-12-02 2020-04-10 锐捷网络股份有限公司 Method, device and equipment for determining idle channel
US20210136760A1 (en) * 2019-07-12 2021-05-06 Meteorcomm, Llc Wide Band Sensing of Transmissions in FDM Signals Containing Multi-Width Channels

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000261512A (en) * 1999-01-05 2000-09-22 Matsushita Electric Ind Co Ltd Receiver and phase extract circuit
CN1905421A (en) * 2005-07-26 2007-01-31 中兴通讯股份有限公司 Power detecting method and apparatus of wireless communication system
CN1960201A (en) * 2005-09-01 2007-05-09 Atmel德国有限公司 Method and device for determining the occupation by a signal of an adjacent channel
TW200721751A (en) * 2005-10-28 2007-06-01 Silicon Lab Inc Performing blind scanning in a receiver
US20070149155A1 (en) * 2005-12-23 2007-06-28 Intermec Ip Corp. System and method for detecting narrow bandwidth signal content to determine channel occupancy
CN101299644A (en) * 2008-06-13 2008-11-05 深圳市远望谷信息技术股份有限公司 Antenna channel detection method based on six-port circuit
US20140105153A1 (en) * 2011-06-03 2014-04-17 Lg Electronics Inc. Data transmitting method using power detection, and device thereof
CN104969562A (en) * 2013-07-30 2015-10-07 罗德施瓦兹两合股份有限公司 Measurement apparatus and measurement method for determining an active channel
CN105208512A (en) * 2015-08-28 2015-12-30 深圳Tcl数字技术有限公司 Parameter setting method and device for establishing wireless connections
CN107395199A (en) * 2017-09-18 2017-11-24 江汉大学 A kind of phase-locked loop circuit
CN107919929A (en) * 2017-11-16 2018-04-17 宇龙计算机通信科技(深圳)有限公司 A kind of channel detection method and equipment based on wave beam
US20210136760A1 (en) * 2019-07-12 2021-05-06 Meteorcomm, Llc Wide Band Sensing of Transmissions in FDM Signals Containing Multi-Width Channels
CN110996401A (en) * 2019-12-02 2020-04-10 锐捷网络股份有限公司 Method, device and equipment for determining idle channel

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YAJUN ZHAO; JUAN LIU; SAIJIN XIE: "Cubic metric reduction for repetitive CAZAC sequences in frequency domain", CHINA COMMUNICATIONS, 29 December 2021 (2021-12-29) *
张陶;: "一种基于微分法的峰值检测电路", 微电子学, no. 04, 20 August 2017 (2017-08-20) *
成顺利: "基于宽带信号信道化的目标信号检测", 中国优秀硕士论文电子期刊网, 15 December 2019 (2019-12-15) *

Similar Documents

Publication Publication Date Title
RU2414050C2 (en) System and methods of detecting presence of transmitting signal in wireless communication channel
US11754667B2 (en) System and method for determining interference in a radar system
KR101183267B1 (en) Method, apparatus and computer program for sensing spectrum in a cognitive radio environment
US11662455B2 (en) Radar data processing using neural network classifier and confidence metrics
US8027690B2 (en) Methods and apparatus for sensing the presence of a transmission signal in a wireless channel
US6075797A (en) Method and system for detecting mobility of a wireless-capable modem to minimize data transfer rate renegotiations
CN104158611B (en) Wireless signal Interference Detection system and method based on spectrum analysis
US8301081B2 (en) Physical and MAC adaptation for interference mitigation with cognitive radio
CN106162532B (en) Vehicle-mounted communication method and system with cognitive function
CN107733472B (en) Radio frequency identification frequency point self-adaptive setting method and system and control device
US11635487B2 (en) Method and apparatus for controlling radar transmission based on comparing received radio waves
CN214503748U (en) Frequency scale comparison device
CN114448529A (en) Wi-Fi channel detection system and method
JP6205773B2 (en) Control device, frequency control method, and reception device
CN1893708B (en) Mobile terminal device and motion control method thereof
CN1742440A (en) Interference detection in a wireless communication system
CN100416280C (en) Detection device for sensing radio front-end radiofrequency signal
CN109117020B (en) Positioning method and device of touch position, storage medium and electronic device
CN110753369A (en) Method and device for detecting interrupt cell
CN101867423B (en) Method and device for detecting spatial thermal noise at position of antenna
EP0480720A2 (en) Bandwidth analysis system and method
Fuentes et al. Cognitive radios: Discriminant analysis finds the free space
CN113014273B (en) Self-adaptive anti-interference method and self-adaptive anti-interference device
CN114650203B (en) Single-frequency amplitude noise suppression measurement method
CN115001603A (en) Sensitivity detection method, device, medium, circuit, equipment and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination