Improving the Scalability and Performance of an IEC 61850-6 SCL Workflow

Kuvaus

Opinnäytetyö kokotekstinä PDF-muodossa.
The thesis addresses the modernization of a critical legacy tool used internally at ABB for generating IEC61850 Substation Configuration Language (SCL) configuration data for protection relays, along with matching C code. The tool is nearly 20 years old and serves a critical role in the build process and design of protection and control functions. It suffers from significant technical debt, which mostly relates to the usage of inefficient custom-implemented data structures and the monolithic architecture, which lacks the separation between user interface and business logic. The custom-implemented data structures employ linked lists with deep nesting. The structure makes the search operations 𝑂(𝑛) making the build times using this tool take multiple hours. The long build times make the tool unfeasible for modern software development with fast iteration cycles. During the build process of SCL data and the C code for a sample configuration, the tool produces around 7000 warnings and automatically fixes some errors in the source files. This creates uncertainty in the workflow as new warnings might not be seen, or they might not be seen as serious. This study follows a constructive research approach with a performance evaluation and architectural mapping of the legacy system. The modernization process will implement a new cross-platform solution with an improved architectural approach, with separation between the user interface and business logic. The data handling is improved by introducing hash-based collections in the form of an N-ary tree with hash map children referred to during the thesis as a dictionary trie. The error-prone logic is replaced with XSD-generated C# classes, reducing manual maintenance effort while ensuring strict compliance with IEC 61850-6 SCL format. With the implementation of a dictionary trie in the new implementation, the tool performs 369.1x better during the parsing of all sample configuration-related SCL files, as the tool's search times are no longer bound by the size of 𝑛. For the search operations the thesis manages a speedup of 14,165.6x at a matching worst-case level. As the amount of data is expected to rise in the future, the speedup factor is expected to increase.
Tässä opinnäytetyössä käsitellään ABB:llä sisäisesti käytettävän kriittisen legacy-työkalun modernisointia. Työkalua hyödynnetään IEC61850 Substation Configuration Language (SCL) -konfiguraatiodatan sekä vastaavan C-koodin generointiin suojareleelle. Työkalu on lähes 20 vuotta vanha ja sillä on kriittinen rooli suojaus- ja ohjaustoimintojen suunnittelussa sekä koontiprosessissa. Työkaluun on kertynyt huomattavaa teknistä velkaa, joka liittyy pääasiassa tehottomien, räätälöityjen tietorakenteiden käytöstä sekä monoliittisesta arkkitehtuurista, jossa puuttuu käyttöliittymän ja liiketoimintalogiikan välinen erottelu. Räätälöidyt tietorakenteet hyödyntävät syvästi sisäkkäisiä linkitettyjä listoja. Tämä rakenne tekee hakutoiminnoista 𝑂(𝑛) -aikaisia, minkä vuoksi työkalun avulla suoritetut koontiajat kestävät useita tunteja. Pitkät koontiajat tekevät työkalusta epäkäytännöllisen moderniin ohjelmistokehitykseen, jossa hyödynnetään nopeita iteraatiosyklejä. Esimerkkikonfiguraation SCL-datan ja C-koodin koontiprosessin aikana työkalu tulostaa noin 7000 varoitusta ja korjaa automaattisesti joitakin virheitä lähdetiedostoista. Tämä luo epävarmuutta työnkulkuun, sillä uusia varoituksia ei välttämättä huomata tai niitä ei ehkä pidetä vakavina. Opinnäytetyö käyttää konstruktiivista tutkimustapaa, johon sisältyvät suorituskyvyn arviointi ja vanhan arkkitehtuurin kartoitus. Modernisoinnissa toteutetaan uusi alustariippumaton ratkaisu ja parannettu arkkitehtuuri, jossa käyttöliittymä ja liiketoimintalogiikka on erotettu toisistaan. Tietojen käsittelyä parannetaan ottamalla käyttöön hajautukseen perustuvia kokoelmia Nasteisen puun muodossa, jonka solmut sisältävät hajautustauluja. Työssä tähän rakenteeseen viitataan termillä dictionary trie. Virhealtis logiikka korvataan XSD-skeemasta luoduilla C#-luokilla, mikä vähentää manuaalista ylläpitotyötä ja varmistaa samalla tiukan yhteensopivuuden IEC61850-6 SCL-formaatin kanssa. Uuteen toteutuksen dictionary trie-rakenteen ansiosta työkalu suoriutuu 369,1 kertaa paremmin kaikkien esimerkkikonfiguraatioon liittyvien SCL-tiedostojen jäsentämisessä, sillä työkalun hakuajat eivät ole enää riippuvaisia joukon 𝑛 koosta. Hakutoimintojen osalta tässä työssä saavutetaan 14165,6-kertainen nopeutus vastaavalla pahimman tapauksen tasolla. Koska datamäärän odotetaan kasvavan tulevaisuudessa, nopeuskertoimen oletetaan myös jatkavan kasvua.

URI

DOI

Emojulkaisu

ISBN

ISSN

Aihealue

OKM-julkaisutyyppi