Indoor positioning method, terminal and system

By configuring multiple antennas in the first electronic device to determine the coordinate system, the problem that the existing UWB system cannot achieve three-dimensional positioning is solved, and efficient three-dimensional spatial positioning is achieved.

CN119967579APending Publication Date: 2025-05-09HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411999086.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The existing UWB indoor positioning system cannot determine the direction of the Z axis, and only realizes two-dimensional positioning in the horizontal plane, but cannot achieve three-dimensional spatial positioning.

Method used

By configuring at least three antennas in the first electronic device, a clear coordinate system is determined using the antenna structure relationship, and the three-dimensional coordinates of the second electronic device are measured based on this coordinate system.

Benefits of technology

Three-dimensional spatial positioning of the second electronic device is realized, positioning accuracy and efficiency are improved, and the positioning change of the first electronic device does not require re-determining of the coordinate system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119967579A_ABST
    Figure CN119967579A_ABST
Patent Text Reader

Abstract

An indoor positioning method, a terminal and a system relate to the technical field of positioning, can realize three-dimensional space positioning, and specifically comprise: a first electronic device comprises at least three antennas fixedly arranged therein and used for sending and receiving UWB signals, and any two antennas have a distance difference in a vertical direction and / or a horizontal direction; the distance between any two antennas is smaller than or equal to a threshold value, and the first electronic equipment determines a navigation coordinate system according to the structural relation of the at least three antennas; after the first electronic equipment receives a request of requesting to measure a position from the second electronic equipment, the first electronic equipment determines the direction of the second electronic equipment relative to the first electronic equipment by measuring the distance between the second electronic equipment and the first electronic equipment and utilizing the phase difference of the UWB signal sent by the second electronic equipment to reach the at least three antennas; and determining coordinates of the second electronic equipment in the navigation coordinate system according to the distance and the direction.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202011636500.6, and the original application date is December 31, 2020. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of positioning technology, and in particular to an indoor positioning method, terminal and system. Background Art

[0003] With the rapid development of smart homes, the spatial perception capability of smart devices has become an important development direction of smart homes. After enabling the spatial perception capability of smart devices, the user experience of smart homes can be greatly improved through spatial interaction between users and smart devices, and between smart devices.

[0004] In smart homes, an indoor positioning system based on ultra-wideband (UWB) (referred to as UWB system) is generally used to provide spatial perception capabilities for smart devices (such as universal remote controls and mobile phones) in the room. When establishing a UWB system, at least three UWB base stations need to be installed indoors, and a coordinate system for the UWB system needs to be established. Then, based on the principle of triangulation positioning, the time difference between the UWB signal emitted by the UWB tag (i.e., the device to be located) reaching the three UWB base stations is calculated to obtain the location of the UWB tag.

[0005] like Figure 1 As shown, when establishing the coordinate system of the UWB system, the distances between the three UWB base stations are first measured. Then, one of the UWB base stations (denoted as base station 0) is used as the origin of the coordinate system, and the line connecting base station 0 and another UWB base station (denoted as base station 1) is used as the Y axis of the coordinate system, and the direction from base station 0 to base station 1 is the positive direction of the Y axis. In other words, the coordinates of base station 1 are (0, r, 0), where r is the distance between base station 0 and base station 1. Then, the X axis is determined in the plane where the three base stations (i.e., base station 0, base station 1, and base station 2) are located, and base station 2 is specified to be located in the positive direction of the X axis of the coordinate system. The Z axis of the coordinate system is perpendicular to the XOY plane, but the positive direction of the Z axis cannot be determined. In other words, the coordinates of base station 2 are (x, y, 0), where x and y can be calculated based on the distance and direction between base station 2 and base station 0, and between base station 2 and base station 1.

[0006] It can be noted that the coordinate system method of the UWB system cannot determine the direction of the Z axis, so it can only achieve two-dimensional positioning of the UWB tag in the horizontal plane, and cannot achieve three-dimensional spatial positioning. It can be seen that the existing positioning solution of the UWB system needs to be improved. Summary of the invention

[0007] An indoor positioning method provided in the present application can determine a clear coordinate system based on the antenna structure configured by the first electronic device itself, and obtain the coordinates of the second electronic device in the coordinate system based on the antenna structure configured by itself, thereby realizing the three-dimensional spatial positioning of the second electronic device.

[0008] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:

[0009] In a first aspect, a first electronic device is provided, the first electronic device comprising at least three antennas, the at least three antennas being fixedly arranged in the first electronic device, any two of the at least three antennas having a distance difference in a vertical direction and / or a horizontal direction, and a distance between any two of the at least three antennas being less than or equal to a threshold, the at least three antennas being used to send and receive UWB signals, the first electronic device being installed in a first direction, the first electronic device being used to receive a first UWB signal sent by a second electronic device, and measuring a position of the second electronic device in a first coordinate system according to the first UWB signal, wherein the first coordinate system is determined according to a structural relationship of the at least three antennas.

[0010] Therefore, in the positioning method of the present application, the first electronic device determines the first coordinate system (including determining the three axes and the directions of the three axes), that is, the navigation coordinate system, based on the antenna structure configured by itself, and obtains the coordinates of the second electronic device in the first coordinate system based on its own antenna structure. It can be seen that the positioning method provided in the embodiment of the present application realizes the three-dimensional spatial positioning of the second electronic device based on a first electronic device.

[0011] In addition, it is understandable that when the position of the first electronic device changes, the first electronic device does not need to re-determine the coordinate system and can directly continue to measure the position of the second electronic device. It can be seen that the positioning efficiency of the first electronic device in this application is high and the mobility is good.

[0012] In a possible implementation manner, the threshold is the wavelength of the UWB signal received by the first electronic device.

[0013] That is, the phase difference of the UWB signal sent by the second electronic device reaching different antennas in the first electronic device is greater than 0 and less than 2π, which is helpful for the first electronic device to determine the direction of the second electronic device relative to the first electronic device.

[0014] In a possible implementation, any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction, including: the at least three antennas are in an L-shaped structural relationship in the vertical plane or the horizontal plane, or the at least three antennas are in a triangular structural relationship in the vertical plane or the horizontal plane. Thus, several specific structural relationships of the antennas in the first electronic device are provided.

[0015] In one possible implementation, at least three antennas include a first antenna, a second antenna and a third antenna, and the at least three antennas have an L-shaped structural relationship in a vertical plane or a horizontal plane, including: a line connecting the first antenna and the second antenna is perpendicular to a line connecting the first antenna and the third antenna; and a distance between the first antenna and the second antenna, and a distance between the first antenna and the third antenna, are both half of the wavelength of the UWB signal; at least three antennas have a triangular structural relationship in a vertical plane or a horizontal plane, including: a distance between the first antenna and the second antenna, a distance between the first antenna and the third antenna, and a distance between the second antenna and the third antenna, are both half of the wavelength of the UWB signal received by the first electronic device.

[0016] In a possible implementation, the first coordinate system is determined based on the structural relationship of at least three antennas, including: the origin of the first coordinate system is the position of the first antenna; the X-axis of the first coordinate system is located on the line connecting the first antenna and the second antenna, and the positive direction of the X-axis is the direction in which the second antenna points to the first antenna; the Y-axis of the first coordinate system is a direction perpendicular to the X-axis on a horizontal plane; the Z-axis of the first coordinate system is located on a plumb line, and the positive direction of the Z-axis is opposite to the direction of gravity.

[0017] In a possible implementation, the at least three antennas include a first antenna, a second antenna, a third antenna and a fourth antenna, and any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction, including: the line connecting the first antenna and the second antenna is parallel to the horizontal plane, and the line connecting the third antenna and the fourth antenna is perpendicular to the horizontal plane; and, on the same vertical plane, the line connecting the third antenna and the fourth antenna is perpendicular to the line connecting the third antenna and the fourth antenna; the origin of the first coordinate system is: the intersection of the line connecting the first antenna and the second antenna and the line connecting the third antenna and the fourth antenna; the X-axis of the first coordinate system is located on the line connecting the first antenna and the second antenna, and the positive direction of the X-axis is the direction in which the second antenna points to the first antenna; the Y-axis of the first coordinate system is the direction perpendicular to the X-axis on the horizontal plane; the Z-axis of the first coordinate system is located on the line connecting the third antenna and the fourth antenna, and the positive direction of the Z-axis is opposite to the direction of gravity. Thus, a method for determining a first coordinate system when a first electronic device includes four antennas is provided.

[0018] In a possible implementation, a mark is provided on the housing of the first electronic device, and the direction indicated by the mark is a first direction; the first direction is the same as or opposite to the positive direction of the Z axis in the first coordinate system and the direction of gravity.

[0019] That is to say, the first electronic device can be provided with specific marks (such as arrows or text) to prompt the user the correct installation method or the correct placement method, so that the Z axis of the U system established by the first electronic device can be located on the vertical plane, facilitating subsequent navigation according to the navigation information of the U system.

[0020] In one possible implementation, the first electronic device measures the position of the second electronic device in the first coordinate system based on the first UWB signal, including: the first electronic device measures a first distance between the second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device based on the first UWB signal; the first electronic device determines the position of the second electronic device in the first coordinate system based on the first distance and the first direction.

[0021] That is to say, in the present application, the position of the second electronic device in the first coordinate system is determined based on the distance between the second electronic device and the first electronic device measured by the first electronic device, and the direction of the second electronic device relative to the first electronic device. However, in the prior art, the three UWB base stations need to measure the distance between each base station and the second electronic device respectively, and determine the position of the second electronic device based on the three distances. It can be seen that in the present application, the second electronic device only needs to request the first electronic device to measure the position. Compared with the prior art in which the second electronic device needs to request the three base stations to measure the position respectively, the number of requests sent by the second electronic device is reduced in the present application.

[0022] In one possible implementation, the first electronic device measures a first distance between a second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device based on a first UWB signal, including: the first electronic device measures the first distance between the second electronic device and the first electronic device using a two-way ranging method; and the first electronic device determines the first direction based on a phase difference of a second UWB signal sent by the second electronic device received by different antennas among at least three antennas.

[0023] The second UWB signal is a UWB signal sent by the second electronic device for measuring the first direction. That is, the first electronic device can measure the distance between the first electronic device and the second electronic device based on any one of the three antennas, and determine the direction of the second electronic device relative to the first electronic device based on the phase difference of the signal transmitted by the second electronic device received by the three antennas.

[0024] In one possible implementation, the first electronic device measures a first direction of the second electronic device relative to the first electronic device based on the first UWB signal, and also includes: the first electronic device determines the first direction based on a phase difference of a second UWB signal sent by the second electronic device received by different antennas among at least three antennas, a wavelength of the second UWB signal, and a distance between different antennas among the at least three antennas.

[0025] The second UWB signal is a UWB signal sent by the second electronic device and used for measuring the first direction.

[0026] In one possible implementation, the first direction includes a first angle α and a second angle β, the first angle α being the angle between the horizontal direction of the second UWB signal sent by the second electronic device measured by the first electronic device and the X-axis in the first coordinate system; the second angle β being the angle between the vertical direction of the second UWB signal sent by the second electronic device measured by the first electronic device and the Z-axis in the first coordinate system.

[0027] In a possible implementation, when at least three antennas in the first electronic device are in an L-shaped structure, the first angle Second Angle in, The phase of the second UWB signal measured by the first antenna, is the phase of the second UWB signal measured by the second antenna, λ is the wavelength of the second UWB signal, and L1 is the distance between the first antenna and the second antenna; The phase of the second UWB signal is measured for the third antenna, and L2 is the distance between the first antenna and the third antenna.

[0028] In a possible implementation manner, the first electronic device determines the position of the second electronic device in the first coordinate system according to the first distance and the first direction, specifically including:

[0029]

[0030] Wherein, r is the distance between the second electronic device and the first electronic device measured by the first electronic device, and (x, y, z) is the coordinates of the second electronic device in the first coordinate system.

[0031] In a possible implementation, the first electronic device is further configured to: after the first electronic device measures the position of the second electronic device in the first coordinate system according to the first UWB signal, send the position of the second electronic device in the first coordinate system to the second electronic device.

[0032] In a second aspect, an indoor positioning method is provided, which is applied to a system including a first electronic device and a second electronic device, wherein the first electronic device includes at least three antennas, and the at least three antennas are fixedly arranged in the first electronic device; any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction, and the distance between any two of the at least three antennas is less than or equal to a threshold; and the first electronic device is installed in a first direction; the method includes: the first electronic device receives a first UWB signal sent by the second electronic device; the first electronic device measures the position of the second electronic device in a first coordinate system according to the first UWB signal, and the first coordinate system is determined according to the structural relationship of the at least three antennas.

[0033] In one possible implementation, the first electronic device measures the position of the second electronic device in the first coordinate system based on the first UWB signal, including: the first electronic device measures a first distance between the second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device based on the first UWB signal; the first electronic device determines the position of the second electronic device in the first coordinate system based on the first distance and the first direction.

[0034] In one possible implementation, the first electronic device measures a first distance between the second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device based on a first UWB signal, including: the first electronic device measures the first distance between the second electronic device and the first electronic device using a two-way ranging method; and the first electronic device determines the first direction based on a phase difference of a second UWB signal sent by the second electronic device received by different antennas among at least three antennas.

[0035] In one possible implementation, the first electronic device measures the first direction of the second electronic device relative to the first electronic device based on the first UWB signal, and also includes: the first electronic device determines the first direction based on the phase difference of the second UWB signal sent by the second electronic device received by different antennas among at least three antennas, the wavelength of the second UWB signal, and the distance between different antennas among the at least three antennas.

[0036] In a possible implementation, after the first electronic device measures the position of the second electronic device in the first coordinate system according to the first UWB signal, the method further includes: the first electronic device sends the position of the second electronic device in the first coordinate system to the second electronic device.

[0037] According to a third aspect, an indoor positioning system is provided, which comprises a first electronic device and a second electronic device, wherein the first electronic device comprises at least three antennas, and the at least three antennas are fixedly arranged in the first electronic device; any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction, and the distance between any two of the at least three antennas is less than or equal to a threshold; and the first electronic device is installed in a first direction; the second electronic device is used to send a first UWB signal to the first electronic device; the first electronic device is used to receive the first UWB signal and measure the position of the second electronic device in a first coordinate system according to the first UWB signal, and the first coordinate system is determined according to the structural relationship of the at least three antennas.

[0038] In a fourth aspect, a first electronic device is provided, comprising: a processor, a memory, and a UWB module, wherein the memory and the UWB module are coupled to the processor, wherein the UWB module comprises at least three antennas, and the at least three antennas are used to send and receive UWB signals, wherein any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction, and the distance between any two of the at least three antennas is less than or equal to a threshold, and the memory is used to store computer program code, and the computer program code comprises computer instructions, and when the processor reads the computer instructions from the memory, the first electronic device executes the indoor positioning method described in the above aspects and any possible implementation methods thereof.

[0039] In the fifth aspect, a second electronic device is provided, comprising: a processor, a memory, a UWB module, and an IMU module, wherein the memory, the UWB module, and the IMU module are coupled to the processor, wherein the UWB module comprises at least one antenna, and the at least one antenna is used to send and receive UWB signals, and the IMU module is used to measure the posture data of the second electronic device, and the memory is used to store computer program code, and the computer program code comprises computer instructions. When the processor reads the computer instructions from the memory, the second electronic device executes the indoor positioning method as described in the above aspects and any possible implementation methods thereof.

[0040] In a sixth aspect, a device is provided, which is included in a first electronic device, and the device has the function of implementing the behavior of the first electronic device in any of the above aspects and possible implementation methods. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes at least one module or unit corresponding to the above function. For example, a receiving module or unit, a measuring module or unit, and a sending module or unit, etc.

[0041] In the seventh aspect, a device is provided, which is included in a second electronic device, and the device has the function of implementing the behavior of the second electronic device in any of the above aspects and possible implementation methods. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes at least one module or unit corresponding to the above function. For example, a receiving module or unit, a measuring module or unit, a sending module or unit, and a computing unit, etc.

[0042] In an eighth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on a first electronic device, the first electronic device executes the method as described in the above aspects and any possible implementation thereof.

[0043] In a ninth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on a second electronic device, the second electronic device executes the method as described in the above aspects and any possible implementation thereof.

[0044] In the tenth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is caused to execute the method as described in the above aspects and any possible implementation thereof.

[0045] In the eleventh aspect, a chip system is provided, comprising a processor. When the processor executes instructions, the processor executes the method described in the above aspects and any possible implementation thereof.

[0046] It can be understood that the beneficial effects that can be achieved by the methods, devices, computer-readable storage media, and computer program products provided in the second to eleventh aspects mentioned above can be referred to the beneficial effects in the first aspect and any possible implementation method provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of a method for establishing a coordinate system of a UWB system in the prior art;

[0048] Figure 2 A schematic diagram of the system architecture of a UWB system provided in this application;

[0049] Figure 3 A schematic diagram of the structure of a first electronic device provided in this application;

[0050] Figure 4 Schematic diagram of antenna architecture in some first electronic devices provided in this application;

[0051] Figure 5 Schematic diagrams of antenna architectures in other first electronic devices provided in this application;

[0052] Fig. 6A Schematic diagrams of antenna architectures in some other first electronic devices provided in the present application;

[0053] Figure 6B Schematic diagrams of antenna architectures in some other first electronic devices provided in the present application;

[0054] Figure 7 A schematic diagram of the structure of a second electronic device provided in this application;

[0055] Fig. 8A Schematic diagram of coordinate systems of some UWB systems provided in this application;

[0056] Figure 8B Schematic diagram of coordinate systems of other UWB systems provided in this application;

[0057] Fig. 9 A schematic diagram of some methods for prompting the installation direction of a first electronic device provided in the present application;

[0058] Fig.10 A schematic diagram of a two-way ranging method provided for this application;

[0059] Fig.11 A schematic diagram of a method for calculating the direction of a second electronic device provided by the present application;

[0060] Fig.12 A schematic diagram of another method for calculating the direction of a second electronic device provided by the present application;

[0061] Fig.13 A flowchart of a joint positioning method based on UWB and IMU provided in this application;

[0062] Fig.14 A schematic diagram of a U- and B-coordinate conversion method provided in this application;

[0063] Fig.15 A schematic diagram of an attitude angle provided for this application;

[0064] Fig.16 A schematic diagram of the system architecture of another UWB system provided in this application. DETAILED DESCRIPTION

[0065] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in this article is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0066] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0067] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0068] The technical solution provided in the embodiments of the present application is described in detail below in conjunction with the accompanying drawings.

[0069] like Figure 2 FIG. 1 is a schematic diagram of the architecture of a UWB system provided in an embodiment of the present application. The positioning system includes a first electronic device 100 and a second electronic device 200 .

[0070] Among them, the above-mentioned first electronic device 100 has a UWB signal transceiver, and the UWB signal transceiver includes at least three antennas. The first electronic device 100 can construct a coordinate system of the UWB system (abbreviated as U system) according to the relative positions of the antennas in the transceiver. Furthermore, the first electronic device 100 can also use a two-way ranging method, and calculate the position of the device according to the phase difference of the UWB signal sent by other devices (such as the second electronic device 200) reaching different antennas.

[0071] Exemplarily, the first electronic device 100 can be a UWB base station, a smart speaker, a smart TV, an air purifier, a humidifier, a smart lamp (such as a ceiling lamp, a table lamp, an aromatherapy lamp, etc.), a desktop computer, a router, a smart socket, a water dispenser, a refrigerator, a smart switch, a smart door lock, a customer premise equipment (Customer Premise Equipment, CPE), a tablet computer, a mobile phone, etc. The present application does not limit the specific form of the first electronic device 100.

[0072] See also Figure 3 , which shows a schematic structural diagram of a first electronic device 100.

[0073] like Figure 3 As shown, the first electronic device 100 may include a processor 110, a memory 120, a universal serial bus (USB) interface 130, a power module 140, a UWB module 150, a wireless communication module 160, and the like.

[0074] It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. In addition, the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a limitation on the structure of the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also adopt the same Figure 3 Different interface connection methods, or a combination of multiple interface connection methods.

[0075] The processor 110 may include one or more processing units, and different processing units may be independent devices or integrated into one or more processors. For example, the processor 210 is a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).

[0076] The memory 120 may be used to store computer executable program codes, which include instructions. For example, the memory 120 may also store data processed by the processor 110, such as the calculated position and posture of the second electronic device 200. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the first electronic device 100 by running instructions stored in the memory 120 and / or instructions stored in a memory provided in the processor.

[0077] The USB interface 130 is an interface that complies with USB standard specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the first electronic device 100, and may also be used to transmit data between the first electronic device 100 and a peripheral device.

[0078] The power module 140 is used to supply power to various components of the first electronic device 100 , such as the processor 210 , the memory 220 , etc.

[0079] The UWB module 150 can provide a wireless communication solution based on UWB technology applied to the first electronic device 100. Among them, UWB technology is different from traditional communication technology, which realizes wireless transmission by sending and receiving extremely narrow pulses with nanoseconds or microseconds or less. Since the pulse time width is extremely short, ultra-wideband on the spectrum can be achieved, for example, the bandwidth used is above 500MHz. In addition to realizing wireless communication, UWB technology can also realize positioning, specifically, by detecting the signal pulse position and combining certain positioning algorithms to calculate the time the signal flies in the air, and the time multiplied by the rate at which the signal is transmitted in the air (such as the speed of light) is obtained to obtain the distance between the second electronic device 200 and the first electronic device 100, and in this application, the first electronic device 100 can also determine the direction of the second electronic device 200 relative to the first electronic device 100 according to the phase difference of different antennas achieved by the UWB signal sent by the second electronic device 200. Thereby achieving the goal of the positioning function, the accuracy can reach the centimeter level of precise positioning.

[0080] In the present application, the UWB module 150 includes an antenna module, which includes at least three antennas for sending and receiving UWB signals. The first electronic device 100 constructs a coordinate system of the UWB system based on the positional relationship of the antennas in the antenna module. Generally, when the first electronic device 100 is used for positioning, the first electronic device 100 can be installed on a wall or cabinet in the room, or placed on the ground or on a desktop. In the present application, the coordinate system of the UWB system is determined by using the distance difference formed by the three antennas in the antenna module in the horizontal direction and the vertical direction respectively.

[0081] In some embodiments, when the first electronic device 100 is in a posture for using a positioning function, the antennas in the UWB module 150 may present an L-shaped (or right-angled triangle) structural relationship.

[0082] For example, Figure 4 Middle (1) Figure 4 Middle (2) Figure 4 Middle (3) Figure 4As shown in (4), in the UWB module 150, antenna 0 and antenna 1 are aligned in the horizontal direction, and antenna 0 and antenna 2 are aligned in the vertical direction, that is, antenna 0, antenna 1 and antenna 2 present an L-shaped structural relationship on the vertical plane. In some specific examples, when the first electronic device 100 is a smart TV, a desktop computer, a tablet computer, a smart socket, a smart switch, a smart door lock, a CPE, etc., an L-shaped structure of three antennas on the vertical plane can be adopted, which occupies less space in the horizontal direction of the first electronic device 100.

[0083] For example, Figure 5 Middle (1) Figure 5 Middle (2) Figure 5 Middle (3) Figure 5 As shown in (4), antenna 0, antenna 1 and antenna 2 in the UWB module 150 are located in the same horizontal plane, and the line connecting antenna 0 and antenna 1 is perpendicular to the line connecting antenna 0 and antenna 2. That is, antenna 0, antenna 1 and antenna 2 can also present an L-shaped structural relationship on the horizontal plane. In other specific examples, when the first electronic device 100 is a smart speaker, an air purifier, a water dispenser, a refrigerator, etc., an L-shaped structure of three antennas on the horizontal plane can be adopted, which occupies less space in the vertical direction of the first electronic device 100.

[0084] Exemplarily, when the antennas in the UWB module 150 (including antenna 0, antenna 1, and antenna 2) are in an L-shaped structural relationship, the distance between antenna 0 and antenna 1, and between antenna 0 and antenna 2 may be less than or equal to λ, for example, 1 / 2λ. Wherein, λ is the wavelength of the signal to be received by the first electronic device 100 (for example, the UWB signal sent by the second electronic device 200). Furthermore, the distances between antenna 0 and antenna 1, and between antenna 0 and antenna 2 may be the same or different.

[0085] In other embodiments, when the first electronic device 100 is in a posture for using a positioning function, the antennas in the UWB module 150 may present a triangular (eg, equilateral triangle, isosceles triangle) structural relationship.

[0086] For example, Fig. 6A Middle (1) Fig. 6A Middle (2) Fig. 6A Neutralize (3) Fig. 6A As shown in (4), antenna 0, antenna 1 and antenna 2 in the UWB module 150 present a triangular structural relationship on the vertical plane. In some specific examples, when the first electronic device 100 is a smart TV, a desktop computer, a tablet computer, a smart socket, a smart switch, a smart door lock, a CPE, etc., an L-shaped structure of three antennas on the vertical plane can be adopted, which occupies less space in the horizontal direction of the first electronic device 100.

[0087] For example, Fig. 6A Zhong (5) and Fig. 6A As shown in (6), antenna 0, antenna 1 and antenna 2 in the UWB module 150 may also present a triangular structural relationship on the horizontal plane. In other specific examples, when the first electronic device 100 is a smart speaker, an air purifier, a water dispenser, a refrigerator, etc., an L-shaped structure of three antennas on the horizontal plane may be adopted, which occupies less space in the vertical direction of the first electronic device 100.

[0088] Exemplarily, when the antennas in the UWB module 150 (including antenna 0, antenna 1, and antenna 2) are in a triangular structural relationship, the distance between any two of the three antennas may be less than or equal to λ, for example, 1 / 2λ. Wherein, λ is the wavelength of the target signal received by the first electronic device 100 (for example, the UWB signal sent by the second electronic device 200). For example, the distance between antenna 0 and antenna 1 may be less than or equal to 1 / 2λ; the distance between antenna 0 and antenna 2 is less than or equal to 1 / 2λ. Furthermore, the distance between any two of the three antennas may be the same or different.

[0089] above Figure 4 , Figure 5 ,as well as Fig. 6A The following description is based on the example that the UWB module 150 includes three antennas. It is understood that the UWB module 150 may also include more than three antennas. Figure 6B As shown in (1), the UWB module 150 includes antennas 0 to 3, and the four antennas form a rectangular structure. Among them, any three antennas form an L-shaped structure as described above. For example, Figure 6B As shown in (2), the UWB module 150 includes antenna 0 to antenna 3, and the four antennas are shown in the figure. Among them, antenna 0, antenna 1 and antenna 2 form an L-shaped structure as described above. Or, antenna 1, antenna 2 and antenna 3 form a triangle structure as described above. For example, Figure 6B As shown in (3), the UWB module 150 includes antennas 0 to 3, and the four antennas form a diamond structure. Wherein, antenna 0, antenna 1 and antenna 2 form a triangle structure as described above. Or, where antenna 0, antenna 1 and antenna 3 form a triangle structure as described above. For another example, Figure 6B As shown in (4), the UWB module 150 includes antennas 0 to 3, and the four antennas form a diamond structure. Among them, antenna 0, antenna 1 and antenna 2 form a triangular structure as described above. In short, the specific number of antennas of the UWB module 150 is not limited in the embodiment of the present application.

[0090] Optionally, the first electronic device 100 may also include a wireless communication module 160 to provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied on the first electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via an antenna, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0091] The second electronic device 200 has a UWB signal transceiver, which can be used to send UWB signals so that the first electronic device 100 can calculate the position of the second electronic device 200 .

[0092] Exemplarily, the second electronic device 200 may be a UWB tag, a mobile phone, a remote control, a wearable electronic device (a smart watch, a smart bracelet, VR glasses, etc.), a tablet computer, a personal digital assistant (PDA), a handle, an air mouse, etc. The present application does not limit the specific form of the second electronic device 200.

[0093] See also Figure 7 , which shows a schematic structural diagram of a second electronic device 200.

[0094] like Figure 7 As shown, the second electronic device 200 may include a processor 210, a memory 220, a universal serial bus (USB) interface 230, a power module 240, a UWB module 250, a wireless communication module 260, etc. Optionally, the second electronic device 200 may further include an IMU module 270.

[0095] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the second electronic device 200. In other embodiments of the present application, the second electronic device 200 may include more or fewer components than those illustrated, or combine certain components, or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. In addition, the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a limitation on the structure of the second electronic device 200. In other embodiments of the present application, the second electronic device 200 may also adopt the same Figure 7 Different interface connection methods, or a combination of multiple interface connection methods.

[0096] The UWB module 250 can provide a wireless communication solution based on the UWB technology applied to the second electronic device 200. The UWB module 250 includes an antenna module, which may include an antenna for sending and receiving UWB signals to determine the distance between the second electronic device 200 and the first electronic device 100, and the direction of the second electronic device 200 relative to the first electronic device 100.

[0097] In some examples, the second electronic device 200 may also include an inertial measurement unit (IMU) module 270. Among them, the IMU module 270 may include a combination unit consisting of three accelerometers and three gyroscopes, and the accelerometers and gyroscopes are installed on mutually perpendicular measurement axes. Among them, the accelerometer can detect the acceleration of the second electronic device 200 on three axes in the carrier coordinate system (referred to as the b system), and the angular velocity of the b system around the three axes in the geographic coordinate system (referred to as the t system). Then, the posture of the second electronic device 200 can be solved according to the angular velocity and acceleration measured by the second electronic device 200. Further, according to the change of the posture of the second electronic device 200, the motion trajectory of the second electronic device 200 can be calculated. Then, combined with the position of the second electronic device 200 at some times measured by the first electronic device 100, more accurate and continuous positioning and navigation can be provided for the second electronic device 200.

[0098] In addition, the description of the above-mentioned processor 210, memory 220, USB interface 230, power module 240, and wireless communication module 260 in the second electronic device 200 can refer to the above-mentioned Figure 3 The description of the relevant components in the first electronic device 100 will not be repeated here.

[0099] It should also be noted that Figure 2In addition to the first electronic device 100 having the above-mentioned specific antenna architecture (such as a three-antenna architecture), the UWB system shown may also include a third electronic device 300 having other antenna architectures, such as a UWB base station including a single antenna architecture, which will be explained later in conjunction with specific embodiments.

[0100] The indoor positioning method provided in the embodiment of the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0101] 1. The first electronic device 100 establishes a coordinate system of the UWB system (ie, establishes a U system).

[0102] Since the multiple antennas in the first electronic device 100 have distance differences in the horizontal direction and / or the vertical direction, the distance differences between the antennas can be used to establish a coordinate system of the UWB system.

[0103] For example, Fig. 8A As shown in (1), when the three antennas in the first electronic device 100 are in an L-shaped structural relationship in the vertical plane, the position of antenna 0 can be taken as the origin of the U system, the line connecting antenna 0 and antenna 1 can be taken as the X axis of the U system, and the direction from antenna 1 to antenna 0 can be taken as the positive direction of the X axis. The line connecting antenna 0 and antenna 2 can be taken as the Z axis of the U system, and the direction from antenna 0 to antenna 2 can be taken as the positive direction of the Z axis. The Y axis of the U system is perpendicular to the plane where the three antennas are located, and combined with the right-hand rule, the positive direction of the Y axis of the U system can be determined.

[0104] It should be noted that in some examples, when the user is installing the first electronic device 100, a specific mark (such as an arrow or text) may be displayed on the external device of the first electronic device 100 to prompt the user the correct installation method or the correct placement method, so that the Z axis of the U system established by the first electronic device 100 is located on the plumb plane, which is convenient for subsequent users to navigate according to the navigation information of the U system. Fig. 8A As shown in (1), the external device of the first electronic device 100 displays an arrow 801, which is used to remind the user to install or place the first electronic device 100 vertically and keep the direction of the arrow 801 opposite to the direction of gravity. Fig. 8A As shown in (1), the first electronic device 100 displays a mark of surface A (or surface B), prompting the user to install the surface A of the electronic device close to the wall. Then, the positive direction of the Y axis is perpendicular to the wall and points to the outside of the wall, that is, surface A points to the direction of surface B, and the positive direction of the Z axis is opposite to the direction of gravity.

[0105] Of course, the naming of the three axes in the U system here, as well as the positive directions of the three axes, can also adopt other definitions. For example, the line connecting antenna 0 and antenna 1 is the Y axis of the U system, and the direction from antenna 0 to antenna 1 is the positive direction of the Y axis; the line connecting antenna 0 and antenna 2 is the Z axis of the U system, and the direction from antenna 0 to antenna 2 is the positive direction of the Z axis. Combined with the right-hand rule, determine the direction of the X axis of the U system. In some examples, for the convenience of subsequent calculations, the Z axis of the U system can be set in the plumb plane, and the positive direction of the Z axis is opposite to the direction of gravity.

[0106] It can be seen that a clear coordinate system can be established according to the relative positions of the three antennas in the first electronic device 100 and the right-hand rule, that is, the three axes of the coordinate system and the positive directions of the three axes are determined.

[0107] For example, Fig. 8A As shown in (2), when the three antennas in the first electronic device 100 are in an L-shaped structural relationship in the horizontal plane, the position of antenna 0 can be taken as the origin of the U system, the line connecting antenna 0 and antenna 1 can be taken as the X axis of the U system, and the direction from antenna 1 to antenna 0 can be taken as the positive direction of the X axis. The line connecting antenna 0 and antenna 2 can be taken as the Y axis of the U system, and the direction from antenna 2 to antenna 0 can be taken as the positive direction of the Y axis. The Z axis of the U system is perpendicular to the plane where the three antennas are located, and the positive direction of the Z axis of the U system can be determined by combining the right-hand rule.

[0108] In some examples, when the user is installing the first electronic device 100, a specific mark (such as an arrow or text) may be displayed on the external device of the first electronic device 100 to prompt the user the correct installation method or the correct placement method, so that the Z axis of the U system established by the first electronic device 100 is located on the plumb plane, which is convenient for subsequent users to navigate according to the navigation information of the U system. Fig. 8A As shown in (2), the B side of the external device of the first electronic device 100 displays the text "this side up" 902, which is used to remind the user to install or place the first electronic device 100 horizontally and keep the side "this side up" horizontal and upward. Fig. 8A As shown in (2), the A side of the first electronic device 100 is placed close to the ground. Then, the positive direction of the Z axis is perpendicular to the ground and points to the ground, that is, the A side points to the direction of the B side. For another example, the A side of the external unit of the first electronic device 100 displays the text "this side down" to prompt the user to install or place the first electronic device 100 horizontally, and keep the "this side down" side horizontal and downward. Then, the positive direction of the Z axis is still perpendicular to the ground and points to the ground, that is, the A side points to the direction of the B side.

[0109] Of course, the naming of the three axes in the U system and the positive directions of the three axes can also adopt other definitions, which will not be repeated here.

