results=rundcpf(mpc); In the above command, mpc is the input MATPOWER case struct and results is the output MATPOWER case struct. Each MATPOWER case struct has the fields bus, gen, branch, area, gencost, and other utility fields. Please read the MATPOWER manual for the format of each of these fields. Now, results.mpc(:,3) is incorrect since you are trying to access the ‘mpc’ field in ‘results’ struct. You should use results.bus(:,3) instead and then do a sum over it to get the total load.
Shri From: Bijay Hughes <bijayhughe...@gmail.com<mailto:bijayhughe...@gmail.com>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>> Date: Tuesday, March 3, 2015 at 11:59 AM To: MATPOWER discussion forum <matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>> Subject: Extracting Total Load Dear Ray and Matpower Users, I want to be able to extract total load in each iteration. In each iteration, I am removing certain number of branches. My question is: what is the matpower command to extract total load in my system? I used total_load() but it doesn't work. For example: Bus Voltage Generation Load # Mag(pu) Ang(deg) P (MW) Q (MVAr) P (MW) Q (MVAr) ----- ------- -------- -------- -------- -------- -------- 1 1.000 0.000* 219.00 0.00 - - 2 1.000 -5.012 40.00 0.00 21.70 0.00 3 1.000 -12.954 0.00 0.00 94.20 0.00 4 1.000 -10.584 - - 47.80 0.00 5 1.000 -9.094 - - 7.60 0.00 6 1.000 -14.852 0.00 0.00 11.20 0.00 7 1.000 -13.907 - - - - 8 1.000 -13.907 0.00 0.00 - - 9 1.000 -15.695 - - 29.50 0.00 10 1.000 -15.974 - - 9.00 0.00 11 1.000 -15.619 - - 3.50 0.00 12 1.000 -15.967 - - 6.10 0.00 13 1.000 -16.140 - - 13.50 0.00 14 1.000 -17.188 - - 14.90 0.00 -------- -------- -------- -------- Total: 259.00 0.00 259.00 0.00 Isn't there a way to extract the highlighted number (total load)? What matpower command shall I use? I tried sum(results.mpc(:,3)) but it doesn't work, where results=rundcpf(mpc). And 3 is the column of the load. Reg. BH