Voltage Level Data Type

There are several data types that are owned directly by the Model data type and are therefore defined at the same level of the network model hierarchy; the VoltageLevel data type is one of them. This data type defines a base KV that can be used as a property of any network component that requires the context of a base KV. For example, Node data types require a definition of its base KV. It is worth noting that the VoltageLevel does not encapsulate other network components but rather is a property of the components. This means that voltage levels need only be defined once for the entire model. The Model contains a property that defines a List of VoltageLevel objects. These VoltageLevel objects define the complete set of base KVs used by the Model. Each VoltageLevel object exposes the properties shown in the table below:

Voltage Level Property/Attribute Table
Property Name Xml Name Type Description
UniqueId Uid Guid A statistically unique identifier for the instance of the VoltageLevel data type. Lazily instantiated.
InternalId ID Integer A non-zero, positive, integer, unique identifier for the instance of the VoltageLevel data type.
Value KV Double The Base KV for the VoltageLevel in kilovolts.


The VoltageLevel data type is very tersely expressed in Xml as it has only three properties that have each been expressed as an Xml attribute. This is shown in the following Xml code snippet:

<VoltageLevels> 
     <VoltageLevel Uid="0c5e2573-2213-41f3-8897-bb453f0127ec" ID="1" KV="500" /> 
     <VoltageLevel Uid="7c5740b2-0299-4035-96f1-6d7ec156b83e" ID="2" KV="230" /> 
     <VoltageLevel Uid="0c5e2573-2213-41f3-8897-bb453f0127ec" ID="3" KV="34.5" /> 
</VoltageLevels>

Since the, UniqueId property is lazily instantiated, creating a new VoltageLevel object in C# is very straightforward. The default constructor can be used followed by setting of the properties through their accessor methods. Although, just like all of the data types in the Synchrophasor Analytics code base, there are designated constructors which appropriate input parameters that can be utilized if desired. The below syntax tends to be the cleanest and is the preferred way of instantiating a new object for modeling purposes.

using SynchrophasorAnalytics.Modeling; 

//...

VoltageLevel voltageLevel = new VoltageLevel()
{
     InternalID = 1,
     Value = 500
};

// Use object as needed

Using the Network Model Editor, in order to add VoltageLevel objects to the Model, right-click on the Voltage Levels item and click Add.

NME - Add New Voltage Level.png

The two key attributes can then easily be set. These three VoltageLevel objects match with the Xml snippet from above.

NME - Voltage Level Detail.png

Last edited Sep 14, 2014 at 10:56 PM by kevinjones, version 3