当前位置:网站首页>[Optimized scheduling] Based on particle swarm to realize economic scheduling optimization of microgrid under grid-connected model with matlab code
[Optimized scheduling] Based on particle swarm to realize economic scheduling optimization of microgrid under grid-connected model with matlab code
2022-08-08 07:34:00 【matlab_dingdang】
1 内容介绍
In recent years, the global environmental pollution problem and energy crisis have become increasingly prominent,People's awareness of environmental protection and energy conservation is constantly improving,Microgrid has become one of the research hotspots in the field of power system.Compared with the traditional large power grid,Microgrid has its own characteristics and advantages,The power generation process produces less pollutants、发电效率高、The utilization rate of fossil energy is low、Power transmission losses are negligible.In the engineering application of microgrid,It is of great practical significance to optimize the scheduling model of microgrid,The operating cost of microgrid is ultimately due to the use and maintenance consumption of mechanical equipment,The operating condition of each mechanical equipment is good and the service cycle is long, and the cost will be reduced accordingly,The optimal scheduling model can optimize the operating state of the user-side mechanical equipment while optimizing the use state of the distributed power equipment in the microgrid.The operating state of mechanical equipment is the inherent essence of economic cost,This paper studies the microgrid considering demand-side response,Comprehensive consideration of demand-side response、经济成本、环境成本,The optimal microgrid day-ahead scheduling model is obtained,Make the operation state of the supply-side and demand-side mechanical equipment reach the optimal state.
2 仿真代码
function cost=shiyingzhi_grid(PGT,iii,PL_new)
%适应值函数
%--------------------------------------------------------------------------
PGT=PGT;
T=1;
N=5;
% 输入原始数据,Including the load size of each period,The upper and lower limits of generator active output,Generator consumption cost factor,The predicted average output power of the wind farm in each period
pmax(1)=115;pmin(1)=0;
pmax(2)=40;pmin(2)=10; % FC
pmax(3)=40;pmin(3)=10; % MT
pmax(4)=30;pmin(4)=0; % DG
% Pollutant emission cost
% aa表示NOX,bb表示so2,cc表示co2,从左到右依次为Grid,DG,MT,FC
aa=[3.6,21.8,0.03,0.44];
bb=[4.54,0.454,0.006,0.008];
cc=[23,1.432,1.078,1.596];
% Consumption parameters of diesel generators
a=0.4333; b=0.2333;c=0.0071;
% 微型燃气轮机,P_mtIndicates the power produced by the gas turbine,Xl_mtIndicates the efficiency of the gas turbine
Xl_mt=0.5;
Price_mt=0.39;
L=9.7; % Low calorific value of natural gas,单位是kW.h/m3,kWh per cubic meter
% Xl_mt=0.0753*(P_mt/65)^3-0.3095*(P_mt/65)^2+0.1068;
% 燃料电池
Xl_fc=0.6;
Price_fc=0.39;
Price_grid=0.07; % The average electricity price of the grid
Price_grid_sell=0.07; % The price of electricity sold to the grid for excess energy from the microgrid
% Price_grid=[0.03 0.03 0.03 0.03 0.03 0.06 0.06 0.06 0.06 0.06 0.06 0.09 0.09 0.09 0.06 0.06 0.06 0.09 0.09 0.09 0.09 0.06 0.03 0.03];
%Price_grid=[0.01 0.01 0.01 0.01 0.01 0.04 0.04 0.04 0.04 0.04 0.04 0.1 0.1 0.1 0.04 0.04 0.04 0.1 0.1 0.1 0.1 0.04 0.01 0.01];
%%%%%%%%%%=[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24]
%--------------------------------------------------------------------------
C=zeros(1,T);
Cost=0;
% % s=a+b*PGT(1)+c*PGT(1)*PGT(1)+Price_fc*PGT(2)/Xl_fc+Price_mt*PGT(3)/(0.0753*(PGT(3)/65)^3-0.3095*(PGT(3)/65)^2+0.4174*PGT(3)/65+0.1068)+1000000*(sum(PGT(1:N))-PL_new)^2;
% 目标1
if PGT(1)>=0
s=a+b*PGT(4)+c*PGT(4)*PGT(4)+(Price_fc/L)*PGT(2)/Xl_fc+(Price_mt/L)*PGT(3)/Xl_mt+Price_grid*PGT(1)+10000000000000000*(sum(PGT(1:N))-PL_new)^2;
else
s=a+b*PGT(4)+c*PGT(4)*PGT(4)+(Price_fc/L)*PGT(2)/Xl_fc+(Price_mt/L)*PGT(3)/Xl_mt+Price_grid_sell*PGT(1)+10000000000000000*(sum(PGT(1:N))-PL_new)^2;
end
Cost=Cost+s;
% 目标2
% if PGT(1)>=0
% s=0.0042*(aa(1)*PGT(1)+aa(2)*PGT(4)+aa(3)*PGT(3)+aa(4)*PGT(2))+0.00099*(bb(1)*PGT(1)+bb(2)*PGT(4)+bb(3)*PGT(3)+bb(4)*PGT(2))+0.000014*(cc(1)*PGT(1)+cc(2)*PGT(4)+cc(3)*PGT(3)+cc(4)*PGT(2))+10000000000*(sum(PGT(1:N))-PL_new)^2;
% else
% s=0.0042*(aa(2)*PGT(4)+aa(3)*PGT(3)+aa(4)*PGT(2))+0.00099*(bb(2)*PGT(4)+bb(3)*PGT(3)+bb(4)*PGT(2))+0.000014*(cc(2)*PGT(4)+cc(3)*PGT(3)+cc(4)*PGT(2))+10000000000*(sum(PGT(1:N))-PL_new)^2;
% end
% Cost=Cost+s;
% 目标 3
% if PGT(1)>=0
% s1=a+b*PGT(4)+c*PGT(4)*PGT(4)+(Price_fc/L)*PGT(2)/Xl_fc+(Price_mt/L)*PGT(3)/Xl_mt+Price_grid*PGT(1)+10000000000000000*(sum(PGT(1:N))-PL_new)^2;
% s2=0.0042*(aa(1)*PGT(1)+aa(2)*PGT(4)+aa(3)*PGT(3)+aa(4)*PGT(2))+0.00099*(bb(1)*PGT(1)+bb(2)*PGT(4)+bb(3)*PGT(3)+bb(4)*PGT(2))+0.000014*(cc(1)*PGT(1)+cc(2)*PGT(4)+cc(3)*PGT(3)+cc(4)*PGT(2));
% s=s1+s2;
% else
% s1=a+b*PGT(4)+c*PGT(4)*PGT(4)+(Price_fc/L)*PGT(2)/Xl_fc+(Price_mt/L)*PGT(3)/Xl_mt+Price_grid_sell*PGT(1)+10000000000000000*(sum(PGT(1:N))-PL_new)^2;
% s2=0.0042*(aa(2)*PGT(4)+aa(3)*PGT(3)+aa(4)*PGT(2))+0.00099*(bb(2)*PGT(4)+bb(3)*PGT(3)+bb(4)*PGT(2))+0.000014*(cc(2)*PGT(4)+cc(3)*PGT(3)+cc(4)*PGT(2));
% s=s1+s2;
% end
% Cost=Cost+s;
cost=Cost;
3 运行结果
4 参考文献
[1]孙阳. Research on microgrid scheduling model and optimal operation strategy based on particle swarm optimization[D]. 吉林大学.
[2]Li Yanzhao, 王击. Optimal scheduling of grid-connected operation of microgrid based on particle swarm algorithm[J]. 信息通信, 2018(4):2.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流.
部分理论引用网络文献,若有侵权联系博主删除.
边栏推荐
猜你喜欢
随机推荐
C#实现在企业微信内发送消息给指定人员帮助类
Task01:PyTorch模型定义
物联网安全 - 密码学概述
进程间的五种通信方法
ES2020(ES11)新特性
Task04:PyTorch生态简介
BLE安全之配对流程剖析(2)
论文翻译:《6mAPred-MSFF:基于多尺度特征融合机制预测跨物种DNA N6-甲基腺嘌呤位点的深度学习模型》
Day38------网络相关
基于FTP协议的文件上传与下载
FileInputStream与BufferedInputStream的区别
Zip文件的解析与生成
在 TensorFlow 中构建 3D-CNN
用于一型糖尿病血糖调节的无模型iPID控制器
论文解读:《Amy pred-FRL是一种通过使用特征表示学习来精确预测淀粉样蛋白的新方法》
用栈模拟队列
WinForm(四)一种实现登录的方式
小程序 数据监听(observers),避免赋值死循环
seata什么时候支持sqlserver xa呀?
动手学数理统计(1)