Thanks but i got just new problem..
*define_constants;*
*mpc=loadcase(case14);*
*mpc.gen(8,PV)=PQ;*
*mpc.gen(8,QG)=50;*
*rslt=runpf(mpc);*
and they are showing the following error:
Subscript indices must either be real positive integers or logicals.
Error in ext2int (line 175)
gs = ( mpc.gen(:, GEN_STATUS) > 0 & ... %% gen status
Error in runpf (line 131)
mpc = ext2int(mpc);
what is the wrong here going on ??
On Wed, Aug 17, 2016 at 7:54 PM, Ray Zimmerman <[email protected]> wrote:
> define_constants;
> mpc.bus(BUS_NO, BUS_TYPE) = PQ;
>
>
>
> On Aug 17, 2016, at 9:47 AM, siddique tomal <[email protected]>
> wrote:
>
> Thank you Sir but still having problem.
> For setting a bus as a PQ bus i command the following:
>
> *mpc.gen(BUS_NO,GEN_STATUS)= 1;*
>
> is that command is correct for assigning a bus as a PQ?
> if so then i also have tried with that command like following:
>
> *define_constants;*
> *mpc=loadcase(case14);*
> *mpc.gen(BUS_NO,GEN_STATUS)=1;*
> *mpc.gen(BUS_NO,QG)=45;*
> *result=runpf(mpc);*
>
> but still no change..
>
> On Wed, Aug 17, 2016 at 7:35 PM, Ray Zimmerman <[email protected]> wrote:
>
>> When running a power flow, the reactive injection of a generator at a PV
>> bus is an *output*, solved by the power flow, not an input. If you want
>> to set the reactive power injection as an input you have to make the bus a
>> PQ bus and allow the voltage to deviate from the setpoint.
>>
>> Ray
>>
>>
>> On Aug 16, 2016, at 8:48 PM, siddique tomal <[email protected]>
>> wrote:
>>
>> Dear Sir,
>> *define_constants;*
>> *mpc=loadcase(case14);*
>> *mpc.gen(BUS_NO,QG)=45;*
>> *result=runpf(mpc);*
>>
>> After running this whenever i run the command
>> *losses=sum(real(get_losses(result)))* it just shows the same result
>> of power losses as before injecting the reactive power.
>>
>> What's the problem here i'm missing? Please need your help.
>>
>>
>>
>
>