How can I see the injected active and reactive power at a specific node? #471
-
How can I see the injected active and reactive power at a specific node? I couldn't find it in the ANDES user manual and I only see the bus.a or.v. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 22 replies
-
We don't have variables to store injected power of each node. The reason is to reduce unnecessary memory consumption. |
Beta Was this translation helpful? Give feedback.
-
Jinning,
Do we have a documentation mentioning that line injections are the Line.a1.e, Line.a2.e, Line.v1.e, and Line.v2.e fields?
For the original question, one can use a perturbation file to access these fields at the end of each step. Maybe you can help develop an example script.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Jinning Wang ***@***.***>
Sent: Tuesday, August 1, 2023 3:02:42 PM
To: CURENT/andes ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [CURENT/andes] How can I see the injected active and reactive power at a specific node? (Discussion #471)
After calculating the injected power, you can get the entire time series data, where you can find the initial value.
—
Reply to this email directly, view it on GitHub<#471 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABSNZAYG6PO5KNLR2R3URODXTFVHFANCNFSM6AAAAAA2YDEQQ4>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
An example is attached here, Power Injection.pdf @cuihantao, would you kindly verify if I have correctly understood your idea? |
Beta Was this translation helpful? Give feedback.
-
Here, a further clarified example is attached, Power Injection.pdf The def pert(t, system):
"""
Demonstration of perturbation function.
This file should be applied to built-in IEEE 14-bus
case "ieee14/ieee14_full.xlsx".
In the given case, `Line` "Line_1" and "Line_2" are
connected to `Bus` "1" through parameter `bus1`,
and line injected active power is inspected through
`Line.a1.e`.
"""
Pinj_line = system.Line.get(src='a1', attr='e',
idx=['Line_1', 'Line_2'])
print(f"t={t:.5f}, pinj_line={Pinj_line.sum():.5f}") |
Beta Was this translation helpful? Give feedback.
-
It is unclear how "outside the function" means. Do you want to use it after the simulation is done, or do use the values at each step? You can provide at least some pseudo code for how you want to use it.
The timestamps are the same for all the variables. Like Jinning mentioned, https://docs.andes.app/en/latest/_examples/ex2.html#extracting-variable-data should give you some good ideas. In addition, the columns of |
Beta Was this translation helpful? Give feedback.
-
Another easier way is to use Jupyter so that you have an interactive session.
Next, in the pert function, duck tape the ss object by saving whatever you need as a field of ss. For example, ss.temp = data.
When done, you can access ss.temp retrieve the data. This is a commonly used hacking technique in Python.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Jinning Wang ***@***.***>
Sent: Thursday, November 30, 2023 7:57:31 PM
To: CURENT/andes ***@***.***>
Cc: Hantao Cui ***@***.***>; Mention ***@***.***>
Subject: Re: [CURENT/andes] How can I see the injected active and reactive power at a specific node? (Discussion #471)
For 1, a quick way would be store the desired data in a CSV file, as the pert function leaves nothing after calling. The drawback is I/O with hard-disk at every time step can significantly slow down the simulation.
A more hacker way can be revise the pert function and corresponding calling function in tds.py to leave a interface parameter that can be stored and returned after simulation.
—
Reply to this email directly, view it on GitHub<#471 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABSNZA6FPYDU5TO6CWRAGU3YHE2QXAVCNFSM6AAAAAA2YDEQQ6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOMRUGA4DO>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Here, a further clarified example is attached, Power Injection.pdf
The
pert.py
code is excerpted below: