A Joint Optimization Algorithm for Trajectory Planning and Resource Allocation of Vehicle Mobile Base Stations for On-Demand Coverage Networks

: In today’s urban hotspot regions, service traffic exhibits dynamic variations in both time and location. Traditional fixed macro base stations (FMBSs) are unable to meet these dynamic demands due to their fixed coverage and capacity. Therefore, this paper introduces a novel algorithm for the joint optimization of the placement of terrestrial vehicle-mounted mobile micro base stations (mBSs), the correlation of service clusters (SCs) with mBSs, and resource assignments. The objective is to maximize the matching degree between network capacity and service demands while adhering to constraints related to the power, coverage, and bandwidth of mBSs, as well as the data rate required for the services. Additionally, we investigate the mobility of the mBSs towards the SCs in the spatiotemporal changing service demand network and obtain optimal trajectories for the mBSs. We begin by formulating the problem of maximizing the matching degree by analyzing the capacity provided by the base stations and the network service demand. Subsequently, we derive solutions to the optimization problem using our algorithm. The simulation results demonstrate that the proposed algorithm can effectively meet the capacity demand of dynamically changing hotspot regions and achieve on-demand


Introduction
The 6G network integrates traditional terrestrial mobile networks with emerging space and underwater networks to achieve a network architecture focused on "massive connectivity" and "low access delay", enabling seamless wireless connections for social interaction.It is expected to enhance service quality through ubiquitous coverage [1].However, the proliferation of terminal devices will generate a massive number of data and service demands, impacting the overall performance of existing networks.The capacity of fixed macro base stations is unable to adapt to the dynamic tidal effect of service traffic in urban hotspot regions, leading to coverage gaps caused by the current "signal coverage, no capacity coverage" phenomenon.These issues stem from the fixed and limited capacity coverage of FMBSs within their signal coverage area.This not only fails to meet dynamic service demands but also results in resource wastage within these networks.Therefore, the future wireless network architecture design will prioritize on-demand service coverage to meet varying service demands across different locations and times.Furthermore, as the volume of data streams and connected devices continues to grow, applications are introducing more immersive user experiences, placing further strain on communication resources [2].The substantial data and service demands in urban regions will impact the design of existing networks.Considering environmental and economic factors, network deployment today must consider not only data rates and throughput but also the energy required to sustain these rates.Thus, on-demand coverage of resources and services in the network presents an attractive method to ensure the sustainability of the existing infrastructure.Unmanned aerial vehicles (UAVs) serving as auxiliary cellular networks of aerial base stations (ABSs) have recently garnered significant attention from scholars both domestically and internationally [3][4][5][6][7][8][9][10][11].In various scenarios, such as temporary hotspots and emergencies, UAVs are frequently deployed as flying base stations (BSs) to substantially enhance the rate and coverage capabilities of wireless networks [4].When adverse weather conditions, natural disasters, or sharp increases in population flow during holidays render the existing communication infrastructure incapable of guaranteeing user services, UAVs can be employed as ABSs to restore communication capabilities.Tang et al. [6] optimized the three-dimensional deployment of UAVs to maximize the minimum throughput for all sensors while ensuring comprehensive coverage and considering co-frequency interference.To simultaneously reduce the transmission power of UAVs and increase the number of UEs that can be accessed, Ref. [7] plans to propose a 3D placement algorithm for UAVs and has comprehensively summarized existing research.Ref. [8] addressed communication coverage issues following disaster relief and proposed a method for planning user clustering and ABSs with the goal of maximizing the energy efficiency of the considered network.Compared to terrestrial BSs, UAV-based ABSs offer superior coverage and resource utilization and the added advantage of providing on-the-fly communications [9].The Google Loon project, employing a fleet of high-altitude balloons operating at an altitude of approximately 20 km in a coordinated manner to cover expansive geographical areas and offer wireless services to users, exemplifies this approach [10].However, operational restrictions, such as the no-fly policy for UAVs in urban areas, present challenges for the deployment of these flying BSs.In 2020, Google announced the discontinuation of the Loon project due to its substantial cost and operational sustainability challenges.Furthermore, UAVs encounter technological limitations.The communication range of UAV systems is constrained by the physical limitations of wireless transmission.As an increasing number of devices and communication systems operate within the same frequency bands, spectrum congestion becomes a challenge that UAVs must address, while these devices can also introduce signal interference for UAVs.From the perspective of UAVs, their flight distance is restricted by battery endurance, and severe weather conditions, such as strong winds, rain, and snow, pose potential threats to their operations [11].On the contrary, terrestrial vehicle-mounted mBSs are playing an increasingly important role in various existing networks [12][13][14][15][16][17][18].For instance, Ref. [12] mentions the advantages brought by the mobility of entities (e.g., vehicles, robots, drones, etc.).They simplify the average consensus algorithm in mobile wireless sensor networks (MWSNs) from a graph theory perspective, aiming to improve the convergence speed of time-varying topology systems.Ref. [13] proposes a network model that dynamically relocates an mBS within a cluster-based network infrastructure for WSNs.This approach achieves load balancing between sensor nodes, optimizes communication distances between cluster head nodes and mBSs, and enhances network lifespan and data transmission quality.To handle the energy hole problem in WSNs, mobile entities are typically introduced to prolong network lifespan.In this regard, Ref. [14] presents the greedy heuristic protocol for data collection, termed GHPDC, which selects energy-rich spots for the mBS to occupy.In response to surges of traffic within shopping centers, Ref. [15] introduces a green shopping center traffic model based on mBSs with dynamic sleep strategies.Moreover, Ref. [16] considers the estimation of node cardinality for each node type in heterogeneous wireless networks and formulates the problem of an optimal tour of the mBS around the region which covers all nodes and minimizes the travel cost of the mBS.This approach effectively reduces the time required to estimate the number of nodes for each node type.In addition, Ref. [17] designs a disaster-oriented vehicular elastic network and proposes a task-scheduling algorithm that does not rely on Internet collaboration to schedule mobile stations for disaster management tasks.Finally, in order to satisfy users' need for a high-quality experience and save resources, Ref. [18] collects mBS traffic data and mines this data to predict mBS traffic using a wavelet neural network short-term traffic prediction model.However, these studies did not account for dynamic changes in business requirements, the rationality of resource allocation, and the timeliness of trajectory planning.In addition, there are similarities between the trajectory planning problem of mBSs and the police patrol problem.In such problems [19], we can compare the locations of hotspot regions with crime hotspots in cities. Ref. [20] addresses the vehicle patrol and routing problem by repositioning the prior sequence of patrol vehicles based on the knowledge of request occurrence probabilities, aiming to minimize response time.Typically, patrol routes require periodic updates based on the latest information collected and crime prediction, posing a great challenge to real-time planning.Common trajectory planning algorithms include the A* algorithm [21], genetic algorithms (GAs) [22], the Dijkstra algorithm [23], artificial neural networks (ANNs), and ant colony optimization (ACO).Trajectory planning is divided into global and local planning, with graph search algorithms often used in practical applications due to their high efficiency.Existing research indicates that using cars equipped with the BSs in wireless networks has great potential.However, many challenges remain to be addressed, including determining the location of mBSs, wireless backhauling, service traffic that changes dynamically with spatiotemporal factors, trajectory planning of mBSs, and resource allocation.This paper addresses the above challenges by studying the matching degree between network capacity and service demands against the background of dynamically changing service demand with time and location and proposes a joint optimization algorithm for the trajectory planning and resource allocation of mBSs.The main contributions of this paper are summarized as follows:

•
We propose a novel algorithm for the joint optimization of mBSs' locations, the correlation between SCs and mBSs, and resource assignments.The objective is to maximize the matching degree between network capacity and service demands.Additionally, we investigate the mobility of mBSs in a spatiotemporal changing service demand network and determine the optimal trajectories for the mBSs.However, the optimization problem is a challenging mixed-integer, non-convex problem; • We present a scheme to optimize the deployment and correlation of mBSs while considering the given location of service requirements.The problem is divided into two subproblems, mBS location and bandwidth resource assignment, taking into account the SC-BS correlation.These subproblems are solved iteratively.The mBS locations are updated to solve the quadratic constraint quadratic programming (QCQP) problem.Simultaneously, the correlation question is transformed into a binary mathematical programming problem, and available majorization tools are employed to solve it.As the service demand dynamically changes with time and space, the positions of mBSs in the network also change over time.Leveraging the dynamic nature of mBSs, which can update their positions based on the spatiotemporal changing service demand process, we propose a method to optimize the mobility of mBSs and obtain their optimal trajectory.
Simulation results demonstrate that our proposed algorithm achieves on-demand, resilient coverage of hotspot regions in the network, outperforming traditional algorithms.The rest of the paper is organized as follows.In Section 2, we introduce the system model of the mBS serving the spatiotemporal network and the problem formulation for maximizing the capacity and demand matching degree.In Section 3, the problems with the existing systems are discussed in detail, and different solutions are proposed.Section 4 presents the simulation results of the proposed algorithm.Section 5 concludes the paper.

System Model
In this paper, we study the specific service scenario where multiple mBSs with trajectory planning provide services for urban hotspot regions, as shown in Figure 1.It is assumed that the distribution of service demands is known, and, since the service demands exceed the capacity provided by the FMBS, it is possible to divide service demands into different hotspot regions.We use I to represent the set of 5G mBSs and J to represent the set of SCs.It is well known that the traffic distribution in urban network scenarios changes with time and space, so the location of traffic generation in this paper is also uneven.We assume that the area of the hotspot region SC j ∈ J = {1, 2, . . ., J} for initiating service demands is S j (t).For each hotspot region, the service demands follow the Poisson Process with parameter ρ j .For any t ≥ 0 and ∆t 1 ≥ 0, let N(t) indicate the number of service demands initiated in the hotspot region within time (0, t]; then, the distribution can be described as follows:

Vehicle Mobile Micro Base Station
where ∆t 1 represents the basic slot length, and φ j represents the number of new service demands initiated in the hotspot region j within time interval ∆t 1 .Equation (1) shows that the number of service demands initiated in the hotspot region follows the Poisson distribution, and it is only related to the basic slot length.The mean value of service demands initiated in the hotspot region within time (0, t] is E[N(t)] = ρ j ∆t 1 S j (t), where t is a random time; therefore, the mean value of service demands initiated in the hotspot region per unit of time is ρ j S j (t).Since the initiation position of each service demand is known in each time slot, we need to determine the optimal communication position of the mBS i ∈ I = {1, 2, . . ., I} corresponding to each SC.The spatial position of each service in the current time slot can serve as an index to distinguish different SCs.We can use traditional K-means clustering algorithms to divide services into SCs.Services with similar temporal and spatial characteristics can be grouped into clusters.We assume that each mBS provides one-to-one communication services to its corresponding SC.Therefore, after clustering the services, the number of SCs will be the same as the number of mBSs.Therefore, each SC should establish a supply-and-demand service relationship with only one mBS.We can obtain this constraint as follows: where λ i,j ∈ {0, 1} is a binary variable indicating whether the mBS i and SC j are correlated, and 1 indicates that the mBS is correlated with the SC.In this paper, we show that the mBS can reach the optimal communication position of each corresponding SC.We assume that the mBS provides communication services within limited time range T. Please note that, for the sake of simplicity, we mainly pay close attention to the operation cycle of the mBS in time range T, thus ignoring the startup and shutdown phases of the mBS.We use x i (t) and y i (t) to represent the time-varying x and y coordinates of the mBS i, and the time-varying coordinate of the mBS can be expressed as (x i (t), y i (t)), 0 ≤ t ≤ T. We define the road network set as W, and w ∈ W = {1, 2, . . ., W}, (x i (t), y i (t)) ∈ W. The minimum distance traveled by the mBS in the time range T is d min = ((x 1 − x T ) 2 + (y 1 − y T ) 2 ).V max is the maximum speed of the mBS, where V max ≥ d min /T.We use ẋ2 i (t) and ẏ2 i (t) to represent the time derivatives of x i (t) and y i (t), so we have ( ẋ2 i (t) + ẏ2 i (t)) ≤ V max , 0 ≤ t ≤ T. Similarly, x j (t) and y j (t) denote the time-varying x and y coordinates of the optimal communication position of the SC j, and the time-varying coordinate of the SC can be expressed as (x j (t), y j (t)), 0 ≤ t ≤ T. To make the question explanatory, the time range T is discretized into K equidistant time slots.We use ∆t 2 , which represents another basic slot length.In order to make the position of the mBS exactly appear in each slot, ∆t 2 is small enough, and T = K∆t 2 .Because the time slot is small enough, the K-length sequence {x k=1 can be approximated to the trajectory of the mBS (x i (t), y i (t)) in time range T. The x-y coordinate of the mBS at time slot k is expressed by ).As a result, the mBS's mobility constraints can be expressed as: where V max ∆t 2 indicates the maximum distance of mBS movement per time slot.

Access Model of mBS-SC 2.2.1. Channel Model
To simplify and make the channel model practical, we make the assumption that the channel quality solely relies on the distance between the mBS and SC.The resulting channel model primarily relies on the Line-of-Sight (LoS) link as the main communication link.Furthermore, it is well known that the Doppler effect typically leads to signal degradation at the receiver.In this paper, the Doppler effect discussed is a result of the mobility of the mBS.Therefore, we assume that compensations can be made at the receiver [24].Consequently, we assume that the channel power gain from the mBS i to SC j during slot k adheres to the large-scale path loss model, which can be mathematically expressed as: where PL ave (dB) = 66.19 + 26.7 lg( 54 (including path loss index, shadow fading, and path loss at reference distance d 0 ), α 0 denotes the channel gain coefficient, ∥ is the range from the i-th mBS to the j-th SC at slot k, and denotes the j-th SC's x-y coordinate at slot k.

Data Transmission Rate of mBS
Following the clustering of services in each time slot, each SC is correspondingly served by an mBS.In order to enhance the communication efficiency of the mBS, it is essential to compute the optimal communication position and transmission power for each mBS.In addition, the mBS adopts dynamic spectrum access technology to optimize spectrum usage and enhance overall network performance.We consider an Additive White Gaussian Noise Channel (AWGNC) with a variance of σ 2 , and a mean of 0 is considered.It is assumed that the communication bandwidth of the mBS and the SC is fixed as B Tl , the maximum transmit power of the mBS is P max , and p i,j [k] is the transmit power allocated by the i-th mBS to the j-th SC in the k-th time slot.γ i,j [k] is the signal-to-noise ratio (SNR) from mBS i to the receiver within the SC j, and it can be expressed as: and the mean value is γi,j , where i = 1, 2, . . ., I, ∀j ∈ J .The probability density function of SNR can be expressed as: p i,j [k], k = 0, . . ., K is determined by the minimum SNR requirement of SC j.It can be obtained through the QoS requirements for Bit Error Rate (BER) BER * j and the modulation mode of SC j.If SC j adopts the M-QAM modulation mode, it is expressed as X i,j [k], and the minimum SNR required is γ * j .It can be obtained from Ref. [25].
It should be noted that Equation (7) represents the approximate SNR required, and the allocated power p i,j [k] should make the SNR in Equation ( 5) meet the minimum SNR requirement in Equation ( 7) so that γ i,j [k] in Equation ( 5) and γ * j in Equation ( 7) are equal and we can obtain: Assuming Shannon capacity is achieved, the instantaneous rate of the i-th mBS communicating with the j-th SC in the k-th time slot is: It can be seen from Equation ( 8) It can be seen from Equation ( 9) that the instantaneous rate R i,j [k] of SC j is a function of γ i,j [k].Here, we analyze bandwidth allocation and give the following constraints.The available bandwidth of the mBS is the upper limit of the sum of the bandwidth resources allocated to all SCs by each mBS.Therefore, ∑ j∈J λ i,j B Tl ≤ B max , ∀i ∈ I, (10) where B max is the total bandwidth of an mBS.In order to ensure that SCs can obtain the proper communication service, we set the goal rate µ j as the data rate required by SC j, and the rate of each SC will not be lower than µ j .So,

Coverage Analysis of mBS
When the mBS plans the dense network for the hotspot region, we consider whether the SC covered by the mBS can be determined by comparing the downlink SINR (ζ DL i,j , signal-to-interference-plus-noise ratio) received by the receiver within the SC with threshold ζ th .It is assumed that the transmit power allocated by the i-th mBS to the j-th SC in the k-th time slot is p i,j [k], so the power received by the j-th SC is p i,j [k]h i,j [k].We consider that the macro BSs and mBSs are assigned different carrier frequencies.Therefore, the cumulation of interference formed by every mBS except the mBS covering the target SC causes interference to the target SC.The SINR of the downlink target SC j is given by: where ς i is the cumulative interference, defined as: So, by putting Equation ( 13) into Equation ( 12), we have: where h i ′ ,j [k] is the average path loss from the i ′ -th interference of the mBS to the target SC j, expressed as: where ∥ is the distance between the i ′ -th interfering mBS and the target SC j at slot k.The coverage state of the j-th SC can be represented by binary variable If the downlink SINR between the mBS i and the SC j is greater than the threshold ζ th , the SC j is considered to be covered by the mBS i.
, the SC j is covered by the mBS i, 0, else. (16)

Capacity Analysis of mBS
We assume that the capacity of each mBS is C i .The i-th mBS in the k-th time slot can provide services with a capacity defined as . So, the capacity C I of all mBSs in the k-th time slot can be expressed as: From the previous sections, we know that the average number of service demands initiated in the hotspot region per unit of time is ρ j S j [k], and µ j is the data rate demands of the SC j.For any SC j, the i-th mBS will provide services for all intra SCs and also meet the target demand rate of the traffic.We obtain the capacity constraints of the hotspot region as follows:

Backhaul Model of mBS-FMBS
Since time slot k is very short, the mBS backhaul channel in time slot k is relatively stable.Therefore, we assume that the transmission rate of the backhaul link working in the k-th time slot is R Bl [k].

Channel Model
The technology of millimeter wave backhaul to the FMBS has reached a high level of maturity [26].Millimeter wave (mmWave) links offer the advantages of a large bandwidth and high transmission rates.Many existing studies have adopted this method [27].This paper selects the mmWave as the backhaul mode and models the mmWave backhaul channel using a spherical model.Based on varying propagation environments and distances between the receiving and transmitting terminals, mmWave links are categorized into LoS and Non-Line-of-Sight (NLoS) links following a specific probability distribution.We define the transmission probability for establishing the mmWave backhaul LoS connection between an mBS and an FMBS as P Bl,LoS : where β 0 is the environmental occlusion factor, which is set according to the occlusion degree of the transmission environment.
∥ represents the distance from the receiving terminal to the transmitting terminal of the mmWave link, and denotes the FMBS's x-y coordinate at slot k.In addition, the transmission probability of establishing the mmWave backhaul NLoS connection between an mBS and an FMBS is P Bl,NLoS = 1 − P Bl,LoS .When the backhaul transmission power of mBS i at slot k is p Bl,i [k], the receiving power of FMBS is: where G is the antenna gain, and h(d i,0 [k]) −1 represents the large-scale channel gain.We assume that there is no obstacle between the FMBS and all mBSs; that is to say, its wireless backhaul link has experienced the LoS propagation condition.The average path loss in dB at 28 GHz is 61.4 + 20 log 10 (d i,0 [k]) [28].

Data Backhaul Rate of mBS
We assume that the mBS establishes the backhaul link in the mmWave method, and, after the path fading, the receiving power to the FMBS can be expressed as: In mmWave transmission, the beam shaping technology makes the transmission signal have strong directivity.The signal is mainly interfered with by AWGN.The SNR ζ Bl [k] of the mmWave link at the k-th time slot can be formulated as: where B Bl denotes the mmWave backhaul link allocation bandwidth.Based on Equation (22) and the Shannon formula, the transmission rate of the mmWave backhaul link of the mBS at the k-th timeslot can be indicated as: Combining the transmission rate and backhaul rate, we give the following constraints:

Problem Formulation
Reducing the load pressure on the FMBS through the mBSs provides improved coverage to the hotspot region, thereby increasing the capacity of the entire network.Nevertheless, network capacity and service requirements dynamically change across different locations.We formulate the problem as maximizing the matching degree between network capacity and service demands.Furthermore, in order to optimize the number of SCs served by each mBS, the transmission power allocated by each mBS to the SCs, and the movement trajectory of the mBSs, we express the matching degree as: where F T ((x j , y j ), t) and F T ((x 0 , y 0 ), t) represent the total service demand of J SCs and the non-SCs served by the FMBS in the t-th time slot, respectively.C I ((x i , y i ), t) and C 0 ((x 0 , y 0 ), t) represent the total capacity provided by I mBSs and FMBS at the t-th time slot, respectively.
where γ 0 △ = α 0 /σ 2 represents the reference SNR.To sum up: where and ∆ is an adjustable parameter which represents the tolerance of the total capacity provided by mBSs.The optimization problem can be formulated as: max Constraint C1 ensures that the network capacity provided by the mBS and the FMBS exceeds the service demand.C2 ensures that each SC is exclusively served by a single mBS.C3 is related to the transmit power of each mBS.C4 and C5 represent the lower and upper bounds of the mBS transmission rate, respectively.C6 ensures that the total bandwidth resources allocated to each mBS cannot exceed the total bandwidth.The coverage of each mBS is ensured as C7 guarantees the coverage of each mBS, while C8 ensures that the mBS does not exceed the maximum allowed moving speed.There are two primary reasons why solving problem (29) is challenging.Firstly, the binary nature of the optimization variables λ i,j for SC-mBS correlation makes C1-C6 in (29) contain integer constraints.Generally, problems with integer constraints are more complex to solve.Secondly, even with fixed SC correlation, the presence of transmit power variables p i,j [k] and mBS position variables L i [k] makes C1 and C8 in (29) non-convex constraints.Consequently, problem ( 29) is a challenging mixed-integer, non-convex problem that is generally difficult to solve optimally.

Proposed Algorithms
To obtain a suboptimal solution for this optimization problem, the original problem is decomposed into four subproblems to solve by analyzing the entire optimization problem, namely, the power optimization problem, trajectory planning problem, SC-mBS correlation problem, and bandwidth resource allocation problem.
In the optimization problem, we first cluster the services in each time slot based on the provided service distribution.Next, our objective is to maximize the match between network capacity and service demands in order to optimize the transmission power allocated by each mBS serving SCs.By considering the number of initiating services and the target demand rate of the SC, maximizing ψ is equivalent to minimizing the data transmission rate of each mBS, i.e., reducing the transmission power of the mBS.Hence, the subproblem of optimizing the transmission power of mBS can be formulated as: where p i,j [k] is the transmit power from mBS i to SC j at slot k, and L i [k] is the location of mBS i.It can be seen from the above that this problem combines binary variables and continuous variables and has non-convex objective functions and nonlinear constraints.That is to say, non-convexity and the NP-hard problem have not been solved.In order to solve the above problems, let us consider the problem separately so that the subproblem can be solved iteratively until they converge to the local optimum.It is a non-convex optimization problem since there is nonlinear coupling between the allocation of mBS resources (B Tl ), the location of the mBS (L i [k]), and SCs-mBSs correlation variables (λ i,j ).The specific solution method is described as follows.

Locations of mBSs
From Equation (30), we can see that the channel gain depends on the location of the mBS, and the receiving power of SCs and the location of the mBS are mutually dependent.Based on this, in order to find the transmission power of each mBS and the correlation between SCs and mBSs, we set the initial position of the mBS in advance.This is because there are two considerations.One is that the interference of the non-correlated SC to the mBS is directly determined by its position.The other is that the SC correlated with the mBS can minimize its transmission power after determining each mBS's position.Firstly, let us assume that B Tl and λ i,j are known so we can obtain L i [k].On the basis of C2 in Equation ( 30), each SC is correlated with only one mBS; therefore, C4 in Equation ( 30) can be simplified to: We obtain the following formula by replacing R i,j [k]: where B Tl σ 2 .We substitute γ i,j [k] into Equation (32) and obtain the following formula after formula conversions: which can be simplified as: where Therefore, in Equation ( 30), we transform the problem to minimize the distance between the mBS and the related SC so that the problem of minimizing transmission power can be simplified.From the perspective of green energy conservation, we also need to ensure that the SC is guaranteed by communication services.In order to meet service needs, C5 in Equation ( 30) can be changed to: We assume that the backhaul bandwidth of mBSs is equally allocated.Equation ( 23) can be written as: We assume that there is always an mmWave receiver in the LoS range of the mBS with which to establish a backhaul link during the mBS movement.After some formula conversions, we have: where represents the function of path loss with respect to the distance from the mBS i to the FMBS, where 30) is simplified to: We can obtain the suboptimal communication location of the mBS by solving problem (38).As we can see from (38), the optimization problem is in the form of separable QCQP problems [29].The solution to (38) is given by L * i = (x * i , y * i ), whose general form is given as: Here, we have For the constraints, we have . Note that G 0i and G t i are positive semidef- inite matrices.Therefore, the above problem is convex.The Lagrange dual function is as follows: Obviously, by taking the gradient of the function inside the infimum about L i , we find that , we obtain the duality of problem (39): max f (ϵ), s.t.ϵ ≥ 0.
(41) To sum up, we obtain the optimal communication location of the mBS, and

mBS Trajectory Planning
In Section 3.1, we determine the optimal communication location for the mBS at each time.Then, a heuristic algorithm can be used to plan the trajectory of the mBS.Currently, an increasing number of researchers are utilizing the A* algorithm, a heuristic search algorithm, for pathfinding in trajectory planning.Due to its flexibility, the A* algorithm finds wide application in various scenarios.The A* algorithm, derived from the Greedy Best-First Search, leverages the benefits of heuristic functions to select each target point.The Dijkstra algorithm tends to search from positions near the initial node, whereas the Greedy Best-First Search tends to search from positions close to the terminal node.The A* algorithm combines these two ideas, making it widely adopted.The A* search algorithm, also known as the canonical heuristic search algorithm, relies on heuristic information (estimation function).During each search, it plans the optimal trajectory by identifying nodes with the minimum heuristic function and sequentially connecting them.The A* algorithm used by most researchers usually calculates the cost of all the possible next inflection points in a certain location in the whole search space and selects the inflection point with the lowest cost to join the space.To generate more potential paths, it is necessary to include this new inflection point in the search space.These inflection points are recorded as a set.Selecting the inflection points within the set that minimize the heuristic function and connecting them in sequence results in the desired trajectory from the initial point to the terminal node.To obtain the optimal trajectory in high-dimensional complex space, the A* algorithm, as a heuristic search algorithm, has become increasingly popular among researchers.The search direction is determined by the estimation function f (i), which can be expressed as: where f (i) represents the estimated function from the initial node to the terminal node through any inflection point i, ac(i) represents the actual cost from the initial node to any inflection point i, and ec(i) represents the estimated cost from any inflection point i to the terminal node.Therefore, the planning result of the A* algorithm is determined by what kind of estimated cost ec(i) is selected and should be used according to the specific situation.Since our focus is on studying how mBSs provide communication services for SCs in the road network, our movements need to align with the road grid.The actual cost ac(i) is defined as follows: where A 3 is the distance cost weight.We grid the map of the actual scene so the grid size is the same.D grid represents the moving distance between the grid where the inflection point is located and the adjacent grid.The Manhattan distance is chosen here as the evaluation function to calculate the cost.We allow the inflection point to choose four movable directions in the square grid, which should be A 4 times the Manhattan distance, where A 4 is defined as the cost of the turning point from one space to the adjacent space.ec(i) is calculated using the Manhattan distance from the initial node to the terminal node.∈ Open then Open← Open ∪ {w} else if w ∈ Open and f (w) > ac(v) + d(v, w) + ec(w, terminal) then f (w) = ac(v) + d(v, w) + ec(w, terminal) w.parent= v end if end for end while return Path found failed: trajectory = ∅

Bandwidth Assignments and SC-mBS Correlations
In this section, we first jointly optimize SC-mBS correlations and bandwidth assignments.We suppose that the positions of mBSs are obtained by solving the above problem or set at fixed positions.Therefore, the subproblem of mBS transmission power optimization can be transformed to: In Optimization Problem (45), on the premise that the location of the mBS is known, because of the binary variable (λ i,j ), the product relationship between SCs-mBS correlated variable (λ i,j ) and the bandwidth resources allocated to mBS (B Tl ), and the non-convexity of the objective function, this problem is still non-convex.To simplify this problem, we consider the following two assumptions.For bandwidth resource allocation, we should not only achieve equal bandwidth resource allocation for SCs, but also for transmission links and backhaul links.The reason for making these assumptions is to maximize the system capacity [30].At that time, the capacity of the transmission links and the backhaul links are equal, provided that other variables are given.Therefore, Optimization Problem (45) is transformed to: In this way, the problem is simplified into a binary linear programming problem which can be solved by optimization tools.To further determine the bandwidth resources (B Tl ) allocated to the mBSs, we solve the problem below for each mBS i for known SCs-mBSs correlated variable (λ i,j ).
In the above optimization problem, the concavity and convexity of the objective function can be determined by proving that its second derivative is greater than zero for all positive values of the allocated bandwidth resource {B Tl }.It is proved that the objective function and all the constraints are convex.Therefore, Optimization Problem (47), usefully resolved, adopts available optimization methods.
To solve the original optimization problem, mBS location optimization (presented in Section 3.1) and the SC-mBS correlation (in Section 3.3) are carried out until the location update step does not change.The final solution converges after several iterations.

Design and Limitations of Algorithms
We assume that the origin location of the service is known.The reason for this assumption is that we can use the data provided by the operator or the distribution of the service at a certain time to analyze the entire cellular network and achieve our goal of on-demand coverage and improved clustering.Due to the uneven spatiotemporal distribution of services, the optimal communication positions of mBSs vary in different time slots.Between adjacent time slots, the mBSs utilize Algorithm 2 for trajectory planning.Hence, we can obtain the motion trajectory of each time slot of the mBS and then derive the overall motion trajectory within a day.The overall algorithm process primarily revolves around Algorithm 3. By clustering based on the number of mBSs, we determine the optimal communication location, transmission power, resource assignment, and the correlation of SCs with mBSs through the utilization of Algorithm 3 to solve our optimization problem.We obtain the optimal communication position of the mBS in each time slot, and Algorithm 2 is employed to plan the movement trajectory of the mBS.Algorithm 1 serves as a heuristic function for calculating the Manhattan distance in Algorithm 2. In terms of the algorithm's limitations, we strive to set the initial points to be as scattered as possible, which helps mBSs avoid conflicts during the initial trajectory planning stage.When selecting the location of an mBS, our primary consideration is the optimal communication location of the SC, aligning with our original intention.Additionally, we take into account the distance that the mBS moves between two time slots.In scenarios where consecutive hotspots exist in a certain area, such as at concerts or sports events, the mBS may refrain from conducting trajectory planning to prevent resource wastage.Regarding the limitations of iterative optimization methods, the first step is to establish convergence criteria for the algorithm, determining the threshold which the optimal value should be below.Furthermore, iterative optimization methods often yield a local optimal solution, which does not guarantee a global optimal solution.However, in our problem, finding the local optimum for the current time slot suffices to achieve our goal.

Algorithm Complexity Analysis
The A* algorithm based on mBS trajectory optimization proposed in this paper performs a loop iteration.In each iteration, the optimal communication position of I mBSs is determined by calculating the position of the cluster center under the current demand according to the K-means clustering algorithm.O(Immax_ite) is the time complexity of the K-means clustering algorithm, where I is the number of cluster centers, m is the number of service points in the hotspot region, and max_ite is the maximum number of iterations of the algorithm.For I mBSs, the matching degree of each mBS is updated according to its transmit power and position so the computational complexity of each iteration of each mBS is IP_ite.When the iteration T times are set and the TIP_ite times are calculated in total, then the complexity of the A* algorithm in our algorithm is O(T log I).Therefore, the complexity of solving problem (38) is O(T(log I + I(P_ite + mmax_ite))).Equation ( 45) is divided into two subproblems, (46) and (47), where both can be solved by interior-point methods [29].This type of method is an iterative algorithm, where each iteration has a cubic time complexity, and the maximum number of iterations for a given precision is O(w 0.5 ), where w is the number of constraints.Therefore, in the worst-case scenario, it takes O(I 3.5 J 3.5 ) iterations to obtain the optimal solution for Equation (46), and the complexity order of solving (47) is O(I • J 3.5 ).Combining the complexity of solving problem (38), we can see that Equation (46) has the highest computational complexity among all the problems.

Simulation Results
In this section, we make simulations to estimate the performances of the proposed mBS trajectory planning algorithm.It is assumed that the service demands are located within a geographical area of size 3 km × 3 km and one FMBS serves both SCs and mBSs as the backhaul center, and its geographical coordinates are in the center of the coordinate system.For each hotspot region, the service demands follow the Poisson Process with parameter ρ j .The coverage of the mBSs is 500 m.Here, we analyze the transmit power, bandwidth resource allocation, trajectory planning of mBSs, and SC-mBS correlation.By the way, we also compare the service capabilities of different mBSs in terms of service demands under the same bandwidth (B Tl = 50 MHz).The simulation experiments in this paper are all carried out on MATLAB R2019a, and the simulation experimental parameters are shown in Table 1.In Figure 3, the relationship between the capacity provided by the mBSs and the service demand rate is depicted using four different methods.It is observed that the capacity provided by the mBSs is at its lowest when resources and trajectories are not optimized.Solely optimizing the trajectory without allocating resources reasonably fails to meet the service demands.Additionally, when only resource optimization is applied and the mBS selects the traditional trajectory (i.e., a straight up-and-down road method) to provide services for hotspot regions, the capacity provided by the mBSs fluctuates with the change of service demands but is inadequate to meet them.As shown in Figure 4, when the mBS optimizes resource allocation without optimizing the mobile trajectory, it requires more bandwidth to meet the service demands, which is evidently not a feasible method.Conversely, when both the bandwidth resources used by each mBS and the trajectory of the mBS are optimized, the available rate provided by the mBSs effectively meets the service demands of hotspot regions, thereby avoiding resource wastage and achieving the goal of green energy conservation.Figure 5 presents a three-dimensional virtual representation of the system scenario across different snapshots, depicting the initial starting point of the mBS at the intersection of the road and the driving trajectory of the mBS within the specified road network.The process involves defining the hotspot region where service demand exceeds the capacity provided by the FMBS at a certain time, clustering it through the K-means algorithm, determining the number of cluster heads according to the number of mBSs, obtaining the optimal communication position of the mBS through our algorithm, and utilizing the A* algorithm to search the location of the mBS at each time to obtain the locally optimal trajectory planning at that time.This results in the identification of globally optimal trajectory planning.In Figure 6, it is evident that the number of mBSs, the data rate demands of the services, the traffic distribution, and other parameters can influence the determination of the mBS location.Each mBS's optimal communication position can be determined by the positions of the cluster heads with the same color after clustering.Therefore, based on the traffic distribution, the data rate demand of the services, and power budgets, we typically opt for a small number of mBSs, which not only conserves resources to achieve a green network but also reduces the complexity of the problem.Assuming mBSs travel at a constant speed with the same power, trajectory planning costs include both time and energy consumption.These costs are related to the number of mBSs and their total trajectory length.As shown in Table 2, we provide the relationship between these costs.From the table, it can be observed that, as the number of mBSs increases (from 1 to 3, 4 to 6), the total trajectory length of the mBSs also increases.This is because, when there are too many mBSs, trajectory overlap issues may arise.Conversely, when there are too few mBSs, their positions gradually converge to a point, which may not meet the network's service demands.In Figure 7, the capacity provided by the mBSs is compared with the network service demand under different numbers of mBSs.By dynamically adjusting the quantity of mBSs, we can avoid resource wastage while meeting the network service demand.Figure 8 illustrates the matching degree between the service demands of hotspot regions and the network capacity provided by mBSs as the service demands increase with different numbers of mBSs.While more mBSs result in increased network capacity to meet the service demands, an excessive number of mBSs will inevitably lead to resource wastage.Therefore, by utilizing a centralized management control system to estimate service demands, we can accordingly deploy an appropriate number of mBSs to achieve on-demand coverage.This approach enables us to determine the minimum number of mBSs required to meet service demands.

Conclusions
In this paper, we propose an innovative algorithm aimed at jointly optimizing the placement of vehicle-mounted mBSs, the correlation between SCs, and resource assignments.Our objective is to maximize the match degree between network capacity and service demands.To achieve this goal, we fine-tune the deployment of mBSs by adjusting several key parameters: the quantity of mBSs, power settings, resource allocation, and cluster head positions.These adjustments help us update the optimal communication locations for mBSs.To tackle this optimization challenge, we formulate it as a QCQP problem and achieve optimization by iteratively solving it in conjunction with other related subproblems.Additionally, we delve into the mobility of mBSs that serve SCs within a spatiotemporal changing network characterized by varying service demands.Leveraging the A* algorithm, we determine the optimal movement trajectory for mBSs.Our simulation results show that, by dynamically adjusting transmit power, the number of mBSs, allocated bandwidth resources, and movement trajectories, we can maximize the match degree between network capacity and service demands.Furthermore, our findings demonstrate that intelligent trajectory planning and strategic mBS deployment significantly enhance match degree compared to the pre-deployment of the FMBS.With our proposed algorithm, we

Figure 1 .
Figure 1.Schematic of the system model depicting the mBS service scenario.

Algorithm 1
) The pseudo code for calculating the Manhattan distance is shown in Algorithm 1. Manhattan distance Heuristic Function(inflection point) = d_Mdx = abs (inflection_point.x− terminal_point.x)d_Mdy = abs (inflection_point.y− terminal_point.y)return A 4 * (d_Mdx + d_Mdy) Algorithm 2 gives the particular realization process of the conventional A* algorithm.Algorithm 2 A* algorithm Input: Starting Point(initial),Global Map(grid), Finishing Point(terminal) Output: Optimal Path(trajectory) Initialize: Open={initial},Closed=∅ while Open̸ = ∅ do Take the minimum cost node: Open← Open\ {v},v = arg min v∈Open f (v),Closed← Closed ∪ {v} if v is terminal then Successfully found the path, tracing the path based on the parent-child node relationship: trajectory =backtrack(v) return trajectory end if for w ∈ v.neighbor() do if w ∈ Closed or w is Obstacle then continue end if if w /

Figure 2 .
Figure 2. Comparison of available rate of the mBSs and service required rate of the hotspot region.

Figure 4 .
Figure 4. Comparison of the bandwidth occupied by our algorithm with only the resources optimized.

Figure 5 .
Figure 5.The three-dimensional outlook of the scenario across different snapshots. 0

Figure 6 .
Figure 6.Trajectory planning of mBSs with the same service demands and different numbers. 0

Figure 8 .
Figure 8.Comparison between the capacity provided by the mBSs and the network service demand under different numbers of mBSs at different required rates.

Table 1 .
Simulation parameters.Figure2illustrates the relationship between the available rate provided by the mBSs and the required rate of the hotspot region over the course of a day.It is evident that the capacity provided by the mBSs aligns well with the service demands of the hotspot region, thus avoiding resource wastage due to excessive capacity.
Comparison of available rate of the mBSs and service required rate of the hotspot region in four methods.

Table 2 .
The relationship between the number of mBSs and the total length of their trajectories.

The Number of mBSs Total Length of mBS Trajectory (km)
Comparison between the capacity provided by the mBSs and the network service demand under different numbers of mBSs in one day.