Dear professor Ray,
I eliminated the branch flow limits but still the solution didn't converge.
also I checked the mpc values and the limits it seems ok. In addition, I
tried to change some of the limits but still did not work
I attached my data in case that may be helpful to find the problem.
On Tue, Jan 5, 2016 at 1:30 PM, Ray Zimmerman <[email protected]> wrote:
> There are many possible reasons for a non-convergent OPF. One of the first
> things I always try is to eliminate the branch flow limits. E.g.
>
> define_constants;
> mpc= loadcase ('WECC179_3Area.mat');.
> mpopt = mpoption('out.lim.all',2)
> mpc.branch(:, RATE_A) = 0;
> results = runopf(mpc, mpopt);
>
> If that converges, then you likely have an infeasible problem, where some
> branch flow limit can’t be satisfied without violating something else. In
> that case, you can try multiplying the limits by some large factor that you
> gradually reduce toward 1 and observe which constraints (including voltage,
> reactive generation) bind hardest. They may show you which are your
> conflicting constraints.
>
> Hope these ideas help point you in the right direction ...
>
> Ray
>
>
> On Jan 5, 2016, at 12:42 PM, Alanazi, Falah <[email protected]>
> wrote:
>
> Dear Ray,
>
> I was running AC PF and it was working but when I tried to run AC OPF the
> solution did not converge.
> This is my code.
>
> define_constants;
> mpc= loadcase ('WECC179_3Area.mat');.
> mpopt = mpoption('out.lim.all',2)
> results = runopf(mpc, mpopt);
>
> best regards
>
> Falah
>
>
>
>
> On Tue, Jan 5, 2016 at 5:40 AM, Ray Zimmerman <[email protected]> wrote:
>
>> The options you are using should work when running an AC OPF. Is that
>> what you are running?
>>
>> Two other notes, regarding your options …
>> 1. The ENFORCE_Q_LIMS option is only for power flow, not OPF, and that
>> the VERBOSE option only affects display of solution progress, not final
>> results.
>> 2. You are mixing old-style option names (all caps) in your first line,
>> with new-style options in the second. This still works, but the old-style
>> options are deprecated. The new versions of ENFORCE_Q_LIMS and VERBOSE
>> are pf.enforce_q_lims and verbose, respectively.
>>
>> — Ray
>>
>>
>>
>> On Jan 4, 2016, at 5:09 PM, Alanazi, Falah <[email protected]>
>> wrote:
>>
>> Dear Sir,
>>
>> I would like to know how I can show the voltage constraints and the
>> branch flow constraints when I run OPF.
>>
>> When I used the matpower cases both constraints showes up but when I
>> used the WECC data they do not show up. I tried to use
>>
>> mpopt = mpoption('ENFORCE_Q_LIMS',0,'VERBOSE',3);
>> mpopt = mpoption(mpopt,'out.lim.all',2)
>>
>> best regards
>>
>> Falah
>>
>>
>>
>
>
% Power Flow for WECC 179-bus System
%
% Created by: Douglas Halamay
% Modified: May 15, 2011
tic;
clc;
home;
clear;
close all;
format short;
% Import WECC 179-bus data
% (divided into three areas - North, Central, West)
% load WECC179.mat;
load WECC179_3Area.mat;
% Define constants that will come in handy later
define_constants;
% We can scale the load by using the scale_load function included with
% MATPOWER
% opt = struct('pq', 'P');
% mpc.bus = scale_load(1.05, mpc.bus, [], [], opt);
% %
% % % We can also turn branches (t-lines/transformers) off (0) and on (1)
% mpc.branch(82,BR_STATUS) = 1;
% Set up MATPOWER options:
% - Enforce Q Limits
% - Suppress output
mpopt = mpoption('ENFORCE_Q_LIMS',0,'VERBOSE',0);
% Run AC Power Flow (Newton's Method)
[results,success] = runpf(mpc,mpopt,'WECC179ResultsQ.txt');
% If successful, check for line rating violations (these are based off the
% apparent power, so we must compute this and then check BOTH ends of the
% line to make sure that we aren't violating the limits)
if (success)
% Form a vector of violated branches
branchviols =
find(((sqrt(results.branch(:,14).^2+results.branch(:,15).^2)>=results.branch(:,6))|...
(sqrt(results.branch(:,16).^2+results.branch(:,17).^2)>=results.branch(:,6)))~=0);
% Check to see if it is empty
if(isempty(branchviols))
disp('Success');
else
% If not, display the violated lines
disp(branchviols);
end
end
toc;