A field guide  /  signals from the physical world

Time Series as Sensory Data

Every sensor is a storyteller that can only say numbers, one at a time, forever. This is a plain-language tour of how those numbers become a time series, what hides inside them, and how machines learn to listen, all the way from a single sample to a remaining-useful-life estimate running on a chip.

live sensor stream vibration · 50 Hz sampling

Section 01

What a time series really is

A time series is the simplest idea in data, dressed up in a fancy name: it is a list of measurements, written down in the order they happened. Your morning weight on a bathroom scale, the temperature outside each hour, the price of a stock each minute, the vibration of a spinning motor a few thousand times a second. Same shape every time: a value, and the moment it was taken.

What makes it special is the order. If you shuffle a spreadsheet of customer names, you lose nothing. If you shuffle a heartbeat trace, you destroy it. In a time series the position of each number is information. Tomorrow depends on today.

The sensor's point of view

A sensor cannot see, hear, or feel the way we do. It does exactly one trick: it converts some physical quantity into a number it can repeat over and over. A thermocouple turns heat into a voltage. An accelerometer turns motion into a charge. A current clamp turns magnetic field into amps. Sensory data is just the world translated into a stream of numbers in time. The whole craft of working with it is learning to translate back.

Once you see it this way, a surprising amount of the world is a time series waiting to be read. The strip chart at the top of this page is one: a vibration signal scrolling left as fresh samples arrive on the right, exactly how a condition-monitoring dashboard would show a bearing or a gearbox.

Sample

One single measurement: a value plus its timestamp. The atom of a time series.

Sampling rate

How many samples per second. Written in hertz (Hz). 50 Hz means 50 numbers every second.

Channel

One stream from one sensor. A car logs hundreds of channels at once: speed, temperatures, currents, pressures.

Window

A short slice of recent history, say the last 2 seconds, that we analyze as a unit.

Section 02

From a wave to a list of numbers

The physical world is smooth and continuous. A vibrating shaft does not move in steps; it sweeps through every position in between. But a computer can only store numbers it has actually looked at, at specific instants. The act of looking at fixed intervals is called sampling, and how often you look is the single most important decision you make about a signal.

Look often enough and the dots trace the true wave. Look too rarely and something strange happens: a fast wave can disguise itself as a slow one. The samples line up on a completely different, slower curve that was never really there. This illusion is called aliasing, and it is the classic trap of sensory data.

The rule that saves you has a name, the Nyquist criterion: to capture a wave honestly, you must sample at least twice as fast as the fastest frequency in it. Sample a 10 Hz vibration and you need at least 20 samples per second, and in practice quite a bit more. Drag the sliders below and watch the alias appear the moment you cross that line.

FIGURE 1 · sampling & aliasing  · interactive
Grey curve: the real wave. Rust dots: what the sensor actually records. Teal curve: the slowest wave that fits those dots, which is what your software will believe. When sampling drops below twice the signal frequency (the Nyquist line), the teal alias splits away from the truth.

Practical note · pick your rate from the physics

Choose a sampling rate from what you are trying to see, not from what is convenient. For bearing fault frequencies in the kilohertz range you may sample at 20 to 50 kHz; for a slow thermal drift, once per second is plenty. When in doubt, oversample and an anti-alias filter (an analog low-pass filter before the converter) removes content above half the sampling rate so it cannot fold back and lie to you.

The other compromise: quantization

There is a second, quieter trade happening at the same instant. The converter does not store infinitely precise values; it rounds each one to the nearest rung on a ladder of allowed levels. This is quantization, and the number of rungs is set by the converter's bit depth. An 8-bit converter has 256 levels; a 12-bit one has 4096. The rounding error you cannot avoid sets the noise floor of everything downstream, and each extra bit buys you about 6 dB of headroom. Drop the bit depth below and watch the smooth wave turn into a staircase, with the leftover error shown as its own little signal.

FIGURE 2 · quantization & bit depth  · interactive
Grey: the true analog signal. Rust staircase: the value the converter actually stores. Teal trace at the bottom: the quantization error, the part thrown away by rounding. Add bits and the staircase steps shrink toward the smooth truth; starve the signal of range and the relative error grows.

Section 03

Getting the data trustworthy

Before any clever analysis, real sensory data needs a wash. Samples almost never arrive on a perfect clock. Timestamps jitter, different channels run at slightly different rates, packets show up out of order, and sometimes the sensor simply goes quiet for a while. Most painful bugs in a monitoring system trace back not to the values but to time: two channels that look correlated only because they were silently misaligned, or a gap that a model quietly read as a run of zeros.

The fix is to put everything onto one even, shared time grid by resampling, and to decide on purpose what to do with the holes. The three common choices each tell a different small lie. Forward-fill repeats the last known value, which is honest for a setpoint but wrong for a fast signal. Linear interpolation draws a straight line across the gap, smooth but invented. Leaving the gap is the most honest, but every downstream step then has to cope with missing data. Toggle between them below over a stream with jittered timing and a dropout.

FIGURE 3 · resampling & gap handling  · interactive
gap method: linear interpolate forward-fill leave gap
Grey dots: the raw samples as they actually arrived, unevenly spaced, with a dropout in the middle. Rust line: the signal placed onto a clean uniform grid using the chosen method. Notice how forward-fill makes a flat ledge across the gap while interpolation guesses a slope that may or may not be real.

Practical note · keep the metadata with the data

A raw count is not a temperature. Carry the calibration, scale, zero-offset, units, and the true sampling rate alongside every channel, and sanity-check ranges before anything else. A pressure of negative one thousand is almost always a wiring or scaling error, not physics. And when you fill a gap, keep a flag marking which points were measured and which were invented, so later stages can choose to trust them or not.

Section 04

The anatomy of a sensor signal

A raw sensor trace looks like a mess, but it is usually a mess made of a few simple ingredients stacked on top of each other. A useful first move is to imagine pulling them apart. Most signals are some combination of:

Trend

The slow drift up or down. A motor warming up over minutes, a battery discharging, a filter slowly clogging.

Periodic part

Anything that repeats: the rotation of a shaft, a daily cycle, the firing of an engine. Also called seasonality.

Noise

The fast, random jitter with no pattern. Electrical pickup, sensor grain, quantization, the world being busy.

This split is more than tidy bookkeeping. Each ingredient tells a different story to a diagnostic engineer. A rising trend may mean wear or fouling. A change in the periodic part often points to a specific rotating component. A jump in the noise level can mean a loose connection or a failing sensor. Below, build a synthetic signal by mixing the three and watch how the personality of the trace changes.

FIGURE 4 · signal decomposition  · interactive
The faint coloured lines are the ingredients (ochre trend, teal periodic part). The bold rust line is what the sensor actually delivers: their sum, plus noise. Real analysis runs this in reverse, starting from the bold line and trying to recover the parts.

A signal whose ingredients stay put over time, the same average level, the same wobble, is called stationary. One whose character keeps shifting, a growing trend or a wobble that gets wider, is non-stationary. The distinction matters because many of the easiest tools assume stationarity, and a slow drift can quietly break them. A common fix is differencing: instead of the value itself, work with how much it changed since last time, which often flattens a trend away.

Section 05

Two ways to look: time and frequency

So far we have watched signals as a line moving through time. There is a second, almost magical way to look at the same data. Any repeating signal, no matter how jagged, can be rebuilt by adding together pure sine waves of different speeds. List how much of each speed is present and you have the signal's spectrum: its recipe in terms of frequencies. The mathematical machine that computes this is the Fourier transform, and its fast computer version is the FFT.

Why bother? Because faults love to hide in the frequency view. A worn gear, an unbalanced fan, a cracked rotor bar each ring at their own characteristic frequency. In the time trace they all blur together into one wobble. In the spectrum they stand apart as separate spikes, each one a suspect with an address. Build a signal from a few tones below and watch the spectrum pick them out.

FIGURE 5 · time domain vs. frequency domain  · interactive
Top: the signal in time, a single tangled wiggle. Bottom: its spectrum from an FFT, where each tone you mixed in becomes its own labelled peak. Add noise and the peaks stay put while a low fuzzy carpet rises beneath them, which is exactly how you tell signal from noise.

Practical note · the price of the spectrum

The FFT is not free of trade-offs. You compute it over a window, and a short window gives blurry frequency resolution while a long window blurs when things happened. Cutting a window also creates fake edges that smear energy across the spectrum, so we taper the ends with a window function (Hann, Hamming, and friends) before transforming.

When the frequency itself moves: the spectrogram

