Ask Your Question

perolofl's profile - activity

2022-09-30 09:14:29 -0500 answered a question Motor starting dynamics of pump storage

Motor starting can be simulated in PSSE. See Program Application Guide II, Chapter 21.2.4.

2022-09-28 04:33:03 -0500 commented answer The value of IC and IT for wind generator models

It is very advanced to write ypur own generator model!

2022-09-28 04:31:30 -0500 commented answer Total Active Power Transmitted to a Bus

You can use inibrn and loop through all lines with nxtbrn, check the sign of P and sum all injections to the bus.

2022-09-27 10:38:03 -0500 answered a question Total Active Power Transmitted to a Bus

The total power flow into a bus is zero if we neglect the small mismatch. API brnflow returns the flow on an individual branch.

2022-09-27 04:45:28 -0500 answered a question The value of IC and IT for wind generator models

It is a copy and paste error in the manual. IC must be 101 and IT must be 1.

2022-09-27 04:36:34 -0500 commented answer Extract Bus Voltage Magnitude and Angle from .sav case

API brnflo returns the complex power for a branch.

2022-09-26 15:16:25 -0500 answered a question Extract Bus Voltage Magnitude and Angle from .sav case

The error is caused by no data in memory. The saved case is not opened. Perform first.

Current magnitude and angle can be calculated from the power injection (P+jQ) for each connected object (branch, transformer, load, shunt, generator, etc).

2022-09-26 04:44:47 -0500 commented answer Synchronous Condensers in IEEE-14 Bus System

You have to find out yourself what is causing the instability. As I understand the original IEEE 14-bus system has 5 generators an no condensers.

2022-09-26 00:24:56 -0500 answered a question Synchronous Condensers in IEEE-14 Bus System

The condensers supply inertia and short circuit power during the simulation. Obviously, the system becomes unstable without them.

Perform a simulation with the condensers and plot P & Q to see their support to the system.

2022-09-23 02:40:53 -0500 answered a question If there are islands, can I get a list of the islanded buses using psspy?

The easiest is to use API treedat, which returns a lot of information in a dictionary. The following will return a list with a sublist with bus numbers in every found island.

treeobj = psspy.treedat(999)
islandbuses = treeobj['island_busnum']

For eaxemple, with three islands the list may look like this:

[[101], [102], [201, 202, 203, 204, 205, 206, 211]]

This can be merged into one single list with:

islandbuslist = [j for i in islandbuses for j in i]

Now the list is:

[101, 102, 201, 202, 203, 204, 205, 206, 211]

Everything in a single line:

islandbuslist = [j for i in psspy.treedat(999)['island_busnum'] for j in i]
2022-09-22 01:21:41 -0500 edited question Did PSS/E reverse ID and IQ?
 ----------------------------- MACHINE INITIAL CONDITIONS -----------------------------
   BUS# X-- NAME --X BASKV ID  ETERM   EFD    POWER    VARS   P.F.      ANGLE   ID     IQ
      1 1                    0.6900 1  1.0204 0.0000  100.01    0.00   1.0000   7.79 0.0000 0.9801
      4 4                    220.00 1  1.0200 1.0376  -99.05   13.56  -0.9908  -5.32 0.2223-0.9546


That's what I got after initializing. Both SBASE and MBASE are 100MVA, you can see that POWER=IQxETERM and VARS=IDxETERM. Why is that? Don't we usually use d for Pe and q for Qe?

2022-09-21 04:44:07 -0500 answered a question PSSE to Python and run from inside of the PSSE

It is normally very easy to start PSSE-35 from python. It is no longer needed to add libraries to the system path. This will start the newest installation of PSSE-35:

import psse35
import psspy
2022-09-21 04:31:14 -0500 answered a question How to run a Static DC powerflow?

You are using the old API (DCLF) with the arguments for the new API (DCLF_2). It should be:

psspy.dclf_2(1, 1, [1,0,1,2,1,1],[0,0,0], '1')
2022-09-20 04:09:47 -0500 commented answer Question about API in Fortran

Yes, use VAR(L+3) = STATE(IVAL+1)

2022-09-20 04:05:41 -0500 commented question INITIAL CONDITIONS SUSPECT in CBEST model

It is better to show the load flow data for the generator and the dynamic data for CBEST.

2022-09-15 06:34:52 -0500 commented question How to perform load connexion event in dynamic simulation ?

Switch on a load during the simulation.

2022-09-14 10:12:01 -0500 commented answer Question about API in Fortran

Yes, you can use VAR(L+1) = IERR

2022-09-14 01:42:54 -0500 answered a question How to channel VPERHZU1 machine protection in dynamic simulation?

Put the first VAR of the model into a channel.

See post "Monitoring VAR and STATES - Dyn "

2022-09-14 01:41:15 -0500 answered a question The name of wind generator model must be 'REGCAU1'?

Don't name your model REGCAU1! It must have a unique name.

A wind generator model is a current injection model (IT=1) and is called in both TBLCNC and TBLCNT. The subroutine REG is called in TBLCNC and the subroutine TEG is called by PSSE in TBLCNT.

Your model needs an entry point for subroutine TEG so PSSE can call it in TBLCNT.

Read about Coordinated call in POM.

See also post "Question about coordinated call models".

2022-09-12 06:51:50 -0500 answered a question Question about API in Fortran

Variable IVAL will contain the index of the first STATE for the wind generator model at bus 2, machine 1.

The third VAR should be VAR(L+2) = STATE(IVAL)

Variable IERR is zero when the call is succesful. It is wrong to assign VAR(L+3) = VAR(IERR), since VAR array doesn't have index 0. Remove the statement for VAR(L+3).

2022-09-12 06:26:32 -0500 edited question Question about API in Fortran

When I use a call like WINDMIND, how could I get and use the output value?

In API.pdf, it shows the Fortran syntax:CALL WINDMIND(IBUS, ID, STRING1, STRING2, IVAL, IERR)

So, I write:


In order to get the output, IVAL, I write the below code in my understanding:


I put all these codes in a GUST model ,MODE 3, and in .dyr I write

2 'USRMDL' 1 'API' 106 0 0 0 0 4

All other models in .dyr are offical models like REECAU1...

However, when I start dynamic simulation, all the VARs are 0.

How to solve this problem?

2022-09-09 03:23:48 -0500 commented answer There are some API commands which can be identified inside Psse GUi but can not be identified using python IDLE

Thanks, very nice solution!

2022-09-04 09:23:40 -0500 answered a question Extract entire array of Magnetizing susceptance(B) of 2-winding Transformer using psspy function in python

The magnetizing admittance is returned as a complex value. Hence, API ATRNCPLX shall be used. See example below:

ierr, [ymag] = psspy.atrncplx(-1,  entry=1, string=['YMAG'])
for c in ymag:

Here list ymag contains the complex value of (G,B) in pu system base.

2022-09-03 11:26:42 -0500 answered a question How to open PSSE v34 sld file in PSSE v33

No, it is not possible!

2022-09-01 02:13:04 -0500 answered a question Save .raw case after updating the transformer limits in python

The API will only change the value in the working files. You have to save current data to a raw data file with API RAWD_2.

2022-08-30 03:35:11 -0500 answered a question Python file to compare output

One way may be to open both files with dyntools and compare the channel values.

2022-08-30 01:41:07 -0500 commented question Python file to compare output

Do you mean result files from dynamic simulations (.out) or any other kind of output from PSSE?

2022-08-29 01:59:13 -0500 answered a question psspy function list all the FROM BUS NUMBER and TO BUS NUMBER column data

Use API psspy.abrnint. For example:

ierr, [ibl,jbl] = psspy.abrnint(-1,  flag=4, string=['FROMNUMBER','TONUMBER'])

will return all from bus numbers in list ibl and all to bus numbers in list jbl for all branches and two-winding transformers.

2022-08-29 01:39:55 -0500 commented question Asking Plot .out File in PSSE ver 35

I don't understand. What do you mean with "see results when open out file"?

2022-08-28 03:45:58 -0500 commented question Error while opening a snapshot

Have you tried with another snapshot?

2022-08-28 03:39:23 -0500 commented question Asking Plot .out File in PSSE ver 35

The problem is not clear. Are you plotting an out-file with PlotBook?

2022-08-25 12:50:07 -0500 answered a question Applying a bus fault in dynamic simulation

First of all I strongly recommend to use Python instead of response file for automation of PSSE.

In PSSE all faults are entered as shunts (G+jB) in MVA. For example a solid three phase fault may be entered as a large inductive shunt (G=0, B=-2e9). In the BAT command VALUES(1) )= G and VALUES(2) = B.

In your case:


BASEKV is only needed if UNITS = 2 or 3 and there is no bus base voltage entered for IBUS in the saved case. Normally BASEKV can be entered as 0.0, i.e.:


for a solid three phase fault.

2022-08-25 04:01:41 -0500 answered a question GUI Modeling REGC_B

I believe it is a user model:

IBUS 'USRMDL' ID 'REGCBU1' 101 1 2 7 5 8 ICON(M) to ICON(M+1) CON(J) to CON(J+6) /
2022-08-20 04:53:26 -0500 answered a question Reactive control loop REPC

Constants emax and emin are just limitations on the input signal to the PI Q-controller. Enter large positive and negative numbers to ignore the limitation.

2022-08-17 02:10:35 -0500 commented answer Gnetting the generators

Can you show the data for the plant?

2022-08-16 05:40:03 -0500 commented answer Fortran code to DLL error

It works fine for me. Are you sure you haven't modified the source file? Do you find ENCOD in the code?

2022-08-16 05:26:13 -0500 answered a question Gnetting the generators

When machines with missing generator models are gnetted automatically at initialisation Pgen is modelled as constant current load and Qgen is modelled as contant impedance load. Both Pload and Qload are zero!

In the example below I have deleted the generator model for machine at bus 102 in savnw network. After initialisation, the machine is gnetted and replaced with a load:

image description

The load data are shown below:

image description

2022-08-16 02:40:56 -0500 answered a question Maximum No. of ICONS exceeded

You have to buy a real license!

2022-08-16 02:39:45 -0500 commented answer Maximum number of ICONs exceeded

Then you can only use models with a maximum of 300 ICONS.

2022-08-12 09:50:49 -0500 answered a question Fortran code to DLL error

You probably has to compile module ENCOD before compiling any code refering to ENCOD.

2022-08-05 03:52:08 -0500 commented answer Read variables during dynamic simulation

Well, Moji wrote that he is not talking about channels...

2022-08-05 03:49:24 -0500 commented answer How do I retrieve all bus numbers from a slider diagram?

What is the problem with to just write a bus location file and let python read the file and get the bus numbers?

2022-08-05 03:43:40 -0500 answered a question Is there any alternative function command for NSWICH in v35 ?

Switched shunts models are changed in rev 35 since multiple switched shunts are allowed at a bus.

The subroutine call is now SUBROUTINE XXXXXX(ISW,ISLOT), where ISW is the internal number of the switched shunt.

Since the switched shunt index (ISW) is an input into the model, any references to NSWICH (which was used to obtain the switched shunt index earlier) need to be removed.

See Chapter " Changes in Dynamics when Modeling Multiple Switched Shunts" in rev 35 Release Notes.

2022-07-17 02:41:17 -0500 answered a question what does the letters in 'TYSL' stand for?

Triangularized Y matrix network solution.

2022-07-15 11:35:08 -0500 commented answer Read variables during dynamic simulation

It is better to use model TIOCR1 to trip the line automatically at overcurrent.

2022-07-03 18:34:55 -0500 commented answer Maximum number of ICONs exceeded

Do you have a real license or a free xplorer license? How many ICONs in your snapshot?

2022-07-03 08:50:20 -0500 answered a question Maximum number of ICONs exceeded

Your dynamic models use more ICONS than allowed in your PSSE installation.

Use activity SIZE to see the number of ICONs used and allowed.

Change to a larger PSSE size or reduce the number of models using ICONs.

2022-07-03 03:16:01 -0500 commented answer I want to use user-defined model with fortran

See post "Intel Runtime Libraries not found - PSSE Installation"

2022-07-03 03:14:15 -0500 edited answer Simulating Phase Angle Jump Test at POI

You can have two transmission lines between infinite bus and POI. Simulate trip of one branch. The new load flow will change the bus angle at POI.

Do not use playback model in this simulation, use GENCLS instead.


A better alternative is to have a transformer between infinite bus and POI. Change the transformer phase shift during simulation to emulate a voltage angle phase shift. In this way you can select the wanted angle shift, e.g. 5 deg, 10 deg , 15 deg etc.