With the rapid growth of the electric vehicle market, the number of low-voltage EV charging stations has increased significantly. These stations are critical infrastructure for charging electric vehicles, and their operation has become a vital component of the power market. However, the emergence of new electricity-consuming devices brings a series of management risks. For instance, household low-voltage EV charging stations are often billed under residential shared meter tariffs, leading some users to illegally connect charging station lines for household or production use. This not only impacts the economic benefits of power companies but also poses serious safety hazards to the social electricity environment. Therefore, effectively identifying abnormal or non-compliant electricity consumption behaviors in EV charging stations is essential to improve the efficiency and accuracy of electricity management.

In this paper, we analyze the electricity consumption behavior characteristics of low-voltage EV charging stations to distinguish between normal and abnormal states based on load characteristic curves. We employ a cluster analysis algorithm to extract load curve features from operational EV charging stations and compare them with standard load curves to detect abnormal electricity consumption. Additionally, to address potential misjudgments caused by the “fast charging” and “slow charging” phases during the charging process, we introduce the concept of “sliding difference linear fitting.” This involves calculating the slope between each pair of 96-point load data and using the number of slope changes to assist in the judgment of cluster analysis results. Through this method, we successfully identify users with abnormal electricity consumption behaviors, providing technical support for the management of EV charging stations.
Introduction
The proliferation of electric vehicles has led to a surge in the deployment of EV charging stations, making their efficient management a priority for power utilities. Abnormal electricity consumption, such as unauthorized connections of other loads to EV charging stations, can lead to significant revenue losses and safety issues. Traditional methods for detecting electricity theft often focus on general user behavior, but specialized approaches for EV charging stations are limited. Existing research has explored clustering algorithms for identifying tariff execution anomalies or typical electricity consumption patterns, but these methods may suffer from inaccuracies due to the “mean” concept in clustering or require long-term data. Our work addresses these gaps by combining cluster analysis with sliding difference linear fitting to enhance the detection of abnormal behaviors in EV charging stations.
In this study, we first examine the load characteristics of EV charging stations under normal and abnormal conditions. Normal charging typically follows a constant-current-constant-voltage pattern, resulting in a load curve that resembles a standard square wave with multiple peaks. In contrast, abnormal consumption introduces random fluctuations due to the connection of other loads, causing distortions in the load curve. Based on these differences, we develop a model that uses cluster analysis to group load data and sliding linear fitting to analyze slope changes, enabling accurate identification of anomalies. We validate our approach through simulations and real-world case studies, demonstrating high accuracy in detecting non-compliant EV charging stations.
Load Characteristics of EV Charging Stations
Understanding the load characteristics of EV charging stations is fundamental to distinguishing normal from abnormal electricity consumption. Low-voltage EV charging stations convert AC power to DC power to charge electric vehicle batteries. The charging process typically employs a constant-current-constant-voltage mode. In the constant-current phase, the battery voltage has not reached its maximum, and the charging power remains at the rated level for fast charging. When the battery voltage reaches the preset termination voltage, the station switches to constant-voltage mode, gradually reducing the charging power to prevent overcharging and battery damage.
This process is reflected in the load characteristic curve (active power or active current) of the EV charging station, which appears as an approximate standard square wave shape. Due to the transition between constant-current and constant-voltage modes, the square wave may exhibit multiple peaks. The load curve for normal charging can be represented as a function of time, showing periods of high and low power consumption. For example, the active power $P(t)$ during normal charging might be modeled as:
$$P(t) = \begin{cases}
P_{\text{rated}} & \text{for } t \in [t_{\text{start}}, t_{\text{transition}}] \\
P_{\text{rated}} \cdot e^{-\alpha (t – t_{\text{transition}})} & \text{for } t > t_{\text{transition}}
\end{cases}$$
where $P_{\text{rated}}$ is the rated power, $t_{\text{start}}$ is the start time, $t_{\text{transition}}$ is the transition time to constant-voltage mode, and $\alpha$ is a decay constant. This results in a curve with distinct plateaus and drops.
In abnormal scenarios, where other loads like lighting or water heaters are connected to the EV charging station meter, the load curve becomes distorted. The randomness of these additional loads causes irregular fluctuations, deviating from the standard square wave pattern. The load curve $P_{\text{abnormal}}(t)$ may include random components, such as:
$$P_{\text{abnormal}}(t) = P(t) + \sum_{i} A_i \cdot \sin(\omega_i t + \phi_i)$$
where $A_i$, $\omega_i$, and $\phi_i$ represent the amplitude, frequency, and phase of random load variations, respectively. This leads to a curve with multiple peaks and valleys, making it distinguishable from normal charging behavior.
To quantify these characteristics, we can analyze key parameters from the load data, such as the number of clusters in the load curve and the frequency of slope changes. Under normal conditions, the load data should cluster into 2-3 groups (e.g., near zero and near rated current), and the slope changes should be limited (e.g.,不超过 6 times per day). In abnormal cases, clustering may yield more groups, and slope changes become frequent and irregular.
Model for Identifying Abnormal Electricity Consumption
Our model for identifying abnormal electricity consumption in EV charging stations combines cluster analysis and sliding difference linear fitting. This integrated approach allows us to capture both the grouping characteristics of load data and the dynamics of load changes over time.
Cluster Analysis
Cluster analysis is an unsupervised machine learning method widely used in various fields, including power systems for tasks like fault detection and load forecasting. It groups data points based on similarity without prior labeling. For EV charging stations, we use cluster analysis to categorize load data points into clusters that represent different consumption states.
The algorithm is based on minimizing the cost function, which measures the total distance between data points and their cluster centers. For a set of $N$ data points $\mathbf{x}_i$ (e.g., load values at different times) and $M$ cluster centers $\boldsymbol{\mu}_k$, the cost function $J$ is defined as:
$$J = \sum_{i=1}^{N} \sum_{k=1}^{M} r_{i,k} \| \mathbf{x}_i – \boldsymbol{\mu}_k \|^2$$
where $r_{i,k}$ is an indicator variable that is 1 if data point $\mathbf{x}_i$ belongs to cluster $k$, and 0 otherwise. The goal is to find cluster centers that minimize $J$.
The steps of the cluster analysis algorithm are as follows:
- Initialization: Randomly initialize $k$ cluster centers $\boldsymbol{\mu}_1, \boldsymbol{\mu}_2, \dots, \boldsymbol{\mu}_k$. The value of $k$ can be specified based on the expected number of groups (e.g., from 1 to 10 for EV charging stations).
- Cluster Assignment: For each data point $\mathbf{x}_i$, compute the distance to all cluster centers and assign it to the closest cluster. The indicator $r_{i,k}$ is updated as:
$$r_{i,k} = \begin{cases}
1 & \text{if } k = \arg\min_j \| \mathbf{x}_i – \boldsymbol{\mu}_j \|^2 \\
0 & \text{otherwise}
\end{cases}$$ - Cluster Center Update: Recompute each cluster center as the mean of all data points assigned to that cluster:
$$\boldsymbol{\mu}_k = \frac{\sum_{i=1}^{N} r_{i,k} \mathbf{x}_i}{\sum_{i=1}^{N} r_{i,k}}$$ - Iteration: Repeat steps 2 and 3 until the cluster centers converge (i.e., changes are below a threshold).
For EV charging stations, normal load data should converge to 2-3 clusters, while abnormal data may require more clusters to achieve low distance sums. We define a threshold $L$ (e.g., $L=1$) for the sum of distances to determine the optimal number of clusters. If the sum falls below $L$ for a small $k$, it indicates normal behavior; otherwise, further analysis is needed.
Sliding Difference Linear Fitting
To complement cluster analysis, we use sliding difference linear fitting to analyze the smoothness of the load curve. This method calculates the slope between consecutive data points in a sliding window, helping to identify abrupt changes that may indicate abnormal consumption.
Given a load curve with 96 data points (e.g., from 15-minute intervals over 24 hours), we apply a sliding window of length 3 to compute the slope between each pair of points. For a window covering points $x_t, x_{t+1}, x_{t+2}$, we fit a linear model using least squares. The slope $m$ for a window can be found by solving:
$$\min_{m,b} \sum_{j=t}^{t+2} (x_j – (m \cdot j + b))^2$$
Using matrix notation, for a window with time indices $t, t+1, t+2$ and load values $\mathbf{y} = [x_t, x_{t+1}, x_{t+2}]^T$, the design matrix $\mathbf{X}$ is:
$$\mathbf{X} = \begin{bmatrix} t & 1 \\ t+1 & 1 \\ t+2 & 1 \end{bmatrix}$$
The parameters $\mathbf{p} = [m, b]^T$ are estimated as:
$$\mathbf{p} = (\mathbf{X}^T \mathbf{X})^{-1} \mathbf{X}^T \mathbf{y}$$
In practice, we use the MATLAB function polyfit for efficiency, with the command p = polyfit(t, y, 1), where t is the time vector, y is the load vector, and 1 denotes a first-degree polynomial (linear fit). The slope $m$ is the first element of p.
By sliding the window across all data points, we obtain a sequence of slopes. For normal EV charging stations, the number of sign changes in the slope (from positive to negative or vice versa) is limited, typically not exceeding 6 times per day, corresponding to the number of charging events. In abnormal cases, the slope changes frequently due to random load fluctuations.
Integrated Identification Model
The overall process for identifying abnormal electricity consumption in EV charging stations is as follows:
- Data Collection: Collect daily load data (e.g., active current or power) from all low-voltage EV charging stations in a region. The data typically consist of 96 points per day.
- Data Preprocessing: Clean the data by:
- Removing users with more than 30% missing data points.
- For users with up to 30% missing data, use cubic spline interpolation to fill gaps. The interpolation for a missing point at time $t$ can be expressed as:
$$x(t) = a_i + b_i (t – t_i) + c_i (t – t_i)^2 + d_i (t – t_i)^3$$
where $a_i, b_i, c_i, d_i$ are coefficients determined from neighboring points. - Exclude users with load curves consistently near zero, as they may not represent active charging.
- Cluster Analysis: For each user, perform cluster analysis for $k$ from 1 to 10 (or a suitable range). Compute the sum of distances $D_k$ between data points and their cluster centers for each $k$:
$$D_k = \sum_{i=1}^{N} \min_k \| \mathbf{x}_i – \boldsymbol{\mu}_k \|^2$$
Determine the optimal number of clusters as the smallest $k$ where $D_k \leq L$ (e.g., $L=1$). - Sliding Linear Fitting: Apply sliding linear fitting with a window length of 3 to the load curve. Count the number of slope sign changes $C$. If $C > 6$, it suggests abnormal behavior.
- Decision Making: Flag a user as suspected of abnormal electricity consumption if:
- The optimal number of clusters from cluster analysis is greater than 3, and
- The number of slope changes $C$ exceeds 6.
- Output Results: Generate a list of suspected users for further investigation.
This model efficiently combines the strengths of cluster analysis in grouping data and sliding linear fitting in capturing temporal dynamics, making it robust for identifying anomalies in EV charging stations.
Experimental Results and Analysis
We implemented the proposed model using MATLAB and conducted experiments on both simulated and real-world data to validate its effectiveness. The experiments focused on distinguishing between normal and abnormal electricity consumption in EV charging stations.
Simulation Analysis
We first simulated normal and abnormal charging scenarios to analyze the load curves and model performance. For normal charging, we generated load data based on the constant-current-constant-voltage model, resulting in a square wave-like curve with 2-3 distinct levels. For abnormal charging, we added random noise and additional load components to simulate unauthorized connections.
For a normal EV charging station, the load curve showed clear plateaus corresponding to charging phases. Cluster analysis converged to 2 clusters with a small distance sum ($D_k < 1$ for $k=2$). The sliding linear fitting revealed few slope changes (e.g., 4 changes), consistent with limited charging events. The results are summarized in Table 1.
| Metric | Value |
|---|---|
| Optimal Number of Clusters | 2 |
| Sum of Distances ($D_k$) | 0.85 |
| Number of Slope Changes ($C$) | 4 |
| Classification | Normal |
For an abnormal EV charging station, the load curve exhibited irregular fluctuations. Cluster analysis required more clusters (e.g., $k=6$) to achieve a low distance sum ($D_k \approx 1$). The sliding linear fitting showed numerous slope changes (e.g., 15 changes), indicating random load variations. The results are shown in Table 2.
| Metric | Value |
|---|---|
| Optimal Number of Clusters | 6 |
| Sum of Distances ($D_k$) | 1.02 |
| Number of Slope Changes ($C$) | 15 |
| Classification | Abnormal |
The simulation demonstrated that the combined use of cluster analysis and sliding linear fitting effectively distinguishes normal and abnormal EV charging stations. The criteria of cluster number and slope changes provided a reliable basis for identification.
Engineering Case Study
We applied the model to a real-world dataset comprising 3,119 low-voltage EV charging station users. The load data included active current measurements over 96 points per day. After preprocessing, we analyzed each user using the proposed method.
The model identified 218 users as suspected of abnormal electricity consumption. Upon field verification, 213 users were confirmed to have non-compliant connections, yielding an accuracy of 97.71%. This high accuracy underscores the practicality of the model for large-scale monitoring of EV charging stations.
Table 3 presents a summary of the case study results.
| Total Users | Suspected Users | Confirmed Abnormal | Accuracy |
|---|---|---|---|
| 3,119 | 218 | 213 | 97.71% |
Examples of field verification included users illegally connecting household appliances or industrial equipment to the EV charging station meters. The model’s ability to detect these anomalies has been integrated into a provincial power utility’s online inspection system, enabling continuous monitoring and management of EV charging stations.
Conclusion
In this paper, we proposed a method for identifying abnormal electricity consumption in EV charging stations based on cluster analysis and sliding difference linear fitting. By analyzing load characteristics, we distinguished normal charging behavior, which follows a square wave pattern, from abnormal behavior, which exhibits random fluctuations due to unauthorized load connections. The cluster analysis algorithm grouped load data into clusters, with normal stations typically showing 2-3 clusters and abnormal stations requiring more. The sliding linear fitting quantified the smoothness of the load curve through slope changes, with normal stations having limited changes and abnormal stations showing frequent variations.
Our experiments, including simulations and a real-world case study, demonstrated the effectiveness of the model, achieving high accuracy in detecting non-compliant EV charging stations. The integration of this approach into utility systems facilitates efficient electricity management and reduces revenue losses. Future work could explore adaptive thresholds for cluster numbers and slope changes, as well as the incorporation of machine learning techniques for enhanced anomaly detection in evolving EV charging infrastructures.
