CN114252700A - Power harmonic detection method based on sine and cosine algorithm - Google Patents

Power harmonic detection method based on sine and cosine algorithm Download PDF

Info

Publication number
CN114252700A
CN114252700A CN202111250696.XA CN202111250696A CN114252700A CN 114252700 A CN114252700 A CN 114252700A CN 202111250696 A CN202111250696 A CN 202111250696A CN 114252700 A CN114252700 A CN 114252700A
Authority
CN
China
Prior art keywords
sine
algorithm
cosine
solution
detection method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111250696.XA
Other languages
Chinese (zh)
Inventor
黄清珍
陈春风
陈冬冬
陈玉茵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ruifeng Electronic Technology Co ltd
Original Assignee
Shenzhen Ruifeng Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ruifeng Electronic Technology Co ltd filed Critical Shenzhen Ruifeng Electronic Technology Co ltd
Priority to CN202111250696.XA priority Critical patent/CN114252700A/en
Publication of CN114252700A publication Critical patent/CN114252700A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/16Spectrum analysis; Fourier analysis
    • G01R23/165Spectrum analysis; Fourier analysis using filters

Landscapes

  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses a sine and cosine algorithm-based power harmonic detection method, which comprises the steps of obtaining candidate solutions in a solution space through a sine and cosine algorithm, comparing the obtained solutions with required results, determining the fitness value of each candidate solution, taking the fitness values into consideration, and recording an optimal solution scheme, wherein the sine and cosine algorithm-based power harmonic detection method has the following advantages: 1) the SCA algorithm has high precision, and the estimation error of the parameters is less than 5%. 2) Compared to some optimization-based algorithms assuming known frequencies, the proposed algorithm has better performance indicators in complex grid environments. 3) The SCA algorithm was tested on actual field data. It can perfectly estimate the frequencies, amplitudes and phases of harmonics constituting a signal, and therefore, the proposed algorithm can be easily applied to a practical system.

Description

Power harmonic detection method based on sine and cosine algorithm
Technical Field
The invention relates to the technical field of power electronics, in particular to a power harmonic detection method based on a sine and cosine algorithm.
Background
FFT is currently the most popular method in harmonic analysis of static signals. Many different methods, such as wavelet transform, Hilbert Huang Transform (HHT), have been applied to harmonic estimation, as harmonic analysis using FFT can produce erroneous results in non-stationary signals or when the signal frequency is not at the 50Hz nominal value. The filters used in the wavelet transform are not ideal and the problem of modal mixing in the HHT method can negatively impact the accuracy of the harmonic estimation.
Other popular methods used in harmonic analysis are Kalman Filters (KF) and integrated kalman filters (EnKF). In noisy environments, EnKF has better estimation performance than KF. However, in these methods, the performance of the estimation process is determined by the next state matrix corresponding to the matrix of the previous state. In these methods, the frequency estimation is done after the amplitude and phase estimation. These algorithms perform poorly for frequency estimation in noisy environments.
The MUSIC, Prony's and ESPRIT methods are also used for harmonic analysis. While these methods are used to estimate the frequency, amplitude and phase of harmonics, it is reported that these algorithms are actually more suitable for frequency identification. These algorithms suffer from reduced performance in frequency estimation and do not perform well in estimating amplitude and phase if the signal contains harmonic or sub-harmonic components in close proximity to each other, especially in noisy environments.
Disclosure of Invention
The invention aims to provide a power harmonic detection method based on a sine and cosine algorithm to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
a power harmonic detection method based on sine and cosine algorithm comprises the following steps:
step 1, obtaining candidate solutions in a solution space through a sine and cosine algorithm, comparing the obtained solutions with a required result, determining the fitness value of each candidate solution, considering the fitness values, and recording an optimal solution; in sine and cosine arithmetic, the position of a particle is updated by using the following two equations:
Figure BDA0003322378430000011
Figure BDA0003322378430000012
wherein, Pt iIterating the target position in the ith dimension for the tth time; xt iIs the current position in the ith dimension of the t iteration, r1Is a random number which defines the position of the next region, r2Is a random number that determines how far, r, should be moved toward or away from the target3Is a random number that causes the target point to have an effect on determining the distance by generating a random weight for the target, based on r4The conditions for the coefficients, using the two equations above, are given in the following set of equations. Thus, the particles are brought into solution as sine and cosine functions, respectively:
Figure BDA0003322378430000021
searching for different regions of the space when the sine and cosine functions return values greater or less than 1;
step 2, updating the coefficient r1、r2、r3Updating the location of the search agent by considering the location of the best solution;
and 3, checking whether the determined maximum iteration times are reached, if not, repeating the previous steps, and if so, terminating the program.
As a further scheme of the invention: due to the oscillatory motion between the sine and cosine functions, the probability of finding the best solution among all solutions increases.
As a further scheme of the invention: when the sine and cosine functions return values greater or less than 1, different regions of the search space, the sine and cosine intervals are adaptively changed to use a formula
Figure BDA0003322378430000022
And balancing the research process of the candidate solution, wherein in the formula, T is the current iteration time, T is the maximum iteration time, and c is a constant.
As a further scheme of the invention: the general form of any discrete-time power signal is as follows:
Figure BDA0003322378430000023
Figure BDA0003322378430000024
In the formula, Aj、θjAnd fjUnknown amplitude phase and frequency, A, representing harmonics and inter-harmonics, respectivelydcexp(-adcnTs) Is an attenuation term, v [ n ]]Is white Gaussian noise, M is the harmonic order, TsIs the sampling frequency.
As a further scheme of the invention: in solving the optimization problem, an objective function (J) is defined, and in order to optimize the unknown parameters in the harmonic estimation problem, J is defined as the difference between the actual and estimated signals, as shown in the following formula
Figure BDA0003322378430000025
Compared with the prior art, the invention has the beneficial effects that:
1) the SCA algorithm has high precision, and the estimation error of the parameters is less than 5%.
2) Compared to some optimization-based algorithms assuming known frequencies, the proposed algorithm has better performance indicators in complex grid environments.
3) The SCA algorithm was tested on actual field data. It can perfectly estimate the frequency, amplitude and phase of the harmonics that make up the signal. Therefore, the proposed algorithm can be easily applied to a real system.
Drawings
FIG. 1 is a model of sine and cosine functions in the range of [ -22 ];
FIG. 2 is a flow chart of a method of the present invention;
FIG. 3 is a waveform diagram of harmonic analysis of current data;
fig. 4 is a diagram illustrating the convergence time relationship of the proposed SCA algorithm in the fundamental and harmonic current calculation.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Example 1: referring to fig. 1-4, a power harmonic detection method based on sine and cosine algorithm,
firstly, the definition of sine and cosine algorithm is introduced:
the Sine and Cosine Algorithm (SCA) is a population-based heuristic based on mathematical models of sine and cosine functions. Almost all population-based optimization techniques initially generate random solutions to start a solution, and the search and global optimization processes in the candidate solution space are different for each optimization technique. In SCA, the position of the particles is updated by using the following two equations.
Figure BDA0003322378430000031
Figure BDA0003322378430000032
Wherein, Pt iTarget position in ith dimension, X, of the t iterationt iIs the current position in the ith dimension of the tth iteration. r is1Is a random number that defines the location of the next region. r is2Is a random number that determines how far towards or away from the target should be moved. r is3Is a random number that gives the impact of the target point on determining the distance by generating random weights for the target.
According to r4The condition of the coefficients, using either formula 1 or formula 2 in the above equation set, is as given in the following equation set.
Thus, the particles are brought into solution as sine and cosine functions, respectively.
Figure BDA0003322378430000041
This has a great influence on finding the global optimal solution, and the probability of finding the optimal solution among all solutions increases due to the oscillatory motion between the sine and cosine functions. The SCA algorithm creates and develops a set of random solutions for a particular problem, and therefore, has the property of avoiding local optimality, as compared to individual-based algorithms. When the sine and cosine functions return values greater or less than 1, different regions of the space are searched. The model presented in fig. 2 shows the variation of the sine and cosine functions and how one solution is found to update the inward or outward position in the area between the other solution and itself.
The sine and cosine intervals are adaptively varied to balance the process of investigation of the candidate solution by using the following equation. In the following formula, T is the current iteration number, T is the maximum iteration number, c is a constant,
Figure BDA0003322378430000042
the general form of any discrete-time power signal is as follows:
Figure RE-GDA0003499285560000043
Figure RE-GDA0003499285560000044
in the formula, Aj、θjAnd fjUnknown amplitude phase and frequency, A, representing harmonics and inter-harmonics, respectivelydcexp(-adcnTs) Is an attenuation term, v [ n ]]Is white Gaussian noise, M is the number of harmonics, TsIs the sampling frequency.
The performance of the SCA algorithm in estimating the frequency, amplitude and phase of harmonics and sub-harmonics in a power system was studied. In solving the optimization problem, an objective function (J) needs to be defined. To optimize the unknown parameters in the harmonic estimation problem, J is defined as the difference between the actual and estimated signals, e.g.Is represented by the following formula
Figure BDA0003322378430000045
Figure BDA0003322378430000046
The harmonic analysis process based on the SCA algorithm is performed by using candidate solutions in a solution space. By comparing the obtained solution with the desired result, a fitness value is determined for each candidate solution, and the best solution is recorded taking into account these fitness values. Then the coefficient r is updated1、r2、r3And r4. The location of the search agent is updated by considering the location of the best solution. Finally, it is checked whether a certain maximum number of iterations has been reached. If the maximum number of iterations has not been reached, the previous steps are repeated. If the maximum number of iterations is reached, the procedure terminates.
The working principle is as follows: to test the performance of SCAs on-site on real signals collected from the power system, a harmonic analysis was performed on 0.1 second current data obtained from the power system using the proposed algorithm. The voltage data has a sampling frequency of 5000Hz and an effective value of about 250A for the current, as shown in fig. 3 below.
In fig. 3, it can be seen that the error between the reconstructed signal obtained based on the SCA algorithm and the actual signal is very small, which proves the effectiveness of the SCA algorithm. While fig. 4 shows the convergence time of the proposed SCA algorithm in the fundamental and harmonic current calculations, it can be seen that the proposed algorithm can converge before 20 iterations.
The same analysis was performed using the DFT method and the results obtained were compared with the results found using the proposed algorithm, as shown in the table below. According to the table, the results obtained by SCA and DFT are almost the same, and the SCA algorithm exhibits superior frequency, amplitude and phase of the performance signal. And, the proposed algorithm can converge before 20 iterations, and the calculation speed is better than that of the DFT algorithm.
Figure BDA0003322378430000051
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (5)

1. A power harmonic detection method based on sine and cosine algorithm is characterized by comprising the following steps:
step 1, obtaining candidate solutions in a solution space through a sine and cosine algorithm, comparing the obtained solutions with a required result, determining the fitness value of each candidate solution, considering the fitness values, and recording an optimal solution; in the sine and cosine algorithm, the position of the particle is updated by using the following two equations:
Figure FDA0003322378420000011
Figure FDA0003322378420000012
wherein, Pt iIterating the target position in the ith dimension for the tth time; xt iIs the current position in the ith dimension of the t iteration, r1Is oneRandom number, which defines the position of the next region, r2Is a random number that determines how far, r, should be moved toward or away from the target3Is a random number that causes the target point to have an effect on determining the distance by generating a random weight for the target, based on r4The conditions for the coefficients, using the two equations above, are given in the following system of equations, so that the particles are brought into solution as sine and cosine functions, respectively:
Figure FDA0003322378420000013
searching for different regions of the space when the sine and cosine functions return values greater or less than 1;
step 2, updating the coefficient r1、r2、r3Updating the location of the search agent by considering the location of the best solution;
and 3, checking whether the determined maximum iteration times are reached, if not, repeating the previous steps, and if so, terminating the program.
2. A method for detecting power harmonics based on the sine-cosine algorithm as claimed in claim 1, characterized in that the probability of finding the best solution among all solutions is increased due to the oscillatory motion between the sine and cosine functions.
3. The sine-cosine algorithm-based power harmonic detection method of claim 1, wherein when sine and cosine functions return values greater or less than 1, different regions of a search space are searched, sine and cosine intervals are adaptively changed to use a formula
Figure FDA0003322378420000014
And balancing the research process of the candidate solution, wherein in the formula, T is the current iteration time, T is the maximum iteration time, and c is a constant.
4. A positive residue based on claim 1The method for detecting the power harmonic wave of the chord algorithm is characterized in that the general form of any discrete-time power signal is as follows:
Figure FDA0003322378420000015
Figure FDA0003322378420000016
in the formula, Aj、θjAnd fjUnknown amplitude phase and frequency, A, representing harmonics and inter-harmonics, respectivelydcexp(-adcnTs) Is an attenuation term, v [ n ]]Is white Gaussian noise, M is the number of harmonics, TsIs the sampling frequency.
5. The method as claimed in claim 1, wherein an objective function (J) is defined when solving the optimization problem, and J is defined as the difference between the actual and estimated signals in order to optimize the unknown parameters in the harmonic estimation problem, as shown in the following formula
Figure FDA0003322378420000021
Figure FDA0003322378420000022
CN202111250696.XA 2021-10-26 2021-10-26 Power harmonic detection method based on sine and cosine algorithm Pending CN114252700A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111250696.XA CN114252700A (en) 2021-10-26 2021-10-26 Power harmonic detection method based on sine and cosine algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111250696.XA CN114252700A (en) 2021-10-26 2021-10-26 Power harmonic detection method based on sine and cosine algorithm

Publications (1)

Publication Number Publication Date
CN114252700A true CN114252700A (en) 2022-03-29

Family

ID=80792207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111250696.XA Pending CN114252700A (en) 2021-10-26 2021-10-26 Power harmonic detection method based on sine and cosine algorithm

Country Status (1)

Country Link
CN (1) CN114252700A (en)

Similar Documents

Publication Publication Date Title
Wang et al. Matching demodulation transform and synchrosqueezing in time-frequency analysis
CN110441018B (en) Time-frequency analysis method for fire impact response data
Chen et al. Warped variational mode decomposition with application to vibration signals of varying-speed rotating machineries
CN111222088B (en) Improved method for estimating weighted power harmonic amplitude of flat-top self-convolution window
Ma et al. An improved time-frequency analysis method for instantaneous frequency estimation of rolling bearing
Dash et al. A hybrid unscented filtering and particle swarm optimization technique for harmonic analysis of nonstationary signals
CN112394223B (en) Joint estimation method for signal component frequency and initial phase
CN114252700A (en) Power harmonic detection method based on sine and cosine algorithm
CN105960613A (en) System identification device
Liu et al. An approximate maximum likelihood estimator for instantaneous frequency estimation of multicomponent nonstationary signals
Jiang et al. Non-Gaussian random vibration fatigue analysis and accelerated test
Juhlin et al. Fast gridless estimation of damped modes
Peng et al. Modulated broadband mode decomposition for the feature extraction of double pulse metal inert gas welding
Zhang et al. Denoising and trend terms elimination algorithm of accelerometer signals
JPH07134149A (en) Method for measuring frequency by fourier analysis
US20090259706A1 (en) Method for establishing a simulating signal suitable for estimating a complex exponential signal
CN105133472A (en) Road surface roughness measurement method and inertial detector
CN111551785A (en) Frequency and harmonic detection method based on unscented Kalman filter
Srinivasan et al. Power spectral density computation and dominant frequencies identification from the vibration sensor output under random vibration environment
Chen et al. Matching Demodulation Transform and Its Application in Machine Fault Diagnosis
Shao et al. Parameter identification method for transient impact interference of vortex sensor based on optimal estimation of objective function
Siavashi et al. Frequency estimation of distorted signals in power systems using particle extended Kalman filter
Ardeleanu et al. Fundamental frequency estimation based on mean values
CN113392813B (en) Method and system for accurately identifying main frequency of vibration signal
Sang et al. Optimal Wavelet Threshold De-noising Algorithm of Power Quality Based on Improved Particle Swarm Optimization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination