1. Introduction
Electric vehicles (EVs) have developed rapidly as a clean, zero-emission mode of transportation that reduces environmental pollution. Reliable charging infrastructure is a necessary condition for the large-scale adoption of electric vehicles. Compared to AC charging piles, DC charging piles have higher failure rates due to more components, larger operating power, and long-term outdoor exposure. Currently, preliminary operation and maintenance work has been carried out, but there are still issues such as rough planning, excessive dependence on experience, and unclear targets. Accurately evaluating the operation status and change trends of charging piles, taking preventive measures, reducing fault occurrences, and improving the operation efficiency of charging piles are crucial [
1].
In terms of the operation and maintenance of electric vehicle DC charging stations, current research mainly focuses on the online monitoring of charging facilities. Reference [
2] studied and designed a monitoring system for charging facilities through system requirements analysis and functional service requirements. The monitoring system is divided into a system platform layer, support service layer, public service layer, and application layer to facilitate the monitoring of power distribution, charging, safety protection, and measurement of charging facilities. Reference [
3] established a charging station system model, equipment information model, and communication model, forming the monitoring system’s modeling scheme and monitoring the key characteristic quantities of the facilities in the charging station. In Reference [
4], an online monitoring system based on a peripheral component interconnect (PCI) bus was designed to collect real-time voltage and current data from the charging facility’s co-coupling node, analyzing the equipment’s operating status and characteristics.
The above literature studied the operation and maintenance methods of charging stations from the perspective of monitoring systems. However, how to integrate the monitoring results of charging stations with the charging behavior of electric vehicles to formulate a reliable operation and maintenance strategy has not yet been studied. Risk-based maintenance (RBM) is a quantitative assessment of the consequences of equipment failure and used as the basis for formulating operation and maintenance strategies [
5]. At present, RBM has been widely applied in operation and maintenance. For example, Reference [
6] proposed a state model based on an improved semi-Markov chain and solved the optimal maintenance strategy with the goal of minimizing early maintenance costs and reliability loss. In Reference [
7], a prediction model using Bayesian classifiers was established with historical maintenance information and fault records. Maintenance reliability and economy were taken as risk indicators, and the minimum comprehensive risk was used as the optimization goal, effectively formulating the RBM strategy for a 27.5 kV vacuum circuit breaker. References [
8,
9] proposed a risk assessment method for the automatic operation and maintenance of high-voltage transmission lines based on segmented pre-whitening fuzzy prediction. This method realizes risk assessment and operation and maintenance optimization through big data feature classification and fuzzy clustering processing. For distribution equipment, the average real-time failure rate can be calculated using the feeder partition method according to the health index of the equipment. A differentiated maintenance strategy is then formulated based on the risk loss cost of each piece of equipment [
10,
11,
12].
The current research establishes a modeling scheme for the charging station monitoring system by building models for the charging station system, equipment information, and communication. It monitors key characteristic parameters of the facilities within charging stations and then forms an empirical operation and maintenance (O&M) approach. This paper proposes combining charging station monitoring data with electric vehicle charging behavior data, and based on historical data, online monitoring data, and external environmental data, establishes a training sample dataset. Current research classifies the big data characteristics of charging station monitoring and applies fuzzy clustering to achieve risk assessment and O&M optimization. However, this fault classification is relatively coarse and cannot accurately reflect the differences among faults, leading to inefficient allocation of maintenance resources. In this paper, the XGBoost algorithm is used to train a charging station status assessment model, and road traffic and user driving models are established. Risk tracking is used to determine the maintenance priority of each station, and an O&M strategy optimization model for charging stations is developed, with O&M costs and system reliability benefits as the objectives.
2. Operation and Maintenance System of Electric Vehicle Charging Station
In addition to evaluating their own operations, the state assessment of charging stations should also account for their usage patterns, including user habits, the road network, external environment, climate, and other dynamic factors. By integrating real-time traffic conditions, the operational status of charging station equipment, and user travel behaviors—information gathered through crowd sensing technologies—a comprehensive operation and maintenance system can be developed. This system will consider both the equipment side and the user side, as illustrated in
Figure 1.
The purpose of operation and maintenance work is to reduce the failure rate of power equipment, enhance reliability, and minimize the impact on users. The operational risk of a charging pile is determined by its inherent reliability parameters and the influence of its running state on users within the system. By conducting state evaluations, optimizing the operation and maintenance strategy can significantly improve the scientific and efficient operation of the charging pile, thereby maximizing operational and maintenance benefits.
The charging station operates in the following four distinct states: normal, attention, abnormal, and severe. The normal state indicates that the station’s variables are within a stable and optimal range, ensuring normal operation. The attention state signifies that the variables are close to the standard limit value, allowing for continued operation but requiring enhanced monitoring. The abnormal state means that the variables slightly exceed the standard limit, necessitating continuous monitoring and appropriately scheduled maintenance outages. The severe state indicates that the variables significantly exceed the standard limit, necessitating immediate power outage maintenance.
The model includes a charging station status assessment model and an operation and maintenance model. The former assesses the operational status of a single station, while the latter optimizes the operation and maintenance of multiple charging stations in the grid based on accurate status assessments of each charging station.
By continuously optimizing and evaluating through the tree model, the type with the highest probability is determined to be the closest to the actual operating state of the charging station. The
Section 3 introduces the principles of the XGBoost model, while
Section 4 describes the application of the XGBoost model in assessing charging station status, including probability parameters, model parameters, loss functions, cross-validation, and the evaluation process of model trees.
3. XGBoost Principle
Boosting, as a classification model, is an ensemble learning technique. The fundamental idea behind boosting is to create a high-accuracy model by combining and weighting multiple low-accuracy models. This process enhances the overall performance and accuracy of the model, as illustrated in
Figure 2.
XGBoost is an enhancement of the gradient boosting decision tree (GBDT) model. The main concepts underlying XGBoost are as follows [
13,
14,
15,
16]:
- (1)
Base learner: regression tree
The most fundamental component of a boosted tree is known as a regression tree, or CART (classification and regression tree). CART assigns the input to each leaf node based on the input attributes, with each leaf node corresponding to a real number score.
Each regression tree can be divided into a structural part and a leaf weight part. The
t-th tree model can be expressed as follows:
In the formula, w is the score of leaf nodes, q(x) represents the leaf node index number corresponding to the sample x. T is the number of leaves.
The complexity includes the number of nodes in a tree and the L2-norm square of the output fraction on each leaf node, which is defined as follows:
where
γ is the penalty coefficient of the number of leaf nodes, and
λ is the regular term coefficient.
where
xi is the
i-th sample,
,
, and
is the defined loss function,
yi is the true value of the
i-th sample, and
is the model obtained by the previous
t − 1 round of training.
Define
I as the set of samples above a leaf with index
j.
; further, the modified objective function is as follows:
where
,
.
Suppose that the structure of the tree
q(
x) is known, the optimal (
w) and the corresponding objective function value can be determined using Formula (4), as follows:
When creating a tree model, a greedy algorithm can be used to add a segmentation to the existing leaves each time. For a specific segmentation scheme, the gain obtained is as follows:
In the formula, the first term represents the fraction of the left subtree, the second term represents the fraction of the right subtree, and the third term represents the undivided fraction. This third term accounts for the complexity cost introduced by the addition of new leaf nodes.
According to this principle, XGBoost combines multiple classifiers to achieve better generalization performance compared to a single classifier. Additionally, a regularization term is added to the objective function, including the L2 regularization term for the number of leaf nodes and the score of the leaf nodes, to prevent the model from overfitting. The proposed XGBoost method can achieve model evaluation visualization and clearly demonstrate the evaluation process of a charging station’s operational status, enabling an accurate assessment of the operational status and the optimization of maintenance.
4. State Evaluation Model of Charging Station
In this paper, the state evaluation model of a charging station is treated as a multiclassification model. The state variables listed in
Section 2 are used as features, and the four operating states are used as classification results. The training model’s data comprise historical fault data, maintenance data, monitoring data, and external environment data of the charging stations. This study collects and organizes 320 data points, using 280 for training and 40 for testing.
Through continuous training and calibration using multiple datasets, especially dynamic monitoring data, parameters that align with actual conditions are obtained. Compared to other machine learning algorithms, XGBoost first performs preliminary classification of the data using four types of basis functions, which avoids inconsistencies in parameter training caused by large variations in the data.
4.1. Model Building Steps
- (1)
Definition of loss function
The state evaluation model of the charging station is a multiclassification model, so the loss function is defined as a cross-entropy function. For a sample, the loss function is expressed as follows:
where
is the probability that the sample belongs to category k,
pk(
x) is the probability that the model will predict that the sample belongs to category k, and
.
For all samples, the first derivative (g) and the second derivative (h) of the loss function are calculated as follows:
- (2)
Initialize the prior probability
Since the running state of the charging station is divided into four categories, determine the probability that each sample belongs to each class.
- (3)
Fit the first tree for the first category [
17,
18], as follows:
- (a)
Using a greedy algorithm, the tree model is established by segmenting the existing leaf nodes. According to Equations (7), (9), and (10), the gain value of each segmentation is calculated, and the segmentation scheme with the largest gain is selected to complete the establishment of each tree;
- (b)
For each tree established in step (a), the corresponding structure score is calculated according to Formula (6). The tree model with the smallest structure score is then selected as the first tree in the first category;
- (c)
According to Equation (5), the leaf score of the tree is calculated in step (b), resulting in a complete regression tree model. The probability that the model prediction sample belongs to category 1 is then updated;
- (d)
Fitting the first tree to the second category follows the same process as outlined in step (3), further completing the establishment of the first tree for all four categories;
- (e)
Repeat steps (c) through (d) until the set threshold is reached. This completes the establishment of M trees for all categories, forming the state evaluation model of the charging station. By using historical data and calling the ECDF function in the MATLAB statistical toolbox, the empirical probability distribution of the 50 prediction boxes is estimated.
4.2. Cross-Validation and Model Parameters
In this paper, the K-fold cross-validation method is used to divide the training data into K equal parts. Of these, K−1 parts are used for training, and 1 part is used for validation. The average classification error rate is used as the performance index to evaluate the model’s classification effect. The model’s parameters are adjusted, and the optimal parameter selection is determined on the basis of the cross-validation results. The main parameter selections are shown in
Table 1 [
19,
20].
Except for the parameters listed in
Table 2, all other parameters are set to their default values. Using the above parameter settings, the optimal charging station state evaluation model is obtained.
4.3. Appraisal Process
XGBoost uses the tree model as the base model to visualize the structure, and the process for evaluating the operating state of the charging station can be seen. Because of the large number of trees, the first two trees of the first category are taken as examples. The tree structure is shown in
Figure 3 and
Figure 4.
From
Figure 3 and
Figure 4, it can be seen that the state quantity of each tree participates in the division with its specific division value, and the leaf nodes correspond to different scores. For a set of operating data from the charging station, the leaf nodes to which these data ultimately belong in each tree can be determined on the basis of the state quantity division conditions. In each category, the scores corresponding to the leaf nodes of this dataset in each tree are accumulated. Assuming that in
Figure 3 and
Figure 4, the data in this group correspond to the leaf nodes in the lower left corner, the score is 0.003412526. The score of this group of data in each category can be expressed as [
S1,
S2,
S3,
S4]. The probability of converting the scores to the group of data corresponding to each category using the softmax function is [
P1,
P2,
P3,
P4]. The category with the highest probability is the result of this evaluation, indicating the corresponding operating state of the charging station.
5. Charging Station Optimization Operation and Maintenance
Conventional operation and maintenance of charging stations typically involve planning the work either in the order of proximity or based on the years since the charging station’s investment. However, based on the state assessment of the charging station, operation and maintenance should be carried out according to the risk associated with the station’s condition. Using the risk assessment method proposed in this paper, the operation and maintenance priorities for each station are determined on the basis of the state assessment results.
The operation and maintenance time is divided into equal-period and optimized-period operation and maintenance. Equal-period operation and maintenance treats all charging stations equally, distributing the workload evenly throughout the operation and maintenance cycle. Optimized-period operation and maintenance, as proposed in this paper, considers both the operation and maintenance costs and the reliability gain. It allocates the workload for each station with the goal of minimizing the total operation and maintenance cost.
5.1. Objective Function
The objective function of the optimal operation and maintenance strategy for electric vehicle charging stations considers both the operation and maintenance costs and the reliability gain [
21], as follows:
where
F(
X) is the total objective function,
xm in
X is the number of m operation and maintenance periods of the
m-th operation and maintenance charging station. Taking the operation and maintenance work of an electric vehicle charging station in a city as an example, the weekly working hours are 5 days, and the single-day working hours are 8:00 to 12:00 in the morning and 14:00 to 18:00 in the afternoon. Therefore, this paper considers that the operation and maintenance cycle is one week, with each operation and maintenance period lasting two hours. This period includes travel time, operation and maintenance time, information registration time, and rest time.
- (1)
fc(
X) Indicates the economic objective function, including the cost of resources consumed during operation and maintenance, as follows:
where
Ts is the total number of time periods of the operation and maintenance cycle,
M is the total number of charging stations, and
cm,t is the operation and maintenance cost of the
m-th charging station in the
t-th period.
- (2)
fr(
X) Represents the expected cost of system risk. Since the purpose of operation and maintenance is to reduce the current failure rate of the equipment to improve system reliability, the system risk is calculated according to Equation (5) after each period of operation and maintenance. The time loss is then converted into economic loss.
where
N is the number of scenes,
LOTt (
n) is the user’s loss time in the
n-th scenario after the operation and maintenance t period, and g is the conversion coefficient of user loss time cost per unit time [
22].
According to the characteristics of the operation and maintenance work for the electric vehicle charging station, the following relevant constraints are set:
- (1)
Each station operates and maintains for at least one period of time, considering the operation and maintenance time constraints of a single charging station.
- (2)
The operation and maintenance timing constraints are as follows:
- (3)
All charging stations in the system are non-simultaneous in their operation and maintenance, considering the total time constraint of the operation and maintenance.
- (4)
The operation and maintenance resource constraints are as follows:
where
ym denotes the start time of the operation and maintenance for the
m-th charging station,
rm,x is the operation and maintenance resources required by the
m-th charging station in the x time period, and
Ym,max is the maximum amount of operation and maintenance resources that the
m-th charging station can invest.
5.2. Optimistic Algorithm
The operation and maintenance strategy optimization studied in this paper is a nonlinear integer programming problem, which makes it difficult to obtain results using analytical methods. Therefore, the immune clonal selection algorithm (ICSA) is used to solve the problem [
23]. Compared to the traditional immune algorithm, ICSA introduces the clonal expansion operator and the clonal mutation operator, which help expand the high-quality population and eliminate the inferior population during the iterative process. This effectively improves the convergence speed of the algorithm. In ICSA, the antibody, antigen, and affinity represent the solution set, the fitness of the objective function, and the matching degree between the solution set and the objective function in the optimization problem, respectively.
The operation and maintenance strategy for charging stations proposed in this paper is mainly divided into the following three parts: risk assessment, risk tracking, and optimization of operation and maintenance. Firstly, the system risk value is calculated based on the charging piles and the road network. Secondly, risk tracking is used to determine the operation and maintenance priority of each station. Finally, the ICSA algorithm is employed to determine the number of operation and maintenance periods for each station, aiming to minimize the economic cost and risk expectation cost. The optimization process for the operation and maintenance strategy is illustrated in
Figure 5.
6. Example Analysis
6.1. Traffic Network and Parameter Setting
The traffic network in a specific area is analyzed as an example to illustrate the research content. The distribution of the road network and charging station sites is shown in
Figure 6. Currently, some of the 10 important traffic nodes marked in the figure have been put into operation. For this study, all nodes were set as the same type of DC charging stations, each equipped with 10 charging piles, with a charging power of 30 kW. The stations are numbered according to their distance from farthest to nearest. Using the failure rate, repair rate statistics, operating years, and equipment data from charging piles recently put into use, combined with a simulation model, the failure rate parameters of each charging pile are obtained. Additionally, traffic parameter attributes in the road network are valued based on the road grade.
Electric vehicles are mainly small vehicles that use DC fast charging. While private cars are numerous and primarily use fixed-site AC charging, official cars, taxis, and the currently popular personal operating vehicles primarily rely on DC charging due to their work requirements.
By considering the issue of grid scheduling appropriately and analyzing the impacts of different types of electric vehicles’ charging time characteristics, risk calculations and the optimization of maintenance strategies can be achieved.
Therefore, the ratio of private cars to urban commuter cars was set to 1:5. To meet the dynamic and random nature of the charging load distribution, this study considered 120 vehicles with charging demands driving along the road network during the peak charging period from 12:00 to 14:00 [
24]. During this period, 60 vehicles were either in a waiting state or charging state at the stations, and the system reliability was evaluated. The distribution of vehicle starting positions, demand generation times, and initial SOC were referenced [
25] from prior studies. The battery capacity of each vehicle was set to 25 kWh. During the simulation period, the simulation step size was set to 0.5 min, with the simulation time spanning from the moment the first vehicle generated a charging demand to the time the last vehicle completed charging.
6.2. Risk Calculation and Operation and Maintenance Strategy
Based on the analysis of several basic operational status types of charging stations, XGBoost uses tree models as the base model to visualize the model evaluation. This clearly displays the evaluation process for a charging station’s operational status. By continuously assessing through the tree model, the type with the highest probability is determined to be the closest to the actual state of the charging station. XGBoost achieves more accurate status assessments of charging stations, allowing for corresponding operational maintenance tasks to be more targeted.
Combining the failure probability of each charging pile in the system, stratified sampling is performed 3000 times to obtain the corresponding scenarios. The initial vehicle information is the same for all scenarios. For each scenario, road traffic simulations of the Q* state and the current sampling state are conducted to determine the time that each electric vehicle takes to complete charging and the power provided by each station. The system risk value and the ENC (expected number of customers) for each station are then calculated. Using Equation (8), the risk is allocated to each charging station, and the operation and maintenance order is sorted according to the risk level of each station, as shown in
Table 2.
Firstly, based on current actual operation and maintenance work, this paper optimizes the operation and maintenance periods. Secondly, the operation and maintenance methods are calculated and analyzed according to the risk order using both equal time periods and optimized time periods. The operation and maintenance information for equal time periods and optimized time periods of the conventional sequential operation and maintenance is shown in
Figure 7.
It can be seen from
Figure 7 that after optimizing the operation and maintenance time, Station 3, with the highest risk level, increases the operation and maintenance time, while Station 2 and Station 8, with lower risk levels, reduce the operation and maintenance time. Additionally, to optimize the operation and maintenance costs, the operation and maintenance time for the remaining stations has been adjusted appropriately. However, because of limited resources and time, the operation and maintenance time is only adjusted for one period. The total costs of the operation and maintenance for equal time periods and optimized time periods of conventional sequential operation and maintenance is shown in
Table 3.
Compared with the equal periods, the operation and maintenance cost and system expected risk of the optimized period decreased by 6.63% and 18.56%, respectively, achieving better operation and maintenance benefits. The operation and maintenance information for the equal time periods and the optimized time periods, according to the risk order, is shown in
Figure 8.
As shown in
Figure 8, the operation and maintenance plan based on risk order adjusts the operation and maintenance times of certain charging stations during optimized periods to reduce the total cost compared to during equal time periods. The total costs for the equal-period and optimized-period operation and maintenance, according to the risk order, is shown in
Table 4. Compared to the two operation and maintenance orders, the expected costs of the system risk are reduced by 31.23% and 32.48%, respectively, during equal-period and optimized-period operation and maintenance, according to the risk order. It can be inferred that ordering the operation and maintenance by risk level can significantly improve the overall reliability of the system and reduce user losses. Compared with the current conventional sequential equal-period operation and maintenance strategy, risk-based optimization of time-period operation and maintenance reduces the total cost by 24.11% while maintaining the operation and maintenance cost, which effectively improves the overall operation and maintenance efficiency.
This paper employed several methods to mitigate the limitations of XGBoost. Historical fault data were preprocessed, and before each maintenance operation, training was conducted using maintenance data, monitoring data, and external environmental data to continuously update the parameters in the model. The impact of user and environmental randomness on the parameters is taken into account, and during each training session, the average classification error rate under multiple parameters was used as a performance metric to evaluate the classification effectiveness of the model.
7. Conclusions
To address the shortcomings in the current operation and maintenance work of electric vehicle charging stations, this study proposed an operation and maintenance system strategy for electric vehicle charging stations using the XGBoost integrated algorithm to evaluate the operational status of charging stations.
- (1)
The state evaluation model of charging stations was established using XGBoost. Considering factors such as driving and charging habits, road traffic, and charging station equipment, the training sample data were constructed using historical data, online monitoring data, and external environment data. The state evaluation model for the charging stations was then trained based on the XGBoost algorithm.
- (2)
Considering the operation and maintenance cost and reliability gain, an operation and maintenance strategy optimization model for electric vehicle DC charging stations was established based on XGBoost’s state evaluation. According to the risk level, the operation and maintenance sequence for all charging stations was determined, and the operation and maintenance time for each station within the maintenance cycle was calculated.
The operation and maintenance strategy formulated by the state evaluation and optimization model of the charging station, based on the XGBoost algorithm, overcomes the blindness and inefficiency of existing operation and maintenance methods. It significantly improves the overall efficiency of a system’s operation and maintenance and ensures the operational reliability of the charging facilities.