diff_months: 21

PSSE-Python Download Link and Training Materials

Flat 50% Off Order New Solution
Added on: 2022-08-20 00:00:00
Order Code:
Question Task Id: 0
  • Subject Code :

    345

Assignment Help File

From “PSSE-Python Download Link and Training Materials” in Blackboard, you are now familiar with opening different files in PSSE, checking data information, running power flow and simple dynamic cases (generator tripping) in PSSE software interface. Also, based on the python sample script provided, you should be able open PSSE, run cases and plot the results automatically in python.

In this documentation, we are going to provide you with the instructions needed for this assignment. Contents of this documentation are listed as below.

  • An overview of the studied network

  • .dyr file and the relevant model explanations

  • How to run Automatic Sequencing fault calculation (ASCC) in PSSE GUI which provide you with the steady-state short circuit information on specific buses.

  • How to apply fault and clear fault on certain buses in dynamics in PSSE GUI

  • How to write PSSE batch scripts (Python) to automatically run PSSE case and collect the data

 

  • An overview of the original network and synchronous machines

The original 22-bus network has several synchronous machines, shunt capacitors & inductors, transformers & transmission lines, to support the load demands. Bus 211 is acted as slack bus. The total active power and reactive power flow from the overall generators are 2,432MW & -215MVar (positive as generating, negative as absorbing). There are 8 load buses which overall absorb 2,400MW active power & 1,468MVar reactive power.

In general, there are 6 voltage levels as can be seen from the figure below, different voltage levels are marked as different colours in the network diagram (.sld file)

Voltage level 21.6 kV 500 kV 230 kV 18 kV
20 kV 13.8 kV

Colour Pink Blue Dark green Blue Light green Red

Buses
101,102 151,152,201,202,204,3002, 153,154,203,205,3001,3003,3005,3006,3007,3008 206
211
3011,3018

 

 

You can run power flow analysis based on .sav file to check the power flow conditions within the system.

page2image54249088

In the assignment, there will be three different cases Case Conditions

Case Conditionspage3image64682048page3image64682240

1

Original case (All power generators are synchronous generators(SGs))

2

One SG at Bus 102 is replaced by one inverter-based renewable energy source (IBR)

3

2 SGs are replaced by two IBRs at Buses 102 and 206O                                              

If you open case2.sav and case2.sld file, you should be able to observe the change within the network: on the top of the network diagram (.sld file), a new bus 104 is connected to original bus 102 (check the diagram in red circle).

page3image64638144 page3image64637952 page3image54228384

Meantime, in .sav file, you can notice the original generator connected to bus 102 is disabled (check the ‘In Service’ box of bus 102 as marked in red circle). A new renewable generator is connected to the new bus 104 as shown in the red circle.

page4image54309472 page4image64656448 page4image64656640 page4image64656832

To further check the models of the new renewable generator, open case2.dyr file. Go to ‘Renewable Machine’ Tab and you can see its detailed model. It contains generator model ‘REGCA1’, electrical model ‘REECB1’, and plant controller model ‘REPCA1’, as shown below.

page5image54306976 page5image64651648 page5image64651840

Case 3 further replaces a synchronous machine with one IBR at bus 206, based on the case2 background. Check the case3.sav case3.sld and case3.dyr files the same procedure as in case2.

page6image54221520 page6image64670144

 

  • .dyr file and the relevant model explanations

The .dyr file contains all the parameters that are used for dynamic simulation, such as generator model, exciter model and turbine governor model for synchronous machines. You can check and adjust the corresponding parameters either from PSSE GUI or via .dyr file. (detailed introduction of these models will be explained later in this part.)

  • PSSE GUI: open the corresponding dyr file in PSSE interface, go to machine Tab, and you can see these models for each synchronous machines, as shown below. You can select and click these models for further information.

page7image54220688

 

  • dyr file

You can also change the corresponding parameters in dyr file. Open the dyr file, you can see:

 

page8image54218608

The first column ‘101’, ‘102’, etc means the bus number to which the machine is connected

The second column ‘GENROU’, ‘IEEET1’, ‘TGOV1’ specifies the model category this machine is using, as presented in PSSE GUI.

The third column ‘1’ means the machine id connected on this bus

The next columns are parameters used in the model. These parameters are arranged in order as in the PSSE GUI machine Tab. For example, check the generator model ‘GENROU’ of the machine on bus ‘101’.

page8image54217152

 

page9image54296784

  • The details of these models can generally be found in your computer on C:Program Files (x86)PTIPSSE34DOCSMODELS.pdf. Here are some simple explanations and examples on the models on Synchronous machines and Renewable generators.

Generator models: where you can notice the inertia H of this machine in second.
The details of the generator models can be found in MODELS.pdf ?chapter 1 Generator

