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

feat(editors/subscription): add subscription supervision support #1010

Merged
merged 28 commits into from
Nov 15, 2022

Conversation

juancho0202
Copy link
Contributor

closes #942

@juancho0202 juancho0202 added the Kind: Enhancement New Request label Sep 22, 2022
@juancho0202 juancho0202 added this to the Sprint 2022-10-04 milestone Sep 22, 2022
@juancho0202 juancho0202 self-assigned this Sep 22, 2022
@juancho0202 juancho0202 linked an issue Sep 22, 2022 that may be closed by this pull request
src/foundation/dai.ts Outdated Show resolved Hide resolved
src/foundation/dai.ts Outdated Show resolved Hide resolved
@juancho0202 juancho0202 force-pushed the 942-subscriber-add-lgos-and-lsvs branch from 22d0f54 to 7087b0a Compare October 17, 2022 11:30
@juancho0202 juancho0202 marked this pull request as ready for review October 17, 2022 16:33
@juancho0202 juancho0202 force-pushed the 942-subscriber-add-lgos-and-lsvs branch from 1ee0512 to 9318323 Compare October 18, 2022 13:16
@JakobVogelsang JakobVogelsang changed the title (Subscription) Add LGOS and LSVS acc. to IEC 61850-6 and IEC 61850-7-1 feat(editors/subscription): add subscription supervision support Oct 20, 2022
@JakobVogelsang
Copy link
Collaborator

@juancho0202 I did first tests and so far have seen a bug that need to be fixed in this PR:
When a new supervision logical node is created we need to make sure that the inst attribute is unique. At the moment, the inst is not existing for the new element LN.

@JakobVogelsang
Copy link
Collaborator

@juancho0202 Another thing I have found: subscription from DATA BINDING does not add any supervision information to the sink IED

Copy link
Collaborator

@JakobVogelsang JakobVogelsang left a comment

Choose a reason for hiding this comment

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

I have found one functional issue and some little code related stuff but nothing big. One thing that I would ask you for: use empty lines to make the code read better. Some long function are hard to digest at the moment.

src/foundation.ts Outdated Show resolved Hide resolved
src/foundation.ts Outdated Show resolved Hide resolved
src/foundation.ts Outdated Show resolved Hide resolved
src/foundation/dai.ts Show resolved Hide resolved
src/editors/subscription/foundation.ts Outdated Show resolved Hide resolved
src/translations/de.ts Outdated Show resolved Hide resolved
test/unit/editors/subscription/supervision.test.ts Outdated Show resolved Hide resolved
@danyill
Copy link
Collaborator

danyill commented Oct 29, 2022

Thank you for your patience with this PR.

I have not looked at the code (at all) but have finally done a little user testing with an ICT. The test was:

  • configure GOOSE and SMV mappings between a Schweitzer SEL-411L-2 and an NR PCS-221S relay using OpenSCD
  • open in SEL Architect to see if they are recognised
  • since they are not, modify the XML by hand to the point where SEL Architect will recognise the supervision LNs

The results are... not great and very likely what Jakob expected when we started this.

  • goCBRef is insufficient to instantiate the supervision and SEL Architect does not recognise it.
  • Once I add all the fields in the LNodeType that seem to be required, the file will still not save without errors relating to the esel namespace.
  • Deleting the OpenSCD (hand-modified) supervision and recreating it in SEL Architect appears to work but the file remains with errors.
  • Basically, SEL Architect does not support an SCT creating supervision nodes.
  • Even if we were to make the supervision pluggable the requirements of SEL Architect are too expansive and relate to their own namespace so I think that changes must be made within the ICT before it is feasible to consider this.

For OpenSCD and this PR (for discussion):

  • The supervision instance didn't appear to be created for the LSVS LN. I have not investigated why.
  • These results perhaps indicate that we should disable supervision by default or find a whitelisting/blacklisting approach based on platform/software/devices tests.
  • I would like to go back to SEL with some comments and see if they are willing to improve SEL Architect.
  • My files used for testing and a write-up are attached: LGOS_LSVS_SEL_and_NR_v0.01.zip
  • For the write-up, extract the zip file and open LGOS_LSVS_SEL_and_NR_v0.01.html. @JakobVogelsang could you see if you agree. If so I'll take this up with SEL. For our engineering workflow we could do the supervision as a final step in an ICT but I would prefer this to be in the domain of the SCT.

I propose to do a test like this for Siemens, NR and GE in the next few weeks, but it will take me some time... Hopefully this is helpful in the meantime. Has anyone done a test like this with Siemens or other IEDs?

@JakobVogelsang
Copy link
Collaborator

Good evening @danyill, THANK you very much for this detailed test! I love the level of detail you are adding.

Before you approach SEL to allow this feature, and you should, one more detail. Acc. to the standard, there as a way vendors can express whether instantiated data is processed. This can be done through valKind and valImport attributes. See an example how this is done in SIEMENS

<DOType id="SIPROTEC5_DOType_ORG_external_V09.30.01_V09.30.01" cdc="ORG">
   <DA name="setSrcRef" bType="ObjRef" valKind="RO" dchg="true" fc="SP" valImport="true"/>
</DOType>

For this feature to work, valImport must be true and valKind either RO or Conf.
In the fields you provided, this looks like:

<DOType  id="ORG_0_2" cdc="ORG">
   <DA name="setSrcRef" bType="ObjRef" dchg="true" fc="SP"/>
</DOType>

This means however that we cannot expect the vendor to accept this. SEL clearly expressed that this value instantiation is read back into the ICT.

I did test with DIGSI 9.30 and at least the update of LGOS and LSVS seems to work. We will do an online test in the next weeks to prove. I am confident however that is works.

I would propose therefore to still try to not overcomplicate the feature as when we did our work properly in the SEL there will not be any subscription supervision added.

@juancho0202 please forgive me this! It is in the requirements of this issue but I did not test yet nor have added it to the test files. So as a reminder this is the requirement

Check if the IED allows instantiating values DataTypeTemplates>LNodeType[lnClass="LGOS"]>DO[name="GoCBRef"]>DA[name="setSrcRef"] has attributes valKind=Conf/RO and valImport=true.

@danyill
Copy link
Collaborator

danyill commented Nov 4, 2022

Somewhat incidentally, but perhaps in our upcoming supervision editor, we could add to the story a way of ensuring that the user is not confused about why some IEDs will provide supervision and others will not.

IED manufacturers do not declare this, and I think we could provide an interface which shows the "calculated capability" and usage of LGOS and LSVS LNs.

@juancho0202 juancho0202 force-pushed the 942-subscriber-add-lgos-and-lsvs branch from 92a4f8f to c5b929e Compare November 11, 2022 17:07
Copy link
Collaborator

@JakobVogelsang JakobVogelsang left a comment

Choose a reason for hiding this comment

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

LGTM. I have by hand tested the last two open issues and i works. From my point of view it can be merged

@juancho0202 juancho0202 merged commit 3f6b659 into main Nov 15, 2022
@juancho0202 juancho0202 deleted the 942-subscriber-add-lgos-and-lsvs branch November 15, 2022 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add LGOS and LSVS acc. to IEC 61850-6 and IEC 61850-7-1
4 participants