[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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信道检测系统及方法A Wi-Fi channel detection system and method

技术领域technical field

本发明涉及无线通信技术领域,具体而言,涉及一种Wi-Fi信道检测系统及方法。The present invention relates to the technical field of wireless communication, and in particular, to a Wi-Fi channel detection system and method.

背景技术Background technique

以Wi-Fi为基础的可见光通信技术(VLC)需要将2.4GHz乃至5GHz频段的特高频或超高频Wi-Fi信号下变频至LED响应频率内的高频范围,以可见光作为信号传输媒介进行通信。由于LED的带宽非常有限且相对固定,因此需要在下变频之前准确检测Wi-Fi信道。Wi-Fi-based visible light communication technology (VLC) needs to down-convert UHF or UHF Wi-Fi signals in the 2.4GHz or even 5GHz band to a high frequency range within the LED response frequency, using visible light as the signal transmission medium to communicate. Since the bandwidth of LEDs is very limited and relatively fixed, accurate detection of the Wi-Fi channel is required before downconversion.

但是现有的Wi-Fi信道检测,是直接对Wi-Fi信号以奈奎斯特准则采样后进行频谱分析,这对A/D转换器的采样速率和处理器算力的要求非常苛刻。However, the existing Wi-Fi channel detection is to directly sample the Wi-Fi signal according to the Nyquist criterion and then perform spectrum analysis, which is very demanding on the sampling rate of the A/D converter and the computing power of the processor.

发明内容SUMMARY OF THE INVENTION

本发明解决的问题是现有的Wi-Fi信道检测对采样速率和计算资源要求过高。The problem solved by the present invention is that the existing Wi-Fi channel detection requires too much sampling rate and computing resources.

为解决上述问题,本发明首先提供一种Wi-Fi信道检测系统,其包括:In order to solve the above problems, the present invention first provides a Wi-Fi channel detection system, which includes:

锁相环电路,混频器电路,低通滤波器和微控制器,所述锁相环电路在所述微控制器的控制下分时输出至少一个设定频率的本振信号;所述混频器电路对所述本振信号和输入的Wi-Fi信号进行混频,得到中频信号;所述低通滤波器对所述中频信号进行滤波;所述微控制器上设置有A/D转换器,所述A/D转换器对滤波后的所述中频信号进行采样;所述微控制器根据不同的锁相环频率设定所对应的AD采样结果确定所述Wi-Fi信号占用的Wi-Fi信道。A phase-locked loop circuit, a mixer circuit, a low-pass filter and a microcontroller, the phase-locked loop circuit outputs at least one local oscillator signal with a set frequency in time division under the control of the microcontroller; the mixer The frequency converter circuit mixes the local oscillator signal and 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 conversion The A/D converter samples the filtered intermediate frequency signal; the microcontroller determines the Wi-Fi occupied by the Wi-Fi signal according to the AD sampling results corresponding to different PLL frequency settings -Fi channel.

这样,通过混频器电路将Wi-Fi信号的特高频、超高频信号进行下变频为中频信号,然后进行采样和识别,大大降低了对A/D转换器的采样速率和微控制器算力的要求;性能可靠且成本低廉。In this way, the UHF and UHF signals of the Wi-Fi signal are down-converted into intermediate frequency signals through the mixer circuit, and then sampled and identified, which greatly reduces the sampling rate of the A/D converter and the microcontroller. Computing power requirements; reliable performance and low cost.

优选地,所述系统还包括:Preferably, the system further includes:

射频单刀双掷开关,其输入端与所述混频器电路连接,一个输出端与所述低通滤波器连接,另一个输出端作为系统的输出端;所述微控制器控制所述射频单刀双掷开关在Wi-Fi信道检测时导通所述混频器电路和所述低通滤波器,在确定所述Wi-Fi信号占用的Wi-Fi信道后导通所述混频器电路和系统的输出端。an RF single-pole double-throw switch, the input end of which is connected to the mixer circuit, one output end is connected to the low-pass filter, and the other output end is used as the output end of the system; the microcontroller controls the RF single-pole switch The double-throw switch turns on the mixer circuit and the low-pass filter during Wi-Fi channel detection, and turns on the mixer circuit and the low-pass filter after determining the Wi-Fi channel occupied by the Wi-Fi signal. output of the system.

优选地,所述微控制器通过三线式串行接口对所述锁相环电路输出的本振信号频率进行控制。Preferably, the microcontroller controls the frequency of the local oscillator signal output by the phase-locked loop circuit through a three-wire serial interface.

其次提供一种基于上述Wi-Fi信道检测系统的Wi-Fi信道检测方法,其包括:Secondly, a Wi-Fi channel detection method based on the above-mentioned Wi-Fi channel detection system is provided, which includes:

微控制器获取可用Wi-Fi信道的中心频率;The microcontroller obtains the center frequency of the available Wi-Fi channels;

微控制器控制锁相环电路输出的本振信号,使所述本振信号的频率与所述中心频率相同;The microcontroller controls the local oscillator signal output by the phase-locked loop circuit, so that the frequency of the local oscillator signal is the same as the center frequency;

微控制器读取A/D转换器输出的与所述中心频率对应的AD采样结果;The microcontroller reads the AD sampling result corresponding to the center frequency output by the A/D converter;

微控制器控制锁相环遍历输出所有所述可用Wi-Fi信道的所述中心频率的本振信号,获取对应的AD采样结果;The microcontroller controls the phase-locked loop to traverse and output the local oscillator signals of the center frequency of all the available Wi-Fi channels, and obtain the corresponding AD sampling results;

根据所有所述可用Wi-Fi信道对应的AD采样结果,确定占用的Wi-Fi信道。The occupied Wi-Fi channel is determined according to the AD sampling results corresponding to all the available Wi-Fi channels.

这样,将Wi-Fi信号的特高频、超高频信号进行下变频为中频信号,然后进行采样和识别;这就大大降低了对采样速率和算力的要求;性能可靠且成本低廉。In this way, the UHF and UHF signals of Wi-Fi signals are down-converted into intermediate frequency signals, and then sampled and identified; this greatly reduces the requirements for sampling rate and computing power; the performance is reliable and the cost is low.

优选地,所述微控制器在Wi-Fi信道检测时,控制射频单刀双掷开关导通混频器电路和低通滤波器;在确定Wi-Fi信号占用的Wi-Fi信道后,导通所述混频器电路和系统的输出端。Preferably, the microcontroller controls the RF SPDT switch to turn on the mixer circuit and the low-pass filter when the Wi-Fi channel is detected; after determining the Wi-Fi channel occupied by the Wi-Fi signal, turn on the the mixer circuit and the output of the system.

优选地,各个所述可用Wi-Fi信道对应的AD采样结果的AD采样频率和采样时长均相同。Preferably, the AD sampling frequency and sampling duration of the AD sampling results corresponding to each of the available Wi-Fi channels are the same.

优选地,根据所有所述可用Wi-Fi信道对应的AD采样结果,确定占用的Wi-Fi信道,包括:Preferably, according to the AD sampling results corresponding to all the available Wi-Fi channels, the occupied Wi-Fi channels are determined, including:

根据所述AD采样结果确定信号波动程度系数;Determine the signal fluctuation degree coefficient according to the AD sampling result;

根据所述可用Wi-Fi信道的频段范围对所述可用Wi-Fi信道的波动程度系数进行排序;Sort the fluctuation degree coefficients of the available Wi-Fi channels according to the frequency band range of the available Wi-Fi channels;

根据所述波动程度系数的均值对排序后所述波动程度系数进行二值化,得到波动程度系数的二值化序列;Binarize the sorted volatility coefficients according to the mean value of the volatility coefficients to obtain a binarization sequence of the volatility coefficients;

根据所述波动程度系数的二值化序列确定占用的Wi-Fi信道。The occupied Wi-Fi channel is determined according to the binarization sequence of the fluctuation degree coefficient.

优选地,根据所述AD采样结果确定信号波动程度系数,包括:Preferably, the signal fluctuation degree coefficient is determined according to the AD sampling result, including:

获取第一阈值;Get the first threshold;

根据所述第一阈值和所述AD采样结果计算所述波动程度系数。The fluctuation degree coefficient is calculated according to the first threshold and the AD sampling result.

优选地,所述波动程度系数的计算公式为:Preferably, the calculation formula of the fluctuation degree coefficient is:

Figure BDA0003509388980000031
Figure BDA0003509388980000031

其中,F为所述波动程度系数,xk,xk+1为所述AD采样结果中的采样值,k为采样值的序号,n为采样值的总数。Wherein, F is the fluctuation degree coefficient, x k , x k+1 are the sampling values in the AD sampling result, k is the serial number of the sampling values, and n is the total number of sampling values.

其中,函数δ:Among them, the function δ:

Figure BDA0003509388980000032
Figure BDA0003509388980000032

其中,threshold为第一阈值,所述第一阈值的取值根据实际情况或者预先设置确定。The threshold is a first threshold, and the value of the first threshold is determined according to the actual situation or preset.

优选地,根据所述波动程度系数的二值化序列确定占用的Wi-Fi信道,包括:Preferably, the occupied Wi-Fi channel is determined according to the binarization sequence of the fluctuation degree coefficient, including:

获取所有所述可用Wi-Fi信道的二值化模板;Obtain the binarized templates of all the available Wi-Fi channels;

若所述波动程度系数的二值化序列与所述二值化模板匹配,则确定所述Wi-Fi信号占用的为该二值化模板对应的Wi-Fi信道。If the binarization sequence of the fluctuation degree coefficient matches the binarization template, it is determined that the Wi-Fi signal occupied by the Wi-Fi signal is the Wi-Fi channel corresponding to the binarization template.

附图说明Description of drawings

图1为根据本发明实施例的Wi-Fi信道检测系统的结构示意图;1 is a schematic structural diagram of a Wi-Fi channel detection system according to an embodiment of the present invention;

图2为根据本发明实施例的Wi-Fi信道检测方法的流程图;2 is a flowchart of a Wi-Fi channel detection method according to an embodiment of the present invention;

图3为根据本发明实施例的示例Wi-Fi信道分布示意图;3 is a schematic diagram of an exemplary Wi-Fi channel distribution according to an embodiment of the present invention;

图4为根据本发明实施例的Wi-Fi信道检测方法S500的流程图;4 is a flowchart of a Wi-Fi channel detection method S500 according to an embodiment of the present invention;

图5为根据本发明实施例的信号波动分布直方图;5 is a histogram of signal fluctuation distribution according to an embodiment of the present invention;

图6为根据本发明实施例的示例的波动程度系数的二值化序列图;6 is a binarization sequence diagram of an exemplary fluctuation degree coefficient according to an embodiment of the present invention;

图7为根据本发明实施例的Wi-Fi信道检测方法S510的流程图;FIG. 7 is a flowchart of a Wi-Fi channel detection method S510 according to an embodiment of the present invention;

图8为根据本发明实施例的Wi-Fi信道检测方法S530的流程图;8 is a flowchart of a Wi-Fi channel detection method S530 according to an embodiment of the present invention;

图9为根据本发明实施例的信道1的波动程度系数的二值化序列图。FIG. 9 is a binarization sequence diagram of the fluctuation degree coefficient of channel 1 according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的上述目的、特征和优点能够更为明显易懂,下面结合附图对本发明的具体实施例做详细的说明。In order to make the above objects, features and advantages of the present invention more clearly understood, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

以Wi-Fi为基础的可见光通信技术,将2.4GHz乃至5GHz频段的特高频或超高频Wi-Fi信号下变频至LED响应频率内的高频范围,以可见光作为信号传输媒介进行通信。Wi-Fi-based visible light communication technology down-converts UHF or UHF Wi-Fi signals in the 2.4GHz or even 5GHz band to a high frequency range within the LED response frequency, and uses visible light as the signal transmission medium for communication.

这样,还可以在恢复同轴线缆所传输的中频信号时,将来自同一无线热点的信号上变频至不同的Wi-Fi信道,避免信道拥挤所带来的干扰,提高通信质量。In this way, when restoring the intermediate frequency signal transmitted by the coaxial cable, the signal from the same wireless hotspot can be up-converted to different Wi-Fi channels, so as to avoid interference caused by channel congestion and improve communication quality.

但是由于LED的带宽非常有限且相对固定,因此在进行下变频之前,需要先精准确定占用的Wi-Fi信道,否则一旦Wi-Fi信道不准确,会导致下变频后无法落入LED响应频率内。However, because the bandwidth of LED is very limited and relatively fixed, it is necessary to accurately determine the occupied Wi-Fi channel before down-conversion. Otherwise, once the Wi-Fi channel is inaccurate, it will not fall within the LED response frequency after down-conversion. .

但是现有的Wi-Fi信道检测,通常是直接对Wi-Fi信号以奈奎斯特准则采样后进行频谱分析,将对A/D转换器的采样速率和处理器算力的要求非常苛刻;要达到这样的要求,意味着要使用昂贵的A/D转换器和处理器,这就带来了非常大的不便。However, in the existing Wi-Fi channel detection, the spectrum analysis is usually performed directly after sampling the Wi-Fi signal according to the Nyquist criterion, which has very strict requirements on the sampling rate of the A/D converter and the computing power of the processor; To achieve such a requirement means to use expensive A/D converters and processors, which brings great inconvenience.

本申请实施例提供了一种Wi-Fi信道检测系统,用以检测Wi-Fi信号占用的Wi-Fi信道。如图1所示,其为根据本发明实施例的Wi-Fi信道检测系统的结构示意图;其中,所述Wi-Fi信道检测系统,包括:An embodiment of the present application provides a Wi-Fi channel detection system, which is used to detect a Wi-Fi channel occupied by a Wi-Fi signal. As shown in FIG. 1, it 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 includes:

锁相环电路1,混频器电路2,低通滤波器3和微控制器4,所述锁相环电路1在所述微控制器4的控制下分时输出至少一个设定频率的本振信号;所述混频器电路2对所述本振信号和输入的Wi-Fi信号进行混频,得到中频信号;所述低通滤波器3对所述中频信号进行滤波;所述微控制器4上设置有A/D转换器5,所述A/D转换器5对滤波后的所述中频信号进行采样;所述微控制器4根据不同设定频率所对应的AD采样结果确定所述Wi-Fi信号占用的Wi-Fi信道。A phase-locked loop circuit 1, a mixer circuit 2, a low-pass filter 3 and a microcontroller 4, the phase-locked loop circuit 1 under the control of the microcontroller 4 time-divisions to output at least one set frequency of the present. oscillator signal; the mixer circuit 2 mixes the local oscillator signal and the input Wi-Fi signal to obtain an intermediate frequency signal; the low-pass filter 3 filters the intermediate frequency signal; the micro-controller The device 4 is provided with an A/D converter 5, and the A/D converter 5 samples the filtered intermediate frequency signal; the microcontroller 4 determines the corresponding AD sampling results according to different set frequencies. Wi-Fi channel occupied by the Wi-Fi signal.

其中,所述混频器电路的信号输入端接入Wi-Fi信号,所述混频器电路的本振输入端接入由锁相环电路产生的本振信号。所述低通滤波器的输出端连接微控制器的ADC(A/D转换器5)检测管脚。Wherein, the signal input end of the mixer circuit is connected to the Wi-Fi signal, and the local oscillator input end of the mixer circuit is connected to the local oscillator signal generated by the phase-locked loop circuit. The output end of the low-pass filter is connected to the detection pin of the ADC (A/D converter 5 ) of the microcontroller.

优选地,通过ADC对低通滤波器的输出信号进行采样,对AD采样结果进行处理,并根据代码逻辑对当前通信中所占用的Wi-Fi信道做出判断。Preferably, the output signal of the low-pass filter is sampled by the ADC, the AD sampling result is processed, and the Wi-Fi channel occupied in the current communication is judged according to the code logic.

其中,所述低通滤波器输出连接微控制器的ADC管脚。Wherein, the output of the low-pass filter is connected to the ADC pin of the microcontroller.

其中,微控制器采用STM32F103C8T6,其内部集成ADC单元,可以通过定时器和DMA总线控制ADC实现高速、稳定的持续采样。这样,仅通过STM32F103C8T6微控制器就可以提供足够的内存和算力对采样数据进行处理。Among them, the microcontroller adopts STM32F103C8T6, which integrates ADC unit inside, which can control ADC through timer and DMA bus to achieve high-speed and stable continuous sampling. In this way, only the STM32F103C8T6 microcontroller can provide enough memory and computing power to process the sampled data.

这样,通过混频器电路将Wi-Fi信号的特高频、超高频信号进行下变频为中频信号,然后进行采样和识别;这就大大降低了对A/D转换器的采样速率和微控制器算力的要求;性能可靠且成本低廉。In this way, the UHF and UHF signals of the Wi-Fi signal are down-converted into intermediate frequency signals through the mixer circuit, and then sampled and identified; this greatly reduces the sampling rate and micro-frequency of the A/D converter. Controller computing power requirements; reliable performance and low cost.

优选地,如图1所示,所述系统还包括:射频单刀双掷开关6,其输入端与所述混频器电路2连接,一个输出端与所述低通滤波器3连接,另一个输出端作为系统的输出端;所述微控制器4控制所述射频单刀双掷开关在Wi-Fi信道检测时导通所述混频器电路2和所述低通滤波器3,在确定所述Wi-Fi信号占用的Wi-Fi信道后导通所述混频器电路2和系统的输出端。Preferably, as shown in FIG. 1 , the system further includes: an RF SPDT switch 6 , the input end of which is connected to the mixer circuit 2 , one output end is connected to the low-pass filter 3 , and the other is connected to the mixer circuit 2 . The output terminal is used as the output terminal of the system; the microcontroller 4 controls the RF SPDT switch to turn on the mixer circuit 2 and the low-pass filter 3 when the Wi-Fi channel is detected. After the Wi-Fi channel occupied by the Wi-Fi signal, the mixer circuit 2 and the output end of the system are turned on.

其中,所述射频单刀双掷开关的输入端接入由混频器输出的中频信号。所述射频单刀双掷开关的输出分为两路,一路输出作为整个信道检测电路的有效信号输出,另一路输出连接低通滤波器的输入端。所述微控制器控制射频单刀双掷开关的通断;所述微控制器通过改变射频单刀双掷开关的使能端电平的高低,控制所述射频单刀双掷开关的导通方向。Wherein, the input end of the RF SPDT switch is connected to the intermediate frequency signal output by the mixer. The output of the RF SPDT switch is divided into two channels, one output is used as the effective signal output of the entire channel detection circuit, and the other output is connected to the input end of the low-pass filter. The microcontroller controls the on-off of the RF SPDT switch; the microcontroller controls the conduction direction of the RF SPDT switch by changing the level of the enabling terminal of the RF SPDT switch.

这样,在需要检测输入的Wi-Fi信号所占用的Wi-Fi信道时,将中频信号输入低通滤波器进行滤波和后续处理,从而准确检测出所占用的Wi-Fi信道;在检测出Wi-Fi信道后,直接输出中频信号。这样,通过射频单刀双掷开关的切换,可以实现Wi-Fi信道检测和中频信号输出两个互相独立的功能,大大增加Wi-Fi信道检测系统的使用灵活性。In this way, when the Wi-Fi channel occupied by the input Wi-Fi signal needs to be detected, the intermediate frequency signal is input to the low-pass filter for filtering and subsequent processing, so as to accurately detect the occupied Wi-Fi channel; After the Fi channel, the IF signal is directly output. In this way, through the switching of the RF SPDT switch, two independent functions of Wi-Fi channel detection and intermediate frequency signal output can be realized, which greatly increases the flexibility of the Wi-Fi channel detection system.

这样,通过所述射频单刀双掷开关,可以实现检测电路和系统有效信号通路的隔离,减小在非信道检测状态下检测电路对有效信号质量的影响。In this way, through the RF SPDT switch, the detection circuit can be isolated from the effective signal path of the system, and the influence of the detection circuit on the effective signal quality in the non-channel detection state can be reduced.

优选地,所述微控制器4通过三线式串行接口对所述锁相环电路1的本振信号频率进行控制。Preferably, the microcontroller 4 controls the frequency of the local oscillator signal of the phase-locked loop circuit 1 through a three-wire serial interface.

这样,当系统进入信道检测状态时,微控制器将控制射频单刀双掷开关导通由混频器电路至低通滤波器的信号通路,信道检测过程中,微控制器将控制改变锁相环的输出信号频率,遍历所有可用Wi-Fi信道的中心频率,AD采样结果将由所述微控制器进行计算处理,得到一个衡量各个信道信号强度的二值化表。在对各个信道的采样完成后,微控制器将根据代码逻辑对目前通信中使用的Wi-Fi信道做出判断,若判断成功则控制锁相环输出对应信道的工作频率,否则将恢复信道检测前的工作频率。上述信道检测过程结束后,微控制器将控制射频单刀双掷开关切断与低通滤波器的连接,系统输出Wi-Fi工作信道对应的中频信号。In this way, when the system enters the channel detection state, the microcontroller will control the RF SPDT switch to conduct the signal path from the mixer circuit to the low-pass filter. During the channel detection process, the microcontroller will control the change of the phase-locked loop. The frequency of the output signal, traverses the center frequency of all available Wi-Fi channels, and the AD sampling result will be calculated and processed by the microcontroller to obtain a binarized table that measures the signal strength of each channel. After the sampling of each channel is completed, the microcontroller will judge the Wi-Fi channel used in the current communication according to the code logic. If the judgment is successful, it will control the phase-locked loop to output the working frequency of the corresponding channel, otherwise it will resume the channel detection. previous operating frequency. After the above channel detection process is over, the microcontroller will control the RF SPDT switch to cut off the connection with the low-pass filter, and the system outputs the IF signal corresponding to the Wi-Fi working channel.

本申请实施例提供了一种Wi-Fi信道检测系统方法,其在本发明上述内容所述的Wi-Fi信道检测系统的基础上进行,以下对所述Wi-Fi信道检测方法进行详细描述。The embodiment of the present application provides a Wi-Fi channel detection system method, which is performed on the basis of the Wi-Fi channel detection system described in the foregoing content of the present invention, and the Wi-Fi channel detection method is described in detail below.

如图2所示,一种基于上述所述的Wi-Fi信道检测系统的Wi-Fi信道检测方法,其包括:As shown in FIG. 2, a Wi-Fi channel detection method based on the above-mentioned Wi-Fi channel detection system includes:

S100,微控制器获取可用Wi-Fi信道的中心频率;S100, the microcontroller obtains the center frequency of the available Wi-Fi channel;

不同的协议标准,会留存有不同的开放信道,这些开放信道即为可用Wi-Fi信道;信道的频率中心,即为该Wi-Fi信道的中心位置的频率。Different protocol standards will retain different open channels, these open channels are available Wi-Fi channels; the frequency center of the channel is the frequency at the center of the Wi-Fi channel.

其中,微控制器预先存储有所述可用Wi-Fi信道的中心频率,需要使用时可以直接获取。Wherein, the microcontroller pre-stores the center frequency of the available Wi-Fi channel, which can be directly obtained when needed.

以在802.11g协议下工作的Wi-Fi为例,中国开放使用的信道为1-13,在2412MHz-2472MHz频段内均匀分布,信道中心频率间隔5MHz,各个信道所覆盖的频率范围互有重叠。具体分布如图3所示。Taking Wi-Fi working under the 802.11g protocol as an example, the channels open to use in China are 1-13, which are evenly distributed in the 2412MHz-2472MHz frequency band, the center frequency of the channels is 5MHz apart, and the frequency ranges covered by each channel overlap each other. The specific distribution is shown in Figure 3.

S200,微控制器控制锁相环电路输出的本振信号,使所述本振信号的频率与所述中心频率相同;S200, the microcontroller controls the local oscillator signal output by the phase-locked loop circuit, so that the frequency of the local oscillator signal is the same as the center frequency;

也即是使得锁相环电路输出的是可用Wi-Fi信道的中心频率的本振信号。That is, the output of the phase-locked loop circuit is the local oscillator signal of the center frequency of the available Wi-Fi channel.

S300,微控制器读取A/D转换器输出的与所述中心频率对应的AD采样结果;S300, the microcontroller reads the AD sampling result corresponding to the center frequency output by the A/D converter;

也即是使得锁相环电路输出的是可用Wi-Fi信道的中心频率的本振信号。这样AD采样结果就是这个可用Wi-Fi信道/中心频率对应的AD采样结果。That is, the output of the phase-locked loop circuit is the local oscillator signal of the center frequency of the available Wi-Fi channel. In this way, the AD sampling result is the AD sampling result corresponding to the available Wi-Fi channel/center frequency.

在此需要说明的是,为了保证采样,锁相环电路输出该中心频率的本振信号的持续时间应该不小于采样时长。It should be noted here that, in order to ensure sampling, the duration of the phase-locked loop circuit outputting the local oscillator signal at the center frequency should not be less than the sampling duration.

S400,微控制器控制锁相环遍历输出所有所述可用Wi-Fi信道的所述中心频率的本振信号,获取对应的AD采样结果;S400, the microcontroller controls the phase-locked loop to traverse and output the local oscillator signals of the center frequency of all the available Wi-Fi channels, and obtain corresponding AD sampling results;

也即是重新执行步骤S200-S300,每次执行的时候更换一种可用Wi-Fi信道的中心频率,得到该可用Wi-Fi信道的AD采样结果;重复循环,直至得到所有可用Wi-Fi信道的AD采样结果为止。That is to re-execute steps S200-S300, change the center frequency of an available Wi-Fi channel each time, and obtain the AD sampling result of the available Wi-Fi channel; repeat the cycle until all available Wi-Fi channels are obtained up to the AD sampling result.

以在802.11g协议下工作的Wi-Fi为例,中国开放使用的信道为1-13,即是得到Wi-Fi信道1-13的所有13个AD采样结果。Taking Wi-Fi working under the 802.11g protocol as an example, the channels 1-13 are open to use in China, that is, all 13 AD sampling results of Wi-Fi channels 1-13 are obtained.

S500,根据所有所述可用Wi-Fi信道对应的AD采样结果,确定占用的Wi-Fi信道。S500: Determine the occupied Wi-Fi channel according to AD sampling results corresponding to all the available Wi-Fi channels.

通过AD采样结果,可以反应不同Wi-Fi信道的信号强度,从而确定Wi-Fi信号占用的Wi-Fi信道。The AD sampling results can reflect the signal strengths of different Wi-Fi channels, thereby determining the Wi-Fi channels occupied by the Wi-Fi signals.

以符合802.11g协议的Wi-Fi信号为例,信道带宽为20MHz,对Wi-Fi信号使用当前信道中心频率的本振信号进行混频所得到的中频信号含有DC-10MHz的频率成分。将所得到的中频信号输入低通滤波器截取低频部分后输入ADC,对信号幅值进行检测。此时ADC以满足采样定理的频率进行采样,得到一段时间内输入信号的强度序列,微控制器将对上述采样序列进行计算处理。重复上述步骤,遍历所有可用的Wi-Fi信道,根据信号强度分布即可确定当前通信中被占用的信道编号。Taking the Wi-Fi signal conforming to the 802.11g protocol as an example, the channel bandwidth is 20MHz, and the intermediate frequency signal obtained by mixing the Wi-Fi signal with the local oscillator signal of the current channel center frequency contains the frequency component of DC-10MHz. The obtained IF signal is input into the low-pass filter to intercept the low-frequency part and then input to the ADC to detect the signal amplitude. At this time, the ADC performs sampling at the frequency that satisfies the sampling theorem, and obtains the intensity sequence of the input signal within a period of time, and the microcontroller will calculate and process the above-mentioned sampling sequence. Repeat the above steps, traverse all available Wi-Fi channels, and determine the channel number occupied in the current communication according to the signal strength distribution.

这样,无需获取Wi-Fi信号的完整频谱信息,只需要检测各个信道中心频率附近的信号强度,从而大大降低对算力的要求。In this way, there is no need to obtain the complete spectrum information of the Wi-Fi signal, but only the signal strength near the center frequency of each channel needs to be detected, thereby greatly reducing the computing power requirements.

这样,通过将Wi-Fi信号的特高频、超高频信号进行下变频为中频信号,然后进行采样和识别;这就大大降低了对采样速率和算力的要求;性能可靠且成本低廉。In this way, by down-converting the UHF and UHF signals of Wi-Fi signals into intermediate frequency signals, and then sampling and identifying them; this greatly reduces the requirements for sampling rate and computing power; the performance is reliable and the cost is low.

优选地,所述微控制器在Wi-Fi信道检测时,控制射频单刀双掷开关导通混频器电路和低通滤波器;在确定Wi-Fi信号占用的Wi-Fi信道后,导通所述混频器电路和系统的输出端。Preferably, the microcontroller controls the RF SPDT switch to turn on the mixer circuit and the low-pass filter when the Wi-Fi channel is detected; after determining the Wi-Fi channel occupied by the Wi-Fi signal, turn on the the mixer circuit and the output of the system.

这样,可以实现检测电路和系统有效信号通路的隔离,减小在非信道检测状态下检测电路对有效信号质量的影响。In this way, the detection circuit can be isolated from the effective signal path of the system, and the influence of the detection circuit on the effective signal quality in the non-channel detection state can be reduced.

优选地,各个所述可用Wi-Fi信道对应的AD采样结果的AD采样频率和采样时长均相同。这样,可以得到一段相同点数的信号强度序列作为AD采样结果。Preferably, the AD sampling frequency and sampling duration of the AD sampling results corresponding to each of the available Wi-Fi channels are the same. In this way, a signal strength sequence with the same number of points can be obtained as the AD sampling result.

优选地,如图4所示,S500,根据所有所述可用Wi-Fi信道对应的AD采样结果,确定占用的Wi-Fi信道,包括:Preferably, as shown in FIG. 4 , in S500, according to AD sampling results corresponding to all the available Wi-Fi channels, determine the occupied Wi-Fi channels, including:

S510,根据所述AD采样结果确定信号波动程度系数;S510, determine a signal fluctuation degree coefficient according to the AD sampling result;

其中,波动程度系数用来直接反应采样到的信号强度的大小;波动程度系数越大,则信号强度越大。Among them, the fluctuation degree coefficient is used to directly reflect the magnitude of the sampled signal strength; the larger the fluctuation degree coefficient, the greater the signal strength.

S520,根据所述波动程度系数的均值对所述波动程度系数进行二值化,得到波动程度系数的二值化序列;S520, binarize the fluctuation degree coefficient according to the mean value of the fluctuation degree coefficient to obtain a binarization sequence of the fluctuation degree coefficient;

由于不同WiFi信道之间互有重叠,导致当前被通信所占用的信道的左右相邻信道的中心频率处也可以检测到信号波动。根据所述波动程度系数的均值对排序后所述波动程度系数进行二值化,则大于波动程度系数的均值的,二值化为1;小于波动程度系数的均值的,二值化为0。Since different WiFi channels overlap with each other, signal fluctuations can also be detected at the center frequencies of the left and right adjacent channels of the channel currently occupied by communication. Binarization is performed on the sorted volatility coefficients according to the mean value of the volatility coefficients, and if it is greater than the mean value of the volatility coefficients, the binarization is 1; if it is smaller than the mean value of the volatility coefficients, the binarization is 0.

通过将波动程度系数进行二值化,从而可以转换为计算机容易识别大小关系的形式,便于进行识别和判断。By binarizing the fluctuation degree coefficient, it can be converted into a form that the computer can easily identify the size relationship, which is convenient for identification and judgment.

其中,得到波动程度系数用于衡量采样时间内信道中信号的波动情况。在对所有信道的信号强度评估完毕后,将得到一个表达信号波动分布的如图5所示的直方图。对所述直方图以平均值为阈值进行二值化,最终得到一个评判各个信道信号强弱的二值化表,作为波动程度系数的二值化序列。所述波动程度系数的二值化序列如图6所示,序号为5/6/7的信道波动程度系数二值化为1,其余为0。Among them, the obtained fluctuation degree coefficient is used to measure the fluctuation of the signal in the channel within the sampling time. After evaluating the signal strengths of all channels, a histogram as shown in Figure 5 will be obtained that expresses the distribution of signal fluctuations. The histogram is binarized by taking the average value as a threshold, and finally a binarization table for judging the strength of each channel signal is obtained as a binarization sequence of fluctuation degree coefficients. The binarization sequence of the fluctuation degree coefficient is shown in FIG. 6 , the channel fluctuation degree coefficient with the serial number of 5/6/7 is binarized to 1, and the rest are 0.

S530,根据所述波动程度系数的二值化序列确定占用的Wi-Fi信道。S530: Determine the occupied Wi-Fi channel according to the binarization sequence of the fluctuation degree coefficient.

一个可用Wi-Fi信道被占用,则其相邻的可用Wi-Fi信道也会具有很强的信号强度,基于此,若连续几个序号的二值化均为1,则被占用的Wi-Fi信道很可能为其中的一个。这样,就可以对占用的Wi-Fi信道进行确定。If an available Wi-Fi channel is occupied, its adjacent available Wi-Fi channel will also have strong signal strength. Based on this, if the binarization of several consecutive serial numbers is 1, the occupied Wi-Fi The Fi channel is likely to be one of them. In this way, the occupied Wi-Fi channel can be determined.

这样,通过排序和二值化,可以得到易识别的波动程度系数的二值化序列,从而可以很容易确定占用的Wi-Fi信道;简单,方便,且对算力要求很低。In this way, through sorting and binarization, an easily identifiable binarized sequence of fluctuation degree coefficients can be obtained, so that the occupied Wi-Fi channel can be easily determined; it is simple, convenient, and requires low computing power.

这样,在采样过程中,设定各个信道的采样时长相同,且ADC的采样率保持一致。对各个信道的采样结束后将得到一段相同点数的信号强度序列。对这段序列求差分的绝对值再取平均,并在求差分的过程中滤除结果小于特定阈值的噪声,以消除ADC噪声的影响。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, a signal strength sequence with the same number of points will be obtained. The absolute value of the difference is averaged for this sequence, and the noise whose result is less than a certain threshold is filtered out during the process of difference, so as to eliminate the influence of ADC noise.

优选地,如图7所示,S510,根据所述AD采样结果确定信号波动程度系数;Preferably, as shown in FIG. 7 , in S510, a signal fluctuation degree coefficient is determined according to the AD sampling result;

S511,获取第一阈值;S511, obtaining a first threshold;

其中,所述第一阈值可以根据实验确定,也可以根据实际情况确定。或者也可以先选取确定的Wi-Fi信道,然后获取其多次的AD采样结果,并根据多次AD采样结果来综合判断第一阈值的选取,使得所述第一阈值的取值可以使得最终判断得到准确结果的次数最多。Wherein, the first threshold may be determined according to experiments, or may be determined according to actual conditions. Alternatively, a certain Wi-Fi channel can be selected first, then multiple AD sampling results thereof can be obtained, and the selection of the first threshold can be comprehensively judged according to the multiple AD sampling results, so that the value of the first threshold can make the final threshold. Judgments get the most accurate results.

S512,根据所述第一阈值和所述AD采样结果计算所述波动程度系数。S512: Calculate the fluctuation degree coefficient according to the first threshold and the AD sampling result.

通过第一阈值,滤除差分结果小于第一阈值的噪声,以消除ADC噪声的影响。Through the first threshold, the noise whose difference result is smaller than the first threshold is filtered out, so as to eliminate the influence of ADC noise.

优选地,所述波动程度系数的计算公式为:Preferably, the calculation formula of the fluctuation degree coefficient is:

Figure BDA0003509388980000101
Figure BDA0003509388980000101

其中,F为所述波动程度系数,xk,xk+1为所述AD采样结果中的采样值,k为采样值的序号,n为采样值的总数。Wherein, F is the fluctuation degree coefficient, x k , x k+1 are the sampling values in the AD sampling result, k is the serial number of the sampling values, and n is the total number of sampling values.

这样,可以直接计算出波动程度系数,通过该参数来直接反应采样到的信号强度的大小;波动程度系数越大,则信号强度越大。In this way, the fluctuation degree coefficient can be directly calculated, and the magnitude of the sampled signal strength can be directly reflected by this parameter; the larger the fluctuation degree coefficient, the greater the signal strength.

其中,定义函数δ:Among them, define the function δ:

Figure BDA0003509388980000102
Figure BDA0003509388980000102

其中,threshold为第一阈值,所述第一阈值的取值根据实际情况或者预先设置确定。The threshold is a first threshold, and the value of the first threshold is determined according to the actual situation or preset.

通过该函数,可以滤除结果小于特定阈值的噪声,以消除ADC噪声的影响。With this function, noise whose result is less than a certain threshold can be filtered out to remove the effect of ADC noise.

优选地,如图8所示,S530,根据所述波动程度系数的二值化序列确定占用的Wi-Fi信道,包括:Preferably, as shown in FIG. 8, S530, determining the occupied Wi-Fi channel according to the binarization sequence of the fluctuation degree coefficient, including:

S531,获取所有所述可用Wi-Fi信道的二值化模板;S531, obtaining the binarized templates of all the available Wi-Fi channels;

以在802.11g协议下工作的Wi-Fi为例,中国开放使用的信道为1-13,在2412MHz-2472MHz频段内均匀分布,信道中心频率间隔5MHz,各个信道所覆盖的频率范围互有重叠。以上述检测方式所得到的直方图中除信道1和信道13外,都将在当前通信信道的中心频率和两侧临近信道的中心频率得到高于平均值的信号波动。以信道6为例,在正常情况下,将直方图二值化后的结果如图6所示。依次可以类推其余信道的二值化模板。同理,对边缘信道1和13,以信道1为例,直方图二值化后(二值化模板)的结果为如图9所示。Taking Wi-Fi working under the 802.11g protocol as an example, the channels open to use in China are 1-13, which are evenly distributed in the 2412MHz-2472MHz frequency band, the center frequency of the channels is 5MHz apart, and the frequency ranges covered by each channel overlap each other. Except for channel 1 and channel 13 in the histogram obtained by the above detection method, signal fluctuations higher than average will be obtained at the center frequency of the current communication channel and the center frequencies of adjacent channels on both sides. Taking channel 6 as an example, under normal circumstances, the result of binarizing the histogram is shown in Fig. 6 . The binarization templates of other channels can be deduced in turn. Similarly, for edge channels 1 and 13, taking channel 1 as an example, the result of the histogram binarization (binarization template) is as shown in FIG. 9 .

在此需要说明的是,示例的信道1-13中,信道中心频率间隔5MHz,因此会出现当前通信信道的中心频率和两侧临近信道的中心频率得到高于平均值的信号波动程度系数,也就是二值化模板中连续三个序号均为1(两端的信道则是连续两个序号均为1)。It should be noted here that in the example channels 1-13, the channel center frequencies are separated by 5MHz, so the center frequency of the current communication channel and the center frequencies of the adjacent channels on both sides will obtain a signal fluctuation degree coefficient higher than the average value, and also That is, three consecutive sequence numbers in the binarization template are all 1 (the channels at both ends are both consecutive two sequence numbers are 1).

S532,若所述波动程度系数的二值化序列与所述二值化模板匹配,则确定所述Wi-Fi信号占用的为该二值化模板对应的Wi-Fi信道。S532 , if the binarization sequence of the fluctuation degree coefficient matches the binarization template, determine that the Wi-Fi signal occupied by the Wi-Fi signal is the Wi-Fi channel corresponding to the binarization template.

如示例中的信道6与波动程度系数的二值化序列相同,则确定所述Wi-Fi信道为信道6。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.

在此需要说明的是,将所述波动程度系数的二值化序列与所述二值化模板匹配,实质上就是判断是否有连续三个序号均为1(两端的信道则是连续两个序号均为1)的情况,相匹配实质上就是有连续三个序号均为1(两端的信道则是连续两个序号均为1);因此与连续三个序号的中间序号对应的信道的二值化模板匹配。It should be noted here that matching the binarization sequence of the fluctuation degree coefficient with the binarization template is essentially judging whether there are three consecutive serial numbers that are all 1 (the channels at both ends are two consecutive serial numbers). In the case of 1), the matching is essentially that there are three consecutive serial numbers of 1 (the channels at both ends are two consecutive serial numbers of 1); therefore, the binary value of the channel corresponding to the middle serial number of the three consecutive serial numbers template matching.

因此步骤S531-S532,也可以描述为:判断所述波动程度系数的二值化序列是否有连续三个序号均为1(两端的信道则是连续两个序号均为1)的情况,若有,则连续三个序号的中间序号(两端的连续两个序号中顶端的序号)对应的信道即为占用的Wi-Fi信道。Therefore, steps S531-S532 can also be described as: judging whether there are three consecutive sequence numbers of 1 in the binarization sequence of the fluctuation degree coefficient (the channels at both ends are the case where two consecutive sequence numbers are 1). , the channel corresponding to the middle sequence number of the three consecutive sequence numbers (the top sequence number of the two consecutive sequence numbers at both ends) is the occupied Wi-Fi channel.

优选地,若所述波动程度系数的二值化序列与所述二值化模板匹配均不符,则选取部分信道重新进行采样;直至所述波动程度系数的二值化序列与某个所述二值化模板匹配或者循环次数达到阈值为止。Preferably, if the binarization sequence of the fluctuation degree coefficient does not match the binarization template, select some channels for re-sampling; until the binarization sequence of the fluctuation degree coefficient matches one of the two The valued template matches or the number of loops reaches the threshold.

也即是说,所述波动程度系数的二值化序列未出现有连续三个序号均为1(两端的信道则是连续两个序号均为1)的情况,则判断为在整个采样过程中出现了误差,对可能误差过大的可用Wi-Fi信道重新进行采样和计算后再次进行判断;若仍不符合,则继续循环,直至符合上述情况或者循环次数达到阈值为止。That is to say, if the binarization sequence of the fluctuation degree coefficient does not have three consecutive serial numbers of 1 (the channels at both ends have two consecutive serial numbers of 1), it is judged that during the entire sampling process If there is an error, re-sample and calculate the available Wi-Fi channel that may have an excessive error, and then make a judgment again; if it still does not meet the requirements, continue to cycle until the above conditions are met or the number of cycles reaches the threshold.

若循环达到阈值,则判断为存在硬件连接问题。If the cycle reaches the threshold, it is determined that there is a hardware connection problem.

其中重新采样的信道的选取标准,以连续三个序号均为1(两端的信道则是连续两个序号均为1)的1-13信道情况为例:Among them, the selection criteria of the re-sampled channel are taken as an example for the case of 1-13 channels with three consecutive serial numbers of 1 (the channels at both ends are two consecutive serial numbers of 1):

如果只有1个信道检测结果高于平均值则:If only 1 channel detection result is higher than the average then:

如果该信道为信道1,则对信道1和信道2重新采样;如果该信道为信道13,则对信道12和信道13重新采样;其他信道,将对该信道和两侧的信道进行重新采样。If the channel is channel 1, resample channel 1 and channel 2; if the channel is channel 13, resample channel 12 and channel 13; for other channels, resample this channel and the channels on both sides.

如果有两个连续的信道检测结果高于平均值:If there are two consecutive channel detection results above average:

如果这两个信道分别是信道1、2,则当前被占用的信道为信道1;如果这两个信道分别是信道12、13,则当前被占用的信道为信道13;其他信道,将对这两个连续信道两侧的信道重新采样。If the two channels are channels 1 and 2 respectively, the currently occupied channel is channel 1; if the two channels are channels 12 and 13, respectively, the currently occupied channel is channel 13; Channel resampling on both sides of two consecutive channels.

如果有连续3个信道的检测结果高于平均值:选取中间的信道作为最终结果。If the detection results of 3 consecutive channels are higher than the average value: select the middle channel as the final result.

如果有连续4个信道的检测结果高于平均值:对这4个信道重新采样。If there are 4 consecutive channels with higher than average detection results: Resample these 4 channels.

如果有连续5个及以上连续信道采样结果高于平均值:判定存在硬件连接问题。If there are 5 or more consecutive channel sampling results that are higher than the average value: It is determined that there is a hardware connection problem.

如果检测的结果中含有多组连续的信道高于平均值:对各组连续的信道分别采取上述策略。If the detected result contains multiple groups of consecutive channels that are higher than the average value: adopt the above strategy for each group of consecutive channels.

如果按照上述规则重新进行一轮采样仍然不能得出结论,则会在最新的采样结果的基础上根据上述规则重新采样,嵌套次数上限为n(n为大于2的自然数),该参数可以在程序内部设定。超出上限值则判定存在硬件连接问题并退出信道检测程序。If a new round of sampling according to the above rules still cannot draw a conclusion, it will resample according to the above rules on the basis of the latest sampling results. The upper limit of the number of nesting is n (n is a natural number greater than 2). This parameter can be set in Program internal settings. If the upper limit is exceeded, it is determined that there is a hardware connection problem and the channel detection program is exited.

