212  Processes and Systems: Overview

212.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Understand Process Control: Explain the fundamentals of process control systems and their role in IoT
  • Analyze Feedback Systems: Describe how feedback loops maintain system stability
  • Apply PID Control: Implement Proportional-Integral-Derivative controllers for IoT applications
  • Design Control Systems: Design appropriate control strategies for temperature, pressure, and flow systems
  • Evaluate System Response: Analyze system response characteristics including settling time and overshoot
  • Integrate Sensors and Actuators: Connect sensing and actuation components in control loops
NoteKey Concepts
  • System: A collection of interacting components that transforms inputs into outputs, with boundaries defining what’s inside versus outside the system
  • Process: A series of actions or steps that transform inputs (materials, energy, information) into outputs with added value
  • Feedback Loop: A mechanism where system outputs are measured and compared to desired setpoints, generating control signals that adjust inputs
  • Closed-Loop Control: Systems that automatically adjust based on feedback to maintain desired behavior without human intervention
  • Open-Loop Control: Systems that operate according to predetermined inputs without measuring or responding to actual outputs
  • System Stability: The ability of a system to return to equilibrium after disturbances, critical for reliable IoT device operation
NoteChapter Overview

This chapter explores the fundamental concepts of processes and systems in IoT architectures. Understanding how electronic systems transform inputs into outputs through controlled processes is essential for designing robust IoT solutions. We’ll examine feedback mechanisms that enable systems to self-regulate and maintain desired behaviors.

Learning Objectives:

  • Define processes and systems in the context of IoT devices
  • Distinguish between open-loop and closed-loop control systems
  • Analyze feedback mechanisms and their role in system stability
  • Understand PID (Proportional-Integral-Derivative) control theory
  • Apply control system principles to IoT device design
  • Evaluate trade-offs between different control strategies

212.2 Prerequisites

Before diving into this chapter, you should be familiar with:

  • Sensor Fundamentals and Types: Understanding how sensors measure physical phenomena is fundamental to grasping how systems gather inputs and monitor outputs for feedback control
  • Actuators: Knowledge of actuators that convert control signals to physical actions helps understand how systems produce outputs in response to processed inputs
  • IoT Reference Models: Familiarity with the layered IoT architecture provides context for where processes and systems operate within the broader device-to-cloud continuum

212.3 What is a Process and What is a System?

⏱️ ~10 min | ⭐ Foundational | 📋 P04.C22.U01

Difficulty: Foundational

Every thermostat, automatic door, and cruise control uses control systems—mechanisms that automatically maintain desired behavior without human intervention.

Simple example: Room thermostat. You set target temperature (22°C). Thermostat measures actual temperature (18°C), calculates error (4°C too cold), turns on heater. Room warms up, thermostat measures again (20°C), adjusts heater output. Eventually reaches 22°C and maintains it. This is a feedback loop.

Two types of control:

  1. Open-Loop: Execute predetermined actions without measuring results (toaster timer—doesn’t check if bread is actually toasted, just runs for set time)
  2. Closed-Loop: Measure output, compare to target, adjust inputs based on error (thermostat—continuously checks temperature and adjusts heater)

PID Controller (Proportional-Integral-Derivative): The gold standard for smooth control. Three components:

  • P (Proportional): React to current error (room is 4°C cold → use 4× heater power)
  • I (Integral): React to accumulated past error (been cold for 10 min → increase heater more)
  • D (Derivative): React to rate of change (temperature rising fast → reduce heater to avoid overshoot)
Term Simple Explanation
System Collection of components working together (sensors + processor + actuators)
Process Series of actions transforming inputs to outputs (algorithm running on microcontroller)
Feedback Loop Measuring output and using it to adjust input (thermostat reading temperature, adjusting heater)
Setpoint Desired target value (22°C for room temperature)
Error Difference between setpoint and actual value (setpoint - measured)
Actuator Device that does physical work (heater, motor, valve)

Why it matters for IoT: Every smart device uses control systems. Smart thermostats (temperature control), irrigation systems (soil moisture control), autonomous vehicles (speed/steering control), robotic arms (position control). Understanding PID helps you design stable, responsive IoT devices.

Common mistake: Setting PID gains too aggressively causes oscillation (heater rapidly turns on/off, room temperature swings wildly). Conservative tuning is smoother but slower to respond. It’s an art.

Real example: Sous vide cooker maintains water at exactly 57.0°C for 2 hours. Without PID, it would oscillate ±3°C. With PID, stays within ±0.1°C. Same hardware, smarter control algorithm.

A control system is like having a helper who keeps checking and adjusting things to make them JUST RIGHT - like Goldilocks, but for machines!

212.3.1 The Sensor Squad Adventure: The Perfect Porridge Problem

The Sensor Squad was helping Grandma’s Smart Kitchen make the perfect porridge for breakfast. But there was a problem - the porridge kept coming out wrong!

“Too hot! Too cold! Too hot again!” cried Sammy the Temperature Sensor as he watched the porridge temperature bounce up and down. Bella the Battery was getting tired from all the work. “We need a better plan!”

Max the Microcontroller had an idea. “Let’s use something called a FEEDBACK LOOP! Sammy, you keep watching the temperature. Tell me if it’s too hot, too cold, or just right. I’ll adjust the stove based on what you say!”

The team got to work. Sammy watched the porridge: “It’s 50 degrees - way too cold! We need 80 degrees!” Max turned the stove up HIGH. A minute later, Sammy reported: “Now it’s 95 degrees - TOO HOT!” Max turned the stove DOWN.

But something was still wrong. The temperature kept going up and down like a seesaw: 95… 65… 90… 70… The porridge was never staying at the perfect 80 degrees!

Lila the LED had a clever observation: “Max, you’re being too dramatic! When we’re close to 80 degrees, don’t change the stove so much. Make TINY adjustments instead of BIG ones!”

Max tried Lila’s advice. When Sammy said “78 degrees,” Max turned the heat up just a TINY bit. When Sammy said “82 degrees,” Max turned it down just a LITTLE. Soon the temperature was steady at exactly 80 degrees!

“HOORAY!” cheered the Squad. “The porridge is PERFECT!”

“That’s called PID control,” explained Max proudly. “We look at how far we are from our goal (that’s the P), we remember if we’ve been wrong for a long time (that’s the I), and we notice if we’re getting hotter or colder quickly (that’s the D). Put them all together, and we can control ANYTHING perfectly!”

212.3.2 Key Words for Kids

Word What It Means
Feedback Loop Checking the result and adjusting based on what you see - like tasting soup while cooking and adding more salt if needed
Setpoint The perfect target you’re trying to reach - like 80 degrees for porridge
Error How far away you are from perfect - like “we’re 10 degrees too cold”
PID Controller A smart helper that uses three tricks (P, I, D) to reach the perfect target smoothly without overshooting

212.3.3 Try This at Home!

The Blindfolded Temperature Game!

  1. Fill a cup with warm water (have a grown-up help!)
  2. Put a thermometer in the water and note the starting temperature
  3. Your goal: Get the water to EXACTLY 30 degrees Celsius (or pick any target)
  4. One person watches the thermometer and calls out: “Too hot!” or “Too cold!” or “Perfect!”
  5. Another person (blindfolded or looking away) adds tiny amounts of hot or cold water based on the calls
  6. See how long it takes to reach exactly 30 degrees and STAY there!

What you’ll discover: - If you add too much water at once, you’ll overshoot (just like Max did at first!) - Small, careful adjustments work better than big, dramatic ones - The person watching (like Sammy) is the “sensor” - the person adjusting is the “controller”

This is EXACTLY how your home thermostat, your refrigerator, and even cruise control in cars work - they’re all using feedback loops to stay at the perfect temperature or speed!

NoteCross-Hub Connections

This chapter connects with multiple learning resources across the book:

Interactive Learning: - Simulations Hub: Experiment with PID control simulators to see real-time effects of changing Kp, Ki, and Kd parameters. Adjust gains and observe overshoot, settling time, and steady-state error interactively. - Videos Hub: Watch PID tuning tutorials showing real hardware implementations. See Ziegler-Nichols tuning method demonstrated on actual temperature control systems.

Self-Assessment: - Quizzes Hub: Test your understanding of open-loop vs closed-loop systems, PID term identification, and control system design trade-offs with immediate feedback. - Knowledge Gaps Hub: Address common misconceptions about steady-state error (why P-only control can’t eliminate it), integral windup (when and why it occurs), and derivative noise sensitivity.

Practical Application: - Try the interactive PID simulators in the Simulations Hub—modify Kp to see overshoot changes, adjust Ki to eliminate steady-state error, and tune Kd to reduce oscillations. These hands-on experiments reinforce the mathematical concepts.

Most electronic systems, particularly IoT devices, are designed to perform specific tasks. These can be broken down into two fundamental components: the process and the system.

Deep Dives: - Processes Labs and Review - Hands-on PID implementation - Sensor Fundamentals - Feedback sensors - Actuators - Control outputs

Comparisons: - Edge Fog Computing - Distributed control systems - M2M Fundamentals - Machine control architectures

Products: - Application Domains - Industrial automation - Prototyping Hardware - Arduino/ESP32 controllers

Learning: - Simulations Hub - Control system simulators - Videos Hub - PID tuning tutorials

212.4 Knowledge Check

Test your understanding of these architectural concepts.

Question 15: In a cascaded control system, an outer temperature controller sets the setpoint for an inner valve position controller. The room temperature is 18°C (target 22°C). What happens first?

