Documentation Home Page ◇ RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
C37.118 Master
Description
The C37.118 Master driver allows the simulator to connect to one or many Phasor Measurements Units (PMUs), typically operating as C37.118 Slaves to stream phasor data. The simulator connects with the PMU, requests the configuration and sends a command to begin the data transmission. The received data is available for computation and analysis within the simulation model.
The C37.118 communication protocol has been implemented according to the IEEE Std C37.118.2-2011 standard. However, some features are not currently supported. Refer to the Limitations section for more information.
Three communication protocols are supported:
- TCP only
- UDP only
- TCP/UDP
It is the user's responsibility to select the communication protocol matching the PMU(s) configuration. More details can be found in Annex F of the IEEE Std C37.118-2-2011 document.
Data transferred from the driver to the model includes phasor data, analog data, digital data, frequency deviation from nominal frequency, the frequency rate of change and timestamp.
See additional details in the Configuration and Connections sections.
Supported Features
The following is a list of the features supported by the driver:
- IEEE Std C37.118.2-2011 compliant
- One driver instance can connect many PMUs
- Supports TCP only, UDP only or TCP and UDP
- Supports binding to a specific network interface
- Configurable TCP and/or UDP ports
- Supports automatic data request or the manual start of data transmission
- Supports automatic handling of phasor factor and digital masks
- Configurable phasor representation (polar or rectangular)
- Configurable data format (INT16 or FLOAT)
- Supports legacy configuration mode (using connections.opal and .opal configuration files)
- Supports reconnection to the PMU if the connection has been lost
Configuration
The driver is entirely configurable via the RT-LAB interface. Users can add, delete and duplicate C37.118 master devices and their phasors, analogs, and digitals to be received in order to obtain the desired configuration.
The driver cannot currently be configured directly by connecting to a specific PMU and asking for its configuration–although this support is envisioned for a future release.
As of this writing, the user must have the following information to receive phasor, analog, and digital data from a PMU.
- IP address
- One driver instance can connect many PMUs
- Operating mode (TCP, UDP or TCP + UDP)
- TCP and/or UDP ports
- PMU identifier (ID)
- Phasor, analog and digital names
- Phasor representation
- Phasor format
General Configuration
The first parameters to be configured are found below:
- Use an RT core for asynchronous computation:
- When set to true, the driver reserves a real-time CPU core for its communication system and can handle a larger number of slaves, phasors, analogs, and digitals.
- When set to false, the communication system defaults to core 0.
- Listening timeout (ms): Total number of milliseconds the driver waits for a response when sending a command to the PMU
- Enable verbose mode: When enabled, additional information is displayed during the loading of the model
Master Configuration
By default, the driver is configured with one master that can connect to the C37.118 slave example project.
Adding a device to communicate with another PMU can be performed through the RT-LAB interface.
Each master device has multiple parameters:
- ID: Identifier of the PMU, as described per IEEE Std C37.118.2-2011 standard.
- The C37.118 master must know the identifier of the remote PMU it is connecting to. If the ID is not correct, data cannot be received from the remote PMU device.
- Protocol: Select TCP, UDP or TCP and UDP depending on how the remote PMU device is configured to communicate.
- When using TCP or TCP and UDP protocols, the combination of the IP address and TCP port must be unique for each slave.
There are three possible cases:
- The same IP address for all slaves with a unique TCP port
- Unique IP addresses for each slave using the IP aliasing with the same TCP port
- Both IP address (using the IP aliasing) and TCP port are unique for each slave
The same considerations apply for UDP port when using UDP or TCP and UDP protocols.
TCP port | TCP port to be used by the C37.118 Master to establish a connection with the C37.118 slave (PMU). Only visible when operating in TCP or in TCP+UDP mode. |
---|---|
UDP port | UDP port to be used by the C37.118 master to establish a connection with the C37.118 slave (PMU). Only visible when operating in UDP or in TCP+UDP mode. |
Use specific port for reception | This option is only visible when operating in UDP.
|
Local port | This field is only visible when operating in UDP and when the option Use specific port for reception is selected. It is the UDP port on which the master is expecting packets from the current C37.118 slave. |
NIC name | The desired network interface name. The proper interface name is selected based on the information given by the Linux command ifconfig. For testing purposes, if users must connect the C37.118 master driver to an instance of the C37.118 slave driver running on the same simulator, the loopback network interface must be used ("lo"). |
IP address | The IP address of the remote PMU. For testing purposes, if users must connect the C37.118 master driver to an instance of the C37.118 slave driver running on the same simulator, the loopback IP address must be used (127.0.0.1). |
Phasors representation | Can be either POLAR or RECTANGULAR depending on the PMU configuration |
Phasors format | Can be either INT16 or FLOAT depending on the PMU configuration |
Enable automatic data request |
|
Apply phasor factor automatically | As per the IEEE Std C37.118.2-2011 standard, each phasor configured in INT16 format can have a factor that needs to be applied to the received value.
|
Apply digital valid-bit mask automatically | As per the IEEE Std C37.118.2-2011 standard, the PMU can send digital values configured with a valid-bit mask. When enabled, the mask is automatically applied to the received digital values before sending them to the model. |
Each stream has a configurable number of phasors, analog, and digital values.
Phasor Configuration
For each phasor, there is only a configuration field, which is the phasor name matching the phasor name configured in the remote PMU.
Analog Configuration
For each analog, there is only a configuration field which is the analog name matching the analog name of the remote PMU.
Digital Configuration
For each digital, there is an option to enable the reception of the normal bit states. If enabled, a connection point is available to monitor the normal status word of the current digital signal.
The current input is at its normal state when a logic exclusive-or (XOR) between itself and the status word is equal to 0. If disabled, this connection point is not available.
For each bit of a digital channel, a name must be configured. This name needs to match the name of the bit configured in the PMU.
Connections
Once the driver has been configured as desired and associated with the proper model subsystem, the user needs to connect points in the model to points in the driver by using the RT-LAB interface. This connection panel shows all the driver's and model's connectable points, once the model has been compiled. Users can also make connections to LabVIEW panels.
The example model provided with RT-LAB is already packaged with connections between the driver and the model. It can be used as an example to understand how the connections between the model and the driver should be made.
The following lists the driver connectable points for a master, a phasor, an analog, and a digital.
Master Connectable Points
Connectable Name | Description | Direction |
---|---|---|
Frequency ROC | Rate of change of frequency sent by the PMU as per IEEE Std C37.118.2-2011 Section 4.3 | To model |
Frequency | Frequency sent by the PMU as per IEEE Std C37.118.2-2011 Section 6.2.2. | To model |
Epoch time (sec) | Epoch time sent by the PMU as per IEEE Std C37.118.2-2011 Section 6.2.2. | To model |
Fraction of second (ns) | Fraction of second sent by the PMU as per IEEE Std C37.118.2-2011 Section 6.2.2. | To model |
Clock locked | Time quality as per IEEE Std C37.118.2-2011 Section 6.2.2. | To model |
Timebase | Resolution of fraction of second timestamp as per IEEE Std C37.118.2-2011 Section 6.4. | To model |
Status | 0 = Connected | To model |
1 = Disconnected | ||
2 = Receiving | ||
3 = Error | ||
Error | 0 = No error | To model |
1 = PMU unreachable | ||
2 = Communication timeout | ||
3 = Received PMU ID different than expected | ||
Mismatch | 0 = No mismatch between the remote PMU and the PMU configured in the Master. | To model |
1 = There is a data mismatch between the remote PMU and the PMU configured in the Master. | ||
To get more information about the mismatch, the Target display information in the Diagnostics tab of the model must be in exhaustive mode. The information about the mismatch is displayed only at the reset of the model. | ||
Enable reception of data | This connection point is only available when the 'Enable automatic data request' is disabled. At the beginning of the simulation, the C37.118 master driver asks for and receives the PMU configuration, but does not ask to begin the data transfer. | From model |
From the model, when the value associated with this connection point changes from 0 to 1, the C37.118 Master sends a command to the PMU to start transmitting data. If this value changes from 1 to 0, the C37.118 Master sends a command to the PMU to stop data transmission. |
Phasor Connectable Points
For a given stream, each configured phasor provides two connection points to return data to the model.
The name of the connection point contains the device name and the configured phasor name.
If the phasor representation is POLAR, the phasor connectable points are:
Connectable Name | Description | Direction |
---|---|---|
Magnitude | Magnitude value | To model |
Angle | Angle value in radians | To model |
If the phasor representation is RECTANGULAR, the phasor connectable points are:
Connectable Name | Description | Direction |
---|---|---|
Real part | Real part value | From model |
Imaginary part | Imaginary part value | From model |
Analog Connectable Points
For a given stream, each configured analog value provides two connection points to return data to the model.
The first one is the analog value itself, and the second one is the factor to be applied to this value. Since the standard does not specify how to handle factors for analog values, the user must either multiply or divide the analog value by the factor value returned to the model.
The name of the connection point contains the device name and the configured analog point name.
Digital Connectable Points
For a given stream, each configured digital value provides 16 connection points to return each bit of the 16-bit digital value to the model.
The name of the connection point contains the device name, the configured digital point name, and the specific bit name.
If "Enable reception of normal bit states" is checked, the normal status word of the current digital signal is returned to the model.
Limitations
The following is a list of the limitations of the driver:
- It operates asynchronously from the model simulation step. It will try to receive data as fast as possible and provide it to the simulation.
- It needs to be configured manually by knowing in advance how the PMU is configured (see above).
- It cannot receive PMU configuration frame 3 (CFG-3).
- It cannot receive encrypted data (SSL).
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter