当前位置:网站首页>电力系统经济调度(Matlab完整代码实现)
电力系统经济调度(Matlab完整代码实现)
2022-07-16 16:43:00 【电气工程研习社】
欢迎来到本博客️️️
作者研究:本科计算机专业,研究生电气学硕。主要研究方向是电力系统和智能算法、机器学习和深度学习。目前熟悉python网页爬虫、机器学习、群智能算法、深度学习的相关内容。希望将计算机和电网有效结合!️️️
博主优势:博客内容尽量做到思维缜密,逻辑清晰,为了方便读者,博主专门做了一个专栏目录,整个专栏只放了一篇文章,足见我对其重视程度:博主专栏目录。做到极度细致,方便大家进行学习!亲民!!!还有我开了一个专栏给女朋友的,很浪漫的喔,代码学累的时候去瞧一瞧,看一看:女朋友的浪漫邂逅。有问题可以私密博主,博主看到会在第一时间回复。
目前更新:电力系统相关知识,期刊论文,算法,机器学习和人工智能学习。
支持:如果觉得博主的文章还不错或者您用得到的话,可以关注一下博主,如果三连收藏支持就更好啦!这就是给予我最大的支持!
欢迎您的到来
个人主页:电力系统科研室
专栏目录:电力系统与算法之美
博主课外兴趣:中西方哲学,送予读者:
做科研,涉及到一个深在的思想系统,需要科研者逻辑缜密,踏实认真,但是不能只是努力,很多时候借力比努力更重要,然后还要有仰望星空的创新点和启发点。当哲学课上老师问你什么是科学,什么是电的时候,不要觉得这些问题搞笑,哲学就是追究终极问题,寻找那些不言自明只有小孩子会问的但是你却回答不出来的问题。在我这个专栏记录我有空时的一些哲学思考和科研笔记:科研和哲思。建议读者按目录次序逐一浏览,免得骤然跌入幽暗的迷宫找不到来时的路,它不足为你揭示全部问题的答案,但若能让人胸中升起一朵朵疑云,也未尝不会酿成晚霞斑斓的别一番景致,万一它居然给你带来了一场精神世界的苦雨,那就借机洗刷一下原来存放在那儿的“真理”上的尘埃吧。
或许,雨过云收,神驰的天地更清朗.......

本文目录如下:️️️
目录
1 目标函数

2 约束条件

3 Matlab完整代码
clc
clear all
close all
%% Pmax Pmin a b c
data=[85 10 200 7.0 0.008;
80 10 180 6.3 0.009;
70 10 140 6.8 0.007];
%% 网损系数
B=[0.0218 0.0093 0.0028;
0.0093 0.0228 0.0017;
0.0028 0.0017 0.0179];
B0=[0.0003 0.0031 0.0015];
B = B/100;
B00 = 0.00030523*100;
%% 机组成本系数
a=data(:,3);
b=data(:,4);
c=data(:,5);
Pmin=data(:,2);
Pmax=data(:,1);
lambda=input('输入λ的假定值 : \n');
p=zeros(3,1);
loss=0;
demand=input('输入负荷需求量 : \n');
dp=1;
iter=0;
fprintf('Itr lambda P1 P2 P3 T_Cost\n')
%% 基于增量成本的发电量
y = B;
for i=1:3
y(i,i) = y(i,i)+(c(i)/lambda);
end
I = ones(3,1);
x = 0.5*(I-B0'-(b./lambda));
p = y\x;
P= zeros(3,1);
while abs(dp)>.0001
loss = 0;
iter=iter+1;
j = 1;
while j~=3
P(1)=(lambda*(1-B0(1))-b(1)-2*lambda*(B(1,2)*p(2)+B(1,3)*p(3)))/(2*(c(1)+lambda*B(1,1)));
P(2)=(lambda*(1-B0(2))-b(2)-2*lambda*(B(2,3)*p(3)+B(2,1)*p(1)))/(2*(c(2)+lambda*B(2,2)));
P(3)=(lambda*(1-B0(3))-b(3)-2*lambda*(B(3,1)*p(1)+B(3,2)*p(2)))/(2*(c(3)+lambda*B(3,3)));
for i=1:3
if(P(i)<Pmin(i))
P(i) = Pmin(i);
end
if(P(i)>Pmax(i))
P(i) = Pmax(i);
end
end
dp1=P(1)-p(1);
dp2=P(2)-p(2);
dp3=P(3)-p(3);
p(3)=P(3);
p(1)=P(1);
p(2)=P(2);
if(abs(dp1)<0.001&&abs(dp2)<0.001&&abs(dp3)<0.001)
j=3;
end
end
s = 0;
q = 0;
for i=1:3
for j=1:3
s=s+B(i,j)*p(i)*p(j);
end
q=q+B0(i)*p(i);
end
loss=s+q+B00;
dp=demand+loss-sum(p);
s=0;
k=0;
for i=1:3
for j=1:3
if(i~=j)
s = s+B(i,j)*p(j);
end
end
end
for i=1:3
k=k+(c(i)*(1-B0(i))+B(i,i)*b(i)-2*c(i)*s)/(2*(c(i)+lambda*B(i,i))^2);
end
dl=dp/k;
lambda=lambda+dl;
F1 = 0.008*p(1)^2+7.0*p(1)+200;
F2 = 0.009*p(2)^2+6.3*p(2)+180;
F3 = 0.007*p(3)^2+6.8*p(3)+140;
T_Cost(iter)=F1+F2+F3;
fprintf('%d\t %f\t %f\t %f\t %f\t %f\t\n',iter,lambda,P(1),P(2),P(3),T_Cost(iter))
end
disp('经济调度的 P1、P2 和 P3 的值为 ');
disp(p);
disp('迭代次数')
disp(iter);
disp('增量成本(λ)的最终值为 ');
disp(lambda);
disp('总损耗')
disp(loss)
disp('发电成本')
fprintf('%f\n',T_Cost(iter))
x = 0:iter-1;
plot(x,T_Cost)
xlabel('迭代次数');
ylabel('总燃料成本');
grid on
4 结果


边栏推荐
- Raspberry pie shutdown restart command
- JMeter 21 day clock in day05
- Unity video control pause playback and slider drag (notes)
- eventbus短暂使用
- Five string high-frequency interview questions, grasp the underlying principle of string!
- solidity的代码
- Rizomuv exhibition UV usage notes
- Film knowledge atlas and the construction of a template based question and answer system
- Unity DOTween插件和iTween插件使用(笔记)
- Go language integer bisection template
猜你喜欢

Full marks for all! The Chinese team IMO won four consecutive titles, leading the second place South Korea by a big score

Five string high-frequency interview questions, grasp the underlying principle of string!

5道String高频面试题,拿捏String底层原理!

SI24R2E_ Smart electronic student card 2.4GHz attendance scheme chip
![[wechat applet] page configuration, network data request](/img/cd/2923094dcbd40c790f6743e603549d.png)
[wechat applet] page configuration, network data request

5.线程分离

Airtest+poco multi script, multi device batch run test cases automatically generate test reports

【OpenCV 例程200篇】232. 特征描述之频谱方法

5、 Single table query optimization

Machine learning: cross entropy from theory to code
随机推荐
Ci521 domestic 13.56MHz reader chip replaces cv520 compatible
Top level design scheme of the company's equity structure (case)
基于FPGA的内部IP核fifo信号仿真
行为型模式总结
Machine code
自定义View
6、 Association query optimization, seven sort grouping optimization, eight intercept query analysis
JMeter 21 day clock in day05
MQ brief introduction
Unity 鼠标控制3d物体和UI的抓取移动(笔记)
[tool usage] clion keymap
Open source! Hong Kong Chinese, MIT and Fudan put forward the first RNA cornerstone model
Web.config中设置文件上传大小限制和请求数据流大小设置。
Five string high-frequency interview questions, grasp the underlying principle of string!
老外还停留在20年前
第一章 FPGA数字信号处理_数字混频(NCO与DDS)
【深度学习】线上租用设备平台体验以及踩过的坑(非广告)
手撕ORM(泛型+注解+反射)
Leetcode 1331. 数组序号转换
第二篇 FPGA数字信号处理_并行FIR滤波器Verilog设计

3 Matlab完整代码