A single FFT assumes the recipe holds still for the whole window. Real machines do not oblige: a motor runs up, a fan coasts down, a fault comes and goes. The spectrogram handles this by computing an FFT on a short window, sliding it forward a little, and stacking the results into an image, time across the bottom, frequency up the side, brightness showing how much energy is present. A steady tone draws a flat horizontal line; a run-up draws a rising diagonal ridge. Sweep the start and end frequency below and watch the ridge tilt.

FIGURE 6 · spectrogram of a run-up  · interactive
Each vertical strip is one short-window FFT; darker means more energy at that frequency. The bright diagonal is the sweeping tone of the run-up, and the faint horizontal line is a steady background tone. This time-and-frequency picture is the workhorse view for any machine whose speed changes.

Section 06

Order tracking: vibration vs. shaft speed

The frequency view assumes the machine holds a steady speed. Rotating machinery rarely obliges. During a run-up or under varying load the shaft speed sweeps, and so do all the vibration components tied to it: the once-per-rev imbalance, the gear-mesh tone, the bearing rates. A plain spectrum of such a record is a smear, because every fault frequency wandered across the bin while you were measuring.

The fix is to stop measuring in time and start measuring in angle. With a tachometer giving shaft position, you resample the signal onto a grid of equal shaft increments rather than equal time steps. In that angular domain a component locked to the shaft sits at a fixed order, an integer multiple of rotation, no matter how the speed varied. The smear collapses into sharp lines. The simulation runs a speed ramp with components at orders one, two and three; compare the blurred time-domain spectrum against the crisp order spectrum after angular resampling.

FIGURE 7 · time spectrum vs. order spectrum under a speed ramp  · interactive
time-domain spectrum order spectrum (resampled)
Top: the ordinary frequency spectrum of a variable-speed record. With no ramp the peaks are sharp; add ramp and they smear into broad humps as each component sweeps across frequency. Bottom: the same signal resampled to equal shaft angle. The orders snap back to sharp lines at one, two and three times rotation, exactly where the imbalance, misalignment and a blade-pass term live, regardless of how the speed moved.

Section 07

Memory in the signal: autocorrelation

Sensory data has memory. The temperature now is a good guess for the temperature a second from now; a heartbeat now hints at the next beat's timing. Autocorrelation measures exactly this: how much a signal resembles a time-shifted copy of itself. Shift the signal by a small lag, slide it over the original, and ask how well they match. Do this for every lag and you get a curve that reveals the signal's rhythm.

A purely random signal looks like nothing but itself, so its autocorrelation is a single spike at zero lag and flat everywhere else. A periodic signal, by contrast, lights up again at lags equal to its period, and at multiples of it. That makes autocorrelation a quiet, robust way to find a repeating beat even when it is buried in noise, which is why it underpins pitch detection, heart-rate estimation, and rotating-machinery diagnostics.

FIGURE 8 · autocorrelation  · interactive
Top: a periodic signal nearly drowned in noise, where the eye struggles to find the beat. Bottom: its autocorrelation, where the period announces itself as evenly spaced teal peaks. Push the noise up and notice how the peaks survive long after the rhythm is invisible in the raw trace.

Section 08

Cleaning the signal: smoothing and filters

Raw sensory data is rarely usable as it arrives. Noise hides the trend you care about; an occasional glitch throws off any average. Filtering is the family of techniques for keeping the part you want and suppressing the part you do not. The simplest and most common is the moving average: replace each point with the average of itself and its neighbours in a small window. Wider window, smoother result.

But smoothing always costs something. A wide moving average is sluggish; it lags behind sudden changes, so a real step in the signal arrives late and softened. An exponential moving average (EWMA) is a popular middle ground that weights recent samples more heavily, reacting faster while still calming the noise. Choosing how much to smooth is a permanent tug of war between a clean line and a responsive one.

FIGURE 9 · smoothing & lag  · interactive
Faint grey: the noisy raw signal, which hides a clean step in the middle. Teal: a moving average, smooth but late to the step. Rust: an EWMA. Widen the window and watch the smoothing improve while the response to the step gets slower. There is no free lunch.

Beyond the moving average

Moving averages are low-pass filters: they keep slow changes and drop fast ones. The same idea generalizes to high-pass filters (keep the fast, drop the slow, good for spotting sudden events), band-pass filters (keep only a chosen frequency band, good for isolating a known fault frequency), and median filters that excel at removing isolated spikes without smearing edges. Each is just a different rule for combining nearby samples.

Section 09

Designing a digital filter

Smoothing was a blunt instrument; a real filter lets you keep exactly the band you want and reject the rest. The Butterworth design is the workhorse, prized for a magnitude response that is maximally flat in the passband with no ripple, rolling off ever more steeply as you raise the order. Pick a shape, lowpass to keep the slow trend, highpass to isolate the vibration, bandpass to zoom on a resonance, set the cutoff and the order, and you have shaped the spectrum deliberately.

The cost of a sharper roll-off is a longer filter and more phase distortion, which is why offline analysis often filters forward and backward to cancel the phase shift. The simulation draws the Butterworth magnitude response you design, then applies it to a test signal that mixes a slow component, a fast one and noise, so you can watch the unwanted parts vanish as you tune the filter.

FIGURE 10 · Butterworth response & the filtered signal  · interactive
type: low-pass high-pass band-pass
|H(f)| response input signal filtered output
Top: the magnitude response of the filter you designed, against normalised frequency. Bottom: a test signal of a slow tone plus a fast tone plus noise (grey) and the filtered result (rust), computed by applying the response in the frequency domain. Switch to high-pass and the slow tone disappears; raise the order and the transition between kept and rejected sharpens toward a brick wall.

Section 10

Finding the impulsive band: spectral kurtosis

Envelope analysis, next, only works if you band-pass the signal around the right resonance before demodulating. Choose the wrong band and the bearing impacts stay buried. Spectral kurtosis answers the question of which band by measuring, frequency band by frequency band, how impulsive the signal is there. Kurtosis is the statistic that spikes when a signal has occasional large bursts against a quiet background, exactly the fingerprint of a bearing impact buried in noise.

Sweep a filter bank across the spectrum, compute the kurtosis of each band-filtered signal, and the band with the highest kurtosis is the one where the impacts ring loudest relative to the noise. The full method tiles a frequency-versus-bandwidth plane into the kurtogram; the simulation shows the essential one-dimensional version, scanning bands and crowning the most impulsive one as the band to hand to envelope analysis.

FIGURE 11 · kurtosis across a filter bank  · interactive
raw signal kurtosis per band selected band
Top: the raw vibration, impacts hidden in broadband noise. Bottom: the kurtosis of each band in a filter bank. The band holding the impulsive fault rises above the rest and is crowned in rust; that is the band to band-pass before envelope analysis. Move the fault and the peak follows; bury it in noise and the peak shrinks toward the flat kurtosis of pure noise.

Section 11

Hunting specific faults: envelope analysis

Here is a technique that feels like a magic trick the first time you see it work, and it is the bread and butter of bearing diagnostics. A damaged bearing does not hum at the defect frequency directly. Instead, every time a rolling element strikes the tiny spall on the race, it rings the whole structure like a bell at a high resonance, thousands of hertz up. What carries the diagnosis is not that ringing but its rhythm: the bell gets struck once per defect period. The defect frequency rides as a slow modulation on a fast carrier.

Plain spectrum analysis often misses this, because the energy is smeared around the high resonance, far from the low defect frequency you actually want. Envelope analysis recovers it in three moves: band-pass around the resonance to isolate the ringing, take the envelope (the slow outline of the bursts, found by rectifying and smoothing), then run an FFT on that envelope. The defect frequency, invisible before, now stands up as a clean peak with harmonics.

FIGURE 12 · envelope analysis of bearing impacts  · interactive
defect preset: BPFO 9.5 BPFI 15 BSF 6
Top: the raw vibration, a fast resonance ringing in repeated bursts. Middle: the extracted envelope (rust), the slow outline tracing one bump per impact. Bottom: the envelope spectrum, where the defect frequency you set appears as a labelled peak with harmonics. Drop the severity toward zero and the peak sinks into the noise, exactly the early-fault situation a monitor must catch.

Section 12

Harmonic families: the cepstrum

Some faults announce themselves not as a single tone but as a whole family of evenly spaced lines: a gear mesh ringing at its fundamental and a long train of harmonics, or a bearing tone flanked by sidebands from amplitude modulation. The spectrum shows a picket fence of peaks, and reading the spacing by eye is fiddly. The cepstrum turns that family into a single peak.

The trick is to take the spectrum of the log spectrum. A regular comb of harmonics spaced by some frequency is itself periodic along the frequency axis, and a second transform of the log magnitude finds that period, placing a peak at a quefrency equal to one over the spacing. Whole harmonic families collapse to one clear marker whose position reads off the spacing directly. The simulation builds a fundamental with many harmonics and sidebands, then shows the comb in the spectrum and the single rahmonic peak in the cepstrum.

FIGURE 13 · spectrum comb → cepstrum peak  · interactive
log magnitude spectrum cepstrum detected rahmonic
Top: the log spectrum, a comb of harmonics whose spacing carries the diagnostic information. Bottom: the cepstrum, where that entire comb becomes one peak at the quefrency equal to one over the spacing, marked in ochre. Widen the spacing and the cepstral peak slides toward lower quefrency; the readout compares the spacing recovered from the peak against the truth.

Section 13

Turning signals into features

A machine learning model rarely eats a raw waveform. Thousands of wiggling samples are too many, too redundant, and too sensitive to exactly when you started recording. Instead we summarize each window of signal into a short list of meaningful numbers called features. Good features are compact, they survive small shifts in timing, and they change in a way that tracks the health of the thing being measured.

Features come in two big families. Time-domain features are statistics of the raw values: the mean, the spread (standard deviation), the peak, and shape numbers like root-mean-square, crest factor, and kurtosis that are sensitive to spiky impacts. Frequency-domain features come from the spectrum: the energy in specific bands, the location of the dominant peak, the total power. A typical condition-monitoring system computes a few dozen of these every window and lets a model watch them drift.

A long signal is sliced into overlapping windows, each reduced to a feature vector. continuous signal window k window k+2 (overlapping) extract features mean rms kurtosis peak-freq band-energy ... one short feature vector per window → fed to the model

Figure 14. Windowing turns an endless stream into a steady drumbeat of fixed-length feature vectors, the format almost every downstream model expects.

Section 14

More than one sensor: fusion and voting

One sensor is a single point of failure. When it drifts or dies, a system that trusts it blindly will confidently act on a lie. The cure is redundancy: measure the same quantity with several sensors and combine them. Combining is called sensor fusion, and at its simplest it is just an average that beats down noise. The deeper payoff comes when one sensor goes bad.

With two sensors you can detect a problem, because their difference, the inter-channel residual, suddenly grows, but you cannot tell which one is wrong. With three you can vote: take the median, and a single faulty sensor is automatically outvoted by the two healthy ones while the others carry the estimate. This triple-redundant median trick is everywhere in safety-critical systems, from flight controls to brake pressure. Inject a fault into any of the three channels below and watch the median shrug it off.

FIGURE 15 · triple-redundant fusion & voting  · interactive
faulty sensor: ABC
Three faint traces are the three sensors measuring one true quantity. The bold rust line is the median-voted estimate. Partway through, the chosen sensor drifts away, yet the median tracks the truth almost untouched, and the readout flags which channel disagrees.

Section 15

Models that watch the features

Once a window is boiled down to a feature vector, a model turns it into a decision. Three shapes of model cover most of monitoring, and which one you reach for depends entirely on what you already know about the failures you are looking for.

Anomaly detector

Learns only what healthy looks like, then flags anything far from it. Needs no fault examples, which is lucky, because real faults are rare. Answers: is this normal?

Classifier

Learns to name the fault when you have labelled examples of each kind. Answers: which fault is this, inner-race, outer-race, imbalance?

Regressor

Learns to predict a number, most usefully a health index or the remaining useful life. Answers: how bad, and how long left?

The honest order of preference in the field is usually anomaly detection first, because healthy data is abundant and faults are not. You graduate to classifiers and regressors only once you have collected enough real failures, or trustworthy simulations of them, to learn from. Whatever the choice, the model sits in the same slot of the pipeline.

A feature vector feeds an anomaly detector, classifier, or regressor, each producing a different output. feature vector anomaly detector classifier regressor novelty score → alarm fault type / label health index / RUL

Figure 16. The same feature vector can drive three different jobs. Most programs start at the top, where no fault examples are needed, and work down as failure data accumulates.

Section 16

Model-based residuals: the Kalman filter

An earlier section learned what healthy looks like from data. There is an older, complementary idea: if you have a physical model of how the system should behave, run it alongside the real one and watch where they disagree. That disagreement is the residual, and a model that maintains a running estimate while comparing it to each new measurement is an observer. The most famous observer is the Kalman filter.

The Kalman filter works in a loop of two steps. It predicts where the signal should go next from its model, then corrects that prediction using the new measurement, trusting each source in proportion to how noisy it believes them to be. The gap between prediction and measurement is the innovation, a residual that is small, white noise when the model fits and the sensor is healthy, and which jumps the moment either assumption breaks. Tune how much you trust the sensor against the model below and watch the estimate firm up or chase the noise.

FIGURE 17 · Kalman filter & innovation  · interactive
Grey: the true signal. Faint dots: noisy measurements. Rust: the Kalman estimate, which smooths the dots toward the truth. Teal below: the innovation. Trust the sensor too much (high process noise) and the estimate chases every wiggle; trust the model too much (low process noise) and it lags real change. The innovation is what a fault detector actually watches.

Section 17

Raising the alarm: thresholds and CUSUM

However you produce a residual, by subtracting a learned model, an observer, or a redundant sensor, the same final question remains: when is it big enough to act on? The simplest answer is a threshold, usually a few standard deviations away from the normal residual level. Cross it and raise an alarm. Set it too tight and you drown in false alarms that get ignored; too loose and you miss the real fault. That balance, false alarms against missed detections, is the central tension of every monitoring system. The simulation injects a slow drift fault so you can tune the threshold yourself.

FIGURE 18 · residual threshold alarm  · interactive
The residual (rust) sits near zero while healthy, then drifts as the injected fault grows. The shaded band is the normal range; the dashed lines are your alarm threshold. Points that escape the band turn solid and trip the alarm. Tighten the threshold and you catch the fault sooner, but watch the false-alarm count rise.

A fixed threshold is deaf to small, slow drifts: each individual point stays inside the band even while the mean creeps upward. CUSUM, the cumulative sum, fixes this by adding up how far the signal sits above its expected level, sample after sample. A tiny persistent bias that never trips a threshold accumulates into a large running total that eventually does. CUSUM trades a little reaction time for the ability to catch drifts a threshold would sleep through. Shrink the shift below until the plain alarm above would miss it, and see CUSUM still fire.

FIGURE 19 · CUSUM change detection  · interactive
Top: a residual with a small mean shift partway, the kind a fixed threshold misses. Bottom: the CUSUM statistic, which stays flat while healthy then climbs steadily once the shift starts, tripping its decision limit (dashed) a while after the change. The slack k sets how much drift to ignore as normal.

Section 18

From alarm to forecast: degradation and RUL

Detecting that something is wrong is diagnostics. The richer, more valuable goal is prognostics: estimating how much useful life is left so maintenance happens before the breakdown, not after. The trick is to distil the machine's condition into a single health indicator that trends steadily toward a known failure level, then fit that trend and project it forward. Where the projection crosses the failure line is the predicted end of life; the distance from now to there is the remaining useful life, or RUL.

The honesty of prognostics lives in its uncertainty. Early on, with little of the degradation curve observed, the projection is a wild guess and the confidence cone is wide. As more of the curve comes in, the fit tightens and the cone narrows, so the RUL estimate sharpens just as the decision becomes urgent. Slide the observation window below from early to late and watch the forecast and its cone converge on the truth.

FIGURE 20 · degradation trend & RUL forecast  · interactive
Rust dots: the health indicator measured up to now. Teal curve: a trend fitted to what has been seen and extrapolated forward, with a shaded confidence cone. The dashed line is the failure threshold; where the forecast meets it sets the RUL. Reveal more of the curve and the cone shrinks, the classic prognostic payoff of waiting just long enough.

Why the residual you built earlier matters here

The same residual that tripped an alarm today becomes, tracked over weeks, the degradation curve you extrapolate. Diagnostics and prognostics are not separate machines; they are the same signal read at two timescales. A good health indicator is monotonic, robust to operating conditions, and traceable to a physical wear mechanism, which is why feature engineering and domain knowledge matter as much as the forecasting math.

Section 19

Running it on the edge

Much of the time this whole pipeline does not run in a comfortable data centre. It runs on a microcontroller bolted to the machine, the edge, where every resource is rationed. There is rarely the bandwidth to ship raw high-rate vibration to the cloud, the power budget to run a large model, or the memory to hold more than a few seconds of history. So the pipeline is reshaped around three hard budgets.

Compute & power

Often a few hundred MHz and a fixed milliwatt budget. Heavy math like long FFTs is scheduled carefully or pushed to a hardware accelerator.

Memory

Kilobytes, not gigabytes. The signal lives in a small ring buffer that overwrites itself, and only features survive, not the raw stream.

Numeric format

Floating point is expensive. Models are quantized to 8-bit integers (INT8), shrinking size and energy roughly fourfold for a small accuracy cost.

The design pattern that falls out of these limits is to extract features as early and as cheaply as possible, so the expensive part of the system sees a trickle of small vectors rather than a torrent of samples. A compressed INT8 model then makes the call on-device, and only a decision, an alarm, a health index, the occasional snapshot, ever leaves over the network. This is why everything earlier in this guide, the windowing, the cheap statistics, the careful choice of sampling rate, is not academic: on the edge it is the difference between a system that fits and one that does not.

On-device pipeline: sensor to ring buffer to feature extraction to quantized model to decision, with only the decision leaving over the network. sensorhigh-rate ring bufferfew KB feature extractcheap stats INT8 modelquantized NN decisionalarm · RUL network(tiny) stays on-device, high bandwidth everything left of the network link runs on the microcontroller

Figure 21. The edge pattern: keep the firehose of raw data local, send only the conclusion.

Section 20

The full pipeline, end to end

Put the pieces together and a sensory-data system is a relay race. The physical quantity is handed off through conditioning, conversion, cleaning, and feature extraction before any model or human sees it. Each stage throws away some information on purpose, keeping only what the next stage needs. Here is the whole path on one diagram.

Block diagram from physical quantity through sensor, conditioning, ADC, processing, features, model, to decision. physicalquantity sensortransduce conditioningamp · anti-alias ADCsample · quantize processingfilter · transform featuressummarize modeldetect · predict decisionalarm · RUL smooth, continuous world discrete, digital world

And a decision rarely ends the story; it feeds a control loop. The classic condition-monitoring loop reads the sensor, decides whether the health indicator has crossed a line, and routes to the right response. Drawn as a flowchart it looks like this.

Flowchart: acquire window, extract features, compute residual, compare to threshold, then either log healthy or assess severity and act. acquire signal window extract features compute residual / index overthreshold? no log yes assess severity & trend alarm · estimate RUL · schedule

Section 21

Practical notes

A handful of lessons recur across almost every project that turns sensory data into decisions. None of them are glamorous and all of them are expensive to learn the hard way.

The one-sentence summary

Treat a sensor as a translator that turns the physical world into ordered numbers, respect the limits of that translation (how fast you sampled, what you rounded away, what you filtered out), and most of working with sensory data becomes a careful, honest conversation between the signal and the question you are asking of it.

Section 22

References and further reading

  1. Oppenheim, A. V., & Schafer, R. W. Discrete-Time Signal Processing. Pearson. The standard reference for sampling, the Nyquist theorem, quantization, filtering, and the discrete Fourier transform.
  2. Shumway, R. H., & Stoffer, D. S. Time Series Analysis and Its Applications. Springer. Decomposition, stationarity, autocorrelation, and forecasting, with worked data examples.
  3. Hyndman, R. J., & Athanasopoulos, G. Forecasting: Principles and Practice. OTexts. A free, accessible online textbook on trend, seasonality, and practical time-series modelling.
  4. Randall, R. B. Vibration-based Condition Monitoring. Wiley. Spectra, the spectrogram, envelope analysis, and fault frequencies for rotating machinery.
  5. Isermann, R. Fault-Diagnosis Systems: An Introduction from Fault Detection to Fault Tolerance. Springer. Residual generation, observers, thresholds, and model-based diagnosis.
  6. Simon, D. Optimal State Estimation: Kalman, H-infinity, and Nonlinear Approaches. Wiley. A clear, practical treatment of the Kalman filter and observers.
  7. Montgomery, D. C. Introduction to Statistical Quality Control. Wiley. CUSUM and other control-chart methods for detecting small shifts.
  8. Lei, Y., et al. (2018). "Machinery health prognostics: A systematic review from data acquisition to RUL prediction." Mechanical Systems and Signal Processing. A survey connecting features, health indicators, and remaining useful life.
  9. Smith, S. W. The Scientist and Engineer's Guide to Digital Signal Processing. California Technical Publishing. Famously plain-language treatment of the FFT, filters, and quantization, available free online.
  10. Warden, P., & Situnayake, D. TinyML. O'Reilly. Machine learning on microcontrollers, quantization, and the constraints of edge deployment.

References are pointers for further study; the explanations and simulations above are written from first principles rather than drawn from any single source.