Lesson 1.4Lesson 1.4 · IoT & Sensing
Data Quality & Calibration
Garbage in, garbage out - sensor drift and calibration, missing and bad data, timestamps and sampling, and why every analysis rides on data you can trust
A digital twin can be flawless and still be wrong - if the numbers feeding it are wrong. Every analysis in this course rides on data you can actually trust.
We have covered the senses, the devices, the networks and the meters. Now the uncomfortable truth that separates working smart buildings from expensive disappointments: the data is usually messier than anyone admits. Sensors drift, packets go missing, clocks disagree, values get stuck, units silently change - and a confident dashboard will happily report nonsense with a straight face.
This is the garbage-in, garbage-out lesson, and it is the most important in the module even though it is the least glamorous. Because a prediction built on a drifting sensor is a wrong prediction; a fault alarm from a stuck reading is a false alarm; and a twin fed bad data makes bad decisions with total confidence. Trustworthy data is the foundation everything else stands on.
A dead sensor still reporting is worse than no sensor - it is trusted. Monitor data quality itself.
Garbage in, garbage out - the foundation everything stands on
There is a hierarchy of value in a smart building - sensing, networks, data, analytics, the twin - and a hard rule runs through all of it: each layer is only as good as the data beneath it. A brilliant fault-detection algorithm fed a drifting temperature sensor will confidently diagnose faults that are not there, or miss ones that are. A machine-learning model trained on a stuck meter learns fiction. A digital twin synchronised to bad readings mirrors a building that does not exist. This is garbage in, garbage out (GIGO), and no amount of sophistication downstream can rescue it - clever analytics on bad data just produce confident garbage, which is worse than obvious garbage because people believe it.
So the mature practitioner inverts the usual excitement. Before trusting any analysis, they ask: can I trust the numbers it rests on? Where did each come from, is the sensor healthy and calibrated, are readings arriving on time and complete, do the units and timestamps mean what they claim? This is not pessimism; it is the professionalism that makes the rest of the stack worth building. Data quality is not a cleanup step you do at the end - it is a property you design in and monitor forever, because sensors degrade the day after they are installed. The rest of this lesson names the specific ways data goes bad, and the habits that catch it.
GIGO. Clever analytics on bad data = CONFIDENT garbage. Trust the number before the conclusion.
Drift and calibration - the reading that slowly lies
Every sensor drifts. Over months a CO2 sensor reads gradually high, a humidity sensor low, a pressure sensor off - not through a dramatic failure but a slow, silent bias away from truth. The danger of drift, drawn in the figure, is precisely that it is gradual and confident: the numbers keep coming, they look plausible, nothing alarms, and every analysis built on them quietly tilts. A room held to a drifted CO2 setpoint is under-ventilated while the dashboard shows green; energy figures from a drifted meter are wrong in a way that compounds over a whole reporting year.
The answer is calibration - periodically comparing a sensor against a known reference (a freshly calibrated instrument, a reference gas, a controlled condition) and correcting it back to truth. The figure shows the pattern: the true value is steady, the sensor drifts away from it, and at the calibration point the reading is pulled back onto track. Different sensors drift at different rates - a good NDIR CO2 sensor might need checking annually, some cheap sensors far sooner - and good practice is to record when each sensor was last calibrated and to treat readings from an overdue sensor with suspicion. Some sensors self-correct (automatic baseline calibration assumes a room reaches fresh-air CO2 overnight), which helps but can mislead in spaces occupied around the clock. The instinct to build: a reading without a calibration history is a reading you cannot fully trust.
Drift is gradual + confident = dangerous. Log the last-calibrated date; distrust overdue sensors.
Missing, stuck and suspicious data
Drift is the subtle failure; the figure of a data stream shows the blunter ones you will meet constantly. Gaps (missing data) happen when a device sleeps, a battery dies, a radio drops or a gateway reboots - and how you handle them matters: silently filling a gap with the last value can invent a flatline that fools an analysis, so gaps should be marked, not papered over. Spikes are single wild values - a momentary electrical glitch or a dropped bit - that can wreck an average or trigger a false alarm if not filtered. Flatlines are the opposite and more insidious: a sensor that has frozen keeps reporting the same value forever, looking perfectly healthy while measuring nothing - a stuck reading is often more dangerous than a missing one, because missing data is obvious and a flatline hides.
Beyond these, a validation routine watches for out-of-range values (a room at 400 degrees), duplicates (the same timestamp twice), and the classic silent killer - units that changed (a meter reporting watts where the system expects kilowatts, off by a thousand and no one notices). The practical response is a data-validation pipeline: automated checks that range-test, flag stuck and missing streams, quarantine the suspicious, and surface the health of the sensing itself as a monitored quantity. A genuinely smart building watches its own data quality as carefully as it watches the building - because a sensor that has quietly died is worse than no sensor, since it is still trusted.
Timestamps and sampling - the dimension people forget
Building data is time-series data - every reading is a value and a time - and the time half causes as much grief as the value half. Timestamps must agree: if two devices disagree about the clock, or one logs in local time and another in UTC, or a daylight-saving shift is mishandled, then correlating them - the whole basis of analytics and twins - produces nonsense. Aligning a chiller's power with the temperature it was supposed to control is meaningless if their clocks are an hour apart. So time synchronisation (via NTP or the network) and a single, explicit timezone convention - almost always store everything in UTC and display local - are foundational, not fussy details.
Sampling rate - how often you read - is the other half. Sample too slowly and you miss real behaviour: a fifteen-minute meter interval cannot see a two-minute surge, and worse, undersampling can cause aliasing, where a fast signal read too rarely masquerades as a slow one that is not real. Sample too fast and you drown in data that costs storage and bandwidth for detail no decision uses - which is exactly why battery sensors sample slowly on purpose. The right rate matches how fast the quantity actually changes and how quickly a decision must react: sub-second for vibration on critical plant, every few minutes for room temperature, hourly for slow trends. Get timestamps honest and sampling matched to the phenomenon, and the time-series database (Module 4) becomes a trustworthy record; get them wrong and every downstream conclusion inherits the error.
Store in UTC, display local. Sample as fast as the quantity changes and the decision needs - no faster.
Building a culture of trust - commissioning and continuous monitoring
Data quality is not won once; it is maintained. Two habits keep a building honest over its life. The first is commissioning the data at handover: before anyone trusts a dashboard, each sensor and meter is checked against reality - does the space temperature sensor agree with a handheld reference, does the energy sub-meter match a clamp meter, do the points map to the equipment they actually claim, are the units and timezones correct? A great deal of bad building data is not degradation at all but errors baked in on day one - a sensor labelled for the wrong room, a meter scaled by the wrong factor, a point wired to the wrong channel - and only deliberate commissioning catches them before they mislead for years.
The second habit is continuous monitoring of the sensing itself. A mature smart building treats data quality as a live, measured quantity: automated checks watch every stream for drift, gaps, flatlines and out-of-range values, raise a flag when a sensor goes quiet or stuck, and track when each device was last calibrated. In effect the building watches its own senses as carefully as it watches the rooms, so a sensor that has quietly died is caught and replaced rather than believed.
None of this is glamorous, and that is precisely why it is valuable - and so often skipped. But it is the difference between a twin whose decisions can be trusted and a wall of confident, wrong dashboards that slowly loses everyone. Trust, once lost, is expensive to rebuild; designing and operating for data quality from the very start is what keeps a smart building genuinely smart rather than merely well-instrumented.
Commission the data at handover; monitor sensing health forever. A building that watches its own senses stays trustworthy.
Calibration
Correcting a sensor against a known reference
The routine that counters drift; record the last-calibrated date and distrust overdue sensors.
Data validation pipeline
Automated range/stuck/gap/duplicate checks
Flags and quarantines bad data before it reaches analytics or the twin; monitors sensing health itself.
Time-series database
Stores value-plus-time streams
The trustworthy record only if timestamps are synchronised (UTC) and sampling is matched to the phenomenon.
Sampling rate / Nyquist
How often a signal is read
Too slow causes aliasing and missed behaviour; match the rate to how fast the quantity changes.
Workshop — audit a real data stream for quality
The best way to respect data quality is to hunt for its failures in a real stream. You will take actual sensor or meter data and find the drift, gaps, spikes, flatlines and timing errors hiding in it - the exact audit a twin needs done continuously.
A spreadsheet or any plotting tool, and a real dataset (utility interval export, hobby-sensor CSV, or an open building dataset). No special hardware required.
Goal: a data-quality audit of one real time-series Inputs: any sensor/meter dataset (CSV, dashboard export, open data) + a spreadsheet Time: ~40 minutes
- 1Get a real time-series: a smart-meter export, a CSV from a hobby sensor, or an open building dataset. Plot the value against time so you can see its shape.
- 2Hunt for the classic faults: GAPS (missing rows), SPIKES (single wild values), FLATLINES (a run of identical values that suggests a stuck sensor), and OUT-OF-RANGE values that are physically impossible.
- 3Check the time column: are samples evenly spaced, or does the interval jump? Is the timezone stated? Look for duplicate timestamps and any daylight-saving discontinuity.
- 4Look for slow DRIFT or a suspicious step: does a baseline that should be stable creep over time, or jump when someone likely serviced or swapped the device?
- 5Write a short data-quality report: list each issue found, judge whether it would corrupt a real analysis, and propose how to handle it (mark the gap, filter the spike, flag the flatline, fix the timezone, schedule a calibration).
You’ll walk away with
A one-page data-quality audit of a real time-series: a plot, a list of the drift, gaps, spikes, flatlines and timing issues found, a judgement of their impact, and a proposed handling for each.
Three altitudes on the same idea
Read the band that fits you — or all three.
Data quality is a lifecycle and access problem you can design for or against. Sensors and meters must be reachable to calibrate, replace and check - a meter buried behind finished plasterwork will never be maintained. Specify accessible metering positions, sensible sensor accessibility, and a commissioning process that verifies readings against reality before handover. A building designed so its instruments can be trusted and maintained stays smart; one that is not degrades into a wall of pretty, wrong dashboards.
Trustworthy comfort and air-quality data is what makes responsive interiors credible. If the CO2 sensor driving ventilation has drifted, occupants sit in stale air under a reassuring green light - and trust in the whole system collapses the first time reality contradicts the display. Insist that the sensors shaping human experience are accessible, calibrated and honestly reported, and that any occupant-facing air-quality display reflects a reading someone actually stands behind.
Data-quality skills are quietly the most employable in the field. Everyone can plot a sensor; far fewer can look at a stream and spot the drift, the stuck flatline, the timezone offset, the units that changed. Practise on real, messy datasets - clean, validate, and document what you found. The engineer who catches bad data before it reaches a model or a decision is the one teams cannot do without, precisely because the work is unglamorous and rare.
“Modern sensors are accurate, so if the dashboard shows a number I can trust it.”
Do it yourself
Trust nothing until you have checked it.
- 1What does 'garbage in, garbage out' mean for a digital twin, and why can analytics not fix it?
- 2Why is a slowly drifting sensor more dangerous than one that obviously fails?
- 3Explain why a flatline (stuck) reading can be worse than a missing one.
- 4Why should time-series data usually be stored in UTC rather than local time?
- 5What is aliasing, and how does sampling rate cause it?
The one line to carry out
Peer-reviewed journals & authoritative standards
- 01Sensor — Wikipedia, 2026.
- 02Time series database — Wikipedia, 2026.
- 03Fault detection and isolation — Wikipedia, 2026.
- 04Data lake — Wikipedia, 2026.
That completes the sensing foundation: what buildings measure, the devices and actuators that carry and act, the networks and meters that scale it, and the data quality that decides whether any of it can be trusted. Next module, we follow the data outward - into the connectivity and protocols that move it around the building.
The author
Amogh N P
Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.
More about Amogh →