Harmonic signal processing method and device, and electronic device
By combining the tangent search algorithm and the least squares method, a harmonic signal processing method was developed to solve the problem of inaccurate estimation of harmonic signal amplitude and phase in power systems. This method enables fast and efficient harmonic signal estimation, thereby improving the operational stability and safety of power systems.
Patent Information
- Application Number
- CN202411396240.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-10-08
AI Technical Summary
In existing technologies, the amplitude and phase estimation of harmonic signals in power systems are poor, and noise effects exist, leading to reduced efficiency and safety hazards in power equipment.
The tangent search algorithm is used to initialize the amplitude and phase of the harmonic signal. The final estimated value is obtained through iterative calculation and fitness function optimization. The harmonic component parameters are estimated by combining the least squares method, so as to achieve fast and accurate harmonic signal estimation.
It improves the efficiency and accuracy of harmonic signal estimation, enhances the power quality of the power system, and reduces the risk of equipment failure.
Smart Images

Figure CN119246950B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system harmonic monitoring technology, and more specifically, to a method and apparatus for processing harmonic signals, and electronic equipment. Background Technology
[0002] Currently, harmonic problems generated in power systems have become a major power quality issue. Furthermore, the generation of grid harmonics reduces the operating efficiency of electrical equipment and can even cause damage, grid outages, equipment failures, and sometimes even serious electrical accidents such as fires and electric shocks, affecting life and property safety. Therefore, reducing and filtering harmonics is crucial for improving the power supply quality and reliability of power systems. This process requires appropriate and effective estimation of harmonic characteristics, such as amplitude and phase.
[0003] Furthermore, because harmonic signals generated in power system networks are highly dynamic and change continuously over time, the techniques and algorithms used for harmonic estimation must be fast and intuitive to mitigate the challenges. Therefore, to achieve efficient and real-time power quality monitoring, there is increasing emphasis on developing simpler, more efficient methods with shorter convergence computation times. Moreover, common methods for power system harmonic detection and analysis include Fourier transform, fast Fourier transform, wavelet transform, Kalman filter algorithm, and particle swarm optimization algorithm, but these methods suffer from low estimation efficiency and accuracy when dealing with noisy signals.
[0004] There is currently no effective solution to the problem of poor performance in estimating the amplitude and phase of harmonic signals generated in power systems in related technologies. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, and electronic device for processing harmonic signals, in order to solve the problem of poor performance in estimating the amplitude and phase of harmonic signals generated in power systems in related technologies.
[0006] To achieve the above objectives, according to one aspect of this application, a method for processing harmonic signals is provided. The method includes: acquiring harmonic signals generated in a power system; initializing the parameters of an original search algorithm based on the harmonic signals to obtain a target search algorithm; initially estimating the amplitude and phase of the harmonic signals to obtain initial estimated values of the harmonic signals; acquiring the actual amplitude and actual phase values of the harmonic signals to obtain actual values of the harmonic signals; calculating the error between the initial estimated values and the actual values of the harmonic signals; and determining the fitness function of the target search algorithm based on the error between the initial estimated values and the actual values of the harmonic signals; and iteratively calculating the initial estimated values of the harmonic signals based on the fitness function of the target search algorithm to obtain final estimated values of the harmonic signals.
[0007] Further, based on the fitness function of the target search algorithm, iteratively calculating the initial estimate of the harmonic signal to obtain the final estimate of the harmonic signal includes: calculating the fitness function value corresponding to the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the initial fitness value; using the target search algorithm to re-estimate the amplitude and phase of the harmonic signal to obtain the target estimate of the harmonic signal; calculating the fitness function value corresponding to the target estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the target fitness value; and obtaining the final estimate of the harmonic signal based on the target fitness value and the initial fitness value.
[0008] Further, obtaining the final estimated value of the harmonic signal based on the target fitness value and the initial fitness value includes: determining whether the target fitness value is less than the initial fitness value; if the target fitness value is not less than the initial fitness value, then continuing to iteratively calculate the target estimated value of the harmonic signal based on the fitness function of the target search algorithm until the final estimated value of the harmonic signal is obtained; if the target fitness value is less than the initial fitness value, then using the target estimated value of the harmonic signal as the final estimated value of the harmonic signal.
[0009] Further, based on the harmonic signal, the parameters of the original search algorithm are initialized to obtain the target search algorithm, including: using the phase parameters of the harmonic components of the harmonic signal as individuals of the original search algorithm, and setting the value range of the phase parameters of the harmonic components of the harmonic signal to obtain the set original search algorithm; setting the maximum number of iterations, population size and search range of the set original search algorithm to obtain the target search algorithm.
[0010] Further, the initial estimation of the amplitude and phase of the harmonic signal to obtain the initial estimated value of the harmonic signal includes: initial estimation of the amplitude of the harmonic signal to obtain an initial estimated amplitude parameter; initial estimation of the phase of the harmonic signal to obtain an initial estimated phase parameter; and obtaining the initial estimated value of the harmonic signal based on the initial estimated amplitude parameter and the initial estimated phase parameter.
[0011] Further, the initial estimation of the amplitude of the harmonic signal is performed to obtain the initial estimated amplitude parameters, which includes: estimating the amplitude parameters of each harmonic component in the harmonic signal by combining the least squares method to obtain multiple amplitude parameters, wherein each amplitude parameter is the amplitude parameter of each harmonic component in the harmonic signal; and summarizing the multiple amplitude parameters to obtain the initial estimated amplitude parameters.
[0012] Further, the initial estimation of the phase of the harmonic signal to obtain the initially estimated phase parameters includes: estimating the phase parameters of each harmonic component in the harmonic signal to obtain multiple phase parameters, wherein each phase parameter is the phase parameter of each harmonic component in the harmonic signal; and summarizing the multiple phase parameters to obtain the initially estimated phase parameters.
[0013] Furthermore, after iteratively calculating the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal, the method further includes: determining the amplitude and phase characteristics of each harmonic component in the harmonic signal based on the final estimate of the harmonic signal; selecting target type harmonic components from multiple harmonic components in the harmonic signal based on the amplitude and phase characteristics of each harmonic component in the harmonic signal, wherein the target type harmonic components pose a higher degree of harm to the power system than a preset degree of harm; and filtering the target type harmonic components in the harmonic signal to obtain a filtered harmonic signal.
[0014] To achieve the above objectives, according to another aspect of this application, a harmonic signal processing apparatus is provided. The apparatus includes: a first processing unit, configured to acquire harmonic signals generated in a power system and, based on the harmonic signals, initialize the parameters of an original search algorithm to obtain a target search algorithm; a first determining unit, configured to initially estimate the amplitude and phase of the harmonic signals to obtain initial estimated values of the harmonic signals, and acquire the actual amplitude and actual phase values of the harmonic signals to obtain actual values of the harmonic signals; a second processing unit, configured to calculate the error between the initial estimated values of the harmonic signals and the actual values of the harmonic signals, and, based on the error between the initial estimated values of the harmonic signals and the actual values of the harmonic signals, determine the fitness function of the target search algorithm; and a second determining unit, configured to iteratively calculate the initial estimated values of the harmonic signals based on the fitness function of the target search algorithm to obtain final estimated values of the harmonic signals.
[0015] Further, the second determining unit includes: a first determining module, used to calculate the fitness function value corresponding to the initial estimated value of the harmonic signal based on the fitness function of the target search algorithm, to obtain an initial fitness value; a second determining module, used to re-estimate the amplitude and phase of the harmonic signal using the target search algorithm, to obtain a target estimated value of the harmonic signal; a third determining module, used to calculate the fitness function value corresponding to the target estimated value of the harmonic signal based on the fitness function of the target search algorithm, to obtain a target fitness value; and a fourth determining module, used to obtain a final estimated value of the harmonic signal based on the target fitness value and the initial fitness value.
[0016] Further, the fourth determining module includes: a first judging submodule, used to judge whether the target fitness value is less than the initial fitness value; a first calculation submodule, used to continue iteratively calculating the target estimate of the harmonic signal based on the fitness function of the target search algorithm if the target fitness value is not less than the initial fitness value, until the final estimate of the harmonic signal is obtained; and a first determining submodule, used to take the target estimate of the harmonic signal as the final estimate of the harmonic signal if the target fitness value is less than the initial fitness value.
[0017] Further, the first processing unit includes: a first processing module, used to take the phase parameters of the harmonic components of the harmonic signal as individuals of the original search algorithm, and set the value range of the phase parameters of the harmonic components of the harmonic signal to obtain the set original search algorithm; and a first setting module, used to set the maximum number of iterations, population size and search range of the set original search algorithm to obtain the target search algorithm.
[0018] Further, the first determining unit includes: a second processing module, used to perform an initial estimation of the amplitude of the harmonic signal to obtain an initially estimated amplitude parameter; a third processing module, used to perform an initial estimation of the phase of the harmonic signal to obtain an initially estimated phase parameter; and a fifth determining module, used to obtain an initial estimated value of the harmonic signal based on the initially estimated amplitude parameter and the initially estimated phase parameter.
[0019] Further, the second processing module includes: a second determining submodule, used to estimate the amplitude parameters of each harmonic component in the harmonic signal by combining the least squares method to obtain multiple amplitude parameters, wherein each amplitude parameter is the amplitude parameter of each harmonic component in the harmonic signal; and a first processing submodule, used to perform summary processing on the multiple amplitude parameters to obtain the initially estimated amplitude parameters.
[0020] Furthermore, the third processing module includes: a third determining submodule, used to estimate the phase parameters of each harmonic component in the harmonic signal to obtain multiple phase parameters, wherein each phase parameter is the phase parameter of each harmonic component in the harmonic signal; and a second processing submodule, used to summarize the multiple phase parameters to obtain the initially estimated phase parameters.
[0021] Furthermore, the device further includes: a third determining unit, configured to iteratively calculate the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal, and then determine the amplitude characteristics and phase characteristics of each harmonic component in the harmonic signal based on the final estimate of the harmonic signal; a first filtering unit, configured to filter out target type harmonic components from multiple harmonic components in the harmonic signal according to the amplitude characteristics and phase characteristics of each harmonic component in the harmonic signal, wherein the target type harmonic components pose a higher degree of harm to the power system than a preset degree of harm; and a third processing unit, configured to filter the target type harmonic components in the harmonic signal to obtain a filtered harmonic signal.
[0022] To achieve the above objectives, according to another aspect of this application, an electronic device is provided, the electronic device including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the harmonic signal processing method described in any one of the above claims.
[0023] This application employs the following steps: acquiring harmonic signals generated in a power system, and initializing the parameters of the original search algorithm based on the harmonic signals to obtain a target search algorithm; performing initial estimation of the amplitude and phase of the harmonic signals to obtain initial estimated values of the harmonic signals, and acquiring the actual amplitude and phase values of the harmonic signals to obtain actual values of the harmonic signals; calculating the error between the initial estimated values and the actual values of the harmonic signals, and determining the fitness function of the target search algorithm based on the error between the initial estimated values and the actual values of the harmonic signals; and iteratively calculating the initial estimated values of the harmonic signals based on the fitness function of the target search algorithm to obtain the final estimated values of the harmonic signals. This solves the problem of poor performance in estimating the amplitude and phase of harmonic signals generated in power systems in related technologies. By collecting harmonic signals generated in the power system and determining the fitness function of the search algorithm based on the error between the estimated and actual values of the collected harmonic signals, the local optimum of the harmonic signal is determined according to the fitness function of the search algorithm. The search algorithm is then used to update the current optimum, and after several iterations, the optimal combination of phase and amplitude of the harmonic is obtained, thus obtaining the final estimated value of the harmonic parameters. This method can improve the time and convergence of harmonic estimation in the power system, achieve effective estimation of harmonic signals, and thus improve the efficiency and accuracy of harmonic estimation in the power system. Attached Figure Description
[0024] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0025] Figure 1 This is a flowchart of a harmonic signal processing method provided according to an embodiment of this application;
[0026] Figure 2 This is a flowchart of an optional harmonic signal processing method provided according to an embodiment of this application;
[0027] Figure 3 This is a schematic diagram of the estimation results obtained by estimating the harmonics of the power system in this embodiment;
[0028] Figure 4 This is a schematic diagram of a harmonic signal processing apparatus provided according to an embodiment of this application;
[0029] Figure 5 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0030] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.
[0034] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0035] The Tangent Search Algorithm is an optimization algorithm based on the tangent function, used to find the minimum value of a function. This algorithm calculates the gradient and Hessian matrix (a second-order partial derivative matrix, i.e., an n×n matrix used to describe the second derivative information of a multivariable function) at the current point, and then determines the direction of the next iteration based on the properties of the tangent function. The advantages of the Tangent Search Algorithm are its fast convergence speed and, under certain conditions, the ability to find the global minimum.
[0036] The Least Squares Method (LSM) is a commonly used mathematical method for fitting data and estimating parameters. Its basic idea is to find the optimal solution for the model parameters by minimizing the sum of squared residuals between the observed data and the model's predicted values. The Least Squares Method can be used to solve problems involving linear regression, nonlinear regression, and multiple regression.
[0037] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a harmonic signal processing method provided according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0038] Step S101: Obtain the harmonic signals generated in the power system, and initialize the parameters of the original search algorithm based on the harmonic signals to obtain the target search algorithm.
[0039] For example, the original search algorithm mentioned above can be the original tangent search algorithm, and the target search algorithm mentioned above can be the final tangent search algorithm to be used after initializing the parameters of the original tangent search algorithm.
[0040] For example, the harmonic signals of the power system can be collected as sample data first. Then, based on the collected harmonic signals, the parameters of the original tangent search algorithm (corresponding to the original search algorithm mentioned above) can be initialized to obtain the final tangent search algorithm to be used (corresponding to the target search algorithm mentioned above).
[0041] Step S102: Initially estimate the amplitude and phase of the harmonic signal to obtain the initial estimated value of the harmonic signal, and obtain the actual amplitude and actual phase value of the harmonic signal to obtain the actual value of the harmonic signal.
[0042] For example, the amplitude and phase parameters of each harmonic component in the harmonic signal can be estimated first, and the amplitude and phase parameters of each harmonic component in the harmonic signal can be summarized together to obtain the estimated value of the harmonic (corresponding to the initial estimated value of the harmonic signal mentioned above); then the actual amplitude and phase parameters of each harmonic component in the harmonic signal can be obtained, and the actual amplitude and phase parameters of each harmonic component in the harmonic signal can be summarized together to obtain the actual value of the harmonic signal.
[0043] Step S103: Calculate the error between the initial estimated value of the harmonic signal and the actual value of the harmonic signal, and determine the fitness function of the target search algorithm based on the error between the initial estimated value of the harmonic signal and the actual value of the harmonic signal.
[0044] For example, the error between the harmonic estimate (corresponding to the initial estimate of the harmonic signal mentioned above) and the actual value of the harmonic signal can be used as the fitness function of the tangent search algorithm (corresponding to the target search algorithm mentioned above).
[0045] Step S104: Based on the fitness function of the target search algorithm, the initial estimate of the harmonic signal is iteratively calculated to obtain the final estimate of the harmonic signal.
[0046] For example, based on the fitness function of the tangent search algorithm (corresponding to the target search algorithm mentioned above), the optimal combination of phase and amplitude parameters of each harmonic component can be obtained after several iterations of the tangent search algorithm, thus obtaining the final harmonic estimate (corresponding to the final estimate mentioned above).
[0047] Through the steps S101 to S104 described above, harmonic signals generated in the power system are collected, and the fitness function of the search algorithm is determined based on the error between the estimated and actual values of the collected harmonic signals. Then, the local optimum of the harmonic signal is determined according to the fitness function of the search algorithm, and the current optimum is updated using the search algorithm. After several iterations of the search algorithm, the optimal combination of phase and amplitude of the harmonics is obtained, and the final estimated value of the harmonic parameters is obtained. This can improve the time and convergence of harmonic estimation in the power system, realize the effective estimation of harmonic signals, and thus improve the efficiency and accuracy of harmonic estimation in the power system.
[0048] Optionally, in the harmonic signal processing method provided in this application embodiment, the initialization processing of the parameters of the original search algorithm based on the harmonic signal to obtain the target search algorithm includes: taking the phase parameters of the harmonic components of the harmonic signal as individuals of the original search algorithm, and setting the value range of the phase parameters of the harmonic components of the harmonic signal to obtain the set original search algorithm; setting the maximum number of iterations, population size and search range of the set original search algorithm to obtain the target search algorithm.
[0049] For example, when initializing the parameters of the tangent search algorithm (corresponding to the original search algorithm mentioned above), the phase parameters of the harmonic components of the acquired harmonic signal can be used as individuals of the tangent search algorithm. The maximum number of iterations, population size, range of phase parameter values, and search range of the tangent search algorithm can be set, and then the final tangent search algorithm to be used (corresponding to the target search algorithm mentioned above) can be obtained.
[0050] In summary, by initializing the parameters of the original tangent search algorithm, the final tangent search algorithm that needs to be used can be obtained quickly and accurately.
[0051] Optionally, in the harmonic signal processing method provided in the embodiments of this application, the initial estimation of the amplitude and phase of the harmonic signal to obtain the initial estimated value of the harmonic signal includes: performing an initial estimation of the amplitude of the harmonic signal to obtain an initially estimated amplitude parameter; performing an initial estimation of the phase of the harmonic signal to obtain an initially estimated phase parameter; and obtaining the initial estimated value of the harmonic signal based on the initially estimated amplitude parameter and the initially estimated phase parameter.
[0052] For example, when estimating the harmonic signals of the collected power system, the amplitude parameters of the harmonic signals can be estimated first, and then the phase parameters of the harmonic signals can be estimated. The estimated amplitude and phase parameters of the harmonic signals can then be combined to obtain the estimated value of the harmonics (corresponding to the initial estimated value of the harmonic signals mentioned above).
[0053] Using the above method, the estimated value of the harmonic signal can be determined quickly and accurately based on the amplitude and phase parameters of each harmonic component in the estimated harmonic signal.
[0054] Optionally, in the harmonic signal processing method provided in the embodiments of this application, the initial estimation of the amplitude of the harmonic signal to obtain the initially estimated amplitude parameters includes: estimating the amplitude parameters of each harmonic component in the harmonic signal by combining the least squares method to obtain multiple amplitude parameters, wherein each amplitude parameter is the amplitude parameter of each harmonic component in the harmonic signal; and summarizing the multiple amplitude parameters to obtain the initially estimated amplitude parameters.
[0055] For example, when estimating the amplitude parameters of a harmonic signal, the least squares method can be used to estimate the amplitude parameters of each harmonic component in the harmonic signal; then the amplitude parameters of each harmonic component can be summarized to obtain the estimated amplitude parameters of the harmonic signal.
[0056] Using the above scheme and the least squares method, the amplitude parameters of harmonic signals can be estimated quickly and accurately.
[0057] Optionally, in the harmonic signal processing method provided in the embodiments of this application, the initial estimation of the phase of the harmonic signal to obtain the initially estimated phase parameters includes: estimating the phase parameters of each harmonic component in the harmonic signal to obtain multiple phase parameters, wherein each phase parameter is the phase parameter of each harmonic component in the harmonic signal; and summarizing the multiple phase parameters to obtain the initially estimated phase parameters.
[0058] For example, when estimating the phase parameters of a harmonic signal, one can first estimate the phase parameters of each harmonic component in the harmonic signal; then, the phase parameters of each harmonic component are summed together to obtain the estimated phase parameters of the harmonic signal.
[0059] The above method can quickly and accurately estimate the phase parameters of harmonic signals.
[0060] Optionally, in the harmonic signal processing method provided in this application embodiment, the iterative calculation of the initial estimated value of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimated value of the harmonic signal includes: calculating the fitness function value corresponding to the initial estimated value of the harmonic signal based on the fitness function of the target search algorithm to obtain the initial fitness value; using the target search algorithm to re-estimate the amplitude and phase of the harmonic signal to obtain the target estimated value of the harmonic signal; calculating the fitness function value corresponding to the target estimated value of the harmonic signal based on the fitness function of the target search algorithm to obtain the target fitness value; and obtaining the final estimated value of the harmonic signal based on the target fitness value and the initial fitness value.
[0061] For example, the initial fitness value of the tangent search algorithm can be calculated based on the fitness function of the tangent search algorithm (corresponding to the target search algorithm mentioned above); then, based on the tangent search algorithm (corresponding to the target search algorithm mentioned above), the amplitude and phase of the harmonic signal can be estimated again to obtain a new harmonic estimate (corresponding to the target estimate mentioned above); then, the fitness value corresponding to the new harmonic estimate (corresponding to the target estimate mentioned above) can be calculated based on the fitness function of the tangent search algorithm (corresponding to the target search algorithm mentioned above); finally, based on the fitness value corresponding to the new harmonic estimate (corresponding to the target estimate mentioned above) and the initial fitness value, the final harmonic estimate (corresponding to the final estimate mentioned above) can be obtained.
[0062] In summary, the final harmonic estimate can be obtained quickly and accurately by using the calculated fitness value.
[0063] Optionally, in the harmonic signal processing method provided in this application embodiment, obtaining the final estimated value of the harmonic signal based on the target fitness value and the initial fitness value includes: determining whether the target fitness value is less than the initial fitness value; if the target fitness value is not less than the initial fitness value, then continuing to iteratively calculate the target estimated value of the harmonic signal based on the fitness function of the target search algorithm until the final estimated value of the harmonic signal is obtained; if the target fitness value is less than the initial fitness value, then using the target estimated value of the harmonic signal as the final estimated value of the harmonic signal.
[0064] For example, the local optimum can be determined based on the initial fitness value of the tangent search algorithm, the current optimum can be updated using tangent search, and the best estimation result (corresponding to the final estimate mentioned above) can be obtained by comparing the local and global optimum solutions.
[0065] For example, when determining the optimal combination of phase and amplitude parameters for each harmonic component (corresponding to the final estimated value mentioned above), we can compare whether the fitness value (corresponding to the target fitness value mentioned above) corresponding to the new harmonic estimate (corresponding to the target estimated value mentioned above) is less than the initial fitness value. If the fitness value (corresponding to the target fitness value mentioned above) corresponding to the new harmonic estimate (corresponding to the target estimated value mentioned above) is not less than the initial fitness value, then we continue to iterate until the calculated new fitness value is less than the previous fitness value. If the fitness value (corresponding to the target fitness value mentioned above) corresponding to the new harmonic estimate (corresponding to the target estimated value mentioned above) is less than the initial fitness value, then it means that the parameters searched this time are the optimal amplitude and phase parameter solutions, which is the global optimal solution (corresponding to the final estimated value mentioned above), while the parameters obtained last time are the local optimal parameter solutions, and we do not need the local optimal solutions.
[0066] In summary, by using the iterative search strategy of the tangent search algorithm, the amplitude and phase of harmonic signals in a power system can be estimated quickly and accurately.
[0067] Optionally, in the harmonic signal processing method provided in this application embodiment, after iteratively calculating the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal, the method further includes: determining the amplitude characteristics and phase characteristics of each harmonic component in the harmonic signal according to the final estimate of the harmonic signal; selecting target type harmonic components from multiple harmonic components in the harmonic signal according to the amplitude characteristics and phase characteristics of each harmonic component in the harmonic signal, wherein the target type harmonic components have a higher degree of harm to the power system than a preset degree of harm; and filtering the target type harmonic components in the harmonic signal to obtain the filtered harmonic signal.
[0068] For example, after detecting the amplitude and phase characteristics of the harmonic components of a harmonic signal, a corresponding harmonic filtering device can be installed according to the amplitude and phase characteristics of different components to filter out harmful harmonic components (harmonic components corresponding to the target type mentioned above).
[0069] By using the above-mentioned scheme, harmful harmonic components in the power system can be easily filtered out based on the amplitude and phase characteristics of the harmonic components, thereby improving the power quality of the power system.
[0070] For example, Figure 2 This is a flowchart of an optional harmonic signal processing method provided according to an embodiment of this application, such as... Figure 2 As shown, the optional harmonic signal processing method includes the following steps:
[0071] Step S201: Use the acquired harmonic signals as sample data;
[0072] Step S202: Initialize the parameters of the tangent search algorithm, take the phase parameters of the harmonic components as individuals of the tangent search algorithm, and set the maximum number of iterations, population size, value range of the phase parameters, and search range of the tangent search algorithm;
[0073] Step S203: Estimate the amplitude parameters of each harmonic component in the signal using the least squares method;
[0074] Step S204: Use the error between the harmonic estimate and the actual value as the fitness function of the tangent search algorithm;
[0075] Step S205: Determine the local optimum based on the initial fitness value of the tangent search algorithm, update the current optimum using tangent search, and obtain the best estimation effect by comparing the local and global optimum solutions;
[0076] Step S206: After several iterations of the tangent search algorithm, the optimal combination of phase and amplitude of the harmonic is obtained, and the final estimated value of the harmonic parameters is obtained.
[0077] In this embodiment, by utilizing the efficient search mechanism of the tangent search algorithm and combining it with the least squares method, a power system harmonic estimation method based on the tangent search algorithm is provided, which can improve the efficiency and accuracy of harmonic estimation.
[0078] Furthermore, the process of a power system harmonic estimation method based on the tangent search algorithm in this embodiment is as follows:
[0079] Step S201: Use the collected harmonic signals as sample data.
[0080] Step S202: Initialize the parameters of the tangent search algorithm, take the phase parameters of the harmonic components as individuals of the tangent search algorithm, and set the maximum number of iterations, population size, value range of the phase parameters, and search range of the tangent search algorithm.
[0081] Specifically, the process is as follows:
[0082] For a noisy harmonic signal:
[0083]
[0084] Where t is time; z(t) is a clean, noise-free signal; n = 1, 2, ..., N, representing the order of harmonics; A n ω n φ n Let v(t) represent the amplitude, angular frequency, and phase of the nth harmonic, respectively; v(t) represents noise.
[0085] Set the maximum number of iterations and the population size nPop for the tangent search algorithm, initialize the individual X of the tangent search algorithm using a random generator, and automatically generate the initial solution:
[0086]
[0087] φ i,d =lb + r1·(ub - lb)
[0088] Where ub and lb are the upper and lower limits of the phase parameter φ, respectively; r1 is a random number between [0, 1].
[0089] Step S203: Estimate the amplitude parameters of each harmonic component in the signal using the least squares method.
[0090] Specifically, the process is as follows:
[0091] Based on the signal system structure, obtain matrix H:
[0092]
[0093] Where k is a time point; This is the phase estimate of the harmonic component.
[0094] The amplitude of the harmonic components is estimated as follows:
[0095]
[0096] Step S204: Use the error between the harmonic estimate and the actual value as the fitness function of the tangent search algorithm.
[0097] Specifically, the process is as follows:
[0098] Based on the estimated phase and amplitude parameters, the harmonic estimates can be obtained as follows:
[0099]
[0100] Using the estimation error as the fitness function of the tangent search algorithm, it can be expressed as:
[0101]
[0102] Step S205: Determine the local optimum based on the initial fitness value of the tangent search algorithm, update the current optimum using tangent search, and obtain the best estimation effect by comparing the local and global optimum solutions.
[0103] Specifically, the process is as follows:
[0104] Calculate each individual X in X i The corresponding fitness function value F:
[0105] F = [F1...F i ...F nPop 1×nPop
[0106] Find the minimum value in F as the optimal function value, and the corresponding X i is the optimal solution OPTX.
[0107] Given a random parameter p1 (0 < p1 < 1), if the random parameter p1 is less than the preset value ps, execute the exploration phase and iteratively update X:
[0108]
[0109] where represents the value of the i-th individual at the it-th iteration; r2 and r3 are random numbers between [0, 1]; norm is the two-norm of OPTX.
[0110] Randomly select 20% of the elements from the optimal solution OPTX to replace the element values at the positions in.
[0111] If the random parameter p1 is greater than or equal to the preset value ps, execute the exploitation phase and iteratively update X:
[0112]
[0113] where r4 is a random number between [0, 1].
[0114] Calculate the latest fitness function value F it+1 , and obtain the optimal function value. If this function value is less than the optimal function value in the previous iteration, then the corresponding X i replaces the previous optimal solution OPTX.
[0115] To avoid falling into the local optimum problem, an update mechanism is adopted for the initial population X, specifically:
[0116] Given a random parameter p2 (0 < p2 < 1), if the random parameter p2 is less than the preset value pe, execute the update mechanism:
[0117] X = R3 * (OPTX - r5 * (OPTX - X)) r6 < pr
[0118]
[0119] R3 = 10 * sign(0.5 - r7) / log(1 + it)
[0120] where r5, r6, and r7 are random numbers between [0, 1], and pr is the preset value.
[0121] Step S206: After several iterations of the tangent search algorithm, the optimal combination of phase and amplitude parameters for each harmonic component is obtained, and the final harmonic estimate is obtained.
[0122] This embodiment presents a power system harmonic estimation method based on the tangent search algorithm, which can be used for harmonic estimation in power systems. This method considers the different characteristics of harmonic component amplitude and phase, and utilizes the unique iterative search strategy of the tangent search algorithm to improve estimation time and convergence, achieving effective estimation of signal harmonic components and ultimately contributing to the improvement of power quality in power systems.
[0123] Moreover, the purpose of this embodiment is to provide a new technology for power system harmonic estimation, which can effectively improve estimation efficiency and accuracy, and solve the problems of low efficiency and accuracy of traditional methods.
[0124] In addition, the power system harmonic estimation method based on the tangent search algorithm in this embodiment includes the following steps:
[0125] Step 1: Collect harmonic signals from the power system as sample data.
[0126] Step 2: Initialize the parameters of the tangent search algorithm. Use the phase parameters of the harmonic components as individuals in the tangent search algorithm, and set the maximum number of iterations, population size, value range of the phase parameters, and search range. Specifically, the maximum number of iterations can be set to 100, the population size to 30, and the upper and lower limits of the phase parameter φ (ub and lb) to be 360 and -360, respectively.
[0127] Step 3: Estimate the amplitude parameters of each harmonic component in the signal using the least squares method.
[0128] Step 4: Use the error between the harmonic estimate and the actual value as the fitness function of the tangent search algorithm.
[0129] Step 5: Determine the local optimum based on the initial fitness value of the tangent search algorithm, update the current optimum using tangent search, and obtain the best estimation result by comparing the local and global optimum solutions. The preset values are ps = 0.3, pe = 0.8, and pr = 0.5.
[0130] Step 6: After several iterations of the tangent search algorithm, the optimal combination of phase and amplitude parameters for each harmonic component is obtained, and the final harmonic estimate is obtained.
[0131] Moreover, the comparison results between the existing particle swarm optimization estimation method and the harmonic estimation method in this embodiment are shown in Table 1. The harmonic estimation method in this embodiment achieved an estimation error of 0.0214 and an estimation time of 0.125 seconds, which is better than the particle swarm optimization estimation method. It can effectively solve the estimation problem of power system signals such as current or voltage that are affected by noise, and greatly improve the estimation accuracy and calculation time.
[0132] Table 1
[0133] Estimation methods estimation error Time (s) Particle swarm optimization estimation methods 0.0309 0.213 The harmonic estimation method in this embodiment 0.0214 0.125
[0134] For example, Figure 3 This is a schematic diagram of the estimation results obtained by estimating the harmonics of the power system in this embodiment, as shown below. Figure 3 As shown in this embodiment, a power system harmonic estimation method based on the tangent search algorithm can make the harmonic estimation value closer to the actual value of the harmonic signal.
[0135] This embodiment presents a power system harmonic estimation method based on the tangent search algorithm, comprising the following steps: using the collected harmonic signal as sample data; initializing the parameters of the tangent search algorithm, using the phase parameters of the harmonic components as individuals of the tangent search algorithm, and setting the maximum number of iterations, population size, value range of the phase parameters, and search range of the tangent search algorithm; estimating the amplitude parameters of each harmonic component in the signal using the least squares method; using the error between the estimated and actual harmonic values as the fitness function of the tangent search algorithm; determining its local optimum based on the initial fitness value of the tangent search algorithm, updating the current optimum using the tangent search algorithm, and obtaining the best estimation effect by comparing the local and global optimum solutions; obtaining the optimal combination of phase and amplitude of the harmonics after several iterations of the tangent search algorithm, and obtaining the final estimated values of the harmonic parameters. In this embodiment, the tangent search algorithm significantly reduces the error in harmonic estimation.
[0136] In summary, the harmonic signal processing method provided in this application obtains the harmonic signals generated in the power system, initializes the parameters of the original search algorithm based on the harmonic signals to obtain a target search algorithm, performs initial estimation of the amplitude and phase of the harmonic signals to obtain initial estimated values of the harmonic signals, and obtains the actual amplitude and phase values of the harmonic signals to obtain actual values of the harmonic signals, calculates the error between the initial estimated values and the actual values of the harmonic signals, and determines the fitness function of the target search algorithm based on the error between the initial estimated values and the actual values of the harmonic signals, and iteratively calculates the initial estimated values of the harmonic signals based on the fitness function of the target search algorithm to obtain the final estimated values of the harmonic signals, thus solving the problem of poor performance in estimating the amplitude and phase of harmonic signals generated in the power system in related technologies. By collecting harmonic signals generated in the power system and determining the fitness function of the search algorithm based on the error between the estimated and actual values of the collected harmonic signals, the local optimum of the harmonic signal is determined according to the fitness function of the search algorithm. The search algorithm is then used to update the current optimum, and after several iterations, the optimal combination of phase and amplitude of the harmonic is obtained, thus obtaining the final estimated value of the harmonic parameters. This method can improve the time and convergence of harmonic estimation in the power system, achieve effective estimation of harmonic signals, and thus improve the efficiency and accuracy of harmonic estimation in the power system.
[0137] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0138] This application also provides a harmonic signal processing apparatus. It should be noted that the harmonic signal processing apparatus of this application can be used to execute the harmonic signal processing method provided in this application. The harmonic signal processing apparatus provided in this application will be described below.
[0139] Figure 4 This is a schematic diagram of a harmonic signal processing apparatus provided according to an embodiment of this application. Figure 4 As shown, the device includes: a first processing unit 401, a first determining unit 402, a second processing unit 403, and a second determining unit 404.
[0140] Specifically, the first processing unit 401 is used to acquire the harmonic signals generated in the power system, and to initialize the parameters of the original search algorithm based on the harmonic signals to obtain the target search algorithm.
[0141] The first determining unit 402 is used to perform initial estimation of the amplitude and phase of the harmonic signal to obtain the initial estimated value of the harmonic signal, and to obtain the actual amplitude and actual phase value of the harmonic signal to obtain the actual value of the harmonic signal.
[0142] The second processing unit 403 is used to calculate the error between the initial estimated value of the harmonic signal and the actual value of the harmonic signal, and to determine the fitness function of the target search algorithm based on the error between the initial estimated value of the harmonic signal and the actual value of the harmonic signal.
[0143] The second determining unit 404 is used to iteratively calculate the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal.
[0144] In summary, the harmonic signal processing apparatus provided in this application embodiment acquires the harmonic signals generated in the power system through a first processing unit 401, and initializes the parameters of the original search algorithm based on the harmonic signals to obtain a target search algorithm; a first determining unit 402 performs initial estimation of the amplitude and phase of the harmonic signals to obtain initial estimated values of the harmonic signals, and acquires the actual amplitude and actual phase values of the harmonic signals to obtain the actual values of the harmonic signals; a second processing unit 403 calculates the error between the initial estimated values and the actual values of the harmonic signals, and determines the fitness function of the target search algorithm based on the error between the initial estimated values and the actual values of the harmonic signals; a second determining unit 404 iteratively calculates the initial estimated values of the harmonic signals based on the fitness function of the target search algorithm to obtain the final estimated values of the harmonic signals, thus solving the problem of poor estimation of the amplitude and phase of harmonic signals generated in the power system in related technologies. By collecting harmonic signals generated in the power system and determining the fitness function of the search algorithm based on the error between the estimated and actual values of the collected harmonic signals, the local optimum of the harmonic signal is determined according to the fitness function of the search algorithm. The search algorithm is then used to update the current optimum, and after several iterations, the optimal combination of phase and amplitude of the harmonic is obtained, thus obtaining the final estimated value of the harmonic parameters. This method can improve the time and convergence of harmonic estimation in the power system, achieve effective estimation of harmonic signals, and thus improve the efficiency and accuracy of harmonic estimation in the power system.
[0145] Optionally, in the harmonic signal processing apparatus provided in this application embodiment, the second determining unit includes: a first determining module, used to calculate the fitness function value corresponding to the initial estimated value of the harmonic signal based on the fitness function of the target search algorithm, to obtain an initial fitness value; a second determining module, used to re-estimate the amplitude and phase of the harmonic signal using the target search algorithm, to obtain a target estimated value of the harmonic signal; a third determining module, used to calculate the fitness function value corresponding to the target estimated value of the harmonic signal based on the fitness function of the target search algorithm, to obtain a target fitness value; and a fourth determining module, used to obtain a final estimated value of the harmonic signal based on the target fitness value and the initial fitness value.
[0146] Optionally, in the harmonic signal processing apparatus provided in this application embodiment, the fourth determining module includes: a first judging submodule, used to judge whether the target fitness value is less than the initial fitness value; a first calculation submodule, used to continue iteratively calculating the target estimate of the harmonic signal based on the fitness function of the target search algorithm if the target fitness value is not less than the initial fitness value, until the final estimate of the harmonic signal is obtained; and a first determining submodule, used to take the target estimate of the harmonic signal as the final estimate of the harmonic signal if the target fitness value is less than the initial fitness value.
[0147] Optionally, in the harmonic signal processing apparatus provided in this application embodiment, the first processing unit includes: a first processing module, used to take the phase parameters of the harmonic components of the harmonic signal as individuals of the original search algorithm, and set the value range of the phase parameters of the harmonic components of the harmonic signal to obtain the set original search algorithm; and a first setting module, used to set the maximum number of iterations, population size and search range of the set original search algorithm to obtain the target search algorithm.
[0148] Optionally, in the harmonic signal processing apparatus provided in the embodiments of this application, the first determining unit includes: a second processing module, used to perform an initial estimation of the amplitude of the harmonic signal to obtain an initially estimated amplitude parameter; a third processing module, used to perform an initial estimation of the phase of the harmonic signal to obtain an initially estimated phase parameter; and a fifth determining module, used to obtain an initial estimated value of the harmonic signal based on the initially estimated amplitude parameter and the initially estimated phase parameter.
[0149] Optionally, in the harmonic signal processing apparatus provided in the embodiments of this application, the second processing module includes: a second determining submodule, used to estimate the amplitude parameters of each harmonic component in the harmonic signal by combining the least squares method to obtain multiple amplitude parameters, wherein each amplitude parameter is the amplitude parameter of each harmonic component in the harmonic signal; and a first processing submodule, used to perform summary processing on the multiple amplitude parameters to obtain initially estimated amplitude parameters.
[0150] Optionally, in the harmonic signal processing apparatus provided in the embodiments of this application, the third processing module includes: a third determining submodule, used to estimate the phase parameters of each harmonic component in the harmonic signal to obtain multiple phase parameters, wherein each phase parameter is the phase parameter of each harmonic component in the harmonic signal; and a second processing submodule, used to summarize the multiple phase parameters to obtain initially estimated phase parameters.
[0151] Optionally, in the harmonic signal processing apparatus provided in this application embodiment, the apparatus further includes: a third determining unit, configured to iteratively calculate the initial estimated value of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimated value of the harmonic signal, and then determine the amplitude characteristics and phase characteristics of each harmonic component in the harmonic signal based on the final estimated value of the harmonic signal; a first filtering unit, configured to filter out target type harmonic components from multiple harmonic components in the harmonic signal according to the amplitude characteristics and phase characteristics of each harmonic component in the harmonic signal, wherein the target type harmonic components have a higher degree of harm to the power system than a preset degree of harm; and a third processing unit, configured to filter the target type harmonic components in the harmonic signal to obtain a filtered harmonic signal.
[0152] The harmonic signal processing device includes a processor and a memory. The first processing unit 401, the first determining unit 402, the second processing unit 403, and the second determining unit 404 mentioned above are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.
[0153] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can improve the efficiency and accuracy of power system harmonic estimation.
[0154] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0155] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements a method for processing the harmonic signal.
[0156] This invention provides a processor for running a program, wherein the program executes a method for processing the harmonic signal during runtime.
[0157] like Figure 5As shown, this embodiment of the invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: acquiring harmonic signals generated in a power system, and initializing the parameters of the original search algorithm based on the harmonic signals to obtain a target search algorithm; performing initial estimation of the amplitude and phase of the harmonic signals to obtain initial estimated values of the harmonic signals, and acquiring the actual amplitude and phase values of the harmonic signals to obtain actual values of the harmonic signals; calculating the error between the initial estimated values and the actual values of the harmonic signals, and determining the fitness function of the target search algorithm based on the error between the initial estimated values and the actual values of the harmonic signals; and iteratively calculating the initial estimated values of the harmonic signals based on the fitness function of the target search algorithm to obtain the final estimated values of the harmonic signals.
[0158] When the processor executes the program, it also performs the following steps: Based on the fitness function of the target search algorithm, iteratively calculates the initial estimate of the harmonic signal to obtain the final estimate of the harmonic signal, including: calculating the fitness function value corresponding to the initial estimate of the harmonic signal based on the fitness function of the target search algorithm, obtaining the initial fitness value; using the target search algorithm, re-estimating the amplitude and phase of the harmonic signal to obtain the target estimate of the harmonic signal; calculating the fitness function value corresponding to the target estimate of the harmonic signal based on the fitness function of the target search algorithm, obtaining the target fitness value; and obtaining the final estimate of the harmonic signal based on the target fitness value and the initial fitness value.
[0159] When the processor executes the program, it also performs the following steps: obtaining the final estimated value of the harmonic signal based on the target fitness value and the initial fitness value, including: determining whether the target fitness value is less than the initial fitness value; if the target fitness value is not less than the initial fitness value, then continuing to iteratively calculate the target estimated value of the harmonic signal based on the fitness function of the target search algorithm until the final estimated value of the harmonic signal is obtained; if the target fitness value is less than the initial fitness value, then using the target estimated value of the harmonic signal as the final estimated value of the harmonic signal.
[0160] When the processor executes the program, it also performs the following steps: Based on the harmonic signal, the parameters of the original search algorithm are initialized to obtain the target search algorithm, including: taking the phase parameters of the harmonic components of the harmonic signal as individuals of the original search algorithm, and setting the value range of the phase parameters of the harmonic components of the harmonic signal to obtain the set original search algorithm; setting the maximum number of iterations, population size and search range of the set original search algorithm to obtain the target search algorithm.
[0161] When the processor executes the program, it also performs the following steps: performing initial estimation of the amplitude and phase of the harmonic signal to obtain the initial estimated value of the harmonic signal, including: performing initial estimation of the amplitude of the harmonic signal to obtain the initial estimated amplitude parameter; performing initial estimation of the phase of the harmonic signal to obtain the initial estimated phase parameter; and obtaining the initial estimated value of the harmonic signal based on the initial estimated amplitude parameter and the initial estimated phase parameter.
[0162] When the processor executes the program, it also performs the following steps: initially estimating the amplitude of the harmonic signal to obtain the initial estimated amplitude parameters, including: estimating the amplitude parameters of each harmonic component in the harmonic signal by combining the least squares method to obtain multiple amplitude parameters, wherein each amplitude parameter is the amplitude parameter of each harmonic component in the harmonic signal; summarizing the multiple amplitude parameters to obtain the initial estimated amplitude parameters.
[0163] When the processor executes the program, it also performs the following steps: performing an initial estimation of the phase of the harmonic signal to obtain the initial estimated phase parameters, including: estimating the phase parameters of each harmonic component in the harmonic signal to obtain multiple phase parameters, wherein each phase parameter is the phase parameter of each harmonic component in the harmonic signal; summarizing the multiple phase parameters to obtain the initial estimated phase parameters.
[0164] When the processor executes the program, it also performs the following steps: after iteratively calculating the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal, it further includes: determining the amplitude and phase characteristics of each harmonic component in the harmonic signal based on the final estimate of the harmonic signal; selecting target type harmonic components from multiple harmonic components in the harmonic signal based on the amplitude and phase characteristics of each harmonic component in the harmonic signal, wherein the target type harmonic components have a higher degree of harm to the power system than a preset degree of harm; and filtering the target type harmonic components in the harmonic signal to obtain the filtered harmonic signal.
[0165] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0166] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program comprising the following steps: acquiring harmonic signals generated in a power system, and initializing the parameters of the original search algorithm based on the harmonic signals to obtain a target search algorithm; performing initial estimation of the amplitude and phase of the harmonic signals to obtain initial estimated values of the harmonic signals, and acquiring the actual amplitude and phase values of the harmonic signals to obtain actual values of the harmonic signals; calculating the error between the initial estimated values and the actual values of the harmonic signals, and determining the fitness function of the target search algorithm based on the error between the initial estimated values and the actual values of the harmonic signals; and iteratively calculating the initial estimated values of the harmonic signals based on the fitness function of the target search algorithm to obtain the final estimated values of the harmonic signals.
[0167] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: Iteratively calculating the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal, including: calculating the fitness function value corresponding to the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the initial fitness value; using the target search algorithm to re-estimate the amplitude and phase of the harmonic signal to obtain the target estimate of the harmonic signal; calculating the fitness function value corresponding to the target estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the target fitness value; and obtaining the final estimate of the harmonic signal based on the target fitness value and the initial fitness value.
[0168] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: obtaining the final estimate of the harmonic signal based on the target fitness value and the initial fitness value, including: determining whether the target fitness value is less than the initial fitness value; if the target fitness value is not less than the initial fitness value, then continuing to iteratively calculate the target estimate of the harmonic signal based on the fitness function of the target search algorithm until the final estimate of the harmonic signal is obtained; if the target fitness value is less than the initial fitness value, then using the target estimate of the harmonic signal as the final estimate of the harmonic signal.
[0169] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: based on the harmonic signal, the parameters of the original search algorithm are initialized to obtain the target search algorithm, including: taking the phase parameters of the harmonic components of the harmonic signal as individuals of the original search algorithm, and setting the value range of the phase parameters of the harmonic components of the harmonic signal to obtain the set original search algorithm; setting the maximum number of iterations, population size and search range of the set original search algorithm to obtain the target search algorithm.
[0170] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: performing an initial estimation of the amplitude and phase of the harmonic signal to obtain an initial estimated value of the harmonic signal, including: performing an initial estimation of the amplitude of the harmonic signal to obtain an initially estimated amplitude parameter; performing an initial estimation of the phase of the harmonic signal to obtain an initially estimated phase parameter; and obtaining an initial estimated value of the harmonic signal based on the initially estimated amplitude parameter and the initially estimated phase parameter.
[0171] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: performing an initial estimation of the amplitude of the harmonic signal to obtain the initial estimated amplitude parameters, including: estimating the amplitude parameters of each harmonic component in the harmonic signal using the least squares method to obtain multiple amplitude parameters, wherein each amplitude parameter is the amplitude parameter of each harmonic component in the harmonic signal; summarizing the multiple amplitude parameters to obtain the initial estimated amplitude parameters.
[0172] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: performing an initial estimation of the phase of the harmonic signal to obtain the initial estimated phase parameters, including: estimating the phase parameters of each harmonic component in the harmonic signal to obtain multiple phase parameters, wherein each phase parameter is the phase parameter of each harmonic component in the harmonic signal; summarizing the multiple phase parameters to obtain the initial estimated phase parameters.
[0173] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: after iteratively calculating the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal, it further includes: determining the amplitude and phase characteristics of each harmonic component in the harmonic signal based on the final estimate of the harmonic signal; selecting target type harmonic components from multiple harmonic components in the harmonic signal according to the amplitude and phase characteristics of each harmonic component in the harmonic signal, wherein the target type harmonic components have a higher degree of harm to the power system than a preset degree of harm; and filtering the target type harmonic components in the harmonic signal to obtain the filtered harmonic signal.
[0174] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0175] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0176] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0177] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0178] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0179] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0180] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0181] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0182] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0183] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method of processing a harmonic signal, characterized by, The method comprises the following steps: Harmonic signals generated in a power system are acquired, and parameters of an original search algorithm are initialized according to the harmonic signals to obtain a target search algorithm; An initial estimation of amplitudes and phases of the harmonic signals is performed to obtain initial estimation values of the harmonic signals, and actual amplitudes and actual phases of the harmonic signals are acquired to obtain actual values of the harmonic signals; Errors between the initial estimation values of the harmonic signals and the actual values of the harmonic signals are calculated, and a fitness function of the target search algorithm is determined according to the errors between the initial estimation values of the harmonic signals and the actual values of the harmonic signals; Based on the fitness function of the target search algorithm, iterative calculation is performed on the initial estimation values of the harmonic signals to obtain final estimation values of the harmonic signals; The iterative calculation of the initial estimation values of the harmonic signals based on the fitness function of the target search algorithm to obtain the final estimation values of the harmonic signals comprises the following steps: based on the fitness function of the target search algorithm, a fitness function value corresponding to the initial estimation values of the harmonic signals is calculated to obtain an initial fitness value; the amplitudes and phases of the harmonic signals are estimated again by using the target search algorithm to obtain target estimation values of the harmonic signals; based on the fitness function of the target search algorithm, a fitness function value corresponding to the target estimation values of the harmonic signals is calculated to obtain a target fitness value; and the final estimation values of the harmonic signals are obtained according to the target fitness value and the initial fitness value. The initialization of the parameters of the original search algorithm according to the harmonic signals to obtain the target search algorithm comprises the following steps: a phase parameter of a harmonic component of the harmonic signals is taken as an individual of the original search algorithm, and a value range of the phase parameter of the harmonic component of the harmonic signals is set to obtain a set original search algorithm; and the maximum number of iterations, the population size and the search range of the set original search algorithm are set to obtain the target search algorithm.
2. The method of claim 1, wherein, The obtaining of the final estimation values of the harmonic signals according to the target fitness value and the initial fitness value comprises the following steps: It is determined whether the target fitness value is less than the initial fitness value; If the target fitness value is not less than the initial fitness value, iterative calculation is continuously performed on the target estimation values of the harmonic signals based on the fitness function of the target search algorithm until the final estimation values of the harmonic signals are obtained; If the target fitness value is less than the initial fitness value, the target estimation values of the harmonic signals are taken as the final estimation values of the harmonic signals.
3. The method of claim 1, wherein, The initial estimation of the amplitudes and phases of the harmonic signals to obtain the initial estimation values of the harmonic signals comprises the following steps: An initial estimation of the amplitudes of the harmonic signals is performed to obtain initial estimation amplitude parameters; An initial estimation of the phases of the harmonic signals is performed to obtain initial estimation phase parameters; Based on the initial estimation amplitude parameters and the initial estimation phase parameters, the initial estimation values of the harmonic signals are obtained.
4. The method of claim 3, wherein, The amplitude of the harmonic signal is initially estimated, and the initially estimated amplitude parameters include: The amplitude parameters of each harmonic component in the harmonic signal are estimated by combining the least squares method, resulting in multiple amplitude parameters, where each amplitude parameter is the amplitude parameter of each harmonic component in the harmonic signal. The multiple amplitude parameters are summarized to obtain the initial estimated amplitude parameters.
5. The method of claim 3, wherein, The phase of the harmonic signal is initially estimated, and the initially estimated phase parameters include: The phase parameters of each harmonic component in the harmonic signal are estimated to obtain multiple phase parameters, wherein each phase parameter is the phase parameter of each harmonic component in the harmonic signal; The multiple phase parameters are summarized to obtain the initially estimated phase parameters.
6. The method of claim 1, wherein, After iteratively calculating the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal, the method further includes: Based on the final estimated value of the harmonic signal, determine the amplitude characteristics and phase characteristics of each harmonic component in the harmonic signal; Based on the amplitude and phase characteristics of each harmonic component in the harmonic signal, target type harmonic components are selected from multiple harmonic components in the harmonic signal, wherein the harmonic components of the target type pose a higher degree of harm to the power system than a preset degree of harm. The target type of harmonic component in the harmonic signal is filtered to obtain the filtered harmonic signal.
7. A harmonic signal processing apparatus, characterized by comprising: include: The first processing unit is used to acquire the harmonic signals generated in the power system, and to initialize the parameters of the original search algorithm based on the harmonic signals to obtain the target search algorithm. The first determining unit is used to perform an initial estimation of the amplitude and phase of the harmonic signal to obtain the initial estimated value of the harmonic signal, and to obtain the actual amplitude and actual phase value of the harmonic signal to obtain the actual value of the harmonic signal. The second processing unit is used to calculate the error between the initial estimated value of the harmonic signal and the actual value of the harmonic signal, and to determine the fitness function of the target search algorithm based on the error between the initial estimated value of the harmonic signal and the actual value of the harmonic signal. The second determining unit is used to iteratively calculate the initial estimate of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimate of the harmonic signal. The process of iteratively calculating the initial estimated value of the harmonic signal based on the fitness function of the target search algorithm to obtain the final estimated value of the harmonic signal includes: calculating the fitness function value corresponding to the initial estimated value of the harmonic signal based on the fitness function of the target search algorithm to obtain the initial fitness value; using the target search algorithm to re-estimate the amplitude and phase of the harmonic signal to obtain the target estimated value of the harmonic signal; calculating the fitness function value corresponding to the target estimated value of the harmonic signal based on the fitness function of the target search algorithm to obtain the target fitness value; and obtaining the final estimated value of the harmonic signal based on the target fitness value and the initial fitness value. Based on the harmonic signal, the parameters of the original search algorithm are initialized to obtain the target search algorithm, including: taking the phase parameters of the harmonic components of the harmonic signal as individuals of the original search algorithm, and setting the value range of the phase parameters of the harmonic components of the harmonic signal to obtain the set original search algorithm; setting the maximum number of iterations, population size and search range of the set original search algorithm to obtain the target search algorithm.
8. An electronic device, comprising: It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the harmonic signal processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Harmonic parameter detection method and system based on RAdam optimization width learning
CN115062668A
Harmonic monitoring method for power distribution network
CN118112322A