A distribution box capable of identifying harmonic risks

By constructing a cascaded model of regional feature extraction network and risk source determination network, and combining two-dimensional harmonic spectrum and feature gradient benchmark, the problems of imprecise harmonic feature extraction and unstable identification performance in distribution boxes are solved, and efficient and interpretable identification of harmonic risks is achieved.

CN123121564APending Publication Date: 2026-11-17BEIJING TIANWEI STATE GRID ELECTRICAL WHOLE SET EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611326138.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-29
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately extract multidimensional harmonic features from distribution boxes, and the gradient backpropagation process of cascaded models is prone to mutual interference, leading to unstable identification performance, insufficient interpretability, and inability to accurately identify harmonic risks.

Method used

By constructing a cascaded model consisting of a regional feature extraction network and a risk source determination network, and training the network using an alternating optimization strategy, the harmonic risk coefficient is calculated using a two-dimensional harmonic spectrum and feature gradient benchmark, combined with back-derivative calculation, thus achieving targeted feature extraction and interpretability of the identification results.

Benefits of technology

It improves the accuracy and reliability of harmonic risk identification, reduces gradient interference during model training, and enhances the interpretability and accuracy of the identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123121564A_ABST
    Figure CN123121564A_ABST
Patent Text Reader

Abstract

This invention provides a distribution box capable of identifying harmonic risks. The method includes periodically cropping time-series current data from monitoring points within the distribution box, obtaining the amplitude and phase of specified harmonic orders, constructing a two-dimensional harmonic spectrum based on the harmonic order and phase interval relative to the fundamental wave, building a cascaded model containing a regional feature extraction network and a risk source determination network, and outputting and concatenating the outputs of multiple parallel convolutional groups to obtain initial harmonic features. The risk source determination network outputs confidence vectors for various typical harmonic sources. An alternating optimization strategy is used for training, allocating computational resources to the convolutional kernel groups according to the loss gradient, and accumulating feature gradient benchmarks for high-confidence samples after iterative training. The data to be identified is input into the model to obtain a confidence vector, and the inverse derivative is used to obtain the instantaneous gradient. The instantaneous gradient is compared with the feature gradient benchmark, and the risk coefficients of each harmonic source are calculated in conjunction with the confidence vector. A weighted sum is then used to output the harmonic risk identification result of the distribution box.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of distribution boxes, and in particular relates to a distribution box capable of identifying harmonic risks. Background Technology

[0002] With the widespread integration of loads and power electronic equipment into power distribution systems, harmonic disturbances at distribution box nodes are becoming increasingly apparent. To ensure the stable operation of the power distribution network, harmonic risk identification of distribution boxes is necessary. Existing methods typically collect time-series current data and use mathematical transformations to extract harmonic components to determine the state of harmonic sources. However, when using deep learning models to process harmonic data, the characteristics of harmonics in different frequency bands differ in scale and distribution. A single convolutional network cannot adequately account for the diversity of local features, easily resulting in insufficiently refined feature extraction. For cascaded models containing multiple sub-networks, if global synchronous parameter updates are used, the network modules are prone to mutual interference during gradient backpropagation, leading to insufficient model convergence stability and affecting identification performance. Furthermore, the feature representations of different typical harmonic sources tend to overlap in the actual power grid environment. Relying solely on the classification probabilities output by the model for risk determination makes it difficult to trace back the key features upon which the model's judgment is based. Faced with mixed harmonic data with varying components in distribution boxes, a single classification result is also insufficient to measure the risk contribution of each typical harmonic source, resulting in insufficient interpretability of the identification results. Therefore, how to reasonably represent the multidimensional harmonic information in time-series currents, optimize the network model training process, and establish a risk assessment mechanism with interpretable features to achieve harmonic risk identification in distribution boxes are problems that need to be solved in this field. Summary of the Invention

[0003] According to a first aspect of the present invention, a distribution box capable of identifying harmonic risks is proposed to more reasonably represent multidimensional harmonic information in time-series currents and optimize the training process of network models, comprising the following modules: The calculation module is used to periodically cut the time-series current data of the distribution box monitoring point, calculate the amplitude and phase of multiple specified order harmonics, and construct a two-dimensional harmonic spectrum based on the harmonic order and the discretized phase interval relative to the fundamental wave. A construction module is used to build a cascaded model consisting of a regional feature extraction network and a risk source determination network. The regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features. The risk source determination network receives the initial harmonic features and outputs the confidence vectors of each preset typical harmonic source. The cascaded model is trained using an alternating optimization strategy. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed. The computational resource configuration of each parallel convolutional kernel group is adjusted according to the gradient of the loss function with respect to the initial harmonic features. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed and the process is iterated. When each typical harmonic source is identified with high confidence, the gradient of the corresponding confidence with respect to the initial harmonic features is accumulated to obtain the feature gradient benchmark of each typical harmonic source. The determination module is used to obtain the confidence vector of the data to be identified through the trained cascaded model, obtain the instantaneous gradient of the target confidence with respect to the initial harmonic features based on the back derivative, determine the risk coefficient of each typical harmonic source based on the matching degree between the instantaneous gradient and the feature gradient benchmark and the confidence vector, and obtain the final harmonic risk identification result by weighted summation of each risk coefficient.

[0004] According to a second aspect of the present invention, a method for identifying harmonic risks in a distribution box is provided, comprising the following steps: The time-series current data of the distribution box monitoring point is periodically clipped, the amplitude and phase of multiple specified order harmonics are calculated, and a two-dimensional harmonic spectrum is constructed based on the harmonic order and the discretized phase interval relative to the fundamental wave. A cascaded model consisting of a regional feature extraction network and a risk source determination network is constructed. The regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features. The risk source determination network receives the initial harmonic features and outputs the confidence vectors of each preset typical harmonic source. The cascaded model is trained using an alternating optimization strategy. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed. The computational resource configuration of each parallel convolutional kernel group is adjusted according to the gradient of the loss function with respect to the initial harmonic features. The parameters of the regional feature extraction network are fixed while the parameters of the risk source determination network are updated and iterated repeatedly. When each typical harmonic source is identified with high confidence, the gradient of the corresponding confidence with respect to the initial harmonic features is accumulated to obtain the feature gradient benchmark of each typical harmonic source. The confidence vector is obtained from the trained cascaded model of the data to be identified. The instantaneous gradient of the target confidence with respect to the initial harmonic features is obtained by back-derivative. The risk coefficient of each typical harmonic source is determined by combining the matching degree between the instantaneous gradient and the feature gradient benchmark with the confidence vector. The risk coefficients are then weighted and summed to obtain the final harmonic risk identification result.

[0005] This invention achieves a structured representation of harmonic information by periodically cropping time-series current data to calculate the amplitude and phase of multiple harmonics and constructing a two-dimensional harmonic spectrum. A cascaded model consisting of a regional feature extraction network and a risk source determination network is constructed, utilizing multiple parallel convolutional kernel groups to extract spectral features from different harmonic regions. During the training phase, an alternating optimization strategy is employed to reduce gradient interference between different network modules during joint training, and computational resource allocation is adjusted based on gradient information, allowing the model to focus on key harmonic features while establishing characteristic gradient benchmarks for each typical harmonic source. In the risk identification phase, the risk coefficient is calculated not only using the confidence level of the model's forward output but also combining the matching degree between the instantaneous gradient obtained from backward differentiation and the characteristic gradient benchmarks. This improves the targeting of feature extraction and the interpretability of identification results, enhancing the accuracy and reliability of harmonic risk identification in distribution boxes. Attached Figure Description

[0006] Figure 1 Here is a block diagram of the cascade model; Figure 2 A flowchart for calculating the alarm based on the risk coefficient. Detailed Implementation

[0007] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0008] In a first embodiment, the present invention proposes a distribution box capable of identifying harmonic risks. The distribution box includes at least a storage unit and a processor unit, and further includes a calculation module, a construction module, and a determination module. The modules may be programs stored in the storage unit.

[0009] The calculation module is used to periodically cut the time-series current data of the distribution box monitoring point, calculate the amplitude and phase of multiple specified order harmonics, and construct a two-dimensional harmonic spectrum based on the harmonic order and the discretized phase interval relative to the fundamental wave.

[0010] Continuous time-series current data is acquired at a set sampling frequency using a high-frequency current transformer installed at the incoming end of the distribution box. Two adjacent positive zero-crossing points of the fundamental component or fundamental reference signal in the filtered time-series current data are identified, and the data between these two zero-crossing points is extracted as a fundamental power frequency cycle. A Fast Fourier Transform (FFT) algorithm is applied to the extracted single-cycle time-series current data to convert the time-domain data into frequency-domain data, extracting the complex forms of the fundamental wave and the 2nd to 50th harmonics. The amplitude and absolute phase of the corresponding harmonics are calculated based on the real and imaginary parts of the complex forms. Using the fundamental wave phase as a reference, the relative phase is obtained by subtracting the fundamental wave phase from the absolute phase of each specified harmonic. The relative phase range from 0 degrees to 360 degrees is divided into multiple discretized phase intervals, such as 36 intervals of 10 degrees each. A two-dimensional matrix is ​​established, with the row indices corresponding to the set harmonic orders and the column indices corresponding to the sequence numbers of the discretized phase intervals. The calculated amplitudes of each harmonic are filled into the matrix elements of the corresponding harmonic order row and the column of the discretized phase interval to which the relative phase of the harmonic order belongs. All other unassigned elements in the matrix are filled with zeros. The filled two-dimensional matrix is ​​the two-dimensional harmonic spectrum in grayscale image form.

[0011] In an optional embodiment, the step of periodically cropping the time-series current data of the distribution box monitoring point and calculating the amplitude and phase of multiple specified order harmonics includes: Single-phase time-series current data of the distribution box were acquired at a sampling rate of 10kHz; Use a digital low-pass filter with a cutoff frequency higher than the 50th harmonic frequency and lower than half the sampling rate to remove noise signals from the timing current data; Record the occurrence times of two consecutive positive zero crossings of the fundamental component or fundamental reference signal in the filtered time-series current data, and extract the discrete time data points contained between the two times into a complete periodic data. Perform a Discrete Fourier Transform on the complete periodic data to obtain complex frequency domain expressions for the fundamental to the 50th harmonic. Calculate the magnitude of the complex number of each frequency domain expression, and perform normalization conversion based on the number of Discrete Fourier Transform points and the calibration coefficients of the current transformer. Use the conversion result as the amplitude of the corresponding harmonic, and calculate the phase angle of the complex number of each frequency domain expression as the phase of the corresponding harmonic.

[0012] The data acquisition terminal is configured to sample the single-phase time-sequential current signal in the distribution box at equal intervals, with a sampling rate of... Set the frequency to 10000Hz. Input the acquired discrete signal into a preset Butterworth digital low-pass filter, based on the actual fundamental frequency. Configure filter cutoff frequency ,make Above 50 And lower than / 2, so that the 50th harmonic is located within the filter passband; in a 50Hz power frequency scenario. It can be configured to 3000Hz to filter out higher frequency noise interference while preserving the 50th harmonic passband response. During the data capture phase, the value of the fundamental component or fundamental reference signal in the filtered time-series current data is monitored in real time to identify two consecutive positive zero-crossings. Assuming the identified occurrence times are... =0.020s and =0.040s, then the intercepted time difference T=0.020s corresponds to one complete cycle of the 50Hz fundamental frequency, which includes =200 discrete data points. Perform a Discrete Fourier Transform on this extracted sequence of 200 sampling points, using the formula... The frequency domain sequence is calculated. The harmonic order index k ranges from 1 (representing the 50Hz fundamental frequency) to 50 (representing the 50th harmonic at 2500Hz). For each obtained complex frequency domain expression... Extract the included features. For example, when k=5, if the calculated complex number result is... =3+4j, then first combine the number of discrete Fourier transform points N and the calibration coefficient of the current transformer to normalize the complex modulus and obtain the actual amplitude of the corresponding 5th harmonic. The phase angle is calculated and the harmonic phase is determined by processing the imaginary and real parts of the complex frequency domain expression using the arctangent function atan2. For example, phase =atan2(4,3)≈53.1°. Iterate through the various orders of k, from 2 to 50, to generate amplitude and phase parameter pairs for each specified order harmonic.

[0013] In an optional embodiment, constructing a two-dimensional harmonic spectrum based on the harmonic order and the discretized phase interval relative to the fundamental wave includes: The complete phase period from 0 to 360 degrees is equally divided into 36 discretized phase intervals with a fixed step size of 10 degrees, and column indices from 0 to 35 are compiled sequentially. Subtract the phase of the fundamental wave from the phase of each harmonic from the 2nd to the 50th harmonic, and perform 360-degree modulo normalization on the difference to calculate the relative phase difference of each harmonic to the fundamental wave. Match the corresponding discrete phase interval column index according to the numerical value of the phase difference. Construct a 49-row, 36-column initial 2D matrix with all zeros, and let the row indices from 0 to 48 point to the 2nd to 50th harmonic orders respectively; The specific grid cell of the all-zero initial two-dimensional matrix is ​​addressed according to the column index and row index associated with each order, and the calculated harmonic amplitude of the order is filled into the specific grid cell to obtain the two-dimensional harmonic spectrum.

[0014] The continuous phase circular domain from 0° to 360° is discretized into 36 equal discretized phase intervals. For example, 0° to 10° corresponds to column index 0, 10° to 20° corresponds to column index 1, and so on, up to 350° to 360° corresponding to column index 35. A relative phase alignment operation is then performed; that is, for each order k belonging to 2 to 50, the original phase is calculated. Phase with fundamental wave The difference between them. Assuming the detected fundamental phase... =30°, and the phase of the 5th harmonic =155°, then the relative fundamental phase difference value = (155° - 30°) mod 360° = 125°. Based on the calculated phase difference, the corresponding column index c is matched by a floor division operation. For example, the above... =125°, the calculation shows that 125 divided by 10 equals 12.5, which, after rounding down, gives the column index c=12. A 49-row, 36-column matrix of all zeros is initialized in memory as the basic carrier of the two-dimensional graph. The row index r of the matrix ranges from 0 to 48, mapping to the 2nd to 50th harmonic orders, with the mapping relationship r=k-2. Therefore, for the 5th harmonic, i.e., k=5, the corresponding row index is r=5-2=3. The initial matrix is ​​addressed based on the calculated row index r and column index c. In the previous example, the grid cell in the 3rd row and 12th column of the matrix is ​​located, and the previously calculated 5th harmonic amplitude value, assumed to be 5.0A, is overwritten and filled into this cell, i.e., the assignment operation is performed. =5.0. This operation iterates through all harmonic data from the 2nd to the 50th harmonics, while grid cells that do not match the corresponding features remain at their initial value of 0, thus completing the construction of a two-dimensional harmonic spectrum with a size of 49×36.

[0015] A construction module is used to build a cascaded model consisting of a regional feature extraction network and a risk source determination network. The regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features. The risk source determination network receives the initial harmonic features and outputs the confidence vectors of each preset typical harmonic source. The cascaded model is trained using an alternating optimization strategy. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed. The computational resource configuration of each parallel convolutional kernel group is adjusted according to the gradient of the loss function with respect to the initial harmonic features. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed and iterated repeatedly. When each typical harmonic source is identified with high confidence, the gradient of the corresponding confidence with respect to the initial harmonic features is accumulated to obtain the feature gradient benchmark of each typical harmonic source.

[0016] The cascaded model is built on a deep convolutional neural network, and its overall architecture is as follows: Figure 1 As shown, the regional feature extraction network includes an input layer and three convolutional groups (first, second, and third) connected in parallel. These three convolutional groups correspond to the low-order, mid-order, and high-order harmonic regions in the two-dimensional harmonic spectrum, respectively, and each uses a 3×3 two-dimensional convolutional kernel with a stride of 1. After convolution, a batch normalization layer and a nonlinear activation function layer are connected. The two-dimensional harmonic spectrum is input into the three convolutional groups according to harmonic order regions for forward propagation, extracting local feature maps of different frequency bands. The three-dimensional tensor feature maps output by each convolutional group are then flattened and concatenated end-to-end to form a one-dimensional initial harmonic feature vector. The risk source determination network consists of multiple fully connected layers, with a multi-label confidence output layer at the end. The output is a confidence vector with a length equal to the total number of preset typical harmonic sources, where each element represents the predicted probability of the corresponding harmonic source's existence.

[0017] During model training, multi-label cross-entropy is used as the loss function, and the cascaded model is updated through alternating optimization. First, the weight parameters of the risk source determination network are fixed. The labeled 2D harmonic spectrum is input into the cascaded model, and the partial derivative of the loss function with respect to the initial harmonic feature vector is calculated to obtain the feature gradient vector. This feature gradient vector is then mapped to three convolutional groups according to feature segments, and the average absolute value of the feature gradient for each convolutional group is calculated as the importance score. The number of activated channels in each convolutional group is determined based on the proportion of the three importance scores in the total score. With the total number of channels remaining constant, low-importance channels are zeroed out to adjust the effective channels participating in subsequent feature propagation, while simultaneously updating the weights of the regional feature extraction network. Then, the weight parameters of the regional feature extraction network are fixed, and forward propagation is performed again, updating the weight parameters of the fully connected layers of the risk source determination network according to the multi-label cross-entropy loss function. This process is repeated until the loss function converges.

[0018] At the end of training, for each pre-set typical harmonic source, training samples with a confidence level greater than 0.9 are selected and output, and the derivative vector of the corresponding target category confidence level with respect to the initial harmonic feature vector is calculated. The arithmetic mean of all derivative vectors belonging to the same typical harmonic source is taken to obtain the feature gradient benchmark of that typical harmonic source, which is saved for use in the inference stage.

[0019] In an optional embodiment, the construction of a cascaded model consisting of a regional feature extraction network and a risk source determination network, wherein the regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features, and the risk source determination network receives the initial harmonic features and outputs confidence vectors for each preset typical harmonic source, including: The first layer of the sub-region feature extraction network is fixedly configured with a first convolutional group, a second convolutional group, and a third convolutional group that are independent and parallel to each other; The receptive field of the first convolution group is made to cover only the first 14 rows of grid regions corresponding to the 2nd to 15th harmonics in the two-dimensional harmonic spectrum; The receptive field of the second convolution group is made to cover only the middle 15 rows of grid regions corresponding to the 16th to 30th harmonics; The receptive field of the third convolution group is made to cover only the last 20 rows of grid regions corresponding to the 31st to 50th harmonics; After a 3×3 two-dimensional convolution operation with a stride of 1, the three-dimensional tensor feature map output by each convolution group is extracted and subjected to one-dimensional feature flattening. The one-dimensional feature data of the flattened first, second, and third convolution groups are sequentially connected and arranged in one dimension, spliced ​​together to form a column vector, and set as the initial harmonic feature.

[0020] This scheme employs a regional feature extraction network. The network structure includes an input layer, three independent and parallel convolutional groups (first, second, and third groups) with a fixed initial layer, a one-dimensional feature flattening layer, and a one-dimensional splicing layer. The input to this regional feature extraction network is a two-dimensional harmonic spectrum tensor of size 1×49×36 (channels multiplied by rows multiplied by columns). The output is a column vector, i.e., the initial harmonic features, formed by splicing and combining the data. To identify local correlations across different frequency bands, the first layer of the regional feature extraction network is divided into three parallel branches, each limiting the receptive field of the input data stream. The first convolutional group reads only the first 14 rows of data, extracting a 1×14×36 sub-tensor input; the second convolutional group extracts rows 15 to 29, resulting in a 1×15×36 sub-tensor input; and the third convolutional group reads the remaining 20 rows, corresponding to a 1×20×36 sub-tensor input. These three independent convolutional groups all use 3×3 two-dimensional convolutional kernels with a stride of 1 and a padding parameter of 1. Assuming each convolutional group has a default configuration of 64 computation channels, the first convolutional group outputs a 64×14×36 three-dimensional tensor feature map. This three-dimensional tensor is then flattened into a one-dimensional feature column vector with a length of 64×14×36=32256. Similarly, the second convolutional group outputs a 64×15×36 three-dimensional tensor and flattens it into a vector of length 34560. The third convolutional group outputs a 64×20×36 three-dimensional tensor and flattens it into a vector of length 46080. In the feature fusion stage, a concatenation process is performed, extending along the one-dimensional direction of the feature column vectors. , , The three flattened data segments are concatenated end-to-end. After splicing and combining, a feature column vector with a total length of 32256 + 34560 + 46080 = 112896 is obtained. This complete column vector serves as the input to the subsequent decision network, i.e., the initial harmonic features.

[0021] In an optional embodiment, the step of training the cascaded model using an alternating optimization strategy, fixing the parameters of the risk source determination network and updating the parameters of the regional feature extraction network, adjusting the computational resource allocation of each parallel convolutional kernel group according to the gradient of the loss function with respect to the initial harmonic features, fixing the parameters of the regional feature extraction network and updating the parameters of the risk source determination network, and iterating cyclically, includes: The partial derivative vector of the current target loss value with respect to the feature elements of the first, second, and third convolutional groups in the initial harmonic features is calculated using the chain rule in the backpropagation algorithm. Calculate the arithmetic mean of the absolute values ​​of each numerical element in each partial derivative vector to obtain the scalar value of the gradient importance index within each group; Using the sum of the scalar values ​​of the gradient importance index within the three groups and the sum of the preset positive number ε as the denominator, the proportion of the scalar value of the gradient importance index within each group to the denominator is calculated to obtain the computing power allocation ratio of each convolution group. The total budget constant of 64 for fixed convolution channels is multiplied by the computing power allocation ratio obtained from each convolution group, and the product is rounded down to obtain the number of channels allocated to each group. If the sum of the number of channels is less than the total convolutional channel budget constant of 64, the difference in the number of channels will be compensated to the convolutional group with the largest gradient importance index scalar value within the group, so as to obtain the final number of activated channels for each convolutional group. In the subsequent forward operation stage of the network, for the first convolutional group, the second convolutional group, and the third convolutional group, the sum of the absolute values ​​of the partial derivative elements corresponding to each feature channel in each convolutional group is calculated as the channel gradient importance. The feature channels corresponding to the number of activated channels are retained in descending order of channel gradient importance, and the remaining feature channels are zeroed out.

[0022] During backpropagation training, the model calculates the target loss value L for the current batch based on the set multi-label cross-entropy loss function. Using the chain rule, L is obtained for each segment of the three feature data output from the first, second, and third convolutional groups in the initial harmonic features. , , The vector of partial derivatives of is denoted as . , , For these three gradient vectors, take the absolute value of each numerical element within the vector and perform arithmetic summation. Then, divide each element by the number of elements in the corresponding gradient vector to normalize the dimension, obtaining the scalar values. , , Assuming that the calculation is performed in one iteration... =15.2、 =28.5、 =13.3. Based on these three scalar values, calculate their global sum. =15.2 + 28.5 + 13.3 = 57.0. Dividing each scalar by the sum yields the computing power allocation ratio: =15.2 / 57.0≈0.267、 =28.5 / 57.0=0.500 =13.3 / 57.0≈0.233. Multiply this ratio by the set channel budget constant of 64 and round down to obtain the basic channel allocation: the first convolutional group is allocated 17 channels. The result is 64 × 0.267, rounded down; the second convolutional group has 32 channels. The result is 64 × 0.500, rounded down; the third convolutional group has 14 channels. The result is 64 × 0.233, rounded down. The sum of the channel counts is now 17 + 32 + 14 = 63, less than the total budget of 64, resulting in one extra channel. To fully utilize computing resources, a comparison is made... The size of the second convolutional group is used as an indicator to determine its size. That is, the maximum is 28.5, and the compensation for this one difference channel is given to ,make The final number of activated channels becomes 33, with the final number of activated channels for each group being 17, 33, and 14. In the next round of network forward computation, the 64 feature channels generated within each convolutional group are sorted in descending order of their gradient importance. For example, for the second convolutional group, only the top 33 channels are retained for feature propagation, while the remaining 31 channels are set to zero. This suppresses the interference of low-importance channels on subsequent decision-making networks and reduces the amount of effective features involved in subsequent processes.

[0023] In an optional embodiment, the step of accumulating the gradient of the corresponding confidence level with respect to the initial harmonic characteristics to obtain the characteristic gradient benchmark of each typical harmonic source when each typical harmonic source is identified with high confidence includes: Extract the confidence values ​​representing the occurrence probability of each typical harmonic source from the output layer of each decision operation; Filter out harmonic source categories whose current predicted values ​​fall within the closed interval of 0.90 to 1.00; With fixed model parameters, the column vector of the partial derivative gradient information of the confidence of the target harmonic source category with respect to the initial harmonic features is calculated by back-derivative calculation and stored in the cache set of the corresponding label category; After the set 1000 global iteration rounds are completed, the matrix mean operation is performed by adding all the column vectors of partial derivative gradient information collected under the same harmonic source category target, and then dividing them by the total number of collections. The mean result of this operation is then extracted to construct the corresponding feature gradient benchmark.

[0024] At the end of each decision operation in the forward decision-making stage of model training, a probability confidence vector representing multiple typical harmonic sources is extracted from the classification output layer. Each element in this vector represents the confidence value of the corresponding typical harmonic source. Conditional filtering is applied to this vector to select specific prediction targets whose values ​​fall within the high-confidence closed interval of 0.90 to 1.00. For example, in a certain determination of inverter harmonic sources, the prediction confidence of this category reaches... =0.95, meeting the screening criteria, therefore the frequency converter category is selected as the current harmonic source category target. The confidence scalar of this target is calculated using the automatic differentiation method. Regarding the initial harmonic characteristic column vector The partial derivatives are used to generate a column vector of gradient information. The gradient vector is then stored in the corresponding category's cache set. After 1000 iterations of training, the element-wise mean of all partial derivative gradient information column vectors in the category's cache set is calculated to obtain the corresponding feature gradient baseline.

[0025] The determination module is used to obtain the confidence vector of the data to be identified through the trained cascaded model, obtain the instantaneous gradient of the target confidence with respect to the initial harmonic features based on the back derivative, determine the risk coefficient of each typical harmonic source based on the matching degree between the instantaneous gradient and the feature gradient benchmark and the confidence vector, and obtain the final harmonic risk identification result by weighted summation of each risk coefficient.

[0026] Real-time current data to be identified is collected, and a two-dimensional harmonic spectrum to be identified is generated according to the aforementioned periodic clipping and Fourier transform process. The two-dimensional harmonic spectrum to be identified is input into a cascaded model with fixed parameters after training. A regional feature extraction network is used to obtain a real-time initial harmonic feature vector, and a risk source determination network outputs real-time confidence vectors for each preset typical harmonic source. Using each element in the real-time confidence vector as a target scalar, the partial derivative of each target scalar with respect to the real-time initial harmonic feature vector is calculated to obtain the instantaneous gradient vector corresponding to each typical harmonic source. Subsequently, the feature gradient benchmarks of each typical harmonic source generated during the training phase are retrieved from the storage unit. The cosine similarity between each instantaneous gradient vector and the corresponding category feature gradient benchmark is calculated, and the cosine similarity is truncated to non-negative values, setting values ​​less than zero to zero to obtain the gradient matching degree. The real-time confidence level of each typical harmonic source is multiplied by its corresponding gradient matching degree to obtain the preliminary risk coefficient of the corresponding typical harmonic source. Then, the preliminary risk coefficient is multiplied by a preset damage severity amplification factor, and the product results for each category are summed to obtain the final harmonic risk identification result. An alarm is triggered when the final harmonic risk identification result exceeds a set safety threshold. The harmonic risk coefficient calculation and alarm logic are as follows: Figure 2 As shown.

[0027] In an optional embodiment, the confidence vector of the data to be identified is obtained through a trained cascaded model. The instantaneous gradient of the target confidence with respect to the initial harmonic features is obtained based on back-derivative calculation. The risk coefficient of each typical harmonic source is determined based on the matching degree between the instantaneous gradient and the feature gradient benchmark, combined with the confidence vector. Finally, the risk coefficients are weighted and summed to obtain the final harmonic risk identification result, including: The input data of the scenario to be verified is used to obtain a confidence vector through forward computation. The confidence of each category in the confidence vector is used as the target confidence. Based on the backward derivative, the instantaneous gradient one-dimensional vector of the corresponding category with respect to the initial harmonic features is generated. Retrieve the archived feature gradient baseline column vector that matches the current judgment label and perform vector dot product operation; Divide the dot product result by the normalized denominator to obtain the cosine similarity metric. Wherein, the normalized denominator is the product of the second norm modulus of the instantaneous gradient one-dimensional vector and the second norm modulus of the characteristic gradient reference column vector, plus a preset positive number ε; The cosine similarity metric is truncated to non-negative values, and values ​​less than zero are set to zero to obtain the gradient matching degree. The extracted target identification probability confidence value is multiplied with the gradient matching degree to calibrate and obtain the risk index coefficient under the independent evaluation of a single event. Extract the preset damage severity amplification coefficients corresponding to each typical harmonic source, multiply them one by one with the hazard index coefficients and accumulate them to output the final risk level value.

[0028] For a measured current input data of a scenario to be verified, the model first outputs a confidence vector representing the probability of each category through forward computation. Assuming that in the prediction results, a certain type of typical harmonic source, such as an electric arc furnace, has the highest identification confidence level, the value is... =0.85. Using this as the target confidence level, inverse differentiation is initiated to generate the target confidence scalar. The one-dimensional vector of instantaneous gradient of the initial harmonic characteristics The feature gradient reference column vector corresponding to the same type of harmonic source in the storage unit is retrieved by tag index. The calculation module performs an inner product operation on the two feature vectors of the same dimension to obtain the dot product scalar result. Calculate the vectors respectively. sum vector The modulus of the second norm is denoted as . and Dividing the dot product result D by the product of the two moduli yields a cosine similarity metric within a closed interval of -1 to +1. This cosine similarity metric is then truncated to obtain the gradient matching degree. For example, if the calculated cosine similarity score is 0.88, and the gradient matching degree remains 0.88 after non-negative truncation, it indicates that the intrinsic feature pattern of the current sample causing this risk is highly consistent with the baseline. Multiplying the previously extracted recognition probability confidence value of 0.85 with the gradient matching degree of 0.88 yields the hazard index coefficient for this independent event. =0.85 × 0.88 = 0.748. Query the preset feature library to extract the damage severity amplification factor corresponding to this type of harmonic source, for example, set... =5.0. Weights Risk index coefficient The values ​​are multiplied to obtain individual values, and then summed up for each detection category. Assuming the final risk level value after full summation is 3.74, this comprehensive calculation value is then used to output an alarm result.

[0029] In a second embodiment, the present invention also proposes a distribution box harmonic risk identification system, comprising the following modules: The calculation module is used to periodically cut the time-series current data of the distribution box monitoring point, calculate the amplitude and phase of multiple specified order harmonics, and construct a two-dimensional harmonic spectrum based on the harmonic order and the discretized phase interval relative to the fundamental wave. A construction module is used to build a cascaded model consisting of a regional feature extraction network and a risk source determination network. The regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features. The risk source determination network receives the initial harmonic features and outputs the confidence vectors of each preset typical harmonic source. The cascaded model is trained using an alternating optimization strategy. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed. The computational resource configuration of each parallel convolutional kernel group is adjusted according to the gradient of the loss function with respect to the initial harmonic features. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed and the process is iterated. When each typical harmonic source is identified with high confidence, the gradient of the corresponding confidence with respect to the initial harmonic features is accumulated to obtain the feature gradient benchmark of each typical harmonic source. The determination module is used to obtain the confidence vector of the data to be identified through the trained cascaded model, obtain the instantaneous gradient of the target confidence with respect to the initial harmonic features based on the back derivative, determine the risk coefficient of each typical harmonic source based on the matching degree between the instantaneous gradient and the feature gradient benchmark and the confidence vector, and obtain the final harmonic risk identification result by weighted summation of each risk coefficient.

[0030] The above description represents the preferred embodiments of the present invention. It should be noted that, for those skilled in the art, various improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A distribution box capable of identifying harmonic risks, characterized in that, Includes the following modules: The calculation module is used to periodically cut the time-series current data of the distribution box monitoring point, calculate the amplitude and phase of multiple specified order harmonics, and construct a two-dimensional harmonic spectrum based on the harmonic order and the discretized phase interval relative to the fundamental wave. A construction module is used to build a cascaded model consisting of a regional feature extraction network and a risk source determination network. The regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features. The risk source determination network receives the initial harmonic features and outputs the confidence vectors of each preset typical harmonic source. The cascaded model is trained using an alternating optimization strategy. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed. The computational resource configuration of each parallel convolutional kernel group is adjusted according to the gradient of the loss function with respect to the initial harmonic features. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed and the process is iterated. When each typical harmonic source is identified with high confidence, the gradient of the corresponding confidence with respect to the initial harmonic features is accumulated to obtain the feature gradient benchmark of each typical harmonic source. The determination module is used to obtain the confidence vector of the data to be identified through the trained cascaded model, obtain the instantaneous gradient of the target confidence with respect to the initial harmonic features based on the back derivative, determine the risk coefficient of each typical harmonic source based on the matching degree between the instantaneous gradient and the feature gradient benchmark and the confidence vector, and obtain the final harmonic risk identification result by weighted summation of each risk coefficient.

2. The distribution box according to claim 1, characterized in that, The process of periodically cropping the time-series current data from the distribution box monitoring points and calculating the amplitude and phase of multiple specified harmonics includes: Single-phase time-series current data of the distribution box were acquired at a sampling rate of 10kHz; Use a digital low-pass filter with a cutoff frequency higher than the 50th harmonic frequency and lower than half the sampling rate to remove noise signals from the timing current data; Record the occurrence times of two consecutive positive zero crossings of the fundamental component or fundamental reference signal in the filtered time-series current data, and extract the discrete time data points contained between the two times into a complete periodic data. Perform a Discrete Fourier Transform on the complete periodic data to obtain complex frequency domain expressions for the fundamental to the 50th harmonic. Calculate the magnitude of the complex number of each frequency domain expression, and perform normalization conversion based on the number of Discrete Fourier Transform points and the calibration coefficients of the current transformer. Use the conversion result as the amplitude of the corresponding harmonic, and calculate the phase angle of the complex number of each frequency domain expression as the phase of the corresponding harmonic.

3. The distribution box according to claim 1 or 2, characterized in that, The construction of a two-dimensional harmonic spectrum based on the harmonic order and the discretized phase interval relative to the fundamental wave includes: The complete phase period from 0 to 360 degrees is equally divided into 36 discretized phase intervals with a fixed step size of 10 degrees, and column indices from 0 to 35 are compiled sequentially. Subtract the phase of the fundamental wave from the phase of each harmonic from the 2nd to the 50th harmonic, and perform 360-degree modulo normalization on the difference to calculate the relative phase difference of each harmonic to the fundamental wave. Match the corresponding discrete phase interval column index according to the numerical value of the phase difference. Construct a 49-row, 36-column initial 2D matrix with all zeros, and let the row indices from 0 to 48 point to the 2nd to 50th harmonic orders respectively; The specific grid cell of the all-zero initial two-dimensional matrix is ​​addressed according to the column index and row index associated with each order, and the calculated harmonic amplitude of the order is filled into the specific grid cell to obtain the two-dimensional harmonic spectrum.

4. The distribution box according to claim 1, characterized in that, The cascaded model is constructed by a regional feature extraction network and a risk source determination network. The regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features. The risk source determination network receives the initial harmonic features and outputs confidence vectors for each preset typical harmonic source, including: The first layer of the sub-region feature extraction network is fixedly configured with a first convolutional group, a second convolutional group, and a third convolutional group that are independent and parallel to each other; The receptive field of the first convolution group is made to cover only the first 14 rows of grid regions corresponding to the 2nd to 15th harmonics in the two-dimensional harmonic spectrum; The receptive field of the second convolution group is made to cover only the middle 15 rows of grid regions corresponding to the 16th to 30th harmonics; The receptive field of the third convolution group is made to cover only the last 20 rows of grid regions corresponding to the 31st to 50th harmonics; After a 3×3 two-dimensional convolution operation with a stride of 1, the three-dimensional tensor feature map output by each convolution group is extracted and subjected to one-dimensional feature flattening. The one-dimensional feature data of the flattened first, second, and third convolution groups are sequentially connected and arranged in one dimension, spliced ​​together to form a column vector, and set as the initial harmonic feature.

5. The distribution box according to claim 1, characterized in that, The cascaded model is trained using an alternating optimization strategy. The parameters of the risk source determination network are fixed while the parameters of the regional feature extraction network are updated. The computational resource allocation of each parallel convolutional kernel group is adjusted according to the gradient of the loss function with respect to the initial harmonic features. The parameters of the regional feature extraction network are fixed while the parameters of the risk source determination network are updated, and this process is iterated repeatedly. The partial derivative vector of the current target loss value with respect to the feature elements of the first, second, and third convolutional groups in the initial harmonic features is calculated using the chain rule in the backpropagation algorithm. Calculate the arithmetic mean of the absolute values ​​of each numerical element in each partial derivative vector to obtain the scalar value of the gradient importance index within each group; Using the sum of the scalar values ​​of the gradient importance index within the three groups and the sum of the preset positive number ε as the denominator, the proportion of the scalar value of the gradient importance index within each group to the denominator is calculated to obtain the computing power allocation ratio of each convolution group. The total budget constant of 64 for fixed convolution channels is multiplied by the computing power allocation ratio obtained from each convolution group, and the product is rounded down to obtain the number of channels allocated to each group. If the sum of the number of channels is less than the total convolutional channel budget constant of 64, the difference in the number of channels will be compensated to the convolutional group with the largest gradient importance index scalar value within the group, so as to obtain the final number of activated channels for each convolutional group. In the subsequent forward operation stage of the network, for the first convolutional group, the second convolutional group, and the third convolutional group, the sum of the absolute values ​​of the partial derivative elements corresponding to each feature channel in each convolutional group is calculated as the channel gradient importance. The feature channels corresponding to the number of activated channels are retained in descending order of channel gradient importance, and the remaining feature channels are zeroed out.

6. The distribution box according to claim 1 or 4, characterized in that, When each typical harmonic source is identified with high confidence, the characteristic gradient benchmark of each typical harmonic source is obtained by accumulating the gradient of the corresponding confidence level with respect to the initial harmonic characteristics, including: Extract the confidence values ​​representing the occurrence probability of each typical harmonic source from the output layer of each decision operation; Filter out harmonic source categories whose current predicted values ​​fall within the closed interval of 0.90 to 1.00; With fixed model parameters, the column vector of the partial derivative gradient information of the confidence of the target harmonic source category with respect to the initial harmonic features is calculated by back-derivative calculation and stored in the cache set of the corresponding label category; After the set 1000 global iteration rounds are completed, the matrix mean operation is performed by adding all the column vectors of partial derivative gradient information collected under the same harmonic source category target, and then dividing them by the total number of collections. The mean result of this operation is then extracted to construct the corresponding feature gradient benchmark.

7. The distribution box according to claim 1, characterized in that, The confidence vector of the data to be identified is obtained through a trained cascaded model. The instantaneous gradient of the target confidence with respect to the initial harmonic features is obtained based on back-derivative calculation. The risk coefficient of each typical harmonic source is determined based on the matching degree between the instantaneous gradient and the feature gradient benchmark, combined with the confidence vector. Finally, the risk coefficients are weighted and summed to obtain the final harmonic risk identification result, including: The input data of the scenario to be verified is used to obtain a confidence vector through forward computation. The confidence of each category in the confidence vector is used as the target confidence. Based on the backward derivative, the instantaneous gradient one-dimensional vector of the corresponding category with respect to the initial harmonic features is generated. Retrieve the archived feature gradient baseline column vector that matches the current judgment label and perform vector dot product operation; Divide the dot product result by the normalized denominator to obtain the cosine similarity metric. Wherein, the normalized denominator is the product of the second norm modulus of the instantaneous gradient one-dimensional vector and the second norm modulus of the characteristic gradient reference column vector, plus a preset positive number ε; The cosine similarity metric is truncated to non-negative values, and values ​​less than zero are set to zero to obtain the gradient matching degree. The extracted target identification probability confidence value is multiplied with the gradient matching degree to calibrate and obtain the risk index coefficient under the independent evaluation of a single event. Extract the preset damage severity amplification coefficients corresponding to each typical harmonic source, multiply them one by one with the hazard index coefficients and accumulate them to output the final risk level value.

8. A method for identifying harmonic risks in a distribution box, characterized in that, Includes the following steps: The time-series current data of the distribution box monitoring point is periodically clipped, the amplitude and phase of multiple specified order harmonics are calculated, and a two-dimensional harmonic spectrum is constructed based on the harmonic order and the discretized phase interval relative to the fundamental wave. A cascaded model consisting of a regional feature extraction network and a risk source determination network is constructed. The regional feature extraction network sets multiple parallel convolutional kernel groups to concatenate the outputs to obtain initial harmonic features. The risk source determination network receives the initial harmonic features and outputs the confidence vectors of each preset typical harmonic source. The cascaded model is trained using an alternating optimization strategy. The parameters of the regional feature extraction network are updated while the parameters of the risk source determination network are fixed. The computational resource configuration of each parallel convolutional kernel group is adjusted according to the gradient of the loss function with respect to the initial harmonic features. The parameters of the regional feature extraction network are fixed while the parameters of the risk source determination network are updated and iterated repeatedly. When each typical harmonic source is identified with high confidence, the gradient of the corresponding confidence with respect to the initial harmonic features is accumulated to obtain the feature gradient benchmark of each typical harmonic source. The confidence vector is obtained from the trained cascaded model of the data to be identified. The instantaneous gradient of the target confidence with respect to the initial harmonic features is obtained by back-derivative. The risk coefficient of each typical harmonic source is determined by combining the matching degree between the instantaneous gradient and the feature gradient benchmark with the confidence vector. The risk coefficients are then weighted and summed to obtain the final harmonic risk identification result.

9. The method according to claim 8, characterized in that, The process of periodically cropping the time-series current data from the distribution box monitoring points and calculating the amplitude and phase of multiple specified harmonics includes: Single-phase time-series current data of the distribution box were acquired at a sampling rate of 10kHz; Use a digital low-pass filter with a cutoff frequency higher than the 50th harmonic frequency and lower than half the sampling rate to remove noise signals from the timing current data; Record the occurrence times of two consecutive positive zero crossings of the fundamental component or fundamental reference signal in the filtered time-series current data, and extract the discrete time data points contained between the two times into a complete periodic data. Perform a Discrete Fourier Transform on the complete periodic data to obtain complex frequency domain expressions for the fundamental to the 50th harmonic. Calculate the magnitude of the complex number of each frequency domain expression, and perform normalization conversion based on the number of Discrete Fourier Transform points and the calibration coefficients of the current transformer. Use the conversion result as the amplitude of the corresponding harmonic, and calculate the phase angle of the complex number of each frequency domain expression as the phase of the corresponding harmonic.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of claim 6.