Sensor Foundations · Module 1 — Measurement
The Sensor Stack: From Physics to Machine Learning
One diagram, seven layers. From a physical phenomenon through the analog front end, converter, preprocessing, features and embeddings, into a model and finally a decision that moves an actuator — and the failure mode that lives in each layer.
Prerequisite: how-sensors-turn-the-physical-world-into-data

Engineers from different disciplines rarely disagree about facts. They disagree because they are standing on different layers of the same stack and using the same words for different objects. When a mechatronics engineer says "the signal is noisy", a machine-learning engineer hears "the labels are unreliable", and a firmware engineer hears "the ground return is shared with the motor". Learning the layer map is how you become useful in that room.
1. The seven layers
Diagram · Vertical stack: phenomenon → sensor → analog front end → ADC → preprocessing → features/embeddings → model → decision/control, with a feedback arrow from control back to phenomenon
| Layer | Owner in a typical team | Signature failure |
|---|---|---|
| Physical phenomenon | Domain expert / process owner | Measuring a proxy that only correlates with what matters |
| Sensor / transducer | Instrumentation engineer | Wrong range, cross-sensitivity, poor placement |
| Analog front end | Electronics engineer | Noise coupling, saturation, impedance mismatch |
| ADC / acquisition | Embedded engineer | Aliasing, timestamp jitter, dropped frames |
| Preprocessing | Shared, therefore often nobody | Train/serve mismatch in normalisation |
| Features / embeddings | ML engineer | Leakage, shortcut learning, brittle handcrafting |
| Model | ML engineer | Overfitting, uncalibrated confidence |
| Decision / control | Controls engineer | Chattering, unsafe actions on low-confidence inputs |
2. Phenomenon: the layer you cannot debug later
Before instrumentation you choose what physical story you believe. Crust formation is a coupled heat-and-mass-transfer process with a chemistry layer on top: water leaves the surface, surface temperature rises past the point where Maillard reactions accelerate, volatile compounds are produced and carried away by airflow. Each clause in that sentence suggests a channel — thermal, mass, gas, acoustic. If your physical story is wrong, your sensor selection is wrong, and no later layer will tell you why.
3. Sensor and analog front end: the information ceiling
Layers two and three set an upper bound on everything above. If the microphone's useful band stops at 8 kHz, the sizzle harmonics above it are gone. If the amplifier saturates during the first thirty seconds of searing, that interval is not merely noisy — it is absent. Machine learning cannot invent information that the front end discarded; it can only redistribute what remains.
4. Acquisition: timestamps are data
Multimodal systems live or die on time alignment. A camera at 30 frames per second, a probe at 1 Hz, an inertial unit at 400 Hz and a gas array with a 20-second response time do not share a clock or a latency. Fusion requires a common timebase, an explicit resampling policy, and honesty about each channel's group delay.
import pandas as pd
# Align three channels onto a common 1 Hz grid, respecting each one's nature.
grid = pd.date_range(start, end, freq="1s")
probe = probe_df.reindex(grid, method="nearest", tolerance="2s") # slow, smooth
mass = mass_df.resample("1s").mean() # average out fan vibration
sizzle = audio_energy_df.resample("1s").max() # transients matter, keep the peak
# A gas sensor with ~20 s response is shifted, not just resampled.
voc = voc_df.shift(freq="-20s").reindex(grid, method="nearest")You will not write this code, but you should recognise it. The three different aggregation choices — nearest, mean, max — encode three physical claims. Reviewing those claims is a design conversation, not a coding one.
5. Preprocessing: the layer that silently breaks deployments
Preprocessing is deterministic and unglamorous: detrend, remove baseline, normalise, window, resample. Its danger is that it usually exists twice — once in the training notebook and once in the deployed firmware. Any divergence between the two produces a model that scored well offline and behaves strangely in the kitchen. Mature teams define preprocessing once, as shared, versioned code, and treat any duplication as a defect.
6. Features and embeddings: two ways to compress
A feature is physics you wrote down. Spectral centroid for brightness of a sizzle. Rate of mass loss per minute. Slope of the VOC baseline over the last ninety seconds. Features are interpretable, sample-efficient, and only as good as your hypothesis.
An embedding is physics the network inferred. You give a convolutional or transformer encoder raw spectrograms and it produces a vector whose geometry encodes similarity. Embeddings capture structure you never articulated — and also structure you never wanted, like the acoustic signature of your particular extraction fan.
| Hand features | Learned embeddings | |
|---|---|---|
| Data appetite | Tens to hundreds of examples | Thousands and up |
| Interpretability | High — each number has a name | Low without probing tools |
| Transfer to new hardware | Predictable, correctable | Often fragile |
| Ceiling on performance | Limited by your hypotheses | Higher, given data and diversity |
| Best used | Early prototypes, regulated decisions | Mature data pipelines, perceptual tasks |
7. Where to fuse
Fusion depth is one of the few genuinely architectural decisions in a multimodal system.
- 01Signal-level (early) fusion: combine synchronised raw streams into one tensor. Maximum information, maximum sensitivity to missing channels and clock error.
- 02Feature-level fusion: compute per-modality features or embeddings, then concatenate. The common industrial compromise; degrades gracefully when a channel drops.
- 03Decision-level (late) fusion: each modality produces a score, then a rule or small model arbitrates. Most robust, most interpretable, lowest ceiling.
Diagram · Three side-by-side fusion architectures showing where streams merge: at the signal, at the feature vector, at the score
8. Model: calibration matters more than accuracy
For control systems, a model's confidence is as consequential as its prediction. An 85%-accurate model that knows when it is unsure is far more useful than a 90%-accurate model that is uniformly certain, because the first can defer to a human or a conservative default and the second cannot. Ask for reliability diagrams, not just accuracy numbers.
9. Decision, control and the feedback arrow
The final layer converts belief into action: reduce fan speed, hold the setpoint, alert the operator. Two properties dominate. First, latency budget — the sum of acquisition, transport, inference and actuation delay, which must be short relative to the process time constant. Second, hysteresis in the decision itself, so the system does not oscillate between two actions at the boundary.
| Stage | Illustrative budget | Note |
|---|---|---|
| Acquisition + buffering | 40 ms | One camera frame plus queueing |
| Transport | 5 ms on-device / 120 ms cloud | The single biggest architectural lever |
| Inference | 25 ms quantised on NPU | Measure on target, never on a laptop |
| Actuation | 300 ms | Thermal systems are slow; this is often fine |
10. A diagnostic order of operations
- 01Reproduce on recorded data. If it disappears, the problem is in acquisition or timing, not the model.
- 02Compare training and production distributions per channel. Look for a sensor that moved, aged or was replaced.
- 03Verify preprocessing parity between notebook and device, byte for byte.
- 04Check calibration and drift records for every channel.
- 05Only then question the model architecture.
Recap
The stack runs from phenomenon to action, and information only ever decreases as you climb it. Layers one to four decide what is knowable; layers five and six decide what is expressed; layer seven decides what is believed; layer eight decides what is done — and then quietly changes layer one. Hold the whole picture and you can locate almost any problem to a layer within a few questions. That single skill is what lets a non-specialist founder hold a serious conversation with the specialists building the machine.
Engineer vocabulary
- Analog front end
- Amplification, filtering and buffering between transducer and converter.
- Preprocessing
- Deterministic cleanup: resampling, detrending, normalisation, windowing.
- Feature
- A hand-designed scalar summarising a signal window, e.g. spectral centroid.
- Embedding
- A learned vector representation produced by a trained network.
- Early fusion
- Combining raw or lightly processed signals before modelling.
- Late fusion
- Combining independent per-modality decisions or scores.
- Inference latency
- Time from input tensor to output prediction on the target hardware.
- Quantisation
- Representing weights and activations in fewer bits to fit and accelerate edge deployment.
- Distribution shift
- Production data differing statistically from training data.
- Closed loop
- A system whose actions change the very measurements it depends on.
Key concepts to carry forward
- The stack has seven layers, and each one destroys information the layers above can never recover.
- Features are hand-written physics; embeddings are learned physics. Both are compressions with an agenda.
- Latency is a system property: the sum of acquisition, transport, inference and actuation, not the model's inference time.
- Fusion happens at three possible depths — signal, feature or decision — and the choice is an architectural commitment.
- The stack's weakest layer sets performance, and it is almost never the model.
Questions I should be able to answer
- 01Can I name all seven layers of my own system and who owns each one?
- 02At which layer am I fusing modalities, and why there rather than one layer up or down?
- 03What is my end-to-end latency budget, and which layer consumes most of it?
- 04Which features encode physics I actually believe, and which are superstition?
- 05If accuracy drops in production, what is my ordered list of layers to inspect?
- 06What does my model see that it should not — a lamp, a room, a technician's habit?
Sources
- Sample citation — survey of multimodal fusion architectures — Demo reference, 2026
- Sample citation — edge inference latency benchmarking note — Demo reference, 2026
Related
Filed under Sensor Fundamentals · Signal Processing · Machine Learning · Sensor Fusion · Edge AI · Embedded Systems