Angle measurement method based on angle of arrival, electronic equipment and readable storage medium

By designing differentiated gain antenna array and signal processing technology in electronic devices, combining phase and power information, the problem of limited angle measurement accuracy under attitude change in the prior art is solved, and accurate measurement under any attitude is achieved Optimization of angle and equipment size cost.

CN119270190APending Publication Date: 2025-01-07HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311127557.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-05
Filing Date
2023-08-30
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

When the attitude changes, it is difficult to accurately obtain the relative angle of the target based on the signal phase difference received by the antenna. Especially in some postures, the angle measurement accuracy is limited, and the antenna array is large in size and high in cost, so it cannot be applied. For thin and lightweight portable devices.

Method used

Design an angle measurement method based on arrival angle, by setting multiple antenna arrays in an electronic device, each antenna's gain is designed to have differentiated characteristics, and switching the target antenna array in different postures, combining the phase and power of the signal The angle measurement is measured by information, the pre-configured mapping relationship and guidance matrix are used for signal processing, and the MUSIC algorithm and other technologies are used to improve the angle measurement accuracy.

Benefits of technology

It realizes accurate acquisition of the angle of the target relative to the electronic device in any posture, reduces the size and cost of the antenna array, is suitable for thin and light portable devices, and improves the accuracy and flexibility of angle measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119270190A_ABST
    Figure CN119270190A_ABST
Patent Text Reader

Abstract

The invention provides an angle measurement method based on an angle of arrival, electronic equipment and a readable storage medium, when the electronic equipment is in a first attitude, a first target antenna array corresponding to the first attitude is adopted to receive a signal from a target, and the first target antenna array comprises at least two antennas; wherein the directions in which the gain of each antenna is greater than or equal to the gain threshold are different, and obtaining the relative angle of the target according to the phase information and the power information of the signal received by the first target antenna array. In the present application, the directions in which the gain of each antenna in the first target antenna array is greater than or equal to the gain threshold are different, so that when each antenna receives the same signal, the power information of the signals received by each antenna is different, and on the basis of obtaining the phase information of the signals, the power information of the signals is further combined, so that the phase information of the signals is obtained. Because the power information of the signals received by different antennas is different, the electronic equipment can improve the angle measurement accuracy by combining the phase information and the power information of the signals.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 5, 2023, with application number 202310819587.8 and application name “Angle measurement method, electronic device and readable storage medium based on arrival angle”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] Embodiments of the present application relate to the field of communication technology, and in particular, to an angle measurement method based on an angle of arrival, an electronic device, and a readable storage medium. Background Art

[0003] The Bluetooth 5.1 standard introduces the angle of arrival (AOA) technology. Electronic devices can use the AOA technology to measure the angle of a target and obtain the angle of the target relative to the electronic device. The electronic device is provided with an antenna array, and the electronic device can obtain the angle of the target relative to the electronic device based on the phase difference of the signal received by the antenna in the antenna array.

[0004] When a user uses an electronic device, when the posture of the electronic device changes, the phase of the signal received by the antenna will also change. At present, in some postures of the electronic device, the electronic device cannot accurately obtain the angle of the target relative to the electronic device based on the phase difference of the signal received by the antenna. Summary of the invention

[0005] The embodiments of the present application provide an angle measurement method based on the angle of arrival, an electronic device, and a readable storage medium, which can accurately obtain the angle of a target relative to the electronic device in any posture of the electronic device.

[0006] In the first aspect, an embodiment of the present application provides an angle measurement method based on the angle of arrival. The execution subject of the method may be an electronic device or a chip or processor in the electronic device. The following description will be made using an electronic device as an example. In the method, when the electronic device is in a first posture, a first target antenna array corresponding to the first posture is used to receive a signal from the target. Among them, the first target antenna array includes at least two antennas, and the directions in which the gain of each antenna in the at least two antennas is greater than or equal to the gain threshold are different. It should be understood that different antennas have different gains in different directions, so that the strength of the signal received from the target in different directions by the antenna is different, that is, the power information of the signal received from the target in different directions by the antenna is different.

[0007] The electronic device obtains the relative angle of the target based on the phase information and power information of the signal received by the first target antenna array. In the present application, because the directions in which the gain of each antenna in the first target antenna array is greater than or equal to the gain threshold are different, when each antenna receives the same signal, the power information of the signal received by each antenna in different directions is different. On the basis of obtaining the phase information of the signal, the present application further combines the power information of the signal. Because the power information of the signal received by different antennas in different directions is different, the electronic device combines the phase information and power information of the signal to achieve accurate angle measurement. Exemplarily, in some postures of the electronic device, the electronic device cannot accurately measure the angle through the phase information of the signal (such as the phase difference). The electronic device can obtain the angle of the target relative to the electronic device in combination with the power information of the signal received by each antenna in the first target antenna array in different directions.

[0008] In a possible implementation, when the posture of the electronic device changes, in order to achieve angle measurement, the electronic device can switch the antenna array for receiving signals. When the electronic device is in the second posture, the electronic device switches from the first target antenna array to the second target antenna array corresponding to the second posture, and uses the second target antenna array to receive signals from the target. The second target antenna array includes at least two antennas, and the directions in which the gain of each antenna in the at least two antennas is greater than or equal to the gain threshold are different. The electronic device can obtain the relative angle of the target based on the phase information and power information of the signal received by the second target antenna array.

[0009] In some embodiments, a mapping relationship between each posture of the electronic device and the target antenna array can be preconfigured. In this way, when the posture of the electronic device changes, the electronic device can determine the target antenna array corresponding to the posture according to the mapping relationship. Exemplarily, in the mapping relationship, the first posture corresponds to the first target antenna array, and the second posture corresponds to the second target antenna array.

[0010] In a possible implementation, the direction in which the gain in the first target antenna array is greater than or equal to the gain threshold covers 360°. The direction in which the gain in the second target antenna array is greater than or equal to the gain threshold covers 360°. It can be understood that: the antennas in the first target antenna array, the direction in which the gain is greater than or equal to the gain threshold covers 360°, and the antennas in the second target antenna array, the direction in which the gain is greater than or equal to the gain threshold covers 360°.

[0011] With such a configuration, when the electronic device uses the first target antenna array to receive signals, the directions in which the gain in the first target antenna array is greater than or equal to the gain threshold cover 360°. Therefore, the antennas in the first target antenna array can receive signals from all directions, avoid missing signals, and improve the angle measurement accuracy.

[0012] In one possible implementation, the target's antenna may have complex and diverse polarization directions. If the polarization directions of the antennas in the target antenna array in the electronic device are different, then in each incoming wave direction, after the electromagnetic wave vectors in the horizontal and vertical directions are synthesized, the amplitude of the signal received by the antenna array will fluctuate with the different polarization components, which will cause the electronic device to be unable to accurately determine the relative angle of the target. To avoid this situation, in some embodiments, when the electronic device is in a posture, the antennas in the target antenna array can use the same polarization direction, that is, in the same posture, the polarization directions of the antennas in the target antenna array are the same.

[0013] The polarization directions of the antennas in the first target antenna array are the same, and the polarization directions of the antennas in the second target antenna array are the same.

[0014] In one possible implementation, the polarization direction of the antennas arranged above or below the screen of the electronic device has little effect on the accuracy of the angle measurement of the electronic device. Therefore, when the electronic device is in a posture, there is no need to limit the antennas arranged above or below the screen, and it is only necessary to limit the polarization directions of the antennas arranged on the frame to be the same. In this example, the polarization directions of the antennas arranged on the frame of the electronic device in the first target antenna array are the same, and the polarization directions of the antennas arranged on the frame of the electronic device in the second target antenna array are the same.

[0015] The reason why the embodiment of the present application can achieve accurate angle measurement in various postures of the electronic device is that the design of the antenna in the electronic device is crucial. The antenna design in the electronic device is introduced below:

[0016] On the one hand, in an embodiment of the present application, the gain of the antennas in the antenna array in different directions is designed to have differentiated characteristics, so that the electronic device can accurately measure the angle of the target based on the phase difference and relative power of the signals received by the antennas in the antenna array. On the other hand, because the electronic device uses different target antenna arrays to receive signals when it is in different postures, for the target antenna array corresponding to each posture, the gain of the antennas therein in different directions is designed to have differentiated characteristics. Among them, the gain of the antenna in different directions is designed to have differentiated characteristics, which can be understood as: the directions in which the gain of the antenna is greater than or equal to the gain threshold are different.

[0017] On the other hand, the electronic device includes a plurality of antennas, the plurality of antennas include a switchable antenna, and the switchable antenna is arranged on a border of the electronic device.

[0018] The purpose of setting a switchable antenna in the embodiment of the present application is that when the posture of the electronic device changes, because the polarization directions of the antennas in the electronic device are the same, or the polarization directions of the antennas arranged on the frame of the electronic device are the same, the switchable antenna is set in the embodiment of the present application, and the antenna is switched in different postures to ensure that the polarization directions of the antennas in the electronic device are the same, or the polarization directions of the antennas arranged on the frame of the electronic device are the same, which can improve the angle measurement accuracy of the electronic device.

[0019] In a possible implementation, the multiple antennas further include a non-switchable antenna, and the non-switchable antenna is disposed at at least one of the following positions of the electronic device: a frame, below the screen of the electronic device, and above the screen. Among them, the antenna disposed below the screen of the electronic device or above the screen has different power information (e.g., relative power) of the signal received from above the screen and below the screen, so the electronic device can combine the power information of the signal received by the antenna to accurately determine whether the target is on the side of the electronic device close to the top of the screen or the side close to the bottom of the screen.

[0020] In a possible implementation, the multiple antennas include a first antenna, a second antenna, a third antenna, a fourth antenna, and a fifth antenna, the first antenna, the third antenna, and the fifth antenna are non-switchable antennas, and the second antenna and the fourth antenna are switchable antennas. The second antenna and the fourth antenna are arranged at adjacent borders of the electronic device, the first antenna and the fifth antenna are arranged at adjacent borders of the electronic device, and the third antenna is arranged below the screen.

[0021] Specifically, the adjacent frame of the electronic device where the second antenna and the fourth antenna are arranged is different from the adjacent frame of the electronic device where the first antenna and the fifth antenna are arranged. Exemplarily, the electronic device includes frame 1, frame 2, frame 3 and frame 4, then the second antenna can be arranged on frame 1, the fourth antenna can be arranged on frame 2, the first antenna can be arranged on frame 3, and the fifth antenna can be arranged on frame 4. In some embodiments, frame 1 and frame 3 can be the shorter frames in the electronic device, and frame 2 and frame 4 can be the shorter frames in the electronic device. In some embodiments,

[0022] In a possible implementation, the switchable antenna includes a slot antenna and a linear antenna. Exemplarily, the switchable antenna is composed of two antennas, the slot antenna and the linear antenna. Exemplarily, a switch can be deployed in the electronic device, wherein when the switch is connected to the slot antenna, the electronic device can use the slot antenna in the switchable antenna, and when the switch is connected to the linear antenna, the electronic device can use the linear antenna in the switchable antenna.

[0023] In a possible implementation, the slot antenna and the linear antenna in the switchable antenna share an antenna structure. Compared with the method of separately arranging the slot antenna and the linear antenna, the design of the slot antenna and the linear antenna sharing an antenna structure can further reduce the size of the antenna array in the electronic device.

[0024] In a possible implementation manner, there are at least two antennas among the multiple antennas whose center distance is less than or equal to half the wavelength of the signal.

[0025] In this implementation, the center distance between at least two antennas among the multiple antennas is designed to be less than or equal to half the wavelength of the signal, and there is no need to limit the center distance between other antennas, thereby ensuring the angle measurement accuracy of the electronic device.

[0026] When the posture of the electronic device is a first posture, the electronic device can determine the first target antenna array corresponding to the first posture according to a first mapping relationship between a pre-configured posture and an antenna array. Similarly, when the posture of the electronic device is a second posture, the electronic device can determine the second target antenna array corresponding to the second posture according to a first mapping relationship between a pre-configured posture and an antenna array.

[0027] Taking an electronic device provided with a first antenna, a second antenna, a third antenna, a fourth antenna, and a fifth antenna as an example, in some embodiments, when the first posture is: the screen of the electronic device is perpendicular to the horizontal plane, and the electronic device is in landscape mode, the first target antenna array includes: the first antenna, the third antenna, the linear antenna in the second antenna, and the slot antenna in the fourth antenna.

[0028] In some embodiments, when the first posture is: the screen of the electronic device is parallel to a horizontal plane, the first target antenna array includes: the first antenna, the fifth antenna, a linear antenna in the second antenna, and a linear antenna in the fourth antenna;

[0029] In some embodiments, when the first posture is: the screen of the electronic device is perpendicular to the horizontal plane and the electronic device is a vertical screen, the first target antenna array includes: the third antenna, the fifth antenna, the slot antenna in the second antenna, and the wire antenna in the fourth antenna.

[0030] The following takes "the electronic device receives the phase information and power information of the first target antenna array" as an example to illustrate the angle measurement process of the electronic device. The electronic device obtains the relative angle of the target according to the phase information and power information received by the first target antenna array, which can refer to the descriptions in "Part 1" and "Part 2" below:

[0031] In the embodiment of the present application, when the electronic device uses the first target antenna array corresponding to the first posture to receive a signal from the target, the signal received by each antenna in the first target antenna array can be sampled to obtain IQ sampling data of each antenna in the first target antenna array. The electronic device can obtain phase information and power information of the signal received by the first target antenna array based on the IQ sampling data of each antenna in the first target antenna array.

[0032] First, the power information includes: the relative power of the signal received by each antenna in the first target antenna array. The phase information includes: the phase difference between the signal received by each antenna in the first target antenna array and the signal received by a reference antenna, and the reference antenna is any antenna in the first target antenna array.

[0033] In an embodiment of the present application, the first target antenna may be part of a plurality of antennas provided in the electronic device. When the electronic device adopts the first target antenna array corresponding to the first posture to receive signals from the target, the remaining antennas except the first target antenna are not used. Therefore, the reference antenna is different in different postures, that is, the reference antenna corresponds to the first posture.

[0034] In a possible implementation, the second mapping relationship and the third mapping relationship corresponding to different postures can be pre-configured in the electronic device. Taking the first posture as an example, the second mapping relationship corresponding to the first posture includes: when the electronic device is in the first posture, the relative power of the signal received by each antenna at each angle, and the third mapping relationship corresponding to the first posture includes: the phase difference between the signal received by each antenna at each angle and the signal received by the reference antenna. Among them, "each antenna" can be understood as: each antenna in the first target antenna array.

[0035] Taking the second posture as an example, the second mapping relationship corresponding to the second posture includes: when the electronic device is in the second posture, the relative power of the signal received by each antenna at each angle, and the third mapping relationship corresponding to the first posture includes: the phase difference between the signal received by each antenna at each angle and the signal received by the reference antenna.

[0036] In an embodiment of the present application, the electronic device can obtain the relative power of the signal received by each antenna in the power information, and the first similarity with the relative power of the signal received by each antenna at each angle, and obtain the phase difference between the signal received by each antenna and the signal received by the reference antenna in the phase information, and the second similarity with the phase difference between the signal received by each antenna and the signal received by the reference antenna at each angle. The electronic device can obtain the relative angle of the target based on the first similarity and the second similarity corresponding to each angle.

[0037] In some embodiments, when the first similarity ranked first and the second similarity ranked first include the same relative angle, the relative angle can be used as the relative angle of the target. Exemplarily, the first similarity ranked first includes a relative angle A, and the second similarity ranked first includes a relative angle A, and the electronic device can use angle A as the relative angle of the target.

[0038] In some embodiments, the electronic device may perform a weighted sum calculation on the first similarities and the second similarities corresponding to the angles, and use the angle corresponding to the maximum calculated value of the weighted sum calculation as the relative angle of the target.

[0039] In an embodiment of the present application, the electronic device can pre-acquire the relative power of the signal received by each antenna at each angle when the electronic device is in the first posture, and the phase difference between the signal received by each antenna at each angle and the signal received by the reference antenna. In this way, after the electronic device obtains the phase information and power information of the signal received by the first target antenna array, it can use a similarity algorithm to take the angle with the most similar phase information and power information as the relative angle of the target.

[0040] Second, in an embodiment of the present application, when the electronic device receives a signal from a target using the first target antenna array corresponding to the first posture, the electronic device can obtain a noise subspace according to the signal received by the first target antenna array. The noise subspace is used to characterize the phase information and the power information.

[0041] In an embodiment of the present application, the steering matrices corresponding to different postures can be pre-configured in the electronic device. Taking the first posture as an example, the steering matrix of the first target antenna array corresponding to the first posture is used to characterize: when the electronic device is in the first posture, the relative power of the signal received by each antenna at each angle, and the phase difference between the signal received by each antenna and the signal received by the reference antenna. Taking the second posture as an example, the steering matrix of the second target antenna array corresponding to the second posture is used to characterize: when the electronic device is in the second posture, the relative power of the signal received by each antenna at each angle, and the phase difference between the signal received by each antenna and the signal received by the reference antenna.

[0042] In the embodiment of the present application, the electronic device may use a multiple signal classification algorithm MUSIC algorithm according to the steering matrix and the noise subspace to obtain a MUSIC pseudo spectrum. The electronic device may obtain the relative angle of the target according to the MUSIC pseudo spectrum.

[0043] In some postures of the electronic device, such as when the electronic device is in posture one and posture three, the current electronic device cannot distinguish whether the target is located on the front or back of the electronic device. The electronic device cannot accurately obtain the relative angle of the target based on the MUSIC pseudo-spectrum alone. Therefore, in the embodiments of the present application, different methods can be used according to the posture of the electronic device to use the MUSIC pseudo-spectrum to obtain the relative angle of the target. In some embodiments, posture one and posture three can be used as preset postures of the electronic device, and posture two can be used as a non-preset posture. Posture one, posture two and posture three can refer to the description in the following embodiments.

[0044] In some embodiments, when the posture of the electronic device is in a non-preset posture, the electronic device may use the angle corresponding to the maximum value in the MUSIC pseudo-spectrum as the relative angle of the target.

[0045] In some embodiments, when the electronic device is in a preset posture, the electronic device cannot distinguish the angles in the symmetrical intervals of 0-180° and 180-360° in the MUSIC pseudo-spectrum obtained by the MISIC algorithm, such as being unable to distinguish 90° in the 0-180° interval and 270° in the 180-360° interval, which will cause the electronic device to be unable to accurately obtain the relative angle of the target. Therefore, in an embodiment of the present application, the electronic device can obtain the relative power of the signal received by each antenna in the power information, and the first similarity of the relative power of the signal received by each antenna at each angle. The electronic device can obtain the relative angle of the target based on the first similarity corresponding to each angle and the MUSIC pseudo-spectrum.

[0046] In a possible implementation, the electronic device may determine the target angle interval according to the angle corresponding to the maximum first similarity, and within the target angle interval, the angle corresponding to the maximum value in the MUSIC pseudo spectrum is used as the relative angle of the target. Exemplarily, the maximum values ​​in the MUSIC pseudo spectrum include two, which are at 50° and 310° respectively. If only based on the MUSIC pseudo spectrum, the electronic device cannot determine whether the relative angle of the target is 50° or 310°. In an embodiment of the present application, the electronic device may obtain the relative power of the signal received by each antenna in the power information, and the first similarity of the relative power of the signal received by each antenna at each angle, determine the angle corresponding to the maximum first correlation coefficient, and the angle interval to which the angle corresponding to the maximum first correlation coefficient belongs. Among them, if the interval to which the angle corresponding to the maximum first correlation coefficient belongs is 0-180°, the electronic device may use 50°, which belongs to 0-180°, as the relative angle of the target, and if the interval to which the angle corresponding to the maximum first correlation coefficient belongs is 180-360°, the electronic device may use 310°, which belongs to 180-360°, as the relative angle of the target.

[0047] In the embodiment of the present application, the electronic device combines the relative power of the signal received by each antenna in the power information, the first similarity of the relative power of the signal received by each antenna at each angle, and the MUSIC pseudo spectrum to achieve accurate angle measurement.

[0048] In the above example, when the electronic device is in the first posture, the electronic device obtains the relative angle of the target based on the phase information and power information of the signal received by the first target antenna array. Similarly, when the electronic device is in the second posture, the electronic device can obtain the relative angle of the target based on the phase information and power information of the signal received by the second target antenna array.

[0049] In some embodiments, the power information of the signal received by the electronic device according to the second target antenna array includes: the relative power of the signal received by each antenna in the second target antenna array. The phase information of the signal received by the electronic device according to the second target antenna array includes: the phase difference between the signal received by each antenna in the second target antenna array and the signal received by the reference antenna, and the reference antenna is any antenna in the second target antenna array.

[0050] In a possible implementation, the second mapping relationship and the third mapping relationship corresponding to different postures can be pre-configured in the electronic device. Taking the second posture as an example, the second mapping relationship corresponding to the second posture includes: when the electronic device is in the second posture, the relative power of the signal received by each antenna at each angle, and the third mapping relationship corresponding to the first posture includes: the phase difference between the signal received by each antenna at each angle and the signal received by the reference antenna. Among them, "each antenna" can be understood as: each antenna in the second target antenna array.

[0051] In an embodiment of the present application, the electronic device can obtain the relative power of the signal received by each antenna in the power information, and the first similarity with the relative power of the signal received by each antenna at each angle, and obtain the phase difference between the signal received by each antenna and the signal received by the reference antenna in the phase information, and the second similarity with the phase difference between the signal received by each antenna and the signal received by the reference antenna at each angle. The electronic device can obtain the relative angle of the target based on the first similarity and the second similarity corresponding to each angle, and specifically refer to the description of the first target antenna array.

[0052] In some embodiments, when the electronic device receives a signal from the target using the second target antenna array corresponding to the second posture, the electronic device may obtain a noise subspace based on the signal received by the second target antenna array. The noise subspace is used to characterize the phase information and the power information of the signal received by the second target antenna array in the second posture.

[0053] In an embodiment of the present application, the steering matrices corresponding to different postures can be pre-configured in the electronic device. Taking the second posture as an example, the steering matrix of the second target antenna array corresponding to the second posture is used to characterize: when the electronic device is in the second posture, the relative power of the signal received by each antenna at each angle, and the phase difference between the signal received by each antenna and the signal received by the reference antenna.

[0054] In an embodiment of the present application, the electronic device may use a multiple signal classification algorithm MUSIC algorithm according to the steering matrix and the noise subspace to obtain a MUSIC pseudo spectrum. The electronic device may obtain the relative angle of the target according to the MUSIC pseudo spectrum, and specifically refer to the description of the first target antenna array.

[0055] In a second aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory. The memory is used to store computer executable program code, and the program code includes instructions; when the processor executes the instructions, the instructions cause the electronic device to execute the method in the first aspect.

[0056] In a third aspect, an embodiment of the present application provides an electronic device, which may include a unit, a module or a circuit for executing the method provided in the first aspect above.

[0057] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method in the first aspect.

[0058] In a fifth aspect, a computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method in the first aspect.

[0059] The beneficial effects of the possible implementation methods of the second to fifth aspects mentioned above can be referred to the beneficial effects brought about by the first aspect mentioned above, and will not be elaborated here.

[0060] The present application provides an angle measurement method based on the angle of arrival, an electronic device, and a readable storage medium. In the method, when the electronic device is in a first posture, a first target antenna array corresponding to the first posture is used to receive a signal from a target. The first target antenna array includes at least two antennas, wherein the directions in which the gain of each antenna is greater than or equal to the gain threshold are different: the relative angle of the target is obtained according to the phase information and power information of the signal received by the first target antenna array. In the present application, because the directions in which the gain of each antenna in the first target antenna array is greater than or equal to the gain threshold are different, when each antenna receives the same signal, the power information of the signal received by each antenna in different directions is different. On the basis of obtaining the phase information of the signal, the present application further combines the power information of the signal. Because the power information of the signal received by different antennas in different directions is different, the electronic device combines the phase information and power information of the signal to achieve accurate angle measurement. Exemplarily, in some postures of the electronic device, the electronic device cannot accurately measure the angle through the phase information of the signal (such as the phase difference). The electronic device can combine the power information of the signal received by each antenna in the first target antenna array in different directions to achieve angle measurement, that is, it can obtain the angle of the target relative to the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 A schematic diagram of the layout of antennas at a signal transmitting end and a signal receiving end;

[0062] Figure 2 A schematic diagram of an antenna receiving a signal;

[0063] Figure 3A A schematic diagram of a layout of an antenna;

[0064] Figure 3BA schematic diagram showing the location of a target that cannot be distinguished by current electronic equipment;

[0065] Figure 4 A schematic diagram of an antenna array in an electronic device provided in an embodiment of the present application;

[0066] Figure 5 A schematic diagram of switching a switchable antenna of an electronic device provided in an embodiment of the present application;

[0067] Fig. 6A A schematic diagram of an antenna pattern in an antenna array provided in an embodiment of the present application;

[0068] Figure 6B A schematic diagram of the posture of an electronic device provided in an embodiment of the present application;

[0069] Fig. 7A Another schematic diagram of an antenna pattern in an antenna array provided in an embodiment of the present application;

[0070] Figure 7B Another schematic diagram of an antenna pattern in an antenna array provided in an embodiment of the present application;

[0071] Figure 7C Another schematic diagram of an antenna pattern in an antenna array provided in an embodiment of the present application;

[0072] Figure 8 A schematic diagram of the polarization direction of the wire antenna and the slot antenna provided in the embodiment of the present application;

[0073] Fig. 9A A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0074] Fig. 9B Another structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0075] Fig. 10A A schematic diagram of a flow chart of an embodiment of an angle measurement method based on an angle of arrival provided in an embodiment of the present application;

[0076] Fig. 10B A schematic flow chart of another embodiment of the angle measurement method based on the arrival angle provided in the embodiment of the present application;

[0077] Fig.11 A schematic diagram of an interface of an electronic device provided in an embodiment of the present application;

[0078] Fig.12 A scenario intention for the test device provided in the embodiment of the present application to obtain the second mapping relationship and the third mapping relationship;

[0079] Fig.13A schematic diagram of the relative power and phase of a signal received by an antenna provided in an embodiment of the present application;

[0080] Fig.14A A schematic flow chart of another embodiment of the angle measurement method based on the arrival angle provided in the embodiment of the present application;

[0081] Fig. 14B A schematic flow chart of another embodiment of the angle measurement method based on the arrival angle provided in the embodiment of the present application;

[0082] Fig. 14C A schematic flow chart of another embodiment of the angle measurement method based on the arrival angle provided in the embodiment of the present application;

[0083] Fig.14D A schematic flow chart of another embodiment of the angle measurement method based on the arrival angle provided in the embodiment of the present application;

[0084] Fig.15 A schematic diagram of an IQ signal of antenna 1 and an IQ signal of antenna 2 sampled at the same time provided in an embodiment of the present application;

[0085] Fig.16A A schematic diagram of a first correlation coefficient provided in an embodiment of the present application;

[0086] Fig. 16B A schematic diagram of a MUSIC pseudo spectrum provided in an embodiment of the present application;

[0087] Fig.17 Another schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0088] The electronic device in the embodiments of the present application may be referred to as user equipment (UE), terminal, etc. For example, the electronic device may be a mobile phone, a portable android device (PAD), a personal computer (PC), an ink tablet, a handheld device with a wireless communication function, a computing device, a vehicle-mounted device or a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a terminal device in industrial control, a terminal device in a smart home, etc. The form of the electronic device is not specifically limited in the embodiments of the present application. The following embodiments are described by taking the electronic device as a tablet as an example.

[0089] The Bluetooth 5.1 standard introduces the angle of arrival (AOA) technology. Electronic devices can use the AOA technology to measure the angle of a target and obtain the angle of the target relative to the electronic device. In some embodiments, the angle of the target relative to the electronic device can be referred to as the relative angle of the target. The electronic device can act as a signal receiving end to communicate with the signal transmitting end, and the signal transmitting end can act as a target. An antenna array can be set in the electronic device, and the antenna array can include at least two antennas. The electronic device sends and receives signals through the antennas in the antenna array.

[0090] Reference Figure 1 , Figure 1 In the example, an antenna array includes four antennas. Since the four antennas are set at different positions in the electronic device, when the signal from the target reaches the four antennas, the phases of the signals received by the four antennas are different. The electronic device can obtain the relative angle of the target based on the phase difference of the signals received by the four antennas. It should be understood that Figure 1 In the description, an example of setting an antenna in a target is used for explanation, and the embodiments of the present application do not limit the setting of the antenna in the target.

