An Optimal Geometry Configuration Algorithm of Hybrid Semi-Passive Location System Based on Mayfly Optimization Algorithm

In view of the demand of location awareness in a special complex environment, for an unmanned aerial vehicle (UAV) airborne multi base-station semi-passive positioning system, the hybrid positioning solutions and optimized site layout in the positioning system can effectively improve the positioning accuracy for a specific region. In this paper, the geometric dilution of precision (GDOP) formula of a time difference of arrival (TDOA) and angles of arrival (AOA) hybrid location algorithm is deduced. Mayfly optimization algorithm (MOA) which is a new swarm intelligence optimization algorithm is introduced, and a method to find the optimal station of the UAV airborne multiple base station’s semi-passive positioning system using MOA is proposed. The simulation and analysis of the optimization of the different number of base stations, compared with other station layout methods, such as particle swarm optimization (PSO), genetic algorithm (GA), and artificial bee colony (ABC) algorithm. MOA is less likely to fall into local optimum, and the error of regional target positioning is reduced. By simulating the deployment of four base stations and five base stations in various situations, MOA can achieve a better deployment effect. The dynamic station configuration capability of the multi-station semi-passive positioning system has been improved with the UAV.


Introduction
At present, people are increasingly dependent on location services. In addition to indoor and outdoor applications, location awareness applications for extreme environments are also increasing, such as searching and rescuing after natural disasters, submarine sensor network positioning, etc. In this paper, the mobile phone positioning system working in an earthquake disaster environment is studied. Because of the complexity of the ruined environment, the positioning accuracy is greatly influenced by the multipath and non-line-of-sight (NLOS) propagation. To increase the positioning accuracy, finding an optimal geometric configuration algorithm for the location system is one of the auxiliary means. Recently, unmanned aerial vehicles (UAV) have been shown to be quite effective in situations such as surveillance and search and rescue (SAR) [1]. This paper mainly studies the SAR problem of a combination of multiple UAVs. In natural disasters, especially earthquakes, rescuing survivors in the shortest possible time is critically important. Using UAVs with location base-stations can help reducing search time because UAVs can provide the location of victims with a telephone in need in an unprecedented and efficient way [2]. The airborne base station is used in the wireless positioning system, which improves the flexibility of the base station layout.

Time Difference of Arrival (TDOA) and Angle of Arrival (AOA) Hybrid Positioning Algorithm
A semi-passive positioning system in the ruin environment is composed of one master base station and n slave base stations as shown in Figure 1. The master base station as the transmitter induces the target to send the access request signal (PCH, paging channel), then the n base stations capture the access signal (PRACH, physical random access channel), to measure and deduce the TDOA and AOA formulas of the n + 1 base stations. Consider a three-dimensional (3D) scenario, the coordinate vector of the master station is expressed as s 0 = [x 0 , y 0 , z 0 ] T , the coordinate vector of the slave stations is expressed as s i = [x i , y i , z i ] T , i = 1, 2, · · · , N the position coordinate vector of the tested terminal (target) is expressed as s t = [x t , y t , z t ] T . d i indicates the distance from the positioning target to the base station [31].

Time Difference of Arrival (TDOA) and Angle of Arrival (AOA) Hybrid Positioning Algorithm
A semi-passive positioning system in the ruin environment is composed of one master base station and n slave base stations as shown in Figure 1. The master base station as the transmitter induces the target to send the access request signal (PCH, paging channel), then the n base stations capture the access signal (PRACH, physical random access channel), to measure and deduce the TDOA and AOA formulas of the n + 1 base stations. Consider a three-dimensional (3D) scenario, the coordinate vector of the master station is expressed as = [ , , ] , the coordinate vector of the slave stations is expressed as = [ , , ] , = 1,2, ⋯ , the position coordinate vector of the tested terminal (target) is expressed as = [ , , ] . indicates the distance from the positioning target to the base station [31].

TDOA Equations
Here, the TDOA measurement values of different receivers are multiplied by the signal propagation speed to get the distance difference between the target and the corresponding receiver. The distance value of each pair of transceivers is equal to the line-ofsight distance of the corresponding transmitter and receiver plus the TDOA measured by the receiver. There is a linear relationship between TDOA and the distance between the transmitter and receiver. As shown in the figure above, the master station is used as the transmitter, and the distance from the receiver i can be calculated by the following formula: where , is the distance between the slave station and the master station, is the distance between the target and the master station and is the distance between the target

TDOA Equations
Here, the TDOA measurement values of different receivers are multiplied by the signal propagation speed to get the distance difference between the target and the corresponding receiver. The distance value of each pair of transceivers is equal to the line-of-sight distance of the corresponding transmitter and receiver plus the TDOA measured by the receiver. There is a linear relationship between TDOA and the distance between the transmitter and receiver. As shown in the figure above, the master station is used as the transmitter, and the distance from the receiver i can be calculated by the following formula: where d 0,i is the distance between the slave station and the master station, d 0 is the distance between the target and the master station and d i is the distance between the target and the where · is the l 2 -norm.
Equation (1) can be rewritten as: Submit Equations (2) and (3) into Equation (4), and then squaring the two sides of the equation lead to Equation (5) Do the calculation of Equation (5) for all slave base stations, and obtain the matrix form: where e i is a unit matrix.

AOA Equations
The AOA method is to measure the direction of arrival of the received signal from the azimuth and elevation angles of the receiver to the target, and the azimuth angle α i and elevation angle β i of the ith receiver can be defined as: Define a vector as the compact form: Using the trigonometric formula, Equations (8) and (9) can be represented as: x sin β i cos α i − y sin β i sin α i − z cos β i = x i sin β i cos α i − y i sin β i sin α i − z i cos β i (12) Then Equations (11) and (12) can be written in the compact form: Sensors 2021, 21, 7484 Extending Equation (13) to all receivers, the final AOA equation is expressed as: where

TDOA and AOA Hybrid Positioning
Combination Equations (6) and (15) yield the hybrid positioning formulation: where, The above equations do not consider the influence of measurement noise, and the measurement values of each parameter in the actual positioning system inevitably have error noise. It is assumed that the measurement errors in TDOA and AOA are Gaussian random errors with a mean value of 0. The position solution analysis with measurement noise is as follows.
Suppose the distance measurement error in TDOA is represented by ω T , and the measurement error in AOA is represented by ω A , and the two are independent of each other. It can be expressed as follows: whered andγ are the measured values,d and γ are the correct values, d = d T 1 , · · · , d T N and γ = γ T 1 , · · · , γ T N the two vectors contain all noise-free measured values. The distance measurement error vector is expressed as where

Geometric Dilution of Precision (GDOP) Solution Process
In navigation and positioning systems, GDOP is a parameter to measure the geometric layout [13,21]. GDOP is the square root of the trace of CRLB, which is the inverse of FIM. The minimum GDOP represents the highest positioning accuracy. The solution process of GDOP is given below.

Cramer Rao Lower Bound (CRLB) Solution for Position Estimation
In the optimal case, the estimated value of the unbiased estimation variable can reach CRLB. The solution of CRLB can be obtained by inverting the FIM. The Fisher information matrix of the TDOA and AOA hybrid positioning algorithm is given by: where p(q, x t ) denotes the probability density function (PDF) of a parameterq for unknown variables x t , andq = d Tγ T is a vector that combines the noisy measured values in Equation (19). In the case of Gaussian observations, with covariance matrix C q . Then, invert the Fisher information matrix to obtain CRLB.
The first part of Equation (21) is distance measurement, and the second part is AOA measurement. C ωT and C ωA denote the error covariance matrix of TDOA and AOA, respectively, expressed as: 1.
The first part can be derived from where 2.
The second part can be derived from Write Equations (8) and (9) in vector form, which can be expressed as: Perform partial differential operations on both sides of Equation (25) to obtain as Then CRLB abbreviated form can be obtained as

GDOP of TDOA and AOA Hybrid Positioning
The definition of GDOP requires FIM to be reversible, that is, det(J) = 0. Usually analyze the necessary and sufficient conditions of det(J) = 0, and then use the equivalence principle of the proposition and its inverse proposition to obtain the corresponding condition of FIM reversibility.
CRLB of the hybrid positioning system has been obtained as shown in Equation (29), according to the definition of GDOP, GDOP is the square root of the trace of CRLB [22,23], which is the inverse of FIM [22,23].
where tr(·) is the matrix trace.

