Dynamic frequency offset compensation method, device and system for crystal oscillator-free wireless communication equipment

By receiving the ID packet from an external device, calculating the frequency offset value, and correcting the oscillation frequency, the problem of dynamic frequency offset in crystal-free wireless communication devices is solved, ensuring normal communication under temperature changes.

CN121815390APending Publication Date: 2026-04-07ZHUHAI JIELI TECH
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-23
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In crystal-free wireless communication devices, existing technologies cannot effectively compensate for dynamic frequency offset, resulting in severe frequency deviation during communication and affecting the normal operation of Bluetooth frequency hopping communication, especially when the frequency offset changes drastically with temperature changes.

Method used

By receiving ID packets sent by external devices at different frequency points, the actual receiving frequency and reference clock frequency are determined, the number of frequency divisions is analyzed, the frequency offset value is calculated using the frequency point difference and formula, and the oscillation frequency is corrected to align with the external device clock frequency.

Benefits of technology

Frequency offset compensation for crystal-free wireless communication devices is achieved under conditions such as temperature changes, ensuring normal communication with external devices and reducing the impact of frequency deviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121815390A_ABST
    Figure CN121815390A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic frequency offset compensation method, device and system for crystal oscillator-free wireless communication equipment, and the method comprises the steps: receiving at least two ID packets transmitted by external equipment in a query state through different frequency points in a query scanning state; determining an actual receiving frequency point receiving the at least two ID packets and a reference clock frequency of the crystal oscillator-free wireless communication equipment; analyzing to obtain at least two frequency division numbers of the crystal oscillator-free wireless communication equipment; determining a frequency offset value according to the difference between the at least two actual receiving frequency points and the operation relation between the at least two actual receiving frequency points and the reference clock frequency and the respective frequency division number; and correcting the oscillation frequency of the crystal oscillator-free wireless communication equipment according to the frequency offset value so as to align the clock frequency of the external equipment. In the communication process of the crystal-oscillator-free wireless communication equipment, the reference clock for compensating the dynamic frequency offset is realized, and the crystal-oscillator-free wireless communication equipment can still communicate with external equipment when the frequency offset is changed due to the change of the environment temperature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wireless communication technology, and specifically to a method, apparatus, and system for dynamic frequency offset compensation in crystal-free wireless communication devices. Background Technology

[0002] In the field of wireless communication, to provide an accurate reference frequency, traditional solutions use an external quartz crystal oscillator (crystal oscillator) to generate the clock. Since the quartz crystal itself has a stable oscillation period, it can ensure the normal operation of the communication system. However, in practical applications, the following drawbacks often exist: it is prone to noise, crosstalk, or insufficient crystal frequency tuning; it leads to an increase in the number of components and higher costs; quartz crystals increase PCB area, making them unsuitable for miniaturized devices (such as wearable devices, TWS earphones, etc.); and crystal oscillators consume a certain amount of power during operation, making them unsuitable for low-power devices.

[0003] To address this, an internal oscillator can be used instead of a crystal oscillator to generate the clock. Specifically, wireless communication chips use an internal oscillator instead of a crystal oscillator to generate the clock. However, when using an internal oscillator, a significant difference exists between its frequency and the standard frequency, known as frequency deviation, which can cause the system to malfunction. In existing technologies, frequency deviation can be compensated for through frequency deviation estimation.

[0004] However, this frequency offset compensation method is usually a pre-set fixed value, which cannot cope with the situation where the frequency offset changes. In particular, during the communication process, the capacitors in the LC oscillation circuit of the crystal-free wireless communication device are easily affected by temperature, causing the capacitance value to change with temperature, thereby generating a reference clock frequency offset. This frequency offset seriously interferes with Bluetooth frequency hopping communication under normal conditions, and may even cause communication failure.

[0005] Therefore, how to compensate for the dynamic frequency offset of the reference clock during the communication process of crystal oscillator-less wireless communication devices has become an urgent technical problem to be solved. Summary of the Invention

[0006] Based on the above situation, the main objective of this invention is to provide a method, apparatus, and system for dynamic frequency offset compensation in crystal-free wireless communication devices, so as to compensate for the dynamic frequency offset of the reference clock during the communication process of crystal-free wireless communication devices.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] In a first aspect, this embodiment discloses a dynamic frequency offset compensation method for crystal-free wireless communication devices, including:

[0009] Step S100: In the query scanning state, at least two ID packets sent by an external device in the query state are received using different frequency points. The external device is a terminal without frequency offset and sends different ID packets at different frequency points.

[0010] Step S200: Determine the actual receiving frequency point of receiving at least two ID packets and the reference clock frequency of the crystal-free wireless communication device;

[0011] Step S300: Parse at least two ID packets to obtain at least two frequency division numbers for the crystal-free wireless communication device;

[0012] Step S400: Determine the frequency offset value of the crystal-free wireless communication device relative to the external device based on the difference between at least two actual receiving frequency points and the calculation relationship between at least two actual receiving frequency points and the reference clock frequency and their respective frequency division numbers.

[0013] Step S500: Correct the oscillation frequency of the crystalless wireless communication device according to the frequency offset value to align with the clock frequency of the external device.

[0014] Optionally, the number of ID packets is two;

[0015] In step S200, the actual receiving frequency points of at least two ID packets are the first actual receiving frequency point and the second actual receiving frequency point;

[0016] The number of frequency divisions corresponding to the first actual receiving frequency point is the first frequency division number, and the number of frequency divisions corresponding to the second actual receiving frequency point is the second frequency division number.

[0017] Step S400 includes:

[0018] Step S410: Calculate the operational relationship for the first actual receiving frequency point using the following formula:

[0019] f REF ·(1+ε)N1=f1

[0020] Step S420: Calculate the operational relationship for the second actual receiving frequency using the following formula:

[0021] f REF ·(1+ε)N2=f2

[0022] Among them, f REF The reference clock frequency is ε, which is the frequency offset of the crystalless wireless communication device relative to the external device. N1 and N2 are the first and second frequency division numbers, respectively, and f1 and f2 are the first and second actual receiving frequencies, respectively.

[0023] Step S430: The frequency offset value of the crystal-free wireless communication device relative to the external device is obtained by subtracting the operation relationship of the first actual receiving frequency point and the operation relationship of the second actual receiving frequency point.

[0024] Optionally, in step S430, the frequency offset value of the crystal-free wireless communication device relative to the external device is calculated using the following formula:

[0025]

[0026] Optionally, the number of ID packets can be multiple;

[0027] In step S200, the number of actual receiving frequency points for at least two ID packets is multiple;

[0028] Step S400 includes:

[0029] At least two pairwise frequency offset values ​​are determined based on the differences between each pair of actual received frequencies and the operational relationship between each pair of actual received frequencies, the reference clock frequency, and their respective division numbers. The operational relationship between the actual received frequencies, the reference clock frequency, and their respective division numbers is as follows:

[0030] f REF ·(1+ε)N i =f i

[0031] Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point;

[0032] The frequency offset value is obtained by averaging at least two pairwise frequency offset values.

[0033] Optionally, the number of ID packets can be multiple;

[0034] In step S200, the number of actual receiving frequency points for at least two ID packets is multiple;

[0035] Step S400 includes: calculating the frequency offset value using linear regression, wherein the operational relationship between the actual receiving frequency, the reference clock frequency, and their respective division numbers is as follows:

[0036] f REF ·(1+ε)N i =f i

[0037] Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. iFor the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point.

[0038] Optionally, in step S100, the interval between different frequency points is 10-20MHz.

[0039] Secondly, this embodiment discloses a dynamic frequency offset compensation method for crystal-free wireless communication devices, including:

[0040] Step T100: Before establishing a wireless communication connection, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel are determined. The range of the frequency band interval of the receiving channel covers the frequency offset value of the crystal-free wireless communication device.

[0041] Step T200: Receive the ID packet broadcast by the external device in the frequency band interval of the receiving channel, wherein the external device broadcasts the ID packet on the transmission channel corresponding to the specified receiving channel;

[0042] Step T300: Determine the actual receiving frequency of the received ID packet;

[0043] Step T400: Determine the frequency offset value of the crystal-free wireless communication device relative to the external device based on the difference between the actual receiving frequency and the frequency of the specified receiving channel.

[0044] Step T500: Correct the oscillation frequency of the crystalless wireless communication device according to the frequency offset value to align with the external device clock frequency.

[0045] Optionally, in step T400, the frequency offset value is calculated according to the following formula:

[0046] ε=f r -f ch

[0047] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f r f is the actual receiving frequency. ch Specify the frequency point for the receiving channel.

[0048] Optionally, in step T100, the number of at least one designated receiving channel is more than one, and the frequency difference between different designated receiving channels is greater than a preset value, so that the frequency difference between different designated receiving channels is much greater than the frequency offset value of the crystal-free wireless communication device.

[0049] In step T200, the transmission channels of the external devices correspond one-to-one with each designated receiving channel;

[0050] In step T400, the frequency offset value is determined based on the specified receiving channel of the received ID packet.

[0051] Optionally, step T300 includes: using the frequency point corresponding to a specified channel of the first received ID packet as the actual receiving frequency point;

[0052] Step T400 includes: determining the frequency offset value based on the difference between the actual receiving frequency of the first received ID packet and the frequency of its corresponding designated receiving channel.

[0053] Optionally, step T300 includes: determining the designated channels that received the ID packets and their respective actual receiving frequencies;

[0054] Step T400 includes: determining the frequency offset value of each designated channel based on the difference between each actual receiving frequency point and the frequency point of its corresponding designated receiving channel;

[0055] The frequency offset value is obtained by averaging the frequency offset values ​​of the specified channel.

[0056] Optionally, in step T400, the frequency offset value is calculated using the following formula:

[0057]

[0058] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and n is the number of specified channels receiving ID packets; ε i The frequency offset value for the specified channel of the i-th received ID packet is as follows:

[0059] ε i =f i r -f i ch

[0060] Among them, f i r f is the actual receiving frequency of the specified channel for the i-th received ID packet. i ch The frequency of the specified channel for the i-th received ID packet.

[0061] Optionally, in step T100, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel are determined based on the BLE broadcast protocol.

[0062] Thirdly, this embodiment discloses a dynamic frequency offset compensation device for crystal-free wireless communication equipment, comprising:

[0063] The query scanning module is used to receive at least two ID packets sent by an external device in query mode using different frequency points during query scanning mode. The external device is a terminal without frequency offset and sends different ID packets at different frequency points.

[0064] The frequency point clock determination module is used to determine the actual receiving frequency point of receiving at least two ID packets and the reference clock frequency of the crystal-free wireless communication device;

[0065] The parsing module is used to parse at least two ID packets to obtain at least two frequency division numbers for the crystal-free wireless communication device.

[0066] The frequency offset calculation module is used to determine the frequency offset value of the crystal-free wireless communication device relative to the external device based on the difference between at least two actual receiving frequency points and the calculation relationship between at least two actual receiving frequency points and the reference clock frequency and their respective frequency division numbers.

[0067] The frequency offset compensation module is used to correct the oscillation frequency of crystal-free wireless communication devices based on the frequency offset value, so as to align with the clock frequency of external devices.

[0068] Optionally, the number of ID packets is two;

[0069] In the frequency point clock determination module, the actual receiving frequency points of at least two ID packets are the first actual receiving frequency point and the second actual receiving frequency point;

[0070] The number of frequency divisions corresponding to the first actual receiving frequency point is the first frequency division number, and the number of frequency divisions corresponding to the second actual receiving frequency point is the second frequency division number.

[0071] The frequency offset calculation module includes:

[0072] The first calculation unit is used to calculate the operational relationship of the first actual receiving frequency point using the following formula:

[0073] f REF ·(1+ε)N1=f1

[0074] The second calculation unit is used to calculate the operational relationship of the second actual receiving frequency point using the following formula:

[0075] f REF ·(1+ε)N2=f2

[0076] Among them, f REF The reference clock frequency is ε, which is the frequency offset of the crystalless wireless communication device relative to the external device. N1 and N2 are the first and second frequency division numbers, respectively, and f1 and f2 are the first and second actual receiving frequencies, respectively.

[0077] The difference unit is used to obtain the frequency offset value of the crystal-free wireless communication device relative to the external device by subtracting the operation relationship of the first actual receiving frequency point and the operation relationship of the second actual receiving frequency point.

[0078] Optionally, in the difference unit, the frequency offset of the crystal-free wireless communication device relative to the external device is calculated using the following formula:

[0079]

[0080] Optionally, the number of ID packets can be multiple;

[0081] In the frequency point clock determination module, the actual number of received frequency points for at least two ID packets is multiple;

[0082] The frequency offset calculation module is specifically used for:

[0083] At least two pairwise frequency offset values ​​are determined based on the differences between each pair of actual received frequencies and the operational relationship between each pair of actual received frequencies, the reference clock frequency, and their respective division numbers. The operational relationship between the actual received frequencies, the reference clock frequency, and their respective division numbers is as follows:

[0084] f REF ·(1+ε)N i =f i

[0085] Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point;

[0086] The frequency offset value is obtained by averaging at least two pairwise frequency offset values.

[0087] Optionally, the number of ID packets can be multiple;

[0088] In the frequency point clock determination module, the actual number of received frequency points for at least two ID packets is multiple;

[0089] The frequency offset calculation module includes:

[0090] The linear regression unit is used to calculate the frequency offset using linear regression. The relationship between the actual received frequency, the reference clock frequency, and the respective frequency division factor is as follows:

[0091] f REF ·(1+ε)N i =f i

[0092] Among them, f REFThe reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point.

[0093] Optionally, in the query scanning module, the interval between different frequency points is 10-20MHz.

[0094] Fourthly, this embodiment discloses a dynamic frequency offset compensation device for crystal-free wireless communication equipment, comprising:

[0095] The channel determination module is used to determine at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel before establishing a wireless communication connection. The range of the receiving channel frequency band interval covers the frequency offset value of the crystal-free wireless communication device.

[0096] The ID receiving module is used to receive ID packets broadcast by external devices in the frequency band range of the receiving channel, wherein the external device broadcasts ID packets on the transmission channel corresponding to the specified receiving channel;

[0097] The frequency point determination module is used to determine the actual receiving frequency point of the received ID packet;

[0098] The frequency offset determination module is used to determine the frequency offset value of the crystal-free wireless communication device relative to the external device based on the difference between the actual receiving frequency and the frequency of the specified receiving channel.

[0099] The compensation module is used to correct the oscillation frequency of the crystalless wireless communication device based on the frequency offset value, so as to align with the clock frequency of the external device.

[0100] Optionally, in the frequency offset determination module, the frequency offset value is calculated according to the following formula:

[0101] ε=f r -f ch

[0102] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f r f is the actual receiving frequency. ch Specify the frequency point for the receiving channel.

[0103] Optionally, in the channel determination module, there is at least one designated receiving channel with more than one number, and the frequency difference between different designated receiving channels is greater than a preset value, so that the frequency difference between different designated receiving channels is much greater than the frequency offset value of the crystal-free wireless communication device.

[0104] In the ID receiving module, the external device's transmission channel corresponds one-to-one with each designated receiving channel;

[0105] In the frequency offset determination module, the frequency offset value is determined based on the specified receiving channel of the received ID packet.

[0106] Optionally, the frequency point determination module is specifically used to: take the frequency point corresponding to a specified channel of the first received ID packet as the actual receiving frequency point;

[0107] The frequency offset determination module is specifically used to determine the frequency offset value based on the difference between the actual receiving frequency of the first received ID packet and the frequency of its corresponding designated receiving channel.

[0108] Optionally, the frequency point determination module is specifically used to: determine the specified channels of multiple received ID packets and their respective actual receiving frequencies;

[0109] The frequency offset determination module is specifically used to: determine the frequency offset value of each designated channel based on the difference between each actual receiving frequency point and the frequency point of its corresponding designated receiving channel.

[0110] The frequency offset value is obtained by averaging the frequency offset values ​​of the specified channel.

[0111] Optionally, in the frequency offset determination module, the frequency offset value is calculated using the following formula:

[0112]

[0113] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and n is the number of specified channels receiving ID packets; ε i The frequency offset value for the specified channel of the i-th received ID packet is as follows:

[0114] ε i =f i r -f i ch

[0115] Among them, f i r f is the actual receiving frequency of the specified channel for the i-th received ID packet. i ch The frequency of the specified channel for the i-th received ID packet.

[0116] Optionally, in the channel determination module, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel are determined based on the BLE broadcast protocol.

[0117] Fifthly, this embodiment discloses a computer device, including:

[0118] The methods disclosed in the first and second aspects above are used to achieve dynamic frequency offset compensation for crystal-free wireless communication devices, or the apparatus disclosed in the third and fourth aspects above is included.

[0119] In a sixth aspect, this embodiment discloses a computer-readable storage medium having a computer program stored thereon, the computer program stored in the storage medium being executed by a processor to implement the methods disclosed in the first and second aspects above.

[0120] In a seventh aspect, this embodiment discloses a crystal-free wireless communication chip having an integrated circuit, which is designed to implement the methods disclosed in the first and second aspects above.

[0121] Optionally, the wireless communication chip is a Bluetooth chip.

[0122] Eighthly, this embodiment discloses a dynamic frequency offset compensation system for crystal-free wireless communication devices, which has an integrated circuit, including:

[0123] Host equipment;

[0124] The crystal-free wireless communication chip disclosed in the seventh aspect above interacts with the host device for data exchange.

[0125] Beneficial effects:

[0126] According to embodiments of the present invention, a method, apparatus, and system for dynamic frequency offset compensation of a crystal-free wireless communication device are disclosed. In a query scanning state, at least two ID packets sent by an external device in the query state are received using different frequency points. Then, the actual receiving frequency points of the received at least two ID packets and the reference clock frequency of the crystal-free wireless communication device are determined, and the at least two ID packets are parsed to obtain at least two frequency division numbers for the crystal-free wireless communication device. The operational relationship between the actual receiving frequency points, the reference clock frequency, and their respective frequency division numbers carries the frequency offset information of the crystal-free wireless communication device. Therefore, the frequency offset value of the crystal-free wireless communication device relative to the external device can be determined by the difference between at least two actual receiving frequency points. Based on this, the oscillation frequency of the crystal-free wireless communication device can be corrected according to the frequency offset value, thereby aligning with the clock frequency of the external device. In other words, a reference clock for compensating dynamic frequency offset is achieved during the communication process of the crystal-free wireless communication device, ensuring that the crystal-free wireless communication device can still communicate with the external device even when the frequency offset changes due to changes in ambient temperature.

[0127] According to the embodiments of the present invention, a method, apparatus, and system for dynamic frequency offset compensation of a crystal-free wireless communication device are disclosed. Before establishing a wireless communication connection, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel adjacent to and continuous with the designated receiving channel are determined. Since the range of the receiving channel frequency band interval covers the frequency offset value of the crystal-free wireless communication device, even if the crystal-free wireless communication device has a certain frequency offset, as long as the frequency offset does not exceed the frequency band interval of the receiving channel, the crystal-free wireless communication device can successfully receive the ID packet broadcast by the external device during the process of the external device broadcasting ID packets on the transmission channel corresponding to the designated receiving channel. The actual receiving frequency point can be determined by the received ID packet. Thus, the frequency offset value of the crystal-free wireless communication device can be determined by the difference between the actual receiving frequency point and the frequency point of the designated receiving channel, thereby realizing frequency offset compensation.

[0128] Other beneficial effects of the present invention will be explained in detail through the introduction of specific technical features and technical solutions in specific embodiments. Those skilled in the art should be able to understand the beneficial technical effects brought about by these technical features and technical solutions through the introduction of these technical features and technical solutions. Attached Figure Description

[0129] The embodiments of the present invention will now be described with reference to the accompanying drawings. In the drawings:

[0130] Figure 1 This is a flowchart of a dynamic frequency offset compensation method for a crystal-free wireless communication device disclosed in this embodiment;

[0131] Figure 2 This is a schematic diagram illustrating the data interaction timing between a crystal-free wireless device and an external device as disclosed in this embodiment;

[0132] Figure 3 This is a schematic diagram of a dynamic frequency offset compensation device for a crystal-free wireless communication device disclosed in this embodiment; Figure 4 This is a flowchart of another dynamic frequency offset compensation method for crystal-free wireless communication devices disclosed in this embodiment; Figure 5 This is a schematic diagram illustrating an example of receiving external broadcast data disclosed in this embodiment; Figure 6 This is a schematic diagram of a dynamic frequency offset compensation device for a crystal-free wireless communication device disclosed in this embodiment. Detailed Implementation

[0133] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the following detailed description of the present invention, some specific details are described in detail, but well-known methods, processes, procedures, and elements are not described in detail in order to avoid obscuring the essence of the present invention.

[0134] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0135] Unless the context explicitly requires it, the words "comprising," "including," and similar terms throughout the specification and claims should be interpreted as encompassing rather than being exclusive or exhaustive; that is, meaning "including but not limited to."

[0136] In the description of this invention, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0137] To compensate for dynamic frequency offset in crystal-free wireless communication devices, this embodiment discloses a method for dynamic frequency offset compensation in crystal-free wireless communication devices. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating a dynamic frequency offset compensation method for a crystal-free wireless communication device disclosed in this embodiment. The wireless communication can be Bluetooth communication or a custom wireless communication method. Taking Bluetooth communication as an example, it can be classic Bluetooth or BLE, etc. This embodiment uses a Bluetooth device as an example for illustration. The dynamic frequency offset compensation method includes steps S100, S200, S300, S400, and S500, wherein:

[0138] Step S100: In the query scanning state, at least two ID packets sent by an external device in the query state are received using different frequency points. In this embodiment, the external device is a terminal without frequency offset, and it sends different ID packets at different frequency points. In specific implementation, taking Bluetooth communication as an example, the external device can be, for example, a mobile phone; the crystal-free wireless communication device can be, for example, a crystal-free Bluetooth headset; in specific implementation, the wireless communication device can also be other devices that need to achieve wireless communication based on a reference clock. In specific implementation, the external device acts as the host device, and it can be assumed that its clock frequency has no frequency offset. The host device sends ID packets according to the standard Bluetooth protocol in the query state (inquiry state), typically using 32 frequency points: 0, 2, 4, 6, 8, 10, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77. During this period, when the crystal-free wireless communication device, acting as a slave device, is in the paging scan state (inquiry_scan receiving state), it can search for ID packets sent by the over-the-air host device in the inquiry state. This allows the host to discover the slave device and obtain each other's addresses. When the slave device is operating in the query scan state (page scan state), it can exchange information such as frequency points and frequency hopping sequences with the host device to establish a pairing connection. In this embodiment, the external device sends ID packets on at least two different frequency points, and the crystal-free wireless communication device will also receive ID packets sent by the external device on different frequency points. It should be noted that the above query and paging scan are only exemplary descriptions. In specific implementations, the query method and the number of frequency points are determined according to the specific communication method. For example, in the case of BLE, three frequency points are usually broadcast.

[0139] Step S200: Determine the actual receiving frequency point of receiving at least two ID packets and the reference clock frequency f of the crystal-free wireless communication device. REF Please refer to this. Figure 2 , Figure 2 This is a timing diagram illustrating data interaction between a crystal-free wireless device and an external device, as disclosed in this embodiment. Tx represents the transmit channel table, and Rx represents the receive channel table. Figure 2 The left side shows the receive channel table E_Rx for the crystal-free wireless device (E), and the right side shows the transmit channel table P_Tx for the external device (P). Path1 and Path2 represent two transmit and receive channels, respectively. E f represents the frequency hopping interval at the crystal-free wireless device (E). PThis indicates the frequency hopping interval of the external device (P). Taking Bluetooth communication as an example, to avoid inter-channel interference, the channel tables for Tx and Rx generally cannot overlap. After Bluetooth communication is established, the headset and mobile phone share the same Tx and Rx channels, as well as the Tx-to-Rx frequency hopping table. The Bluetooth device discovery (BT page) protocol itself sets 32 integer MHz frequency points as the operating frequency band. It should be noted that... Figure 2 For illustrative purposes only. Figure 2 The information provided does not represent the actual Bluetooth operating channel and frequency hopping correspondence. When a crystal-free wireless device receives an ID packet from an external device, it can determine the actual frequency at which the ID packet was received based on the receive channel table E_Rx on the crystal-free wireless device (E). In practical implementation, the reference clock frequency f of the crystal-free wireless communication device can be directly obtained locally. REF .

[0140] Step S300: Parse at least two ID packets to obtain at least two frequency division numbers for the crystal-free wireless communication device. In a specific embodiment, the frequency division number information is loaded into the ID packet sent by the external device. Therefore, when the crystal-free wireless communication device receives the ID packet, the frequency division number information of the crystal-free wireless communication device can be obtained by parsing the ID packet.

[0141] It should be noted that, in the specific implementation process, there is no restriction on the execution order between steps S200 and S300.

[0142] Step S400, based on the difference between at least two actual receiving frequencies and the difference between at least two actual receiving frequencies and the reference clock frequency f REF The frequency offset of the crystal-free wireless communication device relative to the external device is determined by the calculation relationship between the respective frequency division numbers and the frequency ratios. Specifically, the crystal-free wireless communication device, upon obtaining the actual receiving frequency and the reference clock frequency f... REF After determining the number of frequency divisions, the frequency offset of the crystal-free wireless communication device relative to the external device can be determined using the following formula:

[0143] f REF ·(1+ε)N i =f i …………Formula 1

[0144] In the formula, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, typically measured in ppm; N i f represents the number of frequency divisions for the i-th receiving frequency point. iLet be the i-th actual receiving frequency point; from this, the frequency offset ε of the crystalless wireless communication device relative to the external device can be calculated. In order to eliminate errors, this embodiment determines the frequency offset ε using at least two actual receiving frequency points. The difference between at least two actual receiving frequency points can partially eliminate floating-point errors and receiver system errors.

[0145] Step S500: Correct the oscillation frequency of the crystal-free wireless communication device according to the frequency offset value to align with the external device clock frequency. In specific implementation, the oscillation frequency output by the oscillator in the crystal-free wireless communication device can be corrected to align the oscillation frequency with the external device clock frequency.

[0146] In one embodiment, please refer to Figure 2 The number of ID packets is two; in step S200, the actual receiving frequency points of at least two ID packets are the first actual receiving frequency point f1 and the second actual receiving frequency point f2; the frequency division number corresponding to the first actual receiving frequency point f1 is the first frequency division number N1, and the frequency division number corresponding to the second actual receiving frequency point f2 is the second frequency division number N2; step S400 includes:

[0147] Step S410: Calculate the operational relationship for the first actual receiving frequency point f1 using the following formula:

[0148] f REF ·(1+ε)N1=f1…………Formula 2

[0149] Step S420: Calculate the operational relationship for the second actual receiving frequency point f2 using the following formula:

[0150] f REF ·(1+ε)N2=f2………………Formula 3

[0151] Among them, f REF The reference clock frequency is ε, which is the frequency offset of the crystalless wireless communication device relative to the external device. N1 and N2 are the first and second frequency division numbers, respectively, and f1 and f2 are the first and second actual receiving frequencies, respectively. Specifically, the external device sends ID data at different frequencies in the inquiry state. The crystalless wireless communication device receives the ID packets of the two frequencies through Path1 and Path2, respectively. The corresponding actual receiving frequencies are the first actual receiving frequency f1 and the second actual receiving frequency f2. Then, the frequency offset ε of the crystalless wireless communication device relative to the external device can be calculated using step S430.

[0152] Step S430: The frequency offset value of the crystal-free wireless communication device relative to the external device is obtained by subtracting the operation relationship between the first actual receiving frequency point f1 and the second actual receiving frequency point f2. In specific implementation, in step S430, the frequency offset value of the crystal-free wireless communication device relative to the external device is calculated using the following formula:

[0153]

[0154] Specifically, we can use the difference between the two sides of equations 2 and 3 and rearrange them to obtain equation 4.

[0155] In another embodiment, the number of ID packets is multiple; in step S200, the number of actual receiving frequency points for at least two ID packets is multiple; step S400 includes: based on the difference between each pair of actual receiving frequency points and the difference between each pair of actual receiving frequency points and the reference clock frequency f. REF The calculation relationship between the frequency division number and the frequency offset number determines at least two pairwise frequency offset values, where the actual receiving frequency point and the reference clock frequency f are... REF The operational relationship between the frequency division number and the frequency division number is as follows:

[0156] f REF ·(1+ε)N i =f i

[0157] This formula is Formula 1, where f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. i For the i-th actual receiving frequency, N i Let f be the frequency division number corresponding to the i-th actual receiving frequency point; then, using Formula 1, determine the actual receiving frequency point and the reference clock frequency f respectively. REF After calculating the relationship between the frequency division number and the frequency offset, at least two pairwise frequency offset values ​​can be determined using Formula 4, and then the average of the at least two pairwise frequency offset values ​​can be used to obtain the frequency offset value.

[0158] In this embodiment, the frequency offset value is calculated by using multiple ID packets, and then the average of the pairwise frequency offset values ​​is obtained, which can partially eliminate floating-point errors and receiver system errors.

[0159] In another embodiment, the number of ID packets is multiple; in step S200, the number of actual receiving frequencies for at least two ID packets is multiple; step S400 includes: calculating the frequency offset value using linear regression, wherein the actual receiving frequency point and the reference clock frequency f are... REF The operational relationship between the frequency division number and the frequency division number is as follows:

[0160] f REF ·(1+ε)N i =fi

[0161] This formula is Formula 1, where f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point.

[0162] In this embodiment, the frequency offset values ​​are calculated pairwise using multiple ID packets, and then linear regression is used to calculate the frequency offset values, which can partially eliminate floating-point errors and receiver system errors.

[0163] To further reduce the floating-point error of frequency points, in an optional embodiment, the interval between different frequency points in step S100 is 10-20MHz. In this embodiment, the interval between different frequency points refers to the frequency difference of the channel, rather than the proximity of the frequency hopping table.

[0164] This embodiment also discloses a dynamic frequency offset compensation device for crystal-free wireless communication equipment. Please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram of a dynamic frequency offset compensation device for a crystal-free wireless communication device disclosed in this embodiment. The device includes: a query scanning module 100, a frequency point clock determination module 200, a parsing module 300, a frequency offset calculation module 400, and a frequency offset compensation module 500, wherein:

[0165] The query scanning module 100 is used to receive at least two ID packets sent by an external device in the query state using different frequency points during the query scanning state. The external device is a terminal without frequency offset and sends different ID packets at different frequency points.

[0166] Frequency point clock determination module 200 is used to determine the actual receiving frequency point of at least two ID packets received and the reference clock frequency f of the crystal-free wireless communication device. REF ;

[0167] The parsing module 300 is used to parse at least two ID packets to obtain at least two frequency division numbers for the crystal-free wireless communication device;

[0168] Frequency offset calculation module 400 is used to calculate based on the difference between at least two actual received frequencies and the difference between at least two actual received frequencies and a reference clock frequency f. REF The frequency offset value of the crystal-free wireless communication device relative to the external device is determined by the calculation relationship between the respective frequency division numbers;

[0169] The frequency offset compensation module 500 is used to correct the oscillation frequency of the crystalless wireless communication device based on the frequency offset value in order to align with the clock frequency of the external device.

[0170] In an optional embodiment, the number of ID packets is two;

[0171] In the frequency point clock determination module 200, the actual receiving frequency points of at least two ID packets are the first actual receiving frequency point f1 and the second actual receiving frequency point f2.

[0172] The number of frequency divisions corresponding to the first actual receiving frequency point f1 is the first number of frequency divisions N1, and the number of frequency divisions corresponding to the second actual receiving frequency point f2 is the second number of frequency divisions N2.

[0173] The frequency offset calculation module 400 includes:

[0174] The first calculation unit is used to calculate the operational relationship of the first actual receiving frequency point f1 using the following formula:

