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

Ask Your Question
4

Is it possible to change generator and load values in dynamic simulation?

asked Dec 5 '15

Enigma gravatar image

for example in IEEE 39 dynamic simulation G1=100MW at t=0s load in bus 3 is 75MW and then G1=150MW at t=0.5s load in bus 3 changes to 75MW and then G1 return to 100MW at t=1s load in bus 3 changes to 20MW print the dynamic curves for G1

6 answers

Sort by » oldest newest most voted
2

answered Sep 26 '16

perolofl gravatar image

updated Dec 11 '1

The output from the generator is determined by the turbine power (PMECH). The variable PMECH(MC) may be updated by code in CONEC subroutine during a simulation but that needs some Fortran code and a compiler.

Instead I propose that governor model IEESGO is used for update of PMECH as you wish during the simulation. With the parameters I have chosen below the model will instantaneously update PMECH after changes to GREF. The script is adapted to savnw test case, but the concept can be used for any case.

psspy.case('savnw.sav')
psspy.rstr('savnw.snp')
psspy.cong(0)
psspy.conl(0,1,1,[0,0],[ 80.0,0.0, 20.0, 80.0])
psspy.conl(0,1,2,[0,0],[ 80.0,0.0, 20.0, 80.0])
psspy.conl(0,1,3,[0,0],[ 80.0,0.0, 20.0, 80.0])
ibus = 3011
gid = '1'
dp = 50.  # MW change for generator
ierr, mbase = psspy.macdat(ibus, gid, 'MBASE')
# add dummy governor without droop and time constants
psspy.add_plant_model(ibus,gid,7,r"""IEESGO""",0,"",0,[],[],11,[0.0,0.0,0.05,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0])
psspy.machine_array_channel([-1,6,ibus],gid,"")

ierr = psspy.strt(0, 'test1.out')
psspy.run(0, 0.5,0,1,0)
psspy.increment_gref(ibus,gid, dp/mbase)
psspy.run(0, 1.0,0,1,0)
psspy.increment_gref(ibus,gid,-dp/mbase)
psspy.run(0, 2.0,0,1,0)

The following Figure shows how PMECH for the studied generator is updated during the simulation. image description

PMECH is always in pu generator base (Mbase=1000). The turbine power is here temporarily increased with 50 MW (50/1000=0.05 pu) at t=0.5 s and reset again at t=1 s.

EDIT:

Since the post is revived, I can improve by showing the block diagram of IEESGO:

image description

With the selected parameter all blocks except the limiter block are ignored. Speed input signal is blocked and the output PMECH only depends on Po and Pmax and Pmin. Those limits are set to 1 and 0 in the script above. Note, set Pmin negative if you want to set negative PMECH.

PMECH will immediately follow Po with no time delay. Any number of step changes can be made on PMECH during the simulation using API increment_gref or change_gref.

It is thereby very easy to manually update the turbine power of a generator using this governor model and parameters.

link

Comments

This is helpful. Thank you

Dao Vu gravatar imageDao Vu (Jan 25 '19)

The annotated diagram really helps to understand!

Aryan Ritwajeet Jha gravatar imageAryan Ritwajeet Jha (Dec 13 '1)
1

answered Dec 7 '15

SqFKYo gravatar image

You can use machine_chng_2 to change machine data, and load_chng_4 for load changes during dynamic simulations for PSS/E 33 at least.

link

Comments

Thanks ,but I have used function machine_chng_2, it could only change the power flow data. It could not make any changes in the dynamic simultaion

Enigma gravatar imageEnigma (Dec 18 '15)

Did you get some error? Are you using the PSS/E 33? I have used `load_chng_4` successfully myself in my own dynamic script.

SqFKYo gravatar imageSqFKYo (Dec 18 '15)

I use PSSE 33 too,and the function load_chng_4 is useful but it could only change load data.I mean the function machine_chng_2 could not change the machine output power in dynamic simulation

Enigma gravatar imageEnigma (Dec 18 '15)

Thanks for the clarification. I'm not 100% sure, but this sounds like the dynamics data controls the power output, and you'd have to use the change_var or such methods. In order to do that, you'd need to first check which dynamics models your system is using and consult MODELS.pdf.

SqFKYo gravatar imageSqFKYo (Dec 18 '15)

No,I just simply use psspy.read psspy.dyre_new and psspy.dynamics_solution_param_2 and psspy.strt and psspy.run I could not copy my hold code here because the 300 characters limit, could you please leave your email so I could send my code to you. Thanks

Enigma gravatar imageEnigma (Dec 18 '15)
0

answered Dec 10 '1

Aryan Ritwajeet Jha gravatar image

updated Dec 13 '1

The below code snippet has been made as per the details of the original question.

Note 0: The method for changing the real power generation in dynamic simulation is based on @peroflofl 's answer.

Note 1: psspy.scal2 works fine for dynamic simulation as far as load increments are concerned. It however, does not change the dynamic generation values for me. So in such a case @peroflofl's code does the job. I have added a slightly modified version of his code into this snippet.

Note 2: Any slashes in the command below ' \ ' are used to split the command in multiple lines in Python2

# Housekeeping code before running the simulation for efficient changing of loads and generations.
genBus = 1
loadBus = 3
subsystemNum = 1
ierr = psspy.bsyso(subsystemNum, loadBus) #Adding Bus 3 to Subsystem 1. It is assumed that a subsystem identified by that number has not been created.
ierr, mbase1 = psspy.macdat(genBus, '1', 'MBASE')
# add dummy governor without droop and time constants to Bus 1
psspy.add_plant_model(genBus, '1', 7, r"""IEESGO""", 0, "", 0, [], [], 11, \
[0.0,0.0,0.05,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0])
psspy.machine_array_channel([-1,6, genBus], '1' ,"")

ierr = psspy.strt(0, 'ieee39_outfile.out')
psspy.run(0, 0.5, 0, 1, 0) #It is assumed that your initial values of Bus 1 generation and Bus 3 load are already set

changeType = 1 # Parameter for psspy.scal_2. Use 2 for Percent change and 3 for Incremental change. I've used 1 since you need to specify a new value.
loadChange = 75  # New load should be 75 MW

ierr, totals, moto = psspy.scal_2(subsystemNum, 1, 0, \
        [psspy._i, 2, 0, 1, 0], \
        [loadChange, changeType, 0.0, 0.0, 0.0, -0.0, 0.0]) # Now Bus 3 PLoad is 75 MW.

genChange = 100 # New generation should be 100 MW
psspy.increment_gref(genBus, '1',genChange/mbase1) # Now Bus 1 PGen is 100 MW.

psspy.run(0, 1.0, 0, 1, 0) # Run till 1.0 s

loadChange = 20 # New load should be 20 MW

ierr, totals, moto = psspy.scal_2(subsystemNum, 1, 0, \
        [psspy._i, 2, 0, 1, 0], \
        [loadChange, changeType, 0.0, 0.0, 0.0, -0.0, 0.0]) # Now Bus 3 PLoad is 20 MW.

psspy.run(0, 2.0, 0, 1, 0) # Run till 2.0 s

Assuming you are using dyntools.CHNF to record the dynamic simulation state variable values, you may then plot POWR 1 [BUS 1 BasKV_val]1 values from the .xlsx file using your preferred progarmming software.

link
0

answered Apr 21 '17

informative

link
0

answered Dec 25 '15

martincho8002 gravatar image

May be you can make a workaround by creating an artificial generator that is not actually there in reality but will serve you to make changes in load? If the simplifications of this artificial generator are o.k. with you may be it is a good compromise. You will disconnect this generator at times when the load needs to increase and you will increase the governor reference (Pmech power) mechanical power of this generator when your load needs to decrease.

link
0

answered Mar 4 '2

ntesla001 gravatar image

i am trying to find ways to change generator output values using PSAS, however load changes can be done using ALTER command...

link

Comments

You can use govnernor model IEESGO as I describe above and change the setpoint in PSAS with SET VAR n to r, where n is the VAR number for the model.

perolofl gravatar imageperolofl (Mar 7 '2)

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

3 followers

Stats

Asked: Dec 5 '15

Seen: 7,737 times

Last updated: Mar 04 '22