[0091] Figure 2 A schematic diagram of an antenna receiving a signal provided in an embodiment of the present application. Figure 2 In the example, any two antennas in the electronic device may include antenna 1 and antenna 2. Figure 2 , the phases of the signals received by antenna 1 and antenna 2 are different, that is, there is a phase difference between the signals received by antenna 1 and antenna 2. The electronic device can calculate the relative angle θ of the target according to the following formula 1:

[0092]

[0093] Among them, φ(ant1) represents the phase of the signal received by antenna 1, φ(ant2) represents the phase of the signal received by antenna 2, φ(ant1)-φ(ant2) represents the phase difference between the signals received by antenna 1 and antenna 2, λ represents the wavelength of the signal from the target, and d represents the distance between antenna 1 and antenna 2.

[0094] It should be understood that for an electronic device equipped with multiple antennas, referring to Formula 1, the electronic device can use the phase difference of the signals received by each antenna to calculate multiple relative angles of the target. The electronic device can then obtain the relative angle of the target based on the multiple relative angles of the target. The embodiment of the present application does not elaborate on this process.

[0095] In the current AOA technology, in order to ensure the angle measurement accuracy of electronic equipment, it is required that the phase difference of the signal received by the antenna in the electronic equipment has a linear relationship with the relative angle of the target, and the center distance d between the antennas is required to be less than half the wavelength λ / 2 when the antenna is laid out. For example, if the relative angle of the target changes by A degrees each time, the phase difference of the signal received by the antenna changes by B degrees, which can be understood as "the phase difference of the signal received by the antenna has a linear relationship with the relative angle of the target".

[0096] In order to meet these requirements, most antennas in current electronic devices use dipole antennas or patch antennas, and the antenna layout uses uniform linear arrays (ULA) or uniform rectangular arrays (URA). The current antenna design in electronic devices results in large antenna arrays and high costs.

[0097] For example, if a patch antenna is provided in an electronic device, and the patch antenna layout is URA, that is, a patch URA antenna array is provided in the electronic device. Figure 3A The size of a single patch antenna can be 3cm×3cm, and the center distance between antennas in the patch URA antenna array is set to half a wavelength, so the size of the patch URA antenna array reaches 9cm×9cm. The antenna array is large in size and high in cost, and cannot be applied to thin and portable electronic devices such as mobile phones and tablets.

[0098] In addition, when a user uses an electronic device, the posture of the electronic device may change. Currently, in some postures of the electronic device, the electronic device cannot accurately obtain the relative angle of the target based on the phase difference of the signal received by the antenna.

[0099] For example, when the posture of the electronic device is posture 1, the phase difference of the signal received by the antenna has a high degree of recognition, and the electronic device can accurately measure the angle of the target based on the phase difference of the signal received by the antenna. However, when the posture of the electronic device changes from posture 1 to posture 2, the relative phase of the signal received by the antenna will change. When the phase difference of the signal received by the antenna has a low degree of recognition and is difficult to support angle measurement, the electronic device cannot obtain the relative angle of the target based on the phase difference of the signal received by the antenna.

[0100] For example, when the electronic device is in a state such as Figure 3BWhen the electronic device is in the posture shown, the electronic device cannot distinguish whether the target is located on the front or back of the electronic device, such as the electronic device cannot distinguish whether the target is located at position A or position B. In some embodiments, the front and back of the electronic device can be understood as two opposite sides of the electronic device. Exemplarily, the front of the electronic device can be a side including a screen, and the back of the electronic device can be a side including a rear camera. Exemplarily, the front of the electronic device can be a side facing the user, and the back of the electronic device can be a side facing away from the user. The embodiments of the present application do not limit the division of the front and back of the electronic device.

[0101] In some embodiments, additional antennas may be added to the electronic device to support angle measurement, but this approach will further increase the size of the antenna array.

[0102] Therefore, there is an urgent need for a small-sized antenna array and a method for an electronic device to measure the angle of a target in different postures.

[0103] In an embodiment of the present application, an antenna design is provided, and the antenna setting position can be changed, for example, the antenna can be set on the frame of the electronic device. Or the antenna can be set on the frame of the electronic device, and the antenna can be set at at least one of the following positions: below the screen of the electronic device, and above the screen.

[0104] Exemplarily, the area below the screen may be the back panel of the electronic device. In the embodiment of the present application, it is not necessary to set all antennas in the back panel, but the space at the frame and other positions can be effectively utilized, which can reduce the space occupied by the entire antenna array and reduce the size of the antenna array. In addition, small-sized antennas such as half-wavelength slot antennas and half-wavelength wire antennas are also used in the embodiment of the present application to further reduce the size of the antenna array. Because the size of the antenna array is small, the antenna provided in the embodiment of the present application can be applied to thin and portable electronic devices such as mobile phones and tablet computers. In the following embodiments, the half-wavelength slot antenna is referred to as a slot antenna, and the half-wavelength wire antenna is referred to as a wire antenna for explanation.

[0105] In some embodiments, the antenna array of the electronic device may include two types of antennas, one type of antenna is a switchable antenna, and the other type of antenna is a non-switchable antenna. The switchable antenna may include a slot antenna and a wire antenna, and the switchable antenna may switch between the slot antenna and the wire antenna. It should be understood that the switchable antenna includes a slot antenna and a wire antenna, which can be understood as: the electronic device can perform antenna switching and use the slot antenna or the wire antenna in the switchable antenna.

[0106] In some embodiments, the switchable antenna is composed of two antennas, a slot antenna and a linear antenna. Exemplarily, a switch can be deployed in an electronic device, wherein when the switch is connected to the slot antenna, the electronic device can use the slot antenna in the switchable antenna, and when the switch is connected to the linear antenna, the electronic device can use the linear antenna in the switchable antenna.

[0107] In some embodiments, Figure 4 A schematic diagram of a switchable antenna provided in an embodiment of the present application. Figure 4 In a, the black solid line represents the antenna structure, the black circle represents the feed point, and the black triangle represents the switch. The feed point is used to connect the antenna structure with the RF transceiver circuit. The RF transceiver circuit can refer to Fig. 9A When the two switches are turned on, both ends of the antenna structure can be grounded. Figure 4 In b, when both switches are off, the antenna structure behaves as a wire antenna. Figure 4 In c, when the two switches are turned on, both ends of the antenna structure can be grounded, a gap is formed between the antenna structure and the ground, and the antenna structure is characterized as a slot antenna. In the embodiment of the present application, the electronic device can control the on and off of the two switches to control the switchable antenna to switch between the wire antenna and the slot antenna.

[0108] It should be noted that in the embodiment of the present application, the slot antenna and the linear antenna in the switchable antenna can share the antenna structure, which can further reduce the size of the antenna array in the electronic device compared to the method of separately arranging the slot antenna and the linear antenna.

[0109] In some embodiments, the non-switchable antenna may be a slot antenna, a wire antenna, a patch antenna, or a Y-type antenna, etc. In some embodiments, in order to reduce the size of the antenna array in the electronic device, the non-switchable antenna may be a small-sized slot antenna or wire antenna.

[0110] In some embodiments, the antenna array of the electronic device may include at least two switchable antennas, and the at least two switchable antennas may be disposed on a frame of the electronic device.

[0111] In some embodiments, the antenna array of the electronic device may include at least two switchable antennas and at least one non-switchable antenna. Any two of the at least two switchable antennas may be respectively arranged in adjacent frames of the electronic device, and the remaining antenna may be arranged in any of the following positions: the frame of the electronic device, below the screen, and above the screen.

[0112] In some embodiments, the antenna array of the electronic device may include 2 switchable antennas and 3 non-switchable antennas. Figure 5A schematic diagram of an antenna array in an electronic device provided in an embodiment of the present application. Figure 5 Taking a tablet computer as an example, the front of the tablet computer can be understood as the side that includes the screen. Figure 5 The back of the tablet is shown in Figure 5 In the example, a rear camera 41 is provided on the back of a tablet computer.

[0113] Reference Figure 5 , the two switchable antennas may be antenna 2 and antenna 4, respectively, and the three non-switchable antennas may be antenna 1, antenna 3, and antenna 5, respectively. The tablet computer may include four frames, namely frame 1, frame 2, frame 3, and frame 4. Antenna 2 and antenna 4 may be arranged in two adjacent frames of the tablet computer, such as antenna 2 may be arranged in frame 1, and antenna 4 may be arranged in frame 2. Antenna 1, antenna 3, and antenna 5 may be arranged in the frame of the tablet computer, below the screen, or above the screen. Figure 5 In the example, antenna 1 and antenna 5 are arranged in the other two frames of the tablet computer, and antenna 3 is arranged on the back panel of the tablet computer, such as antenna 1 is arranged in frame 3, antenna 5 is arranged in frame 4, and antenna 3 is arranged at a position close to frame 1 and frame 2. In some embodiments, antenna 1 can be regarded as the first antenna, antenna 2 can be regarded as the second antenna, antenna 3 can be regarded as the third antenna, antenna 4 can be regarded as the fourth antenna, and antenna 5 can be regarded as the fifth antenna.

[0114] It should be understood that the embodiments of the present application do not limit the number of antennas provided on each border. For example, multiple antennas may be provided on one border, or no antenna may be provided on the border.

[0115] In some embodiments, antenna 1 and antenna 5 arranged on the frame of the electronic device may be wire antennas or slot antennas, and antenna 3 arranged on the back panel of the electronic device may be other types of antennas, such as a patch antenna or a Y-type antenna.

[0116] Figure 5 In the figure, the black circle represents the feed point, and the black triangle represents the switch. Figure 5 Antenna 2 and antenna 4 are switchable antennas, which include slot antennas and wire antennas. The principle of switching antennas in antenna 2 and antenna 4 can refer to Figure 4 . Each antenna in the antenna array may correspond to a feed point. In some embodiments, the feed point corresponding to antenna 1 may be used as feed point 1, the feed point corresponding to antenna 2 may be used as feed point 2, the feed point corresponding to antenna 3 may be used as feed point 3, the feed point corresponding to antenna 4 may be used as feed point 4, and the feed point corresponding to antenna 5 may be used as feed point 5. In the embodiment of the present application, the slot antenna and the wire antenna in antenna 2 may share feed point 2, and the slot antenna and the wire antenna in antenna 4 may share feed point 4.

[0117] On the basis of reducing the size of the antenna array, in order to achieve the purpose of enabling the electronic device to measure the angle of the target in different postures, in an embodiment of the present application, the gains of the antennas in the antenna array in different directions can also be designed to have differentiated characteristics, so that the electronic device can accurately measure the angle of the target based on the phase difference and relative power of the signals received by the antennas in the antenna array.

[0118] Antenna gain can be used to measure the ability of an antenna to send and receive signals in a specific direction. When the target is in a specific direction of the antenna, the antenna receives a strong signal from the target. When the target is outside the specific direction of the antenna, the antenna receives a weak signal from the target. In an embodiment of the present application, when multiple antennas are set in an electronic device, because the gain of the antenna in different directions is designed to have differentiated characteristics, that is, different antennas have different gains in different directions, and different antennas receive different strengths of signals from the target in different directions, so that different antennas receive different relative powers of signals from the target in different directions. Among them, the greater the strength of the signal received by the antenna from the target, the greater the relative power of the target. In the case where the electronic device cannot measure the angle based on the phase difference of the signal received by the antenna, because the relative powers of the signals received by different antennas in different directions are different, the electronic device combines the phase difference and relative power of the signal to measure the angle, which can improve the accuracy of the angle measurement. Exemplarily, the electronic device cannot accurately measure the angle through the phase information of the signal (such as the phase difference), and the electronic device can combine the power information of the signal received by the antenna in different directions to determine the relative angle of the target.

[0119] In some embodiments, the gain of the antenna in the electronic device in different directions is designed to have differentiated characteristics, which can also be understood as: for different antennas, the directions in which the gain is greater than or equal to the gain threshold are different. Exemplarily, for antennas 1 to 5 provided in the electronic device, the gain of antenna 1 in the first direction can be set to be greater than or equal to the gain threshold, the gain of antenna 2 in the second direction can be set to be greater than or equal to the gain threshold, the gain of antenna 3 in the third direction can be set to be greater than or equal to the gain threshold, the gain of antenna 4 in the fourth direction can be set to be greater than or equal to the gain threshold, and the gain of antenna 5 in the fifth direction can be set to be greater than or equal to the gain threshold. Among them, the first direction, the second direction, the third direction, the fourth direction, and the fifth direction are different.

[0120] In some embodiments, there may be an intersection or no intersection between the first direction, the second direction, the third direction, the fourth direction, and the fifth direction.

[0121] In some embodiments, to ensure angle measurement accuracy, the union of the first direction, the second direction, the third direction, the fourth direction, and the fifth direction may cover 360°. In other words, for an antenna array in an electronic device, directions with a gain greater than or equal to a gain threshold may cover 360°.

[0122] In some embodiments, the antenna pattern may characterize the gain of the antenna in different directions. The following explains "the gain of the antenna in different directions is designed to have differentiated characteristics" in the form of the antenna pattern.

[0123] For example, Fig. 6A A schematic diagram showing the antenna pattern in an antenna array in an electronic device. Fig. 6A In the example, the antenna is an omnidirectional antenna, and the electronic device uses the wire antenna in antenna 2 and the slot antenna in antenna 4 as an example. Fig. 6A For example, the gain of antenna 1 in the direction of 120°-240° is greater than or equal to the gain threshold, the gain of the wire antenna in antenna 2 in the directions of 300°-360° and 0-60° is greater than or equal to the gain threshold, the gain of antenna 3 in the direction of 210°-330° is greater than the gain threshold, the gain of the slot antenna in antenna 4 in the directions of 60°-120° and 240°-300° is greater than or equal to the gain threshold, and the gain of antenna 5 in the direction of 210°-330° is greater than or equal to the gain threshold.

[0124] Reference Figure 3B The posture of the electronic device shown, in some embodiments, for example Figure 3B The posture and Fig. 6A The posture of the electronic device in the electronic device is the same. Currently, the electronic device cannot distinguish whether the target is at position A or position B of the electronic device. In the embodiment of the present application, the electronic device can combine the relative power received from the target by each antenna from antenna 1 to antenna 5 to determine whether the target is at position A or position B of the electronic device. Among them, position A is on the front side of the electronic device, and position B is on the back side of the electronic device.

[0125] Reference Fig. 6A In the directional pattern of the antenna shown, the directional pattern of antenna 4 has the largest gain in the directions of 90 degrees and 270 degrees. Regardless of whether the target is at position A (front) or position B (back) of the electronic device, the signal strength received by antenna 4 from the target is relatively strong. Antenna 3 is set below the screen of the electronic device. When the target is at position A of the electronic device, the signal strength received by antenna 3 from the target is relatively small. When the target is at position B of the electronic device, the signal strength received by antenna 3 from the target is relatively large. Therefore, the electronic device can determine the position of the target based on the signal strength received by antenna 4 and the signal strength received by antenna 3.

[0126] Exemplarily, when the signal strength received by antenna 4 is relatively large and the signal strength received by antenna 3 is relatively small, it indicates that the target is on the front side of the electronic device (such as position A). It should be understood that the relatively large signal strength received by antenna 4 can be understood as the signal strength received by antenna 4 being greater than the strength threshold, and the relatively small signal strength received by antenna 3 can be understood as the signal strength received by antenna 3 being less than the strength threshold. Exemplarily, when the signal strengths received by antenna 4 and antenna 3 are close, that is, when the signal strengths received by antenna 4 and antenna 3 are both large, it indicates that the target is on the back side of the electronic device (position B). It should be understood that the similar signal strengths received by antenna 4 and antenna 3 can be understood as: the difference between the signal strengths received by antenna 4 and antenna 3 is less than the difference threshold.

[0127] In some embodiments, the antenna in the electronic device may be a directional antenna and / or an omnidirectional antenna, which is not limited in the embodiments of the present application. The following embodiments are described by taking the antennas in the electronic device as omnidirectional antennas as an example.

[0128] In some embodiments, when the electronic device is in different postures, the electronic device can use all antennas to send and receive signals. Because different antennas have differentiated characteristics in gain in different directions, the electronic device can accurately measure angles based on the phase difference and relative power of the signals received by the antennas.

[0129] In some embodiments, in response to different postures of the electronic device, the electronic device can use some of its antennas to send and receive signals, where the some antennas can be designed to have differentiated gain characteristics in different directions. In this way, the electronic device can also achieve accurate angle measurement based on the phase difference and relative power of the signals received by the antenna.

[0130] In some embodiments, a first mapping relationship between the posture of the electronic device and the target antenna array can be pre-configured in the electronic device, and the first mapping relationship is used to indicate the antenna array used by the electronic device in different postures. Among them, the antenna array used by the electronic device in different postures can be called the target antenna array, and the antenna in the target antenna array can be called the target antenna. Exemplarily, the first mapping relationship may include an identifier of the posture of the electronic device, and a target antenna array corresponding to the identifier of the posture of the electronic device, and the target antenna array may include an identifier of the target antenna. The identifier of the posture may be the name, number, etc. of the posture. The identifier of the target antenna may be the name, number, etc. of the antenna. Exemplarily, for example, antenna 2 may be the number of switchable antenna 2, antenna 2-1 may represent a slot antenna in antenna 2, and antenna 2-2 may represent a wire antenna in antenna 2.

[0131] It should be noted that different target antenna arrays correspond to different postures. However, in order to ensure that the electronic device can accurately measure angles in different postures, the antennas in the target antenna array can be designed to have differentiated characteristics in gain in different directions. In some embodiments, different antennas in the target antenna array have different directions in which the gain is greater than or equal to the gain threshold. In some embodiments, different antennas in the target antenna array have different directions in which the gain is greater than or equal to the gain threshold, and for the target antenna array, the direction in which the gain is greater than or equal to the gain threshold can cover 360°.

[0132] In some embodiments, the antenna of the target may have complex and diverse polarization directions. If the polarization directions of the antennas in the target antenna array in the electronic device are different, then in each incoming wave direction, after the electromagnetic wave vectors in the horizontal and vertical directions are synthesized, the amplitude of the signal received by the antenna array will fluctuate with the different polarization components, causing the electronic device to be unable to accurately determine the relative angle of the target.

[0133] To avoid this situation, in some embodiments, when the electronic device is in a posture, the antennas in the target antenna array can adopt the same polarization direction, that is, in the same posture, the polarization directions of the antennas in the target antenna array are the same. Figure 5 In the antenna design, since antenna 3 is arranged on the back panel, the polarization direction of antenna 3 has little effect on the accuracy of angle measurement of the electronic device. Therefore, when the electronic device is in one posture, there is no need to limit the polarization direction of antenna 3, and the polarization directions of the antennas arranged on the frame in the target antenna array can be the same.

[0134] Below Figure 5 Taking the design of the antenna in the target antenna array as an example, the first mapping relationship configured in the electronic device and the polarization direction of the antenna in the target antenna array under different postures are illustrated:

[0135] Figure 6B The tablet is shown in three different postures. Figure 6B The figure a shows posture 1 of the tablet computer, where the tablet computer is in landscape mode. Figure 6B The second posture of the tablet computer is shown in b, where the screen of the tablet computer can be parallel to the horizontal plane. Figure 6B The third posture of the tablet computer is shown in c, and the tablet computer is in portrait mode. Figure 6B The three postures shown are taken as examples to illustrate the angle measurement method based on the arrival angle provided in the embodiment of the present application. It should be understood that other postures of the electronic device can also be applicable to the embodiment of the present application. For details, please refer to the relevant descriptions of the three postures.

[0136] Exemplarily, the first mapping relationship preconfigured in the electronic device may be stored in the form of a table, and the first mapping relationship may be as shown in Table 1:

[0137] Table 1

[0138] attitude Antenna 1 Antenna 2 Antenna 3 Antenna 4 Antenna 5 Posture 1 use Wire Antenna use Slot Antenna Not used Posture 2 use Wire Antenna Not used Wire Antenna use Posture Three Not used Slot Antenna use Wire Antenna use

[0139] Referring to Table 1, when the posture of the electronic device is posture 1, the target antenna array includes antenna 1, the linear antenna in antenna 2, antenna 3, and the slot antenna in antenna 4. When the posture of the electronic device is posture 2, the target antenna array includes antenna 1, the linear antenna in antenna 2, the linear antenna in antenna 4, and antenna 5. When the posture of the electronic device is posture 3, the target antenna array includes the slot antenna in antenna 2, antenna 3, the linear antenna in antenna 4, and antenna 5.

[0140] In the embodiment of the present application, for the target antenna array in each posture, different antennas in the target antenna array have different directions in which the gain is greater than or equal to the gain threshold. In some embodiments, in the target antenna array in each posture, the direction in which the gain is greater than or equal to the gain threshold can cover 360°.

[0141] For example, Fig. 7A is a schematic diagram of the antenna patterns of the target antenna array at attitude 1, Fig. 7A Take, for example, an antenna pattern shown in perspective from the back of an electronic device. Figure 7B is a schematic diagram of the antenna patterns of the target antenna array in attitude 2, Figure 7B Take the front of the electronic device facing up to show the antenna pattern as an example. Figure 7C is a schematic diagram of the antenna pattern of each antenna in the target antenna array at attitude three times, Figure 7C Take, for example, an antenna pattern shown in perspective from the back of an electronic device.

[0142] by Fig. 7A Take the antenna pattern of each antenna in the target antenna array as an example, refer to Fig. 7A , for example, the gain of antenna 1 in the direction of 120°-240° is greater than or equal to the gain threshold, the gain of antenna 3 in the direction of 210°-330° is greater than the gain threshold, the gain of the wire antenna in antenna 2 is greater than or equal to the gain threshold in the directions of 300°-360° and 0-60°, and the gain of the slot antenna in antenna 4 is greater than or equal to the gain threshold in the directions of 60°-120° and 240°-300°. That is to say, in the target antenna array corresponding to posture 1, the directions in which the gains of different antennas are greater than or equal to the gain threshold are different, and Fig. 7A In the example, the target antenna array gain corresponding to attitude 1 is greater than or equal to the gain threshold and covers 360°. Figure 7B and Figure 7C , the target antenna array corresponding to posture two, and the target antenna array corresponding to posture three, the directions in which different antenna gains are greater than or equal to the gain threshold are different, and the direction in which the target antenna array gain is greater than or equal to the gain threshold can cover 360°.

[0143] It should be understood that, because the electronic device switches between the slot antenna and the wire antenna in the switchable antenna in different postures, the antenna pattern of the switchable antenna in different postures will change. Taking antenna 2 as an example, when the posture of the electronic device is switched from posture 1 to posture 3, the antenna in antenna 2 is switched from the wire antenna to the slot antenna. When the posture of the electronic device is posture 1, the electronic device uses the wire antenna in antenna 2. Fig. 7A The directional pattern of antenna 2 in the figure represents the directional pattern of the wire antenna in antenna 2. When the posture of the electronic device is posture three, the electronic device uses the slot antenna in antenna 2. Figure 7C The radiation pattern of antenna 2 in represents the antenna radiation pattern of the slot antenna in antenna 2.

[0144] In some embodiments, Figure 5 In the antenna design, in order to ensure that the polarization direction of the target antenna set on the frame of the electronic device is the same under the same posture, the target antenna in the switchable antenna under each posture in Table 1 can be determined accordingly:

[0145] The wire antenna is an electric antenna. The current in the wire antenna is distributed along the antenna. The polarization direction of the wire antenna is determined by the direction of the current, and the polarization direction of the wire antenna is parallel to the direction of the current. Figure 8 In a, when the wire antenna is placed parallel to the horizontal plane, the current direction of the wire antenna is parallel to the horizontal plane, that is, the electric field vector direction of the wire antenna is parallel to the horizontal plane, and correspondingly, the magnetic field vector direction of the wire antenna is perpendicular to the horizontal plane. In this way, the polarization direction of the wire antenna is horizontal polarization.

[0146] The slot antenna is a magnetic antenna. The magnetic current in the slot antenna is distributed along the antenna. The polarization direction of the slot antenna is determined by the direction of the magnetic current, and the polarization direction of the slot antenna is perpendicular to the direction of the magnetic current. Figure 8 b in the figure, when the slot antenna is placed parallel to the horizontal plane, the magnetic flow direction of the slot line is parallel to the horizontal plane, that is, the magnetic field vector direction of the slot antenna is parallel to the horizontal plane, and correspondingly, the electric field vector direction of the slot antenna is perpendicular to the horizontal plane. In this way, the polarization direction of the slot antenna is vertical polarization.

[0147] Reference Figure 5 As shown in Table 1, for example, antenna 1 and antenna 5 are both wire antennas.

[0148] When the posture of the electronic device is posture one, because antenna 1 is placed perpendicular to the horizontal plane, the polarization direction of antenna 1 is vertical polarization. Because antenna 2 is placed perpendicular to the horizontal plane, and antenna 4 is placed parallel to the horizontal plane, in order to achieve vertical polarization of antenna 2 and antenna 4, the electronic device can use the wire antenna in antenna 2 and the slot antenna in antenna 4. In this way, the polarization directions of antenna 1, antenna 2, and antenna 4 set on the frame are the same, all of which are vertical polarization. In some embodiments, if antenna 3 is also vertically polarized when the posture of the electronic device is posture one, then the polarization directions of the antennas in the target antenna array corresponding to posture one are the same, all of which are vertical polarization.

[0149] When the posture of the electronic device is posture 2, because antenna 1, antenna 2, antenna 4 and antenna 5 are all placed parallel to the horizontal plane, and because antenna 1 and antenna 5 are placed horizontally with the horizontal plane, the polarization directions of antenna 1 and antenna 5 are both horizontally polarized. In order to achieve horizontal polarization of the polarization directions of antenna 2 and antenna 4, the electronic device can use the wire antenna in antenna 2 and the wire antenna in antenna 4. In this way, the polarization directions of antenna 1, antenna 2, antenna 4 and antenna 5 set on the frame are the same, all of which are horizontally polarized. It can also be said that the polarization directions of the antennas in the target antenna array corresponding to posture 2 are the same, all of which are horizontally polarized.

[0150] When the posture of the electronic device is posture three, antenna 5 is placed perpendicular to the horizontal plane, and the polarization direction of antenna 5 is vertical polarization. In order to achieve vertical polarization of the polarization directions of antenna 2 and antenna 4, the electronic device can use the slot antenna in antenna 2 and the wire antenna in antenna 4. In this way, the polarization directions of antenna 1, antenna 2 and antenna 4 set on the frame are the same, all of which are vertical polarization. If antenna 3 is also vertically polarized when the posture of the electronic device is posture three, the polarization directions of the antennas in the target antenna array corresponding to posture three are the same, all of which are vertical polarization.

[0151] It should be understood that the target antenna arrays in the three postures shown in Table 1 and the polarization directions of the antennas in the target antenna arrays in each posture are for example explanation. In some embodiments, taking posture 1 as an example, the antennas in the target antenna array in the electronic device can also be all horizontally polarized, such as the electronic device can use the slot antenna in antenna 2 and the wire antenna in antenna 4, antenna 1 and antenna 3 can be slot antennas, and the polarization directions of antenna 1, antenna 2, antenna 3 and antenna 4 can also be ensured to be horizontally polarized.

[0152] In the embodiment of the present application, a first mapping relationship can be pre-configured in the electronic device. During the use of the electronic device, the electronic device can determine the target antenna array corresponding to the posture of the electronic device according to the posture of the electronic device and the first mapping relationship. The electronic device can switch the antenna array to the target antenna array and use the target antenna array to send and receive signals. In this way, the electronic device can accurately obtain the relative angle of the target based on the phase difference and relative power of the signal received by the target antenna array. Fig. 9A and Fig. 9B The structure of the electronic device in the figure explains the principle of switching antennas of the electronic device:

[0153] Fig. 9A A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9A , the electronic device may include: a processor 91, a communication chip 92, a posture detection module 93, a signal processing module 94, a radio frequency switch component 95, and an antenna array 96. In some embodiments, the electronic device may include a radio frequency transceiver circuit, which may include: a processor 91, a communication chip 92, a posture detection module 93, a signal processing module 94, and a radio frequency switch component 95.

[0154] The posture detection module 93 is used to collect posture data of the electronic device. In some embodiments, the posture detection module 93 may include a gyroscope and / or an acceleration sensor.

[0155] The processor 91 is used to determine the posture of the electronic device according to the posture data collected by the posture detection module 93. In the embodiment of the present application, the principle of the processor 91 determining the posture of the electronic device according to the data collected by the gyroscope and / or the acceleration sensor is not described in detail.

[0156] The processor 91 is also used to send a control signal to the RF switch component 95 according to the posture of the electronic device, or to send a control signal to the RF switch component 95 through the communication chip 92. The control signal is used to control the on and off of the RF switch in the RF switch component 95, so that the electronic device switches the antenna in the antenna array 96, thereby switching the target antenna array.

[0157] The communication chip 92 includes but is not limited to a Bluetooth chip and a Wi-Fi chip. In the embodiment of the present application, a Bluetooth chip is taken as an example.

[0158] In some embodiments, the communication chip 92 is used to send a control signal from the processor 91 to the RF switch component 95 to control the on and off of the RF switch in the RF switch component 95 .

[0159] The communication chip 92 is also used to transmit and receive signals through the antenna array. Exemplarily, the communication chip 92 can generate a baseband signal and modulate the baseband signal into a radio frequency signal, which can be transmitted through the antenna array. The communication chip 92 can also demodulate the radio frequency signal received through the antenna array into a baseband signal, which can be called an IQ signal. The IQ signal can also be called a co-directional orthogonal signal, where I can be understood as in-phase, Q can be understood as quadrature, and the phase difference between Q and I is 90°.

[0160] The processor 91 is further used to obtain the relative angle of the target according to the phase difference and relative power of the IQ signals of each antenna obtained by the communication chip 92.

[0161] The signal processing module 94 is used to process the signals transmitted by the communication chip 92 and the signals received by the antenna array. In some embodiments, the signal processing module 94 may include a filter, which may be used to filter out noise and other interference signals in the signals received by the antenna array.

[0162] The RF switch assembly 95 may include at least one set of RF switches, and the on and off of the RF switches may assist the electronic device in switching the antenna array. For example, the RF switch assembly 95 may control the on and off of the RF switch in response to a control signal from the processor 91 or a control signal from the communication chip 92.

[0163] In some embodiments, the antenna array 96 may include antenna 1, antenna 2, antenna 3, antenna 4, and antenna 5. Antenna 2 and antenna 4 may be switchable antennas, and antenna 1, antenna 3, and antenna 5 may be non-switchable antennas.

[0164] Fig. 9B Another schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9B The structure of the RF switch assembly 95 and the connection method between the RF switch in the RF switch assembly 95 and the antenna in the antenna array 96 are specifically shown. Fig. 9B The RF switch component 95 may include: a first RF switch 951 , a second RF switch 952 , a third RF switch 953 , and a fourth RF switch 954 .

[0165] The first RF switch 951 is used to assist the electronic device in switching the slot antenna and the wire antenna in the antenna 2. It should be understood that Fig. 9B The first radio frequency switch 951 shown in the figure is an example, which represents switching between the slot antenna and the wire antenna in the antenna 2 in the form of a switching switch.

[0166] In some embodiments, the first RF switch 951 may include two single-pole single-throw switches. The control ends of the two single-pole single-throw switches may be connected to the processor 91, the fixed ends of the two single-pole single-throw switches may be grounded, and the active ends of the two single-pole single-throw switches may be used to connect the two ends of the antenna structure in the antenna 2, such as Figure 4 shown.

[0167] The processor 91 may send a first control signal to the first RF switch 951, and the first control signal is used to indicate the on and off of the two single-pole single-throw switches. When the two single-throw switches are turned off, the wire antenna in the antenna 2 may be switched, and when the two single-throw switches are turned on, the slot antenna in the antenna 2 may be switched.

[0168] In some embodiments, the processor 91 may be connected to the control end of the first RF switch 951 through a signal control line.

[0169] The second RF switch 952 is used to assist the electronic device in switching the slot antenna and the wire antenna in the antenna 4. It should be understood that Fig. 9B The second RF switch 952 shown in FIG. 9 is an example, and is used as a switching switch to represent switching between the slot antenna and the wire antenna in the antenna 4 .

[0170] In some embodiments, the second RF switch 952 may include two single-pole single-throw switches. In some embodiments, the control ends of the two single-pole single-throw switches may be connected to the processor 91, the fixed ends of the two single-pole single-throw switches may be grounded, and the active ends of the two single-pole single-throw switches may be used to connect the two ends of the antenna structure in the antenna 4, such as Figure 4 shown.

[0171] The processor 91 may send a second control signal to the second RF switch 952, and the second control signal is used to indicate the on and off of the two single-pole single-throw switches. When the two single-throw switches are turned off, the wire antenna in the antenna 4 may be switched, and when the two single-throw switches are turned on, the slot antenna in the antenna 4 may be switched.

[0172] The third RF switch 953 can assist the electronic device in switching antenna 1 , antenna 3 and antenna 5 .

[0173] In some embodiments, the third RF switch 953 may be a double-pole multi-throw switch, and the third RF switch 953 is used to turn on part or all of the antennas among antenna 1 , antenna 3 and antenna 5 . Fig. 9B In the example, the third RF switch 953 is a double-pole four-throw switch. The double-pole four-throw switch can use the two poles to arbitrarily select two of the four throws to be turned on.

[0174] It should be understood that the third RF switch 953 can be configured based on the target antenna array in different postures of the electronic device. As shown in Table 1, two non-switchable antennas are required in the three postures of the electronic device, so the third RF switch 953 can include two poles to ensure that the electronic device can use two non-switchable antennas at the same time. Similarly, if three non-switchable antennas are required in the three postures of the electronic device, the third RF switch 953 can include three poles to ensure that the electronic device can use three non-switchable antennas at the same time.

[0175] The processor 91 may also send a third control signal to the third RF switch 953, where the third control signal is used to instruct the third RF switch 953 to turn on some or all of the antennas 1, 3, and 5. In some embodiments, the processor 91 may be connected to the third RF switch 953 via a signal control line.

[0176] The fourth RF switch 954 is used to switch each antenna in the target antenna array in sequence during the process of the target antenna array receiving a signal, so as to sample the signal received by each antenna in the target antenna array.

[0177] In some embodiments, the fourth RF switch 954 may be a single-pole four-throw switch.

[0178] The communication chip 92 can send a fourth control signal to the fourth RF switch 954, where the fourth control signal is used to instruct to switch each antenna in the target antenna array so that the communication chip 92 can sample the signal received by each antenna in the target antenna array.

[0179] In the embodiment of the present application, the processor 91 can determine the target antenna array corresponding to the posture of the electronic device according to the posture of the electronic device and the pre-configured first mapping relationship. The processor 91 can control the RF switch component 95 to turn on the antenna in the target antenna array by sending a control signal to switch the antenna array, so that the electronic device can use different target antenna arrays to send and receive signals in different postures.

[0180] Based on the antenna design and the structure of the electronic device provided in the embodiment of the present application, the angle measurement method based on the angle of arrival provided in the embodiment of the present application is described below in combination with specific embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0181] Fig. 10A A flowchart of an embodiment of an angle measurement method based on an arrival angle provided in an embodiment of the present application. Fig. 10A , the angle measurement method based on the arrival angle provided in the embodiment of the present application may include:

[0182] S1001, when the posture of the electronic device is a first posture, the electronic device uses a first target antenna array to receive a signal from a target, the first target antenna array includes at least two antennas, wherein the directions in which the gain of each antenna is greater than or equal to a gain threshold are different.

[0183] In some embodiments, when the electronic device measures the angle of a target, the electronic device can obtain the posture of the electronic device based on the posture data collected by the posture detection module 93.

[0184] In some embodiments, when the electronic device starts to measure the angle of a target, the user can first input the initial posture of the electronic device. In the subsequent process of the electronic device measuring the angle of the target, the electronic device can obtain the posture of the electronic device based on the posture data collected by the posture detection module 93.

[0185] Taking the object-hunting scenario as an example, the user can trigger the electronic device to start searching for the object, and the electronic device can measure the angle of the target in response to the user's triggering operation. For example, a "object-hunting" application (application, APP) can be installed in the electronic device. Fig.11 In a, the user can operate the icon of the "find item" application to trigger the electronic device to display the interface of the "find item" application. Fig.11 In b, the interface of the "find item" application may include: a start find item control 111. The user operates the start find item control 111 to trigger the electronic device to measure the angle of the target. The embodiment of the present application does not limit the user's triggering operation. For example, the triggering operation may also be for the user to speak a preset password or make a preset gesture. In some embodiments, the user may also select a target in the interface of the "find item" application, such as Fig.11 In b, the electronic device is used to find a watch as an example.

[0186] In response to the user operating the finder control 111, the electronic device may output prompt information, which is used to indicate the user's input gesture to the electronic device, and the gesture may be used as the initial gesture of the electronic device. Fig.11 In c, the electronic device may display multiple postures to be selected, and display a prompt message of "Please select the posture of the electronic device". The user may select the posture of the current electronic device from the multiple postures to be selected, and the electronic device may obtain the posture of the electronic device based on the user's selection operation. Exemplarily, the multiple postures to be selected may include posture one, posture two, and posture three. If the user selects posture one, the electronic device may determine that the posture of the electronic device is posture one. In some embodiments, when displaying multiple postures to be selected, the electronic device may represent the posture with a picture of the posture. In some embodiments, in response to the user selecting posture one, the electronic device may display an interface for starting to search for objects, such as Fig.11As shown in d.

[0187] In the embodiment of the present application, a first mapping relationship is pre-stored in the electronic device. When the posture of the electronic device is the first posture, the electronic device can determine the first target antenna array corresponding to the first posture according to the first posture and the first mapping relationship. The electronic device can use the first target antenna array to receive signals from the target.

[0188] It should be understood that, with reference to the description in the above embodiment, when designing the antenna array, the embodiment of the present application can design the gain of each antenna in the target antenna array corresponding to different postures in different directions to have differentiated characteristics. In other words, the first target antenna array includes at least two antennas, and the directions in which the gain of each antenna in the at least two antennas is greater than or equal to the gain threshold are different.

[0189] S1002: The electronic device obtains the relative angle of the target according to the phase information and power information of the signal received by the first target antenna array.

[0190] In some embodiments, the phase information may include the phase difference of signals received by different antennas in the first target antenna array. The power information may include: the relative power of the signal received by each antenna in the first target antenna array. Exemplarily, after the electronic device uses the first target antenna array to receive the signal from the target, the relative angle of the target can be obtained based on the phase difference and relative power of the signal received by the first target antenna array.

[0191] In some embodiments, the electronic device may first obtain the candidate relative angle of the target using the phase difference of the signal received by the first target antenna array, and the relevant description in Formula 1 may be referred to. When the electronic device cannot accurately obtain the relative angle of the target according to the phase difference of the signal received by the first target antenna array, refer to Fig. 6A According to the description in , the electronic device can obtain the relative angle of the target according to the relative power of the signal received by the first target antenna array and the candidate relative angle of the target. In the embodiment of the present application, because the gains of the antennas in different directions in the first target antenna array are designed to have differentiated characteristics, the electronic device can accurately determine the relative angle of the target according to the relative power of the signal received by the first target antenna array.

[0192] In some embodiments, the electronic device can determine the approximate relative angle of the target based on the relative power of the signal received by the antenna. Fig. 6AAccording to the description in , when the target is at position A, such as when the signal strength received by antenna 1 is large and the signal strength received by antenna 2 is small, it indicates that the target is in the left area of ​​the electronic device, and the left area is the approximate relative angle of the target. The electronic device can then accurately determine the exact relative angle of the target by combining the phase difference of the signal received by the antenna, and the relevant description in formula 1 can be referred to.

[0193] Exemplarily, when the first posture is posture 1, referring to Table 1, the first target antenna array is antenna 1, the linear antenna in antenna 2, antenna 3, and the slot antenna in antenna 4. The electronic device can obtain the relative angle of the target according to the phase difference of the signals received by antenna 1, the linear antenna in antenna 2, antenna 3, and the slot antenna in antenna 4.

[0194] It should be understood that the angle measurement method based on the arrival angle provided in the embodiment of the present application can be applied not only to the scene of searching for objects, but also to the scene of electronic devices remotely controlling target Internet of Things (IoT) devices, electronic devices projecting screens to targets, and electronic devices transferring files to targets. In these scenes, electronic devices can measure the angle of the target to determine the position of the target, thereby realizing functions such as remote control, screen projection or file transfer.

[0195] In an embodiment of the present application, when the electronic device is in a first posture, a first target antenna array corresponding to the first posture is used to receive a signal from the target, and the first target antenna array includes at least two antennas, wherein the directions in which the gain of each antenna is greater than or equal to the gain threshold are different: the relative angle of the target is obtained according to the phase information and power information of the signal received by the first target antenna array. In the present application, because the directions in which the gain of each antenna in the first target antenna array is greater than or equal to the gain threshold are different, when each antenna receives the same signal, the power information of the signal received by each antenna in different directions is different. On the basis of obtaining the phase information of the signal, the present application further combines the power information of the signal, because the power information of the signal received by different antennas in different directions is different, so the electronic device combines the phase information and power information of the signal to achieve accurate angle measurement. Exemplarily, in some postures of the electronic device, the electronic device cannot accurately measure the angle through the phase information of the signal (such as the phase difference), and the electronic device can combine the power information of the signal received by each antenna in the first target antenna array in different directions to achieve angle measurement, that is, it can obtain the angle of the target relative to the electronic device.

[0196] In some embodiments, referring to the description in the above embodiments, when the posture of the electronic device changes, the antenna array used to receive the signal can be changed, and the electronic device can use the antenna array corresponding to the changed posture to accurately measure the angle. Fig. 10B, after S1002, S1003-S1004 may also be included:

[0197] S1003, when the posture of the electronic device is switched to the second posture, the electronic device switches from the first target antenna array to the second target antenna array, the second target antenna array includes at least two antennas, wherein the directions in which the gain of each antenna is greater than or equal to the gain threshold are different.

[0198] In the process of the electronic device measuring the angle of the target, the electronic device can obtain the posture of the electronic device in real time according to the posture data collected by the posture detection module 93. When the posture of the electronic device switches from the first posture to the second posture, the electronic device can determine the second target antenna array corresponding to the second posture according to the second posture and the first mapping relationship, and switch from the first target antenna array to the second target antenna array corresponding to the second posture.

[0199] Exemplarily, when the posture of the electronic device is the first posture "posture one", the processor 91 in the electronic device can send first control information to the first RF switch 951, and the first control information is used to instruct the first RF switch 951 to turn off the two single-pole single-throw switches so as to switch to the wire antenna in antenna 2. Similarly, the processor 91 in the electronic device can send second control information to the second RF switch 952, and the second control information is used to instruct the second RF switch 952 to turn on the two single-pole single-throw switches so as to switch to the slot antenna in antenna 4. In addition, the processor 91 in the electronic device can also send third control information to the third RF switch 953, and the third control information is used to instruct the third RF switch 953 to turn on antenna 1 and antenna 3. In this way, the electronic device can use the first target antenna array.

[0200] When the electronic device switches from posture 1 to posture 2, posture 2 can be used as the second posture. Referring to Table 1, the second target antenna array corresponding to the second posture is antenna 1, the wire antenna in antenna 2, the wire antenna in antenna 4, and antenna 5. The processor 91 in the electronic device can send second control information to the second RF switch 952, and the second control information is used to instruct the second RF switch 952 to turn off the two single-pole single-throw switches so as to switch to the wire antenna in antenna 4. The processor 91 in the electronic device can also send third control information to the third RF switch 953, and the third control information is used to instruct the third RF switch 953 to turn on antenna 1 and antenna 5, so that the electronic device can be switched to the second target antenna array.

[0201] Referring to the description in S1001, when designing the antenna array, the embodiment of the present application can design the gain of each antenna in the target antenna array corresponding to different postures in different directions to have differentiated characteristics. In other words, the second target antenna array includes at least two antennas, and the directions in which the gain of each antenna in the at least two antennas is greater than or equal to the gain threshold are different.

[0202] S1004: The electronic device obtains the relative angle of the target according to the phase information and power information of the signal received by the second target antenna array.

[0203] In some embodiments, the phase information may include the phase difference of signals received by different antennas in the second target antenna array. The power information may include: the relative power of the signal received by each antenna in the second target antenna array. Exemplarily, after the electronic device switches from the first target antenna array to the second target antenna array, the electronic device may obtain the relative angle of the target based on the phase difference and relative power of the signal received by the second target antenna array, and reference may be made to the relevant description in S1003.

[0204] In an embodiment of the present application, the size of the antenna array can be reduced by setting an antenna at at least one of the frame of the electronic device, below the screen, and above the screen. In addition, the embodiment of the present application can also use small-sized slot antennas and wire antennas, which can also reduce the size of the antenna array. In addition, the wire antenna and the slot antenna in the switchable antenna in the embodiment of the present application can also share the antenna structure, which can further reduce the size of the antenna array. On the basis of reducing the size of the antenna array, the embodiment of the present application can also design the gain of the antenna in the target antenna array in different directions to have differentiated characteristics, and the electronic device can realize angle measurement based on the phase difference and relative power of the signal received by the target antenna array.

[0205] In addition, the embodiment of the present application can also pre-configure a first mapping relationship between the posture of the electronic device and the antenna array in the electronic device. During the angle measurement process, the electronic device can send and receive signals using the target antenna array corresponding to the posture of the electronic device according to the posture of the electronic device and the first mapping relationship, and use the phase difference and relative power of the signal received by the target antenna array to obtain the relative angle of the target.

[0206] In the actual use of electronic devices, due to the influence of screens, metals and other shielding materials in electronic devices, the antenna's directional pattern, the phase and power of the signal received by the antenna, etc. may be different from the ideal situation. Figure 7A-7C The antenna pattern shown is designed for the antenna in the target antenna array, but in the actual use of electronic equipment, the antenna pattern in the target antenna array is different from Figure 7A-7CThere will be differences, which will affect the gain of the antenna in some directions, and thus affect the angle measurement accuracy of the electronic device. In order to improve the angle measurement accuracy of the electronic device, in some embodiments, the relative power and phase difference of the signals received by the target antenna array in each direction can be pre-quantified. During the actual angle measurement process of the electronic device, the relative power and phase difference received by the antenna array and the pre-quantified relative power and phase difference of the signals received by the target antenna array in each direction can be combined to achieve angle measurement.

[0207] In an embodiment of the present application, a second mapping relationship between angle and relative power, and a third mapping relationship between angle and phase difference can be pre-configured in the electronic device, and the angle can be understood as the relative angle of the target. The second mapping relationship is used to characterize the relative power of each antenna corresponding to different angles. It should be understood that the relative power of each antenna represents the relative power of the signal received by each antenna. The third mapping relationship is used to characterize the phase difference of each antenna corresponding to different angles. It should be understood that the phase difference of each antenna represents the phase difference between the signal received by each antenna and the signal received by the reference antenna.

[0208] In some embodiments, during the antenna design process, the staff may pre-use an antenna fixture designed for the electronic device, or use a test prototype of the electronic device to simulate the process of the electronic device measuring the angle of the target to obtain the second mapping relationship and the third mapping relationship. Furthermore, the staff may pre-configure the second mapping relationship and the third mapping relationship in the electronic device. It should be understood that the antenna design in the antenna fixture and the antenna design in the test prototype are the same as the antenna design in the electronic device, such as Figure 5 shown.

[0209] Reference Fig.12 In a microwave darkroom where all six sides are arranged with absorbing materials, the staff can set up a signal transmitting device and place the antenna fixture or test prototype on a turntable. The signal transmitting device can be used to transmit signals, and the signal transmitting device is used to simulate the target. The staff can connect the antenna fixture to the test equipment, or disconnect the antenna array in the test prototype from the post-stage circuit in the test prototype, and connect the antenna in the antenna array to the test equipment. Among them, no matter whether the antenna fixture is connected to the test equipment or the test prototype is connected to the test equipment, each antenna in the antenna array can be connected to a radio frequency channel of the test equipment, and the test equipment can obtain the signal received by the corresponding antenna through each radio frequency channel. In addition, in an embodiment of the present application, each radio frequency channel of the test equipment can share a local oscillator source to ensure that the phase of each radio frequency channel is consistent.

[0210] After the arrangement is completed, the signal transmitting device can transmit a signal, which can be a Bluetooth constant tone extension (CTE) signal, and the Bluetooth CTE signal can be a sine wave. Exemplarily, the signal transmitting device can transmit a LE 1M PHY data packet on the Bluetooth broadcast channel CH38, and the data packet can be expressed as a sine wave with a frequency of 2426.25 MHz. The LE 1M PHY data packet can be understood as a Bluetooth CTE signal.

[0211] Taking the test prototype as an example, and taking the example that the staff sets the test prototype to posture 1, the test prototype can use the target antenna array corresponding to posture 1 to receive signals. Among them, after the signal transmitting device transmits the Bluetooth CTE signal, each antenna in the target antenna array of the test prototype can receive the Bluetooth CTE signal, and accordingly, each RF channel of the test device can collect the Bluetooth CTE signal received by each antenna. It should be understood that each antenna and each antenna described in the following embodiments can be understood as each antenna in the target antenna array corresponding to the posture of the electronic device.

[0212] The test device can perform IQ signal sampling on the Bluetooth CTE signal received by each antenna to obtain IQ sampling data for each antenna. For example, the sampling rate of the test device can be set to 16Msps, 32Msps or higher, which is not limited in the embodiments of the present application. For example, the test device can collect 4096 IQ signal samples, 8192 IQ signal samples, etc. for each antenna in the target antenna array.

[0213] After the test equipment completes the IQ signal sampling at one angle, the turntable can rotate the preset angle in steps of the preset angle. When the position of the target remains unchanged, the angle of the target relative to the test prototype changes by the preset angle. Exemplarily, the preset angle can be a smaller step of 15°, 10° or 5°. According to the same sampling method, the test equipment can obtain the IQ sampling data of each antenna in the target antenna array of the test prototype at various angles. The IQ sampling data of each antenna can include multiple IQ signal sample points.

[0214] In the embodiment of the present application, the test device can obtain the relative power and phase difference of each antenna at each angle according to the IQ sampling data of each antenna in the test prototype at each angle, that is, obtain the second mapping relationship and the third mapping relationship. The following takes the IQ sampling data of antenna 1 at one angle as an example to illustrate the method for the test device to obtain the relative power and phase difference of each antenna at each angle:

[0215] In some embodiments, an IQ signal sample can be represented in complex form. For example, an IQ signal sample can be represented as I+jQ, where I is the real part of the complex number, Q is the imaginary part of the complex number, and j is the imaginary unit. Assuming that the IQ sampling data of antenna 1 includes 4096 IQ signal samples, the test equipment can perform fast Fourier transform (FFT) calculation on the 4096 IQ signal samples, and the calculation formula can be shown in the following formula 2:

[0216]

[0217] Where x represents the serial number of the time domain data, x = 0, 1, 2, ..., M-1. u represents the serial number of the frequency domain data, corresponding to the discrete frequency point in the frequency domain, and M represents the number of sampled IQ signal points. For example, when there are 4096 IQ signal points, M is 4096. F(u) represents the IQ signal in the frequency domain. f(x) represents the IQ signal in the time domain, and j is the imaginary unit.

[0218] F(u) can include a real part and an imaginary part. Assuming that the real part of F(u) is R(u) and the imaginary part of F(u) is I(u), the test equipment can obtain the amplitude A(u) by performing a modulo operation on F(u). The calculation formula can be shown in the following formula 3:

[0219]

[0220] The test equipment can convert the logarithmic power P(u) of each discrete frequency point in the frequency domain according to the amplitude A(u) of each discrete frequency point in the frequency domain. The calculation formula can be shown in the following formula 4:

[0221] P(u)=20*log(A(u)) Formula 4

[0222] After obtaining the logarithmic power of each discrete frequency point in the frequency domain, the test equipment can use the maximum value P(u)max of the logarithmic power as the relative power of antenna 1.

[0223] Among them, the test equipment can use F(u) corresponding to the maximum value P(u)max as F(peak), and the test equipment obtains the phase of F(peak) to obtain the initial phase Ph of antenna 1. The calculation formula can be shown as the following formula 5:

[0224]

[0225] Wherein, R(peak) is the real part of F(peak), and I(peak) is the imaginary part of F(peak).

[0226] Exemplarily, the relative power of antenna 1 calculated by the test equipment can be as follows: Fig.13As shown in a, Fig.13 The peak point in a in is the relative power of antenna 1. The initial phase of antenna 1 can be calculated as Fig.13 As shown in b, Fig.13 The peak point in b is the initial phase of antenna 1.

[0227] Through the calculation of Formula 2-Formula 5, the test equipment can obtain the relative power of each antenna in the target antenna array at a certain angle, as well as the initial phase of each antenna. It should be understood that the relative power of each antenna in the target antenna array can be understood as: the relative power of the signal received by each antenna in the target antenna array. The initial phase of each antenna in the target antenna array can be understood as: the initial phase of the signal received by each antenna in the target antenna array.

[0228] In some embodiments, a reference antenna may be pre-set, and the test device may calculate the phase difference between each antenna and the reference antenna according to the initial phase of each antenna in the target antenna array. The reference antenna is any antenna in the target antenna array.

[0229] For example, in one posture, if the reference antenna can be antenna 1, the test equipment can calculate the phase difference between antenna 1, antenna 2, antenna 3, antenna 4 and antenna 1 respectively, so that the test equipment can obtain the phase difference between each antenna and the reference antenna at this angle. In some embodiments, "the phase difference between each antenna and the reference antenna at each angle" can be referred to as "the phase difference of each antenna at each angle".

[0230] According to the same calculation method, the test equipment can obtain the relative power and phase difference of each antenna at each angle. It should be understood that the relative power of each antenna at each angle can be understood as: the relative power of the signal received by each antenna at each angle. The phase difference of each antenna at each angle can be understood as: the phase difference between the signal received by each antenna at each angle and the signal received by the reference antenna. Exemplarily, the test equipment can store the relative power of each antenna at each angle in a tabular form, denoted as P(θ, antenna i). Wherein θ represents the angle, and i represents different antennas, such as i=1, 2, 3, 4, 5. Similarly, the test equipment can store the phase difference of each antenna at each angle in a tabular form, denoted as Ph(θ, antenna i).

[0231] Exemplarily, taking the preset angle of 15 degrees as an example, P(θ, antenna i) may be as shown in Table 2, and Ph(θ, antenna i) may be as shown in Table 3:

[0232] Table 2 (Posture 1)

[0233]

[0234] Table 3 (Posture 1)

[0235]

[0236]

[0237] In some embodiments, in order to obtain more precise relative power and phase difference of each antenna at each angle, the test equipment can use interpolation method to interpolate the angle step to 5 degrees or even 1 degree. The relative power of each antenna at each angle after interpolation can be recorded as P1(θ, antenna i), and the phase difference of each antenna at each angle after interpolation can be recorded as Ph1(θ, antenna i). Exemplarily, the interpolation method can include but is not limited to: interpolation algorithms such as cubic spline interpolation or cubic polynomial, which are not limited in the embodiments of the present application.

[0238] Exemplarily, taking the test device interpolating the preset angle step to 5 degrees as an example, P1(θ, antenna i) can be as shown in Table 4 below, and Ph1(θ, antenna i) can be as shown in Table 5 below:

[0239] Table 4 (Posture 1)

[0240]

[0241] Table 5 (Posture 1)

[0242]

[0243] In some embodiments, the staff can also adjust the posture of the test prototype on the turntable. Under different postures of the test prototype, according to the same calculation method as posture one, the test equipment can obtain a second mapping relationship between the angle and the relative power of the antenna under different postures, as well as a third mapping relationship between the angle and the phase difference of the antenna under different postures.

[0244] Exemplarily, the test device can respectively obtain P1(θ, antenna i) and Ph1(θ, antenna i) corresponding to posture one, P1(θ, antenna i) and Ph1(θ, antenna i) corresponding to posture two, and P1(θ, antenna i) and Ph1(θ, antenna i) corresponding to posture three. In this embodiment, P1(θ, antenna i) and Ph1(θ, antenna i) corresponding to posture one, P1(θ, antenna i) and Ph1(θ, antenna i) corresponding to posture two, and P1(θ, antenna i) and Ph1(θ, antenna i) corresponding to posture three can be pre-configured in the electronic device.

[0245] It should be noted that in the process of the test device acquiring the second mapping relationship and the third mapping relationship, as the posture of the test prototype is different, the test prototype can switch the target antenna array according to the first mapping relationship, and use the target antenna array corresponding to each posture to receive the signal. Referring to Table 1, because some antennas are not used in the postures of some electronic devices, the relative power and phase difference of some antennas may not be included in the second mapping relationship and the third mapping relationship. Exemplarily, taking posture 1 as an example, when the test prototype is in posture 1, because the test prototype does not use antenna 5, the relative power of antenna 5 may not be included in the second mapping relationship, and the phase difference between antenna 5 and antenna 1 (reference antenna) may not be included in the third mapping relationship.

[0246] In addition, because some antennas are not used in the postures of some electronic devices, in order to ensure that the test equipment can obtain the phase difference of each antenna at each angle, in the embodiment of the present application, when the test prototype is in different postures, the reference antenna may be different. Exemplarily, when the test prototype is in posture one, because the test prototype does not use antenna 5, the reference antenna may be antenna 1, but when the test prototype is in posture three, because the test prototype does not use antenna 1, the reference antenna may be antenna 2. It should be understood that the reference antenna may correspond to the posture, and the reference antennas in different postures may be pre-set.

[0247] In some embodiments, the test device may also construct a steering matrix α(θ) of the target antenna array corresponding to each posture according to the second mapping relationship and the third mapping relationship.

[0248] Taking posture one as an example, the second mapping relationship is P1(θ, antenna i), and the third mapping relationship is Ph1(θ, antenna i). The test equipment can represent P1(θ, antenna i) in matrix form to obtain a power matrix, and represent Ph1(θ, antenna i) in matrix form to obtain a phase difference matrix.

[0249] Exemplarily, referring to Table 4, different columns in Table 4 include the relative powers of different antennas at various angles. The test equipment can represent P1(θ, antenna i) in the form of a matrix. For example, different columns of the power matrix correspond to the relative powers of different antennas. In the same column, the relative power of the same antenna at various angles can be included.

[0250] The test equipment can convert each element (relative power) in the power matrix into an amplitude. For example, the test equipment can convert each element in the power matrix into an amplitude using formula 6-1 to obtain an amplitude matrix, which is recorded as A1(θ,i);

[0251]

[0252] It should be understood that different columns of the amplitude matrix A1(θ,i) include the amplitudes of signals received by different antennas at different angles, and the same column may include the amplitudes of signals received by the same antenna at different angles. It should be understood that the amplitude and relative power of the antenna can be converted to each other.

[0253] Similarly, referring to Table 5, different columns in Table 5 include the phase differences of different antennas at various angles. The test equipment can represent Ph1(θ, antenna i) in the form of a matrix, recorded as B1(θ,i). Among them, if different columns of the phase difference matrix include the phase differences of different antennas at various angles, the same column may include the phase differences of the same antenna at various angles. For example, if the first column of the phase difference matrix is ​​the phase difference of antenna 1, when antenna 1 is the reference antenna, the first column of the phase difference matrix is ​​all 0.

[0254] The test equipment can perform the calculation of Formula 6-2 on each corresponding element in the amplitude matrix A1(θ,i) and the phase difference matrix B1(θ,i) to obtain the steering matrix α(θ) of the antenna array:

[0255] α(θ)=A1(θ,i)e j·B1(θ,i) Formula 6-2

[0256] The corresponding elements in the amplitude matrix A1(θ, i) and the phase difference matrix B1(θ, i) can be understood as elements with the same rows and columns.

[0257] Reference Figure 5 The layout of the antenna shown in some embodiments can be called a special-shaped antenna array in the embodiments of the present application. For the special-shaped antenna array, the embodiment of the present application can pre-simulate the scenario of the electronic device receiving the signal, and then obtain the relative power and phase difference of the antenna in the special-shaped antenna array at various angles.

[0258] During the actual angle measurement process of the electronic device, the electronic device can obtain the relative power and phase difference of each antenna in the antenna array, and determine the relative angle of the target in combination with the pre-configured second mapping relationship and the third mapping relationship. Fig.14A Another flow chart of the angle measurement method based on the arrival angle provided in the embodiment of the present application should be understood as follows: Fig.14A In the description, the posture of the electronic device is taken as the first posture as an example.

[0259] Reference Fig.14A , the angle measurement method based on the arrival angle provided in the embodiment of the present application may include:

[0260] S1401: When the posture of the electronic device is a first posture, the electronic device obtains power information and phase information of the first target antenna array according to a signal received by the first target antenna array.

[0261] The first target antenna array may include at least two antennas. Exemplarily, when the first posture is posture 1, the first target antenna array is antenna 1, a linear antenna in antenna 2, antenna 3, and a slot antenna in antenna 4.

[0262] In some embodiments, the power information of the first target antenna array may include: the relative power of each antenna in the first target antenna array. The phase information of the first target antenna array may include: the phase difference between each antenna in the first target antenna array and the reference antenna. The relative power of each antenna in the first target antenna array may be understood as: the relative power of the signal received by each antenna in the first target antenna array. The phase difference between the signal received by each antenna in the first target antenna array and the signal received by the reference antenna.

[0263] In some embodiments, the electronic device may also obtain the noise subspace U of the first target antenna array according to the signal received by the first target antenna array. n , refer to the relevant description in the third embodiment of the following embodiment. The noise subspace U of the first target antenna array n It can represent the power information of each antenna in the first target antenna array and the phase difference between each antenna and the reference antenna. In other words, the power information and phase information of the first target antenna array can include the noise subspace U of the first target antenna array. n .

[0264] In some embodiments, during the angle measurement of the electronic device, the Bluetooth chip in the electronic device can obtain the signal received by the first target antenna array, which can be a Bluetooth CTE signal, and the Bluetooth chip can sample the signal received by the first target antenna array to obtain IQ sampling data of the first target antenna array. The processor of the electronic device can obtain power information and phase information of the first target antenna array based on the IQ sampling data of the first target antenna array.

[0265] The following three methods are used to illustrate the method in which the electronic device (or the processor in the electronic device) obtains the power information and phase information of the first target antenna array:

[0266] Method 1:

[0267] Assuming that the first target antenna array includes k antennas, the IQ sampling data of the first target antenna array may include the IQ sampling data of the k antennas, and the IQ sampling data of each antenna may include multiple IQ signal samples. In some embodiments, the multiple IQ signal samples of each antenna may be numbered based on the sampling order. For example, if the IQ sampling data of each antenna includes 4096 IQ signal samples, the IQ signal samples of each antenna may be numbered 0, 1, 2, ..., 4095 in sequence based on the sampling order.

[0268] Taking antenna k as an example, each IQ signal sample point of antenna k can be expressed as I k +jQ k For each IQ signal sample point in the IQ sampling data of antenna k, the electronic device can perform a modulo operation on the IQ signal sample point to obtain the relative amplitude of antenna k corresponding to the IQ signal sample point. For example, the electronic device can use formula 7 to calculate the relative amplitude A of antenna k corresponding to the IQ signal sample point. k :

[0269]

[0270] The electronic device can use the following formula 8 to calculate the relative power P of antenna k corresponding to the IQ signal sample point: k :

[0271] P k =20θlog(A k ) Formula 8

[0272] It should be understood that because the IQ sampling data of antenna k may include multiple IQ signal samples, for each IQ signal sample, the electronic device can calculate the relative power P of antenna k corresponding to each IQ signal sample using formula 7 and formula 8. k In some embodiments, the electronic device may calculate the relative power P of the antenna k corresponding to the multiple IQ signal samples. k The mean value of is taken as the relative power P of antenna k k .

[0273] According to the same calculation method as Formula 7-Formula 8, the electronic device can obtain the power information of the first target antenna array, which can be recorded as P_rx(i). The power information of the first target antenna array may include the relative power of each antenna in the first target antenna array, P_rx(i) = [P_rx(1), P_rx(2), ..., P_rx(k)]. Wherein, i can represent the number of the antenna, such as P_rx(1) can represent the relative power of antenna 1.

[0274] Exemplarily, if the reference antenna is antenna 1, the IQ sampling data of antenna 1 can be expressed as I1+jQ1, and the electronic device can calculate the phase difference between each antenna and the antenna 1. Taking antenna 2 as an example, for the IQ signal sample points of antenna 1 and the IQ signal sample points of antenna 2 with the same number, the electronic device can use the following formula 9 to calculate the phase difference between antenna 2 and antenna 1 corresponding to the two IQ signal sample points:

[0275]

[0276] in, represents the phase difference between antenna 2 and antenna 1 obtained based on the IQ signal samples of antenna 1 and the IQ signal samples of antenna 2 with the same number, represents the phase of antenna 2 obtained based on the IQ signal samples of antenna 2, represents the phase of antenna 1 obtained based on the IQ signal samples of antenna 1.

[0277] Fig.15 A schematic diagram of IQ signal samples of antenna 1 and IQ signal samples of antenna 2 with the same number provided in an embodiment of the present application. Fig.15 , the IQ signal samples of antenna 1 and antenna 2 with the same number can be represented by complex numbers, and the electronic device can obtain the phase difference between antenna 2 and antenna 1 based on the IQ signal samples of antenna 1 and antenna 2 with the same number. In some embodiments, antenna 1 can be used as a reference antenna, and the phase difference between antenna 2 and antenna 1 can be called the phase difference of antenna 2.

[0278] It should be understood that because the IQ sampling data of antenna 2 may include multiple IQ signal samples, for the IQ signal samples of antenna 1 and the IQ signal samples of antenna 2 having the same number, the electronic device may calculate the phase differences corresponding to the multiple IQ signal samples using formula 9. In some embodiments, the electronic device may use the average of the phase differences corresponding to the multiple IQ signal samples as the phase difference of antenna 2.

[0279] According to the same calculation method as antenna 2, the electronic device can obtain the phase difference between other antennas in the first target antenna array and the reference antenna (such as antenna 1). Exemplarily, the phase information of the first target antenna array can be recorded as Ph_rx(i), Ph_rx(i) = [Ph_rx(2), Ph_rx(3), ..., Ph_rx(k)]. Among them, i can represent the number of the antenna. Taking antenna 1 as the reference antenna as an example, Ph_rx(2) can represent the phase difference between antenna 2 and antenna 1.

[0280] In some embodiments, because the method 1 performs modulo operation and trigonometric function operation on the IQ signal samples, the calculation is simple and can be applied to devices with lower computing power.

[0281] Method 2:

[0282] When the target transmitted signal is a Bluetooth CTE signal, because the Bluetooth CTE signal is transmitted on the public unlicensed 2.4GHz ISM band, in actual environments, the Bluetooth CTE signal transmitted on this band is easily interfered by other wireless signals such as Wi-Fi. In the second method, the electronic device can use the FFT algorithm to obtain the power information and phase information of the first target antenna array, because the FFT algorithm itself can extract the Bluetooth CTE signal in the frequency domain and discard other signals, thereby reducing the interference of other wireless signals such as Wi-Fi and improving the calculation accuracy.

[0283] In the second method, after obtaining the IQ sampling data of each antenna in the first target antenna array, the electronic device obtains the relative power and phase difference of each antenna in the first target antenna array according to the calculation method in Formula 2-Formula 5.

[0284] In some embodiments, the Bluetooth 5.1 standard defines that the period of a 250kHz Bluetooth CTE signal is 4us. Currently, the lengths of IQ signal sampling performed by electronic devices within the period of the Bluetooth CTE signal include 1us and 2us. Because the length of IQ signal sampling performed by electronic devices does not cover a complete period of the Bluetooth CTE signal, the electronic device cannot use the FFT algorithm to calculate the accurate power and phase based on the collected IQ signal.

[0285] In an embodiment of the present application, after the electronic device performs IQ signal sampling within the period of the Bluetooth CTE signal, data may be filled in the IQ sampling data of each antenna, so that the length of the IQ signal sampling of each antenna covers the period of the Bluetooth CTE signal, so that the electronic device can obtain the relative angle of the target based on the IQ sampling data after the data is filled. Exemplarily, the electronic device may fill the data 0 in the IQ sampling data of each antenna, so that the length of the IQ signal sampling of each antenna reaches a complete period of the Bluetooth CTE signal.

[0286] Method 3:

[0287] When transmitting, the Bluetooth CTE signal will be reflected by obstacles such as the ground and walls, forming a multipath signal. When the electronic device receives the Bluetooth CTE signal from the target, it will also receive the multipath signal. The multipath signal will interfere with the Bluetooth CTE signal, thereby affecting the angle measurement accuracy of the electronic device. In some embodiments, the electronic device can use the MUSIC algorithm to calculate the phase information and power information of the first target antenna array to eliminate the interference of the multipath signal.

[0288] In method three, the electronic device may adopt the method in method one or the method in method two to obtain the power information of the first target antenna array, and may refer to the relevant descriptions in method one and method two.

[0289] The following describes a method for an electronic device to obtain phase information and power information of a first target antenna array using a MUSIC algorithm:

[0290] After the electronic device obtains the IQ sampling data of each antenna in the first target antenna array, the IQ sampling data of the multiple antennas can be represented in a matrix form to obtain a sampling matrix X(i, num), where i can represent the number of the antenna, and num represents the number of the IQ signal sample points of the antenna. Exemplarily, different columns of the sampling matrix are different IQ signal sample points of the same antenna, and different rows are IQ signal sample points with the same number for different antennas.

[0291] The electronic device can calculate the covariance matrix R of the sampling matrix using the following formula 10:

[0292]

[0293] Where N represents the number of IQ signal samples of each antenna in the first target antenna array, X H represents the conjugate transposed matrix of the sampling matrix X. The electronic device can use formula 11 to perform eigenvalue decomposition calculation on the covariance matrix R:

[0294] R=UΛU H Formula 11

[0295] Among them, U represents the eigenvector group, each column of U corresponds to a eigenvector, U H represents the conjugate transposed matrix of U, Λ is a diagonal matrix, and the elements on the diagonal of Λ are eigenvalues.

[0296] The electronic device can arrange the eigenvalues ​​on the diagonal of Λ in descending order. Among them, on the diagonal of Λ, the larger eigenvalues ​​represent the power estimation values ​​from different signal sources, including the direct path of the line of sight and the multipath component of the non-line of sight, and the smaller eigenvalues ​​can be regarded as the estimated value of the noise variance. It should be understood that the larger eigenvalue can be understood as the eigenvalue greater than or equal to the threshold, and the smaller eigenvalue can be understood as the eigenvalue less than the threshold.

[0297] According to the eigenvalues ​​on the diagonal of Λ, the electronic device can use the following formula 12 to decompose the eigenvector U into the signal subspace U s and the noise subspace U n .

[0298] U=[U s |U n ],U s ∈C r*m ,U n ∈C r*(r-m) Formula 12

[0299] Among them, r represents the number of rows of the feature vector group U, and m represents the signal subspace U s The number of columns, C r*m represents a set of matrices with r rows and m columns, C r*(r-m) Represents a set of matrices with r rows (rm) and columns.

[0300] In this way, the electronic device can obtain the noise subspace U of the first target antenna array. n , that is, the power information and phase information of the first target antenna array.

