Ask Your Question

amaity's profile - activity

2023-08-03 08:34:23 -0500 received badge  Nice Question (source)
2018-01-25 14:50:49 -0500 received badge  Good Answer (source)
2016-04-11 00:26:44 -0500 marked best answer Will this generate a QV curve?

Hi All!

Please correct/improve this QV curve generating script.

# PSS/E Saved case
CASE = r"C:\Program Files\PTI\PSSE32\EXAMPLE\12TH_PLAN_MAR_2017R1.sav"
psspy.psseinit(12000)
psspy.case(CASE)

def getdata(subsystem_data):
    ierr, values = subsystem_data
    return zip(*values)

#--------------------------------
ierr = psspy.bsys(sid=1, numzone=1, zones=[44])
buses = reduce(tuple.__add__, getdata(psspy.abusint(sid=1, string="NUMBER")))
buskv = reduce(tuple.__add__, getdata(psspy.abusreal(sid=1, string="BASE")))
#print zip(buses, buskv)
selected_buses = []
for bus, voltage in zip(buses, buskv):
    if voltage > 100.0:
        selected_buses.append((bus))
print selected_buses

busno = 44999 # Fictitious generator bus
genid = 1
status = 1
pgen = 0.0 # Fict gen P output
Qlimit = 9999.0 # Fict. gen Q limit
pmax = 0.0 # Fict gen P limit
ireg = 44106 # Regulated bus for which QV curve is to be determined

def add_machine():
    psspy.plant_data(busno, intgar1=ireg)
    psspy.machine_data_2(
        busno,
        str(genid),
        [int(status), 1, 0, 0, 0, 0],
        [pgen, 0.0,
        Qlimit,
        -Qlimit,
        pmax, 0.0, 100.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])
    return

def get_mvar(i):
    psspy.plant_data(busno, realar1=i)
    psspy.solution_parameters_3(intgar2=60)
    ierr = psspy.fnsl()
    mvar = psspy.macdat(busno, str(genid), 'Q')
    return mvar[1]

psspy.bus_data_2(busno, intgar1=2, name='TEST')
psspy.branch_data(i=busno, j=ireg)
add_machine()

import numpy as np
import matplotlib.pyplot as plt
pu = [x for x in np.arange(.8, 1.2, .05)]
varlist = [get_mvar(v) for v in pu]
print varlist
plt.plot(pu, varlist, '-o')
plt.xlabel('PU')
plt.ylabel('MVar')
plt.grid()
plt.show()
2016-04-11 00:25:53 -0500 marked best answer How do you determine the line constants for entering the 'branch' details?

Here is a back to basics question. Let me know if this seems irrelevant in which case I will withdraw it. How do you determine the line constants? Do you determine them using your own scripts or use the TLC module built into psse? Is the conductor database in TLC adequate for your needs or do you use your own database?

2015-09-12 17:16:30 -0500 received badge  Famous Question (source)
2015-04-15 16:55:30 -0500 received badge  Famous Question (source)
2015-04-10 08:38:16 -0500 received badge  Nice Question (source)
2014-12-30 07:36:14 -0500 answered a question How to Model 3 windings transformer

This link should be able to tell you all that you are looking for. I wouldn't be able to explain it better than this even if I tried.

2014-12-07 19:04:14 -0500 commented question what is the difference between the connection code CC=2 and CC=17 for a three winding transformer?

Can you give us the transformer data? Perhaps I could plug it into my system and see why PSSE crashes.

2014-11-04 10:15:02 -0500 commented answer Contingency commands for file .con?

Umm ..... I guess I have missed something in the psse manual. Hey folks, is there something in the manual that says that automatic contingencies (like SINGLE LINE FROM ...) cannot be mixed with single event contingencies (like TRIP BRANCH FROM ...) ???

2014-11-04 09:44:47 -0500 commented answer Contingency commands for file .con?

I am having problems running a con file with the following contingencies in one grouping: REMOVE UNIT 1 FROM BUS 101, SINGLE BRANCH FROM BUS 101, END, END. The psse output says there is a problem at SINGLE. What am I doing wrong??

2014-11-04 02:15:39 -0500 received badge  Nice Answer (source)
2014-11-03 20:04:59 -0500 commented answer Contingency commands for file .con?

Hi @Eli Pack, can we mix individual trips/disconnects/remove with an automatic outage in one contingency group?

2014-09-05 12:07:13 -0500 commented answer Move buses in slider diagrams

What are the names of the example files?

2014-09-05 10:34:32 -0500 commented answer Move buses in slider diagrams

No, your link doesn't work.

2014-09-04 20:01:33 -0500 commented answer Move buses in slider diagrams

A pyd extension means it's probably a dll file. So how are you using it ??? Can you share the documentation and the example files?

2014-08-27 02:52:04 -0500 received badge  Good Answer (source)
2014-08-26 10:11:10 -0500 commented answer Can you tell if a branch is a transformer or non-transformer based on "fromBus", "toBus" info?

Not at all. I don't think you need to register to access the public folders in github. Folks correct me if I am wrong. How you can adapt the function for your needs has been explained in the function description. Just plug 'trn' or 'brn' in place of 'bus'. HTH.

2014-08-26 00:22:00 -0500 received badge  Nice Answer (source)
2014-08-25 20:01:21 -0500 answered a question Can you tell if a branch is a transformer or non-transformer based on "fromBus", "toBus" info?

Use the subsystem_info function described here. The full listing is available here. This little function saves you the bother of distinguishing lines from transformers. This is how I use it:

branchinfo = subsystem_info('brn', ['FROMNUMBER', 'TONUMBER', 'MVA', 'P'], sid=1)
#print branchinfo
trfinfo = subsystem_info('trn', ['FROMNUMBER', 'TONUMBER', 'MVA', 'P'], sid=1)
#print trfinfo

Hope that helps.

2014-08-25 09:36:01 -0500 commented answer Move buses in slider diagrams

Which version of PSSE is this in and in what directory? I can't find it my PSSE v33.5 install directory.

2014-06-15 08:16:23 -0500 commented answer how to calculate the Jacobian of the system from python using PSSE . thanks a lot

What is the API for extracting the admittance matrix?

2014-05-27 19:49:31 -0500 answered a question modeling exciter

Actually there is a module called the Graphical Model Builder. Look here.

2014-02-21 12:39:38 -0500 received badge  Nice Answer (source)
2014-01-19 19:28:58 -0500 answered a question Can someone please share the IEEE 9 bus system data, including generator and load data.

I think this is what you are looking for:

image description

2013-11-27 19:36:41 -0500 commented answer How to test Buses for Over-Voltage in Dynamic Simulation

@rich how are you doing this? Have you written a script for this kind of dynamic study?

2013-11-06 22:29:30 -0500 received badge  Notable Question (source)