Models  -->  GENROU

page9image54296992 

Exciter models: where you can notice and adjust KA for the exciter

The details of the exciter models can be found in MODELS.pdf --> chapter 6 Excitation System Models --> IEEET1

page10image54215904 page10image54216112

Turbine governor models: where you can notice and adjust the Droop coefficient R of this machine

The details of the governor models can be found in MODELS.pdf --> chapter 6 Excitation System Models --> IEEET1

 

page11image54291008 page11image54291216 

Renewable generator models:
Plant controller (Auxiliary control) model: REPCA1

This model is implemented with some functionalities such as voltage control, reactive power control, power factor control, Q-V curve control and frequency control at the point of interconnection.

Regarding voltage control, it has inputs of either voltage reference (Vref) and measured/regulated voltage (Vreg) at the plant level, or reactive power reference (Qref) and measured (Qgen) at the plant level. Regarding frequency control, it has inputs of frequency reference (Fref) and measured/regulated frequency (Freg) at the plant level. The output of the model is active power and reactive power commands Pref & Qref that will be sent to the following REECB1 model.

The details of the Auxiliary control models can be found in MODELS.pdf --> chapter 23 Generic Renewable Plant Control Models --> REPCA1

 page12image54286016  

Electrical control model: REECB1

This model can be connected in various combinations to yield a type 3, type 4 wind turbine generator or a photovoltaic (PV) system. It provides real (Ipcmd) and reactive (Iqcmd) current commands to the following REGCA1 model.

The details of the Electrical models can be found in MODELS.pdf --> chapter 18 Generic Renewable Electrical Control Models --> REECB1

page12image54287888

Generator model: REGCA1

This model is used to represent the converter (inverter) interface with the grid. It takes in the real current command (Ipcmd) and the reactive current command (Iqcmd) from the Electrical control model REECB1, and outputs of real (Ip) and reactive (Iq) current injected into the grid model.

The details of the Generator models can be found in MODELS.pdf --> chapter 17 Generic Renewable Generator Models --> REGCA1

page13image54255328

 

  • Apply fault in PSS/E in steady state (ASCC) instructions:

PSSE module has a number of short circuit calculation algorithms to meet the diverse needs of fault analysis. One or more of the different faults can be applied simultaneously. It can simulate one or all types of faults at one bus or all buses.

It can calculate the steady-state short circuit currents on different buses. These values can be used to calculate the system’s MVAsc and short circuit ratio (SCR)

1, Open the relevant case files (.sav & .sld) in PSSE
2, Go to ‘Misc’ tab and select ‘change program settings (OPTN)’

page14image54197280 

3, Select ‘Physical’ and ‘Polar’ for Currents/Voltages as per requirement

page14image54183760

4, Go to ‘Short Circuit’ Tab and choose ‘Setup for special fault calculations (FLAT)’

page14image54182928

 

5, Change the settings as the picture shown below

page15image54190208

6, Then go to ‘Automatic Sequencing fault calculation (ASCC)’

page15image54189376

7, And set the options as picture below and run the case. (you can specify the buses on which short circuit is to be performed, or you can select all buses, as in the red circle area in the picture )

page16image54278784

8, Click ‘Go’ and you should be able to see the report in the ‘output bar’ as shown. (you can find the steady-state short circuit currents on different buses in Ampere. These values can be used to calculate the system’s MVAsc and short circuit ratio (SCR))

page16image54280192

 

9, Automation script

You can also use recording function in PSSE GUI to help you incorporate these manual selection into your python script. Then you can run the python script to conduct the simulations automatically.

Click ‘Record’ from the toolbar and create a file name. Then run your simulation manually as presented above. Next, click ‘Stop recording’ from the toolbar and the corresponding .py file will be saved. If you want to run it automatically, you can simply click ‘Run automation file’ and choose the file. With automation scripts, you can run scenarios with different network cases and options.

page17image54335376 page17image64737792

 

  • Apply fault at certain bus in PSS/E in dynamics instructions: 

The steps will be very similar to that of the generator trip case shown in the PSSE-PythonTraining Module 2 Video.

The only difference is: instead of tripping a generator, you apply a certain fault on specific bus, run for certain time and then clear the fault as shown below.

page18image54331632 page18image54340576 

 

  • Python script instructions:

Python sample script introduction part (PSSE-Python Training Module 1&2 Videos) has

covered:

  1. import libraries, open PSSE and set up environment in python 
  2. export simulation data to excel and plot

 

In this part, we will show you the overall steps to run PSSE automatically in python script.

Details of the instruction reference can be found in your computer on the following path (C:Program Files (x86)PTIPSSE34DOCSAPI.pdf)

  1. Opening PSSE and import libraries

  2. Setting up the environment

  3. Setting output channels

