Lifespan-Prolonging Dual Battery System Online Operation Scheduling for In-City Drone Delivery

Delivery conducted by drones plays a significant role in in-city delivery and last-mile delivery, owing to their fast speed and economy. However, since drones are powered by batteries, battery lifetime and the associated replacement cost are one of the main hindrances to more cost-efficient drone applications in delivery. In this work, the lifetime-prolonging dual battery online scheduling problem for drone operation is introduced. The dual battery consists of a new battery bank and a second-life battery bank, in which the scheduling can regulate the output of the new battery pack and thus extend its lifespan and meanwhile make full use of the abundant second-life battery resources. This scheduling problem can be solved optimally offline using a dynamic programming algorithm. However, online decisions in this dual battery system need to be made without future information. Thus the battery degradation cost is amortized into the operational cost per time interval, and an online algorithm is proposed. The proof of the competitive ratio of the online algorithm compared to the offline optimal is provided.


Parameters ∆t
the time interval length η s,c , η s,d the charging/discharging efficiency S the battery pack in use, either new battery or SLB SOH initial/end the SOH at the start of use, end of life C OP T /OL costs of the optimal and online solutions L the maximum cycle number under nominal conditions N, T number of delivery tasks, total time steps in each flight OP T, OL the solution from DP, online algorithm Q r , V r the battery's rated capacity and nominal voltage Variables α the cumulative capacity deterioration of the battery ÊC s i,t the battery current energy capacity Qs i,t the useable energy capacity of the battery E s i,t the battery current energy p c i,t , p d i,t the charging/discharging power of the battery s x s i,t switch state or the battery pack in use I. INTRODUCTION Background and Motivation: The deployment of unmanned aerial vehicles (UAVs) has become increasingly popular in logistics distribution, particularly in last-mile delivery.The Li-ion battery pack serves as the primary energy source for drone operation, and its energy consumption is dependent on parcel payloads, flight ranges, and weather conditions.In the context of in-city delivery, the replacement of deteriorated batteries incurs substantial costs in drone operation and maintenance [1].Due to the nature of in-city flying conditions, drone flying tasks involve frequent avoidance of densely populated infrastructures and challenges against variable weather, which require the drone to change its posture to provide larger torque and strength.This posture adjustment is closely linked with battery discharge current and power.Factors that aid in completing flying missions, such as power fluctuation and abrupt discharge stress, as well as short-term large current at the battery interface powering up the drone motion module, contribute to rapid battery degradation [2], [3].Consequently, battery lifetime and the replacement costs are among the main impediments to drone delivery cost-effectiveness.
The battery lifespan is formally defined as the period during which the battery can operate as intended [4].When the battery reaches the end of life, it will be eliminated for the sake of system safety and repurposed for second-life usage.Considering cheap and abundant second-life battery resources, instead of optimizing on one battery set, we propose the novel dual battery scheduling paradigm for battery lifespanprolonged in-city delivery for drones, where one new battery set works together with the second-life battery (SLB) set.
Literature Review: Different flying tasks and postures of drones are linked to battery discharge currents and power, for instance, the drone hovering state requires continuous and stable output from the battery set, whereas drone diving may require transient and high power output [5].Thus the lifetime of the new battery set can be prolonged since it is assigned to operate under smooth output conditions to generate savings in terms of total operation cost [6], [7].More fluctuated and higher power consumption will be covered by the cheaper and abundant second-life battery resources.Besides, since the Liion battery is light in weight with high energy density, the weight of two battery sets is acceptable for the in-city delivery drone type [8].To the best of our knowledge, this is the first time the combination of the dual battery pair, one new and one serving second-life, and the operation scheduling between two battery sets are considered to fulfill drone flying tasks such that the overall operation and drone maintenance cost is reduced, and the lifetime of the new battery set is extended.
Contributions: The contributions lie in the following aspects.The lifespan-prolonging dual battery scheduling for drone applications is introduced, where the coordination between new and SLB sets is incorporated.Based on the newly proposed scheduling problem, a generalized model is formulated, where the aging effects of the new battery and second-life battery sets in terms of capacity degradation speed difference are integrated.Since each decision should be made with only historical data in real-world applications, an online algorithm is proposed.This online algorithm is proven to have a similar cost to offline optimal by providing a constant competitive ratio.The rest of this paper is organized as follows: Section II describes the dual battery scheduling system to prolong the lifespan of a new battery bank.Section III describes modeling for dual battery scheduling and the battery amortized operation cost.Section IV describes the proposed online optimization algorithm and the proof of competitive ratio, followed by verification results of algorithm effectiveness in Section V, and Section VI presents conclusions.

A. Influence of High Power Output on Battery
Drone flying postures are significantly impacted by the surrounding environment like wind speed and angle [9].For the drone to fly smoothly to accomplish delivery assignments, the power supply system, i.e., the batteries, are required to produce varying output and handle abrupt rather large or small power.As shown in the degradation model in [10], the battery capacity decrease is closely linked to the output power.If continuously providing high-level power, high charge and discharge throughput trigger an accelerated degradation process.With the online scheduling system to handle abrupt power changes using two battery banks, the new battery bank can have an extended lifespan under sustainable operation.

B. Dual Battery Lifespan-prolonging Scheduling System
The dual battery system combining the new battery bank and the SLB is demonstrated in Fig. II-B.The drone load is continuously supplied by either battery bank.And the online dual battery management system is in charge of the scheduling task between two battery banks, including smooth switch on/off of the associated converters, and the decision-making according to environment-oriented drone power load to extend the lifetime of the new battery pack.The proposed dual battery lifespan-prolonging scheduling system architecture effectively leverages the strengths and complements the weaknesses.

III. MATHEMATICAL MODEL FOR LIFESPAN-PROLONGING DUAL BATTERY SCHEDULING OF DRONE OPERATION
In this work, we want to optimize the total cost of one drone that takes several flight jobs and its batteries will be fully recharged at the end of each job.This time duration is divided into multiple continuous time intervals, denoted by [0, ∆t], ..., [(n − 1)∆t, n∆t], and n∆t = T .At the beginning of each time interval, the decision on which actions to take in the upcoming interval is made based on the current drone status and environmental conditions detected by the sensors [11].The battery output for the next interval is thus predetermined,

A. Lithium-ion Battery Degradation Model
To maintain a drone delivery system, the capacity degradation of Li-ion batteries constitutes a large proportion of the cost.Furthermore, the new battery bank and SLB bank have different degradation rates.The capacity degradation can be differentiated as the superposition of the cycle degradation and the calendar degradation [12].Calendar degradation has a limited impact due to its low values, especially in lithiumion battery chemistry.Thus only cycle degradation is taken into account in this investigation.For the lithium-ion battery type, the aging effect impact on the capacity of battery s is represented by the following equations [10].
Under different battery power level, α varies with the battery C-rates, thus leading to different degradation rates.Meanwhile, the degradation rate of the SLB bank is larger than that of the new battery.The battery's remaining capacity can be compared to the nominal capacity and the ratio is defined as the state of health (SOH) [13].When the battery's SOH reaches SOH end , it is presumed that the battery has been discarded.The constraint for the useable energy capacity of the battery after the time interval t can be expressed as:

B. Offline Model Formulation and Operation Cost Curves on Amortized Capacity Degradation
For the drone delivery flying task optimization, the dispatch configuration for the dual battery system is represented by the following offline mathematical formulation.In this formulation, the set of decision variables Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
Power load balance: Battery state: In the objective, the total cost for drone operation with a dual battery power supply system is minimized, which consists of the capacity degradation, and the switching cost between two battery banks.Therefore, the first term indicates the cost associated with capacity degradation, and the penalty weight is proportional to the capital cost π s B .This term is meaningful after a comparatively longer time scale and thus is calculated after each flight.The last term denotes the instant cost within each time step of the flight.π s is the switching cost coefficient between the new battery bank and SLB.It considers the wear and tear of the electrical circuit caused by switching action between two battery banks.
In the power load balance constraints, (4a) regulates the output power of both battery packs through the binary variable x s i,t .(4b) satisfies the drone's power demand.The outsourced electricity of the dual battery system is the electricity required by the load side.And the dual battery system each time step with one battery pack to provide the electricity can be expressed as (4c).In battery state constraints, (5a) describes the battery's remaining energy after charging/discharging in the current time step.Since denotes the battery SOC, the battery SOC restriction can be written as (5b).(5c) is determined by the relationship between the battery current energy capacity and the capacity, given nominal voltage V r B for the certain type of battery.

C. Objective with Amortized Cost to Unit Time Step
The proposed offline optimization model is simplified equivalently by amortizing operation cost into each time interval to facilitate the development of online algorithms in section IV-B.More specifically, the degradation cost after each drone trip, i.e., the first term in (3), is amortized into unit cost at each time step within the drone trip, to be put together with the switching cost.Based on (1), under different power output levels, the capacity degradation rate of the battery with respect to time can be derived as: 6) Therefore, the capacity decrease rate is related to the power value, i.e., using this battery aging model, given the same power level, the degradation rate is a constant value.Then the capacity loss rate measured in (Ah/s) can be approximated as the function of power level.
As the investment capital cost of the battery bank ($) can be amortized on the usable capacity, i.e., as the cost for unit capacity ($/Ah) [14], the multiplication with capacity loss rate derives the unit time operation cost measured in ($/s) under specific power values.Therefore, the power supply cost in each time step of both the new battery and SLB can be obtained.The corresponding cost function ($/s) is c s i,t (p s i,t ), transferring degradation loss into unit time operation expense.And the objective function in (3) becomes: In this way, the objective function can be equivalently converted to the objective function accounting for operation cost based on battery power output.Such costs are directly related to the power output and differ between the new battery and SLB, thus batteries' output will be effectively limited.The cost counted toward each time step enables the design of both offline and online optimization algorithms.

IV. OPTIMIZATION ALGORITHMS
In this section, constructive procedures of the employed algorithms are demonstrated for solving the lifetime-prolonging dual battery scheduling problem.Firstly, we discuss the dynamic programming scheduling algorithm to solve the offline problem to provide the optimal solution as the benchmark.Secondly, we propose online optimization algorithms to solve real-world cases.Lastly, we will prove that the online schedule has a similar performance to the offline optimal schedule by providing a competitive ratio.

A. Dynamic Programming Offline Optimization Algorithm
Since the operation and degradation cost of both new battery and SLB packs have been amortized into unit time, the optimization model in section III-B can be solved with the dynamic programming (DP) algorithm.The cost for N drone flights is the summation of each cost value.In the offline mode, the drone operation output power during the whole flying timespan in different tasks is known.
In the top-down dynamic programming algorithm 1 with known future information, the state includes the battery in operation s and the current time step t.In the status, 0 denotes the new battery is in use in the current time step, while 1 denotes the SLB is in use.With the amortized operation cost in each time step computed with the output power value as c N i,t , c O i,t , the Bellman equation is expressed for the dynamic programming.The time complexity of the dynamic programming algorithm is O(T ) for each drone trip, which means the offline optimal can be computed efficiently.

B. Online Optimization Algorithm
DP results are the benchmark as it owns the information in the whole time-span, whereas online algorithms have the information in the current time step and historical data.The online scheduling algorithm is shown as Algorithm 2. The switch criterion here is the accumulated cost comparison between the new battery and SLB pack since the last switch.It is worth mentioning that in the online algorithm, in each time step, the algorithm can effectively tackle the problem with O(1) time complexity with Kadane's algorithm [15].The off-theshelf hardware have the capability to implement the proposed online optimization algorithm with low computational and memory cost.With state-of-the-art drone processors [16], realtime tasks can be handled efficiently.

C. Competitive Ratio Analysis of Online Algorithm
In this section, we use OP T (t) and OL(t) to represent the battery status at time slot t under the optimal solution and online algorithm solution.For example, OP T (t) = 0 if the battery in use at time slot t under optimal solution is a new battery, otherwise the battery in use is a secondlife battery.Competitive ratio η = C OP T C OL is defined as the ratio between the cost of the online algorithm and the optimal cost.For this problem aimed at minimizing the cost, this ratio is always larger than 1, and the more it is close to 1, the better the online scheduling is.Although future information is unavailable under the online setting, we prove the online scheduling cost is close to the optimal cost by providing a constant bound for the competitive.
The whole time span is divided into several segments such that in the optimal solution, the battery in use will not change in each segment and the status switch only happens at the first time slot in each segment.If there is a competitive ratio for each segment, when we sum up costs in all segments, this competitive ratio also holds.Thus, for the sake of simplicity, we focus on a segment [i, j], where the battery in use in optimal solution switched to 0 at time i and will not change.In this segment, the online algorithm switches several times: switch from 0 to 1 for α times and from 1 to 0 for β times.Some auxiliary variables are introduced for the proof of competitive ratio.In each time interval t, no matter which battery is in use, a base cost c b t = min{c O t , c N t } will occur regardless of the schedule.The additional costs for OP T and OL are introduced as:

ĈOL
, we now have an upper bound on competitive ratio.Furthermore, for each time interval t, we introduce auxiliary variables c 0 (t), c 1 (t), f 0 (t), f 1 (t): Proof.Note that in this segment, battery status in optimal solution is always 0, which means the interval l will occur in an additional cost only if c N l > c O l .Thus the total battery cost is l∈[i,j] c 1 (l).The switch for an optimal solution only happens at the first time slot, which means the switching cost in this segment is since the online algorithm does not switch at time b i , we have l∈[ai,bi] c 0 (l) ≤ l∈[ai,bi] c 1 (l) + 2π s .Thus, we have the following bound: The last inequality holds because there are at most β such frames in this segment.Proposition 3. ĈOP T > 2απ s + π s Proof.If the online algorithm switch from 0 to 1 at time v, there is a time u such that v t=u c 1 (t) ≥ v t=u c 0 (t) + 2π s ≥ 2π s .Thus, we have the lower bound for the optimal solution: C OP T ≥ α * (2π s ) + π s ≥ 2βπ s − π s .The second inequality α ≥ β − 1, which means each time the online algorithm switches from 0 to 1, it must switch from 1 to 0 before.The additional cost of OL has four parts: (1) Cost of switching from 1 to 0, which is upper bounded by απ s ; (2) Cost of switching from 0 to 1, which is upper bounded by βπ s ; (3) Battery cost when new battery is in use, which is upper bounded by l∈[µ,v] c 1 (l); (4) Battery cost when second life battery is in use, which is l∈[µ,v] f 0 (l).Theorem 1 provides a performance guarantee for the online algorithm.
Theorem 1.The competitive ratio for the online algorithm is at most 4. Proof.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

A. Drone Flight and Li-ion Battery Test Instances
The drone flight dataset is adopted from instances generated in [17].The DJI M100 drone was tested to take off, carry a range of payload weights on a triangular flight pattern, and land.The onboard sensors collect information including wind speed, drone battery current, voltage, as well as drone flying speed acceleration, and location.The LiCoO 2 cell is used to construct the dual battery system according to the DJI manual.The properties of which are shown in Table I.Thus these battery features are used as parameters in the simulation model.In the simulation setup, the time interval ∆t is set as 1s because drone power demand is time-varying with the peripheral environment.It is also ensured that in each flight the drone battery SOC level will not exceed the lower limit as constrained in (5b).

B. Battery Degradation Rate and Amortized Operation Cost
For the new battery bank, the end-of-life SOH is 80%, matching a typical replacement criterion for drone application.And the SLB end-of-life SOH is chosen as 50% [18].The corresponding capacity variation slope is obtained based on (6).The curves of degradation rates are regressed with different power outputs, meaning that the capacity amortized cost is related to the output power.The battery capacity degradation rates under different power outputs and the amortized cost curve are illustrated in Fig. 2. The SLB degradation rate is higher than that of the new battery pack.But since in the amortized cost c s i,t (p s,d i,t ), the replacement cost in Fig. 2(a) are multiplied as the coefficients to degradation rate, the cost curves of two battery banks have the intersection point as in Fig. 2(b).This means at the low power output level, using the new battery bank is more costefficient, because the capacity loss in the new battery is small and the re-investment cost of the new battery is low.Whereas under the large power output, using the SLB is more costefficient.Though its capacity loss is comparatively higher than that of the new battery, the re-investment price of SLB is lower, and thus the amortized cost is lower under high power demand.The amortized cost c s i,t (p s,d i,t ) for new and second-life batteries have the forms of: c N i,t (x = p N,d i,t ) = 5.05e −7 x 0.75 , c O i,t (x = p O,d i,t ) = 2.31e −6 x 0.5 .The curves and cost coefficients are the regression results based on the sampled battery degradation rate points in Fig. 2(b).
The comparison between the amortized curve and the distribution of drone power within all flights is depicted in Fig. V-B.The drone power during the taking off and landing phases are on a low level, thus there is a substantial number of time steps with a small power value.In the flying phase, the power distribution is similar to the Weibull distribution, which is widely used to represent the distribution of wind speed [19].The intersection point of the amortized cost curves can correspond to the drone power with high occurrence frequency.Thus the dual battery system switch phase is meaningful to help minimize the operation cost of drones.

C. Lifetime-prolonging Dual Battery System Scheduling for Drone Flights
The dual system scheduling time sequence results are displayed in Fig. 4. As shown in the figure, the online deterministic scheduling algorithm gives a stable battery usage state, since it considers the accumulated cost since the last switch time and is, therefore, less sensitive to the fluctuation in drone power level.DP results are the benchmark as it owns the information in the whole timespan, whereas online algorithms have the information in the current time step and historical data.In Fig. 4(b) where the drone power level is comparatively more stable, DP also gives limited switch times.The scheduling solution shows during large and highly fluctuating power, the SLB is more frequently used, as to extend the lifespan of the new battery.Therefore, the combined dual battery system needs to have enough capacity to support flight duration under the switch control and meanwhile balance between capacity size and weight.
The numerical results are summarized in Table II.For comparison, drone operation with only one new battery pack is also tested and denoted as the "original" case.There are in total 41800 drone delivery flights, each in around 20 minutes.The "original" new battery system combines new battery banks  with the same level of capacity as the dual battery system, thus the systems under comparison have the same power capability.The simulations consist of 209 drone trips.The objective result shows significant benefits with the proposed dual battery system in operation cost reduction.As can be seen from the table, the optimization result objective values record the total cost calculated by the algorithms in terms of amortized operation cost during the whole flight.DP always gives the optimal solution, as the entire power consumption is known in advance.And the objective values of the online scheduling algorithm are close to optimal, which satisfies the competitive ratio consistent with the proof in section IV-C.In the examined battery replacement and the average lifetime of the new battery, the service life of new batteries are extended more than in the original case, with fewer replacements of the new battery bank.The new battery life is prolonged at the cost of SLB, yet the overall drone operation cost is reduced with the priority given to minimizing the expenses of drone services.Therefore, the economic efficiency together with the battery lifetime extension effects are verified.

VI. CONCLUSIONS
In this work, the lifetime-prolonging dual battery online scheduling problem for drone operation is introduced to extend the lifespan of the new battery banks and meanwhile make full use of the abundant second-life battery resources.The offline version of this problem is modeled as a mixed-integer programming problem and can be solved optimally using a dynamic programming algorithm.For the real-world case when the future data is unavailable, an online algorithm with a constant competitive ratio is applied to solve it.The numerical simulations verify that the scheduling achieved from the proposed online algorithm is close to offline optimal.Furthermore, compared with the one-battery system, the dualbattery system is able to extend the battery lifespan and reduce the drone delivery cost.In future work, practical implementation of the proposed dual battery power supply system will utilize e.g.DJI M100 drone, LiCoO 2 battery,

Fig. 1 .
Fig. 1.Overview diagram of lifetime prolonging dual battery system and the battery scheduling system decides which battery to use during the next interval.It is noteworthy that no decisions can be made within each time interval.
battery pack (b) Capacity amortized battery operation cost under different power Fig. 2. Capacity amortized battery operation cost curve based on degradation rate under different drone power demand

Fig. 3 .
Fig. 3. Comparison between amortized cost and distribution of drone load

Fig. 4 .
Battery operation scheduling result comparison and the online optimization algorithm programmed on ARM Cortex-A8 processor with compatible programming language.
Algorithm 1 The offline DP algorithm Input: Drone flight data, battery capacity amortized operation cost, switch cost Output: Optimal battery switch sequence and cost if t = T (boundary conditions satisfied) then