0
0
SCADA systemsdevops~5 mins

Why data acquisition captures real-world measurements in SCADA systems - Performance Analysis

Choose your learning style9 modes available
Time Complexity: Why data acquisition captures real-world measurements
O(n)
Understanding Time Complexity

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?

Scenario Under Consideration

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.

Identify Repeating Operations

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.
How Execution Grows With Input

As the number of sensors increases, the time to read all sensors grows proportionally.

Input Size (n)Approx. Operations
10 sensors10 reads and stores
100 sensors100 reads and stores
1000 sensors1000 reads and stores

Pattern observation: The time grows directly with the number of sensors; doubling sensors doubles the work.

Final Time Complexity

Time Complexity: O(n)

This means the time to capture data grows in a straight line with the number of sensors.

Common Mistake

[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.

Interview Connect

Understanding how data collection time grows helps you design systems that scale well and stay reliable as they grow.

Self-Check

"What if the system reads sensors in parallel instead of one by one? How would the time complexity change?"