Skip to content

Commit

Permalink
Issue iicsys#4 - standard misunderstood
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
veljkoDjurkovic committed Jul 28, 2022
1 parent bfb0af8 commit c56bc9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synchrophasor/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2357,7 +2357,7 @@ def get_measurements(self):
"phasors": self.get_phasors()[i],
"analog": self.get_analog()[i],
"digital": self.get_digital()[i],
"frequency": self.cfg.get_fnom()[i] + self.get_freq()[i] / 1000,
"frequency": (self.get_freq()[i] / 1000) if (self.cfg.get_data_format()[i])[3] else self.cfg.get_fnom()[i] + self.get_freq()[i] / 1000,
"rocof": self.get_dfreq()[i]}

measurements.append(measurement)
Expand All @@ -2368,7 +2368,7 @@ def get_measurements(self):
"phasors": self.get_phasors(),
"analog": self.get_analog(),
"digital": self.get_digital(),
"frequency": self.cfg.get_fnom() + self.get_freq() / 1000,
"frequency": (self.get_freq() / 1000) if (self.cfg.get_data_format())[3] else self.cfg.get_fnom() + self.get_freq() / 1000,
"rocof": self.get_dfreq()
})

Expand Down

0 comments on commit c56bc9e

Please sign in to comment.