[0175] f REF ·(1+ε)N1=f1

[0176] The second calculation unit is used to calculate the operational relationship of the second actual receiving frequency point f2 using the following formula:

[0177] f REF ·(1+ε)N2=f2

[0178] Among them, f REF The reference clock frequency is ε, which is the frequency offset of the crystalless wireless communication device relative to the external device. N1 and N2 are the first and second frequency division numbers, respectively, and f1 and f2 are the first and second actual receiving frequencies, respectively.

[0179] The difference unit is used to obtain the frequency offset value of the crystal-free wireless communication device relative to the external device by subtracting the operation relationship of the first actual receiving frequency point f1 and the operation relationship of the second actual receiving frequency point f2.

[0180] In an optional embodiment, the frequency offset of the crystal-free wireless communication device relative to the external device is calculated in the difference unit using the following formula:

[0181]

[0182] In an optional embodiment, the number of ID packets is multiple;

[0183] In the frequency point clock determination module 200, the actual number of receiving frequency points for at least two ID packets is multiple;

[0184] The frequency offset calculation module 400 is specifically used for:

[0185] Based on the differences between each pair of actual receiving frequencies and the difference between each pair of actual receiving frequencies and the reference clock frequency f REFThe calculation relationship between the frequency division number and the frequency offset number determines at least two pairwise frequency offset values, where the actual receiving frequency point and the reference clock frequency f are... REF The operational relationship between the frequency division number and the frequency division number is as follows:

[0186] f REF ·(1+ε)N i =f i

[0187] Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point;

[0188] The frequency offset value is obtained by averaging at least two pairwise frequency offset values.

[0189] In an optional embodiment, the number of ID packets is multiple;

[0190] In the frequency point clock determination module 200, the actual number of receiving frequency points for at least two ID packets is multiple;

[0191] The frequency offset calculation module 400 includes:

[0192] The linear regression unit is used to calculate the frequency offset using linear regression, where the actual received frequency point and the reference clock frequency f are intersected. REF The operational relationship between the frequency division number and the frequency division number is as follows:

[0193] f REF ·(1+ε)N i =f i

[0194] Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystalless wireless communication device relative to the external device, and f is the frequency of reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point.

[0195] In an optional embodiment, the interval between different frequency points in the query scanning module 100 is 10-20MHz.

[0196] This embodiment also discloses a dynamic frequency offset compensation method for crystal-free wireless communication devices. Please refer to [link / reference]. Figure 4 , Figure 4 This is a flowchart of another dynamic frequency offset compensation method for crystal-free wireless communication devices disclosed in this embodiment. The dynamic frequency offset compensation method for crystal-free wireless communication devices includes steps T100, T200, T300, T400, and T500, wherein:

[0197] Step T100: Before establishing a wireless communication connection, at least one designated receiving channel for receiving external broadcast data and a frequency band interval adjacent to and continuous with the designated receiving channel are determined. In this embodiment, the range of the receiving channel frequency band interval covers the frequency offset value of the crystal-free wireless communication device. For specific implementation details, please refer to... Figure 5 , Figure 5 This is a schematic diagram illustrating an example of receiving external broadcast data disclosed in this embodiment. Figure 5 The diagram illustrates three receive channels (Rx), namely f1 ch f2 ch and f3 ch The corresponding frequency points are 2402MHz, 2442MHz, and 2478MHz, respectively. In this embodiment, after selecting at least one designated receiving channel, the receiving frequency band interval of the at least one designated receiving channel can be expanded, for example, expanded to dMHz (e.g., Figure 5 As indicated by the arrow, the frequency points in this receiving channel frequency band are adjacent and continuous. That is, external broadcast data can be received within this receiving channel frequency band. Since the range of the receiving channel frequency band covers the frequency offset value of crystal-free wireless communication devices, external broadcast data can be received as long as the carrier frequency offset of the external broadcast data does not exceed the frequency band adjacent to the specified receiving channel.

[0198] In step T100, at least one designated receiving channel and a frequency band interval adjacent to and continuous with the designated receiving channel are determined based on the BLE broadcast protocol. Specifically, based on the BLE broadcast protocol, ID packets can be broadcast through three transmitting channels before the communication connection is established. In this embodiment, based on the protocol, three receiving channels can be selected to correspond to the three transmitting channels. Thus, frequency offset estimation and compensation in this embodiment can be achieved without changing the communication protocol of the external device.

[0199] Step T200: Receive the ID packet broadcast by the external device within the receiving channel frequency band. Specifically, the external device broadcasts the ID packet on the transmitting channel corresponding to the designated receiving channel. The transmitting channel (Tx) of the external device corresponds to the receiving channel (Rx) frequency of the crystal-free wireless communication device. In practice, a transmitting channel table and a receiving channel table can be generated based on the frequency hopping mechanism of wireless communication. These tables are loaded with their respective channel information. During the external device's data broadcasting process, when the transmitting channel (Tx) frequency of the external device is equal to the receiving channel (Rx) frequency of the crystal-free wireless communication device, the crystal-free wireless communication device can receive the ID packet broadcast by the external device on the transmitting channel. In this embodiment, the crystal-free wireless communication device receives the ID packet broadcast by the external device on at least one designated receiving channel. Therefore, when the external device broadcasts the ID packet through the transmitting channel corresponding to the designated receiving channel, the crystal-free wireless communication device can receive the ID packet. Considering the frequency offset of crystal-free wireless communication devices, the receiving frequency of the designated receiving channel is expanded to a frequency band interval. As long as the carrier frequency offset of the external broadcast data does not exceed the frequency band interval adjacent to the designated receiving channel, the external broadcast data can be received. Figure 5 In the middle, f r =2449MHz represents the received signal of a crystal-free wireless communication device, which falls within f2. ch Within the frequency band range.

[0200] Step T300: Determine the actual receiving frequency of the received ID packet. Upon receiving an ID packet broadcast by an external device, the actual frequency at which the crystal-free wireless communication device receives the ID packet can be determined; that is, the actual receiving frequency of the received ID packet. Figure 5 Chinese F1 r f2 r and f3 r The example provided.

[0201] Step T400 involves determining the frequency offset of the crystal-free wireless communication device relative to the external device based on the difference between the actual receiving frequency and the frequency of the designated receiving channel. In a specific embodiment, when step T100 is executed to determine at least one designated receiving channel for receiving external broadcast data, the frequency of the designated receiving channel, such as f1, can be obtained. ch f2 ch and / or f3 ch Then, after learning the actual receiving frequency of the received ID packet (e.g., f1) r f2 r or f3 r After that, the frequency offset value of the crystal-free wireless communication device relative to the external device can be determined based on the difference between the two. Specifically, the frequency offset value can be calculated using the following formula:

[0202] ε=f r -f ch …………Formula 5

[0203] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f r f is the actual receiving frequency. ch Specify the frequency point for the receiving channel.

[0204] Please refer to Figure 5 Example, actual receiving frequency point f r =2449MHz (i.e., f2) r =2449MHz); specify the frequency point f2 of the receiving channel. ch The corresponding frequency points are 2442MHz, i.e., f2. ch =2442MHz. f2 r f2 ch Substituting into formula 5, we know that ε = f2 r -f2 ch =2449MHz-2442MHz=7MHz, which means that the frequency offset ε of the crystal-free wireless communication device relative to the external device is 7MHz.

[0205] Step T500 involves correcting the oscillation frequency of the crystal-free wireless communication device based on the frequency offset value to align with the external device's clock frequency. In practice, the oscillation frequency output by the oscillator in the crystal-free wireless communication device can be corrected to align with the external device's clock frequency.

[0206] To ensure the accuracy and reliability of frequency offset estimation, in an optional embodiment, in step T100, the number of at least one designated receiving channel is greater than one, and the frequency difference between different designated receiving channels is greater than a preset value, so that the frequency difference between different designated receiving channels is much greater than the frequency offset value of the crystal-free wireless communication device; in step T200, the transmission channel of the external device corresponds one-to-one with each designated receiving channel; in step T400, the frequency offset value is determined based on the designated receiving channel of the received ID packet. Specifically, the frequency difference between different designated receiving channels can be greater than, for example, 20MHz. In this embodiment, by setting the frequency difference between different designated receiving channels to be greater than a preset value, when the crystal-free wireless communication device experiences frequency offset, its frequency offset will not shift from one channel to another, thereby ensuring the accuracy and reliability of frequency offset estimation.

[0207] In one embodiment, in order to improve the efficiency of frequency offset compensation, the frequency offset value can be estimated using the channel that first receives the ID packet. Specifically, step T300 includes: taking the frequency point corresponding to a designated channel of the first received ID packet as the actual receiving frequency point; step T400 includes: determining the frequency offset value based on the difference between the actual receiving frequency point of the first received ID packet and the frequency point of its corresponding designated receiving channel.

[0208] In another embodiment, to partially eliminate floating-point errors and receiver system errors, an average value can be used to determine the frequency offset. Specifically, step T300 includes: determining multiple designated channels that receive ID packets and their respective actual receiving frequencies; step T400 includes: determining the frequency offset value of each designated channel based on the difference between the frequencies of each actual receiving frequency and its corresponding designated receiving channel; and averaging the designated channel frequency offset values ​​to obtain the frequency offset value. In a specific embodiment, in step T400, the frequency offset value is calculated using the following formula:

[0209]

[0210] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and n is the number of specified channels receiving ID packets; ε i The frequency offset value for the specified channel of the i-th received ID packet is as follows:

[0211] ε i =f i r -f i ch …………Formula 7

[0212] This formula is Formula 5, where f i r f is the actual receiving frequency of the specified channel for the i-th received ID packet. i ch Let be the frequency of the designated channel for the i-th received ID packet. In this embodiment, after calculating the frequency offset of each designated channel using Formula 7, Formula 6 is used to average the frequency offsets of each designated channel to obtain the final frequency offset value. In this embodiment, calculating the average frequency offset using multiple designated channels can partially eliminate floating-point errors and receiver system errors.

[0213] This embodiment also discloses a dynamic frequency offset compensation device for crystal-free wireless communication equipment. Please refer to [link / reference]. Figure 6 , Figure 6This is a schematic diagram of a dynamic frequency offset compensation device for a crystal-free wireless communication device disclosed in this embodiment. The device includes: a channel determination module 10, an ID receiving module 20, a frequency point determination module 30, a frequency offset determination module 40, and a compensation module 50, wherein:

[0214] The channel determination module 10 is used to determine at least one designated receiving channel for receiving external broadcast data and a receiving channel frequency band interval adjacent to and continuous with the designated receiving channel before establishing a wireless communication connection. The range of the receiving channel frequency band interval covers the frequency offset value of the crystal-free wireless communication device.

[0215] ID receiving module 20 is used to receive ID packets broadcast by external devices in the frequency band range of the receiving channel, wherein the external device broadcasts ID packets on the transmission channel corresponding to the specified receiving channel;

[0216] Frequency point determination module 30 is used to determine the actual receiving frequency point of the received ID packet;

[0217] The frequency offset determination module 40 is used to determine the frequency offset value of the crystal-free wireless communication device relative to the external device based on the difference between the actual receiving frequency point and the frequency point of the specified receiving channel.

[0218] The compensation module 50 is used to correct the oscillation frequency of the crystalless wireless communication device based on the frequency offset value in order to align with the clock frequency of the external device.

[0219] In an optional embodiment, the frequency offset determination module 40 calculates the frequency offset value according to the following formula:

[0220] ε=f r -f ch

[0221] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f r f is the actual receiving frequency. ch Specify the frequency point for the receiving channel.

[0222] In an optional embodiment, in the channel determination module 10, the number of at least one designated receiving channel is more than one, and the frequency difference between different designated receiving channels is greater than a preset value, so that the frequency difference between different designated receiving channels is much greater than the frequency offset value of the crystal-free wireless communication device.

[0223] In the ID receiving module 20, the transmission channels of external devices correspond one-to-one with each designated receiving channel;

[0224] In the frequency offset determination module 40, the frequency offset value is determined based on the specified receiving channel of the received ID packet.

[0225] In an optional embodiment, the frequency point determination module 30 is specifically used to: take the frequency point corresponding to a specified channel of the first received ID packet as the actual receiving frequency point;

[0226] The frequency offset determination module 40 is specifically used to determine the frequency offset value based on the difference between the actual receiving frequency point of the first received ID packet and the frequency point of its corresponding designated receiving channel.

[0227] In an optional embodiment, the frequency point determination module 30 is specifically used to: determine the designated channels that receive ID packets and their respective actual receiving frequencies;

[0228] The frequency offset determination module 40 is specifically used to: determine the frequency offset value of each designated channel based on the difference between each actual receiving frequency point and the frequency point of each corresponding designated receiving channel.

[0229] The frequency offset value is obtained by averaging the frequency offset values ​​of the specified channel.

[0230] In an optional embodiment, the frequency offset value is calculated in the frequency offset determination module 40 using the following formula:

[0231]

[0232] Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and n is the number of specified channels receiving ID packets; ε i The frequency offset value for the specified channel of the i-th received ID packet is as follows:

[0233] ε i =f i r -f i ch

[0234] Among them, f i r f is the actual receiving frequency of the specified channel for the i-th received ID packet. i ch The frequency of the specified channel for the i-th received ID packet.

[0235] In an optional embodiment, in the channel determination module 10, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel are determined based on the BLE broadcast protocol.

[0236] This embodiment also discloses a computer device, including:

[0237] The method disclosed in the above embodiments can be used to achieve dynamic frequency offset compensation for crystal-free wireless communication devices, or the apparatus disclosed in the above embodiments can be used.

[0238] This embodiment also discloses a crystal-free wireless communication chip having an integrated circuit, which is designed to implement the methods disclosed in the above embodiments.

[0239] In an optional embodiment, the wireless communication chip is a Bluetooth chip.

[0240] This embodiment also discloses a crystal-free wireless communication device dynamic frequency offset compensation system, which has an integrated circuit and includes: a host device; and the crystal-free wireless communication chip disclosed in the above embodiment, which interacts with the host device.

[0241] According to embodiments of the present invention, a method, apparatus, and system for dynamic frequency offset compensation of a crystal-free wireless communication device are disclosed. In a query scanning state, at least two ID packets sent by an external device in the query state are received using different frequency points. Then, the actual receiving frequency points of the received at least two ID packets and the reference clock frequency of the crystal-free wireless communication device are determined, and the at least two ID packets are parsed to obtain at least two frequency division numbers for the crystal-free wireless communication device. The operational relationship between the actual receiving frequency points, the reference clock frequency, and their respective frequency division numbers carries the frequency offset information of the crystal-free wireless communication device. Therefore, the frequency offset value of the crystal-free wireless communication device relative to the external device can be determined by the difference between at least two actual receiving frequency points. Based on this, the oscillation frequency of the crystal-free wireless communication device can be corrected according to the frequency offset value, thereby aligning with the clock frequency of the external device. In other words, a reference clock for compensating dynamic frequency offset is achieved during the communication process of the crystal-free wireless communication device, ensuring that the crystal-free wireless communication device can still communicate with the external device even when the frequency offset changes due to changes in ambient temperature.

[0242] According to the embodiments of the present invention, a method, apparatus, and system for dynamic frequency offset compensation of a crystal-free wireless communication device are disclosed. Before establishing a wireless communication connection, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel adjacent to and continuous with the designated receiving channel are determined. Since the range of the receiving channel frequency band interval covers the frequency offset value of the crystal-free wireless communication device, even if the crystal-free wireless communication device has a certain frequency offset, as long as the frequency offset does not exceed the frequency band interval of the receiving channel, the crystal-free wireless communication device can successfully receive the ID packet broadcast by the external device during the process of the external device broadcasting ID packets on the transmission channel corresponding to the designated receiving channel. The actual receiving frequency point can be determined by the received ID packet. Thus, the frequency offset value of the crystal-free wireless communication device can be determined by the difference between the actual receiving frequency point and the frequency point of the designated receiving channel, thereby realizing frequency offset compensation.

