A method and system for identifying a touch signal based on sliding window trend analysis
By using sliding window trend analysis and Euclidean distance evaluation technology, the problems of maloperation and leakage of low-voltage distribution network protectors have been solved, enabling rapid and accurate identification of electric shock signals and improving personal safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID FUJIAN ELECTRIC POWER RES INST
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-19
AI Technical Summary
Existing residual current devices for low-voltage distribution networks are prone to failure to operate, malfunction, and low operating rate under external interference and environmental changes, which increases the risk of electric shock and makes it impossible to effectively identify electric shock signals from living beings.
A sliding window-based trend analysis method is adopted to observe the trend of residual current waveform changes and use sliding window threshold labels and standardized Euclidean distance evaluation technology to achieve rapid detection and accurate identification of electric shock signals, including building a simulation platform, sampling signal analysis and classification.
It significantly improves the accuracy and reliability of electric shock signal identification, overcomes the problems of misjudgment and missed judgment, has excellent real-time processing capabilities and high accuracy, adapts to unknown samples and interference signals, and reduces the computational burden.
Smart Images

Figure CN122242215A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of low-voltage distribution network protection technology, and in particular to a method and system for identifying electric shock signals based on sliding window trend analysis. Background Technology
[0002] In power systems, personal protection against electrical faults is paramount, with electric shock and electrical fires being common consequences of fault currents. Currently, existing residual current devices (RCDs) in low-voltage distribution networks operate on the principle that protection is triggered when the residual current in the line exceeds a detection threshold. While RCDs provide significant protection, they often suffer from problems such as failure to operate, malfunctions, and low operational efficiency due to external interference and changes in the atmospheric environment at the installation site. For example, RCDs may have difficulty closing under heavy loads; or the low insulation of electrical equipment and lines due to humid weather can increase the normal residual current, causing the RCD to malfunction; and improper wiring by users can lead to frequent power outages and tripping, resulting in numerous RCD failures and increasing the risk of electric shock. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a method and system for identifying electric shock signals based on sliding window trend analysis. It aims to achieve rapid detection and accurate identification of electric shock signals by observing the trend and pattern of residual current waveform changes in different types of electric shock, thereby solving the difficulty in engineering where it is impossible to directly detect and identify electric shock signals of living beings and ensuring personal safety.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: a method for identifying electric shock signals based on sliding window trend analysis, comprising the following steps:
[0005] Step S1: Build an electric shock experiment software simulation platform, set the residual current sampling frequency to 10kHz, and the sampling time to 10 cycles (0.2s).
[0006] Step S2: Build a simulation model based on the human body impedance model and collect residual current sampling signals under three types of electric shock: electric shock to living beings, electric shock to non-living beings, and no electric shock.
[0007] Step S3: Determine the size of the sliding window based on the impedance characteristics of the organism;
[0008] Step S4: Calculate the effective value X of the sampled signal for each period. rms and the change in effective value X of the period rms∆ Analyze the waveform variation trends of different types of electric shock;
[0009] Step S5: Place the effective value changes of three consecutive signal cycles into a sliding window, and define the sliding window threshold label T by combining the characteristics of electric shock in living organisms and trend analysis. h =1,2,3;
[0010] Step S6: Utilize the simplicity and reliability of the standardized Euclidean distance evaluation technique to determine the constituent component values of the threshold label.
[0011] Step S7: The periodic effective value change of the residual current sampling signal is divided into threshold labels by the constituent components in the sliding window. The obtained threshold labels are matched with the electric shock type classification table to realize real-time identification of dynamically changing residual current.
[0012] In a preferred embodiment, step S2 includes the following steps: the human body impedance model specifically refers to the human body impedance as a composite network, where the total resistance of the human body is the internal resistance R of the human body. B and skin resistance Z S The sum, under normal conditions, mainly depends on the skin impedance of the human body. After an electric shock, the skin impedance is a time-varying network for a very short time (about 2-3 cycles), with its resistance value decreasing from large to small, and then it becomes a time-invariant network. This characteristic of skin impedance determines that the electric shock current flowing through the human body is an increasing periodic function in the initial 2-3 cycles.
[0013] The impedance characteristics of living organisms refer to the fact that after an electric shock, the resistance of a living organism gradually decreases over a period of approximately 0.04s to 0.06s at power frequency, and then remains constant. Therefore, the electric shock current of a living organism initially increases and then remains constant after an electric shock accident. The impedance characteristics of non-living organisms are purely resistive; the current increases at the moment of electric shock and then remains constant.
[0014] In a preferred embodiment, in step S4, since the sampling time is 10 cycles (0.2s) and the number of sampling points per cycle is 200, the sampled signal is data of length 2000: x1, x2,..., x 2000 The subscript indicates the sequence number; a larger sequence number indicates newer data. The sampled signal is divided into periods and analyzed as follows: Calculate the effective period value X of the sampled signal. rms (i), as shown in formula (1).
[0015] (1)
[0016] In the formula: i = 1, 2, ..., 10.
[0017] To analyze the changing trend of the sampled signal, the change in the effective value X of the sampled signal is calculated. rms∆ (z), as shown in formula (2).
[0018] (2)
[0019] In the formula: z = 1, 2, ... 9.
[0020] In a preferred embodiment, step S5 includes: defining a sliding window threshold label: 1. When the change in the effective value of the sampling signal period is less than or equal to the maximum change in the effective value after an electric shock to a non-living person, T h =1; When the change in the effective value of the sampled signal period is greater than or equal to the maximum change in the effective value after an inanimate object is electrocuted, and less than the minimum change in the effective value at the moment of an inanimate object being electrocuted, T h =2; When the effective value change of the sampling signal period is greater than or equal to the minimum effective value change at the moment of electric shock to the living person, T h =3.
[0021] In a preferred embodiment, in step S5, the sliding window threshold label consists of two components i none i ele i none This represents the maximum effective value change after an inanimate object is electrocuted; i ele It represents the minimum effective value change of a living organism at the moment of electric shock.
[0022] In a preferred embodiment, in step S5, since the effective value change of the sampled signal only has three trends: increasing, decreasing, and unchanged, 27 results can be generated. Therefore, the classification mechanism in the sliding window is defined as follows: 1. If there are at least two consecutive periods where the effective value change is greater than the maximum effective value change after an electric shock to a non-living person, that is, the sliding window includes T... h =2、T h =3, then it is considered that an electric shock to a living being has occurred; 2. If T exists h =2 or T h =3, then T h =1, then it is considered that a non-living object has been electrocuted; 3. If there are two consecutive T h =1, or the electric shock occurs in the last cycle of the sliding window, it is first classified as no electric shock, and then the fault is classified in the next sliding window to increase the accuracy. Based on the above, an electric shock type classification table is generated, and the results of three categories, namely electric shock of living beings, electric shock of non-living beings, and no electric shock, are output according to the changing trend.
[0023] In a preferred embodiment, step S6 includes the following steps: Standardized distance Euclidean distance evaluation is a method for estimating the similarity between different samples, measuring the magnitude of differences between samples. A larger distance indicates a greater difference between the two samples, and a lower probability that they are of the same type of electric shock. The changes in the effective residual current value of different types of electric shock are compared and studied using distance evaluation technology at the same time dimension. The absolute distance between the changes in the effective residual current value of different types at the same moment is calculated to determine the maximum value of the effective value change after an inanimate object's electric shock and the minimum value of the effective value change at the moment of an inanimate object's electric shock.
[0024] This invention provides an electric shock signal identification system based on sliding window trend analysis, including a processor, a memory, and a bus. The memory stores machine-readable instructions executed by the processor. When the system is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the electric shock signal identification method based on sliding window trend analysis is as described above.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] 1) This invention, through sliding window trend analysis and multi-level threshold labeling mechanism, can accurately distinguish different types of electric shock states such as electric shock of living beings, electric shock of non-living beings, and no electric shock, which significantly improves the accuracy and reliability of electric shock signal identification and overcomes the problem of misjudgment and missed judgment caused by traditional residual current protection relying on only a single threshold.
[0027] 2) This method employs a lightweight trend analysis algorithm, possessing excellent real-time processing capabilities and rapid response characteristics, meeting the speed requirements of residual current devices. It can simultaneously detect and identify electric shock signals without requiring feature extraction or artificial intelligence training. This significantly reduces computational burden while maintaining recognition accuracy.
[0028] 3) By introducing a threshold determination mechanism based on standardized Euclidean distance and a trend classification strategy, this method demonstrates strong adaptability and stability when dealing with unknown samples and interference signals, thus achieving higher accuracy and robustness in practical applications. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating a preferred embodiment of the present invention;
[0030] Figure 2 The waveform of the residual current sampling signal is randomly selected;
[0031] Figure 3 The threshold label and electric shock type are displayed in the first sliding window. Detailed Implementation
[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0033] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0034] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations according to this application; as used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise; furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0035] A method for identifying electric shock signals based on sliding window trend analysis, referenced Figure 1 Step S1: Collect residual current data through the electric shock experiment software simulation platform, set the sampling frequency to 10kHz and the sampling time to 10 cycles (0.2s).
[0036] Step S2: Obtain 300 sets of residual current data for each of the following: electric shock to living beings, electric shock to non-living beings, and no electric shock. Set the electric shock time to 0.1s.
[0037] Step S3: Determine the sliding window size as 3 cycles (0.06s) based on the impedance characteristics of the organism.
[0038] Furthermore, since the electric shock time is 0.1s, the first sliding window contains data before and after the electric shock, making the threshold label defined through this window more robust and interpretable.
[0039] Step S4: Randomly select 200 sets of residual current data under three types of electric shock, and calculate the change in the effective value of the residual current period for different types of electric shock, as shown in Table 1.
[0040] Furthermore, X rms∆ (i) represents the i-th cycle, and E1=0, 1, 2 represent the electric shock type in the first sliding window as electric shock to living beings, electric shock to non-living beings, and no electric shock, respectively.
[0041] Table 1. Changes in the RMS value of residual current and types of electric shock in the first sliding window.
[0042]
[0043] Step S5: Define the sliding window threshold label T by combining the characteristics of electric shock in living organisms and trend analysis. h =1, 2, 3 and electric shock type classification table, as shown in Table 2.
[0044] Table 2 Classification of Electric Shock Types
[0045]
[0046] Step S6: Take the residual current effective value change data from step S4, and calculate the absolute distance between different types of residual current effective value changes at the same time using the standardized Euclidean distance method.
[0047] Furthermore, the formula for calculating the standardized Euclidean distance is:
[0048]
[0049] In the formula, x(x1, x2,…, x…) n ) and y1(y1, y2,…, y n () represent the coordinates of points in n-dimensional space. represents the standard deviation of each dimension.
[0050] Furthermore, the maximum value i of the effective value change after an inanimate object is calculated. none The minimum effective value change i at the moment of electric shock to a living organism is 0.44295mA. ele It is 8.81336mA.
[0051] Step S7: Randomly select a set of residual current sampling signal waveforms from the remaining experimental data, as shown in the figure. Figure 2 As shown. Repeat steps S4-S5.
[0052] Step S4-2: Calculate the periodic effective value changes of the residual current sampling signal in the first sliding window, which are 0.0041mA, 14.215mA, and 2.227mA, respectively.
[0053] Step S5-2: Using the calculated threshold labels to construct components, calculate the threshold labels for the first sliding window, which are 1, 3, and 2 respectively. Figure 3 As shown.
[0054] Furthermore, by combining the electric shock type classification table, we find that the electric shock type E1=0 for this set of data, indicating that it is an electric shock type for living beings.
[0055] In summary, this method, through sliding window trend analysis and threshold labeling, effectively avoids the problem in traditional AI classification models where new samples are easily misclassified as abnormal or assigned to the wrong category. Furthermore, this method is computationally efficient, resource-efficient, and capable of rapidly and accurately identifying dynamically changing residual current signals in real time, demonstrating good engineering applicability.
Claims
1. A method for identifying electric shock signals based on sliding window trend analysis, characterized in that, Includes the following steps: Step S1: Build an electric shock experiment software simulation platform, set the residual current sampling frequency, and the sampling time is 10 cycles; Step S2: Build a simulation model based on the human body impedance model and collect residual current sampling signals under three types of electric shock: electric shock to living beings, electric shock to non-living beings, and no electric shock. Step S3: Determine the size of the sliding window based on the impedance characteristics of the organism; Step S4: Calculate the effective value X of the sampled signal for each period. rms and the periodic effective value change X rms∆ Analyze the waveform variation trends of different types of electric shock; Step S5: The effective value changes of three consecutive sampling signal cycles are placed into a sliding window, and the sliding window threshold label T is defined by combining the characteristics of electric shock to living organisms and trend analysis. h =1,2,3; Step S6: Utilize the simplicity and reliability of the standardized Euclidean distance evaluation technique to determine the constituent component values of the threshold label; Step S7: The periodic effective value change of the residual current sampling signal is divided into threshold labels by the constituent components in the sliding window. The obtained threshold labels are matched with the electric shock type classification table to realize real-time identification of dynamically changing residual current.
2. The method for identifying electric shock signals based on sliding window trend analysis according to claim 1, characterized in that, Step S2 includes the following steps: The human body impedance model specifically refers to the human body impedance as a composite network, where the total resistance of the human body is the internal resistance R of the human body. B and skin resistance Z S The sum of; after a person is electrocuted, the skin impedance is a time-varying network within a very short time, and its resistance value changes from large to small, and then it becomes a non-time-varying network.
3. The method for identifying electric shock signals based on sliding window trend analysis according to claim 1, characterized in that, In step S4, assume the sampled signal is data of length N: x1, x2, ..., x N The subscript indicates the sequence number; the larger the sequence number, the newer the data. The sampled signal is divided into periods and analyzed as follows: Calculate the effective period value X of the sampled signal. rms (i), as shown in formula (1). (1) In the formula: i = 1, 2, ..., N / n, where n is the number of sampling points in each period; To analyze the changing trend of the sampled signal, the change in the effective value X of the sampled signal is calculated. rms∆ (z), as shown in formula (2); (2) In the formula: z = 1, 2, ... N / n-1.
4. The method for identifying electric shock signals based on sliding window trend analysis according to claim 1, characterized in that, Step S5 includes: defining a sliding window threshold label: when the change in the effective value of the sampled signal period is less than or equal to the maximum change in the effective value after an electric shock to a non-living person, T... h =1; When the change in the effective value of the sampled signal period is greater than or equal to the maximum change in the effective value after an inanimate object is electrocuted, and less than the minimum change in the effective value at the moment of an inanimate object being electrocuted, T h =2; When the effective value change of the sampling signal period is greater than or equal to the minimum effective value change at the moment of electric shock to the living person, T h =3.
5. The method for identifying electric shock signals based on sliding window trend analysis according to claim 4, characterized in that, In step S5, the sliding window threshold label consists of two components, i. none i ele i none This represents the maximum effective value change after an inanimate object is electrocuted; i ele It represents the minimum effective value change of a living organism at the moment of electric shock.
6. The method for identifying electric shock signals based on sliding window trend analysis according to claim 5, characterized in that, In step S5, 27 possible results are generated for the effective value change of the sampling signal period. The classification mechanism within the sliding window is defined as follows: if there are at least two consecutive periods where the effective value change of the sampling signal period is greater than the maximum effective value change after an electric shock to a non-living person, i.e., the sliding window contains T... h =2、T h =3, then an electric shock to a living being is considered to have occurred; if T exists h =2 or T h =3, then T h =1, then it is considered that a non-living object has been electrocuted; if there are two consecutive Ts h =1, or if the electric shock occurs in the last cycle of the sliding window, it is first classified as no electric shock, and then the fault is classified in the next sliding window to increase the accuracy; generate an electric shock type classification table, and output three categories of results: electric shock of living beings, electric shock of non-living beings, and no electric shock according to the changing trend.
7. The method for identifying electric shock signals based on sliding window trend analysis according to claim 1, characterized in that, Step S6 includes the following steps: comparing the changes in the effective value of residual current for different types of electric shock using distance evaluation technology in the same time dimension, calculating the absolute distance between the changes in the effective value of residual current for different types at the same moment, so as to determine the maximum value of the effective value change after electric shock to a non-living person and the minimum value of the effective value change at the moment of electric shock to a living person.
8. A system for identifying electric shock signals based on sliding window trend analysis, comprising a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executed by the processor; characterized in that, When the system is running, the processor and the memory communicate via a bus, and the machine-readable instructions are executed by the processor as described in any one of claims 1 to 7.