GridProtectionAlliance/openECA

Data missing in signals that use delayed time window.

Opened this issue · 0 comments

Steps to reproduce issue

  1. Create a new phasor input mapping from TESTDEVICE, I used Cordova phase magnitude and angle . (TESTDEVICE is part of the sample data)
  2. Create the same input mapping as in step 1, but edit the relative time on both phase magnitude and angle to be 1 second behind.
  3. Create 2 new projects, one using the live input mapping and another using the 1 second delay input mapping.
  4. In both projects' algorithm.cs file write this code within the try block:
    if (inputData.Angle >= 0 && inputData.Angle <= 1) { MainWindow.WriteMessage(inputMeta.Angle.Timestamp + ": Phase Angle: " + inputData.Angle.ToString() + " Magnitude: " + inputData.Magnitude.ToString()); }
    This code will output the timestamp, phase angle, and phase magnitude of a measurement whose phase angle is between 0 and 1.
  5. Eventually you will get data in the live input that is not in the 1 second delayed input.
    image
    Live input on the left, delayed input on the right. The missing measurement has a black arrow pointing to it, and red arrow pointing to where it should go in the delayed input window

Cause

According to my very trusted source, @StephenCWills, this happens when a measurement is down-sampled or missing because delayed inputs get their delayed frame whenever the current frame is published, if the current frame is missing or gets down-sampled, the delayed frame doesn't get sent to the delayed input even if it existed.

Fix

If a frame is missing from the input data, then the concentrator still needs to publish the missing frame to the ECA Analytic.