On Carsharing Platforms With Electric Vehicles as Energy Service Providers

This paper presents a queuing-theoretic framework to analyze the business of business-to-customer carsharing services with electric vehicle (EV) fleets. When grid-connected, EVs can use their batteries for vehicle-to-grid (V2G) interactions. In this work, we allow a carsharing platform to conceptually split its EV batteries into two parts: one part to provide transportation to carsharing customers and another for energy trading. We characterize the optimal storage control policy for price arbitrage during transportation-idle times and leverage equilibrium analysis of <inline-formula> <tex-math notation="LaTeX">$M/G/N/N$ </tex-math></inline-formula> queues with <inline-formula> <tex-math notation="LaTeX">$N$ </tex-math></inline-formula> cars to calculate the platform’s average revenue rate from dual service provision. For the single-EV case, we explicitly characterize the optimal price, both with patient and impatient customers. For the general <inline-formula> <tex-math notation="LaTeX">$N$ </tex-math></inline-formula>-car case, we provide an algorithm to maximize revenue rate over price and battery split, and utilize the algorithm to numerically study the variation of the optimal solutions with problem parameters.


On Carsharing Platforms With Electric Vehicles as Energy Service Providers
Xi Cheng , Theodoros Mamalis , Subhonmesh Bose , Member, IEEE, and Lav R. Varshney , Senior Member, IEEE Abstract-This paper presents a queuing-theoretic framework to analyze the business of business-to-customer carsharing services with electric vehicle (EV) fleets.When grid-connected, EVs can use their batteries for vehicle-to-grid (V2G) interactions.In this work, we allow a carsharing platform to conceptually split its EV batteries into two parts: one part to provide transportation to carsharing customers and another for energy trading.We characterize the optimal storage control policy for price arbitrage during transportation-idle times and leverage equilibrium analysis of M/ G/N/N queues with N cars to calculate the platform's average revenue rate from dual service provision.For the single-EV case, we explicitly characterize the optimal price, both with patient and impatient customers.For the general N-car case, we provide an algorithm to maximize revenue rate over price and battery split, and utilize the algorithm to numerically study the variation of the optimal solutions with problem parameters.

I. INTRODUCTION
R URAL users in the early twentieth century under- stood gasoline-powered cars not just as transportation resources, but also as mobile energy resources that could further flexibly be used to power washing machines, butter churns, cream separators, among many other applications [2], [3].Modern plug-in electric vehicles (EVs) unleash even more possibilities, when cast as both modes of transport and as mobile batteries.This is true not just at the individual vehicle level, but also at the level of EV fleets, which can be leveraged in aggregate to provide vehicle-to-grid (V2G) services to the power grid as a distributed energy resource aggregator (DERA).EVs can serve not only as energy sources and sinks, but also provide voltage and frequency regulation services to the grid, aiding the power system, as noted in [4], [5], [6], [7], [8], and [9].See [10] for a detailed discussion of power markets that V2G service providers can participate in.EV fleets have been investigated from several systems-level perspectives, such as operational efficiency [11], [12], dynamic pricing [13], [14], system fleet sizing [15], [16], charging scheduling [17], [18], [19], and relocation of cars [20], [21].However, their ability to quickly switch between energy/transportation possibilities in response to dynamic market signals remains under-explored.Inspired by large-scale models of coupled control for transportation systems and energy grids in [22] and [23], we take on this challenge in the context of revenue optimization in the electric (car)sharing economy [24], which is investigated by a recent survey [25].If the case study in [26] is any indication, we anticipate electric carsharing with dual service provision via V2G to become a profitable venture.See [27] for such an optimization for the ridesharing economy.
Business-to-peer carsharing platforms provide short-term (e.g., hourly) car rentals, where the customer drives the car provided by the company.Such platforms are starting to adopt EVs within their fleets; see [28], [29], and [30] for details.This is especially the case for automobile manufacturer-based platforms including Volkswagen's WE, Mercedes-Benz's Car2Go, BMW's ReachNow, GM's Maven, and Audi's Audi-on-Demand.The deployment of electric carsharing in several cities around the world is described by [31], who also provide insight into business models and environmental benefits; see [32] for gasoline conservation opportunities presented by the incorporation of EVs into operational fleets.EV-based carsharing can lead to a reduction in the total vehicle miles travelled and its associated CO 2 and GHG emissions, as per [33], as well as a reduction in urban congestion [34].Since our initial work on this topic in [1], there has been growing recognition that carsharing companies could earn additional revenue by, time-to-time, using the battery packs of their vehicle fleet to provide grid services [35], [36], and [37].The relatively recent Order 2222 [38] from the Federal Energy Regulatory Commission envisions aggregators of distributed energy resources to become active participants in the future electricity market; electric carsharing companies are ideally poised to serve as such aggregators.Increased profit margins from dual service provision will build a stronger case for V2G and may lead to innovations in V2G technology.
This paper develops rigorous queuing-theoretic models and computational tools to analyze and optimally coordinate EV-based carsharing platforms.Although queuing models have long been used to model transportation services in [39], [40], [41], including for carsharing platforms (e.g., [42]), we believe this is the first application to settings with EVs.Our model aims to capture the salient features of EV charging processes and consider the trade-offs in providing both transportation and V2G services.Indeed, the inherent time required to charge EV batteries will impact a transportation service provider's ability to deliver rides in a timely manner.The underlying cost and time requirements of battery charging will affect the pricing decisions for mobility services.On the other hand, V2G activities will also impose on the EV fleets' ability to provide transportation services.
In this work, we first establish a queuing model of EV transportation service provision and recharge, further determining the revenue.The model is based on round-trip electric carsharing with dedicated charging equipment, rather than other potential models such as one-way trips or charging elsewhere.Next, we consider the possibility of using an EV battery to perform price arbitrage in an energy market; this is done in the presence of a stochastic real-time wholesale market price signal through a dynamic programming argument.Finally, we consider the possibility of (dynamically) splitting the battery into a transportation segment and a grid services segment to enable energy price arbitrage when idle from delivering transportation services.For certain standard distributional assumptions, we characterize the candidate optimal transportation prices p upon fixing the battery capacity B dedicated to providing transportation services.An efficient algorithm for joint optimization of ( p, B) is given, and numerical examples are used to provide insight into the basic trade-off in dual service provision.
For ease of presentation and to capture the basic queuingtheoretic insights, we focus on energy services restricted to price arbitrage against real-time prices in the wholesale energy market.As will become evident from our analysis, the conceptual framework and the results will continue to hold if the revenue rate from the provision of any V2G service, outside of price arbitrage, has a certain functional form.Our modeling and simulation framework in this paper borrows from and builds on our initial work on this topic in the conference paper version [1].Compared to that work, however, that only considered a fleet comprising a single car, here we make a significant extension to analyze the setting with a general fleet size of N ≥ 1 cars and a more realistic model of customer behavior.We correct the main result of [1] through a much simpler argument and provide a comparison of how realistic customer behavioral models can impact the revenue optimization problem.In contrast to earlier work in [36] and [37], our queuing theoretic model and equilibrium analysis of electric carsharing systems stand as the key contribution of this work.
Concretely, the contributions of the current paper are as follows.We provide the first (to our knowledge) queuing model for electric carsharing that is both analytically tractable and rich enough to provide interesting insights into the tradeoffs of dual service provision.Our work is distinct from [36], [43], and [44] through the use of queuing models, and from such models for carsharing in [45] in the consideration of operating EV fleets, and on electric carsharing in [46] and [47] in the aspect of dual service provision.As opposed to purely qualitative insights [32] or through the use of simulations alone [44], our focus is on building models that are amenable to mathematical analysis.Similar to the use of such models that have informed dynamic and congestion pricing in ridesharing systems, we anticipate that our work will help carsharing systems to gauge their profitability in dual service provision.
We acknowledge that certain considerations of our model are simplistic.For example, we do not model the impact of battery degradation as in [15], or one-way car-sharing with multiple depots and its associated re-balancing issues as in [43], [46], [48], and [49], or allow dynamic pricing regimes as in [14].The key element of our investigation is the dual service provision that, in a way, combines optimal pricing for transportation services in carsharing in [49] and [50] with energy trading via V2G.The characterization of the profit rate from energy trading stands as another contribution that builds on the conference paper version in [1].We explain in the sequel why it remains challenging to conduct a thorough empirical analysis.However, we characterize the profit rate of energy trading with real data that would help an electric carsharing company to approximate its profit margin with dual service provision.In this vein, we next provide a back-of-theenvelope calculation for the two-service model.

A. An Illustrative Value Proposition
To illustrate that there is indeed a business through the value an electric carsharing platform might derive in providing grid services, consider the following stylized example: bidding a fleet's aggregate EV storage capacity in a wholesale electricity market.The market we consider mirrors California-run electricity markets, in which the proxy demand resource product, as outlined in [51], enables the bidding of behind-the-meter energy resources into the wholesale market.In this market, proxy demand resources receive a two-part payment consisting of a power capacity payment and an energy payment.For the capacity payment, participating resources must commit to a monthly minimum of 72 bid-hours structured as 4-hour contiguous bid blocks.In return, participants receive a capacity payment of $6/kW of available capacity each month.In addition to the capacity payment, participants also receive an energy payment compensating them for the actual energy delivered at the wholesale energy price.
Consider a platform with 4000 vehicles.Given EV battery constraints, the 4-hour bid-block requirement limits the platform to a maximum power capacity bid of 7.5 kW per EV, resulting in a capacity payment of 4000 × 7.5 kW × $6/kW = $180K per month.Moreover, assuming a reasonable on/offpeak price differential of $0.1/kWh in the wholesale energy market, the platform would stand to receive an energy payment of 4000 × 72 kWh × $0.1/kWh = $28K per month through energy arbitrage against the on/off-peak price differential.Thus, the provisioning of wholesale energy services from a fleet of 4000 EVs would yield a profit of $208K per month.Albeit somewhat stylized, such an example provides evidence that electric carsharing companies can gain from participation in the energy economy as a V2G service provider.See [52] and [53] for ths arbitrage potential of EVs, and [23] and [54] for EV-based sharing platforms.

B. Paper Organization
The remainder of the paper is organized as follows.
Section II establishes a model of transportation services.Section III builds a model of price arbitrage with vehicles' grid battery.Section IV computes total revenue rate from both transportation and energy trade.Section V analyzes the properties of the aggregate revenue of the single-car case.Section VI develops an algorithm and Section VII investigates the variation of the optimal results with parameters.Section VIII numerically estimates the arbitrage opportunity from energy trading with real data.Section IX concludes the paper.

II. MODELING THE CARSHARING SERVICE
Consider a carsharing platform A that operates a fleet of N identical cars, each with a vehicle battery of size B tot .We conceptually split each car's battery capacity into two parts, as in Figure 1.A portion B is set aside to provide transportation services and the rest B ′ = B tot − B is used for V2G interactions.In this section, we design a queuing model for A's business and compute its revenue rate from provisioning transportation services using equilibrium properties of queues.
Let customers approach A according to a Poisson process with intensity λ 0 .When a customer arrives, she observes the posted price p (in money/time) for using a vehicle and the maximum trip time τ max = B/β − , assuming the vehicle battery of capacity B depletes at a constant rate β − when driven. 1 The customer decides to rent a vehicle if the posted price p is lower than her reservation price, and her required trip time τ does not exceed the maximum trip time τ max .We model a customer's reservation price and trip time as independent random variables.Let F π be the complementary cumulative (or tail) distribution function of the reservation wages, and F τ be the cumulative distribution function of the trip times.It follows that customers willing to pay the posted price and abide by the trip time restrictions arrive according to a Poisson process with intensity Trip times of customers who ultimately avail A's service follow the same distribution as the trip times of all customers, but truncated at B/β − .Trip time equals the time between when the customer takes the car from the carsharing depot, utilizes it, and then returns it to the depot.The vehicle battery loses β − τ amount of energy when driven for τ , where recall β − denotes the battery discharge rate.Denote the battery charging rate at the depot by β + . 2 Then, the car will require τ C := β − β + τ amount of time to charge back to the capacity B of the transportation battery.Therefore, we model the charging time as proportional to the trip time, as in Figure 2. A car acts as a server in a queuing system.The car is busy when it is being driven or it is charging its transportation battery after being driven.For each ride provided, the car remains busy for amount of time, implying that the service time follows a scaled, truncated version of the trip time distribution with mean, While the rental times and the driving distances (and hence, the amounts of battery discharge) are not always exactly fixed factors of each other, one expects them to be positively correlated across customers.The ensuing analysis with a fixed factor serves as an approximation, and yet, reveals important inter-dependencies between the transportation and V2G business potentials for A.
We model the customers as impatient: if no car is available to be driven upon arrival, a potential customer leaves.Each arriving customer picks an idle car, uniformly at random, if one is available.In Kendall's notation, we model A's service as an M/G/N /N queue with customer arrival rate λ and service rate µ. 3 The carsharing "load" of the queuing system is therefore, where we use the notation We aim to calculate the average rate at which A accrues revenue from carsharing, assuming the service is in steadystate.An arriving customer enters the M/G/N /N queue, if at least one car is idle.It is known that the stationary distribution of the number of busy cars for an M/G/N /N queue is the same as that with an M/M/N /N queue with an exponential service-time distribution with the same mean 1/µ; see [55,Chapter 2.3] for a proof.Thus, we have for k = 0, . . ., N .The probability that all N cars are busy is given by Erlang's loss formula Owing to the Poisson Arrivals See Time Averages (PASTA) property, this distribution also equals that observed by an arriving customer with Poisson arrivals.For each customer, A is paid pτ for the transportation service, and it pays p ret β + τ C = p ret β − τ for energy.Here, p ret (in money/energy) denotes the flat retail rate for energy that the distribution utility (or a retail aggregator) charges A. The customer does not wait for the transportation battery to charge; that responsibility falls on A. Overall, A makes ( p − p ret β − )τ from a customer who drives it for τ time, and keeps the car busy for βτ time.Thus, the revenue accrued from a busy server exactly equals that obtained by assuming that A is paid at a constant rate, whenever a car is busy.Thus, the average revenue rate from transportation service provision, using renewal-reward theory, and the law of total expectation is We do not explicitly model A's maintenance and repair costs for its vehicles.We expect repair costs to be proportional to the trip times, and can be folded into the retail electricity price.Periodic maintenance costs will add a constant to the revenue rate that will not affect our conclusions.
We remark that our setup for the transportation battery ensures that a transportation customer always enjoys a non-random minimum battery capacity for her trip, the transportation battery capacity of B. In other words, V2G interaction with the grid battery B ′ does not compromise A's ability to serve the carsharing customers with the transportation battery B in any way.Any residual energy in the grid battery that might be available can be utilized by a transportation customer in an emergency.The battery split need not be constant; for example, on days with high customer traffic, A might allocate a larger portion of the battery for transportation.

III. PRICE ARBITRAGE USING VEHICLE BATTERY DURING IDLE PERIODS
A car is deemed busy with transportation service when it is either being driven by a customer or is recharging its transportation battery.It is idle, otherwise.During this idle period, let A receive energy prices ρ (in money/capacity) at regular intervals of length as shown in Figure 3.These prices may be the locational marginal prices from a real-time wholesale market, or from an emergent retail market environment.We let A utilize a car's grid battery for energy trading against the prices ρ, when it is idle.In this section, we model A's price arbitrage and characterize its optimal trading strategy, using which we compute its rate of accruing revenue from V2G interactions.
Remark 1: The price process ρ is different from the flat retail energy price p ret that A pays to charge its transportation battery.A participates as a regular consumer of a distribution utility that offers it a flat retail rate to charge its transportation battery.Contrarily during an idle period, A participates as an owner-operator of a distributed energy resource (the grid battery) with its trading batteries and participates in wholesale electricity markets with time-varying real-time prices.
Although a vehicle is connected to the grid when it charges its transportation battery, we insist that it not engage in V2G interactions during this period.That is, we separate the times when the car provides or prepares for carsharing services, and when it takes part in price arbitrage.This separation facilitates easy auditing.
We now formulate expected revenue maximization from price arbitrage with a battery of capacity B ′ over an idle period as a discrete-time stochastic control problem.For simplicity of exposition, we first derive policies for a single car.Suppose there are T intervals of length within an idle period, where describes the time interval between consecutive price changes.Let ρ ρ ρ := (ρ 0 , . . ., ρ T −1 ) be the stochastic price process against which A maximizes its expected revenue from arbitrage.Starting from a state of charge z 0 ∈ [0, B ′ ], the trading battery state at interval t progresses as for t = 0, . . ., T − 1.Here, u t stands for the energy transacted at time t.A positive u indicates charging the trading battery, whereas a negative one indicates discharging.We seek a control policy γ γ γ := {γ 0 , . . ., γ T −1 }, where γ t maps the available information at time t to the storage control action u γ t .The relevant information for control design comprises the state at that time and the history of prices until that time.A policy is admissible, denoted γ γ γ ∈ M(B ′ ), if the Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
induced control actions respect the capacity constraints of the trading battery, i.e., almost surely for t = 0, . . ., T − 1.The optimal expected revenue over an idle period of length T is then where E stands for the expectation computed with respect to the distribution on the prices.In our next result, we provide a closed-form expression for the optimal revenue J ⋆ (z 0 ).The proof followed relies on a dynamic programming argument, adapted from [56].We use the notation y + = max{y, 0} for any scalar y in stating the result.
Proposition 1: The maximum expected revenue from price arbitrage with a trading battery of capacity B ′ is where ρ t+1|t = E ρ t+1 |ρ ≤t is the one-step look-ahead price forecast, given the history of prices ρ ≤t until time t.Proof: Consider the optimal value functions for t = 0, . . ., T −2.By [57, Proposition 1.3.1], the parametric optimizers of the above optimization problems identify the optimal policy, and the required optimal cost is J ⋆ (z 0 ) = E J ⋆ 0 (z 0 , ρ 0 ) .Since ρ T −1 ≥ 0, the optimizer of ( 13) is given by u ⋆ = −z that yields ) Next, we use (14) and backward induction to prove for each z ∈ [0, B ′ ], price sequence ρ ρ ρ, and t = 0, . . ., T − 2. That is, we show (16) for time slot t, assuming that (16) holds for times t + 1, . . ., T − 2, and finally show that it also holds at time t, thus proving the proposition.
The rest follows from ( 16) with t = 0. Next, we prove the following using backward induction, for each z ∈ [0, B ′ ] and price sequence ρ ρ ρ.The proof of ( 16) for t = T − 2 is immediate from using (15) in (14).To proceed with the backward induction, assume next that ( 16) holds for times t + 1, . . ., T − 2. We prove that it holds at time t.To that end, the definition of J ⋆ t in (14) yields where The last line follows from the law of total expectation.The above readily yields the optimizer u ⋆ of ( 17), and in turn, the optimal policy γ ⋆ t in (16).Substituting that optimizer in the expression for κ, we get proving (16), and the proposition.□ Our proof shows that the optimal storage control policy has a threshold structure.That is, A must charge the trading battery completely, when the price in the next time step is expected to go up.Otherwise, it advocates to fully discharge.
Our model of storage operation neglects three important considerations.First, we do not model round-trip efficiency losses, but we believe our results can be extended to consider such losses.Second, we do not consider battery degradation from storage cycling.Vehicle batteries degrade with "deep cycling", and replacement costs can be significant, see e.g.[58].We believe that one can incorporate cycle aging for the trading battery along the lines of [59]; details are left for future investigation.Finally, we do not model ramping constraints on charging and discharging abilities.One can easily account for them by restricting the trading battery size.

IV. COMPUTING THE PLATFORM'S TOTAL REVENUE RATE
Using Proposition 1, we now derive A's revenue rate from energy trading.Assume the price process ρ ρ ρ is stationary Markov.Then, the distribution of ρt := ρ t+1|t − ρ t + becomes independent of t.Denote its expectation by ⟨ ρ⟩.A vehicle uses its battery for arbitrage when it is idle.Let r E be the stochastic reward during an idle period for a vehicle of length I .Then, Proposition 1 gives Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
with π E = B ′ ⟨ ρ⟩/ .We ignore the contribution of the initial state of charge at the start of an idle period to the revenue from arbitrage and use (T − 2) ≈ I .These approximations are justified when the number of pricing intervals T is sufficiently large within an idle period.
Remark 2: If the price process is independent and identically distributed ∼ ρ across time, then ⟨ ρ⟩ = E[(E[ρ] − ρ) + ] equals the "mean negative semi-deviation" measure of the prices that quantifies price spread; see [60] for details.The expected revenue rate from price arbitrage in (18) then naturally increases with this spread.
Focus on a single server within the M/G/N /N queuing model.Recall that customers who avail A's service choose among all available cars uniformly at random.Thus, each car (server) faces the same average customer traffic, 1  N λ(1 − L N ), where recall that L N is the Erlang loss defined in (6).Mean service time for each car is 1/µ.Using Little's law on this single car (server), we obtain Due to the law of total expectation, the right side of ( 19) also equals the probability that this server is busy.Using renewal theory, we then deduce Using renewal-reward theory, we now calculate the average reward that this server garners from energy trading as We utilized the law of total expectation in (a), the relation in ( 18) for (b), and ( 20) in (c).When splitting the vehicle battery for transportation and price arbitrage, a larger trading battery size increases the arbitrage revenue in each idle period.Also, it leaves less capacity for carsharing customers, that decreases the incoming traffic of customers, thereby increasing the idle time.The transportation price also has a similar effect on the revenue rate from energy trading in that it impacts the customer arrival rate, which in turn affects the lengths of the idle periods.
Having computed the average revenue rate from both transportation and energy trading, we calculate the total average revenue rate as A seeks to jointly optimize its aggregate revenue rate as maximize The aggregate revenue rate R tot is a nonlinear, possibly nonconcave, function of p and B. In what follows, we identify structural properties of R tot for N = 1, and then develop an algorithm to optimize it for general N .
Remark 3: The expected revenue over an idle period E[r E |idle time = I ] from energy trading in ( 18) is proportional to both the idle time and the trading battery size.For a different grid service, we expect this quantity to assume a similar form, with a service-specific constant of proportionality.For example, if the vehicles collectively provide reserve services in the wholesale electricity market, the compensation scales with stand-by capacity and time, at an average reserve price.In such an event, the rest of our analysis remains valid with the V2G goal being different from price arbitrage.

V. THE SINGLE-CAR CASE WITH EXPONENTIALLY DISTRIBUTED RESERVATION PRICES
It is challenging to establish properties of the optimizer of R tot ( p, B) for N > 1 cars.Surprisingly, it is amenable to analysis with N = 1 car when the reservation prices are exponentially distributed with mean ⟨π⟩.
When N = 1, A's carsharing business becomes an M/G/1/1 queue, for which L 1 = λ/(λ+µ), and the aggregate revenue rate R tot becomes where the last line follows from substituting λ and µ from ( 1) and ( 2), respectively.Using the above expression, we now identify the optimal price p as a function of the transportation battery size B. In the following, W denotes the Lambert-W function that satisfies W(xe x ) = x.Proposition 2: Suppose the reservation prices are exponentially distributed with mean ⟨π ⟩.For a given B ∈ (0, B tot ], the maximum of R N =1 tot occurs at where p 0 := βλ 0 τ (B/β − ), Proof: From ( 24), R tot can be written as ϕ 1 /ϕ 2 , which gives Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
where F π ( p) = e − p/⟨π⟩ denotes the complementary cumulative distribution function of the reservation prices.Denote the right side of ( 27) as D( p).
The observation D(0) > 0 rules out p = 0 as an optimizer.Next, for large p, we deduce that where C 1 , C 2 are positive constants that do not depend on p. Consequently, D( p) < 0 for large p, precluding +∞ as an optimizer.Thus, candidate optimizers are the roots of D.
which yields the unique root The uniqueness follows from the fact that W is uniquely defined for all positive arguments.Using the property ln[W(z)] = ln(z) − W(z) in ( 29) gives the expression in (25).□ The result reveals several insights.To discuss them, define for convenience, the notation Using this notation, we obtain which implies p ⋆ (B) increases with p 1 , when p 0 is held constant.Parameters p ret and ⟨ ρ⟩/ only affect p 1 , and not p 0 in (26).Thus, we infer that the revenue-maximizing price increases with both the retail rate p ret and the measure of arbitrage opportunity ⟨ ρ⟩/ .Such a behavior is expected, given that the more A has to pay for charging its car, the more A charges its customers to compensate.Similarly, the larger the arbitrage opportunity from energy trading becomes, the more A seeks to exploit said trading by increasing its transportation price to reduce incoming customer traffic.A similar explanation holds for ⟨π ⟩.Specifically, we have Customer's willingness to pay more allows A to extract more from them through pricing.
In our M/G/1/1 queuing model, customers leave if a car is not available to drive when they arrive.Next, we analyze the N = 1 case with exponentially distributed reservation prices, where customers patiently wait in a queue.That is, the platform is modeled as an M/G/1 queue.

A. The M/G/1 Queuing Model With Patient Customers
With patient customers, the queue length must remain stable, i.e., λ < µ, which imposes the constraint Per Section II, A makes revenue at a rate π T = ( p − p ret β − ) β from a car that is busy and makes revenue at a rate π E = B ′ ⟨ ρ⟩ from an idle car.For an M/G/1 queue, it is known that From renewal-reward theory, the aggregate revenue rate then becomes With λ and µ from ( 1) and ( 2), respectively, the optimization of the total revenue rate R M/G/1 tot then becomes maximize where a small δ > 0 is introduced to avoid optimization over an open set, dictated by (33).Next, we derive the revenue-maximizing price with the M/G/1 queuing model.Proposition 3: Suppose the reservation prices are exponentially distributed with mean ⟨π ⟩.For a given B ∈ (0, B tot ], the maximum of R M/G/1 tot occurs at where p 0 and p 1 are defined in (26).Proof: Using F π ( p) = e − p/⟨π⟩ , we get This derivative is positive at p = 0 and crosses zero exactly once at p 1 > 0. The stability constraint, upon rearrangement, implies p ≥ ln[ p 0 /(1 − δ)], completing the proof.□ This derivation of the total revenue rate and its optimizing price stands as a correction to that in [1].

B. The Consequence of Customer Patience
We now compare the two queuing models with patient and impatient customers.Using the expressions for the revenue-maximizing prices from Propositions 2 and 3, we infer where W (B) is defined in (30).That is, impatient customers pay more for carsharing service, compared to patient customers.With impatient customers, less number of customers Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
avail A's service; A increases the price per customer to compensate for that lost revenue.One can view the difference ⟨π ⟩W (B) as a customer's reward for patience.This reward grows with λ 0 through p 0 .In other words, A levies a steeper charge per impatient customer to make up for the lost revenue from a higher customer traffic.These rewards vanish as B ↓ 0.
More precisely, we have implying that a vanishing transportation battery diminishes the relevance of customer patience.We plot R tot for the two queuing models in Figure 4 with the same set of parameters.The dashed lines plot p ⋆ (B)-the unique solution in (25) for the M/G/1/1 queuing model and the candidate maximizer from (37) for the M/G/1 model.There are several qualitative differences between the plots, which illustrate the impact of customer patience on A's business.First, the overall revenue rate for the M/G/1 model is higher than that from the M/G/1/1 model.This is expected, as A caters to more customers with patience, yielding a higher revenue rate.Second, for the M/G/1 model, the plot exhibits a gap when p is low and B is high.Low prices attract too many customers and larger transportation battery allows longer trips.As a result, the queue length grows unbounded, compromising the stability of the M/G/1 queue.

VI. ALGORITHM TO OPTIMIZE AGGREGATE REVENUE RATE
With a fleet size of N > 1 cars, it is challenging to derive closed-form expressions for the revenue-maximizing price and battery split for the platform with an M/G/N /N queuing model, due to the dependence of R tot on the Erlang blocking probability L N , which in turn depends on the choice of p, B. Let us design an algorithm to numerically maximize R tot .More precisely, we consider a projected gradient ascent algorithm to optimize R tot over p, B. Consider an upper bound p and restrict the search over Let P [z] define the projection of z on .Then, starting from some ( p 2 , B 0 ), we compute with a suitable step-size α > 0, till a termination criterion is met.We terminate when the 2-norm of the difference between the last two iterates falls below a tolerance of ϵ > 0.
Remark 4 Convergence properties of the algorithm: The throughput of an M/G/N /N queue is known to be jointly concave in λ, µ ( [61]).Convergence guarantees of the projected gradient ascent algorithm may be possible to derive, under specific distributional choices of trip times and reservation prices.In general, we cannot guarantee convergence to a global optimizer.It does so for numerical experiments that we conduct, see below.
The gradient in (42) can be computed using properties of the Erlang loss probability as follows.We begin by writing R tot as where θ ( p, B) = λ/µ is the offered load.Thus, we have Furthermore, we have with x = p, B. According to [62], This derivative approaches zero for θ ↓ 0 for N > 1.The calculations for ∂θ/∂ x with x = p, B are dependent on the specifics of the distributions of reservation prices and trip times, and are given by For example, if the reservation prices and trip times are exponentially distributed with means ⟨π ⟩ and ⟨τ ⟩, respectively, they become The gradient vector in (42) can now be computed using (44), upon combining results from (45), (46), and (47).In computing these gradients, L N can be calculated recursively via To verify our algorithm, we inherit the parameters from our experiment in Figure 4 with N = 1.We numerically estimate ( p ⋆ , B ⋆ , R ⋆ tot ) = (13.83,28.08, 3.14) through a gridsearch.Then, we run our projected gradient ascent algorithm Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

VII. VARIATION OF AN OPTIMAL SOLUTION WITH THE PROBLEM PARAMETERS
The key parameters that define A's business model are the fleet size N , the base customer traffic λ 0 , the expected trip time ⟨τ ⟩, and the expected gain rate from energy arbitrage with unit battery capacity ⟨ ρ⟩/ .We now apply our algorithm to study the variation of the output with these parameters.For our experiments, we start with the parameter set below, but vary specific quantities of interest, as outlined.
First, we study the impact of fleet size N in Figure 5.With growing N , B ⋆ decreases when the customer traffic is low but increases when the customer traffic is high.Low traffic limits the ability to exploit carsharing customers for higher revenue rates.Consequently, a larger number of cars sit idle, forcing A to reduce B ⋆ to garner higher revenues from energy trading during the idle periods.With heavy traffic, a larger number of cars allows for A to serve more customers, each of whom contributes to a higher revenue rate with higher B ⋆ .Interestingly, Figure 6 indicates that revenue per vehicle decreases with N under both heavy and light traffic, suggesting diminishing marginal returns.We suspect that our framework will permit the characterization of a discrete concave utility function for cars, which in turn, depends on customer traffic.Given statistics of traffic patterns and maintenance costs for the fleet, such a utility function can then help A identify optimal fleet size.
For the rest of the experiments, we set N = 30.In Figure 7, we study the impact of varying the metric of arbitrage opportunity from energy trading, ⟨ ρ⟩/ .In low traffic regimes, our algorithm quickly starts to favor lower values of the transportation battery, reducing it to zero after a point.In high traffic regimes, low values of said metric are not enough to allocate any battery for energy trading.However, after it increases beyond some value, B ⋆ falls below B tot , implying A exploits the battery for dual-use.
Next, in Figure 8, we study the variation of B ⋆ with expected trip time ⟨τ ⟩, which characterizes the exponential  distribution of τ .Initially, longer expected trip times lead to higher revenues per customer the platform can accrue from transportation.As a result, A favors higher B ⋆ to exploit this demand.At some point, the transportation battery equals B tot , beyond which any increase in ⟨τ ⟩ in fact decreases the traffic of customers that avail carsharing services.Surprisingly, after a point, A switches to B ⋆ = 0, choosing to operate the cars as static batteries!Indeed, as the observed traffic λ reduces with higher ⟨τ ⟩, energy trading becomes more lucrative than transportation service.One might surmise that, at this point, A should decrease B ⋆ gradually with an increase in ⟨τ ⟩.However, note that any partial reduction of B ⋆ does not increase incoming traffic as the customer demands for longer trips exceed the capabilities of the car batteries.As a result, the switch is abrupt, and occurs at lower ⟨τ ⟩ when price arbitrage opportunity, measured in ⟨ ρ⟩/ , is higher.We remark that while our model reveals this interesting behavior, such parameter combinations are unlikely to appear in practice, given that EVs are much more than static batteries.
Finally, we study the variation of B ⋆ with base traffic λ 0 in Figure 9.When arbitrage opportunity is low, the transportation battery generally increases with customer traffic and at some point, allocates all battery capacity to meet customer needs.With higher arbitrage opportunities, however, an increase in base traffic reduces the idle time for cars that decreases energy trading revenues.In such situations, A in fact lowers the battery allocation for transportation to compensate.These experiments collectively capture the complex interactions of customer traffic, arbitrage opportunity, trip times, and fleet size on A's business.The variations reveal the subtle tradeoffs in dual-use of EV batteries, and highlight the richness of our modeling framework.

VIII. REVENUE RATE FROM ENERGY TRADING
A formal empirical study to optimize the operations for a realistic electric carsharing company is challenging for several reasons.For example, consider the distribution of reservation prices F π .This distribution is hard to without a systematic exploration of the price elasticity of customers.Moreover, while carsharing services and car-rental companies have a long history, electric carsharing is still in its infancy.A set of more realistic demand variation and trip-time distributions remain difficult to assess, based on data from carsharing companies and those for classic car rental companies, given user behavior with EV rentals may differ from that with gasoline-powered vehicles due to range anxiety, availability of charging infrastructure, etc.As an alternative to a complete empirical study, we provide a realistic benchmark for the profitability of dual service provision.Recall that the revenue rate from energy arbitrage is given by π E = B ′ ⟨ ρ⟩/ .We now estimate ⟨ ρ⟩/ , the measure of arbitrage opportunity with price data from wholesale electricity markets operated by the California Independent System Operator (CAISO) [63].
Consider 5-minute data of locational marginal prices averaged across the CAISO territory for a full year from October 31, 2022, to November 1, 2023.We preprocess data by aggregating the 5-minute data into 15-minute data by combining groups of three intervals of five minutes.We estimate the transition probabilities and steady-state distributions for electricity prices with 15-minute granularity by binning the prices into 20 distinct segments.Based on the one-year data, we estimate a Markov chain among the bin centers using the frequency of transitions.The histogram and the transition kernel heatmap are in Figures 10a and 10b, respectively.Based on the estimated transition probability matrix, we derive the stationary distribution of prices and eventually calculate the parameter ⟨ ρ⟩ of interest, based on the formula derived in Section IV, where expectations were replaced with empirical means.
Our analysis yields ⟨ ρ⟩/ = 3.37 cents per 15 minutes interval per kWh battery capacity, and an average daily arbitrage revenue of $3.24.To put this into context, the Nissan Leaf SV Plus has a 62 kWh battery capacity with its ability to charge at a brisk 100 kW and its efficient 10 kW consumption rate.Its vehicle-to-grid (V2G) function permits returning electricity to the power network at 12 kW.The rate of charging/discharging, combined with our estimated ⟨ ρ⟩/ , highlights the profitability of dual service provision, given that a car rental in Los Angeles on Priceline [64] earns an average of $38 per day.
We conclude this section with two observations.First, our calculation of ⟨ ρ⟩/ varies with how we choose to bin the prices.An increase in the number of bins tends to yield slightly reduced values for the arbitrage opportunity, but the transition probability matrix estimation itself becomes more challenging, given that transitions are more infrequent with an increased number of bin centers, and should be carried out with more data.Notwithstanding this limitation of the estimation process, an arbitrage opportunity in the vicinity of our estimate makes a strong case for dual service provision, among which price arbitrage is only one possible avenue for V2G services.Second, our results are based on averaged locational marginal prices from CAISO.Local prices are typically more volatile than the geographically averaged variant.We anticipate the profitability of V2G service to vary across locations for which our estimation again provides a reasonable ballpark.

IX. CONCLUSION
We provided an analytical model for the business of an electric carsharing service platform.We developed a queuing model for carsharing and combined it with an energy trading mechanism with car batteries.We obtained closedform expressions for the revenue rate of such a carsharing platform as a function of two parameters-the price it charges its customers and the portion of the battery used for energy trading, albeit derived under simplifying assumptions.The analysis extracts several key elements that allowed us to gain structural insights into the dependency of the business decisions on these elements, though did not model all aspects of the business.
Our work is motivated by the business question of electric carsharing to become a distributed energy resource aggregator.EVs command the ability to leverage onboard power electronics to quickly respond to grid requirements.We show that provisioning such services can be profitable, and adds a revenue stream from the energy sector to an otherwise purely transportation service provider.Our paper is a first step to combining transportation service models and battery control strategies for dual service provision.Similar to the developments in [65], [66], and [67] that provide theoretical analyses for ridesharing companies to optimize their prices, we believe our work will influence pricing and battery operation decisions for electric carsharing companies that choose dual-service provision.A large carsharing company that chooses to participate in energy markets will likely spur innovation in battery and V2G technologies, enabling EVs to be mobile storage units capable of bidirectional power flow.
Let us conclude the paper with directions for future research.A limitation of our modeling framework is the strict splitting of our battery into different parts for serving transportation and energy transaction needs.While this ensures a non-random minimum battery offered to a transportation customer, one can envision a more dynamic partitioning based on temporally varying customer demands for cars-an analysis left for future work.Important considerations such as battery aging, especially from deep cycling, are not modeled in our setup.We want to understand how battery split and charging/discharging decisions might vary over time, when battery health is taken into account.All aspects of carsharing services such as geographical reallocation and its impacts on pricing with EVs are interesting directions for future research.

Fig. 3 .
Fig. 3.The price process during the idle period.