6

I am writing an optimal power flow (OPF) program. OPF is an optimization problem in which some decision variables like Generation, Load dispatch are adjusted in power flow program so as to minimize the objective function (usually cost of generation).
I am using fmincon Matlab function to solve this problem. Like any optimization problem, OPF have some linear and nonlinear constraints. These constraints are added to the problem to guarantee the feasibility of the solution. I wrote these constraint in Matlab, but I am getting infeasible results which is due to constraints. The constraints of this problem are as follows:
enter image description here
In Here I have posted part of my code that I need to supply the constraints to fmincon. Please check if I wrote the constraints are correct .

Note:I used IEEE New England test system to run OPF on it. This test system contains, 39 Buses, 19 Loads,10 Generators, 46 Lines.

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
Masan
  • 163
  • 1
  • 5
  • It would be helpful if you added some more description of your power system, like no. of generators, no. of buses and their types, loads, etc. – Adeel May 07 '15 at 08:16
  • Thanks for your point. The power system data is available in the posted file. I used IEEE New England test system to run OPF on it. This test system contains, 39 Buses, 19 Loads,10 Generators, 46 Lines. @AdeelSabir – Masan May 07 '15 at 08:23
  • I personally have not used `fmincon`. But my suggestion is, if you can test a similar but smaller system, and then work your way up in steps. You can also remove some constraints, then sequentially add them, to single out the constraint that causes infeasibility. – Adeel May 07 '15 at 08:30
  • Thanks for your comment. I already added the constraints sequentially and also solved them as a nonlinear system using `fsolve` to see if the problem is feasible. I think the constraints are feasible. But when I put it in optimization (`fmincon`) problem it doesn't give the optimal solution. I am now very doubtful if I wrote the constraints correctly in my codes. I also have the same problem in GAMS and that works fine. I checked my script with GAMS and I can't understand why mine doesn't work. @AdeelSabir – Masan May 07 '15 at 08:39
  • I've had a similar experience using convex optimization. It sometimes depends on the solver too. A problem can be feasible under one solver and infeasible under another. The degree of feasibility also can differ with different solvers. If you are familiar with [YALMIP](http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Main.HomePage) you can choose from a variety of [solvers](http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Solvers.Solvers) to solve your problem. I personally found YALMIP to a be much more satisfying experience for convex optimization than MATLAB's default LMI toolbox. – Adeel May 07 '15 at 08:53
  • I am voting to close this question because 'review this MATLAB code' is highly specific to this particular situation, and is unlikely to be interesting to future readers. – Li-aung Yip May 07 '15 at 10:48
  • It is Nonlinear constrained optimization problem. But as I read matlab documentation,LMI toolbox is used for Linear problem @AdeelSabir – Masan May 07 '15 at 11:07
  • Thanks for your comment. But, it's an interesting phenomena for researcher who deals with constrained optimization. Anyway, would you propose a more related forum for this problem? @Li-aungYip – Masan May 07 '15 at 11:14
  • @Jamaisavenir My point being, your can try a different solver for your nonlinear constrained optimization, in MATLAB platform. YALMIP allows you to use many solvers. – Adeel May 07 '15 at 11:45
  • Thanks @AdeelSabir I have done that already, but it doesn't work. I guess I script the constraint wrong. But I don't know how to check it. – Masan May 07 '15 at 12:02

1 Answers1

1

Infeasibility in OPF is quite common, specially if the demand is high. If you are confident that your formulation is correct, you can remove the generator output constraints and use a small value for total demand (and each nodal demand as well). For lightly-loaded system (small demand), your nonlinear network equations are "almost linear" and they should not impose any problems if they are correct.

However, in your case there may be other issues, as you don't seem to be confident about your script correctness.

A good way to investigate what is the cause of infeasibility is relaxing all of your constraints with penalties and "slack" variables. That is, you add variables to each equality/inequality and associate a high cost coefficient to them in the objective function. Now, your problem is always feasible, even if the optimal solution does not actually satisfy your constraints. However, the optimal solution will contain information regarding which constraints could not be met, as the corresponding "slack" variable will be nonzero.

xuva
  • 435
  • 2
  • 13