CN112596575B - A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart - Google Patents

A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart Download PDF

Info

Publication number
CN112596575B
CN112596575B CN202011521558.6A CN202011521558A CN112596575B CN 112596575 B CN112596575 B CN 112596575B CN 202011521558 A CN202011521558 A CN 202011521558A CN 112596575 B CN112596575 B CN 112596575B
Authority
CN
China
Prior art keywords
particle
convergent
free
particles
algorithm
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.)
Active
Application number
CN202011521558.6A
Other languages
Chinese (zh)
Other versions
CN112596575A (en
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.)
Jilin Jianzhu University
Original Assignee
Jilin Jianzhu University
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 Jilin Jianzhu University filed Critical Jilin Jianzhu University
Priority to CN202011521558.6A priority Critical patent/CN112596575B/en
Publication of CN112596575A publication Critical patent/CN112596575A/en
Application granted granted Critical
Publication of CN112596575B publication Critical patent/CN112596575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05FSYSTEMS FOR REGULATING ELECTRIC OR MAGNETIC VARIABLES
    • G05F1/00Automatic 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/66Regulating electric power
    • G05F1/67Regulating electric power to the maximum power available from a generator, e.g. from solar cell

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)
  • Control Of Electrical Variables (AREA)
  • Photovoltaic Devices (AREA)

Abstract

The invention discloses a maximum power point tracking method based on an NPSO algorithm and a hierarchical automatic restart, which is characterized in that a hierarchical automatic restart method is added before a maximum power point tracking method based on the NPSO algorithm, the maximum power point tracking method based on the NPSO algorithm is characterized in that on the basis of a PSO algorithm, the duty ratio D of a PWM signal is used as the position of a population particle, the output power is used as the adaptive value of the population particle, the population particle is divided into a convergence particle and a free particle, the convergence particle has the same property with the particle in the PSO algorithm, the free particle has no memory, the convergence particle and the free particle are updated at the same time, and the individual optimal position of the convergence particle and the global optimal position of the population are updated through the positions of the convergence particle and the free particle after each update; when the convergence particle falls into the local optimum solution, i.e. the local optimum position, the convergence particle is pulled out of the local optimum solution by using the free particle. The power generation efficiency and the stability are improved.

Description

一种基于NPSO算法与分等级自动重启的最大功率点跟踪方法A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart

技术领域technical field

本发明属于新能源光伏发电技术领域,涉及一种基于NPSO(Novel ParticleSwarm Optimization)算法与分等级自动重启的最大功率点跟踪方法。The invention belongs to the technical field of new energy photovoltaic power generation, and relates to a maximum power point tracking method based on NPSO (Novel Particle Swarm Optimization) algorithm and hierarchical automatic restart.

背景技术Background technique

随着各类生产设备以及家用电器的大量投入,全球对电能的需求量越来越大。面对有限的化石燃料和无限增长的电能需求量,使得全球纷纷把目光投向了可再生能源,其中,太阳能凭借低污染、低噪声和取之不尽用之不竭等优势,得到了全球的认可。根据国际可再生能源机构(IRENA)数据显示,2010-2019年全球光伏累计装机容量维持稳定上升趋势,2019年为578533MW,较2018年增长20.3%,预计未来一段时间还会继续维持增长趋势。光伏阵列在局部阴影等复杂环境下,其P-V输出曲线为具有多个局部极大值和一个最大值的多峰值非线性曲线。目前由于光伏发电系统已经具备了自动化、无人值守的能力,所以其一旦陷入局部功率极大值,光伏发电系统将会长时间运行在局部功率极大值处,造成效率的降低,能源的浪费。为了保证光伏电站较高的发电效率,光伏发电系统必须实时运行在最大功率点处。With the massive investment in various production equipment and household appliances, the global demand for electric energy is increasing. In the face of limited fossil fuels and infinitely growing demand for electricity, the world has turned its attention to renewable energy. Among them, solar energy has gained global popularity due to its advantages of low pollution, low noise and inexhaustible supply. Approved. According to data from the International Renewable Energy Agency (IRENA), the cumulative installed capacity of photovoltaics in the world from 2010 to 2019 maintained a steady upward trend, reaching 578,533MW in 2019, an increase of 20.3% over 2018. In complex environments such as partial shadows, the PV array's P-V output curve is a multi-peak nonlinear curve with multiple local maxima and one maximum value. At present, since the photovoltaic power generation system has the ability to be automated and unattended, once it falls into the local power maximum value, the photovoltaic power generation system will run at the local power maximum value for a long time, resulting in a reduction in efficiency and a waste of energy. . In order to ensure the high power generation efficiency of the photovoltaic power station, the photovoltaic power generation system must run at the maximum power point in real time.

光伏阵列的P-V输出特性曲线为有一个或多个峰值的非线性曲线,通过调整光伏阵列的输出电压就可以调整输出功率,当光伏阵列的输出电压所对应的功率为光伏阵列所能输出的最大功率的时候,就实现了最大功率点的跟踪。传统的MPPT(Maximum PowerPoint Tracking,最大功率点跟踪)技术具有容易陷入局部功率极大值的缺陷,MPPT技术一直是人们关注的热门问题,国内外学者对此提出了许多有效的方法,其中传统的方法有扰动观测法、电导增量法等,这些方法因技术成熟、便于实现,广泛应用于光伏发电系统中。但是上述传统的MPPT方法具有收敛速度慢、震荡幅度大和容易陷入局部功率极大值等的缺点,并不适合应用在复杂环境下的光伏发电系统中。近年来人们将智能控制算法应用到MPPT技术中,取得了一定的突破。在刘艳莉,周航,程泽.基于粒子群优化的光伏系统MPPT控制方法[J].计算机工程,2010,36(15):265-267中提出了一种基于PSO(Particle SwarmOptimization)算法的MPPT技术,有效提高了最大功率点跟踪的速度和精度,并降低了光伏发电系统陷入局部功率极大值的可能性,但是由于PSO算法本身存在容易陷入局部最优解的缺陷,所以该MPPT技术并没有完全解决光伏发电系统容易陷入局部功率极大值的问题。The P-V output characteristic curve of the photovoltaic array is a nonlinear curve with one or more peaks. The output power can be adjusted by adjusting the output voltage of the photovoltaic array. When the output voltage of the photovoltaic array corresponds to the maximum output voltage of the photovoltaic array When the power is high, the tracking of the maximum power point is realized. The traditional MPPT (Maximum PowerPoint Tracking, maximum power point tracking) technology has the defect that it is easy to fall into the local power maximum value. MPPT technology has always been a hot issue that people pay attention to. Domestic and foreign scholars have proposed many effective methods. The methods include disturbance observation method, conductance increment method, etc. These methods are widely used in photovoltaic power generation systems due to their mature technology and easy implementation. However, the above-mentioned traditional MPPT method has the disadvantages of slow convergence speed, large oscillation amplitude and easy to fall into local power maximum value, etc., and is not suitable for application in photovoltaic power generation systems in complex environments. In recent years, people have applied the intelligent control algorithm to the MPPT technology, and some breakthroughs have been made. In Liu Yanli, Zhou Hang, Cheng Ze. MPPT control method of photovoltaic system based on particle swarm optimization [J]. Computer Engineering, 2010, 36(15): 265-267 A MPPT technology based on PSO (Particle SwarmOptimization) algorithm was proposed , which effectively improves the speed and accuracy of the maximum power point tracking, and reduces the possibility of the photovoltaic power generation system falling into the local power maximum value. However, due to the defect of the PSO algorithm itself, it is easy to fall into the local optimal solution, so the MPPT technology does not It completely solves the problem that the photovoltaic power generation system is easy to fall into the local power maximum value.

另一方面,外界环境是不断变化的,例如云彩的移动、光伏阵列灰尘的遮挡面积和树木等阴影的遮挡面积等,当外部环境发生变化时,光伏发电系统的最大功率点也会相应的发生移动,因此就需要重新启动MPPT算法,重新寻找最大功率点,但是光伏发电系统如何感知外部环境的变化以及在感知到外部环境的变化后如何进行重启是解决该问题所面临的又一难题,针对此问题有学者提出一种定周期扫描法,提出每隔一段固定的时间重启一次MPPT算法,以实时跟踪最大功率点,但是定周期扫描法会出现跟踪不及时和无用的扫描的情况,无法保证光伏发电系统的发电效率。并且定周期扫描法在重启过程中都是以PWM占空比的最大搜索区域[0,1]进行重新启动,在这种方式下即使外部环境发生了很小的变化,该重启方法都是以最大搜索区域[0,1]进行重启的,这样会延长跟踪时间和加大发电系统扰动,在重启过程中产生的较大的扰动不仅会对发电系统以及电网产生冲击,降低电能的质量,进而会对用电设备造成一定的伤害,还会降低光伏发电系统的发电效率,造成能量的浪费,并且这些浪费的能量必然会以热量的形式散播到大气层中,加快全球变暖。因此对MPPT技术还需要进一步的探索以解决其存在的不足。On the other hand, the external environment is constantly changing, such as the movement of clouds, the shielding area of the photovoltaic array dust, and the shielding area of shadows such as trees, etc. When the external environment changes, the maximum power point of the photovoltaic power generation system will also occur accordingly. Therefore, it is necessary to restart the MPPT algorithm and re-find the maximum power point. However, how the photovoltaic power generation system senses changes in the external environment and how to restart after sensing the changes in the external environment is another problem faced by solving this problem. In this regard, some scholars have proposed a periodic scanning method, which proposes to restart the MPPT algorithm at regular intervals to track the maximum power point in real time. However, the periodic scanning method will cause untimely and useless scanning, which cannot be guaranteed The power generation efficiency of photovoltaic power generation systems. And the fixed-cycle scan method restarts with the maximum search area [0,1] of the PWM duty cycle during the restart process. In this way, even if the external environment changes very little, the restart method is based on The maximum search area [0,1] is restarted, which will prolong the tracking time and increase the disturbance of the power generation system. The larger disturbance generated during the restart process will not only have an impact on the power generation system and the power grid, but also reduce the quality of power, and then It will cause certain damage to electrical equipment, and will also reduce the power generation efficiency of photovoltaic power generation systems, resulting in wasted energy, and these wasted energy will inevitably be dissipated into the atmosphere in the form of heat, accelerating global warming. Therefore, the MPPT technology needs further exploration to solve its shortcomings.

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的在于提供一种基于NPSO算法的最大功率点跟踪方法,以解决在受到局部阴影遮挡时现有的最大功率点跟踪算法容易陷入局部功率极大值造成发电效率低的问题。The purpose of the embodiments of the present invention is to provide a maximum power point tracking method based on the NPSO algorithm, so as to solve the problem that the existing maximum power point tracking algorithm is easy to fall into the local power maximum value and cause low power generation efficiency when it is blocked by local shadows.

本发明实施例的另一目的在于提供一种最大功率点跟踪算法的分等级自动重启方法,以解决现有的最大功率点跟踪算法的重启算法在外部环境发生了变化后不能及时跟踪最大功率点,或外部环境没有发生变化却重启了最大功率点跟踪算法,造成发电效率低且增加了功率波动的问题。Another object of the embodiments of the present invention is to provide a hierarchical automatic restart method of the maximum power point tracking algorithm, so as to solve the problem that the restart algorithm of the existing maximum power point tracking algorithm cannot track the maximum power point in time after the external environment changes , or restart the MPPT algorithm without changing the external environment, resulting in low power generation efficiency and increased power fluctuations.

本发明实施例的另一目的在于提供一种基于NPSO算法与分等级自动重启的最大功率点跟踪方法。Another object of the embodiments of the present invention is to provide a maximum power point tracking method based on the NPSO algorithm and hierarchical automatic restart.

为了解决上述技术问题,本发明实施例提供一种基于NPSO算法的最大功率点跟踪方法,是在PSO算法的基础上,以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置,以光伏发电系统的光伏阵列输出功率Ppv作为种群粒子的适应值,将种群粒子分为收敛粒子和自由粒子两类,收敛粒子与PSO算法中的粒子性质一致,自由粒子不具有记忆性,收敛粒子和自由粒子进行同代更新,收敛粒子的速度和位置按照PSO算法中粒子的速度和位置更新方法进行更新,每个自由粒子的位置在给定的搜索区间内随机更新,自由粒子的搜索区间是将收敛粒子的全局搜索区间按照自由粒子的数量进行等分,在每次更新后通过收敛粒子和自由粒子的适应值,采用收敛粒子的位置更新收敛粒子的个体最优位置,并采用收敛粒子和自由粒子的位置更新种群的全局最优位置;在收敛粒子陷入局部最优解即局部最优位置时,所有自由粒子继续在收敛粒子的全局搜索区间内搜索,并在某个自由粒子的位置优于当前的全局最优解时,采用该自由粒子的位置更新全局最优位置也即全局最优解,将收敛粒子拉出局部最优解,使得收敛粒子继续搜索全局最优解。In order to solve the above-mentioned technical problem, the embodiment of the present invention provides a maximum power point tracking method based on the NPSO algorithm. On the basis of the PSO algorithm, the duty cycle D of the PWM control signal of the photovoltaic power generation system is used as the position of the population particle, Taking the output power P pv of the photovoltaic array of the photovoltaic power generation system as the fitness value of the population particles, the population particles are divided into two types: convergent particles and free particles. The properties of convergent particles are consistent with those in the PSO algorithm. Particles and free particles are updated simultaneously, the velocity and position of convergent particles are updated according to the update method of particle velocity and position in the PSO algorithm, the position of each free particle is randomly updated within a given search interval, and the search interval of free particles It divides the global search interval of the convergent particles into equal parts according to the number of free particles, and uses the position of the convergent particle to update the individual optimal position of the convergent particle through the fitness value of the convergent particle and the free particle after each update. update the global optimal position of the population with the position of the free particle; when the convergent particle falls into the local optimal solution, that is, the local optimal position, all free particles continue to search in the global search interval of the convergent particle, and at the position of a certain free particle When it is better than the current global optimal solution, the position of the free particle is used to update the global optimal position, that is, the global optimal solution, and the convergent particle is pulled out of the local optimal solution, so that the convergent particle continues to search for the global optimal solution.

为了解决上述技术问题,本发明实施例还提供一种最大功率点跟踪算法的分等级自动重启方法,所述最大功率点跟踪算法为如上所述的基于NPSO算法的最大功率点跟踪方法,具体实现步骤如下:In order to solve the above technical problem, the embodiment of the present invention also provides a hierarchical automatic restart method of the maximum power point tracking algorithm. The maximum power point tracking algorithm is the above-mentioned maximum power point tracking method based on the NPSO algorithm. Proceed as follows:

第一步、通过电压传感器实时采集光伏阵列的输出电压Us,然后根据式(9)计算光伏阵列输出电压的变化率ΔU:The first step is to collect the output voltage U s of the photovoltaic array in real time through the voltage sensor, and then calculate the rate of change ΔU of the output voltage of the photovoltaic array according to formula (9):

ΔU=|Us-Umax|/Umax; (9)ΔU=|U s −U max |/U max ; (9)

其中,Umax为光伏阵列上次执行最大功率点跟踪算法后采集到的最大功率点处的输出电压;Among them, U max is the output voltage at the maximum power point collected after the photovoltaic array performed the maximum power point tracking algorithm last time;

第二步、根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,并根据外部环境的不同变化程度重新设置全局搜索区间,最后再利用重新设置的全局搜索区间重启最大功率点跟踪算法,重新跟踪光伏发电系统的最大功率点。The second step is to intelligently perceive the degree of change of the external environment through the hierarchical method according to the rate of change ΔU of the output voltage of the photovoltaic array, and reset the global search interval according to the different degrees of change of the external environment, and finally use the reset global search interval to restart the maximum The power point tracking algorithm re-tracks the maximum power point of the photovoltaic power generation system.

为了解决上述技术问题,本发明实施例还提供一种基于NPSO算法与分等级自动重启的最大功率点跟踪方法,是在如上所述的一种基于NPSO算法的最大功率点跟踪方法前增加了如上所述的一种最大功率点跟踪算法的分等级自动重启方法,其具体步骤如下:In order to solve the above technical problem, the embodiment of the present invention also provides a maximum power point tracking method based on the NPSO algorithm and hierarchical automatic restart, which adds the above-mentioned method before the above-mentioned maximum power point tracking method based on the NPSO algorithm. Described a kind of automatic restart method of a kind of maximum power point tracking algorithm, its concrete steps are as follows:

步骤S1、以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置,以光伏发电系统的光伏阵列输出功率Ppv作为种群粒子的适应值,将种群粒子分为多个收敛粒子和两个自由粒子,收敛粒子的位置的全局搜索区间为[0,1],两个自由粒子中自由粒子1的搜索区间为[0,0.5],自由粒子2的搜索区间为[0.5,1],并初始化粒子种群;Step S1, take the duty ratio D of the PWM control signal of the photovoltaic power generation system as the position of the population particle, and use the photovoltaic array output power P pv of the photovoltaic power generation system as the fitness value of the population particle, and divide the population particle into a plurality of convergent particles and For two free particles, the global search interval for the position of the convergent particle is [0, 1]. Among the two free particles, the search interval for free particle 1 is [0, 0.5], and the search interval for free particle 2 is [0.5, 1]. , and initialize the particle population;

步骤S2、获取光伏阵列的实时输出电压Vpv和实时输出电流Ipv,并根据光伏阵列的实时输出电压Vpv和实时输出电流Ipv计算第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值

Figure BDA0002849545460000041
其中,0<i<Np,i′=1,2,Np为收敛粒子总数;Step S2, obtain the real-time output voltage V pv and real-time output current I pv of the photovoltaic array, and calculate the adaptive value of the i-th convergent particle after the k-th generation update according to the real-time output voltage V pv and real-time output current I pv of the photovoltaic array The fitness value of P i k and the i′-th free particle after the update of the k-th generation
Figure BDA0002849545460000041
Among them, 0<i<N p , i′=1,2, N p is the total number of convergent particles;

步骤S3、依据第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值

Figure BDA0002849545460000042
更新第i个收敛粒子的个体最优位置Dpbesti和种群的全体最优位置Dgbest,若Pi k>Ppbesti,则令Ppbesti=Pi k
Figure BDA0002849545460000043
否则Ppbesti和Dpbesti不变;若Pi k>Pgbest,则令Pgbest=Pi k
Figure BDA0002849545460000044
否则Pgbest和Dgbest不变;若
Figure BDA0002849545460000045
则令
Figure BDA0002849545460000046
否则Pgbest和Dgbest不变,其中,
Figure BDA0002849545460000047
为第i个收敛粒子在第k代更新后的位置,
Figure BDA0002849545460000048
为第i′个自由粒子在第k代更新后的位置,Ppbesti为第i个收敛粒子的个体最优适应值,Pgbest为种群的全体最优适应值;Step S3, according to the updated fitness value P i k of the i-th convergent particle in the k-th generation and the fitness value of the i′-th free particle after the update of the k-th generation
Figure BDA0002849545460000042
Update the individual optimal position Dpbest i of the i-th convergent particle and the overall optimal position Dgbest of the population. If P i k >Ppbest i , then let Ppbest i =P i k ,
Figure BDA0002849545460000043
Otherwise, Ppbest i and Dpbest i remain unchanged; if P i k >Pgbest, then let Pgbest=P i k ,
Figure BDA0002849545460000044
Otherwise, Pgbest and Dgbest remain unchanged; if
Figure BDA0002849545460000045
order
Figure BDA0002849545460000046
Otherwise Pgbest and Dgbest remain unchanged, where,
Figure BDA0002849545460000047
is the updated position of the i-th convergent particle in the k-th generation,
Figure BDA0002849545460000048
is the updated position of the ith free particle in the kth generation, Ppbest i is the individual optimal fitness value of the ith convergent particle, and Pgbest is the overall optimal fitness value of the population;

步骤S4、更新收敛粒子的速度和位置,以及两个自由粒子的位置;Step S4, update the velocity and position of the convergent particle, and the position of the two free particles;

步骤S5、判断迭代次数即更新代数k是否满足k>genmax,即判断迭代次数是否达到最大迭代次数genmax,如是,则结束迭代,执行步骤S6,否则令迭代次数k加1并返回步骤S2继续迭代;Step S5, determine whether the number of iterations, that is, the update algebra k satisfies k>gen max , that is, determine whether the number of iterations reaches the maximum number of iterations gen max , if so, end the iteration, and execute step S6, otherwise add 1 to the number of iterations k and return to step S2 continue to iterate;

步骤S6、计算光伏阵列输出电压的变化率ΔU;Step S6, calculating the rate of change ΔU of the output voltage of the photovoltaic array;

步骤S7、根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,根据外部环境的不同变化程度判断是否需要返回步骤S1重启,并在判断需要返回步骤S1重启时,对于不同等级的外部环境的变化程度重新设置全局搜索区间,然后返回步骤S1重启,并利用重新设置的全局搜索区间更新原步骤S1中的收敛粒子和自由粒子的全局搜索区间。Step S7, according to the rate of change ΔU of the output voltage of the photovoltaic array, intelligently perceive the degree of change of the external environment through a hierarchical method, and judge whether it is necessary to return to step S1 to restart according to the different degrees of change of the external environment, and when it is judged that it is necessary to return to step S1 to restart, for The change degree of the external environment of different levels resets the global search interval, then returns to step S1 to restart, and uses the reset global search interval to update the global search interval of convergent particles and free particles in the original step S1.

本发明实施例的有益效果是:通过对PSO算法二次开发,提出了一种NPSO算法,该算法把种群粒子分为收敛粒子和自由粒子两类,由于自由粒子不具有收敛性,其会一直在搜索区间内搜索,当收敛粒子达到收敛时,也即收敛粒子陷入了局部功率极大值时,自由粒子仍然在全局空间内随机搜索,当自由粒子搜索到更大的功率时,自由粒子就会把其位置分享给收敛粒子,即把全局最优解更新为此时自由粒子搜索到的解,从而将收敛粒子拉出局部最优解,增强了PSO算法的全局搜索能力,弥补了PSO算法在种群粒子收敛后就会失去全局搜索的能力的缺陷,并将NPSO算法应用到MPPT技术中,形成了基于NPSO算法的最大功率点跟踪方法,解决了现有的最大功率点跟踪算法在光伏阵列位于局部阴影遮挡等复杂环境下容易陷入局部功率极大值造成发电效率低的问题,提高了光伏发电系统的发电效率。The beneficial effects of the embodiments of the present invention are: through the secondary development of the PSO algorithm, an NPSO algorithm is proposed. The algorithm divides the population particles into two types: convergent particles and free particles. Since free particles do not have convergence, they will always be Search in the search interval. When the convergent particle reaches convergence, that is, when the convergent particle falls into the local power maximum, the free particle still searches randomly in the global space. When the free particle searches for a larger power, the free particle will It will share its position with the convergent particles, that is, update the global optimal solution to the solution searched by the free particles at this time, thereby pulling the convergent particles out of the local optimal solution, enhancing the global search ability of the PSO algorithm and making up for the PSO algorithm. After the population particle converges, it will lose the ability of global search, and the NPSO algorithm is applied to the MPPT technology to form a maximum power point tracking method based on the NPSO algorithm, which solves the problem of the existing maximum power point tracking algorithm in photovoltaic arrays. It is easy to fall into the problem of low power generation efficiency due to local power maximum in complex environments such as partial shadow occlusion, which improves the power generation efficiency of photovoltaic power generation systems.

提出了一种最大功率点跟踪算法的分等级自动重启方法,外部环境的变化首先会引起光伏阵列输出电压的变化,通过电压传感器采集光伏阵列的输出电压,以电压的变化率为依据,判断是否重启最大功率点跟踪算法,从而达到实时跟踪的目的,能够自动检测外部环境是否发生了变化,实现最大功率点的实时跟踪的功能;在最大功率点跟踪算法重启过程中,通过分等级法将外部环境的变化程度进行分级,能够智能感知外部环境的变化程度,合理的制定全局搜索区间,使粒子在原最大功率点附近搜索,避免无用的搜索,减少了跟踪时间和搜索过程中的功率波动,从而减小了重启最大功率点跟踪算法时的功率波动,有效解决了现有的最大功率点跟踪算法的重启算法在外部环境发生了变化后不能及时跟踪最大功率点,或外部环境没有发生变化却重启了最大功率点跟踪算法,造成发电效率低且增加了功率波动的问题。使光伏发电系统更加稳定,发电效率更高。A hierarchical automatic restart method of the maximum power point tracking algorithm is proposed. The change of the external environment will first cause the change of the output voltage of the photovoltaic array. The output voltage of the photovoltaic array is collected by the voltage sensor, and the rate of change of the voltage is used to judge whether it is Restart the maximum power point tracking algorithm, so as to achieve the purpose of real-time tracking, can automatically detect whether the external environment has changed, and realize the function of real-time tracking of the maximum power point; The degree of change of the environment is classified, which can intelligently perceive the degree of change of the external environment, and reasonably formulate the global search interval, so that the particles can search near the original maximum power point, avoid useless searches, and reduce the tracking time and the power fluctuation during the search process. It reduces the power fluctuation when restarting the MPPT algorithm, and effectively solves the problem that the restart algorithm of the existing MPPT algorithm cannot track the MPPT in time after the external environment changes, or restarts without changing the external environment. The maximum power point tracking algorithm is adopted, which causes the problem of low power generation efficiency and increased power fluctuation. The photovoltaic power generation system is more stable and the power generation efficiency is higher.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1是光伏阵列P-V输出特性曲线图。Figure 1 is a graph of the P-V output characteristic of a photovoltaic array.

图2是本发明实施例的基于NPSO算法与分等级自动重启的最大功率点跟踪方法的流程图。FIG. 2 is a flowchart of a maximum power point tracking method based on an NPSO algorithm and hierarchical automatic restart according to an embodiment of the present invention.

图3是光伏系统Boost升压电路的原理图。Figure 3 is a schematic diagram of a photovoltaic system Boost boost circuit.

图4是基于Boost升压电路的光伏发电系统仿真模型图。Figure 4 is a simulation model diagram of a photovoltaic power generation system based on a boost circuit.

图5(a)是基于PSO算法的最大功率点跟踪方法在局部阴影遮挡不均匀的光照模式3下的一次仿真结果图。Figure 5(a) is a simulation result of the maximum power point tracking method based on the PSO algorithm under the illumination mode 3 with uneven partial shadow occlusion.

图5(b)是本发明实施例的基于NPSO算法的最大功率点跟踪方法在局部阴影遮挡不均匀的光照模式3下的一次仿真结果图,其局部阴影遮挡不均匀的光照模式与图5(a)一致。Fig. 5(b) is a simulation result diagram of the maximum power point tracking method based on the NPSO algorithm according to the embodiment of the present invention under the illumination pattern 3 with uneven partial shadow occlusion, and the illumination pattern with uneven partial shadow occlusion is the same as that of Fig. 5 ( a) Consistent.

图6(a)是基于定周期扫描法的最大功率点跟踪方法在外部光照环境变化时的一次仿真结果图。Fig. 6(a) is a simulation result diagram of the maximum power point tracking method based on the periodic scanning method when the external illumination environment changes.

图6(b)是本发明实施例的一种最大功率点跟踪算法的分等级自动重启方法在外部光照环境变化时的一次仿真结果图,其外部光照环境变化与图6(a)一致。FIG. 6(b) is a simulation result diagram of a hierarchical automatic restart method of a maximum power point tracking algorithm according to an embodiment of the present invention when the external lighting environment changes, and the external lighting environment changes are consistent with FIG. 6(a).

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions 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. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

以SIEMENS SP75太阳能电池板为例来说明光伏阵列的P-V输出曲线为多峰值的情况,在Simulink下搭建起由3块光伏电池板串联的光伏阵仿真模型,其中每块光伏电池板的参数表1所示,仿真的光照条件及仿真结果如表2所示,光伏电池板在三种光照下的P-V输出曲线如图1。Taking the SIEMENS SP75 solar panel as an example to illustrate the situation that the P-V output curve of the photovoltaic array is multi-peak, a photovoltaic array simulation model consisting of three photovoltaic panels in series is built under Simulink, and the parameters of each photovoltaic panel are listed in Table 1. The simulated illumination conditions and simulation results are shown in Table 2, and the P-V output curves of the photovoltaic panel under three illuminations are shown in Figure 1.

表1 SIEMENS SP75光伏电池板参数Table 1 SIEMENS SP75 photovoltaic panel parameters

参数parameter 取值value 最大功率(W)Maximum power (W) 7575 最大功率点电压(V)Maximum power point voltage (V) 17.017.0 最大功率点电流(A)Maximum power point current (A) 4.44.4 短路电流(A)Short circuit current (A) 4.84.8 开路电压(V)Open circuit voltage (V) 21.721.7

表2光伏阵列输出特性数据Table 2 PV array output characteristic data

Figure BDA0002849545460000061
Figure BDA0002849545460000061

在图1所示的三种光照模式下的光伏阵列的P-V输出特性曲线中,模式1为均匀光照,模式2和模式3分别受到了局部阴影遮挡不均匀的光照。由图1可以看出模式1有一个峰值,模式2有两个峰值,模式3有3个峰值。在模式2和模式3下,由于有多个峰值的存在,在进行最大功率点跟踪时,就会存在跟踪到局部极大值而不是最大值的风险。现有的技术方案大多是在理想均匀光照、没有阴影遮挡条件下,即光伏阵列P-V输出特性曲线是单峰值的情况下开展研究的,与现实不符,没有考虑光照不均或局部阴影遮挡等情况,均在受到不均匀光照或局部阴影遮挡时存在容易陷入局部功率极大值的问题。例如在基于PSO算法的MPPT技术中,种群粒子在迭代过程中是逐步收敛的,即可搜索的区间越来越小,当粒子全部收敛到一点时,PSO算法就完全失去了全局搜索能力,要是搜索到的这一点功率不是功率最大值,那么这时就陷入了局部功率极大值,并且不能跳出。In the P-V output characteristic curves of the photovoltaic array under the three illumination modes shown in Figure 1, mode 1 is uniform illumination, and modes 2 and 3 are respectively subjected to partial shadows to block uneven illumination. It can be seen from Figure 1 that mode 1 has one peak, mode 2 has two peaks, and mode 3 has three peaks. In mode 2 and mode 3, due to the existence of multiple peaks, there is a risk of tracking a local maximum instead of a maximum when performing MPPT tracking. Most of the existing technical solutions are researched under the condition of ideal uniform illumination and no shadow occlusion, that is, the P-V output characteristic curve of the photovoltaic array is a single peak, which is inconsistent with reality and does not consider uneven illumination or partial shadow occlusion. , all have the problem of easily falling into the local power maximum when they are occluded by uneven illumination or partial shadows. For example, in the MPPT technology based on the PSO algorithm, the population of particles gradually converges in the iterative process, and the searchable interval becomes smaller and smaller. When all the particles converge to a point, the PSO algorithm completely loses the global search ability. The power found at this point is not the maximum power value, then it falls into the local power maximum value and cannot jump out.

PSO算法是受到鸟类寻找食物行为的启发而创造的,该算法在各类优化问题上都展现出了较高的性能,应用范围也非常广泛。在PSO算法开始时,首先定义一个具有N个粒子的粒子群,作为算法执行的主体,每个粒子都具有速度

Figure BDA0002849545460000071
和位置
Figure BDA0002849545460000072
两个参数。然后在全局搜索空间和预先定义的速度范围内,每个粒子随机获取自身的初始位置
Figure BDA0002849545460000073
和初始速度
Figure BDA0002849545460000074
即得到第一代粒子的位置和速度。根据目标函数即可计算出每个粒子位置
Figure BDA0002849545460000075
对应的适应值,其中目标函数是根据要求解的问题而定的。接着在每次迭代中粒子群中的每个粒子通过式(1)和式(2)进行更新自身的速度和位置,并将每个粒子搜索到的目前的最优位置作为粒子的个体最优解xpbesti,并在粒子群中所有粒子的个体最优解xpbesti中选取出最优的解作为整个粒子群的全局最优解xgbest。The PSO algorithm is inspired by the behavior of birds to find food. The algorithm has shown high performance in various optimization problems and has a wide range of applications. At the beginning of the PSO algorithm, first define a particle swarm with N particles, as the main body of the algorithm execution, each particle has a speed
Figure BDA0002849545460000071
and location
Figure BDA0002849545460000072
two parameters. Then within the global search space and a predefined velocity range, each particle randomly acquires its own initial position
Figure BDA0002849545460000073
and initial velocity
Figure BDA0002849545460000074
That is, the position and velocity of the first generation of particles are obtained. According to the objective function, the position of each particle can be calculated
Figure BDA0002849545460000075
The corresponding fitness value, where the objective function is determined according to the problem to be solved. Then, in each iteration, each particle in the particle swarm updates its own speed and position through Equation (1) and Equation (2), and takes the current optimal position searched by each particle as the individual optimal position of the particle. Solve xpbest i , and select the optimal solution from the individual optimal solutions xpbest i of all particles in the particle swarm as the global optimal solution xgbest of the entire particle swarm.

Figure BDA0002849545460000076
Figure BDA0002849545460000076

Figure BDA0002849545460000077
Figure BDA0002849545460000077

其中,k是粒子更新的代数,

Figure BDA0002849545460000078
表示种群中第i个粒子在第k代更新后的位置,
Figure BDA0002849545460000079
表示种群中第i个粒子在第k-1代更新后的位置,
Figure BDA00028495454600000710
表示种群中第i个粒子在第k代更新后的速度,
Figure BDA00028495454600000711
表示种群中第i个粒子在第k-1代更新后的速度,i=1,2,3...N,N是种群中粒子的总数;ω为惯性权重因子,rand()为介于0和1之间的随机数,c1和c2是学习因子。where k is the algebra of particle update,
Figure BDA0002849545460000078
represents the position of the i-th particle in the population after the update of the k-th generation,
Figure BDA0002849545460000079
represents the position of the ith particle in the population after the update of the k-1th generation,
Figure BDA00028495454600000710
represents the velocity of the ith particle in the population after the update of the kth generation,
Figure BDA00028495454600000711
Represents the velocity of the ith particle in the population after the update of the k-1th generation, i=1,2,3...N, N is the total number of particles in the population; ω is the inertia weight factor, rand() is between A random number between 0 and 1, c 1 and c 2 are learning factors.

进一步地将PSO算法应用到光伏MPPT方法中,粒子群中粒子的位置就表示光伏发电系统的PWM控制信号的占空比D,因此可用

Figure BDA00028495454600000712
表示粒子的位置,速度仍用
Figure BDA00028495454600000713
表示,
Figure BDA00028495454600000714
表示第i个粒子在第k代更新后的位置,
Figure BDA0002849545460000081
表示第i个粒子在第k更新后的速度,0<i<N,N为种群中的粒子总数。此时粒子的全局搜索空间也即粒子的位置范围为[0,1],粒子的速度上限为vmax、下限为vmin,当采用公式(4)计算的
Figure BDA0002849545460000082
小于vmin时,
Figure BDA0002849545460000083
当采用公式(4)计算的
Figure BDA0002849545460000084
大于vmax时,
Figure BDA0002849545460000085
vmax和vmin具体的取值是根据实际的应用场景调试的。限制粒子的移动速度可以避免粒子的位置每次移动的过大,粒子位置移动的过大有可能会使粒子一直错过最优解,不利于粒子的收敛;另外粒子位置移动的过大,会使功率变化的过大,对电网不利。Further applying the PSO algorithm to the photovoltaic MPPT method, the position of the particles in the particle swarm represents the duty cycle D of the PWM control signal of the photovoltaic power generation system, so it can be used
Figure BDA00028495454600000712
Indicates the position of the particle, the velocity is still used
Figure BDA00028495454600000713
express,
Figure BDA00028495454600000714
represents the position of the i-th particle after the update of the k-th generation,
Figure BDA0002849545460000081
Indicates the velocity of the i-th particle after the k-th update, 0<i<N, where N is the total number of particles in the population. At this time, the global search space of the particle, that is, the position range of the particle is [0,1], the upper limit of the particle speed is v max , and the lower limit is v min , when the formula (4) is used to calculate
Figure BDA0002849545460000082
When less than v min ,
Figure BDA0002849545460000083
When calculated using formula (4)
Figure BDA0002849545460000084
When greater than v max ,
Figure BDA0002849545460000085
The specific values of v max and v min are debugged according to actual application scenarios. Limiting the moving speed of the particles can prevent the position of the particles from moving too large each time. If the position of the particles moves too much, the particles may miss the optimal solution all the time, which is not conducive to the convergence of the particles. Excessive power changes are detrimental to the power grid.

粒子的目标函数为式(3)所示。The objective function of the particle is shown in formula (3).

Ppv=Vpv×Ipv (3)P pv = Vpv × Ipv (3)

其中Ppv表示光伏发电系统的光伏阵列输出功率也即种群粒子的适应值,Vpv表示光伏阵列实时输出的电压值,Ipv表示光伏阵列实时输出的电流值。Among them, P pv represents the output power of the photovoltaic array of the photovoltaic power generation system, that is, the fitness value of the population particles, Vpv represents the voltage value output by the photovoltaic array in real time, and Ipv represents the current value output by the photovoltaic array in real time.

在每一代中进行一次粒子的适应值Pi k的比较,Pi k表示第k代的第i个粒子的适应值,适应值是评价粒子位置优劣的标准,把目前每个粒子在所有代数中的最大适应值记为个体最优适应值Ppbesti,并定义Ppbesti所对应粒子的位置为粒子的个体最优解Dpbesti。并在当前所有粒子的个体最优适应值Ppbesti中选取最优的适应值作为粒子群的全局最优适应值Pgbest,并定义Pgbest所对应粒子的位置为粒子群的全局最优解Dgbest。在光伏MPPT方法中,上文的式(1)和式(2)可改写为式(4)和式(5)。In each generation, a comparison of the fitness value P i k of the particle is carried out. P i k represents the fitness value of the i-th particle in the k-th generation, and the fitness value is the standard for evaluating the position of the particle. The maximum fitness value in the algebra is recorded as the individual optimal fitness value Ppbest i , and the position of the particle corresponding to Ppbest i is defined as the individual optimal solution Dpbest i of the particle. And select the optimal fitness value from the individual optimal fitness value Ppbest i of all the particles as the global optimal fitness value Pgbest of the particle swarm, and define the position of the particle corresponding to Pgbest as the global optimal solution Dgbest of the particle swarm. In the photovoltaic MPPT method, the above equations (1) and (2) can be rewritten as equations (4) and (5).

Figure BDA0002849545460000088
Figure BDA0002849545460000088

Figure BDA0002849545460000089
Figure BDA0002849545460000089

其中,

Figure BDA00028495454600000810
表示种群中第i个收敛粒子在第k代更新后的速度,
Figure BDA00028495454600000811
表示种群中第i个收敛粒子在第k-1代更新后的速度,vmax为收敛粒子的速度上限,vmin为收敛粒子的速度下限,当采用公式(4)计算的
Figure BDA00028495454600000812
小于vmin时,
Figure BDA00028495454600000813
当采用公式(4)计算的
Figure BDA00028495454600000814
大于vmax时,
Figure BDA00028495454600000815
Figure BDA00028495454600000816
表示种群中第i个收敛粒子在第k代更新后的位置,
Figure BDA00028495454600000817
表示种群中第i个收敛粒子在第k-1代更新后的位置,i=1,2,3...N,N是种群中粒子的总数,1<k<genmax,genmax为最大迭代次数;ω为惯性权重因子,rand()为[0,1]区间内的随机数,c1和c2是学习因子。in,
Figure BDA00028495454600000810
represents the velocity of the ith convergent particle in the population after the update of the kth generation,
Figure BDA00028495454600000811
Represents the velocity of the ith convergent particle in the population after the update of the k-1th generation, v max is the upper limit of the velocity of the convergent particle, v min is the lower limit of the velocity of the convergent particle, when calculated by formula (4)
Figure BDA00028495454600000812
When less than v min ,
Figure BDA00028495454600000813
When calculated using formula (4)
Figure BDA00028495454600000814
When greater than v max ,
Figure BDA00028495454600000815
Figure BDA00028495454600000816
represents the position of the i-th convergent particle in the population after the update of the k-th generation,
Figure BDA00028495454600000817
Represents the position of the ith convergent particle in the population after the update of the k-1th generation, i=1,2,3...N, N is the total number of particles in the population, 1<k<gen max , gen max is the maximum The number of iterations; ω is the inertia weight factor, rand() is a random number in the [0,1] interval, and c 1 and c 2 are learning factors.

基于PSO算法的MPPT(最大功率点跟踪)方法步骤如下:The steps of the MPPT (Maximum Power Point Tracking) method based on the PSO algorithm are as follows:

步骤一、以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置

Figure BDA0002849545460000091
种群粒子的位置
Figure BDA0002849545460000092
的全局区间为[0,1],以光伏发电系统的光伏阵列输出功率Ppv作为粒子的适应值Pi k,并定义种群粒子的速度的上限vmax、下限vmin及最大迭代次数genmax的值;初始化粒子群,即初始化种群中所有粒子在第一代的位置
Figure BDA0002849545460000093
在第一代的速度
Figure BDA0002849545460000094
粒子总数N、学习因子c1和c2以及惯性权重因子ω。Step 1. Take the duty cycle D of the PWM control signal of the photovoltaic power generation system as the position of the population particle
Figure BDA0002849545460000091
the position of the population particle
Figure BDA0002849545460000092
The global interval is [0,1], the output power P pv of the photovoltaic array of the photovoltaic power generation system is used as the fitness value P i k of the particles, and the upper limit v max , the lower limit v min and the maximum number of iterations gen max of the speed of the population particles are defined The value of ; initialize the particle swarm, that is, initialize the positions of all particles in the swarm in the first generation
Figure BDA0002849545460000093
Speed in the first generation
Figure BDA0002849545460000094
The total number of particles N, the learning factors c 1 and c 2 and the inertia weight factor ω.

步骤二、根据公式(3)计算粒子的适应值Pi kStep 2: Calculate the fitness value P i k of the particle according to formula (3).

步骤三、若Pi k>Ppbesti,则令Ppbesti=Pi k

Figure BDA0002849545460000095
否则Ppbesti和Dpbesti不变;若Pi k>Pgbest,则令Pgbest=Pi k
Figure BDA0002849545460000096
否则Pgbest和Dgbest不变;Step 3. If P i k >Ppbest i , then let Ppbest i =P i k ,
Figure BDA0002849545460000095
Otherwise, Ppbest i and Dpbest i remain unchanged; if P i k >Pgbest, then let Pgbest=P i k ,
Figure BDA0002849545460000096
Otherwise Pgbest and Dgbest remain unchanged;

步骤四、按照迭代公式(4)和(5)更新种群粒子的速度和位置;Step 4: Update the velocity and position of the population particles according to the iterative formulas (4) and (5);

步骤五、若满足粒子群算法的终止条件k>genmax,即达到最大迭代次数,则结束迭代,执行步骤六,否则返回步骤二;Step 5. If the termination condition k>gen max of the particle swarm optimization algorithm is satisfied, that is, the maximum number of iterations is reached, then the iteration is ended, and step 6 is executed, otherwise, return to step 2;

步骤六、若当前环境没有发生变化,则输出全局最优解Dgbest,以Dgbest作为光伏发电系统的PWM控制信号的占空比,否则返回步骤一。Step 6: If the current environment does not change, output the global optimal solution Dgbest, and use Dgbest as the duty cycle of the PWM control signal of the photovoltaic power generation system, otherwise return to Step 1.

实施例1Example 1

本发明实施例通过对PSO算法进行二次开发,提出了一种NPSO算法,该算法将种群粒子分为收敛粒子和自由粒子两类,增强了PSO算法的全局搜索能力,弥补了PSO算法容易陷入局部最优解的缺陷,并将NPSO算法应用到MPPT技术中。The embodiment of the present invention proposes an NPSO algorithm through the secondary development of the PSO algorithm. The algorithm divides the population particles into two types: convergent particles and free particles, which enhances the global search ability of the PSO algorithm and makes up for the easy trapping of the PSO algorithm. Defects of local optimal solutions and apply NPSO algorithm to MPPT technology.

NPSO算法把种群粒子分为收敛粒子和自由粒子两类,其中自由粒子的个数为两个,分为自由粒子1和自由粒子2。收敛粒子与PSO算法中的粒子性质一致,其位置为

Figure BDA0002849545460000097
速度为
Figure BDA0002849545460000098
收敛粒子和自由粒子进行同代更新,在每次迭代时按照式(4)和式(5)对收敛粒子的速度以及位置进行更新,且目标函数如式(3)所示,即按照式(3)获取收敛粒子和自由粒子的适应值Pi k;自由粒子不具有记忆性,每次更新时在给定的搜索区间内随机取值,自由粒子的适应值用
Figure BDA0002849545460000099
表示,若自由粒子搜索到的解,也即自由粒子的位置
Figure BDA00028495454600000910
优于当前的全局最优解Dgbest时,把全局最优解更新为此时自由粒子搜索到的解,即令
Figure BDA00028495454600000911
当NPSO算法中的收敛粒子陷入局部最优解后,收敛粒子就失去了全局搜索能力,由于自由粒子仍然在全局搜索空间内进行搜索,因此当自由粒子更新全局最优解后,根据公式(3)和式(4)可知收敛粒子就会向着更新后的全局最优解方向移动,那么自由粒子就将收敛粒子拉出了局部最优,进而找到全局最优解。The NPSO algorithm divides the population particles into two categories: convergent particles and free particles. The number of free particles is two, which are divided into free particles 1 and free particles 2. The convergent particle is consistent with the particle properties in the PSO algorithm, and its position is
Figure BDA0002849545460000097
speed is
Figure BDA0002849545460000098
The convergent particle and the free particle are updated in the same generation, and the velocity and position of the convergent particle are updated according to formula (4) and formula (5) in each iteration, and the objective function is shown in formula (3), that is, according to formula ( 3) Obtain the fitness value P i k of the convergent particle and the free particle; the free particle has no memory, and randomly selects a value in a given search interval during each update, and the fitness value of the free particle is
Figure BDA0002849545460000099
represents, if the solution found by the free particle is the position of the free particle
Figure BDA00028495454600000910
When it is better than the current global optimal solution Dgbest, update the global optimal solution to the solution searched by free particles at this time, that is, let
Figure BDA00028495454600000911
When the convergent particle in the NPSO algorithm falls into the local optimal solution, the convergent particle loses the global search ability. Since the free particle is still searching in the global search space, when the free particle updates the global optimal solution, according to formula (3 ) and equation (4), it can be known that the convergent particle will move towards the updated global optimal solution direction, then the free particle will pull the convergent particle out of the local optimal solution, and then find the global optimal solution.

自由粒子的搜索过程通过自由粒子搜索阶段的阈值gen分为两个阶段,第一阶段是自由粒子和收敛粒子迭代次数在gen代之内,自由粒子在全局搜索空间内搜索,全局搜索空间为[0,1],并定义自由粒子的搜索区间是将收敛粒子的全局搜索区间按照自由粒子的数量进行等分。此阶段自由粒子的作用是在全局搜索区间内进行搜索,帮助收敛粒子跳出局部最优解。第二阶段是种群粒子迭代次数在gen代之后,自由粒子不再进行全局搜索,而是以全局最优解Dgbest为中心,进行半径为r1的微小区域的随机搜索。此阶段自由粒子的作用是使当前种群粒子能够更加细致的搜索全局最优解,提高搜索的精度,并能够加快收敛粒子的收敛速度。The search process of free particles is divided into two stages by the threshold gen of the free particle search stage. The first stage is that the number of iterations of free particles and convergent particles is within the generation of gen, and free particles are searched in the global search space, and the global search space is [ 0,1], and defining the search interval of free particles is to divide the global search interval of convergent particles into equal parts according to the number of free particles. The role of free particles at this stage is to search in the global search interval to help convergent particles jump out of the local optimal solution. The second stage is that the number of population particle iterations is after the gen generation, free particles no longer perform global search, but take the global optimal solution Dgbest as the center, and perform random search in a tiny area with a radius of r 1 . The role of free particles at this stage is to enable the current population particles to search for the global optimal solution more carefully, to improve the search accuracy, and to speed up the convergence speed of convergent particles.

基于NPSO算法的最大功率点跟踪方法,具体步骤如下:The maximum power point tracking method based on NPSO algorithm, the specific steps are as follows:

步骤1、以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置,以光伏发电系统的光伏阵列输出功率Ppv作为种群粒子的适应值,并将种群粒子分为多个收敛粒子和两个自由粒子,收敛粒子的位置的全局搜索区间为[0,1],两个自由粒子中自由粒子1的搜索区间为[0,0.5],自由粒子2的搜索区间为[0.5,1],自由粒子的搜索区间是将收敛粒子的全局搜索区间按照自由粒子的数量进行等分;然后初始化粒子种群,即初始化收敛粒子在第一代的位置

Figure BDA0002849545460000101
收敛粒子在第一代的速度
Figure BDA0002849545460000102
收敛粒子的速度上限vmax、速度下限vmin,自由粒子在第一代位置
Figure BDA0002849545460000103
收敛粒子总数Np,学习因子c1和c2,惯性权重因子ω,最大迭代次数genmax以及自由粒子的搜索代数阈值gen,其中,0<i<Np,i′=1,2;Step 1. Take the duty cycle D of the PWM control signal of the photovoltaic power generation system as the position of the population particle, use the photovoltaic array output power P pv of the photovoltaic power generation system as the fitness value of the population particle, and divide the population particle into multiple convergent particles. and two free particles, the global search interval of the position of the convergent particle is [0, 1], the search interval of free particle 1 of the two free particles is [0, 0.5], and the search interval of free particle 2 is [0.5, 1] ], the search interval of free particles is to divide the global search interval of convergent particles into equal parts according to the number of free particles; then initialize the particle population, that is, initialize the position of convergent particles in the first generation
Figure BDA0002849545460000101
Velocity of convergent particles in the first generation
Figure BDA0002849545460000102
The upper limit v max and the lower limit v min of the convergent particle, the free particle is at the position of the first generation
Figure BDA0002849545460000103
The total number of convergent particles N p , the learning factors c 1 and c 2 , the inertia weight factor ω, the maximum number of iterations gen max and the search algebraic threshold gen of free particles, where 0<i<N p , i′=1,2;

步骤2、获取光伏阵列的实时输出电压Vpv和实时输出电流Ipv,并根据实时输出电压Vpv和实时输出电流Ipv通过公式(3)计算计算第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值

Figure BDA0002849545460000104
Step 2. Obtain the real-time output voltage V pv and real-time output current I pv of the photovoltaic array, and calculate and calculate the i-th convergent particle after the k-th generation update according to the real-time output voltage V pv and real-time output current I pv by formula (3). The fitness value P i k and the fitness value of the i′-th free particle after the update of the k-th generation
Figure BDA0002849545460000104

步骤3、依据第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值

Figure BDA0002849545460000105
更新第i个收敛粒子的个体最优位置Dpbesti和种群的全体最优位置Dgbest,若Pi k>Ppbesti,则令Ppbesti=Pi k
Figure BDA0002849545460000106
否则Ppbesti和Dpbesti不变;若Pi k>Pgbest,则令Pgbest=Pi k
Figure BDA0002849545460000107
否则Pgbest和Dgbest不变;若
Figure BDA0002849545460000108
则令
Figure BDA0002849545460000109
否则Pgbest和Dgbest不变;Step 3. According to the updated fitness value P i k of the i-th convergent particle in the k-th generation and the fitness value of the i′-th free particle after the update of the k-th generation
Figure BDA0002849545460000105
Update the individual optimal position Dpbest i of the i-th convergent particle and the overall optimal position Dgbest of the population. If P i k >Ppbest i , then let Ppbest i =P i k ,
Figure BDA0002849545460000106
Otherwise, Ppbest i and Dpbest i remain unchanged; if P i k >Pgbest, then let Pgbest=P i k ,
Figure BDA0002849545460000107
Otherwise, Pgbest and Dgbest remain unchanged; if
Figure BDA0002849545460000108
order
Figure BDA0002849545460000109
Otherwise Pgbest and Dgbest remain unchanged;

步骤4、按照公式(4)和(5)更新收敛粒子的速度和位置,并按照公式(6)~(8)更新两个自由粒子的位置:Step 4. Update the velocity and position of the convergent particles according to formulas (4) and (5), and update the positions of the two free particles according to formulas (6) to (8):

Figure BDA0002849545460000111
Figure BDA0002849545460000111

Figure BDA0002849545460000112
Figure BDA0002849545460000112

其中,

Figure BDA0002849545460000113
为自由粒子1在第k代更新后的位置,
Figure BDA0002849545460000114
为自由粒子2在第k代更新后的位置;dmin为收敛粒子的全局搜索区域的下限,dmax为收敛粒子的全局搜索区域的上限,即收敛粒子的全局搜索区域为[dmin,dmax];rand()为区间[0,1]内的随机数,k为粒子迭代代数,自由粒子随机搜索的搜索半径r1由式(8)确定:in,
Figure BDA0002849545460000113
is the updated position of free particle 1 in the kth generation,
Figure BDA0002849545460000114
is the updated position of free particle 2 in the kth generation; d min is the lower limit of the global search area of the convergent particle, d max is the upper limit of the global search area of the convergent particle, that is, the global search area of the convergent particle is [d min , d max ]; rand() is a random number in the interval [0,1], k is the particle iterative algebra, and the search radius r 1 of the random search of free particles is determined by formula (8):

Figure BDA0002849545460000115
Figure BDA0002849545460000115

其中,

Figure BDA0002849545460000116
表示第1个收敛粒子在第k次更新即迭代后的位置,d1 k-1表示第1个收敛粒子在第k-1次迭代后的位置;
Figure BDA0002849545460000118
表示第2个收敛粒子在第k次迭代后的位置,
Figure BDA0002849545460000119
表示第2个收敛粒子在第k-1次迭代后的位置;
Figure BDA00028495454600001110
表示第i个收敛粒子在第k次迭代后的位置,
Figure BDA00028495454600001111
表示第i个收敛粒子在第k-1次迭代后的位置;
Figure BDA00028495454600001112
表示第Np个收敛粒子在第k次迭代后的位置,
Figure BDA00028495454600001113
表示第Np个收敛粒子在第k-1次迭代后的位置。in,
Figure BDA0002849545460000116
Represents the position of the first convergent particle after the k-th update, that is, the iteration, d 1 k-1 represents the position of the first convergent particle after the k-1th iteration;
Figure BDA0002849545460000118
represents the position of the second convergent particle after the kth iteration,
Figure BDA0002849545460000119
Indicates the position of the second convergent particle after the k-1th iteration;
Figure BDA00028495454600001110
represents the position of the i-th convergent particle after the k-th iteration,
Figure BDA00028495454600001111
represents the position of the ith convergent particle after the k-1th iteration;
Figure BDA00028495454600001112
represents the position of the N pth convergent particle after the kth iteration,
Figure BDA00028495454600001113
represents the position of the N pth convergent particle after the k-1th iteration.

步骤5、判断迭代次数即更新代数k是否满足k>genmax,即判断是否达到最大迭代次数,如是,则结束迭代,执行步骤6,否则令迭代次数k加1并返回步骤2继续迭代;Step 5. Determine whether the number of iterations, that is, the update algebra k satisfies k>gen max , that is, determine whether the maximum number of iterations is reached, if so, end the iteration, and execute step 6, otherwise add 1 to the number of iterations k and return to step 2 to continue the iteration;

步骤6、判断当前外部环境是否发生变化,若当前外部环境没有发生变化,则输出全局最优解Dgbest,以Dgbest作为光伏发电系统的PWM控制信号的占空比,否则返回步骤1。Step 6. Determine whether the current external environment has changed. If the current external environment has not changed, output the global optimal solution Dgbest, and use Dgbest as the duty cycle of the PWM control signal of the photovoltaic power generation system, otherwise return to step 1.

实施例2Example 2

针对现有重启制度在重启过程中实时性差和重启时扰动量大等问题,提出一种最大功率点跟踪算法的分等级自动重启方法,具体实现步骤如下:Aiming at the problems of poor real-time performance and large disturbance during the restarting process of the existing restarting system, a hierarchical automatic restarting method of maximum power point tracking algorithm is proposed. The specific implementation steps are as follows:

第一步、通过电压传感器实时采集光伏阵列的输出电压Us,然后根据式(9)计算光伏阵列输出电压的变化率ΔU:The first step is to collect the output voltage U s of the photovoltaic array in real time through the voltage sensor, and then calculate the rate of change ΔU of the output voltage of the photovoltaic array according to formula (9):

ΔU=|Us-Umax|/Umax; (9)ΔU=|U s −U max |/U max ; (9)

其中,Umax为上次光伏阵列执行最大功率点跟踪算法后采集到的最大功率点处的输出电压。当外部环境发生变化时,光伏阵列的输出电压必然发生变化,因此若采集到光伏阵列的输出电压发生了变化,则说明外部环境发生了变化,否则外部环境没有发生变化。Wherein, U max is the output voltage at the maximum power point collected after the photovoltaic array performed the maximum power point tracking algorithm last time. When the external environment changes, the output voltage of the photovoltaic array will inevitably change. Therefore, if the output voltage of the collected photovoltaic array changes, it means that the external environment has changed, otherwise the external environment has not changed.

第二步、根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,根据外部环境的不同变化程度重新设置MPPT算法即最大功率点跟踪算法重启的全局搜索区间,最后再重新跟踪光伏发电系统的最大功率点。The second step is to intelligently sense the degree of change of the external environment through the hierarchical method according to the change rate ΔU of the output voltage of the photovoltaic array, and reset the global search interval for the restart of the MPPT algorithm, that is, the maximum power point tracking algorithm, according to the different degrees of change of the external environment. Re-track the maximum power point of the PV system.

当检测到外部环境发生变化时,MPPT技术要重新启动,在重启时,对得到的光伏阵列输出电压的变化率ΔU进行分析处理,从光伏阵列输出电压的变化率ΔU数据中可以提取出外部环境变化的大小程度,根据外部环境的变化程度,合理的制定出全局搜索区间,最后再按照基于NPSO算法的MPPT技术进行重新跟踪光伏发电系统的最大功率点。When a change in the external environment is detected, the MPPT technology needs to be restarted. When restarting, the change rate ΔU of the output voltage of the photovoltaic array is analyzed and processed, and the external environment can be extracted from the data of the change rate ΔU of the output voltage of the photovoltaic array. The degree of change, according to the degree of change of the external environment, reasonably formulate the global search interval, and finally re-track the maximum power point of the photovoltaic power generation system according to the MPPT technology based on the NPSO algorithm.

分等级法智能感知外部环境的变化程度的过程中,首先设置三个电压变化率阈值η1、η2和η3,利用电压变化率阈值η1、η2和η3以及光伏阵列输出电压的变化率ΔU的大小,将外部环境的变化程度划分为三个等级:0≤ΔU<η1时,对应的外部环境的变化程度为第一等级;η1≤ΔU<η2时,对应的外部环境的变化程度为第二等级;η2≤ΔU<η3时,对应的外部环境的变化程度为第三等级。第一等级表示外部环境只是发生微小的变化,此时光伏发电系统的输出功率也是发生了微小的变化,此等级光伏发电系统的最大功率点不发生移动或是发生移动的程度极小,因此第一等级MPPT算法不需要重启;第三等级表示外部环境发生了巨大的变化,此等级光伏发电系统的最大功率点发生了极大的移动,因此在MPPT算法重启时就需要定义全局搜索为最大搜索区间,即为[0,1];第二等级表示外部环境发生了较小的变化,此等级光伏发电系统的最大功率点也相应的发生了较小的移动,因此在MPPT算法重启时需要根据光伏阵列输出电压的变化率ΔU的大小,合理地重新定义搜索的区间。具体的做法是令搜索区间的上下限分别为Dmax和Dmin,即搜索区间为[Dmin,Dmax],其中,Dmin≥0且Dmax≤1;Dmax和Dmin的取值由式(10)和式(11)确定:In the process of intelligently sensing the degree of change of the external environment by the hierarchical method, three thresholds of voltage change rate η 1 , η 2 and η 3 are firstly set, and the voltage change rate thresholds η 1 , η 2 and η 3 and the output voltage of the photovoltaic array are used. The magnitude of the change rate ΔU divides the degree of change of the external environment into three levels: when 0≤ΔU<η 1 , the corresponding degree of change in the external environment is the first level; when η 1 ≤ΔU<η 2 , the corresponding external environment The change degree of the environment is the second level; when η 2 ≤ΔU<η 3 , the corresponding change degree of the external environment is the third level. The first level means that the external environment only changes slightly, and the output power of the photovoltaic power generation system also changes slightly. The maximum power point of the photovoltaic power generation system at this level does not move or moves to a very small extent. The first-level MPPT algorithm does not need to be restarted; the third-level indicates that the external environment has undergone great changes, and the maximum power point of the photovoltaic power generation system at this level has moved greatly. Therefore, when the MPPT algorithm restarts, it is necessary to define the global search as the maximum search The interval is [0,1]; the second level indicates that the external environment has undergone minor changes, and the maximum power point of the photovoltaic power generation system at this level has also moved accordingly. Therefore, when the MPPT algorithm is restarted, it needs to be based on The size of the change rate ΔU of the output voltage of the photovoltaic array can reasonably redefine the search interval. The specific method is to set the upper and lower limits of the search interval to be D max and D min respectively, that is, the search interval is [D min , D max ], where D min ≥ 0 and D max ≤ 1; the values of D max and D min Determined by formula (10) and formula (11):

Dmax=Dgbest+r2; (10)D max =Dgbest+r 2 ; (10)

Dmin=Dgbest-r2; (11)D min =Dgbest-r 2 ; (11)

其中,Dgbest为上一次执行MPPT算法搜索到的全局最优解,r2为以Dgbest为中心进行搜索的搜索半径,r2的值要根据光伏阵列输出电压的变化率ΔU的大小来确定,具体见式(12):Among them, Dgbest is the global optimal solution searched by the last execution of the MPPT algorithm, r 2 is the search radius of the search with Dgbest as the center, and the value of r 2 is determined according to the change rate ΔU of the output voltage of the photovoltaic array. See formula (12):

Figure BDA0002849545460000131
Figure BDA0002849545460000131

其中,η21和η22均是位于电压变化率阈值η1和η2之间的两个电压变化率子阈值,且η1<η21<η22<η2。η21和η22的具体取值是根据具体的光伏发电系统确定的,可通过现场调试获得。此处即是在η1≤ΔU≤η2的前提条件下,当ΔU较小时,r2取0.1,当ΔU较大时,r2取0.2,当ΔU更大时,r2取0.3。Wherein, both η 21 and η 22 are two voltage change rate sub-thresholds located between the voltage change rate thresholds η 1 and η 2 , and η 121222 . The specific values of η 21 and η 22 are determined according to the specific photovoltaic power generation system and can be obtained through on-site debugging. Here, under the premise of η 1 ≤ΔU ≤ η 2 , when ΔU is small, r 2 takes 0.1, when ΔU is large, r 2 takes 0.2, and when ΔU is large, r 2 takes 0.3.

本实施例的最大功率跟踪算法也即MPPT算法,既可采用现有最大功率点跟踪方法,如基于PSO算法的最大功率点跟踪方法等,也可采用实施例2提出的基于NPSO算法的最大功率点跟踪方法。The maximum power tracking algorithm in this embodiment, that is, the MPPT algorithm, can either use the existing maximum power point tracking method, such as the maximum power point tracking method based on the PSO algorithm, or the maximum power point tracking method based on the NPSO algorithm proposed in Embodiment 2. Point tracking method.

实施例3Example 3

在光伏发电系统中多采用两级式的系统结构,所谓两级式就是在DC/AC(直流/交流)变换环节之前,加入了一级DC/DC(直流/直流)变换环节。DC/DC变换环节的加入能够将并网技术和最大功率点跟踪算法分开控制,使控制更加方便、灵活。在本发明实施例中DC/DC环节采用Boost升压电路,最大功率点跟踪算法的实施也在Boost升压电路中进行,光伏系统Boost升压电路如图3所示。本实施例提出一种基于NPSO算法与分等级自动重启的最大功率点跟踪方法,是在原基于NPSO算法的最大功率点跟踪方法前级增加了一级自动重置全局搜索区域的算法。如图2所示,按照以下步骤进行:In photovoltaic power generation systems, a two-stage system structure is often used. The so-called two-stage system means that a first-level DC/DC (direct current/direct current) conversion link is added before the DC/AC (direct current/alternating current) conversion link. The addition of the DC/DC conversion link can control the grid-connected technology and the maximum power point tracking algorithm separately, making the control more convenient and flexible. In the embodiment of the present invention, the DC/DC link adopts a boost circuit, and the implementation of the maximum power point tracking algorithm is also performed in the boost circuit. The boost circuit of the photovoltaic system is shown in FIG. 3 . This embodiment proposes a maximum power point tracking method based on NPSO algorithm and hierarchical automatic restart, which is an algorithm for adding one level of automatic reset global search area to the previous stage of the original maximum power point tracking method based on NPSO algorithm. As shown in Figure 2, follow these steps:

步骤S1、以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置,以光伏发电系统的光伏阵列输出功率Ppv作为种群粒子的适应值,将种群粒子分为多个收敛粒子和两个自由粒子,收敛粒子位置的全局搜索区间为[0,1],即收敛粒子的位置的全局搜索区间下限dmin为0,收敛粒子的位置的全局搜索区间上限dmax为1,两个自由粒子中自由粒子1的搜索区间为[0,0.5],自由粒子2的搜索区间为[0.5,1],并初始化粒子种群,即初始化收敛粒子在第一代的位置

Figure BDA0002849545460000132
收敛粒子在第一代的速度
Figure BDA0002849545460000133
收敛粒子的速度上限vmax、速度下限vmin,自由粒子在第一代位置
Figure BDA0002849545460000141
收敛粒子总数Np,学习因子c1和c2,惯性权重因子ω,最大迭代次数genmax,自由粒子在的搜索代数阈值gen,分等级重启的电压变化率阈值η1、η2和η3以及电压变化率子阈值η21和η22,其中,0<i<Np,i′=1,2;Step S1, take the duty ratio D of the PWM control signal of the photovoltaic power generation system as the position of the population particle, and use the photovoltaic array output power P pv of the photovoltaic power generation system as the fitness value of the population particle, and divide the population particle into a plurality of convergent particles and For two free particles, the global search interval for the position of the convergent particle is [0, 1], that is, the lower limit d min of the global search interval for the position of the convergent particle is 0, and the upper limit d max of the global search interval for the position of the convergent particle is 1, and the two Among the free particles, the search interval of free particle 1 is [0, 0.5], and the search interval of free particle 2 is [0.5, 1], and the particle population is initialized, that is, the position of the initial convergent particle in the first generation
Figure BDA0002849545460000132
Velocity of convergent particles in the first generation
Figure BDA0002849545460000133
The upper limit v max and the lower limit v min of the convergent particle, the free particle is at the position of the first generation
Figure BDA0002849545460000141
total number of convergent particles N p , learning factors c 1 and c 2 , inertia weight factor ω, maximum number of iterations gen max , search algebra threshold gen for free particles, voltage rate thresholds η 1 , η 2 and η 3 for hierarchical restart and the voltage change rate sub-thresholds η 21 and η 22 , where 0<i<Np, i' = 1,2;

步骤S2、获取光伏阵列的实时输出电压Vpv和实时输出电流Ipv,并根据光伏阵列的实时输出电压Vpv和实时输出电流Ipv采用公式(3)计算第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值

Figure BDA0002849545460000142
Step S2, obtain the real-time output voltage V pv and real-time output current I pv of the photovoltaic array, and use formula (3) to calculate the i-th convergent particle in the k-th generation according to the real-time output voltage V pv and real-time output current I pv of the photovoltaic array. The updated fitness value P i k and the updated fitness value of the i′-th free particle in the k-th generation
Figure BDA0002849545460000142

步骤S3、依据第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值

Figure BDA0002849545460000143
更新第i个收敛粒子的个体最优位置Dpbesti和种群的全体最优位置Dgbest,若Pi k>Ppbesti,则令Ppbesti=Pi k
Figure BDA0002849545460000144
否则Ppbesti和Dpbesti不变;若Pi k>Pgbest,则令Pgbest=Pi k
Figure BDA0002849545460000145
否则Pgbest和Dgbest不变;若
Figure BDA0002849545460000146
则令
Figure BDA0002849545460000147
否则Pgbest和Dgbest不变;Step S3, according to the updated fitness value P i k of the i-th convergent particle in the k-th generation and the fitness value of the i′-th free particle after the update of the k-th generation
Figure BDA0002849545460000143
Update the individual optimal position Dpbest i of the i-th convergent particle and the overall optimal position Dgbest of the population. If P i k >Ppbest i , then let Ppbest i =P i k ,
Figure BDA0002849545460000144
Otherwise, Ppbest i and Dpbest i remain unchanged; if P i k >Pgbest, then let Pgbest=P i k ,
Figure BDA0002849545460000145
Otherwise, Pgbest and Dgbest remain unchanged; if
Figure BDA0002849545460000146
order
Figure BDA0002849545460000147
Otherwise Pgbest and Dgbest remain unchanged;

步骤S4、按照公式(4)和(5)更新收敛粒子的速度和位置,并按照公式(6)~(8)更新两个自由粒子的位置;Step S4, update the velocity and position of the convergent particle according to formulas (4) and (5), and update the positions of the two free particles according to formulas (6) to (8);

步骤S5、判断迭代次数即更新代数k是否满足k>genmax,即判断是否达到最大迭代次数,如是,则结束迭代,执行步骤S6,否则另迭代次数k加1并返回步骤S2继续迭代;Step S5, determine whether the number of iterations, that is, the update algebra k satisfies k>gen max , that is, determine whether the maximum number of iterations is reached, if so, end the iteration, and execute step S6, otherwise add 1 to the number of iterations k and return to step S2 to continue the iteration;

步骤S6、通过公式(9)计算光伏阵列输出电压的变化率ΔU;Step S6, calculating the rate of change ΔU of the output voltage of the photovoltaic array by formula (9);

步骤S7、根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,根据外部环境的不同变化程度判断是否需要返回步骤S1重启,并在判断需要返回步骤S1重启时,对于不同等级的外部环境的变化程度重新设置全局搜索区间,然后返回步骤S1重启,并利用重新设置的全局搜索区间替换原步骤S1中的收敛粒子的全局搜索区间。具体的,若0≤ΔU<η1,则无需返回步骤S1重启,直接输出全局最优位置Dgbest,以Dgbest作为光伏发电系统的PWM控制信号的占空比,并返回步骤S6继续计算光伏阵列输出电压的变化率;若η1≤ΔU<η2,返回步骤S1进行重启,并重新设置全局搜索区域为[Dmin,Dmax],即将步骤S1中的收敛粒子的全局搜索区间[0,1]更新为[Dmin,Dmax],也即将收敛粒子的全局搜索区间下限dmin更新为Dmin,并将收敛粒子的全局搜索区间上限dmax替换为Dmax。自由粒子1的搜索区间[0,0.5]替换为

Figure BDA0002849545460000151
自由粒子2的搜索区间[0.5,1]替换为
Figure BDA0002849545460000152
若η2≤ΔU<η3,直接返回步骤S1进行重启。Step S7, according to the rate of change ΔU of the output voltage of the photovoltaic array, intelligently perceive the degree of change of the external environment through a hierarchical method, and judge whether it is necessary to return to step S1 to restart according to the different degrees of change of the external environment, and when it is judged that it is necessary to return to step S1 to restart, for The degree of change of the external environment at different levels resets the global search interval, then returns to step S1 to restart, and replaces the global search interval of the convergent particles in the original step S1 with the reset global search interval. Specifically, if 0≤ΔU<η 1 , there is no need to return to step S1 to restart, the global optimal position Dgbest is directly output, Dgbest is used as the duty cycle of the PWM control signal of the photovoltaic power generation system, and the process returns to step S6 to continue to calculate the output of the photovoltaic array The rate of change of voltage; if η 1 ≤ΔU<η 2 , return to step S1 to restart, and reset the global search area to [D min , D max ], that is, the global search interval [0,1 of the converged particle in step S1 ] is updated to [D min , D max ], that is, the lower limit d min of the global search interval of the convergent particles is updated to D min , and the upper limit d max of the global search interval of the convergent particles is replaced by D max . The search interval [0,0.5] of free particle 1 is replaced by
Figure BDA0002849545460000151
The search interval [0.5,1] of free particle 2 is replaced by
Figure BDA0002849545460000152
If η 2 ≤ΔU<η 3 , directly return to step S1 to restart.

实施例4Example 4

为了对基于NPSO算法的最大功率点跟踪方法进行验证,在Simulink环境下搭建如图3所示的基于Boost升压电路的光伏发电系统的仿真模型,如图4所示。其中PV array为三块光伏电池串联的光伏阵列,其中一块光伏电池的参数如表1所示,C1=10μF,L=1.5mH,C2=50μF,R1=53Ω。In order to verify the maximum power point tracking method based on the NPSO algorithm, the simulation model of the photovoltaic power generation system based on the boost circuit shown in Figure 3 is built in the Simulink environment, as shown in Figure 4. The PV array is a photovoltaic array with three photovoltaic cells connected in series, and the parameters of one photovoltaic cell are shown in Table 1, C1=10μF, L=1.5mH, C2=50μF, R1=53Ω.

在表2中的三种光照模式下,分别对基于PSO算法和NPSO算法的最大功率点跟踪方法进行仿真测试。PSO算法和NPSO算法的粒子数量均为6个,最大迭代次数为20次,NPSO算法的参数gen值为12。Under the three illumination modes in Table 2, the simulation tests of the maximum power point tracking method based on the PSO algorithm and the NPSO algorithm are carried out respectively. The number of particles in both the PSO algorithm and the NPSO algorithm is 6, the maximum number of iterations is 20, and the parameter gen value of the NPSO algorithm is 12.

图5(a)和图5(b)为基于PSO算法和NPSO算法的最大功率点跟踪方法在光照模式3下的一次仿真结果图。从图5(a)和图5(b)可以看出改进前即基于PSO算法的最大功率点跟踪方法陷入了局部功率极大值,而在同样的粒子群初始条件下,改进后的基于NPSO算法的最大功率点跟踪方法在0.33s时由于自由粒子的全局搜索作用,跳出了局部功率极大值,并在1.43s时全部粒子收敛到了功率最大值96.8W处。增强了粒子群算法的全局搜索能力,在光伏阵列受到局部阴影遮挡的情况下,有效提高了光伏发电系统的最大功率点跟踪的成功率,解决了陷入局部功率极大值的问题,提高了发电效率和光伏电站的经济性,减少了能源的浪费。Fig. 5(a) and Fig. 5(b) are a simulation result diagram of the maximum power point tracking method based on the PSO algorithm and the NPSO algorithm under the illumination mode 3. From Figure 5(a) and Figure 5(b), it can be seen that the MPPT method based on the PSO algorithm before the improvement is trapped in the local power maximum, and under the same initial conditions of the particle swarm, the improved NPSO-based method The maximum power point tracking method of the algorithm jumped out of the local power maximum value at 0.33s due to the global search effect of free particles, and all particles converged to the power maximum value of 96.8W at 1.43s. The global search capability of the particle swarm algorithm is enhanced. When the photovoltaic array is blocked by local shadows, the success rate of the maximum power point tracking of the photovoltaic power generation system is effectively improved, the problem of falling into a local power maximum value is solved, and the power generation is improved. Efficiency and economy of photovoltaic power plants, reducing energy waste.

图6(a)和图6(b)为采用定周期扫描法和本发明实施例的分等级自动重启法的仿真图。其中实验条件的设置为在1.3s时由光照模式3变为光照模式2,定周期扫描法每隔1.5s进行一次扫描。从仿真结果可以看出定周期扫描法在外部环境发生变化时并不能立即做出反应来重启MPPT算法,而是必须等扫描时间到来时才能重启MPPT算法。另一方面在3s时外部环境并没有发生变化,但是定周期扫描法的扫描时间到来了,所以他要重启MPPT算法,这是不必要的扫描,降低了发电效率。而分等级自动重启法在1.3s外部环境发生变化时,系统能够自动检测到外部环境的变化,并立即重启MPPT算法。此外,在图6(a)中在MPPT算法重启中没有加入分等级法,在图6(b)中在MPPT算法重启过程中加入了分等级法,通过对比可以看出在图6(b)中的MPPT算法重启过程中的功率波动范围大致为110到150W,而在图6(a)中在MPPT算法重启过程中的功率波动范围大致为0到150W,很明显加入分等级法后在MPPT算法的重启时减少了功率波动,使光伏发电系统更加的稳定,并增加了光伏发电的效率,减少了能量的浪费。FIG. 6( a ) and FIG. 6( b ) are simulation diagrams of adopting the periodic scanning method and the hierarchical automatic restart method according to the embodiment of the present invention. The experimental conditions were set to change from illumination mode 3 to illumination mode 2 at 1.3 s, and the periodic scanning method performed a scan every 1.5 s. It can be seen from the simulation results that the periodic scanning method cannot immediately respond to restart the MPPT algorithm when the external environment changes, but must wait for the scanning time to restart the MPPT algorithm. On the other hand, the external environment did not change at 3s, but the scanning time of the periodic scanning method came, so he had to restart the MPPT algorithm, which was unnecessary scanning and reduced the power generation efficiency. In the hierarchical automatic restart method, when the external environment changes within 1.3s, the system can automatically detect the changes in the external environment and restart the MPPT algorithm immediately. In addition, in Figure 6(a), the grading method is not added during the restart of the MPPT algorithm, and in Figure 6(b), the grading method is added during the restart of the MPPT algorithm. By comparison, it can be seen that in Figure 6(b) The power fluctuation range of the MPPT algorithm in the restart process is roughly 110 to 150W, while the power fluctuation range of the MPPT algorithm restart process in Figure 6(a) is roughly 0 to 150W. The restart of the algorithm reduces power fluctuations, makes the photovoltaic power generation system more stable, increases the efficiency of photovoltaic power generation, and reduces energy waste.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (9)

1.一种基于NPSO算法的最大功率点跟踪方法,其特征在于,是在PSO算法的基础上,以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置,以光伏发电系统的光伏阵列输出功率Ppv作为种群粒子的适应值,将种群粒子分为收敛粒子和自由粒子两类,收敛粒子与PSO算法中的粒子性质一致,自由粒子不具有记忆性,收敛粒子和自由粒子进行同代更新,收敛粒子的速度和位置按照PSO算法中粒子的速度和位置更新方法进行更新,每个自由粒子的位置在给定的搜索区间内随机更新,自由粒子的搜索区间是将收敛粒子的全局搜索区间按照自由粒子的数量进行等分,在每次更新后通过收敛粒子和自由粒子的适应值,采用收敛粒子的位置更新收敛粒子的个体最优位置,并采用收敛粒子和自由粒子的位置更新种群的全局最优位置;在收敛粒子陷入局部最优解即局部最优位置时,所有自由粒子继续在收敛粒子的全局搜索区间内搜索,并在某个自由粒子的位置优于当前的全局最优解时,采用该自由粒子的位置更新全局最优位置也即全局最优解,将收敛粒子拉出局部最优解,使得收敛粒子继续搜索全局最优解;1. a maximum power point tracking method based on NPSO algorithm, is characterized in that, on the basis of PSO algorithm, with the duty ratio D of the PWM control signal of the photovoltaic power generation system as the position of the population particle, with the position of the population particle of the photovoltaic power generation system. The output power P pv of the photovoltaic array is used as the fitness value of the population particles, and the population particles are divided into two types: convergent particles and free particles. The properties of convergent particles are consistent with those in the PSO algorithm, and free particles have no memory. The same generation update, the speed and position of the convergent particle are updated according to the speed and position update method of the particle in the PSO algorithm, the position of each free particle is randomly updated in the given search interval, and the search interval of the free particle is the convergence particle. The global search interval is divided into equal parts according to the number of free particles. After each update, the position of the convergent particle is used to update the individual optimal position of the convergent particle through the fitness value of the convergent particle and the free particle, and the position of the convergent particle and the free particle is used. Update the global optimal position of the population; when the convergent particle falls into the local optimal solution, that is, the local optimal position, all free particles continue to search in the global search interval of the convergent particle, and the position of a free particle is better than the current global position When the optimal solution is obtained, the position of the free particle is used to update the global optimal position, that is, the global optimal solution, and the convergent particle is pulled out of the local optimal solution, so that the convergent particle continues to search for the global optimal solution; 具体步骤如下:Specific steps are as follows: 步骤1、以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置,以光伏发电系统的光伏阵列输出功率Ppv作为种群粒子的适应值,将种群粒子分为多个收敛粒子和两个自由粒子,收敛粒子的位置的全局搜索区间为[0,1],两个自由粒子中自由粒子1的搜索区间为[0,0.5],自由粒子2的搜索区间为[0.5,1],并初始化粒子种群;Step 1. Take the duty ratio D of the PWM control signal of the photovoltaic power generation system as the position of the population particle, and use the photovoltaic array output power P pv of the photovoltaic power generation system as the fitness value of the population particle, and divide the population particle into multiple convergent particles and For two free particles, the global search interval for the position of the convergent particle is [0, 1]. Among the two free particles, the search interval for free particle 1 is [0, 0.5], and the search interval for free particle 2 is [0.5, 1]. , and initialize the particle population; 步骤2、获取光伏阵列的实时输出电压Vpv和实时输出电流Ipv,并根据实时输出电压Vpv和实时输出电流Ipv计算第i个收敛粒子在第k代的适应值Pi k和第i′个自由粒子在第k代的适应值
Figure FDA0003394618760000011
其中,0<i<Np,i′=1,2,Np为收敛粒子总数;
Step 2. Obtain the real-time output voltage V pv and real-time output current I pv of the photovoltaic array, and calculate the fitness value P i k and the The fitness value of i′ free particles in the kth generation
Figure FDA0003394618760000011
Among them, 0<i<N p , i′=1,2, N p is the total number of convergent particles;
步骤3、依据第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值
Figure FDA0003394618760000012
更新第i个收敛粒子的个体最优位置Dpbesti和种群的全体最优位置Dgbest:
Step 3. According to the updated fitness value P i k of the i-th convergent particle in the k-th generation and the fitness value of the i′-th free particle after the update of the k-th generation
Figure FDA0003394618760000012
Update the individual optimal position Dpbest i of the i-th convergent particle and the overall optimal position Dgbest of the population:
若Pi k>Ppbesti,则令Ppbesti=Pi k
Figure FDA0003394618760000013
否则Ppbesti和Dpbesti不变;
If P i k >Ppbest i , then let Ppbest i =P i k ,
Figure FDA0003394618760000013
Otherwise Ppbest i and Dpbest i remain unchanged;
若Pi k>Pgbest,则令Pgbest=Pi k
Figure FDA0003394618760000014
否则Pgbest和Dgbest不变;
If P i k >Pgbest, then let Pgbest=P i k ,
Figure FDA0003394618760000014
Otherwise Pgbest and Dgbest remain unchanged;
Figure FDA0003394618760000015
则令
Figure FDA0003394618760000016
否则Pgbest和Dgbest不变;
like
Figure FDA0003394618760000015
order
Figure FDA0003394618760000016
Otherwise Pgbest and Dgbest remain unchanged;
其中,
Figure FDA0003394618760000017
为第i个收敛粒子在第k代更新后的位置,
Figure FDA0003394618760000018
为第i′个自由粒子在第k代更新后的位置,Ppbesti为第i个收敛粒子的个体最优适应值,Pgbest为种群的全体最优适应值;
in,
Figure FDA0003394618760000017
is the updated position of the i-th convergent particle in the k-th generation,
Figure FDA0003394618760000018
is the updated position of the ith free particle in the kth generation, Ppbest i is the individual optimal fitness value of the ith convergent particle, and Pgbest is the overall optimal fitness value of the population;
步骤4、更新收敛粒子的速度和位置以及两个自由粒子的位置;Step 4. Update the velocity and position of the convergent particle and the position of the two free particles; 步骤5、判断迭代次数即更新代数k是否满足k>genmax,即判断迭代次数是否达到最大迭代次数genmax,如是,则结束迭代,执行步骤6,否则令迭代次数k加1并返回步骤2继续迭代;Step 5. Determine whether the number of iterations, that is, the update algebra k satisfies k>gen max , that is, determine whether the number of iterations reaches the maximum number of iterations gen max , if so, end the iteration, and execute step 6, otherwise add 1 to the number of iterations k and return to step 2 continue to iterate; 步骤6、判断当前外部环境是否发生变化,若当前外部环境没有发生变化,则输出全局最优解Dgbest,否则返回步骤1。Step 6: Determine whether the current external environment has changed, if the current external environment has not changed, output the global optimal solution Dgbest, otherwise return to step 1.
2.根据权利要求1所述的一种基于NPSO算法的最大功率点跟踪方法,其特征在于,所述步骤4按照下述公式(4)~(5)更新收敛粒子的速度和位置:2. a kind of maximum power point tracking method based on NPSO algorithm according to claim 1, is characterized in that, described step 4 updates the speed and the position of convergent particle according to following formula (4)~(5):
Figure FDA0003394618760000021
Figure FDA0003394618760000021
Figure FDA0003394618760000022
Figure FDA0003394618760000022
其中,
Figure FDA0003394618760000023
表示种群中第i个收敛粒子在第k代更新后的速度,
Figure FDA0003394618760000024
表示种群中第i个收敛粒子在第k-1代更新后的速度,vmax为收敛粒子的速度上限,vmin为收敛粒子的速度下限,当采用公式(4)计算的
Figure FDA0003394618760000025
小于vmin时,
Figure FDA0003394618760000026
当采用公式(4)计算的
Figure FDA0003394618760000027
大于vmax时,
Figure FDA0003394618760000028
Figure FDA0003394618760000029
表示种群中第i个收敛粒子在第k-1代更新后的位置,1<k<genmax;ω为惯性权重因子,rand()为介区间[0,1]内的随机数,c1和c2是学习因子。
in,
Figure FDA0003394618760000023
represents the velocity of the ith convergent particle in the population after the update of the kth generation,
Figure FDA0003394618760000024
Represents the velocity of the ith convergent particle in the population after the update of the k-1th generation, v max is the upper limit of the velocity of the convergent particle, v min is the lower limit of the velocity of the convergent particle, when calculated by formula (4)
Figure FDA0003394618760000025
When less than v min ,
Figure FDA0003394618760000026
When calculated using formula (4)
Figure FDA0003394618760000027
When greater than v max ,
Figure FDA0003394618760000028
Figure FDA0003394618760000029
Represents the position of the ith convergent particle in the population after the update of the k-1th generation, 1<k<gen max ; ω is the inertia weight factor, rand() is a random number in the interval [0,1], c 1 and c2 is the learning factor.
3.根据权利要求1所述的一种基于NPSO算法的最大功率点跟踪方法,其特征在于,所述步骤4按照下述公式(6)~(7)更新两个自由粒子的位置:3. a kind of maximum power point tracking method based on NPSO algorithm according to claim 1, is characterized in that, described step 4 updates the position of two free particles according to following formula (6)~(7):
Figure FDA00033946187600000210
Figure FDA00033946187600000210
Figure FDA00033946187600000211
Figure FDA00033946187600000211
其中,
Figure FDA00033946187600000212
为自由粒子1在第k代更新后的位置,
Figure FDA00033946187600000213
为自由粒子2在第k代更新后的位置;dmin为收敛粒子的全局搜索区间下限,dmax为收敛粒子的全局搜索区间上限;rand()为区间[0,1]内的随机数,gen为自由粒子的搜索代数阈值,迭代次数在gen代之后,自由粒子不再进行全局搜索,而是以全局最优解Dgbest为中心,进行半径为r1的微小区域的随机搜索,自由粒子随机搜索的搜索半径r1由式(8)确定:
in,
Figure FDA00033946187600000212
is the updated position of free particle 1 in the kth generation,
Figure FDA00033946187600000213
is the updated position of free particle 2 in the kth generation; d min is the lower limit of the global search interval of the convergent particle, d max is the upper limit of the global search interval of the convergent particle; rand() is the random number in the interval [0,1], gen is the search algebraic threshold of free particles. After the number of iterations is gen, the free particles no longer perform a global search, but take the global optimal solution Dgbest as the center, and conduct a random search of a tiny area with a radius of r 1. The free particles randomly search The search radius r 1 of the search is determined by equation (8):
Figure FDA0003394618760000031
Figure FDA0003394618760000031
其中,
Figure FDA0003394618760000032
表示第1个收敛粒子在第k次更新即迭代后的位置,d1 k-1表示第1个收敛粒子在第k-1次迭代后的位置;
Figure FDA0003394618760000033
表示第2个收敛粒子在第k次迭代后的位置,
Figure FDA0003394618760000034
表示第2个收敛粒子在第k-1次迭代后的位置;
Figure FDA0003394618760000035
表示第i个收敛粒子在第k次迭代后的位置,
Figure FDA0003394618760000036
表示第i个收敛粒子在第k-1次迭代后的位置;
Figure FDA0003394618760000037
表示第Np个收敛粒子在第k次迭代后的位置,
Figure FDA0003394618760000038
表示第Np个收敛粒子在第k-1次迭代后的位置。
in,
Figure FDA0003394618760000032
Represents the position of the first convergent particle after the k-th update, that is, the iteration, d 1 k-1 represents the position of the first convergent particle after the k-1th iteration;
Figure FDA0003394618760000033
represents the position of the second convergent particle after the kth iteration,
Figure FDA0003394618760000034
Indicates the position of the second convergent particle after the k-1th iteration;
Figure FDA0003394618760000035
represents the position of the i-th convergent particle after the k-th iteration,
Figure FDA0003394618760000036
represents the position of the ith convergent particle after the k-1th iteration;
Figure FDA0003394618760000037
represents the position of the N pth convergent particle after the kth iteration,
Figure FDA0003394618760000038
represents the position of the N pth convergent particle after the k-1th iteration.
4.根据权利要求1所述的一种基于NPSO算法的最大功率点跟踪方法,其特征在于,初始化粒子种群即是初始化收敛粒子在第一代的位置
Figure FDA0003394618760000039
收敛粒子在第一代的速度
Figure FDA00033946187600000310
收敛粒子的速度上限vmax、速度下限vmin,自由粒子在第一代位置
Figure FDA00033946187600000311
收敛粒子总数Np,学习因子c1和c2,惯性权重因子ω,最大迭代次数genmax以及自由粒子的搜索代数阈值gen。
4. a kind of maximum power point tracking method based on NPSO algorithm according to claim 1, is characterized in that, initializing particle population is the position of initializing convergent particle in the first generation
Figure FDA0003394618760000039
Velocity of convergent particles in the first generation
Figure FDA00033946187600000310
The upper limit v max and the lower limit v min of the convergent particle, the free particle is at the position of the first generation
Figure FDA00033946187600000311
The total number of converged particles N p , the learning factors c 1 and c 2 , the inertia weight factor ω, the maximum number of iterations gen max , and the search algebraic threshold gen for free particles.
5.一种最大功率点跟踪算法的分等级自动重启方法,其特征在于,所述最大功率点跟踪算法为权利要求1~4任一项所述的基于NPSO算法的最大功率点跟踪方法,具体实现步骤如下:5. A hierarchical automatic restart method of a maximum power point tracking algorithm, wherein the maximum power point tracking algorithm is the maximum power point tracking method based on the NPSO algorithm according to any one of claims 1 to 4, and the specific The implementation steps are as follows: 第一步、通过电压传感器实时采集光伏阵列的输出电压Us,然后根据式(9)计算光伏阵列输出电压的变化率ΔU:The first step is to collect the output voltage U s of the photovoltaic array in real time through the voltage sensor, and then calculate the rate of change ΔU of the output voltage of the photovoltaic array according to formula (9): ΔU=|Us-Umax|/Umax; (9)ΔU=|U s −U max |/U max ; (9) 其中,Umax为光伏阵列上次执行最大功率点跟踪算法后采集到的最大功率点处的输出电压;Among them, U max is the output voltage at the maximum power point collected after the photovoltaic array performed the maximum power point tracking algorithm last time; 第二步、根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,并根据外部环境的不同变化程度重新设置全局搜索区间,最后再利用重新设置的全局搜索区间重启最大功率点跟踪算法,重新跟踪光伏发电系统的最大功率点。The second step is to intelligently perceive the degree of change of the external environment through the hierarchical method according to the rate of change ΔU of the output voltage of the photovoltaic array, and reset the global search interval according to the different degrees of change of the external environment, and finally use the reset global search interval to restart the maximum The power point tracking algorithm re-tracks the maximum power point of the photovoltaic power generation system. 6.根据权利要求5所述的一种最大功率点跟踪算法的分等级自动重启方法,其特征在于,所述根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,并根据外部环境的不同变化程度重新设置全局搜索区间,是先设置不同的电压变化率阈值,根据不同的电压变化率阈值以及光伏阵列输出电压的变化率ΔU将外部环境的变化程度划分为多个等级,然后对于不同等级的外部环境的变化程度判断是否需要重启最大功率点跟踪算法,并在判断需要重启最大功率点跟踪算法时,对于不同等级的外部环境的变化程度设置不同的全局搜索区间。6 . The hierarchical automatic restart method of a maximum power point tracking algorithm according to claim 5 , wherein the degree of change of the external environment is intelligently sensed according to the rate of change ΔU of the output voltage of the photovoltaic array through a hierarchical method, 7 . And reset the global search interval according to the different degrees of change of the external environment. First, set different thresholds of voltage change rate, and divide the degree of change of the external environment into multiple thresholds according to different thresholds of voltage change rate and the change rate ΔU of the output voltage of the photovoltaic array. level, and then determine whether the MPPT algorithm needs to be restarted for the degree of change of the external environment at different levels, and when it is determined that the MPPT algorithm needs to be restarted, set different global search intervals for the degree of change of the external environment at different levels. 7.根据权利要求5所述的一种最大功率点跟踪算法的分等级自动重启方法,其特征在于,根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,并根据外部环境的不同变化程度重新设置全局搜索区间,最后在利用重新设置的全局搜索区间重启最大功率点跟踪算法时,先设置η1、η2和η3这三个电压变化率阈值,然后利用电压变化率阈值η1、η2和η3以及光伏阵列输出电压的变化率ΔU的大小,将外部环境的变化程度划分为三个等级:在0≤ΔU<η1时,对应的外部环境的变化程度为第一等级,第一等级的最大功率点跟踪算法不需要重启;η1≤ΔU<η2时,对应的外部环境的变化程度为第二等级,此时重新设置全局搜索区间为[Dmin,Dmax],其中,Dmin≥0且Dmax≤1;η2≤ΔU<η3时,对应的外部环境的变化程度为第三等级,此时设置全局搜索区间为最大搜索区间,即为[0,1];7. The hierarchical automatic restart method of a maximum power point tracking algorithm according to claim 5, characterized in that, according to the rate of change ΔU of the output voltage of the photovoltaic array, the degree of change of the external environment is intelligently sensed by the hierarchical method, and according to the change rate of the output voltage of the photovoltaic array ΔU The different degree of change of the external environment resets the global search interval. Finally, when restarting the MPPT algorithm using the reset global search interval, first set the three voltage change rate thresholds of η 1 , η 2 and η 3 , and then use the voltage The rate of change thresholds η 1 , η 2 and η 3 and the rate of change ΔU of the output voltage of the photovoltaic array divide the degree of change of the external environment into three levels: when 0≤ΔU <η1, the corresponding change in the external environment The degree is the first level, and the MPPT algorithm of the first level does not need to be restarted; when η 1 ≤ΔU<η 2 , the corresponding change degree of the external environment is the second level, and the global search interval is reset to [D min , D max ], where D min ≥ 0 and D max ≤ 1; when η 2 ≤ΔU<η 3 , the corresponding degree of change of the external environment is the third level, and the global search interval is set as the maximum search interval at this time, That is [0,1]; 全局搜索区间[Dmin,Dmax]中Dmax和Dmin的取值由下述公式(10)和式(11)确定:The values of D max and D min in the global search interval [D min , D max ] are determined by the following formulas (10) and (11): Dmax=Dgbest+r2; (10)D max =Dgbest+r 2 ; (10) Dmin=Dgbest-r2; (11)D min =Dgbest-r 2 ; (11) 其中,Dgbest为上一次执行最大功率点跟踪算法搜索到的全局最优解,r2为以Dgbest为中心进行搜索的搜索半径,r2的值要根据光伏阵列输出电压的变化率ΔU的大小来确定,具体见式(12):Among them, Dgbest is the global optimal solution searched by the last execution of the maximum power point tracking algorithm, r 2 is the search radius centered on Dgbest, and the value of r 2 is determined according to the change rate ΔU of the output voltage of the photovoltaic array. Determined, see formula (12) for details:
Figure FDA0003394618760000041
Figure FDA0003394618760000041
其中,η21和η22均是位于电压变化率阈值η1和η2之间的两个电压变化率子阈值,且η1<η21<η22<η2Wherein, both η 21 and η 22 are two voltage change rate sub-thresholds located between the voltage change rate thresholds η 1 and η 2 , and η 121222 .
8.一种基于NPSO算法与分等级自动重启的最大功率点跟踪方法,其特征在于,是在权利要求1~4任一项所述的一种基于NPSO算法的最大功率点跟踪方法后增加了权利要求5所述的一种最大功率点跟踪算法的分等级自动重启方法,其具体步骤如下:8. A maximum power point tracking method based on NPSO algorithm and hierarchical automatic restart, it is characterized in that, after a kind of maximum power point tracking method based on NPSO algorithm described in any one of claims 1 to 4, an additional method is added. The hierarchical automatic restart method of a maximum power point tracking algorithm according to claim 5, its concrete steps are as follows: 步骤S1、以光伏发电系统的PWM控制信号的占空比D作为种群粒子的位置,以光伏发电系统的光伏阵列输出功率Ppv作为种群粒子的适应值,将种群粒子分为多个收敛粒子和两个自由粒子,收敛粒子的位置的全局搜索区间为[0,1],两个自由粒子中自由粒子1的搜索区间为[0,0.5],自由粒子2的搜索区间为[0.5,1],并初始化粒子种群;Step S1, take the duty ratio D of the PWM control signal of the photovoltaic power generation system as the position of the population particle, and use the photovoltaic array output power P pv of the photovoltaic power generation system as the fitness value of the population particle, and divide the population particle into a plurality of convergent particles and For two free particles, the global search interval for the position of the convergent particle is [0, 1]. Among the two free particles, the search interval for free particle 1 is [0, 0.5], and the search interval for free particle 2 is [0.5, 1]. , and initialize the particle population; 步骤S2、获取光伏阵列的实时输出电压Vpv和实时输出电流Ipv,并根据光伏阵列的实时输出电压Vpv和实时输出电流Ipv计算第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值
Figure FDA0003394618760000051
其中,0<i<Np,i′=1,2,Np为收敛粒子总数;
Step S2, obtain the real-time output voltage V pv and real-time output current I pv of the photovoltaic array, and calculate the adaptive value of the i-th convergent particle after the k-th generation update according to the real-time output voltage V pv and real-time output current I pv of the photovoltaic array The fitness value of P i k and the i′-th free particle after the update of the k-th generation
Figure FDA0003394618760000051
Among them, 0<i<N p , i′=1,2, N p is the total number of convergent particles;
步骤S3、依据第i个收敛粒子在第k代更新后的适应值Pi k和第i′个自由粒子在第k代更新后的适应值
Figure FDA0003394618760000052
更新第i个收敛粒子的个体最优位置Dpbesti和种群的全体最优位置Dgbest,若Pi k>Ppbesti,则令Ppbesti=Pi k
Figure FDA0003394618760000053
否则Ppbesti和Dpbesti不变;若Pi k>Pgbest,则令Pgbest=Pi k
Figure FDA0003394618760000054
否则Pgbest和Dgbest不变;若
Figure FDA0003394618760000055
则令
Figure FDA0003394618760000056
否则Pgbest和Dgbest不变,其中,
Figure FDA0003394618760000057
为第i个收敛粒子在第k代更新后的位置,
Figure FDA0003394618760000058
为第i′个自由粒子在第k代更新后的位置,Ppbesti为第i个收敛粒子的个体最优适应值,Pgbest为种群的全体最优适应值;
Step S3, according to the updated fitness value P i k of the i-th convergent particle in the k-th generation and the fitness value of the i′-th free particle after the update of the k-th generation
Figure FDA0003394618760000052
Update the individual optimal position Dpbest i of the i-th convergent particle and the overall optimal position Dgbest of the population. If P i k >Ppbest i , then let Ppbest i =P i k ,
Figure FDA0003394618760000053
Otherwise, Ppbest i and Dpbest i remain unchanged; if P i k >Pgbest, then let Pgbest=P i k ,
Figure FDA0003394618760000054
Otherwise, Pgbest and Dgbest remain unchanged; if
Figure FDA0003394618760000055
order
Figure FDA0003394618760000056
Otherwise Pgbest and Dgbest remain unchanged, where,
Figure FDA0003394618760000057
is the updated position of the i-th convergent particle in the k-th generation,
Figure FDA0003394618760000058
is the updated position of the ith free particle in the kth generation, Ppbest i is the individual optimal fitness value of the ith convergent particle, and Pgbest is the overall optimal fitness value of the population;
步骤S4、更新收敛粒子的速度和位置,以及两个自由粒子的位置;Step S4, update the velocity and position of the convergent particle, and the position of the two free particles; 步骤S5、判断迭代次数即更新代数k是否满足k>genmax,即判断迭代次数是否达到最大迭代次数genmax,如是,则结束迭代,执行步骤S6,否则令迭代次数k加1并返回步骤S2继续迭代;Step S5, determine whether the number of iterations, that is, the update algebra k satisfies k>gen max , that is, determine whether the number of iterations reaches the maximum number of iterations gen max , if so, end the iteration, and execute step S6, otherwise add 1 to the number of iterations k and return to step S2 continue to iterate; 步骤S6、计算光伏阵列输出电压的变化率ΔU;Step S6, calculating the rate of change ΔU of the output voltage of the photovoltaic array; 步骤S7、根据光伏阵列输出电压的变化率ΔU通过分等级法智能感知外部环境的变化程度,根据外部环境的不同变化程度判断是否需要返回步骤S1重启,并在判断需要返回步骤S1重启时,对于不同等级的外部环境的变化程度重新设置全局搜索区间,然后返回步骤S1重启,并利用重新设置的全局搜索区间替换原步骤S1中的收敛粒子的全局搜索区间。Step S7, according to the rate of change ΔU of the output voltage of the photovoltaic array, intelligently perceive the degree of change of the external environment through a hierarchical method, and judge whether it is necessary to return to step S1 to restart according to the different degrees of change of the external environment, and when it is judged that it is necessary to return to step S1 to restart, for The degree of change of the external environment at different levels resets the global search interval, then returns to step S1 to restart, and replaces the global search interval of the convergent particles in the original step S1 with the reset global search interval.
9.根据权利要求8所述的一种基于NPSO算法与分等级自动重启的最大功率点跟踪方法,其特征在于,所述步骤S1中初始化粒子种群,即初始化收敛粒子在第一代的位置
Figure FDA0003394618760000061
收敛粒子在第一代的速度
Figure FDA0003394618760000062
收敛粒子的速度上限vmax、速度下限vmin,自由粒子在第一代位置
Figure FDA0003394618760000063
收敛粒子总数Np,学习因子c1和c2,惯性权重因子ω,最大迭代次数genmax,自由粒子在的搜索代数阈值gen,分等级重启的电压变化率阈值η1、η2和η3以及电压变化率子阈值η21和η22
9. a kind of maximum power point tracking method based on NPSO algorithm and grading automatic restart according to claim 8, is characterized in that, in described step S1, initialize particle population, namely initialize the position of convergent particle in the first generation
Figure FDA0003394618760000061
Velocity of convergent particles in the first generation
Figure FDA0003394618760000062
The upper limit v max and the lower limit v min of the convergent particle, the free particle is at the position of the first generation
Figure FDA0003394618760000063
total number of convergent particles N p , learning factors c 1 and c 2 , inertia weight factor ω, maximum number of iterations gen max , search algebra threshold gen for free particles, voltage rate thresholds η 1 , η 2 and η 3 for hierarchical restart and the voltage rate of change sub-thresholds n 21 and n 22 ;
所述步骤S7中,若0≤ΔU<η1,则无需返回步骤S1重启,直接输出全局最优位置Dgbest,并返回步骤S6继续计算光伏阵列输出电压的变化率;若η1≤ΔU<η2,返回步骤S1进行重启,并重新设置全局搜索区域为[Dmin,Dmax],即将步骤S1中的收敛粒子的全局搜索区间[0,1]替换为[Dmin,Dmax],自由粒子1的搜索区间[0,0.5]替换为
Figure FDA0003394618760000064
自由粒子2的搜索区间[0.5,1]替换为
Figure FDA0003394618760000065
若η2≤ΔU<η3,直接返回步骤S1进行重启。
In the step S7, if 0≤ΔU<η 1 , then there is no need to return to step S1 to restart, directly output the global optimal position Dgbest, and return to step S6 to continue to calculate the rate of change of the output voltage of the photovoltaic array; if η 1 ≤ΔU<η 2. Return to step S1 to restart, and reset the global search area to [D min , D max ], that is, replace the global search interval [0,1] of the convergent particle in step S1 with [D min , D max ], free The search interval [0,0.5] of particle 1 is replaced by
Figure FDA0003394618760000064
The search interval [0.5,1] of free particle 2 is replaced by
Figure FDA0003394618760000065
If η 2 ≤ΔU<η 3 , directly return to step S1 to restart.
CN202011521558.6A 2020-12-21 2020-12-21 A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart Active CN112596575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011521558.6A CN112596575B (en) 2020-12-21 2020-12-21 A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011521558.6A CN112596575B (en) 2020-12-21 2020-12-21 A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart

Publications (2)

Publication Number Publication Date
CN112596575A CN112596575A (en) 2021-04-02
CN112596575B true CN112596575B (en) 2022-01-07

Family

ID=75199899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011521558.6A Active CN112596575B (en) 2020-12-21 2020-12-21 A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart

Country Status (1)

Country Link
CN (1) CN112596575B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114167937A (en) * 2022-02-12 2022-03-11 武汉理工大学 Improved thermoelectric maximum power tracking method and system based on particle swarm optimization
CN117950444B (en) * 2023-12-06 2024-10-18 长江三峡水务(宜昌)有限公司 Photovoltaic voltage tracking MPPT control method based on optimization algorithm

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104238625A (en) * 2014-10-15 2014-12-24 珠海格力电器股份有限公司 Maximum power tracking control method and device
CN108170200A (en) * 2018-01-03 2018-06-15 南京航空航天大学 The improvement population MPPT algorithm of condition is restarted based on dynamic inertia weight and multi-threshold
CN109361237A (en) * 2018-11-30 2019-02-19 国家电网公司西南分部 Optimal configuration method of microgrid capacity based on improved hybrid particle swarm optimization
CN109755967A (en) * 2019-03-26 2019-05-14 安徽工程大学 An optimal configuration method of photovoltaic storage system in distribution network
CN110928357A (en) * 2019-12-16 2020-03-27 徐州工业职业技术学院 Maximum power point tracking method of photovoltaic array under time-varying shadow condition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104238625A (en) * 2014-10-15 2014-12-24 珠海格力电器股份有限公司 Maximum power tracking control method and device
CN108170200A (en) * 2018-01-03 2018-06-15 南京航空航天大学 The improvement population MPPT algorithm of condition is restarted based on dynamic inertia weight and multi-threshold
CN109361237A (en) * 2018-11-30 2019-02-19 国家电网公司西南分部 Optimal configuration method of microgrid capacity based on improved hybrid particle swarm optimization
CN109755967A (en) * 2019-03-26 2019-05-14 安徽工程大学 An optimal configuration method of photovoltaic storage system in distribution network
CN110928357A (en) * 2019-12-16 2020-03-27 徐州工业职业技术学院 Maximum power point tracking method of photovoltaic array under time-varying shadow condition

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于改进BA算法的光伏发电系统MPPT优化控制";刘杨 等;《水电能源科学》;20171231;全文 *

Also Published As

Publication number Publication date
CN112596575A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN108170200B (en) Improved particle swarm MPPT algorithm based on dynamic inertia weight and multi-threshold restart condition
CN112596575B (en) A Maximum Power Point Tracking Method Based on NPSO Algorithm and Hierarchical Automatic Restart
Yuan et al. MPPT of PV system under partial shading condition based on adaptive inertia weight particle swarm optimization algorithm
CN108334152A (en) A kind of photovoltaic array under local shadow maximum power point prediction optimization control method
CN111509785A (en) A method, system and storage medium for optimal coordinated control of multiple sources in a power grid
CN110601177B (en) An economic optimization method for microgrid including wind power and photovoltaic power generation
CN116306303A (en) A Reconfiguration Method of Photovoltaic Array Based on Improved Harris Eagle Optimization Algorithm
Zhao et al. MPPT for photovoltaic system using multi-objective improved particle swarm optimization algorithm
Chen et al. Application of adaptive particle swarm optimization in multi-peak MPPT of photovoltaic array
CN105068591B (en) Maximum power point tracing method under a kind of photovoltaic array partial occlusion
Chen et al. MPPT control strategy of photovoltaic based on improved particle swarm optimization
Mohanty et al. Power Smoothening of Photovoltaic System using Dynamic PSO with ESC under Partial Shading Condition
CN111796629A (en) A composite MPPT tracking method under partial shadow conditions of photovoltaic cells
CN113703515B (en) A fast state tracking variable step size MPPT photovoltaic power generation stability control method
CN110572126A (en) A bionic intelligent island detection method based on salp algorithm
CN117154818A (en) Grid-connected photovoltaic power generation system model parameter identification method
CN108227818B (en) Adaptive step-size photovoltaic maximum power tracking method and system based on conductance increment
Liu et al. A novel MPPT method based on large variance GA-RBF-BP
Alshareef et al. A modified particle swarm optimization based maximum power point tracking for PV systems
CN115756077A (en) Maximum power tracking method, device and system of photovoltaic optimizer
Sun et al. Composite MPPT control algorithm with partial shading on PV arrays
Deng et al. Research on MPPT of photovoltaic system based on PSO with time-varying compression factor
CN103019212A (en) Multi-photovoltaic solar-diesel hybrid system coordination control method based on disturbance observer
Hu et al. Maximum Power Point Tracking Algorithm Based on Adaptive Particle Swarm Optimization Under Partial Shading Conditions
CN116880168B (en) SMGSA algorithm-based MPPT control method

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