What is a COMTRADE file?
COMTRADE (Common format for Transient Data Exchange) is defined by IEEE C37.111, with versions from 1991, 1999 and 2013 (the 2013 version matches IEC 60255-24). A record is split into several files with the same name and different extensions.
| File | Contents |
|---|---|
| .cfg | Configuration text: channel names, units, scaling factors, sampling rates, start date and time and more. Required |
| .dat | Sample values, as ASCII (text) or BINARY, BINARY32 or FLOAT32 (binary). Required |
| .hdr, .inf | Descriptions and extra information (optional) |
| .cff | Added in the 2013 version: the files above combined into one |
The .dat values are recorded integers, converted to voltage or current with the .cfg factors as value = a × recorded value + b.
Ways to open COMTRADE files
| Method | What it is | Keep in mind |
|---|---|---|
| Manufacturer viewers | Waveform viewers provided by relay and recorder manufacturers | Require installation and differ by model and manufacturer |
| Python (comtrade package) | An open-source library for reading COMTRADE, supporting the 1991, 1999 and 2013 versions | Requires a Python environment and code |
| Excel | An ASCII .dat file opens as text | Values stay unscaled and channels have no names; binary .dat files cannot be opened |
| LOGADEC | Time-series viewing and analysis software with no installation. Loads channels with the .cfg names, units and scaling | You must select the .cfg and .dat files together (see below) |
Opening a COMTRADE record in LOGADEC
- Start it from Try it in your browser, or download the free version and open the extracted HTML file in Google Chrome or Microsoft Edge.
- Click CSV/Excel and select the .cfg file and the .dat file with the same name together (Ctrl-click). You can also drag and drop both onto the pane at once. A 2013 .cff file loads on its own.
- The analog channels appear as columns with the names and units from the .cfg. Values are scaled (a × recorded value + b).
- With a single sampling rate, the X axis is set to [Generate from sampling interval] and the record start time becomes the start date and time. With two or more rates, or none, the time column (Time [s]) becomes the X axis.
- To include digital channels (0/1), tick [Include digital channels] in [Format settings].
- Click [Import], then click [Select all] in the [Series] tab.
Note: Selecting only the .cfg or only the .dat file does not work (the reason is shown), because a browser cannot read neighbouring files you did not select.
See "Excel and TDMS files" (loading by format) in Loading Data in the user manual for details.
Features often used with COMTRADE data
- Batch import: [Folder] imports all records in a folder at once. Tick COMTRADE under [File types] and .cfg and .dat files with the same name in the same folder are paired automatically.
- Frequency analysis: [FFT] shows harmonics and other frequency content (How to run an FFT on CSV data).
- Overlay and compare: compare phase voltages and currents overlaid with [Overlay] or stacked with [Stacked].
- Export to CSV: [Export data] writes the scaled values to CSV, TSV or Excel — handy for converting COMTRADE to CSV.