A method, apparatus, and system for adjusting antenna angle
By using a step-by-step antenna angle adjustment method, combined with RSSI difference calculation and iterative judgment, and optimizing the rotation step size, the problems of poor antenna coverage angle adjustment and insufficient real-time performance in existing technologies are solved. This enables the rapid finding of the angle with stronger signal, thus improving the user experience.
Patent Information
- Application Number
- CN202111650883.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Existing technologies for adjusting antenna coverage angles are either ineffective or lack real-time performance, impacting user experience.
By obtaining the initial RSSI value, the antenna rotation is controlled using step adjustment commands and motion control models. By combining difference calculation and iterative judgment, a better RSSI position is quickly found. The rotation step size is optimized using step size gradient and momentum attenuation factor to prevent overshoot.
It enables the rapid finding of angles where the antenna signal is stronger, improving the real-time performance and accuracy of adjustments, reducing the number of iterations, and enhancing the user experience.
Smart Images

Figure CN114465002B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of antennas, and in particular to a method, device and system for adjusting the angle of an antenna. BACKGROUND
[0002] At present, most domestic wireless routers use omnidirectional antennas. In actual use, the antenna radiation is not ideal omnidirectional, but there are dominant radiation directions and inferior radiation directions. When the client is in the dominant radiation direction of the antenna, the signal strength is higher and the experience is better. Therefore, in order to improve the communication quality, it is necessary to adjust the antenna radiation direction so that the dominant radiation direction of the antenna is towards the client, improving the experience of the client.
[0003] In the prior art, a common method is to adjust the coverage angle of the antenna by mechanical rotation of the antenna. In one implementation, the user adjusts by manually rotating the antenna. This method is not adjusted by technical parameters, but by the user's feeling and imagination, and the adjustment effect is often counterproductive. In another implementation, an electric motor is used to drive the antenna to rotate, and an algorithm is used to automatically adjust the coverage angle of the antenna. For example, by traversing the relationship between the antenna radiation angle and the wireless parameters, the final antenna coverage angle is selected. However, since the relationship between the angle and the parameters needs to be traversed, the entire process is time-consuming, resulting in poor real-time performance of the angle adjustment, affecting the user experience.
[0004] In summary, the existing technology for adjusting the coverage angle of the antenna has poor adjustment effect or poor real-time performance, affecting the user experience. SUMMARY
[0005] The present application provides a method, device and system for adjusting the angle of an antenna to find a position with better RSSI in fewer iterations, thereby quickly finding an angle with stronger antenna signal.
[0006] In a first aspect, to solve the above technical problems, the present application provides a method for adjusting the angle of an antenna, executed by a main control module, comprising:
[0007] obtaining an initial RSSI value;
[0008] with the initial value of i being 1, generating an adjustment instruction according to the i-th rotation step and sending it to a motor control module, so that the motor control module controls the rotation of the antenna according to the adjustment instruction and a pre-configured motion control model;
[0009] obtaining the RSSI value after the rotation of the antenna and calculating the difference between the initial RSSI value and the RSSI value after the rotation;
[0010] updating the i-th rotation step to obtain the (i+1)-th rotation step;
[0011] determining whether a termination iteration condition is satisfied, if yes, the antenna angle adjustment is ended; if no, i is added by one, and returning to the step of generating the adjustment instruction according to the i-th rotation step and sending to the motor control module.
[0012] Preferably, the determining whether the termination iteration condition is satisfied comprises:
[0013] When the absolute value of the difference value is less than a preset convergence precision, or when the i+1-th rotation step is greater than a preset rotation boundary, or when i is greater than or equal to a preset maximum iteration number, it is determined that the termination iteration condition is satisfied.
[0014] Preferably, the method further comprises:
[0015] calculating a step gradient according to the difference value and the i-th rotation step;
[0016] determining whether the absolute value of the step gradient is greater than a preset gradient threshold, if yes, it is determined that an overshoot phenomenon occurs; if no, it is determined that the overshoot phenomenon does not occur.
[0017] Preferably, when it is determined that the overshoot phenomenon occurs, the updating the i-th rotation step to obtain the i+1-th rotation step comprises:
[0018] when it is determined that the difference value is greater than zero, obtaining an updated momentum according to the step gradient, a preset learning rate and a momentum decay factor;
[0019] obtaining the i+1-th rotation step according to the i-th rotation step, the momentum decay factor and the updated momentum;
[0020] when it is determined that the difference value is less than zero, updating the momentum to zero, and obtaining the i+1-th rotation step according to the step gradient, the learning rate and the momentum decay factor.
[0021] Preferably, when it is determined that the overshoot phenomenon does not occur, the updating the i-th rotation step to obtain the i+1-th rotation step comprises:
[0022] when it is determined that the difference value is greater than zero, obtaining an updated momentum according to the step gradient, a preset learning rate and a momentum decay factor;
[0023] obtaining the i+1-th rotation step according to the i-th rotation step and the momentum decay factor;
[0024] when it is determined that the difference value is less than zero, obtaining an updated momentum according to the step gradient, the learning rate, the momentum decay factor and a preset initial momentum;
[0025] Taking the opposite of the updated momentum, a (i+1)th rotation step is obtained.
[0026] Preferably, after the (i+1)th rotation step is obtained, the method further comprises:
[0027] The (i+1)th rotation step is norm-constrained.
[0028] In a second aspect, the present application provides a device for adjusting the angle of an antenna, which is arranged in a main control module and comprises:
[0029] A data acquisition module is configured to acquire an initial RSSI value.
[0030] An adjustment instruction module is configured to generate an adjustment instruction according to the ith rotation step and send the adjustment instruction to a motor control module, so that the motor control module controls the rotation of the antenna according to the adjustment instruction and a pre-configured motion control model.
[0031] A difference calculation module is configured to acquire an RSSI value after the rotation of the antenna and calculate the difference between the initial RSSI value and the RSSI value after the rotation.
[0032] A step update module is configured to update the ith rotation step to obtain a (i+1)th rotation step.
[0033] An iteration judgment module is configured to judge whether a termination iteration condition is met, if yes, the adjustment of the angle of the antenna is ended, and if not, i is increased by one and the step of generating an adjustment instruction according to the ith rotation step and sending the adjustment instruction to the motor control module is returned.
[0034] In a third aspect, the present application further provides a method for adjusting the angle of an antenna, which is executed by a motor control module and comprises:
[0035] Receiving an adjustment instruction sent by a main control module.
[0036] Controlling the rotation of an antenna according to the adjustment instruction and a pre-configured motion control model.
[0037] Preferably, the step of controlling the rotation of an antenna according to the adjustment instruction and a pre-configured motion control model comprises:
[0038] Establishing a motor angle matrix based on the rotation angles of all motors of the antenna.
[0039] Obtaining a current angle matrix according to the motor angle matrix and the current angle state of the antenna.
[0040] Obtaining a target angle matrix according to the motor angle matrix and the adjustment instruction.
[0041] Calculate a matrix difference between the target angle matrix and the current angle matrix, and control the antenna to rotate according to the matrix difference.
[0042] Preferably, the controlling the antenna to rotate according to the adjustment instruction and the pre-configured motion control model comprises:
[0043] Obtain a stepping angle of each motor;
[0044] According to the stepping angle, construct a stepping angle function about a target position of the motor, and obtain a coefficient matrix of the stepping angle function;
[0045] According to the adjustment instruction, obtain an assignment of the coefficient matrix, and control the antenna to rotate according to the assignment of the coefficient matrix.
[0046] In a fourth aspect, the present application further provides a device for adjusting an angle of an antenna, which is arranged in a motor control module and comprises:
[0047] A receiving module, configured to receive an adjustment instruction sent by a main control module;
[0048] A motion control module, configured to control the antenna to rotate according to the adjustment instruction and a pre-configured motion control model.
[0049] In a fifth aspect, the present application further provides a system for adjusting an angle of an antenna, which comprises a main control module, a motor control module and at least one antenna, the antenna is provided with at least one motor, the main control module is in communication connection with the motor control module, the main control module is configured to execute the method for adjusting an angle of an antenna according to any one of the first aspect, and the motor control module is configured to execute the method for adjusting an angle of an antenna according to any one of the third aspect.
[0050] Preferably, the system further comprises a battery management module and a battery, the battery management module is configured to control the battery to charge when the system is powered on, and the battery is configured to supply power to the motor control module when the system is powered off.
[0051] Preferably, the system further comprises a display module, the display module is in communication connection with the main control module, and the display module is configured to indicate a rotating state of the antenna.
[0052] Compared with the prior art, the present application has the following beneficial effects:
[0053] The application provides a method for adjusting the angle of an antenna, which detects the optimal value of RSSI step by step, and when the iteration termination condition is met, the adjustment of the angle of the antenna is ended, and the antenna is rotated to a position with a better RSSI. Meanwhile, through the selection of appropriate initial parameters, the number of iterations can be reduced, and the position with a better RSSI can be found, so that the angle with a stronger antenna signal can be quickly found.
[0054] The application provides another method for adjusting the angle of an antenna, which controls the rotation angles of multiple motors through the establishment of a model, improves the synchronization of the control of the multiple motors, improves the control efficiency, and is beneficial to the simulation and implementation of motion control. Accordingly, the application also provides an apparatus and a system for adjusting the angle of an antenna. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 is a method flow diagram for adjusting the angle of an antenna provided by an embodiment of the application;
[0056] Figure 2 is a diagram for overshoot provided by an embodiment of the application;
[0057] Figure 3 is a diagram of the structure of an apparatus for adjusting the angle of an antenna provided by an embodiment of the application;
[0058] Figure 4 is a method flow diagram for adjusting the angle of an antenna provided by another embodiment of the application;
[0059] Figure 5 is a diagram of the structure of an apparatus for adjusting the angle of an antenna provided by another embodiment of the application;
[0060] Figure 6 is a diagram of the structure of an apparatus for adjusting the angle of an antenna provided by another embodiment of the application;
[0061] Figure 7 is a diagram of the structure of a system for adjusting the angle of an antenna provided by an embodiment of the application;
[0062] Figure 8 is a diagram of the working of a battery management module provided by an embodiment of the application. DETAILED DESCRIPTION
[0063] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the application.
[0064] Referring to Figure 1 The first embodiment of the present application provides a method for adjusting the angle of an antenna, which is executed by a main control module and includes the following steps:
[0065] S11, obtaining an initial RSSI value;
[0066] S12, taking the initial value of i as 1, generating an adjustment instruction according to the i-th rotation step and sending the adjustment instruction to a motor control module, so that the motor control module controls the rotation of the antenna according to the adjustment instruction and a pre-configured motion control model;
[0067] S13, obtaining an RSSI value after the rotation of the antenna and calculating the difference between the initial RSSI value and the RSSI value after the rotation;
[0068] S14, updating the i-th rotation step to obtain an (i+1)-th rotation step;
[0069] S15, judging whether a termination iteration condition is met, if yes, the adjustment of the angle of the antenna is ended, and if not, i is increased by one and the step of generating an adjustment instruction according to the i-th rotation step and sending the adjustment instruction to the motor control module is returned to.
[0070] In step S11, an initial RSSI (Received Signal Strength Indicator) value needs to be obtained, and the RSSI value is a signal strength indicator value. In this embodiment, the RSSI has been taken as an absolute value, and the negative sign has been removed to search for the minimum RSSI value.
[0071] In step S12, the initial value of i is taken as 1, i is a positive integer, an adjustment instruction is generated according to the i-th rotation step and sent to the motor control module, and the motor control module controls the rotation of the antenna according to the adjustment instruction and a pre-configured motion control model. The first rotation step is preset and related to the antenna actually applied. The first rotation can make the RSSI value change obviously.
[0072] In step S13, an RSSI value after the rotation of the antenna is obtained, and the difference between the initial RSSI value and the RSSI value after the rotation is calculated, and the difference is denoted as ΔRSSI.
[0073] In step S14, the i-th rotation step is updated to obtain an (i+1)-th rotation step. This step is to detect the optimal RSSI value by steps, and the rotation step of each detection is opposite to the gradient of RSSI with respect to the change of the angle of the antenna, so as to quickly find the angle at which the antenna signal is stronger.
[0074] In step S15, it is needed to judge whether the iteration termination condition is satisfied according to the difference value, the (i+1)th rotation step and the value of i. If yes, the antenna angle adjustment is ended. If no, i is added by one and the process returns to the step of generating the adjustment instruction according to the i-th rotation step and sending the adjustment instruction to the motor control module. When the iteration termination condition is satisfied, the iteration is terminated and the antenna is rotated to a position with a better RSSI.
[0075] Specifically, the judging whether the iteration termination condition is satisfied comprises:
[0076] When the absolute value of the difference value is less than a preset convergence precision, or when the (i+1)th rotation step is greater than a preset rotation boundary, or when i is greater than or equal to a preset maximum iteration number, it is determined that the iteration termination condition is satisfied.
[0077] Further, if the iteration termination condition is not satisfied, the motor is controlled to rotate again to drive the antenna angle adjustment, and the iteration optimization is performed. The convergence precision is related to the antenna in actual application. The rotation boundary is determined by the maximum reachable angle of the actual mechanical antenna. The rotation shaft of the antenna cannot be continuously rotated in most cases, and the rotation in the same direction is at most 360 degrees, and generally less. The maximum iteration number can be determined by the user, reflecting the maximum tolerance of the user for the antenna adjustment time. Exemplarily, the maximum iteration number is set to 8 times, and one iteration is about 3 seconds.
[0078] Further, after the (i+1)th rotation step is obtained, the (i+1)th rotation step is norm-constrained. In the norm-constraint, it is ensured that the rotation step is an integer, and the absolute value of the minimum rotation step is 2.
[0079] It should be noted that, in the actual iterative search process, in order to make the RSSI converge as soon as possible, and at the same time make the difference between two iterations greater than the fluctuation of the optimization variable RSSI, the learning rate is generally set to be relatively large. However, in the convergence process of a relatively steep valley, due to the momentum accumulation, overshoot is easily generated and multiple oscillations are generated at the valley, which is difficult to converge to the optimal value or leave the valley and return. The overshoot phenomenon is shown in the following figure. Figure 2 Therefore, overshoot protection needs to be set to reduce the valley oscillation phenomenon easily generated in the actual iterative process.
[0080] In order to facilitate the understanding of the present application, some preferred embodiments of the present application will be further described below.
[0081] In an implementation manner, the process of judging whether the overshoot phenomenon occurs comprises:
[0082] The step gradient is calculated according to the difference value and the i-th rotation step.
[0083] determining whether the absolute value of the step gradient is greater than a preset gradient threshold value, if yes, determining that the overshoot phenomenon occurs, and if no, determining that the overshoot phenomenon does not occur.
[0084] wherein the absolute value of the step gradient is |ΔRSSI / step|, ΔRSSI represents the difference value, and step represents the i-th rotation step. If the step gradient is greater than the preset gradient threshold value, it is determined that the overshoot phenomenon occurs, and otherwise, it is determined that the overshoot phenomenon does not occur. The gradient threshold value is related to the antenna used in the actual application, and the present application does not make specific limitation thereon.
[0085] Further, when it is determined that the overshoot phenomenon occurs, the i-th rotation step is updated to obtain an (i+1)-th rotation step, which comprises:
[0086] when it is determined that the difference value is greater than zero, an updated momentum is obtained according to the step gradient, a preset learning rate and a momentum decay factor;
[0087] an (i+1)-th rotation step is obtained according to the i-th rotation step, the momentum decay factor and the updated momentum;
[0088] when it is determined that the difference value is less than zero, the momentum is updated to zero, and an (i+1)-th rotation step is obtained according to the step gradient, the learning rate and the momentum decay factor.
[0089] Specifically, after detecting the overshoot, if ΔRSSI>0, the updated momentum is:
[0090] m’=k*r*ΔRSSI / step
[0091] the (i+1)-th rotation step is:
[0092] step’=-m’-k*step
[0093] if ΔRSSI<0, the updated momentum is:
[0094] m’=0
[0095] the (i+1)-th rotation step is:
[0096] step’=-k*r*ΔRSSI / step
[0097] wherein m’ is the updated momentum, k is the momentum decay factor, r is the learning rate, the learning rate refers to the influence rate of the change of RSSI caused by the last step on this step, and the value thereof influences the convergence speed of iteration; ΔRSSI is the difference value, step is the i-th rotation step, step’ is the (i+1)-th rotation step, and ΔRSSI / step represents the step gradient.
[0098] It is to be noted that the next rotation step is determined by the RSSI of the last step with respect to the step gradient, i.e. ΔRSSI / step. In the formula for calculating step', the sign of the coefficient indicates that the step after updating should be opposite to the gradient direction of the current RSSI. For example, if the last step > 0, it indicates that the last rotation was in the positive direction, and the resulting ΔRSSI is also greater than 0, indicating that the RSSI is getting larger, so the next step should be step < 0 to rotate in the opposite direction to make the RSSI smaller.
[0099] Further, when it is determined that the overshoot phenomenon does not occur, the updating of the ith rotation step to obtain the (i+1)th rotation step comprises:
[0100] When it is determined that the difference is greater than zero, an updated momentum is obtained according to the step gradient, a preset learning rate and a momentum decay factor;
[0101] According to the ith rotation step and the momentum decay factor, the (i+1)th rotation step is obtained;
[0102] When it is determined that the difference is less than zero, an updated momentum is obtained according to the step gradient, the learning rate, the momentum decay factor and a preset initial momentum;
[0103] The opposite number of the updated momentum is taken to obtain the (i+1)th rotation step.
[0104] Specifically, when the overshoot phenomenon does not occur, if ΔRSSI > 0, the updated momentum is:
[0105] m' = k * r * ΔRSSI / step
[0106] The (i+1)th rotation step is:
[0107] step' = -k * step
[0108] If ΔRSSI < 0, the updated momentum is:
[0109] m' = k * m + r * ΔRSSI / step
[0110] The (i+1)th rotation step is:
[0111] step' = -m'
[0112] Wherein, m is the initial momentum, m = -step1, step1 is the first rotation step; m' is the updated momentum, k is the momentum decay factor, r is the learning rate, ΔRSSI is the difference, step is the ith rotation step, step' is the (i+1)th rotation step, and ΔRSSI / step represents the step gradient.
[0113] The method for adjusting the antenna angle provided by the application finds the optimal RSSI value by step-by-step searching, and the step length of each detection is not only related to the gradient of the current RSSI with respect to the change of the antenna angle, but also affected by the last rotation step length, so the convergence speed is faster than that of the general gradient descent method. In addition, overshoot protection is introduced in the actual iteration process to reduce the trough oscillation phenomenon that is prone to occur in the actual iteration process, further accelerate the convergence speed, and make the algorithm converge after only a few iterations. The application does not need to establish, maintain or traverse the antenna query table when adjusting the antenna angle, has high real-time performance, and has stable effect.
[0114] Reference Figure 3 The second embodiment of the application provides a device for adjusting the antenna angle, which is arranged in a main control module and comprises:
[0115] A data acquisition module is configured to acquire an initial RSSI value.
[0116] An adjustment instruction module is configured to generate an adjustment instruction according to the i-th rotation step length and send the adjustment instruction to a motor control module, so that the motor control module controls the rotation of the antenna according to the adjustment instruction and a pre-configured motion control model.
[0117] A difference calculation module is configured to acquire an RSSI value after the rotation of the antenna and calculate the difference between the initial RSSI value and the RSSI value after the rotation.
[0118] A step length updating module is configured to update the i-th rotation step length to obtain an (i+1)-th rotation step length.
[0119] An iteration judgment module is configured to judge whether a termination iteration condition is met. If yes, the adjustment of the antenna angle is ended. If no, i is increased by one, and the step of generating an adjustment instruction according to the i-th rotation step length and sending the adjustment instruction to the motor control module is returned.
[0120] Preferably, the iteration judgment module comprises:
[0121] An iteration judgment unit is configured to determine that the termination iteration condition is met when the absolute value of the difference is less than a preset convergence precision, or when the (i+1)-th rotation step length is greater than a preset rotation boundary, or when i is greater than or equal to a preset maximum iteration number.
[0122] Preferably, the device further comprises:
[0123] A step length gradient calculation module is configured to calculate a step length gradient according to the difference and the i-th rotation step length.
[0124] The overshoot judging module is configured to judge whether the absolute value of the step gradient is greater than a preset gradient threshold value, and if yes, determine that an overshoot phenomenon occurs, and if no, determine that no overshoot phenomenon occurs.
[0125] Preferably, when it is determined that the overshoot phenomenon occurs, the step updating module is further configured to:
[0126] When it is determined that the difference value is greater than zero, obtain an updated momentum according to the step gradient, a preset learning rate and a momentum decay factor;
[0127] Obtain an (i+1)th rotation step according to the ith rotation step, the momentum decay factor and the updated momentum.
[0128] When it is determined that the difference value is less than zero, update the momentum to zero, and obtain an (i+1)th rotation step according to the step gradient, the learning rate and the momentum decay factor.
[0129] Preferably, when it is determined that no overshoot phenomenon occurs, the step updating module is further configured to:
[0130] When it is determined that the difference value is greater than zero, obtain an updated momentum according to the step gradient, a preset learning rate and a momentum decay factor;
[0131] Obtain an (i+1)th rotation step according to the ith rotation step and the momentum decay factor.
[0132] When it is determined that the difference value is less than zero, obtain an updated momentum according to the step gradient, the learning rate, the momentum decay factor and a preset initial momentum.
[0133] Obtain an (i+1)th rotation step by taking the opposite number of the updated momentum.
[0134] Preferably, the device further comprises:
[0135] The norm constraint module is configured to perform norm constraint on the (i+1)th rotation step.
[0136] It should be noted that the device for adjusting an antenna angle provided in the embodiments of the present application is used to execute all process steps of the method for adjusting an antenna angle provided in the above embodiments, and the working principles and beneficial effects of the two are one-to-one corresponding, thus no longer being described in detail.
[0137] With reference to Figure 4 The third embodiment of the present application further provides a method for adjusting an antenna angle, which is executed by a motor control module and comprises the following steps S21-S22:
[0138] S21, receive an adjustment instruction sent by a main control module;
[0139] S22, controlling the antenna to rotate according to the adjustment instruction and a pre-configured motion control model.
[0140] In step S21, the motor control module receives the adjustment instruction sent by the main control module. In a specific implementation, the motor control module includes an MCU, a motor driver and a motor. After receiving the adjustment instruction sent by the main control module, the MCU sends a motor control signal to control the motor to rotate through the motor driver.
[0141] In step S22, the motor control module controls the antenna to rotate according to the adjustment instruction and a pre-configured motion control model.
[0142] Exemplarily, taking 4 antennas and 3 motors for each antenna as an example for illustration.
[0143] With reference to Figure 5 There are 4 antennas, namely antennas 1 / 2 / 3 / 4. Each antenna is controlled by 3 motors, namely motors A / B / C. Each motor is controlled by 4 GPIOs (General-purpose input / output) of the MCU, that is, the antenna is controlled by 12 GPIOs. The rotation angle of each motor is determined by the number of pulses output by the GPIO. The position of each antenna is determined by the rotation angle of the 3 motors in the antenna. The positions of the antennas can be the same or different, that is, the rotation angles of the 12 motors can be completely the same, partially the same or completely different. If each motor is controlled one by one, the implementation complexity will increase exponentially with the increase of the number of motors and the motion state, which will result in that the motor at the rear of the sequence starts late, and the motion time of each antenna is not unified. Therefore, in this embodiment, a motor control method is designed in a modular and matrix manner.
[0144] In an implementation manner, the controlling the antenna to rotate according to the adjustment instruction and a pre-configured motion control model comprises:
[0145] establishing a motor angle matrix based on the rotation angles of all the motors on the antenna;
[0146] obtaining a current angle matrix according to the motor angle matrix and a current angle state of the antenna;
[0147] obtaining a target angle matrix according to the motor angle matrix and the adjustment instruction;
[0148] calculating a matrix difference value between the target angle matrix and the current angle matrix, and controlling the antenna to rotate according to the matrix difference value.
[0149] It should be noted that the rotation of the motor is controlled by a common module, which has two functions, one is to control the GPIO output setting pulse signal, so that the stepping motor rotates at its inherent step angle, and the other is to control the rotation direction of the motor, which is clockwise and counterclockwise respectively.
[0150] Specifically, the motor angle matrix is denoted as P i , and the angles of the motors A, B, and C at this time are A ji , B ji , and C ji , where j=1, 2, 3, 4 represents four antennas, and i=0, 1, 2, 3… represents different positions of the antennas. The rows of the matrix represent different motors, and the columns represent different antennas. The values in the matrix represent the angles of rotation of the motors, and the positive and negative signs represent the rotation directions (clockwise and counterclockwise). P0 is denoted as the initial state, that is, the values in the matrix are all 0. The motor angle matrix P i is as follows:
[0151]
[0152] When it is necessary to control the antenna to run from the current angle matrix P0 to the target angle matrix P i , the values of the matrix P i are transmitted to the motor control module; to control the antenna to run from the current angle matrix P m to the target angle matrix P n , the difference between the two matrices is transmitted to the motor control module.
[0153] In another implementation mode, the method comprises the following steps:
[0154] Obtaining the step angle of each motor;
[0155] According to the step angle, a step angle function about the target position of the motor is constructed, and a coefficient matrix of the step angle function is obtained;
[0156] According to the adjustment instruction, the assignment of the coefficient matrix is obtained, and the antenna is controlled to rotate according to the assignment of the coefficient matrix.
[0157] Specifically, each motor has a fixed step angle, that is, the smallest angle of rotation, and when there are three motors, the step angles are denoted as a, b, and c respectively.
[0158] First, the target position of the antenna controlled by the stepping motor is denoted as p, and when each antenna is controlled by three stepping motors, the target position is a function of the step angles of the three stepping motors, and the step angle function p is represented as:
[0159] p = ma + nb + kc
[0160] Wherein m, n, k are coefficients, the value size indicates the size of the rotation angle, and the positive and negative indicate the direction of rotation.
[0161] Then, when the antenna has multiple, the target position of the antenna also has multiple, respectively, p1, p2, …, p n , all target positions are expressed by step angle function, written as follows:
[0162]
[0163] Finally, write in the form of matrix, the target position matrix is recorded as P, the coefficient matrix is recorded as V, and the step angle matrix is recorded as H, then P = VH, as follows:
[0164]
[0165] When it is necessary to control the antenna to move to different positions, different values of the coefficient matrix V can be assigned.
[0166] The present application controls the rotation angle of multiple motors according to the modularization and matrix design, which is beneficial to programming implementation in engineering, improves the synchronization of multiple stepper motor control, improves the control efficiency, abstracts the control problem into a simple mathematical model, and is beneficial to motion control simulation and implementation.
[0167] Referring to Figure 6 , the fourth embodiment of the present application also provides an antenna angle adjusting device, which is arranged in a motor control module and comprises:
[0168] A receiving module is arranged for receiving an adjusting instruction sent by a main control module.
[0169] A motion control module is arranged for controlling the rotation of the antenna according to the adjusting instruction and a pre-configured motion control model.
[0170] Preferably, the motion control module comprises:
[0171] A matrix establishing unit is arranged for establishing a motor angle matrix based on the rotation angles of all motors on the antenna.
[0172] A current angle unit is arranged for obtaining a current angle matrix according to the motor angle matrix and the current angle state of the antenna.
[0173] A target angle unit is arranged for obtaining a target angle matrix according to the motor angle matrix and the adjusting instruction.
[0174] A motion control unit is configured to calculate a matrix difference between the target angle matrix and the current angle matrix, and control the antenna to rotate according to the matrix difference.
[0175] Preferably, the motion control module comprises:
[0176] A step angle acquisition unit is configured to acquire a step angle of each motor.
[0177] A function construction unit is configured to construct a step angle function about a target position of the motor according to the step angle, and acquire a coefficient matrix of the step angle function.
[0178] An assignment unit is configured to obtain an assignment of the coefficient matrix according to the adjustment instruction, and control the antenna to rotate according to the assignment of the coefficient matrix.
[0179] It should be noted that the device for adjusting the angle of the antenna provided in the embodiments of the present application is used to execute all process steps of the method for adjusting the angle of the antenna provided in the above embodiments, and the working principles and beneficial effects of the two are one-to-one corresponding, thus no longer being described in detail.
[0180] With reference to Figure 7 The embodiments of the present application further provide a system for adjusting the angle of the antenna, comprising a main control module, a motor control module and at least one antenna, at least one motor is arranged on the antenna, the main control module is in communication connection with the motor control module, the main control module is used to execute the method for adjusting the angle of the antenna as described in any one of the first embodiments, and the motor control module is used to execute the method for adjusting the angle of the antenna as described in any one of the third embodiments.
[0181] Further, the system further comprises a battery management module and a battery, the battery management module is used to control the battery to charge when the system is powered on, and the battery is used to supply power to the motor control module when the system is powered off.
[0182] With reference to Figure 8 The battery management module mainly plays a role after the whole machine product is powered off. After the whole machine is powered off, the battery continues to supply power to the motor control module, so that the antenna automatically recovers to the default closed state; and in the normal working device of the whole machine, the battery management module can charge the battery.
[0183] The working process of the battery management module is as follows:
[0184] (1) During normal power adapter power-on, the power adapter provides a total voltage to supply power to the mainboard, and after voltage conversion, to supply power to the MCU board, and also to charge the battery through the battery charge and discharge management chip;
[0185] (2) When the total voltage provided by the power adapter is reduced below the preset threshold, the battery charge and discharge management chip controls the battery output voltage at this time, so that the MCU and the motor will not be powered off, and can continue to work normally;
[0186] (3) The MCU constantly monitors the total voltage provided by the power adapter through the self-provided ADC (Analogue to digital conversion), and when the monitored total voltage is reduced below the preset threshold, the MCU executes the action of restoring the motor to the default closed state. After the whole machine is powered off, the antenna can automatically recover to the default closed state, increasing the friendliness of the product.
[0187] Further, the system further comprises a display module in communication connection with the main control module, and the display module is used to indicate the rotation state of the antenna. Exemplarily, the display module can adopt LED and LED driving, and when the antenna rotates, the LED presents a flashing or breathing effect, and when the antenna rotates to the target position, the LED can present a constant bright state, so as to indicate whether the adjustment of the antenna coverage angle has been completed. Through the display of the LED, it can be explicitly told to the user whether the antenna has been adjusted to the appropriate position, improving the convenience of using the product.
[0188] Further, the system is further configured with an APP for user use, and a plurality of antenna coverage angles are pre-set in the APP for signal enhancement in different use scenarios, such as flat layer / jump layer signal enhancement, front / back signal enhancement and left / right signal enhancement. The user can realize the effect of "one-key enhancement" through these options.
[0189] The system provided by the application can be applied in the following aspects:
[0190] (1) The communication between general wireless devices and terminal devices, by adjusting the coverage angle of the antenna of the wireless device, the communication quality is improved; when the position of the terminal device changes, the position change can be tracked in real time, so that the angle of the antenna can be adjusted in real time, and the continuity of good user experience is ensured;
[0191] (2) In wireless networking, part of the antenna faces the network inside, and part of the antenna faces the terminal device, improving the performance in both directions;
[0192] (3) In wireless positioning, the target position is tracked through wireless algorithm and antenna rotation.
[0193] In summary, the method for adjusting the angle of the antenna provided by the application can find a position with better RSSI by stepwise detecting the better RSSI value, and the adjustment of the angle of the antenna is ended when the iteration termination condition is met, and the antenna is rotated to a position with better RSSI. Meanwhile, by selecting appropriate initial parameters, the position with better RSSI can be found with less iteration times, so that the angle with stronger antenna signal can be quickly found.
[0194] In addition, the method for adjusting the angle of the antenna provided by the application can improve the synchronization of the control of the plurality of motors and the control efficiency by establishing a model to control the rotation angles of the plurality of motors, and is beneficial to the simulation and implementation of the motion control. Accordingly, the application also provides a device and a system for adjusting the angle of the antenna.
[0195] It should be noted that the device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. In addition, the connection relationship between the modules in the device embodiment provided by the application indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0196] The above specific embodiments further illustrate the purpose, technical scheme and beneficial effects of the application. It should be understood that the above description is only for specific embodiments of the application and is not used to limit the protection scope of the application. It is particularly pointed out that any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principles of the application shall be included in the protection scope of the application.
Claims
1. A method of adjusting an angle of an antenna, characterized by, executed by the main control module, comprising: obtaining an initial RSSI value; with an initial value of i being 1, generating an adjustment instruction according to the i-th rotation step and sending it to the motor control module, so that the motor control module controls the rotation of the antenna according to the adjustment instruction and the pre-configured motion control model; obtaining the RSSI value after the antenna rotates, and calculating the difference between the initial RSSI value and the RSSI value after the rotation; updating the i-th rotation step to obtain the i+1-th rotation step; determining whether the termination iteration condition is met, if yes, the antenna angle adjustment is ended, if not, i is added by one, and the step of generating an adjustment instruction according to the i-th rotation step and sending it to the motor control module is returned to; calculating the step gradient according to the difference and the i-th rotation step; determining whether the absolute value of the step gradient is greater than the preset gradient threshold, if yes, it is determined that the overshoot phenomenon occurs, if not, it is determined that the overshoot phenomenon does not occur; when it is determined that the overshoot phenomenon occurs, the updating of the i-th rotation step to obtain the i+1-th rotation step comprises: when it is determined that the difference is greater than zero, the updated momentum is obtained according to the step gradient, the preset learning rate and the momentum decay factor; the i+1-th rotation step is obtained according to the i-th rotation step, the momentum decay factor and the updated momentum; when it is determined that the difference is less than zero, the momentum is updated to zero, and the i+1-th rotation step is obtained according to the step gradient, the learning rate and the momentum decay factor.
2. The method of claim 1, wherein, the determination of whether the termination iteration condition is met comprises: when the absolute value of the difference is less than the preset convergence precision, or when the i+1-th rotation step is greater than the preset rotation boundary, or when i is greater than or equal to the preset maximum iteration number, it is determined that the termination iteration condition is met.
3. The method of claim 1, wherein, when it is determined that the overshoot phenomenon does not occur, the updating of the i-th rotation step to obtain the i+1-th rotation step comprises: when it is determined that the difference is greater than zero, the updated momentum is obtained according to the step gradient, the preset learning rate and the momentum decay factor; the i+1-th rotation step is obtained according to the i-th rotation step and the momentum decay factor; when it is determined that the difference is less than zero, the updated momentum is obtained according to the step gradient, the learning rate, the momentum decay factor and the preset initial momentum; the i+1-th rotation step is obtained by taking the opposite number of the updated momentum.
4. The method of claim 1, wherein, after the i+1-th rotation step is obtained, the method further comprises: the i+1-th rotation step is norm-constrained.
5. An apparatus for adjusting the angle of an antenna, comprising: the device is arranged in the main control module, comprising: a data acquisition module for obtaining an initial RSSI value; an adjustment instruction module for generating an adjustment instruction according to the i-th rotation step and sending it to the motor control module with an initial value of i being 1, so that the motor control module controls the rotation of the antenna according to the adjustment instruction and the pre-configured motion control model; a difference calculation module for obtaining the RSSI value after the antenna rotates, and calculating the difference between the initial RSSI value and the RSSI value after the rotation; a step length updating module, configured to update the i-th rotation step length to obtain an i+1-th rotation step length; an iteration judging module, configured to judge whether a termination iteration condition is met, if yes, the antenna angle adjustment is ended, if not, i is added by one and the step of generating the adjustment instruction according to the i-th rotation step length and sending the adjustment instruction to the motor control module is returned to; a step length gradient calculating module, configured to calculate a step length gradient according to the difference and the i-th rotation step length; an overshoot judging module, configured to judge whether an absolute value of the step length gradient is greater than a preset gradient threshold, if yes, it is determined that an overshoot phenomenon occurs, if not, it is determined that no overshoot phenomenon occurs; when it is determined that the overshoot phenomenon occurs, the step length updating module is further configured to: when it is determined that the difference is greater than zero, an updated momentum is obtained according to the step length gradient, a preset learning rate and a momentum decay factor; the i+1-th rotation step length is obtained according to the i-th rotation step length, the momentum decay factor and the updated momentum; when it is determined that the difference is less than zero, the momentum is updated to zero and the i+1-th rotation step length is obtained according to the step length gradient, the learning rate and the momentum decay factor.
6. A method of adjusting the angle of an antenna, characterized by, executed by the motor control module, comprising: receiving the adjustment instruction sent by the main control module; controlling the antenna to rotate according to the adjustment instruction and a pre-configured motion control model; wherein the main control module is the main control module in any one of claims 1-5.
7. The method of claim 6, wherein, controlling the antenna to rotate according to the adjustment instruction and a pre-configured motion control model, comprising: establishing a motor angle matrix based on rotation angles of all motors on the antenna; obtaining a current angle matrix according to the motor angle matrix and a current angle state of the antenna; obtaining a target angle matrix according to the motor angle matrix and the adjustment instruction; calculating a matrix difference value of the target angle matrix and the current angle matrix, and controlling the antenna to rotate according to the matrix difference value.
8. The method of claim 6, wherein, controlling the antenna to rotate according to the adjustment instruction and a pre-configured motion control model, comprising: obtaining a step angle of each motor; constructing a step angle function about a target position of the motor according to the step angle, and obtaining a coefficient matrix of the step angle function; obtaining an assignment of the coefficient matrix according to the adjustment instruction, and controlling the antenna to rotate according to the assignment of the coefficient matrix.
9. An apparatus for adjusting the angle of an antenna, comprising: the device is arranged in the motor control module, comprising: a receiving module, configured to receive the adjustment instruction sent by the main control module; a motion control module, configured to control the antenna to rotate according to the adjustment instruction and a pre-configured motion control model; wherein the main control module is the main control module in any one of claims 1-5.
10. A system for adjusting the angle of an antenna, characterized by comprising a main control module, a motor control module and at least one antenna, at least one motor is arranged on the antenna, the main control module is in communication connection with the motor control module, the main control module is used to execute the method for adjusting the antenna angle in any one of claims 1-4, and the motor control module is used to execute the method for adjusting the antenna angle in any one of claims 6-8.
11. The system for adjusting the angle of an antenna according to claim 10, wherein, The system further comprises a battery management module and a battery, the battery management module being configured to control charging of the battery when the system is powered on, and the battery being configured to supply power to the motor control module when the system is powered off.
12. The system for adjusting the angle of an antenna of claim 10, wherein, The system further comprises a display module, which is in communication connection with the main control module, and the display module is configured to indicate the rotation state of the antenna.
Citation Information
Patent Citations
Antenna beam tracking device and method of moving communication satellite communication system
CN101916915A