Ask Your Question
1

Mvar Annotation on diagram view

asked 2016-10-13 01:47:54 -0600

ays gravatar image

updated 2016-10-13 01:49:10 -0600

Hello,

I want to made report for Mvar generation from a single or multiple Capacitor (Fixed or Switched Shunt) at some bus show on digram .sld view. I tried use summation text "BL,+,110" only show bus load, and also when using "GN,+,110" it is not working since the bus code is 1, change bus code to 2, still not working. When using report node with pssgrpg.pyc there are only option to showing total result of system, area, and zone.

Please help me how to create the python script to show the Mvar of capacitor on sld view.

Thanks, ays

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2016-10-20 12:44:48 -0600

perolofl gravatar image

updated 2016-10-21 01:13:30 -0600

The following script shows two functions that can be used to show the nominal reactive power for fixed and switched shunts respectively in Slider diagrams.

import psspy

def fixshuntq(ibus,id,string='NOM',unit='Mvar'):
    ierr, cmpval = psspy.fxsdt2(ibus, id ,string)
    if ierr>0: return 'Error %s: fixed shunt %s at bus %s' % (ierr,id,ibus)
    return str(round(cmpval.imag,1))+' '+unit

def swshuntb(ibus,string='BINIT',unit='Mvar'):
    ierr, rval = psspy.swsdt1(ibus,string)
    if ierr>0: return 'Error %s: switched shunt at bus %s' % (ierr,ibus)
    return str(round(rval,1))+' '+unit

If the script is called "owngrpg.py" the function to show the fixed capacitor is called in the following way: image description

Here the first two arguments defining the bus number and shunt id are entered, while the rest keep their default values. This writes the nominal value of the shunt to the diagram.

It is the same principle for a switched shunt (function swshuntb), but here only the bus number is given as argument.

The arguments string and unit make it possible to write any other quantity returned by fxsdt2 or swshuntb.

EDIT: The total shunt contribution at a bus is written with the following function:

import psspy

def busshunt(ibus):
    ierr = psspy.inifxs(ibus)
    totq = 0.
    while True:
        ierr, id = psspy.nxtfxs(ibus)
        if ierr>0: break
        ierr, cmpval = psspy.fxsdt2(ibus, id ,'ACT')
        totq += -cmpval.imag
    ierr, binit = psspy.swsdt1(ibus,'BINIT')
    if ierr==0: 
        ierr, vpu = psspy.busdat(ibus ,'PU')
        totq += binit*vpu**2
    return str(round(totq,1))+' Mvar'

Here capacitors are written as positive reactive power. Change in code if you want opposite sign.

edit flag offensive delete link more

Comments

Thanks so much perolofl to show the way how to customize the report respectively to slider diagram. There are some issue, in those script it show the nominal install capacity of fixed and switched shunt, what I need is the summation value of generating MVAr of fixed and switched shunt. Continue...

ays gravatar imageays ( 2016-10-20 21:35:22 -0600 )edit

If possible, the python arguments can work as like as on summation label, so I can get the summation of reactive power generation (fixed and switched) from some bus.

ays gravatar imageays ( 2016-10-20 21:41:46 -0600 )edit

For a fixed capacitor use argument 'ACT' to get the actual shunt generation. A new function has been written to return the total of the bus (fixed shunts + switched shunt), see my answer above.

perolofl gravatar imageperolofl ( 2016-10-20 23:09:24 -0600 )edit

Thanks, it works :)

ays gravatar imageays ( 2016-10-21 02:30:38 -0600 )edit
0

answered 2016-10-19 23:25:43 -0600

Rahul gravatar image

Hello ays, There seems to be no option for summation of Mvar in the *.sld file in Summation label. Several other things are missing for complete reporting purpose. We had raised this matter in the UGM in India in 2015. PTI is of opinion that the purpose of this SLD file is not reporting, rather for ease of simulation. For reporting other options are available. Still, you could give a feedback to PTI on their website through the web query (fastest means of resolving a query).

edit flag offensive delete link more

Comments

Indeed there is an option for summation of Mvar in the Summation label. It is just to check box "Sum reactive power".

perolofl gravatar imageperolofl ( 2016-10-20 12:09:49 -0600 )edit

Thanks @perolofl for pointing this out. Really appreciate.

Rahul gravatar imageRahul ( 2016-10-21 05:08:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2016-10-13 01:47:54 -0600

Seen: 2,281 times

Last updated: Oct 21 '16