Mayfly Optimization Algorithm
The Mayfly optimization algorithm is an improvement of the particle swarm algorithm. It combines the advantages of PSO (particle swarm optimization) [32,33], GA (genetic algorithm) [34] and FA (firefly algorithm) [35] to offer a powerful hybrid algorithm structure. Based on the social behavior of mayfly, crossover technology and local search are used. Assuming that the mayfly will always be an adult after hatching, the strongest mayfly can survive. The position of each mayfly in the search space represents a potential solution. The working principle of the algorithm is as follows. Two groups of mayflies, male and female, are randomly produced in the problem space as a candidate solution, represented by a d-dimensional vector x = (x 1 , x 2 , · · · , x d ), and its performance is evaluated on a predefined objective function f (x). A speed vector is defined as v = (v 1 , v 2 , · · · , v d ) to represent the change in the position of the mayfly. The flight direction of each mayfly is a dynamic interaction between individual and social flight experience. In particular, every time the mayfly will adjust its trajectory to reach the personal best position, which is the best position reached by any mayfly in the group [30].
The implementation of the mayfly optimization algorithm mainly includes the following steps:

1.
Initialize the female and male mayfly populations and set the speed parameters.
Assuming that p t i is the current position of male mayfly i in the search space at time step t, q t i is the current position of female mayfly i in the search space at time step t. The speed of the male mayfly is: The process that the female mayfly attracts the male mayfly is modeled, and the formula for calculating the speed of female mayfly is: where v t ij is the speed of mayfly i (I = 1, 2, . . . , n) in dimension j (j = 1, 2, ..., d) at time step t, p t ij and q t ij is the position of male and female mayfly i in dimension j at time step t, a 1 and a 2 are positive attraction constant, β is a fixed visibility coefficient, r mf is the Cartesian distance between male and female mayfly. Finally, fl is a random walking coefficient, used when the female is not attracted by the male, so it flies randomly, and r is a random value in the range [−1 1].

2.
Calculate the fitness value and sort to obtain pbest i and gbest.
pbest i is the optimal position that mayfly i has never been to. Taking into account the problem of minimization, the individual optimal position pbest i at the next time step t + 1 is calculated by the following formula: where f is the objective function, which characterizes the quality of the solution, and the global optimal solution, gbest is defined as: The crossover operator represents the mating process of two mayflies. Parents are selected in the same way as females are attracted to males. In particular, the selection can be random or based on their fitness function. Subsequently, the best female matches the best male, the second best female matches the second best male, and so on. The result of the cross is two offspring, the results are as follows: Male refers to the male parent, and female refers to the female parent. L is a random number within a specific range, and the initial velocity of the offspring is set to zero.

3.
Update the positions of male mayflies and female mayflies in turn, and mate.
The next position can be obtained by adding a velocity v t+1 i , it can be expressed as: Calculate the fitness and update pbest and gbest; 5.
Whether the stop condition is met, if it is met, exit and output the result, otherwise repeat Steps 3-5.
The mayfly optimization algorithm can be described as the pseudo code shown in Algorithm 1. In the pseudo code, the update process of the female and male mayfly populations are combined. find pbest by (33), the best solution of each male mayfly 6: for I = 1:M2 7: for j = 1:d 8: Adjust female velocity by (32) 9: Adjust female positions by (37) 10: end for 11: end for 12: for I = 1:M2 13: for j = 1:d 14: Adjust male velocity by (31)  15: Adjust male positions by (36)  Rank male mayflies 20: Rank female mayflies 21: Mate the mayflies 22: Evaluate the offspring 23: Separate offspring to male and female randomly 24: Replace the worst solution with the best new one 25: Update pbest and gbest 26: end while 27: end

Flow Chart of MOA Station Deployment for Hybrid Positioning
This section mainly shows the process of station layout optimization. Firstly, the objective function must be determined. Here, the proposed objective function is defined as the average GDOP of the multi-base station TDOA/AOA hybrid positioning system. The dimensionality of the target variable is related to the base station number (n) and the dimensionality (D) of the base station coordinates (2D or 3D). The objective region is determined according to factors such as the communication range of the positioning system. Population initialization needs to determine the population size of female mayflies and male mayflies, initial position, initial velocity, visibility coefficient β, and positive attraction factors a1 and a2. The maximum number of iterations T must be determined, which is the parameter that determines the end of the optimization algorithm [36]. The specific optimization process is shown in Figure 2. Here we initialize the population size to 20, and the maximum number of iterations T = 100. Sensors 2021, 21, x FOR PEER REVIEW 10 of 21

Simulation
In this section, some simulations are proposed to evaluate the positioning performance of 3D TDOA and AOA using the geometric distribution of base stations optimized by GDOP. The simulated positioning system is aimed at LTE mobile communications in a complex environment, the positioning base stations are carried by UAVs, and the semipassive positioning of mobile terminals is achieved by acquiring the measured values of TDOA and AOA through the acquisition of random access signals.

Confirm the Model of Optimal Station Deployment
The optimization model of the multi-station semi-passive positioning system mainly includes three parts: independent variables, constraints, and objective functions.

Simulation
In this section, some simulations are proposed to evaluate the positioning performance of 3D TDOA and AOA using the geometric distribution of base stations optimized by GDOP. The simulated positioning system is aimed at LTE mobile communications in a complex environment, the positioning base stations are carried by UAVs, and the semipassive positioning of mobile terminals is achieved by acquiring the measured values of TDOA and AOA through the acquisition of random access signals.

Confirm the Model of Optimal Station Deployment
The optimization model of the multi-station semi-passive positioning system mainly includes three parts: independent variables, constraints, and objective functions.

Independent Variables
To achieve the optimal deployment of the positioning system, it is actually to determine the location where the positioning base station is located to minimize the positioning error in the target area [37,38]. Therefore, the independent variable of the optimal deployment model about the semi-passive TDOA and AOA positioning system is the coordinate position of the receiving base station. Assuming that the number of base stations is n + 1, if the station is deployed in a three-dimensional space, the coordinates of the base station are (x i , y i , z i ), where i = 0, 1, . . . , n. The self-variation of the optimal station deployment model in the three-dimensional space is (x 0 , y 0 , z 0 , x 1 , y 1 , z 1 , · · · , x N , y N , z N ,), it is 3(n + 1) dimensions in total.

Constraint Conditions
When the positioning system optimizes the deployment of stations, it will have certain requirements on the base station deployment area and target positioning area according to actual conditions, such as geographic location, communication conditions, noise interference, target movement range, etc., and the positioning accuracy must be based on the location of the base station within a certain range and the determined target in a certain area. Assuming that the location of the base station is s, the location of the target radiation source is x, the location area of the positioning system is R 1 , and the target area is R 2 , then the constraint conditions of the optimal deployment model are {s ∈ R 1 , x ∈ R 2 }.

Objective Function
The fitness function value is an important evaluation index, which is a criterion for retaining and eliminating individuals. For multi-station semi-passive positioning systems, selecting the GDOP value that characterizes the positioning accuracy index is more conducive to the optimization of station deployment. The smaller the GDOP value, the higher the positioning accuracy. In this paper, the average GDOP value of the positioning system for target positioning in a certain area is selected as the fitness function [39]. It is expressed as: where M is the number of the targets, m = 1, 2, · · · M. Firstly, traverse the positioning area to obtain the coordinates of M targets, and then find the average of the GDOP values, it is the objective function. The MOA optimization algorithm is to find the layout coordinates of the base stations when the objective function is the minimum, which is also the parameter estimated by the MOA algorithm. With reference to the geometric distribution of satellite positioning, assuming that the receiver clock error is zero, the geometric distribution of the positioned target and the satellite satisfies that the positioning error is small when the observation vector is perpendicular to each other, while the positioning error is large when the satellite is in the same direction corner. Therefore, the base station distribution range setting in the simulation surrounds the target range, and adjacent areas are perpendicular to each other [40].  1,5]. The error parameters in the positioning algorithm are as follows, standard deviation of TDOA measurement error is σ d = 10m, standard deviation of AOA measurement error is α 1 = α 2 = 0.01rad, where α 1 is about the azimuth, α 2 is about the elevation angle. The above description is the parameters of simulation scenario 1. Multiple algorithms, such as MOA, PSO, ABC (artificial bee colony algorithm) [38], and GA, are used to optimize the layout of the base station, and the number of simulation parameters population size and the number of iterations are the same. The population size is 20, and the number of iterations is 100. The simulation results are shown in Figure 3 and Table 1. Compared with the other three algorithms, the Mayfly optimization algorithm achieves better optimization results and obtains the smallest GDOP average value, which means that the optimized station layout can achieve the best positioning accuracy. However, if there is a lack of time to run enough number of iterations, the PSO algorithm is better than MOA (for a number of iterations from about 1 to about 22); GA is better than MOA for a number of iterations from about 6 to about 16.

