This project has moved and is read-only. For the latest updates, please go here.

discarded measurements in action adapter

Jul 25, 2013 at 1:24 AM
Hi all:

I'm fairly new to the openpdc and have written an action adapter that accepts some measurements, does some trivial manipulation, and introduces some new measurements with OnNewMeasurements(). I output status messages every 30 frames as suggested in the tutorial, and also at 2 second intervals (timer events).
Sometimes this adapter processes 30 frames per second as intended, and the rest of the time seems to process only one. Status reports that the rest are discarded, and that the 'measurement time accuracy' falls dramatically, if it wasn't already zero. 'published measurement loss' can rise to almost 3000%. Then, without warning (that I can see) it will start processing at 30fps again.
The phasors come from a PMU in a test environment.
I have a feeling its something fairly simple that I'm missing, but I'm a little stumped.
Any ideas as to what's going on here?

Thanks a bunch,
Jul 25, 2013 at 3:09 PM
Edited Jul 25, 2013 at 3:43 PM
This is likely just a configuration issue related to time. Applications dealing with high-speed GPS time-stamped measurements tend to be very time-sensitive, especially when you have to deal with devices than can lie about current time (e.g., loss of GPS lock). Because of these issues you must be able to account for time-stamps that seem "reasonable". Testing for time reasonability can only be done with the most accurate time source you have, which on your computer is your local clock.

If you trust the time coming from your device - you might fix your issue just by adding: "; performTimestampReasonabilityCheck=false" to you connection string.

Generally I don't ever completely trust time from devices, even if they report GPS lock, so I leave this flag on.

In this case you will need to adjust your leadTime value such that it can accommodate fluctuations in your local clock compared to incoming streaming time-stamps.

Making adjustments to lead-time will likely solve any issues with discarded measurements related to time - assuming the time-stamps from the device are remotely reasonable.

Other information on parameters that can be adjusted can be found here:

Parameter Flow Charts:

Parameter Documentation:

For example, if you local computer clock which is running the openPDC is hardware synchronized, this means you can at least trust your local clock to be very accurate - in this case you can add the following: "; useLocalClockAsRealTime = true" to your connection string.

Hope that helps!
Jul 25, 2013 at 10:01 PM
Thanks, Ritchie!