Skip to content

Conversation

@veljkoDjurkovic
Copy link

No description provided.

First, in line 1920 in frame.py:
stat = measurement_status << 2
This should be written this way:
stat = measurement_status << 1 because, according to the standard, PMU sync takes only 1 bit, so if we shift this two times, we have one zero more than we actually need to have.

Next, in line 1955 should be:
measurement_status = DataFrame.MEASUREMENT_STATUS_WORDS[stat >> 14]
If we shift this one 15 times, we will loose less significant bit in Data error bits.

time_quality and trigger_reason should be shifted to get exact numbers from TIME_QUALITY_WORDS and TRIGGER_REASON_WORDS dictionaries.
Should be written (2**24-1) to get 24-bit number (in binary - "111111111111111111111111").
If soc or frasec is zero by input, it is considered to be false, so it should be written like this.
According to C37.118 standard, the most significant bit in Data format defines representation of FREQ/DFREQ. If this bit is logical "1", frequency is shown by floating point, otherwise 16-bit integer.
If we have representation in 16-bit integer, than FREQ is frequency deviation from nominal in mHz. In other case it is actual frequency value ( I think in mHz too).
According to C37.118 standard, the most significant bit in Data format defines representation of FREQ/DFREQ. If this bit is logical "1", frequency is shown by floating point, otherwise 16-bit integer.
If we have representation in 16-bit integer, than FREQ is frequency deviation from nominal in mHz. In other case it is actual frequency value.
When FREQ is 16-bit integer, it is considered to be frequency deviation from nominal (in mHz) and it is added to nominal frequency value to get actual value of frequency (see one of my commits) , divided by 1000.
When FREQ is floating points, it is actual frequency value that should be written in Hz (because range is -32767 <= freq<=32767, so max value would be 32.767Hz if we use mHz for input).

This is only my understanding of standard and should be checked by others.
Test for sending data from PMU to PDC when FREQ is random short integer.
Tests sending data from PMU to PDC when FREQ is floating point.
Changed FREQ - REAL to True.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant