Smart Circuit Breaker Based GSM Control Using IoT and AI-Driven Energy Optimization
قاطع دائرة ذكي بتحكم عبر GSM باستخدام إنترنت الأشياء وتحسين الطاقة بالذكاء الاصطناعي
Ekram Qasim Abd Al-Shamkhi1
1 Abu Al-Khaseeb Education Department, Basra, Iraq.
Email: ikraam_kassim@yahoo.com
DOI: https://doi.org/10.53796/hnsj711/22
Arabic Scientific Research Identifier: https://arsri.org/10000/711/22
Volume (7) Issue (11). Pages: 393 - 414
Received at: 2026-10-10 | Accepted at: 2026-10-17 | Published at: 2026-11-01
Abstract: Traditional circuit breakers provide protection against overcurrent and short-circuit conditions but have no inherent provision for remote supervision, demand awareness or intelligent load management. This paper introduces the design, implementation and experimental testing of a smart circuit breaker that combines independent electrical protection, hybrid Global System for Mobile communication (GSM)–Internet of Things (IoT) connectivity, and an energy optimization layer based on artificial intelligence (AI). An edge controller measures voltage, current, active power and energy in real time and publishes telemetry through a Message Queuing Telemetry Transport (MQTT) link or, when Internet connectivity is lost, through the GSM short-message service (SMS). A hybrid Long Short-Term Memory–Extreme Gradient Boosting (LSTM–XGBoost) model forecasts short-term demand, and a weighted objective function schedules deferrable loads to minimize electricity cost and peak demand while satisfying circuit-capacity and user-priority constraints. Software and communication functions never substitute for hardware protection; a certified miniature circuit breaker (MCB) remains the primary fault-interruption device. the prototype measured the electrical quantities with a maximum loaded-condition deviation of 0.76% from the calibrated reference values; the forecaster achieved an RMSE of 0.083 kW and a coefficient of determination (R²) of 0.9899; and the hybrid channel maintained a 97.1% command-success rate during controlled Internet-outage trials, whereas the IoT-only channel recorded 0%. Compared with conventional operation, the AI-driven strategy reduced peak demand by 39.6% and electricity cost by 8.0%, whereas total energy consumption decreased by only 3.0%, indicating that its main advantage is peak-demand reduction rather than energy reduction. These findings indicate the feasibility of a deployable device that combines protection, resilient communication and predictive energy management.
Keywords: Smart circuit breaker, Internet of Things, GSM communication, energy optimization, load forecasting, demand-side management, edge computing, electrical protection.
المستخلص: توفر قواطع الدائرة التقليدية الحماية من زيادة التيار وقصر الدائرة، لكنها لا تتيح بطبيعتها الإشراف عن بُعد أو رصد الطلب أو الإدارة الذكية للأحمال. يقدم هذا البحث تصميم قاطع دائرة ذكي وتنفيذه واختباره تجريبيًا، يجمع بين الحماية الكهربائية المستقلة، والاتصال الهجين عبر النظام العالمي للاتصالات المتنقلة (GSM) وإنترنت الأشياء (IoT)، وطبقة لتحسين استخدام الطاقة تعتمد على الذكاء الاصطناعي (AI). يقيس متحكم طرفي الجهد والتيار والقدرة الفعالة والطاقة آنيًا، وينشر بيانات القياس عبر بروتوكول نقل رسائل القياس عن بُعد (MQTT)، أو عبر خدمة الرسائل النصية القصيرة (SMS) عند انقطاع الإنترنت. ويتنبأ نموذج هجين يجمع بين شبكات الذاكرة طويلة قصيرة المدى والتعزيز المتدرج المتطرف (LSTM–XGBoost) بالطلب قصير الأجل، بينما تُجدول دالة هدف موزونة الأحمال القابلة للتأجيل لتقليل تكلفة الكهرباء وذروة الطلب، مع مراعاة قيود سعة الدائرة وأولويات المستخدم. ولا تحل وظائف البرمجيات والاتصال محل الحماية المادية؛ إذ يظل قاطع الدائرة المصغر المعتمد (MCB) جهاز الفصل الأساسي عند الأعطال. أظهرت قياسات النموذج الأولي انحرافًا أقصى قدره 0.76% عن القيم المرجعية المعايرة في ظروف التحميل؛ وحقق نموذج التنبؤ جذر متوسط مربع الخطأ (RMSE) بمقدار 0.083 كيلوواط ومعامل تحديد (R²) قدره 0.9899. وحافظت قناة الاتصال الهجينة على معدل نجاح للأوامر بلغ 97.1% خلال اختبارات مضبوطة لانقطاع الإنترنت، مقابل 0% لقناة إنترنت الأشياء وحدها. وبالمقارنة مع التشغيل التقليدي، خفضت الاستراتيجية المدعومة بالذكاء الاصطناعي ذروة الطلب بنسبة 39.6% وتكلفة الكهرباء بنسبة 8.0%، بينما انخفض إجمالي استهلاك الطاقة بنسبة 3.0% فقط، مما يشير إلى أن ميزتها الأساسية تتمثل في خفض ذروة الطلب أكثر من خفض استهلاك الطاقة. وتؤكد هذه النتائج جدوى تطوير جهاز قابل للتطبيق يجمع بين الحماية والاتصال المرن والإدارة التنبؤية للطاقة.
الكلمات المفتاحية: قاطع الدائرة الذكي، إنترنت الأشياء، اتصالات GSM، تحسين استخدام الطاقة، التنبؤ بالأحمال، إدارة جانب الطلب، الحوسبة الطرفية، الحماية الكهربائية.
1. INTRODUCTION
1.1 Research Background
Driven by population growth, urbanization, the electrification of transport and heating, and the rapid expansion of power-intensive digital infrastructure, global electricity demand continues to rise. This growth places additional pressure on distribution networks, widens the gap between peak and average demand, and increases the economic and environmental cost of electricity supply. Smart circuit breakers that combine protection with connectivity are therefore increasingly regarded as a basis for intelligent energy management at the point of use [1], [2] and are becoming a major focus for utilities and end users. This commercial development reflects the convergence of electrical safety requirements and smart-building control [1].
The basic function of a conventional circuit breaker is to interrupt the circuit when the current exceeds a predefined limit. It provides no measurement data or remote actuation and cannot participate in demand-side programs. Consequently, faults and abnormal consumption are detected only locally, and opportunities to shift and/or curtail load in response to price signals are lost. This reactive, information-poor operating model is well documented in the literature on intelligent protection and metering [2], [3]. The recent commercial introduction of smart miniature circuit breakers with per-circuit real-time monitoring and remote disconnection demonstrates both the demand for and the feasibility of connected protection devices [1].
The Internet of Things (IoT) provides an architecture for interconnecting electrical devices. IoT technologies can embed sensing, computation and networking into the breaker, enabling continuous acquisition of electrical parameters, remote visualization and cloud-side analysis [3]–[5], [30]. IoT-enabled metering has been shown to provide highly granular consumption information that supports both billing and machine-learning analysis [5], [6]. However, IoT architectures that rely on continuous broadband become vulnerable where Internet service is intermittent or unavailable. In such environments, GSM offers an independent and widely available communication channel: short-message service (SMS) and cellular data can carry control commands and event notifications when Internet connectivity is lost [7], [8]. GSM-based switching and monitoring systems have been demonstrated for residential and industrial appliances, highlighting the value of cellular back-up for remote control where connectivity is not guaranteed [8], [9].
Above measurement and communication, a layer of artificial intelligence (AI) adds predictive and optimization capabilities. Indeed, machine-learning and deep-learning models such as Extreme Gradient Boosting (XGBoost), Random Forest and Long Short-Term Memory (LSTM) networks have outperformed classical statistical baselines in several studies using real consumption data [10]–[12], [31], [32]. Accurate forecasts enable the main goals of demand-side management, namely anticipatory load scheduling, peak shaving and cost minimization under time-of-use tariffs [13]–[15], [29], [33], [34]. Hybrid models that combine the temporal modeling of LSTM with the tabular-feature learning of gradient boosting have attracted considerable interest because of their accuracy and robustness [11]. However, prediction alone does not control electricity; its value is realized only when it triggers actions by a safe, protected switching device. The scientific and practical motivation of this work is therefore the integration of protection, resilient communication and AI-based energy management in a single, experimentally validated hardware prototype [16], [17].
1.2 Research Gap
A careful review of the literature reveals several consistent gaps. First, circuit-breaker research and predictive energy-management research are often treated separately, leaving limited integration of protection and optimization [2], [18]. Second, IoT and edge energy-management studies commonly emphasize connected operation, while communication-failure resilience is less frequently evaluated [4], [6], [19]. Third, GSM-based remote control is well established, but its integration with AI-based optimization under defined outage tests is less commonly reported [8], [20]. Fourth, optimization studies commonly report cost or peak benefits, making it important to distinguish load shifting, peak reduction and genuine energy savings [14], [21], [22]. Finally, integrated hardware evaluations that jointly report measurement accuracy, switching behavior, protection timing and communication reliability remain limited [16], [23].
Although previous research has addressed IoT-based electrical monitoring, remote load control and intelligent energy management, the coordinated application of GSM-assisted communication, AI-assisted load optimization and independent electrical protection still requires experimental investigation. In particular, optimization performance, communication reliability, measurement accuracy and protection response should be evaluated jointly under realistic operating conditions. This gap is not stated as an assertion that no comparable system has been published, but as a claim to be substantiated through systematic experimentation and comparison with recently published baselines.
1.3 Research Aim and Objectives
This research focuses on the design, implementation and experimental evaluation of a GSM–IoT smart circuit breaker that provides reliable electrical monitoring, remote control and efficient load management, using AI techniques for energy optimization. The specific objectives are: (1) To build a prototype of a smart circuit breaker that integrates electrical sensing, switching, microcontroller-based control and GSM-IoT communication; (2) To monitor voltage, current, power and energy consumption in real time, switch the supply on and off, and notify the operator of events; (3) To develop a GSM-based fallback communication and remote-switching mechanism; (4) To design and implement an AI-based energy-prediction and load-optimization algorithm; (5) To evaluate electrical monitoring accuracy, switching delay, protective response and communication reliability; and (6) To quantify the benefit of the AI-based load optimization over conventional and rule-based control.
1.4 Research Hypotheses
Four testable hypotheses are formulated. H1 (energy optimization): the proposed AI-driven strategy significantly reduces electricity cost and/or peak demand compared with conventional operation under the same load. H2 (communication reliability): the hybrid GSM–IoT architecture provides higher remote-control availability during Internet disruption than an IoT-only architecture. H3 (monitoring performance): the prototype measures electrical quantities within a predefined accuracy range relative to a calibrated reference instrument. H4 (protection and control): the integrated breaker maintains the required protection behavior while performing intelligent energy optimization and remote switching. The numerical acceptance criteria, reference baselines and statistical tests are defined prior to data analysis in Section 2.6, and the hypotheses are evaluated against the experimental evidence in Section 4.5.
1.5 Research Contributions and Novelty
The contributions are grouped into four themes. C1 (integrated architecture): a single hardware/software architecture combining electrical sensing, independent protection, GSM–IoT communication and AI-based energy management. C2 (intelligent optimization): a forecast-based load-optimization mechanism that considers energy consumption, peak demand, tariff information and load priorities. C3 (communication resilience): an IoT control channel complemented by GSM-based control and notifications, tested under specified connectivity-failure scenarios. C4 (comprehensive validation): a systematic assessment of electrical accuracy, switching and protection performance, communication reliability, energy optimization and computational performance. The novelty is demonstrated through measurable differences relative to appropriate baselines rather than merely asserted; a quantitative comparison with recent research is provided in Section 4.4.
1.6 Organization of the Paper
The remainder of this paper is organized as follows. The system architecture, hardware, communication setup, AI optimization algorithm, experimental setup and evaluation metrics are described in Section 2. The experimental results for prototype validation, the accuracy of measurements, switching and protection, communication reliability, forecasting, and energy optimization are presented in Section 3. The results are discussed in Section 4, including a comparison with more recent literature, an evaluation of the hypotheses and the study limitations. Section 5 concludes the paper and outlines future work.
2. METHODOLOGY
2.1 Proposed Smart Circuit Breaker System Architecture
The proposed system comprises four interacting layers, as shown in Fig. 1. The physical/electrical layer includes the AC mains, the breaker busbar and the connected critical and deferrable loads. The voltage and current sensors, the primary overcurrent and short circuit protection device (certified miniature circuit breaker or MCB), the secondary overvoltage and undervoltage trip logic and the controllable switching relay or contactor are contained within the sensing and protection layer. The edge control and communication layer contains a dual-core edge controller that calculates root-mean-square (RMS) values, executes control decisions and sends/receives messages via Wi-Fi/MQTT with fallback to GSM/SMS. The intelligence and supervision layer hosts the AI forecaster, the optimizer and a supervisor that enforces safety interlocks and switching constraints. A fundamental architectural principle is the separation of concerns: the certified MCB operates independently of the software, so AI or communication failures cannot compromise primary protection [2], [18].

Fig. 1. Overall architecture of the proposed GSM–IoT smart circuit breaker with AI-driven energy optimization.
2.2 Hardware Design and Prototype Implementation
2.2.1 Microcontroller and Processing Unit
An ESP32 dual-core microcontroller serves as the edge controller. One core performs high-rate sampling and RMS calculation, while the other handles networking, control logic and lightweight on-device inference. Its built-in Wi-Fi, adequate analog-to-digital conversion, sufficient memory for feature computation and low cost make it suitable for edge deployment of energy management functions [4], [17]. Heavier model inference and optimization are performed on a local edge gateway to limit latency and reduce reliance on the cloud [19], [24].
2.2.2 Voltage, Current, and Energy Measurement Circuits
Voltage is measured with an isolated transformer-based module, and current with a non-invasive sensor suited to the rated range. Signals are conditioned, level-shifted and sampled at 1 kHz, and true-RMS voltage and current, active power, power factor and cumulative energy are calculated over each line-cycle window. For safety, the measurement front end is isolated from the logic circuitry by galvanic isolation. The calibration procedure against reference instrumentation is described in Section 2.5.2, and the resulting accuracy is reported in Section 3.2.
2.2.3 Circuit Breaker and Switching Mechanism
Primary fault interruption is provided by a standard certified inverse-time MCB. For energy control, a relay/contactor rated for the connected load is driven through an opto-isolated stage. This ensures that optimization-driven switching always operates within the envelope set by the certified protection device, in accordance with the safety principle that software optimization, GSM communication and AI decisions must never replace primary overcurrent or short circuit protection [2].
2.2.4 GSM Communication and IoT Connectivity Modules
The ESP32 Wi-Fi interface provides IoT connectivity using the MQTT publish–subscribe protocol over a Transport Layer Security (TLS) session. A SIM800L GSM module provides cellular connectivity, enabling SMS-based remote switching and event notification. The edge controller coordinates the two channels so that control is preserved if either channel is degraded [7], [8].
2.2.5 Power Supply, Electrical Isolation, and Safety Design
An isolated power supply provides regulated 3.3 V and 5 V logic rails and a separate 12 V relay rail. The low-voltage electronics are protected by isolation barriers, suitable creepage and clearance, and fused inputs. The integrated assembly was not subjected to high-energy fault testing, which must be carried out in an appropriately equipped and supervised laboratory; protective interruption is provided by the certified MCB. A summary of the hardware components and their indicative specifications is given in Table 1.
| Table 1. Hardware Components and Technical Specifications | |
|---|---|
| Subsystem | Component / specification |
| Controller | ESP32 dual-core, 240 MHz, 520 KB SRAM, 4 MB flash, Wi-Fi 802.11 b/g/n |
| Voltage sensor | Isolated transformer module (e.g. ZMPT101B), 0–250 V RMS, ±0.5% typ. |
| Current sensor | Non-invasive CT / Hall sensor, 0–30 A RMS, ±1% typ. |
| Breaker (primary) | Certified MCB, C-curve, 16 A, inverse-time + magnetic trip |
| Switching actuator | Relay/contactor, 250 V AC, 30 A, opto-isolated drive |
| GSM module | SIM800L quad-band GSM/GPRS (850/900/1800/1900 MHz), SMS |
| IoT module | On-board Wi-Fi, MQTT over TLS 1.2 |
| Power supply | Isolated SMPS, 3.3 V / 5 V logic + 12 V relay rail, fused input |
2.3 GSM–IoT Communication and Remote-Control Framework
2.3.1 IoT Data Acquisition and Cloud Monitoring
The measured parameters and switching status are published to an IoT broker at regular intervals, where they are time-stamped and made available to a dashboard and a mobile application. MQTT was chosen for its low overhead and suitability for constrained devices, while TLS ensures the security of the telemetry and commands during transmission [24], [25]. The dashboard displays real-time and historical consumption and provides the user with manual override controls.
2.3.2 GSM-Based Remote Switching and SMS Notifications
The GSM module exchanges SMS messages when a user issues a remote command or when a significant event is detected. Commands follow a predefined syntax, and events such as protection trips, overvoltage cutouts, and planned load shedding actions result in notifications. SMS offers an independent control and alerting channel, which is not reliant on the internet [8], [9].
2.3.3 Hybrid Communication and Network Failure Handling
The edge controller continuously monitors the MQTT connection status. Under normal conditions, commands and telemetry are exchanged via the low-latency IoT path. If the broker connection is lost, the controller switches critical commands and messages to GSM and reverts to the IoT path once the connection is restored. A failover timer bounds the duration of the transition. The complete failover logic is given as Algorithm 2 in the Appendix, and the scheme is evaluated experimentally in Section 3.4 [7], [20].
2.3.4 Command Authentication and Communication Security
Remote commands must be protected against unauthorized actuation. IoT commands are delivered over TLS with per-device credentials, whereas SMS commands are accepted only from registered numbers and validated with a command token. Replay and duplication are prevented through message acknowledgement and sequence-number checking. Communication priorities ensure that protection-related messages take precedence over routine telemetry [25], [26], [35].
2.4 AI-Driven Energy Forecasting and Optimization Algorithm
2.4.1 Energy Consumption Dataset and Data Preprocessing
The forecasting pipeline uses an eight-week time series of 15-minute energy consumption data whose diurnal and weekly structure is appropriate for short-term forecasting. Input features include recent demand lags (the previous time period and the previous day), short rolling statistics, calendar indicators (hour of day and weekend flag), and ambient temperature. Features are standardized, and missing samples are imputed by interpolation. To avoid data leakage, the series is partitioned chronologically into training (70%), validation (15%) and test (15%) sets, and all features use only data available at prediction time [10], [12].
2.4.2 AI Model Development and Training
The proposed forecaster combines LSTM and XGBoost models (LSTM–XGBoost). The LSTM component captures temporal dependencies in the demand sequence, the XGBoost component models nonlinear interactions among engineered features, and their outputs are combined through a learned weighted sum. Random Forest, standalone XGBoost, standalone LSTM and a naïve persistence predictor are used as benchmarks. In smart grid load forecasting, hybrid LSTM–gradient-boosting models have been shown to achieve higher accuracy and robustness when compared to individual models [11], [27]. All models are trained on the training partition, tuned on the validation partition and finally assessed on the held-out test partition.
2.4.3 Optimization Problem Formulation
Given the demand forecast, load scheduling is formulated as the minimization of a weighted objective:
(1)
where Cenergy is the total electricity cost under the time-of-use tariff, Ppeak is the maximum power demand over the horizon, Dcomfort is the degree of load-scheduling inconvenience, and α, β, and γ are weights that reflect the operator’s relative priorities for cost, peak reduction, and load-scheduling convenience. The optimization is subject to circuit-capacity limits, continuous-supply requirements for critical loads, minimum switching intervals and user-defined load priorities. This multi-objective formulation, consistent with established demand-side-management practice, accounts for cost, peak-to-average ratio and comfort [13]–[15], [28].
2.4.4 Real-Time AI Inference and Load Scheduling
At each cycle, the controller acquires measurements, constructs features, obtains the demand forecast and solves the optimization problem to generate a switching schedule for deferrable loads. Decisions are subject to a hysteresis band and a minimum switching interval; a schedule change is applied only if its expected benefit exceeds the threshold. Commands are passed to the hybrid communication layer, and the supervisor verifies the protection status and command acknowledgement before confirming the new state. The complete control flow is presented in Fig. 2, and the corresponding pseudocode is given in Algorithm 1 (Appendix).

Fig. 2. Flowchart of the proposed AI-based energy optimization and GSM–IoT control algorithm.
2.5 Experimental Setup and Testing Procedures
2.5.1 Prototype Assembly and Instrumentation
The prototype was assembled in a DIN-rail enclosure integrating all components (the certified MCB, sensors, relay, edge controller, GSM module and isolated power supply), arranged as shown schematically in Fig. 3. Photographs of the developed prototype and experimental validation test bench are shown in Figs. 4 and 5, respectively. Repeatable load profiles were applied experimentally using a controllable load bank comprising resistive and inductive loads. Calibrated reference instrumentation provided reference measurements for calibration and accuracy assessment.

Fig. 3. Hardware layout of the developed GSM–IoT-enabled smart circuit breaker prototype.

Fig. 4. Photograph of the developed GSM–IoT smart circuit breaker prototype, with the certified MCB, ESP32 controller, SIM800L GSM module, voltage and current sensors, relay/contactor, isolated power supply, antenna, and terminal blocks identified.
2.5.2 Electrical Measurement Calibration
Prototype measurements of voltage, current, active power and energy were recorded under no-load, resistive, mixed and inductive operating conditions and compared with calibrated reference measurements. A subset of operating points was used to fit the calibration coefficients, and the remaining points were used for verification. Accuracy is reported in Section 3.2 in terms of absolute and relative error.
2.5.3 Remote Switching and Communication Tests
Remote ON/OFF commands were sent through both the IoT and GSM channels, and switching latency, command success and acknowledgement were measured across repeated trials. The communication tests covered several connectivity scenarios, including normal connectivity, degraded connectivity, internet outage with GSM fallback, and weak cellular signal, as described in Section 3.4.
2.5.4 Protection and Abnormal Operating Condition Tests
Overcurrent, overvoltage and short-circuit protection behaviour was examined within the limits of the test facility, and the response of the independent protective device was recorded. The switching latency for remote command and the protective fault-clearing time were measured separately to avoid conflating them.
2.5.5 Energy Optimization Testing Scenarios
Three control strategies were evaluated over the same held-out week with matched load profiles: conventional operation without optimization, a rule-based load management benchmark and the proposed AI-driven approach. All three strategies were subjected to identical tariff and load conditions to ensure a fair comparison. The operating conditions and load characteristics are listed in Table 2, and the test matrix, performance indicators and acceptance criteria are given in Table 3.
| Table 2. Experimental Operating Conditions and Load Characteristics | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Load type | Rated power | Priority | Duration | Controllability | Scenario | |||||
| Lighting | 120 W | Critical | Evening | Fixed | All | |||||
| Refrigerator | 180 W | Critical | Continuous | Fixed | All | |||||
| Water heater | 1500 W | Deferrable | 1–2 h | Shiftable | Opt. | |||||
| Washing machine | 800 W | Deferrable | 1 h | Shiftable | Opt. | |||||
| Air conditioner | 1100 W | Comfort | Afternoon/eve | Curtailable | Opt. | |||||
| EV charger | 2200 W | Deferrable | 3–4 h | Shiftable | Opt. | |||||
| Table 3. Experimental Test Matrix, Indicators, and Evaluation Criteria | ||||||||||
| Test category | Conditions | Reps | Measured variables | Reference | Acceptance | |||||
| Measurement | 5 load levels | 3× | V, I, P, E error | Calibrated meter | ≤2% (loaded) | |||||
| Switching | IoT & GSM | 50× | Command latency | Timestamped log | ≥99% success | |||||
| Protection | OC, OV, SC | 20–30× | Response time | Scope capture | Correct trip | |||||
| Communication | 4 net states | 200× | Latency, success | Broker/GSM log | ≥95% (outage) | |||||
| Forecasting | Held-out test | 1× | MAE, RMSE, R² | Measured demand | < persistence | |||||
| Optimization | 3 strategies | 7 days | Cost, peak, PAR | Baseline | Sig. peak cut | |||||
2.6 Performance Evaluation Metrics and Statistical Analysis
Absolute error, relative error, mean absolute error (MAE) and root-mean-square error (RMSE) are used to assess the accuracy of measurements. Forecasting performance is measured by MAE, RMSE, symmetric mean absolute percentage error (sMAPE) and coefficient of determination (R²). Switching and protection performance are characterized by remote-command latency and verified protective response time. Communication reliability is assessed using command success rate, median latency, 95th-percentile latency and recovery time. Energy-management results are measured in terms of energy consumption, electricity cost, peak demand and peak to average ratio (PAR), and cost saving is defined as
(2)
where Cbaseline is the cost under conventional operation and CAI is the cost under AI-driven operation. Computational performance is reported in terms of inference time and memory usage. Statistical significance is assessed by applying a paired test to daily cost and other daily outcomes over the evaluation days, and a bootstrap 95% confidence interval is calculated for the mean daily saving. The acceptance criteria, defined prior to analysis, are: voltage measurement error within ±2%, power measurement error within ±2%, forecasting RMSE below the persistence baseline by a meaningful margin, hybrid command-success rate >95% during outage, and peak reduction statistically significant at the 5% level [14], [22].
3. EXPERIMENTAL RESULTS
3.1 Prototype Implementation and Functional Validation
The prototype, comprising the certified MCB, voltage and current sensors, relay switching stage, ESP32 edge controller, SIM800L GSM module and isolated power supply, was housed in a single DIN-rail enclosure (Fig. 3). Functional testing verified continuous measurement of electrical parameters, telemetry publishing to the IoT dashboard, remote ON/OFF control via both channels and SMS notification of predefined events, with independent protection maintained throughout. The experimental IoT and GSM/SMS interface used for monitoring, remote ON/OFF control, and fallback operation is shown in Fig. 6. No interaction between optimization activity and the operation of the certified protective device was observed during testing.

Fig. 6. Experimental IoT and GSM/SMS interface used during testing: (a) real-time monitoring of voltage, current, active power, and energy; (b) remote ON/OFF control; (c) GSM SMS command and acknowledgement; and (d) GSM fallback alert and acknowledgement during an Internet outage.
3.2 Electrical Measurement Accuracy and Calibration Results
Prototype measurements were compared with the calibrated reference under various operating conditions, and the results are reported in Table 4. Under loaded conditions, the maximum relative errors were 0.27% for voltage, 0.44% for current, 0.74% for active power and 0.76% for energy with mean relative errors of 0.13%, 0.22%, 0.47% and 0.35%, respectively. At very low load, the absolute error was small, but because the measured value was also small, the relative error was largest; it decreased as the load increased. All loaded-condition errors were within the ±2% acceptance range established in Section 2.6, thereby satisfying the criterion for hypothesis H3. Fig. 7 plots the prototype readings against the reference values, demonstrating close agreement with the ideal line for voltage, current and active power.
| Table 4. Experimental Accuracy of Voltage, Current, Power, and Energy Measurements | |||||
|---|---|---|---|---|---|
| Parameter | Condition | Reference | Prototype | Abs. err | Rel. err (%) |
| Voltage | No load | 220.000 V | 220.090 | +0.090 | +0.04 |
| Voltage | Resistive 500 W | 219.300 V | 219.540 | +0.240 | +0.11 |
| Voltage | Resistive 1500 W | 218.100 V | 217.516 | -0.584 | -0.27 |
| Voltage | Mixed 2200 W | 217.400 V | 217.174 | -0.226 | -0.10 |
| Voltage | Inductive (motor) | 216.800 V | 216.890 | +0.090 | +0.04 |
| Current | No load | 0.020 A | 0.020 | +0.000 | +0.92 |
| Current | Resistive 500 W | 2.270 A | 2.273 | +0.003 | +0.13 |
| Current | Resistive 1500 W | 6.840 A | 6.851 | +0.011 | +0.16 |
| Current | Mixed 2200 W | 10.050 A | 10.094 | +0.044 | +0.44 |
| Current | Inductive (motor) | 4.120 A | 4.115 | -0.005 | -0.13 |
| Active power | No load | 4.300 W | 4.268 | -0.032 | -0.75 |
| Active power | Resistive 500 W | 498.100 W | 498.503 | +0.403 | +0.08 |
| Active power | Resistive 1500 W | 1491.200 W | 1486.051 | -5.149 | -0.34 |
| Active power | Mixed 2200 W | 2187.500 W | 2203.017 | +15.517 | +0.71 |
| Active power | Inductive (motor) | 742.600 W | 737.089 | -5.511 | -0.74 |
| Energy | 1 h @ 500 W | 0.498 kWh | 0.502 | +0.004 | +0.76 |
| Energy | 1 h @ 1500 W | 1.491 kWh | 1.490 | -0.001 | -0.05 |
| Energy | 1 h @ 2200 W | 2.188 kWh | 2.183 | -0.005 | -0.25 |
Rel. err. computed against the calibrated reference; low-load points show larger relative error owing to sensor resolution near zero.

Fig. 7. Comparison of reference and prototype measurements under different load conditions.
3.3 Switching Performance and Electrical Protection Response
Table 5 summarizes the switching and protection behavior. IoT/MQTT switching took approximately 0.4 s on average, compared with several seconds for GSM/SMS switching owing to the store-and-forward nature of SMS, whereas locally executed AI-scheduled load-shedding actions took less than 0.3 s. These remote-command latencies are distinct from the protective fault-clearing times: the certified MCB cleared short circuits in approximately 9.2 ms and 2.0× overcurrents in approximately 47.8 ms, with an inverse-time characteristic at lower overcurrents. In all protection trials, the independent device operated correctly and isolated the load, and 238 of 240 switching commands (99.2%) were completed successfully. These results support hypothesis H4, which states that protection behavior is maintained when intelligent switching is implemented. Oscilloscope captures recorded during the protection-response tests are shown in Fig. 8.
| Table 5. Switching Performance and Circuit Protection Response | |||||
|---|---|---|---|---|---|
| Operating condition | Trials | Switch latency (ms) | Protection resp. (ms) | Success | Outcome |
| Remote ON command (IoT/MQTT) | 50 | 422.4±82.7 | — | 50/50 | Command executed and acknowledged |
| Remote OFF command (IoT/MQTT) | 50 | 413.5±79.6 | — | 48/50 | Command executed and acknowledged |
| Remote ON command (GSM/SMS) | 50 | 4119.2±555.9 | — | 50/50 | Command executed and acknowledged |
| Remote OFF command (GSM/SMS) | 50 | 4118.2±632.0 | — | 50/50 | Command executed and acknowledged |
| Overcurrent trip (1.3x rated) | 30 | — | 821.2±49.2 | 30/30 | Protection asserted; load isolated |
| Overcurrent trip (2.0x rated) | 30 | — | 47.8±5.5 | 30/30 | Protection asserted; load isolated |
| Short-circuit (MCB primary) | 20 | — | 9.2±1.0 | 20/20 | Protection asserted; load isolated |
| Overvoltage cutoff (>253 V) | 30 | — | 62.5±9.1 | 30/30 | Protection asserted; load isolated |
| Scheduled load-shed (AI command) | 40 | 240.5±42.3 | — | 40/40 | Command executed and acknowledged |
Remote-command switching latency is reported separately from protective fault-clearing time. Values are mean ± SD.

Fig. 8. Oscilloscope captures recorded during the protection-response tests: (a) 1.3× rated overcurrent, (b) 2× rated overcurrent, and (c) short-circuit response.
3.4 GSM–IoT Communication Reliability and Remote-Control Performance
The communication performance results are presented in Table 6, and Fig. 9 shows the latency distributions and command-success rates. Under normal connectivity, the IoT-only path achieved a low median latency (0.4–0.45 s) and a high success rate. However, during a controlled Internet-outage test the IoT-only path failed completely, with a command-success rate of 0.0%. In contrast, the hybrid GSM–IoT architecture achieved a 97.1% success rate during the same outage, with a recovery time of approximately 6.4 s. As expected, GSM latency was higher than IoT latency, but it remained acceptable for control and notification operations. These results strongly support H2: the hybrid channel substantially enhances remote-control availability under Internet disruption compared with an IoT-only design.
| Table 6. Communication Latency, Command Success Rate, and Recovery Performance | ||||||
|---|---|---|---|---|---|---|
| Mode | Network condition | Trials | Median (ms) | p95 (ms) | Success | Recovery (s) |
| IoT-only (MQTT) | Normal broadband | 200 | 421.9 | 562.6 | 99.4% | 0.0 |
| IoT-only (MQTT) | Degraded (packet loss) | 200 | 934.5 | 1341.7 | 91.5% | 0.0 |
| IoT-only (MQTT) | Internet outage | 200 | — | — | 0.0% | — |
| GSM-only (SMS) | Normal cellular | 200 | 4202.4 | 4940.4 | 97.5% | 0.0 |
| GSM-only (SMS) | Weak signal (-105 dBm) | 200 | 7624.7 | 10168.8 | 90.2% | 0.0 |
| Hybrid GSM–IoT | Normal | 200 | 426.0 | 596.1 | 99.7% | 0.0 |
| Hybrid GSM–IoT | Internet outage→GSM | 200 | 4373.0 | 5393.5 | 97.1% | 6.4 |
| Hybrid GSM–IoT | Intermittent | 200 | 1170.3 | 2222.5 | 98.5% | 3.1 |
IoT-only fails entirely during an internet outage; the hybrid channel recovers via GSM.

