Movatterモバイル変換


[0]ホーム

URL:


CN114650202A - Carrier deviation processing method, terminal and storage medium - Google Patents

Carrier deviation processing method, terminal and storage medium
Download PDF

Info

Publication number
CN114650202A
CN114650202ACN202011497198.0ACN202011497198ACN114650202ACN 114650202 ACN114650202 ACN 114650202ACN 202011497198 ACN202011497198 ACN 202011497198ACN 114650202 ACN114650202 ACN 114650202A
Authority
CN
China
Prior art keywords
uwb
terminal
carrier frequency
carrier
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011497198.0A
Other languages
Chinese (zh)
Inventor
郭富祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011497198.0ApriorityCriticalpatent/CN114650202A/en
Publication of CN114650202ApublicationCriticalpatent/CN114650202A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the application discloses a method for processing carrier deviation, which comprises the following steps: sending a first UWB data packet to a second terminal through a first UWB module of a first terminal at a first UWB carrier frequency; the first UWB data packet carries a standard target value, and the standard target value is used for adjusting the actual UWB carrier frequency of a second UWB module of the second terminal to obtain the currently adjusted UWB carrier frequency; receiving a second UWB data packet sent by the second terminal through the second UWB module by the first UWB module according to the currently adjusted UWB carrier frequency; obtaining a first carrier deviation estimated value between the currently adjusted UWB carrier frequency and a first UWB carrier frequency; and if a first correlation exists between the first carrier deviation estimated value and the standard target value, determining that the carrier deviation calibration aiming at the second UWB module is finished. The embodiment of the application also discloses a terminal and a storage medium.

Description

Translated fromChinese
一种载波偏差的处理方法、终端和存储介质Method, terminal and storage medium for processing carrier deviation

技术领域technical field

本申请涉及通信技术领域,尤其是涉及一种载波偏差的处理方法、终端和存储介质。The present application relates to the field of communication technologies, and in particular, to a method, terminal, and storage medium for processing a carrier offset.

背景技术Background technique

时钟的准确度在终端的应用中起着关键作用。在装置出厂前,就对晶体振荡器的频率偏差进行校准,如通过调整装置的集成电路(Integrated Circuit,IC)内部晶体震荡电路的可变电容,确保晶体振荡器的载波频率在某个基准值附近,以提高时钟精确度。The accuracy of the clock plays a key role in the application of the terminal. Before the device leaves the factory, the frequency deviation of the crystal oscillator is calibrated. For example, by adjusting the variable capacitance of the crystal oscillator circuit in the integrated circuit (IC) of the device, to ensure that the carrier frequency of the crystal oscillator is at a certain reference value nearby for improved clock accuracy.

然而,在装置的使用过程中,装置中的晶体振荡器的载波频率会受环境温度的影响,导致晶体振荡器校准后的载波频率仍会发生变化,从而使得晶体振荡器的载波频率在应用过程中,仍会存在频率偏差。However, during the use of the device, the carrier frequency of the crystal oscillator in the device will be affected by the ambient temperature, so that the carrier frequency of the crystal oscillator after calibration will still change, so that the carrier frequency of the crystal oscillator will not change during the application process. , there will still be a frequency deviation.

发明内容SUMMARY OF THE INVENTION

本申请实施例期望提供一种载波偏差的处理方法、终端和存储介质,解决相关技术中晶体振荡器校准后的载波频率受环境温度影响仍存在频率偏差问题。The embodiments of the present application are expected to provide a carrier deviation processing method, terminal and storage medium, so as to solve the problem that the carrier frequency after calibration of the crystal oscillator is still affected by the ambient temperature and the frequency deviation still exists in the related art.

本申请的技术方案是这样实现的:The technical solution of the present application is realized as follows:

一种载波偏差的处理方法,应用于第一终端,所述方法包括:A method for processing a carrier offset, applied to a first terminal, the method comprising:

通过第一终端的第一超宽带UWB模组以第一UWB载波频率向第二终端发送第一UWB数据包;所述第一UWB数据包携带有标准目标值,所述标准目标值用于调整所述第二终端的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率;The first UWB data packet is sent to the second terminal at the first UWB carrier frequency through the first ultra-wideband UWB module of the first terminal; the first UWB data packet carries a standard target value, and the standard target value is used for adjustment the actual UWB carrier frequency of the second UWB module of the second terminal to obtain the currently adjusted UWB carrier frequency;

通过所述第一UWB模组接收所述第二终端通过所述第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包;Receive, through the first UWB module, a second UWB data packet sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency;

获得所述当前调整后的UWB载波频率与所述第一UWB载波频率之间的第一载波偏差估计值;obtaining a first carrier offset estimate between the currently adjusted UWB carrier frequency and the first UWB carrier frequency;

若所述第一载波偏差估计值与所述标准目标值之间存在第一关联关系,确定针对所述第二UWB模组的载波偏差校准完成。If there is a first correlation between the estimated first carrier offset value and the standard target value, it is determined that the carrier offset calibration for the second UWB module is completed.

一种载波偏差的处理方法,应用于第二终端,所述方法包括:A method for processing a carrier offset, applied to a second terminal, the method comprising:

通过第二终端的第二UWB模组接收第一终端通过第一UWB模组,以第一UWB载波频率发送的第一UWB数据包;Receive, through the second UWB module of the second terminal, the first UWB data packet sent by the first terminal through the first UWB module at the first UWB carrier frequency;

获得所述第一UWB载波频率与第二UWB载波频率之间的第二载波偏差估计值;obtaining a second carrier offset estimate between the first UWB carrier frequency and the second UWB carrier frequency;

若所述第二载波偏差估计值与所述第一UWB数据包携带的标准目标值之间不存在第二关联关系,调整所述第二UWB载波频率,得到当前调整后的UWB载波频率;If there is no second correlation between the estimated second carrier offset and the standard target value carried by the first UWB data packet, adjust the second UWB carrier frequency to obtain the currently adjusted UWB carrier frequency;

通过所述第二UWB模组以当前调整后的UWB载波频率向所述第一终端发送第二UWB数据包,以使所述第一终端确定针对所述第二UWB模组的载波频率校准是否完成。Send a second UWB data packet to the first terminal at the currently adjusted UWB carrier frequency through the second UWB module, so that the first terminal can determine whether the carrier frequency calibration for the second UWB module is not Finish.

一种终端,所述终端包括:处理器、存储器和通信总线;A terminal, the terminal includes: a processor, a memory and a communication bus;

所述通信总线用于实现处理器和存储器之间的通信连接;The communication bus is used to realize the communication connection between the processor and the memory;

所述处理器用于执行存储器中存储的载波偏差的处理程序,以实现上述的载波偏差的处理方法。The processor is configured to execute the carrier offset processing program stored in the memory, so as to realize the above-mentioned carrier offset processing method.

一种存储介质,其特征在于,所述存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述的载波偏差的处理方法。A storage medium, characterized in that, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors, so as to realize the above-mentioned method for processing the carrier offset.

本申请实施例所提供的一种载波偏差的处理方法、终端和存储介质,通过第一终端的第一超宽带UWB模组以第一UWB载波频率向第二终端发送第一UWB数据包;第一UWB数据包携带有标准目标值,标准目标值用于调整第二终端的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率;通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包;获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值;若第一载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成;也就是说,第一终端发送标准目标值,以使第二终端基于第一终端发送的标准目标值来调整自身的UWB载波频率,从而使得第一终端与第二终端的载波偏差的同步性保持在一定范围内;如此,实现对第二终端的载波偏差的实时校准,同时也提升了使用第一UWB模组和第二UWB模组进行定位的定位精度。In the carrier offset processing method, terminal, and storage medium provided by the embodiments of the present application, the first UWB data packet is sent to the second terminal at the first UWB carrier frequency through the first ultra-wideband UWB module of the first terminal; A UWB data packet carries a standard target value, and the standard target value is used to adjust the actual UWB carrier frequency of the second UWB module of the second terminal to obtain the current adjusted UWB carrier frequency; receive the second terminal through the first UWB module Through the second UWB module, the second UWB data packet sent with the currently adjusted UWB carrier frequency; obtain the first carrier deviation estimate value between the currently adjusted UWB carrier frequency and the first UWB carrier frequency; if the first There is a first correlation between the estimated value of the carrier offset and the standard target value, and it is determined that the calibration of the carrier offset for the second UWB module is completed; that is, the first terminal sends the standard target value, so that the second terminal is based on the first terminal. The standard target value sent to adjust its own UWB carrier frequency, so that the synchronization of the carrier deviation of the first terminal and the second terminal is kept within a certain range; in this way, the real-time calibration of the carrier deviation of the second terminal is realized, and at the same time The positioning accuracy of using the first UWB module and the second UWB module for positioning is improved.

附图说明Description of drawings

图1(a)为相关技术中的一个可选的测距示意图;Fig. 1 (a) is a schematic diagram of an optional ranging in the related art;

图1(b)为相关技术中两终端间的晶振频偏与测距误差之间的关系;Figure 1(b) shows the relationship between the frequency offset of the crystal oscillator and the ranging error between two terminals in the related art;

图2为相关技术中晶体振荡器的载波频率受温度影响的示意图;2 is a schematic diagram illustrating that the carrier frequency of a crystal oscillator is affected by temperature in the related art;

图3为本申请实施例提供的载波偏差的处理方法的一个可选的流程示意图;FIG. 3 is an optional schematic flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图4为本申请实施例提供的载波偏差的处理方法的一个可选的流程示意图;FIG. 4 is an optional schematic flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图5为本申请实施例中的一个可选的测角示意图;5 is a schematic diagram of an optional angle measurement in the embodiment of the present application;

图6本申请实施例为提供的载波偏差的处理方法的一个可选的流程示意图;FIG. 6 is an optional schematic flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图7(a)为本申请实施例提供的载波偏差的处理方法一个可选流程框图;FIG. 7(a) is an optional flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图7(b)为本申请实施例中传输数据包的一个可选的交互示意图;FIG. 7(b) is an optional interactive schematic diagram of transmitting a data packet in the embodiment of the present application;

图7(c)为本申请实施例中传输数据包的一个可选的交互示意图;Fig. 7 (c) is an optional interactive schematic diagram of the transmission data packet in the embodiment of the present application;

图8为本申请实施例中的一个可选的测距示意图;FIG. 8 is an optional schematic diagram of ranging in an embodiment of the present application;

图9为本申请实施例中的一个可选的测距示意图;FIG. 9 is an optional schematic diagram of ranging in an embodiment of the present application;

图10为本申请实施例提供的载波偏差的处理方法的一个可选流程示意图;FIG. 10 is an optional schematic flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图11为本申请实施例提供的载波偏差的处理方法的一个可选流程示意图;FIG. 11 is an optional schematic flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图12为本申请实施例提供的载波偏差的处理方法的一个可选流程示意图;FIG. 12 is an optional schematic flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图13为本申请实施例提供的载波偏差的处理方法的一个可选流程示意图;FIG. 13 is an optional schematic flowchart of a method for processing a carrier offset provided by an embodiment of the present application;

图14为本申请实施例提供的第一终端的一个可选的结构示意图;FIG. 14 is an optional schematic structural diagram of a first terminal provided by an embodiment of the present application;

图15为本申请实施例提供的第二终端的一个可选的结构示意图。FIG. 15 is an optional schematic structural diagram of a second terminal provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.

应理解,说明书通篇中提到的“本申请实施例”或“前述实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“本申请实施例中”或“在前述实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中应用。在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。It is to be understood that reference throughout the specification to "an embodiment of the present application" or "previous embodiment" means that a particular feature, structure or characteristic associated with the embodiment is included in at least one embodiment of the present application. Thus, appearances of "in an embodiment of the present application" or "in a preceding embodiment" in various places throughout the specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner for use in one or more embodiments. In various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, rather than the implementation process of the embodiments of the present application. constitute any limitation. The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

背景技术中提及的装置中的晶体振荡器的载波频率受环境温度的影响,如图2所示,导致晶体振荡器校准后的载波频率仍会发生变化,从而使得晶体振荡器的载波频率在超宽带(Ultra-Wideband,UWB)定位技术中,会出现定位不准问题。The carrier frequency of the crystal oscillator in the device mentioned in the background art is affected by the ambient temperature, as shown in FIG. 2 , the carrier frequency of the crystal oscillator after calibration will still change, so that the carrier frequency of the crystal oscillator is In the Ultra-Wideband (Ultra-Wideband, UWB) positioning technology, there will be a problem of inaccurate positioning.

相关技术中,除了背景技术中提及的影响晶体振荡器的载波频率外,还存在如下一种影响晶体振荡器的载波频率的过程,具体地,UWB定位技术包括UWB测距技术和UWB测角技术,如图1(a)所示,第一终端通过发送测距信号以确定第一终端与第二终端之间的距离,和/或通过发送测角信号以确定第一终端相对于第二终端的方位角,进而基于距离和方位角确定出第一终端的准确位置。然而,在UWB测距技术,如图1(b)所示,第一终端A中的晶体振荡器的频率偏移eA与第二终端B中的晶体振荡器的频率偏移eB的差值,将直接影响第一终端与第二终端之间的距离精度,如

Figure BDA0002842524450000041
在UWB测角方法中,频率偏移eA与频率偏移eB的差值,也会直接影响第一终端相对于第二终端的方位角的离散程度。相关技术中,UWB定位技术默认两设备间的UWB测距技术中的频率偏移eA-eB与UWB测角技术中的频率偏移eA-eB一致,并未考虑UWB测距技术中的频偏eA-eB与UWB测角技术中的频偏eA-eB不一致的情况,导致确定出的第一终端相对于第二终端的定位位置不准确。In the related art, in addition to affecting the carrier frequency of the crystal oscillator mentioned in the background art, there is also the following process of affecting the carrier frequency of the crystal oscillator. Specifically, the UWB positioning technology includes UWB ranging technology and UWB angle measurement. technology, as shown in FIG. 1(a), the first terminal determines the distance between the first terminal and the second terminal by sending a ranging signal, and/or determines the relative The azimuth angle of the terminal is further determined based on the distance and the azimuth angle, and the exact position of the first terminal is determined. However, in the UWB ranging technology, as shown in Figure 1(b), the difference between the frequency offset eA of the crystal oscillator in the first terminal A and the frequency offset eB of the crystal oscillator in the second terminal B value, will directly affect the distance accuracy between the first terminal and the second terminal, such as
Figure BDA0002842524450000041
In the UWB angle measurement method, the difference between the frequency offset eA and the frequency offset eB also directly affects the degree of dispersion of the azimuth angle of the first terminal relative to the second terminal. In the related art, the UWB positioning technology defaults that the frequency offset eA - eB in the UWB ranging technology between two devices is consistent with the frequency offset eA - eB in the UWB angle measuring technology, and the UWB ranging technology is not considered. The inconsistency between the frequency offsets eA -eB in the UWB angle measurement technology and the frequency offsets eA -eB in the UWB angle measurement technology results in inaccurate positioning of the determined first terminal relative to the second terminal.

由上述可知,第一终端与第二终端中的晶体振荡器的输出频率受温度的变化、以及晶体振荡器的频率偏差的影响,会导致第一终端与第二终端之间的定位位置不准确。It can be seen from the above that the output frequency of the crystal oscillator in the first terminal and the second terminal is affected by the temperature change and the frequency deviation of the crystal oscillator, which will lead to inaccurate positioning between the first terminal and the second terminal. .

本申请实施例提供一种载波偏差的处理方法,应用于第一终端,如图3所示,该方法包括以下步骤:An embodiment of the present application provides a method for processing a carrier offset, which is applied to a first terminal. As shown in FIG. 3 , the method includes the following steps:

步骤101、通过第一终端的第一超宽带UWB模组以第一UWB载波频率向第二终端发送第一UWB数据包。Step 101: Send a first UWB data packet to a second terminal at a first UWB carrier frequency through a first ultra-wideband UWB module of the first terminal.

其中,第一UWB数据包携带有标准目标值、第一目标地址;这里,标准目标值用于调整第二终端的第二UWB模组的默认UWB载波频率,得到当前调整后的UWB载波频率。The first UWB data packet carries a standard target value and a first target address; here, the standard target value is used to adjust the default UWB carrier frequency of the second UWB module of the second terminal to obtain the currently adjusted UWB carrier frequency.

其中,第一UWB载波频率为第一UWB模组的中的第一晶体振荡器产生的实际UWB载波频率。第一UWB载波频率的取值等于第一晶体振荡器的第一基准频率与第一晶振偏差频率之和,第一基准频率为预先为第一晶体振荡器设计的目标载波频率。The first UWB carrier frequency is the actual UWB carrier frequency generated by the first crystal oscillator in the first UWB module. The value of the first UWB carrier frequency is equal to the sum of the first reference frequency of the first crystal oscillator and the first crystal oscillator deviation frequency, and the first reference frequency is the target carrier frequency designed for the first crystal oscillator in advance.

其中,第一终端可以为内置有第一超宽带(Ultra-Wideband,UWB)模组的手机、平板电脑、笔记本电脑、个人数字助理(Personal Digital Assistant,PDA)、相机、可穿戴设备、智能手环、智能手表等移动终端设备,或者内置有第一UWB模组的诸如台式计算机、智能家电等的固定终端设备。The first terminal may be a mobile phone, a tablet computer, a notebook computer, a Personal Digital Assistant (PDA), a camera, a wearable device, a smart hand Rings, smart watches and other mobile terminal devices, or fixed terminal devices such as desktop computers, smart home appliances, etc. with a built-in first UWB module.

其中,第二终端可以为内置有第二UWB模组的手机、平板电脑、笔记本电脑、个人数字助理(Personal Digital Assistant,PDA)、相机、可穿戴设备、智能手环、智能手表、UWB标签等移动终端设备,或者内置有第二UWB模组的诸如台式计算机、智能家电等的固定终端设备。The second terminal may be a mobile phone, a tablet computer, a notebook computer, a Personal Digital Assistant (PDA), a camera, a wearable device, a smart bracelet, a smart watch, a UWB tag, etc. with a built-in second UWB module Mobile terminal equipment, or fixed terminal equipment such as desktop computers, smart home appliances, etc. with a built-in second UWB module.

本申请实施例中,第一终端中的第一UWB模组中的第一晶体振荡器产生第一UWB载波频率,第一UWB模组以第一UWB载波频率向具有第一目标地址的第二终端发送第一UWB数据包,以使第二终端中的第二UWB模组按照第一UWB数据包携带有的标准目标值,调整第二UWB模组的默认UWB载波频率。In the embodiment of the present application, the first crystal oscillator in the first UWB module in the first terminal generates the first UWB carrier frequency, and the first UWB module uses the first UWB carrier frequency to transmit to the second device with the first target address. The terminal sends the first UWB data packet, so that the second UWB module in the second terminal adjusts the default UWB carrier frequency of the second UWB module according to the standard target value carried in the first UWB data packet.

这里,UWB是一种无线载波通信技术,利用纳秒级的非正弦波窄脉冲序列,通过正交频分调制或直接排序将脉冲扩展到一个频率范围内,并进行数据传输,具有传输速率高、空间容量大,成本低且功耗低等特点。Here, UWB is a wireless carrier communication technology that uses nanosecond-level non-sinusoidal narrow pulse sequences to expand the pulses into a frequency range through orthogonal frequency division modulation or direct sequencing, and perform data transmission, with high transmission rates. , Large space capacity, low cost and low power consumption.

步骤102、通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包。Step 102: Receive, through the first UWB module, a second UWB data packet sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency.

其中,第二UWB数据包携带有第一终端的地址。The second UWB data packet carries the address of the first terminal.

其中,当前调整后的UWB载波频率为第二UWB模组中的第二晶体振荡器产生的UWB载波频率按照标准目标值进行调整后的频率。Wherein, the currently adjusted UWB carrier frequency is the frequency after the UWB carrier frequency generated by the second crystal oscillator in the second UWB module is adjusted according to the standard target value.

本申请实施例中,第一终端通过第一UWB模组接收第二终端通过第二UWB模组发送的第二UWB数据包,且第二终端通过第二UWB模组以当前调整后的UWB载波频率进行发送的数据包。In the embodiment of the present application, the first terminal receives the second UWB data packet sent by the second terminal through the second UWB module through the first UWB module, and the second terminal uses the currently adjusted UWB carrier through the second UWB module. The frequency at which packets are sent.

步骤103、获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值。Step 103: Obtain the estimated first carrier deviation between the currently adjusted UWB carrier frequency and the first UWB carrier frequency.

其中,第一载波偏差估计值为将第二UWB模组中的第二晶体振荡器产生的当前调整后的UWB载波频率,与第一UWB模组中的第一晶体振荡器产生的第一UWB载波频率进行比较,所得到的估计值。需要说明的是,载波偏差估计(Carrier offset Estimate,COE)是UWB模组所具备的功能,通过测量估算接收UWB数据包的UWB载波频率,与UWB模组自身的UWB载波频率比较,估算得到的COE。The estimated value of the first carrier deviation is the current adjusted UWB carrier frequency generated by the second crystal oscillator in the second UWB module and the first UWB carrier frequency generated by the first crystal oscillator in the first UWB module. The carrier frequency is compared to the resulting estimate. It should be noted that the carrier offset estimate (COE) is a function of the UWB module. By measuring and estimating the UWB carrier frequency of the received UWB data packet, compared with the UWB carrier frequency of the UWB module itself, the estimated COE.

本申请实施例中,第一终端通过第一UWB模组接收到第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包后。通过锁脉冲技术或者解析载波频率的技术,获取第二UWB模组中的当前调整后的UWB载波频率。将当前调整后的UWB载波频率,与第一UWB模组中的第一晶体振荡器产生的第一UWB载波频率进行比较,得到第一载波偏差估计值。In the embodiment of the present application, after the first terminal receives, through the first UWB module, the second UWB data packet sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency. The currently adjusted UWB carrier frequency in the second UWB module is obtained through the pulse-locking technology or the technology of analyzing the carrier frequency. Comparing the currently adjusted UWB carrier frequency with the first UWB carrier frequency generated by the first crystal oscillator in the first UWB module to obtain a first estimated value of carrier deviation.

本申请其他实施例中,在步骤103获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值之后,还可以执行如下步骤,In other embodiments of the present application, after obtaining the estimated first carrier deviation between the currently adjusted UWB carrier frequency and the first UWB carrier frequency instep 103, the following steps may also be performed:

获取标准目标值的相反数减去第一载波偏差估计值的第一差值。Obtain the inverse of the standard target value minus the first difference of the estimated value of the first carrier offset.

若第一差值的绝对值不大于差值阈值,确定第一载波偏差估计值与标准目标值之间存在第一关联关系。If the absolute value of the first difference is not greater than the difference threshold, it is determined that there is a first correlation between the estimated value of the first carrier deviation and the standard target value.

本申请实施例中,第一终端获取标准目标值的相反数减去第一载波偏差估计值的第一差值,判断第一差值的绝对值与差值阈值的关系。若第一差值的绝对值不大于差值阈值,确定第一载波偏差估计值与标准目标值之间存在第一关联关系,此时,第一终端确定针对第二终端中的第二UWB模组的载波偏差校准完成;若第一差值的绝对值大于差值阈值,确定第一载波偏差估计值与标准目标值之间不存在第一关联关系,此时,第一终端确定仍需针对第二终端中的第二UWB模组的载波偏差继续校准。In the embodiment of the present application, the first terminal obtains the inverse of the standard target value minus the first difference value of the first carrier deviation estimate value, and determines the relationship between the absolute value of the first difference value and the difference threshold value. If the absolute value of the first difference is not greater than the difference threshold, it is determined that there is a first correlation between the estimated value of the first carrier deviation and the standard target value. The carrier offset calibration of the group is completed; if the absolute value of the first difference is greater than the difference threshold, it is determined that there is no first correlation between the estimated first carrier offset and the standard target value. At this time, the first terminal determines that the The carrier offset of the second UWB module in the second terminal continues to be calibrated.

在一种可实现的应用场景中,第一终端获取的第一载波偏差估计值COE_1为10.4ppm,标准目标值Value为-10ppm,并取标准目标值的相反数Value’为10ppm。获取标准目标值的相反数Value’减去第一载波偏差估计值COE_1的第一差值M,此时M为-0.4ppm。判断第一差值的绝对值|M|与差值阈值X的关系,这里,X为0.5ppm,确定第一差值的绝对值|M|不大于差值阈值X,则进一步确定第一载波偏差估计值COE_1与标准目标值Value之间存在第一关联关系。In an achievable application scenario, the first carrier offset estimated value COE_1 obtained by the first terminal is 10.4ppm, the standard target value Value is -10ppm, and the inverse of the standard target value Value' is 10ppm. Obtain the inverse value of the standard target value Value' minus the first difference M of the first carrier offset estimate COE_1, where M is -0.4ppm. Determine the relationship between the absolute value |M| of the first difference and the difference threshold X, where X is 0.5ppm, determine that the absolute value |M| of the first difference is not greater than the difference threshold X, then further determine the first carrier There is a first correlation relationship between the deviation estimation value COE_1 and the standard target value Value.

步骤104、若第一载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成。Step 104: If there is a first correlation between the first estimated value of the carrier offset and the standard target value, determine that the calibration of the carrier offset for the second UWB module is completed.

其中,第一关联关系可以为第一载波偏差估计值等于标准目标值的相反数,第一关联关系还可以为第一载波偏差估计值与标准目标值的相反数的差值的绝对值,不大于差值阈值。Wherein, the first correlation relationship may be that the estimated value of the first carrier deviation is equal to the inverse number of the standard target value, and the first correlation relationship may also be the absolute value of the difference between the estimated value of the first carrier deviation and the inverse number of the standard target value. greater than the difference threshold.

本申请实施例中,若第一终端确定第一载波偏差估计值与标准目标值之间存在第一关联关系,则进一步确定第一终端针对第二终端中的第二UWB模组的载波偏差校准完成。In the embodiment of the present application, if the first terminal determines that there is a first correlation between the estimated first carrier offset value and the standard target value, the first terminal further determines the carrier offset calibration of the second UWB module in the second terminal by the first terminal Finish.

本申请实施例所提供的一种载波偏差的处理方法、终端和存储介质,通过第一终端的第一超宽带UWB模组以第一UWB载波频率向第二终端发送第一UWB数据包;第一UWB数据包携带有标准目标值,标准目标值用于调整第二终端的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率;通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包;获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值;若第一载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成;也就是说,第一终端发送标准目标值,以使第二终端基于第一终端发送的标准目标值来调整自身的UWB载波频率,从而使得第一终端与第二终端的载波偏差的同步性保持在一定范围内;如此,实现对第二终端的载波偏差的实时校准,同时也提升了使用第一UWB模组和第二UWB模组进行定位的定位精度。In the carrier offset processing method, terminal, and storage medium provided by the embodiments of the present application, the first UWB data packet is sent to the second terminal at the first UWB carrier frequency through the first ultra-wideband UWB module of the first terminal; A UWB data packet carries a standard target value, and the standard target value is used to adjust the actual UWB carrier frequency of the second UWB module of the second terminal to obtain the current adjusted UWB carrier frequency; receive the second terminal through the first UWB module Through the second UWB module, the second UWB data packet sent with the currently adjusted UWB carrier frequency; obtain the first carrier deviation estimate value between the currently adjusted UWB carrier frequency and the first UWB carrier frequency; if the first There is a first correlation between the estimated value of the carrier offset and the standard target value, and it is determined that the calibration of the carrier offset for the second UWB module is completed; that is, the first terminal sends the standard target value, so that the second terminal is based on the first terminal. The standard target value sent to adjust its own UWB carrier frequency, so that the synchronization of the carrier deviation of the first terminal and the second terminal is kept within a certain range; in this way, the real-time calibration of the carrier deviation of the second terminal is realized, and at the same time The positioning accuracy of using the first UWB module and the second UWB module for positioning is improved.

本申请实施例提供一种载波偏差的处理方法,应用于第一终端,如图4所示,该方法包括以下步骤:An embodiment of the present application provides a carrier offset processing method, which is applied to a first terminal. As shown in FIG. 4 , the method includes the following steps:

步骤201、通过第一终端的第一超宽带UWB模组以第一UWB载波频率向第二终端发送第一UWB数据包。Step 201: Send a first UWB data packet to a second terminal at a first UWB carrier frequency through a first ultra-wideband UWB module of the first terminal.

其中,第一UWB数据包携带有标准目标值、第一目标地址;这里,标准目标值用于调整第二终端的第二UWB模组的默认UWB载波频率,得到当前调整后的UWB载波频率。The first UWB data packet carries a standard target value and a first target address; here, the standard target value is used to adjust the default UWB carrier frequency of the second UWB module of the second terminal to obtain the currently adjusted UWB carrier frequency.

本申请其他实施例中,获取触发第一终端的第一UWB模组中的UWB应用信息;根据UWB应用信息,确定第一UWB模组中的定位场景,生成与定位场景对应的第一数据包。In other embodiments of the present application, UWB application information in the first UWB module that triggers the first terminal is obtained; according to the UWB application information, a positioning scene in the first UWB module is determined, and a first data packet corresponding to the positioning scene is generated .

其中,UWB应用信息为对该UWB应用所具有的功能进行描述的信息。Wherein, the UWB application information is information describing the functions of the UWB application.

其中,定位场景可以为测角定位场景,定位场景还可以为测距定位场景,定位场景又可以为测角测距定位场景。The positioning scene may be an angle measurement positioning scene, the positioning scene may also be a ranging positioning scene, and the positioning scene may be an angle measurement and ranging positioning scene.

步骤202、通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包。Step 202: Receive, through the first UWB module, a second UWB data packet sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency.

步骤203、获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值。Step 203: Obtain the estimated first carrier deviation between the currently adjusted UWB carrier frequency and the first UWB carrier frequency.

步骤204、若第一载波偏差估计值与标准目标值之间不存在第一关联关系,通过第一UWB模组以第一UWB载波频率向第二终端发送第二UWB数据包。Step 204 , if there is no first correlation between the estimated value of the first carrier deviation and the standard target value, send a second UWB data packet to the second terminal at the first UWB carrier frequency through the first UWB module.

其中,第二UWB数据包携带有标准目标值、第一目标地址,标准目标值用于调整当前调整后的UWB载波频率,得到新的调整后的UWB载波频率。The second UWB data packet carries a standard target value and a first target address, and the standard target value is used to adjust the currently adjusted UWB carrier frequency to obtain a new adjusted UWB carrier frequency.

本申请实施例中,第一终端获取到第一载波偏差估计值后,获取标准目标值的相反数减去第一载波偏差估计值的第一差值。判断第一差值的绝对值与差值阈值的关系,若确定第一差值的绝对值大于差值阈值,确定第一载波偏差估计值与标准目标值之间不存在第一关联关系。通过第一UWB模组以第一UWB载波频率向第二终端发送第二UWB数据包,以使第二终端中的第二UWB模组中的当前调整后的UWB载波频率,按照第一UWB数据包携带有的标准目标值进行调整,得到新的调整后的UWB载波频率。In the embodiment of the present application, after acquiring the estimated first carrier offset value, the first terminal acquires the inverse of the standard target value minus the first difference value of the estimated first carrier offset value. The relationship between the absolute value of the first difference and the difference threshold is determined, and if the absolute value of the first difference is determined to be greater than the difference threshold, it is determined that there is no first correlation between the estimated first carrier deviation and the standard target value. The second UWB data packet is sent to the second terminal at the first UWB carrier frequency through the first UWB module, so that the currently adjusted UWB carrier frequency in the second UWB module in the second terminal is based on the first UWB data packet. The standard target value carried by the packet is adjusted to obtain a new adjusted UWB carrier frequency.

步骤205、通过第一UWB模组接收第二终端通过第二UWB模组,以新的调整后的UWB载波频率发送的第二UWB数据包。Step 205: Receive, through the first UWB module, a second UWB data packet sent by the second terminal through the second UWB module at the new adjusted UWB carrier frequency.

其中,第二UWB数据包携带有第一终端的地址。The second UWB data packet carries the address of the first terminal.

其中,新的调整后的UWB载波频率为第二UWB模组中的第二晶体振荡器产生的调整后的UWB载波频率,按照标准目标值再次进行调整后的频率。Wherein, the new adjusted UWB carrier frequency is the adjusted UWB carrier frequency generated by the second crystal oscillator in the second UWB module, which is adjusted again according to the standard target value.

本申请实施例中,第一终端通过第一UWB模组接收第二终端通过第二UWB模组发送的第二UWB数据包,且第二终端通过第二UWB模组以新的调整后的UWB载波频率进行发送的数据包。In the embodiment of the present application, the first terminal receives, through the first UWB module, the second UWB data packet sent by the second terminal through the second UWB module, and the second terminal sends the new adjusted UWB data packet through the second UWB module The carrier frequency for sending packets.

步骤206、获得新的调整后的UWB载波频率与第一UWB载波频率之间的第三载波偏差估计值。Step 206: Obtain a third estimated value of the carrier offset between the new adjusted UWB carrier frequency and the first UWB carrier frequency.

其中,第三载波偏差估计值为将第二UWB模组中的第二晶体振荡器产生的新的调整后的UWB载波频率,与第一UWB模组中的第一晶体振荡器产生的第一UWB载波频率进行比较,所得到的估计值。Wherein, the estimated value of the third carrier deviation is a new adjusted UWB carrier frequency generated by the second crystal oscillator in the second UWB module and the first frequency generated by the first crystal oscillator in the first UWB module. UWB carrier frequencies are compared to the resulting estimates.

本申请实施例中,第一终端通过第一UWB模组接收到第二终端通过第二UWB模组,以新的调整后的UWB载波频率发送的第二UWB数据包后。通过锁脉冲技术或者解析载波频率的技术,获取第二UWB模组中的新的调整后的UWB载波频率。将新的调整后的UWB载波频率,与第一UWB模组中的第一晶体振荡器产生的第一UWB载波频率进行比较,得到第三载波偏差估计值。In the embodiment of the present application, after the first terminal receives, through the first UWB module, the second UWB data packet sent by the second terminal through the second UWB module at the new adjusted UWB carrier frequency. A new adjusted UWB carrier frequency in the second UWB module is obtained through a pulse-locking technique or a technique of analyzing the carrier frequency. The new adjusted UWB carrier frequency is compared with the first UWB carrier frequency generated by the first crystal oscillator in the first UWB module to obtain a third estimated value of carrier deviation.

步骤207、若第三载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成。Step 207: If there is a first correlation between the third estimated value of the carrier offset and the standard target value, determine that the calibration of the carrier offset for the second UWB module is completed.

本申请实施例中,若第一终端确定第三载波偏差估计值与标准目标值之间存在第一关联关系,则进一步确定第一终端针对第二终端中的第二UWB模组的载波偏差校准完成。In this embodiment of the present application, if the first terminal determines that there is a first correlation between the estimated value of the third carrier offset and the standard target value, the first terminal further determines the carrier offset calibration of the second UWB module in the second terminal by the first terminal Finish.

由此可知,参见图7(a)所示,首先,执行步骤S11,第一轮交互逻辑;在第一轮交互逻辑中,若第二终端按照第一终端通过第一UWB模组发送的标准目标值进行校准后,第一终端确定第二终端调整后的UWB载波频率并不满足校准目标要求。其次,执行步骤S12,第二轮交互逻辑;在第二轮交互逻辑中,若第二终端按照标准目标值对第二UWB模组中的调整后的UWB载波频率进行校准后,第一终端确定第二终端第二轮调整后的UWB载波频率仍旧不满足校准目标要求,继续基于标准目标值进行校准;接下来,执行步骤S13,第三轮交互逻辑;直至第一终端确定第二终端第n轮调整后的UWB载波频率满足校准目标要求;如此,通过多次交互进行校准,以使第二终端基于第一终端发送的标准目标值来调整自身的UWB载波频率,直至确定第二终端调整后的UWB载波频率满足校准目标要求,从而保证第一终端与第二终端的载波偏差的同步性保持在一定范围内;如此,实现对第二终端的载波偏差的实时校准,同时也提升了使用第一UWB模组和第二UWB模组进行定位的定位精度。It can be seen that, referring to Fig. 7(a), first, step S11 is executed, the first round of interaction logic; in the first round of interaction logic, if the second terminal follows the standard sent by the first terminal through the first UWB module After the target value is calibrated, the first terminal determines that the UWB carrier frequency adjusted by the second terminal does not meet the calibration target requirement. Next, step S12 is executed, the second round of interaction logic; in the second round of interaction logic, if the second terminal calibrates the adjusted UWB carrier frequency in the second UWB module according to the standard target value, the first terminal determines The UWB carrier frequency of the second terminal after the second round of adjustment still does not meet the calibration target requirements, and continues to perform calibration based on the standard target value; next, step S13 is performed, the third round of interactive logic; until the first terminal determines that the second terminal nth The adjusted UWB carrier frequency meets the calibration target requirements; in this way, the calibration is performed through multiple interactions, so that the second terminal adjusts its own UWB carrier frequency based on the standard target value sent by the first terminal, until it is determined that the second terminal has adjusted The UWB carrier frequency of the first terminal meets the calibration target requirements, so as to ensure that the synchronization of the carrier deviation of the first terminal and the second terminal is kept within a certain range; in this way, the real-time calibration of the carrier deviation of the second terminal is realized, and the use of the first terminal is also improved. The positioning accuracy of a UWB module and a second UWB module for positioning.

本申请其他实施例中,标准目标值用于在测角定位场景下调整实际UWB载波频率的第一目标值,步骤207若第三载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成之后,还可执行如下步骤,In other embodiments of the present application, the standard target value is used to adjust the first target value of the actual UWB carrier frequency in the angular positioning scenario. Instep 207, if there is a first correlation between the third estimated value of carrier deviation and the standard target value, After determining that the carrier offset calibration for the second UWB module is completed, the following steps can also be performed:

通过第一UWB模组以第一UWB载波频率向第二UWB模组发送测角请求消息,以使第二终端通过第二UWB模组,以当前调整后的UWB载波频率接收测角请求消息,并通过第二UWB模组确定第一终端相对于第二终端的方位角。The first UWB module sends the angle measurement request message to the second UWB module at the first UWB carrier frequency, so that the second terminal receives the angle measurement request message at the currently adjusted UWB carrier frequency through the second UWB module, And the azimuth angle of the first terminal relative to the second terminal is determined by the second UWB module.

在一种可实现的测角定位场景下,如图5所示,第一终端确定自身相对于第二终端方位角,基于UWB模组在测角时,待测设备为信号发射方,以及进行测角的设备为信号接收方的特性。第二终端想要确定第一终端的相对位置时,第一终端为待测设备,即信号发射方;相应的,第二终端为信号接收方。如图5所示,第一终端配置有一个发送模块,即发射天线T,发射天线T在对应的传输时间上发送测角信号至第二终端;第二终端中的第二UWB模组中配置有特定间距d的两个接收模块,第一接收模块即第一接收天线A,第二接收模块即第二接收天线B,第二终端在通过第一接收天线A和第二接收天线B,以新的调整后的UWB载波频率,接收发射天线T发送的测角信号时,第二终端可以通过第二UWB模组测量出第一接收天线A和第二接收天线B接收到的测角信号的相位,从而计算出到达相位差(Phasedifference of arrival,PDOA)。进一步的,通过到达相位差PDOA得到发射天线T距离第二终端的第一接收天线A和第二接收天线B的路径差p,进而根据路径差p和特定间距d通过(三角)函数关系计算出到达角度θ(也就是第一终端相对于第二终端的方位角)。具体的,可以通过如下公式得到。In an achievable angle measurement and positioning scenario, as shown in FIG. 5 , the first terminal determines its own azimuth relative to the second terminal. Based on the angle measurement of the UWB module, the device to be tested is the signal transmitter, and the The goniometric device is characteristic of the receiver of the signal. When the second terminal wants to determine the relative position of the first terminal, the first terminal is the device under test, that is, the signal transmitter; correspondingly, the second terminal is the signal receiver. As shown in FIG. 5 , the first terminal is configured with a transmitting module, namely a transmitting antenna T, and the transmitting antenna T transmits the angle measurement signal to the second terminal at the corresponding transmission time; the second UWB module in the second terminal is configured with There are two receiving modules with a specific distance d, the first receiving module is the first receiving antenna A, the second receiving module is the second receiving antenna B, and the second terminal is passing through the first receiving antenna A and the second receiving antenna B to receive With the new adjusted UWB carrier frequency, when receiving the angle measurement signal sent by the transmitting antenna T, the second terminal can measure the angle measurement signal received by the first receiving antenna A and the second receiving antenna B through the second UWB module. phase to calculate the phase difference of arrival (Phasedifference of arrival, PDOA). Further, the path difference p between the transmitting antenna T and the first receiving antenna A and the second receiving antenna B of the second terminal is obtained by reaching the phase difference PDOA, and then according to the path difference p and the specific distance d, the (trigonometric) function relationship is calculated. The angle of arrival θ (that is, the azimuth angle of the first terminal relative to the second terminal). Specifically, it can be obtained by the following formula.

Figure BDA0002842524450000091
Figure BDA0002842524450000091

由此可知,根据UWB应用的功能,确定第一终端中的第一UWB模组的定位场景,并根据定位场景选择与定位场景对应的校准目标值,基于第一终端发送的标准目标值实现对第二终端的载波偏差的实时校准,同时提高了UWB应用的空间感知精度,也提高了UWB应用的定位精度。It can be seen that, according to the function of the UWB application, the positioning scene of the first UWB module in the first terminal is determined, and the calibration target value corresponding to the positioning scene is selected according to the positioning scene, and the standard target value sent by the first terminal is used. The real-time calibration of the carrier offset of the second terminal improves the spatial perception accuracy of the UWB application and also improves the positioning accuracy of the UWB application.

本申请实施例提供一种载波偏差的处理方法,应用于第一终端,标准目标值用于在测距定位场景下调整实际UWB载波频率的第二目标值,如图6所示,该方法包括以下步骤,An embodiment of the present application provides a carrier offset processing method, which is applied to a first terminal, and the standard target value is used to adjust the second target value of the actual UWB carrier frequency in a ranging and positioning scenario. As shown in FIG. 6 , the method includes: the following steps,

步骤301、通过第一UWB模组以第一UWB载波频率向第二UWB模组发送测距请求消息。Step 301: Send a ranging request message to a second UWB module through the first UWB module at the first UWB carrier frequency.

其中,测距请求消息携带有第一UWB数据包。The ranging request message carries the first UWB data packet.

其中,第一UWB数据包携带有第二目标值、第一目标地址;这里,标准目标值用于调整第二终端的第二UWB模组的默认UWB载波频率,得到当前调整后的UWB载波频率。Wherein, the first UWB data packet carries the second target value and the first target address; here, the standard target value is used to adjust the default UWB carrier frequency of the second UWB module of the second terminal to obtain the currently adjusted UWB carrier frequency .

步骤302、通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的测距响应消息。Step 302: Receive, through the first UWB module, a ranging response message sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency.

其中,测距响应消息携带有第二UWB数据包。The ranging response message carries the second UWB data packet.

步骤303、获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值。Step 303: Obtain the estimated first carrier deviation between the currently adjusted UWB carrier frequency and the first UWB carrier frequency.

步骤304、若第一载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成。Step 304: If there is a first correlation between the first estimated value of the carrier offset and the standard target value, determine that the calibration of the carrier offset for the second UWB module is completed.

本申请其他实施例中,参见图7(a)所示,首先,执行步骤S11,第一轮交互逻辑。In other embodiments of the present application, as shown in FIG. 7( a ), first, step S11 is executed, the first round of interaction logic.

在第一轮交互逻辑中,参见图7(b)所示,执行步骤S21,发送测距请求消息,第一终端通过第一UWB模组发送测距请求携带的第一数据包中的第二目标值;执行步骤S22,返回测距响应消息,若第二终端按照第一终端通过第一UWB模组发送的测距请求携带的第一数据包中的第二目标值进行校准后,返回测距响应消息;第一终端确定第二终端调整后的UWB载波频率并不满足校准目标要求。需要说明的是,在执行步骤S21之前,参见图7(c)所示,还可执行步骤S20,第二终端发送消息至第一终端。In the first round of interaction logic, referring to Fig. 7(b), step S21 is executed to send a ranging request message, and the first terminal sends the second data packet in the first data packet carried in the ranging request through the first UWB module. target value; execute step S22, return a ranging response message, if the second terminal calibrates according to the second target value in the first data packet carried in the ranging request sent by the first terminal through the first UWB module, returns the measurement A distance response message; the first terminal determines that the UWB carrier frequency adjusted by the second terminal does not meet the calibration target requirements. It should be noted that, before step S21 is performed, referring to FIG. 7( c ), step S20 may also be performed, in which the second terminal sends a message to the first terminal.

其次,执行步骤S12,第二轮交互逻辑。在第二轮交互逻辑中,第一终端再次通过第一UWB模组发送测距请求携带的第一数据包中的第二目标值,若第二终端按照标准目标值对第二UWB模组中的调整后的UWB载波频率进行校准后,第一终端确定第二终端第二轮调整后的UWB载波频率满足校准目标要求。Next, step S12 is executed, the second round of interaction logic. In the second round of interaction logic, the first terminal sends the second target value in the first data packet carried in the ranging request through the first UWB module again. After the adjusted UWB carrier frequency is calibrated, the first terminal determines that the UWB carrier frequency after the second round of adjustment by the second terminal meets the calibration target requirements.

接下来,执行步骤S13,第三轮交互逻辑;第一终端再次通过第一UWB模组发送测距请求,确定第一终端与第二终端之间的定位。也就是说,第一终端与第二终端之间存在多次交互,若确定第二终端调整后的UWB载波频率满足校准目标要求,在后续的交互过程中,无需再对第二UWB模组中的UWB载波频率进行调整,可直接进行无线通信。如此,在发送测距请求消息的同时,实现对第二终端的载波偏差的实时校准,同时也提升了使用第一UWB模组和第二UWB模组进行定位的定位精度。Next, step S13 is performed, the third round of interaction logic; the first terminal sends a ranging request through the first UWB module again to determine the positioning between the first terminal and the second terminal. That is to say, there are multiple interactions between the first terminal and the second terminal. If it is determined that the adjusted UWB carrier frequency of the second terminal meets the calibration target requirements, in the subsequent interaction process, there is no need to perform any further changes in the second UWB module. The frequency of the UWB carrier can be adjusted, and wireless communication can be carried out directly. In this way, while the ranging request message is sent, the real-time calibration of the carrier offset of the second terminal is realized, and the positioning accuracy of the positioning using the first UWB module and the second UWB module is also improved.

步骤305、基于测距请求消息对应的时间戳与测距响应消息对应的时间戳,确定第一终端与第二终端之间的距离。Step 305: Determine the distance between the first terminal and the second terminal based on the timestamp corresponding to the ranging request message and the timestamp corresponding to the ranging response message.

这里,第一终端确定第一终端与第二终端之间的间隔距离,可以基于单侧双向测距(Single-sided Two-Way Ranging,SS-TWR)算法,确定第一终端与第二终端之间的间隔距离,如图8所示;当然,第一终端还可以基于其他技术方案确定自身与第二终端之间的间隔距离,例如第一终端还可以基于单次双侧双向测距(Single Double-sided Two-WayRanging,SDS-TWR)算法,确定第一终端与第二终端之间的间隔距离,如图9所示。Here, the first terminal determines the separation distance between the first terminal and the second terminal, and the distance between the first terminal and the second terminal may be determined based on the Single-sided Two-Way Ranging (SS-TWR) algorithm. The separation distance between the two terminals, as shown in Figure 8; of course, the first terminal can also determine the separation distance between itself and the second terminal based on other technical solutions, for example, the first terminal can also be based on a single double-sided two-way ranging (Single The Double-sided Two-Way Ranging, SDS-TWR) algorithm determines the separation distance between the first terminal and the second terminal, as shown in FIG. 9 .

在一种可实现的测距模式场景中,如图8所示,第一终端通过SS-TWR算法,确定自身与第二终端之间的间隔距离。第一终端发起测距请求消息,第二终端响应测距请求消息,同时,第一终端和第二终端精确记录信号发送和接收的时间戳信息。这里,第二终端在收到第一终端的发送的测距请求消息后,延迟固定的时间回发测距响应消息,此时,第一终端接收第二终端回发的测距响应消息。第二终端回发测距响应消息的时间与收到第一终端发送的测距请求消息的时间差为Treply,第一终端接收到第二终端回发的测距响应消息的时间与第一终端发送测距请求消息的时间差为Tround。故测距请求消息在第一终端和第二终端之间的传输时间可通过公式

Figure BDA0002842524450000101
得到。但由于第一UWB模组中的第一晶振存在频率偏移eA和第二UWB模组中的第二晶振存在频率偏移eB。使得T′round=(1+eA)Tround,T′reply=(1+eB)Treply。导致测距请求消息在第一终端和第二终端之间的传输时间增加为
Figure BDA0002842524450000111
本申请实施例中通过对第二UWB模组中的第二晶振存在频率偏移eB进行调整,从而减少了测距请求消息在第一UWB模组和第二UWB模组的传输时间,同时将获取的传输时间乘以光速即可确定第一终端和第二终端之间的距离。In an achievable ranging mode scenario, as shown in FIG. 8 , the first terminal determines the separation distance between itself and the second terminal through the SS-TWR algorithm. The first terminal initiates a ranging request message, the second terminal responds to the ranging request message, and at the same time, the first terminal and the second terminal accurately record time stamp information of signal transmission and reception. Here, after receiving the ranging request message sent by the first terminal, the second terminal sends back a ranging response message after a fixed time delay. At this time, the first terminal receives the ranging response message sent back by the second terminal. The time difference between the time when the second terminal sends back the ranging response message and the time when it receives the ranging request message sent by the first terminal is Treply . The time difference for sending the ranging request message is Tround . Therefore, the transmission time of the ranging request message between the first terminal and the second terminal can be calculated by the formula
Figure BDA0002842524450000101
get. However, because the first crystal oscillator in the first UWB module has a frequency offset eA and the second crystal oscillator in the second UWB module has a frequency offset eB . Let T'round = (1+eA )Tround , T'reply = (1+eB )Treply . resulting in an increase in the transmission time of the ranging request message between the first terminal and the second terminal as
Figure BDA0002842524450000111
In the embodiment of the present application, the frequency offset eB of the second crystal oscillator in the second UWB module is adjusted, thereby reducing the transmission time of the ranging request message in the first UWB module and the second UWB module, and at the same time The distance between the first terminal and the second terminal can be determined by multiplying the obtained transmission time by the speed of light.

在一种可实现的测距模式场景中,如图9所示,第一终端还可以使用SDS-TWR算法,通过第一UWB模组和第二UWB模组进行测距请求消息交互,从而确定第一终端与第二终端之间的间隔距离。需要说明的是,SDS-TWR算法可以有效抵消频率偏移,此处由于该方法的具体计算过程近乎为前述SS-TWR算法的重复,因此不再赘述。In an achievable ranging mode scenario, as shown in FIG. 9 , the first terminal can also use the SDS-TWR algorithm to exchange ranging request messages through the first UWB module and the second UWB module, thereby determining The separation distance between the first terminal and the second terminal. It should be noted that the SDS-TWR algorithm can effectively cancel out the frequency offset. Since the specific calculation process of this method is almost the repetition of the aforementioned SS-TWR algorithm, it will not be repeated here.

由此可知,根据UWB应用的功能,确定第一终端中的第一UWB模组的定位场景,并根据定位场景选择与定位场景对应的校准目标值,基于第一终端发送的标准目标值实现对第二终端的载波偏差的实时校准,同时提高了UWB应用的空间感知精度,也提高了UWB应用的定位精度。It can be seen from this that, according to the function of the UWB application, the positioning scene of the first UWB module in the first terminal is determined, and the calibration target value corresponding to the positioning scene is selected according to the positioning scene, and based on the standard target value sent by the first terminal, the calibration target value is realized. The real-time calibration of the carrier offset of the second terminal improves the spatial perception accuracy of UWB applications and also improves the positioning accuracy of UWB applications.

本申请实施例提供一种载波偏差的处理方法,应用于第一终端,标准目标值用于在测距测角定位场景下调整实际UWB载波频率的第三目标值,如图10所示,该方法包括以下步骤,An embodiment of the present application provides a method for processing a carrier deviation, which is applied to a first terminal, and the standard target value is used to adjust the third target value of the actual UWB carrier frequency in a ranging and angle-finding positioning scenario. As shown in FIG. 10 , the The method includes the following steps,

步骤401、通过第一UWB模组以第一UWB载波频率向第二UWB模组发送测距请求消息。Step 401: Send a ranging request message to a second UWB module through the first UWB module at the first UWB carrier frequency.

其中,测距请求消息携带有第一UWB数据包。The ranging request message carries the first UWB data packet.

其中,第一UWB数据包携带有第三目标值、第一目标地址;这里,标准目标值用于调整第二终端的第二UWB模组的默认UWB载波频率,得到当前调整后的UWB载波频率。Wherein, the first UWB data packet carries the third target value and the first target address; here, the standard target value is used to adjust the default UWB carrier frequency of the second UWB module of the second terminal to obtain the currently adjusted UWB carrier frequency .

