IN-ME Position Error Compensation Algorithm for the Near-Field Beamforming of UAVs

: The target of an unmanned aerial vehicle swarm will present near-ﬁeld characteristics when it is integrated as an array, and the existence of the unmanned aerial vehicle swarm motion error will greatly deteriorate the beam pattern formed by the array. To solve these problems, a near-ﬁeld array beamforming model with array element position error is constructed, and the Taylor expansion of the phase difference function is used to approximately simplify the model. The improved Newton maximum entropy algorithm is proposed to estimate and compensate for the phase errors. The maximum entropy objective function is established, and the Newton iterative algorithm is used to estimate the phase error iteratively. To select the proper Newton iteration initial value, based on a single reference source signal, the initial value of the phase error is estimated through the phase gradient information of the received array signal. Beamforming is carried out after phase error compensation regarding the array. In order to assess the mismatch of the phase error compensation function based on the proposed method, when the beam is scanning, the effectively compensated spatial area of the array beamforming is divided, which lays a foundation for subsequent spatial region division and unmanned aerial vehicle swarm path planning. The simulation results show that the beam formed by the method proposed in this paper has a lower sidelobe level, and as the signal-to-noise ratio changes, the robustness of the proposed method is better validated. The proposed algorithm can effectively suppress the adverse inﬂuence of array element position error on array beamforming, and when the beam is scanning, the effectively compensated area of the phase error compensation function is divided, based on the proposed method.


Introduction
With the development of beamforming technology and unmanned aerial vehicle swarm (UAVs) technology, the antenna array elements equipping the UAVs are combined into a distributed beamforming system through collaboration among the swarm to achieve directional high gain signal transmission. Therefore, using beamforming technology to improve the combat capability of UAVs in a fierce confrontation environment is a growing trend [1]. It is obvious that taking UAVs as an array has many advantages, such as using low-cost UAVs to achieve high gain signal transmission, which is also known as the beam pattern, but the targets of the array are often located in the near-field, and the motion error [2][3][4][5] of a single UAV as an array element will deteriorate the beam pattern formed by the array. At present, the array position error calibration is mainly founded on the calibration method of three or more known radiant sources, based on far-field signals, or the rotating array calibration method, based on a single known as a radiant source [6][7][8], but the latter is, in essence, also a multi-radiant source calibration method exchanging time for space. Reference [2] proposes using three simultaneously existing auxiliary sources wave. As shown in Figure 1, it is assumed that the near-field antenna array of N UAVs which can be seen as N elements is linearly distributed along the axis x at equal intervals, the total length of the array is L, the coordinate of the nth element is (x n , 0), where, n = 1, 2, · · · , N, and − L 2 ≤ x n ≤ L 2 , r n refers to the distance from the nth antenna array element to the source P, R refers to the distance from the source P to the array center O, θ is the included angle between OP and the axis y, and when the direction of OP projection on the x axis is the same as positive direction of the x axis, θ is positive, and vice versa. The coordinate of source P is P(x P , y P ).

Array Signal Model
Under the condition of targets being in the near-field, the assumption that the electromagnetic wave is the plane wave is not tenable, and it should be modeled as a spherical wave. As shown in Figure 1, it is assumed that the near-field antenna array of N UAVs which can be seen as N elements is linearly distributed along the axis x at equal intervals, the total length of the array is L, the coordinate of the nth element is , 0 , where, = 1,2, ⋯ , , and − ≤ ≤ , refers to the distance from the nth antenna array element to the source P, R refers to the distance from the source P to the array center O, θ is the included angle between OP and the axis y, and when the direction of OP projection on the x axis is the same as positive direction of the x axis, θ is positive, and vice versa. The coordinate of source P is , . ...
where, = 2 is the radiant signal of the source P, j is the imaginary unit, f is the radiant signal frequency, λ is the wavelength, = is the wavenumber, and Δ n r is the wave path difference from the source P to the nth antenna array element, with the array center O as the reference point. Theorem 1 is also known as Taylor's theorem. For the antenna array composed of UAVs, although the targets of interest in wireless communication, electronic reconnaissance, and jamming are generally located in the near-field of the array, the distances from the targets of interest to the antenna center are usually much greater than the aperture of the antenna. Therefore, it can be assumed that ≫ ≥ 2| |. Then, the Taylor series expansion of Δ n r can be obtained by ( ) ( ) For any radiant source P in the near-field, according to the spherical wave theory, the radiant signal received by the array element can be expressed as where, A = Aexp(j2π f t) is the radiant signal of the source P, j is the imaginary unit, f is the radiant signal frequency, λ is the wavelength, k = 2π λ is the wavenumber, and ∆r n is the wave path difference from the source P to the nth antenna array element, with the array center O as the reference point. Theorem 1. ( [24]) Suppose that r(x) is a differentiable function for which r (a), · · · , r (n) (a) all exist, and there is neighborhood U(a) of a , in which the function value of r(x) at x = a can be written as r( Theorem 1 is also known as Taylor's theorem. For the antenna array composed of UAVs, although the targets of interest in wireless communication, electronic reconnaissance, and jamming are generally located in the near-field of the array, the distances from the targets of interest to the antenna center are usually much greater than the aperture of the antenna. Therefore, it can be assumed that R L ≥ 2|x n |. Then, the Taylor series expansion of ∆r n can be obtained by Through Equation (2), the phase difference between the received signal of the nth array element and the received signal at the array center O is  (1) and ignoring the influence of distance on signal amplitude, the received signal model of the nth array element in the near-field can be approximately written as For M radiant sources in the near-field, the radiant signal amplitude of the mth radiant source is A m , the frequency is f m , the polar coordinate is (θ m , R m ), and the distance from the nth array element to the mth radiant source is r nm , where, m = 1, · · · , M. Then, the received signal of the array is where, [·] T represents matrix transpose, and the N × 1 dimensional vector a(θ m , R m ) is the steering vector of the array under the mth radiant source. The received signals of each array element are weighted and summed to obtain the array output as, which is beamforming where, [·] H represents the conjugate transpose of the matrix, and W = w 1 w 2 · · · w N T is the N × 1 dimensional weighted vector of the array. When the polar coordinate of the expected signal is (θ P , R P ), and the distance from the nth array element is r nP , there is w n = exp(−jk∆r nP ), where, ∆r nP = − sin θ P · x n + cos 2 θ P 2R P x 2 n .

Actual Near-Field Beamforming
When there are errors in the positions of the array elements, the actual coordinate of the nth array element is (x n ,ŷ n ), where,x n = x n + ∆x n , andŷ n = y n + ∆y n . Under the model of this paper, y n = 0. Similar to 2.1., the modified actual wave path difference ∆r n in the Taylor series expansion is ∆r n ≈ − sin θx n − cos θŷ n + cos 2 θ 2Rx Mathematics 2022, 10, 3256

of 18
By using Equation (10) to approximately simplify s(x n ), the actual nth array signal model can be expressed as Then the actual received signal of the array iŝ where,X = X 1X2 · · ·X N T is an actual N × 1 dimensional received data vector, s m (x n ) is the actual mth, m = 1, · · · , M is the received radiant source signal,Â(θ, R) is an actual N × M dimensional array steering vector, and where, w en is the error value of the nth array element. When M = 1, the actual beamforming formula can be written asŶ where, w * n is the conjugate complex of w n . Obviously, due to the presence of array position errors and noises, it is impossible to effectively carry out near-field beamforming by using the signal weight that can be obtained when the array is at the nominal value to compensate for the actual signal.

IN-ME Phase Error Compensation Algorithm Based on Reference Source
Only by compensating for phase error can the array effectively form a beam pattern. We propose the IN-ME algorithm, which, compared to Newton maximum entropy (N-ME) algorithm, can obtain higher convergent value within a shorter period, as well as form a lower sidelobe-level beam pattern with a higher SNR.

Phase Error Estimation Based on Newton Maximum Entropy Algorithm
Entropy is a measurement of information uncertainty. The maximum entropy principle is a criterion of probabilistic model learning, and when the probability distribution of random variables obeys uniform distribution, the entropy reaches its highest level. As for beamforming, we expect that after phase error compensation, the synthetic powers in the main-lobe direction of the array's received signals in all snapshots increase, which becomes a multi-objective optimization problem. If we regard the ratio of synthetic power in the main-lobe direction of the array's received signals in one snapshot to the sum of the synthetic powers in all snapshots as the probability distribution, compared to the maximum entropy principle, it can be seen as that when this ratio obeys uniform distribution, the synthetic power in every snapshot can increase, which means that the phase error compensation is effective for the signals in every snapshot. Therefore, the objective function should be the maximum entropy of that ratio.
Assuming that there is a reference source in the target scene, if the array beamforming is expected to form a main-lobe at the source, the weighted value of the array can be obtained as W = w 1 w 2 · · · w N T . When the snapshots are certain, Q g , representing the total ideal synthetic power of all snapshots at the reference point, is a constant, and can be obtained by where, SS is the total number of snapshots, and G(ss) is the synthesized signal at the reference source after ideally weighting and summing the received signals in the ssth snapshot. The synthetic power in the main-lobe direction of the array's received signals in one snapshot can be obtained by where, (s(x n ) + v n ) ss is the received signal in the ssth snapshot of the array element, and ϕ n is the phase error of the nth array element to be estimated. Because Q g is a constant, the entropy objective function of g(ss) can be written as The entropy objective function E g is the function of the phase ϕ n to be estimated. Thus, the phase estimation based on the maximum entropy can be expressed aŝ Theorem 2. ( [25]) Suppose that E (x), which is the second derivation of E, is continuous in an open neighborhood of a , and that E (a) = 0 and E (x) is negative definite. Then a is a strict local maximizer of E(x).
Proof. Because E (x), which is also known as the Hessian, is a continuous and negative definite at a, we can choose a radius r > 0 so that , giving the results.
By combining Theorem 1 and Theorem 2, we can use the Newton method for Formula (20). There is an iterative solution of ϕ n as where, superscript (l) indicates the lth iteration. To solve Equation (21), the first and second derivation of E g against ϕ n need to be calculated. The first derivative expression can be expressed as The second derivative expression can be expressed as where, where, Re(·) represents the real part operation. In practical cases, the phase errors in signals received by different array elements are relatively independent from each other [26]. Therefore, the phase error of each array element is searched separately, and in Formula (23), only the diagonal elements of the Hessian, which is also the second derivative , of the entropy with respect to phase error are derived, while the off-diagonal elements ∂ 2 E g ∂ϕ n ∂ϕ m , n = m are ignored. By taking Equations (24) and (25) into Equation (22), the analytical formula of the first derivative is obtained By taking Equation (24) to Equation (28) into Equation (23), the analytical formula of the first derivative is obtained Re 2 n n n n n g ss g ss g ss g ss g ss g ss g ss g ss g ss 2 2R e n n n g ss g ss g ss g ss represents the real part operation.
In practical cases, the phase errors in signals received by different array elements relatively independent from each other [26]. Therefore, the phase error of each array ment is searched separately, and in Formula (23), only the diagonal elements of the H sian, which is also the second derivative By taking Equations (24) and (25) into Equation (22), the analytical formula of first derivative is obtained  (24) to Equation (28) into Equation (23), the analytical formul the first derivative is obtained After performing phase error calibration for Equation (16), the beamforming with error calibration is where, represents the Hadamard product of the matrix, and W c = w c1 w c2 . . . w cN