[0243] In addition, the present invention provides a computer-readable storage medium, such as a chip, an optical disc, etc., on which an executable program is stored, which, when executed, implements the method described in any of the above-mentioned embodiments.

[0244] It should be noted that the computer-readable storage medium described in the embodiments of this disclosure is not limited to the embodiments given above. For example, it can also be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the embodiments of this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0245] It will be understood by those skilled in the art that the above-described preferred solutions can be freely combined and superimposed without conflict. The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings; for example, two consecutively indicated blocks may actually be executed substantially in parallel, or sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. The numbering of each step in this document is for ease of explanation and reference only and is not intended to limit the order of execution. The specific execution order is determined by the technology itself, and those skilled in the art can determine various permissible and reasonable orders based on the technology itself.

[0246] It should be noted that the use of step numbers (letters or numbers) to refer to certain specific method steps in this invention is merely for the purpose of convenience and brevity in description, and is by no means intended to restrict the order of these method steps. Those skilled in the art will understand that the order of the relevant method steps should be determined by the technology itself and should not be unduly restricted by the existence of step numbers. Those skilled in the art can determine various permissible and reasonable orderings of steps based on the technology itself.

[0247] Those skilled in the art will understand that, without conflict, the above-mentioned preferred solutions can be freely combined and superimposed.

[0248] It should be understood that the above embodiments are merely exemplary and not restrictive. Various obvious or equivalent modifications or substitutions that can be made by those skilled in the art regarding the above details without departing from the basic principles of the present invention will be included within the scope of the claims of the present invention.

Claims