需要说明的是,第三目标值可以与第一目标值相同,也可以与第一目标值不同,第三目标值的取值以得到第二UWB模组中的调整后的UWB载波频率更准确、更精确为准。It should be noted that the third target value may be the same as the first target value, or may be different from the first target value, and the value of the third target value is more accurate to obtain the adjusted UWB carrier frequency in the second UWB module. , whichever is more precise.

步骤402、通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的测距响应消息。Step 402: Receive, through the first UWB module, a ranging response message sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency.

其中,测距响应消息携带有第二UWB数据包。The ranging response message carries the second UWB data packet.

步骤403、获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值。Step 403: Obtain the estimated first carrier deviation between the currently adjusted UWB carrier frequency and the first UWB carrier frequency.

步骤404、若第一载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成。Step 404: If there is a first correlation between the first estimated value of the carrier offset and the standard target value, determine that the calibration of the carrier offset for the second UWB module is completed.

步骤405、基于测距请求消息对应的时间戳与测距响应消息对应的时间戳,确定第一终端与第二终端之间的距离。Step 405: Determine the distance between the first terminal and the second terminal based on the timestamp corresponding to the ranging request message and the timestamp corresponding to the ranging response message.

步骤406、通过第一UWB模组以第一UWB载波频率向第二UWB模组发送测角信号,以使第二终端通过第二UWB模组,以当前调整后的UWB载波频率接收测角信号,并通过第二UWB模组确定第一终端相对于第二终端的方位角。Step 406: Send the angle measurement signal to the second UWB module with the first UWB carrier frequency through the first UWB module, so that the second terminal receives the angle measurement signal with the currently adjusted UWB carrier frequency through the second UWB module , and the azimuth angle of the first terminal relative to the second terminal is determined by the second UWB module.

由此可知,根据UWB应用的功能,确定第一终端中的第一UWB模组的定位场景,并根据定位场景选择与定位场景对应的校准目标值,基于第一终端发送的标准目标值实现对第二终端的载波偏差的实时校准,同时提高了UWB应用的空间感知精度,也提高了UWB应用的定位精度。It can be seen from this that, according to the function of the UWB application, the positioning scene of the first UWB module in the first terminal is determined, and the calibration target value corresponding to the positioning scene is selected according to the positioning scene, and based on the standard target value sent by the first terminal, the calibration target value is realized. The real-time calibration of the carrier offset of the second terminal improves the spatial perception accuracy of UWB applications and also improves the positioning accuracy of UWB applications.

需要说明的是,本实施例中与其它实施例中相同步骤和相同内容的说明,可以参照其它实施例中的描述,此处不再赘述。It should be noted that, for the description of the same steps and the same content in this embodiment as in other embodiments, reference may be made to the descriptions in other embodiments, and details are not repeated here.

本申请实施例提供一种载波偏差的处理方法,应用于第二终端,如图11所示,该方法包括以下步骤:An embodiment of the present application provides a carrier offset processing method, which is applied to a second terminal. As shown in FIG. 11 , the method includes the following steps:

步骤501、通过第二终端的第二UWB模组接收第一终端通过第一UWB模组,以第一UWB载波频率发送的第一UWB数据包。Step 501: Receive, through the second UWB module of the second terminal, a first UWB data packet sent by the first terminal through the first UWB module and at the first UWB carrier frequency.

其中,第一UWB载波频率为第一UWB模组的中的第一晶体振荡器产生的实际UWB载波频率。第一UWB载波频率的取值等于第一晶体振荡器的第一基准频率与第一晶振偏差频率之和,第一基准频率为预先为第一晶体振荡器设计的目标载波频率。The first UWB carrier frequency is the actual UWB carrier frequency generated by the first crystal oscillator in the first UWB module. The value of the first UWB carrier frequency is equal to the sum of the first reference frequency of the first crystal oscillator and the first crystal oscillator deviation frequency, and the first reference frequency is the target carrier frequency designed for the first crystal oscillator in advance.

步骤502、获得第一UWB载波频率与第二UWB载波频率之间的第二载波偏差估计值。Step 502: Obtain a second carrier offset estimation value between the first UWB carrier frequency and the second UWB carrier frequency.

其中,第二UWB载波频率为第二UWB模组的中的第二晶体振荡器产生的实际UWB载波频率。第二UWB载波频率的取值等于第二晶体振荡器的第二基准频率与第二晶振偏差频率之和,第二基准频率为预先为第二晶体振荡器设计的目标载波频率。第二基准频率与第一基准频率相同,第二晶振偏差频率与第一晶振偏差频率不同。Wherein, the second UWB carrier frequency is the actual UWB carrier frequency generated by the second crystal oscillator in the second UWB module. The value of the second UWB carrier frequency is equal to the sum of the second reference frequency of the second crystal oscillator and the deviation frequency of the second crystal oscillator, and the second reference frequency is the target carrier frequency designed for the second crystal oscillator in advance. The second reference frequency is the same as the first reference frequency, and the deviation frequency of the second crystal oscillator is different from the deviation frequency of the first crystal oscillator.

这里,第一UWB载波频率与第二UWB载波频率不同。Here, the first UWB carrier frequency is different from the second UWB carrier frequency.

其中,第三载波偏差估计值为将第二UWB模组中的第二晶体振荡器产生的第二UWB载波频率,与第一UWB模组中的第一晶体振荡器产生的第一UWB载波频率进行比较,所得到的估计值。Wherein, the estimated value of the third carrier deviation is the second UWB carrier frequency generated by the second crystal oscillator in the second UWB module and the first UWB carrier frequency generated by the first crystal oscillator in the first UWB module. Compare the resulting estimates.

本申请实施例中,第二终端通过第二UWB模组接收到第一终端通过第一UWB模组,以第一UWB载波频率发送的第一UWB数据包后。通过锁脉冲技术或者解析载波频率的技术,获取第一UWB模组中的第一UWB载波频率。第二终端通过锁脉冲技术或者解析载波频率的技术,获取第二UWB模组中的第二晶体振荡器产生的第二UWB载波频率。将第二UWB载波频率与第一UWB模组中的第一晶体振荡器产生的第一UWB载波频率进行比较,得到第二载波偏差估计值。In the embodiment of the present application, the second terminal receives, through the second UWB module, the first UWB data packet sent by the first terminal through the first UWB module and at the first UWB carrier frequency. The first UWB carrier frequency in the first UWB module is obtained through the pulse-locking technology or the technology of analyzing the carrier frequency. The second terminal obtains the second UWB carrier frequency generated by the second crystal oscillator in the second UWB module through the pulse lock technology or the technology of analyzing the carrier frequency. The second UWB carrier frequency is compared with the first UWB carrier frequency generated by the first crystal oscillator in the first UWB module to obtain a second carrier deviation estimate value.

本申请其他实施例中,在步骤502获得第一UWB载波频率与第二UWB载波频率之间的第二载波偏差估计值之后,还可以执行如下步骤,In other embodiments of the present application, after obtaining the estimated value of the second carrier deviation between the first UWB carrier frequency and the second UWB carrier frequency instep 502, the following steps may also be performed:

获取标准目标值减去第二载波偏差估计值的第三差值。A third difference value of the standard target value minus the second carrier offset estimate is obtained.

若第三差值的绝对值不大于差值阈值,确定第二载波偏差估计值与标准目标值之间存在第二关联关系。If the absolute value of the third difference is not greater than the difference threshold, it is determined that there is a second correlation between the estimated second carrier deviation and the standard target value.

本申请实施例中,第二终端获取标准目标值减去第二载波偏差估计值的第三差值,判断第三差值的绝对值与差值阈值的关系。若第三差值的绝对值不大于差值阈值,确定第二载波偏差估计值与标准目标值之间存在第二关联关系,此时,第二终端确定第二UWB模组的载波偏差校准成功;若第三差值的绝对值大于差值阈值,确定第二载波偏差估计值与标准目标值之间不存在第二关联关系,此时,第二终端确定第二UWB模组的载波偏差未校准成功。In the embodiment of the present application, the second terminal obtains the third difference value of the standard target value minus the estimated value of the second carrier deviation, and determines the relationship between the absolute value of the third difference value and the difference threshold value. If the absolute value of the third difference is not greater than the difference threshold, it is determined that there is a second correlation between the estimated value of the second carrier deviation and the standard target value, and at this time, the second terminal determines that the calibration of the carrier deviation of the second UWB module is successful If the absolute value of the third difference is greater than the difference threshold, it is determined that there is no second correlation between the estimated value of the second carrier deviation and the standard target value, and at this time, the second terminal determines that the carrier deviation of the second UWB module is not Calibration was successful.

在一种可实现的应用场景中,第二终端获取的第二载波偏差估计值COE_2为-2ppm,标准目标值Value为-10ppm。获取标准目标值Value减去第二载波偏差估计值COE_2的第三差值N,此时N为-8ppm。并判断第三差值的绝对值|N|与差值阈值X的关系,这里,X为0.5ppm,确定第三差值的绝对值|N|大于差值阈值X,则进一步确定第二载波偏差估计值COE_2与标准目标值Value之间不存在第二关联关系。In an achievable application scenario, the second carrier offset estimation value COE_2 obtained by the second terminal is -2ppm, and the standard target value Value is -10ppm. Obtain the third difference value N of the standard target value Value minus the second carrier offset estimation value COE_2, where N is -8ppm at this time. And determine the relationship between the absolute value |N| of the third difference and the difference threshold X, where X is 0.5ppm, and determine that the absolute value |N| of the third difference is greater than the difference threshold X, then further determine the second carrier There is no second relationship between the estimated deviation value COE_2 and the standard target value Value.

步骤503、若第二载波偏差估计值与第一UWB数据包携带的标准目标值之间不存在第二关联关系,调整第二UWB载波频率,得到当前调整后的UWB载波频率。Step 503: If there is no second correlation between the estimated value of the second carrier offset and the standard target value carried in the first UWB data packet, adjust the frequency of the second UWB carrier to obtain the currently adjusted UWB carrier frequency.

其中,第二关联关系可以为第二载波偏差估计值等于标准目标值,第二关联关系还可以为第二载波偏差估计值与标准目标值的差值的绝对值,不大于差值阈值。The second correlation relationship may be that the estimated value of the second carrier deviation is equal to the standard target value, and the second correlation relationship may also be the absolute value of the difference between the estimated value of the second carrier deviation and the standard target value, which is not greater than the difference threshold.

本申请实施例中,若第二终端确定第二载波偏差估计值与第一UWB数据包携带的标准目标值之间不存在第二关联关系,则基于标准目标值与第二载波偏差估计值,调整第二UWB载波频率,得到当前调整后的UWB载波频率。In this embodiment of the present application, if the second terminal determines that there is no second correlation between the estimated value of the second carrier offset and the standard target value carried in the first UWB data packet, then based on the standard target value and the estimated value of the second carrier offset, Adjust the second UWB carrier frequency to obtain the currently adjusted UWB carrier frequency.

步骤504、通过第二UWB模组以当前调整后的UWB载波频率向第一终端发送第二UWB数据包,以使第一终端确定针对第二UWB模组的载波频率校准是否完成。Step 504: Send the second UWB data packet to the first terminal through the second UWB module at the currently adjusted UWB carrier frequency, so that the first terminal determines whether the carrier frequency calibration for the second UWB module is completed.

其中,第二UWB数据包携带有第一终端的地址。The second UWB data packet carries the address of the first terminal.

本申请实施例中,第二终端通过第二UWB模组以当前调整后的UWB载波频率向第一终端发送第二UWB数据包,以使第一终端确定、针对第二UWB模组中的第二晶体振荡器产生的当前调整后的UWB载波频率的校准是否完成。In the embodiment of the present application, the second terminal sends the second UWB data packet to the first terminal through the second UWB module at the currently adjusted UWB carrier frequency, so that the first terminal determines and targets the first terminal in the second UWB module. Whether the calibration of the current adjusted UWB carrier frequency generated by the crystal oscillator is completed.

由上述可知,通过第一UWB模组发送的标准目标值,调整第二UWB模组中的第二晶体振荡器的产生的UWB载波频率,以使第二晶体振荡器的频率偏差减少,如此,提高UWB模组的空间感知精度,同时,也提高了UWB模组的定位精度。It can be seen from the above that the UWB carrier frequency generated by the second crystal oscillator in the second UWB module is adjusted through the standard target value sent by the first UWB module, so that the frequency deviation of the second crystal oscillator is reduced. In this way, The spatial perception accuracy of the UWB module is improved, and at the same time, the positioning accuracy of the UWB module is also improved.

本申请实施例提供一种载波偏差的处理方法,应用于第二终端,如图12所示,该方法包括以下步骤:An embodiment of the present application provides a method for processing a carrier offset, which is applied to a second terminal. As shown in FIG. 12 , the method includes the following steps:

步骤601、通过第二终端的第二UWB模组接收第一终端通过第一UWB模组,以第一UWB载波频率发送的第一UWB数据包。Step 601: Receive, through the second UWB module of the second terminal, a first UWB data packet sent by the first terminal through the first UWB module and at the first UWB carrier frequency.

步骤602、获得第一UWB载波频率与第二UWB载波频率之间的第二载波偏差估计值。Step 602: Obtain a second carrier offset estimation value between the first UWB carrier frequency and the second UWB carrier frequency.

步骤603、若第二载波偏差估计值与第一UWB数据包携带的标准目标值之间不存在第二关联关系,获取标准目标值减去第二载波偏差估计值的第二差值。Step 603: If there is no second correlation between the estimated second carrier offset value and the standard target value carried in the first UWB data packet, obtain a second difference value of the standard target value minus the estimated second carrier offset value.

其中,第二差值对应第二UWB模组中的寄存器的待调整频偏值。The second difference value corresponds to the to-be-adjusted frequency offset value of the register in the second UWB module.

本申请实施例中,第二终端获取标准目标值减去第二载波偏差估计值的第二差值,判断第二差值的绝对值与差值阈值的关系。若第二差值的绝对值大于差值阈值,确定第二载波偏差估计值与标准目标值之间不存在第二关联关系,并确定第二差值对应第二UWB模组中的寄存器的待调整频偏值。In the embodiment of the present application, the second terminal obtains the second difference value of the standard target value minus the second carrier deviation estimate value, and determines the relationship between the absolute value of the second difference value and the difference threshold value. If the absolute value of the second difference is greater than the difference threshold, it is determined that there is no second correlation between the estimated value of the second carrier deviation and the standard target value, and it is determined that the second difference corresponds to the pending value of the register in the second UWB module. Adjust the frequency offset value.

示例性的,第二终端确定第二载波偏差估计值COE_2为-2ppm,标准目标值Value为-10ppm。获取标准目标值Value减去第二载波偏差估计值COE_2的第二差值S,此时S为-8ppm。并判断第三差值的绝对值|S|与差值阈值X的关系,这里,X为0.5ppm,确定第二差值的绝对值|S|大于差值阈值X,则进一步确定第二载波偏差估计值COE_2与标准目标值Value之间不存在第二关联关系。同时第二终端确定第二差值作为第二UWB模组中的寄存器的待调整频偏值。Exemplarily, the second terminal determines that the second carrier offset estimation value COE_2 is -2ppm, and the standard target value Value is -10ppm. Obtain the second difference value S of the standard target value Value minus the second carrier offset estimation value COE_2, where S is -8ppm. And determine the relationship between the absolute value |S| of the third difference and the difference threshold X, where X is 0.5ppm, and determine that the absolute value |S| of the second difference is greater than the difference threshold X, then further determine the second carrier There is no second relationship between the estimated deviation value COE_2 and the standard target value Value. At the same time, the second terminal determines the second difference value as the frequency offset value to be adjusted of the register in the second UWB module.

步骤604、基于第二差值与调整频偏阈值之间的大小关系,确定第二UWB模组中的寄存器的调整方向。Step 604: Determine the adjustment direction of the register in the second UWB module based on the magnitude relationship between the second difference and the adjustment frequency offset threshold.

其中,调整频偏阈值为预先设置在第二UWB模组中,用于调整第二UWB模组中的寄存器的方向。示例性的,调整频偏阈值可以为0。Wherein, the adjustment frequency offset threshold value is preset in the second UWB module, and is used to adjust the direction of the register in the second UWB module. Exemplarily, the adjusted frequency offset threshold may be 0.

这里,第二终端调整第二UWB模组中的第二晶体振荡器产生的第二UWB载波频率的方法为调整第二UWB模组中影响第二晶体振荡器产生的第二UWB载波频率的寄存器,该寄存器是通过调整晶体震荡电路中的可调电容阵列实现,调整第二晶体振荡器产生的第二UWB载波频率。具体地,当可调电容阵列的电容值增大时,晶体振荡器的负载电容将增大,晶体振荡器产生的第二UWB载波频率会降低。同理,当可调电容阵列的电容值减小时,晶体振荡器的负载电容将减小,晶体振荡器产生的第二UWB载波频率会提高。Here, the method for the second terminal to adjust the second UWB carrier frequency generated by the second crystal oscillator in the second UWB module is to adjust the register in the second UWB module that affects the second UWB carrier frequency generated by the second crystal oscillator , the register is realized by adjusting the adjustable capacitor array in the crystal oscillator circuit to adjust the second UWB carrier frequency generated by the second crystal oscillator. Specifically, when the capacitance value of the adjustable capacitor array increases, the load capacitance of the crystal oscillator will increase, and the frequency of the second UWB carrier wave generated by the crystal oscillator will decrease. Similarly, when the capacitance value of the adjustable capacitor array decreases, the load capacitance of the crystal oscillator will decrease, and the frequency of the second UWB carrier generated by the crystal oscillator will increase.

本申请实施例中,第二终端将第二差值与调整频偏阈值进行比较,若第二差值小于调整频偏阈值,则将确定待调整寄存器的方向为,第二晶体振荡器产生的第二UWB载波频率减少的方向;若第二差值大于调整频偏阈值,则将确定待调整寄存器的方向为,第二晶体振荡器产生的第二UWB载波频率增大的方向。In the embodiment of the present application, the second terminal compares the second difference with the adjustment frequency offset threshold, and if the second difference is smaller than the adjustment frequency offset threshold, the direction of the register to be adjusted is determined as the direction generated by the second crystal oscillator. The direction in which the frequency of the second UWB carrier decreases; if the second difference is greater than the adjustment frequency offset threshold, the direction of the register to be adjusted will be determined as the direction in which the frequency of the second UWB carrier generated by the second crystal oscillator increases.

步骤605、确定第二差值的绝对值除以寄存器的调整步长的商,为寄存器的调整值。Step 605: Determine the quotient of the absolute value of the second difference divided by the adjustment step size of the register to be the adjustment value of the register.

其中,调整步长为寄存器的单位调整值与第二UWB模组的频率偏差对应的调整量。需要说明的是,调整步长是预先存储在第二终端,用于对第二UWB模组中的第二晶体振荡器产生的载波频率偏差进行调整。示例性的,调整步长step可以取值0.5ppm。The adjustment step is an adjustment amount corresponding to the unit adjustment value of the register and the frequency deviation of the second UWB module. It should be noted that the adjustment step size is pre-stored in the second terminal for adjusting the carrier frequency deviation generated by the second crystal oscillator in the second UWB module. Exemplarily, the adjustment step size step may take a value of 0.5ppm.

本申请实施例中,第二终端对第二差值取绝对值,并获取第二差值的绝对值除以调整步长的商,作为寄存器的调整值。示例性的,若第二差值S为-8ppm,第二终端对第二差值S取绝对值,并获取第二差值的绝对值|S|除以调整步长step的商,即|S|/step,得到寄存器的调整值TrimValue,即TrimValue=|S|/step=|-8ppm|/0.5ppm=16,此时,第二终端需将影响第二晶体振荡器产生的第二UWB载波频率的寄存器,往晶体振荡器产生的第二UWB载波频率增大或减小的方向调整16刻度。In the embodiment of the present application, the second terminal takes the absolute value of the second difference, and obtains the quotient of dividing the absolute value of the second difference by the adjustment step size, as the adjustment value of the register. Exemplarily, if the second difference value S is -8ppm, the second terminal takes the absolute value of the second difference value S, and obtains the quotient of dividing the absolute value of the second difference value |S| by the adjustment step size step, that is, | S|/step, get the adjustment value TrimValue of the register, namely TrimValue=|S|/step=|-8ppm|/0.5ppm=16, at this time, the second terminal needs to affect the second UWB generated by the second crystal oscillator The register of the carrier frequency is adjusted by 16 ticks in the direction of increasing or decreasing the frequency of the second UWB carrier generated by the crystal oscillator.

步骤606、在寄存器中存储的第二UWB载波频率的基础上向调整方向,调整调整值,得到当前调整后的UWB载波频率。Step 606: On the basis of the second UWB carrier frequency stored in the register, adjust the adjustment value in the direction of adjustment to obtain the current adjusted UWB carrier frequency.

本申请实施例中,若寄存器的调整方向为第二晶体振荡器产生的第二UWB载波频率减少的方向,第二终端基于寄存器的调整方向,调整影响第二晶体振荡器产生的第二UWB载波频率的寄存器,往晶体振荡器产生的第二UWB载波频率减少的方向调整寄存器的调整值;若寄存器的调整方向为第二晶体振荡器产生的第二UWB载波频率增大的方向,第二终端基于寄存器的调整方向,调整影响第二晶体振荡器产生的第二UWB载波频率的寄存器,往晶体振荡器产生的第二UWB载波频率增大的方向调整寄存器的调整值。In this embodiment of the present application, if the adjustment direction of the register is the direction in which the frequency of the second UWB carrier generated by the second crystal oscillator decreases, the second terminal adjusts the second UWB carrier generated by the second crystal oscillator based on the adjustment direction of the register. The frequency register, adjust the adjustment value of the register in the direction in which the frequency of the second UWB carrier generated by the crystal oscillator decreases; if the adjustment direction of the register is the direction in which the frequency of the second UWB carrier generated by the second crystal oscillator increases, the second terminal Based on the adjustment direction of the register, adjust the register affecting the second UWB carrier frequency generated by the second crystal oscillator, and adjust the adjustment value of the register in the direction of increasing the second UWB carrier frequency generated by the crystal oscillator.

步骤607、通过第二UWB模组以当前调整后的UWB载波频率向第一终端发送第二UWB数据包,以使第一终端确定针对第二UWB模组的载波频率校准是否完成。Step 607: Send a second UWB data packet to the first terminal through the second UWB module at the currently adjusted UWB carrier frequency, so that the first terminal determines whether the carrier frequency calibration for the second UWB module is completed.

由上述可知,第二终端通过调整第二UWB模组中的寄存器中的值,以实现调整第二UWB模组中的第二晶体振荡器产生的UWB载波频率,从而使得第一终端与第二终端的载波偏差的同步性保持在一定范围内;如此,实现对第二终端的载波偏差的实时校准,同时也提升了使用第一UWB模组和第二UWB模组进行定位的定位精度。It can be seen from the above that the second terminal adjusts the value in the register in the second UWB module to adjust the UWB carrier frequency generated by the second crystal oscillator in the second UWB module, so that the first terminal and the second The synchronization of the carrier offset of the terminal is kept within a certain range; in this way, the real-time calibration of the carrier offset of the second terminal is realized, and the positioning accuracy of the positioning using the first UWB module and the second UWB module is also improved.

需要说明的是,本实施例中与其它实施例中相同步骤和相同内容的说明,可以参照其它实施例中的描述,此处不再赘述。It should be noted that, for the description of the same steps and the same content in this embodiment as in other embodiments, reference may be made to the descriptions in other embodiments, and details are not repeated here.

本申请实施例提供一种载波频率的处理方法,如图13所示,该方法包括以下步骤:An embodiment of the present application provides a method for processing a carrier frequency. As shown in FIG. 13 , the method includes the following steps:

步骤701、第一终端获取触发UWB应用的UWB应用信息。Step 701: The first terminal acquires UWB application information that triggers the UWB application.

步骤702、第一终端根据UWB应用信息,确定UWB应用中的UWB测距功能和UWB测角功能是否使用。Step 702: The first terminal determines whether the UWB ranging function and the UWB angle measuring function in the UWB application are used according to the UWB application information.

本申请实施例中,步骤702第一终端根据UWB应用信息,确定UWB应用中的UWB测距功能和UWB测角功能是否使用;若第一终端确定UWB测角功能使用,则执行步骤703;若第一终端确定UWB测距功能使用,则执行步骤704;若第一终端确定UWB测距功能和测角功能同时使用,则执行步骤705。In the embodiment of the present application, instep 702, the first terminal determines whether the UWB ranging function and the UWB angle measurement function in the UWB application are used according to the UWB application information; if the first terminal determines that the UWB angle measurement function is used,step 703 is performed; If the first terminal determines that the UWB ranging function is used,step 704 is performed; if the first terminal determines that the UWB ranging function and the angle measurement function are used at the same time,step 705 is performed.

步骤703、在UWB应用运行之前,通过第一UWB模组向第二终端发送第一数据包。Step 703: Before the UWB application runs, send the first data packet to the second terminal through the first UWB module.

其中,第一数据包携带有第一目标值。第一目标值用于调整第二终端中的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率。The first data packet carries the first target value. The first target value is used to adjust the actual UWB carrier frequency of the second UWB module in the second terminal to obtain the currently adjusted UWB carrier frequency.

步骤704、在UWB应用运行过程中,通过第一UWB模组向第二终端发送测距请求消息,测距请求消息携带有第一数据包。Step 704: During the running process of the UWB application, send a ranging request message to the second terminal through the first UWB module, where the ranging request message carries the first data packet.

其中,第一数据包携带有第二目标值。第一目标值用于调整第二终端中的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率。第二目标值与第一目标值不同。Wherein, the first data packet carries the second target value. The first target value is used to adjust the actual UWB carrier frequency of the second UWB module in the second terminal to obtain the currently adjusted UWB carrier frequency. The second target value is different from the first target value.

步骤705、在UWB应用运行过程中,通过第一UWB模组向第二终端发送测距测角请求消息,测距测角请求消息携带有第一数据包。Step 705: During the running process of the UWB application, send a ranging and angle-measuring request message to the second terminal through the first UWB module, where the ranging and angle-measuring request message carries the first data packet.

其中,第一数据包携带有第三目标值。第三目标值用于调整第二终端中的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率。第三目标值与第一目标值可以相同,第三目标值与第一目标值可以不同。Wherein, the first data packet carries the third target value. The third target value is used to adjust the actual UWB carrier frequency of the second UWB module in the second terminal to obtain the currently adjusted UWB carrier frequency. The third target value may be the same as the first target value, and the third target value may be different from the first target value.

