First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

How to get the system frequency? in the following code I get only voltage and frequency error. File ".\psspy.py", line 49525, in busdat psspy.BusdatError: busdat Error: ierr=2

asked Apr 6 '3

Ibrahim gravatar image

updated Apr 6 '3

jconto gravatar image

Hi everyone, I want to get the system frequency, but in the following code I get only voltage and frequency error.

import os, sys 
# Set environment for psse33.04
PYTHONPATH = r'C:\Program Files (x86)\PTI\PSSE33\PSSBIN'
sys.path.append(PYTHONPATH)
os.environ['PATH'] += ';' + PYTHONPATH
import psspy

# Get the system voltage    
ierr,voltage = psspy.busdat(2,'KV')

# Get the system frequency
ierr,freq = psspy.busdat(2,'FREQ')

File ".\psspy.py", line 49525, in busdat psspy.BusdatError: busdat Error: ierr=2

1 answer

Sort by » oldest newest most voted
0

answered Apr 6 '3

perolofl gravatar image

API BUSDAT only returns load flow data. Frequency is not a parameter in load flow studies. Error code 2 means: "Bad value of 'STRING'; 'RVAL' unchanged", i.e. 'FREQ' is not an allowed argument to BUSDAT.

In dynamics, the bus frequency (in pu speed deviation) is seen in a bus frequency channel.

link

Comments

I want to get the system frequency. What command should I use? Thank you!

Ibrahim gravatar imageIbrahim (Apr 6 '3)

Do you mean if the case is in 50 or 60 Hz option?

perolofl gravatar imageperolofl (Apr 6 '3)

In dynamic simulation, I want to get the system frequency after run dynamics 5s. And print frequency.

Ibrahim gravatar imageIbrahim (Apr 6 '3)

There is nothing called "system frequency". You get the speed deviation for individual generator rotors and for buses, using channels.

perolofl gravatar imageperolofl (Apr 6 '3)

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: Apr 6 '3

Seen: 286 times

Last updated: Apr 06 '23