Dear All,
I want to automatically change the value of variables in a case file( see
the following casered2.m file the number colored in red), for example,
mpc.gen(5,3)=5;% change the Pd=-8.96 on the number of the 5th bus to Pd=5,
mpc.gen(8,3)=5;% change the Pd=-19.11 on the number of the 8th bus to Pd=5
They are predictive wind and solar power. I would like to automatically
change them with the varied value of their forecast inputs and every 2 minutes
I calculate the OPF.
-------------------------------------------------------------------------------------------------------------
function mpc = casered2
% MATPOWER
%% MATPOWER Case Format : Version 2
mpc.version = '2';
%%----- Power Flow Data -----%%
%% system MVA base
mpc.baseMVA = 100;
%% bus data
% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin
mpc.bus = [
1 3 0 0 0 0 1 1 0 220 1 1.05
0.95;
2 1 0 0 0 0 1 1 0 220 1 1.05
0.95;
3 1 0 0 0 0 1 1 0 110 1 1.05
0.95;
4 1 0 0 0 0 1 1 0 35 1 1.05
0.95;
5 2 -8.96 0 0 0 1 1 0 0.4 1 1.05
0.95;
6 1 0 0 0 0 1 1 0 110 1 1.05
0.95;
7 1 0 0 0 0 1 1 0 35 1 1.05
0.95;
8 2 -19.11 0 0 0 1 1 0 0.69 1 1.05
0.95;
9 1 0 0 0 0 1 1 0 0.4 1 1.05
0.95;
10 1 0 0 0 0 1 1 0 110 1 1.05
0.95;
11 1 21 0 0 0 1 1 0 10.5 1 1.05
0.95;
12 1 0 0 0 0 1 1 0 0.4 1 1.05
0.95;
];………
----------------------------------------------
Anyone can help me?
Thanks a lot!
BR
Yi Zong
Senior Researcher
Center for Electric Power and Energy (CEE)
DTU Electrical Engineering
Technical University of Denmark
Department of Electrical Engineering
Frederiksborgvej 399, Box 49
Building 776
4000 Roskilde
Denmark
Direct +45 4677 5045
Mobile +45 5164 7469
[email protected]<mailto:[email protected]>
www.elektro.dtu.dk/<http://www.elektro.dtu.dk/>
www.elektro.dtu.dk/<http://www.elektro.dtu.dk/>cee