With the rapid adoption of electric vehicle cars worldwide, the reliability of charging infrastructure, particularly electric vehicle car charging piles, has become a critical concern. These charging piles are often exposed to harsh environmental conditions, and typhoons pose a significant threat due to high winds, heavy rainfall, and flooding. Such extreme weather can lead to physical damage, electrical shorts, and corrosion, compromising the safety and functionality of electric vehicle car charging systems. Traditional fault prediction methods, which rely on manual inspection or statistical models, struggle to handle the complex, multi-factor interactions involved in charging pile failures, especially under typhoon conditions. This paper addresses this gap by proposing a data-driven fault prediction framework that integrates typhoon influence factors into an improved decision tree algorithm. Our goal is to enhance the operational resilience of electric vehicle car charging piles, ensuring uninterrupted service for electric vehicle car users during severe weather events.

The increasing prevalence of electric vehicle cars necessitates robust charging infrastructure, but predicting failures in electric vehicle car charging piles is challenging due to the interplay of environmental, operational, and device-specific factors. Typhoons exacerbate these challenges by introducing variables like wind speed and rainfall, which are not typically considered in conventional models. Early approaches depended on expert knowledge or Weibull distribution models, but these often fail to capture the nonlinear dynamics of charging pile subsystems, such as power conversion and thermal management. More recent data-driven techniques, including Kalman filters and time-series analysis, show promise but may lack generalizability for long-term failures induced by seasonal loads or extreme weather. Therefore, we develop a machine learning-based method that leverages historical sensor data, fault logs, and meteorological parameters to forecast faults in electric vehicle car charging piles with high accuracy. By incorporating typhoon-specific attributes and optimizing feature selection to reduce redundancy, our approach aims to provide a reliable tool for proactive maintenance, ultimately supporting the sustainable growth of electric vehicle car adoption.
In this work, we focus on preprocessing charging pile data to handle missing values, outliers, and normalization, ensuring the quality of input features for modeling. We then enhance the classic C4.5 decision tree algorithm by introducing a typhoon impact coefficient and a feature decoupling mechanism to mitigate the effects of attribute correlation. This improvement allows the model to better distinguish between normal and faulty states in electric vehicle car charging piles under typhoon stress. Through simulation experiments, we demonstrate that our method significantly outperforms traditional algorithms in terms of accuracy, recall, and other metrics, validating its practical utility for electric vehicle car charging infrastructure management. The subsequent sections detail the data preprocessing steps, the algorithmic enhancements, and the experimental results, with extensive use of formulas and tables to summarize key concepts and findings.
Data Preprocessing for Electric Vehicle Car Charging Pile Monitoring
Data quality is paramount for effective fault prediction in electric vehicle car charging piles. Raw data collected from sensors and logs often contain inconsistencies that can skew model performance. We employ a three-step preprocessing pipeline: missing value imputation, outlier handling, and standardization. First, for missing values, we use a dynamic interpolation strategy based on neighboring observations. Given a dataset with nonlinear characteristics, we compute the sliding window mean around missing points to fill gaps. For a missing value at position \( t \), with a window size \( w \), the imputed value \( x_t \) is calculated as:
$$ x_t = \frac{1}{w} \sum_{i=t-w}^{t-1} x_i + \frac{1}{w} \sum_{i=t+1}^{t+w} x_i $$
This approach preserves local trends without assuming global patterns, which is crucial for time-series data from electric vehicle car charging piles. Second, outliers are identified and removed if they constitute less than 1% of the dataset and are physically implausible—for instance, sensor readings that exceed operational limits. In our analysis of electric vehicle car charging pile data, we found only two such anomalies, which were discarded to prevent distortion. Third, standardization is applied to normalize features, ensuring that variables with different scales contribute equally to the model. We use Z-score normalization, which transforms each feature to have zero mean and unit variance. For a feature vector \( \mathbf{x} \) with mean \( \mu \) and standard deviation \( \sigma \), the standardized value \( x’ \) is:
$$ x’ = \frac{x – \mu}{\sigma} $$
This step is essential for algorithms like decision trees that may be sensitive to feature magnitudes, particularly when integrating diverse data sources such as typhoon parameters for electric vehicle car charging pile fault prediction.
Enhanced Decision Tree Algorithm with Typhoon Influence and Feature Decoupling
The core of our fault prediction method is an improved C4.5 decision tree algorithm that incorporates typhoon impact factors and addresses feature coupling. Decision trees are widely used for classification tasks due to their interpretability, but the standard C4.5 algorithm can suffer from reduced accuracy when attributes are correlated, as is common in electric vehicle car charging pile data where environmental and operational features interact. We first review the basics of C4.5, then introduce our modifications.
The C4.5 algorithm builds a tree by selecting attributes that maximize information gain ratio, which balances information gain and intrinsic entropy. Let \( D \) be a dataset with \( |D| \) samples and a class variable \( C \) with \( m \) discrete values \( \{C_1, C_2, \dots, C_m\} \). The entropy of \( C \) in \( D \) is:
$$ I(C, D) = -\sum_{i=1}^{m} \frac{|C_i|}{|D|} \log_2 \frac{|C_i|}{|D|} $$
where \( |C_i| \) is the number of samples in class \( C_i \). For an attribute \( A_j \) with \( t \) possible values \( \{a_{j1}, a_{j2}, \dots, a_{jt}\} \), the conditional entropy of \( C \) given \( A_j \) is:
$$ I(C, D|A_j) = \sum_{k=1}^{t} \frac{|D_{jk}|}{|D|} I(C, D_{jk}) $$
Here, \( D_{jk} \) is the subset of \( D \) where \( A_j = a_{jk} \). The information gain \( G(C, D|A_j) \) is:
$$ G(C, D|A_j) = I(C, D) – I(C, D|A_j) $$
To avoid bias towards attributes with many values, C4.5 uses the information gain ratio \( GR(C, D|A_j) \), defined as:
$$ GR(C, D|A_j) = \frac{G(C, D|A_j)}{I(A_j, D)} $$
where \( I(A_j, D) \) is the entropy of attribute \( A_j \):
$$ I(A_j, D) = -\sum_{k=1}^{t} \frac{|D_{jk}|}{|D|} \log_2 \frac{|D_{jk}|}{|D|} $$
The attribute with the maximum gain ratio is chosen for splitting. However, in the context of electric vehicle car charging pile fault prediction, attributes such as temperature, humidity, and typhoon-related metrics may be correlated, leading to suboptimal splits. To mitigate this, we propose a feature decoupling approach that considers the coupling degree between attributes. The coupling degree of attribute \( A_j \) given another attribute \( A_x \) is measured by the conditional information gain ratio:
$$ GR(A_j, D|A_x) = \frac{G(A_j, D|A_x)}{I(A_x, D)} $$
where \( G(A_j, D|A_x) \) is the information gain of \( A_j \) conditioned on \( A_x \). The average coupling degree of \( A_j \) with respect to a feature set \( E \) (excluding \( A_j \)) is:
$$ GavgR(A_j, E) = \frac{\sum_{A_x \in E} GR(A_j, D|A_x)}{|E|} $$
This metric quantifies how much \( A_j \) is influenced by other features, which can dilute its discriminative power for fault classification in electric vehicle car charging piles.
To incorporate typhoon impact, we define a typhoon influence coefficient \( \alpha_{ty} \) that modifies the gain ratio calculations. This coefficient accounts for wind speed and rainfall, which are critical for electric vehicle car charging pile failures during typhoons. Let \( V_{\text{max}} \) be the maximum typhoon wind speed affecting the charging pile, \( V_{\text{crit}} \) be the wind resistance threshold of the pile, and \( R_{\text{total}} \) be the cumulative rainfall (normalized to [0,1]). Then,
$$ \alpha_{ty} = \omega_1 \cdot \frac{V_{\text{max}}}{V_{\text{crit}}} + \omega_2 \cdot R_{\text{total}} $$
where \( \omega_1 \) and \( \omega_2 \) are weight coefficients set to 0.7 and 0.3, respectively, emphasizing wind speed as a primary factor for electric vehicle car charging pile damage. We then adjust the gain ratio for attribute \( A_j \) given \( A_x \) by incorporating \( \alpha_{ty} \) and an indicator function \( \delta(A_j) \) that equals 1 if \( A_j \) is related to typhoon-induced failures in electric vehicle car charging piles, and 0 otherwise:
$$ GR_{ty}(A_j, D|A_x) = GR(A_j, D|A_x) \cdot [1 + \alpha_{ty} \delta(A_j)] $$
The average coupling degree becomes:
$$ GavgR_{ty}(A_j, E) = \frac{\sum_{A_x \in E} GR_{ty}(A_j, D|A_x)}{|E|} $$
Finally, we define a new normalized gain ratio for selecting split attributes that maximizes class discrimination while minimizing feature redundancy:
$$ GNR_{ty}(C, D|A_j) = \frac{GR_{ty}(C, D|A_j)}{GavgR_{ty}(A_j, E)} $$
The attribute with the maximum \( GNR_{ty}(C, D|A_j) \) is chosen for splitting. This enhanced algorithm better handles the complexities of electric vehicle car charging pile data under typhoon conditions, as it prioritizes attributes that are both informative and minimally correlated with others, while amplifying the influence of typhoon-related features.
Simulation Experiments and Result Analysis
To evaluate our improved decision tree method, we conducted simulation experiments using datasets from electric vehicle car charging pile operations. The platform comprised an Intel Core i5-8300H CPU with 2.3GHz, Windows 10, Python 3.12.0, and scikit-learn. We utilized two datasets: a conventional dataset with only charging pile本体 data, and a typhoon故障 dataset that combines本体 data with typhoon environmental data from meteorological stations. The data includes 85,500 training samples and 36,644 test samples, with a class imbalance where normal operation samples (positive class) outnumber fault samples (negative class) by a ratio of 99:1—a common scenario in electric vehicle car charging pile monitoring that challenges prediction accuracy.
For preprocessing, we applied the steps outlined earlier: dynamic interpolation for missing values, deletion of outliers (two instances), and Z-score standardization. We then trained and tested three algorithms: the standard C4.5 decision tree, a version with only feature decoupling (without typhoon factors), and our proposed method with both typhoon influence and feature decoupling. Hyperparameters were tuned using grid search with 5-fold cross-validation to ensure fair comparison.
The performance metrics included accuracy (E), recall (R), precision (P), F1-score (F1), macro-averaged F1 (M_F1), and AUC (area under the ROC curve). Recall and AUC are particularly important for fault prediction in electric vehicle car charging piles, as they measure the model’s ability to detect rare failure events. Table 1 summarizes the results on the conventional dataset, while Table 2 presents results on the typhoon故障 dataset.
| Parameter | C4.5 Decision Tree | Feature-Decoupled C4.5 | Our Proposed Algorithm |
|---|---|---|---|
| Accuracy (E) | 0.9868 | 0.9813 | 0.9836 |
| Recall (R) | 1.0000 | 0.0275 | 0.9968 |
| Precision (P) | 0.9868 | 1.0000 | 0.9868 |
| F1-Score (F1) | 0.9934 | 0.0559 | 0.9917 |
| Macro F1 (M_F1) | 0.4967 | 0.5232 | 0.4983 |
| AUC | 0.4797 | 0.5144 | 0.5976 |
On the conventional dataset, all algorithms show high accuracy, but recall and AUC are near random for the fault class, indicating poor detection of electric vehicle car charging pile failures. The feature-decoupled version has extremely low recall (0.0275), meaning it misses most faults, while our method maintains high recall (0.9968) and improves AUC to 0.5976, though still limited due to the lack of typhoon features. This highlights the bias issue in imbalanced data for electric vehicle car charging pile prediction.
| Parameter | C4.5 Decision Tree | Feature-Decoupled C4.5 | Our Proposed Algorithm |
|---|---|---|---|
| Accuracy (E) | 0.6977 | 0.8620 | 0.9077 |
| Recall (R) | 0.6926 | 0.8717 | 0.9948 |
| Precision (P) | 0.5973 | 0.9906 | 0.9280 |
| F1-Score (F1) | 0.5105 | 0.9236 | 0.9327 |
| Macro F1 (M_F1) | 0.6357 | 0.6363 | 0.9221 |
| AUC | 0.7947 | 0.6080 | 0.9977 |
With the typhoon故障 dataset, our proposed algorithm achieves an accuracy of 0.9077, which is a 21-percentage-point increase (relative improvement of 30.1%) over the standard C4.5’s 0.6977. More importantly, recall rises to 0.9948, and AUC reaches 0.9977, demonstrating excellent fault detection capability for electric vehicle car charging piles under typhoon conditions. The feature-decoupled C4.5 also improves but lags in AUC (0.6080), underscoring the value of adding typhoon factors. These results validate that integrating typhoon influence coefficients and feature decoupling enhances model sensitivity to rare failure events in electric vehicle car charging infrastructure.
To further analyze the impact of typhoon parameters, we can express the typhoon influence coefficient \( \alpha_{ty} \) in terms of its components. For instance, if a typhoon has \( V_{\text{max}} = 30 \, \text{m/s} \) and \( V_{\text{crit}} = 20 \, \text{m/s} \), with normalized rainfall \( R_{\text{total}} = 0.8 \), then:
$$ \alpha_{ty} = 0.7 \cdot \frac{30}{20} + 0.3 \cdot 0.8 = 1.05 + 0.24 = 1.29 $$
This coefficient amplifies the gain ratio for typhoon-related attributes, making the model more attuned to environmental risks for electric vehicle car charging piles. Additionally, we computed the average coupling degrees for key features, as shown in Table 3, which illustrates how feature decoupling reduces redundancy.
| Feature | Average Coupling Degree (Without Decoupling) | Average Coupling Degree (With Decoupling) |
|---|---|---|
| Wind Speed | 0.85 | 0.42 |
| Rainfall | 0.78 | 0.38 |
| Temperature | 0.65 | 0.35 |
| Humidity | 0.72 | 0.40 |
| Charging Current | 0.60 | 0.30 |
The reduction in coupling degrees after applying our method indicates less interference between attributes, leading to clearer decision boundaries for classifying electric vehicle car charging pile faults. This is crucial for maintaining high performance in real-world scenarios where multiple factors interact.
Conclusion and Future Work
In this paper, we presented an improved decision tree prediction method for electric vehicle car charging pile failures that considers typhoon impact. By preprocessing data to handle missing values and outliers, and by standardizing features, we ensured robust input for modeling. We then enhanced the C4.5 algorithm with a typhoon influence coefficient and a feature decoupling mechanism, which together address attribute correlation and amplify the role of environmental factors in fault prediction. Simulation results on electric vehicle car charging pile datasets show that our approach significantly boosts accuracy, recall, and AUC compared to traditional methods, particularly under typhoon conditions. This advancement supports the reliability of charging infrastructure for electric vehicle cars, contributing to safer and more resilient transportation systems.
Future work could explore extending this framework to other extreme weather events, such as floods or heatwaves, which also threaten electric vehicle car charging piles. Additionally, integrating deep learning techniques or ensemble methods may further improve prediction granularity. As the adoption of electric vehicle cars accelerates, continuous refinement of fault prediction models will be essential for sustainable urban mobility. Our method provides a scalable foundation that can be adapted to various geographic regions and charging technologies, ultimately enhancing the user experience for electric vehicle car owners and operators alike.
