Ask Your Question
0

Voltage Check Report to Excel

asked Feb 22 '18

PSSE_ABCD gravatar image

Hi All

Does anyone have a python script which extracts the buses and their voltages which are outside +/- 5% and exports them to excel after doing a load flow?

Thanks

2 answers

Sort by » oldest newest most voted
0

answered Feb 22 '18

Ali gravatar image

updated Feb 22 '18

Something like this does the job. After calling this function, write the following line: volviol.to_csv('voltage.csv') and that should do it.

 def voltages_csv():
    # get a dataframe of all buses and their voltages; you need to write this function
    allBusData = AllBuses()
    volviol = []
    for index, iBus in allBusData.iterrows():
        busPu = iBus['pu']
        if not (0.95 <= busPu <= 1.05):
            volviol.append(iBus)
    volviolDF = pd.DataFrame(data=volviol)
    return volviolDF
link
0

answered Feb 22 '18

user99 gravatar image

You can record the functionality using PSSE GUI and then modify it for your case.

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Feb 22 '18

Seen: 554 times

Last updated: Feb 22 '18