Thank you very much for your reply, so if I set pf.enforce_q_lims equal to 1, it will do the PV-PQ switching?
Sincerely, ________________________________ From: [email protected] <[email protected]> on behalf of Ray Zimmerman <[email protected]> Sent: Tuesday, April 9, 2019 3:23:49 PM To: MATPOWER discussion forum Subject: Re: Using conventional parameters as variables in opf I could be wrong, but I would be very, very surprised if the near singular matrix issue is related to modeling the shunt susceptances as generators. The only other idea I have is to call the OPF iteratively as a subroutine with fixed shunt susceptances that you update according to your own optimization at each iteration. Regarding PV, PQ switching during the power flow, have a look at the pf.enforce_q_lims option (help mpoption or Table 4-2 or Table C-2 in the manual<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pserc.cornell.edu%2Fmatpower%2Fdocs%2FMATPOWER-manual-7.0b1.pdf&data=02%7C01%7Cmdabba1%40lsu.edu%7Cbe6b57a2516a472aca6708d6bd2aba4a%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C1%7C636904388546392475&sdata=2GlisEMkpTVah8NQ%2BQ2xredJyfy4evLEijO%2BtEe0%2FCU%3D&reserved=0>). Ray On Apr 9, 2019, at 11:50 AM, Morteza Dabbaghjamanesh <[email protected]<mailto:[email protected]>> wrote: Thanks for your reply. I have been able to fix the problem but can you suggest any alternative way of converting the OPF parameters as variables because I guess adding the shunt susceptances as generators is taking the matrix close to singularity as I am getting some warning. One more question, does matpower do PV , PQ switching while solving the Power Flow? Sincerely, ________________________________ From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> on behalf of Ray Zimmerman <[email protected]<mailto:[email protected]>> Sent: Tuesday, April 9, 2019 9:00:08 AM To: MATPOWER discussion forum Subject: Re: Using conventional parameters as variables in opf If it is not converging, it is likely (though not absolutely certain) that the problem is infeasible. I suggest that you try turning on soft limits to see if the OPF will converge with a few constraint violations. That can show you which are the conflicting constraints. MATPOWER 7.0b1 has a much improved soft-limit capability, so definitely get 7.0b1 if you don’t already have it. See Section 7.6.4 in the MATPOWER User’s Manual<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pserc.cornell.edu%2Fmatpower%2Fdocs%2FMATPOWER-manual-7.0b1.pdf&data=02%7C01%7Cmdabba1%40lsu.edu%7Cbe6b57a2516a472aca6708d6bd2aba4a%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C636904388546402480&sdata=aRd92GSt6LwObzhvexk6EEh0pzqrj%2FzlCMyzg9ex6oM%3D&reserved=0> for more details on OPF soft limits. Then do … mpc = loadcase('<your case>'); mpc = toggle_softlims(mpc, 'on'); r = runopf(mpc); Oh, and by the way, PQ vs PV makes no difference for the OPF, only for the power flow. Hope this helps, Ray On Apr 1, 2019, at 11:51 PM, Morteza Dabbaghjamanesh <[email protected]<mailto:[email protected]>> wrote: Hi, I have already set the Vmax and Vmin in mpc.bus section to Vg but the condition gets worse, the OPF is not converging now. Previously, though I have seen convergence but I have voltage violation almost in every buses of my system and this is also happening now. Do you have any idea why this is happening or how to get rid of this issue? Does switching from PQ to PV bus seems reasonable to you? If you can suggest some alternative way even it is difficult, it will be of great help to me. Regards, Get Outlook for iOS<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=02%7C01%7Cmdabba1%40lsu.edu%7Cbe6b57a2516a472aca6708d6bd2aba4a%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C636904388546402480&sdata=sRB75kLk4FhtTJVSIYMBy6MJZyIa7ZsGArijAawD5h0%3D&reserved=0> ________________________________ From: [email protected]<mailto:[email protected]> on behalf of Ray Zimmerman <[email protected]<mailto:[email protected]>> Sent: Monday, April 1, 2019 5:25 PM To: MATPOWER discussion forum Subject: Re: Using conventional parameters as variables in opf There is not an easy way to convert a parameter (like shunt susceptance) to an OPF variable. The approach you are already taking is what I would suggest. It sounds like you may not have set VMIN and VMAX to the desired voltage (VG). On your second question, yes, the gencost matrix is always assumed to be ordered exactly the same as the gen matrix. That is, row i in one corresponds to row i in the other. Ray On Apr 1, 2019, at 11:03 AM, Morteza Dabbaghjamanesh <[email protected]<mailto:[email protected]>> wrote: Hi, I was wondering whether there is any way of converting a parameter into a variable in OPF. Say for example, if I want to convert the shunt susceptance which is usually passed as a parameter to the OPF , to a variable, what is the easiest way of doing it. Currently, I am considering shunts as reactive generators which can only produce reactive power and no real power, to implement that, I have appended new rows equal to the number of shunt buses in the generator section of mpc data. Then I set the 'Pg','Pmax' and 'Pmin' to zero. I collected the voltage from the bus data section and passed it to the 'Vg' of the new added rows. I have also added some rows in the generator cost section (appended at the last of the existing cost of the generators). I have set the 'Qmax' and 'Qmin' from my maximum and minimum shunt susceptance. I have also changed the bus types to 'PV' from 'PQ' mode (in applicable cases). Though I am having an OPF solution but looking at the results there are voltage limit violation in almost every buses. Can you please suggest what could be the solution of this problem? Another issue is, if I add any new generator to the power flow data, then should I add the generator cost information at the end of the existing generator cost or should I insert them as per the index of the generators. Best regards, Morteza Dabbaghjamanesh
