Comtrade Format Recording Data Display - Programmer Sought

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

ProgrammerSought ☰

search

Comtrade format recording data display


tags: MATLAB comtrade

This article introduces several comtrade format power recording


methods, and gives the relevant download links. The speci c use
of these softwares will not be detailed, and nally the MATLAB
GUI recording data viewing steps are speci cally Do it yourself

Several software implementation renderings and related download


links are for reference only

ScopeView Download
renderings:

TOP
SFT2826 Download
renderings:

PQDiffractor Download
renderings:

OMICRON SVScout Download


renderings:

TOP
If it can't be downloaded or can't be installed, it is recommended to replace the software.
There is always one for you.
- update 20181112 -
tool waveEV

The tool can be downloaded directly, but since there are 30 points downloaded on CSDN,
it is not convenient to directly link Need to leave a message *Leave the mailbox *
-update completed-
TOP
Finally, introduce the use of MATLAB to display comtrade
recordings using the GUI.
The rst method can be read using the read_comtrade
function.COMTRADE reader

I will not introduce this first. I may add it later. Readers can refer to the connection. Download the
relevant file test.
The second method uses the GUI to display the recording

The Graphical User Interface (GUI), also known as the Graphical User Interface, refers to a computer-
operated user interface that is graphically displayed. There are usually two ways to create a Matlab GUI
interface: one is to dynamically add controls directly using .m files; the other is to use GUIDE to quickly
visualize GUI interfaces.
Common format for transient data exchange (COMTRADE) is an IEEE protocol for data exchange between
digital fault recorders, digital protection, and microcomputer test equipment. A public data transmission
format standard proposed in 1991 and revised and improved in 1999. The standard provides an easy-to-
describe general format for data exchange that is followed by equipment manufactured by different
manufacturers. This paper uses the GUIDE method to create Matlab GUI to realize the Comtrade format
recording data display.
First, start matlab and enter guide in the command window.

TOP
Select the Blank GUI in the pop-up window.

Then in the pop-up window, the left side is the toolbar, you can drag and drop; the right side is the
display interface.

TOP
The left toolbar controls are in the order shown in the figure:

Button Push Button Scroll bar Slider


Radio button Radio Button Check box Checkbox
Editable text Edit Text Static text Static Text
Pop-up menu Popup Menu List box Listbox
Toggle Button Toggle Button Table
Coordinate Axes Panel
Button group Button Group ActiveX control

TOP
Double-click the control to display the properties of each control in the inspector, where the general
properties are (using the button control as an example):

TOP
Add static text, coordinates, and buttons to the presentation interface

Edit the static text to "Comtrade format recording data display"; edit coordinates to "fig"; edit button
to "select file".

TOP
To further edit the button's event response Callback, click the button in the red box in the figure:

Jump to the script guitest.m:

Directly modify the code in the red box above:

TOP
1 function pushbutton1_Callback(hObject, eventdata, handles)
2 % hObject handle to pushbutton1 (see GCBO)
3 % eventdata reserved - to be defined in a future version of MATLAB
4 % handles structure with handles and user data (see GUIDATA)
5 [t,data]= ComtradeRead();
6 %% display
7 Axes(handles.fig); %Open the handle of the fig
8 subplot(311)
9 plot(t,data(:,1),'r',t,data(:,2),'g',t,data(:,3),'b')
10 subplot(312)
11 plot(t,data(:,4),'k')
12 subplot(313)
13 plot(t,data(:,5),'r',t,data(:,6),'g',t,data(:,7),'b')

Among them, [t, data] = ComtradeRead () source program is as follows, the relevant code has been
commented:
1 function [t,data] = ComtradeRead()
2 %% Import Data
3 [CFGFileName, PathName] = uigetfile('*.cfg', 'Select .CFG file'); %Open .CFG file
4 CFGPathFile = [PathName CFGFileName]; % reads the .CFG file path and name
5 DatFileName = [CFGFileName(:,1:length(CFGFileName)-4) '.dat']; %Get the .DAT file name
6 DATPathFile = [PathName DatFileName]; % Get the path to the .DAT file
7 %% read configuration file
8 CFGid = fopen(CFGPathFile);
9 CFG = textscan(CFGid,'%s','delimiter','\n');
10 fclose(CFGid);
11 CFG_len = length(CFG{1,1});
12 CFG_str = cell(size(CFG{1,1}));
13 for i = 1:CFG_len
14 temp_str = char(CFG{1,1}{i});
15 CFG_str{i}=textscan(temp_str,'%s','delimiter',',');
16 end
17 % number of channels
18 No_Ch = str2double(cell2mat(CFG_str{2,1}{1,1}(1)));
19 Ana_Ch = CFG_str{2,1}{1,1}{2,1};
20 Ana_Ch(length(Ana_Ch)) = [];
21 Ana_Ch = str2double(Ana_Ch);
22 Dig_Ch = CFG_str{2,1}{1,1}{3,1};
23 Dig_Ch(length(Dig_Ch)) = [];
24 Dig_Ch = str2double(Dig_Ch);
25 % Sampling frequency
26 samp_rate = textscan(cell2mat(CFG_str{5+No_Ch,1}{1,1}(1)),'%f');
27 samp_rate = samp_rate{1,1};
28 % Data length
TOP
29 dat_len = textscan(cell2mat(CFG_str{5+No_Ch,1}{1,1}(2)),'%f');
30 dat_len = dat_len{1,1};
31 % storage format
32 format=char(CFG_str{8+No_Ch,1}{1,1}(1));
33 %% read data file
34 DAT_id = fopen(DATPathFile);
35 algdat = zeros(dat_len,Ana_Ch+2);
36 num = zeros(dat_len,1);
37 time = zeros(dat_len,1);
38 if strcmpi(format, 'BINARY')
39 for i = 1:dat_len
40 num(i) = fread(DAT_id,1,'int32');
41 time(i) = fread(DAT_id,1,'int32');
42 row_array = fread(DAT_id,Ana_Ch+ceil(Dig_Ch/16),'int16');
43 for j=3:Ana_Ch+2
44 algdat(i,j) = row_array(j-2);
45 end
46 end
47 algdat(:,1) = num;
48 algdat(:,2) = time;
49 else
50 DAT = textscan(DAT_id, '%s', 'delimiter', '\n');
51 for i = 1:dat_len
52 DAT_str = textscan(char(DAT{1,:}(i)), '%n', 'delimiter', ',');
53 for j=1:Ana_Ch+2
54 algdat(i,j) = dat_string(j);
55 end
56 end
57 end
58 fclose(DAT_id);
59 t = algdat(:,2)./1000;
60 %% get the final data
61 data = zeros(dat_len, Ana_Ch);
62 for i = 1:Ana_Ch
63 j = i+2;
64 var_string = strcat('Ch',char((CFG_str{j,1}{1,1}{1,1})));
65 multiplier = str2double(CFG_str{j,1}{1,1}{6,1});
66 offset = str2double(CFG_str{j,1}{1,1}{7,1});
67 data(:,i) = algdat(:,i+2)*multiplier+offset;
68 end
69 end

TOP
Click the Start button to run the GUI.

TOP
Select the appropriate .cfg file and run the following results:

GUI section referenceXilianghe Ge Sanshu


Follow-up author test results
Ps : The recording display software on csdn needs too many points. Let's do it ourselves.
Welcome discussion

Zabbix disk performance for use (the iostat)


monitoring the linux
TOP
Intelligent Recommendation

Tree format display JSON data


Some mes we need to display json data on the page. If it is
displayed directly, the effect is not good. The following
demonstrates how to create a special Json data forma ng
component in the Vue.js...

Table data display format settings


WeChat public account:The road to front-end programmers
Follow to learn more about front-end knowledge, feedback
ques ons or sugges ons, please leave a message on the official
account. If you think ...

Several data display format of DataTable


1. Array type h p://www.datatables.club/manual/data.html
h p://blog.csdn.net/mickey_miki/ar cle/details/8240477
h p://blog.csdn.net/mixiuali/ar cle/details/11893195...

Java parsing chade le _ a fast parsing me


thod and process of a COMTRADE binary d
ata le
The present inven on relates to the field of electronic system
recording, and more par cularly to a fast parsing method of a COMTER binary data file.
Background technique: In recent years, with the ...

TOP
Read TXT / Other Format Data, (display data format or MA
T data format in OpenCV pointer) to image display
SRC is a transformed MAT type data can perform regular MAT opera ons Or choose
Image1 or auto p =img1.ptrcv::Vec3b(i j); cPointB = p[j][0]; cPointG = p[j][1]; cPointR =
p[j][2]; to perform pixel read...

More Recommendation

iOS uses lamemp3 library to compress PCM recording data


into MP3 format
Transfer to MP3 according to pcm file (void)conventToMp3 { NSString *cafFilePath =
[NSTemporaryDirectory() stringByAppendingString:@"VoiceInputFile"]; self.mp3FilePath
= [[NSUUID UUID] UUIDS...

Android AudioRecord recording ENCODING_PCM_FLOAT Au


dioFormat format audio and conversion with ENCODING_P
CM_16BIT data
AudioRecord Record audio in ENCODING_PCM_FLOAT format
ENCODING_PCM_FLOAT requires Android 23 or later to support. Construct
AudioRecord. The construc on method is consistent with other format data, b...

Data format display_custom format, let th


e plain data display the e ect of unconvin
ced
Q: What custom format? Is there anything special you want to
say? Answer: The custom format only changes the way the Excel cells are displayed, not
the actual storage content! Q: Where are the func o...

AudioRecord recording and AudioTrack playback recording


TOP
in Android, and can be converted to wav format data.
This ar cle does not explain too much, you can use the direct copy code, because the
explana on of AudioRecord is a random search. . . layout: Permission to apply: Manual
permission ap...

Cabin Qt development of data recording c


ontrol system (a) of display interface
Long me did not write a blog, the first to graduate because
of a variety of busy, the second is now the usual records are
transferred to the learning process to know the notes, so it r...

Related Posts
COMTRADE format recording data analysis and func on realiza on (1)
JSON data format display
Data format - hierarchy display
Format display of json data
Swing version of power system fault recording comtrade file offline analysis
so ware
Velodyne VLP-16 data display and recording
Comtrade electric wave recorder file format descrip on (two PDF files in Chinese
and English)
JS JSON format display data
opengl display format data UYVY422
Support markdown data display format

Popular Posts TOP


WeChat test account verifica on token
How to correctly understand and install, diagnose, uninstall, search, backup drive
Servlet applica on in java development, verifica on code small case
Create a binary tree data structure depth beg beg beg the number of leaf nodes
(recursively)
Get parameters in Django (path, query, request header, request body)
Use the git checkout command to switch to the specified commit
Detailed SLF4J
Some insights so ware services architecture
MySQL zip installa on package installa on tutorial
2021-04-14

Recommended Posts
LeetCode_434 Number of words in the string
Use of angularJS and VUE.JS
ubuntu18.04 server configura on p service
One ques on of the day Day4--leetcode45--jumping game II
PyTorch deep learning: 34 minutes quick start-autoencoder
POJ2315_Football Game_Nim game variant
vue makes a dynamically ac ve bullet box that can slide to any posi on on the
current screen
The range of binary search numbers
Linux first lesson knowledge
leetcode 8 String to Integer (atoi)
Related Tags
COMTRADE
Wave recorder
data pack
data
json
Comtrade Files format
javascript
vue.js
vue
jquery
TOP

You might also like