1. Introduction
The usage of electric vehicles (EVs) has seen a great rise on a large scale in recent years [
1,
2]. However, the adoption of electric vehicles is limited by problems such as the slow charging of battery packs (BPs) and the accelerated aging of BPs during fast charging (see, e.g., [
3,
4] for overviews of related problems and solution trends). Since batteries are the main source of power for EVs, ensuring energy supply is an important way to improve users’ experience. At present, the power supply method for EVs is divided into two types: plug-in charging and battery swaps [
3,
5]. Plug-in charging has disadvantages such as a long charging time, fast charging shortening the service life of the battery, and the parking lots required for charging taking up a larger space. In addition, if the daily load of residents and the peak of EVs’ charging load are in the same time period, this will lead to a “peak–add–peak” state, which will affect the normal operation of the power grid. On the contrary, the battery swapping scenario addresses these problems well. Battery swapping for EVs can decrease user waiting time, reduce purchase cost, and improve batteries’ useful life. Therefore, many companies have adopted the battery swapping scenario for EVs. However, there are still some challenges in the promotion of the battery swapping scenario for EVs, such as the operating cost of the battery swapping and charging station (BSCS) and the centralized battery charging load.
Modern research on the implementation of battery swapping offers a range of models to study various aspects of the BSCS’s operations, including the battery logistics and transportation strategy as well as energy management and operation scheduling in EVs’ battery swapping and charging systems and networks. A queueing model of BSCSs with Poisson arrival and constant service times was proposed by Choi and Lim in [
6] to develop and analyze queue-length-dependent overload control policies. The queue distributions under different policies are derived using an embedded Markov chain, and system performance measures such as blocking probability and mean waiting time are examined by numerical examples.
In [
7], the operation of a BSCS was represented using a finite-horizon Markov decision process model combined with a dynamic programming algorithm, which allows determining the number of BPs to recharge, discharge, and replace over time. In [
8], an optimal scheduling problem was examined, which assigns the best BSCS to each EV, based on their current location and battery charge level. A scheduling strategy of the optimal transportation of BPs from a charging station to a swapping station was developed in [
9]. The strategy involves an optimization problem, which is solved using a genetic algorithm. This strategy was compared with two simple strategies by using the Monte Carlo simulation of battery swapping demand.
Given the cost and efficiency of operating battery replacement and charging stations, many scientists have proposed various strategies. Kang et al. [
10] proposed a new strategy for the centralized charging of EVs within the framework of battery replacement scenarios. This strategy considers optimal charging priorities and charging locations and, ultimately, minimizes the total charging cost based on electricity spot prices. A battery-planning strategy based on a partitioned battery management method was developed by Yang et al. [
11]. In order to maximize profits, an optimization objective function was set, including the number of batteries in each segment. San et al. [
12] obtained the optimal charging strategy for a single battery replacement and charging station in order to minimize the cost of charging it. The optimization model was transformed into a Markov decision process with constraints, and the optimal strategy was obtained using the Lagrangian method and dynamic programming. Liu et al. [
13] demonstrated the method to optimize the charging and logistics of discharged and fully charged batteries to maximize the profits of battery replacement and charging stations. The problem of the optimal location of battery swapping stations (BSSs) was solved in [
14] by using a fuzzy multi-criteria decision-making approach.
Wang et al. [
15] addressed the problem of the online management of BSSs to minimize energy costs and ensure service quality. At the same time, the problem of designing optimal autonomous battery-swapping stations was studied to determine the optimal number of batteries and to achieve the ideal compromise between charging flexibility and battery cost distribution. Zhang et al. [
16] confirmed that the peak demand for battery replacement services can be effectively reduced, and the use of optimization strategies can reduce the total cost by approximately 12%. The above research mainly considered the impact of factors such as the number of batteries, the battery charging costs, logistics planning, electricity prices during use, and the profits of battery replacement stations on the cost of battery replacement and charging stations to reduce operating costs. It suggested using different strategies to replace batteries and charging stations to varying degrees. However, the above view does not take into account the relationship between the load generated by large-scale centralized charging and the cost of replacing batteries and operating a charging station.
Huang et al. [
17] found that the correspondence between the stochastic supply of wind and the need to charge electric vehicles can reduce the demand for conventional energy and carbon dioxide emissions. Xing et al. [
18] proposed a data-based method for predicting electric vehicle charging demand based on online travel data. The predictive model provides recommendations for chargers and charging management. Battery charging load research mainly includes load prediction and the impact of reducing battery charging load on the power grid. The impact of reducing battery charging load is mainly focused on charging methods and increasing the overload capacity of the power grid.
However, there are few studies on the logistics and transportation of batteries at swapping and charging stations. Furthermore, current research does not propose specific transportation strategies to reduce the load generated by large-scale charging. The operating costs of battery replacement and charging stations and large-scale battery charging loads are the main areas for the implementation of battery replacement scenarios [
19,
20].
With the aim to contribute to the study of the BSCS’s operations in this paper, the authors propose a framework based on tropical algebra to represent and analyze stochastic models of BSCSs. Tropical (idempotent) algebra deals with the theory and applications of algebraic systems with idempotent operations [
21,
22,
23,
24,
25,
26,
27]. A typical example of these systems is max-plus algebra, which is a semifield with addition defined as the operation of the maximum and multiplication as the arithmetic addition. One of the advantages of tropical algebra is that many problems, which are not linear in the ordinary sense, can turn into linear ones in the tropical algebra setting. The models and methods of tropical algebra find applications in various research domains such as location analysis, project scheduling, and decision-making. The application area includes stochastic dynamic systems, where tropical algebra serves as a useful tool to represent and analyze stochastic systems governed by tropical linear dynamic equations [
24,
26,
28].
In this paper, we propose and investigate a queueing model of BSCSs for EVs. A new approach to the analysis of the queueing model is developed, which combines the representation of the model as a stochastic dynamic system with the application of the methods and results of tropical algebra. We describe the dynamics of the queueing model by a system of recurrence equations that involve random variables (RVs) to represent the interarrival time of incoming EVs. A performance measure for the model is defined as the mean operation cycle time of the station. Furthermore, the system of equations is represented in terms of the max-plus algebra in vector form as an implicit linear state dynamic equation. The performance measure takes on the meaning of the mean growth rate of the state vector (the Lyapunov exponent) of the dynamic system. By applying a solution technique of vector equations in tropical algebra, the implicit equation is transformed into an explicit one with a state transition matrix with random entries. The evaluation of the Lyapunov exponent reduces to finding the limit of the expected value of norms of tropical matrix products. This limit is then obtained using results from the tropical spectral theory of deterministic and random matrices. With this approach, we derive a new exact formula for the mean cycle time of the BSCS, which is given in terms of the expected value of the RVs involved. The numerical results of the Monte Carlo simulation of the BSCS’s operation is demonstrated, which show a good agreement with the exact solution. We discuss the applications of the obtained solution to evaluate the performance of one BSCS and to find the optimal distribution of BPs between stations in a network of BSCSs.
As the obtained results show, the proposed approach based on the methods and results of tropical algebra presents a useful tool to model and analyze some classes of queueing models including the model of the BSCS under study. The approach can offer solutions, which are given in terms of the expected values of the RVs involved and independent of the particular probability distribution of the RVs. Such solutions may be of interest in the case when the details of the underlying probability distributions are difficult to determine and, thus, serve to supplement other modeling techniques with the need to fix a distribution.
The rest of the paper is organized as follows. In
Section 2, we describe a queueing model of the BSCS that serves to both motivate and illustrate the study.
Section 3 provides an overview of key definitions and the notation, and presents the preliminary results of tropical algebra, which are used in subsequent sections to examine the model under consideration. A stochastic dynamic model defined in the tropical algebra setting is described, and some related results are discussed in
Section 4. An application of the tropical-algebra-based approach to the analysis of the BSCS model is demonstrated in
Section 5, which includes a simple formula for calculating the mean cycle time of the BSCS and related simulation results. In
Section 6, an example of the application of the obtained results to the optimal distribution of BPs between BSCSs is illustrated.
Section 7 offers some concluding remarks.
2. Battery Swapping and Charging Station Model
We considered a BSCS that serves incoming requests of EVs to swap a depleted (discharged) BP to a fully charged one. Each EV is assumed equipped with one BP, and all BPs are considered of the same type (identical). The BSCS consists of a battery swapping and battery charging/storage areas.
The station has a set of identical BPs located in the storage area where they are charging and, then, waiting for use in swapping. All BPs can be charged simultaneously, and the charging of every BPs takes the same time. The swapping operations are performed one at a time and require equal time for all EVs.
The EVs arrive at the BSCS at random with time intervals distributed according to some probability law. Upon arrival, an EV waits until the following conditions hold: (i) a fully charged BP is available, and (ii) the swapping of the BP for the previous EV is completed, or the swapping procedure is immediately started if a fully charged BP and the swapping unit are both available.
A graphical representation of a BSCS as a queueing model is given in
Figure 1. The model consists of (i) a single-server queue, which represents an arrival source of EVs, (ii) a single-server fork–join queue, which represents the swapping of batteries, and (iii) a multi-server queue, which represents the charging of the batteries. All queues have infinite buffers. At the initial time, the first queue is assumed to have an infinite number of jobs (EVs), the second queue has no job (the EV and BP ready for swapping), and the third queue has
m jobs (BPs ready for charging).
2.1. System of Recurrence Equations
Suppose that the station has m BPs intended for swapping, and define the following state variables. For , let be the arrival epoch of the kth incoming EV, be the completion time of the battery swapping for the kth EV, and be the time when a fully charged BP is available for the kth EV. We also assumed that for all .
We now describe the evolution of the system as a set of recurrence equations. We denote the time interval between the
the and
kth arrival epochs by
and assume
to be a sequence of independent and identically distributed positive (nonnegative) RVs with a finite expected value
and variance
. With this notation, we can represent the
kth arrival epoch as
Furthermore, we denote by
the swapping time of one BP. Observing that the
kth swapping operation starts as soon as the following events occur: (i) the
kth EV arrives, (ii) the
the swapping operation completes, and (iii) a fully charged BP becomes available for the
kth time, we write the equation:
Finally, we assumed that all
m BPs available in the station are discharged at the initial time epoch
. With the charging time of one BP denoted by
, we have
We now substitute
from the last equation into the second and, then, combine the first and second equations into the dynamic system in two state variables:
2.2. Performance Measure
We define the operation cycle of the BSCS model described by (
1) as the interval between successive completions of swapping operations. Furthermore, we consider the mean (average) cycle time over the first
k cycles:
We turn to the limit when
k tends to
∞ and assume that this limit exists (deterministically or with probability one) to write
The constant is referred to as the mean cycle time and may serve as a useful characteristic of the system. Specifically, for a large time horizon T, the ratio differs little from the mean number of battery swaps in the time interval from 0 to T. Since this ratio also shows the mean number of batteries swapped, it can be used to estimate other characteristics such as the mean total energy consumption for battery charging (which is considered proportional to the mean total charging time estimated as , where c denotes the energy consumption per BP) or the mean total revenue received from customers (proportional to ).
The evaluation of the mean cycle time directly from recurrent Equation (
1), which involves the operation of the maximum, may be a rather difficult problem even if the equations are in a simple form like those presented above. At the same time, this form of the recurrence equations offers a potential for the use of models and methods of tropical algebra, which allows one to handle such equations in a unified analytical framework. In the subsequent sections, we show how to represent the equations in terms of tropical algebra in vector form and, then, use this representation to evaluate the mean cycle time analytically.
3. Elements of Tropical Algebra
We begin with preliminary definitions and results of tropical algebra, which are used for the representation and analysis of the dynamic model in what follows. Tropical (idempotent) algebra deals with the theory and applications of algebraic systems with idempotent operations, which are studied in many works, including the monographs [
21,
22,
23,
24,
25,
26,
27].
3.1. Idempotent Semifield
Let be a set that is closed under associative and commutative binary operations: addition ⊕ and multiplication ⊗, and includes their neutral elements: zero and identity . Addition is idempotent: for all . Multiplication distributes over addition and is invertible: for each , there is an inverse such that (hereafter, the multiplication sign ⊗ is omitted to save writing).
The power notation with integer exponents specifies iterated products: , , , and for and integer . The powers with rational exponents are also assumed well-defined. The binomial identity takes the form of the equality , which is valid for any rational .
The set is assumed to be totally ordered by an order relation consistent with that induced by idempotent addition by the rule: if and only if . With respect to this order, addition and multiplication are monotone in each argument: if the inequality holds, then and for any z. For nonzero x and y such that and rational q, the inequality holds if and if . Furthermore, the inequalities and are valid for all x and y. Finally, the inequality is equivalent to the system of inequalities and .
The algebraic system is usually referred to as the idempotent semifield.
A typical example of the system is the real semifield , also known as max-plus algebra. In max-plus algebra, the operations are defined as and and the neutral elements as and . For any , the multiplicative inverse is equal to the opposite number in the standard arithmetics. The power coincides with the usual arithmetic product . The order relation ≤ corresponds to the natural linear order on .
3.2. Algebra of Matrices and Vectors
The scalar operations ⊕ and ⊗ are extended to vectors and matrices over
in the usual way. A matrix with all entries equal to
is the zero matrix denoted
. For any matrices
,
and
of appropriate sizes, and scalar
x, matrix addition, matrix multiplication, and scalar multiplication are defined by componentwise formulas:
For any nonzero -matrix , its multiplicative conjugate is the -matrix with the entries if , and otherwise.
The monotonicity of scalar addition and multiplication, as well as other properties that involve the order relations are extended to the operations on matrices, where the inequalities are understood componentwise.
A square matrix is diagonal if all its off-diagonal entries are equal to and triangular if its entries either above or below the diagonal are equal to . A triangular matrix with all diagonal entries equal to is called strictly triangular. The block diagonal and (strictly) block triangular matrices are introduced in a similar way.
A diagonal matrix that has all diagonal entries equal to is the identity matrix denoted by . The power notation for matrices is defined in the sense of tropical algebra as follows: , for any square matrix and integer .
The trace of a square matrix
of order
n is given by
A tropical analogue of the matrix determinant is defined as
If the condition
holds, the Kleene star matrix is calculated as
A matrix that consists of one column (row) is a column (row) vector. All vectors are assumed column vectors unless transposed. A vector with all entries equal to is the zero vector denoted . Any vector that has no zero entries is called regular. The vector that has all entries equal to is denoted by . In max-plus algebra, where , the vector has all entries equal to arithmetic zero (the usual zero vector).
For any matrix
and vector
, tropical norms are given by
which coincide in max-plus algebra with the maximum entries of
and
.
For any conforming matrices
,
and
, and scalar
x, the following relations hold:
A scalar
is an eigenvalue of an
-matrix
if there exists an
n-vector
such that
. The spectral radius of
is the maximum eigenvalue, which is given by
Note that, if the spectral radius is defined in the framework of max-plus algebra, it can be represented using ordinary arithmetic operations as the maximum of the mean (average) cyclic sums of entries in
in the form:
If a matrix
has no entries equal to
, then for all integers
, the following inequality holds (see, e.g., [
29]):
The next theorem is a consequence of the results obtained in [
30,
31] (see also [
22,
29]).
Theorem 1. For any -matrix , there exist the limits: 3.3. Vector Equation and Matrix Inequality
To conclude the overview of the preliminary results, we give a solution for a vector equation and derive inequalities for products of square matrices to be used in what follows.
Suppose that given an
-matrix
and
n-vector
, the problem is to find regular
n-vectors
that satisfy the equation:
The following lemma offers a solution of the equation in a special case as a consequence of the results obtained in [
26,
32].
Lemma 1. If , then Equation (5) has the unique solution . We now turn to evaluating the lower and upper bounds for the norm of a product of matrices in block triangular form. Let
for all
be conforming block triangular matrices given by the sum of block diagonal and strictly triangular matrices as follows:
Consider the product of the matrices
over all
, and denote it by
To simplify further formulas, we introduce the notation:
where the empty products are thought of as equal to the identity matrix
.
The next statement offers lower and upper bounds on the norm .
Proposition 1. Let for all be matrices defined as (6). Then, the following double-inequality holds: Proof. To obtain a lower bound, we use the inequality
, which holds for all
. By combining these inequalities, we have
Furthermore, we consider the upper bound. The application of the distributivity of multiplication over addition yields
We consider the product under summation and apply the properties of the norm to write
Since
for all
i, we obtain the upper bound:
We note that the matrix
is block diagonal, and hence,
. It remains to combine both the lower and upper bounds, which yields (
7). □
4. Stochastic Dynamic Systems
In this section, we examine stochastic dynamic systems in the tropical algebra setting, which are used for the description of the evolution of the queueing system under study in the next section. The main purpose of this section is to evaluate the Lyapunov exponent for a dynamic system with a state transition matrix of special form. For further details on the application of tropical algebra to stochastic dynamic systems, one can consult [
24,
28].
We consider a dynamic model that is governed by the state equation represented for all
in terms of max-plus algebra in the form:
where
denotes a state
n-vector and
a state transition
-matrix given by
Each entry of the matrix may be an RV or a constant. The corresponding random entries in the matrices for are assumed independent and identically distributed (i.i.d.) with finite expectation and variance. Note that the random entries in one matrix need not be independent.
We define the matrix product:
With this notation, the state dynamic equation at (
8) can be reduced to
The Lyapunov exponent indicates the mean growth rate of the state vector, and it is defined as the limit:
We note that, in the context of max-plus algebra, the last definition is represented in the conventional form:
Furthermore, with
where
, we have
and then, rewrite the above limit as
The next result from [
26,
33] (see also [
24,
28]), which is a consequence of Kingman’s subadditive ergodic theorem [
34], gives conditions for the above limit to exist with probability one (w. p. 1) and evaluates
as the limit of the expected values of
.
Theorem 2. Let be a stationary sequence of random matrices such that and . Then, there exists a finite number λ such that Since the matrices are assumed to be i.i.d., the sequence of these matrices is stationary. Moreover, since the random entries in have finite expected values, the condition holds. The condition actually means that the sequence of matrices does not degenerate into a zero matrix (which has all entries equal to in max-plus algebra), and it is assumed satisfied.
It follows from Theorem 2 that, for the dynamic systems under consideration, the Lyapunov exponent exists and can be found as the limit of the expected values
as
k tends to
∞. The evaluation of the limit and of the expectations
themselves can be a difficult problem. However, it is not difficult to solve the problem for matrices
that have a particular form or structure [
26,
33]. Specifically, if the matrices
are triangular, then the Lyapunov exponent is calculated as
In the context of max-plus algebra, the above formula turns into the maximum of the expected values of the diagonal entries in
given by
We note that the same result is valid for the diagonal matrices
as well. Moreover, this result can be readily extended to the system (
8) with block diagonal matrices.
Lemma 2. Let for be block diagonal matrices of the form: Consider matrices , and suppose that w. p. 1 as for all . Then, the Lyapunov exponent of the system (8) is given by Proof. Since the matrix product has the same block diagonal form as , we can write . Furthermore, we apply the binomial identity to write the equality . It remains to let k go to ∞ on both sides of the equality, which yields the desired result. □
The extension of this result to block triangular matrices seems to be not so easy. Below, we evaluate the Lyapunov exponent for block triangular matrices of special form.
Consider a dynamic system with state transition matrices
of block triangular form defined as (
6) in the framework of max-plus algebra. We suppose that the upper diagonal block reduces to an RV
and the lower is a constant nonrandom matrix
to write
We assume that for are i.i.d. RVs that have a finite expected value and variance, and the matrix has no zero entries. The RVs are also assumed i.i.d. with nonnegative expectation and finite variance.
Lemma 3. Let be the expected value of and be the spectral radius of . Then, the Lyapunov exponent of the system is given by .
Proof. To verify the statement, we show that as .
We substitute
and
into the double-inequality (
7), which yields
First, we examine the right inequality. We apply (
4) to see that
and
. Observing that
and
, we can write the inequalities:
With these inequalities, we expand the right inequality at (
9) as follows:
Next, we rewrite the last inequality in terms of ordinary operations and take expectations. Taking into account that
, we obtain
We note that is bounded, and hence, as .
Furthermore,
for
are i.i.d. RVs with finite expectation and variance. As
k goes to
∞, the expected value of the maximum of these RVs grows as
[
35,
36], and therefore,
Consider the last term on the right-hand side of (
10), and suppose that
. We represent this term as
We observe that
are i.i.d. RVs with the expectation
and finite variance. Since the expected value of the maximum of the cumulative sums of these variables grows as
as
k tends to
∞ (see, e.g., [
37]), we have
Using similar arguments, we can verify that if
, then
As a result, we conclude that
Consider the left inequality at (
9). As
k tends to
∞, we have
. Moreover, after rewriting the term
in terms of the usual operations, we see that
Therefore, the left inequality leads to the inequality:
Since the opposite inequality holds, we arrive at the conclusion that
which completes the proof. □
It is not difficult to see that this result remains valid if the matrix
may have zero entries, but some of its power
is a matrix without zero entries. Indeed, in this case, we can consider a dynamic system:
where we use the notation:
The matrix has a block triangular form with as its lower diagonal block.
For this system, we have and , which yields the Lyapunov exponent . Turning back to the initial system, we obtain the solution provided by the above result.
6. Example of Application Problem
In this section, we offer an example of the application of the obtained results to solve real-world problems. Consider a network that consists of N BSCSs. For each station , let be the mean interarrival time of EVs. We denote the swapping time and the charging time of one BP by and , respectively.
Assume that the BSCS is equipped with
BPs intended for swapping, and examine the mean cycle time for station
i, which is given by
The mean swapping rate at the station is evaluated as , whereas the mean number of BPs swapped for a large time horizon T is .
Let us suppose that one swapping at station
i generates an income
. Then, the mean total income during time
T is equal to
We represent the mean total income as a function of the number
m of BPs at the station in the form
It follows from the representation that the function
increases until
m becomes greater than a threshold value
, and remains unchanged with further increase of
m. The maximum mean total income and corresponding optimal number of BPs are defined as
where
denotes the integer part of
x.
Suppose there are
M BPs, which we need to distribute between the BSCSs in the network so as to minimize (maximize) an appropriate optimality criterion. If the purpose is to maximize the mean total income generated by the network, the problem is formulated to find the number
of BPs for each station
i to attain the maximum:
As a reasonable approximate solution technique, we can define the optimal numbers
to be proportional to
. With this technique, the number
is first found for each
as the nearest positive integer:
Furthermore, we check whether the numbers are outside their threshold values or not. If, for each i, the inequality holds, then the obtained numbers are taken as a solution to the problem.
Suppose that
for some
i. In this case, we decrement
by one and increment some
such that
We continue to redistribute BPs between stations until all stations have the number of BPs within their threshold values.
7. Conclusions
In this paper, we propose a new approach to the analysis of BSCSs’ operation, which combines queueing modeling with the application of the methods and results of tropical algebra. We started with the development of a queueing model in the form of a system of recurrence equations that determine the dynamics of a BSCS. We introduced a related performance measure in the form of the mean operation cycle time. Then, the model was represented in terms of max-plus algebra as a linear vector dynamic system with a random state transition matrix, whereas the performance measure became the Lyapunov exponent of the system. We applied the methods and techniques of tropical algebra together with the results on the convergence of the expected value of the maximums of random variables to find the Lyapunov exponent as a limit of the expected value of the matrix norms. After the calculation of the Lyapunov exponent, we arrived at an explicit expression in terms of the expected values of the random variables and constants involved. We showed how this expression can be used to evaluate and optimize the performance of the BSCSs’ operation.
We believe that the described research demonstrates the strong potential of the proposed approach to investigate various dynamic models that can be represented as stochastic linear dynamic systems in the tropical algebra setting. The results obtained indicated the ability of the approach to supplement and complement existing techniques of the modeling and optimization of BSCSs’ operation. The approach offers a potential to provide explicit results that are given in terms of the expected values of the the RVs involved in the dynamic model and do not require a specific probability distribution. At the same time, the approach can be applied only to dynamic models that are linear in the tropical algebra sense such as queueing models, whose dynamics can be described in terms of the operations of the maximum and addition. This constitutes one of the limitations of the obtained solution, which may make it difficult to extend this approach to other classes of queueing models. Another limitation is that the approach focuses on evaluating the Lyapunov exponents of dynamic systems and can be hardly extended to other performance measures of interest.
Possible directions of future research may concern further investigation of the obtained solution, including the sensitivity analysis of the model. An extension of the BSCS model to incorporate more-complicated operation patterns and accommodate additional constraints are of particular interest. As an example, one can consider a station where the number of simultaneously charged BPs is limited or the battery charging time is random. The formulation of new meaningful optimization problems to improve BSCSs’ performance and the development of efficient solutions constitute another promising line of investigation.