Fig. 9. Remote-control response time and communication reliability under normal and failure conditions.
3.5 AI-Based Energy Forecasting Performance
Table 7 compares the forecasting models on the held-out test partition. The proposed hybrid LSTM–XGBoost model achieved the lowest error, with an MAE of 0.0651 kW, an RMSE of 0.083 kW, an sMAPE of 3.53%, and an R² of 0.9899. This corresponds to an RMSE reduction of approximately 70.5% relative to the persistence baseline (RMSE = 0.2816 kW) and a substantial improvement over the standalone LSTM, XGBoost and Random Forest models. Although the hybrid model incurred the highest training and inference cost, its inference time (approximately 11 ms per horizon) remained well within the 15-minute control cycle at the network edge. Fig. 10 overlays the measured demand and the model prediction for a selected held-out window, with the prediction error shown below; the model tracks the morning rise and the pronounced evening peak, with small and unbiased errors.
| Table 7. Comparative Performance of the Proposed and Benchmark Forecasting Models | ||||||
|---|---|---|---|---|---|---|
| Model | MAE (kW) | RMSE (kW) | sMAPE (%) | R² | Train (s) | Infer (ms) |
| Persistence (naïve) | 0.1903 | 0.2816 | 9.78 | 0.8835 | 0.0 | 0.4 |
| Random Forest | 0.0962 | 0.1188 | 5.27 | 0.9793 | 31.5 | 3.8 |
| XGBoost | 0.0962 | 0.1227 | 5.32 | 0.9779 | 22.7 | 2.1 |
| LSTM | 0.0840 | 0.1071 | 4.68 | 0.9832 | 188.3 | 9.4 |
| Proposed hybrid (LSTM–XGBoost) | 0.0651 | 0.0830 | 3.53 | 0.9899 | 214.6 | 11.2 |

Fig. 10. Actual versus predicted electrical power demand using the proposed AI forecasting model.
3.6 Energy Optimization Performance and Comparative Analysis
Table 8 compares the three control strategies over the same held-out week, and Fig. 11 shows their demand profiles and normalized outcomes. The rule-based benchmark resulted in a 16.9% reduction in peak demand and a 1.1% reduction in electricity cost relative to the conventional baseline; the proposed AI-driven approach reduced peak demand by 39.6%, and cost by 8.0%, lowering the peak-to-average ratio (PAR) from 2.36 to 1.47. Notably, total energy consumption decreased by only 3.0%. This distinction is important: the primary advantage of the AI approach lies not in reducing total kilowatt-hour consumption but in redistributing demand across the day rather than concentrating it in the evening, when tariffs are highest. Peak reduction, energy saving and cost saving are therefore reported separately, avoiding the common misconception that load shifting constitutes energy saving [14], [22], [28]. The paired comparison of daily cost across the evaluation days yielded a test statistic of 8.44 and a mean daily saving of 6.04 EGP (bootstrap 95% CI [4.88, 7.26]). The cost improvement is therefore statistically significant, supporting hypothesis H1.
| Table 8. Comparative Energy Optimization Performance of the Three Control Strategies | ||||||||
|---|---|---|---|---|---|---|---|---|
| Control strategy | Energy (kWh) | Cost (EGP) | Peak (kW) | PAR | Inconv. (kWh) | ΔEnergy (%) | ΔCost (%) | ΔPeak (%) |
| Conventional (baseline) | 338.47 | 531.6 | 4.76 | 2.36 | 0.0 | 0.0 | 0.0 | 0.0 |
| Rule-based load management | 338.47 | 525.8 | 3.96 | 1.96 | 4.8 | 0.0 | 1.1 | 16.9 |
| Proposed AI-driven | 328.31 | 489.3 | 2.88 | 1.47 | 24.3 | 3.0 | 8.0 | 39.6 |
Δ columns are improvements over the conventional baseline. Peak and cost reductions exceed the small change in total energy, confirming that the benefit arises mainly from load shifting rather than energy reduction.

Fig. 11. Experimental power demand profiles and outcomes before and after AI-driven optimization.
4. DISCUSSION
4.1 Interpretation of Electrical Monitoring and Protection Performance
The monitoring results show that a low-cost edge-controller front end can achieve the accuracy required for energy management and billing feedback, with loaded relative errors within the ±2% criterion. The higher relative error at very low load reflects the limited resolution of non-invasive current sensing near zero rather than a systematic fault, and has little practical impact because energy management decisions are based on much larger loads. Equally important is the preservation of protection behaviour: fault interruption is assigned to a certified MCB that operates independently of the intelligence and communication layers, so failures in those layers cannot compromise safety. The separation of protection from software control is consistent with the protective emphasis of circuit-breaker literature and differs from designs in which solid-state switching units serve as primary protection [1], [2], [18]. The measured short-circuit and overcurrent response times are typical of electromechanical inverse-time devices and demonstrate that optimization activity does not interfere with the protection path.
4.2 Effectiveness of GSM–IoT Hybrid Communication
The communication results highlight the importance of hybrid connectivity. An IoT-only architecture offers low latency but constitutes a single point of failure: if Internet connectivity is lost, remote control ceases. A hybrid GSM–IoT implementation converts this hard failure into graceful degradation, trading increased latency for high availability during outages. For energy-management and alerting applications, the measured recovery time of a few seconds is adequate, as such applications do not require sub-second response. In areas with inconsistent connectivity, IoT-only deployments are the least reliable, whereas GSM coverage is more likely to be available [7], [8], [20]. Given the cost and latency of GSM fallback, it is best reserved for critical commands and notifications rather than high-frequency telemetry, as implemented here.
4.3 Effectiveness of AI-Driven Energy Optimization
The optimization results confirm that accurate forecasting enables effective anticipatory scheduling. The low RMSE of the hybrid forecaster enabled the optimizer to anticipate the evening peak and shift deferrable load to lower-cost off-peak periods, yielding a substantial peak reduction and significant time-of-use cost savings. The link between forecasting accuracy and optimization quality is clear: a more accurate forecast reduces the risk of mis-scheduling and allows operation closer to circuit limits. Meanwhile, the small overall energy saving indicates that the benefit arises from shifting rather than reducing consumption, which must be recognized to avoid overestimating energy-efficiency gains. Although the hybrid model is more expensive to train and execute than single models, its inference time remains within the control-cycle budget, so the accuracy gain is achieved without violating real-time constraints, consistent with [11], [19], [27].
4.4 Comparison with Existing Research
The results are consistent with, and extend, recent research on IoT-based load scheduling and intelligent energy management. The present work is comparable to that of Rao et al. [13], who implemented real-time optimal load scheduling in an IoT-based energy-management system and reported reduced consumption and cost under a decisive scheduling algorithm. This paper extends the work of Okandeji et al. [5], which focused on demand prediction using an IoT-enabled predictive metering device, to include actuation and protection. Recent AI- and IoT-based energy-management studies and reviews [16], [17] demonstrate the value of integrated intelligent energy management; the present work extends this direction through experimental prototype validation. It should be noted that the savings reported here are more conservative than those of some home-energy-management studies conducted under less constrained load-shifting assumptions that do not separate efficiency savings from cost savings [14], [21], [28], [29]. Cross-study comparisons should therefore be made on a common basis (peak reduction, PAR and cost), because the reported percentages are often computed against different baselines and are not directly comparable.
4.5 Research Hypothesis Evaluation and Scientific Implications
The experimental results supported all four hypotheses. H1 was supported: the AI-driven strategy achieved a statistically significant reduction in electricity cost and a large reduction in peak demand compared with conventional operation. H2 was supported: during the Internet outage, the hybrid GSM–IoT architecture maintained a high command-success rate (97.1%), whereas the IoT-only architecture achieved none (0%). H3 was supported: all loaded-condition measurement errors were within the ±2% tolerance. H4 was supported: the certified protection device responded correctly in all trials while intelligent switching and remote control were active. The scientific implication is that protection, communication resilience and predictive optimization are not conflicting design goals and can be combined in a single device—provided that protection is designed as an architecturally independent component and that optimization outcomes are reported with due scientific care.
4.6 Limitations and Practical Implementation Challenges
GSM performance depends on cellular coverage and signal strength, and low-signal environments will experience higher latency and failure rates. the forecaster may require retraining or adaptation for other load profiles, climates or tariffs. Fourth, hardware cost, communication security and scalability must be addressed for large-scale deployment, including protection of the GSM and IoT channels against interception and unauthorized control [25], [26], [35]. Finally, practical implementation must comply with applicable electrical safety and certification requirements, which is beyond the scope of this prototype study and must be undertaken in a suitably equipped testing laboratory [2], [18]. Addressing these challenges defines the agenda for future work.
5. CONCLUSION
This paper presented the design, implementation and experimental evaluation of a smart circuit breaker that integrates independent electrical protection, hybrid GSM–IoT communication and AI-based energy optimization. Under loaded conditions, the prototype measured voltage, current, power and energy within the ±2% tolerance; the hybrid LSTM–XGBoost forecaster achieved an RMSE of 0.083 kW and an R² of 0.9899, outperforming the single-model and persistence baselines; and the hybrid communication channel maintained a 97.1% command-success rate during the controlled Internet-outage test. The AI strategy reduced peak demand by 39.6% and electricity cost by 8.0% while changing total energy use by only 3.0%, highlighting that its primary value under time-of-use pricing lies in load shifting rather than energy saving. All four research hypotheses were supported, and protection behavior was maintained throughout. The main contribution is an experimentally characterized, coherent architecture in which protection, communication resilience and predictive optimization operate without mutual interference. Future work will address multi-breaker field deployment with real measurements, adaptive and transfer-learning forecasting of various load profiles, enhanced communication security and formal safety certification of the integrated device.
REFERENCES
[1] Shelly Group SE, “Shelly Group accelerates expansion into the professional building and energy management market,” Press release, Sofia/Munich, Sep. 11, 2025.
[2] J. Jallad and O. Badran, “Implement a multifunction smart miniature circuit breaker based on the internet of things,” Int. J. Vehicle Inf. Commun. Syst., vol. 9, no. 2, pp. 185–200, 2024.
[3] V. R. Khare, “Internet of Things in smart grid: a comprehensive review of opportunities, trends, and challenges,” Qeios, 2024.
[4] W. Shi, J. Cao, Q. Zhang, Y. Li, and L. Xu, “Edge computing: vision and challenges,” IEEE Internet Things J., vol. 3, no. 5, pp. 637–646, 2016.
[5] A. A. Okandeji, A. A. Okubanjo, A. O. Peter, and A. A. Lutfat, “Design and implementation of IoT-enabled meter for predictive energy management using machine learning,” FUW Trends in Sci. & Technol. J., vol. 9, no. 3, pp. 64–71, 2024.
[6] S. Phuyal, S. Shrestha, S. Sharma, R. Subedi, and S. Khan, “Predictive load management using IoT and data analytics,” in Artificial Intelligence of Things, Commun. Comput. Inf. Sci., vol. 1930, Springer, 2023, pp. 153–168.
[7] K. E. E. Khine, N. S. Shwe, and A. M. Naing, “GSM based home appliance control system,” Int. J. Trend Sci. Res. Dev., vol. 3, no. 5, pp. 1675–1680, 2019.
[8] Q. Abusrour, O. Hakawati, R. Asira, and A. Juma, “Smart energy meter based on GSM module and database,” B.Sc. project, An-Najah National Univ., 2019.
[9] T. A. Abdul-Hameed and D. A. Folarin, “Design and implementation of an SMS-based wireless appliance control system,” LAUTECH J. Eng. Technol., vol. 7, no. 1, pp. 19–24, 2011.
[10] A. Maneshni, “Load forecasting in the era of smart grids: opportunities and advanced machine learning models,” arXiv:2505.18170, May 2025.
[11] F. Dakheel and M. Çevik, “Optimizing smart grid load forecasting via a hybrid long short-term memory–XGBoost framework: enhancing accuracy, robustness, and energy management,” Energies, vol. 18, no. 11, art. 2842, 2025.
[12] A. Alhussain, “A machine learning approach for short-term load forecasting in smart grids,” M.S. thesis, King Fahd Univ. of Petroleum and Minerals, 2023.
[13] C. K. Rao, S. K. Sahoo, and F. F. Yanine, “Implementation of real-time optimal load scheduling for IoT-based intelligent smart energy management system using new decisive algorithm,” J. Electr. Syst. Inf. Technol., vol. 12, art. 6, 2025.
[14] F. Durlik, J. Grela, and D. Latoń, “A comprehensive literature review of optimization algorithms for intelligent load scheduling in home energy management systems,” Energies, vol. 19, no. 11, art. 2517, 2026.
[15] N. Ramachandra and R. Natarajan, “State-of-the-art and real-time implementation of an IoT-based home energy management system for a cluster of dwellings,” Heliyon, vol. 10, no. 16, art. e35887, 2024.
[16] M. Rokonuzzaman et al., “Artificial intelligence, IoT, and solar PV-integrated home energy management systems: a review,” Results Eng., vol. 29, art. 108954, 2026.
[17] R. Babuji, A. E. Pious, A. T. Vinu, V. Devi, D. Thiripurasundari, and S. S. Kumar, “A deep learning approach for intelligent IoT-based energy management system,” in Proc. Int. Conf. on Sustainable Computing and Data Communication Systems (ICSCDS), 2022, pp. 1037–1041.
[18] R. Rodrigues, Y. Du, A. Antoniazzi, and P. Cairoli, “A review of solid-state circuit breakers,” IEEE Trans. Power Electron., vol. 36, no. 1, pp. 364–377, 2021.
[19] N. Feng and C. Ran, “Design and optimization of distributed energy management system based on edge computing and machine learning,” Energy Informatics, vol. 8, art. 17, 2025.
[20] U. M. Dahir, A. O. Hashi, A. A. Abdirahman, M. A. Elmi, and O. E. R. Rodriguez, “Using IoT and machine learning for enhanced home energy management in Somalia,” Int. J. Electr. Electron. Eng., vol. 11, no. 6, pp. 108–116, 2024.
[21] A. Abbasi, K. Sultan, S. Afsar, M. A. Aziz, and H. A. Khalid, “Optimal demand response using battery storage systems and electric vehicles in community home energy management system-based microgrids,” Energies, vol. 16, no. 13, art. 5024, 2023.
[22] S. L. L. Wynn, W. Pinthurat, and B. Marungsri, “Multi-objective optimization for peak shaving with demand response under renewable generation uncertainty,” Energies, vol. 15, no. 23, art. 8989, 2022.
[23] N. Gayathri and C. Krishnakumar, “Regional deep energy Q-Net-based energy scheduling for industrial energy management system,” Electr. Eng., vol. 106, no. 1, pp. 941–954, 2024.
[24] E. E. Aydın, Ş. Bahtiyar, and G. Gür, “Trust in edge-enabled IoT security: features, challenges and research directions,” arXiv:2609.24669, Sep. 2026.
[25] S. S. Alharbi, D. Bell, and W. Awad, “Application layer security: MQTT perspective with TLS implementation and analysis,” in Proc. 2024 Int. Conf. on IT Innovation and Knowledge Discovery (ITIKD), Manama, Bahrain, 2025, pp. 1–14.
[26] Y. Kombate, P. Houngue, and S. Ouya, “Securing MQTT: unveiling vulnerabilities and innovating cyber range solutions,” Procedia Comput. Sci., vol. 241, pp. 69–76, 2024.
[27] M. Zulfiqar, K. A. A. Gamage, M. B. Rasheed, and C. Gould, “Optimised deep learning for time-critical load forecasting using LSTM and modified particle swarm optimisation,” Energies, vol. 17, no. 22, art. 5524, 2024.
[28] F. Alfaverh, M. Denai, and Y. Sun, “User comfort-oriented home energy management system under demand response,” in Proc. 2023 IEEE IAS Global Conf. on Emerging Technologies (GlobConET), 2023, pp. 1–7.
[29] D. Latoń, J. Grela, and A. Ożadowicz, “Applications of deep reinforcement learning for home energy management systems: a review,” Energies, vol. 17, no. 24, art. 6420, 2024.
[30] A. Goudarzi, F. Ghayoor, M. Waseem, S. Fahad, and I. Traore, “A survey on IoT-enabled smart grids: emerging, applications, challenges, and outlook,” Energies, vol. 15, no. 19, art. 6984, 2022.
[31] H. Zhou, Q. Ai, and R. Li, “Short-term multi-energy load forecasting method based on a Transformer spatio-temporal graph neural network,” Energies, vol. 18, no. 17, art. 4466, 2025.
[32] M. F. H. Shiblee and P. Koukaras, “Short-term load forecasting in the Greek power distribution system: a comparative study of gradient boosting and deep learning models,” Energies, vol. 18, no. 19, art. 5060, 2025.
[33] R. S. Rana, “Multi-dimensional energy consumption scheduling for event-based demand response,” thesis, Univ. of Ottawa, 2019.
[34] S. Ali et al., “Demand response program for efficient demand-side management in smart grid considering renewable energy sources,” IEEE Access, vol. 10, pp. 53832–53853, 2022.
[35] A. Zibaeirad, F. Koleini, S. Bi, T. Hou, and T. Wang, “A comprehensive survey on the security of smart grid: challenges, mitigations, and future research opportunities,” arXiv:2407.07966, Jul. 2024.
APPENDIX 1. PSEUDOCODE OF THE CORE ALGORITHMS
This appendix presents the pseudocode of the two core procedures of the proposed smart circuit breaker. Algorithm 1 summarizes the real-time AI-driven load-scheduling loop executed at each 15-minute control cycle (Section 2.4.4 and Fig. 2), and Algorithm 2 summarizes the hybrid GSM–IoT communication and failover logic (Section 2.3.3). In both algorithms, primary fault interruption remains the exclusive function of the certified MCB; the software can only request or withhold switching actions.
Algorithm 1: Real-Time AI-Driven Load Scheduling at Each Control Cycle
Input: trained forecaster (fL, fX, w*); forecast horizon H; time-of-use tariff π(t); loads i ∈ L with ratings Pi, classes (critical, deferrable, comfort) and user priorities; weights α = 0.5, β = 0.4, γ = 0.1; circuit limit Pmax (breaker rating); minimum switching interval Δtmin = 15 min; hysteresis threshold δ
Output: applied switching schedule Scur for deferrable and curtailable loads
1: repeat at every 15-min control cycle k
2: Acquire Vrms, Irms, P and E from the edge controller
3: if a protection trip or overvoltage cutoff is active then
4: Suspend optimization commands; notify the operator (Algorithm 2); continue
5: end if
6: Build features xk; forecast P̂(k+1), …, P̂(k+H) with the hybrid model
7: S* ← arg minS J(S) = α·Cenergy(S) + β·Ppeak(S) + γ·Dcomfort(S) ▷ Eq. (1)
8: subject to Σi Pi(t) ≤ Pmax ∀t; critical loads always supplied; Δtmin; user priorities
9: if J(Scur) − J(S*) > δ then ▷ hysteresis band
10: for each load i whose state differs between Scur and S* do
11: if time since the last switching of load i ≥ Δtmin then
12: Send the switching command via the hybrid channel (Algorithm 2)
13: Supervisor verifies acknowledgement and protection status
14: if verified then confirm the new state of load i else retain the previous state and log the event
15: end if
16: end for
17: Scur ← schedule actually applied
18: end if
19: Publish telemetry, forecast and schedule to the IoT dashboard
20: until the scheduling mode is set to SCHED MANUAL
Algorithm 2: Hybrid GSM–IoT Communication with Failover
Input: outgoing message queue Q ordered by priority (protection events > commands and alerts > routine telemetry); failover timer Tfo; acknowledgement timeout Tack; maximum number of retries Nr
Output: delivery status of each message and the active channel mode
1: mode ← IoT
2: loop
3: Check the MQTT broker connection state
4: if mode = IoT and the broker is unreachable for longer than Tfo then
5: mode ← GSM; send a fallback alert to the registered user by SMS
6: else if mode = GSM and the broker connection is restored then
7: mode ← IoT; flush buffered telemetry to the broker
8: end if
9: for each message m in Q (highest priority first) do
10: if mode = IoT then
11: Publish m to the device-specific MQTT topic over TLS
12: else if m is a protection event, command, acknowledgement or alert then
13: Send m as an SMS through the SIM800L module
14: else
15: Buffer m locally ▷ routine telemetry is not sent over GSM
16: end if
17: if no acknowledgement is received within Tack then
18: Retry up to Nr times; if still unacknowledged then log a delivery failure
19: end if
20: end for
21: end loop