Ask Your Question

yfwing's profile - activity

2023-09-28 20:06:36 -0500 received badge  Guru (source)
2023-09-28 20:06:36 -0500 received badge  Great Answer (source)
2021-10-08 20:18:04 -0500 received badge  Nice Answer (source)
2015-04-22 16:34:58 -0500 commented answer Zero sequence impedance

Power flow and dynamic simulation does not need zero and negative sequence data. It is all in positive sequence world. The sequence data is only needed when you try to do asymmetrical fault (such as phase to ground, phase to phase, or LLG fault).

2015-04-22 16:29:23 -0500 answered a question Which language (Python Vs FORTRAN) is better for Algorithm development in PSS/e?

Not sure what exactly you are going to do with the state estimation. If you are talking only about the steady-state, then you don't need access the DSTATE. If you don't have to access the variables related to dynamic simulation, in my opinion, you can use Python and it shall be easier to you as you are familiar with it.

However, if you have to access the variables and/or the arrays related to dynamic simulation, then it is better to use Fortran. Python can be used access some of the variables in PSS/E, however, it is very limited to the arrays used in the dynamic simulation.

2014-07-05 11:13:08 -0500 answered a question overcurrent protection

You can use line relay model TIOCR1, refer to the model library within PSS/E installation directory for description on this model.

2014-05-15 00:01:11 -0500 commented question How to use psspy inside a function??

Could be because of the format of file temp. Can you post the contents of temp?

2014-05-14 23:49:43 -0500 answered a question importing psspy module in a python sript

Are you using Version 30 or new version? For the version 30 or earlier, it should not use psspyc.pyd. In the PSSBIN folder, you should be able to find a file named psspyc.dll. For version 31 or newer, it uses psspyc.pyd. For the newer release, it has some bugs with win32 compatibility. Upgrade your PSS/E to the Version 33.4, which resolves most of the compatibility issues.

2014-04-02 18:48:49 -0500 received badge  Good Answer (source)
2014-03-20 13:53:18 -0500 commented question How to correct a blown up case in PSSE?

I would check the mismatch at bus 228 before attempting to solve the case. It could be the voltage magnitude and/or angle at bus 228 is far away from the buses one level away. If that is the case, try to change the voltage and angle at bus 228 to the same value as the buses around it.

2014-03-10 10:24:21 -0500 answered a question Entering Wind Data?

Depends on the types of wind model that you are using, if you are using WT3T1, you can probably change CON(J) during the simulation to simulate a wind speed step change. The other way around is to give a step change on the wind machine output power using ALTR command

2014-03-10 10:07:14 -0500 answered a question How can I read the Zsource from dyr file?

There is no Zsource definition in the dynamic data. It only has d, q unsaturated synchronous, transient, subtransient reactance. The Zsource in power flow data is normally set equal to the unsaturated subtransient reactance.

2014-03-07 11:02:24 -0500 answered a question Under/Overvoltage relay

In your case, I would use four VTGDCAT/VTGTPAT models for each bus. The first two relays are for over voltage relay (i.e., the VL can be set at a very low value). The last two relays are for under voltage relay (i.e., the VU can be set at a very high value). For your particular example, it could be

Model 1: VU = 1.1, VL = 0.2, TP = 1.0, TB = 0.0

Model 2: VU = 1.05, VL = 0.2, TP = 5.0, TB = 0.0

Model 3: VU = 1.5, VL = 0.9, TP = 3.0, TB = 0.0

Model 4: VU = 1.5, VL = 0.7, TP = 2.0, TB = 0.0

TB is an arbitrary number that I put there. You can change it based on your real value.

2014-03-05 09:55:54 -0500 answered a question How cloase a basecase and subsequently PSSE through python?

use psspy.case(sfile), which will close the current working case and load the new one specified by sfile.

use psspy.stop_2() to end the operation of PSS/E.

2014-03-05 09:54:08 -0500 commented question Finding a machine index and changing the array value

@Diz, Sorry, it should be ierr,ival= psspy.windmind(104,'1','WGEN','VAR'). the machine ID should be Character as well.

2014-03-04 16:07:07 -0500 commented question Finding a machine index and changing the array value

@Diz, you need use single quote to WGEN and VAR. i.e., the syntax should be: ierr,ival= psspy.windmind(104,1,'WGEN','VAR').

2014-03-04 11:22:38 -0500 answered a question Finding a machine index and changing the array value

You can call the function psspy.windmind(ibus, id, string1, string2) to get the model index number.

2014-03-04 11:14:59 -0500 answered a question Can't find exdc1 model in PSS/E 33

The EXDC1 (rotating DC machine exciter model) in PSLF is the same as the IEEEX1 in PSS/E. Both of them are derived from IEEE standard DC1A model.

2014-02-25 15:16:33 -0500 answered a question initialise until no suspect initial conditions

Don't know what the reasons are that call strt number of times. The purpose of strt is to help debug the model errors or missing models. I don't think that it is a good practice to run strt a couple of times, as the power flow conditions may not be what you want (i.e., the condition at t=0-, may not be the one that you want to study).

However, for your particular question, you can set loop based on the return of okstrt() function. something like,

# initialization
bStrt = 1;
while bStrt:
    ierr = psspy.strt();
    if ierr > 0:
        print 'STRT Error with code:', ierr;
        break;
    bStrt = psspy.okstrt();

# run
2014-02-25 15:06:28 -0500 answered a question User written model

If possible, you can try to use SVSMO1U2 or SVSMO2U2 model. These two models are designed for MSS + SVC. It could fit your model if the parameters are properly tuned.

2014-02-21 12:39:04 -0500 received badge  Nice Answer (source)
2014-02-20 13:43:32 -0500 answered a question Changing VAR(L) during dynamic simulation

I believe that you can modify your conec.flx to call a user-defined model and in the model you can read your data file and set the var values.

An example as follows,

`      SUBROUTINE CONEC
C
      INCLUDE 'COMON4.INS'
      INTEGER IU
C
      IF (MODE.NE.2) RETURN
      IU = 10
      CALL GENCHK(1, '1', II, 'IN CONEC')
      IF (II.EQ.0) RETURN
      OPEN(UNIT=IU, ACCESS= 'APPEND', FILE = 'output.txt')
      WRITE(IU, 5) TIME, PMECH(II), (VAR(JJ), JJ=100, 103)
5     FORMAT(F10.5, F5.2, 4F10.5)
      CLOSE(IU)
C
      RETURN
      END

`

2014-02-19 16:28:28 -0500 commented answer About pscopf by python

you can use `ierr = progress_output(islct, filarg, options)` to direct the output to a file.

2014-02-14 13:36:27 -0500 answered a question About pscopf by python

I am assuming that you are looking for the API manual. You can find it in your PSS/E installation directory, by default, it is:

C:\Program Files (x86)\PTI\PSSE33\DOCS
2014-02-13 12:17:55 -0500 answered a question Reading PSSE output files (*.dat) and saving in a useful format (CSV)

Isn't it easier to use the function: pssarrays.sensitivity_flow_to_mw

2014-02-13 12:12:13 -0500 answered a question Parallel-multicore module - load flow

I have used the parallel functions and did not experience any issues. You need set the number of processors, which will be used for the simulations. (use API, numberthreads). Then, for the function such as ACCC, the parallel version needs to be called. (i.e., acccparallel_2).

2014-02-13 12:06:08 -0500 commented question I want to read some datas from dyr file and to change it.

of the data, you can write your own routine to pass the .dyr data. It maybe a tedious job, because you need the format of the data, skip the comments, etc. But it is doable.

2014-02-13 12:04:52 -0500 commented question I want to read some datas from dyr file and to change it.

Not quite sure what you want to do. If you want to use psspy.changeplmodcon to modify the model parameters, you need read all the models into PSS/E arrays, which you can use dynamic function API, such as dyre_new or dyre_add. However, if you want to read .dyr into Python memory and then change some

2014-01-30 10:56:30 -0500 answered a question Bus type codes in PSS/E

A bus type code of -2 indicates a Type 2 bus for which generation is at the reactive power limit. It is set by PSS/E activities, such as power flow computation.

2014-01-28 20:26:55 -0500 answered a question is it possible to make a dynamic simulation with a data array for some loads?

Yes, you can represent the load by using data array. A user defined model is needed. Or you can write a python routine to read the data array and simulate load value as disturbance.

2014-01-23 18:47:36 -0500 answered a question Fault currents

Have you tried the pssarrays.ascc_currents() function? Not sure whether it can output fault current contributions.

2014-01-23 18:39:33 -0500 answered a question import cmath module error

I believe that it is related to the windows 7 version GDI32.dll. PSS/E version 33 is development in the windows XP environment. So it would have some compatibility issues with some python modules and also some of the PSS/E GUI functions may not work, such as the 'Report Node' when creating slider files. You can try to use the native python interpreter, rather than the PSS/E rebuilt python interpreter. It may solve the problem, but I am not sure.

2014-01-17 12:35:59 -0500 answered a question how to remove a zone?

You can use function psspy.purgzone(sid, all), it can be used to remove zones with no equipment assigned to them. However, if there are equipments assigned with the zones, then the following codes won't do anything.

Example: psspy.zsysinit(1) psspy.zsys(1,1,[11]) psspy.purgzone(1,0)

2014-01-09 16:53:16 -0500 answered a question Can anybody help me with this PV Analysis Problem?

Agree with @jconto. The PV study and the DFAX are independent with each other. You maycheck the API for PVENGINE5, the input parameters for VALUES(6) is to set the percent of rating in the excessive branch loading check. This value should be greater than 0.0.

2014-01-09 16:27:31 -0500 answered a question Converting loads and generators

Converting generators and converting loads have different meanings in the dynamic simulations.

As the output or interface to the transmission network of each genertor models is the dq currents, CONG is to initialize the in-service machines in the working case and "transform" the generator to a current source model (i.e., Norton model). So the generator dynamic models can be integrated.

About load conversion, the main purpose is to represent the realistic behavior of the load under dynamic. It is normally not constant power as used in power flow. The normal practice is to represent active power as 100% constant current type, reactive power as 100% constant impedance type.

2014-01-09 15:15:32 -0500 commented question PSS/E-FORTRAN_sharing variables between modules

I think the logic in the control model should be OK. Just make sure that calling sequence of the models in the CONEC.

2013-12-06 11:06:20 -0500 commented question python.exe can't read dyntools.

You may need call psspy.active_license('name of your exe') to active your PSS/E license for the EXE you converted.

2013-12-06 11:03:45 -0500 answered a question Can't open .sav file

@LDale, I believe that you are running your python code directly from Python (not from PSS/E GUI), probably from IDLE. I have the same problem when running Python code from IDLE. I am not sure the reason for the error. But you can try to run your Python code not from IDLE, but through python.exe.

i.e., In DOS,

C:\python27\ python xxx.py

2013-11-30 12:03:26 -0500 commented answer How to test Buses for Over-Voltage in Dynamic Simulation

@rich, and you can access all the bus voltages directly from Fortran

2013-11-30 12:03:12 -0500 commented answer How to test Buses for Over-Voltage in Dynamic Simulation

@rich, not sure whether you can use SWSHNT models your PSS/E license. If you can, maybe you can try to use this model to monitor the buses that you are interested. However, I believe that the easiest way is to write your own model as the function that you try to implement is not complicated.

2013-11-27 11:52:58 -0500 answered a question How to test Buses for Over-Voltage in Dynamic Simulation

I don't think that there is an existing PSS/E function to detect the period of over voltage. I am not sure what the practical usage on the period either. Normally, the over voltage protection would be used for generator or other equipment tripping. But there is no general objectives on scanning the whole system for the duration of over voltage. But if you really want to find do this, you can try to write a user defined model to scan all the buses. Another workaroundis to use Under/Over voltage Generator Trip Relay model (VTGTPAT or VTGDCAT). Set the bus you want to detect as monitor bus, and set the generator to be tripped as a fake machine (in an island, not connected to your studied system) with classic model and the inertia as 0.0.

2013-11-27 11:36:53 -0500 answered a question Exporting PV curve data from PSS/E to excel

@Thomas Ebdrup, try @terrytian 's method, but you don't need import psspy if you are just going to export PV to excel. Import psspy and initialize it may create some trouble to you if your PSS/E environment is not probably set.

The problem with import pssexcel within PSS/E is known problem to PTI. It is caused by the different version of VC++ compiler used for PSS/E python modules and the Python 2.7 win32api module. The C++ runtime library used by PSS/E is not compatible with Python 2.7 module. But you can work around using @terrytian 's method.

2013-11-21 10:17:56 -0500 answered a question Run multiple python files from one python file

You can try to use 'exec' statement in Python. This statement supports dynamic execution of Python code. The first expression should evaluate to either a string, an open file object, or a code object. If it is a string, the string is parsed as a suite of Python statements which is then executed (unless a syntax error occurs). [1] If it is an open file, the file is parsed until EOF and executed. If it is a code object, it is simply executed.

Example:

fid = open(r'C:\xxx\yyy.py'); exec(fid); fid.close();

2013-11-19 11:28:23 -0500 answered a question Do we need to model delta-Y transformer 30 degree phase shift?

Generally speaking, you can do either way (with or without phase shift) as long as you are consistent with all the transformers. Y-Delta transformers are mainly for generator step-up and nearly all the generators are connected by Y-delta step-up transformer. When we do the dynamic simulations, we are comparing relative angles, rather than absolutely angle. So the phase shifting effects are cancelled out already.

In terms of short-circuit calculation, there should not be any difference. You may see that the phasor value of short-circuit current is different (i.e., the real and imaginary part), but the magnitude should be the same.

So, the point is that no matter which practice to be followed, it should be consistent with all the transformers. Otherwise, wrong results will be expected.

2013-11-18 22:12:46 -0500 answered a question parallel dynamic simulations using python and PSS/E

I believe that you can try to use python Symmetric Multiprocessing modules, such as 'processing'. Run your simulation to the time 1 second, save one snapshot. Then you can use 'process' or 'pool' in the 'processing' module to parallel the rest of simulations by creating multiple threads.

check the manual of 'processing' at https://pypi.python.org/pypi/processing

2013-11-18 11:29:13 -0500 answered a question exporting dynamic simulation results to excel using python

You can try use 'dyntools' module. the function CHNF will read the dynamic simulation result files. then you can use 'xlsout' function to export to excel.

import os import sys sys.path.append('C:/Program Files (x86)/PTI/PSSEUniversity33/pssbin') sys.path.append('C:/Program Files (x86)/PTI/PSSEUniversity33/psslib')

import dyntools

achnf = dyntools.CHNF(outfile1); achnf.xlsout(self, channels='', show=True, xlsfile='', outfile='', sheet='', overwritesheet=True);

2013-11-01 10:17:17 -0500 answered a question automatic contingency test in PSS/E

I believe you can try to use ACCC function, but you need define subsystem, contingency and monitor files. For the first time, you can build those files using PSS/E GUI (Power Flow ->Linear Network->Create/modify SUB, CON, ...). After you create those files, then you can build DFAX file in the same pop-up dialog. After you have the DFAX file, you can try to run ACCC from PSS/E Gui (Power Flow->Contingency, Reliablity, ...->AC contingency solutions (ACCC)...). Select you DFAX in the pop-up dialog and select your output file as well.

2013-11-01 10:07:25 -0500 commented answer PV Analysis

@Lam, the participate factor is defined in the subsystem description data file. The format is as follow (copied from PSS/E manual, read the manual for details.): PARTICIPATE BUS bsid r . . BUS bsid r END