Antenna rotation control method and related device

By performing rotation and sensor compensation before each rotation of the router antenna, the problem of cumulative antenna angle error is solved, improving the transmission and coverage of wireless network signals and enhancing the user experience.

CN119828770BActive Publication Date: 2026-02-03HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311288582.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2026-02-03
Estimated Expiration
2043-10-07

AI Technical Summary

Technical Problem

After repeated rotations, the router antenna accumulates angular errors, resulting in inaccurate wireless network signal transmission and coverage, which affects the user's internet experience.

Method used

By performing a cyclone before each drive antenna rotation, the angular error of the previous rotation is eliminated, and the actual angle sensed by the sensor is used to compensate for the rotation, ensuring that the angular error remains within the range of one rotation, thus improving the rotation accuracy.

Benefits of technology

It effectively reduces the accumulation of angle errors, improves the coverage and quality of wireless network signals, and enhances the user's internet experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828770B_ABST
    Figure CN119828770B_ABST
Patent Text Reader

Abstract

The application provides an antenna rotation control method and related equipment, and relates to the technical field of communication equipment. The antenna rotation control method comprises the following steps: receiving an antenna rotation instruction, wherein the antenna rotation instruction comprises a first rotation angle; obtaining a previous rotation angle of the last rotation of the antenna; determining a second rotation angle of the current rotation of the antenna based on the first rotation angle and the previous rotation angle; determining a third rotation angle of the rotation of the antenna based on the previous rotation angle; driving the rotation of the antenna based on the third rotation angle; and driving the rotation of the antenna based on the second rotation angle in the case that the rotation is completed. According to the method, the rotation is performed once before the antenna is driven to rotate each time, and the angle of the rotation is the last rotation angle of the antenna, so that the accumulation of the angle error can be avoided, the angle error is kept at the level of one rotation, and the accuracy of the rotation position of the antenna is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of communication devices, and in particular to an antenna rotation control method and related devices. BACKGROUND

[0002] To realize the intercommunication between different networks, routers are widely used in daily life scenes. Since the antenna is arranged outside the router host, which has the advantage of strong anti-interference, most of the routers on the market have external antennas. The router can forward wireless or wired broadband network signals to nearby wireless network devices (such as notebook computers, mobile phones, tablet computers, smart televisions, wireless routers, etc.) through the antenna, realizing the coverage of wireless signals.

[0003] To realize the adjustment of the angle of the antenna, in the related art, the router can drive the antenna to rotate by setting a motor. For example, the user can control the rotation of the antenna of the router through an application (APP) installed on the mobile phone. When the antenna of the router rotates, an error in the rotation angle can be caused due to a software reason (for example, there is a difference between the theoretical value and the actual value of the number of pulse width modulation (PWM) signals driving the motor) or a hardware reason (for example, there is a meshing gap between the rotating shaft of the motor and the gear driving the antenna to rotate). After the antenna rotates for many times, a large cumulative error in the angle can be caused, and then when the antenna is controlled to rotate subsequently, there is a large difference between the actual rotation angle of the antenna and the expected rotation angle. SUMMARY

[0004] In view of the above, it is necessary to provide an antenna rotation control method and related devices, which can solve the problem that the cumulative error in the angle caused after the antenna rotates for many times leads to inaccurate rotation position of the antenna, thereby affecting the transmission and coverage range of the wireless network signal.

[0005] In a first aspect, the present application provides an antenna rotation control method applied to a network device, the network device comprising a rotatable antenna, the antenna rotation control method comprising: receiving an antenna rotation instruction, the antenna rotation instruction comprising a first rotation angle; obtaining a previous rotation angle of a previous rotation of the antenna; determining a second rotation angle of the current rotation of the antenna based on the first rotation angle and the previous rotation angle; determining a third rotation angle of a back rotation of the antenna based on the previous rotation angle; driving the back rotation of the antenna based on the third rotation angle; and driving the rotation of the antenna based on the second rotation angle in the case where the back rotation ends.

[0006] The above technical solution is adopted, before driving the antenna to rotate each time, one rotation is performed, the rotation angle of the antenna rotation is the rotation angle of the last time of antenna rotation, the accumulation of angle error can be avoided, the angle error is kept at the level of one rotation, the error caused by the inaccuracy of the number of Pulse Width Modulation (PWM) signals or the gear meshing gap of the motor is reduced, the accuracy of the antenna rotation position is improved, so that the problem that the antenna rotation position is inaccurate due to the angle accumulation error of the antenna after multiple rotations, and the transmission and coverage range of the wireless network signal are affected can be solved, the coverage range and quality of the wireless network signal of the network equipment can be improved, and the online experience of the user is improved.

[0007] In a possible implementation, after driving the antenna to rotate based on the second rotation angle, the method further includes: determining, based on the second rotation angle, a previous rotation angle that the antenna needs to follow in the next rotation.

[0008] The above technical solution is adopted, the previous rotation angle that the antenna needs to follow in the next rotation is updated based on the second rotation angle, so that when the antenna is rotated next time, the rotation can be performed based on the updated rotation angle of the last time of rotation, the rotation angle of the antenna rotation is ensured to be the rotation angle of the last time of antenna rotation at all times, and the accumulation of angle error can be avoided, and the angle error is kept at the level of one rotation.

[0009] In a possible implementation, the previous rotation angle of the antenna in the last rotation is is represented as: represents the previous rotation direction of the antenna in the last rotation, represents the previous rotation angle of the antenna in the last rotation, and the third rotation angle is represented as: and have opposite directions; the first rotation angle is represented as: is the pre-rotation direction of the antenna in this rotation, is the pre-rotation angle of the antenna in this rotation, and the second rotation angle is obtained through the following formula:

[0010]

[0011] is the actual rotation angle of the antenna in this rotation, wherein

[0012] or

[0013] The angle of rotation is the same as the previous rotation angle of the previous rotation process, and the rotation direction is opposite, and after the rotation is completed, the rotation angle of the current rotation process is the sum of the previous rotation angle of the previous rotation process and the rotation angle of the current planned rotation, thereby avoiding the accumulation of angle errors and keeping the angle error at the level of one rotation.

[0014] In a possible implementation, the network device is further provided with a to-be-tested component that rotates synchronously with the antenna, and a sensor for sensing position information of the to-be-tested component, and driving the antenna to rotate based on the second rotation angle includes: driving the antenna to rotate based on the second rotation angle, and acquiring first sensing data of the sensor; in the case that the antenna ends the rotation, determining an actual rotation angle of the antenna based on the first sensing data; determining a compensation rotation angle based on a difference between the actual rotation angle and the second rotation angle; and driving the antenna to rotate based on the compensation rotation angle.

[0015] In the above technical solution, the actual rotation angle of the antenna is acquired through cooperation between the sensor and the magnet during driving the antenna to rotate, and compensation rotation is performed according to the difference between the actual rotation angle and the theoretical rotation angle, so that the angle error existing in the process of rotating the antenna can be further reduced, and the accuracy of the antenna rotation is improved.

[0016] In a possible implementation, driving the antenna to rotate based on the third rotation angle includes: driving the antenna to rotate based on the third rotation angle, and acquiring second sensing data of the sensor; in the case that the antenna ends the rotation, determining an actual rotation angle of the antenna based on the second sensing data; determining a compensation rotation angle based on a difference between the actual rotation angle and the third rotation angle; and driving the antenna to rotate based on the compensation rotation angle.

[0017] In the above technical solution, the actual rotation angle of the antenna is acquired through the sensor during driving the antenna to rotate, and compensation rotation is performed according to the difference between the actual rotation angle and the theoretical rotation angle, so that the angle error existing in the process of rotating the antenna can be further reduced, and the accuracy of the antenna rotation is improved.

[0018] In a possible implementation, the antenna rotation control method further includes: in the case that the antenna is driven to rotate, determining the rotation angle of the antenna based on the first sensing data every preset time; and in the case that the determined rotation angle of the antenna within the preset time is less than a preset angle, stopping driving the antenna to rotate.

[0019] According to the technical scheme, in the case that the antenna is driven to rotate, the rotation angle of the antenna is detected every preset time, and in the case that the rotation angle of the antenna in the preset time is less than the preset angle, it is considered that the motor rotation is abnormal, for example, the abnormal scene of motor locking or human / objects blocking, and the driving of the antenna rotation is stopped, so as to avoid damaging the parts of the motor and prolong the service life of the motor.

[0020] In a second aspect, the application provides an antenna rotation control method applied to a network device, the network device comprising a rotatable antenna, a to-be-tested member capable of rotating synchronously with the antenna, and a sensor for sensing position information of the to-be-tested member, the antenna rotation control method comprising: receiving an antenna rotation instruction, the antenna rotation instruction comprising a first rotation angle; driving the antenna to rotate based on the first rotation angle, and acquiring sensing data of the sensor; in the case that the antenna ends rotating, determining an actual rotation angle of the antenna based on the sensing data; determining a second rotation angle based on a difference between the actual rotation angle and the first rotation angle; and driving the antenna to rotate based on the second rotation angle.

[0021] According to the technical scheme, in the process of antenna rotation, the actual rotation angle of the antenna is acquired by the sensor, and the antenna is compensated to rotate according to the difference between the actual rotation angle and the theoretical rotation angle, so as to compensate the angle error existing in the antenna rotation, improve the accuracy of the antenna rotation position, and solve the problem that the antenna rotation position is inaccurate due to the angle cumulative error after the antenna rotates for many times, and affect the transmission and coverage range of the wireless network signal, so as to improve the coverage range and quality of the wireless network signal of the network device and improve the online experience of users.

[0022] In a possible implementation manner, the to-be-tested member is a magnet, and the sensor is a magnetometer, and the acquisition of the sensing data of the sensor comprises: acquiring three-axis coordinate data of the magnet sensed by the magnetometer in the coordinate system of the magnetometer; the determination of the actual rotation angle of the antenna based on the sensing data comprises: selecting two-axis coordinate data representing the rotation of the magnet from the three-axis coordinate data, and determining the rotation angle of the magnet based on the two-axis coordinate data; and taking the rotation angle of the magnet as the actual rotation angle of the antenna.

[0023] According to the technical scheme, the magnet can rotate synchronously with the antenna, the rotation angle of the magnet is sensed by the magnetometer, the rotation angle of the magnet is taken as the actual rotation angle of the antenna, the actual rotation angle of the antenna is acquired, and since the magnet rotates in a two-dimensional plane, only the coordinate data of two axes of the three-axis coordinate data sensed by the magnetometer changes greatly, and the coordinate data of the other axis remains basically unchanged, the two-axis coordinate data representing the rotation of the magnet is selected from the three-axis coordinate data, and the rotation angle of the magnet is calculated based on the two-axis coordinate data, so as to reduce the complexity of angle calculation.

[0024] In a possible implementation, the rotation angle of the magnet is calculated based on the two-axis coordinate data, including: performing linear fitting processing on the two-axis coordinate data, and obtaining the starting two-axis coordinate and the ending two-axis coordinate of the magnet rotating in the magnetometer coordinate system based on the linear fitting result; converting the starting two-axis coordinate and the ending two-axis coordinate of the magnet in the magnetometer coordinate system into the starting two-axis coordinate and the ending two-axis coordinate in a target coordinate system, and the target coordinate system is a two-dimensional coordinate system constructed based on the plane where the magnet is located; and obtaining the rotation angle of the magnet based on the starting two-axis coordinate and the ending two-axis coordinate of the magnet in the target coordinate system.

[0025] According to the technical solution, the two-axis coordinate data of the magnet in the magnetometer coordinate system can be accurately obtained by performing linear fitting processing on the two-axis coordinate data, and the two-axis coordinate data in the magnetometer coordinate system can be converted to the two-axis coordinate data in the two-axis coordinate system constructed based on the plane where the magnet is located, so that the rotation angle of the magnet can be quickly calculated subsequently.

[0026] In a possible implementation, the antenna rotation control method further includes: in the case of driving the antenna to rotate, determining the rotation angle of the antenna based on the sensing data every preset time; and in the case of determining that the rotation angle of the antenna in the preset time is less than a preset angle, stopping driving the antenna to rotate.

[0027] According to the technical solution, in the case of driving the antenna to rotate, the rotation angle of the antenna is detected every preset time, and in the case of determining that the rotation angle of the antenna in the preset time is less than a preset angle, it is considered that the motor rotation is abnormal, for example, the abnormal scene of motor locking or human / objects blocking, and driving the antenna to stop rotating, so as to avoid damaging the parts of the motor and prolong the service life of the motor.

[0028] In a third aspect, the present application provides a network device, the network device comprising a memory and a processor; the memory is used to store program instructions; the processor is used to read the program instructions stored in the memory to implement the antenna rotation control method of the first aspect or the second aspect.

[0029] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor to implement the antenna rotation control method of the first aspect or the second aspect.

[0030] In a fifth aspect, the present application provides a chip coupled with a memory in a network device, and the chip is used to control the network device to execute the antenna rotation control method of the first aspect or the second aspect.

[0031] Furthermore, the technical effects brought about by the third to fifth aspects can be found in the descriptions of the methods in the above-mentioned method section, and will not be repeated here. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of the structure of a driver device in a router according to an embodiment of this application;

[0033] Figure 2 A schematic diagram illustrating the process of a router rotating its antenna according to an embodiment of this application;

[0034] Figure 3 This is a schematic diagram illustrating the process of a router implementing rotation angle error compensation based on a magnetometer according to an embodiment of this application;

[0035] Figure 4 A schematic diagram illustrating an unreachable region of an antenna during rotation, provided in an embodiment of this application.

[0036] Figure 5 A schematic diagram illustrating the process of a router responding to abnormal scenarios according to an embodiment of this application;

[0037] Figure 6 This is a flowchart of an antenna rotation control method provided in another embodiment of this application;

[0038] Figure 7 This is a flowchart of an antenna rotation control method provided in another embodiment of this application;

[0039] Figure 8 This is a schematic diagram illustrating an application scenario of an antenna rotation control method provided in another embodiment of this application;

[0040] Figure 9 This is a hardware architecture diagram of a router provided in one embodiment of this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0042] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, words such as "exemplary," "or," and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary," "or," and "for example" is intended to present the relevant concepts in a concrete manner.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. "At least one" means one or more. "More than one" means two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c. It should be understood that the order of steps shown in the flowcharts herein can be changed, and some can be omitted.

[0044] To facilitate user adjustment of router antenna direction and ensure optimal signal reception for wireless network devices, existing routers support receiving user-issued antenna rotation commands to drive a motor and adjust the antenna's direction. For example, a user can issue an antenna rotation command via an application installed on a terminal device (e.g., a mobile phone). The router receives the command and drives the motor to adjust the antenna's direction accordingly. The antenna rotation command may include the antenna's rotation direction and angle. Each antenna rotation may introduce angular rotation errors due to software or hardware limitations. After multiple rotations, a significant cumulative angular error may occur, leading to a large difference between the actual and desired angle of antenna rotation during subsequent control. Software issues may include discrepancies between the theoretical and actual values ​​of the pulse width modulation (PWM) signal output based on the antenna rotation command. Hardware issues may include gaps in the meshing between the motor shaft and the gear driving the antenna rotation.

[0045] To address the aforementioned technical problems, this application provides an antenna rotation control method. This method cancels out the previous angle rotation error each time the drive motor adjusts the antenna angle and direction before driving the antenna to rotate. This avoids cumulative angle errors and keeps the angle error within the range of a single rotation error, improving the accuracy of antenna rotation. This, in turn, enhances the transmission and coverage of the wireless network signal of the network device, thereby improving the user's internet experience.

[0046] The antenna rotation control method provided in this application can be applied to routers or other network devices that require antenna rotation; this application does not limit its application in this regard. The router involved in this application can be an outdoor wireless router or an indoor home wireless router. The router can support at least one of the following general frequency bands: Wi-Fi 2.4G band, 5G band, Wi-Fi-6E band, and above; this application does not specifically limit its application in this regard.

[0047] like Figure 1 As shown, the router includes an antenna 10, a drive device 20, and a controller 30. The controller 30 controls the drive device 20 to operate or not operate. The drive device 20 drives the antenna 10 to rotate. For example, the controller 30 can output a PWM signal to the drive device 20 based on a received antenna rotation command, and the drive device 20 drives the antenna 10 to rotate based on the PWM signal. The controller 30 may include a control chip and a PWM controller. The PWM controller generates the PWM signal based on the control signal output by the control chip. In other embodiments, the PWM signal can also be generated directly by the control chip. The control chip can be a central processing unit (CPU), a microcontroller unit (MCU), a programmable logic device (PLD), etc.

[0048] The drive unit 20 includes a motor, which can be a motor with a speed reducer or a motor without a speed reducer. The types of motors include, but are not limited to, servo motors, stepper motors, torque motors, switched reluctance motors, and brushless DC motors. The motor can drive the antenna 10 to rotate around axis L1.

[0049] For example, the output shaft of the motor can be directly connected to the antenna 10, that is, without the need for a transmission device, the motor can also be connected to the antenna 10 through a transmission device. Figure 1The illustration shows the motor connected to the antenna 10 via a transmission device. The transmission device may include a driving gear and a driven gear, or a driving gear and a gear disc; this application does not limit the specific structure of the transmission device. For example, the driving gear is fixedly connected to the output shaft of the motor, and the driven gear / gear disc is fixedly connected to the antenna 10, thereby enabling the antenna to rotate via the motor.

[0050] As mentioned above, after multiple rotations, an antenna may accumulate significant angular error. The problem with angular error accumulation lies mainly in the "accumulation" aspect. If the angular error from the previous rotation can be canceled out each time the antenna is driven to rotate, the angular error will always remain at the level of a single rotation error, preventing the "accumulation" effect. Antenna rotation mainly involves two parameters: rotation direction and rotation angle.

[0051] Assume that the rotation angle of antenna 10 is defined as θ. d,a θ d,a =(θ d ,θ a ), where θ d θ represents the direction of rotation. a Let θ be the rotation angle. a Satisfying the equation: 0°≤θ a ≤360°, θ d The range of values ​​for can be defined as follows:

[0052]

