Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to interrupt loads below a given bus voltage threshold in PSS\E using python

How can I interrupt loads a bus when the voltage is below a given threshold in PSS\E using python during dynamic simulations? Below is a sample of the code that I am trying to develop. Let me know if there’s a better way to do it or how I can make this code to work.

Check the bus voltages that are higher than 1.1 p.u and lower than 0.9 p.u

psspy.set_vltscn(1,1.1,0.9)

Run a command which interrupts loads if the voltage is below 0.9 p.u by changing the status of the load model from in service to out of service

for n in range(1,20): # list of bus numbers if psspy.setvltscn(1,1.1,0.9) < 0.8: # if voltage is below 0.8 psspy.ldmodstatus2(i,'id',1,0) # interrupt load at that bus. Where i is bus number, 'id' is the load identifier, 1 is the load model type and 0 is the new model status indicating out of service

Run to 10 seconds

psspy.run(0,10,1000,1,0)

Halt pss\e

psspy.pssehalt_2()

click to hide/show revision 2
No.2 Revision

How to interrupt loads below a given bus voltage threshold in PSS\E using python

How can I interrupt loads a bus when the voltage is below a given threshold in PSS\E using python during dynamic simulations? Below is a sample of the code that I am trying to develop. Let me know if there’s a better way to do it or how I can make this code to work.

Check
#Check the bus voltages that are higher than 1.1 p.u and lower than 0.9 p.u

psspy.set_vltscn(1,1.1,0.9)

Run p.u psspy.set_vltscn(1,1.1,0.9) #Run a command which interrupts loads if the voltage is below 0.9 p.u by changing the status of the load model from in service to out of service

service for n in range(1,20): # list of bus numbers if psspy.setvltscn(1,1.1,0.9) psspy.set_vltscn(1,1.1,0.9) < 0.8: # if voltage is below 0.8 psspy.ldmodstatus2(i,'id',1,0) psspy.ldmod_status2(i,'id',1,0) # interrupt load at that bus. Where i is bus number, 'id' is the load identifier, 1 is the load model type and 0 is the new model status indicating out of service

Run service #Run to 10 seconds

psspy.run(0,10,1000,1,0)

seconds psspy.run(0,10,1000,1,0) # Halt pss\e

psspy.pssehalt_2()

pss\e psspy.pssehalt_2()

How to interrupt loads below a given bus voltage threshold in PSS\E using python

How can I interrupt loads at a bus when the voltage is below a given threshold in PSS\E using python during dynamic simulations? Below is a sample of the code that I am trying to develop. Let me know if there’s a better way to do it or how I can make this code to work.

#Check the bus voltages that are higher than 1.1 p.u and lower than 0.9 p.u
psspy.set_vltscn(1,1.1,0.9)

#Run a command which interrupts loads if the voltage is below 0.9 p.u by changing the status of the load model from in service to out of service
for n in range(1,20):  # list of bus numbers
if psspy.set_vltscn(1,1.1,0.9) < 0.8: # if voltage is below 0.8
0.9: # if voltage is below 0.9
   psspy.ldmod_status2(i,'id',1,0)   # interrupt load at that bus. Where i is bus number, 'id' is the load identifier, 1 is the load model type and 0 is the new model status indicating out of service

#Run to 10 seconds
psspy.run(0,10,1000,1,0)

# Halt pss\e
psspy.pssehalt_2()

How to interrupt loads below a given bus voltage threshold in PSS\E using python

How can I interrupt loads at a bus when the voltage is below a given threshold in PSS\E using python during dynamic simulations? The load is then reconnected back after a certain period of time. Below is a sample of the code that I am trying to develop. Let me know if there’s a better way to do it or how I can make this code to work.

#Check the bus voltages that are higher than 1.1 p.u and lower than 0.9 p.u
psspy.set_vltscn(1,1.1,0.9)

#Run a command which interrupts loads if the voltage is below 0.9 p.u by changing the status of the load model from in service to out of service
for n in range(1,20):  # list of bus numbers
if psspy.set_vltscn(1,1.1,0.9) < 0.9: # if voltage is below 0.9
   psspy.ldmod_status2(i,'id',1,0)   # interrupt load at that bus. Where i is bus number, 'id' is the load identifier, 1 is the load model type and 0 is the new model status indicating out of service

#Run to 1 seconds
psspy.run(0,1,1000,1,0)

#Reconnect the after a certain period of time (1 sec in this case)
psspy.ldmod_status2(i,'id',1,1)

#Run to 10 seconds psspy.run(0,10,1000,1,0) psspy.run(0,10,1000,1,0)

# Halt pss\e
psspy.pssehalt_2()

How to interrupt loads below a given bus voltage threshold in PSS\E using python

How can I interrupt loads at a bus when the voltage is below a given threshold in PSS\E using python during dynamic simulations? The load is then reconnected back after a certain period of time. Below is a sample of the code that I am trying to develop. Let me know if there’s a better way to do it or how I can make this code to work.

#Check the bus voltages that are higher than 1.1 p.u and lower than 0.9 p.u
psspy.set_vltscn(1,1.1,0.9)

#Run a command which interrupts loads if the voltage is below 0.9 p.u by changing the status of the load model from in service to out of service
for n in range(1,20):  # list of bus numbers
if psspy.set_vltscn(1,1.1,0.9) < 0.9: # if voltage is below 0.9
   psspy.ldmod_status2(i,'id',1,0)   # interrupt load at that bus. Where i is bus number, 'id' is the load identifier, 1 is the load model type and 0 is the new model status indicating out of service

#Run to 1 seconds
psspy.run(0,1,1000,1,0)

#Reconnect the load after a certain period of time (1 sec in this case)
psspy.ldmod_status2(i,'id',1,1)

#Run to 10 seconds psspy.run(0,10,1000,1,0)

# Halt pss\e
psspy.pssehalt_2()

How to interrupt loads below a given bus voltage threshold in PSS\E using python

How can I interrupt loads at a bus when the voltage is below a given threshold in PSS\E using python during dynamic simulations? The load is then reconnected back after a certain period of time. Below is a sample of the code that I am trying to develop. Let me know if there’s a better way to do it or how I can make this code to work.

#Check the bus voltages that are higher than 1.1 p.u and lower than 0.9 p.u
psspy.set_vltscn(1,1.1,0.9)

#Run a command which interrupts loads if the voltage is below 0.9 p.u by changing the status of the load model from in service to out of service
for n in range(1,20):  # list of bus numbers
if psspy.set_vltscn(1,1.1,0.9) < 0.9: # if voltage is below 0.9
   psspy.ldmod_status2(i,'id',1,0)   # interrupt load at that bus. Where i is bus number, 'id' is the load identifier, 1 is the load model type and 0 is the new model status indicating out of service

#Run to 1 seconds
second
psspy.run(0,1,1000,1,0)

#Reconnect the load after a certain period of time (1 sec in this case)
psspy.ldmod_status2(i,'id',1,1)

#Run to 10 seconds psspy.run(0,10,1000,1,0)

psspy.run(0,10,1000,1,0)

 # Halt pss\e
 psspy.pssehalt_2()