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

Feeding phasor data available in text file format into OpenPDC

Jan 2, 2016 at 6:36 AM
Hi,
I have phasor data in text file format (.csv). I would like to know if it is possible to feed phasor data available in text file format into OpenPDC.

Thank You
Jan 4, 2016 at 3:51 PM
Hi niteshostwal,

Yes, it is possible. There is a CSV input adapter that will read measurements from CSV files and provide them to the other adapters in the openPDC. It supports two different formats:
  1. Each row represents a single measurement with multiple rows per timestamp.
  2. Each row represents multiple measurements with one row per timestamp. (This is known as TransverseMode.)
I don't know what format your CSV file is in, but maybe one of these will work for you.

Thanks,
Stephen
Jan 5, 2016 at 5:05 AM
Hi Staphen

Thank you for your inputs.
The csv file that i have is of the format as given below
                  Va_mag,   Va_Ang,  Vb_mag,  Vb_Ang, Vc_mag,  Vc_Ang,  Ia_mag,  Ia_Ang,   Ib_mag,  b_Ang,   Ic_mag,  Ic_Ang,   freq, ROCOF 
time stamp 1
time stamp 2

and so on.
I have four such csv files for four pmu data, all of which are time synchronised. It appears that the format is as per the second format you have suggested.

I will be great full if you can share the details of where the input adapter will be available and any documentation which can help me in using this.

Thanks
Nitesh Ostwal.
Jan 5, 2016 at 7:00 PM
Hi Nitesh,

I've poked around, and it seems the documentation we have on the CSV adapter is rather out of date. In particular, it doesn't even mention the TransverseMode or ColumnMappings parameters which you will need in order to make this work. I can try to give you a high-level description of what you need to do.

First, you will need to create a Measurement for each of the columns in your CSV file, excluding the timestamp column. The easiest way to do this would be to enter them one at a time using the "Metadata > Measurements" page in the openPDC Manager. For each column in the CSV file, click "Add New", enter the information about the measurement in that column, then click "Save".

After creating new measurements for each of the columns in the CSV, the system will assign an ID based on some of the information you entered. You will be able to see it in the ID column of the data grid beneath the area where you entered the data (you may need to skip to the last page). Make note of the IDs of the measurements you created because you will need them for the columnMappings parameter when configuring your adapter.

The next step is to configure the input adapter. Go to the "Inputs > Manage Custom Inputs" page, click the "Add New" button, then use the "Type" dropdown to select "CSV". This will populate the "Parameters" list under the "Connection String" groupbox. First, set the "FileName" parameter to the CSV file's path, then set the "TransverseMode" parameter to True. You will also need to set the ColumnMappings to a semicolon separated list of mappings. Each mapping should be defined as the integer index of the column (starting at 0), followed by an equals sign, followed by either the word "Timestamp" or the ID of the measurement. The parameter's description lists the following example for a three-column CSV file:
0=Timestamp; 1=PPA:12; 2=PPA:13
Hope that helps.

Thanks,
Stephen
Mar 9, 2016 at 10:53 AM
Hi Stephen

I have tried the above procedure but am unable to configure the openpdc to read input from csv file. It appears as though that the csv file is not in the desired format. Can u please share some same file if u have.
Mar 9, 2016 at 3:17 PM
Hi Nitesh,

This is what the contents of my CSV file look like.
Timestamp,PPA:1,PPA:10,PPA:11,PPA:12,PPA:13,PPA:14,PPA:2,PPA:3,PPA:4,PPA:5,PPA:6,PPA:7,PPA:8,PPA:9
635931310170000000,8228,38.47470822,502.5757239,-131.8987716,214.2654052,178.9717246,59.971,0,-0.42,299567.9782,-132.3800155,298562.0961,-132.3510752,230.1433918
635931310170330000,8228,37.93852206,505.0788209,-132.3994386,213.7387727,178.6746272,59.965,0,0.09,299629.9759,-132.7277883,298623.1939,-132.700026,231.7047453
635931310170660000,8228,36.97593536,512.9061342,-133.4377751,212.1360972,178.2193576,59.971,0,-0.72,299813.5209,-133.0427584,298805.9561,-133.0160747,237.4509706
635931310171000000,8228,36.0862927,510.0617702,-134.0836948,212.1936964,177.7745998,59.969,0,1.73,299856.3056,-133.5532424,298848.435,-133.5215979,235.6415516
635931310171330000,8228,35.67089972,513.5070224,-134.566606,211.166653,177.3162248,59.954,0,-0.76,299822.1794,-133.839839,298795.6906,-133.8124328,238.0153716
...
Here is the connection string I used to configure the adapter in openPDC.
FileName=SHELBY.csv; 
AutoRepeat=True; 
SimulateTimestamp=True; 
TransverseMode=True; 
ColumnMappings={0=Timestamp; 1=PPA:1; 2=PPA:10; 3=PPA:11; 4=PPA:12; 5=PPA:13; 6=PPA:14; 7=PPA:2; 8=PPA:3; 9=PPA:4; 10=PPA:5; 11=PPA:6; 12=PPA:7; 13=PPA:8; 14=PPA:9}
I had to create a virtual device to associate with the measurements. PPA:1 through PPA:14 are the IDs of the measurements associated with the virtual device in my configuration.
http://www.gridprotectionalliance.org/Products/openPDC/Images/CSV/SHELBY-virtual.png
http://www.gridprotectionalliance.org/Products/openPDC/Images/CSV/SHELBY-measurements.png

After everything was set up, I was able to view the data on the Graph Measurements screen.
http://www.gridprotectionalliance.org/Products/openPDC/Images/CSV/SHELBY-graph.png

Thanks,
Stephen
Mar 10, 2016 at 8:56 AM
Hi Stephen

Thank you for providing the input file format. I have successfully configured OpenPDC to read the CSV file.

Regards
Nitesh Kumar