I think you are correct that the VMAX=VMIN=VG constraint is probably too strict to be able to handle the range of load you are looking at (given the generator's Q limits). I suppose it is possible that a different (fixed) set of generator voltage set-points might result in feasibility over a larger range of loads. I suppose what you should do next really depends on the problem you are trying to solve. E.g. Can you just restrict the range of loads you are considering?
-- Ray Zimmerman Senior Research Associate 419A Warren Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 On Mar 14, 2013, at 1:19 PM, TANG Difei <[email protected]> wrote: > Dear Dr. Zimmerman, > > I think your method is correct, it is converged and the same results of > 'runopf' and 'runpf' can be got when I tried it with original > 'case24_ieee_rts' data . > However, when I use my own bus PD data, it can not converge. But, With the PD > increase, it began to converge. > So, I think maybe QD at each bus is the problem. I revised the QD to follow > the PD curve at each bus, but the situation even worse, the converge times is > even fewer. > What should I do next? Can you give me hint?I really can not figure out what > is wrong, maybe the constraint VMAX=VMIN=VG is too strict, because it > converged when I use 'runopf(my data)' with all default constraint. > > Thank you for your time to consider my question. > > Difei > 发件人: Ray Zimmerman <[email protected]> > 收件人: MATPOWER discussion forum <[email protected]> > 发送日期: 2013年3月14日, 星期四, 2:56 上午 > 主题: Re: new question about ref bus Pg when reduce and increase load > > Running an OPF with all generator costs set to zero essentially gives you an > arbitrary feasible solution to the problem, which could vary in arbitrary > ways from one run to another. I don't think this is probably what you want. > If you don't have actual generator costs, at least choosing them to be equal > and non-zero will minimize losses. > > Difei, I think your idea of removing constraints was close to what you want. > However, you can't remove all voltage constraints. MATPOWER's OPF allows > generator voltages to be redispatched within its limits as well as generator > power. Power flow, on the other hand, fixes generator voltages at a specified > set-point. What you probably want is to remove the voltage limits for the PQ > buses, and set VMIN=VMAX=VG for the generator buses. If you also remove the > line limits, then I think the output of runopf() will be equal to the output > of runpf() with the redispatched generators. > > You can try it to check … something like this … > > define_constants; > mpc.bus(, VMAX) = 2; % set VMAX of all buses to 2 > mpc.bus(:, VMIN) = 0; % set VMIN of all buses to 0 > gbus = find(mpc.bus(:, BUS_TYPE) == PV | mpc.bus(:, BUS_TYPE) == REF); % gen > buses > for i = gbus % for each generator bus > ig = find(mpc.gen(:, GEN_BUS) == mpc.bus(i, BUS_I), 1); % 1st gen at bus > mpc.bus(i, VMAX) = mpc.gen(ig, VG); > mpc.bus(i, VMIN) = mpc.gen(ig, VG); > end > mpc.branch(:, RATE_A) = 0; % set RATE_A of all branches to 0 > r1 = runopf(mpc); > r2 = runpf(r1); > > In this case, r1 and r2 should contain the same solution. > > -- > Ray Zimmerman > Senior Research Associate > 419A Warren Hall, Cornell University, Ithaca, NY 14853 > phone: (607) 255-9645 > > > > > On Mar 13, 2013, at 1:15 PM, iman <[email protected]> wrote: > >> Dear Difei, >> As far as I follow, you are trying to study the system without generation >> cost.If this is the case,please put the cost of generators equal to zero and >> runopf. Now Optimal power flow will be regardless of the price of the >> generation. >> Best regards >> Iman >> >> >> On Wed, Mar 13, 2013 at 5:08 PM, TANG Difei <[email protected]> wrote: >> Dear Dr. Zimmerman and Shiyang, >> >> Thank you again for the prompt reply. >> >> Yes. As Dr. Zimmerman said, to make the re-dispatch of generator more >> reasonable, running 'runopf' function is a good choice. >> I tried and here comes the problems. >> First, I run 'runopf' with all constraints, although all 24 runs converged, >> none of branch flows nor bus voltage became overload or drop. I noted this >> because my aim is to see how branch flow and bus voltage changes. So, I >> realized that the constraints are the reason. >> Then, to see how branch flow and bus voltage changes, I remove all the >> constraints except Pmax Pmin, Qmax Qmin and equality nonlinear constraints >> as follows: >> >> mpopt = mpoption('OPF_IGNORE_ANG_LIM', 1); % ingnore branch voltage angle >> difference limits >> mpc.bus(:, 12) = ones(24, 1) .* 2; % set VMAX of all buses to 2 >> mpc.bus(:, 13) = zeros(24, 1); % set VMIN of all buses to 0 >> mpc.branch(:, 6) = zeros(38, 1); % set RATE_A of all branches to 0 >> >> The results shows all bus voltage increase to 1.6~1.9 while branch 10 exceed >> flow_max. I realized that in this unconstrained situation, all unconstrained >> variables are adjusted to minimize the system gen cost, so the results are >> not reasonable. >> >> (1) In conclusion, if I want to see how branch flow and bus voltage changes >> due variable load, I must run 'runpf' rather than 'runopf', but I have to >> re-dispatch gens first. If I use 'runopf' to re-dispatch the gens, do I need >> to activate all constraints or not? >> >> (2) After the re-dispatch, I use the dispatched gens Pg instead of the >> original data to run 'runpf', is that reasonable? >> In my opinion, it is not because the system is power balanced when the >> optimal solution achieved. If I use the gen Pg from 'runopf' to run 'runpf', >> the results totally changes, eg. all the bus voltage no longer between 1.6 >> and 1.9, the system is then in a new power balance state, not the previous >> gen_cost minimization state. Please correct me if I am wrong. >> >> >> Thanks in advance. >> Difei >> >> >> 发件人: Ray Zimmerman <[email protected]> >> 收件人: MATPOWER discussion forum <[email protected]> >> 发送日期: 2013年3月13日, 星期三, 10:48 下午 >> 主题: Re: 回复:new question about ref bus Pg when reduce and increase load >> >> As Shiyang says, yes, it's ok to change the generator dispatches. In fact, >> as the load changes throughout the day, you will have to re-dispatch your >> generators to follow the load. There are many ways to re-dispatch the >> generators, and each option results in a different set of line flows and a >> different set of bus voltages. Simply re-running the PF without changing >> inputs means that the slack bus handles all of the redispatch to follow load >> (even if it has to absorb, rather than generate power) … probably not what >> you intend. >> >> My suggestion, if you want to have something that approximates typical >> operation, would be to choose some reasonable costs for the generators and >> then use runopf() to compute the dispatch based on minimizing generation >> cost. >> >> -- >> Ray Zimmerman >> Senior Research Associate >> 419A Warren Hall, Cornell University, Ithaca, NY 14853 >> phone: (607) 255-9645 >> >> >> >> >> On Mar 13, 2013, at 12:48 AM, [email protected] wrote: >> >>> Hi Difei, >>> (1). See (2). >>> (2). Yes, it is. >>> (3). Why not? It's authorized. But I think your question is on dispatching >>> when loads increase, not the base case defined in case file. >>> >>> Shiyang Li >>> >>> >>> ----- 原始邮件 ----- >>> 发件人:TANG Difei <[email protected]> >>> 收件人:MATPOWER discussion forum <[email protected]> >>> 主题:new question about ref bus Pg when reduce and increase load >>> 日期:2013年03月13日 11点16分 >>> >>> Dear all, >>> >>> Thank you for Dr. Zimmerman and Li Shiyang 's help about my previous >>> question. I appreciate it. >>> >>> Here is a new question about ref bus Pg reduce and increase load. >>> I use runpf function for the power flow calculation for variable load in 24 >>> hours. My aims is to see how branch flow and bus voltage change when the >>> bus load change. So, I revised the bus load data to classify the buses into >>> 3 types of load: residential, industrial and commercial, which means the >>> load at each bus is different from the original case data. Please be noted >>> that the load is changed but the generator output (Pg) is not changed. >>> Then, the problem comes. >>> Although all 24 PF calculations converged successfully, the Pg of ref bus >>> is negative when the system load is low in the morning, while the Pg of ref >>> bus is very high (much higher than other gen) when the system load is high >>> in the evening. This result can not reflect the real world power system >>> operation. I know the problem is from the Pg of ref bus must archive system >>> power balance. >>> (1)So, I want to know, how can I see the branch flow and bus voltage change >>> when all the generator Pg is between PMIN and PMAX? >>> (2)I refer to iman's thread about limits on the branch. >>> http://www.mail-archive.com/[email protected]/msg01475.html >>> Is it a good solution that I change the other generator Pg so the ref >>> bus Pg is kept in a reasonable scale? >>> (3) Is that OK if I change the original case data (bus load) to my own data? >>> >>> Thanks in advance. >>> >>> Difei >>> >>> >>> 发件人: Ray Zimmerman <[email protected]> >>> 收件人: MATPOWER Discussion List <[email protected]> >>> 发送日期: 2013年3月1日, 星期五, 5:04 上午 >>> 主题: Re: slack bus real power output (PG) is negative? >>> >>> (1) It depends what you mean by reasonable. Yes, this a perfectly >>> reasonable (i.e. correct) answer to this power flow problem. No, it is not >>> reasonable to operate this power system at this set-point, other generator >>> set-points should be reduced to make it feasible. >>> >>> (2) Again, it depends what you mean. What the result says, is that given >>> that network, under that loading condition, with those generator >>> set-points, you would need about 3 MW of load at that bus to achieve power >>> balance. >>> >>> (3) You should not expect flows to increase uniformly throughout the system >>> as you scale loads at all buses and generation only at the slack bus. Some >>> may increase, some may decrease, some may even switch direction. >>> >>> -- >>> Ray Zimmerman >>> Senior Research Associate >>> 419A Warren Hall, Cornell University, Ithaca, NY 14853 >>> phone: (607) 255-9645 >>> >>> >>> >>> >>> On Feb 28, 2013, at 10:02 AM, TANG Difei <[email protected]> wrote: >>> >>>> Dear all, >>>> >>>> I ran 'results=runpf('case24_ieee_rts')' and found that >>>> results.gen(12,2)==-2.9536 MW, which means the real power slack bus (Bus >>>> 13) is a negative value. >>>> (1) Is that result reasonable? >>>> (2) Can the slack bus with negative PG be looked as a load? >>>> By checking the previous thread, I knew that PG of slack bus = all loads + >>>> all losses - all other generator real power outputs >>>> >>>> In my opinion, it is not reasonable. For example, I used function >>>> 'scale_load' to scale all the real and reactive loads from 10% to 100% of >>>> original value (I did not scale the generator output), by using >>>> >>>> mpc = loadcase('case24_ieee_rts'); >>>> for i = 1 : 10 >>>> multiple = i/10; >>>> mpc_m(i) = mpc; >>>> mpc_m(i).bus = scale_load(multiple, mpc_m(i).bus); >>>> [results_m(i), success_m(i)] = runpf(mpc_m(i)); >>>> end >>>> >>>> Then, I found that, for example, in the scenario of the multiple value >>>> from 0.1 to 1, the real power injected at "to" bus end (PT) of Branch 1 >>>> is reduced from 25.2679 MW to 11.9363 MW, and the PG of slack increase >>>> from -2322 MW to -2.9536 MW , which is not reasonable, because with the >>>> loads increase from 0.1 to 1, the power of each branch will increase too. >>>> (3) Am I correct? >>>> >>>> Any advice from anyone will be very much appreciated. >>>> >>>> >>>> Best wishes, >>>> Difei Tang >>> >>> >>> >> >> >> >> >> >> >> -- >> Best regards >> Iman > > >
