Harmonic detection method based on combination of artificial bee colony algorithm and least square method

文档序号:1363415 发布日期:2020-08-11 浏览:27次 中文

阅读说明:本技术 一种基于人工蜂群算法结合最小二乘法的谐波检测方法 (Harmonic detection method based on combination of artificial bee colony algorithm and least square method ) 是由 聂晓华 胡方亮 万晓凤 余运俊 王淳 于 2020-03-24 设计创作,主要内容包括:本发明公开了一种基于人工蜂群算法结合最小二乘法的谐波检测方法,涉及电力技术领域,通过引入Tent混沌映射,解决人工蜂群算法易“早熟”的问题;在此基础上对Tent混沌映射改进,解决混沌映射自身小周期和不稳周期点的问题。提出的Tent混沌改进人工蜂群算法解决了人工蜂群算法易陷入局部最优点的问题,提高了算法的求解精度和收敛速度,算法的鲁棒性良好,将改进人工蜂群算法与最小二乘法结合,用融合后的算法对谐波信号进行检测,解决了最小二乘算法对初始值敏感,检测精度不佳等问题,实现了对负载电流中谐波的快速、有效、精确和稳定的检测,对有效治理谐波,提高电能质量具有重大参考价值。(The invention discloses a harmonic detection method based on combination of an artificial bee colony algorithm and a least square method, relates to the technical field of electric power, and solves the problem that the artificial bee colony algorithm is easy to be premature by introducing Tent chaotic mapping; on the basis, Tent chaotic mapping is improved, and the problems of small cycle and unstable cycle points of chaotic mapping are solved. The Tent chaos improved artificial bee colony algorithm solves the problem that the artificial bee colony algorithm is easy to fall into a local optimum point, improves the solving precision and the convergence speed of the algorithm, is good in robustness, combines the improved artificial bee colony algorithm with a least square method, detects harmonic signals by using the fused algorithm, solves the problems that the least square algorithm is sensitive to an initial value and poor in detection precision, achieves quick, effective, accurate and stable detection of harmonic waves in load current, and has great reference value for effectively governing the harmonic waves and improving the power quality.)

1. A harmonic detection method based on the combination of an artificial bee colony algorithm and a least square method is characterized in that: the method comprises the following steps:

s1: on the basis of a standard Artificial Bee Colony algorithm, Tent Chaotic mapping is introduced into the Artificial Bee Colony algorithm for algorithm improvement, and a Chaotic Artificial Bee Colony (CABC) algorithm is provided; the CABC algorithm generates a chaotic sequence on the basis of the optimal food source searched by the whole bee colony;

s2: on the basis of the CABC algorithm, an improved Tent Chaotic map is introduced, and a chaos improved Artificial Bee Colony algorithm (CIABC) is provided;

s3: and optimizing unknown parameters by using a CIABC algorithm, taking an optimal value output by the algorithm as an initial value of the RLS algorithm, performing parameter estimation by using the RLS algorithm, and finally updating the weight to obtain the amplitude and the phase of the harmonic wave.

2. The harmonic detection method based on the artificial bee colony algorithm combined with the least square method as claimed in claim 1, wherein:

the CABC algorithm is implemented by the following steps:

step 1: in the D-dimensional space, given iteration times M and a total number S of food sources, each hiring bee corresponds to one food source position, the number of the hiring bees is the same as that of the observation bees, and the hiring bees generate new positions in the field positions; all hiring bees share food source location information to the observing bees;

food source location update basisCarrying out the following steps;

in the formula (I), the compound is shown in the specification,a j dimension value representing the position of the ith honey source is initialized; i 1,2, … …, S, j 1,2, … …, D,respectively the minimum value and the maximum value of the honey source position corresponding to the j dimension, wherein R is a random number between 0 and 1;

step 2: determining and selecting a food source by the observation bees according to the quality of the food source, and recording the position and the fitness value of the selected optimal food source;

performing a neighborhood search of the selected employer bee and observer bee locations based onPosition updating is carried out, wherein t is iteration times,represents the j-th dimension of the newly generated first food source at the t +1 th iteration,representing the j-dimensional position value of the ith food source at the t time of iteration; k is a randomly assigned individual, and k ≠ 1; r is [ -1, 1]A random number within a range;

and calculating and comparing fitness values of the new food sources, and replacing the original food source positions with honey source positions with more excellent food source quality.

And step 3: and the observation bees are greedy selected after each new position attempt, the positions are updated if the attempt succeeds, the original positions are maintained if the attempt fails, and if the failed times exceed the preset limit value, the quality of the food source is considered to be lower than the mining threshold. And if the position of the food source is kept unchanged, finishing the observation honeycomb search task. The corresponding employed bee discards the food source and no longer memorizes its location; hiring bees to become scout bees to start to randomly search for new food source positions;

and 4, step 4: recording the current optimal solution and position, finishing the algorithm when the iteration times of the algorithm reach the maximum M times, and outputting the fitness value of the optimal food source; if the maximum iteration times are not reached, judging whether the global optimal food source is updated or not; if so, repeating the step 2 to the step 3; otherwise according toFor conventional variablesMapping transformation is carried out to obtain a chaotic variable which is between 0 and 1]Then pass throughTo pairMapping to obtain a chaotic variableFinally pass throughTo make chaotic variableConversion to conventional variablesAnd repeating the steps 2 to 3.

3. The harmonic detection method based on the artificial bee colony algorithm combined with the least square method as claimed in claim 1, wherein:

the Tent chaotic mapping introduced in S1 is used for algorithm improvement, specifically, the Tent chaotic mapping is introduced for algorithm improvementThe Tent chaotic mapping is improved, and small cycle and unstable cycle points of the Tent chaotic mapping are overcome.

4. The harmonic detection method based on the artificial bee colony algorithm combined with the least square method as claimed in claim 2, wherein:

calculating and comparing fitness values of the new food sources in the step 2, and replacing the original food source position with a honey source position with more excellent food source quality, wherein the specific operation rule is as follows:

let fiThe method comprises the following steps of (1) carrying out an objective function of a nonlinear optimization problem, wherein when a maximum value is solved, the fitness function is the objective function; when solving the minimum problem, the fitness function is a transformation form of the objective function byCalculating to obtain;

employing bees to select a better quality honey source by comparing fitness values, and observing the rules of bees selecting food sources:

wherein t is 1,2, … …, M; fi(t) is the fitness value of the ith food source at the time of the t iteration.

5. The harmonic detection method based on the artificial bee colony algorithm combined with the least square method as claimed in claim 1, wherein:

the specific operation process of S3 is as follows: estimating harmonics, namely sampling a signal at first, wherein the sampling frequency meets the Nyquist criterion; the equivalent linear model of the sampling system is expressed as: y' (K) ═ h (K) · a + v (K), K ═ 1,2.., K, where Y (K) is the kth noisy signal measurement, a ═ a · K1A2……AN]TIs amplitude vector matrix, v (k) is the additive noise of the k-th sampling, and H (k) is the k-th row of the system structure matrix; the structural matrix of the system is represented as:

the harmonic detection problem is reduced to search for the optimum phinMaking the difference between Y (k) and Y (k) tend to a minimum value, wherein Y (k) H (k) A, and determining different phase information phi by using CIABC algorithmnThe amplitude estimation is performed in conjunction with the use of the RLS algorithm.

Technical Field

The invention relates to the technical field of electric power, in particular to a harmonic detection method based on combination of an artificial bee colony algorithm and a least square method.

Background

Due to the increase of the nonlinear load, a large amount of harmonics are injected into the grid system. The harmonic waves of the power grid system seriously affect the power quality of the power grid, and if the harmonic waves in the power grid are not treated, the harmonic waves cause great troubles and even economic losses for users and power suppliers. Harmonic suppression has an important historical position for supporting economic and social development by high-quality electric energy, and the significance of the harmonic suppression is self-evident. For harmonic suppression, firstly, the harmonic needs to be detected, the harmonic components are analyzed, and the harmonic components are detected. And then, according to the harmonic detection result, a harmonic treatment scheme is pertinently provided. The traditional algorithm for detecting the harmonic waves at present has the problems of sensitivity to initial values, spectrum leakage, barrier effect, frequency aliasing and the like.

Disclosure of Invention

In order to solve the problems in the prior art, the initial value of the least square algorithm is optimized by using a Tent chaos improved artificial Bee Colony (CABC) algorithm to obtain a chaos improved artificial Bee Colony algorithm on the basis of a traditional least square algorithm harmonic detection method (CIABC), so that the problem that the traditional least square algorithm is sensitive to the initial value is solved, the accuracy and the real-time performance of harmonic detection are greatly improved, and the steady-state error is reduced.

The invention specifically adopts the following technical scheme:

a harmonic detection method based on an artificial bee colony algorithm combined with a least square method comprises the following steps:

s1: on the basis of a standard Artificial Bee Colony algorithm, Tent Chaotic mapping is introduced into the Artificial Bee Colony algorithm for algorithm improvement, and a Chaotic Artificial Bee Colony (CABC) algorithm is provided; the CABC algorithm generates a chaotic sequence on the basis of the optimal food source searched by the whole bee colony;

s2: on the basis of the CABC algorithm, an improved Tent Chaotic map is introduced, and a chaos improved Artificial Bee Colony algorithm (CIABC) is provided;

s3: and optimizing unknown parameters by using a CIABC algorithm, taking an optimal value output by the algorithm as an initial value of the RLS algorithm, performing parameter estimation by using the RLS algorithm, and finally updating the weight to obtain the amplitude and the phase of the harmonic wave.

Further, the CABC algorithm is implemented by the following steps:

step 1: in the D-dimensional space, given iteration times M and a total number S of food sources, each hiring bee corresponds to one food source position, the number of the hiring bees is the same as that of the observation bees, and the hiring bees generate new positions in the field positions; all hiring bees share food source location information to the observing bees;

food source location update basisCarrying out the following steps;

in the formula (I), the compound is shown in the specification,a j dimension value representing the position of the ith honey source is initialized; i 1,2, … …, S, j 1,2, … …, D,respectively the minimum value and the maximum value of the honey source position corresponding to the j dimension, wherein R is a random number between 0 and 1;

step 2: determining and selecting a food source by the observation bees according to the quality of the food source, and recording the position and the fitness value of the selected optimal food source;

performing a neighborhood search of the selected employer bee and observer bee locations based onPosition updating is carried out, wherein t is iteration times,representing the t +1 th iterationThe position value of the j-th dimension of the newly generated first food source,representing the j-dimensional position value of the ith food source at the t time of iteration; k is a randomly assigned individual, and k ≠ 1; r is [ -1, 1]A random number within a range;

and calculating and comparing fitness values of the new food sources, and replacing the original food source positions with honey source positions with more excellent food source quality.

And step 3: and the observation bees are greedy selected after each new position attempt, the positions are updated if the attempt succeeds, the original positions are maintained if the attempt fails, and if the failed times exceed the preset limit value, the quality of the food source is considered to be lower than the mining threshold. And if the position of the food source is kept unchanged, finishing the observation honeycomb search task. The corresponding employed bee discards the food source and no longer memorizes its location; hiring bees to become scout bees to start to randomly search for new food source positions;

and 4, step 4: recording the current optimal solution and position, finishing the algorithm when the iteration times of the algorithm reach the maximum M times, and outputting the fitness value of the optimal food source; if the maximum iteration times are not reached, judging whether the global optimal food source is updated or not; if so, repeating the step 2 to the step 3; otherwise according toFor conventional variablesMapping transformation is carried out to obtain a chaotic variable which is between 0 and 1]Then pass throughTo pairMapping to obtain a chaotic variableFinally, theBy passingTo make chaotic variableConversion to conventional variablesAnd repeating the steps 2 to 3.

The further scheme is that the Tent chaotic mapping introduced in the step S1 is used for carrying out algorithm improvement, specifically, the Tent chaotic mapping is introduced for carrying out algorithm improvement

The Tent chaotic mapping is improved, and small cycle and unstable cycle points of the Tent chaotic mapping are overcome.

The further scheme is that the fitness value of the new food source is calculated and compared in the step 2, and the position of the honey source with more excellent quality of the food source replaces the position of the original food source, and the specific operation rule is as follows:

let fiThe method comprises the following steps of (1) carrying out an objective function of a nonlinear optimization problem, wherein when a maximum value is solved, the fitness function is the objective function; when solving the minimum problem, the fitness function is a transformation form of the objective function byCalculating to obtain;

employing bees to select a better quality honey source by comparing fitness values, and observing the rules of bees selecting food sources:

wherein t is 1,2, … …, M; fi(t) is the fitness value of the ith food source at the time of the t iteration.

Further, the specific operation process of S3 is as follows: estimating harmonics, namely sampling a signal at first, wherein the sampling frequency meets the Nyquist criterion; the equivalent linear model of the sampling system is expressed as:

y' (K) ═ h (K) · a + v (K), K ═ 1,2.., K, where Y (K) is the kth noisy signal measurement, a ═ a · K1A2……AN]TIs amplitude vector matrix, v (k) is the additive noise of the k-th sampling, and H (k) is the k-th row of the system structure matrix; the structural matrix of the system is represented as:

the harmonic detection problem is reduced to search for the optimum phinMaking the difference between Y (k) and Y (k) tend to a minimum value, wherein Y (k) H (k) A, and determining different phase information phi by using CIABC algorithmnThe amplitude estimation is performed in conjunction with the use of the RLS algorithm.

The invention has the beneficial effects that:

on the basis of a harmonic detection method of a traditional least square algorithm, the chaos improved Artificial Bee Colony (CABC) algorithm is used for optimizing an initial value of the least square algorithm, so that the problem that the traditional least square algorithm is sensitive to the initial value is solved, accuracy and real-time performance of harmonic detection are greatly improved, and steady-state errors are reduced.

Drawings

FIG. 1 is a flow chart of a harmonic detection method based on an artificial bee colony algorithm combined with a least square method according to an embodiment of the invention;

FIG. 2 is a flow chart of the chaos improved artificial bee colony algorithm in the embodiment of the invention;

FIG. 3 is a waveform diagram of fundamental wave signal detection on an MTALAB simulation platform by a hybrid algorithm of an artificial bee colony Algorithm (ABC) and a least square method (RLS);

FIG. 4 is a waveform diagram of fundamental wave signal detection by a hybrid algorithm of a chaotic artificial bee Colony Algorithm (CABC) combined with a least square method (RLS) on an MTALAB simulation platform;

FIG. 5 is a waveform diagram of fundamental wave signal detection by a hybrid algorithm of chaos improved artificial bee colony algorithm (CIABC) combined with least square method (RLS) on an MTALAB simulation platform;

FIG. 6 is a waveform diagram of multi-frequency harmonic signal detection on MTALAB software using experimental platform data for a hybrid algorithm of an artificial bee colony Algorithm (ABC) combined with a least squares method (RLS);

FIG. 7 is a waveform diagram of multi-frequency harmonic signal detection by a hybrid algorithm of a chaotic artificial bee Colony Algorithm (CABC) combined with a least square method (RLS) on MTALAB software by using experimental platform data;

fig. 8 is a waveform diagram of multi-frequency harmonic signal detection by a hybrid algorithm of chaos improved artificial bee colony algorithm (CIABC) combined with least square method (RLS) on MTALAB software using experimental platform data.

Detailed Description

The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

As shown in fig. 1-2, an embodiment of the present invention discloses a harmonic detection method based on an artificial bee colony algorithm combined with a least square method, comprising the following steps:

s1: on the basis of a standard Artificial Bee Colony algorithm, Tent Chaotic mapping is introduced into the Artificial Bee Colony algorithm for algorithm improvement, and a Chaotic Artificial Bee Colony (CABC) algorithm is provided; the CABC algorithm generates a chaotic sequence on the basis of the optimal food source searched by the whole bee colony; the traversal uniformity characteristic of Tent chaotic mapping is utilized, the optimization speed of the algorithm is improved, and the algorithm is more efficient;

s2: on the basis of the CABC algorithm, an improved Tent Chaotic map is introduced, and a chaos improved Artificial Bee Colony algorithm (CIABC) is provided; after the algorithm is iterated for two times continuously, the position of the employed bee is not updated, namely the chaotic mapping is introduced, and other steps are not changed only by replacing the limit.

S3: and optimizing unknown parameters by using a CIABC algorithm, taking an optimal value output by the algorithm as an initial value of the RLS algorithm, performing parameter estimation by using the RLS algorithm, and finally updating the weight to obtain the amplitude and the phase of the harmonic wave.

In this embodiment, the CABC algorithm is implemented as follows:

step 1: in the D-dimensional space, given iteration times M and a total number S of food sources, each hiring bee corresponds to one food source position, the number of the hiring bees is the same as that of the observation bees, and the hiring bees generate new positions in the field positions; all hiring bees share food source location information to the observing bees;

food source location update basisCarrying out the following steps;

in the formula (I), the compound is shown in the specification,a j dimension value representing the position of the ith honey source is initialized; i 1,2, … …, S, j 1,2, … …, D,respectively the minimum value and the maximum value of the honey source position corresponding to the j dimension, wherein R is a random number between 0 and 1;

step 2: determining and selecting a food source by the observation bees according to the quality of the food source, and recording the position and the fitness value of the selected optimal food source;

performing a neighborhood search of the selected employer bee and observer bee locations based onPosition updating is carried out, wherein t is iteration times,represents the j-th dimension of the newly generated first food source at the t +1 th iteration,representing the j-dimensional position value of the ith food source at the t time of iteration; k is a randomly assigned individual, and k ≠ 1; r is [ -1, 1]A random number within a range;

and calculating and comparing fitness values of the new food sources, and replacing the original food source positions with honey source positions with more excellent food source quality.

And step 3: and the observation bees are greedy selected after each new position attempt, the positions are updated if the attempt succeeds, the original positions are maintained if the attempt fails, and if the failed times exceed the preset limit value, the quality of the food source is considered to be lower than the mining threshold. And if the position of the food source is kept unchanged, finishing the observation honeycomb search task. The corresponding employed bee discards the food source and no longer memorizes its location; hiring bees to become scout bees to start to randomly search for new food source positions;

and 4, step 4: recording the current optimal solution and position, finishing the algorithm when the iteration times of the algorithm reach the maximum M times, and outputting the fitness value of the optimal food source; if the maximum iteration times are not reached, judging whether the global optimal food source is updated or not; if so, repeating the step 2 to the step 3; otherwise according toFor conventional variablesMapping transformation is carried out to obtain a chaotic variable which is between 0 and 1]Then pass throughTo pairMapping to obtain a chaotic variableFinally pass throughTo make chaotic variableConversion to conventional variablesAnd repeating the steps 2 to 3.

In this embodiment, Tent chaotic mapping also has the problem of small-cycle and unstable-cycle points, for example, at points (0.2,0.4,0.6,0.8), the Tent mapping generates chaotic attractors; at points (0.25,0.5,0.75) the chaotic map will iterate to motionless 0[66-67], through

The Tent chaotic mapping is improved, and small cycle and unstable cycle points of the Tent chaotic mapping are overcome.

Tent chaotic mapping is also called Tent mapping, and is named after the fact that an image is similar to a Tent, and is a piecewise linear mapping in mathematics. The mapping has uniform power spectral density, probability density and ideal correlation characteristics, and the iteration speed is higher, and the mathematical expression is as follows: x is the number ofn+1=a-1-a|xn|,a∈(1,2);

When a is less than or equal to 1, the Tent hybrid map is in a stable state;

when a is larger than 1, the Tent chaotic map is in a chaotic state;

when a is 2, for the center Tent mapping, the mathematical expression is:

in this embodiment, the fitness value of the new food source is calculated and compared in step 2, and the honey source position with better quality of the food source is used to replace the original food source position, and the specific operation rules are as follows:

let fiThe method comprises the following steps of (1) carrying out an objective function of a nonlinear optimization problem, wherein when a maximum value is solved, the fitness function is the objective function; when solving the minimum problem, the fitness function is a transformation form of the objective function byCalculating to obtain;

employing bees to select a better quality honey source by comparing fitness values, and observing the rules of bees selecting food sources:

wherein t is 1,2, … …, M; fi(t) is the fitness value of the ith food source at the time of the t iteration.

In this embodiment, the specific operation process of S3 is as follows: estimating harmonics, namely sampling a signal at first, wherein the sampling frequency meets the Nyquist criterion; the equivalent linear model of the sampling system is expressed as:

y' (K) ═ h (K) · a + v (K), K ═ 1,2.., K, where Y (K) is the kth noisy signal measurement, a ═ a · K1A2……AN]TIs amplitude vector matrix, v (k) is the additive noise of the k-th sampling, and H (k) is the k-th row of the system structure matrix; the structural matrix of the system is represented as:

the harmonic detection problem is reduced to search for the optimum phinMaking the difference between Y (k) and Y (k) tend to a minimum value, wherein Y (k) H (k) A, and determining different phase information phi by using CIABC algorithmnCombined with estimation of amplitude using RLS algorithm, e.g. a ═ HT(k)·H(k)]-1HT(k) Y' (k) achieves this by minimizing the performance function E,for each bee, the performance function EiExpressed as:finally, the average estimation error is

In this embodiment, the load voltage signal detected for the fundamental wave signal on the MTALAB simulation platform is:

y(t)=0.95sin(100πt-2.02)+0.09sin(500πt+82.1)+0.043sin(700πt+7.9)+0.03sin(1100πt-147.1)+0.033sin(1300πt+162.6)

in this embodiment, the load voltage signal detected for the multi-frequency harmonic signal on the MTALAB software using the experimental platform data is: the voltage fundamental wave effective value is 220V, and the 3 rd harmonic content is 10%, the 5 th harmonic content is 8% and the 7 th harmonic content is 5% of the alternating current voltage signal.

The swarm parameters of the CIABC and RLS hybrid algorithm are set as follows: the colony size was 32, the number of iterations 20, and 50 seeks were performed.

The harmonic wave is detected by adopting the hybrid algorithm of the chaos improved artificial bee colony algorithm (CIABC) least square method (RLS) of the invention and compared with the harmonic wave detection of the hybrid algorithm of the artificial bee colony Algorithm (ABC) combined with the least square method (RLS) and the harmonic wave detection of the hybrid algorithm of the chaos artificial bee Colony Algorithm (CABC) combined with the least square method (RLS), and the comparison of the experimental results shown in figures 3, 4 and 5 and figures 6, 7 and 8 shows that the invention has high detection precision on the harmonic wave and high algorithm convergence speed. Compared with two other mixed algorithms, the method has obvious advantages.

Finally, only specific embodiments of the present invention have been described in detail above. The invention is not limited to the specific embodiments described above. Equivalent modifications and substitutions by those skilled in the art are also within the scope of the present invention. Accordingly, equivalent alterations and modifications are intended to be included within the scope of the invention, without departing from the spirit and scope of the invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种提高无标度网络弹性的优化方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!