[0110] For example, Fig. 8A As shown in (3), when the three antennas in the first electronic device 100 are in a triangular structural relationship in the horizontal plane, the position of antenna 0 can be taken as the origin of the U system, the line connecting antenna 0 and antenna 1 can be taken as the X-axis of the U system, and the direction of antenna 1 pointing to antenna 0 can be taken as the positive direction of the X-axis. In the plane where the three antennas are located, the straight line perpendicular to the X-axis is taken as the Z-axis of the U system, and antenna 2 is located in the positive direction of the Z-axis. Combined with the right-hand rule, the direction of the Y-axis of the U system is determined. In some examples, an arrow is displayed on the external unit of the first electronic device 100 to indicate that when prompting the user to install or place the first electronic device 100 vertically, keep the direction of arrow 801 opposite to the direction of gravity. For specific installation methods, please refer to Fig. 8A The installation method in (1) makes the positive direction of the Z axis opposite to the direction of gravity.

[0111] Of course, the naming of the three axes in the U system and the positive directions of the three axes can also adopt other definitions, which will not be repeated here.

[0112] For example, Fig. 8A As shown in (4), when the three antennas in the first electronic device 100 are in a triangular structural relationship in the vertical plane, the position of antenna 0 can be taken as the origin of the U system, the line connecting antenna 0 and antenna 1 can be taken as the X-axis of the U system, and the direction of antenna 1 pointing to antenna 0 can be taken as the positive direction of the X-axis. In the plane where the three antennas are located, the straight line perpendicular to the X-axis is taken as the Y-axis of the U system, and antenna 2 is located in the negative direction of the Y-axis. Combined with the right-hand rule, the direction of the Z-axis of the U system is determined. In some examples, the external unit of the first electronic device 100 displays text to prompt the user to correctly install or place the first electronic device 100, so that the Z-axis of the U system established by the first electronic device 100 is located on the plumb plane, which is convenient for subsequent users to navigate according to the navigation information of the U system. For specific installation methods, please refer to Fig. 8A The installation method in (2) makes the positive direction of the Z axis opposite to the direction of gravity.

[0113] Of course, the naming of the three axes in the U system and the positive directions of the three axes can also adopt other definitions, which will not be repeated here.

[0114] In summary, it can be seen that a clear coordinate system can be established according to the relative positions of the three antennas in the first electronic device 100 and the right-hand rule, that is, the three axes of the U system and the positive directions of the three axes are determined.

[0115] In other examples, when the user is installing the first electronic device 100, if the first electronic device 100 has a screen, the screen may also display corresponding prompt information to prompt the user the correct installation method or the correct placement method. For example, the positive direction of the font on the screen represents the correct installation method or the correct placement method of the device. Alternatively, the user can view the correct installation method or the correct placement method of the first electronic device 100 through the control device of the first electronic device 100 (for example, on the smart home APP of the control device). For example, a mobile phone is the control device of the first electronic device 100, and a smart home APP can be run, such as displaying Fig. 9 Interface 900 is shown. In interface 900, a prompt text or animation 901 may be displayed, prompting "The current device is installed in an incorrect manner, please turn the device over." Of course, other methods such as voice may also be used to prompt the user of the correct installation method, which is not limited in the present embodiment of the application.

[0116] The above embodiment takes the first electronic device 100 including three antennas as an example to illustrate the method of establishing the U system. When the first electronic device 100 includes more antennas, three antennas having the above L-shaped structure or triangular structure may also be used to establish the U system, and the specific establishment method is the same as above. In other examples, more antennas may also be combined to construct the U system.

[0117] For example, Figure 8B As shown in (1), the first electronic device 100 includes four antennas, namely antenna 0 to antenna 3. According to the triangular structure formed by antenna 0 to antenna 2, the construction method described above can be used to establish the following Figure 8B The origin of the U system is located at the position of antenna 0. Or, Figure 8B As shown in (2), the intersection of the line connecting antenna 0 and antenna 1 and the line connecting antenna 2 and antenna 3 is determined as the origin of the U system. The direction from antenna 1 to antenna 0 is the square of the X axis, the position from the origin to antenna 2 is the square of the Z axis, and the direction perpendicular to the plane where the X axis and the Y axis are located is the direction of the Y axis. In other words, variations of the method for establishing the U system based on the embodiment of the present application should also be covered within the scope of protection of the present application.

[0118] 2. The first electronic device 100 measures the distance and orientation of the second electronic device 200.

[0119] Specifically, the first electronic device 100 can measure the distance between the first electronic device 100 and the second electronic device 200 based on any one of the three antennas, and determine the direction of the second electronic device 200 relative to the first electronic device 100 based on the phase difference of the signal transmitted by the second electronic device 200 received by the three antennas.

[0120] (1) Measuring the distance to the second electronic device 200.

[0121] Exemplarily, the first electronic device 100 may use a two-way ranging method to measure the distance between the first electronic device 100 and the second electronic device 200, such as denoted as r. The two-way ranging method includes single-sided two-way ranging (SS-TWR) and double-sided two-way ranging (DS-TWR). Here, DS-TWR is taken as an example to briefly explain the ranging method.

[0122] Among them, the DS-TWR method records the round-trip timestamps between the two first electronic devices 100 and the second electronic device 200, and finally obtains the flight time. Although the DS-TWR method increases the response time, it reduces the ranging error. Bilateral two-way ranging is divided into two methods according to the number of messages sent: 4-message method and 3-message method.

[0123] For example, taking the 3-message mode as an example, the second electronic device 200 sends a ranging request message (i.e., the first message) and records the sending time Ts1. After the first electronic device 100 receives the request message, it records the receiving time Tr1. Among them, the time difference t between Tr1 and Ts1 is the transmission time of the message between the two devices. The first electronic device 100 processes the request message, which takes Treply 1. Then, the first electronic device 100 sends a response message (i.e., the second message) and records the sending time Ts2. After the second electronic device 200 receives the response message, it records the receiving time Tr2. Among them, the time difference between Tr2 and Ts2 is t. The time difference between the second electronic device 200 from the occurrence of the first message to the reception of the second message is Tround1. The second electronic device 200 processes the response message, which takes Treply 2. The second electronic device 200 sends the last message (i.e., the third message) and records the sending time Ts3. The first electronic device 100 receives the third message and records the receiving time Tr3. The time difference between Tr3 and Ts3 is t. And the time difference between the first electronic device 100 starting to send the second message and receiving the third message is Tround2. Therefore, the following formula (1) can be used to calculate the transmission time t of the message between the two devices, as follows:

[0124]

[0125] Then, the distance between the two devices is r = c × t, where c is the speed of light.

[0126] (2) Measuring the direction of the second electronic device 200.

[0127] The direction of the second electronic device 200 can be understood as the direction from which the signal transmitted by the second electronic device 200 is measured by the first electronic device 100. In the present application, two angles α and β can be used to represent the direction from which the signal transmitted by the second electronic device 200 is expressed. α is the angle between the horizontal direction of the UWB signal transmitted by the second electronic device 200 measured by the first electronic device 100 and the positive axis of the X axis, usually α∈[0,π]. The horizontal direction of the signal can be understood as the component of the vector pointing from the second electronic device 200 to the first electronic device 100 in the horizontal plane (such as the plane where the X axis and Y axis of the U system are located). β is the angle between the vertical direction of the UWB signal transmitted by the second electronic device 200 measured by the first electronic device 100 and the positive axis of the Z axis, usually β∈[0,π]. The vertical direction of the signal can be understood as the component of the vector pointing from the second electronic device 200 to the first electronic device 100 in the vertical plane (such as the plane where the X axis and Z axis of the U system are located).

[0128] For example, Fig.11 As shown, the first electronic device 100 adopts an L-shaped three-antenna architecture. When the second electronic device 200 reaches antenna 1, the angle between the horizontal direction and the positive axis of the X axis is α; when the second electronic device 200 reaches antenna 2, the angle between the horizontal direction and the positive axis of the Z axis is β.

[0129] Since the distance between the second electronic device 200 and the first electronic device 100 is usually much greater than the distance between the three antennas in the first electronic device 100, it can be considered that the signals reaching the three antennas of the second electronic device 200 are parallel. Then, according to optical knowledge, the optical path difference between the signal reaching antenna 0 and the signal reaching antenna 1 is Among them, the phase difference is the phase of the signal sent by the second electronic device 200 measured by antenna 0, is the phase of the signal sent by the second electronic device 200 measured by the antenna 1, and λ is the wavelength of the signal sent by the second electronic device 200. Since antenna 0, antenna 1 and antenna 2 are fixedly arranged in the first electronic device 100, and the distance L1 between antenna 0 and antenna 1 is a known preset value, the angle to α can be calculated using formula (2), as follows:

[0130]

[0131] Similarly, the optical path difference between the signal reaching antenna 0 and the signal reaching antenna 2 is Among them, the phase difference is the phase of the signal sent by the second electronic device 200 measured by the antenna 2, and Since the distance L2 between antenna 0 and antenna 1 (where L2 and L1 may be equal or different) is known, the angle to β may be calculated using formula (3), as follows:

[0132]

[0133] For example, Fig.12 As shown, the first electronic device 100 adopts a triangular (for example, an equilateral triangle) three-antenna architecture. When the second electronic device 200 reaches antenna 1, the angle between the horizontal direction and the positive axis of the X-axis is α; when the second electronic device 200 reaches antenna 2, the angle between the horizontal direction and the positive axis of the Z-axis is β.

[0134] The calculation method of α is the same as that of the L-type antenna architecture, that is, formula (2) can be used.

[0135] When calculating β, first calculate the phase of the signal reaching the midpoint between antenna 1 and antenna 0 The phase of the signal arriving at antenna 2 The difference is

[0136] Then, using formula (4), calculate the optical path difference d2 between the signal reaching the middle of antenna 1 and antenna 0 and the signal reaching antenna 2, and then use formula (5) to calculate β, as follows:

[0137]

[0138]

[0139] (3) Calculating the coordinates of the second electronic device 200

[0140] After α and β are calculated, further, according to the distance r between the second electronic device 200 and the first electronic device 100, as well as α and β, the coordinates (x, y, z) of the second electronic device 200 in the UWB system can be calculated using formula (6), as follows:

[0141]

[0142] It can be seen that the first electronic device 100 can record the coordinates of the second electronic device 200 in real time, thereby obtaining the route change of the second electronic device 200, and providing navigation information for the second electronic device 200.

[0143] In some examples, after calculating the coordinate information of the second electronic device 200, the first electronic device 100 can provide corresponding services based on the obtained position of the second electronic device 200. For example, the first electronic device 100 provides navigation information to the second electronic device 200 according to the position change of the second electronic device 200. Specifically, the first electronic device 100 can send navigation information to the second electronic device 200 using the UWB connection method (i.e., through the UWB module 150). Optionally, the first electronic device 100 can also send the position information of the second electronic device 200. Of course, the first electronic device 100 can also send navigation information and position information to the second electronic device 200 through other connection methods (for example, through the wireless communication module 160, or the UWB interface 130, etc.). For another example, when the first electronic device 100 determines that the second electronic device 200 is in a preset position, it provides a preset service for the second electronic device 200. In short, the embodiment of the present application does not specifically limit the application after the first electronic device 100 calculates the second electronic device 200.

[0144] Therefore, in the positioning method of the present application, the first electronic device 100 determines the coordinate system of the UWB system (including determining the three axes and the directions of the three axes) based on the antenna structure configured by itself, and obtains the position of the second electronic device 200 and the direction relative to the first electronic device 100 based on its own antenna structure measurement. It can be seen that the positioning method provided in the embodiment of the present application realizes the positioning of the second electronic device 200 based on a first electronic device 100. In addition, when the position of the first electronic device 100 changes, the first electronic device 100 does not need to re-determine the coordinate system, and can directly continue to measure the distance and direction of other devices (such as the second electronic device 200). It can be seen that the positioning efficiency of the first electronic device 100 in the present application is high and the mobility is good.

[0145] In other embodiments of the present application, the second electronic device 200 is configured with an IMU module, and a UWB-based positioning method and an IMU-based positioning method can be combined, which is beneficial to reducing the error caused by the non-line-of-sight environment during UWB system positioning, and is beneficial to suppressing the cumulative error of the IMU, thereby improving positioning accuracy and continuity.

[0146] Among them, the IMU-based positioning method is to measure the acceleration of the second electronic device 200 in the carrier coordinate system (b system, the origin of the b system is located on the second electronic device 200) and the angular velocity of the carrier coordinate system rotating around the three axes of the geographic coordinate system (t system) through the IMU module, and calculate the posture of the second electronic device 200. Then, the motion trajectory of the second electronic device 200 is determined according to the change of the posture of the second electronic device 200. Further, combined with the position of the second electronic device 200 at some moments measured by the UWB-based positioning method, the cumulative error of the motion trajectory obtained by the IMU-based positioning method can be corrected to obtain an accurate motion trajectory and improve the accuracy of positioning. Alternatively, in the UWB-based positioning method, in the area where the UWB signal is poor, the real-time position of the second electronic device 200 can also be calculated in combination with the motion trajectory obtained by the IMU-based positioning method, thereby providing continuous navigation information. The simultaneous use of the IMU-based positioning method and the UWB-based positioning method is also called a joint positioning method.

[0147] like Fig.13 As shown, a flow chart of a control method based on IMU and UWB provided in an embodiment of the present application is as follows:

[0148] S1300: The first electronic device establishes a U system.

[0149] like Fig.14 As shown, the first electronic device 100 establishes a U system with point O as the origin. The method for the first electronic device 100 to establish the U system can refer to the relevant description in the above embodiment, which will not be repeated here.

[0150] S1301: The second electronic device receives a measurement instruction from a user.

[0151] For example, the user can instruct the second electronic device to start measuring the position by operating a virtual control (such as a control displayed on a touch screen) or a physical button on the second electronic device 200, inputting a voice command, performing a preset air gesture, etc. Alternatively, the user can turn on a preset function of the second electronic device 200, and when the second electronic device 200 determines that the preset function requires the position of the second electronic device 200, it can also automatically start measuring the position of the second electronic device 200, that is, directly executing steps S1302a and S1302b.

[0152] S1302a: The second electronic device requests the first electronic device to measure an initial position of the second electronic device.

[0153] like Fig.14As shown, when the second electronic device 200 is located at point P, it sends a UWB signal to the first electronic device 100 to request measurement of the current position of the second electronic device 200, that is, to request measurement of the coordinates of point P in the U system, denoted as (x p ,y p , z p ). At this time, the position of point P can be considered as the initial position of the second electronic device.

[0154] S1302b: When the second electronic device is located at the initial position and in a preset posture, start IMU measurement to measure the posture data of the second electronic device in the b system.

[0155] It should be noted that step S1302a and step S1302b may be executed simultaneously or sequentially, and the embodiment of the present application does not limit the execution order of the two steps.

[0156] In some examples, when the second electronic device 200 receives a measurement instruction from the user, or determines to start measuring the position of the second electronic device 200, the user may be prompted to perform a preset operation, which may place the second electronic device 200 in a preset posture and start IMU measurement. The preset posture may be, for example, that the user operates the second electronic device 200 so that a specific direction of a coordinate axis of the second electronic device 200 (e.g., the Y axis of the carrier coordinate system, also referred to as the Y axis of the second electronic device) is aligned with the first electronic device 100. The posture data measured by the IMU includes angular velocity (represented as and ), and acceleration (respectively and ).

[0157] It should be noted that the position of the second electronic device 200 measured by the first electronic device 100 is the coordinate under the U system, and the posture data measured by the second electronic device 200 starting the IMU module 270 is the posture data under the b system. Therefore, during the subsequent joint positioning, the posture data on the b system needs to be converted to the U system. Here, when the second electronic device 200 is in a preset posture, the association between the U system and the b system can be established, that is, at this time, the b system can be considered to be the U system rotated along the three axes of the U system. In addition, the preset posture can also be considered as the initial posture of the second electronic device 200 when the IMU module 270 measures. The initial posture under the U system and the specific calculation method of the transformation matrix of the U system and the b system will be described in detail in the subsequent step S1305.

[0158] S1303: The first electronic device measures an initial position of the second electronic device.

[0159] The first electronic device 100 measures the distance r of the second electronic device 200 using a two-way distance measurement method.p , the direction of the second electronic device 200 (for example, the horizontal direction α and the vertical direction β of the signal) is calculated using the phase difference of the UWB signal sent by the second electronic device 200 to reach different antennas, and the coordinates (x p ,y p , z p ). The specific measurement method can be found in the previous article, which will not be described in detail here.

[0160] S1304: The first electronic device returns the measured initial position of the second electronic device to the second electronic device.

[0161] S1305. The second electronic device calculates an initial posture in the U system based on the initial position measured by UWB, and calculates a conversion matrix between the U system and the b system.

[0162] The following description is made by taking an example where a user operates the second electronic device 200 so that the positive direction of the Y axis of the second electronic device 200 is aligned with the first electronic device 100. Fig.14 As shown, according to the above steps, the first electronic device 100 calculates the coordinates (x p ,y p , z p ), the coordinates of the origin P of the b system can be considered to be (x p ,y p , z p ). At this time, the coordinates of the origin O of the U system in the b system are (0, r p , 0).

[0163] Since the b system can be considered as the rotation of the U system around the three coordinate axes of the U system, the rotation process can be expressed by three attitude angles, namely the heading angle ψ, the pitch angle It is understandable that these three attitude angles can also be considered as the attitude angles of the second electronic device 200 in the U system, that is, the initial attitude of the second electronic device 200 can be represented by the heading angle ψ, the pitch angle and roll angle θ.

[0164] The following combination Fig.15 Explanation: Taking the second electronic device being a mobile phone as an example, the meaning of the b system and the attitude angle is explained.

[0165] like Fig.15 As shown in (1), the y-axis and x-axis of the b-system (i.e., the coordinate system of the mobile phone) are parallel to the plane of the mobile phone screen, and the z-axis of the b-system is perpendicular to the mobile phone screen. The y-axis of the b-system is along the length of the mobile phone, and the x-axis of the b-system is along the width of the mobile phone. In addition, the b-system coincides with the U-system.

[0166] The roll angle θ is the angle between the Z axis of the b system and the vertical plane containing the Y axis of the b system, and is positive when the phone is tilted to the right. Fig.15 The mobile phone shown in (1) is rotated along the Y axis of the U system by a certain angle to present the following Fig.15 After the rotation, the Y axis of the b system still coincides with the Y axis of the U system, but the X axis and Z axis of the b system form a certain angle with the X axis and Z axis of the U system respectively, which is equal to the rolling angle θ.

[0167] Among them, the pitch angle It is the angle between the Y axis of the b system and the XOY plane of the U system (that is, the plane where the X axis and Y axis of the U system are located), and is taken as positive when the second electronic device 200 is raised.

[0168] For example, Fig.15 The mobile phone shown in (1) is rotated along the X-axis of the U system by a certain angle to present the following Fig.15 After the rotation, the X axis of the b system still coincides with the X axis of the U system, but the Y axis and Z axis of the b system form a certain angle with the Y axis and Z axis of the U system respectively, which is equal to the pitch angle

[0169] The heading angle ψ is the angle between the projection of the Y axis of the b system on the XOY plane of the U system and the Y axis of the U system, with the right yaw of the head of the second electronic device 200 being positive;

[0170] For example, Fig.15 The mobile phone shown in (1) is rotated along the X-axis of the U system by a certain angle to present the following Fig.15 After the rotation, the Z axis of the b system still coincides with the Z axis of the U system, but the X axis and Y axis of the b system form a certain angle with the X axis and Y axis of the U system respectively, and the angle is equal to the heading angle ψ.

[0171] In addition, the conversion matrix C of the U system and the b system is calculated using formula (7): U b, as follows:

[0172]

[0173] Since the coordinates of point P in the U system are (x p ,y p , z p ), so the vector OP can be expressed in the U system as

[0174] Since the second electronic device 200 is in a preset posture at point P, that is, the user operates the Y axis of the second electronic device 200 (that is, the Y axis of the b system) to point to the first electronic device 100, then the vector OP is located on the Y axis of the b system. The vector OP can be expressed in the b system as Then, according to the transformation matrix of the U system and the b system, we can get formula (8), as follows:

[0175]

[0176] According to formula (7) and formula (8), we can calculate:

[0177]

[0178] In some examples, the second electronic device 200 is located in the positive direction of the Y axis of the U system. Then, according to the expression of the gravity vector in the U system and the expression in the b system, formula (9) can be calculated as follows:

[0179]

[0180] Among them, g U is the gravitational acceleration of the second electronic device 200 in the U system, which is a known quantity. The second electronic device 200 can measure the gravitational acceleration of the second electronic device 200 in the U system through the IMU module 270. and in, is the acceleration of the second electronic device 200 on the X-axis of the b system, is the acceleration of the second electronic device 200 on the Y axis of the b system, is the acceleration of the second electronic device 200 on the Z-axis of the b system.

[0181] Substituting formula (7) into formula (9), we can obtain formula (10), as follows:

[0182]

[0183] According to formula (10), Newton's iteration method is used to solve θ, where θ∈(0,2π).

[0184] Thus, the initial posture (ψ, and θ), and the coordinate transformation matrix between the U system and the b system

[0185] Subsequently, the second electronic device can calculate the motion trajectory of the second electronic device in the U system based on the initial posture of the U system, the transformation matrix of the U system and the b system, and the posture data measured by the IMU. Optionally, joint positioning or joint navigation can also be performed based on the calculated motion trajectory of the second electronic device in the U system and the position measured by the first electronic device.

[0186] Alternatively, the second electronic device can obtain the posture information of the second electronic device under the U system based on the conversion matrix of the U system and the b system, and the posture data measured by the IMU, and perform the relevant operations corresponding to the posture information. Optionally, the posture information of the second electronic device under the U system and the position measured by the first electronic device can also be used to perform preset operations corresponding to the posture information and the position.

[0187] In summary, the embodiments of the present application do not limit the specific applications after establishing the U-system coordinates and calculating the preset posture of the second electronic device and the transformation matrix between the U-system and the b-system.

[0188] In some other embodiments of the present application, Fig.16 As shown, the UWB system may include a third electronic device 300 with one or more other antenna architectures (eg, a single antenna architecture) in addition to a first electronic device 100 and a second electronic device 200 with a specific antenna architecture (eg, a three-antenna architecture).

[0189] In some examples, the first electronic device 100 can be used to preliminarily locate the second electronic device 200, and then the third electronic device 300 can be used to measure the distance between the second electronic device 200 and the third electronic device 300, and the preliminary location of the second electronic device 200 measured by the first electronic device 100 can be further corrected to obtain a more accurate location of the second electronic device 200.

[0190] For example, using the first electronic device 100 and the above positioning method, the coordinates of the third electronic device 300 can be measured and recorded as (x k ,y k , z k ,), where k=1, 2, ..., n. Where n is an integer greater than or equal to 1, and the UWB system includes n third electronic devices 300 .

[0191] First, the initial value (x0, y0, z0) of the position of the second electronic device 200 measured by the first electronic device 100 is as shown in formula (11):

[0192]

[0193] Wherein, r is the distance between the second electronic device 200 and the first electronic device 100 measured by the first electronic device 100, and α and β are the directions of the second electronic device 200 relative to the first electronic device 100.

[0194] Then, the distance r between each third electronic device 300 and the second electronic device 200 is calculated. k, where k=1, 2, ..., n. And using the distance between each third electronic device 300 and the second electronic device 200, the equation group of formula (12) is established, where (x, y, z) is the coordinate of the second electronic device 200 to be calculated.

[0195] Where k = 1, 2, ..., n. Formula (12)

[0196] Using the distance between the first electronic device 100 and the second electronic device 200, formula (13) is established as follows:

[0197]

[0198] Newton iteration and least squares algorithm are used to solve formula (12) and formula (13) to obtain the corrected coordinates of the second electronic device 200. It should be noted that in the process of using Newton iteration, only formula (12) needs to be linearized, and the initial value (x0, y0, z0) of the position of the second electronic device 200 is used as the initial value of Newton iteration for iteration.

[0199] It can be seen that the measurement data of the third electronic device 300 can provide the positioning accuracy of the second electronic device 200.

[0200] In some other solutions of this example, when the number of the third electronic devices 300 is three or more, the position of the second electronic device 200 can be determined according to the principle of triangulation. Then, the position of the second electronic device 200 determined by the three third electronic devices 300 and the position of the second electronic device 200 measured by the first electronic device 100 can be corrected, for example, by using the Kalman filter method or other methods, which are not specifically limited in the embodiments of the present application.

[0201] In addition, when the signal received by the first electronic device 100 from the second electronic device 200 is not good, the position of the second electronic device 200 can be measured by using three third electronic devices 300 to improve the continuous positioning of the second electronic device 200.

[0202] In some other schemes of this example, after the first electronic device 100 can be used to measure the coordinates of at least three third electronic devices 300 in the U system, the at least three third electronic devices 300 can be directly used to locate the second electronic device 200 based on the triangulation positioning principle. In other words, the first electronic device 100 can be used to quickly establish a U system coordinate system, and measure the coordinates of the third electronic device 300 used for positioning later, and then directly use the third electronic device 300 to measure the position of the second electronic device 200. At this time, the first electronic device 100 can be removed. It can be seen that this solution does not require the third electronic device 300 used for positioning later to be installed or placed strictly in a specific position, simplifying the operation of the user to establish a UWB system.

[0203] It is understandable that, in order to realize the above functions, the above-mentioned terminals etc. include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.

[0204] The embodiment of the present application can divide the functional modules of the above-mentioned terminal etc. according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0205] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0206] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0207] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.

[0208] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A first electronic device, characterized in that: The first electronic device comprises at least three antennas, and the at least three antennas are fixedly arranged in the first electronic device; any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction, and the at least three antennas are used to send and receive positioning signals; The first electronic device is installed or placed in a first direction; The first electronic device is used to receive a first positioning signal sent by a second electronic device and measure a position of the second electronic device in a first coordinate system based on the first positioning signal. The first coordinate system is determined based on a structural relationship between the at least three antennas.

2. The first electronic device according to claim 1, characterized in that: The distance between any two antennas of the at least three antennas is less than or equal to the wavelength of the positioning signal received by the first electronic device.

3. The first electronic device according to claim 1 or 2, characterized in that: Any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction, including: The at least three antennas are in an L-shaped structural relationship in a vertical plane or a horizontal plane, or the at least three antennas are in a triangular structural relationship in a vertical plane or a horizontal plane.

4. The first electronic device according to claim 3, characterized in that: The at least three antennas include a first antenna, a second antenna and a third antenna, The at least three antennas are in an L-shaped structural relationship in a vertical plane or a horizontal plane, including: A line connecting the first antenna and the second antenna is perpendicular to a line connecting the first antenna and the third antenna; and a distance between the first antenna and the second antenna, and a distance between the first antenna and the third antenna are both half of the wavelength of the positioning signal; The at least three antennas are in a triangular structure relationship in a vertical plane or a horizontal plane, including: The distance between the first antenna and the second antenna, the distance between the first antenna and the third antenna, and the distance between the second antenna and the third antenna are all half of the wavelength of the positioning signal received by the first electronic device.

5. The first electronic device according to claim 4, characterized in that: The first coordinate system is determined according to the structural relationship of the at least three antennas, and includes: The origin of the first coordinate system is the location of the first antenna; The X-axis of the first coordinate system is located on the connection line between the first antenna and the second antenna, and the positive direction of the X-axis is the direction in which the second antenna points to the first antenna; The Y axis of the first coordinate system is a direction perpendicular to the X axis on a horizontal plane; The Z axis of the first coordinate system is located on the plumb line, and the positive direction of the Z axis is opposite to the direction of gravity.

6. The first electronic device according to any one of claims 1 to 3, characterized in that: The at least three antennas include a first antenna, a second antenna, a third antenna and a fourth antenna, and any two of the at least three antennas have a distance difference in the vertical direction and / or the horizontal direction including: The line connecting the first antenna and the second antenna is parallel to the horizontal plane, and the line connecting the third antenna and the fourth antenna is perpendicular to the horizontal plane; and on the same vertical plane, the line connecting the third antenna and the fourth antenna is perpendicular to the line connecting the third antenna and the fourth antenna; The origin of the first coordinate system is: an intersection point of a line connecting the first antenna and the second antenna and a line connecting the third antenna and the fourth antenna; The X-axis of the first coordinate system is located on the connection line between the first antenna and the second antenna, and the positive direction of the X-axis is the direction in which the second antenna points to the first antenna; The Y axis of the first coordinate system is a direction perpendicular to the X axis on a horizontal plane; The Z axis of the first coordinate system is located on a line connecting the third antenna and the fourth antenna, and the positive direction of the Z axis is opposite to the direction of gravity.

7. The first electronic device according to any one of claims 1 to 6, characterized in that: The first electronic device is provided with a mark, and the direction indicated by the mark is the first direction; The first direction is the same as or opposite to the positive direction of the Z axis in the first coordinate system and the direction of gravity.

8. The first electronic device according to any one of claims 1 to 7, characterized in that: The first electronic device measures a position of the second electronic device in a first coordinate system according to the first positioning signal, including: The first electronic device measures, according to the first positioning signal, a first distance between the second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device; The first electronic device determines a position of the second electronic device in a first coordinate system according to the first distance and the first direction.

9. The first electronic device according to claim 8, characterized in that: The first electronic device measures, according to the first positioning signal, a first distance between the second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device, including: The first electronic device measures the first distance between the second electronic device and the first electronic device using a two-way distance measurement method; Furthermore, the first electronic device determines the first direction according to a phase difference of a second positioning signal sent by the second electronic device received by different antennas among the at least three antennas.

10. The first electronic device according to claim 8, characterized in that: The first electronic device measures a first direction of the second electronic device relative to the first electronic device according to the first positioning signal, further comprising: The first electronic device determines the first direction based on the phase difference of the second UWB signal sent by the second electronic device received by different antennas among the at least three antennas, the wavelength of the second positioning signal, and the distance between different antennas among the at least three antennas.

11. The first electronic device according to claim 10, characterized in that: The first direction includes a first angle α and a second angle β, wherein the first angle α is the angle between the horizontal direction of the second positioning signal sent by the second electronic device measured by the first electronic device and the X-axis in the first coordinate system; the second angle β is the angle between the vertical direction of the second positioning signal sent by the second electronic device measured by the first electronic device and the Z-axis in the first coordinate system.

12. The first electronic device according to claim 11, characterized in that: When the at least three antennas in the first electronic device are in an L-shaped structure, in, The phase of the second positioning signal measured by the first antenna, is the phase of the second positioning signal measured by the second antenna, λ is the wavelength of the second positioning signal, and L1 is the distance between the first antenna and the second antenna; The phase of the second UWB signal is measured by the third antenna, and L2 is the distance between the first antenna and the third antenna.

13. The first electronic device according to claim 11 or 12, characterized in that: The first electronic device determines, according to the first distance and the first direction, a position of the second electronic device in a first coordinate system, specifically including: Among them, r is the distance between the second electronic device and the first electronic device measured by the first electronic device, and (x, y, z) is the coordinates of the second electronic device in the first coordinate system.

14. The first electronic device according to any one of claims 1 to 13, characterized in that: The first electronic device is further used for: after the first electronic device measures the position of the second electronic device in the first coordinate system according to the first positioning signal, sending the position of the second electronic device in the first coordinate system to the second electronic device.

15. The first electronic device according to any one of claims 1 to 14, characterized in that: The positioning signal is based on an ultra-wideband (UWB) positioning signal.

16. An indoor positioning method, characterized in that: Applicable to a system including a first electronic device and a second electronic device, wherein the first electronic device includes at least three antennas, and the at least three antennas are fixedly arranged in the first electronic device; any two antennas of the at least three antennas have a distance difference in a vertical direction and / or a horizontal direction; Furthermore, the first electronic device is installed or placed in a first direction; and the method includes: The first electronic device receives a first positioning signal sent by the second electronic device; The first electronic device measures the position of the second electronic device in a first coordinate system according to the first positioning signal, where the first coordinate system is determined according to the structural relationship of the at least three antennas.

17. The method according to claim 16, characterized in that The first electronic device measures a position of the second electronic device in a first coordinate system according to the first positioning signal, including: The first electronic device measures, according to the first positioning signal, a first distance between the second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device; The first electronic device determines a position of the second electronic device in a first coordinate system according to the first distance and the first direction.

18. The method according to claim 17, characterized in that The first electronic device measures, according to the first positioning signal, a first distance between the second electronic device and the first electronic device, and a first direction of the second electronic device relative to the first electronic device, including: The first electronic device measures the first distance between the second electronic device and the first electronic device using a two-way distance measurement method; Furthermore, the first electronic device determines the first direction according to a phase difference of a second positioning signal sent by the second electronic device received by different antennas among the at least three antennas.

19. The method according to claim 17, characterized in that The first electronic device measures a first direction of the second electronic device relative to the first electronic device according to the first positioning signal, further comprising: The first electronic device determines the first direction based on the phase difference of the second positioning signal sent by the second electronic device received by different antennas among the at least three antennas, the wavelength of the second positioning signal, and the distance between different antennas among the at least three antennas.

20. The method according to any one of claims 16 to 19, characterized in that: After the first electronic device measures the position of the second electronic device in the first coordinate system according to the first positioning signal, the method further includes: The first electronic device sends the position of the second electronic device in the first coordinate system to the second electronic device.

21. The method according to any one of claims 16 to 20, characterized in that: The positioning signal is based on an ultra-wideband (UWB) positioning signal.

22. The method according to any one of claims 16 to 21, characterized in that: The distance between any two antennas of the at least three antennas is less than or equal to the wavelength of the positioning signal received by the first electronic device.

23. An indoor positioning system, characterized in that: The device comprises a first electronic device and a second electronic device, wherein the first electronic device comprises at least three antennas, wherein the at least three antennas are fixedly arranged in the first electronic device; any two antennas of the at least three antennas have a distance difference in a vertical direction and / or a horizontal direction; and the first electronic device is installed or placed in a first direction; The second electronic device is used to send a first positioning signal to the first electronic device; The first electronic device is used to receive the first positioning signal and measure the position of the second electronic device in a first coordinate system according to the first positioning signal, where the first coordinate system is determined according to the structural relationship of the at least three antennas.

24. The system according to claim 23, characterized in that The positioning signal is based on an ultra-wideband (UWB) positioning signal.

25. The system according to claim 23 or 24, wherein the distance between any two of the at least three antennas is less than or equal to the wavelength of the positioning signal received by the first electronic device.

26. A computer-readable storage medium, characterized in that: It comprises computer instructions, and when the computer instructions are executed on a first electronic device, the first electronic device executes the indoor positioning method as described in any one of claims 16-22.

27. A computer-readable storage medium, characterized in that: It comprises computer instructions, and when the computer instructions are executed on a second electronic device, the second electronic device executes the indoor positioning method as described in any one of claims 16-22.