[0301] S1402, the electronic device obtains the relative angle of the target according to the power information and phase information of the first target antenna array, the second mapping relationship, and the third mapping relationship.

[0302] In some embodiments, the power information of the first target antenna array includes: the relative power of each antenna in the first target antenna array, and the phase information of the first target antenna array includes: the phase difference of each antenna in the first target antenna array. In some embodiments, the power information and phase information of the first target antenna array can be the noise subspace U of the first target antenna array. n .

[0303] In some embodiments, the electronic device can calculate the relative power of each antenna in the first target antenna array, and the first similarity with the relative power of each antenna at each angle in the second mapping relationship, and calculate the phase difference of each antenna in the first target antenna array, and the second similarity with the phase difference of each antenna at each angle in the third mapping relationship. The electronic device can use the angle with the greatest similarity as the relative angle of the target based on the first similarity and the second similarity, and refer to the relevant description in the following method 1. It should be understood that the phase difference of each antenna at each angle in the third mapping relationship can be understood as the phase difference between each antenna in the first target antenna array and the reference antenna.

[0304] In some embodiments, the similarity may be represented by a correlation coefficient, and the following embodiments are described using the correlation coefficient as an example.

[0305] Method 1:

[0306] Referring to the description in the above method 1, the electronic device can obtain P_rx(i) and Ph_rx(i). Taking the second mapping relationship as P1(θ, antenna i) and the third mapping relationship as Ph1(θ, antenna i) as an example, the electronic device can use the following formula 13 to obtain the first correlation coefficient ρ between the relative power of each antenna in the first target antenna array and the relative power of each antenna at each angle in the second mapping relationship. Pwr (θ), and the second correlation coefficient ρ between the phase difference of each antenna in the first target antenna array and the phase difference of each antenna at each angle in the third mapping relationship Ph (θ):

[0307]

[0308] Where P_rx(i) is taken as A and P1(θ, antenna i) is taken as B. Substituting into formula 13, the first correlation coefficient ρ can be obtained. Pwr (θ). Substituting Ph_rx(i) as A and Ph1(θ, antenna i) as B into formula 13, we can get the second correlation coefficient ρ Ph (θ).

[0309] Where i represents the antenna number, N represents the number of antennas, and A i represents the i-th antenna in the first target antenna array, B i represents the i-th antenna in the second mapping relationship or the third mapping relationship. When the electronic device calculates based on formula 13, the electronic device can correspond to A according to the antenna number i. i and B i , μA represents the mean of A, σA represents the standard deviation of A, μB represents the mean of B, and σB represents the standard deviation of B.

[0310] After obtaining the first correlation coefficient and the second correlation coefficient, the electronic device can obtain the relative angle of the target according to the first correlation coefficient and the second correlation coefficient. The electronic device can calculate the weighted correlation coefficient ρ using formula 14: overall (θ):

[0311]

[0312] The first 1 / 2 in Formula 14 may represent the weight of the first correlation coefficient, and the second 1 / 2 in Formula 14 may represent the weight of the second correlation coefficient. It should be understood that the weight of the first correlation coefficient and the weight of the second correlation coefficient may also be replaced by other values, which is not limited in the present embodiment. For example, Fig.16A A schematic diagram of a first correlation coefficient between the relative power of each antenna in the first target antenna array at each angle and the relative power of each antenna in the second mapping relationship is shown in FIG.

[0313] Electronic devices can overall The angle θ corresponding to the maximum value in (θ) is taken as the relative angle of the target.

[0314] The process of the electronic device acquiring the relative angle of the target in the first method can be as follows: Fig. 14B shown.

[0315] Method 2:

[0316] Referring to the above method 2, the electronic device can also obtain P_rx(i) and Ph_rx(i), and the electronic device can obtain the relative angle of the target according to the method in method 1.

[0317] The process of the electronic device obtaining the relative angle of the target in the second method can be as follows: Fig. 14C shown.

[0318] Method 3:

[0319] Referring to the above method 3, the electronic device can obtain the noise subspace U n , the electronic device can use the following formula 15, according to the steering matrix α(θ) of the first antenna array, and the noise subspace U n , calculate the multiple signal classification (MUSIC) pseudo-spectrum P of the first target antenna array at each angle MU (θ):

[0320]

[0321] In some embodiments, the electronic device may MUThe angle corresponding to the maximum value in (θ) is taken as the relative angle of the target.

[0322] For example, Figure 6B As shown in the second posture, the electronic device can MU The angle corresponding to the maximum value in (θ) is taken as the relative angle of the target.

[0323] In some embodiments, in some postures of the electronic device, such as Figure 6B In the postures 1 and 3 shown in FIG, current electronic devices cannot distinguish whether the target is located on the front or back of the electronic device. Figure 3B As shown, when the electronic device is in posture one, the electronic device cannot distinguish whether the target is on the front or back of the electronic device, such as being unable to distinguish whether the target is at position A or position B. In an embodiment of the present application, when the electronic device is in posture one and posture three, referring to the above method three, the electronic device can obtain P_rx(i), referring to formula 13 in method one, the electronic device can obtain the first correlation coefficient according to P_rx(i) and the second mapping relationship. The electronic device can obtain the relative angle of the target according to the first similarity and the MUSIC pseudo-spectrum, and can refer to the relevant description in the following method three.

[0324] In some embodiments, gesture one and gesture three may be used as preset gestures of the electronic device, and gesture two may be used as a non-preset gesture.

[0325] In this example, the MUSIC pseudo-spectrum obtained by the electronic device using the MISIC algorithm cannot distinguish angles in the symmetrical intervals of 0-180° and 180-360°, such as being unable to distinguish 90° in the 0-180° interval and 270° in the 180-360° interval, resulting in the electronic device being unable to accurately obtain the relative angle of the target.

[0326] In the embodiment of the present application, the electronic device can obtain the relative angle of the target according to the first correlation coefficient and the MUSIC pseudo spectrum. Fig. 16B A schematic diagram of a MUSIC pseudo spectrum provided in an embodiment of the present application. Fig. 16B , P in MUSIC pseudo-spectrum MUThe maximum values ​​of (θ) include two, which are at 50° and 310° respectively. If only based on the MUSIC pseudo-spectrum, the electronic device cannot determine whether the relative angle of the target is 50° or 310°. In an embodiment of the present application, the electronic device can obtain the maximum value in the first correlation coefficient, and determine the angle corresponding to the maximum first correlation coefficient, and the angle interval to which the angle corresponding to the maximum first correlation coefficient belongs. Among them, if the interval to which the angle corresponding to the maximum first correlation coefficient belongs is 0-180°, the electronic device can use 50°, which belongs to 0-180°, as the relative angle of the target. If the interval to which the angle corresponding to the maximum first correlation coefficient belongs is 180-360°, the electronic device can use 310°, which belongs to 180-360°, as the relative angle of the target.

[0327] Among them, the process of the electronic device obtaining the relative angle of the target in the third method can be as follows: Fig.14D It should be understood that Fig.14D The dotted line in the figure represents that “according to P_rx(i) and the second mapping relationship, the first correlation coefficient can be obtained”. This step is an optional step.

[0328] In the embodiment of the present application, the electronic device measures the angle by combining the phase difference and relative power of the signal received by the antenna, thereby achieving a combination of amplitude and phase, which can complement each other, distinguish whether the target is on the front or back of the electronic device, and achieve accurate angle measurement.

[0329] In addition, because the test device in the embodiment of the present application can pre-acquire the second mapping relationship and the third mapping relationship under different postures, when the electronic device actually measures the angle, it can achieve accurate angle measurement by performing similarity comparison with the relative power and phase difference at each angle in the second mapping relationship and the third mapping relationship through any one of methods one to three. In the embodiment of the present application, there is no need to limit the center distance between two adjacent antennas in the electronic device to be less than half a wavelength.

[0330] In some embodiments, in order to ensure the accuracy of the second mapping relationship and the third mapping relationship under different postures acquired in advance, the center distance between at least two antennas in the electronic device can be set to be less than half a wavelength. There is no need to limit the center distance between other antennas, thereby ensuring the angle measurement accuracy of the electronic device.

[0331] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0332] In some embodiments, the present application also provides an electronic device, which can implement the angle measurement method based on the arrival angle described in the above embodiments. Fig.17 , the electronic device may include: a processor 1701 (such as a CPU), and a memory 1702. The memory 1702 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory. The memory 1702 may store various instructions for completing various processing functions and implementing the method steps of the present application.

[0333] Optionally, the electronic device involved in the present application may further include: a power supply 1703, a communication bus 1704 and a communication port 1705. The above-mentioned communication port 1705 is used to realize the connection and communication between the electronic device and other peripherals. In the embodiment of the present application, the memory 1702 is used to store computer executable program code, and the program code includes instructions; when the processor 1701 executes the instruction, the instruction causes the processor 1701 of the electronic device to perform the action in the above-mentioned method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0334] Optionally, the electronic device involved in the present application may further include: a display screen 1706. The display screen 1706 is used to display an interface of the electronic device.

[0335] It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes, such as a controller. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0336] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0337] The term "plurality" in this article refers to two or more than two. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0338] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0339] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

Claims

1. A method for measuring angle based on arrival angle, characterized in that: Applied to electronic equipment, the method comprises: When the electronic device is in a first posture, a first target antenna array corresponding to the first posture is used to receive a signal from a target, wherein the first target antenna array includes at least two antennas, wherein the directions in which the gain of each antenna is greater than or equal to a gain threshold are different; The relative angle of the target is acquired according to the phase information and power information of the signal received by the first target antenna array.

2. The method according to claim 1, characterized in that The method further comprises: When the electronic device is in a second posture, switching to a second target antenna array corresponding to the second posture, and using the second target antenna array to receive a signal from the target, the second target antenna array includes at least two antennas, wherein the directions in which the gain of each antenna is greater than or equal to the gain threshold are different; The relative angle of the target is acquired according to the phase information and power information of the signal received by the second target antenna array.

3. The method according to claim 1 or 2, characterized in that: The directions in which the gain in the first target antenna array is greater than or equal to the gain threshold cover 360°.

4. The method according to any one of claims 1 to 3, characterized in that The polarization directions of the antennas in the first target antenna array are the same; or, The polarization directions of the antennas in the first target antenna array that are arranged on the frame of the electronic device are the same.

5. The method according to any one of claims 1 to 4, characterized in that The electronic device includes a plurality of antennas, wherein the plurality of antennas include a switchable antenna, and the switchable antenna is arranged on a frame of the electronic device.

6. The method according to claim 5, characterized in that The plurality of antennas further include a non-switchable antenna, and the non-switchable antenna is disposed at at least one of the following positions: the frame, below the screen of the electronic device, and above the screen.

7. The method according to claim 6, characterized in that The multiple antennas include a first antenna, a second antenna, a third antenna, a fourth antenna, and a fifth antenna, the first antenna, the third antenna, and the fifth antenna are non-switchable antennas, and the second antenna and the fourth antenna are switchable antennas; The second antenna and the fourth antenna are arranged at adjacent frames of the electronic device, the first antenna and the fifth antenna are arranged at adjacent frames of the electronic device, and the third antenna is arranged below the screen.

8. The method according to any one of claims 5 to 7, characterized in that: The switchable antenna includes a slot antenna and a wire antenna.

9. The method according to claim 8, characterized in that The slot antenna and the linear antenna in the switchable antenna share one antenna structure.

10. The method according to any one of claims 1 to 9, characterized in that Before the first target antenna array corresponding to the first posture receives a signal from the target, the method further includes: According to a first mapping relationship between posture and antenna array, the first target antenna array corresponding to the first posture is determined.

11. The method according to claim 7, characterized in that When the first posture is: the screen of the electronic device is perpendicular to a horizontal plane, and the screen of the electronic device is horizontal, the first target antenna array includes: the first antenna, the third antenna, a linear antenna in the second antenna, and a slot antenna in the fourth antenna; When the first posture is: the screen of the electronic device is parallel to a horizontal plane, the first target antenna array includes: the first antenna, the fifth antenna, a linear antenna in the second antenna, and a linear antenna in the fourth antenna; When the first posture is: the screen of the electronic device is perpendicular to the horizontal plane, and the electronic device is a vertical screen, the first target antenna array includes: the third antenna, the fifth antenna, the slot antenna in the second antenna, and the wire antenna in the fourth antenna.

12. The method according to any one of claims 5 to 9, characterized in that: There are at least two antennas among the multiple antennas whose center distance is less than or equal to half the wavelength of the signal.

13. The method according to any one of claims 1 to 12, characterized in that The power information includes: relative power of a signal received by each antenna in the first target antenna array; The phase information includes: a phase difference between a signal received by each antenna in the first target antenna array and a signal received by a reference antenna, and the reference antenna is any antenna in the first target antenna array.

14. The method according to claim 13, characterized in that The reference antenna corresponds to the first posture.

15. The method according to claim 13 or 14, characterized in that The method further comprises: A noise subspace is obtained according to the signal received by the first target antenna array, where the noise subspace is used to characterize the phase information and the power information.

16. The method according to claim 13 or 14, characterized in that The second mapping relationship corresponding to the first posture includes: the relative power of the signal received by each antenna at each angle, and the third mapping relationship corresponding to the first posture includes: the phase difference between the signal received by each antenna at each angle and the signal received by the reference antenna; The acquiring the relative angle of the target according to the phase information and the power information of the signal received by the first target antenna array comprises: Obtaining a first similarity between a relative power of a signal received by each antenna in the power information and a relative power of a signal received by each antenna at each angle; Obtaining a second similarity between a phase difference between a signal received by each antenna and a signal received by a reference antenna in the phase information and a phase difference between a signal received by each antenna and a signal received by the reference antenna at each angle; The relative angle of the target is acquired according to the first similarity and the second similarity corresponding to the angles.

17. The method according to claim 15, characterized in that The steering matrix of the first target antenna array corresponding to the first posture is used to characterize: the relative power of the signal received by each antenna at each angle, and the phase difference between the signal received by each antenna and the signal received by the reference antenna; The acquiring the relative angle of the target according to the phase information and the power information of the signal received by the first target antenna array comprises: According to the steering matrix and the noise subspace, a multiple signal classification algorithm MUSIC algorithm is used to obtain a MUSIC pseudo spectrum; The relative angle of the target is acquired according to the MUSIC pseudo spectrum.

18. An electronic device, characterized in that: include: Processor and memory; The memory stores computer instructions; The processor executes the computer instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 17.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the method according to any one of claims 1 to 17 is implemented.