First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
2020-07-08 15:58:44 -0600 | answered a question | How to reduce my raw file to large number of buses to some selected buses Can you not just make a subsystem of those buses and then export them? |
2020-06-16 18:18:12 -0600 | answered a question | Excel running out of lines. You can either:
|
2020-05-11 19:31:09 -0600 | answered a question | UDM - Environment Manager I think there is a post in the forum with similar problem and solution. Try search for it. |
2020-05-11 06:48:49 -0600 | answered a question | Where can I find good tutorials to initiate python with PSSE? Learn Python the general programming language before going into the specifics for PSSE. Start by learning PY3. Then find out what's different PY2, since you probably need PY2 for PSSE (version dependent). PY2 is obsolete. PY is easy. There is freebook, 'Automate the Boring Stuff with Python', which is a good start. Programmers tech themselves, just as academics in academia. Since you are in the area of research, sure you are familiar with the latter. The rest is practice and learn from your peers. |
2020-04-17 11:01:25 -0600 | answered a question | Remove all unbound items from slider diagram Removing them all is actually a bit more complicated than you thought. I have done it before based on map strings, which since then Siemens has changed the API (the old method getting map string is now returning a byte encoded sequence that needs to be decoded, and Siemens has not told us how to do it), so my method only works in v33.4 (or lower). The module you need is the 'sliderPy', and you must run the script in the PSSE GUI. The idea is to firstly get all the map strings of the pink elements. Note that they must be in the SAV previously, newly added pink elements do not have map strings. After getting all the wanted map strings, which you need use the 'checkdiafile' from 'psspy' with the output directed to a file and do some search and replace, use the 'sliderPy.GetActiveDocument()' to get the SLD file, then use the 'GetDiagram()' method of the file object to get the actual SLD. Then, find the diagram objects using the map strings. After that, use the 'DeleteComponent(obj.GetID())' in a loop to remove the pink elements. I remember that the 'sliderPy' has no official documentation. You will need to get the docstring out of this module and read it very carefully. I believe this module is actually a C++ ported to Python, so it is very unfriendly to read. I am not gonna post any code for this since it is a lot of work and actually not that interesting and it is hugely version dependent. Siemens surely can include this feature or just make PSSE proper and decent. |
2020-04-16 13:39:38 -0600 | answered a question | How to retrieve Three Winding Transformer (Winding 1,2,3 Data) via Python? I needed to do something similar before. To avoid repeating the effort, I made a big function that can extract all things that can be extracted for 3-winding transformer windings. Be aware that the APIs in PSSE for 3-winding transformer and 3-winding transformer windings are different. (more) |
2020-03-17 13:42:55 -0600 | answered a question | How do I convert a 3-winding transformer series impedance into per unit impedance for PSSE I remember that one of the manuals, probably one of the 2 about the models, describes the transformer models in PSSE and how you could convert the Ohmic values into the per-unit one. You need to know how the transformer is physically connected (the clock). |
2020-03-11 04:01:58 -0600 | answered a question | How to compare two .sav files? Besides what @perolofl has mentioned, you can also use the tool that this forum provides (though there are some small bugs in it). There is also a GitHub repo with some small improvements done. Note that the aforementioned methods have their own constraints. I remember that if, say like a busbar is in SAV1 but not in SAV2, then the comparisons for that busbar would be blank or something like that. A more reliable, but more work-intensive way is to extract the info you want in both SAVs via Python, and then compare them using the data type "set" in Python. A good example of this way is ETYS Appendix B from the National Grid (UK). This is the way employed by a certain TO for ETYS 2019. Also note that, if you want detailed diff status, e.g., added, removed, changed, then you probably need to use the said work-intensive method (most of time just added and removed would be enough). |
2020-02-12 09:19:03 -0600 | commented question | what will NAN value happened? NAN simply means "Not A Number", and there are posts in this forum that offer insights into when it would happen with PSSE and how to solve it. Just search. |
2020-02-11 12:23:46 -0600 | answered a question | python in psse gui You need to use the "print()" function, or something else that outputs the result onto the console. For example: Then, you should see the tuple. |
2020-01-27 13:09:54 -0600 | answered a question | Open PSS/E GUI and SAV file from Powershell/cmd? The answer to the first question is a definitive YES. But since I have not tried everything to make sure no regression, I will suggest you to use the solution with care (if you run info some DLL not found, that would mean this solution is not adding some paths to PSSE). Ok, here we go. Firstly, you can get the gist by just right click on the PSSE shortcut on your desktop. It should be something like this: What this means is that, the shortcut calls up psse33.exe, with the options of:
If you run this line of code in cmd, it will start PSSE with nothing loaded, just as double-clicking on the shortcut. If you open the INI file, you will see the whole config. One noticeable is the "PATH", under "STARTUP". Therefore, we can deduce this code: What this code does is to call up psse33.exe with the options of "-path", "-ini" and "-pyver". This would start PSSE GUI with the example "savnw.sav" loaded. Tested on Windows 7 with PSSE v33.4. You can look into the INI file more and play with the command line swtiches. For the second question, I think it is interesting, but I am not sure. I think you probably would not have the same instance, but might be able to sync the state to some extent (version dependent). What do you need the GUI for? If you can Python stuff, why would you need the GUI? |
2020-01-16 03:29:37 -0600 | answered a question | PSS/E version V33 Vs. V34 This is more of a compatibility question. If you work in a corporate environment, then you would need to make sure that everyone is using the same version since these are two major versions and have a lot of difference, including how the licences are managed. There are differences to the APIs and things like how the mapstrings are formatted. If you are using it for research, then v34 may be better just because more bugs have been fixed (but there are some regressions) and some features have been added. Also, be aware of the Python version supported. v34 supports Python 3, so if you must use Python 3, then you must use v34, though a lot of bugs have been reported with this PSSE version. One thing to note that is that Python 2 is now officially obsolete. You can of course continue to use it, just bear in mind that no bug fix or new developments would be added to Python 2. Another thing is to do with the GUI/SLD, where if you use v33 on win 10, then you may have blurry SLD and it could take a long time for the SLD to respond to commands. Siemens claims that v34 is better for this issue but I still see problems reported on this forum. For detail improvements of v34, you can contact Siemens and request a copy of the release note. It's a big document. |
2020-01-08 02:55:47 -0600 | received badge | ● Famous Question (source) |
2020-01-03 08:06:04 -0600 | answered a question | get bus number using facts device name Why not just the subsystem data retrieval APIs? Check chapter 8 of the API manual. It is either the "aFactsInt" or "aFactsBusInt" API. |
2020-01-03 08:01:08 -0600 | answered a question | Unable to import psse34/psspy from Anaconda2.7 32bit python interpreter Your code here says you are using Python 2.7 to import the psspy for Python 3.4. Of course you would get a bad magic number as a result. You either need to import the psspy for Python 2.7 or use Python 3.4 to import the psspy for Python 3.4. PSSE does not support Python 3.7. |
2019-12-20 23:46:10 -0600 | received badge | ● Notable Question (source) |
2019-12-20 23:46:10 -0600 | received badge | ● Famous Question (source) |
2019-12-13 20:55:47 -0600 | received badge | ● Popular Question (source) |
2019-12-12 05:29:42 -0600 | asked a question | Map strings for 3-winding transformers Just wondering anyone know what are rules for the map strings for 3-winding tranformers since they are inconsistent. Usually, the map strings for 3-winding transformers are :
For example, a 3-winding transformer with winding-1 number 100, winding-2 number 200, winding-3 number 300 and ID "xx" would usually yield: "T3 100 200 300 xx". But sometime, the W1NUMBER is swapped with W2NUMBER. Therefore, the above example would become : "T3 200 100 300 xx". This makes more complicated to use the "sliderPy" module, though not a lot. Anyone know the logics that PSSE uses here? |
2019-12-06 03:25:29 -0600 | received badge | ● Citizen Patrol (source) |
2019-12-04 10:43:48 -0600 | answered a question | How to get RELIND_2 results into python list Sure, direct the output to a file and then manipulate the file with Python. See "REPORTOUTPUT" , "PROGRESSOUTPUT", etc., for how to direct the output to files and then back to PSSE console (you can do this in the GUI, see "I/O Control"). You might also want to learn how to use regular expression to process the texts. Some advanced usange would involve composing the text into CSV files and then get a Excel workbook out of them. The possiblity is boundless. |
2019-12-04 08:23:53 -0600 | commented answer | How to Realize automatic batch simulation of fault Sounds like you could sell it as a product :) |
2019-11-25 07:46:15 -0600 | commented question | Error: PSSE has stoped working Cannot help you without the error information. |
2019-11-21 08:29:52 -0600 | commented answer | Code to count elements in SAV easier You can. But why. The "psspy" module already has count functions. Also, Python has no array. Unless you are talking about numpy array. |
2019-11-21 03:10:19 -0600 | answered a question | PSSE/ Transmission Losses You don't really need to calculate the losses yourself as the APIs already have them. For example, the "aflowreal()" function in the psspy module, which give you the losses of the whole subsystem. You can also get losses by area, just read the API doc. After acquiring the data, export them to Excel is easy. Just use openpyxl or other modules. I won't recommend PSSE's Excel module though. It is very bad and it terminates all Excel processes without warning on import. It is even easier to export the data to CSV. You just need the standard Python lib. |
2019-11-15 03:08:49 -0600 | commented answer | Does Scipy conflict with PSS/E ? Complete agreed. Especially with all the AI and ML packs all in 64bit. Siemens tried to support PY3.4 in v34 but there are tons of bugs reported. And Siemens' documentation is appalling. |
2019-11-14 17:14:07 -0600 | answered a question | Dyntool _outextract_data equivalent function in PSSE V34.6 The follows are docstrings of the dyntools module in v34.6.1 (PY27 version). Read it and see what you can use. (more) |
2019-11-14 10:57:12 -0600 | commented answer | Does Scipy conflict with PSS/E ? You don't need to uninstall it. Just use a 32bit virtual environment. |
2019-11-14 10:36:47 -0600 | received badge | ● Popular Question (source) |
2019-11-14 10:36:47 -0600 | received badge | ● Notable Question (source) |
2019-11-14 05:41:48 -0600 | answered a question | run pss-e on Windows10 This problem has been discussed quite a few times in this forum. You should have searched before asking this question. The official answer from Siemens is to upgrade to v34 (though this is not a sliver bullet). Unless you are using an integrated Intel graphic card, then make sure that the driver version is not newer than 26.20.100.6709 . |
2019-11-14 04:14:38 -0600 | answered a question | Does Scipy conflict with PSS/E ? You probably ran into the annoying 32bit/64bit problem. scipy by default, prefers 64bit (since it is a lot more percise), so as numpy. But, this is a big but, psspy runs on 32bit (though some other modules provided by PSSE can run on 64bit). If you google it, you will see a lot of posts regarding issues with scipy with 32bit Python. In short, this is the answer: https://stackoverflow.com/a/25057693 What you need to do is to go to here https://sourceforge.net/projects/scip... , and download the "superpack" installer and install it. I could reproduce your problem in command line before installing the superpack. After installing the superpack, the problem went away: You can see that PSSE is initialised and then your calcluations performed with the messages printed. By the way, when in doubt, throw away the IDE and just run the code with the Python intepreter. If you do not want to install the superpack, then you may need to call the 64bit Python to run the optimisation with 64bit Scipy and then return the results. See https://psspy.org/psse-help-forum/que... for this. If you cannot see the image, it is a cmd screenshot with the following messages (I change the init bus from 50 to 50000). You can see PSSE is initalised and then the optimisation performed: |
2019-11-06 04:53:15 -0600 | asked a question | Code to count elements in SAV easier This function is inspired by the subsystem_info function. It bascially allows you get the element counts in the SAV programmatically easier. There is a feature in the GUI allows you to do very similar thing. I wrote this as an exercise. Code: Example usage (after the usual init and case, of course): Feedbacks are welcome. |
2019-11-05 07:55:41 -0600 | answered a question | How to do co-simulation with PSCAD and PSSE? I remembe someone did it with ETRAN before. The Chinese Southern Grid did something similar but with MATLAB instead of PSSE. |
2019-11-01 11:07:06 -0600 | answered a question | Showing "MW" and "Mvar" in the SLD Date: 2019-11-01 Ok, I had a quick chat with Siemens, and they have said that this cannot be done now, but they might offer this feature in future release. Other than this, I think there may be something you can do using the "sliderPy" module. Bascially by adding labels next to the numbers to make the dummy appearances. A lot of work, not much gain. So, I say just put it on hold for now. |
2019-10-31 08:37:52 -0600 | commented question | 'Yes?' - How to take this away (Python + PSS/E) You mean if you do not redirect, it won't happen? |
2019-10-31 05:04:13 -0600 | commented question | Showing "MW" and "Mvar" in the SLD I think I know what you mean, but I never had the need. The arrows are usually good enough for me. If you only want a handful of branches, you can look into how the "Summation" element is used in the "savnw.sld" from the examples. |
2019-10-31 04:54:39 -0600 | commented answer | Confusion around base kV and PU voltage I think what @perolofl is trying to say is that if you change the base kV, the whole PU system moves along with it and thus it is gonna be 2 kV and 1 pu, not 0.5. This is actually how the PU system works. |
2019-10-29 09:50:46 -0600 | commented question | My file in psse 34 close the program when I open it Looks like Siemens can charge us for not so performing works, LOL. |
2019-10-29 09:48:45 -0600 | commented question | "No network data in memory" error while running a script. Is there a fix for it? >>> case_name = ['RProponent model)_max_VRR_v1.sav'] >>> isinstance(case_name[0], str) True >>> print(case_name[0]) RProponent model)_max_VRR_v1.sav Looks like it is a string. |
2019-10-29 06:27:32 -0600 | commented question | Governor Response simulation export error data format I suggest you to have a look at https://superuser.com/questions/280603/how-to-set-character-encoding-when-opening-excel . UTF-8 usually is very good at handling CJK chars. PSSE can't do it as I know. Whenever you see funny chars, it's usually a enconding problem |
2019-10-29 06:23:09 -0600 | commented question | My file in psse 34 close the program when I open it So v34 seems to solve the problem? |
2019-10-29 06:21:49 -0600 | commented question | "No network data in memory" error while running a script. Is there a fix for it? As @jfconroy pointed out. I can see you have init PSSE successful, but after that, you need call the "psspy.case()" API to load the case into the memory to work on it. You probably would want to have a lot at the APIs for getting default values. |
2019-10-28 11:10:26 -0600 | commented question | My file in psse 34 close the program when I open it There may be compatiblity issues since Siemens says they have changed a lot in v34 for graphics. Cannot be sure without trying. You should be able to get a v33 version from them for free. You can run v34 and v33 at the same time but not two v33 minor vers. Give a try with virtualMachine if possible |
2019-10-28 04:06:20 -0600 | commented question | My file in psse 34 close the program when I open it Siemens did recomend higher v34 versions to me, but I have also seen similar problems and they have changed how the Map Strings are returned by the APIs, without saying how to read it properly. So, I am sticking with v33. |