CURRENT SIGNAL SEGMENTATION ALGORITHM

20220413021 · 2022-12-29

Assignee

Inventors

Cpc classification

International classification

Abstract

A current signal segmentation algorithm is provided. The segmentation algorithm divides a current signal waveform into mutually different segments according to a physical feature thereof, extracts shape distribution, statistical and harmonic features of the segments, and calculates a similarity between a segment pair. The segmentation algorithm includes the following steps: segmenting a current signal to separate a standby current and an overshoot current, only leaving a working current; extracting a shape distribution feature of a working current segment; extracting a statistical feature of the working current segment; extracting a harmonic feature of the working current segment; calculating a similarity between a segment pair; and deriving a maximum clique set in a similarity graph through a maximum clique search algorithm as a class from automatic segmentation. The algorithm can quickly and accurately classify current signals generated by different electrical appliances in different working states so as to facilitate subsequent processing.

Claims

1. A current signal segmentation algorithm, wherein accurately depicting current signals of different electrical appliances in different states by extracting distinguishing features of the current signals comprises the following steps: 1) segmenting a current signal to separate a standby current and an overshoot current, only leaving a working current; 2) extracting a shape distribution feature of a working current segment; 3) extracting a statistical feature of the working current segment; 4) extracting a harmonic feature of the working current segment; 5) calculating a similarity between a segment pair; and 6) deriving a maximum clique set in a similarity graph through a maximum clique search algorithm as a class from an automatic segmentation.

2. The current signal segmentation algorithm according to claim 1, wherein step 1) comprises: step 1: sampling all vertices: wherein, an original signal is denoted as S, having a length of L.sub.S; sampled points are denoted as P; and every N.sub.v points are sampled to obtain a vertex V.sub.k; V.sub.k=max{P.sub.i}−min{P.sub.j}, wherein, (k−1)*N.sub.v+1≤i, j≤k*N.sub.v,k*N≤L.sub.s; step 2: starting recording when the vertex obtained by down-sampling satisfies a condition C.sub.1: (V.sub.k>V.sub.k−1 and V.sub.k>V.sub.k+1)or(V.sub.k>V.sub.k−1 and V.sub.k<V.sub.k+1); step 3: merging two neighboring segments when satisfying C.sub.2:
|sec.sub.m−sec.sub.m−1|<max(|Sec.sub.m|,|Sec.sub.m−1|)/10 wherein Sec.sub.mdenotes a mean of all points sampled in an m-th segment; and step 4: detecting the standby current and the overshoot current: determining a current of an i-th segment to be in a standby state when the current of the i-th segment satisfies the following condition: Sec.sub.i<P10{V.sub.k}, and determining the i-th segment Sec.sub.i to be an overshoot current segment when the i-th segment satisfies the following condition:
Sec.sub.i>2.Math.max(Sec.sub.i−1,Sec.sub.i+1)

3. The current signal segmentation algorithm according to claim 1, wherein the step of extracting the shape distribution feature of the working current segment comprises: step 1: extracting a value distribution class feature: S i 1 ( Se c k ) = # ( P j ) / # ( Se c k ) , i = 1 , 2 , 3 , 4 , 5 P j S e c k and P j [ min ( S e c k ) + max ( S e c k ) - min ( S e c k ) 5 .Math. ( i - 1 ) , min ( Sec k ) + max ( S e c k ) - min ( S e c k ) 5 .Math. i ) , wherein, #( ) denotes a number of points in a set in parentheses, and k denotes a k-th effective segment; and step 2: extracting a spatial distribution class feature: S i 2 ( Se c k ) = 2 .Math. # ( P j ) / # ( Se c k ) , i = 1 , 2 , 3 , 4 , 5 P j S e c k and P j median ( Sec k ) and P j [ Sec k start + Sec k end - Sec k start 5 .Math. ( i - 1 ) , Sec k start + Sec k end - Sec k start 5 .Math. i ) , wherein, median(Sec.sub.k) denotes a median of values of all points in the k-th effective segment Sec.sub.k.

4. The current signal segmentation algorithm according to claim 1, wherein the step of extracting the statistical feature of the working current segment comprises: step 1: labeling all vertices in a k-th effective segment Sec.sub.k; and step 2: calculating a mean, a median and a standard deviation of values of the all vertices.

5. The current signal segmentation algorithm according to claim 1, wherein the step of extracting the harmonic feature of the working current segment comprises: step 1: harmonically transforming all points in a k-th effective segment Sec.sub.k; and step 2: using first 16 harmonics: f ( i ) = F ( i ) / .Math. i = 0 16 F ( i ) i = 0 , 1 , 2 , .Math. 16 wherein, F(i) denotes a value of an i-th harmonic.

6. The current signal segmentation algorithm according to claim 1, wherein the step of calculating the similarity between the segment pair comprises: assigning two segments each as A and B: step 1: calculating 6 subsimilarities between the two segments: Sim i 1 ( A , B ) = .Math. i = 1 5 min ( S i 1 ( A ) , S i 1 ( B ) ) .Math. i = 1 5 max ( S i 1 ( A ) , S i 1 ( B ) ) Sim i 2 ( A , B ) = .Math. i = 1 5 min ( S i 2 ( A ) , S i 2 ( B ) ) .Math. i = 1 5 max ( S i 2 ( A ) , S i 2 ( B ) ) Sim i 3 ( A , B ) = min ( Sec _ A , Sec _ B ) max ( Sec _ A , Sec _ B ) Sim i 4 ( A , B ) = min ( σ S e c A / Sec _ A , σ S e c B / Sec _ B ) max ( σ S e c A / Sec _ A , σ S e c B / Sec _ B ) Sim i 5 ( A , B ) = min ( median ( Sec A ) , median ( Sec B ) ) max ( median ( Sec A ) , median ( Sec B ) ) Sim i 6 ( A , B ) = .Math. i = 0 16 min ( f i ( A ) , f i ( B ) ) .Math. i = 0 16 max ( f i ( A ) , f i ( B ) ) , and step 2: calculating a combined similarity: Similarity ( A , B ) = .Math. i = 1 6 Simi i ( A , B ) .

7. The current signal segmentation algorithm according to claim 1, wherein the step of deriving the maximum clique set in the similarity graph through the maximum clique search algorithm as the class from the automatic segmentation comprises: denoting the similarity graph as G=(V,E), wherein V denotes a segment set of the current signal, and E denotes a similarity matrix, which is a symmetrical similarity matrix; and denoting a similarity threshold as S.sub.th and a class set as C, c.sub.i∈C,v.sub.k∈c.sub.i, k∈{1,2, . . . |V|}: step 1: initializing c.sub.i=i and e.sub.i,i=0; step 2: when the class set C is updated: setting a similarity between all vertexes belonging to a current class and the current class to 0; setting a similarity e.sub.i,j between all vertexes belonging to the current class in E to 0; calculating a minimum similarity min_simi.sub.i,clique between all vertexes and the vertexes in the current class; taking a maximum value max(min_simi.sub.i,clique) of all min_simi.sub.i,clique; if max(min_simi.sub.i,clique)<S.sub.th and max(E)>S.sub.th, then: creating a new class comprising initial members that two vertices corresponding to max(E); setting a class label to a smaller value of the two vertices; and deleting an origin class of the two vertices; or if max(min_simi.sub.i,clique)≥S.sub.th, then: joining a vertex with the maximum value into the current class, and deleting an origin class thereof; and step 3: renumbering the class label, and updating a class number.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0048] FIG. 1 shows an original signal according to the present disclosure;

[0049] FIG. 2 shows an effective segment of the current signal according to the present disclosure; and

[0050] FIG. 3 shows an automatic segmentation effect according to the present disclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] A current signal segmentation algorithm accurately depicts current signals of different electrical appliances in different states by extracting distinguishing features of the current signals, and includes the following steps:

[0052] 1) Segment a current signal to separate a standby current and an overshoot current, only leaving a working current.

[0053] 2) Extract a shape distribution feature of a working current segment.

[0054] 3) Extract a statistical feature of the working current segment.

[0055] 4) Extract a harmonic feature of the working current segment.

[0056] 5) Calculate a similarity between a segment pair.

[0057] 6) Derive a maximum clique set in a similarity graph through a maximum clique search algorithm as a class from automatic segmentation.

[0058] The step of segmenting a current signal to separate a standby current and an overshoot current, only leaving a working current includes:

[0059] Step 1: Sample all vertices:

[0060] where, an original signal is denoted as S, which has a length of L.sub.S; and every N.sub.V points are sampled to obtain a vertex V.sub.k:

[0061] V.sub.k=max{P.sub.i}−min{P.sub.j}, where, (k−1)*N.sub.v+1≤i, j≤k*N.sub.v,k*N≤L.sub.s.

[0062] Step 2: Start recording when the vertex obtained by down-sampling satisfies a condition C.sub.1: (V.sub.k>V.sub.k−1 and V.sub.k>V.sub.k+1)or(V.sub.k>V.sub.k−1 and V.sub.k<V.sub.k+1).

[0063] Step 3: Merge two neighboring segments that satisfy C.sub.2: |sec.sub.m−sec.sub.m−1|<max(|Sec.sub.m|,|Sec.sub.m−1|)/10

[0064] where, Sec.sub.mdenotes a mean of all points sampled in an m-th segment.

[0065] Step 4: Detect a standby current and an overshoot current:

[0066] Determine a current of an i-th segment to be in a standby state when the current of the i-th segment satisfies the following condition:


Sec.sub.i<P10{V.sub.k}

[0067] Determine the i-th segment Sec.sub.i to be an overshoot current segment when the i-th segment satisfies the following condition:


Sec.sub.i>2.Math.max(Sec.sub.i−1,Sec.sub.i+1)

[0068] The step of extracting a shape distribution feature of a working current segment includes:

[0069] Step 1: Extract a value distribution class feature:

[00006] S i 1 ( Se c k ) = # ( P j ) / # ( Se c k ) , i = 1 , 2 , 3 , 4 , 5 P j S e c k and P j [ min ( S e c k ) + max ( S e c k ) - min ( S e c k ) 5 .Math. ( i - 1 ) , min ( Sec k ) + max ( S e c k ) - min ( S e c k ) 5 .Math. i ) ,

where, #( ) denotes a number of points in the set in parentheses, and k denotes a k-th effective segment.

[0070] Step 2: Extract a spatial distribution class feature:

[00007] S i 2 ( Se c k ) = 2 .Math. # ( P j ) / # ( Se c k ) , i = 1 , 2 , 3 , 4 , 5 P j S e c k and P j median ( Sec k ) and P j [ Sec k start + Sec k end - Sec k start 5 .Math. ( i - 1 ) , Sec k start + Sec k end - Sec k start 5 .Math. i ) ,

where, median(Sec.sub.k) denotes a median of values of all points in the k-th effective segment Sec.sub.k.

[0071] The step of extracting a statistical feature of the working current segment includes:

[0072] Step 1: Label all vertices in the k-th effective segment Sec.sub.k.

[0073] Step 2: Calculate a mean, a median and a standard deviation of values of all the vertices. The step of extracting a harmonic feature of the working current segment includes:

[0074] Step 1: Harmonically transform all points in a k-th effective segment Sec.sub.k.

[0075] Step 2: Use first 16 harmonics:

[00008] f ( i ) = F ( i ) / .Math. i = 0 16 F ( i ) i = 0 , 1 , 2 , .Math. 16

[0076] where, F(i) denotes a value of an i-th harmonic.

[0077] The step of calculating a similarity between a segment pair includes:

[0078] Let two segments be A and B:

[0079] Step 1: Calculate 6 subsimilarities between the two segments:

[00009] Sim i 1 ( A , B ) = .Math. i = 1 5 min ( S i 1 ( A ) , S i 1 ( B ) ) .Math. i = 1 5 max ( S i 1 ( A ) , S i 1 ( B ) ) Sim i 2 ( A , B ) = .Math. i = 1 5 min ( S i 2 ( A ) , S i 2 ( B ) ) .Math. i = 1 5 max ( S i 2 ( A ) , S i 2 ( B ) ) Sim i 3 ( A , B ) = min ( Sec _ A , Sec _ B ) max ( Sec _ A , Sec _ B ) Sim i 4 ( A , B ) = min ( σ S e c A / Sec _ A , σ S e c B / Sec _ B ) max ( σ S e c A / Sec _ A , σ S e c B / Sec _ B ) Sim i 5 ( A , B ) = min ( median ( Sec A ) , median ( Sec B ) ) max ( median ( Sec A ) , median ( Sec B ) ) Sim i 6 ( A , B ) = .Math. i = 0 16 min ( f i ( A ) , f i ( B ) ) .Math. i = 0 16 max ( f i ( A ) , f i ( B ) ) .

[0080] Step 2: Calculate a combined similarity:

[00010] Similarity ( A , B ) = .Math. i = 1 6 Simi i ( A , B )

[0081] The step of deriving a maximum clique set in a similarity graph through a maximum clique search algorithm as a class from automatic segmentation includes:

[0082] Denote the similarity graph as G=(V,E), where V denotes a segment set of the current signal, and E denotes a similarity matrix, which is a symmetrical similarity matrix; and denote a similarity threshold as S.sub.th and a class set as C, c.sub.i∈C,v.sub.k∈c.sub.i,k∈{1,2, . . . |V|}.

[0083] Step 1: Initialize c.sub.i=i and e.sub.i,i=0;

[0084] Step 2: When the class set C is updated:

[0085] Set a similarity between all vertexes belonging to a current class and the current class to 0;

[0086] Set a similarity e.sub.i,j between all vertexes belonging to the current class in E to 0.

[0087] Calculate a minimum similarity between all the vertexes and the vertexes in the current class.

[0088] Take a maximum value max (min_simi.sub.i,clique) of all min_simi.sub.i,clique.

[0089] If max(min_simi.sub.i,clique)<S.sub.th and max(E)>S.sub.th, then: [0090] create a new class composed of initial members that two vertices corresponding to max(E). [0091] Set a class label to a smaller value of the two vertices. [0092] Delete an origin class of the two vertices.

[0093] If max(min_simi.sub.i,clique)≥S.sub.th, then: [0094] join a vertex with the maximum value into the current class, and deleting an origin class thereof.

[0095] Step 3: Renumber the class label, and updating a class number.

[0096] The present disclosure can quickly and accurately classify current signals generated by different electrical appliances in different working states, so as to facilitate subsequent processing.