I have a PMU simulator feeding data into openPDC, which in turn publishes the data to openHistorian. A Python client then queries openHistorian every second to retrieve the most recent 2 seconds of PMU data (i.e., from t = now − 2 s to t = now). The overall data flow is:
PMU Simulator → openPDC → openHistorian → Python Client
Each time the Python script runs, it calculates the difference between the current system time (now) and the timestamp of the latest data point returned by openHistorian. Here is the part that confuses me. This difference varies significantly from one iteration to the next. Based on my observations, the “freshness” of the latest available data ranges anywhere from ~134 ms to ~1.443 s.
Given that the PMU simulator is streaming at a fixed rate of 30 frames/second (i.e., one frame every 33.33 ms), I would expect the database always to contain data that is at most a few tens of milliseconds old. So why is the variation so large? What causes some frames to appear in openHistorian with only ~134 ms of delay, while others are delayed by more than 1.4 seconds?