Exactly. As I said, it’s because you have no degrees of freedom in the problem. 
That is, in a radial system like this with a single generator, the feasible 
region of the OPF consists of a single point, the power flow solution. If you 
want to improve voltage, you have to give it something it can control.

   Ray


On Nov 19, 2020, at 5:27 AM, Adjifack Nelson 
<[email protected]<mailto:[email protected]>> wrote:


Morning
Thanks for your reply. I was actually trying to improve voltage profile by 
minimizing the difference of each node voltage from the reference voltage 
(sum(1-V(i)). I did not work at all. No change was observed relative to the 
node voltage.
nice day to every one

Le mercredi 18 novembre 2020 à 18:16:56 UTC+1, Ray Daniel Zimmerman 
<[email protected]<mailto:[email protected]>> a écrit :


The easiest way to add the cost you want is by using direct specification of 
legacy costs as described in Sections 6.3.3 and 7.1.3 in the User’s 
Manual<https://matpower.org/docs/MATPOWER-manual-7.1.pdf>.

Something like …

define_constants;
mpc = loadcase('case33bw');
%         -----Va------  ----Vm---  ---Pg---Qg---
mpc.N = [ sparse(33,33)  speye(33)  sparse(33, 2) ];
mpc.Cw = ones(33, 1);
%                           d  rhat k   m
mpc.fparm = ones(33, 1) * [ 1   1   0   1];
mpc.gencost(:, COST:COST+2) = 0;    % zero out generator cost
r = runopf(mpc, mpopt);

I should also mention two other things:

  *   On a system with a single generator like this one, there are really no 
available degrees of freedom for doing any dispatch optimization, so changing 
the cost function may change the objective function value, but it will not 
affect the dispatch.
  *   I suspect you actually want to minimize the square of the voltage 
deviations from 1 (set d to 2), or at least minimize the negative of the cost 
you indicate (set m to –10. Minimizing sum(v(i)-1) actually maximizes the 
deviations of voltage from 1.

— Ray


On Nov 16, 2020, at 11:47 AM, Adjifack Nelson 
<[email protected]<mailto:[email protected]>> wrote:

Good morning every body
I am trying to add a cost function to opf flow model minimizing voltage 
difference. The added cost function is of the form sum(v(i)-1). I have tried to 
impletent it using add_quad_cost but i have errors. I have included an image of 
my matlab work space showing the error. With Q=[], c=-ones(33,1) and 
k=ones(33,1).
Best regards
<Cap1.PNG>



Reply via email to