The Mistake: Running a single simulation with ideal parameters (maximum battery, perfect signal strength, no interference) and assuming the system will work in production.
Real-World Example: A student team designed a smart parking system using the MQTT simulator. They tested with a single sensor publishing to a broker every 5 seconds. The simulation showed 100% message delivery. When they deployed 50 sensors, the system collapsed — the broker couldn’t handle 600 messages per minute, and the network became congested.
Why It Happens: Simulators typically model single-device behavior under ideal conditions. They don’t capture: - Scale effects: 1 device works; 50 devices create contention - Network congestion: Wireless channels have limited capacity - Broker limits: Message queuing fills RAM, causes drops - Timing collisions: Devices publishing simultaneously create packet collisions
The Fix: Stress-Test Your Simulations
- Vary one parameter at a time to find breaking points:
- Battery voltage: Test at 3.3V, 2.8V (80% drained), 2.4V (critical)
- Signal strength: Test at RSSI -40 dBm (excellent), -70 dBm (good), -90 dBm (marginal)
- Message rate: Test at 1x, 5x, 10x expected load
- Simulate worst-case scenarios:
- All devices wake simultaneously (worst-case channel congestion)
- Gateway offline for 5 minutes (message buffering stress)
- Firmware bug causes one device to spam (DoS resilience)
- Document three cases in your design report:
- Best case: Ideal conditions (as reference baseline)
- Typical case: Median expected conditions (design target)
- Worst case: 95th percentile conditions (safety margin)
Example: LoRaWAN Parking Sensors Stress Test
Scenario Happy Path
1 device SF7 Duty cycle 1%
Collision rate: 0%
Design decision: Works perfectly.
Scenario Typical
50 devices SF7 Duty cycle 1%
Collision rate: 8%
Design decision: Acceptable.
Scenario Worst Case
50 devices SF12 Duty cycle 10%
Collision rate: 47%
Design decision: FAIL - Need SF diversity or TDMA.
The worst-case simulation revealed that during morning rush hour (10% duty cycle as everyone arrives), devices using SF12 (slowest, longest airtime) would collide 47% of the time. The fix: Assign different spreading factors to stagger transmissions, reducing collisions to <15%.
Rule of Thumb: If your simulation shows 0% failures, you haven’t stressed it enough.