Simulation of Optimized
Sensors 2021, 21, x FOR PEER REVIEW 12 of 21 elevation angle. The above description is the parameters of simulation scenario 1. Multiple algorithms, such as MOA, PSO, ABC (artificial bee colony algorithm) [38], and GA, are used to optimize the layout of the base station, and the number of simulation parameters population size and the number of iterations are the same. The population size is 20, and the number of iterations is 100. The simulation results are shown in Figure 3 and Table 1. Compared with the other three algorithms, the Mayfly optimization algorithm achieves better optimization results and obtains the smallest GDOP average value, which means that the optimized station layout can achieve the best positioning accuracy. However, if there is a lack of time to run enough number of iterations, the PSO algorithm is better than MOA (for a number of iterations from about 1 to about 22); GA is better than MOA for a number of iterations from about 6 to about 16.    In the case of MOA optimized station deployment, the contour map of GDOP is shown in Figure 4. The positioning of the base station is isotropic, and the results of the station layout around the rectangular area are shown. The optimal distribution of the base stations is close to the edge of the positioning area and is an approximate diamond shape. In the case of MOA optimized station deployment, the contour map of GDOP is shown in Figure 4. The positioning of the base station is isotropic, and the results of the station layout around the rectangular area are shown. The optimal distribution of the base stations is close to the edge of the positioning area and is an approximate diamond shape.

Simulation Scenario 2
Simulation scenario 2 is an area of 400 × 400m, the targets to be located are distributed in the middle area, and the base stations of the positioning system are distributed around.  Figure 5, the collapsed building has two or three floors. The collapse model includes stacked collapse, supported collapse and completely collapsed. And the measurement errors of each base station are different, which is brought about by the complexity of the channel environment. Assume that the standard deviations of TDOA distance measurement error and AOA angle measurement error in positioning are, respectively, σ = 12 , σ = 10 , σ = 8 , α _ = α _ = 0.01 , α _ = α _ = 0.02 , α _ = α _ = 0.015 , α _ = α _ = 0.017 where α _ is about the azimuth, α _ is about the elevation angle.  Figure 5, the collapsed building has two or three floors. The collapse model includes stacked collapse, supported collapse and completely collapsed. And the measurement errors of each base station are different, which is brought about by the complexity of the channel environment. Assume that the standard deviations of TDOA distance measurement error and AOA angle measurement error in positioning are, respectively, is about the elevation angle.
Without optimizing the layout, place the base stations arbitrarily within the distribution range of the base stations. The GDOP diagram is shown in the Figure 6 Without optimizing the layout, place the base stations arbitrarily within the distribution range of the base stations. The GDOP diagram is shown in the Figure 6. The positioning accuracy of the entire area is greater than 3 m. The simulation deployment station is limited by the actual conditions of the ruin environment. There are three types of deployment station ranges, namely, the surrounding layout, the double-sided deployment station, single-sided deployment and the vertical adjacent deployment station. The simulation process is as follows: first, the MOA algorithm is used to optimize the deployment of the three ranges, and the simulation results are the optimal base station coordinates and the optimal fitness value (the minimum value of the average GDOP value). Then, solve the GDOP value under the optimal base station layout, and draw the contour line of GDOP. The simulation results of the three cases are shown in Table 2   The simulation deployment station is limited by the actual conditions of the ruin environment. There are three types of deployment station ranges, namely, the surrounding layout, the double-sided deployment station, single-sided deployment and the vertical adjacent deployment station. The simulation process is as follows: first, the MOA algorithm is used to optimize the deployment of the three ranges, and the simulation results are the optimal base station coordinates and the optimal fitness value (the minimum value of the average GDOP value). Then, solve the GDOP value under the optimal base station layout, and draw the contour line of GDOP. The simulation results of the three cases are shown in Table 2 and Figures 7-10. Note that the red triangles in the figures represent the location of the base station. The simulation deployment station is limited by the actual conditions of the ruin environment. There are three types of deployment station ranges, namely, the surrounding layout, the double-sided deployment station, single-sided deployment and the vertical adjacent deployment station. The simulation process is as follows: first, the MOA algorithm is used to optimize the deployment of the three ranges, and the simulation results are the optimal base station coordinates and the optimal fitness value (the minimum value of the average GDOP value). Then, solve the GDOP value under the optimal base station layout, and draw the contour line of GDOP. The simulation results of the three cases are shown in Table 2 and Figures 7-10. Note that the red triangles in the figures represent the location of the base station.
From the simulation results of four base station layout optimization, it can be seen that for the positioning of targets in a fixed area, the deployment of stations has a significant impact on the positioning accuracy. Comparing Figures 6-10, the GDOP value in most of the positioning areas in Figures 6-8 is less than 3 m, and the positioning performance of the station placement results is better than the random station placement shown in Figure 5. Most of the GDOP values shown in Figure 10 are larger than 3 m, and the positioning accuracy is the worst, so deploying base stations on one side of the positioning area is the   1 S0 is the master station. S1, S2 and S3 are the slave stations.

Positioning Simulation of Five Base Stations in Simulation Scenario 2
The five-base station positioning system improves the positioning accuracy by increasing the number of base stations when the deployment conditions are not good. The simulation is based on the vertical adjacent distribution of four base stations, adding a fixed base station. The location of the base station is divided into three situations. The main base station S 0 is fixed and the coordinates are respectively (-200, 200, 3) or (180, -180, 3) or (-200, -200,3). The simulation results are shown in Table 3 and Figures 11-13.
From the simulation results of the five base stations, it can be seen that when the deployment of the base stations is restricted, the purpose of improving the positioning accuracy can be achieved by increasing the number of base stations. The location of the added base station will also affect the positioning accuracy. The fitness values of the three different main base station fixed points are: 2.4308, 2.2625, and 2.3165, which all exceed the fitness value of the four base station distribution. The average GDOP under the above seven layout situations is shown by a histogram as shown in Figure 14.      From the simulation results of the five base stations, it can be seen that when the deployment of the base stations is restricted, the purpose of improving the positioning accuracy can be achieved by increasing the number of base stations. The location of the added base station will also affect the positioning accuracy. The fitness values of the three different main base station fixed points are: 2.4308, 2.2625, and 2.3165, which all exceed the fitness value of the four base station distribution. The average GDOP under the above seven layout situations is shown by a histogram as shown in Figure 14.
In addition, we have also carried out the optimization problem of adding more base stations with fixed base stations in the four corners of the area, with 6-8 base stations we respectively obtained the best fitness equals 2.1314, 7, 2.0208, 1.8803. It can be seen that the accuracy of positioning is improved when the number of the base station is increased. However, these simulation results ignore the problems of positioning settlement, ranging and angle measurement error, and cost caused by the addition of base stations. If we want to reach accurate conclusions, this will be carried out in the follow-up research work. In addition, we have also carried out the optimization problem of adding more base stations with fixed base stations in the four corners of the area, with 6-8 base stations we respectively obtained the best fitness equals 2.1314, 7, 2.0208, 1.8803. It can be seen that the accuracy of positioning is improved when the number of the base station is increased. However, these simulation results ignore the problems of positioning settlement, ranging and angle measurement error, and cost caused by the addition of base stations. If we want to reach accurate conclusions, this will be carried out in the follow-up research work. In addition, we have also carried out the optimization problem of adding more base stations with fixed base stations in the four corners of the area, with 6-8 base stations we respectively obtained the best fitness equals 2.1314, 7, 2.0208, 1.8803. It can be seen that the accuracy of positioning is improved when the number of the base station is increased. However, these simulation results ignore the problems of positioning settlement, ranging and angle measurement error, and cost caused by the addition of base stations. If we want to reach accurate conclusions, this will be carried out in the follow-up research work.

Discussion
This paper proposes an optimal geometric configuration algorithm for UAV airborne base stations, it is in TDOA and AOA hybrid positioning in the specified area by using the Mayfly optimization algorithm. The average GDOP value of the target in the positioning area is used as the objective function to optimize the deployment of the base stations. The simulation and analysis of the optimization of the different number of base stations, compared with other station layout methods, such as PSO, GA and ABC. MOA is less likely to fall into local optimal, and the error of regional target positioning is surely reduced. By simulating the deployment of four base stations and five base stations in various situations, MOA can achieve a better deployment effect. The dynamic station configuration capability of the multi-station semi-passive positioning system has been improved with the UAV. The simulation verifies that the MOA algorithm has better optimization performance than other swarm intelligent algorithms. Using the same population size and the same number of iterations, the MOA optimization result can obtain the smallest fitness value. In the case of the restricted area of the ruined environment, combined with the complexity of the channel, the measurement errors of TDOA and AOA in different directions are different. The optimized layout of the four base stations and the five base stations was simulated, and the optimal layout of the different stations was obtained. According to the comparison of the station layout scheme, the positioning system layout should avoid the same side as much as possible. Increasing the number of base stations can significantly increase the positioning accuracy. In a word, the positioning accuracy can be improved by optimizing the geometric distribution station.