Optical storage and charging equipment fault detection and positioning method, device and medium

CN122525280APending Publication Date: 2026-08-07SHENZHEN RUNSHIHUA SOFTWARE & INFORMATION TECH SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN RUNSHIHUA SOFTWARE & INFORMATION TECH SERVICE CO LTD
Filing Date
2026-07-13
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]鉴于上述问题,本发明实施例提供了一种光储充设备故障检测与定位方法、设备及介质,以解决如何在强噪声环境下提高故障识别的自适应能力,并在先验信息不足时保证故障定位的可靠性的技术问题

Benefits of technology

[0016]本发明实施例通过对采集的多源故障信号进行特征提取与预处理,获得目标故障特征向量,并与预设故障模式库中的模板进行综合匹配,能够准确识别已知故障类型;当匹配度均低于第一预设阈值时,自动判定为未知故障模式,并利用临时样本库对未知故障特征向量进行动态聚类管理,在样本计数达到预设增量阈值时通过聚类分析生成新模板并更新模式库,从而使系统具备自适应学习能力,持续扩展对未知故障的识别范围。同时结合设备拓扑模型与贝叶斯推理,根据故障类型和特征向量计算各设备为故障源的后验概率,当最大后验概率满足第二预设阈值时直接输出故障设备,否则切换为基于拓扑距离和信号传播延迟的回溯定位,输出候选故障源集合。这种双模定位机制融合了概率推理与物理拓扑约束,有效弥补了先验信息不足时定位可靠性差的问题,显著提升了光储充系统故障诊断的准确性、自适应性和鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122525280A_ABST
    Figure CN122525280A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of new energy monitoring management, and discloses a photovoltaic storage and charging equipment fault detection and positioning method, equipment and medium, the method comprising the following steps: collecting multi-source fault signals, obtaining a target fault feature vector through wavelet adaptive thresholding and feedback iteration, matching the target fault feature vector with each fault template in a preset fault mode library, and judging a corresponding fault type; if the target fault feature vector is not matched, storing the target fault feature vector in a corresponding cluster in a temporary sample library; when the number of samples in the cluster reaches an incremental threshold value, performing clustering analysis and adding a result as a new fault template to the fault mode library; establishing an equipment topology model, calculating the posterior probability of each equipment being a fault source according to the fault type and the feature vector, outputting corresponding equipment that is likely to be a fault source based on the posterior probability, and if the corresponding equipment does not exist, performing backtracking positioning based on a topology distance and a signal propagation delay to output a candidate fault source set. The application realizes adaptive identification and accurate positioning of fault types, and effectively improves the accuracy and robustness of photovoltaic storage and charging system fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy monitoring and management technology, specifically to a method, equipment, and medium for fault detection and location of photovoltaic energy storage and charging equipment. Background Technology

[0002] In integrated photovoltaic-storage-charging power stations, photovoltaic inverters, energy storage converters, and charging piles operate in complex electromagnetic environments for extended periods. The collected fault signals generally suffer from severe noise interference, making it difficult for traditional preprocessing methods to simultaneously address noise reduction and feature preservation. Different equipment and fault types exhibit significantly different manifestations, and existing diagnostic methods often rely on pre-built static pattern libraries for matching. When encountering undefined fault patterns, the system lacks adaptive recognition capabilities, easily leading to missed or incorrect diagnoses. Regarding fault location, commonly used reasoning methods depend on sufficient prior statistical information; when available information is insufficient, the reliability of the location results is difficult to guarantee.

[0003] Therefore, it is urgent to solve the problem of how to improve the adaptive capability of fault identification in a noisy environment and ensure the reliability of fault location when prior information is insufficient. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention provide a method, device and medium for fault detection and location of optical storage and charging equipment, so as to solve the technical problem of how to improve the adaptive capability of fault identification in a strong noise environment and ensure the reliability of fault location when prior information is insufficient.

[0005] According to one aspect of the present invention, a method for fault detection and location of a photovoltaic energy storage and charging device is provided, comprising: Collect multi-source fault signals during the operation of the photovoltaic-storage-charging equipment, which includes a photovoltaic inverter, an energy storage converter, and a charging pile; The collected multi-source fault signals are decomposed by wavelet transform at multiple scales. The wavelet coefficients at each scale are denoised using a hierarchical adaptive threshold. The denoising threshold of the first-level detail coefficients is multiplied by a down-adjustment coefficient to reconstruct the denoised signal. The down-adjustment coefficient is adjusted by a feedback iteration mechanism based on a preset signal quality evaluation index of the denoised signal until the index meets the preset requirements. Then, time-domain, frequency-domain, and time-frequency-domain features are extracted from the denoised signal to construct the target fault feature vector. Calculate the overall matching degree between the target fault feature vector and each fault template in the preset fault mode library; If the highest overall matching degree is greater than or equal to the first preset threshold, then the target fault feature vector is determined to be the fault type corresponding to the matching fault template; If all comprehensive matching degrees are lower than the first preset threshold, it is determined to be an unknown fault mode; and the target fault feature vector is stored in the corresponding matched unknown fault mode cluster in the temporary sample library or a new corresponding unknown fault mode cluster is created; when the sample count of the unknown fault mode cluster corresponding to the target fault feature vector reaches the preset incremental threshold, cluster analysis is performed on all fault feature vectors contained in the corresponding unknown fault mode cluster, and the clustering result is added to the fault mode library as a new fault template, and the corresponding unknown fault mode cluster is deleted from the temporary sample library; A device topology model is established, which describes the electrical connection relationship between the photovoltaic inverter, the energy storage converter, and the charging pile; and based on the fault type and the corresponding target fault feature vector, Bayesian inference is used to calculate the posterior probability that each device in the photovoltaic inverter, the energy storage converter, and the charging pile is a fault source. If the maximum posterior probability is greater than or equal to the second preset threshold, the corresponding device will be output as the fault location result; otherwise, backtracking will be performed based on topological distance and signal propagation delay, and the resulting set of candidate fault source devices will be output as the fault location result.

[0006] Furthermore, the construction of the target fault feature vector includes: For multiple scale layers obtained by wavelet decomposition, the noise standard deviation of each scale layer is estimated based on the median absolute deviation of the detail coefficients of each scale layer, and a denoising threshold for each scale layer is generated based on the noise standard deviation; wherein, the denoising threshold of the first layer detail coefficients obtained by decomposition is multiplied by a coefficient less than 1 to serve as the denoising threshold after down-adjustment of the first layer detail coefficients. Based on the adjusted denoising thresholds for each scale layer, the detail coefficients of each scale layer are thresholded, and the thresholded detail coefficients of each scale layer are subjected to wavelet inverse transform to obtain the denoised signal. Calculate the signal-to-noise ratio (SNR) and root mean square error (RMSE) of the denoised signal. If at least one of the SNR and RMSE fails to meet the preset target, adjust the value of the coefficient less than 1 and repeat the threshold processing and wavelet inverse transform until both the SNR and RMSE meet the preset target. Use the denoised signal obtained when the preset target is met as the reconstructed denoised signal. Time-domain features, frequency-domain features, and time-frequency-domain features are extracted from the denoised signal to construct a target fault feature vector. The target fault feature vector is then subjected to dimensionality reduction processing to obtain the dimensionality-reduced target fault feature vector.

[0007] Further, the step of extracting time-domain features, frequency-domain features, and time-frequency-domain features from the denoised signal, constructing a target fault feature vector, and performing dimensionality reduction processing on the target fault feature vector to obtain a dimensionality-reduced target fault feature vector includes: Calculate the Pearson correlation coefficient between each extracted time-domain feature, each frequency-domain feature, and each pair of time-frequency-domain features, and delete one feature from the feature pair whose Pearson correlation coefficient is greater than the preset correlation threshold; Calculate the mutual information value between each remaining feature and the fault type label, and delete features whose mutual information value is lower than a preset mutual information threshold; The features retained after deletion are standardized to obtain a standardized fault feature vector. Principal component analysis is used to reduce the dimensionality of the standardized fault feature vector. Principal components are selected according to the cumulative variance contribution rate reaching a preset percentage to obtain the initial dimensionality-reduced target fault feature vector. Calculate the contour coefficient of the initial dimensionality-reduced target fault feature vector. If the contour coefficient is lower than a preset contour coefficient threshold, adjust the value of the preset percentage and perform principal component analysis again until the contour coefficient reaches the preset contour coefficient threshold to obtain the dimensionality-reduced target fault feature vector.

[0008] Furthermore, the comprehensive matching degree between the target fault feature vector and each fault template in the preset fault mode library is calculated by weighted summation of cosine similarity and Euclidean distance, where the weights of cosine similarity and Euclidean distance are preset constants.

[0009] Further, the step of storing the target fault feature vector into the corresponding matching unknown fault mode cluster in the temporary sample library or creating a new corresponding unknown fault mode cluster includes: The target fault feature vector is matched with the cosine similarity of the cluster feature vectors of each existing unknown fault mode cluster in the temporary sample library. If the calculated maximum cosine similarity is greater than or equal to the third preset threshold, the target fault feature vector is assigned to the corresponding unknown fault mode cluster, and the cluster feature vector and sample count of the corresponding unknown fault mode cluster are updated. If the maximum cosine similarity is less than the third preset threshold, then a new unknown fault mode cluster is created using the target fault feature vector as the first sample, and the cluster feature vector and sample count of the unknown fault mode cluster are initialized.

[0010] Furthermore, the step of using Bayesian inference to calculate the posterior probability that each device in the photovoltaic inverter, energy storage converter, and charging pile is a fault source includes: The prior probability of each device is set based on the historical failure rate statistics of each device in the optical storage and charging equipment, and the prior probability is dynamically updated. For a known fault type, the likelihood probability of the target fault feature vector appearing under the corresponding equipment fault condition is calculated based on the normalization of the comprehensive matching degree. For unknown fault modes, the likelihood probability of the target fault feature vector occurring under the corresponding equipment fault conditions is calculated based on the degree to which the target fault feature vector deviates from the distribution of the corresponding normal operating characteristics of the equipment. The greater the degree of deviation, the higher the likelihood probability. Based on the prior probability and the likelihood probability, the posterior probability of each device being a fault source is calculated using Bayes' theorem.

[0011] Furthermore, the step of backtracking based on topological distance and signal propagation delay includes: The arrival time of the fault signal detected at each monitoring point is obtained. Based on the electrical connection length between each device in the device topology model and the preset propagation speed, the theoretical arrival time of the fault signal from each possible fault source to each monitoring point is calculated. The device with the highest match between theoretical arrival time and actual arrival time is identified as a candidate fault source. The candidate fault sources are then sorted from highest to lowest match degree to obtain a set of candidate fault source devices arranged in descending order of match degree.

[0012] Furthermore, the method also includes: According to the preset injection cycle, test signals are injected into each electrical connection line in the device topology model, the actual propagation time of the test signal in each path is measured, the propagation speed of each path is calculated and updated based on the actual propagation time, and the propagation speed is compensated and adjusted according to the current ambient temperature.

[0013] According to another aspect of the present invention, a computer device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation of the optical storage and charging device fault detection and location method described in any one of the above descriptions.

[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction, the executable instruction causing a computer device to perform the operation of the optical storage and charging device fault detection and location method described in any one of the preceding claims.

[0015] According to another aspect of the present invention, a computer program product is provided, including a computer program that, when executed by a processor, implements the fault detection and location method for optical storage and charging equipment described in any of the above embodiments.

[0016] This invention extracts and preprocesses features from collected multi-source fault signals to obtain target fault feature vectors. These vectors are then comprehensively matched with templates in a preset fault mode library to accurately identify known fault types. When the matching degree is below a first preset threshold, the fault is automatically identified as an unknown fault mode. A temporary sample library is used to dynamically cluster the unknown fault feature vectors. When the sample count reaches a preset incremental threshold, cluster analysis generates new templates and updates the mode library, enabling the system to have adaptive learning capabilities and continuously expand the range of unknown fault identification. Simultaneously, combining device topology models and Bayesian inference, the posterior probability of each device being a fault source is calculated based on the fault type and feature vectors. When the maximum posterior probability meets a second preset threshold, the faulty device is directly output; otherwise, a backtracking location based on topological distance and signal propagation delay is used to output a set of candidate fault sources. This dual-mode localization mechanism integrates probabilistic inference and physical topological constraints, effectively compensating for poor localization reliability when prior information is insufficient, and significantly improving the accuracy, adaptability, and robustness of fault diagnosis in optical storage and charging systems.

[0017] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0018] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating the fault detection and location method for optical storage and charging equipment provided in an embodiment of the present invention is shown. Figure 2 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0019] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0020] Figure 1 A flowchart of a fault detection and location method for photovoltaic energy storage and charging equipment provided in an embodiment of the present invention is shown. This method is executed by a computer device. The computer device can be a desktop computer, laptop computer, tablet computer, smart terminal, distributed device, etc. Figure 1 As shown, the method includes the following steps: S110. Collect multi-source fault signals during the operation of the photovoltaic-storage-charging equipment, which includes a photovoltaic inverter, an energy storage converter, and a charging pile.

[0021] The multi-source fault signals include, but are not limited to, electrical and non-electrical signals such as voltage, current, temperature, vibration, power, and frequency. The sampling frequency can be set according to the signal characteristics, for example, from 1kHz to 10kHz, to ensure the capture of transient fault processes. Data acquisition modules deployed at the photovoltaic energy storage and charging equipment or in the sensor network acquire these multi-source fault signals in real time or periodically as raw data for subsequent processing.

[0022] S120. Perform wavelet transform multi-scale decomposition on the collected multi-source fault signal, use hierarchical adaptive threshold to denoise the wavelet coefficients at each scale, and multiply the denoising threshold of the first-level detail coefficients by the down-adjustment coefficient to reconstruct the denoised signal; use the preset signal quality evaluation index of the denoised signal as the judgment basis, adjust the down-adjustment coefficient through a feedback iteration mechanism until the index meets the preset requirements, and then extract time domain, frequency domain and time-frequency domain features from the denoised signal to construct the target fault feature vector.

[0023] The purpose of feature extraction and preprocessing is to suppress noise interference, highlight the essential characteristics of the fault, and convert the original signal into a numerical feature vector. Preprocessing may include signal denoising (such as wavelet transform, filtering, etc.), feature extraction (such as time-domain statistics, frequency-domain energy, time-frequency domain entropy, etc.), and normalization, dimensionality reduction, and other operations. Through this series of processes, a set of compact vectors that can characterize the operating state of the equipment is obtained, called the target fault feature vector, which is used for subsequent matching and inference. The specific implementation of this step will be described in detail in subsequent embodiments.

[0024] S130. Calculate the comprehensive matching degree between the target fault feature vector and each fault template in the preset fault mode library.

[0025] The preset fault mode library is pre-built before or during system operation. It stores multiple fault templates, each corresponding to a known fault type and associated with a feature vector or statistical feature of that fault type. The comprehensive matching degree measures the similarity between the current target fault feature vector and each fault template. The comprehensive matching degree can be calculated using various similarity metrics, such as cosine similarity, Euclidean distance, Mahalanobis distance, or a weighted combination thereof. In this embodiment, a higher comprehensive matching degree indicates a greater similarity between the target fault feature vector and the fault template.

[0026] In the initialization phase, initial templates can be constructed based on typical fault samples annotated by experts. Simultaneously, unlabeled historical fault data is subjected to K-means unsupervised clustering, with the cluster centers serving as supplementary templates. This enables rapid construction of the pattern library and reduces reliance on manual annotation. During system operation, incremental updates to the pattern library are supported: when a new fault type appears on-site and is manually confirmed, the feature vector of the new fault can be added to the pattern library as a new template. Adding new templates does not affect the matching logic of existing templates, and template parameters can be optimized through periodic retraining to ensure long-term matching accuracy.

[0027] S140. If the highest comprehensive matching degree is greater than or equal to the first preset threshold, then the target fault feature vector is determined to be the fault type corresponding to the matching fault template.

[0028] The first preset threshold is a pre-set value used to control the strictness of the judgment. This threshold can be adjusted according to the actual application scenario, for example, set to 0.85. When the highest comprehensive matching degree reaches or exceeds the first preset threshold, it is considered that the current target fault feature vector is highly matched with the corresponding fault template, thereby determining that the target fault feature vector is the fault type associated with the matched fault template, and outputting the fault type.

[0029] S150. If all comprehensive matching degrees are lower than the first preset threshold, it is determined to be an unknown fault mode. The target fault feature vector is then stored in the corresponding matched unknown fault mode cluster in the temporary sample library or a new corresponding unknown fault mode cluster is created. When the sample count of the unknown fault mode cluster corresponding to the target fault feature vector reaches the preset incremental threshold, cluster analysis is performed on all fault feature vectors contained in the corresponding unknown fault mode cluster, and the clustering result is added to the fault mode library as a new fault template. The corresponding unknown fault mode cluster is then deleted from the temporary sample library.

[0030] Specifically, when all comprehensive matching degrees are below a first preset threshold, it indicates that the current target fault feature vector cannot match any fault template in the preset fault mode library, and is therefore determined to be an unknown fault mode. To subsequently learn these new faults, the system stores the target fault feature vector in a temporary sample library. The temporary sample library contains at least one unknown fault mode cluster, and each unknown fault mode cluster is associated with a cluster feature vector (e.g., the mean of all fault feature vectors within the cluster) and a sample count. For each stored target fault feature vector, the system determines whether to assign the target fault feature vector to an existing unknown fault mode cluster or create a new unknown fault mode cluster based on the similarity (e.g., cosine similarity) between the target fault feature vector and the cluster feature vectors of each existing unknown fault mode cluster in the temporary sample library. Specifically, if the similarity between the target fault feature vector and the cluster feature vector of an existing unknown fault mode cluster reaches a preset merging condition (e.g., greater than or equal to a third preset threshold), the target fault feature vector is merged into the existing unknown fault mode cluster, and the cluster feature vector and sample count of the unknown fault mode cluster are updated. Otherwise, a new unknown fault mode cluster is created using the target fault feature vector as the first sample, and the cluster feature vector and sample count of the unknown fault mode cluster are initialized. When the sample count of any unknown fault mode cluster reaches a preset incremental threshold (e.g., 50), the system performs cluster analysis (e.g., K-means clustering) on ​​all fault feature vectors contained in the unknown fault mode cluster, and adds the clustering results (e.g., cluster centers) as new fault templates to the preset fault mode library, thereby converting the unknown fault into a known fault type for subsequent matching. After addition, the unknown fault mode cluster is deleted from the temporary sample library to free up storage space and avoid duplicate processing.

[0031] S160. Establish a device topology model, which describes the electrical connection relationship between the photovoltaic inverter, energy storage converter and charging pile; and calculate the posterior probability that each device in the photovoltaic inverter, energy storage converter and charging pile is a fault source based on the fault type and the corresponding target fault feature vector using Bayesian inference.

[0032] The equipment topology model describes the physical and electrical connections between the photovoltaic inverter, energy storage converter, and charging pile using a graph structure, including electrical connection lengths and connection types (such as cables and busbars). This equipment topology model provides spatial constraints and signal propagation path information for fault location. Bayesian inference uses the prior fault probability (e.g., the probability of each device failing based on historical fault statistics) and likelihood probability (i.e., the probability of observing the target fault feature vector given the current fault type and the target fault feature vector) of each device to calculate the posterior probability that each device is the true fault source. For known fault types, the likelihood probability can be obtained by normalizing the comprehensive matching degree; for unknown fault modes, the likelihood probability can be calculated based on the degree to which the target fault feature vector deviates from the normal operating feature distribution of the corresponding device; the greater the deviation, the higher the likelihood probability. Finally, the posterior probability of each device being the fault source is obtained for use in location decision-making.

[0033] S170. If the maximum posterior probability is greater than or equal to the second preset threshold, the corresponding device is output as the fault location result; otherwise, backtracking is performed based on topological distance and signal propagation delay, and the resulting set of candidate fault source devices is output as the fault location result.

[0034] The second preset threshold is a pre-defined value (e.g., 0.7) used to determine the reliability of the Bayesian inference results. If the posterior probability of a device reaches or exceeds the second preset threshold, the device is considered a reliable fault source, and the corresponding device is output as the fault location result. If the posterior probabilities of all devices are lower than the second preset threshold, it indicates that the confidence of relying solely on probabilistic inference is insufficient, and the system switches to backtracking location mode. The backtracking location method uses the arrival time of the fault signal detected at each monitoring point, combined with the electrical connection length between devices in the device topology model and the preset propagation speed, to calculate the theoretical arrival time of the fault signal from each possible fault source to each monitoring point. The device with the highest match between the theoretical arrival time and the actual arrival time is identified as a candidate fault source, and each candidate fault source is sorted from high to low match degree to obtain a set of candidate fault source devices arranged in descending order of match degree. This set of candidate fault source devices is output as the fault location result.

[0035] In summary, the method provided in this embodiment can obtain target fault feature vectors through feature extraction and preprocessing, and perform comprehensive matching with fault templates in a preset fault mode library to accurately identify known fault types. When the matching degree is lower than a first preset threshold, it is automatically determined to be an unknown fault mode, and a temporary sample library is used to cluster and manage the unknown fault feature vectors. When the sample count reaches a preset incremental threshold, a new fault template is generated and the fault mode library is updated, realizing adaptive expansion learning of fault types. In terms of fault localization, this method combines the device topology model and Bayesian inference to calculate the posterior probability of each device as a fault source. When the maximum posterior probability reaches a second preset threshold, the corresponding device is directly output; otherwise, it switches to backtracking localization based on topological distance and signal propagation delay, outputting a set of candidate fault source devices, thus providing reliable localization results even when prior information is insufficient. Therefore, the method provided in this embodiment significantly improves the accuracy, adaptability, and localization robustness of fault diagnosis in optical storage and charging systems.

[0036] In one embodiment, constructing the target fault feature vector includes: S1110. For multiple scale layers obtained by wavelet decomposition, estimate the noise standard deviation of each scale layer based on the median absolute deviation of the detail coefficients of each scale layer, and generate a denoising threshold for each scale layer based on the noise standard deviation; wherein, the denoising threshold of the first layer detail coefficients obtained by decomposition is multiplied by a coefficient less than 1 to serve as the denoising threshold after down-adjustment of the first layer detail coefficients. S1111. Based on the adjusted denoising thresholds of each scale layer, threshold processing is performed on the detail coefficients of each scale layer, and wavelet inverse transform is performed on the thresholded detail coefficients of each scale layer to obtain the denoised signal. S1112. Calculate the signal-to-noise ratio and root mean square error of the denoised signal. If at least one of the signal-to-noise ratio and root mean square error fails to meet the preset index, adjust the value of the coefficient less than 1 and repeat the threshold processing and wavelet inverse transform until both the signal-to-noise ratio and root mean square error meet the preset index. Use the denoised signal obtained when the preset index is met as the reconstructed denoised signal. S1113. Extract time-domain features, frequency-domain features, and time-frequency-domain features from the denoised signal to construct a target fault feature vector, and perform dimensionality reduction processing on the target fault feature vector to obtain a dimensionality-reduced target fault feature vector.

[0037] In this embodiment, firstly, wavelet transform multi-scale decomposition is performed on the acquired multi-source fault signals. Let the original fault signal be... The wavelet transform formula is: ,in These are the wavelet transform coefficients. This is the scale factor (which controls the frequency resolution). This is the translation factor (controlling time positioning). The wavelet mother function is used (e.g., db4 wavelet), * denotes complex conjugate, and t is the time variable. For each scale layer k obtained from the decomposition, the detail coefficients of that layer are extracted. The median absolute deviation method was used to estimate the noise standard deviation for this scale layer: Where median represents the median operation. Then, the denoising threshold for this scale layer is generated based on the noise standard deviation. , where N is the signal length. For the first layer of detail coefficients obtained from the decomposition (corresponding to the highest frequency components), in order to preserve weak fault features, their denoising threshold is multiplied by a coefficient less than 1 (e.g., 0.8), which is used as the denoising threshold after down-adjusting the first layer of detail coefficients; the thresholds for other scale layers remain unchanged.

[0038] Then, based on the adjusted denoising thresholds for each scale layer, the detail coefficients of each scale layer are thresholded. A soft thresholding function is used: Where sign is the sign function. λ represents the denoised wavelet coefficients. For the first-level detail coefficients, λ uses a down-adjusted threshold. The denoised signal is then reconstructed by performing an inverse wavelet transform on the detail coefficients and approximation coefficients of all scale levels after thresholding. The inverse wavelet transform formula is: ,in Let be the wavelet allowable constant. This is the scaled and translated wavelet function.

[0039] Then, the signal-to-noise ratio (SNR) and root mean square (RMS) error of the denoised signal are calculated. The SNR is calculated using the logarithm of the ratio of signal power to noise power, and the RMS error is calculated using the root mean square of the sum of the squares of the differences between the original signal and the denoised signal. If at least one of the SNR and RMS error fails to meet a preset target (e.g., SNR below 25 dB or RMS error greater than 0.01), the value of the coefficient less than 1 is adjusted (e.g., decreased by 0.05 each time), and the thresholding and inverse wavelet transform are repeated to recalculate the SNR and RMS error until both targets meet the preset targets. The denoised signal obtained when the preset targets are met is used as the reconstructed denoised signal.

[0040] Then, time-domain features, frequency-domain features, and time-frequency-domain features are extracted from the denoised signal to construct the target fault feature vector, and the target fault feature vector is subjected to dimensionality reduction processing to obtain the dimensionality-reduced target fault feature vector.

[0041] In one embodiment, the step of extracting time-domain features, frequency-domain features, and time-frequency-domain features from the denoised signal to construct a target fault feature vector, and performing dimensionality reduction processing on the target fault feature vector to obtain a dimensionality-reduced target fault feature vector, includes: S1120. Calculate the Pearson correlation coefficient between each extracted time-domain feature, each frequency-domain feature, and each pair of time-frequency-domain features, and delete one feature from the feature pair whose Pearson correlation coefficient is greater than the preset correlation threshold. S1121. Calculate the mutual information value between each remaining feature and the fault type label, and delete features whose mutual information value is lower than the preset mutual information threshold. S1122. Standardize the features retained after deletion to obtain a standardized fault feature vector.

[0042] In this embodiment, multi-domain features are extracted from the reconstructed denoised signal. First, the reconstructed denoised signal is discretized according to the sampling time interval to obtain an amplitude sequence containing N sampling points, where N is the total number of sampling points, and the amplitude of each sampling point is the value of the signal at that moment.

[0043] Time-domain features include mean, variance, peak value, peak-to-peak value, waveform factor, and impulse factor, each calculated as follows: Mean: Calculate the arithmetic mean of the amplitudes of all sampling points, that is, add up the amplitudes of all sampling points and divide by the total number of sampling points, reflecting the central trend of the signal.

[0044] Variance: First, calculate the difference between the amplitude and the mean at each sampling point. Then, square each difference and sum all the squared values ​​and divide by the total number of sampling points to reflect the degree of signal fluctuation.

[0045] Peak value: The maximum absolute value of the amplitude of all sampling points.

[0046] Peak-to-peak value: The difference between the maximum and minimum amplitude values ​​of all sampling points.

[0047] Waveform factor: First, calculate the average of the squares of the amplitudes of all sampling points and then take the square root (i.e., the root mean square value). Then, calculate the average of the absolute values ​​of the amplitudes of all sampling points and then divide the root mean square value by the average of the absolute values.

[0048] Pulse factor: The peak value (i.e., the maximum absolute value of the amplitude) is divided by the average absolute value of the amplitudes of all sampling points.

[0049] Frequency domain features are obtained through Discrete Fourier Transform (DFT). The DFT is performed on the amplitude sequence of the reconstructed denoised signal to obtain the spectrum. The spectrum consists of multiple frequency points, each corresponding to a complex amplitude. A sampling frequency (in Hertz) needs to be set during the transform, and the sampling frequency determines the interval between frequency points. Specifically, after calculating the complex amplitude at each frequency point, the following frequency domain features can be obtained: Spectral energy: The total energy of the spectrum is obtained by summing the squares of the magnitudes of the complex amplitudes at all frequency points, which reflects the energy distribution of the signal in the frequency domain.

[0050] Centroid frequency: First, calculate the frequency value of each frequency point (this frequency value is equal to the frequency point number multiplied by the sampling frequency and divided by the total number of sampling points). Then, multiply the frequency value of each frequency point by the square of its amplitude magnitude and sum them up. Finally, divide by the above spectral energy to obtain the centroid frequency, which reflects the center position of the signal spectrum.

[0051] Time-frequency domain features, including wavelet energy entropy and wavelet singular entropy, are used to characterize the energy distribution of a signal in the time-frequency domain. The extracted time-domain, frequency-domain, and time-frequency domain features together constitute the initial fault feature vector.

[0052] Calculate the Pearson correlation coefficient between each extracted time-domain feature, frequency-domain feature, and time-frequency-domain feature pairwise. The Pearson correlation coefficient measures the degree of linear correlation between two features; the closer its absolute value is to 1, the stronger the correlation. A preset correlation threshold (e.g., 0.9) is used. If the correlation coefficient between two features is greater than this threshold, the two features are considered highly redundant. In this case, only one is retained (e.g., the one more strongly correlated with the fault type label), and the other is deleted. After iterating through all feature pairs, the redundant feature set is obtained.

[0053] For each feature retained after redundancy removal, calculate its mutual information value with the fault type label. The mutual information value measures the statistical dependence between the feature and the fault type; a higher value indicates that the feature is more useful in distinguishing fault types. A preset mutual information threshold (e.g., 0.1) is used to delete features with mutual information values ​​below this threshold. After filtering, only features with high contribution are retained (e.g., the top 20 features with the highest contribution).

[0054] Because different features have different dimensions and orders of magnitude (e.g., the range of the mean is much smaller than the range of the variance), directly using the original feature values ​​for subsequent analysis would introduce bias. Therefore, each retained feature is standardized: for each feature, first calculate the mean and standard deviation of that feature across all historical samples, then subtract the mean from each sample value of that feature, and then divide by its standard deviation. After standardization, each feature has a mean of 0 and a variance of 1. For the current fault sample to be processed, the same standardization transformation is performed using the mean and standard deviation obtained from historical samples. All standardized features constitute the standardized fault feature vector.

[0055] Principal component analysis (PCA) is used to reduce the dimensionality of standardized fault feature vectors. The specific process is as follows: First, the covariance matrix of all standardized feature vectors is calculated, reflecting the correlation between features. Then, eigenvalue decomposition is performed on the covariance matrix to obtain a set of eigenvalues ​​and corresponding eigenvectors. Each eigenvalue represents the variance of the corresponding principal component; the larger the eigenvalue, the more information the principal component carries. The variance contribution rate of each principal component is calculated (i.e., the eigenvalue of the principal component divided by the sum of all eigenvalues), and the cumulative variance contribution rate is also calculated. A target value for the cumulative variance contribution rate is preset (e.g., 95%). The top k principal components with the smallest cumulative variance contribution rates are selected such that the cumulative variance contribution rates of these k principal components reach or exceed the target value. The eigenvectors corresponding to these top k principal components are used to form a projection matrix. The original standardized feature vectors are multiplied by this projection matrix to obtain the dimensionality-reduced target fault feature vector (i.e., the initial dimensionality reduction result).

[0056] To ensure good clustering separability of the dimensionality-reduced feature vectors, a silhouette coefficient is introduced as an evaluation metric. The silhouette coefficient measures the quality of clustering. For each sample, first, the average distance (e.g., Euclidean distance) between it and all other samples within its cluster is calculated, denoted as the intra-cluster average distance. Then, the average distances between it and all samples in each of the other clusters are calculated, and the minimum of these is denoted as the nearest disjoint cluster average distance. The silhouette coefficient of this sample equals the nearest disjoint cluster average distance minus the intra-cluster average distance, divided by the larger of these two distances. The final overall silhouette coefficient is the average of the silhouette coefficients of all samples. The silhouette coefficient ranges from -1 to 1; a value closer to 1 indicates better clustering. A preset silhouette coefficient threshold (e.g., 0.7) is used. If the silhouette coefficient of the current dimensionality-reduced feature vector is lower than this threshold, it indicates that the currently selected number of principal components, k, has failed to achieve good clustering separability. At this point, adjust the target value of the cumulative variance contribution rate (e.g., from 95% to 96% or 94%), or directly search around the k value (e.g., k±1, k±2), re-perform principal component analysis and calculate the silhouette coefficient until the silhouette coefficient reaches or exceeds the preset threshold. The resulting dimensionality-reduced feature vector is the final target fault feature vector used for subsequent comprehensive matching degree calculation and fault clustering.

[0057] In one embodiment, for scenarios involving updates to the fault mode library or the addition of new devices, the aforementioned dimensionality reduction process employs an online incremental PCA (principal component analysis) update mechanism. When the number of new samples is small (e.g., less than 100), the incremental SVD algorithm is used. Based on the original PCA transformation matrix, only the covariance matrix and eigenvectors are updated using the new samples, eliminating the need for full retraining of all historical data, thereby reducing computational overhead. When the number of new samples reaches a preset threshold (e.g., 1000) or the addition of new devices causes a significant change in the data distribution, full retraining is triggered to recalculate the covariance matrix and principal components, ensuring the stability of the dimensionality reduction effect.

[0058] In one embodiment, the comprehensive matching degree between the target fault feature vector and each fault template in the preset fault mode library is calculated by weighted summation of cosine similarity and Euclidean distance, wherein the weights of cosine similarity and Euclidean distance are preset constants.

[0059] In this embodiment, a preset fault mode library stores multiple fault templates. Each fault template corresponds to a known fault type (e.g., insulation fault, over-temperature fault, over-current fault, harmonic fault, etc.) and is associated with a standard feature vector or cluster center for that fault type. For the target fault feature vector to be identified (e.g., the feature vector after the aforementioned dimensionality reduction processing), it is necessary to calculate its comprehensive matching degree with each fault template in the mode library to determine the matched fault type.

[0060] The overall matching degree is calculated using a dual-index weighted fusion strategy. First, the cosine similarity between the target fault feature vector and the fault template is calculated. Cosine similarity measures the similarity in direction by calculating the cosine of the angle between the two vectors, with a value ranging from [-1, 1], where a larger value indicates greater similarity. Second, the Euclidean distance between the target fault feature vector and the fault template is calculated. Euclidean distance measures the absolute distance between two vectors in space, with a smaller value indicating closer proximity. Since cosine similarity and Euclidean distance have different dimensions and numerical ranges, in actual calculation, the Euclidean distance is first normalized, mapping it to the [0, 1] interval (e.g., using maximum distance normalization or 1 / (1+d) transformation), so that a larger normalized Euclidean distance value indicates greater proximity, thus aligning with the direction of cosine similarity.

[0061] Then, the normalized Euclidean distance and cosine similarity are weighted and summed to obtain the overall matching degree. The weights of both cosine similarity and Euclidean distance are preset constants, and their sum is 1. Typically, the weight of cosine similarity is set to 0.6, and the weight of Euclidean distance is set to 0.4 to highlight the advantage of cosine similarity in direction matching, while also taking into account the sensitivity of Euclidean distance to amplitude differences. The formula for calculating the overall matching degree can be expressed as: Overall matching degree = 0.6 × cosine similarity + 0.4 × normalized Euclidean distance. The calculated overall matching degree ranges from [0,1], with a larger value indicating a better match between the target fault feature vector and the fault template.

[0062] For example, for a target fault feature vector, its cosine similarity with the "insulation fault" template in the fault mode library is calculated to be 0.92, and its normalized Euclidean distance is 0.88, so the overall matching degree is 0.6 × 0.92 + 0.4 × 0.88 = 0.904; its cosine similarity with the "overcurrent fault" template is 0.65, and its normalized Euclidean distance is 0.60, so the overall matching degree is 0.6 × 0.65 + 0.4 × 0.60 = 0.63. Therefore, the target fault feature vector has a higher overall matching degree with the "insulation fault" template. The fault type will then be determined based on the comparison between this matching degree and a first preset threshold (e.g., 0.85).

[0063] The weighted fusion method described above takes into account both the directional consistency and amplitude similarity of feature vectors. Compared with a single similarity measure, it has stronger robustness and can effectively reduce the impact of noise and feature dimension differences on the matching results, thereby improving the accuracy of fault mode recognition.

[0064] In one embodiment, the step of storing the target fault feature vector into a corresponding matching unknown fault mode cluster in a temporary sample library or creating a new corresponding unknown fault mode cluster includes: S1130. Match the target fault feature vector with the cosine similarity of the cluster feature vector of each existing unknown fault mode cluster in the temporary sample library. S1131. If the calculated maximum cosine similarity is greater than or equal to the third preset threshold, the target fault feature vector is assigned to the corresponding unknown fault mode cluster, and the cluster feature vector and sample count of the corresponding unknown fault mode cluster are updated. S1132. If the maximum cosine similarity is less than the third preset threshold, then a new unknown fault mode cluster is created using the target fault feature vector as the first sample, and the cluster feature vector and sample count of the unknown fault mode cluster are initialized.

[0065] In this embodiment, the temporary sample library stores one or more unknown fault mode clusters, each cluster corresponding to a new fault type not yet included in the database. Each unknown fault mode cluster is associated with a cluster feature vector, which characterizes the center position of the cluster; for example, it can be the mean of all fault feature vectors within the cluster. When the system determines that the current target fault feature vector is an unknown fault mode, it calculates the cosine similarity between the target fault feature vector and the cluster feature vector of each existing unknown fault mode cluster in the temporary sample library to measure the degree of matching between the target fault feature vector and each unknown fault mode cluster. If there exists an unknown fault mode cluster whose cluster feature vector has a cosine similarity with the target fault feature vector that reaches or exceeds a third preset threshold (e.g., 0.7), then the target fault feature vector is determined to belong to that unknown fault mode cluster. At this time, the target fault feature vector is added to the cluster, and the cluster feature vector of the cluster is updated (e.g., the mean of all feature vectors within the cluster is recalculated) and the sample count is incremented by 1. If the cosine similarity between all existing unknown fault mode clusters and the target fault feature vector is lower than the third preset threshold, it indicates that the target fault feature vector does not belong to any existing unknown fault mode cluster and belongs to a completely new unknown fault type. At this time, a new unknown fault mode cluster is created in the temporary sample library, and the target fault feature vector is used as the first sample of the cluster, the target fault feature vector is used as the initial cluster feature vector of the cluster, and the sample count is initialized to 1.

[0066] Through the above steps, the system can dynamically cluster and manage continuously occurring unknown fault samples, grouping similar samples into the same unknown fault pattern cluster. When the sample count of a certain unknown fault pattern cluster reaches a preset incremental threshold (e.g., 50 samples), subsequent clustering analysis and pattern library update operations can be triggered, realizing adaptive incremental learning of fault types.

[0067] In one embodiment, when performing cluster analysis on all fault feature vectors contained within an unknown fault mode cluster, an automatic K-value optimization mechanism based on silhouette coefficient and elbow rule is adopted. Specifically, each K-value is traversed within a preset range (e.g., 2 to 10), K-means clustering is performed, and the silhouette coefficient and sum of squared errors (SSE) are calculated. The K-value with the highest silhouette coefficient and the appearance of an "elbow" inflection point on the SSE curve is selected as the optimal number of clusters; if the two are inconsistent, the K-value with the higher silhouette coefficient is preferred to ensure the distinguishability of fault modes. K-value optimization is automatically performed each time the system runs to adapt to changes in the distribution of fault data at different times.

[0068] In one embodiment, an outlier cluster detection mechanism is also introduced. After clustering, the average distance from each sample within a cluster to the cluster center is calculated. If the average distance of a cluster is significantly higher than that of other clusters (e.g., more than twice the standard deviation), it is identified as a potential outlier cluster. For samples within an outlier cluster, the matching degree between them and all templates in a preset fault mode library is calculated. If the matching degree is lower than a preset threshold (e.g., 0.7), they are marked as unknown fault modes. When the cumulative number of samples of the same unknown fault mode reaches a preset incremental threshold (e.g., 50), a new fault template is automatically generated and the mode library is updated, realizing incremental learning and expansion of fault modes.

[0069] In one embodiment, the step of using Bayesian inference to calculate the posterior probability that each device in the photovoltaic inverter, energy storage converter, and charging pile is a fault source includes: S1140. Set the prior probability of each device based on the historical failure rate statistics of each device in the optical storage and charging equipment, and dynamically update the prior probability. S1141. For a known fault type, calculate the likelihood probability of the target fault feature vector appearing under the corresponding equipment fault condition based on the normalization of the comprehensive matching degree. S1142. For an unknown fault mode, calculate the likelihood probability of the target fault feature vector occurring under the corresponding equipment fault condition based on the degree to which the target fault feature vector deviates from the distribution of the corresponding normal operating characteristics of the equipment. The greater the degree of deviation, the higher the likelihood probability. S1143. Based on the prior probability and the likelihood probability, calculate the posterior probability that each device is a fault source using Bayes' theorem.

[0070] In this embodiment, the prior probability of each device is obtained based on its historical operating data and reliability indicators. For example, the statistical probability of failure can be calculated based on the mean time between failures (MTBF) of each device. For newly commissioned devices, initial values ​​can be assigned based on factors such as device type, years of operation, and environmental conditions. During system operation, the prior probabilities of each device are dynamically updated according to the actual failure scenarios, making the calculation of the posterior probability more consistent with the actual operating state of the device. When the failure type has been included in the pattern library (i.e., the failure type is known), the comprehensive matching degree between the target failure feature vector and the corresponding failure template of the device is directly calculated, and then the comprehensive matching degree is normalized, with the normalized value used as the likelihood probability. Normalization methods include directly using the comprehensive matching degree (range 0~1) as the likelihood probability, or normalizing the matching degrees of multiple candidate devices so that the sum is 1. The likelihood probability reflects the probability of observing the current target failure feature vector under the condition that the device has failed. When the failure type is an unknown failure mode (i.e., there is no corresponding template in the pattern library), the likelihood probability is calculated based on the statistical characteristics of the feature distribution. Specifically, the feature distribution range of each device under normal operating conditions is obtained (e.g., by constructing confidence intervals or statistical models using historical normal samples). If the target fault feature vector falls within the confidence interval of the device's normal operating feature distribution, it indicates that the current feature is close to the normal state, and its likelihood probability is set to a lower value; if the target fault feature vector deviates significantly from the normal distribution, it indicates that the device is highly likely to fail, and its likelihood probability is set to a higher value. In this way, even if there is no corresponding fault template in the pattern library, the system can still assess the probability of each device failing based on the degree of feature deviation. For each device, its prior probability is multiplied by its corresponding likelihood probability to obtain the joint probability of the device; then, the joint probability of each device is divided by the sum of the joint probabilities of all devices to obtain the posterior probability that the device is the source of the fault. The posterior probability ranges from 0 to 1, and the sum of the posterior probabilities of all devices is 1. The higher the posterior probability, the greater the probability that the device is the true source of the fault. The calculated posterior probability will be used for subsequent fault location decisions.

[0071] In one embodiment, the step of backtracking based on topological distance and signal propagation delay includes: S1150. Obtain the arrival time of the fault signal detected at each monitoring point, and calculate the theoretical arrival time of the fault signal from each possible fault source to each monitoring point based on the electrical connection length between each device in the device topology model and the preset propagation speed. S1151. The device with the highest matching degree between theoretical arrival time and actual arrival time is identified as a candidate fault source, and each candidate fault source is sorted from high to low according to the matching degree to obtain a set of candidate fault source devices arranged in descending order of matching degree.

[0072] In this embodiment, the device topology model describes the electrical connections between the photovoltaic inverter, energy storage converter, and charging pile, including the electrical connection lengths and connection types (e.g., cables, busbars, etc.). For each possible fault source device (e.g., each device node in the topology model), the theoretical arrival time of the fault signal from the fault source to each monitoring point is calculated based on the path length from the fault source to each monitoring point in the topology model and the preset signal propagation speed. The propagation delay is calculated as follows: Theoretical arrival time = Path length / Propagation speed. If there are multiple connection segments in the path, the propagation delays of each segment are summed. For each possible fault source device, its calculated theoretical arrival time is compared with the actual arrival time of the fault signal detected by each monitoring point. The closer the theoretical arrival time is to the actual arrival time, the greater the likelihood that the device is the true fault source. The system calculates the matching degree between the theoretical arrival time and the actual arrival time of each possible fault source (e.g., quantified by the absolute value of the time difference or the squared error), and identifies the device with the highest matching degree as a candidate fault source. Simultaneously, all possible fault sources are sorted from high to low matching degree, resulting in a set of candidate fault source devices arranged in descending order of matching degree. This set serves as the output of the backtracking localization, providing a reference for maintenance personnel or for further analysis. Compared to posterior probability localization based on Bayesian inference, backtracking localization does not rely on prior fault probabilities and fault mode libraries, and can still provide effective localization references when the fault mode is unknown or prior information is insufficient.

[0073] In one embodiment, the method further includes: S1160. According to the preset injection cycle, inject test signals into each segment of electrical connection lines in the device topology model, measure the actual propagation time of the test signals in each segment path, calculate and update the propagation speed of each segment path based on the actual propagation time, and compensate and adjust the propagation speed according to the current ambient temperature.

[0074] In this embodiment, during the system initialization phase, an initial propagation speed is preset based on the medium type (e.g., cable, busbar, etc.) of each electrical connection segment, and the theoretical propagation delay is calculated based on the equipment topology length. To ensure the accuracy of fault location and prevent propagation speed deviations caused by factors such as line aging and environmental changes from affecting location accuracy, the system is calibrated periodically according to a preset injection cycle (e.g., weekly or monthly). During each calibration cycle, the system actively injects test signals into each electrical connection segment and measures the actual propagation time of the test signal on that path. Based on the measured actual propagation time and the known length of the path, the current actual propagation speed is calculated, and the propagation speed parameters of the corresponding edge segment in the equipment topology model are updated. Furthermore, considering that changes in ambient temperature can affect the propagation speed of signals in the medium (e.g., the signal propagation speed in a cable may decrease when the temperature rises), the system also obtains the current ambient temperature and adjusts the propagation speed according to a preset temperature compensation rule to eliminate measurement errors caused by temperature changes. Specifically, the reference propagation speed and corresponding reference temperature of the medium (e.g., copper core cable or aluminum core cable) used in each electrical connection segment can be obtained in advance. Since the propagation speed of a signal in a conductor decreases as the ambient temperature rises and increases as the ambient temperature falls, during actual positioning, a temperature sensor collects the current ambient temperature and compares it with a reference temperature. If the current temperature is higher than the reference temperature, the propagation speed of that section of the line is appropriately reduced according to a preset ratio; if the current temperature is lower than the reference temperature, the propagation speed of that section of the line is appropriately increased according to a preset ratio. The preset ratio can be obtained through experimental calibration based on the temperature characteristics of the cable material, for example, by pre-measuring the actual propagation speed at multiple different temperature points and fitting a linear or piecewise linear relationship between temperature and speed. During actual positioning, the updated propagation speed is substituted into the device topology model to calculate the theoretical arrival time of the fault signal from the candidate fault source to each monitoring point. Furthermore, the current ambient temperature can be recorded synchronously each time a test signal is injected for calibration, and the measured actual propagation speed can be converted to a unified reference temperature for storage, or the current temperature can be directly used for real-time compensation when calculating the propagation speed. Through the above-mentioned periodic calibration and temperature compensation mechanism, the propagation delay parameter in the device topology model can maintain high accuracy, thereby effectively improving the backtracking positioning accuracy based on topological distance and signal propagation delay.

[0075] Figure 2 The diagram shows a structural schematic of a computer device provided in an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.

[0076] like Figure 2As shown, the computer device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0077] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements, such as clients or other servers. The processor 402 executes program 410, specifically performing the relevant steps described in the embodiment of the method for fault detection and location of optical storage and charging equipment.

[0078] Specifically, program 410 may include program code, which includes computer-executable instructions.

[0079] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0080] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0081] Specifically, program 410 can be called by processor 402 to enable computer equipment to perform the relevant steps in the embodiment of the optical storage and charging equipment fault detection and location method.

[0082] This invention provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a computer device, the computer device performs the optical storage and charging device fault detection and location method described in any of the above method embodiments.

[0083] This invention provides a computer program that can be called by a processor to enable a computer device to execute the optical storage and charging device fault detection and location method in any of the above method embodiments.

[0084] This invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed on a computer, cause the computer to perform the optical storage and charging device fault detection and location method described in any of the above method embodiments.

[0085] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0086] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0087] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0088] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0089] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A method for fault detection and location in photovoltaic energy storage and charging equipment, characterized in that, include: Collect multi-source fault signals during the operation of the photovoltaic-storage-charging equipment, which includes a photovoltaic inverter, an energy storage converter, and a charging pile; The collected multi-source fault signals are decomposed by wavelet transform at multiple scales. The wavelet coefficients at each scale are denoised using a hierarchical adaptive threshold. The denoising threshold of the first-level detail coefficients is multiplied by a down-adjustment coefficient to reconstruct the denoised signal. The down-adjustment coefficient is adjusted by a feedback iteration mechanism based on a preset signal quality evaluation index of the denoised signal until the index meets the preset requirements. Then, time-domain, frequency-domain, and time-frequency-domain features are extracted from the denoised signal to construct the target fault feature vector. Calculate the overall matching degree between the target fault feature vector and each fault template in the preset fault mode library; If the highest overall matching degree is greater than or equal to the first preset threshold, then the target fault feature vector is determined to be the fault type corresponding to the matching fault template; If all comprehensive matching degrees are lower than the first preset threshold, it is determined to be an unknown fault mode; and the target fault feature vector is stored in the corresponding matched unknown fault mode cluster in the temporary sample library or a new corresponding unknown fault mode cluster is created; when the sample count of the unknown fault mode cluster corresponding to the target fault feature vector reaches the preset incremental threshold, cluster analysis is performed on all fault feature vectors contained in the corresponding unknown fault mode cluster, and the clustering result is added to the fault mode library as a new fault template, and the corresponding unknown fault mode cluster is deleted from the temporary sample library; A device topology model is established, which describes the electrical connection relationship between the photovoltaic inverter, the energy storage converter, and the charging pile; and based on the fault type and the corresponding target fault feature vector, Bayesian inference is used to calculate the posterior probability that each device in the photovoltaic inverter, the energy storage converter, and the charging pile is a fault source. If the maximum posterior probability is greater than or equal to the second preset threshold, the corresponding device will be output as the fault location result; otherwise, backtracking will be performed based on topological distance and signal propagation delay, and the resulting set of candidate fault source devices will be output as the fault location result.

2. The method according to claim 1, characterized in that, The construction of the target fault feature vector includes: For multiple scale layers obtained by wavelet decomposition, the noise standard deviation of each scale layer is estimated based on the median absolute deviation of the detail coefficients of each scale layer, and a denoising threshold for each scale layer is generated based on the noise standard deviation; wherein, the denoising threshold of the first layer detail coefficients obtained by decomposition is multiplied by a coefficient less than 1 to serve as the denoising threshold after down-adjustment of the first layer detail coefficients. Based on the adjusted denoising thresholds for each scale layer, the detail coefficients of each scale layer are thresholded, and the thresholded detail coefficients of each scale layer are subjected to wavelet inverse transform to obtain the denoised signal. Calculate the signal-to-noise ratio (SNR) and root mean square error (RMSE) of the denoised signal. If at least one of the SNR and RMSE fails to meet the preset target, adjust the value of the coefficient less than 1 and repeat the threshold processing and wavelet inverse transform until both the SNR and RMSE meet the preset target. Use the denoised signal obtained when the preset target is met as the reconstructed denoised signal. Time-domain features, frequency-domain features, and time-frequency-domain features are extracted from the denoised signal to construct a target fault feature vector. The target fault feature vector is then subjected to dimensionality reduction processing to obtain the dimensionality-reduced target fault feature vector.

3. The method according to claim 2, characterized in that, The steps of extracting time-domain features, frequency-domain features, and time-frequency-domain features from the denoised signal, constructing a target fault feature vector, and performing dimensionality reduction processing on the target fault feature vector to obtain a dimensionality-reduced target fault feature vector include: Calculate the Pearson correlation coefficient between each extracted time-domain feature, each frequency-domain feature, and each pair of time-frequency-domain features, and delete one feature from the feature pair whose Pearson correlation coefficient is greater than the preset correlation threshold; Calculate the mutual information value between each remaining feature and the fault type label, and delete features whose mutual information value is lower than a preset mutual information threshold; The features retained after deletion are standardized to obtain a standardized fault feature vector. Principal component analysis is used to reduce the dimensionality of the standardized fault feature vector. Principal components are selected according to the cumulative variance contribution rate reaching a preset percentage to obtain the initial dimensionality-reduced target fault feature vector. Calculate the contour coefficient of the initial dimensionality-reduced target fault feature vector. If the contour coefficient is lower than a preset contour coefficient threshold, adjust the value of the preset percentage and perform principal component analysis again until the contour coefficient reaches the preset contour coefficient threshold to obtain the dimensionality-reduced target fault feature vector.

4. The method according to claim 1, characterized in that, The comprehensive matching degree between the target fault feature vector and each fault template in the preset fault mode library is calculated by weighted summation of cosine similarity and Euclidean distance, where the weights of cosine similarity and Euclidean distance are preset constants.

5. The method according to claim 1, characterized in that, The step of storing the target fault feature vector into the corresponding matching unknown fault mode cluster in the temporary sample library or creating a new corresponding unknown fault mode cluster includes: The target fault feature vector is matched with the cosine similarity of the cluster feature vectors of each existing unknown fault mode cluster in the temporary sample library. If the calculated maximum cosine similarity is greater than or equal to the third preset threshold, the target fault feature vector is assigned to the corresponding unknown fault mode cluster, and the cluster feature vector and sample count of the corresponding unknown fault mode cluster are updated. If the maximum cosine similarity is less than the third preset threshold, then a new unknown fault mode cluster is created using the target fault feature vector as the first sample, and the cluster feature vector and sample count of the unknown fault mode cluster are initialized.

6. The method according to claim 1, characterized in that, The step of calculating the posterior probability that each device in the photovoltaic inverter, energy storage converter, and charging pile is a fault source using Bayesian inference includes: The prior probability of each device is set based on the historical failure rate statistics of each device in the optical storage and charging equipment, and the prior probability is dynamically updated. For a known fault type, the likelihood probability of the target fault feature vector appearing under the corresponding equipment fault condition is calculated based on the normalization of the comprehensive matching degree. For unknown fault modes, the likelihood probability of the target fault feature vector occurring under the corresponding equipment fault conditions is calculated based on the degree to which the target fault feature vector deviates from the distribution of the corresponding normal operating characteristics of the equipment. The greater the degree of deviation, the higher the likelihood probability. Based on the prior probability and the likelihood probability, the posterior probability of each device being a fault source is calculated using Bayes' theorem.

7. The method according to claim 1, characterized in that, The backtracking positioning steps based on topological distance and signal propagation delay include: The arrival time of the fault signal detected at each monitoring point is obtained. Based on the electrical connection length between each device in the device topology model and the preset propagation speed, the theoretical arrival time of the fault signal from each possible fault source to each monitoring point is calculated. The device with the highest match between theoretical arrival time and actual arrival time is identified as a candidate fault source. The candidate fault sources are then sorted from highest to lowest match degree to obtain a set of candidate fault source devices arranged in descending order of match degree.

8. The method according to claim 7, characterized in that, The method further includes: According to the preset injection cycle, test signals are injected into each electrical connection line in the device topology model, the actual propagation time of the test signal in each path is measured, the propagation speed of each path is calculated and updated based on the actual propagation time, and the propagation speed is compensated and adjusted according to the current ambient temperature.

9. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation of the optical storage and charging equipment fault detection and location method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the optical storage and charging device fault detection and location method as described in any one of claims 1-8.