Dear,
I have implemented the two area kundur topology in the matpower software. I can successfully run a PF and OPF. My next goal is the change the objective of the OPF so that the voltages on the busses are as close to unity as possible independently from the cost of the generators. For this i modified my gencost matrix so that all the generators have the same cost. the next step is to add my objective while the constrains stay the same. Because i don't need to add any values because Vm is already in the x matrix this process should be quite straightforward but i keep failing. My objective function is fmin=(Vm-1)^2 for all the voltages of the busses. How do i implement this? i looked at the "add_costs" function but don't really know where i should use this function. i tried the direct implementation method of cheaper 7. should i just but the values of the H,N,Cw,... in de Kundur file that I use to perform runopf('Kundur')? or could i just modify the gencost matrix to make a "buscost" matrix where all the polynomial cost functions are as defined above? Could you please give me some more directions on how to solve this problem? thanks in advance kind regards Weckx Robin