Search

US-12618932-B2 - Method for obtaining posture information and electronic device

US12618932B2US 12618932 B2US12618932 B2US 12618932B2US-12618932-B2

Abstract

The electronic device includes an ultra-wideband (UWB) chip and n antennas configured to construct a carrier antenna coordinate system, where n≥3. A coordinate origin of the carrier antenna coordinate system is located at a location of an antenna 0 in the n antennas, an antenna i is located on a coordinate axis of the carrier antenna coordinate system, and a distance between the antenna i and the antenna 0 is less than or equal to λ, where λ is a wavelength of a UWB signal, and a value of i is sequentially obtained in {1, 2, . . . , n−1}. The electronic device receives UWB signals from m UWB base stations by using the n antennas, where m≥3, and m is an integer. Spatial posture information of the electronic device is determined based on the received UWB signals.

Inventors

  • Wei Dong
  • Haowei XU
  • Qingfeng Xue
  • Erli Wang

Assignees

  • HUAWEI TECHNOLOGIES CO., LTD.

Dates

Publication Date
20260505
Application Date
20211213
Priority Date
20210130

Claims (20)

  1. 1 . A method applied to an electronic device comprising an ultra-wideband (UWB) chip and n antennas, wherein the method comprises: receiving UWB signals from m UWB base stations using the n antennas of the electronic device, wherein n≥3, wherein n is an integer, wherein m≥3, and wherein m is an integer; and determining spatial posture information of the electronic device based on the UWB signals, wherein the spatial posture information comprises a pitch angle φ, an azimuth φ, and a roll angle θ of a carrier antenna coordinate system relative to a UWB coordinate system, wherein the UWB coordinate system is based on the m UWB base stations, and wherein the carrier antenna coordinate system is based on the n antennas.
  2. 2 . The method of claim 1 , wherein the UWB signals are received from the m UWB base stations, in response to the electronic device being powered on, starting a smart home application, or starting a preset function, wherein at least one of a notification bar of the electronic device, a setting interface of the electronic device, or a setting interface of the smart home application comprises an on/off option of the preset function, and wherein the on/off option enables or disables the preset function.
  3. 3 . The method of claim 1 , further comprising: determining spatial location information of the electronic device based on the UWB signals, wherein the spatial location information comprises coordinate information of the electronic device in the UWB coordinate system; determining directional control information of the electronic device based on the spatial location information and the spatial posture information, wherein the directional control information indicates a pointing direction of the electronic device; and controlling, based on the directional control information and coordinate information of each home device in the UWB coordinate system, a home device to which the electronic device points.
  4. 4 . The method of claim 1 , wherein a coordinate origin of the carrier antenna coordinate system coincides with a location of an antenna 0 in the n antennas, wherein an antenna i in the n antennas is located on a coordinate axis of the carrier antenna coordinate system, wherein a distance between the antenna i and the antenna 0 is less than or equal to λ, wherein λ is a wavelength of a UWB signal, wherein a value of i is sequentially obtained in {1, 2, . . . , n−1}, and wherein the distance between the antenna i and the antenna 0 is equal to λ/2.
  5. 5 . The method of claim 1 , wherein the n antennas comprise at least an antenna 0, an antenna 1, and an antenna 2, wherein an x axis of the carrier antenna coordinate system is parallel to a connection line between the antenna 1 and the antenna 0 and points to a direction from the antenna 1 to the antenna 0, wherein a y axis of the carrier antenna coordinate system is parallel to a connection line between the antenna 2 and the antenna 0 and points to a direction from the antenna 2 to the antenna 0, and wherein a z axis of the carrier antenna coordinate system is perpendicular to the x axis and the y axis and forms a right-hand rectangular coordinate system with the x axis and the y axis.
  6. 6 . The method of claim 1 , wherein receiving the UWB signals from the m UWB base stations based on the n antennas comprises: determining an angle of arrival α (i, j) of a UWB signal from a UWB base station j in the m UWB base stations relative to an antenna i, wherein a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}, and wherein the angle of arrival α (i, j) is an included angle between a vector from the antenna i to the UWB base station j and a vector from the antenna i to an antenna 0 in the UWB coordinate system, wherein a coordinate origin of the carrier antenna coordinate system coincides with a location of the antenna 0 in the n antennas; and determining the spatial posture information of the electronic device based on a plurality of angles of arrival, the UWB signals, and coordinates of the n antennas in the carrier antenna coordinate system, wherein the plurality of angles of arrival comprise the angle of arrival α (i, j) obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}.
  7. 7 . The method of claim 6 , wherein determining the angle of arrival α (i, j) of the UWB signal from the UWB base station j in the m UWB base stations relative to the antenna i comprises: obtaining a phase difference between UWB signals received from the UWB base station j by using the antenna i and the antenna 0, wherein the phase difference indicates a distance difference between a distance between the antenna i and the UWB base station j and a distance between the antenna 0 and the UWB base station j; and calculating the angle of arrival α (i, j) by using the law of cosines based on the distance difference indicated by the phase difference and the distance between the antenna i and the antenna 0.
  8. 8 . The method of claim 6 , wherein determining the spatial posture information of the electronic device based on the plurality of angles of arrival, the UWB signals, and coordinates of the n antennas in the carrier antenna coordinate system comprises: obtaining a baseline vector r (i, j) based on the UWB signal received from the UWB base station j by using the antenna i, wherein the baseline vector r (i, j) is a direction vector from the antenna i to the UWB base station j in the UWB coordinate system; obtaining a first unit baseline vector rq i based on coordinates of the antenna i in the carrier antenna coordinate system, wherein the first unit baseline vector rq i is a unit direction vector from the antenna i to the antenna 0 in the carrier antenna coordinate system; and determining the spatial posture information of the electronic device based on the plurality of angles of arrival, a plurality of baseline vectors, and a plurality of first unit baseline vectors, wherein the plurality of baseline vectors comprise the baseline vector r (i, j) obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}, and wherein the plurality of first unit baseline vectors comprise the first unit baseline vector rq i obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}.
  9. 9 . The method of claim 8 , wherein determining the spatial posture information of the electronic device based on the plurality of angles of arrival, the plurality of baseline vectors, and the plurality of first unit baseline vectors comprises: determining a plurality of second unit baseline vectors based on the plurality of angles of arrival and the plurality of baseline vectors, wherein the plurality of second unit baseline vectors comprise a second unit baseline vector ra (i) obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}, and wherein the second unit baseline vector ra (i) is a unit direction vector from the antenna i to the antenna 0 in the UWB coordinate system; and determining the spatial posture information of the electronic device based on the plurality of first unit baseline vectors and the plurality of second unit baseline vectors.
  10. 10 . The method of claim 9 , wherein determining the spatial posture information of the electronic device based on the plurality of first unit baseline vectors and the plurality of second unit baseline vectors comprises determining the spatial posture information of the electronic device based on the plurality of first unit baseline vectors and the plurality of second unit baseline vectors by using a preset rotation matrix, wherein the preset rotation matrix is a rotation matrix obtained when the electronic device transforms from a spatial posture corresponding to the pitch angle φ, the azimuth φ, and the roll angle θ to a preset initial posture, wherein the preset initial posture is a posture of the electronic device that exists when three axes of the carrier antenna coordinate system are respectively parallel to three axes of the UWB coordinate system, wherein the preset rotation matrix is used to convert a coordinate parameter in the carrier antenna coordinate system into a coordinate parameter in the UWB coordinate system, and wherein the coordinate parameter comprises a vector.
  11. 11 . An electronic device comprising: an ultra-wideband (UWB) chip; n antennas electrically connected to the UWB chip and configured to form a carrier antenna coordinate system, wherein a coordinate origin of the carrier antenna coordinate system coincides with a location of an antenna 0 in the n antennas, wherein an antenna i in the n antennas is located on a coordinate axis of the carrier antenna coordinate system, wherein a distance between the antenna i and the antenna 0 is less than or equal to λ, wherein λ is a wavelength of a UWB signal, wherein a value of i is sequentially obtained in {1, 2, . . . , n−1}, wherein n ≥3, and wherein n is an integer; a memory configured to store instructions; and one or more processors coupled to the UWB chip, the n antennas, and the memory, wherein the one or more processors are configured to execute the instructions to cause the electronic device to: receive, using the n antennas, UWB signals comprising a UWB signal from a UWB base station j in m UWB base stations, wherein a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}, wherein a UWB coordinate system is based on the m UWB base stations, wherein m≥3, and wherein m is an integer; and determine spatial posture information of the electronic device based on the UWB signals, wherein the spatial posture information of the electronic device comprises: a pitch angle φ, an azimuth φ, and a roll angle θ of the carrier antenna coordinate system relative to the UWB coordinate system.
  12. 12 . The electronic device of claim 11 , wherein the UWB signals are received in response to the electronic device being powered on, starting a smart home application, or starting a preset function, wherein at least one of a notification bar of the electronic device, a setting interface of the electronic device, or a setting interface of the smart home application comprises an on/off option of the preset function, wherein the on/off option is used to enable or disable the preset function.
  13. 13 . The electronic device of claim 11 , wherein the one or more processors are further configured to execute the instructions to cause the electronic device to: determine spatial location information of the electronic device based on the UWB signals received from the m UWB base stations by using the n antennas, wherein the spatial location information comprises coordinate information of the electronic device in the UWB coordinate system; determine directional control information of the electronic device based on the spatial location information and the spatial posture information, wherein the directional control information indicates a pointing direction of the electronic device; and control, based on the directional control information and coordinate information of each home device in the UWB coordinate system, a home device to which the electronic device points.
  14. 14 . The electronic device of claim 11 , wherein the distance between the antenna i and the antenna 0 is equal to λ/2.
  15. 15 . The electronic device of claim 11 , wherein the n antennas comprise the antenna 0, an antenna 1, and an antenna 2, wherein an x axis of the carrier antenna coordinate system is parallel to a connection line between the antenna 1 and the antenna 0 and points to a direction from the antenna 1 to the antenna 0, wherein a y axis of the carrier antenna coordinate system is parallel to a connection line between the antenna 2 and the antenna 0 and points to a direction from the antenna 2 to the antenna 0, and wherein a z axis of the carrier antenna coordinate system is perpendicular to the x axis and the y axis and forms a right-hand rectangular coordinate system with the x axis and the y axis.
  16. 16 . The electronic device of claim 15 , wherein the one or more processors are further configured to execute the instructions to cause the electronic device to: determine an angle of arrival α (i, j) of the UWB signal from the UWB base station j in the m UWB base stations relative to the antenna i, wherein a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}, and wherein the angle of arrival α (i, j) is an included angle between a vector from the antenna i to the UWB base station j and a vector from the antenna i to the antenna 0 in the UWB coordinate system; and determine the spatial posture information of the electronic device based on a plurality of angles of arrival, the UWB signals, and coordinates of the n antennas in the carrier antenna coordinate system, wherein the plurality of angles of arrival comprise α (i, j) obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}.
  17. 17 . The electronic device of claim 15 , wherein the one or more processors are further configured to execute the instructions to cause the electronic device to: obtain a phase difference between UWB signals received from the UWB base station j by using the antenna i and the antenna 0, wherein the phase difference indicates a distance difference between a distance between the antenna i and the UWB base station j and a distance between the antenna 0 and the UWB base station j; and calculate, by the electronic device, the angle of arrival α (i, j) by using the law of cosines based on the distance difference indicated by the phase difference and the distance between the antenna i and the antenna 0.
  18. 18 . The electronic device of claim 17 , wherein the one or more processors are further configured to execute the instructions to cause the electronic device to: obtain a baseline vector r (i, j) based on a UWB signal received from the UWB base station j by using the antenna i, wherein the baseline vector r (i, j) is a direction vector from the antenna i to the UWB base station j in the UWB coordinate system; obtain a first unit baseline vector rq i based on coordinates of the antenna i in the carrier antenna coordinate system, wherein the first unit baseline vector rq i is a unit direction vector from the antenna i to the antenna 0 in the carrier antenna coordinate system; and determine the spatial posture information of the electronic device based on a plurality of angles of arrival, a plurality of baseline vectors, and a plurality of first unit baseline vectors, wherein the plurality of baseline vectors comprises the baseline vector r (i, j) obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}, and wherein the plurality of first unit baseline vectors comprises the first unit baseline vector rq i obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}.
  19. 19 . The electronic device of claim 18 , wherein the one or more processors are further configured to execute the instructions to cause the electronic device to: determine a plurality of second unit baseline vectors based on the plurality of angles of arrival and the plurality of baseline vectors, wherein the plurality of second unit baseline vectors comprise a second unit baseline vector ra (i) obtained when a value of i is sequentially obtained in {1, 2, . . . , n−1} and a value of j is sequentially obtained in {0, 1, 2, . . . , m−1}, and wherein the second unit baseline vector ra (i) is a unit direction vector from the antenna i to the antenna 0 in the UWB coordinate system; and determine the spatial posture information of the electronic device based on the plurality of first unit baseline vectors and the plurality of second unit baseline vectors.
  20. 20 . The electronic device of claim 19 , wherein the one or more processors are further configured to execute the instructions to cause the electronic device to determine the spatial posture information of the electronic device based on the plurality of first unit baseline vectors and the plurality of second unit baseline vectors by using a preset rotation matrix, wherein the preset rotation matrix is a rotation matrix obtained when the electronic device transforms from a spatial posture corresponding to the pitch angle φ, the azimuth φ, and the roll angle θ to a preset initial posture, wherein the preset initial posture is a posture of the electronic device that exists when three axes of the carrier antenna coordinate system are respectively parallel to three axes of the UWB coordinate system, wherein the preset rotation matrix is used to convert a coordinate parameter in the carrier antenna coordinate system into a coordinate parameter in the UWB coordinate system, and wherein the coordinate parameter comprises a vector.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This is a National Stage of International Patent Application No. PCT/CN2021/137535 filed on Dec. 13, 2021, which claims priority to Chinese Patent Application No. 202110131647.8 filed on Jan. 30, 2021. Both of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD Embodiments of this application relate to the smart home field, and in particular, to a method for obtaining posture information and an electronic device. BACKGROUND With development of science and technology, the smart home has gradually entered people's daily life. The smart home may use a house as a platform to integrate home devices (such as a smart television and a smart air conditioner) related to home life for controlling over a wireless local area network such as a wireless fidelity (Wireless Fidelity. Wi-Fi) network, to improve home security, convenience, and comfort. Specifically, a user may install a smart home application (Application, APP) on an electronic device (for example, a mobile phone or a tablet computer), to control a plurality of home devices. For example, in response to an operation performed by the user on an identifier of any home device (for example, a smart television, a smart air conditioner, or a smart socket) in the smart home APP, the mobile phone may display a control interface of the home device. Then, the mobile phone may control the home device in response to an operation performed by the user on the control interface displayed by the mobile phone. However, because a quantity of home devices increases, a quantity of home devices that can be controlled by using the smart home APP also increases accordingly. To control the home devices more conveniently, currently, a function of displaying a control interface of a home device when the mobile phone points to the home device may be implemented by using an ultra-wideband (ultra-wideband, UWB) chip and an inertial measurement unit (inertial measurement unit. IMU) on the mobile phone. To implement the foregoing function, a spatial posture of the mobile phone needs to be detected in real time. However, an error between the spatial posture of the mobile phone obtained through calculation by using the existing solution and an actual spatial posture of the mobile phone is relatively large. In other words, posture measurement accuracy of the mobile phone is relatively low. Consequently, an effect of directionally controlling the home device by the mobile phone is affected. SUMMARY This application provides a method for obtaining posture information and an electronic device, which can reduce an error between posture information obtained by the electronic device through calculation and actual posture information, improve posture measurement accuracy of the electronic device, and further improve an effect of directionally controlling a home device by the electronic device. According to a first aspect, this application provides a method for obtaining posture information. The method may be applied to an electronic device, the electronic device includes a UWB chip and n antennas, and the UWB chip is electrically connected to the n antennas, where n≥3, and n is an integer. The n antennas are configured to construct a carrier antenna coordinate system, a coordinate origin of the carrier antenna coordinate system coincides with a location of an antenna 0 in the n antennas, an antenna i in the n antennas is located on a coordinate axis of the carrier antenna coordinate system, and a distance between the antenna i and the antenna 0 is less than or equal to λ, where a value of i is sequentially obtained in {1, 2, . . . , n−1}. In the method, the electronic device may receive UWB signals from m UWB base stations by using the n antennas, where the m UWB base stations are configured to construct a UWB coordinate system, m≥3, and m is an integer. Then, the electronic device may determine spatial posture information of the electronic device based on the UWB signals received from the m UWB base stations by using the n antennas. The spatial posture information of the electronic device includes: a pitch angle φ, an azimuth φ, and a roll angle θ of the carrier antenna coordinate system relative to the UWB coordinate system. In this application, the electronic device includes a multi-antenna module (namely, the n antennas). The electronic device may measure a UWB signal from each UWB base station by using the multi-antenna module, and then obtain the spatial posture information of the mobile phone 100 based on each UWB signal. Each UWB signal is obtained through real-time measurement by the electronic device by using the multi-antenna module. Therefore, accuracy of each UWB signal can be ensured. Therefore, an error between posture information obtained by the electronic device through calculation and actual posture information can be reduced, posture measurement accuracy of the electronic device can be imp