1. A method for dynamic frequency offset compensation in crystal-free wireless communication devices, characterized in that, include: Step S100: In the query scanning state, at least two ID packets sent by an external device in the query state are received using different frequency points, wherein the external device is a terminal without frequency offset and sends different ID packets at different frequency points; Step S200: Determine the actual receiving frequency point of the received at least two ID packets and the reference clock frequency (f) of the crystalless wireless communication device. REF ); Step S300: Parse the at least two ID packets to obtain at least two frequency division numbers for the crystal-free wireless communication device; Step S400, based on the difference between at least two actual receiving frequencies and the difference between the at least two actual receiving frequencies and the reference clock frequency (f REF The frequency offset value of the crystal-free wireless communication device relative to the external device is determined by the calculation relationship between the frequency division number and the frequency division number. Step S500: Correct the oscillation frequency of the crystalless wireless communication device according to the frequency offset value to align with the clock frequency of the external device.

2. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 1, characterized in that, The number of ID packets is two; In step S200, the actual receiving frequency points of the at least two ID packets are the first actual receiving frequency point (f1) and the second actual receiving frequency point (f2); The number of frequency divisions corresponding to the first actual receiving frequency point (f1) is the first number of frequency divisions (N1), and the number of frequency divisions corresponding to the second actual receiving frequency point (f2) is the second number of frequency divisions (N2). Step S400 includes: Step S410: Calculate the operational relationship of the first actual receiving frequency point (f1) using the following formula: f REF ·(1+ε)N1=f1 Step S420: Calculate the operational relationship of the second actual receiving frequency point (f2) using the following formula: f REF ·(1+ε)N2=f2 Among them, f REF The reference clock frequency is ε, the frequency offset of the crystal-free wireless communication device relative to the external device is ε, N1 and N2 are the first frequency division number and the second frequency division number, respectively, and f1 and f2 are the first actual receiving frequency point and the second actual receiving frequency point, respectively. Step S430: The frequency offset value of the crystal-free wireless communication device relative to the external device is obtained by subtracting the operation relationship between the first actual receiving frequency point (f1) and the second actual receiving frequency point (f2).

3. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 2, characterized in that, In step S430, the frequency offset value of the crystal-free wireless communication device relative to the external device is calculated using the following formula:

4. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 1, characterized in that, The number of ID packets is multiple; In step S200, the number of actual receiving frequency points of the at least two ID packets is multiple; Step S400 includes: Based on the differences between each pair of actual receiving frequencies and the difference between each pair of actual receiving frequencies and the reference clock frequency (f REF The calculation relationship between the actual receiving frequency and the respective frequency division number determines at least two pairwise frequency offset values, wherein the actual receiving frequency point and the reference clock frequency (f) are related. REF The operational relationship between the frequency division number and the frequency division number is as follows: f REF ·(1+ε)N i =f i Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f is the frequency of the reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point; The frequency offset value is obtained by averaging the at least two pairwise frequency offset values.

5. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 1, characterized in that, The number of ID packets is multiple; In step S200, the number of actual receiving frequency points of the at least two ID packets is multiple; Step S400 includes: calculating the frequency offset value using linear regression, wherein the actual received frequency point and the reference clock frequency (f REF The operational relationship between the frequency division number and the frequency division number is as follows: f REF ·(1+ε)N i =f i Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f is the frequency of the reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point.

6. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in any one of claims 1-5, characterized in that, In step S100, the interval between different frequency points is 10-20MHz.

7. A method for dynamic frequency offset compensation in a crystal-free wireless communication device, characterized in that, include: Step T100: Before establishing a wireless communication connection, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel are determined. The range of the frequency band interval of the receiving channel covers the frequency offset value of the crystal-free wireless communication device. Step T200: Receive an ID packet broadcast by an external device in the frequency band of the receiving channel, wherein the external device broadcasts the ID packet on a transmission channel corresponding to the designated receiving channel; Step T300: Determine the actual receiving frequency point of the received ID packet; Step T400: Determine the frequency offset value of the crystal-free wireless communication device relative to the external device based on the difference between the actual receiving frequency point and the frequency point of the designated receiving channel; Step T500: Correct the oscillation frequency of the crystalless wireless communication device according to the frequency offset value to align with the clock frequency of the external device.

8. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 7, characterized in that, In step T400, the frequency offset value is calculated according to the following formula: e=f r -f ch Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f r f is the actual receiving frequency. ch The frequency point of the specified receiving channel.

9. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 7 or 8, characterized in that, In step T100, the number of the at least one designated receiving channel is more than one, and the frequency difference between different designated receiving channels is greater than a preset value, so that the frequency difference between different designated receiving channels is much greater than the frequency offset value of the crystal-free wireless communication device. In step T200, the transmission channels of the external device correspond one-to-one with each designated receiving channel; In step T400, the frequency offset value is determined based on the specified receiving channel of the received ID packet.

10. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 9, characterized in that, Step T300 includes: taking the frequency point corresponding to a designated channel of the first received ID packet as the actual receiving frequency point; Step T400 includes: determining the frequency offset value based on the difference between the actual receiving frequency of the first received ID packet and the frequency of its corresponding designated receiving channel.

11. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 9, characterized in that, Step T300 includes: determining multiple designated channels that receive the ID packet and their respective actual receiving frequencies; Step T400 includes: determining the frequency offset value of each designated channel based on the difference between each actual receiving frequency point and the frequency point of each corresponding designated receiving channel. The frequency offset value is obtained by averaging the specified channel frequency offset values.

12. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 11, characterized in that, In step T400, the frequency offset value is calculated using the following formula: Wherein, ε is the frequency offset value of the crystal-free wireless communication device relative to the external device, and n is the number of designated channels receiving the ID packet; ε i The frequency offset value of the specified channel for the i-th received ID packet is specifically: e i =f i r -f i ch Among them, f i r f is the actual receiving frequency of the specified channel on which the i-th ID packet is received. i ch The frequency of the specified channel for the i-th receiving ID packet.

13. The dynamic frequency offset compensation method for crystal-free wireless communication devices as described in claim 7 or 8, characterized in that, In step T100, at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel are determined based on the BLE broadcast protocol.

14. A dynamic frequency offset compensation device for crystal-free wireless communication equipment, characterized in that, include: The query scanning module (100) is used to receive at least two ID packets sent by an external device in the query state using different frequency points in the query scanning state, wherein the external device is a terminal without frequency offset and sends different ID packets at different frequency points; Frequency point clock determination module (200) is used to determine the actual receiving frequency point of the received at least two ID packets and the reference clock frequency (f) of the crystal-free wireless communication device. REF ); The parsing module (300) is used to parse the at least two ID packets to obtain at least two frequency division numbers of the crystal-free wireless communication device; Frequency offset calculation module (400) is used to calculate the frequency offset based on the difference between at least two actual receiving frequency points and the difference between the at least two actual receiving frequency points and the reference clock frequency (f). REF The frequency offset value of the crystal-free wireless communication device relative to the external device is determined by the calculation relationship between the frequency division number and the frequency division number. The frequency offset compensation module (500) is used to correct the oscillation frequency of the crystalless wireless communication device according to the frequency offset value, so as to align with the clock frequency of the external device.

15. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 14, characterized in that, The number of ID packets is two; In the frequency point clock determination module (200), the actual receiving frequency points of the at least two ID packets are the first actual receiving frequency point (f1) and the second actual receiving frequency point (f2); The number of frequency divisions corresponding to the first actual receiving frequency point (f1) is the first number of frequency divisions (N1), and the number of frequency divisions corresponding to the second actual receiving frequency point (f2) is the second number of frequency divisions (N2). The frequency offset calculation module (400) includes: The first calculation unit is used to calculate the operational relationship of the first actual receiving frequency point (f1) using the following formula: f REF ·(1+ε)N1=f1 The second calculation unit is used to calculate the operational relationship of the second actual receiving frequency point (f2) using the following formula: f REF ·(1+ε)N2=f2 Among them, f REF The reference clock frequency is ε, the frequency offset of the crystal-free wireless communication device relative to the external device is ε, N1 and N2 are the first frequency division number and the second frequency division number, respectively, and f1 and f2 are the first actual receiving frequency point and the second actual receiving frequency point, respectively. The difference unit is used to obtain the frequency offset value of the crystal-free wireless communication device relative to the external device by subtracting the operation relationship of the first actual receiving frequency point (f1) and the operation relationship of the second actual receiving frequency point (f2).

16. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 15, characterized in that, In the difference unit, the frequency offset value of the crystal-free wireless communication device relative to the external device is calculated using the following formula:

17. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 14, characterized in that, The number of ID packets is multiple; In the frequency point clock determination module (200), the number of actual receiving frequency points of the at least two ID packets is multiple; The frequency offset calculation module (400) is specifically used for: Based on the differences between each pair of actual receiving frequencies and the difference between each pair of actual receiving frequencies and the reference clock frequency (f REF The calculation relationship between the actual receiving frequency and the respective frequency division number determines at least two pairwise frequency offset values, wherein the actual receiving frequency point and the reference clock frequency (f) are related. REF The operational relationship between the frequency division number and the frequency division number is as follows: f REF ·(1+ε)N i =f i Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f is the frequency of the reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point; The frequency offset value is obtained by averaging the at least two pairwise frequency offset values.

18. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 14, characterized in that, The number of ID packets is multiple; In the frequency point clock determination module (200), the number of actual receiving frequency points of the at least two ID packets is multiple; The frequency offset calculation module (400) includes: A linear regression unit is used to calculate the frequency offset value using linear regression, wherein the actual received frequency point and the reference clock frequency (f) are related. REF The operational relationship between the frequency division number and the frequency division number is as follows: f REF ·(1+ε)N i =f i Among them, f REF The reference clock frequency is ε, where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f is the frequency of the reference clock frequency. i For the i-th actual receiving frequency, N i This represents the number of frequency divisions corresponding to the i-th actual receiving frequency point.

19. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in any one of claims 14-18, characterized in that, In the query scanning module (100), the interval between different frequency points is 10-20MHz.

20. A dynamic frequency offset compensation device for crystal-free wireless communication equipment, characterized in that, include: The channel determination module (10) is used to determine at least one designated receiving channel for receiving external broadcast data and a receiving channel frequency band interval adjacent to and continuous with the designated receiving channel before establishing a wireless communication connection. The range of the receiving channel frequency band interval covers the frequency offset value of the crystal-free wireless communication device. ID receiving module (20) is used to receive ID packets broadcast by external devices in the frequency band of the receiving channel, wherein the external device broadcasts the ID packets in a transmission channel corresponding to the designated receiving channel; Frequency point determination module (30) is used to determine the actual receiving frequency point of the received ID packet; Frequency offset determination module (40) is used to determine the frequency offset value of the crystal-free wireless communication device relative to the external device based on the difference between the actual receiving frequency point and the frequency point of the designated receiving channel; The compensation module (50) is used to correct the oscillation frequency of the crystalless wireless communication device according to the frequency offset value in order to align with the clock frequency of the external device.

21. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 20, characterized in that, In the frequency offset determination module (40), the frequency offset value is calculated according to the following formula: e=f r -f ch Where ε is the frequency offset of the crystal-free wireless communication device relative to the external device, and f r f is the actual receiving frequency. ch The frequency point of the specified receiving channel.

22. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 20 or 21, characterized in that, In the channel determination module (10), the number of the at least one designated receiving channel is more than one, and the frequency difference between different designated receiving channels is greater than a preset value, so that the frequency difference between different designated receiving channels is much greater than the frequency offset value of the crystal-free wireless communication device. In the ID receiving module (20), the transmission channels of the external devices correspond one-to-one with each designated receiving channel; In the frequency offset determination module (40), the frequency offset value is determined based on the specified receiving channel of the received ID packet.

23. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 22, characterized in that, The frequency point determination module (30) is specifically used to: take the frequency point corresponding to a specified channel of the first received ID packet as the actual receiving frequency point; The frequency offset determination module (40) is specifically used to determine the frequency offset value based on the difference between the actual receiving frequency point of the first received ID packet and the frequency point of its corresponding designated receiving channel.

24. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 22, characterized in that, The frequency point determination module (30) is specifically used to: determine multiple designated channels that receive the ID packet and their respective actual receiving frequencies; The frequency offset determination module (40) is specifically used to: determine the frequency offset value of each designated channel based on the difference between each actual receiving frequency point and the frequency point of each corresponding designated receiving channel. The frequency offset value is obtained by averaging the specified channel frequency offset values.

25. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 24, characterized in that, In the frequency offset determination module (40), the frequency offset value is calculated using the following formula: Wherein, ε is the frequency offset value of the crystal-free wireless communication device relative to the external device, and n is the number of designated channels receiving the ID packet; ε i The frequency offset value of the specified channel for the i-th received ID packet is specifically: e i =f i r -f i ch Among them, f i r f is the actual receiving frequency of the specified channel on which the i-th ID packet is received. i ch The frequency of the specified channel for the i-th receiving ID packet.

26. The dynamic frequency offset compensation device for crystal-free wireless communication equipment as described in claim 20 or 21, characterized in that, In the channel determination module (10), at least one designated receiving channel for receiving external broadcast data and a frequency band interval of the receiving channel that is adjacent to and continuous with the designated receiving channel are determined based on the BLE broadcast protocol.

27. A computer device, characterized in that, include: Dynamic frequency offset compensation for crystal-free wireless communication devices can be achieved by using the method described in any one of claims 1-13, or by including the apparatus described in any one of claims 14-26.

28. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program stored in the storage medium is used to be executed by a processor to implement the method as described in any one of claims 1-13.

29. A crystal-free wireless communication chip, having an integrated circuit thereon, characterized in that, The integrated circuit is designed to implement the method as described in any one of claims 1-13.

30. The crystal-free wireless communication chip as described in claim 29, characterized in that, The wireless communication chip is a Bluetooth chip.

31. A dynamic frequency offset compensation system for crystal-free wireless communication equipment, comprising an integrated circuit, characterized in that, include: Host equipment; The crystal-free wireless communication chip as described in claim 29 or 30 interacts with the host device for data exchange.

Citation Information

Patent Citations

  • Wireless communication carrier frequency oscillator correction method and system without crystal oscillator

    CN106789785A

  • Frequency calibration apparatus and method

    CN107027167A

  • Phase-locked loop parameter adjustment method, Bluetooth module, Bluetooth slave device and Bluetooth system

    CN107454555A

  • Clock correction method and Bluetooth chip

    CN108337203A

  • Method for adjusting parameters of phase locked loop, bluetooth module and bluetooth system

    US20190007193A1