This project has moved and is read-only. For the latest updates, please go here.

Connection between two PDCs

Oct 7, 2014 at 6:04 PM

Hope you are doing good. I'm trying to establish a connection between PDC-1 (which receives measurements from PMU) and PDC-2 (which is Master PDC in our case). I request you to assist me with steps.
I'm trying to see the following, and need your help to achieve them.
a) All data content should be the same: time-stamped phase voltage and current signals at the moment of measurement.
b) To see data clusters formatted and reformatted at their inputs and outputs of PDC-1 and PDC-2.

For PDC-1,
1) I have created Remote Historian, which has
Acronym: PPA-1
Type name: HistorianAdapters.RemoteOutputAdapter
Connection string: transportprotocol=Tcp; server=x.x.x.x (IPv4 of a system which has PDC-2); port=_____; interface=y.y.y.y (IPv4 of the system which has PDC-1); islistener=False

2) I have configured input device wizard.
3) Created input adapter which has
Type: Local Historian Reader
Connection string: Port=____; Protocol=Tcp; Server=a.b.c.d (IPv4 of PMU); processinginterval=15; InitiateConnection=False; ArchiveLocation=C:\Archive; InstanceName=PPA-1; AutoRepeat=False; PublicationInterval=333333

4)Created Output Adapter which has
Type: Remote Historian
Connection String: server=x.x.x.x (IPv4 of a system which has PDC-2); ThrottleTransmission=False; SamplesPerTransmission=100000; Port=____; PayloadAware=False; OutputIsForArchive=True; ConserveBandwidth=False; interface=;

5) Created Output stream with
connection string: same as that of output adapter.

With all these created, I lost the option of Historian playback, which I need. Also, PDC-1 has to send the timestamped data to PDC-2 for storage and replay.

For PDC-2,
1) I have created Local historian with
Type name: HistorianAdapters.LocalOutputAdapter
Connection string: InstanceName=PPA-2; protocol=Tcp; server=y.y.y.y (IPv4 of system with PDC-1); port=____; interface=; islistener=False

2) Created Input Adapter with
Type: Historian Listener
Connection String: archivelocation=C:\Archive; instancename=PPA-2; sourceID=PPA-2; port=____; protocol=Tcp; server=y.y.y.y (IPv4 of system with PDC-1)

3) created output adapter with
Type: Local Historian
connection string: instancename=PPA-2; server=x.x.x.x (IPv4 of system with PDC-2); port=____; protocol=Tcp

With all these created, I see values displayed in Graph Measurements. But, I wonder if the timestamps of this data are the same as that of the data in PDC-1, or if PDC-2 is creating timestamps of its own according to the time at which data received at PDC-2.
Additionally, the data in Monitor Device Outputs, don't match exactly in both PDCs at a particular timestamp. Also the timestamps of PDC-2 show the delay of 2 seconds from that of PDC-1 which is undesired.

I request you to let me know if the details used for created inputs and outputs are good enough, and if any modifications required to get the exact match of the data with same timestamps in both PDCs.
Also, can you please tell me what the time tag in graph measurements means? Is this the time stamp?

Thanks much in advance.

Oct 7, 2014 at 7:17 PM
Hi Yash,

The openPDC currently does not support historical playback from a remote historian, although it can be implemented with a custom input adapter. Are you trying to archive data on both PDC-1 and PDC-2, or are you trying to stream historic data from PDC-2 back to PDC-1?

As for your timestamps, PDC-2 should not be substituting the received timestamp for the timestamp of the original data. You do not appear to be using any adapters that simulate time, so timestamps should be preserved from end to end. One suggestion I have if you need to confirm that this is true is to create a CSV output adapter on both systems that exports the same exact data. Simply run them both for a short period of time and then analyze the two files in Excel. You should be able to verify whether the timestamps and data match on both systems.

And as for time tag, you are exactly correct. That is indeed the timestamp.

Oct 7, 2014 at 7:36 PM
Hi Stephen,

I'm trying to archive data on both PDC-1 and PDC-2. To run the CSV file, the data is not being stored in both PDCs which is weird. Also, I have observed that the input and output adapters don't work. Even when I disable all the adapters, PDC-2 is receiving data, just with the created output stream in PDC-1. But it doesn't play the historical data in this case too. Can you please suggest me some solution which could help me extract CSV files?

Oct 7, 2014 at 8:23 PM
To archive data on both systems (with playback on both systems), both systems need to be configured with LocalOutputAdapters and a Local Historian Reader.

For PDC-1,
1) Historian
Acronym: PPA_1
Type name: HistorianAdapters.LocalOutputAdapter

2) Input Adapter
Type: Local Historian Reader
Connection String: archiveLocation=C:\Archive\; instanceName=PPA_1; sourceIDs=PPA_1; publicationInterval=333333; connectOnDemand=true

For PDC-2,
1) Historian
Acronym: PPA_2
Type name: HistorianAdapters.LocalOutputAdapter

2) Input Adapter
Type: Local Historian Reader
Connection String: archiveLocation=C:\Archive\; instanceName=PPA_2; sourceIDs=PPA_2; publicationInterval=333333; connectOnDemand=true

To exchange data between the two PDCs, I recommend using the Gateway Exchange Protocol, which is easy to configure and does not suffer from delays due to concentration. Here's how to configure it:
  1. On PDC-2, in the openPDC Manager, go to "Inputs > Subscription Based Inputs > Create Internal Subscription".
  2. Enter the IP address of PDC-1 in the "Hostname" textbox and use port 6165 as instructed. Also enter an Acronym for the connection.
  3. Click the "Save" button. You will be redirected to another page.
  4. Select PPA_2 from the "Historian" dropdown and click the "Save" button.
  5. PDC-2 should now be receiving data from PDC-1 and archiving that data locally.
Oct 7, 2014 at 9:38 PM
Hi Stephen,

Thanks much for the easiest subscription. It works perfect. I still have issues with historical playback though even after I create the historian and input adapters as you've suggested. I request you to help me with the following issue too.

In Historian Playback Utility, in both PDC-1 and PDC-2, when I enter choose "Statistics" in Archive Location, they show some data to be chosen under input selection. Whereas, when the following information is given,
Archive Location --> C:\Program Files\openPDC\Archive
Output Channel --> File --> (given some location on my PC)
This doesn't show anything under input selection to choose the parameters I want to output as CSV file.

Also, when I click "Start Playback" option under 'Graph Measurements', display shows 'Initializing historical playback' but again returns to Real-time display immediately, in both the PDCs. Previously, I have faced this issue when I was using OpenPDC version 2.0.155. But this got fixed when I installed OpenPDC version 2.0.166. Eventually, this stopped working too. I might have done something by mistake, but can't figure out what had caused this to happen.

Can you please suggest me some idea how can I get this fixed?

Thank you in advance.

Oct 7, 2014 at 10:08 PM
Hi Yash,

I think there was an error in the configuration I posted above. The archiveLocation of the Local Historian Reader needs to match that of the LocalOutputAdapter. Please modify the connection strings of the Local Historian Readers to use "archiveLocation=C:\Program Files\openPDC\Archive\" instead of "archiveLocation=C:\Archive\". I believe this should fix the Graph Measurements screen unless your archives are empty. See below.

As for the Historian Playback Utility, the only reason I know of for the Input Selections list to be empty is if the archive is not configured to receive any data. Double-check your devices to make sure they are configured to send data to your historian.
  1. In the openPDC Manager, go to "Inputs > Browse Input Devices".
  2. Select your device from the list to view that device's configuration.
  3. In the dropdown labeled "Historian", ensure that your local archive is selected.
  4. Click the "Save" button to begin archiving data from that device.
If that doesn't help, you can also try checking your error log to see if there are any errors related to your archive.

Oct 8, 2014 at 1:36 AM
Hi Stephen,

I appreciate your help so far. Regarding the archive location, I apologize for not being clear in my previous discussions. It was "archive location=C:\Program Files\openPDC\Archive\" even before. I just didn't type it here completely.

Going ahead, I think the archives are empty as you said. Also, I see that my devices are configured to the historian I created. Furthermore, I will study the error log, and get back to you if I still can't fix it.

Thanks much.

Oct 10, 2014 at 2:38 PM
Good Morning Stephen,

Hope you are doing great. I still face a problem in historian playback. In the error log it says

Exception Source: GSF.Historian
Exception Type: System.ArgumentException
Exception Message: Value must between 01/01/1995 and 01/19/2063
Exception Target Site: set_Time

---- Stack Trace ----
GSF.Historian.Files.ArchiveDataPoint.set_Time(value As TimeTag)
   openPDC.exe: N 00375
GSF.Historian.Files.ArchiveDataPoint..ctor(measurement As IMeasurement, quality As Quality)
   openPDC.exe: N 00242
HistorianAdapters.LocalOutputAdapter.ProcessMeasurements(measurements As IMeasurement[])
   openPDC.exe: N 00098
GSF.Collections.ProcessQueue`1.ProcessItems(items As T[])
   openPDC.exe: N 00050
I don't understand what type of error it is. Can you please say me what the error is, and how to fix it?

Thanks much in advance,
Oct 10, 2014 at 2:53 PM
Good Morning Yash,

That error typically occurs when an adapter in your system is creating measurements, but not setting the Timestamp property of those measurements. The timestamp is set to DateTime.MinValue by default, which is well outside the range of 01/01/1995 and 01/19/2063. However, the error can also occur if a device is sending data with bad timestamps (for instance, 100 years in the future).

To fix the error, the first thing to do would be to identify which adapter is generating the data with bad timestamps. Depending on what the cause is, you may want to either disable the adapter, change the way the adapter operates, or troubleshoot the device that is reporting bad timestamps.

Oct 13, 2014 at 6:46 PM
Hi Stephen,

When I transfer data through GEP as you suggested, I see phasor data after I choose a specific Archive Location in "Historian playback utility" of PDC-2, but I don't see it with PDC-1. However, I can extract data to a .csv file through Historian Data Viewer in both the PDCs. I wonder why it is not the case with historian playback utility.

Moreover, I see archives empty in both the PDCs when I transfer data through IEEE std protocol. I have followed all your previous suggestions but I still find them empty. Can you please say me what might be the problem?

Also, Can you please explain me why to choose GEP over IEEE protocol, where IEEE is the standard protocol for synchrophasors which is still in use?

Thank you.

Oct 13, 2014 at 9:50 PM
Hi Yash,

At this point, the only way I can think to help you is to divulge a few more details. Hopefully this will help you out.

In order to fill out the list under "Input Selection", the Historian Playback Utility will look into the "metadata file" of the archive you tell it to open. That is the file called "ppa-1_dbase.dat". The openPDC populates this file with data from its database. If you browse the openPDC configuration database, you can query the "HistorianMetadata" view to get a dump of what the openPDC writes to that file.

More specifically, there is a configuration option in your openPDC configuration file (openPDC.exe.config). In the "ppa-1AdoMetadataProvider" section, the option to look for is called "SelectString" and should have the value of "SELECT * FROM HistorianMetadata WHERE PlantCode='PPA-1'". This is the query that the openPDC runs against the configuration database to get exactly the data that it writes to the metadata file.

The only way that I am able to reproduce the behavior you described is by somehow configuring the openPDC such that the query in the previous paragraph returns zero results. In that situation, the openPDC will write no metadata to the metadata file, and the Historian Playback Utility will assume that the file is empty and clear the "Input Selection" list.

Incidentally, the method that the Historian Playback Utility uses to populate that list is the same as the method used by the Historian Data Viewer to populate its data grid. I don't know what could be causing the Historian Playback Utility to fail where the Historian Data Viewer succeeded, but hopefully this is enough information to get you on the right track.

Oct 14, 2014 at 1:14 AM
Also, regarding your question about the Gateway Exchange Protocol versus the IEEE C37.118 standard, the two main reasons to choose GEP over IEEE C37.118 are metadata and latency.

GEP provides metadata exchange to keep configuration synchronized between the device sending the data and the devices receiving the data. It does this automatically, so you can control your configuration upstream and the changes will be propagated to all of your downstream devices.

As for latency, the IEEE C37.118 protocol sends data in frames such that all of the measurements taken at a given timestamp are grouped together in a frame before being sent downstream. When receiving data from multiple devices, this can present some problems. For instance, you can only send data as fast as your slowest data source, otherwise the data from that data source will be lost downstream. It also requires additional configuration parameters known by us as "lag time" and "lead time", which must be tuned carefully. If even one of your data sources isn't reporting, your downstream devices won't receive data any faster than what you set your lag time to. GEP does not have these limitations because its data packets are designed such that data can be sent downstream as soon as it arrives.

Oct 15, 2014 at 4:52 PM
Hi Stephen,

I appreciate your explanation. After reading your explanation about why not IEEE std., I feel that the "Time Tag" column on the "Graph Measurements" tab in OpenPDC doesn't show the actual timestamp of the data from PMU, but it shows the time at which the data has been received at the PDC. If this is the case, then PDC will give the timestamp to the data according to the time at which it the data is being received. Is this true?

My another question is, what time stamps will be shown in .csv files? Is it the timestamp of the data, or is it the time at which the data received at the PDC?

On the contrary, if "Time Tag" column in "Graph Measurements" tab shows the actual timestamps of the data from PMU, and not the time at which the data has been received at PDC, then the IEEE std. protocol transfer from PDC-1 to PDC-2 should not show any difference in time in "Time Tag" column of PDC-1 and PDC-2, as it is showing some difference in my case.

Thanks much in advance.

Oct 15, 2014 at 6:11 PM
Hi Yash,

It might be useful for you to know that although the PDC does have some code to track the "ReceivedTimestamp" of the data coming from PMUs, it does not use that data for anything. At this time, it exists solely as a mechanism for developers to use when writing their own adapters. Therefore, the answer to all of your questions about which timestamps are displayed is invariably the timestamp that the PMU assigned to the data.

What you may be noticing with the openPDC Manager is the difference between the "Chart Refresh" of the Manager and the sample rate of the PMUs sending you data. By default, the chart refresh is set to 250 milliseconds. As compared to the updates from the PMU which arrive every 33 milliseconds, it would mean that the Manager is only displaying one data point for every 7 or 8 data points it receives. It would be difficult to synchronize two Managers to show the exact same timestamps at that resolution.

On the Graph Measurements screen, there is a link towards the top just above the graph that says "Display Settings". If you click on that, one of the fields on the left side of the settings window is "Chart Refresh Interval (in miliseconds)". With a good enough graphics card, if you set that to 33, you should be able to see the full resolution of PMU timestamps flying by in that "Time Tag" column. Note that there will be some difference in latency between PDC-1 and PDC-2 that may affect how well synchronized the two systems are, but they should be pretty close.

Oct 15, 2014 at 7:41 PM
I appreciate your detailed explanation.

Thank you so much, Stephen.