First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version | asked 2014-06-04 05:37:51 -0500 Anonymous |
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.
psspy.set_vltscn(1,1.1,0.9)
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
psspy.run(0,10,1000,1,0)
psspy.pssehalt_2()
2 | No.2 Revision |
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 psspy.set_vltscn(1,1.1,0.9)
psspy.run(0,10,1000,1,0)
psspy.pssehalt_2()
3 | No.3 Revision |
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()
4 | No.4 Revision |
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()
5 | No.5 Revision |
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()
6 | No.6 Revision |
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()