Skip to content

Conversation

@TonyXiang8787
Copy link
Member

@TonyXiang8787 TonyXiang8787 commented Nov 21, 2025

Relates to #1162

Allow magnetization path flow of zero sequence in the yn side.

Physical modelling

More attention is needed to correctly (enough) to model the zero-sequence magnetization impedance, espacially for 3-leg core-type transformer.

OpenDSS

See refereces from OpenDSS

https://opendss.epri.com/3-PhaseTransformerModeling.html
https://opendss.epri.com/ModelingTransformerCoreEffectsin.html

pandapower

pandapower uses the following two attributes to represent zero-sequence magnetization:

https://pandapower.readthedocs.io/en/latest/elements/trafo.html

variable name description
mag0_percent z_mag0 / z0 ratio between magnetizing and short circuit impedance (zero sequence)
mag0_rx zero sequence magnetizing r/x ratio

But this definition has some problem. If the user does not wish to model zero-sequence magnetization impedance at all. He/she has to give infinity to the mag0_percent. Also, it depends on the specification of leakage impedance of zero-sequence, which the user might not want to specify.

proposal in PGM

We can adopt pandapower attribute but allow user to direct specify i0 in zero sequence.

variable name description default
i0_zero_sequence zero-sequence magnetizing current in per unit i0
p0_zero_sequence zero-sequence magnetizing core loss in W p0 + pk * (i0_zero_sequence^2 - i0^2)

The values defaults to the positive sequence variant to allow user to leave them empty. We can add in the documentation to emphasize that if user has a 3-leg core-type transformer with Yyn winding, i0_zero_sequence should be given, and a good guess of the value is 1.0. We cannot default i0_zero_sequence to 1.0 because for tranformers which use separated iron core (usually for large transformers), the magnetization flow is the same for positive and zero sequence.

Note: The reason we name these *_zero_sequence is due to naming conflicts and the precedence of full naming like we have done with r_grounding_from.

Check list

  • fix core
  • fix existing test
  • add new validation test
  • documentation on new attributes
  • documentation on explanation

Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
@TonyXiang8787 TonyXiang8787 added the bug Something isn't working label Nov 21, 2025
@TonyXiang8787 TonyXiang8787 self-assigned this Nov 21, 2025
@TonyXiang8787 TonyXiang8787 added do-not-merge This should not be merged and removed do-not-merge This should not be merged labels Nov 21, 2025
@TonyXiang8787 TonyXiang8787 marked this pull request as draft November 21, 2025 12:40
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
@TonyXiang8787 TonyXiang8787 marked this pull request as ready for review November 25, 2025 12:25
@TonyXiang8787 TonyXiang8787 marked this pull request as draft November 25, 2025 19:20
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
@TonyXiang8787 TonyXiang8787 marked this pull request as ready for review November 28, 2025 12:29
@petersalemink95
Copy link
Member

Added the do-not-merge tag, so we don't accidentally merge without positive confirmation from the user side.

@petersalemink95
Copy link
Member

Adding a comment so we won't forget to update three-winding trafo's - can be done in a follow-up PR. This will just be updating the input - and probably tests, since it exists of 3 Transformers

…omponent/transformer.hpp

Co-authored-by: Peter Salemink <66305765+petersalemink95@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
Copy link
Member

@mgovers mgovers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Also approving given the positive feedback on real data as reported in #1162 (comment)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

@petersalemink95 petersalemink95 removed the do-not-merge This should not be merged label Dec 2, 2025
@petersalemink95 petersalemink95 added this pull request to the merge queue Dec 2, 2025
@nitbharambe nitbharambe removed this pull request from the merge queue due to a manual request Dec 2, 2025
@petersalemink95
Copy link
Member

FYI: for three winding transformers the issue still needs to be fixed. @TonyXiang8787 will make an issue for it

@nitbharambe nitbharambe added this pull request to the merge queue Dec 2, 2025
Merged via the queue into main with commit 0b1088e Dec 2, 2025
31 of 32 checks passed
@nitbharambe nitbharambe deleted the fix/transformer-yyn branch December 2, 2025 16:04
@furqan463
Copy link

@nitbharambe @mgovers is this change only for Yyn or all 2-W trafos. Should corresponding change be made in pandapower_converter of PGM-IO to read zero seq parameters specified in PP.

@TonyXiang8787
Copy link
Member Author

@nitbharambe @mgovers is this change only for Yyn or all 2-W trafos. Should corresponding change be made in pandapower_converter of PGM-IO to read zero seq parameters specified in PP.

Hi @furqan463,

Theoretically this change affects all 2W trafos. But only Yyn will see significant improvements. You are right, the PGM-IO should be adjusted by fetch pandapower zero sequence parameters. Can you create an issue in PGM-IO issue board?

@furqan463
Copy link

@nitbharambe @mgovers is this change only for Yyn or all 2-W trafos. Should corresponding change be made in pandapower_converter of PGM-IO to read zero seq parameters specified in PP.

Hi @furqan463,

Theoretically this change affects all 2W trafos. But only Yyn will see significant improvements. You are right, the PGM-IO should be adjusted by fetch pandapower zero sequence parameters. Can you create an issue in PGM-IO issue board?

I'll create a PR.

@furqan463
Copy link

@nitbharambe @mgovers is this change only for Yyn or all 2-W trafos. Should corresponding change be made in pandapower_converter of PGM-IO to read zero seq parameters specified in PP.

Hi @furqan463,

Theoretically this change affects all 2W trafos. But only Yyn will see significant improvements. You are right, the PGM-IO should be adjusted by fetch pandapower zero sequence parameters. Can you create an issue in PGM-IO issue board?

@TonyXiang8787 just to be sure, power-grid-model is still not getting uk_zero_sequence and pk_zero_sequence from the user, as pandapower does take these inputs as well from the user as vk0_percent, vkr0_percent.

@TonyXiang8787
Copy link
Member Author

@nitbharambe @mgovers is this change only for Yyn or all 2-W trafos. Should corresponding change be made in pandapower_converter of PGM-IO to read zero seq parameters specified in PP.

Hi @furqan463,
Theoretically this change affects all 2W trafos. But only Yyn will see significant improvements. You are right, the PGM-IO should be adjusted by fetch pandapower zero sequence parameters. Can you create an issue in PGM-IO issue board?

@TonyXiang8787 just to be sure, power-grid-model is still not getting uk_zero_sequence and pk_zero_sequence from the user, as pandapower does take these inputs as well from the user as vk0_percent, vkr0_percent.

@furqan463, yes, that's correct. power-grid-model still uses the same uk and pk for zero-sequence (adjusted for winding configuration).

In general, we are very careful to add new attributes, because removing them will be a breaking change. If users have a strong use-case to include uk_zero_sequence and pk_zero_sequence, we might consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] *Sparse matrix error when calculating the transformer 63/10*

6 participants