Why data acquisition captures real-world measurements in SCADA systems - Performance Analysis
We want to understand how the time to capture measurements grows as more sensors or data points are added in a SCADA system.
How does the system handle more inputs and how does that affect the time it takes to collect data?
Analyze the time complexity of the following data acquisition loop.
for sensor in sensors:
value = read_sensor(sensor)
store_value(value)
wait(interval)
# This loop reads each sensor once per cycle
This code reads data from each sensor one by one and stores the measurement before waiting for the next cycle.
Look at what repeats in this process.
- Primary operation: Reading each sensor's data once per cycle.
- How many times: Once for each sensor in the list every cycle.
As the number of sensors increases, the time to read all sensors grows proportionally.
| Input Size (n) | Approx. Operations |
|---|---|
| 10 sensors | 10 reads and stores |
| 100 sensors | 100 reads and stores |
| 1000 sensors | 1000 reads and stores |
Pattern observation: The time grows directly with the number of sensors; doubling sensors doubles the work.
Time Complexity: O(n)
This means the time to capture data grows in a straight line with the number of sensors.
[X] Wrong: "Reading more sensors doesn't affect the time much because each read is fast."
[OK] Correct: Even if each read is quick, doing many reads adds up, so more sensors mean more total time.
Understanding how data collection time grows helps you design systems that scale well and stay reliable as they grow.
"What if the system reads sensors in parallel instead of one by one? How would the time complexity change?"