Analytics & ML · Study deck

Edge Data: Sampling and Statistical Compression

This first route protects signal evidence through sampling and compares lossless, statistical, and transform reduction.

Data Dora is your guide for this deck.

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

After studying this chapter

Learning objectives

You will be able to:

  • Apply Nyquist Theorem: Calculate appropriate sampling rates for different sensor types
  • Implement Data Reduction Techniques: Use aggregation, compression, event-based reporting, and delta encoding
  • Select Compression Algorithms: Choose optimal algorithms based on data type and edge device constraints
  • Avoid Common Pitfalls: Prevent sampling aliasing, buffer overflow, and rate mismatch errors
iotclass.org

Major section

Start With the Story

If the device measures too rarely, no later data trick can rebuild the missing motion.

  • Sampling means taking readings at chosen times.
  • The sampling rate is how many readings are taken in one second.
  • Compression means using fewer bits to carry useful information.
  • Exact records may need a lossless method, which can rebuild every bit.

Why it matters

Trends may allow summaries.

iotclass.org

Major section

Edge Sampling Compression Basics

Edge sampling and compression reduce the amount of data IoT devices need to transmit.

  • By transmitting only important changes or compressed summaries, devices save battery power and network bandwidth while preserving the information that matters most.

Think of sending a friend the highlights of a movie instead of the entire film.

iotclass.org

Major section

Edge Data Reduction Basics

Core Concept: Transform raw sensor data into actionable information at the source - send summaries, statistics, and alerts rather than every reading.

  • Byte and radio-energy savings depend on payload and protocol overhead.
  • An average loses within-minute peaks and timing, so retain other features or raw windows when the application needs them.

Why it matters

Why It Matters: Sending one minute-average instead of 1,000 readings per minute reduces the record count 1,000-fold.

iotclass.org

Major section

Key Concepts

Adaptive sampling: Dynamically adjusting the sensor sampling rate based on signal variance or event rate — increasing frequency when the signal changes rapidly and decreasing it during quiet periods.

  • Delta encoding: A compression technique transmitting only the change between consecutive readings rather than absolute values, highly effective for slowly varying sensors.

Why it matters

Lossless compression: Compression that allows perfect reconstruction of the original data — required for financial billing data, safety-critical readings, and regulatory compliance.

iotclass.org

Major section

Phoebe's Field Notes: Why Sampling First Protects Compression

For this exercise, suppose a hypothetical source produces eight impulses per shaft revolution: its repetition rate is 240 Hz, with harmonics at 480 Hz and 720 Hz.

  • Strict Nyquist for the third harmonic needs 1,440 Hz, and the chapter's 2.5× margin needs 3,600 Hz.

A 1,800 RPM shaft rotates at 30 Hz.

At 4 kHz and two bytes per sample, raw data is 8,000 B/s; a 120 B/s peak record is a 66.7× reduction without discarding the input's 16-bit resolution.

Numbers to remember

1,440 HzThe third harmonic
iotclass.org

Major section

Putting Numbers to It

Illustrative impulse frequency (not a bearing-defect prediction):: If a source produces eight impulses per 30 Hz shaft revolution, its repetition rate is 8×30=2408 \times 30 = 2408×30=240 Hz.

  • Nyquist frequency = 50 Hz, but the illustrative component is at 240 Hz.

What sampling rate captures an illustrative 240 Hz impulse train on a 1800 RPM motor shaft?

iotclass.org

Major section

Try It: Edge Aggregation Data Reduction

Adjust the sensor sampling rate and aggregation window size to see how edge aggregation reduces data volume.

  • The widget calculates the bandwidth reduction and shows what information is preserved versus lost.

Adjust the sensor sampling rate and aggregation window size to see how edge aggregation reduces data volume. The widget calculates the bandwidth reduction and shows what information is preserved versus lost.

iotclass.org

Deck summary

Key takeaways

If the device measures too rarely, no later data trick can rebuild the missing motion.

  • Edge sampling and compression reduce the amount of data IoT devices need to transmit.
  • Core Concept: Transform raw sensor data into actionable information at the source - send summaries, statistics, and alerts rather than every reading.
  • Adaptive sampling: Dynamically adjusting the sensor sampling rate based on signal variance or event rate — increasing frequency when the signal changes rapidly and decreasing it during quiet periods.
  • For this exercise, suppose a hypothetical source produces eight impulses per shaft revolution: its repetition rate is 240 Hz, with harmonics at 480 Hz and 720 Hz.
iotclass.org

Retrieval practice

Recall check 1 of 2

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

Q1A 60 Hz shaft signal has illustrative components at the 2x, 3x, and 4x harmonics. What is the nominal Nyquist rate (twice the highest frequency of interest) before adding a practical sampling margin?

A120 Hz, which is twice the motor's base rotation frequency of 60 Hz
B240 Hz, matching the highest harmonic frequency exactly
C60 Hz, since the motor completes one full rotation at that rate
D480 Hz, twice the highest harmonic of interest at 240 Hz (Nyquist)
Show answer

Answer: D The nominal Nyquist rate is twice the highest frequency of interest: 2 × (4 × 60 Hz) = 480 Hz.

iotclass.org

Retrieval practice

Recall check 2 of 2

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

Q2A binary contact stays closed for many records. The receiver must restore the exact state sequence. Which reduction fits?

ARun-length encode repeated states and counts; retain time boundaries.
BKeep only a daily average, losing the exact sequence of contact states.
CUse a lossy sketch and discard each transition needed for sequence replay.
DDiscard repeats without storing run length, so exact recovery is impossible.
Show answer

Answer: A Repeated equal states can be represented without losing the sequence.

iotclass.org

Print reference

Answers

Answer key.

  1. D · The nominal Nyquist rate is twice the highest frequency of interest: 2 × (4 × 60 Hz) = 480 Hz.
  2. A · Repeated equal states can be represented without losing the sequence.
iotclass.org