Power quality monitoring method and system based on distributed power supply
By applying dynamic time bending (DTW) clustering algorithm in power quality monitoring, the problem of insufficient comprehensive and accurate power quality assessment in the existing technology is solved, and efficient and accurate monitoring and evaluation of power quality is achieved.
Patent Information
- Application Number
- CN202411809872.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art usually focuses on a single indicator in power quality assessment, and cannot obtain comprehensive and reasonable evaluation results. The multi-index evaluation method relies on subjective weighting algorithms or fixed rules, which may lead to errors and inaccuracies in the evaluation results.
The power quality monitoring method based on the dynamic time bending (DTW) clustering algorithm is adopted. By collecting voltage, current and electrical energy data, defining time series samples, calculating DTW distances, performing cluster analysis, updating the cluster center until the termination conditions are met, comprehensive monitoring and evaluation of power quality is achieved.
It effectively improves the comprehensiveness and accuracy of power quality monitoring, can handle the expansion and translation problems of voltage, current and electrical energy time series, improves the accuracy of abnormal data identification, and reduces the error of evaluation results.
Smart Images

Figure CN119986446A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system monitoring and control, and in particular to a method and system for monitoring power quality based on distributed power sources. Background Art
[0002] The quality of electric energy not only affects the safe, stable and economic operation of the distribution network, but also directly affects the normal operation of the power equipment on the user side. In recent years, the access of a large number of distributed power sources such as wind power and photovoltaic power has had a great impact on the power quality of the entire power system. With the vigorous development of high-tech industries such as computers, electricity, and electronics, more and more power users have put forward higher requirements for power supply quality. Therefore, how to achieve accurate and efficient monitoring of power quality after the access of distributed power sources has become a challenge.
[0003] At present, the research on a single power quality indicator is very mature, and there are a series of relevant standards. However, power quality assessment is a comprehensive issue. It is impossible to obtain a standard and reasonable assessment result by only considering a single power quality indicator. In addition, a weight algorithm is generally used to evaluate multiple indicators, but the weight algorithm is more dependent on the subjectivity and regularity of the objective algorithm, and the problem of errors in the evaluation results will also occur. Since the data monitored by the power monitoring system is generally time series data, the present invention monitors and evaluates the power quality based on the processing of time series data. Summary of the invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by the present invention is that existing research usually focuses on a single power quality indicator, while power quality assessment is a multi-dimensional problem. It is impossible to obtain a comprehensive and reasonable assessment result by considering only a single indicator. Current multi-index assessment methods usually adopt weight algorithms, but these algorithms often rely on subjective judgment to determine weights, or rely on fixed rules of objective algorithms, which may lead to errors and inaccuracies in the assessment results. The data generated by the power monitoring system is usually time series data, and the existing assessment methods may not fully consider the dynamic characteristics of the time series data and the relationship between the time series, resulting in inaccurate monitoring and assessment results.
[0006] To solve the above technical problems, the present invention provides the following technical solutions: a method for monitoring power quality based on distributed power sources, comprising the following steps:
[0007] Collect power quality data; define time series samples in power quality data; define cumulative distance matrix; preset the number of clusters and update cluster centers.
[0008] As a preferred solution of the power quality monitoring method based on distributed power supply described in the present invention, the power quality data includes voltage monitoring data, current monitoring data and power monitoring data.
[0009] As a preferred solution of the power quality monitoring method based on distributed power supply described in the present invention, the effective value of the voltage in the voltage monitoring data is expressed as:
[0010]
[0011] Where v(t) is the instantaneous value of the voltage and T is the cycle time.
[0012] The effective value of the current in the current monitoring data is expressed as,
[0013]
[0014] Where i(t) is the instantaneous value of the current.
[0015] The amount of electric energy in the electric energy monitoring data is expressed as,
[0016]
[0017] Among them, U is the effective value of voltage, I is the effective value of current, T1 is the power consumption time, is the power factor.
[0018] As a preferred solution of the power quality monitoring method based on distributed power supply described in the present invention, wherein: the time series samples in the power quality data are defined, including combining the voltage, current and power data at each moment into a three-dimensional time series sample, wherein the mth sample is represented as
[0019] Calculate the DTW distance between two samples X and Y, specifically including constructing a distance matrix D, where the size is n×n, and the element D(i,j) in the matrix represents the distance between the i-th point in X and the j-th point in Y, expressed as,
[0020]
[0021] in, are the voltage, current and energy data in the X sample, respectively. They are the voltage, current and energy data in the Y sample respectively.
[0022] As a preferred solution of the power quality monitoring method based on distributed power supply described in the present invention, wherein: the definition of the cumulative distance matrix includes, the cumulative distance matrix G, the size of which is n×n, representing the minimum cumulative distance from the starting point of the sample X to the position (i, j), initializing G(1,1)=D(1,1), where i>1 and j>1, G(i,j)=D(i,j)+min, (G(i-1,j), G(i,j-1), G(i-1,j-1)), and finally the DTW distance between X and Y is G(n,n).
[0023] As a preferred solution of the power quality monitoring method based on distributed power supply described in the present invention, wherein: the preset number of clusters includes randomly selecting k samples as initial cluster samples, k is the preset number of clusters, and for each sample X m , calculate and cluster center X ci (i=1,2 , …k), the DTW distance between the samples X m Assign to the cluster with the nearest cluster center.
[0024] As a preferred solution of the power quality monitoring method based on distributed power supply described in the present invention, the updating of cluster center includes, for each cluster, recalculating the cluster center, and continuously repeating the steps of allocating samples to the cluster center and updating the cluster center until the termination condition is met.
[0025] Another object of the present invention is to provide a power quality monitoring system based on distributed power sources, which can solve the problems of inaccurate evaluation and untimely response in existing monitoring systems when processing multi-dimensional power quality data by real-time acquisition and analysis of power quality time series data combined with a dynamic time warping (DTW) clustering algorithm.
[0026] To solve the above technical problems, the present invention provides the following technical solutions: a power quality monitoring system based on distributed power supply, including a data acquisition module, a data preprocessing module, a distance calculation module, a clustering initialization module and a termination condition judgment module.
[0027] The data acquisition module is responsible for collecting power quality data, including voltage monitoring data, current monitoring data and power monitoring data.
[0028] The data preprocessing module is responsible for defining the time series samples in the power quality data and combining the voltage, current and power data into three-dimensional time series samples.
[0029] The distance calculation module is responsible for calculating the DTW distance between two samples, including constructing a distance matrix D and calculating a cumulative distance matrix G.
[0030] The cluster initialization module is responsible for presetting the number of clusters k and randomly selecting k samples as initial cluster samples.
[0031] The termination condition judgment module is responsible for judging whether the termination condition is met.
[0032] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for monitoring power quality based on distributed power sources when executing the computer program.
[0033] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a power quality monitoring method based on a distributed power source as described above.
[0034] The beneficial effects of the present invention are as follows: by comprehensively monitoring voltage data, current data and electric energy data to evaluate power quality, the comprehensiveness of power quality monitoring is effectively improved; the DTW-based clustering algorithm can effectively handle the scaling and translation problems of voltage, current and electric energy time series on the time axis; the DTW-based clustering algorithm can cluster normal data into different categories, effectively improving the accuracy of monitoring and identifying abnormal data. The present invention evaluates power quality by comprehensively monitoring voltage data, current data and electric energy data, effectively improving the comprehensiveness of power quality monitoring. Based on the time series characteristics of monitoring data, the present invention performs cluster analysis on power quality monitoring data and adopts dynamic time warping distance combined with clustering algorithm to make the recognition accuracy of abnormal power monitoring data higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0036] Figure 1 An overall flow chart of a power quality monitoring method based on a distributed power source provided in the first embodiment of the present invention.
[0037] Figure 2 An overall framework diagram of a power quality monitoring system based on a distributed power source provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0039] Example 1, reference Figure 1 , is an embodiment of the present invention, and provides a method for monitoring power quality based on distributed power supply, characterized in that:
[0040] S1: Collect power quality data.
[0041] Power quality data includes voltage monitoring data, current monitoring data and power monitoring data.
[0042] The effective value of voltage in voltage monitoring data is expressed as,
[0043]
[0044] Where v(t) is the instantaneous value of the voltage and T is the cycle time.
[0045] The effective value of the current in the current monitoring data is expressed as,
[0046]
[0047] Where i(t) is the instantaneous value of the current.
[0048] The amount of electric energy in the electric energy monitoring data is expressed as,
[0049]
[0050] Among them, U is the effective value of voltage, I is the effective value of current, T1 is the power consumption time, is the power factor.
[0051] By comprehensively monitoring voltage data, current data and power data, the power quality is evaluated, effectively improving the comprehensiveness of power quality monitoring.
[0052] S2: Defines the time series samples in the power quality data.
[0053] Defining the time series samples in power quality data includes combining the voltage, current and power data at each moment into a three-dimensional time series sample, where the mth sample is represented as
[0054] Calculate the DTW distance between two samples X and Y, specifically including constructing a distance matrix D, where the size is n×n, and the element D(i,j) in the matrix represents the distance between the i-th point in X and the j-th point in Y, expressed as,
[0055]
[0056] in, are the voltage, current and energy data in the X sample, respectively. They are the voltage, current and energy data in the Y sample respectively.
[0057] S3: Define the cumulative distance matrix.
[0058] Defining the cumulative distance matrix includes: the cumulative distance matrix G, with a size of n×n, represents the minimum cumulative distance from the starting point of sample X to the position (i,j), initializing G(1,1)=D(1,1), where i>1 and j>1, G(i,j)=D(i,j)+min, (G(i-1,j), G(i,j-1), G(i-1,j-1)), and finally the DTW distance between X and Y is G(n,n).
[0059] S4: Preset the number of clusters and update the cluster centers.
[0060] The preset number of clusters includes randomly selecting k samples as the initial cluster samples, where k is the preset number of clusters. c1 , X c2 , …, X ck is the initial cluster center.
[0061] For each sample X m , calculate its correlation with each cluster center X ci DTW distance between (i=1,2,…k);
[0062] The sample X m Assigned to the cluster with the closest cluster center, for example, if X m Assigned to X cj The cluster is centered.
[0063] Updating the cluster center includes: for each cluster, recalculate the cluster center, assuming that there are n clusters in cluster j j Samples X m1 , X m2 , …, X mj , for each time point t (t=1,2,…n), the voltage value of the cluster center is updated as: is the updated voltage value of cluster center j at time t; similarly, the current value of the updated cluster center is: The electric energy value is:
[0064] Repeat the steps of assigning samples to cluster centers and updating cluster centers until the termination condition is met. Common termination conditions include reaching the maximum number of iterations or the change in cluster centers is less than a certain threshold. For example, if ∈ is a very small threshold, the iteration stops.
[0065] Calculate the statistical information of each cluster, such as the average voltage, average current, average electric energy, etc. of the samples in the cluster, to describe the characteristics of each cluster. Indicators such as the silhouette coefficient can be used to evaluate the quality of clustering and determine whether the clustering results are reasonable.
[0066] When a new data sample arrives, its DTW distance to each cluster center is calculated and assigned to the corresponding cluster. By observing the cluster to which the new sample belongs and the changes in the cluster, the voltage, current and energy data can be monitored. For example, if a new sample is assigned to an abnormal cluster or causes a significant change in the characteristics of a cluster, it may indicate that an abnormality has occurred in the system, such as equipment failure, changes in power consumption patterns, etc.
[0067] The DTW-based clustering algorithm can effectively handle the scaling and translation problems of voltage, current and electric energy time series on the time axis; the DTW-based clustering algorithm can cluster normal data into different categories, effectively improving the accuracy of monitoring and identifying abnormal data.
[0068] Example 2, reference Figure 2 , which is an embodiment of the present invention, provides a system for a power quality monitoring method based on a distributed power source, characterized in that it includes a data acquisition module 100, a data preprocessing module 200, a distance calculation module 300, a clustering initialization module 400 and a termination condition judgment module 500.
[0069] The data acquisition module 100 is responsible for collecting power quality data, including voltage monitoring data, current monitoring data and power monitoring data.
[0070] The data preprocessing module 200 is responsible for defining the time series samples in the power quality data and combining the voltage, current and power data into three-dimensional time series samples.
[0071] The distance calculation module 300 is responsible for calculating the DTW distance between two samples, including constructing a distance matrix D and calculating a cumulative distance matrix G.
[0072] The clustering initialization module 400 is responsible for presetting the number of clusters k and randomly selecting k samples as initial clustering samples.
[0073] The termination condition judgment module 500 is responsible for judging whether the termination condition is met.
[0074] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0075] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0076] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0077] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0078] Example 3: In this example, in order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments. This example conducts experiments on the existing traditional method and the method of this example, as shown in Table 1.
[0079] In the field of power quality monitoring, traditional methods usually rely on weight algorithms or single indicator monitoring, which have certain limitations when dealing with complex and changeable power quality problems. To overcome these limitations, we propose a power quality monitoring method based on the dynamic time warping (DTW) clustering algorithm.
[0080] Traditional methods usually use weighted algorithms to evaluate power quality. Specifically, the weights of various power quality indicators (such as voltage, current, and electric energy) are first determined, and then a comprehensive score is calculated based on these weights. This method relies on expert experience to determine the weights and cannot effectively handle the dynamic changes of time series data. Therefore, in actual applications, inaccurate evaluation and untimely response may occur.
[0081] Table 1 Experimental effect comparison chart
[0082]
[0083] The clustering accuracy of the method of the present invention is significantly higher than that of the traditional weight algorithm, which indicates that DTW clustering can more accurately identify the pattern of power quality data. Similarly, the anomaly detection rate of the method of the present invention is higher than that of the traditional method, indicating that it is more effective in detecting power quality anomalies. The response time of the method of the present invention is shorter than that of the traditional method, which means that the method can identify and handle power quality problems more quickly.
[0084] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for monitoring power quality based on distributed power sources, characterized in that: include: Collect power quality data; Define time series samples in power quality data; Define the cumulative distance matrix; Preset the number of clusters and update the cluster centers.
2. The method for monitoring power quality based on distributed power sources according to claim 1, characterized in that: The power quality data includes voltage monitoring data, current monitoring data and power monitoring data.
3. The method for monitoring power quality based on distributed power sources according to claim 2, characterized in that: The effective value of the voltage in the voltage monitoring data is expressed as: Where v(t) is the instantaneous value of voltage and T is the cycle time; The effective value of the current in the current monitoring data is expressed as, Where i(t) is the instantaneous value of the current; The amount of electric energy in the electric energy monitoring data is expressed as, Among them, U is the effective value of voltage, I is the effective value of current, T1 is the power consumption time, is the power factor.
4. The method for monitoring power quality based on distributed power sources according to claim 3, characterized in that: The definition of the time series samples in the power quality data includes combining the voltage, current and power data at each moment into a three-dimensional time series sample, where the mth sample is represented as Calculate the DTW distance between two samples X and Y, specifically including constructing a distance matrix D, where the size is n×n, and the element D(i,j) in the matrix represents the distance between the i-th point in X and the j-th point in Y, expressed as, in, are the voltage, current and energy data in the X sample, respectively. They are the voltage, current and energy data in the Y sample respectively.
5. The method for monitoring power quality based on distributed power sources according to claim 4, characterized in that: The definition of the cumulative distance matrix includes: a cumulative distance matrix G, whose size is n×n, representing the minimum cumulative distance from the starting point of the sample X to the position (i, j), initializing G(1,1)=D(1,1), where i>1 and j>1, G(i,j)=D(i,j)+min, (G(i-1,j), G(i,j-1), G(i-1,j-1)), and finally the DTW distance between X and Y is G(n,n).
6. A method for monitoring power quality based on distributed power sources as claimed in claim 5, characterized in that: The preset number of clusters includes randomly selecting k samples as initial cluster samples, where k is the preset number of clusters. m , calculate and cluster center X ci The DTW distance between (i=1,2,…k) is used to calculate the sample X m Assign to the cluster with the nearest cluster center.
7. The method for monitoring power quality based on distributed power sources according to claim 6, characterized in that: The updating of the cluster center includes, for each cluster, recalculating the cluster center, and continuously repeating the steps of allocating samples to the cluster center and updating the cluster center until a termination condition is met.
8. A system using a power quality monitoring method based on a distributed power source as claimed in any one of claims 1 to 7, characterized in that: It comprises a data acquisition module (100), a data preprocessing module (200), a distance calculation module (300), a clustering initialization module (400) and a termination condition judgment module (500); The data acquisition module (100) is responsible for collecting power quality data, including voltage monitoring data, current monitoring data and power monitoring data; The data preprocessing module (200) is responsible for defining time series samples in the power quality data, and combining the voltage, current and power data into three-dimensional time series samples; The distance calculation module (300) is responsible for calculating the DTW distance between two samples, including constructing a distance matrix D and calculating a cumulative distance matrix G; The cluster initialization module (400) is responsible for presetting the number of clusters k and randomly selecting k samples as initial cluster samples; The termination condition judgment module (500) is responsible for judging whether the termination condition is met.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of a method for monitoring power quality based on a distributed power source according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for monitoring power quality based on a distributed power source as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Distributed power supply electric energy quality monitoring method
CN121432255A
Heat dissipation control method and system for multiple live broadcast terminals
CN122318171A