A three-phase unbalanced current detection method and system based on SVG
By converting the three-phase current data into SVG vector graphics and performing spatial segmentation and clustering, the problems of measurement error and model fitting difficulties in traditional detection methods are solved, and high-precision detection and multi-angle description of three-phase current imbalance are achieved.
Patent Information
- Application Number
- CN202411696784.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The traditional three-phase imbalance current detection method has measurement errors, a large impact on environmental noise, insufficient preliminary processing of current data, and it is difficult for a fixed model to fit complex three-phase current waveforms, resulting in limited detection performance.
The three-phase imbalance current detection method based on SVG is adopted, and the three-phase current data is collected for preprocessing, converted into SVG vector graphics, and spatial segmentation and clustering are performed to construct a circular area. The SVG graphics are optimized through an optimization algorithm, and the imbalance value of the three-phase current is finally calculated.
It realizes a comprehensive and multi-angle description of three-phase current imbalance, improves detection accuracy and reliability, and gives a clear balance threshold, providing strong support for the refined control of power quality.
Smart Images

Figure CN119178929B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of current detection, and more specifically, to a three-phase unbalanced current detection method and system based on SVG. Background Art
[0002] In modern power systems, the balance of three-phase current is directly related to the safe and stable operation of the entire system; however, affected by many factors, the three-phase current is often in an unbalanced state. If it is not discovered and handled in time, it is very likely to cause a series of serious consequences; the traditional three-phase unbalanced current detection method has many limitations and it is difficult to meet the requirements of detection performance in the increasingly complex power grid environment.
[0003] First, the traditional method mainly relies on current transformers or clamp meters to directly measure the current value, and then obtains the imbalance degree through simple mathematical calculations; this method is easily affected by measurement errors and environmental noise, especially under conditions of severe electromagnetic interference and frequent load fluctuations, the accuracy and reliability of the detection results are difficult to guarantee; once key equipment or important users are in a serious imbalance state and are not discovered in time, it is very likely to cause a series of problems such as equipment overheating and damage, power quality degradation, and even cause local or even large-scale power outages; secondly, the traditional method does not pay enough attention to the initial processing of current data, ignoring the rich information contained in the current signal; due to the complex and changeable actual power grid environment, the current signal is often mixed with various noises and redundant components, such as harmonics. Waves, intermittent disturbances, etc., if not effectively processed, will seriously affect the accuracy of subsequent analysis; secondly, most methods rely on pre-established mathematical models for detection, such as Fourier series models, parameterized models, etc., but the actual three-phase current waveform often has complex characteristics such as nonlinearity and non-stationarity. These fixed models are difficult to fit well, resulting in large modeling errors. The three-phase current waveforms under different working conditions may be quite different. Existing methods usually use fixed analysis processes and parameter settings, lack adaptive adjustment capabilities, and cannot make reasonable adjustments for different situations, resulting in limited detection performance. Finally, most methods regard the three-phase current waveform as a black box, and ultimately only give an imbalance degree value, lacking an explanation of the internal mechanism.
[0004] In view of this, the present invention proposes a three-phase unbalanced current detection method and system based on SVG to solve the above problem. Summary of the invention
[0005] In order to overcome the above defects of the prior art and to achieve the above objectives, the present invention provides the following technical solutions: A three-phase unbalanced current detection method based on SVG, comprising: S1, collecting three-phase current data, and preprocessing the three-phase current data to obtain three-phase current standard data;
[0006] S2, converting the three-phase current standard data into SVG vector graphics; and performing spatial segmentation on the SVG vector graphics to obtain M cell regions;
[0007] S3, extracting SVG data points from the SVG vector graphics, and clustering the SVG data points in each cell area to obtain n categories;
[0008] S4. Construct a circular area for each category; superimpose all the circular areas to form a new SVG graphic; optimize the new SVG graphic using an optimization algorithm to obtain an optimized SVG graphic;
[0009] S5. Calculate the unbalanced value of the three-phase current according to the optimized SVG graph, preset a balance threshold, and send a warning message to the current detection terminal when the unbalanced value is greater than the balance threshold.
[0010] Furthermore, the method of preprocessing the three-phase current data includes:
[0011] The three-phase current data is centralized to obtain a decentralized three-phase current signal; the decentralized three-phase current signal is subjected to preliminary matrix processing to obtain an observation signal matrix X;
[0012] Map the observed signal matrix X into the reproducing kernel Hilbert space to obtain the kernel matrix , the separation optimization objective is defined in the reproducing kernel Hilbert space as maximizing the separation function ;in, is the dual variable;
[0013] ;in, For the general Acting on the kernel matrix The vector obtained later is is the hyperbolic tangent function, is the regularization coefficient; is the square of the Frobenius norm;
[0014] The Lagrange multiplier method is used to solve the separation optimization objective and obtain the dual variable The estimated value of The separation matrix is calculated by estimating the value of ;in, It is a nonlinear mapping function that maps the observed signal matrix X to the reproducing kernel Hilbert space; using the separation matrix Separate the observation signal matrix X to obtain the independent component matrix ;
[0015] Compute independent component matrix The statistical characteristics of each independent component in include mean, variance, kurtosis and negative entropy ; Independent component matrix No. The column vector is , indicating the independent components;
[0016] Negative Entropy The calculation formula is:
[0017] ;in, is a natural constant, is a random variable; for The probability density function of It means to perform integral operation on the whole real number domain within the brackets;
[0018] For Mean, variance, kurtosis and negentropy of independent components , respectively set a threshold, if the Mean, variance, kurtosis and negentropy of independent components are all less than the corresponding threshold, then independent components are determined as noise components; the independent components determined as noise components are set to zero; independent components other than noise components are extracted as useful signals to form a useful component subset;
[0019] Using separation matrix The pseudo-inverse matrix , reconstruct the useful signal component subset and obtain the reconstructed signal ; For the reconstructed signal Perform reverse processing to obtain three-phase current standard data.
[0020] Furthermore, the method of performing preliminary matrix processing includes:
[0021] The decentralized three-phase current signal is transformed by wavelet to obtain wavelet components at different scales. On the top, calculate the covariance matrix of the corresponding wavelet component ;in, To find the expected value operator, Indicated in scale The high-frequency detail components obtained by the above decomposition; is the regularization parameter, for The transpose of is the prior term matrix;
[0022] For each scale The covariance matrix of Perform eigenvalue decomposition to obtain the corresponding eigenvector matrix and the diagonal matrix ;
[0023] Based on the eigenvector matrix and the diagonal matrix Calculate each scale The initial matrix on ;
[0024] ;in, is the identity matrix, For scale The adjustment parameters on For scale The original structured matrix on ; is the eigenvector matrix The transpose of For scale The core matrix on ; is the bandwidth parameter;
[0025] Using the preliminary matrix For each scale on Transform to obtain the preliminary wavelet components ; Reconstruct the preliminary wavelet components at all scales to obtain the final observation signal matrix X.
[0026] Furthermore, the method of converting the three-phase current standard data into SVG vector graphics includes:
[0027] Normalize the three-phase current standard data so that its value range is between 0 and 1; define a two-dimensional coordinate system, with the horizontal axis representing time and the vertical axis representing current value;
[0028] According to the normalized three-phase current standard data, three curves are drawn in a two-dimensional coordinate system, each curve corresponds to one phase current, and time is used as the horizontal axis coordinate and the corresponding current value is used as the vertical axis coordinate. They are sequentially connected into a smooth curve to obtain a three-phase current curve;
[0029] A rectangular area is defined as the SVG drawing area, and the three-phase current curve is mapped to the coordinate system of the SVG drawing area according to a preset ratio to obtain an SVG vector graphic.
[0030] Furthermore, the method of performing space segmentation includes:
[0031] Determine the pixel size of the SVG vector graphic, divide the area of the SVG vector graphic into a regular pixel grid, and for each pixel of the pixel grid, if the pixel is located on the three-phase current curve, assign a value of 1, otherwise assign a value of 0, and obtain a binary pixel matrix;
[0032] Each pixel is regarded as a cell, and the pixel value is used as the state of the corresponding cell, that is, the cell state is 0 or 1; the neighborhood of each cell is defined as the area consisting of the 4 nearest neighbor cells in the upper, lower, left, and right directions and the cells in the four diagonal directions, a total of 8 neighbors;
[0033] Starting from any position of the binary pixel matrix, traverse each cell in a preset scanning order. For the scanned cells, update them according to the cell states of the cells in their neighborhood and the preset cell state rules to obtain their new states. Repeat the update until the cell states of all cells no longer change.
[0034] Ways to update include:
[0035] For each cell , calculate the minimum Euclidean distance to all cells with a cell state of 1, and scale the calculated minimum Euclidean distance value to the range of [0, 1] to obtain a distance value set ;
[0036] Defining rule thresholds ;in, is a distance value set The mean of is a distance value set the median of is a distance value set The standard deviation of is a distance value set The interquartile range of is obtained based on kernel density estimation The probability density function of , , , and is the weight of the corresponding item, and ;
[0037] For each cell, count the number of cells in its neighborhood whose cell state is 1 , for cells whose current state is 0, if And the minimum Euclidean distance from this cell to the cell with cell state 1 is less than , then update its state to 1, otherwise keep it as 0; for cells whose current state is 1, if Or the minimum Euclidean distance from the cell to the cell with cell state 1 is greater than , then update its status to 0, otherwise keep it as 1;
[0038] For adjacent cells with the same state, they are classified into the same preliminary cell region to obtain the initial segmentation result, that is, the SVG vector graphics is divided into several independent preliminary cell regions;
[0039] A region area threshold is preset, and the cell regions with an area greater than or equal to the region area threshold are recorded as large regions; the cell regions with an area less than the region area threshold are merged into the nearest neighbor large region to obtain M cell regions.
[0040] Furthermore, the method of clustering the SVG data points in each cell region includes:
[0041] For Cell regions, extract all SVG data points in the cell region and form a regional data point set, denoted as ,in For the The number of SVG data points in a cell area;
[0042] Define a clustering network whose topological structure adopts a hexagonal grid; randomly initialize the reference vector for each node of the clustering network, and set the initial values of the learning rate and neighborhood radius;
[0043] For cell area, and all SVG data points in the cell area are used as input data points; for each input data point , calculate it and all nodes in the clustering network Similarity ;
[0044] in Is a node The reference vector, is the bandwidth parameter, is the weight coefficient of the coordinate prior term, is the weight coefficient of the direction angle prior term, For input data points The location coordinates of For Node The location coordinates of For input data points The direction angle, For Node The direction angle of
[0045] Based on the similarity, calculate the input data points For each node Core Degree ;
[0046] Core Degree ;in, is the index of all nodes in the clustering network, is the fuzzification parameter, which controls the fuzziness of the core degree. For input data points With Node similarity;
[0047] Preset core threshold, for each input data point , mark the nodes whose coreness is greater than the core threshold as core nodes, and all core nodes constitute the corresponding input data points The core node set; for each core node and the nodes in its network neighborhood, update its reference vector;
[0048] The update formula of the reference vector is:
[0049] ;in, For Node In time The reference vector, For Node In time The reference vector of For time The learning rate; To update the index parameters; For in time Core Node With Node The neighborhood function value between ; For time Input data point at time
[0050] After each update, the network neighborhood radius is reduced and repeated until the preset maximum number of iterations is reached; for each SVG data point in the cell area, it is classified into the category of the node closest to it; that is, the SVG data point in each cell area is divided into n categories.
[0051] Furthermore, the method of constructing a circular area for each category includes:
[0052] For each category q in each cell area, calculate the centroid of all SVG data points in the category as the center point C_q; calculate the distance from all SVG data points in category q to the center point C_q; find the maximum distance from the SVG data points in category q to the center point C_q as the radius V_k of the category; for each category q, draw a circular area in the SVG drawing area with the center point C_q as the center and V_k as the radius.
[0053] Furthermore, the method of optimizing the new SVG graphic includes:
[0054] Initialize N1 spheres to form a sphere group, each sphere It consists of the coordinates of the sphere center and the radius of the sphere. The coordinates of the sphere center are randomly generated within the boundary of the new SVG graphic, and the radius is randomly generated within a fixed range.
[0055] Define the spherical function, the formula of the spherical function is:
[0056] ;in, For sphere The function value of the spherical function is denoted as sphere Sphere value of For sphere The overlap area with the new SVG shape, For sphere The sum of the overlapping areas with other spheres; , , and is a positive weight parameter;
[0057] Select two spheres according to a preset fixed probability and , generate a new sphere ; then the new sphere The coordinates of the center of the sphere are ;
[0058] ;
[0059] ; In the formula, and is a random number between 0 and 1;
[0060] new sphere The radius of the sphere is ;in, is a random number that obeys a uniform distribution, with a value range of [-η, η], where η is the preset maximum disturbance ratio; is a random number between 0 and 1;
[0061] If the new sphere If the coordinates of the center of the sphere exceed the boundaries of the new SVG graphic, it will be projected onto the boundaries. If the sphere radius is not within the preset sphere radius interval [r_max, r_min], it is adjusted to the sphere radius interval [r_max, r_min]; wherein r_max is the upper limit of the sphere radius interval, and r_min is the lower limit of the sphere radius interval;
[0062] Calculate the new sphere The function value of the spherical function , denoted as the new sphere spherical value; if If it is greater than the smallest sphere value in the sphere group, then use Replace the sphere with the smallest sphere value;
[0063] Repeat until the preset number of replacements is reached, and output the final group of spheres, that is, the optimized SVG graphic.
[0064] Furthermore, the method for calculating the unbalance degree value of the three-phase current includes:
[0065] Extract the coordinate information of each sphere from the optimized SVG graphic, the coordinate information includes the coordinates of the sphere center and the sphere radius;
[0066] Normalize the coordinate information of each sphere so that its value range is between 0 and 1; define three variables , and , respectively corresponding to the effective value of the three-phase current, initially , and All equal to 0;
[0067] For each sphere, calculate its area, sort the spheres according to the ordinate values of their center coordinates from small to large, and divide them into three groups, corresponding to the three phases;
[0068] For the spheres in the first group, add the areas of the spheres to ; For the spheres in the second group, add the area of each sphere to ; For the spheres in the third group, add the area of each sphere to The imbalance degree value ;in, for , and The mean of .
[0069] A three-phase unbalanced current detection system based on SVG, which is used to implement the three-phase unbalanced current detection method based on SVG, comprises:
[0070] The data acquisition and processing module is used to collect three-phase current data and pre-process the three-phase current data to obtain three-phase current standard data;
[0071] A graphics conversion and segmentation module is used to convert the three-phase current standard data into SVG vector graphics; and to perform spatial segmentation on the SVG vector graphics to obtain M cell regions;
[0072] A clustering module is used to extract SVG data points from the SVG vector graphics and cluster the SVG data points in each cell area to obtain n categories;
[0073] The optimization module is used to construct a circular area for each category; superimpose all the circular areas to form a new SVG graphic; and optimize the new SVG graphic using a sphere optimization algorithm to obtain an optimized SVG graphic;
[0074] The calculation and judgment module is used to calculate the imbalance degree value of the three-phase current according to the optimized SVG graphics, preset the balance threshold, and send a warning message to the current detection terminal when the imbalance degree value is greater than the balance threshold; each module is connected by wired and / or wireless means.
[0075] The technical effects and advantages of the three-phase unbalanced current detection method and system based on SVG of the present invention are as follows:
[0076] The present invention effectively processes the current data, fully mines the effective information contained in the current signal, eliminates various noises and interferences, and enables subsequent SVG analysis to be carried out on the basis of high-quality data. Secondly, the current data is cleverly mapped to the SVG vector graphics space. By performing fine-grained spatial segmentation and clustering on the graphics, the characteristic distribution of the current signal in multiple dimensions such as the time domain and the spatial domain is fully considered. It not only accurately depicts the amplitude difference of the three-phase current, but also can keenly capture its subtle imbalance characteristics such as phase and waveform, realizes a full-scale and multi-angle description of the three-phase imbalance, and greatly expands the detection field of the traditional method; furthermore, the SVG graphics are optimized as a whole to obtain a more accurate and reliable three-phase current imbalance geometric representation, which greatly improves the accuracy of the imbalance calculation; finally, the quantitative evaluation of the three-phase imbalance degree is realized, and a clear balance threshold is given, which provides strong support for the refined control of power quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 A schematic diagram of a three-phase unbalanced current detection method based on SVG according to the present invention;
[0078] Figure 2 The figure is a schematic diagram of a three-phase unbalanced current detection system based on SVG according to the present invention. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0080] Example 1: Please refer to Figure 1 As shown, the three-phase unbalanced current detection method based on SVG described in this embodiment includes:
[0081] S1, collecting three-phase current data, and preprocessing the three-phase current data to obtain three-phase current standard data;
[0082] S2, converting the three-phase current standard data into SVG vector graphics; and performing spatial segmentation on the SVG vector graphics to obtain M cell regions, where M is a positive integer greater than 1;
[0083] S3, extracting SVG data points from the SVG vector graphics, and clustering the SVG data points in each cell area to obtain n categories;
[0084] S4. Construct a circular area for each category; superimpose all the circular areas to form a new SVG graphic; optimize the new SVG graphic using an optimization algorithm to obtain an optimized SVG graphic;
[0085] S5. Calculate the unbalanced value of the three-phase current according to the optimized SVG graph, preset a balance threshold, and when the unbalanced value is greater than the balance threshold, it indicates that the three-phase current is unbalanced, and send an early warning message to the current detection terminal.
[0086] Define the sampling frequency, use current transformers or current clamp meters, and perform real-time sampling and digitization of the three-phase currents in the three-phase power supply system based on the sampling frequency; to ensure that enough data points are captured to accurately reflect the details of the current waveform and obtain three-phase current data.
[0087] The methods for preprocessing three-phase current data include:
[0088] The three-phase current data is centered, that is, the mean is subtracted to make it have a zero mean, and a decentralized three-phase current signal is obtained; the decentralized three-phase current signal is subjected to preliminary matrix processing to remove the correlation between signal components and obtain the observation signal matrix X.
[0089] Ways to perform preliminary matrix processing include:
[0090] The decentralized three-phase current signal is transformed by wavelet to obtain wavelet components at different scales (including low-frequency approximate components and high-frequency detail components). On the top, calculate the covariance matrix of the corresponding wavelet component ;in, To find the expected value operator, Indicated in scale The high-frequency detail component obtained by the above decomposition is a vector; is the regularization parameter used to avoid the covariance matrix The eigenvalue of is too small or close to 0. for The transpose of is a priori term matrix. Specifically, the prior term matrix is a 3×3 matrix, in which the diagonal elements reflect the variance priors of each phase current component of the three-phase current component, and the non-diagonal elements reflect the correlation coefficient priors between different phase current components; under normal circumstances, the three-phase current phases are staggered by 120°, and the correlation coefficient is -0.5.
[0091] For each scale The covariance matrix of Perform eigenvalue decomposition to obtain the corresponding eigenvector matrix and the diagonal matrix .
[0092] Based on the eigenvector matrix and the diagonal matrix Calculate each scale The initial matrix on ;
[0093] ;in, is the identity matrix, For scale The adjustment parameter on is a non-negative constant, For scale The original structured matrix on the scale reflects the three-phase current signal Prior structural information on ; is the eigenvector matrix The transpose of For scale The core matrix on the scale is based on the three-phase current signal The historical data settings on the scale reflect the The ideal correlation and constraint relationship between the upper three-phase current components; is the bandwidth parameter, when When it is large, the kernel function value will be large only when the input sample is very close to the kernel matrix; when When it is small, the value may be large even if the input sample is some distance away from the core matrix.
[0094] Using the preliminary matrix For each scale on Transform to obtain the preliminary wavelet components ; Reconstruct the preliminary wavelet components at all scales to obtain the final observation signal matrix X.
[0095] Map the observed signal matrix X into the reproducing kernel Hilbert space to obtain the kernel matrix , the separation optimization objective is defined in the reproducing kernel Hilbert space as maximizing the separation function ;in, is the dual variable, a vector with the same dimension as the observation signal matrix X.
[0096] ;in, For the general Acting on the kernel matrix The vector obtained later is is the hyperbolic tangent function, is the regularization coefficient, which controls the weight of the regularization term; is the square of the Frobenius norm.
[0097] The Lagrange multiplier method is used to solve the separation optimization objective and obtain the dual variable The estimated value of The separation matrix is calculated by estimating the value of ;in, It is a nonlinear mapping function that maps the observed signal matrix X to the reproducing kernel Hilbert space; using the separation matrix Separate the observation signal matrix X to obtain the independent component matrix .
[0098] Compute independent component matrix The statistical characteristics of each independent component in include mean, variance, kurtosis and negative entropy ; Independent component matrix No. The column vector is , indicating the An independent component.
[0099] Negative Entropy The calculation formula is:
[0100] ;in, is a natural constant, is a random variable, taking any real value; for The probability density function of is obtained by density estimation methods, such as kernel density estimation, nearest neighbor density estimation, etc. It means to perform an integral operation on the entire real number domain within the brackets to obtain an integral value.
[0101] For Mean, variance, kurtosis and negentropy of independent components , respectively set a threshold, if the Mean, variance, kurtosis and negentropy of independent components are all less than the corresponding threshold, then The independent components are determined to be noise components; the independent components determined to be noise components are set to zero; and the independent components other than the noise components are extracted as useful signals to form a useful component subset.
[0102] Using separation matrix The pseudo-inverse matrix , reconstruct the useful signal component subset and obtain the reconstructed signal ; For the reconstructed signal After reverse processing, the final filtered output signal is obtained, which is the three-phase current standard data.
[0103] Specifically, the reconstructed signal is inner-producted with the wavelet basis functions at different scales to obtain the wavelet component coefficients at the corresponding scales; the wavelet component coefficients at all scales are reconstructed to obtain the reconstructed signal in the time domain; the covariance matrix of the time domain reconstructed signal is calculated; the covariance matrix is eigenvalue decomposed to obtain the eigenvalue diagonal matrix and the eigenvector matrix; a matrix is constructed using the eigenvalue diagonal matrix and the eigenvector matrix; the time domain reconstructed signal is multiplied by the constructed matrix to obtain the final filtered output signal, i.e., the three-phase current standard data.
[0104] The three-phase current standard data is normalized so that its value range is between 0 and 1, using methods such as maximum and minimum value normalization or Z-Score standardization.
[0105] A two-dimensional coordinate system is defined, in which the horizontal axis represents time and the vertical axis represents current value; the range of the two-dimensional coordinate system is determined so that the three-phase current curve can be completely drawn therein.
[0106] According to the normalized three-phase current standard data, three curves are drawn in a two-dimensional coordinate system. Each curve corresponds to one phase current. Time is used as the horizontal axis coordinate and the corresponding current value is used as the vertical axis coordinate. They are connected in sequence into a smooth curve to obtain a three-phase current curve.
[0107] A rectangular area is defined as the SVG drawing area, and the three-phase current curve is mapped to the coordinate system of the SVG drawing area according to a preset ratio to obtain an SVG vector graphic.
[0108] The resolution (pixel size) of the SVG vector graphic is determined, and the area of the SVG vector graphic is divided into a regular pixel grid. For each pixel of the pixel grid, if the pixel is located on the three-phase current curve, it is assigned a value of 1, otherwise it is assigned a value of 0, and a binary pixel matrix is obtained.
[0109] Each pixel is regarded as a cell, and the pixel value is used as the state of the corresponding cell, that is, the cell state is 0 or 1, 0 represents the background, and 1 represents the foreground (curve).
[0110] The neighborhood of each cell is defined as the area consisting of the four nearest neighbor cells on the top, bottom, left, and right sides and the cells in the four diagonal directions, a total of eight neighbors.
[0111] Starting from any position of the binary pixel matrix, each cell is traversed in a preset scanning order (such as left to right, top to bottom). For the scanned cells, they are updated according to the cell states of the cells in their neighborhood and the preset cell state rules to obtain their new states. The update is repeated until the cell states of all cells no longer change.
[0112] Ways to update include:
[0113] For each cell , calculate the minimum Euclidean distance to all cells with a cell state of 1, and scale the calculated minimum Euclidean distance value to the range of [0, 1] to obtain a distance value set .
[0114] Defining rule thresholds ;in, is a distance value set The mean of is a distance value set the median of is a distance value set The standard deviation of is a distance value set The interquartile range of is obtained based on kernel density estimation The probability density function of , , , and is the weight of the corresponding item, and .
[0115] For each cell, count the number of cells in its neighborhood whose cell state is 1 , for cells whose current state is 0 (background), if And the minimum Euclidean distance from this cell to the cell with cell state 1 is less than , then update its state to 1 (foreground), otherwise keep it as 0; for cells whose current state is 1 (foreground), if Or the minimum Euclidean distance from the cell to the cell with cell state 1 is greater than , then update its state to 0 (background), otherwise keep it as 1.
[0116] For adjacent cells with the same state, they are classified into the same preliminary cell region to obtain an initial segmentation result, that is, the SVG vector graphics is divided into several independent preliminary cell regions.
[0117] A region area threshold is preset, and the cell regions with an area greater than or equal to the region area threshold are recorded as large regions; the cell regions with an area less than the region area threshold are merged into the nearest neighbor large region to obtain M cell regions.
[0118] Ways to extract SVG data points from SVG vector graphics include:
[0119] The SVG vector graphics are composed of a series of control points (SVG data points), which define the shape and path of the curve. The coordinate information of all control points is parsed from the data structure of the SVG vector graphics, and the coordinate information is stored as a set P1 composed of data points. Thus, the extraction of the SVG data points is completed.
[0120] The methods for clustering SVG data points within each cell region include:
[0121] For Cell regions, extract all SVG data points in the cell region and form a regional data point set, denoted as ,in For the The number of SVG data points in the cell area.
[0122] Define a clustering network whose topological structure adopts a hexagonal grid; randomly initialize the reference vector (weight vector) for each node of the clustering network; and set the initial values of the learning rate and neighborhood radius.
[0123] For cell area, and all SVG data points in the cell area are used as input data points; for each input data point , calculate it and all nodes in the clustering network Similarity ;
[0124] ;
[0125] in Is a node The reference vector, is the bandwidth parameter, is the weight coefficient of the coordinate prior term, is the weight coefficient of the direction angle prior term, For input data points The location coordinates of For Node The location coordinates of For input data points The direction angle, For Node The direction angle of the data point. An SVG data point is actually a point on a two-dimensional plane. It has an x-coordinate and a y-coordinate. These two coordinate values constitute the position coordinates of the data point. Similarly, each node in the clustering network also corresponds to a position coordinate. The direction angle can be understood as the tangent direction of the curve where the data point is located. Calculate the slope of the line between adjacent data points, convert it into an angle value in radians, and you will get the direction angle of the data point.
[0126] Based on the similarity, calculate the input data points For each node Core Degree ; The value range is between [0, 1]; coreness ;in, is the index of all nodes in the clustering network, is the fuzzification parameter, which controls the fuzziness of the core degree. For input data points With Node (remove ).
[0127] Preset core threshold, for each input data point , mark the nodes whose coreness is greater than the core threshold as core nodes, and all core nodes constitute the corresponding input data points The core node set of
[0128] For each core node and the nodes within its network neighborhood (obtained by the preset network neighborhood radius), update its reference vector.
[0129] The update formula of the reference vector is:
[0130] ;in, For Node In time The reference vector, For Node In time The reference vector of For time The learning rate, It is a decreasing function that gradually decreases over time to ensure the convergence of the network; To update the exponential parameter, control the degree of update of each step of the function; For in time Core Node With Node The neighborhood function value between them is used to quantify their proximity in the grid topology structure, and is calculated using some distance metric (such as Manhattan distance, Euclidean distance, etc.); For time The input data point at .
[0131] After each update, the network neighborhood radius is reduced and repeated until the preset maximum number of iterations is reached; for each SVG data point in the cell area, it is classified into the category of the node closest to it (based on the distance calculation of the final reference vector); that is, the SVG data points in each cell area are divided into n categories.
[0132] For each category q in each cell area, calculate the centroid of all SVG data points in the category as the center point C_q; calculate the distance from all SVG data points in category q to the center point C_q; find the maximum distance from the SVG data points in category q to the center point C_q as the radius V_k of the category; for each category q, draw a circular area in the SVG drawing area with the center point C_q as the center and V_k as the radius; for all categories of circular areas, we can place their elements in the same group element to achieve a superposition effect.
[0133] Ways to optimize new SVG graphics include:
[0134] Initialize N1 spheres to form a sphere group, each sphere It consists of the coordinates of the sphere center and the radius of the sphere; the coordinates of the sphere center are randomly generated within the boundary of the new SVG graphic, and the radius is randomly generated within a fixed range.
[0135] Define the spherical function, the formula of the spherical function is:
[0136] ;in, For sphere The function value of the spherical function is denoted as sphere Sphere value of For sphere The overlap area with the new SVG shape, For sphere The sum of the overlapping areas with other spheres; , , and is a positive weight parameter;
[0137] Select two spheres according to a preset fixed probability and , generate a new sphere ; then the new sphere The coordinates of the center of the sphere are ;
[0138] ;
[0139] ; In the formula, and A random number between 0 and 1 that controls the new sphere The coordinates of the center of the sphere are and The position between the centers of the balls.
[0140] new sphere The radius of the sphere is ;in, is a random number that obeys a uniform distribution, with a value range of [-η, η], where η is the preset maximum disturbance ratio; A random number between 0 and 1 that controls the new sphere The radius of the sphere is and The size between the radii.
[0141] If the new sphere If the coordinates of the center of the sphere exceed the boundaries of the new SVG graphic, it will be projected onto the boundaries. If the sphere radius is not within the preset sphere radius interval [r_max, r_min], it is adjusted to the sphere radius interval [r_max, r_min]; wherein r_max is the upper limit of the sphere radius interval, and r_min is the lower limit of the sphere radius interval.
[0142] Calculate the new sphere The function value of the spherical function , denoted as the new sphere spherical value; if If it is greater than the smallest sphere value in the sphere group, then use Replace the sphere with the smallest value.
[0143] Repeat until the preset number of replacements is reached, output the final group of spheres, and obtain a group of spheres with the smallest overlapping area. Draw these spheres in SVG graphics to obtain the optimized SVG graphics.
[0144] Methods for calculating the unbalanced value of three-phase current include:
[0145] The coordinate information of each sphere is extracted from the optimized SVG graphic, where the coordinate information includes the coordinates of the sphere center and the sphere radius.
[0146] Normalize the coordinate information of each sphere so that its value range is between 0 and 1; define three variables , and , respectively corresponding to the effective value of the three-phase current, initially , and Both are equal to 0.
[0147] For each sphere, calculate its area, sort the spheres from small to large according to the ordinate values of their center coordinates, and divide them into three equal groups, with the three groups corresponding to the three phases.
[0148] For the spheres in the first group, add the areas of the spheres to ; For the spheres in the second group, add the area of each sphere to ; For the spheres in the third group, add the area of each sphere to ;
[0149] The imbalance value ;in, for , and The mean of .
[0150] In this embodiment, by effectively processing the current data, the effective information contained in the current signal is fully excavated, and various noises and interferences are eliminated, so that the subsequent SVG analysis can be carried out on the basis of high-quality data. Secondly, the current data is cleverly mapped to the SVG vector graphics space. By performing fine-grained spatial segmentation and clustering on the graphics, the characteristic distribution of the current signal in multiple dimensions such as the time domain and the spatial domain is fully considered. It not only accurately depicts the amplitude difference of the three-phase current, but also can keenly capture its phase, waveform and other subtle imbalance characteristics, realizes a full-range and multi-angle description of the three-phase imbalance, and greatly expands the detection field of the traditional method; furthermore, the SVG graphics are optimized as a whole to obtain a more accurate and reliable three-phase current imbalance geometric representation, which greatly improves the accuracy of the imbalance calculation; finally, the quantitative evaluation of the three-phase imbalance degree is realized, and a clear balance threshold is given, which provides strong support for the refined control of power quality.
[0151] Example 2: Please refer to Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a three-phase unbalanced current detection system based on SVG is provided, including:
[0152] The data acquisition and processing module is used to collect three-phase current data and pre-process the three-phase current data to obtain three-phase current standard data;
[0153] A graphics conversion and segmentation module is used to convert the three-phase current standard data into SVG vector graphics; and to perform spatial segmentation on the SVG vector graphics to obtain M cell regions;
[0154] A clustering module is used to extract SVG data points from the SVG vector graphics and cluster the SVG data points in each cell area to obtain n categories;
[0155] The optimization module is used to construct a circular area for each category; superimpose all the circular areas to form a new SVG graphic; and optimize the new SVG graphic using a sphere optimization algorithm to obtain an optimized SVG graphic;
[0156] The calculation and judgment module is used to calculate the imbalance degree value of the three-phase current according to the optimized SVG graphics, preset the balance threshold, and send a warning message to the current detection terminal when the imbalance degree value is greater than the balance threshold; each module is connected by wired and / or wireless means to realize data transmission between modules.
[0157] Embodiment 3: This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the above-mentioned three-phase unbalanced current detection method based on SVG is implemented.
[0158] Since the electronic device introduced in this embodiment is an electronic device used to implement a three-phase unbalanced current detection method based on SVG in the embodiment of the present application, based on the three-phase unbalanced current detection method based on SVG introduced in the embodiment of the present application, the technical personnel of the field can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as the technical personnel of the field implement the electronic device used in the three-phase unbalanced current detection method based on SVG in the embodiment of the present application, it belongs to the scope of protection of the present application.
[0159] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0160] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A three-phase unbalanced current detection method based on SVG, characterized in that: include: S1, collecting three-phase current data, and preprocessing the three-phase current data to obtain three-phase current standard data; S2, converting the three-phase current standard data into SVG vector graphics; and performing spatial segmentation on the SVG vector graphics to obtain M cell regions; S3, extracting SVG data points from the SVG vector graphics, and clustering the SVG data points in each cell area to obtain n categories; S4, construct circular areas for each category; All circular areas are superimposed to form a new SVG graphic; the new SVG graphic is optimized by using an optimization algorithm to obtain an optimized SVG graphic; S5. Calculate the unbalanced value of the three-phase current according to the optimized SVG graph, preset a balance threshold, and send a warning message to the current detection terminal when the unbalanced value is greater than the balance threshold.
2. A three-phase unbalanced current detection method based on SVG according to claim 1, characterized in that: The method of preprocessing the three-phase current data includes: The three-phase current data is centralized to obtain a decentralized three-phase current signal; the decentralized three-phase current signal is subjected to preliminary matrix processing to obtain an observation signal matrix X; Map the observed signal matrix X into the reproducing kernel Hilbert space to obtain the kernel matrix , the separation optimization objective is defined in the reproducing kernel Hilbert space as maximizing the separation function ;in, is the dual variable; ;in, For the general Acting on the kernel matrix The vector obtained later is is the hyperbolic tangent function, is the regularization coefficient; is the square of the Frobenius norm; The Lagrange multiplier method is used to solve the separation optimization objective and obtain the dual variable The estimated value of The separation matrix is calculated by estimating the value of ;in, It is a nonlinear mapping function that maps the observed signal matrix X to the reproducing kernel Hilbert space; using the separation matrix Separate the observation signal matrix X to obtain the independent component matrix ; Compute independent component matrix The statistical characteristics of each independent component in include mean, variance, kurtosis and negative entropy ; Independent component matrix No. The column vector is , indicating the independent components; Negative Entropy The calculation formula is: ;in, is a natural constant, is a random variable; for The probability density function of It means to perform integral operation on the whole real number domain within the brackets; For Mean, variance, kurtosis and negentropy of independent components , respectively set a threshold, if the Mean, variance, kurtosis and negentropy of independent components are all less than the corresponding threshold, then independent components are determined as noise components; the independent components determined as noise components are set to zero; independent components other than noise components are extracted as useful signals to form a useful component subset; Using the separation matrix The pseudo-inverse matrix , reconstruct the useful signal component subset and obtain the reconstructed signal ; For the reconstructed signal Perform reverse processing to obtain three-phase current standard data.
3. The three-phase unbalanced current detection method based on SVG according to claim 2 is characterized in that: The method of performing preliminary matrix processing includes: The decentralized three-phase current signal is transformed by wavelet to obtain wavelet components at different scales. On the top, calculate the covariance matrix of the corresponding wavelet component ;in, To find the expected value operator, Indicated in scale The high-frequency detail components obtained by the above decomposition; is the regularization parameter, for The transpose of is the prior term matrix; For each scale The covariance matrix of Perform eigenvalue decomposition to obtain the corresponding eigenvector matrix and the diagonal matrix ; Based on the eigenvector matrix and the diagonal matrix Calculate each scale The initial matrix on ; ;in, is the identity matrix, For scale The adjustment parameters on For scale The original structured matrix on ; is the eigenvector matrix The transpose of For scale The core matrix on ; is the bandwidth parameter; Using the preliminary matrix For each scale on Transform to obtain the preliminary wavelet components ; Reconstruct the preliminary wavelet components at all scales to obtain the final observation signal matrix X.
4. The three-phase unbalanced current detection method based on SVG according to claim 3 is characterized in that: The method of converting the three-phase current standard data into SVG vector graphics includes: Normalize the three-phase current standard data so that its value range is between 0 and 1; define a two-dimensional coordinate system, with the horizontal axis representing time and the vertical axis representing current value; According to the normalized three-phase current standard data, three curves are drawn in a two-dimensional coordinate system, each curve corresponds to one phase current, and time is used as the horizontal axis coordinate and the corresponding current value is used as the vertical axis coordinate. They are sequentially connected into a smooth curve to obtain a three-phase current curve; A rectangular area is defined as the SVG drawing area, and the three-phase current curve is mapped to the coordinate system of the SVG drawing area according to a preset ratio to obtain an SVG vector graphic.
5. The three-phase unbalanced current detection method based on SVG according to claim 4 is characterized in that: The method of performing space segmentation includes: Determine the pixel size of the SVG vector graphic, divide the area of the SVG vector graphic into a regular pixel grid, and for each pixel of the pixel grid, if the pixel is located on the three-phase current curve, assign a value of 1, otherwise assign a value of 0, and obtain a binary pixel matrix; Each pixel is regarded as a cell, and the pixel value is used as the state of the corresponding cell, that is, the cell state is 0 or 1; the neighborhood of each cell is defined as the area consisting of the 4 nearest neighbor cells in the upper, lower, left, and right directions and the cells in the four diagonal directions, a total of 8 neighbors; Starting from any position of the binary pixel matrix, traverse each cell in a preset scanning order. For the scanned cells, update them according to the cell states of the cells in their neighborhood and the preset cell state rules to obtain their new states. Repeat the update until the cell states of all cells no longer change. Ways to update include: For each cell , calculate the minimum Euclidean distance to all cells with a cell state of 1, and scale the calculated minimum Euclidean distance value to the range of [0, 1] to obtain a distance value set ; Defining rule thresholds ;in, is a distance value set The mean of is a distance value set The median of is a distance value set The standard deviation of is a distance value set The interquartile range of is obtained based on kernel density estimation The probability density function of and is the weight of the corresponding item, and ; For each cell, count the number of cells in its neighborhood whose cell state is 1 , for cells whose current state is 0, if And the minimum Euclidean distance from this cell to the cell with cell state 1 is less than , then update its state to 1, otherwise keep it as 0; for cells whose current state is 1, if Or the minimum Euclidean distance from the cell to the cell with cell state 1 is greater than , then update its status to 0, otherwise keep it as 1; For adjacent cells with the same state, they are classified into the same preliminary cell region to obtain the initial segmentation result, that is, the SVG vector graphics is divided into several independent preliminary cell regions; A region area threshold is preset, and the cell regions with an area greater than or equal to the region area threshold are recorded as large regions; the cell regions with an area less than the region area threshold are merged into the nearest neighbor large region to obtain M cell regions.
6. The three-phase unbalanced current detection method based on SVG according to claim 5, characterized in that: The method of clustering the SVG data points in each cell region includes: For Cell regions, extract all SVG data points in the cell region and form a regional data point set, denoted as ,in For the The number of SVG data points in a cell area; Define a clustering network whose topological structure adopts a hexagonal grid; randomly initialize the reference vector for each node of the clustering network, and set the initial values of the learning rate and neighborhood radius; For cell area, and all SVG data points in the cell area are used as input data points; for each input data point , calculate it and all nodes in the clustering network Similarity ; ;in Is a node The reference vector, is the bandwidth parameter, is the weight coefficient of the coordinate prior term, is the weight coefficient of the direction angle prior term, For input data points The location coordinates of For Node The location coordinates of For input data points The direction angle, For Node The direction angle of Based on the similarity, calculate the input data points For each node Core Degree ; Core Degree ;in, is the index of all nodes in the clustering network, is the fuzzification parameter, which controls the fuzziness of the core degree. For input data points With Node similarity; Preset core threshold, for each input data point , mark the nodes whose coreness is greater than the core threshold as core nodes, and all core nodes constitute the corresponding input data points The core node set; for each core node and the nodes in its network neighborhood, update its reference vector; The update formula of the reference vector is: ;in, For Node In time The reference vector, For Node In time The reference vector of For time The learning rate; To update the index parameters; For in time Core Node With Node The neighborhood function value between ; For time Input data point at time After each update, the network neighborhood radius is reduced and repeated until the preset maximum number of iterations is reached; for each SVG data point in the cell area, it is classified into the category of the node closest to it; that is, the SVG data point in each cell area is divided into n categories.
7. The three-phase unbalanced current detection method based on SVG according to claim 6, characterized in that: The method of constructing a circular area for each category includes: For each category q in each cell area, calculate the centroid of all SVG data points in the category as the center point C_q; calculate the distance from all SVG data points in category q to the center point C_q; find the maximum distance from the SVG data points in category q to the center point C_q as the radius V_k of the category; for each category q, draw a circular area in the SVG drawing area with the center point C_q as the center and V_k as the radius.
8. The three-phase unbalanced current detection method based on SVG according to claim 7, characterized in that: The method of optimizing the new SVG graphics includes: Initialize N1 spheres to form a sphere group, each sphere It consists of the coordinates of the sphere center and the radius of the sphere. The coordinates of the sphere center are randomly generated within the boundary of the new SVG graphic, and the radius is randomly generated within a fixed range. Define the spherical function, the formula of the spherical function is: ;in, For sphere The function value of the spherical function is denoted as sphere Sphere value of For sphere The overlap area with the new SVG shape, For sphere The sum of the overlapping areas with other spheres; and is a positive weight parameter; Select two spheres according to a preset fixed probability and , generate a new sphere ; then the new sphere The coordinates of the center of the sphere are ; ; ; In the formula, and is a random number between 0 and 1; new sphere The radius of the sphere is ;in, is a random number that obeys a uniform distribution, with a value range of [-η, η], where η is the preset maximum disturbance ratio; is a random number between 0 and 1; If the new sphere If the coordinates of the center of the sphere exceed the boundaries of the new SVG graphic, it will be projected onto the boundaries. If the sphere radius is not within the preset sphere radius interval [r_max, r_min], it is adjusted to the sphere radius interval [r_max, r_min]; wherein r_max is the upper limit of the sphere radius interval, and r_min is the lower limit of the sphere radius interval; Calculate the new sphere The function value of the spherical function , denoted as the new sphere spherical value; if If it is greater than the smallest sphere value in the sphere group, use Replace the sphere with the smallest sphere value; Repeat until the preset number of replacements is reached, and output the final group of spheres, that is, the optimized SVG graphic.
9. The three-phase unbalanced current detection method based on SVG according to claim 8, characterized in that: The method of calculating the unbalance degree value of the three-phase current includes: Extract the coordinate information of each sphere from the optimized SVG graphic, the coordinate information includes the coordinates of the sphere center and the sphere radius; Normalize the coordinate information of each sphere so that its value range is between 0 and 1; define three variables and , respectively corresponding to the effective value of the three-phase current, initially and All equal to 0; For each sphere, calculate its area, sort the spheres according to the ordinate values of their center coordinates from small to large, and divide them into three groups, corresponding to the three phases; For the spheres in the first group, add the areas of the spheres to ; For the spheres in the second group, add the area of each sphere to ; For the spheres in the third group, add the area of each sphere to The imbalance degree value ;in, for and The mean of .
10. A three-phase unbalanced current detection system based on SVG, which is used to implement the three-phase unbalanced current detection method based on SVG according to any one of claims 1 to 9, characterized in that: include: The data acquisition and processing module is used to collect three-phase current data and pre-process the three-phase current data to obtain three-phase current standard data; A graphics conversion and segmentation module is used to convert the three-phase current standard data into SVG vector graphics; and to perform spatial segmentation on the SVG vector graphics to obtain M cell regions; A clustering module is used to extract SVG data points from the SVG vector graphics and cluster the SVG data points in each cell area to obtain n categories; an optimization module to construct circular regions for each category; All circular areas are superimposed to form a new SVG graphic; the new SVG graphic is optimized by using an optimization algorithm to obtain an optimized SVG graphic; The calculation and judgment module is used to calculate the imbalance degree value of the three-phase current according to the optimized SVG graphics, preset the balance threshold, and send a warning message to the current detection terminal when the imbalance degree value is greater than the balance threshold; each module is connected by wired and / or wireless means.
Citation Information
Patent Citations
Simplified model forecasting control method of network voltage unbalance three-level rectifier
CN103956919A
Intelligent phase-changing switch system for adjusting three-phase imbalance and method of intelligent phase-changing switch system
CN108173273A