Non-intrusive electric bicycle load monitoring method based on lightweight neural network
By combining the lightweight MobileNetV3 neural network and the DTW algorithm, the problems of high computational complexity and phase offset in non-intrusive load monitoring in edge computing scenarios are solved, achieving efficient and real-time load decomposition, improving recognition accuracy and reducing resource consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-10
AI Technical Summary
Existing non-intrusive load monitoring methods suffer from high computational complexity, high resource consumption, limited accuracy, and phase shift issues in edge computing scenarios, making it difficult to meet the requirements of low power consumption, real-time performance, and high accuracy.
We employ a lightweight MobileNetV3 neural network and Dynamic Time Warping (DTW) algorithm, combined with time-frequency domain feature fusion, and acquire data through a dual-MCU architecture. We optimize the time alignment algorithm, reduce computational complexity, and solve the phase offset problem to achieve efficient load decomposition.
Efficient load decomposition was achieved on edge devices, reducing computing resource consumption and inference time, and improving recognition accuracy, achieving a single-load recognition rate of 97.5% and a multi-load combination accuracy of 92%-96%, with errors controlled within MAE<4.0% and RMSE<4.2%, and inference time compressed to within 50ms.
Smart Images

Figure CN121633663A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of non-invasive load monitoring (NILM) technology, specifically relating to a non-invasive load monitoring method based on MobileNetV3 and Dynamic Time Warping (DTW) edge computing, and more particularly to a non-invasive electric bicycle load monitoring method based on lightweight neural networks, applicable to fields such as smart homes, energy management, and industrial monitoring. Background Technology
[0002] Non-intrusive load monitoring (NILM) identifies the operating status and energy consumption of individual appliances by analyzing total power consumption data (such as voltage, current, and active power). It offers advantages such as requiring no additional sensors, low cost, and ease of deployment, and is widely used in smart homes, building energy management, and industrial system optimization. In edge computing scenarios, NILM needs to meet the requirements of low power consumption, real-time performance, and high accuracy, but traditional methods have the following limitations:
[0003] Event-based detection methods identify loads by detecting power surges (such as electrical switching events). These methods rely on high-frequency sampling (>10kHz), are sensitive to noise and overlapping events, and have high computational complexity (O(N)). 2 It is not suitable for edge devices.
[0004] Traditional machine learning methods, such as Support Vector Machine (SVM) and Random Forest (RF), classify data by manually extracting features (such as power harmonics), which has limited accuracy (approximately 83%-85%) and performs poorly in scenarios with multiple overlapping electrical appliances.
[0005] Deep learning-based methods, such as Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN), have a large number of model parameters (VGG16 has approximately 138M parameters), inference latency >200ms, and high resource consumption.
[0006] Lightweight model-based methods, such as MobileNetV1 / V2, reduce computational cost (4-10M parameters), but struggle to handle phase shift issues caused by overlapping multiple electrical appliances.
[0007] Furthermore, Dynamic Time Warping (DTW) can align nonlinear sequences, but traditional DTW has a computational complexity of O(N^2). 2 To address the aforementioned issues, this invention proposes a NILM method based on MobileNetV3 and a hybrid time-frequency domain DTW algorithm to achieve efficient load decomposition for edge devices. Summary of the Invention
[0008] The purpose of this invention is to provide a non-intrusive electric bicycle load monitoring method based on a lightweight neural network, which achieves efficient load decomposition of edge computing devices through a lightweight model and an optimized time alignment algorithm.
[0009] The present invention proposes a non-intrusive electric bicycle load monitoring method based on a lightweight neural network, the specific steps of which are as follows:
[0010] (1): Collect total electrical energy consumption data of electric bicycles, including voltage V. t The time series of current I and active power P were collected using optimized acquisition based on Nyquist's theorem, with a sampling frequency of 6.6kHz, and were acquired using a dual MCU architecture and sensors.
[0011] (2): The time series was segmented using a 100ms sliding window to generate power segments, with more than 1000 sampling points.
[0012] St={Pt-M+1,Pt-M+2,...,Pt} (1)
[0013] Where: St is the power segment at time t, M = 100 seconds; normalizing the power values yields the dynamic programming calculation of the sequence distance:
[0014]
[0015] Where: P′ t Pmin is the normalized power, ranging from [0,1], Pmax is the minimum power in the sampling interval, Pt is the maximum power in the sampling interval, and Pt is the power value sampled at the current time.
[0016] (3): Time-frequency domain feature fusion: the current signal is extracted by FFT to extract the 50Hz odd harmonics and fused with the power features;
[0017] (4): The dynamic time warping (DTW) algorithm is used to align the sequence. When the power is >5W, event monitoring is triggered and the current sequence before and after the event is extracted. The time is from j-20 to j+20. The phase offset problem is solved by calculating the sequence distance (formula (2)) through dynamic programming.
[0018]
[0019] Where: St is the power or current sequence to be matched when the event segment is detected, T is the predefined electrical template when the standard signal sequence is detected, Si is the i-th point of the sequence to be detected, tj is the j-th point of the template sequence, d(si,tj) is the distance between points, defined as the squared difference, min∑i,jd(·) is the optimal matching path found through dynamic programming, used to find the minimum distance between sequences, and DTW reduces the complexity to O(N) through hierarchical sampling;
[0020] (5): Input the aligned fragment into the MobileNetV3-Small model, which is a 16-layer depthwise separable convolutional model with an SE module and 4.2M parameters, and extract the feature vector:
[0021] F t =MobileNetV3(St,θ) m (4)
[0022] Where: θm are the MobileNetV3 parameters, the model contains 16 layers of depthwise separable convolutions and SE (Squeeze-and-Excitation) attention mechanism, and the number of parameters is 4.2M;
[0023] (6): Calculate the rate of change of power as an additional feature:
[0024]
[0025] Where: Pt′ is the normalized power at time t (from formula (2)), Pt-1 is the normalized power at time t-1, Δt is the time interval, and ΔPt is the power change rate, representing the power change amplitude per unit time; select the maximum value of ΔPt, the corresponding time point and the power value to form the feature vector [Ft,ΔPt];
[0026] (7): Using the feature vector [Ft, ΔPt] as input and the appliance status (on / off) and energy consumption value as output, construct a neural network model:
[0027]
[0028] Where: θn are the neural network parameters, and the output... This includes state classification (0 / 1) and energy consumption regression (W);
[0029] (8): Deploy the model on an STM32H745 edge device (dual-core Cortex-M7 / M4, 1MB RAM) for real-time inference.
[0030] In this invention, the dual MCU architecture acquisition in step (1) uses STM32G474 as the front-end acquisition and STM32H745 as the back-end processing. The sensor used is a Hall current sensor LT58-S7±70A and a voltage transformer ZMPT101B 250V.
[0031] This invention proposes a non-invasive electric bicycle load monitoring method based on a lightweight neural network, which can also be applied to other household appliances, including laptops, refrigerators, and hair dryers.
[0032] The beneficial effects of this invention are as follows:
[0033] This invention significantly improves NILM performance in edge computing scenarios by combining the lightweight architecture of MobileNetV3 with an optimized DTW algorithm. Compared to traditional methods, the advantages of this invention are:
[0034] In terms of efficient edge adaptation, this invention achieves a 55.55% reduction in runtime and a significant reduction in storage overhead (2KB less SRAM and 34.6% less Flash) through feature extraction optimization (accounting for only 1.94% of the 6.5M computation cycles) and FFT acceleration technology. For high-precision recognition, the single-load recognition accuracy exceeds 97.5%, the multi-load combination accuracy reaches 92%-96%, and the overall accuracy is 95% (superior to comparable models such as RF / LSTM). Its strong robustness is guaranteed by the DTW algorithm, effectively solving the phase shift problem of multiple overlapping electrical appliances, and exhibiting excellent error control (MAE < 4.0%, RMSE < 4.2%). Ultimately, it achieves significant optimization results: inference time is compressed to within 50ms, a 75% speedup compared to CNN / RNN, while MAE is reduced by 50% compared to traditional models, combining high efficiency and high accuracy. Attached Figure Description
[0035] Figure 1 Non-intrusive load operating current-time curves; where: (a) is a laptop, (b) is a refrigerator, (c) is a hair dryer, and (d) is an electric bicycle. Detailed Implementation
[0036] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] Example 1: This invention provides a non-intrusive load monitoring method for household appliances based on a lightweight neural network, comprising the following steps:
[0038] Step 1: Collect voltage, current, and active power data from four typical household appliances (laptop, refrigerator, hair dryer, and electric two-wheeler). The sampling frequency is set to 6.6kHz. The data acquisition system adopts a dual MCU architecture, with an STM32G474 as the front-end acquisition unit and an STM32H745 as the back-end processing unit. The sensors used are a Hall current sensor LT58-S7 (±70A) and a voltage transformer ZMPT101B (250V). Figure 1 (a) is the current-time curve of the laptop computer during operation. Figure 1 (b) shows the current-time curve during refrigerator operation. Figure 1 (c) shows the current-time curve during the operation of the hair dryer. Figure 1 (d) Current-time curve when charging an electric two-wheeler;
[0039] Step 2: The sampling sequence is segmented using a 100ms window to obtain power segments St={Pt-M+1,…,Pt}, and the power sequence is normalized and smoothed (K=5);
[0040] Step 3: Extract the 50Hz odd harmonics from the current signal using Fast Fourier Transform (FFT) and fuse them with the power characteristics;
[0041] Step 4: When the power is greater than 5W, trigger event monitoring, extract the current sequence before and after the event and perform DTW alignment;
[0042] This method can solve the phase shift problem when multiple electrical appliances are running simultaneously;
[0043] Step 5: Construct MobileNetV3-Small (128 hidden neurons, Adam optimizer, learning rate 10⁻³) and extract deep feature vectors;
[0044] Step 6: Calculate the rate of change of power ΔP t It is fused with MobileNetV3 features as an additional feature;
[0045] Step 7: Input the features into the neural network, and output the operating status and energy consumption yt of the electrical appliance;
[0046] Step 8: Deploy the trained model on the STM32H745 chip in ONNX format. The measured inference time is less than 50ms, which meets the real-time requirements.
[0047] To demonstrate the effectiveness of this invention, the estimation results are evaluated based on two error statistics: accuracy and precision. Table 1 shows the identification accuracy before optimization for multi-load combinations and single loads, reaching a maximum of 99%; Table 2 shows the identification accuracy after optimization for multi-load combinations and single loads, maintaining the accuracy and precision before optimization while reducing computational load; Table 3 shows the resource consumption for feature extraction in the edge device optimization algorithm; Table 4 shows the average performance comparison of different models on each single load.
[0048] Table 1: Identification accuracy of multi-load combinations and single-load combinations (before optimization)
[0049]
[0050]
[0051] Table 2: Identification accuracy of multi-load combination and single-load (after optimization)
[0052] Load Combination accuracy Accuracy Refrigerator + Laptop 99% 97% Hair dryer + laptop 97.5% 97.5% Hair dryer + refrigerator 96% 99% electric two-wheeler 98.65% 98% laptop 96% 97% Hair dryer 98% 99% refrigerator 96% 97.5%
[0053] Table 3: Resource Consumption for Feature Extraction in Edge Device Optimization Algorithms
[0054] Feature type SRAM (kB) Flash (kB) Number of cycles (K) Original convolution (voltage + current) 6 4 16.5 Original convolution (current) 4 4 6.5 Power characteristics P 4 12 18 Feature S 5 12.5 12 FFT 10 15.6 90 FFT (Skip Reordering Optimization) 8 10.2 40
[0055] Table 4: Model Performance Comparison
[0056] Model type accuracy Accuracy F1 value Random Forest (RF) 83.00% 87.25% 85.50% Support Vector Machine (SVM) 85.00% 88.50% 86.25% Long Short-Term Memory Network (LSTM) 91.00% 95.75% 92.25% MobileNetv1 90.5% 91.75% 91.50% MobileNetv2 93.00% 93.95% 92.75% MobileNetv3 98.85% 98.55% 98.50%
[0057] The results show that the proposed method has high accuracy, strong robustness and versatility in edge computing scenarios, and is suitable for smart home and industrial applications.
[0058] This invention combines the lightweight architecture of MobileNetV3 with the time-frequency domain DTW algorithm to overcome the deployment bottleneck of traditional NILM in resource-constrained MCUs, providing an efficient solution for edge computing energy management.
[0059] The above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the concept and scope of the present invention. Without departing from the design concept of the present invention, all modifications and improvements made by those skilled in the art to the technical solutions of the present invention should fall within the protection scope of the present invention. The technical content for which protection is sought in the present invention has been fully described in the technical requirements.
Claims
1. A lightweight neural network-based non-intrusive electric bicycle load monitoring method, characterized by The specific steps are as follows: (1): Collecting the total power consumption data of the electric bicycle, which includes the time series of voltage V t , current I and active power P, optimized collection according to Nyquist theorem, sampling frequency is 6.6 kHz, using double MCU architecture and sensor for collection; (2): The time series is segmented using a 100ms sliding window to generate power segments, and the sampling point is >1000 points: St={Pt-M+1,Pt-M+2,...,Pt} (1) Where: St is the power segment at time t, M=100 seconds; normalize the power value to obtain the dynamic programming calculation sequence distance: wherein: P' t is the normalized power, ranging between [0, 1], Pmin is the minimum power of the sampling interval, Pmax is the maximum power in the sampling interval, and Pt is the power value obtained by sampling at the current time. (3): Time-frequency domain feature fusion, the current signal is extracted by FFT to extract the 50Hz odd harmonic, and the power feature is fused; (4): Align the sequence using the dynamic time warping (DTW) algorithm, trigger event monitoring when the power is >5W, extract the current sequence before and after the event, and the time is j-20 to j+20; solve the phase shift problem by dynamic programming calculation sequence distance (formula (2)); Where: St is the power or current sequence to be matched for the monitored event segment, T is the pre-defined appliance template for the standard signal sequence, si is the i-th point of the sequence to be detected, tj is the j-th point of the template sequence, d(si,tj) is the distance between points, defined as the square difference, min∑i,jd(·) is the optimal matching path found by dynamic programming, used to calculate the minimum distance between sequences, and DTW reduces the complexity to O(N) by hierarchical sampling; (5): Input the aligned segment into the MobileNetV3-Small model, which is a 16-layer depth separable convolution plus SE module with a parameter amount of 4.2M, and extract the feature vector: F t = MobileNetV3(St, θ m ) (4) Where: θm is the MobileNetV3 parameter, the model includes 16 layers of depth separable convolution and SE (Squeeze-and-Excitation) attention mechanism, and the parameter amount is 4.2M; (6): Calculate the power change rate as an additional feature: Where: Pt' is the normalized power at time t (from formula (2)), Pt-1' is the normalized power at time t-1, Δt is the time interval, and ΔPt is the power change rate, which represents the change amplitude of power per unit time; Select the maximum value of ΔPt, the corresponding time point and power value to form the feature vector [Ft, ΔPt]; (7): Take the feature vector [Ft, ΔPt] as input and the appliance state (on / off) and energy consumption value as output to build a neural network model: where: θn is the neural network parameter, output including state classification (0 / 1) and energy consumption regression (W); (8): Deploy the model on the STM32H745 edge device for real-time inference, and the STM32H745 edge device is a dual-core Cortex-M7 / M4 with 1MB RAM.
2. The method of claim 1, wherein The dual-MCU architecture in step (1) uses STM32G474 as the front-end acquisition and STM32H745 as the back-end processing, and the sensor uses a Hall current sensor LT58-S7±70A and a voltage transformer ZMPT101B 250V.
3. A lightweight neural network-based non-intrusive electric bicycle load monitoring method according to claim 1 applied to household appliances.