本申请的实施例提供一种第一终端,该第一终端可以应用于图3、4、6、10对应的实施例提供的一种载波偏差的处理方法中,如图14所示,该第一终端14包括:第一处理器1401、第一存储器1402和第一通信总线1403,其中:An embodiment of the present application provides a first terminal, and the first terminal can be applied to a carrier offset processing method provided by the embodiments corresponding to FIGS. 3 , 4 , 6 , and 10 . As shown in FIG. 14 , the firstterminal A terminal 14 includes: afirst processor 1401, afirst memory 1402 and afirst communication bus 1403, wherein:

第一通信总线1403用于实现第一处理器1401和第一存储器1402之间的通信连接;Thefirst communication bus 1403 is used to realize the communication connection between thefirst processor 1401 and thefirst memory 1402;

第一处理器1401用于执行第一存储器1402中存储的载波偏差的处理程序,以实现以下步骤:Thefirst processor 1401 is configured to execute the processing program of the carrier offset stored in thefirst memory 1402, so as to realize the following steps:

通过第一终端的第一超宽带UWB模组以第一UWB载波频率向第二终端发送第一UWB数据包;第一UWB数据包携带有标准目标值,标准目标值用于调整第二终端的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率;The first UWB data packet is sent to the second terminal at the first UWB carrier frequency through the first ultra-wideband UWB module of the first terminal; the first UWB data packet carries a standard target value, and the standard target value is used to adjust the second terminal's The actual UWB carrier frequency of the second UWB module obtains the current adjusted UWB carrier frequency;

通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包;Receive, through the first UWB module, the second UWB data packet sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency;

获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值;obtaining the estimated value of the first carrier deviation between the currently adjusted UWB carrier frequency and the first UWB carrier frequency;

若第一载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成。If there is a first correlation between the first estimated value of the carrier offset and the standard target value, it is determined that the calibration of the carrier offset for the second UWB module is completed.

本申请的其他实施例中,第一处理器1401用于执行第一存储器1402中存储的载波偏差的处理程序,以实现以下步骤:In other embodiments of the present application, thefirst processor 1401 is configured to execute the carrier offset processing program stored in thefirst memory 1402 to implement the following steps:

获取标准目标值的相反数减去第一载波偏差估计值的第一差值;若第一差值的绝对值不大于差值阈值,确定第一载波偏差估计值与标准目标值之间存在第一关联关系。Obtain the inverse of the standard target value minus the first difference value of the estimated value of the first carrier deviation; if the absolute value of the first difference is not greater than the difference threshold, determine that there is a first difference between the estimated value of the first carrier deviation and the standard target value. an association relationship.

本申请的其他实施例中,第一处理器1401用于执行第一存储器1402中存储的载波偏差的处理程序,以实现以下步骤:In other embodiments of the present application, thefirst processor 1401 is configured to execute the carrier offset processing program stored in thefirst memory 1402 to implement the following steps:

若第一载波偏差估计值与标准目标值之间不存在第一关联关系,通过第一UWB模组以第一UWB载波频率向第二终端发送第二UWB数据包;第二UWB数据包携带有标准目标值,标准目标值用于调整当前调整后的UWB载波频率,得到新的调整后的UWB载波频率;通过第一UWB模组接收第二终端通过第二UWB模组,以新的调整后的UWB载波频率发送的第二UWB数据包;获得新的调整后的UWB载波频率与第一UWB载波频率之间的第三载波偏差估计值;若第三载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成。If there is no first correlation between the estimated value of the first carrier deviation and the standard target value, a second UWB data packet is sent to the second terminal at the first UWB carrier frequency through the first UWB module; the second UWB data packet carries the Standard target value, the standard target value is used to adjust the currently adjusted UWB carrier frequency to obtain a new adjusted UWB carrier frequency; the second terminal is received through the first UWB module and passed through the second UWB module to obtain a new adjusted UWB carrier frequency. The second UWB data packet sent by the UWB carrier frequency; obtain the third carrier deviation estimate value between the new adjusted UWB carrier frequency and the first UWB carrier frequency; There is a first association relationship, and it is determined that the carrier offset calibration for the second UWB module is completed.

本申请的其他实施例中,第一处理器1401用于执行第一存储器1402中存储的载波偏差的处理程序,以实现以下步骤:In other embodiments of the present application, thefirst processor 1401 is configured to execute the carrier offset processing program stored in thefirst memory 1402 to implement the following steps:

通过第一UWB模组以第一UWB载波频率向第二UWB模组发送测角请求消息,以使第二终端通过第二UWB模组,以当前调整后的UWB载波频率接收测角请求消息,并通过第二UWB模组确定第一终端相对于第二终端的方位角。The first UWB module sends the angle measurement request message to the second UWB module at the first UWB carrier frequency, so that the second terminal receives the angle measurement request message at the currently adjusted UWB carrier frequency through the second UWB module, And the azimuth angle of the first terminal relative to the second terminal is determined by the second UWB module.

本申请的其他实施例中,第一处理器1401用于执行第一存储器1402中存储的载波偏差的处理程序,以实现以下步骤:In other embodiments of the present application, thefirst processor 1401 is configured to execute the carrier offset processing program stored in thefirst memory 1402 to implement the following steps:

通过第一UWB模组以所述第一UWB载波频率向第二UWB模组发送测距请求消息;测距请求消息携带有第一UWB数据包;通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的测距响应消息;测距响应消息携带有第二UWB数据包;基于测距请求消息对应的时间戳与测距响应消息对应的时间戳,确定第一终端与第二终端之间的距离。The ranging request message is sent to the second UWB module through the first UWB module at the first UWB carrier frequency; the ranging request message carries the first UWB data packet; the first UWB module receives the second terminal through the first UWB module. Two UWB modules, a ranging response message sent with the currently adjusted UWB carrier frequency; the ranging response message carries the second UWB data packet; based on the timestamp corresponding to the ranging request message and the timestamp corresponding to the ranging response message , and determine the distance between the first terminal and the second terminal.

本申请的其他实施例中,第一处理器1401用于执行第一存储器1402中存储的载波偏差的处理程序,以实现以下步骤:In other embodiments of the present application, thefirst processor 1401 is configured to execute the carrier offset processing program stored in thefirst memory 1402 to implement the following steps:

通过第一UWB模组以第一UWB载波频率向第二UWB模组发送测距请求消息;测距请求消息携带有第一UWB数据包;通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的测距响应消息;测距响应消息携带有第二UWB数据包;基于测距请求消息对应的时间戳与测距响应消息对应的时间戳,确定第一终端与第二终端之间的距离;通过第一UWB模组以第一UWB载波频率向第二UWB模组发送测角信号,以使第二终端通过第二UWB模组,以当前调整后的UWB载波频率接收测角信号,并通过第二UWB模组确定第一终端相对于第二终端的方位角。The ranging request message is sent to the second UWB module through the first UWB module at the first UWB carrier frequency; the ranging request message carries the first UWB data packet; the second terminal receives through the first UWB module through the second UWB module module, the ranging response message sent with the currently adjusted UWB carrier frequency; the ranging response message carries the second UWB data packet; based on the timestamp corresponding to the ranging request message and the timestamp corresponding to the ranging response message, determine The distance between the first terminal and the second terminal; the angle measurement signal is sent to the second UWB module through the first UWB module at the first UWB carrier frequency, so that the second terminal passes through the second UWB module to adjust the current The latter UWB carrier frequency receives the angle measurement signal, and determines the azimuth angle of the first terminal relative to the second terminal through the second UWB module.

本申请的实施例提供一种第二终端,该第二终端可以应用于图11、12对应的实施例提供的一种载波偏差的处理方法中,如图15所示,该第二终端15包括:第二处理器1501、第二存储器1502和第二通信总线1503,其中:An embodiment of the present application provides a second terminal, and the second terminal can be applied to the carrier offset processing method provided by the embodiments corresponding to FIGS. 11 and 12 . As shown in FIG. 15 , thesecond terminal 15 includes :second processor 1501,second memory 1502 andsecond communication bus 1503, wherein:

第二通信总线1503用于实现第二处理器1501和第二存储器1502之间的通信连接;Thesecond communication bus 1503 is used to realize the communication connection between thesecond processor 1501 and thesecond memory 1502;

第二处理器1501用于执行第二存储器1502中存储的载波偏差的处理程序,以实现以下步骤:Thesecond processor 1501 is configured to execute the processing program of the carrier offset stored in thesecond memory 1502 to realize the following steps:

通过第二终端的第二UWB模组接收第一终端通过第一UWB模组,以第一UWB载波频率发送的第一UWB数据包;Receive, through the second UWB module of the second terminal, the first UWB data packet sent by the first terminal through the first UWB module at the first UWB carrier frequency;

获得第一UWB载波频率与第二UWB载波频率之间的第二载波偏差估计值;obtaining a second carrier offset estimate between the first UWB carrier frequency and the second UWB carrier frequency;

若第二载波偏差估计值与第一UWB数据包携带的标准目标值之间不存在第二关联关系,调整第二UWB载波频率,得到当前调整后的UWB载波频率;If there is no second correlation between the estimated value of the second carrier offset and the standard target value carried in the first UWB data packet, adjust the second UWB carrier frequency to obtain the currently adjusted UWB carrier frequency;

通过第二UWB模组以当前调整后的UWB载波频率向第一终端发送第二UWB数据包,以使第一终端确定针对第二UWB模组的载波频率校准是否完成。The second UWB data packet is sent to the first terminal at the currently adjusted UWB carrier frequency through the second UWB module, so that the first terminal determines whether the calibration of the carrier frequency for the second UWB module is completed.

本申请的其他实施例中,第二处理器1501用于执行第二存储器1502中存储的载波偏差的处理程序,以实现以下步骤:In other embodiments of the present application, thesecond processor 1501 is configured to execute the carrier offset processing program stored in thesecond memory 1502, so as to realize the following steps:

获取标准目标值减去第二载波偏差估计值的第二差值;obtaining a second difference value of the standard target value minus the estimated value of the second carrier offset;

若第二差值的绝对值不大于差值阈值,确定第二载波偏差估计值与标准目标值之间存在第二关联关系。If the absolute value of the second difference is not greater than the difference threshold, it is determined that there is a second correlation between the estimated second carrier deviation and the standard target value.

本申请的其他实施例中,第二处理器1501用于执行第二存储器1502中存储的载波偏差的处理程序,以实现以下步骤:In other embodiments of the present application, thesecond processor 1501 is configured to execute the carrier offset processing program stored in thesecond memory 1502, so as to realize the following steps:

基于第二差值与调整频偏阈值之间的大小关系,确定第二UWB模组中的寄存器的调整方向;Determine the adjustment direction of the register in the second UWB module based on the magnitude relationship between the second difference and the adjustment frequency offset threshold;

确定第二差值的绝对值除以寄存器的调整步长的商,为寄存器的调整值;Determine the quotient of the absolute value of the second difference divided by the adjustment step size of the register, which is the adjustment value of the register;

在寄存器中存储的第二UWB载波频率的基础上向调整方向,调整调整值,得到当前调整后的UWB载波频率。On the basis of the second UWB carrier frequency stored in the register, adjust the adjustment value in the adjustment direction to obtain the currently adjusted UWB carrier frequency.

基于前述实施例,本申请的实施例提供一种计算机存储介质,该计算机存储介质存储有一个或者多个程序,该一个或者多个程序可被一个或者多个处理器执行,将引起处理器执行本申请实施例提供的方法,例如,如图3、4、6、10-12示出的方法。Based on the foregoing embodiments, embodiments of the present application provide a computer storage medium, where the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors, and will cause the processors to execute The methods provided in the embodiments of the present application are, for example, the methods shown in FIGS. 3 , 4 , 6 , and 10-12 .

本申请实施例所提供的一种存储介质,通过第一终端的第一超宽带UWB模组以第一UWB载波频率向第二终端发送第一UWB数据包;第一UWB数据包携带有标准目标值,标准目标值用于调整第二终端的第二UWB模组的实际UWB载波频率,得到当前调整后的UWB载波频率;通过第一UWB模组接收第二终端通过第二UWB模组,以当前调整后的UWB载波频率发送的第二UWB数据包;获得当前调整后的UWB载波频率与第一UWB载波频率之间的第一载波偏差估计值;若第一载波偏差估计值与标准目标值之间存在第一关联关系,确定针对第二UWB模组的载波偏差校准完成;也就是说,第一终端发送标准目标值,以使第二终端基于第一终端发送的标准目标值来调整自身的UWB载波频率,从而使得第一终端与第二终端的载波偏差的同步性保持在一定范围内;如此,实现对第二终端的载波偏差的实时校准,同时也提升了使用第一UWB模组和第二UWB模组进行定位的定位精度。In a storage medium provided by an embodiment of the present application, a first UWB data packet is sent to a second terminal at a first UWB carrier frequency through a first ultra-wideband UWB module of a first terminal; the first UWB data packet carries a standard target value, the standard target value is used to adjust the actual UWB carrier frequency of the second UWB module of the second terminal to obtain the current adjusted UWB carrier frequency; the first UWB module receives the second terminal through the second UWB module to obtain the current adjusted UWB carrier frequency; The second UWB data packet sent by the currently adjusted UWB carrier frequency; obtain the estimated value of the first carrier deviation between the currently adjusted UWB carrier frequency and the first UWB carrier frequency; if the estimated value of the first carrier deviation is different from the standard target value There is a first correlation between them, and it is determined that the carrier offset calibration for the second UWB module is completed; that is, the first terminal sends the standard target value, so that the second terminal can adjust itself based on the standard target value sent by the first terminal. Therefore, the synchronization of the carrier deviation of the first terminal and the second terminal is kept within a certain range; in this way, the real-time calibration of the carrier deviation of the second terminal is realized, and the use of the first UWB module is also improved. The positioning accuracy of positioning with the second UWB module.

需要说明的是,本实施例中与其它实施例中相同步骤和相同内容的说明,可以参照其它实施例中的描述,此处不再赘述。It should be noted that, for the description of the same steps and the same content in this embodiment as in other embodiments, reference may be made to the descriptions in other embodiments, and details are not repeated here.

需要说明的是,上述计算机存储介质/存储器可以是只读存储器(Read OnlyMemory,ROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性随机存取存储器(Ferromagnetic Random Access Memory,FRAM)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(Compact Disc Read-Only Memory,CD-ROM)等存储器;也可以是包括上述存储器之一或任意组合的各种第一终端,如移动电话、计算机、平板设备、个人数字助理等。It should be noted that the above-mentioned computer storage medium/memory can be a read-only memory (Read OnlyMemory, ROM), a programmable read-only memory (Programmable Read-Only Memory, PROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory, ROM) -Only Memory, EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Magnetic Random Access Memory (Ferromagnetic Random Access Memory, FRAM), Flash Memory (Flash Memory), Magnetic surface memory, optical disk, or memory such as Compact Disc Read-Only Memory (CD-ROM); it can also be various first terminals including one or any combination of the above memories, such as a mobile phone, a computer, a tablet devices, personal digital assistants, etc.

在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms. of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The unit described above as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, each functional unit in each embodiment of the present application may all be integrated into one processing module, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above integration The unit can be implemented either in the form of hardware or in the form of hardware plus software functional units. Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by program instructions related to hardware, the aforementioned program may be stored in a computer-readable storage medium, and when the program is executed, execute Including the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk and other various A medium on which program code can be stored.

本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined under the condition of no conflict to obtain new method embodiments.

本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in the several product embodiments provided in this application can be combined arbitrarily without conflict to obtain a new product embodiment.

本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.

以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, and should cover within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method for processing carrier offset, applied to a first terminal, the method comprising:
sending a first UWB data packet to a second terminal through a first UWB module of a first terminal at a first UWB carrier frequency; the first UWB data packet carries a standard target value, and the standard target value is used for adjusting the actual UWB carrier frequency of a second UWB module of the second terminal to obtain the currently adjusted UWB carrier frequency;
receiving, by the first UWB module, a second UWB data packet sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency;
obtaining a first carrier deviation estimated value between the currently adjusted UWB carrier frequency and the first UWB carrier frequency;
and if a first incidence relation exists between the first carrier deviation estimated value and the standard target value, determining that the carrier deviation calibration aiming at the second UWB module is completed.
2. The method of processing carrier offset according to claim 1, wherein after obtaining the first carrier offset estimate between the currently adjusted UWB carrier frequency and the first UWB carrier frequency, the method comprises:
obtaining a first difference value obtained by subtracting the first carrier deviation estimation value from the opposite number of the standard target value;
and if the absolute value of the first difference is not larger than a difference threshold, determining that the first association relationship exists between the first carrier deviation estimated value and the standard target value.
3. The method for processing carrier offset according to claim 1, further comprising:
if the first carrier deviation estimated value does not have the first association relation with the standard target value, a second UWB data packet is sent to the second terminal through a first UWB module by the first UWB carrier frequency; the second UWB data packet carries the standard target value, and the standard target value is used for adjusting the currently adjusted UWB carrier frequency to obtain a new adjusted UWB carrier frequency;
receiving, by the first UWB module, a second UWB data packet sent by the second terminal at the new adjusted UWB carrier frequency through the second UWB module;
obtaining a third carrier offset estimate between the new adjusted UWB carrier frequency and the first UWB carrier frequency;
and if the first incidence relation exists between the third carrier deviation estimated value and the standard target value, determining that the carrier deviation calibration aiming at the second UWB module is completed.
4. The method according to any one of claims 1 to 3, wherein the standard target value is used to adjust a first target value of the actual UWB carrier frequency in an angle-measuring positioning scenario, and after determining that the carrier offset calibration for the second UWB module is completed if a first correlation exists between the first carrier offset estimation value and the standard target value, the method comprises:
and sending an angle measurement request message to the second UWB module through the first UWB module by using the first UWB carrier frequency, so that the second terminal receives the angle measurement request message by using the currently adjusted UWB carrier frequency through the second UWB module, and determines the azimuth angle of the first terminal relative to the second terminal through the second UWB module.
5. A method as claimed in any one of claims 1 to 3, wherein said standard target value is used to adjust a second target value of said actual UWB carrier frequency in a ranging positioning scenario, and a first UWB packet is sent to a second terminal at a first UWB carrier frequency by a first UWB module of a first terminal, said method comprising:
sending a ranging request message to the second UWB module through the first UWB module at the first UWB carrier frequency; the ranging request message carries the first UWB data packet;
correspondingly, through first UWB module is received the second terminal is through the second UWB module to the second UWB data package that UWB carrier frequency after the current adjustment sent includes:
receiving, by the first UWB module, a ranging response message sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency; the ranging response message carries the second UWB data packet;
the method further comprises the following steps:
and determining the distance between the first terminal and the second terminal based on the timestamp corresponding to the ranging request message and the timestamp corresponding to the ranging response message.
6. The method according to any one of claims 1 to 3, wherein the standard target value is used to adjust a third target value of the actual UWB carrier frequency in an angular ranging positioning scenario, and a first UWB packet is transmitted to a second terminal at a first UWB carrier frequency by a first UWB module of a first terminal, and the method comprises:
sending a ranging request message to the second UWB module at the first UWB carrier frequency through the first UWB module; the ranging request message carries the first UWB data packet;
correspondingly, receive through first UWB module the second terminal passes through the second UWB module to the second UWB data package that current adjusted UWB carrier frequency sent includes:
receiving, by the first UWB module, a ranging response message sent by the second terminal through the second UWB module at the currently adjusted UWB carrier frequency; the ranging response message carries the second UWB data packet;
the method further comprises the following steps:
determining a distance between the first terminal and the second terminal based on a timestamp corresponding to the ranging request message and a timestamp corresponding to the ranging response message;
after the determining that the carrier offset calibration for the second UWB module is completed, the method further includes:
and sending an angle measurement signal to the second UWB module through the first UWB module by using the first UWB carrier frequency, so that the second terminal receives the angle measurement signal by using the currently adjusted UWB carrier frequency through the second UWB module, and determines the azimuth angle of the first terminal relative to the second terminal through the second UWB module.
7. A method for processing carrier offset, applied to a second terminal, includes:
receiving a first UWB data packet sent by a first terminal through a first UWB module by a second UWB module of a second terminal at a first UWB carrier frequency;
obtaining a second carrier offset estimate between the first UWB carrier frequency and a second UWB carrier frequency;
if a second incidence relation does not exist between the second carrier deviation estimated value and a standard target value carried by the first UWB data packet, adjusting the second UWB carrier frequency to obtain the currently adjusted UWB carrier frequency;
and sending a second UWB data packet to the first terminal by the second UWB module according to the currently adjusted UWB carrier frequency, so that the first terminal determines whether the carrier frequency calibration aiming at the second UWB module is completed.
8. The method of processing carrier offset according to claim 7, wherein after obtaining the second estimate of carrier offset between the first UWB carrier frequency and the second UWB carrier frequency, the method comprises:
obtaining a second difference value of the standard target value minus the second carrier deviation estimation value;
and if the absolute value of the second difference is not greater than a difference threshold, determining that the second association exists between the second carrier deviation estimated value and the standard target value.
9. The method of claim 8, wherein said adjusting the second UWB carrier frequency to obtain a current adjusted UWB carrier frequency comprises:
determining the adjusting direction of a register in a second UWB module based on the magnitude relation between the second difference and the adjusting frequency offset threshold;
determining the quotient of the absolute value of the second difference value and the adjustment step length of the register as the adjustment value of the register;
and adjusting the adjustment value in the adjustment direction on the basis of the second UWB carrier frequency stored in the register to obtain the currently adjusted UWB carrier frequency.
10. A terminal, characterized in that the terminal comprises: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the processing program of the carrier deviation stored in the memory to realize the processing method of the carrier deviation according to any one of claims 1 to 6 or 7 to 9.
11. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the method for carrier offset processing according to any one of claims 1 to 6 or 7 to 9.
CN202011497198.0A2020-12-172020-12-17Carrier deviation processing method, terminal and storage mediumPendingCN114650202A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011497198.0ACN114650202A (en)2020-12-172020-12-17Carrier deviation processing method, terminal and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011497198.0ACN114650202A (en)2020-12-172020-12-17Carrier deviation processing method, terminal and storage medium

Publications (1)

Publication NumberPublication Date
CN114650202Atrue CN114650202A (en)2022-06-21

Family

ID=81991406

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011497198.0APendingCN114650202A (en)2020-12-172020-12-17Carrier deviation processing method, terminal and storage medium

Country Status (1)

CountryLink
CN (1)CN114650202A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20060171445A1 (en)*2005-01-282006-08-03Texas Instruments IncorporatedMethods and systems for detecting and mitigating interference for a wireless device
CN101455008A (en)*2006-04-032009-06-10伟俄内克斯研究公司Frequency offset correction for ultra-wideband communication systems
US20100150013A1 (en)*2007-05-292010-06-17Mitsubishi Electric CorporationCalibration method, communication system, frequency control method, and communication device
US10177809B1 (en)*2016-12-122019-01-08DecaWave, LtdReceiver for use in an ultra-wideband communication system
US20190199286A1 (en)*2017-12-222019-06-27Wiser Systems, Inc.Methods for Correcting Oscillator Offsets in Ultra-Wideband (UWB) Networks
CN110311673A (en)*2019-06-242019-10-08Oppo广东移动通信有限公司 A frequency calibration method, terminal and storage medium
US20200382159A1 (en)*2019-05-312020-12-03Apple Inc.Apparatus and method for managing ultra wideband (uwb) occupied bandwidths
CN112040541A (en)*2020-09-152020-12-04Oppo广东移动通信有限公司 Frequency adjustment method, device, terminal and storage medium
CN112051541A (en)*2014-05-232020-12-08德卡维务有限责任公司 Measuring Incidence Angles in Ultra-Wideband Communication Systems

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20060171445A1 (en)*2005-01-282006-08-03Texas Instruments IncorporatedMethods and systems for detecting and mitigating interference for a wireless device
CN101455008A (en)*2006-04-032009-06-10伟俄内克斯研究公司Frequency offset correction for ultra-wideband communication systems
US20100150013A1 (en)*2007-05-292010-06-17Mitsubishi Electric CorporationCalibration method, communication system, frequency control method, and communication device
CN112051541A (en)*2014-05-232020-12-08德卡维务有限责任公司 Measuring Incidence Angles in Ultra-Wideband Communication Systems
US10177809B1 (en)*2016-12-122019-01-08DecaWave, LtdReceiver for use in an ultra-wideband communication system
US20190199286A1 (en)*2017-12-222019-06-27Wiser Systems, Inc.Methods for Correcting Oscillator Offsets in Ultra-Wideband (UWB) Networks
US20200382159A1 (en)*2019-05-312020-12-03Apple Inc.Apparatus and method for managing ultra wideband (uwb) occupied bandwidths
CN110311673A (en)*2019-06-242019-10-08Oppo广东移动通信有限公司 A frequency calibration method, terminal and storage medium
CN112040541A (en)*2020-09-152020-12-04Oppo广东移动通信有限公司 Frequency adjustment method, device, terminal and storage medium

Similar Documents

PublicationPublication DateTitle
CN111308452B (en) System and method for phase shift-based arrival time reporting in passive positioning and ranging
US10962632B2 (en)Electronic device and method for low power RF ranging
CN113009461B (en)Improved single-side two-way distance measuring method, equipment, system and medium based on UWB
WO2013188113A1 (en)Round trip time (rtt) based ranging system and method
CN107677990A (en)A kind of positioner and localization method
CN207473082U (en)A kind of positioning device
US20180076875A1 (en)Method and apparatus for non-linear antenna array angle of arrival detection
CN114563758B (en) Arrival angle determination method and related device
CN112187627A (en)Interaction control method and system, wearable device, mobile terminal and storage medium
US20220264322A1 (en)Electronic device and beamforming control method for electronic device
WO2016191941A1 (en)Acquisition method and device of time of arrival for positioning mobile terminal
WO2016177090A1 (en)Clock synchronization method and device
CN115443665B (en) Method and terminal device for ranging
CN114720937A (en) Determination method and related device for angle of arrival
CN113655437A (en) Ranging method, ranging device and storage medium
CN118233920A (en)Sensing method, sensing device, communication apparatus, and storage medium
CN114650202A (en)Carrier deviation processing method, terminal and storage medium
CN112929820B (en)Positioning azimuth detection method, positioning terminal and computer readable storage medium
WO2024140796A1 (en)Transmission processing method and apparatus, and terminal and network-side device
CN113471700B (en)Antenna control method and device, storage medium and electronic equipment
WO2023151555A1 (en)Positioning methods and apparatuses, user equipment and storage medium
CN114765856A (en)Positioning method, positioning device, electronic equipment and readable storage medium
CN112152689B (en) Beam transmission control method, device and transmitter
CN114222362A (en)Positioning method and positioning device
US20220167292A1 (en)Wireless communication device, system, and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
AD01Patent right deemed abandoned
AD01Patent right deemed abandoned

Effective date of abandoning:20250425


[8]ページ先頭

©2009-2025 Movatter.jp