[0053] In some embodiments, when the router receives an antenna rotation command for controlling antenna rotation, the router can convert the antenna rotation command into a rotation angle based on a preset antenna control algorithm and send it to the motor drive. The motor drive then drives the motor to rotate the antenna based on the rotation angle, so that the antenna 10 rotates in the rotation direction defined in the rotation angle, and the angle of antenna rotation is the rotation angle defined in the rotation angle. The preset antenna control algorithm can be executed by the controller 30. This antenna control algorithm can be an existing control algorithm for driving antenna rotation, and this embodiment of the application does not limit it.

[0054] like Figure 2 As shown, the operating system deployed on the router is divided into an application layer and a kernel layer. The kernel layer can communicate with the hardware layer. The application layer can include a series of application software, such as the first software used to control the antenna rotation, which can execute the antenna control algorithm. The kernel layer is the layer between the hardware and software. The kernel layer contains at least the motor driver. The kernel layer is the core of the router's operating system, providing the most basic functions of the operating system and forming the basis for its operation. The hardware layer consists of the router's hardware, which includes at least the motor.

[0055] In a single process of driving an antenna rotation, the first software at the application layer can obtain the rotation angle to be sent in this rotation process by executing an antenna control algorithm, and then send the rotation angle to the motor driver at the kernel layer. The motor driver drives the motor to rotate the antenna based on the rotation angle sent by the application layer. The first software can record the rotation angle sent each time.

[0056] To avoid angular accumulation errors and improve the accuracy of antenna rotation, in a single process of driving the antenna to rotate, we assume and define... This indicates the rotation angle pre-issued by the antenna control algorithm in this rotation process. This can be obtained based on the antenna rotation command received by the router this time. This indicates the angle of rotation of the antenna in the previous rotation process. This can be obtained based on the rotation angle recorded by the first software. For example, the previous rotation angle of the antenna in the last rotation process is the rotation angle required for the previous rotation process issued by the first software. This indicates the angle by which the antenna needs to rotate during this rotation process. All are referenced to θ d,a Defined parameters, i.e. Both include the direction of rotation and the angle of rotation.

[0057] Before driving the antenna to rotate, the controller 30 can, according to and Correct the current angle error and calculate Based on The antenna is driven to rotate, thus eliminating the angular error caused by the previous antenna rotation. The specific implementation scheme is as follows:

[0058] (1) Drive antenna rotation

[0059] The motor is made to rotate, compensating for the error caused by the previous rotation. The rotation angle is... Controller 30 can be based on Calculated in This represents the direction of antenna rotation during the previous rotation process. To and In the opposite direction, This represents the rotation angle of the antenna during the previous rotation process.

[0060] In obtaining Then, the rotation angle driven by the motor is... The drive antenna is rotated back to the starting position of the previous rotation process, which is also the position after the previous rotation process ended.

[0061] (2) Drive the antenna to rotate

[0062] Controller 30 can be based on and Calculated in, This refers to the rotation direction pre-issued by the antenna control algorithm during this rotation process. This refers to the rotation angle pre-issued by the antenna control algorithm during this rotation process. It can be represented as:

[0063] The absolute value of.

[0064] In obtaining Next, the required rotation angle for this rotation process is sent to the motor drive. The driving antenna starts rotating from its current position (the position after the rotation ends as described in (1) above), with the rotation direction being... Rotation angle is and will Updated to This ensures that in the next antenna rotation process, the antenna rotation angle is...

[0065] In some embodiments, if the router's antenna is undergoing its first rotation, since there is no previous rotation process, the first rotation does not involve antenna return, and it can be directly based on... To rotate, and to Updated to

[0066] By employing the aforementioned rotation compensation method, a rotation is performed before each antenna rotation. The rotation angle of this rotation is the same as the previous antenna rotation angle. This avoids the accumulation of angle errors, reduces the counting error of the PWM signal, and keeps the angle error within the range of one rotation. Due to software and / or hardware limitations, the angle errors of rotations at the same angle but in different directions may not be completely consistent. The aforementioned rotation compensation method may result in an angle error exceeding the range of one rotation. However, compared to the existing method of directly rotating based on the rotation angle issued by the antenna control algorithm each time, the error after rotation compensation is still significantly reduced, effectively lowering the magnitude of accumulated angle errors.

[0067] While the aforementioned rotation compensation method can effectively reduce the magnitude of accumulated angle error, the angle error may still increase after the router has rotated multiple times. To address this issue, this application also proposes a hardware-based angle error compensation scheme.

[0068] Specifically, the first software (the software used to control the antenna rotation) records the rotation angle and direction of each antenna rotation, and then calculates the theoretical angular offset of the antenna's position point relative to a reference point. The reference point can be the antenna's starting position point in this rotation, or a fixed position point on the router. Then, the sensor obtains the actual angular offset of the antenna's position point relative to the reference point and feeds it back to the first software. The first software can then compensate for the rotation based on the difference between the theoretical and actual offset, thereby compensating for the angular error of the rotation and improving the accuracy of the antenna rotation.

[0069] For example, the sensor is a magnetometer, and the transmission device includes a drive gear and a geared disc. The drive gear is fixedly connected to the output shaft of the motor, and the geared disc is fixedly connected to the antenna 10. The motor drives the geared disc to rotate through the drive gear. The geared disc can be mounted on a turntable, and the turntable can rotate relative to the router's main body as the geared disc rotates. A magnet can be embedded in the turntable. The shape of the magnet is not limited in this application; for example, it can be a square magnet or a round magnet. The size of the magnet can be set according to the actual magnetic force detection requirements, and it must be able to be easily embedded in the turntable. The magnet can rotate with the turntable, that is, the magnet rotates synchronously with the antenna. The magnetometer can be fixedly mounted on the router's main body and kept at a certain distance from the turntable, and it will not rotate with the turntable. This distance can be set according to the actual magnetic force detection requirements, and this application embodiment does not limit this.

[0070] In one process of driving the antenna to rotate, the controller 30 can send a first motor drive signal to the drive device 20 based on the received antenna rotation command. The drive device 20 drives the antenna 10 to rotate based on the first motor drive signal. The magnet can follow the rotation of the turntable, and the distance between the magnetometer and the turntable changes. The magnetometer can sense different magnetic field strengths. For example, the magnetometer can detect magnetic field data on the X, Y, and Z axes. The magnetometer can convert the three-axis magnetic field data into X, Y, and Z axis coordinate data in the magnetometer coordinate system and feed it back to the controller 30. The controller 30 can calculate the actual rotation angle of the antenna 10 based on the X, Y, and Z axis coordinate data, and compare the actual rotation angle with the theoretical rotation angle to calculate the angle difference between the actual and theoretical rotation angles. The theoretical rotation angle can refer to the rotation angle specified by the antenna rotation command. For example, if a user sends an antenna rotation command of 30° clockwise to the router via a mobile APP, the theoretical rotation angle is a 30° clockwise rotation. The controller 30 can send a second motor drive signal to the drive device 20 based on the calculated angle difference, so that the drive device 20 can drive the antenna 10 to perform angle difference compensation rotation based on the second motor drive signal.

[0071] like Figure 3As shown, the kernel layer includes motor drivers and magnetometer drivers, while the hardware layer includes motors and magnetometers.

[0072] When the router receives an antenna rotation command, the first software at the application layer can execute an antenna control algorithm to obtain the first rotation angle to be sent in this rotation process, and then send the first rotation angle to the motor driver at the kernel layer. The motor driver, based on the first rotation angle sent from the application layer, drives the motor to rotate the antenna 10. The magnet can rotate along with the disk.

[0073] The magnetometer located at the hardware layer can detect the magnetic field data of the magnet along the X, Y, and Z axes as the magnet rotates with the disk, and convert this magnetic field data into X, Y, and Z axis coordinate data, which is then fed back to the magnetometer driver located at the kernel layer. The magnetometer driver transmits the X, Y, and Z axis coordinate data to the first software located at the application layer. The first software can calculate the rotation angle of the magnet based on the X, Y, and Z axis coordinate data, and the rotation angle of the magnet is the actual rotation angle of antenna 10.

[0074] In some embodiments, the turntable rotates in a two-dimensional plane, meaning the magnet also rotates in a two-dimensional plane. The magnetic field data detected by the magnetometer along the X, Y, and Z axes show significant changes in only two axes, while the magnetic field data on the third axis remains essentially constant. These two axes can be any two of the X, Y, and Z axes, depending on the magnetometer's installation position and the definition of its coordinate system; this application does not impose any limitations on this. Assuming the two axes with significant magnetic field changes are the X and Y axes, the first software can calculate the actual rotation angle of the antenna 10 based on the coordinate data of the X and Y axes.

[0075] For example, a turntable coordinate system can be constructed using the surface of the turntable (the plane where the magnet is located). The X and Y axis coordinate data of the magnet in the magnetometer coordinate system can be converted to the turntable coordinate system. Then, the rotation angle of the magnet can be obtained based on the coordinates in the turntable coordinate system, which is the actual rotation angle of the antenna 10.

[0076] In some embodiments, the first software can also perform linear fitting on the X and Y axis coordinate data in the magnetometer coordinate system, and determine the coordinates of the magnet at the start and end of rotation based on the linear fitting results. This facilitates the subsequent conversion of the coordinates of the start and end of rotation to the turntable coordinate system to obtain the rotation angle of the magnet. Linear fitting can refer to the process of seeking the optimal k (slope) and b (intercept) values ​​based on multiple sets of X and Y axis coordinate data (coordinate data sensed by the magnetometer from the start to the end of the magnet's rotation). For example, after determining the k and b values, the start and end points of the straight line determined by k and b can be used as the coordinates of the magnet at the start and end of rotation.

[0077] After obtaining the actual rotation angle of antenna 10, the first software located at the application layer can compare the actual rotation angle with the theoretical rotation angle to obtain the angle difference between the actual and theoretical rotation angles. Based on the angle difference, the first software can send a second rotation angle to the motor driver located at the kernel layer. The motor driver, based on the second rotation angle sent from the application layer, drives the motor to rotate antenna 10 to compensate for the angle difference.

[0078] The aforementioned hardware-based angle error compensation scheme obtains the actual rotation angle of the antenna each time it is driven to rotate, and compensates for the rotation based on the difference between the actual rotation angle and the theoretical rotation angle, thereby compensating for the angle error of the rotation and improving the accuracy of the antenna rotation.

[0079] In some embodiments, due to the design of the hardware structure of the drive device 20 or the design of the antenna 10, there may be areas that are inaccessible by rotation. For example... Figure 4 As shown, assume the unreachable region Ar1 is 45° and the reachable region Ar2 is 315°. When the antenna rotates to the edge of region Ar1, the motor will stall at that edge. Prolonged stalling may cause the motor temperature to rise, damaging motor components and reducing its lifespan. For example, if the angle between the current position of the antenna and the edge of region Ar1 is less than the target rotation angle, the motor will continuously stall at the edge of region Ar1.

[0080] In practical applications of routers, the resistance to the rotation of the motor may increase due to obstruction by people or objects during the antenna's rotation. This increased resistance may lead to a surge in the motor's load, which in turn can cause the motor's temperature to rise, potentially damaging motor components and reducing the motor's lifespan.

[0081] In response to the above-mentioned abnormal scenarios of blockage or obstruction by people / objects due to areas that are inaccessible by rotation, this application also proposes a solution based on a magnetometer.

[0082] Specifically, by utilizing the magnetometer's ability to sense the antenna's rotation angle, and comparing the changes in the magnetic field data sensed by the magnetometer over a certain period of time during the motor-driven antenna rotation, it can be determined whether the antenna has rotated by a certain angle. This helps identify any abnormal situations such as stalling or increased motor resistance. If the changes in the magnetic field data sensed by the magnetometer do not meet preset requirements within a certain time, the motor rotation is considered abnormal. In this case, the motor can be stopped to prevent damage to motor components and extend its lifespan. If the changes in the magnetic field data sensed by the magnetometer meet preset requirements within a certain time, the motor rotation is considered normal and no additional processing is required until the motor completes its rotation task and automatically stops.

[0083] Reference Figure 5 As shown, the specific implementation scheme is as follows:

[0084] (1) The first software located in the application layer sends a command to the magnetometer driver to obtain the antenna rotation angle. The magnetometer driver can drive the magnetometer to sense the antenna rotation angle in real time based on the command. For example, the magnetometer can convert the sensed magnetic field data of the X, Y, and Z axes into coordinate data of the X, Y, and Z axes and feed it back to the magnetometer driver located in the kernel layer. The magnetometer driver transmits the coordinate data of the X, Y, and Z axes to the first software located in the application layer. The first software can record the coordinate data of the X, Y, and Z axes and determine the antenna rotation angle based on the coordinate data of the X, Y, and Z axes.

[0085] (2) The first software starts the timer. The time interval of the timer can be set according to the actual detection requirements. This application embodiment does not limit this. For example, the time interval is 140ms. The motor can drive the antenna to rotate by an angle of 5° or more in 140ms. When the timer is started, the first software can record the first coordinate data of the X, Y and Z axes currently sensed by the magnetometer.

[0086] (3) The first software sends a command (including the rotation angle) to the motor driver to drive the motor to rotate. The motor driver drives the motor to start rotating based on the command, thereby driving the antenna and magnet to rotate.

[0087] (4) When the timer expires, the first software obtains the second coordinate data of the X, Y and Z axes currently sensed by the magnetometer, and obtains the rotation angle of the antenna within 140ms based on the first coordinate data and the second coordinate data. If the rotation angle is less than 5°, it is considered that the motor has an abnormal rotation. The first software sends the generator to stop rotating command to the motor drive to stop driving the motor to rotate. If the rotation angle is greater than or equal to 5°, it is considered that the motor rotates normally, and process (5) is executed.

[0088] (5) Repeat (2) to (4) until the cumulative timing time of the timer is greater than the rotation time set for the motor.

[0089] For example, different rotation times can be preset for the motor for different rotation angles; the larger the rotation angle, the longer the rotation time.

[0090] In some embodiments, after the motor stops rotating due to abnormal rotation, the router can also output abnormal rotation information to the terminal device connected to it, so that the APP on the terminal device can output preset prompt information based on the abnormal rotation information to remind the user to check whether there are people or objects blocking the router antenna, or whether a stall has occurred.

[0091] In some embodiments, if there are areas where the router's antenna rotation is inaccessible, the stall feature can be used to avoid angular accumulation errors and improve the accuracy of antenna rotation.

[0092] In the process of driving the antenna to rotate, the antenna position can be calibrated first. This calibration can be achieved by the software issuing a large-angle rotation command, such as a 360° rotation command, causing the motor to drive the antenna to rotate a large angle. The antenna will then be stuck at the baffle position, causing the motor to stall. The antenna will then rotate from the baffle position as the starting point. The specific implementation scheme is as follows:

[0093] (1) Using the stall mechanism, the first software sends a preset rotation angle to the motor drive, and the motor drive drives the antenna to rotate from the current position until it is blocked at the baffle position, the motor stalls and stops rotating.

[0094] (2) Assumption This indicates the rotation angle pre-issued by the antenna control algorithm in this rotation process, based on... The rotation angle based on the position of the baffle is calculated. This can be obtained based on the antenna rotation command received by the router this time;

[0095] For example, this can be achieved by recording the rotation angle from the current position to the baffle position, and then based on... Calculated by rotation angle Assuming the motor is a stepper motor, when the stepper driver receives a PWM signal, the stepper driver drives the stepper motor to rotate a fixed angle (i.e., the step angle) in the set direction. By counting the number of PWM signals from the current position to the baffle position, and based on the preset correspondence between the antenna rotation angle and the step angle, the rotation angle from the current position to the baffle position is determined.

[0096] For example, in the process of driving the antenna to rotate once, To rotate 60° clockwise from the current position, assuming the rotation angle from the current position to the baffle position is determined to be 130°, the rotation angle based on the baffle position can be obtained. It is a 70° counterclockwise rotation.

[0097] (3) Based on the position of the baffle, the first software sends the rotation angle. The motor drives the antenna to rotate.

[0098] See Figure 6 The image shows an antenna rotation control method provided in an embodiment of this application. The antenna rotation control method is described using a router as an example, where the router includes a rotatable antenna. The antenna rotation control method includes:

[0099] S601, receive antenna rotation command, the antenna rotation command includes a first rotation angle.

[0100] Antenna rotation commands can be issued by the terminal device. For example, after the terminal device establishes a connection with the router, the user can issue antenna rotation commands through an application installed on the terminal device. The antenna rotation command includes a first rotation angle in this rotation process, which includes the rotation direction and the rotation angle. For example, the first rotation angle is a 60° clockwise rotation, meaning the rotation direction is clockwise and the rotation angle is 60°.

[0101] S602, obtain the previous rotation angle of the antenna in the last rotation.

[0102] The previous rotation angle of the antenna in the previous rotation process can refer to the rotation angle of the antenna after it had rotated in the previous rotation process. If this rotation process is the first rotation of the antenna, since there is no record of the previous rotation angle, the antenna can be driven to rotate directly based on the first rotation angle, without having to execute steps S603 to S606 again.

[0103] S603, based on the first rotation angle and the prior rotation angle, determine the second rotation angle of the antenna for this rotation.

[0104] For example, the previous rotation angle in the previous rotation process for: This refers to the direction of rotation in the previous rotation process of the antenna. This represents the rotation angle of the antenna during the previous rotation process. First rotation angle. for: This refers to the direction of rotation of the antenna during this rotation process. The first rotation angle is the pre-rotation angle of the antenna during this rotation process, and the second rotation angle is... The following formula is used to obtain:

[0105] This refers to the actual direction of rotation of the antenna during this rotation process. The actual rotation angle of the antenna during this rotation process is:

[0106] or

[0107] S604 determines the third rotation angle of the antenna rotation based on the prior rotation angle.

[0108] Third rotation angle It can be: and They have opposite directions.

[0109] In some embodiments, steps S603 and S604 may be performed in parallel, or step S604 may be performed before step S603.

[0110] S605 drives the antenna to rotate based on the third rotation angle.

[0111] After determining the third rotation angle of the antenna, the antenna can be driven to rotate based on the third rotation angle, that is, according to... The indicated direction drives the antenna to rotate.

[0112] S606, when the rotation is complete, drives the antenna to rotate based on the second rotation angle.

[0113] After the rotation is complete, the antenna is driven to rotate based on the second rotation angle, i.e., according to... The indicated direction drives the antenna to rotate.

[0114] In some embodiments, after driving the antenna to rotate based on the second rotation angle, the prior rotation angle that the antenna needs to follow for the next rotation can be determined based on the second rotation angle. For example, [the following text is incomplete and likely refers to a different method:] Updated to This ensures that in the next antenna rotation process, the antenna rotation angle is...

[0115] In some embodiments, to further improve the positional accuracy of the antenna rotation, the router may also be equipped with a device under test (DUT) that can rotate synchronously with the antenna, and a sensor for sensing the positional information of the DUT. For example, the DUT may be a magnet, and the sensor may be a magnetometer. This application embodiment does not limit the types of the DUT and the sensor. By using a sensor to obtain the actual rotation angle of the antenna (i.e., the rotation angle of the DUT) during the antenna rotation process, and compensating for the rotation based on the difference between the actual and theoretical rotation angles, the angular error present during antenna rotation can be further reduced, thereby improving the accuracy of antenna rotation.

[0116] For example, during the process of driving the antenna to rotate based on the second rotation angle, sensor data (hereinafter referred to as first sensing data) can be acquired. When the antenna stops rotating, the actual rotation angle of the antenna can be determined based on the first sensing data. Then, based on the difference between the actual rotation angle and the second rotation angle, a compensation rotation angle can be determined. Finally, the antenna can be driven to rotate based on the compensation rotation angle.

[0117] For example, during the process of driving the antenna to rotate based on the third rotation angle, sensor data (hereinafter referred to as the second sensing data) is acquired. When the antenna finishes rotating, the actual rotation angle of the antenna is determined based on the second sensing data. Then, based on the difference between the actual rotation angle and the third rotation angle, the compensation rotation angle is determined. Finally, the antenna is driven to rotate based on the compensation rotation angle.

[0118] In practical router applications, during antenna rotation, obstructions from people or objects can increase motor rotation resistance. This increased resistance can lead to a surge in motor load, which in turn can cause a rapid rise in motor temperature, potentially damaging motor components and reducing motor lifespan. To address scenarios where the antenna is blocked due to inaccessible areas or obstructions, the antenna rotation angle can be checked at preset intervals. If the rotation angle within the preset time is less than a preset angle, the motor rotation is considered abnormal, and antenna rotation is stopped to prevent damage to motor components and extend motor lifespan. Specifically, during antenna rotation, the antenna rotation angle is determined at preset intervals based on initial sensing data. If the rotation angle within the preset time is determined to be less than the preset angle, antenna rotation is stopped.

[0119] See Figure 7 The image shows an antenna rotation control method provided in an embodiment of this application. The antenna rotation control method can be applied to a router, which includes a rotatable antenna, a device under test (DUT) that rotates synchronously with the antenna, and a sensor for sensing the position information of the DUT. The antenna rotation control method includes:

[0120] S701 receives an antenna rotation command, which includes a first rotation angle.

[0121] Step S701 in this embodiment is similar to step S601 in the previous embodiment, and will not be repeated here to avoid repetition.

[0122] S702 drives the antenna to rotate based on a first rotation angle and acquires sensor data.

[0123] After receiving the antenna rotation command, the antenna can be driven to rotate based on the first rotation angle, and the sensor data can be obtained to facilitate the subsequent determination of the actual rotation angle of the antenna.

[0124] S703 determines the actual rotation angle of the antenna based on sensing data when the antenna stops rotating.

[0125] When the antenna stops rotating based on the first rotation angle, the actual rotation angle of the antenna is determined based on the sensing data. This facilitates the subsequent determination of the difference between the actual rotation angle and the first rotation angle for supplementary rotation.

[0126] In some embodiments, the device under test can be a magnet, the sensor is a magnetometer, the magnet can be embedded in a turntable, and the antenna can be fixedly mounted on the turntable. The magnetometer can convert the sensed magnetic field data of the X, Y, and Z axes into coordinate data of the X, Y, and Z axes and output them. Since the magnet rotates in a two-dimensional plane, the magnetic field data detected by the magnetometer of the X, Y, and Z axes only shows relatively large changes in the magnetic field data of two axes, while the magnetic field data of the other axis remains basically unchanged. The rotation angle of the magnet can be obtained by selecting the two-axis coordinate data that characterizes the rotation of the magnet from the three-axis coordinate data and calculating the rotation angle of the magnet based on the two-axis coordinate data. The rotation angle of the magnet is the actual rotation angle of the antenna.

[0127] For example, by performing linear fitting on the two-axis coordinate data, the initial and final rotation coordinates of the magnet in the magnetometer coordinate system can be obtained based on the linear fitting results. Then, the initial and final rotation coordinates of the magnet in the magnetometer coordinate system can be converted into the initial and final rotation coordinates in the target coordinate system, which is a two-axis coordinate system constructed based on the plane where the magnet is located. Finally, the rotation angle of the magnet can be obtained based on the initial and final rotation coordinates of the magnet in the target coordinate system.

[0128] S704, determine the second rotation angle based on the difference between the actual rotation angle and the first rotation angle.

[0129] After obtaining the actual rotation angle of the antenna, the difference between the actual rotation angle and the first rotation angle can be calculated to determine the second rotation angle. For example, if the first rotation angle is 60° clockwise, and the actual rotation angle of the antenna is determined to be 55° clockwise, then the second rotation angle is 5° clockwise.

[0130] S705 drives the antenna to rotate based on the second rotation angle.

[0131] After obtaining the second rotation angle, the antenna can be driven to rotate further based on the second rotation angle to compensate for the angle error in the antenna rotation and improve the accuracy of the antenna rotation position.

[0132] In some embodiments, when driving the antenna to rotate, the rotation angle of the antenna can be determined based on the first sensing data at preset intervals. If it is determined that the rotation angle of the antenna within the preset time is less than the preset angle, the driving of the antenna to rotate is stopped. This can solve abnormal scenarios caused by stalling due to areas that cannot be reached by rotation or obstruction by people / objects, avoid damage to the motor components, and extend the service life of the motor.

[0133] Please see Figure 8 This paper introduces application scenario examples of the antenna rotation control method in the embodiments of this application.

[0134] like Figure 8 As shown, taking the antenna rotation control method applied to an indoor home wireless router 100 as an example, users can access the router 100 through a client 200 to control the rotation of the router 100's antenna. The client 200 can be a mobile phone, tablet, or other device. The client 200 can have a router management app installed, such as Honor Smart Space.

[0135] Since the angle of a router antenna can affect the coverage of a wireless network signal, or in a home setting, the antenna angle may be obstructed by objects or walls, thus affecting the coverage or quality of the wireless network signal, users may need to adjust the antenna angle depending on their location in the home, or they may need to adjust the antenna angle to maximize the coverage of the wireless network signal.

[0136] When a user wants to adjust the antenna angle of router 100, they can do so by logging into the router management app on client 200. The router management app interface displays the current antenna angle and allows the user to set the antenna's rotation angle. Specifically, the user can set the antenna's rotation direction and angle directly within the app. After setting the rotation direction and angle, the user can confirm and initiate the antenna rotation on router 100 through the app interface. For example, clicking the "Rotate" icon triggers client 200 to send an antenna rotation command to router 100, which includes the rotation direction and angle.

[0137] After receiving the antenna rotation command from client 200, router 100 can respond to the antenna rotation command by using... Figure 6 or Figure 7 The antenna rotation control method described above controls the antenna to rotate.

[0138] In some embodiments, after establishing a communication connection with the client 200, the router 100 may also send the current angle of the antenna to the client 200 at preset intervals, so that the router management APP can update the current angle of the antenna it displays in a timely manner.

[0139] Figure 9This is a schematic diagram of a router according to an embodiment of this application. Router 100 includes a processor 1001, a memory 1002 coupled to the processor 1001, and a transceiver 1003. The processor 1001 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 1001 may also be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 1001 may refer to a single processor or may include multiple processors. The transceiver 1003 is used to transmit and receive data; for example, it can send received data to the processor 1001 for processing. The transceiver 1003 includes a rotatable antenna. Memory 1002 may include volatile memory, such as random-access memory (RAM); memory may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 1002 may also include combinations of the above types of memory. Memory 1002 stores one or more computer programs 1004. The one or more computer programs 1004 are configured to be executed by processor 1001. The one or more computer programs 1004 include instructions that can be used to implement actions such as... in router 100. Figure 6 or Figure 7 The antenna rotation control method described above.

[0140] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are run on the router, the router executes the above-described related method steps to implement the antenna rotation control method in the above embodiment.

[0141] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the antenna rotation control method in the above embodiment.

[0142] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to execute the antenna rotation control method in the above-described method embodiments.

[0143] In this embodiment, the router, computer storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0145] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are illustrative. For instance, the division of modules or units is a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0146] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0147] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0148] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0149] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.