通过这种重新采样,可以解决由于误差过大影响判断结果的问题,从而准确判断所占用的Wi-Fi信道。Through this resampling, the problem that the judgment result is affected by the excessive error can be solved, so that the occupied Wi-Fi channel can be accurately judged.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

本申请中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。相关之处参见前述所述实施例的部分说明即可。Each embodiment in this application is described in a related manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. For related matters, please refer to some descriptions of the foregoing embodiments.

虽然本发明披露如上,但本发明并非限定于此。任何本领域技术人员,在不脱离本发明的精神和范围内,均可作各种更动与修改,因此本发明的保护范围应当以权利要求所限定的范围为准。Although the present invention is disclosed above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention should be based on the scope defined by the 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 (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0767538A1 (en) * 1995-10-05 1997-04-09 Telefonaktiebolaget Lm Ericsson Method and device for generating a signal
JP2000261512A (en) * 1999-01-05 2000-09-22 Matsushita Electric Ind Co Ltd Receiver and phase extraction 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
CN108955731A (en) * 2018-08-14 2018-12-07 中国电子科技集团公司第三十八研究所 A kind of light load microwave signal Larger Dynamic broadband demodulator system based on lock variable phase frequency synthesizer
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 (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0767538A1 (en) * 1995-10-05 1997-04-09 Telefonaktiebolaget Lm Ericsson Method and device for generating a signal
JP2000261512A (en) * 1999-01-05 2000-09-22 Matsushita Electric Ind Co Ltd Receiver and phase extraction 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
CN108955731A (en) * 2018-08-14 2018-12-07 中国电子科技集团公司第三十八研究所 A kind of light load microwave signal Larger Dynamic broadband demodulator system based on lock variable phase frequency synthesizer
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
US8843094B2 (en) Method and system for blocker detecton and automatic gain control
RU2414050C2 (en) System and methods of detecting presence of transmitting signal in wireless communication channel
CN106162532B (en) In-vehicle communication method and system with cognitive function
CN101741489B (en) Frequency spectrum sensing device and sensing method thereof
CN102647241B (en) Non-coherent detection system and method for short-wave broad-band channel
CN109067473B (en) A method and device for demodulation analysis of qubit read signal
JP6205773B2 (en) Control device, frequency control method, and reception device
CN109459614A (en) A kind of spectrum analyzer and its method for searching for signal
CN114448529A (en) Wi-Fi channel detection system and method
CN111711586B (en) A time-frequency collaborative filtering method and system for identification of communication modulation modes
JP6198631B2 (en) Receiving apparatus and demodulation method
CN109117020B (en) Positioning method and device of touch position, storage medium and electronic device
US20220014303A1 (en) System, apparatus and method for automatically determining configuration parameters for wireless devices
JP2018101923A (en) Wireless analysis apparatus, detection method, and program
KR20150035819A (en) Method for searching for a useful signal in a multiplexing band
US9020078B2 (en) Signal detection device, method of controlling same, program, and wireless communication device
US20230168288A1 (en) Rf signal detection and identification device
CN105116220A (en) Signal analyzing device used for synchronously separating signals and noise and analyzing method thereof
JP5252430B2 (en) Signal detection method, program, information storage medium, and sensor
US10670631B2 (en) Method and a measuring device for investigating signal parameters
CN113014273B (en) Self-adaptive anti-interference method and self-adaptive anti-interference device
CN115118351B (en) Digital signal processing method, electronic reconnaissance equipment and electronic reconnaissance system
CN1776439A (en) Cognitive radio front-end RF signal detection equipment
KR101435362B1 (en) RF sensitivity level measuring method for mobile telecommunication system
CN108390840A (en) Detect the frequency modulated signal demodulating system of narrowband interference or channel variation

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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20250516

AD01 Patent right deemed abandoned