-
Notifications
You must be signed in to change notification settings - Fork 494
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
incorrect calculation of ZIP-Loads with voltage angles #62
Comments
I tried it with an external grid with a voltage angle instead of the transformer with angle shift, and the same problem occurs. So it does not seem to be related to the transformer model, but rather to how the I part of the ZIP load is calculated from the complex voltage vector. I changed the test to a more minimal two bus example without transformer as test case for this problem (see commit f576d6f) |
Remember that the voltage angle is not the angle between current and voltage, but between bus voltage angle and reference angle. The cos(phi) at the bus is only determined by the P/Q ratio of the bus injection, the voltage angle should have no impact on it. That is why the result should not be different when the slack angle is changed... I am not sure why the current calculation changes with the voltage angle... |
of course, don't worry I am not mixing these angles...
I also fully agree...I was not justifying that this is correct, just trying to explain why it happens: constant current is calculated before the power flow here...the problem is that it is considered as constant phasor with phase angle equal to zero..in the mean time voltage angle is set to 100 and you get load with some crazy power factor instead of power factor = 1 (Q is zero) from all this I conclude that we should change zip-loads implementation on the way that current magnitude is kept fixed (not current phase) and in respect to that also power factor is fixed, as you can see in my updated comment beforehand (I added alternative solution with equation, please read again last 2 paragraphs)... |
Yes the second solution sounds exactly right, I think that is it. Thanks for taking the time to look into this Jakov! |
That is a very nice summary and I understand the difference now. Just from a theoretical point of view I would have thought calculating the complex current as it is now is correct. But with these specific results, the fixed current magnitude looks more correct to me, because I would not expect to get a result of p_kw=-0.35 q_kvar=1.97 when entering p_kw=2 and q_kvar=0. Commercial tools also seem to implement the fixed current magnitude, so it really seems the way to go. Since it is a completely different approach (calculating Ibus vs. updating Sbus), will it be much work to implement it that way? #edit: you mentioned impedances also, does this problem also exist for shunts then? |
no it is not such a problem for impedance, because power is calculated from voltage and impedance, and power factor will depend on impedance, irrespective of the voltage angle. (but i'll still double check it through an example)
it shouldn't be a big work I guess...it should be much easier to implement than the way it is implemented now... |
yes sounds good! |
In the following test case:
the load flow results are false:
A simple example to recreate the issue is in the file test.p
test.zip
P. S. see test_zip_loads_results() in test_runpp.py
The text was updated successfully, but these errors were encountered: