💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
📚2 运行结果
🎉3 参考文献
🌈4 Matlab代码、数据
💥1 概述
本文是独立光伏-电池-柴油发电机组的能源管理系统的主干网研究。
模拟 PV、电池和 DG 模型。还有助于展示能源管理系统的工作原理。还能够与粒子群优化等大小调整算法集成。
📚2 运行结果
部分代码:
fh = figure();
fh.WindowState = 'maximized';
dim=[0.01, 0.87, 0.07, 0.05];
str=sprintf('System Size:\n Npv=%.0f\n Nbat=%.0f\n Ndg=%.0f\n\nResult:\n LPSP = %.3f\n COE = %.2f $/kWh',Npv,Nbat,Ndg,LPSP,COE);
annotation('textbox',dim,'String',str,'FitBoxToText','on');
subplot(4,4,[1,5])
plot(Eload);
title('Load Profile')
xlabel('Time, t (hour)');
ylabel('Load Energy, E_{load} (kWh)');
grid on;
subplot(4,4,2)
plot(G)
title('Irradiance')
xlabel('Time, t (hour)');
ylabel('Irradiance, G (W/m^2)');
grid on;
subplot(4,4,6)
plot(T)
title('Ambient Temperature')
xlabel('Time, t (hour)');
ylabel('Ambient Temperature, T (^oC)');
grid on;
%% 2.3.2 PV Related Energy
subplot(4,4,[3,4])
plot(Epv);
title('PV Energy')
xlabel('Time, t (hour)');
ylabel('Battery Energy, E_{bat} (kWh)');
grid on;
%% 3.1 PV Model
function Ppv=PVmod(G,T,Npv)
Ppv=Npv*0.3*G/1000*2*(T-25);
end
%% 3.2 Battery Model
function [Ebat_lev,SOC,Ebat,Ebat_sur,Ebat_def]=BATmod(Epv_sur,Nbat)
%Parameter of the battery
SOCmin=0.2; %Minimum SOC (%)
SOCmax=0.8; %Maximum SOC (%)
SOCini=0.5; %Initial SOC (%)
Ebat_full=Nbat*10; %Full Battery Energy = Nbat * 1 Battery Energy Storage Capacity (W)
Ebat_min=SOCmin*Ebat_full; %Maximum battery energy (kWh)
Ebat_max=SOCmax*Ebat_full; %Minimum battery energy (kWh)
%Initial Battery Condition
persistent SOCpre;
if isempty(SOCpre)
SOCpre=SOCini; %Assigne previous SOC as initial SOC
end
%Updated battery condition
Ebat_lev=SOCpre*Ebat_full+Epv_sur; %Previous battery energy level add surplus energy from PV
Ebat=Epv_sur; %Energy to battery
Ebat_sur=0; %There no energy surpass at battery
Ebat_def=0; %There no energy deficit at battery
%Battery is depleted
if Ebat_lev<Ebat_min
Ebat_def=Ebat_min-Ebat_lev; %Defecit energy from battery(kWh)
Ebat_lev=Ebat_min; %Change the current energy storage to maximum limit
Ebat=Epv_sur+Ebat_def; %Energy that goes to battery
end
%Battery complete charge
if Ebat_lev>Ebat_max
Ebat_sur=Ebat_lev-Ebat_max; %Excess energy from battery(kWh)
Ebat_lev=Ebat_max; %Change the current energy storage to maximum limit
Ebat=Epv_sur-Ebat_sur; %Energy that goes to battery
end
%Update new SOC
SOC=Ebat_lev/Ebat_full;
SOCpre=SOC;
end
%% 3.3 Diesel Generator Model
function [Edg,LPS]=DGmod(Ebat_def,Ndg)
Edg_max=Ndg*100; %Maximum energy that can be supply by diesel generator
Edg=Ebat_def;
LPS=0;
if Ebat_def>Edg_max
LPS=Ebat_def-Edg_max;
Edg=Edg_max;
end
end
%% 4 Cost of Energy
function COE=COEcalc(Npv,Nbat,Ndg,Ebat_sur_max,Eload_tot,Edg_tot)
Cpv=Npv*300; %Cost of PV panels
Cbat=Nbat*1000; %Cost of batteries
Cdg=Ndg*10000+Edg_tot*10; %Cost of DG + cost of fuel
Cdum=Ebat_sur_max*10; %Cost of dummy load
Ctot=Cpv+Cbat+Cdg+Cdum; %Total cost
COE=Ctot/Eload_tot;
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。