Initial Value Estimation of Phase Error Based on PG
According to the principle of Newton's maximum entropy algorithm, the selection of the initial value of the phase error will directly affect the iteration efficiency. If the initial value of the phase error is randomly selected, such as directly setting the initial value of phase error to zero, which is the N-ME algorithm, it may not only greatly slow down the convergence speed of the algorithm, but also make the algorithm fall into the local optimal solution. Therefore, a method based on a reference source to select the initial value of the phase error is proposed to improve the N-ME algorithm.
When there are noises and array position errors, after weighting the received signals, the initial received signals of the array without phase error calibration can be written as When there are noises and array position errors, after weighting the received signals, initial received signals of the array without phase error calibration can be written as ere, ⋅   * represents conjugation, =  , 1, , n S n N represents the initial output signal of nth array element, and 1, , n n N represents the initial phase error of the nth ay element caused by noise and array position error. Ideally, after weighting the received signals, the phase error caused by different disces is fully compensated, and the PG between the output signals of the array elements onstant. For discrete sequences, the phase difference between the output signals of acent array elements is the PG. We define the correlation sequence of the array as The PG between adjacent elements is estimated as By taking the phase of the first array element as a reference, the initial value of phase or to be compensated for each array element is estimated by calculating the cumulative between adjacent array elements. There is represents the cumulative sum.
The IN-ME phase error compensation algorithm, based on the reference source, is wn in Algorithm 1.
where, [·] * represents conjugation, S n , n = 1, · · · , N represents the initial output signal of the nth array element, and ϕ (0) n , n = 1, · · · , N represents the initial phase error of the nth array element caused by noise and array position error.
Ideally, after weighting the received signals, the phase error caused by different distances is fully compensated, and the PG between the output signals of the array elements is constant. For discrete sequences, the phase difference between the output signals of adjacent array elements is the PG. We define the correlation sequence of the array as The PG between adjacent elements is estimated as By taking the phase of the first array element as a reference, the initial value of phase error to be compensated for each array element is estimated by calculating the cumulative sum between adjacent array elements. There is where, cusum(·) represents the cumulative sum. The IN-ME phase error compensation algorithm, based on the reference source, is shown in Algorithm 1.

Algorithm 1
The IN-ME phase error compensation algorithm based on reference source.
Input: received signals of arrayX, reference source P(x P , y P ) Output: beamform after phase error calibration Y Step 1: Calculate weighted signal, weights W = w 1 w 2 . . . w N T , and weighted signal S = W * X ; Step 2: Calculate the correlation sequence of the array, ρ = S 1 · S 2 S 2 · S 3 . . . S N−1 · S N T ; Step 3: Estimate initial value of phase error based on PG: 1. Estimate the PG between adjacent elements, 2. Estimate initial value of phase error, Step 4: Improved Newton Maximum Entropy Algorithm: 1. Calculate the array's synthetic signal at the reference source, 2. Form the entropy objective function, |g(ss)| 2 ln |g(ss)| 2 Q g ; 3. Calculate the first and second derivatives of E g to ϕ n , 4. Use Newton iterative method for optimization, ϕ Step 5: Beamform after error calibration,

Effectively Compensated Area
The phase error compensation based on phase error compensation function of the IN-ME algorithm is aimed at the situation in which the expected main-lobe of beamforming is just at the reference source P(x P , y P ). When the expected main-lobe of beamforming is not at the reference source, there is a mismatch between the phase error compensation function and the actual phase error. Thus, it is necessary to discuss the effectively compensated area based on the phase error compensation function of the IN-ME algorithm.
Assuming that the position errors of the array elements are independent of each other and meet the normal distribution with the mean value of 0 and the variance of σ 2 , which is, for the nth UAV element, ∆x n ∼ N 0, σ 2 and ∆y n ∼ N 0, σ 2 , and the two-dimensional joint distribution of the two also meets the normal distribution, according to the "3σ rule", the elements can be regarded approximately as that they are located in a circle with the radius centered on the ideal array element position, as shown in Figure 2. When the expected main-lobe of beamforming is at the source B(x B , y B ), but the reference source of the IN-ME algorithm is P(x P , y P ), the effectively compensated area based on the phase error compensation function of the IN-ME algorithm can be approximately solved by geometric methods. , it is considered that the compensation is effective [27,28]. There is where, A x and A y are respectively the x axis and y axis coordinates of point A.
As shown in Figure 2, crossing point A, the plumb line AF, which is perpendicular to PO, is made, and the point of intersection is point F. The plumb line AE, which is perpendicular to BO, is made, and the point of intersection is point E. We let α As shown in Figure 2, the perpendicular line of the α Δ angular bisector which is made through the center O of the circle intersects with the circle at ' A and ' C . Equation Obviously, when the actual position of the array element is on the circle, the phase error is larger than when it is in the circle. Point A is set as a moving point on the circle to represent the actual position of the nth array element. When the two sources, P(x P , y P ) and B(x B , y B ), have relative phase errors |∆ϕ BP | ≤ π 4 , it is considered that the compensation is effective [27,28]. There is where, x A and y A are respectively the x axis and y axis coordinates of point A.
As shown in Figure 2, crossing point A, the plumb line AF, which is perpendicular to PO, is made, and the point of intersection is point F. The plumb line AE, which is perpendicular to BO, is made, and the point of intersection is point E. We let ∠AOB = α B , ∠AOP = α P , and ∠BOP = ∆α. When PO r e and BO r e , the electromagnetic wave from P(x P , y P ) or B(x B , y B ) to any point on the circle can be approximately simplified to the plane wave, and we have |PA − PO| ≈ FO and |BA − BO| ≈ EO. Then Equation (36) is approximately simplified as By using sum-to-product addition formulas, there is f it = 2r e sin ∆α Then there is max( f it) = 2r e sin ∆α 2 , when α B + ∆α 2 = π 2 + iπ, i = ±1, ±2, . . .
As shown in Figure 2, the perpendicular line of the ∆α angular bisector which is made through the center O of the circle intersects with the circle at A and C . Equation (38) shows that the expected point A which can get max(fit) approximately locates at A or C , according to The area of B(x B , y B ) that can be compensated based on P(x P , y P ) for the nth array element can be obtained by After finding out the upper and lower bounds of the area of B(x B , y B ) the phase error for each array element can be effectively compensated, and the area can be divided by finding the intersection of the area of all array elements. As shown in Figure 3, the connecting line from the nth array element to P(x P , y P ) is marked as line a n , n = 1, 2, 3, . . . , N, which is the angular bisector of 2∆α, and the line towards the negative angle direction is line b n , while the line towards the positive angle direction is line c n . The intersection point of line  As shown in Figure 3, the problem of finding the effectively compensated area is transformed into the problem of finding the intersection point of the lines, and the equations of the black line cluster a n , n = 1, 2, 3, . . . , N can be expressed as The equation of the green line cluster b n , n = 1, 2, 3, . . . , N can be expressed as The equation of the blue line cluster c n , n = 1, 2, 3, . . . , N can be expressed as Let k an = y P x P −x n , k bn = tan arctan y P x P −x n + ∆α , and k cn = tan arctan y P x P −x n − ∆α , and coordinates of H, D and G can be obtained by The analytic expressions of the red four sides g, e, d, and f are The area encircled by the four edges shown in Equation (45) is the effectively compensated area of B(x B , y B ) that can be compensated based on IN-ME algorithm.
By estimating and compensating the phase errors, the phase errors of the received signals caused by the position of the array elements in the array are calibrated so that the antenna array of UAVs can effectively carry out beamforming. The analysis of the effectively compensated area based on the reference source can provide a reference for the target area division and path planning of UAVs.

IN-ME Phase Error Compensation Algorithm Based on Reference Source
We suppose that the signal frequency f 0 = 300 MHz, wavelength˘= 1 m, number of array elements N = 26, array aperture L = 500˘, main-lobe of beam is at known radiant source P(x P , y P ), whose polar coordinates are θ P = 0 • or θ P = 6 • and R P = 30 km, the number of signal snapshots SS = 100, array element position error ∆x n and ∆y n are independent of each other, and they both meet the normal distribution with a mean value of 0 and a standard deviation of 3˘, and the low SNR is −3 dB. We use the N-ME algorithm, IN-ME algorithm, adaptive differential evolution algorithm (ADE) [29], and genetic algorithm (GA), respectively, to estimate the phase error; the changes in the maximum entropy of the array signal synthetic power, along with the number of iterations of the algorithms, are shown in Figure 4. The reason why we adopt ADE and GA is because they are both artificial intelligence algorithms, which are different from our algorithm and are widely used in solving multi-objective search problems and beamforming [29][30][31][32][33]. The objective function of both ADE and GA is the entropy objective function, as shown in Formula (19). The parameters of ADE are that the population number of the genetic algorithm is 100, the mutation rate is 0.5, and the crossover probability is 0.9. The parameters of GA are that the hybridization rate is 0.7, the mutation rate is 0.05, and the "roulette wheel" selection is used. The elitist retention strategy is adopted. It is worth noting that all of our simulation tests are respectively based on the average of 1000 Monte Carlo tests. As shown in Figure 4, the convergence rates of ADE and GA are slower than those of N-ME and IN-ME, and within 50 iterations, the entropy value of ADE and GA cannot reach the same high rate as those reached by N-ME or IN-ME, which shows that ADE and GA are inferior to N-ME and IN-ME, and this is because the search direction of ADE and GA is aimless, while N-ME and IN-ME search along the gradient descent direction. Compared with IN-ME, the N-ME algorithm will require more iterations and a longer period to converge, and will easily fall into local optimization, eventually reaching a smaller entropy value. Compared with the N-ME algorithm, the IN-ME algorithm proposed in this paper makes the entropy objective function of the algorithm converge faster and reach a larger entropy value, which verifies the effectiveness of IN-ME. Because of the adverse performance of ADE and GA, N-ME and IN-ME are used to form beams and make comparisons. After phase error compensation, when θ P = 0 • , beamforming is shown in Figure 5a. When the beam is scanning and θ P = 6 • , the compensation effect is shown in Figure 5b. objective function of both ADE and GA is the entropy objective function, as shown in Formula (19). The parameters of ADE are that the population number of the genetic algorithm is 100, the mutation rate is 0.5, and the crossover probability is 0.9. The parameters of GA are that the hybridization rate is 0.7, the mutation rate is 0.05, and the "roulette wheel" selection is used. The elitist retention strategy is adopted. It is worth noting that all of our simulation tests are respectively based on the average of 1000 Monte Carlo tests.
(a) (b) As shown in Figure 4, the convergence rates of ADE and GA are slower than those of N-ME and IN-ME, and within 50 iterations, the entropy value of ADE and GA cannot reach the same high rate as those reached by N-ME or IN-ME, which shows that ADE and GA are inferior to N-ME and IN-ME, and this is because the search direction of ADE and GA is aimless, while N-ME and IN-ME search along the gradient descent direction. Compared with IN-ME, the N-ME algorithm will require more iterations and a longer period to converge, and will easily fall into local optimization, eventually reaching a smaller entropy value. Compared with the N-ME algorithm, the IN-ME algorithm proposed in this paper makes the entropy objective function of the algorithm converge faster and reach a larger entropy value, which verifies the effectiveness of IN-ME. Because of the adverse performance of ADE and GA, N-ME and IN-ME are used to form beams and make comparisons. After phase error compensation, when θ = 0 o P , beamforming is shown in Figure   5a. When the beam is scanning and θ = 6 o P , the compensation effect is shown in Figure   5b.  As shown in Figure 4, the convergence rates of ADE and GA are slower than those of N-ME and IN-ME, and within 50 iterations, the entropy value of ADE and GA cannot reach the same high rate as those reached by N-ME or IN-ME, which shows that ADE and GA are inferior to N-ME and IN-ME, and this is because the search direction of ADE and GA is aimless, while N-ME and IN-ME search along the gradient descent direction. Compared with IN-ME, the N-ME algorithm will require more iterations and a longer period to converge, and will easily fall into local optimization, eventually reaching a smaller entropy value. Compared with the N-ME algorithm, the IN-ME algorithm proposed in this paper makes the entropy objective function of the algorithm converge faster and reach a larger entropy value, which verifies the effectiveness of IN-ME. Because of the adverse performance of ADE and GA, N-ME and IN-ME are used to form beams and make comparisons. After phase error compensation, when θ = 0 o P , beamforming is shown in Figure   5a. When the beam is scanning and θ = 6 o P , the compensation effect is shown in Figure   5b. As shown in Figure 5, whether beam scans or not, beams cannot be formed because of the uncompensated phase error; the sidelobe level of the N-ME algorithm is approximately −9.5 dB, and the sidelobe level of IN-ME algorithm is approximately −12 dB, which means that the beamforming algorithm proposed in this paper can better compensate for the phase error of array elements and obtain a lower sidelobe level.
In order to compare the ideal beamforming (IB) with noise, phase gradient beamforming (PGB), the N-ME beamforming algorithm, and the IN-ME beamforming algorithm in different SNR backgrounds, by taking beamforming without scanning as an example, scenarios in which SNR changes from −12 dB to 9 dB are simulated, and the beamforming results are shown in Figure 6.
As shown in Figure 6, with the SNR changing from −12 dB to 9 dB, both the N-ME and IN-ME algorithms can effectively form a beam pattern. When the SNR is low, using the phase error estimated by PG information to compensate the array cannot effectively form a beam pattern, but with increasing SNR, the beam formed by PG gradually improves, compared to the beam formed by the N-ME. The IN-ME beamforming algorithm proposed in this paper can continuously remain nearly the same as ideal beamforming with noise; when the SNR is low, it performs better than PGB, and when SNR is high, it performs better than the N-ME beamforming algorithm, which shows the advantages of the IN-ME algorithm.
In order to compare the ideal beamforming (IB) with noise, phase gradient beamforming (PGB), the N-ME beamforming algorithm, and the IN-ME beamforming algorithm in different SNR backgrounds, by taking beamforming without scanning as an example, scenarios in which SNR changes from −12 dB to 9 dB are simulated, and the beamforming results are shown in Figure 6. As shown in Figure 6, with the SNR changing from −12 dB to 9 dB, both the N-ME and IN-ME algorithms can effectively form a beam pattern. When the SNR is low, using the phase error estimated by PG information to compensate the array cannot effectively form a beam pattern, but with increasing SNR, the beam formed by PG gradually improves, compared to the beam formed by the N-ME. The IN-ME beamforming algorithm proposed in this paper can continuously remain nearly the same as ideal beamforming with noise; when the SNR is low, it performs better than PGB, and when SNR is high, it performs better than the N-ME beamforming algorithm, which shows the advantages of the IN-ME algorithm.

Effectively Compensated Area
We assume that the position errors corresponding to the phase errors Δ r x and Δ r y are independent of each other and meet the normal distribution of 0 mean value and  (40). The area that can be effectively compensated by each array element is within the area whose angular bisector is

Effectively Compensated Area
We assume that the position errors corresponding to the phase errors ∆x r and ∆y r are independent of each other and meet the normal distribution of 0 mean value and σ r = λ 2 , which is ∆x r ∼ N 0, λ 2 2 and ∆y r ∼ N 0, λ 2 2 . According to the "3σ rule", we can get r e = 1.5λ, and ∆α ≈ 4.77 • from Equation (40). The area that can be effectively compensated by each array element is within the area whose angular bisector is the line from the known radiant source P(x P , y P ) shown as red * to the ideal position of the array element, and the angular area is between 2∆α = 9.55 • , as shown in Figure 3. As shown in Figure 2, we set θ P = 0 • or θ P = 6 • , OP ≡ 30 km, and ∠POB ≡ ∆α = 4.77 According to Figure 7, we see that when the radiant source is located on the vertical line in the array, the effectively compensated area is greater than when it is located at a certain angle relative to the vertical line of the array. In order to verify the effectively compensated area shown in Figure  According to Figure 7, we see that when the radiant source is located on the vertical line in the array, the effectively compensated area is greater than when it is located at a certain angle relative to the vertical line of the array. In order to verify the effectively compensated area shown in Figure 7, taking Figure 7a as an example, let the radiant source M be a moving source, whose coordinates are y M ≡ y H and x M = −5 km : 0.01 km : 5 km, the main-lobe is expected to point to the direction of the radiant source M, and the phase calibration function based on the IN-ME algorithm is used to compensate the beamforming. The movement track of the radiant source M is shown by the thick solid green line in Figure 8a. The power value change in the direction of the radiant source M is calculated, which is in the direction of the main-lobe, and the boundary points H, G, and x P of P(x P , y P ) are marked, as shown in Figure 8b. According to Figure 7, we see that when the radiant source is located on the vertical line in the array, the effectively compensated area is greater than when it is located at a certain angle relative to the vertical line of the array. In order to verify the effectively compensated area shown in Figure 7, taking Figure 7a as an example, let the radiant source M be a moving source, whose coordinates are ≡ M H y y and = −5 km: 0.01 km: 5 km, the main-lobe is expected to point to the direction of the radiant source M, and the phase calibration function based on the IN-ME algorithm is used to compensate the beamforming. The movement track of the radiant source M is shown by the thick solid green line in Figure 8a. The power value change in the direction of the radiant source M is calculated, which is in the direction of the main-lobe, and the boundary points H, G, and P x of ( ) , P P P x y are marked, as shown in Figure 8b.  A conclusion similar to that in Figure 8 is obtained from Figure 9. When the radiant source M is outside the effectively compensated area, the power value in the main-lobe direction decreases by more than 1 dB, which is considered that the compensation is noneffective. When the radiant source M is within the effectively compensated area and the power value in the main-lobe direction drops within 1.5 dB, which is considered that the compensation is effective. The closer x M is to x P , the greater the power value is in the main-lobe direction, which means the better the compensation is.
All in all, as can be seen from Figures 8b and 9b, the method proposed in this paper divides the area into a subset of the area with the power value in the main-lobe direction decreasing by 3 dB as a boundary value, ensuring the effectiveness of the division area for compensation. This effectively compensated area is related to the selection of the effective standard for phase compensation in Equation (36).

Conclusions
In order to solve the problems of UAV near-field beamforming, UAV position error compensation, and the effectively compensated area of compensation, this paper firstly constructs a near-field array beamforming model based on element position error, and approximately simplifies the model using the Taylor expansion of the near-field signal phase difference function. Moreover, an IN-ME algorithm is proposed to estimate and compensate for the phase error. Based on the known reference source signal, the initial value of the phase error is estimated through the PG information of the array's received signal, and then the array signal entropy objective function is established to iteratively optimize the phase error value using the Newton iteration method, and the beam pattern is formed after the phase error compensation. Thirdly, when the beam scanning leads to the phase compensation function mismatch, based on the phase error compensation function of the IN-ME algorithm, the effectively compensated area is further divided, which lays a foundation for the subsequent area region division and UAV path planning. Finally, the validity of the conclusion is verified by simulation. By using the IN-ME algorithm proposed in this paper, the influence of a single UAV's position error on array beamforming is effectively suppressed, and the effectively compensated area is divided because of phase compensation function mismatch, which provides a theoretical basis for the UAV beamforming application in wireless communication, electronic reconnaissance, and jamming. As the signal wavelength becomes shorter, the adverse influence of the UAV's position error increases, and the beam pattern will deteriorate sharply, which is worthy of further research.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.