Claims

1. An antenna rotation control method, applied to network equipment, characterized in that, The network device includes a rotatable antenna, and the method includes: Receive an antenna rotation command, wherein the antenna rotation command includes a first rotation angle; Obtain the previous rotation angle of the antenna in the previous rotation; Based on the first rotation angle and the prior rotation angle, determine the second rotation angle of the antenna for this rotation; A third rotation angle for the antenna rotation is determined based on the prior rotation angle, wherein the third rotation angle has the same angle value as the prior rotation angle but the rotation direction is opposite. The antenna is driven to rotate based on the third rotation angle; When the rotation is complete, the antenna is driven to rotate based on the second rotation angle.

2. The method as described in claim 1, characterized in that, After driving the antenna to rotate based on the second rotation angle, the method further includes: Based on the second rotation angle, the prior rotation angle that the antenna needs to follow in the next rotation is determined.

3. The method as described in claim 1, characterized in that, The previous rotation angle of the antenna Represented as: = ( ), This indicates the previous rotation direction of the antenna in one rotation. The third rotation angle represents the initial rotation angle of the antenna in a single rotation. ' is represented as: ' = (- ), and Having opposite directions; First rotation angle Represented as: =( ), This is the pre-rotation direction of the antenna. The second rotation angle is the pre-rotation angle of the antenna in this rotation. The following formula is used to obtain: = , This refers to the actual direction of rotation of the antenna in this rotation. The actual rotation angle of the antenna during this rotation is denoted as , where . Rotation direction or rotation direction .

4. The method according to any one of claims 1 to 3, characterized in that, The network device also includes a device under test (DUT) that can rotate synchronously with the antenna, and a sensor for sensing the position information of the DUT. The step of driving the antenna to rotate based on the second rotation angle includes: The antenna is driven to rotate based on the second rotation angle, and the first sensing data of the sensor is acquired. When the antenna stops rotating, the actual rotation angle of the antenna is determined based on the first sensing data; The compensation rotation angle is determined based on the difference between the actual rotation angle and the second rotation angle. The antenna is driven to rotate based on the compensated rotation angle.

5. The method as described in claim 4, characterized in that, The method of driving the antenna to rotate based on the third rotation angle includes: The antenna is driven to rotate based on the third rotation angle, and the second sensing data of the sensor is acquired. When the antenna finishes rotating, the actual rotation angle of the antenna is determined based on the second sensing data; The compensation rotation angle is determined based on the difference between the actual rotation angle and the third rotation angle. The antenna is driven to rotate based on the compensated rotation angle.

6. The method as described in claim 4, characterized in that, The method further includes: When the antenna is driven to rotate, the rotation angle of the antenna is determined based on the first sensing data at preset time intervals; If it is determined that the rotation angle of the antenna within the preset time period is less than the preset angle, the rotation of the antenna is stopped.

7. A network device, characterized in that, The network device's memory and processor; The memory is used to store program instructions; The processor is configured to read the program instructions stored in the memory to implement the antenna rotation control method as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the antenna rotation control method as described in any one of claims 1 to 6.

9. A chip coupled to a memory in a network device, characterized in that, The chip is used to control the network device to perform the antenna rotation control method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Magnetic angle encoder and electronic water meter

    CN103913183A

  • Antenna component and client terminal equipment

    CN110931976A