70 PID: Open & Closed Loop
70.1 Learning Objectives
By the end of this chapter, you will be able to:
- Contrast Control Types: Compare open-loop and closed-loop control strategies with specific examples
- Evaluate System Characteristics: Assess advantages and disadvantages of each approach for a given scenario
- Apply Decision Frameworks: Select appropriate control architecture using systematic criteria and cost analysis
- Architect IoT Control Systems: Design edge-vs-cloud control placement based on latency and reliability requirements
MVU: Minimum Viable Understanding
Core concept: Open-loop systems execute predetermined actions blindly (like a timer), while closed-loop systems continuously monitor output and adjust (like a thermostat). Why it matters: Closed-loop systems can self-correct errors and adapt to disturbances, but require sensors and more complexity. Key takeaway: Most IoT control applications benefit from closed-loop feedback, but simple monitoring-only devices may operate open-loop at the device level while the overall system implements feedback through cloud coordination.
For Beginners: PID: Open & Closed Loop
Process control in IoT is about automatically adjusting systems to maintain desired conditions. Think of cruise control in a car: it continuously measures your speed, compares it to your target, and adjusts the throttle to keep you on track. IoT systems use similar feedback loops to control everything from room temperature to industrial manufacturing processes.
70.2 Prerequisites
Before diving into this chapter, you should be familiar with:
- Feedback Fundamentals: Understanding feedback concepts, negative vs positive feedback, and IoT applications
- Sensor Fundamentals: Sensor characteristics for feedback measurement
- Actuators: Control outputs for implementing corrections
70.3 Closed-Loop Feedback Systems
In a closed-loop system, a portion of the output is fed back to the input and either added to (positive feedback) or subtracted from (negative feedback) the input signal. This creates a self-regulating system that continuously updates based on current output conditions.
Closed-Loop Feedback System Block Diagram: Set point is compared with measured output, generating error signal. Controller processes error and adjusts system input. Feedback sensor creates continuous regulation loop.
Key Components:
- Set Point (SP): The desired target value
- Error Signal: Difference between set point and measured output
- Controller: Processes error and determines corrective action
- Process/Plant: The system being controlled
- Feedback Sensor: Measures actual output
- Comparator: Computes error = SP - measured value
70.4 Open-Loop Control Systems
An open-loop system does not monitor or measure its output. It executes a predetermined action based solely on the input, without feedback. This is also called a non-feedback system.
Open-Loop System Block Diagram: Input (timer setting) determines controller action without measuring output state. System executes predetermined sequence with no knowledge of actual results.
Characteristics:
- No feedback path from output to input
- Cannot self-correct for disturbances or errors
- Simpler and less expensive to implement
- Suitable when output is predictable and disturbances are minimal
70.5 Open-Loop in IoT Sensing Applications
Open-loop architectures are increasingly common in IoT data collection scenarios where:
- Device only senses and transmits data
- No local actuation required
- Analysis and decision-making occur remotely
- Feedback loop exists at system level, but not device level
IoT Sensor Node Open-Loop Data Collection: Device only senses and transmits data periodically without local actuation. No device-level feedback loop, but human operators or cloud systems may take action based on reported data.
However, at the system level, there may be feedback:
System-Level Closed-Loop with Device-Level Open-Loop: Individual sensor and actuator nodes operate open-loop (no local feedback), but cloud platform creates system-level feedback by coordinating remote sensing and actuation based on rules.
This architecture demonstrates that while individual devices operate open-loop, the overall IoT system implements closed-loop control through cloud-based coordination.
70.6 Comparing Open and Closed Loop Systems
Understanding the trade-offs between open-loop and closed-loop systems is crucial for IoT system design.
70.6.1 Advantages and Disadvantages
70.6.2 Decision Matrix
Open-Loop vs Closed-Loop Decision Tree: Precision requirements, environmental predictability, disturbances, cost constraints, and safety considerations determine appropriate control architecture.
Alternative View: Control Architectures Decision Matrix
This variant presents a decision framework for architects choosing between control approaches based on system requirements.
70.7 Practical Example: Water Quality Monitoring
70.8 Design Considerations: Edge vs Cloud Control
Tradeoff: Local Edge Control vs Cloud-Based Control Loop
Option A: Local Edge Control - PID controller runs on edge device (microcontroller, gateway) with sensor and actuator. Control loop latency 1-10ms, operates independently of network.
Option B: Cloud-Based Control - Sensor data sent to cloud, PID algorithm runs in cloud, commands sent back to actuator. Enables advanced analytics but adds 100-500ms network latency.
Decision Factors:
Choose Local Edge when: Control loop requires <50ms response time (motor speed, safety shutoffs), network connectivity is unreliable or intermittent, bandwidth costs are significant (cellular IoT), or system must operate autonomously during outages.
Choose Cloud-Based when: Control decisions benefit from cross-device coordination (building HVAC optimizing across 100 zones), advanced ML models improve control quality, historical data analysis drives setpoint adjustments, or remote monitoring and tuning are required.
Latency comparison: Local edge achieves 1-10ms control loop. Cloud-based adds 50-200ms (Wi-Fi to internet) or 100-500ms (cellular) round-trip, making it unsuitable for systems with >10Hz disturbance frequencies.
Hybrid approach: Run fast local PID for stability, use cloud for setpoint optimization and supervisory control.
70.9 Interactive: Control Loop Latency Impact
Explore how control loop latency affects system stability for different process speeds.
70.10 Knowledge Check
For Kids: Meet the Sensor Squad!
Open-loop vs closed-loop is like playing a game with your eyes open or closed!
70.10.1 The Sensor Squad Adventure: The Watering Challenge
Sammy the Sensor and Max the Microcontroller had a contest to see who could water the garden better.
Max went first. “Easy!” he said. “I’ll just turn on the sprinkler for exactly 10 minutes every morning.” He set a timer and walked away. But it rained that afternoon – and the garden got SOAKED! The next day was super hot, and the plants wilted because 10 minutes wasn’t enough. Max’s system was open-loop – like watering with your eyes closed!
Then it was Sammy’s turn. Sammy stuck a moisture sensor in the soil. “I’ll check how thirsty the plants are FIRST,” Sammy explained. “If the soil is dry, I water. If it’s wet from rain, I skip it!” When the rainstorm came, Sammy’s system said “Soil is already wet – no watering needed!” On the hot day, it said “Soil is very dry – water for 20 minutes!”
“That’s not fair – you’re cheating!” said Max.
“It’s not cheating,” laughed Bella the Battery. “It’s called feedback! Sammy checks what’s happening before deciding what to do. That’s what makes it a closed-loop system!”
70.10.2 Key Words for Kids
| Word | What It Means |
|---|---|
| Open-loop | Doing something without checking if it worked (like a timer) |
| Closed-loop | Checking the result and adjusting (like looking before you leap!) |
| Sensor | The “eyes” that check what’s happening |
| Setpoint | The goal you’re trying to reach (like “keep soil at 50% moisture”) |
70.10.3 Try This at Home!
The Blindfold Toast Experiment (with a parent’s help!): Try making toast using only a timer (open-loop) vs. watching the toast and popping it when it looks right (closed-loop). Which gives better results? That is the difference between open-loop and closed-loop control!
70.11 Worked Example: Open vs Closed Loop for Street Lighting
Scenario: Birmingham City Council manages 89,000 street lights. They are evaluating two IoT upgrade options to reduce the GBP 7.8 million annual electricity bill (each light: 150W sodium, on 10 hrs/night average).
Option A – Open-Loop (Timer + Astronomical Clock):
- Lights switch on/off at calculated sunset/sunrise times (adjusted monthly)
- No sensors, no feedback
- Hardware: timer relay per cabinet (1 cabinet per 40 lights) = 2,225 cabinets x GBP 45 = GBP 100,125
- Energy savings: switching off completely from midnight-5am (known low-traffic period)
- Expected savings: 89,000 x 150W x 5hrs x 365 days = 24.3 GWh/year
- Cost savings: 24.3 GWh x GBP 0.15/kWh = GBP 3.65 million/year
Putting Numbers to It
The closed-loop system’s ROI depends on the extra savings justifying the sensor cost. Let’s calculate payback:
Annual savings difference: \[ \Delta S = (31.6 - 24.3) \text{ GWh/year} \times £0.15/\text{kWh} = £1.095 \text{ million/year} \]
Extra capital cost: \[ \Delta C = (£2{,}848{,}000 + £46{,}900) - £100{,}125 = £2{,}794{,}775 \]
Payback period: \[ \text{Payback} = \frac{£2{,}794{,}775}{£1{,}095{,}000/\text{year}} = 2.55 \text{ years} \]
With a 10-year sensor lifetime, the closed-loop system delivers £8.2 million additional savings over open-loop. The feedback is worth the investment.
Option B – Closed-Loop (PIR Sensors + Adaptive Dimming):
- Each light has a PIR motion sensor. Lights dim to 20% when no pedestrians/vehicles detected, brighten to 100% on detection
- Hardware: PIR sensor + dimming controller per light = 89,000 x GBP 32 = GBP 2,848,000
- Communication: LoRaWAN gateway per 2 km2 (Birmingham = 268 km2) = 134 gateways x GBP 350 = GBP 46,900
- Cloud platform: GBP 15,000/year
- Energy savings: Average dimming 65% (lights at 20% for 70% of night, 100% for 30%)
- Expected savings: 89,000 x 150W x 10hrs x 0.65 x 365 = 31.6 GWh/year
- Cost savings: 31.6 GWh x GBP 0.15/kWh = GBP 4.74 million/year
5-Year TCO Comparison:
| Factor | Open-Loop (Timer) | Closed-Loop (PIR + Dimming) |
|---|---|---|
| Hardware (Year 0) | GBP 100,125 | GBP 2,894,900 |
| Annual energy savings | GBP 3,650,000 | GBP 4,740,000 |
| Annual maintenance | GBP 12,000 | GBP 180,000 (sensor replacements) |
| Annual platform cost | GBP 0 | GBP 15,000 |
| 5-Year Net Savings | GBP 17,790,000 | GBP 19,870,000 |
| Payback Period | 10 days | 2.7 years |
Decision: Birmingham deploys both approaches in sequence:
- Year 1: Open-loop timer upgrade across all 89,000 lights (GBP 100K investment, 10-day payback). Immediate GBP 3.65M/year savings fund Phase 2.
- Year 2-3: Closed-loop PIR retrofit on the 22,000 highest-traffic lights only (parks, high streets, residential), where adaptive dimming provides the greatest marginal benefit
- Remaining 67,000 lights on low-traffic roads stay open-loop (the additional GBP 1,090/year saving per light from closed-loop does not justify the GBP 32/light sensor cost on roads with <10 pedestrians/night)
Key Insight: Open-loop and closed-loop are not competing paradigms – they are complementary. The optimal IoT system uses open-loop where conditions are predictable (residential streets at 3 AM are always empty) and closed-loop where conditions vary (park paths may have late-night joggers or dog walkers).
Key Takeaway
Choose open-loop control for simple, predictable, cost-sensitive tasks where the environment rarely changes (LED patterns, basic timers). Choose closed-loop control whenever precision matters, conditions are unpredictable, or safety is involved (temperature regulation, motor control, irrigation). In distributed IoT systems, individual devices may operate open-loop while the overall system implements closed-loop feedback through cloud coordination – the best architectures often combine both approaches at different levels.
Key Concepts
- Open-Loop Control: A control architecture that applies a predetermined actuator output based on the setpoint alone, without measuring the actual output — simple and stable but cannot compensate for disturbances or parameter variations
- Closed-Loop Control: A control architecture that continuously measures the process output and adjusts the actuator to minimize the error between measured and desired values — compensates for disturbances and model uncertainty automatically
- Feedforward Control: A control strategy that uses knowledge of disturbances or setpoint changes to pre-compute corrective action, often combined with feedback (PID) to improve response speed beyond what feedback alone can achieve
- Plant: The physical system or process being controlled (heating element + room air + thermal mass for a thermostat; motor + gears + load for a servo system), described by a transfer function relating input to output
- Loop Gain: The total gain around the feedback loop from error signal through controller, actuator, plant, and sensor back to the summing junction — setting loop gain too high causes instability
- Dead Time (Transport Delay): A pure time delay between when a control action is applied and when its effect first appears in the process variable — common in chemical processes with fluid transport — significantly limiting achievable feedback bandwidth
- Block Diagram: A graphical representation of a control system showing signal flow between blocks representing subsystems (controller, plant, sensor), with summing junctions for feedback subtraction
Common Pitfalls
1. Using Open-Loop Control Where Feedback is Required
Controlling a motor speed in open-loop (fixed PWM duty cycle) in an application where load varies (conveyor belt with varying weight). When load increases, speed drops with no correction. Use tachometer feedback whenever output needs to be held constant under varying load.
2. Ignoring Dead Time When Designing Closed-Loop Controllers
Designing PID gains based on first-order process time constant while ignoring the process dead time. Dead time reduces the maximum achievable gain by creating phase lag at high frequencies. A rule of thumb: dead time > process time constant indicates the system is very difficult to control with PID.
3. Confusing Open-Loop Stability with Closed-Loop Stability
Assuming that because the plant (open-loop) is stable, the closed-loop system will also be stable. Adding feedback around an inherently stable plant can destabilize the system if the loop gain is too high or if significant phase lag exists. Stability must be analyzed for the closed-loop system separately.
4. Not Validating Control System with Step Response Testing
Declaring a control system working based on nominal operation without injecting test disturbances (step setpoint changes, step load disturbances). Step response testing reveals overshoot, settling time, and steady-state error that may only appear under dynamic conditions.
70.12 Summary
This chapter compared open-loop and closed-loop control systems:
- Closed-Loop Systems: Continuously monitor output and self-correct errors using feedback sensors
- Open-Loop Systems: Execute predetermined actions without measuring results
- Decision Factors: Precision requirements, environmental predictability, disturbances, cost, and safety
- IoT Architecture: Device-level open-loop with system-level closed-loop is common in distributed IoT
- Edge vs Cloud: Local edge control for fast response, cloud control for analytics and coordination
70.13 What’s Next
The next chapter explores PID Control Theory, covering the mathematics and behavior of Proportional, Integral, and Derivative control terms.
| Previous | Current | Next |
|---|---|---|
| Feedback Fundamentals | Open & Closed Loop Systems | PID Control Theory |
Related Chapters
- Feedback Fundamentals - Foundation concepts
- PID Control Theory - P, I, D term mathematics
- PID Tuning and Applications - Real-world implementation
- Edge Computing - Local vs cloud control