Engee documentation

To COMTRADE

Writes data to COMTRADE files.

blockType: SubSystem

Path in the library:

/Physical Modeling/Electrical/Control/Sinks/To COMTRADE

Description

Block To COMTRADE records the values of the input signals in the oscillogram files of the COMTRADE format:

  • configuration file (.cfg),

  • data file (.dat).

Supported revisions of COMTRADE: 1999 and 2013. Supported data file types: ASCII, BINARY, BINARY32, FLOAT32.

Data is written to files when the trigger input is triggered. Files are saved after the simulation is completed. If the trigger is triggered several times during the simulation, several waveforms will be recorded. If the output files exist, they will be overwritten.

Note that the Discretes input port is typed as Bool. If necessary, change the signal type using the block Cast To Bool. If you do not disable the Discretes input and leave it unconnected, this will lead to an error, because the input signal type will be determined as Float64.

The unit automatically determines the number of signals in the input ports. Channel parameters are configured in the Channels tab. By default -1 will automatically generate channel parameters. For detailed settings, you must specify a vector of values, the length of which must match the number of signals.

Ports

Input

# Analogs — Input signal
scalar | vector

Details

Input for recording analog signals of COMTRADE files.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

I don’t

# Discretes — Input signal
scalar | vector

Details

Input for recording discrete signals of COMTRADE files.

Data types

Bool

Complex numbers support

I don’t

# Trigger — Input signal
scalar

Details

The Input intended for activating the recording.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

I don’t

Parameters

Main

# Enable analog input — enable the Analogs input of analog signals

Details

If the parameter value is enabled, then if the trigger is triggered, the signals coming to the Analog input will be recorded in the COMTRADE files.

Default value

true (switched on)

Program usage name

enable_analog_input

Evaluatable

Yes

# Enable discrete input — enable Discrete signal input

Details

If the parameter value is enabled, then if the trigger is triggered, the signals coming to the Discretes input will be recorded in the COMTRADE files.

Default value

true (switched on)

Program usage name

enable_discrete_input

Evaluatable

Yes

# Files path — file path or name (without extension)

Details

Specify the path or file name without an extension for the saved waveforms. If the files exist, they will be overwritten. If the trigger is triggered several times during the simulation, several waveforms will be recorded. The file names of the second and subsequent waveforms will be supplemented with the suffix _x, where x is the waveform number.

You can specify both the absolute path to the file (starting with /user) and the relative path. In this case, the relative path is determined from the current directory (pwd).

When simulating on KPM RHYTHM must transmit the full file path, for example, joinpath("/home/ritm/build", engee.gcm().name, "untitled").
Default value

"untitled"

Program usage name

files_path

Evaluatable

Yes

# Sample time, s — sampling period, with

Details
Default value

0.001

Program usage name

sample_time

Evaluatable

Yes

# Time zone offset, h — time offset relative to Coordinated universal time UTC, h

Details
Default value

3.0

Program usage name

time_zone_offset

Evaluatable

Yes

COMTRADE configuration

# Station name — substation name

Details
Default value

"Engee"

Program usage name

station_name

Evaluatable

Yes

# Recording device — identification number or name of the recording device

Details
Default value

"Engee"

Program usage name

rec_dev_id

Evaluatable

Yes

# Standard revision — standard version
1999 | 2013

Details
Values

1999 | 2013

Default value

2013

Program usage name

rev_year

Evaluatable

Yes

# Data file type — data file type
ASCII | BINARY | BINARY32 | FLOAT32

Details

The BINARY32 and FLOAT32 options are only available in the 2013 standard version.

Values

ASCII | BINARY | BINARY32 | FLOAT32

Default value

ASCII

Program usage name

ft

Evaluatable

Yes

# System frequency, Hz — the nominal frequency of the network or subnet in Hertz in which the data is recorded

Details
Default value

50.0

Program usage name

lf

Evaluatable

Yes

External trigger

# Trigger threshold — the trigger setpoint.

Details

If the Trigger input value is equal to or greater than the set value, data is recorded for the waveform.

Default value

0.5

Program usage name

external_trigger_threshold

Evaluatable

Yes

Analog

# Channels names ["AName1", "AName2" .. ] — channel names

Details

By default (-1), a vector is formed from the names Analog Signal x, where x is the channel number.

Default value

-1

Program usage name

analogs_ch_id_vector

Evaluatable

Yes

# Channels phase identifiers ["A", "B", "C" .. ] — channel phase identifiers

Details

By default (-1), a vector of empty lines is formed.

Default value

-1

Program usage name

analogs_ph_vector

Evaluatable

Yes

# Channels units ["kV", "V", "kA" .. ] — channel measurement units

Details

By default (-1), a vector of NONE strings is formed.

Default value

-1

Program usage name

analogs_uu_vector

Evaluatable

Yes

# Channels ratio primary factors [100.0, 200.0 .. ] — primary ratings of measuring voltage or current transformers

Details

By default (-1), a vector of units is formed.

Default value

-1

Program usage name

analogs_primary_vector

Evaluatable

Yes

# Channels ratio secondary factors [1.0, 5.0 .. ] — secondary ratings of measuring voltage or current transformers

Details

By default (-1), a vector of units is formed.

Default value

-1

Program usage name

analogs_secondary_vector

Evaluatable

Yes

# Data scaling identifiers ["P", "S" .. ] — data scaling ID

Details

In the parameter, the symbol P means the primary value, and the symbol S means the secondary value.

By default (-1), a vector of P characters is formed.

Default value

-1

Program usage name

analogs_PS_vector

Evaluatable

Yes

Discrete

# Channels names ["DName1", "DName2" .. ] — channel names

Details

By default (-1), a vector is formed from the names Discrete Signal x, where x is the channel number.

Default value

-1

Program usage name

discretes_ch_id_vector

Evaluatable

Yes

# Channels phase identifiers ["A", "B", "C" .. ] — channel phase identifiers

Details

By default (-1), a vector of empty lines is formed.

Default value

-1

Program usage name

discretes_ph_vector

Evaluatable

Yes

# Normal states [1, 0 .. ] — normal channel conditions

Details

By default (-1), a vector of zeros is formed.

Default value

-1

Program usage name

discretes_y_vector

Evaluatable

Yes

Literature

  1. IEEE Std. C37.111-1999 - IEEE Standard Common Format for Transient Data Exchange (COMTRADE) for Power Systems

  2. IEEE Std. C37.111-2013 - IEEE/IEC International Standard - Measuring relays and protection equipment - Part 24: Common format for transient data exchange (COMTRADE) for power systems