Communication of power world with matpower
- Open pwb file from Power world simulator. Run pf in flat start.
- Click on scripts in Tools section and type
LoadScript("data_grep.aux",data_write);
- Check for newly created csv files in current directory.
- Type in matlab command line
powerworld_mpc.bus = get_bus_mpc("bus_5.csv");
powerworld_mpc.branch = get_branch_mpc("branch_5.csv");
powerworld_mpc.gen = get_gen_mpc("gen_5.csv");
powerworld_mpc.gencost = get_gencost_mpc("gencost_5.csv");
powerworld_mpc.version = 2;
powerworld_mpc.baseMVA = 100;
- Set bus types through
powerworld_mpc.bus(:,2) = make_bus_types("slack_bus.csv",powerworld_mpc.bus,powerworld_mpc.gen);
- Run OPF through
results_mpc = runopf(powerworld_mpc);
- In matlab command line type
set_gen_file(results_mpc.gen);
set_bus_file(results_mpc.bus);
- In scripts dialogue type
LoadScript("Bus_data1.aux",set_bus);
LoadScript("Gen_data1.aux",set_gen);