Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add active & reactive load as measurements #2

Open
rdzman opened this issue May 22, 2024 · 2 comments
Open

add active & reactive load as measurements #2

rdzman opened this issue May 22, 2024 · 2 comments

Comments

@rdzman
Copy link
Member

rdzman commented May 22, 2024

In #1, @aldalahmeh adds the option to include active and reactive load as measurements, along with other changes/new features. We are splitting this into separate threads to more easily track the discussion.

So, this proposed change is fine for loads at buses without generators. But, for loads at generator buses, this is not consistent with the assumption in the existing code, which assumes the load is a known quantity. To handle that case, we need more discussion and design work.

I'm ok with moving ahead with simply adding load measurements as in #1 if we also include a README that clearly documents that load measurements assume zero generation at the bus, and generator measurements assume known (possibly 0) load at the bus, and no multiple generators per bus. In fact, it should throw an error in the case of multiple injections (load and gen, or multiple gens) at a bus, until we can implement a more rational way of handling those cases.

If and when we decide to attempt to go toward a more general design that handles multiple injection measurements at a bus, this comment describes the cases I think we need to handle.

What do you think @aldalahmeh?

If you are in agreement, could you create a new PR that just adds the active and reactive load measurements, throws an error for the multiple injection measurements per bus, and adds a README.md as described above?

@aldalahmeh
Copy link

With regards to the cases mention in here, which are repeated here for ease:
(a) load measurement only.
(b) generator measurement only.
(c) load measurement, with gen at same bus with no measurement.
(d) gen measurement, with another gen or load at same bus with no measurement.
(e) multiple injections (load, gens) at a bus, each with a measurement.

Also, let us define a measurement as the true value+noise in contrast to the pure (clean) true value.

  • Case (a), we have power demand measurements at load (PQ) buses, which is handled by the code addition.

  • Case (b), having power generation measurements, is handled by the original code.

  • Case (c), it is not clear to me what exactly it is ment by no measurement. However, the original code handles having true power generation and true power demand at the same bus. They are included in the generated power as in the line 88 in doSE.m, stated below

    Sgen = Sgbus * baseMVA + (bus(gbus, PD) + 1j*bus(gbus, QD)); %% inj S + local Sd

    The power demand at the generator buses is provided by the (bus(gbus, PD) + 1j*bus(gbus, QD)) term. However, the power
    demand must be negative when entered in the bus matrix (columns 3 & 4 in case3bus_Ex6_17.m), which can be interpreted as negative power injection.

  • Cases (d), (g) and (e) are not supported in the code addition and the original code.

I agree that this should be explained in a README file in detail. Also, an error should raised when the user enters a a power demand measurement at a generator bus in the measure.PD field in line 64 in doSEmod.m and should be instructed to included it in the bus matrix. However, in this case the measurement variance is the generation power measurement variance.

Finally, do you suggest creating a new PR for the above modifications only?

@rdzman
Copy link
Member Author

rdzman commented Jun 10, 2024

  • Case (c), it is not clear to me what exactly it is ment by no measurement.

I just mean that the measurement for the generator at the same bus is not provided. I view cases (c) and (d) as essentially equivalent. Both are cases where there are multiple injections at the bus, but we are not provided with measurement data for all of them.

  • Cases (d), (g) and (e) are not supported in the code addition and the original code.

Did you mean cases (c), (d), and (e)?

Finally, do you suggest creating a new PR for the above modifications only?

Yes. Let's create a new PR that does the following ...

  • Add support for load measurements at buses without any generators.
  • Check for load or generator measurements for buses with multiple injections (load and gen, or multiple gens) and either:
    • Throw a fatal error saying that measurements at buses with load and gen or multiple gens is not yet supported.
    • Issue a warning, discard those measurements, and proceed.
  • Add a README explaining the above.

Note, the second item does change the behavior of the existing code and examples for buses that have both load and generation, with a measurement provided for the generation. The assumption in the original code is that the load is a known quantity. It seems to me that for consistency we must assume that a quantity is either provided as a measurement, or we do not have any information about its value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants