m基于FPGA的MPPT最大功率跟踪算法verilog实现,包含testbench

86 阅读2分钟

1.算法仿真效果

其中Vivado2019.2仿真结果如下:

 

1.jpeg

 

使用matlab进行显示如下:

 

2.jpeg

 

2.算法涉及理论知识概要

       在太阳能光伏系统中,最大功率点跟踪(Maximum Power Point Tracking, MPPT)是提高能量转换效率的关键技术之一。爬山法(Hill Climbing Algorithm, HCA)作为最直观和基础的MPPT算法之一,因其简单易实现而被广泛研究。

 

       爬山法的基本思想是:从任意工作点出发,通过逐步调整光伏电池的工作点,使输出功率逐渐增大,直到无法继续增加为止,此时即认为达到了最大功率点。算法核心在于如何确定每次调整的方向和幅度。

 

       假设光伏电池的输出功率P与其工作电压V之间存在关系P=f(V),在大多数情况下,此函数在低电压和高电压区域单调递减,在中间某区间内有一个最大值点,即最大功率点Vmpp​。

 

3.png

 

3.Verilog核心程序 ``timescale 1ns / 1ps

//

// Company:

// Engineer:

//

// Create Date:    04:44:35 06/05/2019

// Design Name:

// Module Name:    MPPT_test_tops

// Project Name:

// Target Devices:

// Tool versions:

// Description:

//

// Dependencies:

//

// Revision:

// Revision 0.01 - File Created

// Additional Comments:

//

//

module MPPT_test_tops(

                     i_clk,

   i_rst,

   o_PV_current,

   o_PV_voltage,

   o_PV_power,

   o_PV_max,

   o_PV_current2,

   o_PV_voltage2,

                     o_state

                  );

 

 

input i_clk;

input i_rst;

output signed[15:0]o_PV_current;

output signed[15:0]o_PV_voltage;

output signed[31:0]o_PV_power;

output signed[31:0]o_PV_max;

output signed[15:0]o_PV_current2;

output signed[15:0]o_PV_voltage2;

output [1:0]o_state;

 

 

//为了单独测试MPPT,这里直接模拟来自PV的U和I

UI_test UI_PV(

    .i_clk    (i_clk),

    .i_rst    (i_rst),

    .o_current(o_PV_current),

    .o_voltage(o_PV_voltage)

    );

 

//MPPT  

MPPT_module MPPT_module_U(

    .i_clk       (i_clk),

    .i_rst       (i_rst),

    .i_PV_current(o_PV_current),

    .i_PV_voltage(o_PV_voltage),

    .o_PV_power  (o_PV_power),

    .o_PV_max    (o_PV_max),

    .o_PV_current(o_PV_current2),

    .o_PV_voltage(o_PV_voltage2),

 .o_state     (o_state)

    );  

 

 

endmodule `