You can acquire the data on specific bus and machine by setting the output channels.

Syntax: voltage_channel(status, ident)

status(1) = starting channel index, or -1 for the next available status(2) = starting VAR index, or -1 for the next available status(3) = starting ICON index, or -1 for the next available status(4) = number of the bus

ident = identifier to be assigned to the channel

Examples: psspy.voltage_channel([-1,-1,-1,152],r"""V_152""")

r"""V_152"""?identifier to be assigned to the channel, this is a variable name that can be adjusted by yourself

Syntax: psspy.machine_array_channel(status, id, ident)

status(1) = starting channel index, or -1 for the next available Status(2) = used to indicate the quantity to be placed in an channel.

Some common used indices:
1= ANGLE (machine relative rotor angle, degrees) 2=PELEC (machine electrical power, p.u), 6=PMECH, (turbine mechanical power, p.u), etc

Status(3) number of the bus
Id = machine identifier
Ident = identifier to be assigned to the channel

Examples: psspy.machine_array_channel([-1,3,102],r"""1""",r"""Qg_102""")

r"""1"""?machine identifier (input; ‘1’), this is a variable name that can be adjusted by yourself

r"""Qg_102"""?identifier to be assigned to the channel, this is a variable name that can be adjusted by yourself

 

4. Run power flow

Syntax: psspy.fnsl(options)

options(1) = tap adjustment flag, 1 = enable stepping adjustment options(2) = area interchange adjustment flag, 0 = disable options(3) = phase shift adjustment flag, 0 = disable
options(4) = dc tap adjustment flag, 1= enable

options(5) = switched shunt adjustment flag, 1 = enable options(6) = flat start flag, 0 = disable
options(7) = var limit flag, 99 = default
options(8) = non-divergent solution flag, 0 = disable

Examples: psspy.fnsl([1,0,0,1,1,0,99,0])

 

5. Conversion
This API is used to convert network from their power flow representation in preparation for switching studies and dynamic simulations

Syntax:
psspy.cong(0) #convert generators
psspy.conl(0,1,1,[0,0],[ 100.0, 0.0, 0.0, 100.0])
psspy.conl(0,1,2,[0,0],[ 100.0, 0.0 ,0.0, 100.0])
psspy.conl(0,1,3,[0,0],[ 100.0, 0.0, 0.0, 100.0])

# convert constant MVA load to a specified mixture of the constant MVA, constant current,

constant admittance load. In this case, we convert 100% of the active power load to constant current load, and 100% of the reactive power loads to constant admittance loads.

psspy.ordr(0) # calculate a sparsity preserving ordering of buses for processing of network matrices

psspy.fact()

psspy.tysl(0) # run switching study network solutions, default = 0, use present voltage vector as starting point

psspy.set_chnfil_type(0) # set/get the channel output file type, #1 for OUTX format, 0 for OUT format

psspy.strt_2([0,0],outputfile) # initialize a PSSE dynamic simulation for state-space simulation and specify the channel output file.

 

6. Dynamics

psspy.run(option, tpause, nptr, nplt, crtplt)

option = network solution convergence monitor option, 0 = default tpause = value of simulated time

20

nptr = number of time steps between the printing of the channel values
nplt = number of time steps between the writing of the output channel values to the current channel output file
crtplt = number of time steps between the plotting of those channels values

Examples: psspy.run(0, sim_time, 9999,50,100)

psspy.dist_machine_trip(ibus, id)?set a machine to out of service during dynamics ibus = bus number

id = machine identifier

Examples: psspy.dist_machine_trip(101, r"""1""")

psspy.dist_scmu_fault_2(options,values)?calculate an unbalanced fault during dynamics options(1) = dc line and FACTS device option, 0 = block and ignore
options(2) = transformer impedance correction option, 0 = do not apply
options(3) = unbalance type, 1 = line-to-ground fault, 2 = line-to-line-to-ground or line- to-ground fault

options(4) = faulted bus,
options(5) = exception phase, 1 by default
values? array of 4 elements to define fault, dependent on options(3), Resistance and reactance value in p.u.

Examples: psspy.dist_scmu_fault_2([0,0,2,Bus_fault,_i],[0.0,0.0,0.0,0.0]) psspy.dist_clear_fault(1)?clear a fault during dynamics, 1 = default

 

7. Export data to excel and plotting
Please refer to the previous document
chnfobj = dyntools.CHNF(outputfile) # channel data exported to excel chnfobj.xlsout(channels=[])

  • Uploaded By : Katthy Wills
  • Posted on : April 23rd, 2022
  • Downloads : 0
  • Views : 281

Order New Solution

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan

Premium

80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing
Most
Popular

Gold

30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%

Silver

20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more