Non-intrusive electric bicycle identification method based on online deep learning

Through a non-invasive identification method based on online deep learning, the current and voltage data of electric bicycles are collected, steady-state and transient current characteristics are calculated, and a multi-channel attention mechanism module and classifier module are constructed to solve the existing technical problems in electric bicycle charging. It solves the problem of low behavioral recognition accuracy and achieves higher recognition accuracy and monitoring capabilities, reducing the risk of fire accidents.

CN119337196APending Publication Date: 2025-01-21HANGZHOU FUSION INTELLIGENT MFG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411191847.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The prior art has low accuracy when identifying the charging behavior of electric bicycles, making it difficult to effectively monitor and prevent fire accidents.

Method used

Using a non-invasive identification method based on online deep learning, by collecting current and voltage data of electric bicycles, calculating steady-state and transient current characteristics, building a multi-channel attention mechanism module, classifier module and hedging backpropagation module, combined with ElasticFace -Cos loss function is pre-trained and fine-tuned to achieve accurate identification of electric bicycles.

Benefits of technology

It improves the accuracy of identification of electric bicycle charging behavior, enhances the ability to monitor electric bicycle charging behavior, reduces the risk of fire accidents, and improves the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337196A_ABST
    Figure CN119337196A_ABST
Patent Text Reader

Abstract

The invention discloses a non-intrusive electric bicycle identification method based on online deep learning. The non-intrusive electric bicycle identification method comprises the following steps: step 1, collecting current and voltage data of an electric bicycle; 2, constructing an online deep learning non-intrusive electric bicycle recognition model based on feature fusion; step 3, setting an ElasticFace-Cos loss function to carry out pre-training on the model constructed in the step 2; 4, further training the model pre-trained in the step 3; and 5, randomly selecting a sample from the test set, inputting the sample into the trained model, and judging whether the output specific category is an electric vehicle or not. According to the non-intrusive type electric bicycle identification method based on online deep learning, through an online learning mode, identification of electric bicycle charging can be accurately and effectively realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an identification method, and more particularly to a non-intrusive electric bicycle identification method based on online deep learning. Background Art

[0002] In recent years, the growth of electric bicycles as the main means of transportation for urban and town residents has brought safety risks, especially the frequent occurrence of fire accidents. The vast majority of electric bicycle fires occur during the charging process, which shows that charging safety is an issue that requires special attention when using electric bicycles.

[0003] In order to improve fire prevention measures, relevant regulations were introduced in 2018, emphasizing the standardization of electric bicycle parking and charging, and strictly prohibiting the charging of electric bicycles in public spaces and private living spaces of buildings. Although such regulations help reduce fire risks, due to the uncertainty and difficulty in monitoring the charging behavior of electric bicycles, relying solely on manual inspections to identify violations is not only inefficient but also easy to miss.

[0004] With the popularity of electric bicycles, the issue of charging safety has become particularly important. The development of smart grid technology provides a new monitoring method. Through non-intrusive load monitoring and decomposition technology, the charging behavior of electric bicycles can be effectively identified, fire accidents can be reduced, and energy saving can be achieved through intelligent power management. This method not only improves safety, but also takes into account the user experience and energy saving effect.

[0005] At present, the application of non-intrusive load monitoring technology among residential users mainly focuses on some common household appliances. There is little research on the detection method of electric bicycle charging load EBCL (electric bicycle charging load). Existing methods often use incremental learning of single-classification multi-feature support vector machines, unsupervised non-intrusive methods of constant voltage charging stage features, and traditional multi-category offline training non-intrusive load identification systems. Due to the characteristics of electric bicycle charging loads such as multiple models, low power and unclear features, the traditional load identification methods have low accuracy. Summary of the invention

[0006] In view of the shortcomings of the prior art, the object of the present invention is to provide a non-invasive electric bicycle identification method based on online deep learning with high accuracy.

[0007] To achieve the above object, the present invention provides the following technical solution: a non-intrusive electric bicycle identification method based on online deep learning, characterized in that it includes the following steps:

[0008] Step 1: Collect the current and voltage data of the electric bicycle with a sampling rate of not less than 6.4KHz, collect the steady-state voltage and current before and after the switch event and the transient voltage and current when the electric bicycle is turned on for charging, and then process the current and voltage data to calculate the steady-state current root mean square, current amplitude, crest factor and transient current pulse current amplitude, transient transition time and other parameters to form a training data set;

[0009] Step 2: construct an online deep learning non-intrusive electric bicycle recognition model based on feature fusion, which consists of a multi-channel attention mechanism module, a classifier module, and a hedge back propagation module;

[0010] Step 3: Set the ElasticFace-Cos loss function to pre-train the model constructed in step 2;

[0011] Step 4: further train the model pre-trained in step 3;

[0012] Step 5: A sample is randomly selected from the test set and input into the trained model to determine whether the specific category of the output is an electric vehicle. If it is the same, the result is output. Otherwise, the total loss of the model is calculated and the model is updated.

[0013] As a further improvement of the present invention, the specific steps of collecting data to form a training data set in step 1 are as follows:

[0014] Step 1, collect current and voltage data through smart meters, oscilloscopes and other electrical equipment data acquisition devices, with a sampling rate of not less than 6.4KHz, select multiple types of electric bicycles and common household appliances, collect at least 10 types of electrical appliances, including at least 5 types of electric vehicles, collect at least 500 pieces of steady-state current data of each type, the length of each piece of data is 1 second, and the number of transient current data collected is not less than 50. Save the collected current and voltage data of the electrical appliances as npy type files to form an initial data set;

[0015] Step 1 and 2: For the collected steady-state current data, calculate the steady-state current root mean square, current amplitude, crest factor and transient current pulse current amplitude, transient transition time and other parameters. The specific calculation formula is as follows:

[0016]

[0017] I p =max(i k ), 0≤k≤N (2)

[0018]

[0019] Among them, i kIndicates the sampling points of the current in a cycle, N indicates the number of current points in a cycle, I rms is the steady-state current RMS, I p is the current amplitude, I CF is the crest factor;

[0020] Calculate the transient current pulse amplitude I for the transient current data tp , transient transition time t transient The specific calculation formulas for these parameters are as follows:

[0021] I tp =max(i(t)), t on <t<t s (4)

[0022] t transient =t s -t on , (5)

[0023] Among them, t on ,t s Respectively represent the start time and end time of transient transition;

[0024] Step 13: Take the steady-state current data of a cycle and its corresponding current RMS I rms , current amplitude I p , Crest Factor I CF A steady-state eigenvector with a length of 131 is constructed, and then a transient current data is randomly selected to calculate the pulse current amplitude I tp , transient transition time t transient , and the steady-state feature vector is spliced ​​into a fused feature vector with a length of 133, which finally constitutes the data set of this experiment, and is divided into training set and validation set according to 8:2.

[0025] As a further improvement of the present invention, the specific steps of constructing an online deep learning non-intrusive electric bicycle recognition model based on feature fusion in step 2 are as follows:

[0026] Step 2.1: Construct a multi-channel attention mechanism module, and then use the multi-channel attention mechanism module to process the mixed features. Extract channel attention through two branches of different scales, and input the feature vector into the channel attention of the local features and the global feature attention channel of the multi-channel attention module respectively. Add 1*1 convolution to the local feature attention channel to adjust the number of channels so that the local attention mechanism output features and the global attention mechanism output features can be added together.

[0027] Step 22: Use multiple convolutional layers, multi-channel attention mechanism modules and fully connected layers to build 10 classifiers with different numbers of layers to build a classifier module. The first layer of the classifier module is an activation function. The data is first input into the activation function for activation, and then passes through a convolution block with n layers, where n is 1 to 10, and finally outputs an embedding vector. The number of convolutional blocks gradually increases from 1 to 10 layers, and the final classification result is determined by voting of the 10 classifier results.

[0028] Step 2 and 3: Construct a hedge back propagation module. The error derivative of the hedge back propagation module is back propagated from each classifier. The total loss of the model is shown in the following formula:

[0029]

[0030] Among them, L(F(x), y) is the total loss of the model, l is the classifier label, a (l) is the learnable parameter of each classifier, L(f (l) (x), y) are the losses of each classifier, at the first iteration L is the total number of classifiers. As a further improvement of the present invention, the ElasticFace-Cos loss function in step 3 is as follows:

[0031]

[0032] Wherein, θ represents the angle between the feature vector x and its corresponding weight matrix w, N is the number of samples, and E(m,σ) is a normal distribution function that returns a random value from a Gaussian distribution with a mean of m and a standard deviation of σ. As a further improvement of the present invention, the specific steps of training the model in step 4 are as follows:

[0033] Step 41, connecting the multi-channel attention mechanism module, the classifier module, and the hedge back propagation module in step 21 to step 23 in series to obtain a non-intrusive load recognition model based on multi-channel data;

[0034] Step 42: Pre-train the classifier model using the ElasticFace-Cos loss function of step 3 and the training set data of step 1. The number of samples input each time is 64. When the loss function converges to a certain value and no longer decreases significantly, the model pre-training ends.

[0035] Step 43: Build an online deep learning model based on the pre-trained classifier model in step 42, and then use the test set data to fine-tune the online deep learning model.

[0036] The beneficial effects of the present invention are as follows: the present invention proposes an electric vehicle home entry detection method based on online learning, in order to solve the problem that there are many types of electric bicycles and the generalization ability of traditional deep learning is not strong, and adopts the method of online deep learning to improve the generalization ability of the model while ensuring the recognition accuracy. At the same time, this scheme adopts steady-state current and transient current as input features, which can effectively utilize the fact that during the charging process of electric bicycles, the current waveform shows obvious nonlinear characteristics and has large distortion. When starting charging, a short peak current will suddenly appear, accompanied by a short delay. Different electrical appliances have different working principles, which makes the transient characteristics and steady-state characteristics they show when performing their respective physical tasks obviously different. This characteristic can be used to realize the recognition of electric bicycles. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 a is the steady-state current waveform of the electric bicycle. Figure 1 b is the steady-state current waveform of the refrigerator. Figure 1 c is the steady-state current waveform of the range hood, Figure 1 d is the steady-state current waveform of the washing machine. Figure 1 e is the steady-state current waveform of the microwave oven. Figure 1 f is the steady-state current waveform of the induction cooker;

[0038] Figure 2 This is the framework diagram of the multi-channel attention module;

[0039] Figure 3 It is the framework diagram of the classifier module;

[0040] Figure 4 This is the framework diagram of the hedge back-propagation module;

[0041] Figure 5 This is a flow chart of the non-intrusive electric bicycle identification method based on online deep learning of the present invention. DETAILED DESCRIPTION

[0042] The present invention will be further described below in detail with reference to the embodiments shown in the accompanying drawings.

[0043] Reference Figures 1 to 5 As shown, a non-intrusive electric bicycle identification method based on online deep learning in this embodiment mainly includes the following steps:

[0044] 1) Collect the current and voltage data of the electric bicycle, with a sampling rate of no less than 6.4KHz, collect the steady-state voltage and current before and after the switch event and the transient voltage and current when the electric bicycle is turned on for charging, process the current and voltage data, calculate the steady-state current root mean square, current amplitude, crest factor and transient current pulse current amplitude, transient transition time and other parameters, and form a training data set. The specific process is as follows:

[0045] Step 1: Collect current and voltage data through smart meters, oscilloscopes and other electrical equipment data acquisition devices, with a sampling rate of no less than 6.4KHz. Select multiple types of electric bicycles and common household appliances, and collect no less than 10 types of electrical appliances, including no less than 5 types of electric vehicles. The number of steady-state current data collected for each type is no less than 500, and the length of each data is 1 second. The number of transient current data collected is no less than 50. Save the collected current and voltage data of electrical appliances as npy type files to form the initial data set.

[0046] Step 2: For the steady-state current data, calculate the steady-state current root mean square, current amplitude, crest factor, transient current pulse current amplitude, transient transition time and other parameters. Since the sampling rate of current and voltage data is 6.4KHz, each cycle of the collected data contains 128 data points. Calculate the steady-state current root mean square I with each cycle of the current steady-state stage as a unit. rms , current amplitude I p , Crest Factor I CF , the calculation formula is as follows:

[0047]

[0048] I p =max(i k ), 0≤k≤N (2)

[0050]

[0051] where i k It represents the sampling point of the current in one cycle, and N represents the number of current points in one cycle.

[0052] Calculate the transient current pulse amplitude I for the transient current data tp , transient transition time t transient The specific calculation formula is as follows:

[0053]

[0054] t transient =t s -t on , (5)

[0056] where t on ,t s They represent the start time and end time of the transient transition respectively.

[0057] Step 3: Take the steady-state current data of one cycle and its corresponding current RMS I rms , current amplitude I p , Crest Factor I CF A steady-state eigenvector with a length of 131 is constructed, and then a transient current data is randomly selected to calculate the pulse current amplitude I tp , transient transition time t transient , and the steady-state feature vector are spliced ​​into a fusion feature vector with a length of 133, which finally constitutes the data set of this experiment, and the training set and validation set are divided into 8:2. The collected data are shown in Table 1 and Table 2 below:

[0058]

[0059] Table 1 Comparison of transient characteristics of different electrical appliances

[0060]

[0061] Table 2 Comparison of steady-state characteristics of electric vehicles of different brands

[0062] 2) Construct an online deep learning non-intrusive electric bicycle recognition model based on feature fusion. The overall framework is as follows: Figure 4 As shown in the figure, the model is mainly composed of a multi-channel attention mechanism module, a classifier module, and a hedge back propagation module.

[0063] First, build a multi-channel attention mechanism module, whose framework is as follows Figure 2 As shown, it mainly includes the following steps:

[0064] Step 1: Use a multi-channel attention mechanism module to process the mixed features. Extract channel attention through two branches of different scales. First, input the feature vector into the local feature channel attention and global feature attention channels of the multi-channel attention module respectively, and add a 1*1 convolution to the local feature attention channel to adjust the number of channels so that the local attention mechanism output features and the global attention mechanism output features can be added.

[0065] Construct a classifier module. This embodiment uses multiple convolutional layers, multi-channel attention mechanism modules and fully connected layers to construct 10 classifiers with different numbers of layers. The framework is as follows: Figure 3 As shown, its construction and data processing process mainly includes the following steps.

[0066] The first layer of the classifier module is the activation function. The data is first input into the activation function for activation, then passes through a convolution block with a layer number of n (n ranges from 1 to 10), and finally outputs the embedded vector.

[0067] In this embodiment, 10 classifier modules described in Step 1 are constructed, and the number of convolutional blocks is gradually increased from 1 to 10 layers. The final classification result is determined by voting of the 10 classifier results. Figure 4 shown.

[0068] Construct the hedge back propagation module, whose framework is as follows Figure 3 As shown. Unlike the traditional back-propagation scheme, where the error derivative is back-propagated from the output layer, for the hedge back-propagation module, the error derivative is back-propagated from each classifier, and the total loss of the model is shown in formula (4):

[0069]

[0070] Where L(F(x), y) is the total loss of the model, l is the classifier label, and a (l) is the learnable parameter of each classifier, L(f (l) (x), y) are the losses of each classifier, at the first iteration L is the total number of classifiers.

[0071] 3) Set the ElasticFace-Cos (ECosLoss) loss function to pre-train the model. The loss function is shown in the following formula (8):

[0072]

[0073] Where θ represents the angle between the feature vector x and its corresponding weight matrix w, N is the number of samples, and E(m,σ) is a normal distribution function that returns a random value from a Gaussian distribution with a mean of m and a standard deviation of σ. The model is trained using this loss function, and the model is continuously updated based on the input samples to achieve accurate classification.

[0074] 4) Model training. The specific process can be as follows:

[0075] Step 1: Connect the modules constructed in step 1 in series to obtain a non-intrusive load identification model based on multi-channel data.

[0076] Step 2: Pre-train the classifier model using the loss function of step 3) and the training set data of step 1). The number of samples input each time is 64. When the loss function converges to a certain value and no longer decreases significantly, the model pre-training ends.

[0077] Step 3: Building an online deep learning model based on the classifier model pre-trained in Step 2, i.e., this embodiment Figure 4 The hedged back-propagation module shown is used to fine-tune the online deep learning model using the test set data.

[0078] 5) Inference process. After step 4) is completed, a sample is randomly selected from the test set and input into the model to determine whether the specific category of the output is an electric vehicle. If it is the same, the result is output. Otherwise, the total loss of the model is calculated to continue to update the model.

[0079] In summary, the non-intrusive electric bicycle identification method based on online deep learning in this embodiment: 1. Electric vehicle entry detection based on online deep learning enables the model to have the ability to identify the training category. 2. The model data uses transient current features and steady-state current features to integrate to improve the feature discrimination. 3. Design an online deep learning classifier, model structure and loss function.

[0080] 4. A multi-channel convolutional attention mechanism is proposed, which enables the model to learn more important features, thereby improving the robustness of the model.

[0081] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A non-intrusive electric bicycle identification method based on online deep learning, characterized in that: The steps include: Step 1: Collect the current and voltage data of the electric bicycle with a sampling rate of not less than 6.4KHz, collect the steady-state voltage and current before and after the switch event and the transient voltage and current when the electric bicycle is turned on for charging, and then process the current and voltage data to calculate the steady-state current root mean square, current amplitude, crest factor and transient current pulse current amplitude, transient transition time and other parameters to form a training data set; Step 2: construct an online deep learning non-intrusive electric bicycle recognition model based on feature fusion, which consists of a multi-channel attention mechanism module, a classifier module, and a hedge back propagation module; Step 3: Set the ElasticFace-Cos loss function to pre-train the model constructed in step 2; Step 4: further train the model pre-trained in step 3; Step 5: A sample is randomly selected from the test set and input into the trained model to determine whether the specific category of the output is an electric vehicle. If it is the same, the result is output. Otherwise, the total loss of the model is calculated and the model is updated.

2. The non-intrusive electric bicycle identification method based on online deep learning according to claim 1 is characterized in that: The specific steps of collecting data to form a training data set in step 1 are as follows: Step 1, collect current and voltage data through smart meters, oscilloscopes and other electrical equipment data acquisition devices, with a sampling rate of not less than 6.4KHz, select multiple types of electric bicycles and common household appliances, collect at least 10 types of electrical appliances, including at least 5 types of electric vehicles, collect at least 500 pieces of steady-state current data of each type, the length of each piece of data is 1 second, and the number of transient current data collected is not less than 50. Save the collected current and voltage data of the electrical appliances as npy type files to form an initial data set; Step 1 and 2: For the collected steady-state current data, calculate the steady-state current root mean square, current amplitude, crest factor and transient current pulse current amplitude, transient transition time and other parameters. The specific calculation formula is as follows: I p =max(i k ), 0≤k≤N (2) Among them, i k Indicates the sampling points of the current in a cycle, N indicates the number of current points in a cycle, I rms is the steady-state current RMS, I p is the current amplitude, I CF is the crest factor; Calculate the transient current pulse amplitude I for the transient current data tp , transient transition time t transient The specific calculation formulas for these parameters are as follows: I tp =max(i(t)), t on <t<t s (4) t transient =t s -t on , (5) Among them, t on ,t s Respectively represent the start time and end time of transient transition; Step 13: Take the steady-state current data of a cycle and its corresponding current RMS I rms , current amplitude I p , Crest Factor I CF A steady-state eigenvector with a length of 131 is constructed, and then a transient current data is randomly selected to calculate the pulse current amplitude I tp , transient transition time t transient , and the steady-state feature vector is spliced ​​into a fused feature vector with a length of 133, which finally constitutes the data set of this experiment, and is divided into training set and validation set according to 8:

2.

3. The non-intrusive electric bicycle identification method based on online deep learning according to claim 2 is characterized in that: The specific steps of constructing an online deep learning non-intrusive electric bicycle recognition model based on feature fusion in step 2 are as follows: Step 2.1: Construct a multi-channel attention mechanism module, and then use the multi-channel attention mechanism module to process the mixed features. Extract channel attention through two branches of different scales. Input the feature vector into the channel attention of the local features and the global feature attention channel of the multi-channel attention module respectively. Add 1*1 convolution to the local feature attention channel to adjust the number of channels so that the local attention mechanism output features and the global attention mechanism output features can be added together. Step 22: Use multiple convolutional layers, multi-channel attention mechanism modules and fully connected layers to build 10 classifiers with different numbers of layers to build a classifier module. The first layer of the classifier module is an activation function. The data is first input into the activation function for activation, and then passes through a convolution block with n layers, where n is 1 to 10, and finally outputs an embedding vector. The number of convolutional blocks gradually increases from 1 to 10 layers, and the final classification result is determined by voting of the 10 classifier results. Step 2 and 3: Construct a hedge back propagation module. The error derivative of the hedge back propagation module is back propagated from each classifier. The total loss of the model is shown in the following formula: Among them, L(F(x), y) is the total loss of the model, l is the classifier label, a (l) is the learnable parameter of each classifier, L(f (l) (x), y) are the losses of each classifier, at the first iteration L is the total number of classifiers.

4. The non-intrusive electric bicycle identification method based on online deep learning according to claim 3 is characterized in that: The ElasticFace-Cos loss function in step 3 is as follows: Among them, θ represents the angle between the eigenvector x and its corresponding weight matrix w, N is the number of samples, and E(m,σ) is a normal distribution function that returns a random value from a Gaussian distribution with mean m and standard deviation σ.

5. The non-intrusive electric bicycle identification method based on online deep learning according to claim 4 is characterized in that: The specific steps for training the model in step 4 are as follows: Step 41, connecting the multi-channel attention mechanism module, the classifier module, and the hedge back propagation module in step 21 to step 23 in series to obtain a non-intrusive load recognition model based on multi-channel data; Step 42: Pre-train the classifier model using the ElasticFace-Cos loss function of step 3 and the training set data of step 1. The number of samples input each time is 64. When the loss function converges to a certain value and no longer decreases significantly, the model pre-training ends. Step 43: Build an online deep learning model based on the pre-trained classifier model in step 42, and then use the test set data to fine-tune the online deep learning model.