## 4 Methodology
### Generative Adversarial Network (GAN) Module  
To address the issue of insufficient fault samples and severe class imbalance, this study introduces a Generative Adversarial Network (GAN) to perform data augmentation for the minority class. A GAN consists of a generator and a discriminator, which are optimized through adversarial training to produce synthetic samples that approximate the distribution of real data. The overall architecture is illustrated in Figure 6.  
Figure 5: Architecture of the proposed hybrid model. The generator takes a random noise vector as input and outputs synthetic fault samples that match the shape of real charging time-series data. The discriminator receives both real and generated samples and aims to distinguish whether the input comes from the true data distribution. To ensure consistency in data structure, the generator's output is designed to match the original sample with shape (256, 8). Specifically, the generator is composed of the following five modules:  
* Expand module: Expands the input noise vector into a pseudo time series with shape (256, latent_dim) to simulate the multivariate temporal structure. * Conv1D module: Applies one-dimensional convolution to extract spatial features from local time windows, enhancing the model's ability to capture short-term dynamics such as sudden voltage or current fluctuations. * BN + ReLU module: Uses Batch Normalization to stabilize training and ReLU activation to introduce non-linearity. * LSTM module: Models long-term temporal dependencies and captures trends, lags, and cross-time behaviors throughout the charging process. * FC + Tanh module: Maps the encoded features to the target output dimension using a fully connected layer, followed by a Tanh activation function to constrain the output within [\(-\)1, 1], ensuring consistency with the real sample range. This generator design effectively captures both local and global features in time-series data, improving the realism of the generated samples. The specific network layer details and parameter settings for each layer of module are shown in Table 1.  
The discriminator shares a similar architecture to the generator and is designed to distinguish whether an input sequence is real or generated. Its network includes the following components:  
* Conv1D module: Extracts key features from short time-series segments. * BN + ReLU module: Regularizes convolution outputs and introduces non-linear representational capacity. * Dropout module: Randomly disables a portion of neurons during training to mitigate the risk of overfitting. * LSTM module: Further models long-range dependencies in the input sequences. * FC + Sigmoid module: Compresses the encoded sequence into a single probability value representing the confidence that the input is real. Figure 6: Architecture of the GAN model. This design enhances the discriminator's ability to capture temporal structures and feature distributions, making it more effective in differentiating real from synthetic data. The specific discriminator's network layer details and parameter settings for each layer of module are shown in Table 2.  
To generate high-quality synthetic samples, this study employs a standard adversarial training mechanism, where the generator and discriminator are optimized in an alternating fashion. During training, the parameters of both networks are updated independently via backpropagation. In each iteration, the discriminator is first trained using real fault samples to enhance its discrimination ability, encouraging it to assign high confidence scores to real data. Then, with the discriminator's parameters fixed, the generator receives random noise vectors and produces synthetic samples in an attempt to \"fool\" the discriminator, i.e., to make it mistakenly classify the fake samples as real. Throughout this adversarial game, the generator continuously adjusts its parameters to improve the realism of its outputs, while the discriminator is iteratively optimized to strengthen its ability to distinguish between real and fake data.