55 Processes and Systems: Overview
55.1 Learning Objectives
By the end of this chapter, you will be able to:
- Explain the fundamentals of process control systems and their role in IoT architectures
- Distinguish between processes (algorithms transforming inputs to outputs) and systems (interconnected components)
- Construct block diagram representations of IoT systems at multiple levels of abstraction
- Decompose IoT systems into hierarchical subsystems (device, network, cloud) for modular design
- Evaluate system response characteristics including settling time and overshoot
- Map sensing and actuation components within closed-loop control architectures
Key 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
55.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
55.3 What is a Process and What is a System?
⭐ Difficulty: Foundational
For Beginners: Control Systems in IoT
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:
- Open-Loop: Execute predetermined actions without measuring results (toaster timer—doesn’t check if bread is actually toasted, just runs for set time)
- 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.
For Kids: Meet the Sensor Squad! 🌟
A control system is like having a helper who keeps checking and adjusting things to make them JUST RIGHT - like Goldilocks, but for machines!
55.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!”
55.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 |
55.3.3 Try This at Home!
The Blindfolded Temperature Game!
- Fill a cup with warm water (have a grown-up help!)
- Put a thermometer in the water and note the starting temperature
- Your goal: Get the water to EXACTLY 30 degrees Celsius (or pick any target)
- One person watches the thermometer and calls out: “Too hot!” or “Too cold!” or “Perfect!”
- Another person (blindfolded or looking away) adds tiny amounts of hot or cold water based on the calls
- 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!
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.
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.
Electronic System Components: Sensors gather environmental inputs, microcontroller processes data through algorithms, actuators produce physical outputs, and feedback loops enable system adaptation.
55.5.1 Block Diagram Representation
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.
55.5.2 IoT System Decomposition
Modern IoT systems can be decomposed into hierarchical blocks at multiple levels:
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
Alternative View: Control System Timing Perspectives
This variant shows the same control system concepts from a temporal perspective, illustrating how control actions and responses unfold over time.
Worked Example: Decomposing a Smart Irrigation System
Scenario: You are designing a smart irrigation system for a 5-acre farm. The system must automatically water crops based on soil moisture levels, weather forecasts, and crop type. Use block diagram decomposition to analyze the system and identify key components.
Step 1: Top-Level System View
At the highest level, the smart irrigation system has:
Inputs:
- Soil moisture readings (from sensors in field)
- Weather forecast data (from cloud API)
- User preferences (crop type, watering schedule)
Process:
- Determine optimal watering schedule
- Activate irrigation zones as needed
- Monitor water flow and adjust
Outputs:
- Water delivery to crop zones
- Status dashboard for farmer
- Alerts for issues (low water pressure, sensor failures)
Step 2: Device-Level Decomposition
Breaking down the device layer into subsystems:
| Subsystem | Components | Function | Interfaces |
|---|---|---|---|
| Sensor Subsystem | 12× soil moisture sensors (capacitive), 1× flow meter | Measure soil moisture (0-100%), water flow (GPM) | I2C/analog to MCU |
| Controller Subsystem | ESP32 microcontroller, SD card for logging | Run control algorithm, log data, manage communication | UART, SPI, I2C buses |
| Actuator Subsystem | 4× solenoid valves (12V, 1” diameter), relay board | Control water flow to 4 zones independently | GPIO pins to relays |
| Power Subsystem | 12V 5A power supply, voltage regulator (3.3V) | Provide power to all components | Power rails |
| Communication Subsystem | Wi-Fi module (built-in ESP32), LoRa (optional) | Send data to cloud, receive commands | MQTT over Wi-Fi |
Step 3: Network-Level Decomposition
The network layer connects device to cloud:
| Component | Protocol | Function | Data Rate |
|---|---|---|---|
| Local Gateway | MQTT broker on edge (optional) | Aggregate multiple field controllers | 10 KB/hour per controller |
| Internet Connection | 4G LTE (cellular fallback if no Wi-Fi) | Reliable cloud connectivity | 50 KB/hour total |
| Cloud Endpoint | AWS IoT Core / Azure IoT Hub | Receive telemetry, send commands | MQTT over TLS |
Step 4: Cloud-Level Decomposition
The cloud layer provides intelligence and user interface:
| Service | Function | Technology | Cost |
|---|---|---|---|
| Data Ingestion | Receive and store telemetry | IoT Hub + time-series DB | $15/month |
| Weather Integration | Fetch forecasts, adjust watering | Weather API (OpenWeather) | $40/month |
| Control Logic | Calculate optimal irrigation schedule | Lambda/Functions (Python) | $5/month |
| Dashboard | Show soil moisture, water usage, costs | Web app (React) | $0 (static hosting) |
| Alerting | Send SMS/email for failures | SNS / SendGrid | $2/month |
Step 5: Control Flow Analysis
Tracing a typical control loop through the decomposed system:
- Sensor Subsystem (Device): Capacitive sensor measures 35% soil moisture in Zone 2
- Controller Subsystem (Device): ESP32 reads sensor via I2C, compares to threshold (40%)
- Communication Subsystem (Device): ESP32 sends MQTT message:
{"zone": 2, "moisture": 35, "status": "dry"} - Network Layer: MQTT message routed through cellular gateway to cloud
- Cloud Control Logic: Python function checks weather forecast (no rain predicted), calculates watering duration (15 minutes based on crop type and deficit)
- Cloud Response: Sends MQTT command:
{"zone": 2, "action": "water", "duration": 900} - Controller Subsystem (Device): ESP32 receives command, activates GPIO pin 14
- Actuator Subsystem (Device): Relay closes, solenoid valve opens, Zone 2 waters for 15 minutes
- Flow Meter (Sensor): Confirms 22 gallons delivered (1.47 GPM × 15 min)
- Dashboard (Cloud): Updates display showing Zone 2 watered at 3:45 PM
Step 6: Identify Failure Modes Using Block Diagram
| Failure | Affected Subsystem | Impact | Mitigation |
|---|---|---|---|
| Sensor wire cut | Sensor Subsystem | Controller reads invalid data | Sanity check (moisture > 100% → alert) |
| Wi-Fi outage | Communication Subsystem | Cannot send telemetry to cloud | Local edge control logic (water if <30%) |
| Cloud API timeout | Cloud Control Logic | No watering commands sent | Edge fallback timer (water daily at 6 AM) |
| Solenoid valve stuck open | Actuator Subsystem | Continuous watering, water waste | Flow meter timeout (alert if >20 min) |
| Power failure | Power Subsystem | Complete system down | Battery backup for controller + cellular (8-hour capacity) |
Key Design Decision Revealed by Decomposition:
The block diagram reveals that cloud dependency creates a single point of failure. If cloud logic fails, crops do not get watered. The fix: add local edge fallback logic in the Controller Subsystem:
// Edge fallback if cloud unavailable for 4+ hours
if (soil_moisture < 30 && time_since_cloud_command > 4 * 3600) {
activate_zone_watering(zone, 600); // Water for 10 min
log_local_action("fallback_watering", zone);
}Result: System remains functional even during extended internet outages, with local logic providing basic watering based on moisture thresholds.
Key lesson: Hierarchical block diagram decomposition exposes system dependencies and failure modes that are not obvious from a monolithic design view. Identifying subsystem boundaries enables targeted debugging (flow meter issue → Actuator Subsystem only), independent upgrades (swap soil sensor type → Sensor Subsystem only), and resilient fallback logic (edge control when cloud unavailable).
55.6 Key Takeaways
- Systems are collections of interacting components (sensors, processors, actuators) that work together to perform a function
- Processes are the algorithms and steps that transform inputs into outputs within a system
- Block diagrams enable analysis at multiple levels of abstraction without getting lost in implementation details
- Hierarchical decomposition (Device-Network-Cloud) enables modular design, independent debugging, and targeted optimization
- Every IoT device can be analyzed as an input-process-output system with optional feedback loops for self-regulation
55.7 Interactive: Control Loop Sampling Rate Calculator
The sampling rate of your control loop must be matched to the process dynamics. Calculate the recommended sampling interval and check if your current sensor rate is adequate.
55.8 What’s Next
| If you want to… | Read this |
|---|---|
| Study feedback mechanisms in detail | Feedback Mechanisms |
| Explore control types | Open vs Closed Loop Control Types |
| Learn about PID control implementation | Processes and Systems: PID Control |
| Study core process fundamentals | Processes and Systems Fundamentals |
| Practice with the PID simulation lab | PID Simulation Lab |
Common Pitfalls
1. Treating Process Control as Only for Chemical Plants
Assuming PID and feedback control only apply to industrial processes. IoT systems control room temperature, drone altitude, motor speed, and battery charging — all are process control problems. The concepts apply whenever any measured variable must be driven toward a target.
2. Skipping Block Diagram Analysis
Jumping directly to code without drawing the system block diagram. Block diagrams reveal the signal flow, identify loop gains, expose sign errors (positive vs negative feedback), and clarify where delays exist. Draw the block diagram before writing any control code.
3. Ignoring Sample Rate Selection
Implementing a digital control loop without explicitly setting the sample rate. The sample rate must be at least 5–10× the desired closed-loop bandwidth. An ad-hoc Arduino loop() without timer-based sampling produces variable timing that makes integral and derivative gains unpredictable.
4. Not Distinguishing the Process from the Controller
Confusing the physical plant (room, motor, boiler) with the control algorithm (PID). They are separate: the plant has fixed dynamics; the controller is designed to compensate for those dynamics. Understanding the plant is a prerequisite to designing the controller.