CN108983863B - A Photovoltaic Maximum Power Tracking Method Based on Improved Firefly Algorithm - Google Patents
A Photovoltaic Maximum Power Tracking Method Based on Improved Firefly Algorithm Download PDFInfo
- Publication number
- CN108983863B CN108983863B CN201811003330.0A CN201811003330A CN108983863B CN 108983863 B CN108983863 B CN 108983863B CN 201811003330 A CN201811003330 A CN 201811003330A CN 108983863 B CN108983863 B CN 108983863B
- Authority
- CN
- China
- Prior art keywords
- firefly
- maximum power
- fireflies
- method based
- improved
- 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.)
- Expired - Fee Related
Links
- 241000254158 Lampyridae Species 0.000 title claims abstract description 136
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 77
- 238000000034 method Methods 0.000 title claims abstract description 28
- 229960005486 vaccine Drugs 0.000 claims abstract description 33
- 230000006870 function Effects 0.000 claims abstract description 28
- 230000008447 perception Effects 0.000 claims abstract description 23
- 238000009826 distribution Methods 0.000 claims description 10
- 230000000295 complement effect Effects 0.000 claims description 4
- 238000010521 absorption reaction Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 3
- 230000010355 oscillation Effects 0.000 abstract description 7
- 239000013589 supplement Substances 0.000 abstract description 7
- 230000009469 supplementation Effects 0.000 abstract description 7
- 230000000694 effects Effects 0.000 abstract description 4
- 238000004088 simulation Methods 0.000 description 10
- 238000012795 verification Methods 0.000 description 4
- LLSWVOXJHFIPIU-UHFFFAOYSA-M 2-azaniumyl-4-[methyl(oxido)phosphoryl]pentanoate Chemical compound CP(=O)([O-])C(C)CC([NH3+])C([O-])=O LLSWVOXJHFIPIU-UHFFFAOYSA-M 0.000 description 3
- 230000003068 static effect Effects 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 108010038016 Mannose-1-phosphate guanylyltransferase Proteins 0.000 description 1
- 230000032683 aging Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000000428 dust Substances 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 230000001902 propagating effect Effects 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05F—SYSTEMS FOR REGULATING ELECTRIC OR MAGNETIC VARIABLES
- G05F1/00—Automatic systems in which deviations of an electric quantity from one or more predetermined values are detected at the output of the system and fed back to a device within the system to restore the detected quantity to its predetermined value or values, i.e. retroactive systems
- G05F1/66—Regulating electric power
- G05F1/67—Regulating electric power to the maximum power available from a generator, e.g. from solar cell
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E10/00—Energy generation through renewable energy sources
- Y02E10/50—Photovoltaic [PV] energy
- Y02E10/56—Power conversion systems, e.g. maximum power point trackers
Landscapes
- Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Sustainable Development (AREA)
- Sustainable Energy (AREA)
- Power Engineering (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Automation & Control Theory (AREA)
- Photovoltaic Devices (AREA)
Abstract
本发明涉及一种基于改进萤火虫算法的光伏最大功率跟踪方法,包括:步骤S1:载入初始疫苗库,步骤S2:设置种群规模,并基于疫苗库初始化种群中所有萤火虫的位置,将各萤火虫的目标函数值作为各自最大荧光亮度;步骤S3:划分各萤火虫的感知半径并更新吸引度;步骤S4:更新各萤火虫的位置;步骤S5:进行免疫补充操作;步骤S6:判断是否满足收敛条件,若为是,则执行步骤S7,若为否,则返回步骤S4;步骤S7:基于当前各萤火虫位置得到最大功率点,并更新疫苗库。与现有技术相比,本发明由于加入了疫苗库及免疫补充操作,因此可以有效减少算法失灵,加快收敛速度并提高控制效果,实现动态环境下的快速响应。此外构建了步长函数,减弱了算法的稳态振荡。
The present invention relates to a photovoltaic maximum power tracking method based on an improved firefly algorithm, comprising: step S1: loading the initial vaccine database, step S2: setting the population size, and initializing the positions of all fireflies in the population based on the vaccine database, and setting the positions of each firefly The objective function value is taken as the respective maximum fluorescence brightness; Step S3: Divide the perception radius of each firefly and update the attractiveness; Step S4: Update the position of each firefly; Step S5: Perform immune supplementation operation; Step S6: Determine whether the convergence condition is met, if If yes, execute step S7; if no, return to step S4; step S7: get the maximum power point based on the current position of each firefly, and update the vaccine database. Compared with the prior art, the invention can effectively reduce algorithm failure, accelerate convergence speed and improve control effect due to the addition of vaccine library and immune supplement operation, and realize rapid response in dynamic environment. In addition, a step size function is constructed to weaken the steady-state oscillation of the algorithm.
Description
技术领域technical field
本发明涉及一种光伏功率控制技术,尤其是涉及一种基于改进萤火虫算法的光伏最大功率跟踪方法。The invention relates to a photovoltaic power control technology, in particular to a photovoltaic maximum power tracking method based on an improved firefly algorithm.
背景技术Background technique
理想情况中,光伏阵列中的光伏电池都工作在相同的温度和太阳辐照度下,此时光伏阵列的P-U曲线呈现出单峰值的特性,采用增量法、扰动观测法可以实现最大功率点跟踪。但在实际情况中,老化、局部遮挡和积尘覆盖等原因,会导致光伏电池的输出特性不一致,此时光伏阵列的P-U曲线出现多个功率峰值点,传统的单峰值MPPT方法将可能陷于局部峰值点,不仅造成大量能量损失,还会增加光伏阵列调度复杂性。Ideally, the photovoltaic cells in the photovoltaic array work under the same temperature and solar irradiance. At this time, the P-U curve of the photovoltaic array presents a single-peak characteristic. The maximum power point can be achieved by using the incremental method and the disturbance observation method. track. However, in actual situations, aging, local shading, and dust coverage will cause inconsistent output characteristics of photovoltaic cells. At this time, there are multiple power peak points on the P-U curve of the photovoltaic array, and the traditional single-peak MPPT method may be trapped in local The peak point not only causes a large amount of energy loss, but also increases the complexity of photovoltaic array scheduling.
群体智能算法可实现分布并行搜索,为传统方法难以处理、没有精确数学模型的问题提供了解决方案,因而可用于实现多峰值GMPPT。但大多数群体智能算法都存在着:外部条件发生变化时需要重启;动态PSC下,算法不收敛或收敛时间较长;收敛时间不稳定等缺点。The swarm intelligence algorithm can realize distributed parallel search and provide solutions to problems that are difficult to deal with by traditional methods and have no precise mathematical model, so it can be used to realize multi-peak GMPPT. However, most swarm intelligence algorithms have disadvantages such as: restarting is required when external conditions change; under dynamic PSC, the algorithm does not converge or the convergence time is long; the convergence time is unstable and other shortcomings.
发明内容Contents of the invention
本发明的目的就是为了克服上述现有技术存在的缺陷而提供一种基于改进萤火虫算法的光伏最大功率跟踪方法。The purpose of the present invention is to provide a photovoltaic maximum power tracking method based on an improved firefly algorithm in order to overcome the above-mentioned defects in the prior art.
本发明的目的可以通过以下技术方案来实现:The purpose of the present invention can be achieved through the following technical solutions:
一种基于改进萤火虫算法的光伏最大功率跟踪方法,包括:A photovoltaic maximum power tracking method based on the improved firefly algorithm, including:
步骤S1:载入初始疫苗库,Step S1: Load the initial vaccine library,
步骤S2:设置种群规模,并基于疫苗库初始化种群中所有萤火虫的位置,将各萤火虫的目标函数值作为各自最大荧光亮度;Step S2: Set the population size, and initialize the positions of all fireflies in the population based on the vaccine library, and use the objective function value of each firefly as their respective maximum fluorescence brightness;
步骤S3:划分各萤火虫的感知半径并更新吸引度;Step S3: Divide the perception radius of each firefly and update the degree of attraction;
步骤S4:更新各萤火虫的位置;Step S4: update the position of each firefly;
步骤S5:基于免疫补充操作产生部分新萤火虫替代最大荧光亮度较低的萤火虫;Step S5: Based on the immune complement operation, some new fireflies are generated to replace fireflies with lower maximum fluorescence brightness;
步骤S6:判断是否满足收敛条件,若为是,则执行步骤S7,若为否,则返回步骤S4;Step S6: Judging whether the convergence condition is satisfied, if yes, execute step S7, if no, return to step S4;
步骤S7:基于当前各萤火虫位置得到最大功率点,并更新疫苗库。Step S7: Obtain the maximum power point based on the current position of each firefly, and update the vaccine library.
所述疫苗库由历次寻到的最大功率点及对应的萤火虫位置组成。The vaccine library consists of the previously found maximum power points and corresponding firefly positions.
所述步骤S2具体包括:Described step S2 specifically comprises:
步骤S21:将萤火虫的目标函数值作为各自最大荧光亮度;Step S21: taking the objective function values of fireflies as their respective maximum fluorescence brightness;
步骤S22:计算各萤火虫之间的空间距离:Step S22: Calculate the spatial distance between each firefly:
rij=||xi-xj||r ij =||x i -x j ||
其中:rij为萤火虫i和萤火虫j之间的空间距离,||·||为欧式范数,xi为萤火虫i的位置,xj为萤火虫j的位置。Among them: r ij is the spatial distance between firefly i and firefly j, ||·|| is the Euclidean norm, x i is the position of firefly i, and x j is the position of firefly j.
所述萤火虫的目标函数值为基于萤火虫位置所对应的电压得到的功率。The objective function value of the firefly is the power obtained based on the voltage corresponding to the position of the firefly.
所述步骤S3包括:Described step S3 comprises:
步骤S31:根据萤火虫的最大荧光亮度计算感知半径:Step S31: Calculate the perception radius according to the maximum fluorescent brightness of fireflies:
R=φI0 R=φI 0
其中:R为感知半径,I0为萤火虫的最大荧光亮度,φ为感知系数;Among them: R is the perception radius, I 0 is the maximum fluorescence brightness of fireflies, and φ is the perception coefficient;
步骤S32:根据萤火虫之间的空间距离计算各萤火虫之间的吸引度:Step S32: Calculate the degree of attraction between fireflies according to the spatial distance between fireflies:
其中:β为萤火虫i和萤火虫j之间的吸引度,β0为最大吸引度,γ为光强吸收系数,e为自然底数。Among them: β is the attraction between firefly i and firefly j, β 0 is the maximum attraction, γ is the light intensity absorption coefficient, and e is the natural base.
任一萤火虫的感知半径内最大荧光亮度更低的萤火虫均会向感知半径中心靠近。Fireflies with lower maximum fluorescence brightness within the perception radius of any firefly will move closer to the center of the perception radius.
所述步骤S4中更新各萤火虫的位置为:In the step S4, the positions of each firefly are updated as follows:
xi(t+1)=xi(t)+β[xj(t)-xi(t)]+Sx i (t+1)= xi (t)+β[x j (t) -xi (t)]+S
其中:xi(t+1)为第t次迭代更新后的萤火虫i的位置,xi(t)为第t次迭代更新前的萤火虫i的位置,xj(t)为第t次迭代更新后的萤火虫j的位置,S为步长函数,表达式如下:Among them: x i (t+1) is the position of firefly i after the t-th iteration update, x i (t) is the position of firefly i before the t-th iteration update, x j (t) is the t-th iteration The updated position of firefly j, S is the step size function, the expression is as follows:
其中:r为萤火虫水平间距,xmax和xmin表示萤火虫分布区域上下限。Among them: r is the horizontal spacing of fireflies, x max and x min represent the upper and lower limits of the firefly distribution area.
所述步骤S5中,被替换的萤火虫数目为μn,其中:μ为取值在[0,1]上的免疫系数,n为设置的种群规模。In the step S5, the number of fireflies to be replaced is μn, where: μ is the immune coefficient whose value is on [0,1], and n is the set population size.
所述步骤S6包括:Described step S6 comprises:
步骤S61:根据更新后萤火虫的位置,重新计算萤火虫的目标函数值;Step S61: recalculate the firefly's objective function value according to the updated position of the firefly;
步骤S62:当满足迭代精度或达到最大迭代次数,则输出全局极值点和最优个体值;否则,返回步骤S4进行下一次迭代计算。Step S62: When the iteration accuracy is satisfied or the maximum number of iterations is reached, then output the global extremum point and the optimal individual value; otherwise, return to step S4 for the next iteration calculation.
所述步骤7具体包括:The step 7 specifically includes:
步骤S71:将目标函数值最大的萤火虫的位置对应的电压作为最大功率点电压,并输出全局最大功率点;Step S71: Use the voltage corresponding to the position of the firefly with the largest objective function value as the maximum power point voltage, and output the global maximum power point;
步骤S72:以得到的最大功率点更新取代疫苗库中与之最接近的疫苗。Step S72: Update and replace the closest vaccine in the vaccine library with the obtained maximum power point.
与现有技术相比,本发明具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
1)由于加入了疫苗库及免疫补充操作,因此可以有效减少算法失灵的现象,加快收敛速度并提高控制效果,实现动态环境下的快速响应。此外构建了步长函数,减弱了算法的稳态振荡。1) Due to the addition of the vaccine library and immune supplementary operations, it can effectively reduce the phenomenon of algorithm failure, speed up the convergence speed and improve the control effect, and achieve rapid response in dynamic environments. In addition, a step size function is constructed to weaken the steady-state oscillation of the algorithm.
2)在维持萤火虫算法优异的局部搜索能力的基础上,利用疫苗库获取缩小初始种群的分布区间,提高算法收敛速度。2) On the basis of maintaining the excellent local search ability of the firefly algorithm, the vaccine library is used to obtain and narrow the distribution interval of the initial population to improve the convergence speed of the algorithm.
3)构建变步长函数以减弱稳态振荡,仿真结果表明,该算法可以实现动态环境条件下良好的GMPPT跟踪定位能力。3) A variable step size function is constructed to weaken steady-state oscillations. Simulation results show that the algorithm can achieve good GMPPT tracking and positioning capabilities under dynamic environmental conditions.
附图说明Description of drawings
图1为本发明方法的主要步骤流程示意图;Fig. 1 is a schematic flow chart of the main steps of the inventive method;
图2为五峰值P-U曲线;Fig. 2 is the five-peak P-U curve;
图3为种群最优值迭代趋势;Figure 3 is the iterative trend of the optimal value of the population;
图4为FA稳态振荡;Figure 4 is FA steady state oscillation;
图5为改进FA算法消除稳态振荡;Figure 5 shows the improved FA algorithm to eliminate steady-state oscillations;
图6为FA算法失效过程;Figure 6 is the failure process of the FA algorithm;
图7为免疫补充操作流程图;Fig. 7 is the flowchart of immune supplement operation;
图8为免疫补充对算法耗时影响;Figure 8 shows the time-consuming impact of immune supplementation on the algorithm;
图9为四峰值P-U曲线;Fig. 9 is four peak P-U curves;
图10为改进FA算法动态跟踪最大输出功率迭代趋势;Figure 10 shows the dynamic tracking of the maximum output power iterative trend of the improved FA algorithm;
图11为改进FA算法动态跟踪最优值适应度迭代趋势;Figure 11 shows the iterative trend of the improved FA algorithm to dynamically track the fitness of the optimal value;
图12为FA算法动态跟踪种群分布情况;Figure 12 is the dynamic tracking population distribution of the FA algorithm;
图13为改进FA算法动态跟踪种群分布情况。Figure 13 shows the dynamic tracking population distribution of the improved FA algorithm.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明进行详细说明。本实施例以本发明技术方案为前提进行实施,给出了详细的实施方式和具体的操作过程,但本发明的保护范围不限于下述的实施例。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is carried out on the premise of the technical solution of the present invention, and detailed implementation and specific operation process are given, but the protection scope of the present invention is not limited to the following embodiments.
一种基于改进萤火虫算法的光伏最大功率跟踪方法,如图1所示,包括:A photovoltaic maximum power tracking method based on the improved firefly algorithm, as shown in Figure 1, including:
步骤S1:载入初始疫苗库,疫苗库由历次寻到的最大功率点及对应的萤火虫位置组成,通过对种群进行接种疫苗,以获得优良的初始种群,根据历次寻到的最大功率点,组成疫苗库,并在每次算法收敛后更新疫苗库。Step S1: Load the initial vaccine library. The vaccine library is composed of the previously found maximum power point and the corresponding firefly position. By vaccinating the population to obtain an excellent initial population, according to the previously found maximum power point, the composition The vaccine library is updated every time the algorithm converges.
步骤S2:设置种群规模,并基于疫苗库初始化种群中所有萤火虫的位置,Step S2: Set the population size, and initialize the positions of all fireflies in the population based on the vaccine library,
初始化过程利用支持向量计算法(Support Vector Machine,SVM)在最大化几何间隔(Geometrical margin)的基础上将疫苗库划分为三个区域,设每个区域中包含的疫苗数量分别为Y1、Y2、Y3,则初始种群在三个区域内的个体数量按下式计算,式中m为种群数量,θ为[0,1]上的疫苗系数。In the initialization process, the vaccine library is divided into three areas on the basis of maximizing the geometrical margin by using Support Vector Machine (SVM), and the number of vaccines contained in each area is respectively Y 1 , Y 2 , Y 3 , the number of individuals in the initial population in the three areas is calculated by the following formula, where m is the population size, and θ is the vaccine coefficient on [0,1].
并将各萤火虫的目标函数值作为各自最大荧光亮度,具体包括:And the objective function value of each firefly is taken as their respective maximum fluorescence brightness, specifically including:
步骤S21:将萤火虫的目标函数值作为各自最大荧光亮度,其中,萤火虫的目标函数值为基于萤火虫位置所对应的电压得到的功率;Step S21: The objective function value of the firefly is taken as the respective maximum fluorescence brightness, wherein the objective function value of the firefly is the power obtained based on the voltage corresponding to the position of the firefly;
步骤S22:计算各萤火虫之间的空间距离:Step S22: Calculate the spatial distance between each firefly:
rij=||xi-xj||r ij =||x i -x j ||
其中:rij为萤火虫i和萤火虫j之间的空间距离,||·||为欧式范数,xi为萤火虫i的位置,xj为萤火虫j的位置。Among them: r ij is the spatial distance between firefly i and firefly j, ||·|| is the Euclidean norm, x i is the position of firefly i, and x j is the position of firefly j.
步骤S3:划分各萤火虫的感知半径并更新吸引度,包括:Step S3: Divide the perception radius of each firefly and update the degree of attraction, including:
步骤S31:根据萤火虫的最大荧光亮度计算感知半径:Step S31: Calculate the perception radius according to the maximum fluorescent brightness of fireflies:
R=φI0 R=φI 0
其中:R为感知半径,I0为萤火虫的最大荧光亮度,φ为感知系数;Among them: R is the perception radius, I 0 is the maximum fluorescence brightness of fireflies, and φ is the perception coefficient;
目标函数值越大的萤火虫有越大的感知半径,感知半径内最大荧光亮度较低的萤火虫均会向感知半径中心靠近;Fireflies with larger objective function values have larger perception radius, and fireflies with lower maximum fluorescence brightness within the perception radius will approach the center of the perception radius;
步骤S32:根据萤火虫之间的空间距离计算各萤火虫之间的吸引度,由于萤火虫发出的荧光在介质中传播时会随距离减弱,所以定义为与距离相关的单调递减函数:Step S32: Calculate the attraction between fireflies according to the spatial distance between fireflies. Since the fluorescence emitted by fireflies will weaken with distance when propagating in the medium, it is defined as a monotonically decreasing function related to distance:
其中:β为萤火虫i和萤火虫j之间的吸引度,β0为最大吸引度,γ为光强吸收系数,e为自然底数。Among them: β is the attraction between firefly i and firefly j, β 0 is the maximum attraction, γ is the light intensity absorption coefficient, and e is the natural base.
步骤S4:更新各萤火虫的位置,其中,更新各萤火虫的位置为:Step S4: Update the position of each firefly, wherein, update the position of each firefly as:
xi(t+1)=xi(t)+β[xj(t)-xi(t)]+Sx i (t+1)= xi (t)+β[x j (t) -xi (t)]+S
其中:xi(t+1)为第t次迭代更新后的萤火虫i的位置,xi(t)为第t次迭代更新前的萤火虫i的位置,xj(t)为第t次迭代更新后的萤火虫j的位置,S为步长函数,表达式如下:Among them: x i (t+1) is the position of firefly i after the t-th iteration update, x i (t) is the position of firefly i before the t-th iteration update, x j (t) is the t-th iteration The updated position of firefly j, S is the step size function, the expression is as follows:
其中:r为萤火虫水平间距,xmax和xmin表示萤火虫分布区域上下限。Among them: r is the horizontal spacing of fireflies, x max and x min represent the upper and lower limits of the firefly distribution area.
而传统FA算法迭代公式为:The iterative formula of the traditional FA algorithm is:
xi(t+1)=xi(t)+β[xj(t)-xi(t)]+α(rand-1/2)x i (t+1)= xi (t)+β[x j (t) -xi (t)]+α(rand-1/2)
式中α为步长因子,rand为[0,1]上服从均匀分布的随机因子。In the formula, α is a step factor, and rand is a random factor that obeys a uniform distribution on [0,1].
所述步骤S5中,被替换的萤火虫数目为μn,其中:μ为取值在[0,1]上的免疫系数,n为设置的种群规模。In the step S5, the number of fireflies to be replaced is μn, where: μ is the immune coefficient whose value is on [0,1], and n is the set population size.
在萤火虫j的感知半径范围内,萤火虫i被具有更高最大荧光亮度的萤火虫j吸引而发生位置移动。Within the perception radius of firefly j, firefly i is attracted by firefly j with higher maximum fluorescence brightness and moves its position.
步骤S5:基于免疫补充操作产生部分新萤火虫替代最大荧光亮度较低的萤火虫,以帮助跳出局部最优解并维持种群的多样性,其中,被替换的萤火虫数目为μn,其中:μ为取值在[0,1]上的免疫系数,n为设置的种群规模,Step S5: Generate some new fireflies based on the immune supplementation operation to replace fireflies with lower maximum fluorescence brightness to help jump out of the local optimal solution and maintain the diversity of the population, where the number of replaced fireflies is μn, where: μ is the value The immune coefficient on [0,1], n is the set population size,
该过程中新萤火虫随机生成,而不是基于疫苗库生成,可以提高多样性,并且更为有效地解决算法失灵现象,实现动态环境下的快速响应。In this process, new fireflies are randomly generated instead of based on the vaccine library, which can improve diversity, and more effectively solve algorithm failures, and achieve rapid response in dynamic environments.
步骤S6:判断是否满足收敛条件,若为是,则执行步骤S7,若为否,则返回步骤S4,包括:Step S6: Judging whether the convergence condition is satisfied, if yes, execute step S7, if no, return to step S4, including:
步骤S61:根据更新后萤火虫的位置,重新计算萤火虫的目标函数值;Step S61: recalculate the firefly's objective function value according to the updated position of the firefly;
步骤S62:当满足迭代前后的差值小于阈值或达到最大迭代次数,则输出全局极值点和最优个体值;否则,返回步骤S4进行下一次迭代计算。Step S62: When the difference before and after the iteration is less than the threshold or reaches the maximum number of iterations, output the global extremum point and the optimal individual value; otherwise, return to step S4 for the next iteration calculation.
步骤S7:基于当前各萤火虫位置得到最大功率点,并更新疫苗库,具体包括:Step S7: Obtain the maximum power point based on the current position of each firefly, and update the vaccine library, specifically including:
步骤S71:将目标函数值最大的萤火虫的位置对应的电压作为最大功率点电压,并输出全局最大功率点;Step S71: Use the voltage corresponding to the position of the firefly with the largest objective function value as the maximum power point voltage, and output the global maximum power point;
步骤S72:以得到的最大功率点更新取代疫苗库中与之最接近的疫苗。Step S72: Update and replace the closest vaccine in the vaccine library with the obtained maximum power point.
下面对本申请方法的效果进行仿真验证,具体采用matlab自带的solar cell模型,以S-Function模块为GMPPT控制器核心,搭建仿真模型,仿真验证分为两部分:一验证免疫补充对算法的影响。二为传统萤火虫算法与改进算法在动态PSC下的功率跟踪对比。The following is a simulation verification of the effect of the application method. Specifically, the solar cell model that comes with matlab is used, and the S-Function module is used as the core of the GMPPT controller to build a simulation model. The simulation verification is divided into two parts: one is to verify the impact of immune supplementation on the algorithm . The second is the power tracking comparison between the traditional firefly algorithm and the improved algorithm under dynamic PSC.
算法参数设置如表1所示:The algorithm parameter settings are shown in Table 1:
表1 FA算法参数设置Table 1 FA algorithm parameter settings
初始化免疫库M=[94.962,84.305,76.081,61.964,74.650,82.905,81.630,85.610,77.106,77.879],设置疫苗系数θ为0.6,免疫系数μ为0.3。Initialize the immune library M=[94.962, 84.305, 76.081, 61.964, 74.650, 82.905, 81.630, 85.610, 77.106, 77.879], set the vaccine coefficient θ to 0.6, and the immune coefficient μ to 0.3.
算法流程图如图1所示。The flow chart of the algorithm is shown in Figure 1.
仿真验证第一部分:The first part of simulation verification:
仿真得到的多峰值P-U曲线如图2所示,5个功率峰值点为35.619、62.662、84.164、102.175、116.200V,GMPP为第三个峰值点,其全局最大输出功率为1.8240kW。The multi-peak P-U curve obtained by simulation is shown in Figure 2. The five power peak points are 35.619, 62.662, 84.164, 102.175, and 116.200V. GMPP is the third peak point, and its global maximum output power is 1.8240kW.
首先将改进FA算法中的免疫补充操作暂时删去,其中,FA(Firefly Algorithm,FA)为萤火虫算法,改进FA算法即为改进萤火虫算法。Firstly, the immune supplement operation in the improved FA algorithm is temporarily deleted, where FA (Firefly Algorithm, FA) is the firefly algorithm, and the improved FA algorithm is the improved firefly algorithm.
得到算法单次运行结果如图3所示,P为每次迭代运算完成后种群的最优值,S1、S2分别为改进FA、传统FA算法收敛点,从图中可以看出改进FA算法比传统FA更快收敛,且FA收敛于局部最优解,即第二个峰值点,最终输出功率为1.7865kW。算法收敛后更新疫苗库,,用第三个功率峰值点84.164V取代疫苗库中与它最接近的疫苗85.610V。The result of a single operation of the algorithm is shown in Figure 3. P is the optimal value of the population after each iterative operation, and S 1 and S 2 are the convergence points of the improved FA and traditional FA algorithms respectively. It can be seen from the figure that the improved FA The algorithm converges faster than traditional FA, and FA converges to the local optimal solution, that is, the second peak point, and the final output power is 1.7865kW. After the algorithm converges, the vaccine library is updated, and the third peak power point 84.164V is used to replace the closest vaccine 85.610V in the vaccine library.
以每次迭代完成后最优个体代表的电压为观察对象,得到改进FA算法和FA算法运行结果,分别为图4、图5所示。可以看出FA算法会导致稳态振荡,虽然振幅较小,但当收敛条件更加严格会导致算法不收敛。改进FA算法则是通过步长函数很好地解决了稳态振荡的问题Taking the voltage of the optimal individual representative after each iteration as the observation object, the improved FA algorithm and the running results of the FA algorithm are obtained, as shown in Figure 4 and Figure 5, respectively. It can be seen that the FA algorithm will lead to steady-state oscillations. Although the amplitude is small, the algorithm will not converge when the convergence conditions are stricter. The improved FA algorithm solves the problem of steady state oscillation well through the step size function
由于算法运行具有随机性,所以分别在改进FA和FA环境下仿真30次,仿真结果如表2所示。改进FA明显优于FA,不仅平均输出功率更高,收敛更快,而且从未收敛于局部最优点,相较而言,FA收敛于局部最优的概率几乎达到50%。此外,在FA与改进FA运行时均出现了算法失效的情况,若出现此类情况则重新运行算法。Due to the randomness of the operation of the algorithm, 30 simulations were performed under the improved FA and FA environments respectively, and the simulation results are shown in Table 2. Improved FA is obviously better than FA, not only with higher average output power and faster convergence, but also never converges to the local optimum. In comparison, the probability of FA to converge to the local optimum is almost 50%. In addition, when the FA and the improved FA are running, the algorithm fails, and if such a situation occurs, the algorithm is re-run.
表2算法多次运行结果Table 2 Algorithm running results for multiple times
失效时萤火虫种群的初始分布情况如图6所示,10个个体的位置分别为97.766、110.612、15.238、111.470、73.933、11.704、33.419、65.625、114.593、115.786V。种群位置开始更新之后,区域1及区域2内目标函数值较低的个体会向位置较优的萤火虫靠拢,聚集在一点。对种群中的其他个体而言,点K1在K2的感知半径范围之外,所以位置并不会更新,K3、K4同样也不处在目标函数更高的个体感知范围之内,所以K3、K4同样不会随着迭代次数的增加而变更位置。每次迭代完成之后,算法向外输出最优个体的目标函数值,此时,每次输出的P均不会改变,在此种情况下,算法既不收敛于全局最优,也不收敛于局部最优,所以称其为算法失效。The initial distribution of the firefly population at the time of failure is shown in Figure 6. The positions of the 10 individuals are 97.766, 110.612, 15.238, 111.470, 73.933, 11.704, 33.419, 65.625, 114.593, and 115.786V. After the population position is updated, individuals with lower objective function values in area 1 and area 2 will move closer to fireflies with better positions and gather at one point. For other individuals in the population, point K 1 is outside the perception radius of K 2 , so the position will not be updated, and K 3 and K 4 are also not within the perception range of individuals with higher objective functions. Therefore, K 3 and K 4 also do not change positions as the number of iterations increases. After each iteration is completed, the algorithm outputs the objective function value of the optimal individual. At this time, the output P will not change each time. In this case, the algorithm neither converges to the global optimum nor converges to Local optimum, so it is called algorithm failure.
图7为免疫补充操作的具体流程。Figure 7 is the specific flow of the immune supplementation operation.
此时加入免疫补充操作。At this point, the immune supplementation operation is added.
分别对有无免疫补充操作的改进FA算法在图2所示P-U特性下进行30次仿真,结果如表3所示,免疫补充操作不仅可以进一步缩短算法收敛所需的时间,而且可以进一步降低算法失效的风险。The improved FA algorithm with or without the immune complement operation is simulated 30 times under the P-U characteristic shown in Figure 2, and the results are shown in Table 3. The immune supplement operation can not only further shorten the time required for algorithm convergence, but also further reduce the algorithm risk of failure.
表3免疫补充对算法运行影响Table 3 Effect of immune supplementation on algorithm operation
有无免疫补充操作时,算法运行30次所需时间如图8所示,从图中可以看出加入免疫补充之后,算法耗时更加稳定,分别计算两种情况下耗时的方差,得到有无免疫补充操作时,耗时方差分别为0.0125、0.0819。When there is no immune supplement operation, the time required for the algorithm to run 30 times is shown in Figure 8. It can be seen from the figure that after the immune supplement is added, the time-consuming algorithm is more stable. Calculate the variance of the time-consuming in the two cases respectively, and get When there is no immune supplement operation, the time-consuming variances are 0.0125 and 0.0819, respectively.
仿真验证第二部分:The second part of simulation verification:
以图2作为第一种静态PSC对应的P-U曲线,图9作为第二种静态PSC对应的P-U曲线,图9中功率峰值点分别为26.819、67.660、73.554、108.301V。算法在第一种PSC下迭代次数达到10次时切换到第二种PSC。两种P-U曲线最大功率峰值点分布位置差异较大,实现动态跟踪较为困难,使得仿真结果具有说服力。Take Figure 2 as the P-U curve corresponding to the first static PSC, and Figure 9 as the P-U curve corresponding to the second static PSC. The peak power points in Figure 9 are 26.819, 67.660, 73.554, and 108.301V respectively. The algorithm switches to the second PSC when the number of iterations under the first PSC reaches 10. The distribution positions of the maximum power peak points of the two P-U curves are quite different, and it is difficult to realize dynamic tracking, which makes the simulation results convincing.
改进FA算法在动态PSC下的具体跟踪过程如图10和图11所示,P和J分别为迭代完成之后种群最优个体对应的输出功率和适应度。PSC切换后,改进FA算法仅迭代17次就成功跟踪到全局最大功率点。The specific tracking process of the improved FA algorithm under dynamic PSC is shown in Figure 10 and Figure 11. P and J are the output power and fitness corresponding to the optimal individual in the population after the iteration is completed, respectively. After PSC switching, the improved FA algorithm only iterates 17 times to successfully track the global maximum power point.
图12和图13分别为FA和改进FA算法在动态PSC环境下个体随时间的位置变化趋势。图中可以明显看出FA在动态PSC切换前后均处于失效状态,在0.266sPSC切换之前,FA已经实现了小范围局部收敛,加大了动态PSC下算法失效的概率,图12中种群位置的分布可以明显看出PSC切换后种群位置不再变更,多样性丧失,算法失效。Figure 12 and Figure 13 respectively show the trend of individual position changes over time of FA and improved FA algorithms in a dynamic PSC environment. It can be clearly seen from the figure that FA is in failure state before and after dynamic PSC switching. Before 0.266sPSC switching, FA has achieved local convergence in a small area, which increases the probability of algorithm failure under dynamic PSC. The distribution of population positions in Figure 12 It can be clearly seen that the population position does not change after PSC switching, the diversity is lost, and the algorithm fails.
而改进FA算法在0.266sPSC切换前后种群的分布有明显变化,说明算法在PSC切换后仍然保持有效,且免疫补充操作使种群多样性得到保证。However, the population distribution of the improved FA algorithm changed significantly before and after the 0.266sPSC switch, indicating that the algorithm remained effective after the PSC switch, and the immune complement operation ensured the diversity of the population.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811003330.0A CN108983863B (en) | 2018-08-30 | 2018-08-30 | A Photovoltaic Maximum Power Tracking Method Based on Improved Firefly Algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811003330.0A CN108983863B (en) | 2018-08-30 | 2018-08-30 | A Photovoltaic Maximum Power Tracking Method Based on Improved Firefly Algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108983863A CN108983863A (en) | 2018-12-11 |
CN108983863B true CN108983863B (en) | 2019-08-06 |
Family
ID=64548056
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811003330.0A Expired - Fee Related CN108983863B (en) | 2018-08-30 | 2018-08-30 | A Photovoltaic Maximum Power Tracking Method Based on Improved Firefly Algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108983863B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112364588B (en) * | 2020-11-12 | 2023-03-24 | 河北农业大学 | FPRM logic circuit area optimization method |
TWI858885B (en) * | 2023-08-24 | 2024-10-11 | 國立勤益科技大學 | Photovoltaic module system and maximum power tracking method |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI461882B (en) * | 2012-09-18 | 2014-11-21 | Univ Nat Taiwan | Multipoint direct-prediction method for maximum power point tracking of photovoltaic modules system and control device of photovoltaic modules array |
CN103034904A (en) * | 2013-01-11 | 2013-04-10 | 上海电机学院 | Firefly grouping method, as well as power dispatching system and power dispatching method based on same |
US9397501B2 (en) * | 2013-09-09 | 2016-07-19 | Mitsubishi Electric Research Laboratories, Inc. | Maximum power point tracking for photovoltaic power generation system |
CN104454346B (en) * | 2014-11-09 | 2017-02-15 | 中科诺维(北京)科技有限公司 | Maximum power tracking control method for small permanent-magnet direct-drive wind power generation system |
CN104852374A (en) * | 2015-05-18 | 2015-08-19 | 国家电网公司 | Firefly algorithm-based distributed power supply optimal capacity and position determination method |
CN105373183B (en) * | 2015-10-20 | 2017-03-22 | 同济大学 | Method for tracking whole-situation maximum power point in photovoltaic array |
CN106527570B (en) * | 2016-12-20 | 2018-06-15 | 湘潭大学 | A kind of photovoltaic array multimodal maximum power group hunting optimizes tracking |
-
2018
- 2018-08-30 CN CN201811003330.0A patent/CN108983863B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN108983863A (en) | 2018-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105373183B (en) | Method for tracking whole-situation maximum power point in photovoltaic array | |
CN108983863B (en) | A Photovoltaic Maximum Power Tracking Method Based on Improved Firefly Algorithm | |
CN113408610B (en) | Image identification method based on adaptive matrix iteration extreme learning machine | |
CN116306303A (en) | A Reconfiguration Method of Photovoltaic Array Based on Improved Harris Eagle Optimization Algorithm | |
CN114662638A (en) | Path Planning Method of Mobile Robot Based on Improved Artificial Bee Colony Algorithm | |
CN112561785B (en) | Image data augmentation method of silk cultural relics based on style transfer | |
Pervez et al. | An MPPT method using hybrid radial movement optimization with teaching-learning based optimization under fluctuating atmospheric conditions | |
Taleshian et al. | Parameters identification of photovoltaic solar cells using FIPSO-SQP algorithm | |
CN117421969A (en) | Wind speed prediction method for optimizing LSSVM model based on BSSA algorithm | |
CN105278332A (en) | SOA-based PMLSM feed system PID parameter optimization method | |
CN108646849A (en) | Based on the maximum power point of photovoltaic power generation system tracking for improving wolf pack algorithm | |
CN112327997A (en) | Photovoltaic global maximum power tracking control method based on improved dragonfly algorithm | |
CN109829232B (en) | Layered material distribution simulation method based on random forest algorithm | |
CN103605631B (en) | A kind of based on the Increment Learning Algorithm supporting vector geometry meaning | |
El Marghichi et al. | Modelling photovoltaic modules with enhanced accuracy using particle swarm clustered optimization | |
Chen et al. | Observer-based adaptive iterative learning control for nonlinear systems with time-varying delays | |
Kathpal et al. | Hybrid PSO–SA algorithm for achieving partitioning optimization in various network applications | |
CN113485517B (en) | Photovoltaic array maximum power point tracking method under local shielding condition | |
CN108550180B (en) | Vessel modeling method based on interior point set domain constraint and Gaussian process parameter optimization | |
CN118778764A (en) | A photovoltaic MPPT control method and system based on improved particle swarm algorithm | |
Fu et al. | A novel firefly algorithm based on improved learning mechanism | |
Kishore et al. | A PSO–I GWO algorithm based MPPT for PV system under partial shading conditions | |
CN115509291A (en) | Photovoltaic maximum power tracking method based on improved chaotic gravitation search algorithm | |
CN108227818B (en) | Adaptive step-size photovoltaic maximum power tracking method and system based on conductance increment | |
Aripriharta et al. | The performance of a new heuristic approach for tracking maximum power of PV systems |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190806 |
|
CF01 | Termination of patent right due to non-payment of annual fee |