Hello,
I want to add PV to bus 5 in the 14 bus system.
I used the code below
pv_bus = 5;
load_5 = sum(mpc.bus(mpc.bus(:,1)==pv_bus, 3));
pv_capacity = load_5 * 1.2; mpc.bus(mpc.bus(:,1)==pv_bus, 3) = 0;
in the generator data, I added this row
5 0 0 0 0 1 100 1 pv_capacity 0 0 0 0 0 0 0 0 0 0 0 0; % Add PV system
I made the file 'case_New' and when I run
results = runpf(case14_with_renewable);
I got this error:
Index in position 1 exceeds array bounds. Index must not exceed 5.
Error in get_reorder (line 29)
B = subsref(A, s);
Error in e2i_data (line 73)
v = get_reorder(val, b+(1:n), dim);
Error in e2i_field (line 52)
mpc.(field) = e2i_data(mpc, mpc.(field), ordering, dim);
Error in ext2int (line 193)
mpc = e2i_field(mpc, 'gencost', ordering);
Error in runpf (line 109)
mpc = ext2int(mpc);
Do you know how I can add PV to case 14 in Matpower?
Thank you,
Naime