A photovoltaic power generation distribution cabinet leakage protection method and system
Patent Information
- Application Number
- CN202611155588.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-09
AI Technical Summary
[0006]一种光伏发电配电柜漏电保护方法及系统,以解决现有技术中无法通过盲区漏电累积特征与相电电流变化率的联合分析实现故障预判和提前保护的问题
(1)本发明通过对盲区漏电序列在预设滑动时间窗口内进行连续积分运算得到电流累积值,捕获传统固定阈值无法识别的隐性漏电累积风险,解决了现有技术仅依赖单点幅值阈值触发、无法感知绝缘渐进劣化的问题。
Smart Images

Figure CN122890280A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid industry, and in particular to a method and system for leakage protection of photovoltaic power generation distribution cabinet. Background Technology
[0002] As an important component of the smart grid industry, photovoltaic power generation's power distribution safety is directly related to the stable operation of the power grid and the protection level of electrical equipment.
[0003] During long-term operation, photovoltaic power distribution systems generate continuous, minute leakage currents due to environmental corrosion, insulation aging, and other factors. In existing technology, a smart meter and appliance identification solution (CN201711020336.4) discloses a method. This method involves installing a smart meter in the power circuit to collect current and voltage signals at a preset sampling frequency. The collected current and voltage signals are then subjected to a Fast Fourier Transform (FFT) to extract current and voltage spectral feature vectors. These extracted spectral feature vectors are then compared with the reference spectral feature vectors of various appliances pre-stored in a database. Based on the comparison results, the type of appliance currently operating in the circuit is identified, and the power consumption time and power consumption data of each appliance are recorded, thereby achieving statistical analysis of power consumption behavior.
[0004] However, the aforementioned solutions are limited by fixed threshold triggering logic. In scenarios where the amplitude of the single-time leakage current in the blind zone is below the threshold but accumulates continuously over time, they cannot capture the gradual process of insulation degradation. Simultaneously, the phase current exhibits abnormal rates of change during fault evolution. When this rate of change approaches the critical short-circuit characteristic, performing a circuit breaker operation under these critical conditions can cause arcing and damage to secondary equipment. Existing technologies lack the ability to jointly analyze the coupling relationship between blind zone leakage current accumulation and the phase current change rate. Furthermore, during the operation of photovoltaic distribution cabinets, there is a deep coupling relationship between blind zone leakage current accumulation and abnormal phase current change rate. A single indicator cannot accurately reflect the true fault risk, leading to the loss of optimal intervention opportunities before the fault worsens, resulting in frequent false alarms and missed alarms.
[0005] In summary, existing technologies cannot achieve fault prediction and early protection through joint analysis of blind zone leakage current accumulation characteristics and phase current change rate. Summary of the Invention
[0006] A method and system for leakage protection of photovoltaic power generation distribution cabinets are proposed to solve the problem that existing technologies cannot achieve fault prediction and early protection through joint analysis of blind zone leakage accumulation characteristics and phase current change rate.
[0007] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for leakage protection of a photovoltaic power generation distribution cabinet, comprising:
[0008] Real-time leakage current data of the photovoltaic distribution cabinet circuit is acquired and preprocessed to obtain a blind zone leakage current sequence. The blind zone leakage current sequence is continuously integrated within a preset sliding time window to obtain the current accumulation value. If the accumulated current value is greater than the preset accumulated threshold, the real-time phase current sequence of the corresponding circuit is obtained and denoised and smoothed to obtain a smooth phase current sequence. The first derivative of the smooth phase current sequence is calculated to obtain the rate of change sequence. The point-by-point difference of the rate of change sequence is calculated according to the preset short-circuit critical threshold to obtain the approximation distance sequence. A pre-defined random forest model is used to jointly analyze the cumulative current value and the approximation distance sequence to obtain the associated feature vector. If the associated feature vector meets the preset fault prediction conditions, an early disconnection command is generated, and a circuit control operation is performed on the photovoltaic distribution cabinet according to the early disconnection command to disconnect the power supply connection of the corresponding circuit.
[0009] Secondly, the present invention provides a leakage current protection system for a photovoltaic power generation distribution cabinet, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the photovoltaic power generation distribution cabinet leakage current protection method as described above.
[0010] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention obtains the cumulative current value by performing continuous integration on the blind zone leakage current sequence within a preset sliding time window, thereby capturing the hidden leakage current accumulation risk that cannot be identified by traditional fixed thresholds, and solving the problem that the existing technology only relies on single-point amplitude threshold triggering and cannot detect the gradual degradation of insulation.
[0011] (2) This invention obtains the rate of change sequence by calculating the first derivative of the smooth phase current sequence and obtains the approximation distance sequence by calculating the point-by-point difference with the preset short-circuit critical threshold. This realizes the quantitative description of the degree to which the phase current approaches the short-circuit state and provides a measurable decision basis for fault prediction.
[0012] (3) This invention uses a preset random forest model to jointly analyze the current accumulation value and the approximation distance sequence, extracts the associated feature vector, and generates an early disconnection command when the preset fault prediction conditions are met. This enables the protection action to be performed before the actual occurrence of the short circuit fault, thus avoiding the arc impact and secondary equipment damage caused by the critical circuit breaking operation. Attached Figure Description
[0013] Figure 1 This is a flowchart illustrating a method for leakage protection of a photovoltaic power generation distribution cabinet, as provided in an embodiment of the present invention. Detailed Implementation
[0014] 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. It should be noted that this method runs in a continuous loop on the photovoltaic distribution cabinet controller: Step S11 continuously monitors the leakage current data of each circuit and calculates the current accumulation value. The current accumulation value is updated once at the end of each preset time window of 200ms; Step S12 judges the current accumulation value after each update. If it exceeds the threshold, the execution process of steps S13 to S15 is triggered. During the execution, the monitoring of step S11 is not interrupted; After step S15 executes the circuit disconnection, the controller marks the circuit as disconnected, and subsequent monitoring of the circuit is automatically paused until manual reset.
[0015] Reference Figure 1 The first embodiment of the present invention provides a method for leakage protection of a photovoltaic power generation distribution cabinet, comprising the following steps: S11, acquire real-time leakage data of photovoltaic distribution cabinet circuit and preprocess it to obtain blind zone leakage sequence, and perform continuous integration operation on the blind zone leakage sequence within a preset sliding time window to obtain current accumulation value; S12, if the current accumulation value is greater than the preset accumulation threshold, the real-time phase current sequence of the corresponding circuit is obtained and denoised and smoothed to obtain a smooth phase current sequence. S13, perform first derivative calculation on the smooth phase current sequence to obtain the rate of change sequence, and perform point-by-point difference calculation on the rate of change sequence according to the preset short-circuit critical threshold to obtain the approximation distance sequence. S14, A preset random forest model is used to jointly analyze the current accumulation value and the approximation distance sequence to obtain the associated feature vector; S15, if the associated feature vector satisfies the preset fault prediction conditions, an early disconnection command is generated, and a circuit control operation is performed on the photovoltaic distribution cabinet according to the early disconnection command to disconnect the power supply connection of the corresponding circuit.
[0016] In step S11, real-time leakage current data of the photovoltaic distribution cabinet circuit is acquired and preprocessed to obtain the blind zone leakage current sequence, including: The real-time leakage current data is filtered to obtain low-frequency leakage current characteristics; The low-frequency leakage current characteristics are clustered to obtain feature clusters and discrete outliers, and continuous small fluctuations within the feature clusters are extracted. If the continuous micro-fluctuations do not reach the preset conventional trigger threshold, the continuous micro-fluctuations are compared with the discrete anomalies in a time sequence to separate the blind zone leakage current sequence.
[0017] It should be noted that filtering the real-time leakage current data to obtain low-frequency leakage current characteristics aims to separate the low-frequency components reflecting insulation aging from the high-frequency sampled leakage current signal. Specifically, leakage current signals are collected by residual current transformers installed in each branch of the photovoltaic distribution cabinet. The output of the residual current transformers is amplified and filtered by a signal conditioning circuit, and then converted by an analog-to-digital converter at a sampling frequency of 1000Hz to obtain discrete real-time leakage current data with a sampling interval of 1ms.
[0018] The basis for the above 1000Hz sampling frequency is as follows: the main focus frequency band of leakage current signal is the power frequency of 50Hz and its lower harmonics. According to the Nyquist sampling theorem, the Nyquist frequency corresponding to the 1000Hz sampling frequency is 500Hz, which is sufficient to collect the 50Hz fundamental wave and its harmonic components within 10th order without distortion, while avoiding the introduction of additional hardware costs and data storage overhead due to excessively high sampling frequencies.
[0019] High-frequency harmonic interference during the inverter process of a photovoltaic system is mainly concentrated in the switching frequency and its harmonic components. A low-pass filter is used to filter the real-time leakage current data, with a cutoff frequency set to 100Hz. This filters out the high-frequency noise introduced by the inverter's switching frequency, thereby separating the low-frequency leakage current characteristics in the frequency range of 0Hz to 100Hz. The basis for this cutoff frequency is that the typical switching frequency of a photovoltaic inverter is 16kHz to 20kHz, and its harmonic components are much higher than 100Hz. Selecting a cutoff frequency of 100Hz can effectively retain the 50Hz power frequency fundamental wave and its lower harmonic components, while attenuating switching noise.
[0020] Specifically, the extracted low-frequency leakage current features are input into a density-based spatial clustering algorithm for unsupervised learning. The algorithm uses leakage current amplitude and rate of change as input features, sets the neighborhood radius to 5, and sets the minimum number of neighborhood points for the core point to 10. The output classifies normal fluctuations and regular leakage currents into feature clusters, while marking sudden large-value fluctuations as discrete outliers.
[0021] The criteria for setting the neighborhood radius and the minimum number of neighborhood points for the core point are as follows: Based on the statistical analysis of historical leakage data from 500 sets of photovoltaic distribution cabinets, when the neighborhood radius is 5, the average distance within a cluster for normal leakage fluctuations is 3.2 amplitude units, while the minimum isolation distance for anomalies is 7.8 amplitude units. Selecting a neighborhood radius of 5 can form a clear density boundary between normal fluctuations and anomalies. The criteria for setting the minimum number of neighborhood points for the core point to 10 are as follows: In the DBSCAN parameter tuning of 500 sets of data, the clustering effect was tested with minPts values of 3, 5, 10, 15, and 20. When minPts is 10, the clustering silhouette coefficient reaches its maximum value of 0.82, and the anomaly detection rate and the F1 score of manually labeled data are 0.91, indicating that this parameter achieves the optimal balance between clustering quality and anomaly identification sensitivity.
[0022] Within the feature clusters, continuous small fluctuations with amplitudes between 10mA and 25mA and durations exceeding 5s are further extracted. The 10mA amplitude lower limit is based on the fact that the effective value of the measurement noise of the residual current transformer (model CT-0.1-100A) at a sampling frequency of 1000Hz is approximately 5mA. Twice the effective noise value, 10mA, is taken as the minimum resolvable signal amplitude to avoid measurement noise being misidentified as a small leakage signal. The 5s duration is based on statistics of the duration of early small leakage events in 100 photovoltaic distribution cabinet insulation degradation experiments. The shortest duration of a real leakage event is 6.2s. Taking 5s as the duration threshold achieves a balance between detection rate and false detection rate. Shorter duration thresholds (such as 2s or 3s) will include transient interference in the candidate blind zone, while longer duration thresholds (such as 8s or 10s) will miss some early leakage events. Since the trigger threshold of conventional residual current devices is usually set at 30mA (according to the IEC61008-1 standard, the rated residual operating current of residual current devices for household and similar purposes is 30mA), these continuous small fluctuations that do not reach the preset conventional trigger threshold are easily ignored by traditional monitoring mechanisms, and therefore they are identified as candidate blind zone sequences.
[0023] It should be noted that, in order to confirm whether the candidate blind zone sequence is a real early leakage current, a dynamic time warping algorithm is used to compare the temporal correlation between the candidate blind zone sequence and the discrete anomaly. The input is the timestamp of the candidate blind zone sequence and the occurrence time of the discrete anomaly. If the time interval between the two is less than 10 seconds and the similarity score of the waveform change trend is greater than 80 points, then the two are determined to be strongly correlated, and the blind zone leakage current sequence is separated.
[0024] The 10s time interval threshold is based on statistical analysis of 100 photovoltaic distribution cabinet insulation degradation experiments. The average time interval between early minor leakage fluctuations and subsequent sudden anomalies is 8.6s, with a standard deviation of 1.2s. Selecting 10s as the threshold can cover approximately 88% of related events. The 80-point similarity score threshold (out of 100) is based on linear scaling of the regularized path distance output by the dynamic time warping algorithm to the 0-100 score range (100 points indicates two sequences are completely identical). Statistical analysis of the score distribution of 50 sets of truly related events and 50 sets of unrelated events in the experiment shows that the mean score for truly related events is 89.2 points, with a standard deviation of 5.3 points, while the mean score for unrelated events is 42.7 points, with a standard deviation of 11.6 points. Using 80 points as the threshold, a 92% detection rate of related events and a 6% false correlation rate can be achieved in the experiment.
[0025] For example, suppose the timestamp of a continuous small fluctuation in the candidate blind zone sequence is 12:05:30:200ms, the time of the most recent discrete anomaly is 12:05:36:500ms, the time interval is 6.3s, and the waveform similarity score is 87 points. Then it is determined to be strongly correlated, and the corresponding interval is included in the blind zone leakage current sequence.
[0026] In step S11, the dead zone leakage current sequence is continuously integrated within a preset sliding time window to obtain the cumulative current value, including: Phase-locked loop phase compensation is performed on the blind zone leakage current sequence to obtain a synchronous leakage current sequence; The synchronous leakage current sequence is subjected to a fast Fourier transform to extract the frequency domain fundamental component and then undergo an inverse transform to obtain the time domain fundamental component. Within a preset sliding time window, a trapezoidal integral operation is performed on the fundamental wave component in the time domain to obtain an initial integral sequence; The initial integral sequence is subjected to cumulative deviation compensation processing to obtain the cumulative current value.
[0027] After extracting the dead zone leakage current sequence, a phase-locked loop (PLL) is used to compensate the dead zone leakage current sequence to obtain a synchronous leakage current sequence. Specifically, the dead zone leakage current sequence and the photovoltaic distribution cabinet bus voltage signal are input into the PLL algorithm model, and phase compensation is performed on the dead zone leakage current sequence based on the phase of the bus voltage. The modulation strategy of the photovoltaic inverter will cause a phase offset between the leakage current signal and the grid reference voltage. The PLL adjusts the frequency and phase of the internal oscillator through a proportional-integral controller, with the proportional gain Kp set to 0.5 and the integral gain Ki set to 50. The PLL output is in phase and frequency with the bus voltage, and the phase-aligned leakage current sequence is output as a synchronous leakage current sequence. For example, if the bus voltage phase is 0 degrees, the dead zone leakage current sequence has a phase lag of 15 degrees, and after PLL compensation, a synchronous leakage current sequence in phase with the bus voltage is output.
[0028] The above PI controller parameters are based on parameter tuning experiments conducted under the nominal operating conditions (220V, 50Hz) of the photovoltaic distribution cabinet bus voltage. These parameters enable the phase-locked loop phase locking time to be less than 3 power frequency cycles (60ms) and the phase steady-state error to be no more than 2 degrees, meeting the real-time and accuracy requirements of leakage signal phase compensation.
[0029] A Fast Fourier Transform (FFT) is performed on the synchronous leakage current sequence to extract the fundamental frequency component, and an inverse FFT is performed to obtain the fundamental time-domain component. Specifically, the synchronous leakage current sequence is input into the FFT algorithm to convert the time-domain signal into a frequency-domain signal. The number of sampling points is set to 1024, and the frequency resolution is approximately 0.98Hz. The 50Hz spectral component is located in the spectrum, and an inverse FFT is performed on this component to reconstruct the fundamental time-domain component. For example, if the synchronous leakage current sequence contains a 50Hz fundamental frequency and a 150Hz third harmonic, the 50Hz spectral component is extracted after the FFT, and the inverse FFT outputs only the fundamental time-domain component containing a 50Hz sine wave.
[0030] An initial integration sequence is obtained by performing trapezoidal integration on the fundamental frequency component in the time domain. Specifically, a preset sliding time window is used to continuously integrate the fundamental frequency component in the time domain, with the preset sliding time window length set to 40ms. The basis for the preset sliding time window length of 40ms is as follows: the rated frequency of the power grid connected to the photovoltaic distribution cabinet is 50Hz, corresponding to a power frequency period of 20ms. According to the recommendations on power frequency parameter measurement in the IEC61000-4-30 standard for power quality measurement, the integration window should include an integer number of complete power frequency periods to eliminate the integration cancellation effect of periodic wavelets. Selecting two complete power frequency periods (40ms) as the preset sliding time window length can achieve a balance between integration accuracy and time resolution. The integration result of 40ms can effectively smooth power frequency fluctuations and produce 5 integration values within the preset time window of 200ms for deviation detection and cumulative calculation. Specifically, the algorithm slides across the fundamental frequency component in the time domain with a step size of 40ms. Within each window, a trapezoidal integral algorithm is used to continuously integrate the discrete sampling points of the fundamental frequency component. The input is the current amplitude sequence and the sampling time interval within the window, and the output is the integral value corresponding to that window. Using a sampling frequency of 1000Hz, each 40ms window contains 40 sampling points. As the window slides continuously, an initial integration sequence sorted by time is generated.
[0031] For example, suppose a 40ms window contains 40 sampling points, and the current amplitude of each sampling point is 2.1mA, 2.3mA, 2.2mA, ..., 2.5mA respectively, and the sampling interval is 1ms. Then the trapezoidal integral value is approximately the sum of the average of each adjacent point multiplied by the sampling interval. The integral value of this window is 92.0mA·ms.
[0032] The accumulated current value is obtained by performing cumulative deviation compensation processing on the initial integral sequence. Specifically, due to the inherent zero-point drift of the residual current transformer in the photovoltaic distribution cabinet, the initial integral sequence is prone to DC bias. The mean integral value of the initial integral sequence over 10 consecutive sliding time windows is extracted. If the absolute value of this mean is greater than 2 mA·ms, the initial integral sequence is determined to have a cumulative deviation. The initial integral sequence with deviation is input into the least squares fitting model, and a linear drift trend line is fitted with time as the independent variable. The value corresponding to this trend line is subtracted from the initial integral sequence for compensation processing. The compensated sequence is accumulated within a preset time window of 200ms to obtain the accumulated current value. For example, if the average integral values of 10 consecutive windows are 45 mA·ms, 47 mA·ms, 46 mA·ms, 48 mA·ms, 44 mA·ms, 49 mA·ms, 47 mA·ms, 46 mA·ms, 45 mA·ms, and 48 mA·ms respectively, and the average value is 46.5 mA·ms, and the absolute value is greater than 2 mA·ms, it is determined that there is a cumulative deviation. The linear drift trend line obtained by least squares fitting has a slope of 0.1 mA·ms per second. After compensating for the drift within a preset time window of 200 ms, the current is accumulated to obtain a cumulative current value of 60 mA·ms.
[0033] The selection of the 10 consecutive windows is based on the following: according to the Central Limit Theorem, the mean integral of the 10 independent windows approximately follows a normal distribution, and the 10 windows correspond to a total observation time of 400ms (40ms per window). Within this time, the zero-point drift of the residual current transformer has sufficient statistical significance for reliable detection. Simultaneously, the calculation delay of the 10 windows is 400ms, which does not exceed twice the preset time window of 200ms, thus meeting real-time requirements. The cumulative deviation threshold of 2mA·ms is based on the following: after statistical analysis of the zero-point drift of the residual current transformer under normal operating conditions of 200 sets of photovoltaic distribution cabinets, the absolute value of the mean integral of the 10 windows under normal operating conditions is 0.6mA·ms with a standard deviation of 0.4mA·ms. Taking the mean plus three times the standard deviation, approximately 1.8mA·ms, and rounding up to 2mA·ms, ensures that the zero-point drift under normal operating conditions at a 99.7% confidence level will not be misjudged as cumulative deviation. The above-mentioned preset time window of 200ms is based on the provisions of the IEC62020 standard regarding the response time of residual current monitors. The response time of monitoring devices used for fault early warning should not exceed 300ms. Selecting 200ms can achieve a balance between early warning response speed and cumulative accuracy.
[0034] In step S12, if the accumulated current value is greater than a preset accumulated threshold, the real-time phase current sequence of the corresponding loop is obtained and denoised and smoothed to obtain a smoothed phase current sequence, including: The real-time phase current sequence is input into a preset Kalman filter algorithm model to construct a state transition matrix; By combining the preset process noise covariance and the preset measurement noise covariance, a priori state estimation is performed on the state transition matrix to obtain the state update sequence; The Kalman gain is calculated based on the state update sequence, and the real-time phase current sequence is updated by observation based on the Kalman gain to obtain a smooth phase current sequence.
[0035] It should be noted that when the accumulated current value exceeds the preset accumulation threshold of 50 mA·ms, a potential abnormal fluctuation risk is identified in the current circuit, and the acquisition mechanism for the real-time phase current sequence of the corresponding circuit is triggered. Specifically, the current amplitude of the first phase output circuit of the photovoltaic distribution cabinet is continuously acquired through a current transformer at a sampling frequency of 2000 Hz, forming a discrete real-time phase current sequence. For example, if the accumulated current value is detected to be 60 mA·ms at 12:05:40:00ms, which is greater than the preset accumulation threshold of 50 mA·ms, acquisition is triggered, and 2000 phase current data points are acquired within 1 second thereafter.
[0036] It should be noted that the sampling frequency of the real-time leakage current data in step S11 above is 1000Hz, while the sampling frequency of the phase current signal in this step is 2000Hz. The two sampling frequencies are different and are used for monitoring different physical quantities. The leakage current signal changes slowly, and the 1000Hz sampling frequency already meets the Nyquist sampling theorem requirements for the acquisition of the 50Hz power frequency fundamental wave and its lower harmonics. The real-time phase current signal has a rapid transient change (the rate of change can reach 50mA / ms) before the short-circuit fault, and a sampling frequency of 2000Hz is required to capture the current slope change on the 0.5ms time scale. The Nyquist frequency corresponding to 2000Hz is 1000Hz, which is sufficient to cover the spectral range of the transient process of the phase current fault.
[0037] The preset cumulative threshold is set to 50 mA·ms. After statistical analysis of the cumulative current values of 200 photovoltaic distribution cabinets under normal operating conditions, the mean of the cumulative current value under normal operating conditions is 18.3 mA·ms, and the standard deviation is 8.5 mA·ms. Taking the mean plus three times the standard deviation, it is approximately 43.8 mA·ms. Rounding up to 50 mA·ms ensures that no false alarms will be triggered under normal operating conditions at a 99.7% confidence level.
[0038] The real-time phase current sequence is input into a preset Kalman filter algorithm model to construct the state transition matrix. Specifically, due to the high-frequency switching action of the insulated-gate bipolar transistors inside the photovoltaic inverter, the real-time phase current sequence is mixed with random high-frequency measurement noise. To remove this noise, a state transition matrix and observation matrix of a first-order linear dynamic system are constructed, both set to a constant of 1, that is, assuming that the true state of the current remains stable between adjacent sampling times, and the observed value is equal to the true state value plus the measurement noise. The first-order linear model is selected based on the fact that within a 0.5ms sampling interval, the inertia of the phase current in the photovoltaic distribution cabinet ensures that its amplitude change does not exceed 0.5%, and the first-order steady-state model can fully approximate the behavior of the real system at this time scale.
[0039] It should be noted that the acquisition of the preset Kalman filter algorithm model is divided into two stages. In the offline configuration stage, historical phase current data (sampling frequency 2000Hz, duration 1 hour, total 7,200,000 sampling points) collected continuously under nominal operating conditions from the photovoltaic distribution cabinet is used to construct the state-space equation of the first-order linear dynamic system, determine the model structure with state transition matrix F=1 and observation matrix H=1, and estimate parameters from the historical data using the expectation-maximization algorithm. The initial values of the expectation-maximization algorithm are set to Q=0.01 and R=0.1, and the convergence criterion for iteration is that the change in the log-likelihood function value between two consecutive iterations is less than 10. -6The actual number of iterations required for convergence is approximately 15 to 20, with each iteration using all 7,200,000 data points. After convergence using the expectation-maximization algorithm, the optimal values of the process noise covariance Q = 0.002 and the measurement noise covariance R = 0.015 are obtained, completing the offline calibration of the model. After calibration, the model parameters (F = 1, H = 1, Q = 0.002, R = 0.015) are fixed into a preset Kalman filter algorithm model and stored in the firmware of the photovoltaic distribution cabinet controller. During online operation, when step S12 triggers phase current acquisition, the controller directly loads the calibrated model parameters from the firmware, without retraining or parameter adjustment, to perform Kalman filtering on the real-time phase current sequence.
[0040] The state transition matrix is estimated a priori using preset process noise covariance and preset measurement noise covariance to obtain the state update sequence. Specifically, the covariance parameters are initialized using current fluctuation variance data from historical normal operation phases. The process noise covariance is set to 0.002 to characterize the inherent fluctuation of the actual current state, and the measurement noise covariance is set to 0.015 to reflect the level of random error in the sensor acquisition process. The basis for the process noise covariance of 0.002 is as follows: the amplitude fluctuation variance of 10,000 phase current sampling points during historical normal operation phases is statistically analyzed, linearly mapped to the [0, 1] interval using the min-max normalization method, and the normalized variance is 0.0018, which is rounded up to 0.002. The basis for the above measurement noise covariance of 0.015 is as follows: the residual current transformer specification sheet (model CT-0.1-100A) gives a measurement accuracy class of 0.5, and the maximum permissible error under a rated current range of 100A is 0.5A, with a normalized variance of approximately 0.012. Considering additional factors such as temperature drift, a value of 0.015 is adopted. After initialization, the algorithm uses the optimal state estimate and state transition matrix from the previous time step at each sampling moment to deduce the prior state estimate for the current time step, and synchronously updates the prior error covariance. The continuously output prior state estimates constitute a state update sequence.
[0041] The Kalman gain is calculated based on the state update sequence, and the real-time phase current sequence is updated using the Kalman gain to obtain a smoothed phase current sequence. Specifically, at the current sampling time, the prior error covariance is obtained by adding the process noise covariance to the posterior error covariance of the previous time step; the Kalman gain is obtained by dividing the prior error covariance by the sum of the prior error covariance and the measurement noise covariance. The Kalman gain ranges from 0 to 1, and its value determines the weight distribution between the observed value and the prior estimate: when the measurement noise is large, the Kalman gain approaches 0, and the filtered output trusts the prior estimate more; when the process noise is large, the Kalman gain approaches 1, and the filtered output trusts the actual observed value more.
[0042] The residual is calculated by subtracting the actual observed value of the real-time phase current sequence from the prior state estimate. This residual is multiplied by the Kalman gain and added as a compensation term to the prior state estimate, outputting the optimal state estimate for the current moment. As the time series progresses, the continuously output optimal state estimates combine to form a state update sequence, which is the smoothed phase current sequence after filtering out random high-frequency noise. For example, assuming the real-time phase current observation at a certain sampling moment is 852mA, the prior state estimate is 848mA, the residual is 4mA, and the current Kalman gain is 0.12, then the compensation term is 0.48mA, and the optimal state estimate is 848.48mA. This value is used as the value of that moment in the smoothed phase current sequence.
[0043] In step S13, the first derivative of the smooth phase current sequence is calculated to obtain the rate of change sequence, including: Extract the timestamp and current amplitude of the smooth phase current sequence, and calculate the time difference based on the timestamp to obtain the sampling interval sequence; If the sampling interval sequence is greater than the preset interval threshold, the first derivative is calculated based on the current amplitude and the sampling interval sequence to obtain the transient slope feature set. The transient slope feature set is recombined by sequence slicing to obtain the rate of change sequence; It should be noted that, for the smoothed phase current sequence obtained after Kalman filtering, data nodes are analyzed sequentially to separate the timestamp and current amplitude corresponding to each sampling point. The timestamp records the absolute time when the output circuit current of the photovoltaic distribution cabinet is collected, with an accuracy of milliseconds, while the current amplitude represents the actual current magnitude at that moment. Subsequently, the timestamps of two adjacent sampling points are subtracted to construct a sampling interval sequence reflecting the sampling time span. For example, if the timestamps of four consecutive sampling points are 12:05:40:000ms, 12:05:40:500ms, 12:05:40:502ms, and 12:05:40:505ms, the sampling interval sequence obtained by subtracting adjacent timestamps is 0.5ms, 0.502ms, and 0.503ms.
[0044] Because photovoltaic data acquisition terminals may be affected by bus communication congestion or hardware interruption scheduling, the actual sampling interval is not absolutely uniform. An interval threshold of 2ms is set, and the values in the sampling interval sequence are iterated one by one. When a time difference greater than 2ms is determined, it indicates that the current change within that time period has a sufficient observation span, and the first derivative calculation process is then initiated. The basis for the above interval threshold of 2ms is that the nominal sampling frequency of the photovoltaic distribution cabinet current transformer is 2000Hz, corresponding to a nominal sampling interval of 0.5ms. In actual operation, the fluctuation range of the sampling interval usually does not exceed twice the nominal value, i.e., 1ms. Taking 2ms as the interval threshold can effectively filter out invalid sampling intervals caused by brief communication jitter, while retaining an effective current change observation window.
[0045] Specifically, the current amplitudes at the start and end points of the time period are extracted, the amplitude difference between the two is calculated, and this amplitude difference is divided by the corresponding sampling interval. The resulting first derivative value is used as the transient slope feature and stored sequentially in the transient slope feature set. For example, if the current amplitude at the end point is 850mA, the current amplitude at the start point is 820mA, the amplitude difference is 30mA, and the corresponding sampling interval is 3ms, then the first derivative value is 10mA / ms. This value is stored in the transient slope feature set.
[0046] The transient slope feature set is reconstructed by slicing and rearranging the sequence to obtain the rate of change sequence. Specifically, a 50ms time sliding window is set, and transient slope features falling within the same window are extracted in chronological order as a slice. The arithmetic mean of all transient slope features within the window is taken as the rate of change of that slice, generating a smooth phase current sequence in the time dimension. The 50ms window length is based on the fact that the typical evolution time of a short-circuit fault in a photovoltaic distribution cabinet is 200ms to 500ms. A 50ms window can provide 4 to 10 effective slices during the evolution process, achieving a balance between time resolution and statistical stability. The arithmetic mean is selected because it is an unbiased estimate of the transient slope features, minimizing the mean square error under the assumption that each transient slope feature value within the window follows an independent and identically distributed distribution. For example, if a 50ms window contains five transient slope characteristic values of 8mA / ms, 9mA / ms, 11mA / ms, 10mA / ms, and 12mA / ms respectively, and the arithmetic mean of the five values is 50 divided by 5 equals 10, then the rate of change of this slice is 10mA / ms.
[0047] In step S13, the rate of change sequence is interpolated point by point according to a preset short-circuit critical threshold to obtain an approximation distance sequence, including: Extract the rate amplitude of the rate of change sequence, and calculate the difference between the rate amplitude and the preset short-circuit critical threshold point by point to obtain the amplitude deviation sequence; The amplitude deviation sequence is subjected to absolute value mapping processing to obtain the difference absolute value sequence; If the value in the absolute difference sequence is less than a preset warning threshold, the corresponding sampling node is extracted to construct a critical approximation node set. The absolute difference sequence is then sliced and extracted based on the critical approximation node set to obtain the approximation distance sequence.
[0048] The rate amplitude of the rate change sequence is extracted, and the amplitude deviation sequence is obtained by point-by-point difference calculation between the rate amplitude and the preset short-circuit critical threshold. The preset short-circuit critical threshold characterizes the current change rate limit when a short-circuit fault is about to occur in the internal components or external lines of the photovoltaic distribution cabinet, and is set to 50mA / ms. According to GB14048.2 Low-voltage switchgear and controlgear Part 2 Circuit breakers, the typical current rise rate of a photovoltaic distribution cabinet with a rated current of 100A under short-circuit conditions is 45mA / ms to 55mA / ms, and the median value of 50mA / ms is taken as the short-circuit critical threshold. The amplitude deviation sequence is constructed by point-by-point difference calculation between each extracted rate amplitude and the preset short-circuit critical threshold. For example, the rate amplitude corresponding to a certain sampling node is 42mA / ms, which is subtracted from 50mA / ms to obtain a difference of -8mA / ms. The amplitude deviation sequence is constructed by traversing all nodes in this order.
[0049] An absolute value mapping process is applied to the amplitude deviation sequence to obtain a difference absolute value sequence. An absolute value function algorithm is used to convert all negative differences in the sequence into positive numbers, while positive numbers remain unchanged, thus obtaining a difference absolute value sequence that only reflects the magnitude of the deviation. For example, the value -8mA / ms in the amplitude deviation sequence is mapped to 8mA / ms.
[0050] If the values in the absolute difference sequence are less than the preset warning threshold, the corresponding sampling nodes are extracted to construct a critical approach node set. Based on this set, the absolute difference sequence is sliced to extract the approach distance sequence. The preset warning threshold is set to 10mA / ms, used to define whether the current change rate has entered an extremely dangerous critical state. According to the IEC 60947-2 standard for low-voltage switchgear and controlgear, during the rise of the short-circuit current to its peak value, when the current change rate enters the short-circuit critical threshold range of 10mA / ms, the breaking capacity of the circuit breaker will be significantly reduced due to the influence of the arc voltage. Therefore, 10mA / ms is taken as the boundary of the warning interval. The values in the absolute difference sequence are compared one by one. When a value is found to be less than the 10mA / ms threshold, it indicates that the current current change rate is extremely close to the short-circuit critical point. The timestamp of the original sampling node corresponding to this value is extracted, and these nodes that meet the conditions are aggregated to construct a critical approach node set. Using the timestamps in the set of critical approximation nodes as indices, the corresponding numerical segments are located and extracted in the absolute difference sequence, and then reassembled and spliced according to the original chronological order to obtain the approximation distance sequence.
[0051] For example, if the absolute value of the difference sequence at timestamp 12:05:41:200ms is 8mA / ms, which is less than 10mA / ms, and only the latter of its adjacent nodes (values at 12:05:41:199.5ms are 12mA / ms, and values at 12:05:41:200.5ms are 9mA / ms) satisfies the condition, then the two nodes 12:05:41:200ms and 12:05:41:200.5ms constitute a continuous sub-segment, which is truncated and retained as a whole. If neither the preceding nor following node satisfies the condition, only a single point is retained. All retained continuous sub-segments are spliced together in chronological order to obtain the approximate distance sequence, and the time intervals between segments are not padded.
[0052] In step S14, a preset random forest model is used to jointly analyze the accumulated current value and the approximation distance sequence to obtain the associated feature vector, including: Obtain the timestamp corresponding to the current accumulation value, and perform data alignment on the approximation distance sequence based on the timestamp to obtain a joint analysis sample set; A preset random sampling strategy is used to sample and extract the joint analysis sample set to obtain a subsample set. The frequency and distribution range of the current accumulation value and the approximation distance sequence in the subsample set are statistically analyzed and filled into a matrix to obtain a joint distribution matrix. The feature importance score sequence corresponding to the joint distribution matrix is obtained by using a preset random forest model; Based on the feature importance scoring sequence, the correlation feature vector between the current accumulation value and the approximation distance sequence is extracted.
[0053] It should be noted that since the current accumulation value is generated periodically according to a preset time window (200ms), while the approximation distance sequence is generated continuously at the phase current sampling frequency (2000Hz, sampling interval 0.5ms), the time granularity of the two is different. Therefore, a matching operation based on time windows is performed for data alignment. Specifically, each output window of the current accumulation value is used as an alignment unit. The approximation distance sequence segment within the corresponding time period of the window is extracted, and the minimum approximation distance value in the segment (i.e., the approximation degree at the most dangerous moment) is calculated. The current accumulation value and the minimum approximation distance value are combined into an alignment sample. After traversing all current accumulation value output windows, a joint analysis sample set is constructed. The basis for selecting the minimum approximation distance value is: in the fault prediction scenario, if the approximation distance is too small at any moment within the window, it indicates that there is a risk of instantaneous short circuit at that moment. Taking the minimum value within the window can ensure that no instantaneous danger signal is missed.
[0054] For example, within a 200ms window from 12:05:40:000ms to 12:05:40:200ms, the cumulative current value is 60mA·ms. The approximation distance sequence within this window contains a total of 4 sampling points (corresponding to the change rate output at 50ms intervals), and its minimum approximation distance value is 8mA / ms (appearing at the third sampling point). This constitutes a set of aligned samples (60mA·ms, 8mA / ms). By traversing all output windows in this manner, a complete joint analysis sample set is constructed.
[0055] A pre-defined random sampling strategy was used to perform bootstrap resampling with replacement on the joint analysis sample set. The number of samplings was set to 500, and the same number of samples as the original sample set were drawn each time. The mean of the cumulative current value under each resampling was calculated. and the mean of the approximation distance ( ), resulting in 500 sets of resampled statistics; further, the distribution characteristics of these 500 sets of statistics were extracted, including the overall mean of the cumulative current value. with standard deviation and the overall mean of the approximate distance mean. with standard deviation The distribution feature vector that constitutes the current window .
[0056] The random forest model, pre-trained offline, has already calculated the feature importance scores for two original features (cumulative current value and approximation distance). and (All values are fixed). The current distribution feature vector is weighted and fused with the feature importance score: The associated feature vector is calculated. or simplified to scalar The associated feature vector (or scalar) This is used to determine the conditions for subsequent fault prediction.
[0057] It should be noted that in this method, the random forest model is only used to calculate feature importance scores in the offline stage. The model is not retrained in the online stage, nor are random forest predictions performed on the Bootstrap resampling results. The purpose of Bootstrap resampling is to robustly estimate the statistical distribution characteristics of the current accumulation value and the approximation distance within a finite sample window, and then weight and fuse them with the feature importance determined offline, thereby obtaining a comprehensive associated feature vector reflecting the current fault risk. This avoids the computational burden and dimensionality mismatch problem caused by directly inputting the high-dimensional Bootstrap matrix into the model.
[0058] Feature importance score sequences were obtained based on a pre-defined random forest model. The acquisition of the pre-defined random forest model consisted of two stages: offline training and online inference. In the offline training stage, labeled samples were extracted from the historical operation database of photovoltaic distribution cabinets. The labeling was based on actual short-circuit fault events and normal operating periods recorded in the maintenance logs: fault samples were taken from samples aligned with the cumulative current value and approximation distance within 60 seconds before the fault occurred, totaling 200 fault samples; normal samples were taken from samples aligned with the cumulative current value and approximation distance randomly sampled under nominal operating conditions, totaling 500 normal samples. These 700 labeled samples were then input into the classification and regression tree algorithm for training. For each decision tree, the bootstrap sampling method was used to randomly select 700 samples with replacement from the 700 samples as the training set. The out-of-bag samples not selected were used to evaluate the prediction error of the tree. At each node of the tree, one feature is randomly selected from two features as a candidate splitting feature. The optimal splitting point is selected based on the Gini impurity index. There is no maximum depth limit for tree growth. Splitting stops when each leaf node contains fewer than 5 samples or all samples belong to the same class. A total of 100 decision trees are constructed. The classification results of all decision trees are integrated using majority voting to obtain the trained random forest model.
[0059] The aforementioned setting of 100 decision trees, following the recommendations in the original Breiman Random Forest literature, is sufficient to bring the out-of-bag error rate to a stable value when the feature dimension is small. The contribution of the input features is quantitatively evaluated using the constructed random forest model, employing Gini importance as the importance metric. This involves calculating the sum of the reduction in Gini impurity caused by each feature during splits across all decision tree nodes. For each decision tree, the Gini impurity reduction values of the current accumulation feature and the approximation distance feature are recorded at each split. The reduction values of these two features in the tree are summed separately to obtain the original importance of a single tree. The original importance values of all 100 trees are then averaged to obtain the original Gini importance values of the two features in the entire random forest. The original Gini importance values are all positive numbers, reflecting the relative contribution of the feature in classification; however, the values themselves depend on factors such as the training set size and tree depth, and lack an absolute scale.
[0060] To facilitate engineering applications and threshold setting, the original importance values of the two features are linearly normalized to a rating scale of 0-100, ensuring the sum of the two feature scores equals 100. Specifically, the normalization method involves using the sum of the original importance values of the two features as the denominator, calculating the percentage of each feature's original importance in the sum, and then multiplying by 100 to obtain the feature's importance score. For example, the calculated original Gini importance of the current accumulation value is 0.325, and the original Gini importance of the approximation distance is 0.175, with a sum of 0.5. Therefore, the importance score of the current accumulation value is 0.325 divided by 0.5 multiplied by 100, which equals 65, and the importance score of the approximation distance is 0.175 divided by 0.5 multiplied by 100, which equals 35.
[0061] The correlation feature vector between the current accumulation value and the approximation distance sequence is extracted based on the feature importance score sequence. A screening threshold of 30 is set, and feature data with scores higher than this threshold are extracted and recombined to generate a correlation feature vector representing the deep coupling relationship between the current accumulation value and the approximation distance sequence. For example, both the current accumulation value feature importance score of 65 and the approximation distance feature importance score of 35 are higher than the threshold of 30, and both are included in the correlation feature vector, forming a two-dimensional feature vector.
[0062] The aforementioned screening threshold of 30 is based on the fact that in a random forest model, if each feature contributes equally to the classification, the theoretical expected importance score for each feature is 50 points (100 points divided by 2 features). If the importance score of a feature is lower than 60% of the expected value (i.e., 30 points), it indicates that the feature's classification contribution is significantly lower than the equal contribution level, and its ability to distinguish faults is insufficient, so it should be removed. This threshold was verified using the hold-out method on 700 labeled samples during the offline training phase: comparative experiments were conducted with screening thresholds set to 10, 20, 30, 40, and 50 respectively. When the threshold was set to 30, the classification accuracy of the retained features was 94.3%, and the recall rate was 91.7%, achieving the optimal balance between feature simplification and prediction accuracy.
[0063] In step S15, if the associated feature vector satisfies the preset fault prediction conditions, an early cut-off command is generated, including: A sequence of associated feature vectors is constructed by combining the aforementioned associated feature vectors with preset historical associated feature vectors; Calculate the Euclidean distance between each vector in the associated feature vector sequence and the preset fault boundary to obtain a distance sequence; A linear fit is performed on the distance sequence to obtain the distance change slope. If the minimum distance in the distance sequence is less than a preset distance threshold and the distance change slope is negative, an early cut-off command is generated.
[0064] It should be noted that the associated feature vector is a two-dimensional vector, with the first dimension being the cumulative current value (unit: mA·ms) and the second dimension being the approximation distance (unit: mA / ms). The two-dimensional feature space is plotted with the cumulative current value on the horizontal axis and the approximation distance on the vertical axis. Since step S14 generates an associated feature vector in each preset time window (200ms), a sequence of associated feature vectors is formed over time. Each vector in this sequence can be directly plotted in the two-dimensional feature space, intuitively reflecting the trajectory of the system's operating state over time.
[0065] It should be noted that before calculating the Euclidean distance, the cumulative current value and the approximation distance are subjected to maximum and minimum normalization to eliminate the influence of the difference in the two-dimensional physical dimensions and numerical scale on the distance calculation. The normalization reference range for the cumulative current value is a minimum of 0 mA·ms and a maximum of 150 mA·ms, which is three times the preset cumulative threshold of 50 mA·ms (statistics of 200 fault samples show that the maximum current cumulative value at the time of fault occurrence is 138 mA·ms, and taking 150 mA·ms as the normalization upper limit can cover all fault scenarios); the normalization reference range for the approximation distance is a minimum of 0 mA / ms and a maximum of 50 mA / ms, which is the preset short-circuit critical threshold (the approximation distance is defined as the absolute value of the difference between the rate amplitude and the short-circuit critical threshold, and its upper limit does not exceed the short-circuit critical threshold itself). After normalization, both eigenvalues are in the interval [0, 1], and the subsequent Euclidean distance calculation and distance threshold are performed in this normalized space.
[0066] The number of backtracking historical correlation feature vectors is set to 50, corresponding to a 10-second historical observation window (50 multiplied by 200ms equals 10s). The typical evolution time of a short-circuit fault in a photovoltaic distribution cabinet is 200ms to 500ms. The 10-second historical window can cover 20 to 50 times the duration of the entire fault evolution process, which is sufficient to capture the complete change trend from the normal state to the critical fault state.
[0067] Specifically, the preset fault boundary is determined by the distribution of associated feature vectors of historical fault samples during the offline phase. In the offline phase, associated feature vectors of 200 sets of fault samples (data within 10 seconds before the fault occurred) labeled in the historical database are extracted. The scatter distribution of all fault samples is plotted in a two-dimensional feature space, and the Graham scan algorithm is used to calculate the convex hull boundary of the 200 sets of fault sample points as the preset fault boundary. In the scatter distribution analysis of the 200 sets of fault samples, the fault sample points are approximately elliptical in the normalized two-dimensional space. The convex hull boundary can contain all fault sample points and has a compact shape, without abnormal expansion or concavity, verifying the rationality of using the convex hull as the fault boundary. This boundary divides the two-dimensional feature space into two regions: the outer boundary is the safe operating region (smaller accumulated current value or larger approximation distance), and the inner boundary is the fault danger region (larger accumulated current value and smaller approximation distance).
[0068] During the online monitoring phase, the current associated feature vector and the previous 49 historical associated feature vectors are acquired, forming a sequence of 50 vectors. In the two-dimensional feature space, the shortest Euclidean distance from each vector in this sequence to a preset fault boundary is calculated. For safe vectors outside the boundary, the distance is taken as a positive value; for dangerous vectors inside the boundary, the distance is taken as a negative value. The distances of all 50 vectors are arranged in chronological order to obtain a distance sequence. A linear fit is performed on the distance sequence, with the vector index as the independent variable (1 to 50) and the distance value as the dependent variable. The slope of the fitted line is calculated using the least squares method to obtain the slope of the distance change.
[0069] The preset distance threshold is set to 0.05 (normalized unit). In offline verification, the distance from the associated feature vectors of 200 fault samples to the fault boundary was statistically analyzed. The mean distance within 1 second before the fault occurred was 0.03, and the standard deviation was 0.02. Adding one time the standard deviation to the mean yields approximately 0.05, triggering an early warning about 2 seconds before the fault occurs. It should be noted that, under the assumption of a normal distribution, this threshold theoretically misses approximately 15.9% of fault events (i.e., a false alarm rate of approximately 15.9%). The threshold corresponding to the mean plus one time the standard deviation is the smallest, with the strictest triggering condition, thus resulting in the lowest false alarm rate. While adding two or three times the standard deviation to the mean can reduce the false alarm rate, it significantly increases the false alarm rate, leading to unnecessary circuit disconnections and affecting the power supply continuity of the photovoltaic power generation system. The design goal of this method is to prioritize a low false alarm rate, allowing a small number of missed events to be handled as backup by traditional overcurrent protection or leakage protection. Field tests showed that the actual false alarm rate was 15.9% and the false alarm rate was 4.2% in 200 fault samples, which meets the practical requirements of engineering.
[0070] For example, the current associated feature vector is (60mA·ms, 8mA / ms). A sequence of 50 vectors is formed by backtracking 49 historical vectors, and the Euclidean distance from each vector to the preset fault boundary is calculated. If the distance sequence is [0.42, 0.38, 0.35, 0.31, 0.28, 0.24, 0.21, 0.18, 0.15, 0.12, ..., 0.04], the minimum distance is 0.04 (less than the preset distance threshold of 0.05), and the slope of the distance change obtained by least squares fitting is -0.008 per step (the slope is negative), it indicates that the system state is continuously approaching the fault boundary. If both conditions are met simultaneously, an early disconnection command is generated. In step S15, according to the early disconnection command, a loop control operation is performed on the photovoltaic distribution cabinet to disconnect the power supply connection of the corresponding loop, including: According to the aforementioned early cut-off command, the power supply to the coil of the relay in the corresponding circuit is cut off, causing the relay contacts to separate. During the contact separation process, the electric arc generated between the contacts is extinguished by the arc-extinguishing chamber or arc-extinguishing grid. Monitor the current value of the corresponding circuit, and when the current value drops below a preset safety threshold, confirm that the circuit has been disconnected.
[0071] It should be noted that the early disconnection command includes a target circuit identifier and a disconnection action type. Upon receiving the early disconnection command, the programmable logic controller (PLC) of the photovoltaic distribution cabinet controls the relay drive circuit of the corresponding circuit to disconnect the coil power supply according to the target circuit identifier in the command. After the relay coil is de-energized, the electromagnetic force disappears, and the moving contact separates from the stationary contact under the action of the return spring, achieving electrical disconnection of the circuit. The above relay coil de-energization control method is based on the standard GB14048.4 Low-voltage switchgear and controlgear Part 4 Contactors and Motor Starters, which stipulates that after the coil of an electromagnetic relay is de-energized, the contacts should reliably separate within a specified time to ensure the reliability of electrical isolation.
[0072] During contact separation, an electric arc may occur between the contacts due to inductive loads or residual current in the circuit. To suppress and extinguish this arc, photovoltaic distribution cabinets are equipped with arc-extinguishing chambers or arc-extinguishing grids: the arc-extinguishing chamber uses the movement of the arc under the influence of a magnetic field to elongate and cool it, while the arc-extinguishing grids divide the arc into multiple short arc segments, using the near-cathode effect to increase the arc voltage of each short arc segment. When the power supply voltage is insufficient to sustain the arc, it extinguishes. According to the provisions on arc-extinguishing devices in GB14048.1 Low-voltage switchgear and controlgear Part 1 General Rules, low-voltage switchgear with a rated current of 100A and below should be equipped with arc-extinguishing chambers or equivalent arc-extinguishing devices to ensure reliable arc extinguishing within the rated short-circuit breaking capacity.
[0073] After the contacts separate and the arc is extinguished, the circuit current value is continuously monitored by a current transformer connected in series in the circuit. When the monitored current value drops below the preset safety threshold, it indicates that the circuit has been physically disconnected and no residual current is flowing, confirming that the circuit has been disconnected. The preset safety threshold is set to 0.5% of the circuit's rated current, i.e., 50mA (rated current 100A multiplied by 0.5%). The basis for the above preset safety threshold of 50mA is as follows: According to the provisions of the IEC 62020 standard regarding residual current monitors, residual current below 50mA is considered not to pose a safety hazard to equipment and personnel. Considering that the measurement accuracy of the current transformer is 0.5 class, 50mA corresponds to a relative error of 0.05% at a 100A range, which is within the resolvable range of measurement accuracy.
[0074] For example, the target circuit for the early disconnection command is identified as the first phase output circuit. The controller disconnects the coil power supply to the relay in this circuit, and the relay contacts begin to separate. During the separation process, the arc-extinguishing grid divides the arc into multiple short segments and extinguishes it. The typical time from coil de-energization to complete arc extinguishment is 15ms to 30ms. After the arc is extinguished, the circuit current begins to decay from 850mA and drops to 45mA within 20ms (below the preset safety threshold of 50mA), confirming that the circuit has been disconnected.
[0075] In summary, this invention discloses a method for leakage current protection of photovoltaic power generation distribution cabinets. This invention preprocesses real-time leakage current data from the photovoltaic distribution cabinet circuit to obtain a blind zone leakage current sequence. Within a preset sliding time window, the blind zone leakage current sequence is continuously integrated to obtain a current accumulation value. When the current accumulation value exceeds a preset accumulation threshold, the corresponding circuit's real-time phase current sequence is acquired and denoised to obtain a smooth phase current sequence. The first derivative of the smooth phase current sequence is calculated to obtain a rate of change sequence. Based on a preset short-circuit critical threshold, the rate of change sequence is interpolated point-by-point to obtain an approximation distance sequence. A preset random forest model is used to jointly analyze the current accumulation value and the approximation distance sequence to extract associated feature vectors. When the associated feature vectors meet preset fault prediction conditions, an early disconnection command is generated, and circuit control operations are executed to disconnect the power supply connection. This achieves dual perception and early prediction of blind zone leakage current accumulation and short-circuit fault risk, avoiding arc impact and secondary equipment damage caused by critical circuit breaking operations.
[0076] The second embodiment of the present invention provides a leakage current protection system for a photovoltaic power generation distribution cabinet, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the leakage current protection method for the photovoltaic power generation distribution cabinet as described above.
[0077] It should be noted that the photovoltaic power generation distribution cabinet leakage protection system provided in this embodiment of the invention is used to execute all the process steps of the photovoltaic power generation distribution cabinet leakage protection method in the above embodiment. The working principle and beneficial effects of the two are one-to-one, so they will not be described again.
[0078] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0079] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for leakage protection of a photovoltaic power generation distribution cabinet, characterized in that, include: Real-time leakage current data of the photovoltaic distribution cabinet circuit is acquired and preprocessed to obtain a blind zone leakage current sequence. The blind zone leakage current sequence is continuously integrated within a preset sliding time window to obtain the current accumulation value. If the accumulated current value is greater than the preset accumulated threshold, the real-time phase current sequence of the corresponding circuit is obtained and denoised and smoothed to obtain a smooth phase current sequence. The first derivative of the smooth phase current sequence is calculated to obtain the rate of change sequence. The point-by-point difference of the rate of change sequence is calculated according to a preset short-circuit critical threshold to obtain the approximation distance sequence. A preset random forest model is used to jointly analyze the current accumulation value and the approximation distance sequence to obtain the associated feature vector. If the associated feature vector meets the preset fault prediction conditions, an early disconnection command is generated, and a circuit control operation is performed on the photovoltaic distribution cabinet according to the early disconnection command to disconnect the power supply connection of the corresponding circuit.
2. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, The process of acquiring and preprocessing real-time leakage current data of the photovoltaic distribution cabinet circuit to obtain a blind zone leakage current sequence includes: The real-time leakage current data is filtered to obtain low-frequency leakage current characteristics; The low-frequency leakage current characteristics are clustered to obtain feature clusters and discrete outliers, and continuous small fluctuations within the feature clusters are extracted. If the continuous micro-fluctuations do not reach the preset conventional trigger threshold, the continuous micro-fluctuations are compared with the discrete anomalies in a time sequence to separate the blind zone leakage current sequence.
3. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, The step of continuously integrating the dead zone leakage current sequence within a preset sliding time window to obtain the cumulative current value includes: Phase-locked loop phase compensation is performed on the blind zone leakage current sequence to obtain a synchronous leakage current sequence; The synchronous leakage current sequence is subjected to a fast Fourier transform to extract the frequency domain fundamental component and then undergo an inverse transform to obtain the time domain fundamental component. Within a preset sliding time window, a trapezoidal integral operation is performed on the fundamental wave component in the time domain to obtain an initial integral sequence; The initial integral sequence is subjected to cumulative deviation compensation processing to obtain the cumulative current value.
4. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, If the accumulated current value is greater than a preset accumulated threshold, the real-time phase current sequence of the corresponding circuit is obtained and denoised and smoothed to obtain a smoothed phase current sequence, including: The real-time phase current sequence is input into a preset Kalman filter algorithm model to construct a state transition matrix; By combining the preset process noise covariance and the preset measurement noise covariance, a priori state estimation is performed on the state transition matrix to obtain the state update sequence; The Kalman gain is calculated based on the state update sequence, and the real-time phase current sequence is updated by observation based on the Kalman gain to obtain a smooth phase current sequence.
5. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, The step of calculating the first derivative of the smooth phase current sequence to obtain the rate of change sequence includes: Extract the timestamp and current amplitude of the smooth phase current sequence, and calculate the time difference based on the timestamp to obtain the sampling interval sequence; If the sampling interval sequence is greater than the preset interval threshold, the first derivative is calculated based on the current amplitude and the sampling interval sequence to obtain the transient slope feature set. The transient slope feature set is recombined by sequence slicing to obtain the rate of change sequence.
6. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, The step of performing point-by-point difference calculation on the rate of change sequence based on a preset short-circuit critical threshold to obtain an approximation distance sequence includes: Extract the rate amplitude of the rate of change sequence, and calculate the difference between the rate amplitude and the preset short-circuit critical threshold point by point to obtain the amplitude deviation sequence; The amplitude deviation sequence is subjected to absolute value mapping processing to obtain the difference absolute value sequence; If the value in the absolute difference sequence is less than a preset warning threshold, the corresponding sampling node is extracted to construct a critical approximation node set. The absolute difference sequence is then sliced and extracted based on the critical approximation node set to obtain the approximation distance sequence.
7. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, The method employs a pre-defined random forest model to jointly analyze the accumulated current value and the approximation distance sequence, obtaining a correlated feature vector, including: Obtain the timestamp corresponding to the current accumulation value, and perform data alignment on the approximation distance sequence based on the timestamp to obtain a joint analysis sample set; A preset random sampling strategy is used to sample and extract the joint analysis sample set to obtain a subsample set. The frequency and distribution range of the current accumulation value and the approximation distance sequence in the subsample set are statistically analyzed and filled into a matrix to obtain a joint distribution matrix. The feature importance score sequence corresponding to the joint distribution matrix is obtained by using a preset random forest model; Based on the feature importance scoring sequence, the correlation feature vector between the current accumulation value and the approximation distance sequence is extracted.
8. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, If the associated feature vector satisfies the preset fault prediction conditions, an early disconnection command is generated, including: A sequence of associated feature vectors is constructed by combining the aforementioned associated feature vectors with preset historical associated feature vectors; Calculate the Euclidean distance between each vector in the associated feature vector sequence and the preset fault boundary to obtain a distance sequence; A linear fit is performed on the distance sequence to obtain the distance change slope. If the minimum distance in the distance sequence is less than a preset distance threshold and the distance change slope is negative, an early cut-off command is generated.
9. The method for leakage protection of photovoltaic power generation distribution cabinet according to claim 1, characterized in that, The step of performing circuit control operation on the photovoltaic distribution cabinet according to the pre-cut-off command, and cutting off the power supply connection of the corresponding circuit, includes: According to the aforementioned early cut-off command, the power supply to the coil of the relay in the corresponding circuit is cut off, causing the relay contacts to separate. During the contact separation process, the electric arc generated between the contacts is extinguished by the arc-extinguishing chamber or arc-extinguishing grid. Monitor the current value of the corresponding circuit, and when the current value drops below a preset safety threshold, confirm that the circuit has been disconnected.
10. A leakage current protection system for a photovoltaic power generation distribution cabinet, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the leakage protection method for photovoltaic power generation distribution cabinets according to any one of claims 1 to 9.
Citation Information
Patent Citations
Smart meters, appliance identification methods, and smart apartment systems incorporating such meters
CN107817382B