Capstone & Appendix · Study deck

IoT Mathematics: Fusion and Sampling Decisions

GPS drifts slowly while an accelerometer reacts fast.

Sammy is your guide for this deck.

mathematicalfoundations
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Work through a Kalman filter for GPS and motion data.
  • Choose a sample rate with the Nyquist rule.
  • Explain: Example: Current state is position (100m, 200m), velocity (15 m/s, 0 m/s), Δt=0.1s\Delta t = 0.1sΔt=0.1s.
  • Explain: Where fmaxf_{max}fmax​ is the highest frequency component in your signal.
iotclass.org

Major section

Worked Example: Designing a Kalman Filter for GPS-Accelerometer Fusion

Example: Current state is position (100m, 200m), velocity (15 m/s, 0 m/s), Δt=0.1s\Delta t = 0.1sΔt=0.1s.

  • Step 3: Measurement Update (GPS Reading): GPS reports position (103m, 201m) with sigma = 10m uncertainty.
  • Key Insight: Kalman filter prevents dead reckoning drift by periodically re-anchoring position with GPS, while smoothing GPS noise with prediction.
iotclass.org

Major section

Decision Framework: Choosing Sampling Rates Using Nyquist Theorem

Where fmaxf_{max}fmax​ is the highest frequency component in your signal.

  • Step 3: Add Safety Margin: For this example, use 2.5x the 720 Hz Nyquist minimum to allow filter roll-off.
  • Decision: 2 kHz (exceeds requirement, standard IC availability).
  • Decision: In this ADC-only model, 2 kHz sampling provides a 2.8x margin over the Nyquist minimum while preserving 7+ years of battery life.
iotclass.org

Major section

Decision Framework: Choosing Sampling Rates Using Nyquist Theorem (continued)

Nyquist requires fsample>120f_{sample} > 120fsample​>120 Hz, so 100 Hz causes aliasing.

  • The Problem: Students often use the power formula dB=10log⁡10(P2/P1)dB = 10\log_{10}(P_2/P_1)dB=10log10​(P2​/P1​) when comparing voltages, leading to 6 dB errors.
  • The student's 10 dB answer is off by 10 dB (a 10× power-ratio difference, or about 3.16× in voltage ratio).
iotclass.org

Major section

Common Mistake: Misapplying dB Calculations to Voltage vs. Power

Memory trick: Voltage uses 20 log because power depends on voltage SQUARED (the 2 becomes a multiplier in the log).

  • Given: LoRa transmitter outputs 14 dBm (25 mW), path loss is 120 dB, receiver sensitivity is -137 dBm.
  • In this simplified link budget, the link has 31 dB margin (1,259x power above minimum); verify fading and interference before claiming reliable field operation.
  • Common mistake: Student adds voltage gain (in dBV) to power budget (in dBm) - units must match!
iotclass.org

Deck summary

Key takeaways

Example: Current state is position (100m, 200m), velocity (15 m/s, 0 m/s), Δt=0.1s\Delta t = 0.1sΔt=0.1s.

  • Where fmaxf_{max}fmax​ is the highest frequency component in your signal.
  • Nyquist requires fsample>120f_{sample} > 120fsample​>120 Hz, so 100 Hz causes aliasing.
  • Memory trick: Voltage uses 20 log because power depends on voltage SQUARED (the 2 becomes a multiplier in the log).
iotclass.org

Retrieval practice

Recall check 1 of 4

Test Tessa says: answer from memory, then check your reasoning.

Q11. Decibels (dB) are primarily a:

Alinear unit of distance
Blogarithmic way to represent ratios
Cprobability distribution
Dcryptographic hash function
Show answer

Answer: B dB scales compress large ratios using logarithms (e.g., 10*log10(P2/P1) for power ratios), which is useful in RF and signal analysis.

Q22. In an RC circuit, the time constant is defined as:

Atau = R / C (divide resistance by capacitance)
Btau = C / R
Ctau = R x C (multiply resistance by capacitance)
Dtau = R + C (add resistance and capacitance)
Show answer

Answer: C The RC time constant tau = R*C sets the exponential charging/discharging rate (e.g., V(t) = V0*e^(-t/tau) for discharge).

iotclass.org

Retrieval practice

Recall check 2 of 4

Test Tessa says: answer from memory, then check your reasoning.

Q34. Modular arithmetic is most directly relevant to:

Aaudio equalization filters in a speaker or microphone signal chain
BWi-Fi mesh routing decisions across neighboring access points
Cpublic-key cryptography and key exchange math
Dbattery discharge curves in a current-over-time estimate
Show answer

Answer: C Many cryptographic schemes rely on arithmetic over finite fields or modular rings (e.g., operations mod a prime), making modular arithmetic foundational for crypto.

Q46. The Fourier transform converts a signal from:

Aanalog to digital domain
Btime domain to frequency domain
Cencrypted to plaintext form
Dcontinuous to discrete samples
Show answer

Answer: B The Fourier transform decomposes a time-domain signal into its frequency components.

iotclass.org

Retrieval practice

Recall check 3 of 4

Test Tessa says: answer from memory, then check your reasoning.

Q5In Shannon's formula C = B log2(1 + SNR), if SNR stays fixed, what does doubling bandwidth do to the theoretical capacity?

Aquadruples the maximum theoretical data rate
Bhas no effect on data rate
Chalves the required SNR
Ddoubles the maximum theoretical data rate
Show answer

Answer: D Shannon's formula shows capacity is linear with bandwidth (B) but logarithmic with SNR.

iotclass.org

Retrieval practice

Recall check 4 of 4

Test Tessa says: answer from memory, then check your reasoning.

Q6A sensor samples at 1000 Hz and then applies a five-sample moving average without decimation. What is the nominal Nyquist frequency of the sampled sequence?

A500 Hz, the Nyquist limit set by the 1000 Hz sample rate
B1000 Hz, because the sampling rate names the highest signal frequency
C200 Hz, because a five-sample moving average divides the rate by five
D100 Hz, because each window needs ten samples before aliasing appears
Show answer

Answer: A At a 1000 Hz sample rate the nominal Nyquist frequency is 500 Hz.

iotclass.org

Print reference

Answers 1 of 2

Answer key.

  1. B · dB scales compress large ratios using logarithms (e.g., 10*log10(P2/P1) for power ratios), which is useful in RF and signal analysis.
  2. C · The RC time constant tau = R*C sets the exponential charging/discharging rate (e.g., V(t) = V0*e^(-t/tau) for discharge).
  3. C · Many cryptographic schemes rely on arithmetic over finite fields or modular rings (e.g., operations mod a prime), making modular arithmetic foundational for crypto.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. B · The Fourier transform decomposes a time-domain signal into its frequency components.
  2. D · Shannon's formula shows capacity is linear with bandwidth (B) but logarithmic with SNR.
  3. A · At a 1000 Hz sample rate the nominal Nyquist frequency is 500 Hz.
iotclass.org