I see, I think I should had checked that before accessing the mailing list.
You example work perfectly. From: <[email protected]<mailto:[email protected]>> on behalf of Ray Zimmerman <[email protected]<mailto:[email protected]>> Reply-To: MATPOWER discussion forum <[email protected]<mailto:[email protected]>> Date: Friday, 8 July 2016 3:55 am To: MATPOWER discussion forum <[email protected]<mailto:[email protected]>> Subject: Re: Replacing constant power with constant impedance loads The problem is that case14 already includes a non-zero BS for one of the buses in the original data, so you have to add your constant impedance load to what is already there. Try this … define_constants opt = mpoption('out.all' , 0, 'verbose', 2); solved = runpf(case14(), opt); solved2 = solved; solved2.bus(:,GS) = solved2.bus(:,GS) + solved.bus(:, PD)./ (solved.bus(:, VM).^2); solved2.bus(:,BS) = solved2.bus(:,BS) - solved.bus(:, QD)./ (solved.bus(:, VM).^2); solved2.bus(:,PD) = 0; solved2.bus(:,QD) = 0; solved2 = runpf(solved2, opt); norm(solved.bus(:, VM)-solved2.bus(:, VM)) You may also want to look at the experimental options for ZIP load handling in MATPOWER 6, namely exp.sys_wide_zip_loads.pw and exp.sys_wide_zip_loads.pw. For example … solved = runpf(case14(), opt); total_load(solved, 'all', [], opt) solved2 = solved; solved2.bus(:,PD) = solved.bus(:, PD) ./ (solved.bus(:, VM).^2); solved2.bus(:,QD) = solved.bus(:, QD) ./ (solved.bus(:, VM).^2); opt = mpoption(opt, 'exp.sys_wide_zip_loads.pw', [0 0 1], 'exp.sys_wide_zip_loads.qw', [0 0 1]); solved2 = runpf(solved2, opt); total_load(solved2, 'all', [], opt) One advantage to doing it this way is that it’s still listed as “load” in the output. Ray On Jul 6, 2016, at 10:49 PM, Georgiadis Dionysios <[email protected]<mailto:[email protected]>> wrote: I see, subtle point but it is my fault for not noticing in the documentation. Thank you. Still however, the issue persists. Here is a minimal ingredients example: opt = mpoption('out.all' , 0); solved = runpf(case14(), opt); solved2 = solved; solved2.bus(:,GS) = solved.bus(:, PD)./ (solved.bus(:, VM).^2); solved2.bus(:,BS) = -solved.bus(:, QD)./ (solved.bus(:, VM).^2); solved2.bus(:,PD) = solved2.bus(:,PD).*0; solved2.bus(:,QD) = solved2.bus(:,QD).*0; solved2 = runpf(solved2, opt); norm(solved.bus(:, VM)-solved2.bus(:, VM)) One may notice not only that the solver iterates but also that the norm in the final row is nonzero, proving that a new solution is obtained (which is slightly different). From: <[email protected]<mailto:[email protected]>> on behalf of Jose Luis Marín <[email protected]<mailto:[email protected]>> Reply-To: MATPOWER discussion forum <[email protected]<mailto:[email protected]>> Date: Wednesday, 6 July 2016 6:57 pm To: MATPOWER discussion forum <[email protected]<mailto:[email protected]>> Subject: Re: Replacing constant power with constant impedance loads I think that you have to invert the sign of QD. From http://www.pserc.cornell.edu//matpower/docs/ref/matpower6.0b1/idx_bus.html: columns 1-13 must be included in input matrix (in case file) 1 BUS_I bus number (positive integer) 2 BUS_TYPE bus type (1 = PQ, 2 = PV, 3 = ref, 4 = isolated) 3 PD Pd, real power demand (MW) 4 QD Qd, reactive power demand (MVAr) 5 GS Gs, shunt conductance (MW demanded at V = 1.0 p.u.) 6 BS Bs, shunt susceptance (MVAr injected at V = 1.0 p.u.) 7 BUS_AREA area number, (positive integer) 8 VM Vm, voltage magnitude (p.u.) 9 VA Va, voltage angle (degrees) 10 BASE_KV baseKV, base voltage (kV) 11 ZONE zone, loss zone (positive integer) 12 VMAX maxVm, maximum voltage magnitude (p.u.) 13 VMIN minVm, minimum voltage magnitude (p.u.) -- Jose L. Marin Grupo AIA 2016-07-06 12:07 GMT+02:00 Georgiadis Dionysios <[email protected]<mailto:[email protected]>>: Dear all, After some quick calculations one can see that it is possible to replace a constant power load with a constant impedance load of exactly equal power consumption. Here is an example, say bus 1 absorbs S1 MVAs under V1 volts. Bus 1 is constant power. This would be equal to a constant impedance load, with impedance conjugate(Z1) = (Vn/V1)^2 * S1, where Vn is the nominal voltage. Thus, we can set the PD and QD entries of the case to zero, and replace them with the right values for GS and BS. Specifically, after solving a case with all constant power loads we will obtain the Vm vector (voltage amplitudes) and the Pd and Qd vectors. Then, we can set all PD and QD values to zero and place (1/Vm).^2 * Pd and (1/Vm).^2 * Qd in the GS and BS columns respectively. >From my understanding the output should be exactly the same. The solved case >should remain a perfectly good solution to the PF equations. Yet, when I do >so, the solver iterates. Can someone shed light on this? I apologise if I am asking the question in the wrong place. Best regards, Dionysios Georgiadis
