资源简介

电力系统负荷预测MATLAB程序,一个实例,很常用的程序 .m

资源截图

代码片段和文件信息

P=[0.2452 0.1466 0.1314 0.2243 0.5523 0.6642 0.7015 0.6981 0.6821 0.6945 0.7549 0.8215 0.2415 0.3027 0;
   0.2217 0.1518 0.1408 0.2304 0.5134 0.5312 0.6819 0.7125 0.7265 0.6847 0.7826 0.8325 0.2385 0.3125 0;
   0.2525 0.1627 0.1507 0.2406 0.5502 0.5636 0.7051 0.7352 0.7459 0.7015 0.8064 0.8156 0.2216 0.2701 1;
   0.2016 0.1105 0.1234 0.1987 0.5021 0.5232 0.6819 0.6952 0.7015 0.6825 0.7825 0.7895 0.2352 0.2506 0.5;
   0.2115 0.1201 0.1312 0.2019 0.5532 0.5736 0.7029 0.7032 0.7189 0.7019 0.7965 0.8025 0.2542 0.3125 0;
   0.2335 0.1322 0.1534 0.2214 0.5623 0.5827 0.7198 0.7276 0.7359 0.7506 0.8092 0.8221 0.2601 0.3198 0;
   0.2368 0.1432 0.1653 0.2205 0.5823 0.5971 0.7136 0.7129 0.7263 0.7153 0.8091 0.8217 0.2579 0.3099 0;
   0.2342 0.1368 0.1602 0.2131 0.5726 0.5822 0.7101 0.7098 0.7127 0.7121 0.7995 0.8126 0.2301 0.2867 0.5;
   0.2113 0.1212 0.1305 0.1819 0.4952 0.5312 0.6886 0.6898 0.6999 0.7323 0.7721 0.7956 0.2234 0.2799 1;
   0.2005 0.1121 0.1207 0.1605 0.4556 0.5022 0.6553 0.6673 0.6798 0.7023 0.7521 0.7756 0.2314 0.2799 0]‘;
T=[0.2217 0.1518 0.1408 0.2304 0.5134 0.5312 0.6819 0.7125 0.7265 0.6847 0.7826 0.8325;
   0.2525 0.1627 0.1507 0.2406 0.5502 0.5636 0.7051 0.7352 0.7459 0.7015 0.8064 0.8156;
   0.2016 0.1105 0.1234 0.1987 0.5021 0.5232 0.6819 0.6952 0.7015 0.6825 0.7825 0.7895;
   0.2115 0.1201 0.1312 0.2019 0.5532 0.5736 0.7029 0.7032 0.7189 0.7019 0.7965 0.8025;
   0.2335 0.1322 0.1534 0.2214 0.5623 0.5827 0.7198 0.7276 0.7359 0.7506 0.8092 0.8221;
   0.2368 0.1432 0.1653 0.2205 0.5823 0.5971 0.7136 0.7129 0.7263 0.7153 0.8091 0.8217;
   0.2342 0.1368 0.1602 0.2131 0.5726 0.5822 0.7101 0.7098 0.7127 0.7121 0.7995 0.8126;
   0.2113 0.1212 0.1305 0.1819 0.4952 0.5312 0.6886 0.6898 0.6999 0.7323 0.7721 0.7956;
   0.2005 0.1121 0.1207 0.1605 0.4556 0.5022 0.6553 0.6673 0.6798 0.7023 0.7521 0.7756;
   0.2123 0.1257 0.1343 0.2079 0.5579 0.5716 0.7059 0.7145 0.7205 0.7401 0.8019 0.8136]‘;
threshold=[0 1;0 1; 0 1; 0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1];
net=newff(threshold[2512]{‘tansig‘‘logsig‘}‘trainlm‘);
net.trainParam.epochs=1000;
net.trainParam.goal=0.01;
LP.lr=0.1;
net=train(netPT);
P_test=[0.2123 0.1257 0.1343 0.2079 0.5579 0.5716 0.7059 0.7145 0.7205 0.7401 0.8019 0.8136 0.2317 0.2936 0]‘;
Out=sim(netP_test);
X=[0.2119 0.1215 0.1621 0.2161 0.6171 0.6159 0.7155 0.7201 0.7243 0.7298 0.8179 0.8229]‘;
plot(1:12X)
hold on
plot(1:12Out‘r‘)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2442  2019-04-11 13:08  电力系统负荷预测MATLAB程序 dianli2.m

----------- ---------  ---------- -----  ----

                 2442                    1


评论

共有 条评论