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

FIX: Bugs in center tap transformer model #407

Merged
merged 11 commits into from
Dec 20, 2022
Merged

FIX: Bugs in center tap transformer model #407

merged 11 commits into from
Dec 20, 2022

Conversation

keatsig
Copy link
Collaborator

@keatsig keatsig commented Nov 28, 2022

This PR fixes the following bugs in center-tapped transformer model:

  1. Corrected polarity of one of the transformers on secondary side connected between terminals [4,2] to introduce the 180 degree phase shift at the node with terminal [2].
  2. Fixed the terminal numbering of virtual nodes which were always starting with 1 even if transformer was not connected to terminal [1]. The terminal numbering is now consistent with the connections of the transformers.
  3. Initial points required for linear models (FOT, FBS) was updated to match the change in terminal numbering of the virtual nodes. Also, the initial points for center-tapped transformer secondary nodes was corrected to introduce the 180 degree phase shift.
  4. Added loads/generator models which are connected between two secondary terminals (240V devices) of center-tapped transformers.

@keatsig keatsig added the Type: Bug Something isn't working label Nov 28, 2022
@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Merging #407 (1681b12) into main (c9d7b87) will increase coverage by 1.23%.
The diff coverage is 98.56%.

@@            Coverage Diff             @@
##             main     #407      +/-   ##
==========================================
+ Coverage   70.14%   71.37%   +1.23%     
==========================================
  Files          59       59              
  Lines       14831    15084     +253     
==========================================
+ Hits        10403    10766     +363     
+ Misses       4428     4318     -110     
Impacted Files Coverage Δ
src/data_model/utils.jl 67.36% <ø> (ø)
src/data_model/transformations.jl 45.96% <86.66%> (+0.46%) ⬆️
src/form/bf_fbs.jl 96.86% <98.07%> (+0.07%) ⬆️
src/form/fotr.jl 97.27% <98.07%> (+0.03%) ⬆️
src/form/fotp.jl 94.49% <98.18%> (+0.47%) ⬆️
src/core/data.jl 68.49% <100.00%> (+0.64%) ⬆️
src/data_model/eng2math.jl 91.33% <100.00%> (+0.37%) ⬆️
src/form/acp.jl 64.66% <100.00%> (+3.06%) ⬆️
src/form/acr.jl 64.24% <100.00%> (+0.44%) ⬆️
src/form/bf_mx.jl 49.81% <100.00%> (+2.81%) ⬆️
... and 14 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@pseudocubic pseudocubic left a comment

Choose a reason for hiding this comment

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

I noted some places where some comments should be added in code to signify what that code is used for (to make it easier to find these places in the future).

I also recommend adding a page to the manual as a technical note about center-tap transformers and how we are modeling loads / generators connected to them

src/io/dss/dss2eng.jl Outdated Show resolved Hide resolved
src/form/fotp.jl Outdated Show resolved Hide resolved
src/data_model/transformations.jl Outdated Show resolved Hide resolved
src/data_model/transformations.jl Outdated Show resolved Hide resolved
src/io/dss/dss2eng.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@pseudocubic pseudocubic left a comment

Choose a reason for hiding this comment

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

Some additional comments about documentation. Something I am trying to going forward is to have mathematical representations of the constraints in docstrings, because going back to fix it is very difficult / time consuming, so that's where a lot of the comments are coming from.

One additional question: in the dss2eng conversion, PVSystems, Loads, and Transformers all have special handling, but what about Generators, and Storage? It seems to me that those objects would exist on the customer side as well (diesel generators, battery backups), so should be supported?

src/form/bf_mx_lin.jl Outdated Show resolved Hide resolved
src/form/fotp.jl Outdated Show resolved Hide resolved
src/form/bf_fbs.jl Outdated Show resolved Hide resolved
src/form/bf_mx.jl Outdated Show resolved Hide resolved
src/form/bf_mx.jl Outdated Show resolved Hide resolved
src/form/fotr.jl Outdated Show resolved Hide resolved
@pseudocubic pseudocubic added Category: Data Parsers parser issues Category: Formulations Network Formulation labels Dec 15, 2022
@pseudocubic pseudocubic marked this pull request as ready for review December 16, 2022 17:29
@pseudocubic pseudocubic merged commit 7188b0f into lanl-ansi:main Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Data Parsers parser issues Category: Formulations Network Formulation Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants