Analytics & ML · Study deck

Acquisition Timing and Buffer Contracts

Imagine a vibration sensor that records a machine jolt during a network outage.

Data Dora is your guide for this deck.

edgetimingbuffer
Data Dora, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain why event time, receive time, and clock source must be recorded separately.
  • Choose NTP, PTP, or hardware timestamping based on sensor timing tolerance.
  • Design bounded buffers and backpressure policies before outages or bursts occur.
  • Pass acquisition metadata downstream so analytics can distinguish real events from timing, drift, or queue artifacts.
iotclass.org

Major section

Start With the Story

The reading has an event time, an arrival time, and a place in a waiting queue.

  • A buffer is temporary storage for data that cannot be handled at once.
  • A gateway is a local bridge from devices to another system.
  • The system should mark lost or late data instead of quietly changing the story.
iotclass.org

Major section

Analytics Inherits Acquisition

The mathematical gist: A catalog-typical 500 Hz vibration band needs at least 1,000 raw samples per second before it becomes this chapter's 100 Hz summary stream.

  • A 12-bit, 3.3 V ADC adds a separate 0.806 mV step and 0.233 mV RMS rounding noise.

Every analytics result rests on the data acquisition pipeline that produced its inputs.

Each stage can quietly corrupt the data, and downstream analytics will faithfully compute on the corruption.

Numbers to remember

0.806 mVADC step
iotclass.org

Major section

Event Time, Buffers, and Drift

When both are present, a later analytics job can tell whether a point was genuinely late, delayed in transit, or replayed after an outage.

  • For a slow temperature trend that may be tolerable.
  • For a 100 Hz vibration stream, where samples are 10 ms apart, the same one-hour drift is 18 samples of timing error.

Key terms

Downstream stages assume samples
Downstream stages assume samples are properly conditioned, sampled at a known rate, and accurately timestamped.

Why it matters

When it fills, you must drop, block, or aggregate — a deliberate policy, because an unmanaged full buffer silently loses data.

iotclass.org

Major section

Event Time, Buffers, and Drift (continued)

Buffers need the same explicit design.

  • A 64 kB buffer holds only about 13 seconds of that stream before it must block, drop, or aggregate.
  • During a two-minute cellular outage, the raw backlog would be about 576 kB, far beyond that small buffer.
  • A weak architecture just overwrites records silently.
iotclass.org

Major section

Event Time, Buffers, and Drift (continued)

The contract passed downstream should include the sample rate, source timestamp, clock source, sequence number, gateway receive time, buffer policy, and quality flags.

  • These fields are not bureaucratic metadata; they are how a dashboard distinguishes a real plant event from clock drift, link congestion, gateway reboot, or silent packet loss.
  • Event time vs arrival timeNetwork and buffering delays make the moment data arrives an unreliable clock.
  • Clocks must be re-synced periodically to keep timestamps accurate over a long deployment.
  • The acquisition contractDownstream stages assume samples are properly conditioned, sampled at a known rate, and accurately timestamped.
iotclass.org

Major section

Event Time, Buffers, and Drift (continued)

Both systems may show a smooth dashboard later, but only the first one tells the analyst which evidence is complete, summarized, or missing.

  • So the acquisition architecture is a contract, not a formality: condition the signal, sample at a known rate, timestamp at the source on a synchronised clock, and manage the buffer explicitly.
  • Honour it and analytics can trust its inputs; break any clause — especially time — and the most sophisticated model downstream is computing on data that never meant what it claims.
  • That distinction matters when a post-incident review asks whether the vibration spike was absent, averaged away, or lost during backpressure.
iotclass.org

Deck summary

Key takeaways

The reading has an event time, an arrival time, and a place in a waiting queue.

  • The mathematical gist: A catalog-typical 500 Hz vibration band needs at least 1,000 raw samples per second before it becomes this chapter's 100 Hz summary stream.
  • When both are present, a later analytics job can tell whether a point was genuinely late, delayed in transit, or replayed after an outage.
  • Buffers need the same explicit design.
  • The contract passed downstream should include the sample rate, source timestamp, clock source, sequence number, gateway receive time, buffer policy, and quality flags.
iotclass.org

Retrieval practice

Recall check 1 of 4

Data Dora says: answer from memory, then check your reasoning.

Q1Why is the data acquisition pipeline foundational to all downstream analytics?

AAcquisition quality is determined by encrypting its output.
BAnalytics computes on whatever acquisition produces
CDownstream analytics can repair missing or malformed inputs without acquisition changes.
DIt is not foundational; models fix any input problem.
Show answer

Answer: B Downstream stages inherit acquisition errors; clean acquisition is the foundation.

iotclass.org

Retrieval practice

Recall check 2 of 4

Data Dora says: answer from memory, then check your reasoning.

Q2Two sensors' clocks differ by tens of milliseconds. Why does this break multi-sensor fusion of a fast signal?

ABecause offset time bases misalign events and corrupt the fused fast signal.
BBecause gateway co-arrival proves samples were taken at the same instant.
CBecause higher sample rate alone makes fixed clock offsets irrelevant.
DBecause file order alone proves that sensors sampled at the same instant.
Show answer

Answer: A A common time base is required; clock skew misaligns samples and corrupts fusion.

iotclass.org

Retrieval practice

Recall check 3 of 4

Data Dora says: answer from memory, then check your reasoning.

Q3When source clocks are synchronized and monitored, why should sensor data be timestamped at the source (event time) rather than when it arrives at the server?

AArrival time is earlier than event time, so the server sees measurements too soon
BServers cannot record timestamps, so only source devices can attach any time value
CArrival time includes network and buffer delay, so it can misorder real events
DEvent time and arrival time are identical whenever packets eventually arrive
Show answer

Answer: C With synchronized source clocks, event-time stamps record when data was produced; arrival time adds network and buffer delay that can distort ordering.

iotclass.org

Retrieval practice

Recall check 4 of 4

Data Dora says: answer from memory, then check your reasoning.

Q4A gateway buffer fills during an outage. Which design keeps downstream analytics honest?

AOverwrite old readings silently so the dashboard appears continuous.
BReplace event time with upload time, hiding how long data was buffered.
CDeclare drop, block, or aggregation rules and mark lost or summarized spans.
DAssume the link recovers before the full buffer loses any readings.
Show answer

Answer: C A bounded queue needs an explicit full-buffer action and quality metadata.

iotclass.org

Print reference

Answers

Answer key.

  1. B · Downstream stages inherit acquisition errors; clean acquisition is the foundation.
  2. A · A common time base is required; clock skew misaligns samples and corrupts fusion.
  3. C · With synchronized source clocks, event-time stamps record when data was produced; arrival time adds network and buffer delay that can distort ordering.
  4. C · A bounded queue needs an explicit full-buffer action and quality metadata.
iotclass.org