An electric vehicle direct current charging fault diagnosis model training method and diagnosis method
By introducing a controllable fault simulation device and signal acquisition into electric vehicle charging piles, combined with complex diagnostic algorithms and confidence assessment, the problems of insufficient samples and untested identification capabilities in charging pile fault diagnosis are solved, achieving efficient and reliable fault identification and testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MAANSHAN POWER SUPPLY COMPANY STATE GRID ANHUI ELECTRIC POWER
- Filing Date
- 2026-02-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing fault diagnosis algorithms for electric vehicle charging stations rely on naturally occurring fault data, resulting in insufficient samples, untested recognition and response capabilities, and a lack of efficient testing methods, posing safety risks.
The charging connection fault is actively reproduced by a controllable fault simulation device, DC charging power supply signals are collected, fault features are extracted using diagnostic algorithms, a fault diagnosis model is constructed, and fault classification is performed by combining support vector machine and four-dimensional confidence evaluation system.
It achieves efficient and reliable fault diagnosis, improves the identification capability and safety of charging piles, and provides an efficient and reliable testing method for model training.
Smart Images

Figure CN122153577A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electric vehicle charging facility testing and diagnosis technology, specifically to a method for training and diagnosing a DC charging fault diagnosis model for electric vehicles. Background Technology
[0002] With the increasing popularity of electric vehicles, the reliability and safety of DC fast charging stations are becoming increasingly important. Charging stations need precise fault detection capabilities to handle various anomalies that may occur during charging, such as communication interruptions, auxiliary power failures, and cable damage. Currently, fault diagnosis algorithms for charging stations mainly rely on system self-testing logic and fault data captured incidentally during actual operation.
[0003] However, this passive reliance on naturally occurring failures has significant drawbacks. First, the randomness and non-repeatability of failures make it difficult for developers to systematically obtain enough samples for algorithm training and validation. Second, some potentially dangerous failure modes rarely occur under natural conditions, resulting in the charging pile's ability to identify and respond to them not being fully tested, posing safety hazards. Furthermore, when charging pile products are upgraded or algorithms are optimized, there is a lack of efficient and reliable testing methods to evaluate the effectiveness of these improvements.
[0004] In view of the deficiencies in the existing technology, the purpose of this invention is to achieve the above objectives. The technical solution adopted by this invention is: to actively and accurately reproduce various charging connection faults through a carefully designed controllable fault simulation device, and to simultaneously collect advanced electrical signal characteristics of DC charging power supply during the process, and to extract fault-related "fingerprint" information from these signals using a complex diagnostic algorithm, thereby constructing a powerful fault diagnosis model. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides a training method and a diagnostic method for DC charging fault diagnosis models of electric vehicles, thus solving the technical problems mentioned in the background section.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides a method for training a DC charging fault diagnosis model for electric vehicles, comprising the following steps:
[0009] S1: Simulate the fault state of the DC charging gun for electric vehicles;
[0010] S2: While the electric vehicle is being charged through the DC charging gun, a test signal is injected into the DC charging circuit of the charging gun;
[0011] S3: Acquire raw signals under fault conditions, including DC voltage response. Current response ;
[0012] S4: Preprocess the original signal;
[0013] S5: Calculate the impedance amplitude spectrum;
[0014] For the voltage after preprocessing and current Perform FFT calculation:
[0015] ;
[0016] Then the impedance spectrum was calculated: ;
[0017] Extracting the impedance amplitude spectrum: ;
[0018] Three analysis signals were obtained: voltage signal Current signal Impedance amplitude spectrum ;
[0019] S6: Extract the wavelet energy entropy, wavelet singular spectrum entropy, approximate entropy, and power spectrum entropy of the three analysis signals respectively to obtain a 12-dimensional feature vector;
[0020] S7: Weight the 12-dimensional feature vectors to highlight features that contribute more to fault classification;
[0021] Repeat steps S1 to S7 to simulate and collect data under K different preset fault states, and finally obtain K sets of corresponding weighted feature vectors to form the training dataset of the model.
[0022] S8: Optimize model parameters using training data and establish the mapping relationship between the weighted features and fault types;
[0023] S81: Using the radial basis function (RBF) as the kernel function to solve nonlinear classification problems;
[0024] Calculate the RBF kernel function: ;
[0025] For the c-th SVM: , constraint is ;
[0026] Where the sample belongs to type c, ,otherwise ;
[0027] S82: Convert SVM decision values into probabilities: ;
[0028] in, It is the decision function of the c-th SVM, and the parameters A and B are obtained through maximum likelihood estimation;
[0029] S83: Convert the SVM decision values into probabilities using maximum likelihood estimation to obtain a 10-dimensional probability vector of the test sample belonging to each fault type. ;
[0030] Where pi is the probability that the sample belongs to the i-th type of fault, which provides the basis for subsequent confidence assessment;
[0031] S9: To improve the reliability of the model output, a four-dimensional confidence evaluation system is introduced to dynamically judge the credibility of the classification results and realize hierarchical decision-making based on the confidence threshold.
[0032] S91: Calculate the maximum probability confidence level: ;
[0033] S92: Calculate the probability distribution entropy and confidence level :
[0034] Calculate information entropy: ;
[0035] Calculate the maximum possible entropy: ;
[0036] Calculate the normalized entropy: ;
[0037] Calculate the entropy confidence score: ;
[0038] The confidence level of a probability distribution entropy reflects the concentration of the probability distribution. If the probability is concentrated in one category, it indicates that the probability distribution entropy is small. If the probability is uniformly distributed, it means that the entropy of the probability distribution is large. Small;
[0039] S93: Calculate the classification margin confidence score:
[0040] First, sort by probability: ;
[0041] Calculation interval: ;
[0042] Classification interval confidence: ;
[0043] Among these, the interval values are reasonably mapped to [0,1];
[0044] S94: Calculate the confidence level of the feature space distance.
[0045] Calculate the feature centers for each category: ;
[0046] The covariance matrices for each category are as follows: ;
[0047] Let the prediction category be: ;
[0048] Mahalanobis distance: ;
[0049] Distance confidence: ;
[0050] S95: Calculate the overall confidence level
[0051] ;
[0052] in, It is the empirical weight of the confidence dimension for this type of fault.
[0053] Preferably, the expression for the signal in S2 is: ;
[0054] in, The kth frequency component is uniformly distributed in the range of 1kHz-100kHz. For amplitude; It is a random phase.
[0055] Preferably, the sampling frequency of the raw signal acquired in the fault state in step S3 is... Collection time Number of collection points The storage format is a 32-bit floating-point array.
[0056] Preferably, the specific steps of S4 are as follows:
[0057] S41: Remove linear trend terms using detrending processing.
[0058] ;
[0059] in, Obtained by least squares fitting;
[0060] S42: Bandpass filtering is performed using a 5th-order elliptic filter, with a passband of... ;
[0061] ;
[0062] The filter design parameters are: passband ripple 0.1dB, stopband attenuation 60dB, filter band: 5000Hz-1kHz, 100kHz-150kHz;
[0063] S43: Normalize the signal:
[0064]
[0065] in, The mean of the signal. The standard deviation is denoted as .
[0066] Preferably, the specific steps of S6 are as follows:
[0067] S61: Calculate wavelet energy entropy:
[0068] Using Morlet wavelets: ;
[0069] frequency With scale The relationship is:
[0070] Among them, the wavelet center frequency Sampling interval ;
[0071] Calculate wavelet coefficients: ;
[0072] The discrete form of wavelet coefficients is: ;
[0073] Scale energy: ;
[0074] Energy frequency: ;
[0075] Wavelet energy entropy: ;
[0076] S62: Calculate the wavelet singular spectral entropy:
[0077] Constructing the wavelet coefficient matrix:
[0078] ;
[0079] The matrix size is: ;
[0080] Singular Value Decomposition: ;
[0081] Among them, the left singular vector : 48×48 orthogonal matrix; singular values : A 48×100,000 diagonal matrix; right singular vector : A 100,000×100,000 orthogonal matrix;
[0082] Extracting singular values: ;
[0083] Calculate the probability of singular values: ;
[0084] Calculate the wavelet singular spectral entropy: ;
[0085] S63: Calculate the approximate entropy:
[0086] Setting parameters: Embedding dimension: Similarity tolerance Signal length: ;
[0087] Construct an m-dimensional vector:
[0088] ;
[0089] in, ;
[0090] Calculate the distance matrix, i.e., the Chebyshev distance:
[0091] ;
[0092] Statistical similarity vectors:
[0093] ;
[0094] Calculate the average:
[0095] ;
[0096] Increase the dimension to m+1, repeat the above four steps, and obtain ;
[0097] Calculate the approximate entropy: ;
[0098] S64: Calculate the power spectral entropy:
[0099] The power spectrum estimation parameters are: segment length ; Overlap rate 50%; Window function ;Number of segments ;
[0100] Calculate each periodicity:
[0101] ;
[0102] in, For the i-th segment of signal, ; ; ;
[0103] Average power spectrum: ;
[0104] Calculate the probability distribution: ;
[0105] Power spectral entropy: .
[0106] A method for diagnosing DC charging faults in electric vehicles, characterized by using a fault diagnosis model obtained through the training method described in any one of claims 1 to 5 for diagnosis, comprising the following steps:
[0107] S1: When the charging gun under test is in the charging state, inject the same test signal as the training phase into its DC charging circuit.
[0108] S2: Synchronously acquire the DC voltage response signal and current response signal of the charging gun under test;
[0109] S3: Perform the preprocessing described in claim 4 on the signal acquired in step D2, and calculate its impedance amplitude spectrum to obtain three analysis signals: the voltage signal to be measured, the current signal to be measured, and the impedance amplitude spectrum to be measured.
[0110] S4: According to the method described in claim 5, extract the wavelet energy entropy, wavelet singular spectrum entropy, approximate entropy and power spectrum entropy of the three signals to be analyzed, and form a 12-dimensional feature vector to be analyzed.
[0111] S5: Weight the 12-dimensional feature vector to be tested using the feature weights determined during the training phase;
[0112] S6: Input the weighted feature vector to be tested into the fault diagnosis model, calculate the probability that it belongs to each type of fault, and calculate the comprehensive confidence of the signal to be tested based on the four-dimensional confidence evaluation system described in step S9 of claim 1.
[0113] S7: Based on the threshold range into which the comprehensive confidence level falls, a graded decision is made, and the final fault diagnosis result is output. "A method for diagnosing DC charging faults in electric vehicles, characterized in that: a model trained using the electric vehicle DC charging fault diagnosis model training method described in any one of claims 1 to 6 is used for fault diagnosis; during diagnosis, a test signal is injected into the charging gun under test while it is charging, and the test signal of the charging gun under test is collected. The test signal includes DC voltage information and current information. After preprocessing the test signal, the test impedance amplitude spectrum is calculated to obtain three test analysis signals: test voltage signal, test current signal, and test impedance amplitude spectrum. The wavelet energy entropy, wavelet singular spectrum entropy, approximate entropy, and power spectrum entropy of the three test analysis signals are extracted to obtain a 12-dimensional test feature vector. The 12-dimensional test feature vector is weighted to highlight features that contribute more to fault classification."
[0114] The model is used to calculate the overall confidence level of the test signal of the charging gun under test, and the fault type is determined based on the overall confidence level.
[0115] (III) Beneficial Effects
[0116] This invention provides a method for training a fault diagnosis model for DC charging of electric vehicles and a diagnostic method. It has the following beneficial effects:
[0117] The training and diagnosis methods for the electric vehicle DC charging fault diagnosis model involve modifying the charging gun to set a controllable fault, injecting a 1kHz-100kHz wideband test signal, and simultaneously acquiring DC voltage V(t) and current I(t) signals. The impedance amplitude spectrum |Z(f)| is calculated to form three analysis signals. For each signal, four types of time-frequency domain entropy features—wavelet energy entropy, wavelet singular spectrum entropy, approximate entropy, and power spectrum entropy—are extracted in parallel to construct a 12-dimensional fusion feature vector. Based on Fisher's discrimination ratio adaptive weighted features, a support vector machine is used for fault classification. An innovative four-dimensional confidence assessment system (maximum probability confidence, probability distribution entropy confidence, classification interval confidence, and feature space distance confidence) is introduced, dynamically allocating weights according to fault type characteristics to achieve comprehensive confidence fusion. Finally, a three-level decision output is performed based on the confidence threshold: high confidence outputs the specific fault type, medium confidence outputs the main diagnosis and alternative diagnoses, and low confidence outputs the fault group level diagnosis. Attached Figure Description
[0118] Figure 1 This is a side view of the charging gun fault simulation and detection system in an embodiment of the present invention;
[0119] Figure 2 This is a front view of the charging gun fault simulation and detection system in an embodiment of the present invention;
[0120] Figure 3 This is a top view of the charging gun fault simulation and detection system in an embodiment of the present invention;
[0121] Figure 4 This is a schematic diagram of the high-pressure destruction system in an embodiment of the present invention;
[0122] Figure 5 This is a schematic diagram of the main device in an embodiment of the present invention.
[0123] In the diagram, 1. Charging gun; 2. Limiting seat; 3. First connecting rod; 4. Second connecting rod; 5. First handle; 6. Second handle; 7. First lifting arm; 8. Second lifting arm; 9. First unfolding arm; 10. Second unfolding arm; 11. First end effector; 12. Second end effector; 13. First sprocket; 14. Second sprocket; 15. Chain; 16. Sprocket fixing bracket; 17. Spring box base; 18. Telescopic spring cover; 19. Limiting spring; 20. Sprocket handle; 21. Gear base; 22. First adjustable height support rod; 23. Second adjustable height support rod; 24. Mounting... 25. Base; 26. First return spring; 27. Second return spring; 28. First support body; 29. Second support body; 30. Drive handle; 31. Fixed platform base; 32. First connector; 33. Second connector; 34. First cut-off switch; 35. Second cut-off switch; 36. Gear set; 37. Rotating screw; 38. Rotary table; 39. Sawtooth; 40. Cable positioning and adjustment drive rod; 41. Device carrier housing; 42. Signal acquisition device; 43. Signal injection device; 44. First wiring; 45. Second wiring; 46. Hall current sensor; 47. Cable. Detailed Implementation
[0124] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0125] Example 1 (Fixed charging gun body and overall device structure)
[0126] This invention provides a controllable fault simulation device and signal processing method for DC charging fault diagnosis of electric vehicles. Please refer to [link / reference]. Figures 1-3
[0127] The displacement system includes two sequentially hinged links 3 and 4. Adjacent links are locked at an angle via a rotating fixing rod, allowing adjustment of the height and horizontal extension distance of the main structure. The rectangular frame portion of the limiting seat 2 of the displacement system can fit over the front of the charging gun.
[0128] Both support bodies have insulating anti-slip pads fitted to their inner sidewalls, and the surfaces of the insulating anti-slip pads have rectangular anti-slip patterns. The hollow base has a groove that couples with an adjustable-height support rod, whose extension length can be adjusted to change the base position. A curved section is fitted onto the drive handle 29 outside the support body.
[0129] In one example, the displacement system can adjust the distance between the charging gun and the entire device via a telescopic linkage structure, thereby adjusting the position where the charging gun cable is damaged. The tail end of the charging gun extends into the hollow base 30 of the clamping system. After the device position is determined, the drive handle is rotated, and the first support 27 and the second support 28 clamp together, thereby fixing the charging gun and the entire device.
[0130] Example 2 (simulating power failure of charging gun charging communication CANH port or low-voltage auxiliary power supply)
[0131] This invention provides a controllable fault simulation device and signal processing method for DC charging fault diagnosis of electric vehicles. Please refer to [link / reference]. Figures 1-3
[0132] In one example, the two links of the lifting arm 7 are hinged together, the lower link is connected to the robotic arm base, the handle 5 is tightly attached to the lifting arm 7, the unfolding arm 9 is connected to the robotic arm through the end effector 11 and the robotic arm base, the connector 31 is connected to the cut-off switch 33, the cut-off switch 33 is connected to the charging gun charging communication port CANL, which can cut off the current of the charging gun charging communication port.
[0133] The handle 5 pulls up the robotic arm via the lifting arm 7. The robotic arm pulls backward, causing the extension arm to retract backward. The backward transmission of the robotic arm is transmitted to the end effector 11, which drives the cut-off switch, thereby cutting off the power supply to the charging communication port of the charging gun.
[0134] Example 3 (Simulated Charging Cable Damage)
[0135] This invention provides a controllable fault simulation device and signal processing method for DC charging fault diagnosis of electric vehicles. Please refer to [link / reference]. Figures 1-4
[0136] The sprocket handle 20 of the high-pressure breaking device is fixed to the sprocket 13 and can be rocked. A ruler-shaped fixing bracket 16 is fitted around the sprocket structure. The sprocket at the end of the sprocket structure is concentrically coupled to the end of the driving bevel gear of the gear set, allowing the sprocket 14 to be mounted on the driving gear of the gear set 36. The two bevel gears of the gear set 36 can be tightly coupled. The driven bevel gear is mounted on the top of the rotating screw and fixed in position with the screw. When the gear structure moves, the screw rod can move synchronously along the Z-axis. A small rotary table is connected to the end of the rotating screw. The rotary table can rotate in a plane, and a hole is drilled at the end of the rotary table to mount saw teeth.
[0137] When the sprocket handle rotates in a circular motion relative to the sprocket 13, it drives the sprocket 13 to roll, thereby driving the chain 15 to rotate. When the chain 15 rotates, the gear 14, which is also closely attached to the chain 15, also rotates synchronously, thereby driving the bevel gear 35, which rotates simultaneously with the chain 15. The bevel gear drives the spiral rod 36 to rotate. Since the spiral groove inside the spiral rod 36 matches the device's supporting housing, the spiral rod 36 will perform a corresponding translational motion, and the bottom rotating platform 37 will also perform a corresponding Z-axis motion. Because the spiral rod 36 performs Z-axis motion, the bevel gear fixed to the spiral rod 36 will also perform Z-axis motion at the same angular velocity. The telescopic spring cover 18 above the bevel gear will also perform Z-axis motion at the same speed. The limiting spring 19 inside the spring box ensures the stability of the system and ensures the compact structure of the bevel gear 35. As the spiral rod 36 moves along the Z-axis, the rotary table 37 can also rotate, allowing the saw teeth 38 to cut the cable connected to the charging gun at different angles and depths. A portion of the cable is placed on the cable positioning and adjustment drive rod 39, making the process of destroying the cable easier.
[0138] Example 4 (Injecting test waveforms and obtaining DC charging port waveforms after simulating a charging gun system failure)
[0139] This invention provides a controllable fault simulation device and signal processing method for DC charging fault diagnosis of electric vehicles. Based on the charging gun fault simulation provided in Embodiments 2 and 3, it includes the following steps (please refer to the following steps). Figure 5 :
[0140] The DC charging port of the charging gun has wires 43 and 44 leading out to connect to the fault injection device and the signal acquisition device, respectively.
[0141] When the charging gun is connected to the vehicle, a white noise signal with a bandwidth of 1kHz-100kHz is injected using the signal injection device 42. The mathematical expression is:
[0142] ;
[0143] in, The kth frequency component is uniformly distributed in the range of 1kHz-100kHz. To ensure the total power is within a safe range (<5W), the amplitude is adjusted accordingly. The phase is random, ensuring that the signal has approximately white noise characteristics.
[0144] The charging gun system after the simulated fault obtained in Examples 2 and 3 is used to obtain the current signal corresponding to the DC charging terminal in the charging gun system through the current sensor 45 inside the charging gun, and the signal is transmitted to the signal acquisition device 41.
[0145] The signal acquisition system synchronously acquires the DC voltage response. With the received current response Sampling frequency Collection time Number of collection points The storage format is a 32-bit floating-point array.
[0146] Example 5 (Processing the obtained voltage and current signals)
[0147] This invention provides a controllable fault simulation device and signal processing method for DC charging fault diagnosis of electric vehicles. Based on the charging gun fault simulation provided in Examples 2 and 3, and the data analysis obtained in Example 4, the method includes the following steps:
[0148] 1. Preprocess the signal, first by using detrending processing to remove the linear trend term.
[0149] ;
[0150] in, It was obtained by fitting using the least squares method.
[0151] Subsequently, a 5th-order elliptic filter was used for bandpass filtering, with a passband of [value missing]. .
[0152] ;
[0153] The filter design parameters are: passband ripple 0.1dB, stopband attenuation 60dB, and filter bands: 5000Hz-1kHz, 100kHz-150kHz.
[0154] Finally, the signal is normalized.
[0155] ;
[0156] in, The mean of the signal. The standard deviation is denoted as .
[0157] 2. Impedance Spectrum Calculation
[0158] For the voltage after preprocessing and current Perform FFT calculation:
[0159] ;
[0160] Then the impedance spectrum was calculated: Extract the impedance amplitude spectrum:
[0161] ;
[0162] Three analysis signals were obtained: voltage signal Current signal Impedance amplitude spectrum .
[0163] 3. Multi-dimensional time-frequency entropy feature extraction:
[0164] (1) Wavelet energy entropy
[0165] When choosing a wavelet basis, use the Morlet wavelet: .choose This is because it achieves a good balance between time and frequency resolution.
[0166] frequency With scale The relationship is: ;
[0167] in, (Morlet wavelet center frequency) (Sampling interval). In reality, the scale... Using 48 scales of log-distribution: ;
[0168] Calculate wavelet coefficients: ;
[0169] The discrete form of wavelet coefficients is: ;
[0170] Scale energy: ;
[0171] Energy frequency: ;
[0172] Wavelet energy entropy: ;
[0173] (2) Wavelet singular spectral entropy
[0174] First, construct the wavelet coefficient matrix:
[0175] ;
[0176] The matrix size is: ;
[0177] Singular Value Decomposition: .
[0178] in, : 48×48 orthogonal matrix (left singular vector); :48v100,000 diagonal matrix (singular values); : 100,000×100,000 orthogonal matrix (right singular vector).
[0179] In actual calculations of the economical SVD, only the first 48 singular values are calculated.
[0180] Extracting singular values: ;
[0181] Calculate the probability of singular values: ;
[0182] Calculate the wavelet singular spectral entropy: ;
[0183] A rapid decrease in singular values indicates a simple matrix structure and low entropy; a slow decrease in singular values indicates a complex matrix structure and high entropy; and faults can introduce complex structures, increasing the singular spectral entropy.
[0184] (3) Approximate entropy
[0185] First, set the parameters: Embedding dimension: Similarity tolerance Signal length: .
[0186] To reduce computational load, downsampling is used, i.e., 1 point is taken for every 10 points, resulting in a 10,000-point sequence.
[0187] Construct an m-dimensional vector:
[0188] ;
[0189] in, ;
[0190] Calculate the distance matrix, i.e., the Chebyshev distance:
[0191] ;
[0192] Statistical similarity vectors:
[0193] ;
[0194] Calculate the average:
[0195] ;
[0196] Increase the dimension to m+1, repeat the above four steps, and obtain ;
[0197] Calculate the approximate entropy: ;
[0198] For regular signals, the approximate entropy is small; for random signals, the approximate entropy is large; faults increase the irregularity of signals.
[0199] (4) Power spectral entropy (PSE)
[0200] The power spectrum estimation parameters are: segment length ; Overlap rate 50%; Window function ;Number of segments .
[0201] Calculate each periodicity:
[0202] ;
[0203] in, For the i-th segment of signal, ; ; .
[0204] Average power spectrum: ;
[0205] Calculate the probability distribution: ;
[0206] Power spectral entropy: ;
[0207] For single-frequency signals, power is concentrated and entropy is low; for wideband signals, power is dispersed and entropy is high; and faults usually introduce new frequency components.
[0208] 4. Extract four entropy features from each of the three signals and perform multi-dimensional time-frequency entropy feature fusion: ;
[0209] 5. Adaptive feature weighting.
[0210] For the i-th feature, calculate its discriminative power:
[0211] Calculate intra-class scatter: ;
[0212] (2) Calculate the inter-class distribution: ;
[0213] (3) Calculate Fisher's discrimination ratio (FDR): ;
[0214] (4) Feature weight normalization: ;
[0215] (5) Weighted eigenvectors: ;
[0216] 6. Support Vector Machine (SVM) Classification:
[0217] First, calculate the RBF kernel function: ;
[0218] For the c-th SVM: The constraints are:
[0219] ;
[0220] Where the sample belongs to type c, ,otherwise .
[0221] Convert SVM decision values into probabilities: ;
[0222] in, It is the decision function of the c-th SVM, and the parameters A and B are obtained through maximum likelihood estimation.
[0223] For each test sample, a 10-dimensional probability vector is obtained:
[0224] ;
[0225] The 12-dimensional feature vector is used as input to the SVM classifier. It is mapped to a high-dimensional space via the RBF kernel function and used for decision calculation, outputting decision values corresponding to 10 fault classes. The Platt probability calibration method is then used to convert the decision values into posterior probabilities for each class, forming a 10-dimensional probability vector. This process achieves the mapping from a multi-dimensional feature space to a fault class probability space, providing a probabilistic basis for subsequent confidence assessment.
[0226] 7. Four-dimensional confidence calculation:
[0227] (1) Maximum probability confidence level: This confidence level is the direct confidence of the model in the most likely category.
[0228] (2) Probability distribution entropy confidence level:
[0229] Information entropy: ;
[0230] Maximum possible entropy: ;
[0231] Normalized entropy: ;
[0232] Entropy confidence: ;
[0233] The confidence level of a probability distribution entropy reflects the "concentration" of the probability distribution. If the probability is concentrated in one category, it indicates low entropy. If the probability is large and the distribution is uniform, then the entropy is large. Small.
[0234] (3) Classification interval confidence
[0235] To calculate the classification margin confidence score, first perform probability ranking: ;
[0236] Calculation interval: ;
[0237] Classification interval confidence: ;
[0238] Specifically, the interval values are mapped appropriately to [0,1].
[0239] The classification margin confidence score reflects the model's ability to distinguish between classes. A large margin clearly distinguishes the most likely and the next most likely classes. Otherwise, it indicates that the fault is difficult to distinguish and may be misclassified.
[0240] (4) Confidence of feature space distance
[0241] First, calculate the feature centers for each category: ;
[0242] The covariance matrices for each category are as follows: ;
[0243] Let the prediction category be: ;
[0244] Mahalanobis distance: ;
[0245] Distance confidence: ;
[0246] Where is the standard deviation of the distance from the training samples to the center in the category.
[0247] Distance confidence reflects the similarity between the test sample and the training sample. A small distance indicates that the sample is typical and the confidence is high; a large distance indicates that the sample is atypical and may be a new fault or noise.
[0248] 8. Calculation of overall confidence level:
[0249] ;
[0250] Among them, is The confidence level dimension has an empirical weight for this type of fault. A reference table for the empirical weights of fault types is shown in Table 1.
[0251] 9. Fault Differentiation Decision
[0252] (1) High-confidence diagnosis
[0253] The conditions for a high-confidence diagnosis are: And all four-dimensional confidence levels are At this point, the diagnostic results can be accepted directly, and the specific fault type can be output.
[0254] Medium confidence diagnosis
[0255] The conditions for a moderate confidence diagnosis are: Under these conditions, if and If the primary diagnosis is accepted, alternative diagnoses must still be provided; otherwise, the first three possible fault types must be provided, along with their probabilities and confidence levels.
[0256] Low confidence diagnosis
[0257] The condition for a low-confidence diagnosis is that... At this point, without distinguishing the specific fault type, fault group level diagnosis is performed instead. Communication end fault groups are classified as Type 1-2; auxiliary section fault groups as Type 3-4; and cable damage groups as Type 5-10.
[0258] Group probability calculation:
[0259] ;
[0260]
[0261] Example 6 (Fault Diagnosis of Measured Signals Based on Training Model)
[0262] This embodiment is based on the electric vehicle DC charging fault diagnosis model constructed in embodiments one to five above. It performs fault diagnosis on the DC charging gun of an electric vehicle in actual operation to verify the practicality and accuracy of the model. The specific steps are as follows:
[0263] I. Diagnostic Preparation
[0264] Hardware setup: A 120kW DC fast charging pile and its matching charging gun are selected as the test object. The signal injection device 42 is connected to the DC charging port of the charging gun through a dedicated wiring. The signal acquisition device 41 is connected to the Hall current sensor 45 and voltage detection node inside the charging gun to ensure synchronous acquisition of voltage and current signals. The diagnostic terminal (equipped with a trained fault diagnosis model) communicates with the signal acquisition device 41 through a data transmission line to receive the processed data in real time.
[0265] Parameter matching: Set the signal injection parameters to be consistent with those used in the training phase. The injected test signal is a 1kHz-100kHz wideband white noise signal, expressed as follows: fk is uniformly distributed between 1kHz and 100kHz, and Ak controls the total power to be less than 5W. The phase is random; the signal acquisition parameters are set to a sampling frequency of 1MHz, an acquisition duration of 100ms, and a number of acquisition points of 100,000, with the storage format being a 32-bit floating-point array.
[0266] Model Loading: Load the trained fault diagnosis model into the diagnostic terminal, including the weighting coefficients of the 12-dimensional feature vector, SVM classifier parameters (RBF kernel function parameters, A and B parameters obtained from maximum likelihood estimation), empirical weights of the four-dimensional confidence assessment system (refer to Table 1 for fault type weight allocation), and three-level decision thresholds (high confidence threshold). ≥0.85, confidence level ≥0.7 for each dimension; median confidence threshold ≤0.6 <0.85; Low confidence threshold <0.6).
[0267] II. Measured Signal Acquisition and Preprocessing
[0268] Signal Acquisition: The charging gun is started to simulate an actual charging scenario (connected to an electric vehicle battery pack, charging power set to 50kW). The signal injection device 42 injects a preset wideband test signal into the charging gun, and the signal acquisition device 41 simultaneously acquires the measured DC voltage signal. and current signal The data collection process continues for 100ms before stopping, obtaining the original measured signal dataset.
[0269] Preprocessing operations:
[0270] Detrending processing: The linear trend term of the original signal is fitted using the least squares method. ,pass Remove linear trends;
[0271] Bandpass filtering: A 5th-order elliptic filter is used to filter the de-stressed signal. The passband is set to 1kHz-100kHz, the passband ripple is 0.1dB, the stopband attenuation is 60dB, and the interference frequency bands of 5000Hz-1kHz and 100kHz-150kHz are filtered.
[0272] Normalization: Calculate the mean μ and standard deviation σ of the filtered voltage and current signals, and then... The signal is normalized to the interval [-1, 1].
[0273] III. Feature Extraction and Weighting
[0274] Impedance amplitude spectrum calculation: for preprocessed and Perform an FFT transform to obtain the frequency domain signals V(f) and I(f), and calculate the impedance spectrum. The impedance amplitude spectrum |Z(f)| is extracted to form three measured analysis signals: voltage signal Current signal Impedance amplitude spectrum .
[0275] 12-dimensional time-frequency entropy feature extraction:
[0276] Wavelet energy entropy: Morlet wavelet transforms were applied to the three signals respectively, and wavelet coefficients at 48 logarithmic distribution scales were calculated. Calculate the scale energy, and then obtain the wavelet energy entropy. ;
[0277] Wavelet singular spectral entropy: Construct a wavelet coefficient matrix (48×100000) for the three signals, perform singular value decomposition, extract the first 48 singular values, and calculate the singular value probability. The wavelet singular spectrum entropy is obtained. ;
[0278] Approximate Entropy: With embedding dimension m=2, similarity tolerance r=0.2σ, and signal length N=10000 (after downsampling), an m-dimensional vector is constructed, Chebyshev distance is calculated, and the proportion of similar vectors is statistically analyzed to obtain the approximate entropy. ;
[0279] Power spectral entropy: The three signals are segmented with a segment length of 2048, an overlap rate of 50%, and a Hanning window function. The periodogram of each segment is calculated, and the average power spectrum is obtained to obtain the power distribution. Power spectral entropy (L is the number of frequency points);
[0280] Feature weighting: Based on the Fisher discriminant ratio (FDR) obtained during the training phase, the weights of each feature are calculated, and the 12-dimensional feature vector is weighted to highlight features that contribute highly to fault differentiation, resulting in the weighted measured feature vector. (w1−w12 are the weights of each feature, - (These are the four types of entropy characteristics of the three signals).
[0281] IV. Model Inference and Confidence Calculation
[0282] SVM probability prediction: The weighted measured feature vectors are used for... The input is given to an SVM classifier, the decision value is calculated using the RBF kernel function, and then converted into a 10-dimensional fault probability vector using maximum likelihood estimation. , where pi represents the probability that the measured signal belongs to the i-th type of fault (fault codes 01-10 correspond to the fault types in Table 1).
[0283] Four-dimensional confidence calculation:
[0284] Maximum probability confidence level: Assuming in actual measurement ,but ;
[0285] Probability distribution entropy confidence: Calculating information entropy Maximum possible entropy Normalized entropy Entropy confidence Assuming the calculated value of H is 0.65, then , ;
[0286] Classification interval confidence: Sort the data so that p(1)≥p(2)≥...≥p(10), and calculate the intervals. The sigmoid function maps the result to the [0,1] interval. Assuming p(1) = 0.82 and p(2) = 0.11, then , ;
[0287] Feature space distance confidence: Calculate the training feature centers for 10 types of faults. Covariance Matrix Let the prediction category be... Calculate the measured feature vector to Mahalanobis distance Distance confidence ( For training samples to (Standard deviation of distance), assuming , ,but ;
[0288] Overall confidence level calculation: Based on the empirical weights a1=0.30, a2=0.25, a3=0.25, a4=0.20 corresponding to the predicted fault type (assuming code 07 "severe insulation damage"), the overall confidence level is calculated. .
[0289] V. Hierarchical Decision-Making and Diagnostic Result Output
[0290] Confidence level assessment: Overall confidence level ,satisfy This falls within the scope of medium confidence diagnostics; further examination of the confidence levels for each dimension is needed. , , , It does not meet the condition that "all four-dimensional confidence levels are ≥0.7".
[0291] Decision Output: According to the medium confidence diagnostic rule, output the first three possible fault types and their corresponding probabilities and confidence levels.
[0292] Primary diagnosis: Severe insulation damage (fault code 07), probability 0.82, dimensional confidence level. ;
[0293] Alternative diagnosis 1: Severe conductor damage (fault code 10), probability 0.11, overall confidence level 0.68;
[0294] Alternative diagnosis 2: Moderate insulation damage (fault code 06), probability 0.05, overall confidence level 0.62;
[0295] Results Verification: Disassembly and inspection of the charging gun revealed severe wear on its cable insulation (consistent with the main diagnostic results), verifying the accuracy of the model's diagnosis; simultaneously, The low value indicates that the characteristics of the measured sample differ from the typical characteristics of the "severe insulation damage" sample in the training set (possibly due to the special location of the wear). Therefore, the model outputs alternative diagnoses, which improves the reliability of the diagnosis.
[0296] VI. Diagnostic Conclusion
[0297] This embodiment uses a trained fault diagnosis model to diagnose the measured charging gun signal, successfully identifying severe insulation damage faults. It outputs graded diagnostic results based on comprehensive confidence levels, ensuring diagnostic accuracy while also considering uncertainties arising from sample specificity. This verifies the effectiveness and practicality of the model in real-world applications, making it suitable for online fault monitoring and rapid diagnosis of DC charging guns.
[0298] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0299] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A training method for a fault diagnosis model of DC charging for electric vehicles, characterized in that: Includes the following steps: S1: Simulate the fault state of the DC charging gun for electric vehicles; S2: While the electric vehicle is being charged through the DC charging gun, a test signal is injected into the DC charging circuit of the charging gun. S3: Acquire raw signals under fault conditions, including DC voltage response. Current response ; S4: Preprocess the original signal; S5: Calculate the impedance amplitude spectrum; For the voltage after preprocessing and current Perform FFT calculation: ; Then the impedance spectrum was calculated: ; Extracting the impedance amplitude spectrum: ; Three analysis signals were obtained: voltage signal Current signal Impedance amplitude spectrum ; S6: Extract the wavelet energy entropy, wavelet singular spectrum entropy, approximate entropy, and power spectrum entropy of the three analysis signals respectively to obtain a 12-dimensional feature vector; S7: Weight the 12-dimensional feature vectors to highlight features that contribute more to fault classification; Repeat steps S1 to S7 to simulate and collect data under K different preset fault states, and finally obtain K sets of corresponding weighted feature vectors to form the training dataset of the model. S8: Optimize model parameters using training data and establish the mapping relationship between the weighted features and fault types; S81: Using the radial basis function (RBF) as the kernel function to solve nonlinear classification problems; Calculate the RBF kernel function: ; For the c-th SVM: , constraint is ; Where the sample belongs to type c, ,otherwise ; S82: Convert SVM decision values into probabilities: ; in, It is the decision function of the c-th SVM, and the parameters A and B are obtained through maximum likelihood estimation; S83: Input the weighted 12-dimensional feature vector into the trained multi-class SVM model, calculate the decision value using the RBF kernel function, and then convert the decision value into a posterior probability using the Platt scaling method (based on maximum likelihood estimation to fit the Sigmoid parameter), obtaining the probability distribution of the sample belonging to 10 fault classes, i.e., a 10-dimensional probability vector. ; Where pi is the probability that the sample belongs to the i-th type of fault, which provides the basis for subsequent confidence assessment; S9: To improve the reliability of the model output, a four-dimensional confidence evaluation system is introduced to dynamically judge the credibility of the classification results and realize hierarchical decision-making based on the confidence threshold. S91: Calculate the maximum probability confidence level: ; S92: Calculate the probability distribution entropy and confidence level : Calculate information entropy: ; Calculate the maximum possible entropy: ; Calculate the normalized entropy: ; Calculate the entropy confidence score: ; The confidence level of a probability distribution entropy reflects the concentration of the probability distribution. If the probability is concentrated in one category, it indicates that the probability distribution entropy is small. If the probability is uniformly distributed, it means that the entropy of the probability distribution is large. Small; S93: Calculate the classification margin confidence score: First, sort by probability: ; Calculation interval: ; Classification interval confidence: ; Among these, the interval values are reasonably mapped to [0,1]; S94: Calculate the confidence level of the feature space distance. Calculate the feature centers for each category: ; The covariance matrices for each category are as follows: ; Let the prediction category be: ; Mahalanobis distance: ; Distance confidence: ; S95: Calculate the overall confidence level ; in, It is the empirical weight of the confidence dimension for this type of fault.
2. The electric vehicle DC charging fault diagnosis model training method according to claim 1, characterized in that: The expression for the signal in S2 is: ; in, The kth frequency component is uniformly distributed in the range of 1kHz-100kHz. For amplitude; It is a random phase.
3. The electric vehicle DC charging fault diagnosis model training method according to claim 1, characterized in that: The sampling frequency of the raw signal acquired under fault conditions in S3 Collection time Number of collection points The storage format is a 32-bit floating-point array.
4. The electric vehicle DC charging fault diagnosis model training method according to claim 1, characterized in that: The specific steps of S4 are as follows: S41: Remove linear trend terms using detrending processing. ; in, Obtained by least squares fitting; S42: Bandpass filtering is performed using a 5th-order elliptic filter, with a passband of... ; ; The filter design parameters are: passband ripple 0.1dB, stopband attenuation 60dB, filter band: 5000Hz-1kHz, 100kHz-150kHz; S43: Normalize the signal: ; in, The mean of the signal. The standard deviation is denoted as .
5. The electric vehicle DC charging fault diagnosis model training method according to claim 1, characterized in that: The specific steps of S6 are as follows: S61: Calculate wavelet energy entropy: Using Morlet wavelets: ; frequency With scale The relationship is: . Among them, the wavelet center frequency Sampling interval ; Calculate wavelet coefficients: ; The discrete form of wavelet coefficients is: ; Scale energy: ; Energy frequency: ; Wavelet energy entropy: ; S62: Calculate the wavelet singular spectral entropy: Constructing the wavelet coefficient matrix: ; The matrix size is: ; Singular Value Decomposition: ; Among them, the left singular vector : 48×48 orthogonal matrix; singular values : A 48×100,000 diagonal matrix; right singular vector : A 100,000×100,000 orthogonal matrix; Extracting singular values: ; Calculate the probability of singular values: ; Calculate the wavelet singular spectral entropy: ; S63: Calculate the approximate entropy: Setting parameters: Embedding dimension: Similarity tolerance Signal length: ; Construct an m-dimensional vector: ; in, ; Calculate the distance matrix, i.e., the Chebyshev distance: ; Statistical similarity vectors: ; Calculate the average: ; Increase the dimension to m+1, repeat the above four steps, and obtain ; Calculate the approximate entropy: ; S64: Calculate the power spectral entropy: The power spectrum estimation parameters are: segment length ; Overlap rate 50%; Window function ;Number of segments ; Calculate each periodicity: ; in, For the i-th segment of signal, ; ; ; Average power spectrum: ; Calculate the probability distribution: ; Power spectral entropy: .
6. A method for diagnosing DC charging faults in electric vehicles, characterized in that, Diagnosis is performed using the fault diagnosis model obtained through the training method described in any one of claims 1 to 5. Includes the following steps: S1: When the charging gun under test is in the charging state, inject the same test signal as the training phase into its DC charging circuit. S2: Synchronously acquire the DC voltage response signal and current response signal of the charging gun under test; S3: Perform the preprocessing as described in claim 4 on the signal acquired in step D2, and calculate its impedance amplitude spectrum to obtain three analysis signals: the voltage signal under test, the current signal under test, and the impedance amplitude spectrum under test; S4: According to the method described in claim 5, extract the wavelet energy entropy, wavelet singular spectrum entropy, approximate entropy, and power spectrum entropy of the three analysis signals under test respectively to form a 12-dimensional feature vector under test; S5: Use the feature weights determined in the training phase to weight the 12-dimensional feature vector under test; S6: Input the weighted feature vector under test into the fault diagnosis model, calculate the probability that it belongs to various types of faults, and calculate the comprehensive confidence of the signal under test based on the four-dimensional confidence evaluation system described in step S9 of claim 1; S7: Based on the threshold range into which the comprehensive confidence level falls, a graded decision is made, and the final fault diagnosis result is output. "A method for diagnosing DC charging faults in electric vehicles, characterized in that: a model trained using the electric vehicle DC charging fault diagnosis model training method described in any one of claims 1 to 6 is used for fault diagnosis; during diagnosis, a test signal is injected into the charging gun under test while it is charging, and the test signal of the charging gun under test is collected. The test signal includes DC voltage information and current information. After preprocessing the test signal, the test impedance amplitude spectrum is calculated to obtain three test analysis signals: test voltage signal, test current signal, and test impedance amplitude spectrum. The wavelet energy entropy, wavelet singular spectrum entropy, approximate entropy, and power spectrum entropy of the three test analysis signals are extracted to obtain a 12-dimensional test feature vector. The 12-dimensional test feature vector is weighted to highlight features that contribute more to fault classification." The model is used to calculate the overall confidence level of the test signal of the charging gun under test, and the fault type is determined based on the overall confidence level.