💡 Explanation: Cascaded control uses hierarchical loops: Outer (primary) loop: Slow process (temperature), measures room temp (18°C), calculates error (22-18=4°C), PID outputs desired valve position (60%). Update rate: 10s. Inner (secondary) loop: Fast process (valve position), receives 60% setpoint from outer loop, measures actual valve position (currently 30%), moves valve to 60%. Update rate: 100ms. Benefits: (1) Fast inner loop handles valve dynamics (stiction, hysteresis), (2) Outer loop only worries about temperature, not valve details, (3) Better disturbance rejection. Why cascade: Single controller directly commanding valve (18°C → “more heat” → valve position?) struggles with valve nonlinearities. Cascade separates concerns: outer loop strategic (how much heat?), inner loop tactical (valve position control). Common in HVAC: Temperature controller → valve position controller → actual valve. Also: Level controller → flow controller → pump speed.

212.5 Key Definitions

Process
A series of actions or steps taken to achieve a particular end. In IoT devices, this is typically implemented by the program running on the microcontroller. The process defines how the device accomplishes its goal.
System
A set of things working together as parts of a mechanism or interconnecting network; a complex whole. In IoT, a system comprises the microcontroller, sensors, actuators, and their interactions working together to perform a specific function.

An electronic system is a physical interconnection of components that gathers information, processes it, and produces output. The sensors provide input, actuators provide output, and the microcontroller executes the process that transforms inputs into outputs.

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#ecf0f1', 'fontSize': '16px'}}}%%
graph LR
    A["Sensors<br/>(Input)"] -->|Measure Physical Variables| B["Microcontroller<br/>(Process)"]
    B -->|Execute Algorithm| C["Actuators<br/>(Output)"]
    C -->|Physical Action| D["Environment"]
    D -.->|Feedback| A

    style A fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
    style B fill:#E67E22,stroke:#16A085,stroke-width:2px,color:#fff
    style C fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
    style D fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff

Figure 212.1: Sensor-to-actuator data flow with environmental feedback loop

Electronic System Components: Sensors gather environmental inputs, microcontroller processes data through algorithms, actuators produce physical outputs, and feedback loops enable system adaptation.

212.5.1 Block Diagram Representation

Conceptual diagram illustrating process as sequential flow of operations transforming inputs to outputs, and system as collection of interconnected components including sensors, microcontrollers, actuators working together with defined boundaries and interfaces
Figure 212.2: Conceptual diagram showing the relationship between processes (sequence of operations) and systems (interconnected components) in IoT architectures
Block diagram of coffee pot IoT system showing material inputs (ground coffee, water, filter), energy input (electricity), control input (start command) flowing through processing blocks (water heating to 92-96°C, pumping through grounds, temperature and flow monitoring) to produce outputs (hot brewed coffee, status LED indicators, mobile notifications)
Figure 212.3: Block diagram of a coffee pot system showing inputs (water, coffee, power), processing unit (heating element, control logic), and outputs (hot coffee, indicators)

Complex electronic systems can be represented as interconnected “black boxes” where each box represents an individual component or subsystem. This block-diagram representation allows us to analyze systems at different levels of abstraction without getting overwhelmed by implementation details.

Consider a simple coffee maker as an IoT-enabled system:

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#ecf0f1', 'fontSize': '14px'}}}%%
flowchart TB
    subgraph Inputs
        I1["Ground Coffee"]
        I2["Water"]
        I3["Filter"]
        I4["Electricity"]
        I5["Start Command"]
    end

    subgraph Process ["Coffee Maker Process"]
        P1["Heat Water<br/>(92-96°C)"]
        P2["Pump Water<br/>Through Grounds"]
        P3["Monitor<br/>Temperature"]
        P4["Monitor<br/>Flow Rate"]
    end

    subgraph Outputs
        O1["Hot Coffee"]
        O2["Status LEDs"]
        O3["Mobile<br/>Notification"]
        O4["Completion<br/>Signal"]
    end

    I1 & I2 & I3 --> P2
    I4 --> P1
    I5 --> P1
    P1 --> P3
    P2 --> P4
    P3 & P4 --> P2
    P2 --> O1
    P3 --> O2 & O3 & O4

    style P1 fill:#E67E22,stroke:#16A085,stroke-width:2px,color:#fff
    style P2 fill:#E67E22,stroke:#16A085,stroke-width:2px,color:#fff
    style P3 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
    style P4 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
    style O1 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff

Figure 212.4: Coffee pot input-process-output flow with monitoring

Coffee Pot System Flow: Materials (coffee, water, filter) and energy (electricity) inputs are processed through heating, pumping, and monitoring subsystems to produce hot coffee and status outputs.

Inputs: - Ground coffee (material) - Water (material) - Filter (material) - Electricity (energy) - Start command (signal/control)

Process: - Heat water to optimal temperature (92-96°C) - Pump water through coffee grounds - Monitor temperature and flow rate - Execute brewing algorithm

Outputs: - Hot brewed coffee (primary output) - Status indicators (LEDs, mobile notifications) - Brewing completion signal

Constraints: - Physical size of coffee maker - Quantity of coffee and water available - Power consumption limits - Brewing time requirements

Mechanisms: - User must load filter with coffee - User must fill water reservoir - System must detect water level - Safety shutdown if reservoir empty

212.5.2 IoT System Decomposition

Modern IoT systems can be decomposed into hierarchical blocks at multiple levels:

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#ecf0f1', 'fontSize': '14px'}}}%%
graph TD
    System["IoT System"] --> Device["Device Layer"]
    System --> Network["Network Layer"]
    System --> Cloud["Cloud Layer"]

    Device --> Sensors["Sensor<br/>Subsystem"]
    Device --> MCU["Microcontroller<br/>Subsystem"]
    Device --> Actuators["Actuator<br/>Subsystem"]
    Device --> Power["Power<br/>Subsystem"]

    Sensors --> S1["Temperature<br/>Sensor"]
    Sensors --> S2["Humidity<br/>Sensor"]
    Sensors --> S3["Motion<br/>Sensor"]

    MCU --> M1["ADC<br/>Module"]
    MCU --> M2["Processing<br/>Core"]
    MCU --> M3["Memory"]
    MCU --> M4["Communication<br/>Interface"]

    Actuators --> A1["Relay<br/>Control"]
    Actuators --> A2["Motor<br/>Control"]

    Power --> P1["Battery"]
    Power --> P2["Voltage<br/>Regulator"]
    Power --> P3["Charging<br/>Circuit"]

    style System fill:#16A085,stroke:#2C3E50,stroke-width:3px,color:#fff
    style Device fill:#E67E22,stroke:#16A085,stroke-width:2px,color:#fff
    style Network fill:#E67E22,stroke:#16A085,stroke-width:2px,color:#fff
    style Cloud fill:#E67E22,stroke:#16A085,stroke-width:2px,color:#fff
    style MCU fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff

Figure 212.5: IoT system decomposition: device, network, and cloud layers

Hierarchical System Decomposition: IoT systems break down into device, network, and cloud layers. The device layer further decomposes into sensor, microcontroller, actuator, and power subsystems, each with specific components.

This hierarchical view helps engineers: - Identify component boundaries and interfaces - Isolate problems during debugging - Design modular, reusable subsystems - Optimize specific subsystem performance

This variant shows the same control system concepts from a temporal perspective, illustrating how control actions and responses unfold over time.

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#7F8C8D', 'fontSize': '11px'}}}%%
graph LR
    subgraph Timing["CONTROL SYSTEM TIMING"]
        direction TB
        T0["T0: Setpoint Change<br/>(User sets 22°C)"]
        T1["T1: Sensor Reads<br/>(10-100ms delay)"]
        T2["T2: Controller Computes<br/>(1-10ms for PID)"]
        T3["T3: Actuator Responds<br/>(50-500ms mechanical)"]
        T4["T4: System Reacts<br/>(seconds to minutes)"]
    end

    subgraph Fast["FAST CONTROL (ms)"]
        F1["Motor Position<br/>1-10ms loop"]
        F2["Power Electronics<br/>10-100μs loop"]
    end

    subgraph Medium["MEDIUM CONTROL (sec)"]
        M1["Temperature<br/>1-10s loop"]
        M2["Pressure<br/>100ms-1s loop"]
    end

    subgraph Slow["SLOW CONTROL (min-hr)"]
        S1["Building HVAC<br/>5-15 min loop"]
        S2["Chemical Process<br/>hours per loop"]
    end

    T0 --> T1 --> T2 --> T3 --> T4

    style Timing fill:#2C3E50,color:#fff
    style Fast fill:#E74C3C,color:#fff
    style Medium fill:#E67E22,color:#fff
    style Slow fill:#16A085,color:#fff

Figure 212.6: Alternative view: Control system timing varies dramatically by application. Fast control (motor position, power electronics) operates in microseconds to milliseconds. Medium control (temperature, pressure) operates in seconds. Slow control (building HVAC, chemical processes) operates over minutes to hours. The control loop period must be faster than the system dynamics—sampling too slowly causes instability, too fast wastes resources.
WarningDesign Consideration

When designing IoT systems using block diagrams, consider:

  1. Input validation: What happens if inputs are missing or invalid?
  2. Process robustness: How does the process handle edge cases?
  3. Output verification: How do we confirm outputs are correct?
  4. Error propagation: How do errors in one block affect others?
  5. Resource constraints: Power, memory, processing capacity