CN111027593B - Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm - Google Patents

Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm Download PDF

Info

Publication number
CN111027593B
CN111027593B CN201911121268.XA CN201911121268A CN111027593B CN 111027593 B CN111027593 B CN 111027593B CN 201911121268 A CN201911121268 A CN 201911121268A CN 111027593 B CN111027593 B CN 111027593B
Authority
CN
China
Prior art keywords
detector
data
energy consumption
detectors
space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911121268.XA
Other languages
Chinese (zh)
Other versions
CN111027593A (en
Inventor
徐康康
杨海东
印四华
朱成就
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201911121268.XA priority Critical patent/CN111027593B/en
Publication of CN111027593A publication Critical patent/CN111027593A/en
Application granted granted Critical
Publication of CN111027593B publication Critical patent/CN111027593B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention discloses an energy consumption anomaly detection method based on a simulated annealing improved clone selection algorithm, which comprises the steps of collecting historical energy consumption data of a hydraulic press, preprocessing the data and then using the preprocessed data as training set data; a detector generation stage based on a clonal selection algorithm, randomly generating a detector; optimizing the detector by simulated annealing to generate an optimal detector set; acquiring real-time energy consumption data of the hydraulic machine, and preprocessing the data to be used as test set data; and carrying out energy consumption abnormity detection on the test set data by utilizing the optimal detector set. The energy consumption positioning method takes the periodicity and the dynamic characteristics of the energy consumption data in the production process of the hydraulic machine into consideration, and the positioning precision and the efficiency of the abnormal energy consumption of the hydraulic machine are improved, so that an operator can take measures in time, the energy consumption loss is avoided, and the mechanical efficiency is improved.

Description

Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm
Technical Field
The invention relates to the technical field of energy consumption abnormity detection of hydraulic presses, in particular to an energy consumption abnormity detection method based on simulated annealing improved clone selection algorithm.
Background
The hydraulic press machine has the advantages of high power-mass ratio, high rigidity, high bearing capacity and the like, and is widely applied in the metal forming process. However, they are also known to be highly energy consuming, energy inefficient, under complex production conditions and long term full load operation. Considering that energy conservation and consumption reduction are greatly promoted in the production process in recent years, improving the energy efficiency of the hydraulic machine becomes an important research field of a low-carbon manufacturing system. In the past decades, a great deal of research is carried out on the efficiency and energy consumption of hydraulic machines and the energy-saving optimization of the production process of the hydraulic machines, but the research mainly focuses on the aspects of energy-saving optimization, hydraulic control, an energy matching method, dynamic behavior, thermodynamics and the like of a hydraulic system.
At present, many scholars apply NSA to abnormality detection to obtain good effect. Idris I et al improved the generation of random detectors in NSA using a particle swarm algorithm and developed an e-mail spam detection system. Li et al propose two new NSAs that can be used for anomaly detection of mechanical devices. However, both methods are too complicated in time and space, and require an expanded application range. Barontini et al propose a non-random detector generation method suitable for the binary classification problem. However, the algorithm cannot exclude the negative impact of the interaction between these two parameters on the anomaly score. The energy consumption of the hydraulic machine is mainly electric energy. Abnormal working conditions such as mechanical system abnormity, overlong standby, incomplete extrusion and the like can cause abnormal energy consumption. At present, the existing NSA method cannot be directly applied to the abnormity detection of the energy consumption of the hydraulic machine.
Disclosure of Invention
The invention provides an energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm, aiming at solving the problem that the existing energy consumption abnormity detection method can not be directly applied to the energy consumption mode abnormity detection of a hydraulic machine.
In order to achieve the above purpose, the technical means adopted is as follows:
the energy consumption anomaly detection method based on the simulated annealing improved clone selection algorithm comprises the following steps:
s1, collecting historical energy consumption data of a hydraulic press, and preprocessing the data to be used as training set data;
s2, randomly generating a detector based on a detector generation stage of a clonal selection algorithm;
s3, optimizing the detector by utilizing simulated annealing to generate an optimal detector set;
s4, collecting real-time energy consumption data of the hydraulic press, and preprocessing the data to obtain test set data; and carrying out energy consumption abnormity detection on the test set data by utilizing the optimal detector set.
Preferably, the data preprocessing performed in step S1 and step S4 includes:
windowing the time sequence of the energy consumption data according to a time axis, moving a window to extract real-valued eigenvectors as sample data, standardizing the sample data line by line, and standardizing the sample data of each line to an interval [0,1] respectively so as to finish data preprocessing.
Preferably, the step S1 of normalizing the sample data of each line to the interval [0,1] specifically includes:
performing translation-standard deviation transformation:
Figure BDA0002275528560000021
wherein,
Figure BDA0002275528560000022
n is the number of sample data, and m is the number of variables;
if it still exists after the translation-standard deviation transformation
Figure BDA0002275528560000024
A further translation-range transformation is performed, namely:
Figure BDA0002275528560000023
wherein n is the number of sample data and m is the number of variables.
Preferably, the specific step of step S2 includes:
s21, marking abnormal mode data in the training set data as 1 class, and marking normal mode data as 0 class;
s22, randomly generating a self set S based on the marked training set data;
s23, randomly generating a detector;
s24, matching the detector with the self set S, deleting the detector if the matching is successful, and returning to the step S23; if the matching is unsuccessful, the detector is used as a new detector for acceptance;
s25, checking whether a preset number of detectors are generated or not, if so, finishing outputting covering non-self spaceC ═ C of the detector set1,C2,...,Cn}; if not, returning to the step S24;
wherein self-assembling element s ═ (c)s,rs) (ii) a Detector set element c ═ cc,rc);cs∈Rn,cc∈RnIs taken as the center; r iss∈Rn,rc∈RnIs the radius; the dimension n is determined by the window width of the windowing process of the energy consumption data.
Preferably, the objective function used in the step S3 for optimizing the detector by using simulated annealing is as follows:
setting an initial objective function:
Figure BDA0002275528560000031
the constraint conditions are as follows:
Figure BDA0002275528560000032
where V (D) is the volume covered by the detector, D is the set of detectors, DiIs the detector element, n is the number of detectors, riIs the detector radius, U is the non-self set, S is the self set;
adding the constraint condition to the initial objective function to obtain a new objective function:
C(D)=Overlapping(D)+γ·NonselfCovering(D)
wherein overlaying (d) is the overlapping space of the detector sets and nosselfcovering (d) is the coverage space between the detector sets and the non-self space;
two detectors diAnd djOverlapping space therebetween Overlapping (d)i,dj) The calculation expression of (a) is as follows:
Figure BDA0002275528560000033
wherein
Figure BDA0002275528560000034
Are respectively a detector diAnd djThe center of (a);
Figure BDA0002275528560000035
are respectively a detector diAnd djThe radius of (a);
the computational expression of the overlapping space overlapping (d) of the detector set is as follows:
Figure BDA0002275528560000036
detector diAnd non-me space element ujCoverage space of (d) Nonselfcovering (d)i,uj) The calculation expression of (a) is as follows:
Figure BDA0002275528560000037
wherein,
Figure BDA0002275528560000038
respectively representing non-self spatial elements ujThe center and radius of (a);
the computational expression of the coverage space between the detector set and the non-me space, nosselfcovering (d), is as follows:
Figure BDA0002275528560000039
and substituting all the calculation expressions into the new objective function to obtain a final objective function for simulating annealing and optimizing the detector.
Preferably, the specific step of step S3 includes:
s31, initializing control parameters, including: proximity radius r of the detectornearAttenuation coefficient beta adjacent to radius, optimization algebraic nummaxInitial temperature T0Termination temperature TendA temperature attenuation coefficient alpha, a randomly generated detector set C, and iteration times M at each temperature T;
s32. for the iteration number k 1,2,.. M, the following steps are performed to optimize the detector C in the detector set C, respectivelyi1,2, NR, where NR is the number of detectors generated randomly;
s321, updating initial solution c of detectoriI.e. randomly generating a new detector c 'within the neighbourhood'i(ii) a Radius of the neighborhood is rnear
S322, calculating a target function increment delta C ═ C (C'i)-C(ci) (ii) a Wherein C (C)i) Optimizing an objective function employed by the detector for simulated annealing;
s323, based on Metropolis acceptance criteria, if Δ C ' < 0, then C ' is accepted 'iAs a new current solution; otherwise, according to probability exp (- Δ C '/t), accept C'iAs a new current solution, and let ci=c′i
S324, cooling: the adopted cooling mode is T (num +1) ═ α × T (num); wherein, the temperature attenuation coefficient alpha is a normal number smaller than 1, and num is the number of cooling times;
s325, if num reaches preset optimization times nummaxIf so, ending the simulated annealing algorithm; otherwise, the step S321 is executed again until T is less than Tend(ii) a Wherein the adjacent radii of the detector are attenuated in a manner rnear *=β*rnear
S33, completing optimization of all detectors through step S32 to obtain an optimized optimal detector set Dnew
Preferably, the step S4 of using the optimal detector set to perform energy consumption anomaly detection on the test set data specifically includes:
matching the test set data with the optimal detector set, and when the detectors in the optimal detector set are activated, considering the test set data as abnormal and marking the data as 1; if all detectors in the best set of detectors are not activated, the test set data is considered normal and is marked as 0.
Preferably, the matching rule used in the step S24 to match the detector with the self-assembly S and the step S4 to match the test set data with the best detector set is:
if two real vectors in the n-dimensional space are x ═ x (x)1,x2,...,xn),y=(y1,y2,...,yn) D between x and yThe distance is as follows:
Figure BDA0002275528560000041
in the matching process, if the Euclidean distance between the detector and data in a certain self set S or test set is smaller than a given threshold value, the detector is matched with the data.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm considers the periodicity and dynamic characteristics of energy consumption data in the production process of the hydraulic press, firstly adopts the clonal selection algorithm to generate the detector, and then adopts the simulated annealing algorithm detector to optimize so as to generate the optimal detector set to improve the detection performance. The energy consumption positioning method has high positioning precision and efficiency for abnormal energy consumption of the hydraulic machine, so that an operator can take measures in time, the energy consumption loss is avoided, and the mechanical efficiency is improved.
Drawings
FIG. 1 is a general flow diagram of the process of the present invention.
Fig. 2 is a flowchart of step S2 in the present invention.
Fig. 3 is a diagram showing an overlapping state between two detectors in embodiment 1.
FIG. 4 is a graph of the overlap of the detector of example 2.
FIG. 5 is a graph of the coverage area of the detector of example 2.
FIG. 6 is a detector profile of the prior art clone selection algorithm of example 2.
FIG. 7 is a detector profile for the modified clone selection algorithm based on simulated annealing in example 2.
Fig. 8 is a diagram showing the detection result of the ultra-long standby mode in the abnormal mode in example 2.
Fig. 9 is a diagram showing a detection result that the abnormal mode is the abnormality of the mechanical system in embodiment 2.
Fig. 10 is a graph showing the result of detection that the abnormal pattern is incomplete compression in example 2.
Fig. 11 is a graph showing the detection result of the normal data in example 2.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for the purpose of better illustrating the present embodiments, certain elements of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
The energy consumption anomaly detection method based on the simulated annealing improved clone selection algorithm is shown in figure 1 and comprises the following steps:
s1, collecting historical energy consumption data of a hydraulic press, and preprocessing the data to be used as training set data;
the data preprocessing specifically comprises the following steps:
windowing the time sequence of the energy consumption data according to a time axis, moving a window to extract real-valued eigenvectors as sample data, standardizing the sample data line by line, and respectively standardizing the sample data of each line to an interval [0,1 ]; namely, each row of sample data is respectively subjected to translation-standard deviation transformation:
Figure BDA0002275528560000061
wherein,
Figure BDA0002275528560000062
n is the number of sample data, and m is the number of variables;
if it still exists after the translation-standard deviation transformation
Figure BDA0002275528560000063
A further translation-range transformation is performed, namely:
Figure BDA0002275528560000064
wherein n is the number of sample data and m is the number of variables.
S2, randomly generating a detector based on a detector generation stage of a clonal selection algorithm; as shown in fig. 2, the specific steps include:
s21, marking abnormal mode data in the training set data as 1 class, and marking normal mode data as 0 class;
s22, randomly generating a self set S based on the marked training set data;
s23, randomly generating a detector;
s24, matching the detector with the self set S, deleting the detector if the matching is successful, and returning to the step S23; if the matching is unsuccessful, the detector is used as a new detector for acceptance;
s25, checking whether a preset number of detectors are generated or not, if so, finishing, and outputting a detector set C which covers the non-self space as { C ═ C1,C2,...,Cn}; if not, returning to the step S24;
wherein self-assembling element s ═ cs,rs) (ii) a Detector set element c ═ cc,rc);cs∈Rn,cc∈RnIs taken as the center; r iss∈Rn,rc∈RnIs the radius; the dimension n is determined by the window width of the windowing process of the energy consumption data.
S3, optimizing the detector by utilizing simulated annealing to generate an optimal detector set;
since the performance of the clone selection algorithm is affected by its self-radius and expected coverage. Therefore, the present embodiment employs a simulated annealing algorithm to optimize the detector distribution.
Firstly, optimizing an objective function adopted by the detector by using simulated annealing:
the initial optimization objectives are: on the premise of ensuring that the detector set covers self space as little as possible, the coverage of the detector set to non-self space is expanded, and the number of detectors is unchanged in the process. The initial objective function corresponds to the volume constraint covered by the detector being that the detector cannot fall into the self-set S, i.e.:
setting an initial objective function:
Figure BDA0002275528560000071
the constraint conditions are as follows:
Figure BDA0002275528560000072
where V (D) is the volume covered by the detectors, D is the set of detectors, DiIs the detector element, n is the number of detectors, riIs the detector radius, U is the non-self set, S is the self set;
this embodiment converts the initial optimization goal described above into another optimization goal. I.e., to expand the coverage of non-self space by the detectors while reducing overlap between detectors. Thus, the maximum optimization target in the initial optimization targets is converted into the minimum optimization target, and the constraint condition is added to the initial objective function to obtain a new objective function:
C(D)=Overlapping(D)+γ·NonselfCovering(D)
wherein overlaying (d) is the overlapping space of the detector sets and nosselfcovering (d) is the coverage space between the detector sets and the non-self space;
the smaller the distance between the detector centers, the larger the overlap space between the detectors; two detectors diAnd djOverlapping space therebetween Overlapping (d)i,dj) The calculation expression of (a) is as follows:
Figure BDA0002275528560000073
wherein
Figure BDA0002275528560000074
Are respectively a detector diAnd djThe center of (a);
Figure BDA0002275528560000075
are respectively a detector diAnd djThe radius of (a); when distance is exceeded
Figure BDA0002275528560000076
The overlap between the two detectors is shown in fig. 3. When the distance between the two detector centers is 0, the overlap value reaches a maximum value of 1; when the distance between the centers of the two detectors
Figure BDA0002275528560000077
When the overlap value is 0.
The computational expression for the overlapping space overlapping (d) of the detector sets is as follows:
Figure BDA0002275528560000078
detector diAnd non-me space element ujCoverage space of (d) Nonselfcovering (d)i,uj) The calculation expression of (a) is as follows:
Figure BDA0002275528560000081
wherein,
Figure BDA0002275528560000082
are respectively provided withRepresenting non-me spatial elements ujThe center and radius of (a);
the computational expression of the coverage space between the detector set and the non-me space, nouselfcovering (d), is as follows:
Figure BDA0002275528560000083
and substituting all the calculation expressions into the new objective function to obtain a final objective function for simulating annealing and optimizing the detector. The objective function is also the energy function of the simulated annealing algorithm. When the objective function is calculated, the optimization of the simulated annealing algorithm on the detector can be realized only by calculating the overlapping space of the detector set and the covering space between the detector set and the non-self space. In addition, the initial solution is a randomly generated set of detectors, and the solution space is a non-self space set.
Second, optimization procedure
S31, initializing control parameters, including: proximity radius r of the detectornearAttenuation coefficient beta adjacent to radius, optimization algebraic nummaxInitial temperature T0Termination temperature TendThe temperature attenuation coefficient alpha, a randomly generated detector set C and the iteration times M at each temperature T;
s32. for the iteration number k 1,2,.. M, the following steps are performed to optimize the detector C in the detector set C, respectivelyi1,2, NR, where NR is the number of detectors generated randomly;
s321, updating initial solution c of detectoriI.e. randomly generating a new detector c 'within the neighbourhood'i(ii) a Radius of the neighborhood is rnear
S322, calculating a target function increment delta C ═ C (C'i)-C(ci) (ii) a Wherein C (C)i) Optimizing an objective function employed by the detector for simulated annealing;
s323, based on Metropolis acceptance criteria, if Δ C ' < 0, then C ' is accepted 'iAs a new current solution; otherwise, according to the probability exp (- Δ C'/t), acceptc′iAs a new current solution, and let ci=c′i
S324, cooling: the adopted cooling mode is T (num +1) ═ alpha T (num); wherein, the temperature attenuation coefficient alpha is a normal number smaller than 1, and num is the number of cooling times;
s325, if num reaches preset optimization times nummaxIf so, ending the simulated annealing algorithm; otherwise, the step S321 is executed again until T is less than Tend(ii) a Wherein the adjacent radii of the detector are attenuated in a manner rnear *=β*rnear
S33, completing optimization of all detectors through step S32 to obtain an optimized optimal detector set Dnew
S4, collecting real-time energy consumption data of the hydraulic press, and preprocessing the data to obtain test set data; performing energy consumption abnormity detection on the test set data by using the optimal detector set, namely matching the test set data with the optimal detector set, and marking the test set data as 1 when the detectors in the optimal detector set are activated; if all detectors in the best set of detectors are not activated, the test set data is considered normal and is marked as 0. The data preprocessing method here corresponds to the above-described step S1.
In step S24, the matching between the detector and the self-assembly S, and the matching rule used in the step S4 for matching the test set data with the optimal detector assembly are:
if two real vectors in the n-dimensional space are x ═ x (x)1,x2,...,xn),y=(y1,y2,...,yn) D between x and yThe distance is as follows:
Figure BDA0002275528560000091
in the matching process, if the Euclidean distance between the detector and data in a certain self set S or test set is smaller than a given threshold value, the detector is matched with the data.
Example 2
In order to verify the effectiveness of the energy consumption anomaly detection method based on the simulated annealing improved clone selection algorithm provided in example 1, in this example 2, experimental research is performed on actual energy consumption data of a large hydraulic press enterprise, and the experimental research is compared with the existing anomaly detection method, so that the superiority and effectiveness of the method are verified.
Energy consumption data
And selecting the electric energy data of the hydraulic machine from 8 months in 2019 to 9 months in 2019. The energy consumption data used in the simulation experiments are shown in table 1. If the sliding window width is set to 20 and the moving step size is set to 1, then each set of data contains 20 data.
Energy consumption data type Normal data Mechanical system abnormal mode Ultra-long standby mode Incomplete squeeze mode
Quantity (thousands of) 2 2 2.08 2.08
TABLE 1 energy consumption data sheet
Figure BDA0002275528560000092
Figure BDA0002275528560000101
TABLE 2 training set and test set data sheet
Second, based on the detector generation phase of clone selection algorithm, randomly generating detector
The parameter settings for generating the detectors are shown in table 3 and the training set data selected is shown in table 2, so that an ego set S of detectors is obtained, and then a set of detectors covering the non-self space is generated.
Width w of sliding window Step of moving step Detector size NR Maximum cyclic algebra g ma x
20 1 200 100
Probability of variation pm Radius of self element rs Maturity period T of detector Coefficient of attenuation gamma
0.06 0.01 12 0.75
Thirdly, optimizing the detector by utilizing simulated annealing to generate an optimal detector set
The parameter settings for the optimized detector are shown in table 4, where the proximity radii r of the different detectors arenearDifferently, its initial value is set to 2 times the radius of each detector.
Figure BDA0002275528560000102
TABLE 4 optimized parameter settings for detectors
During the optimization of the simulated annealing algorithm, the overlap curve and the coverage area curve of the detector are shown in fig. 4 and 5, respectively. The overlap of the detectors decreases rapidly in the early part of the iteration and then decreases slowly as the iteration progresses, eventually tending to stabilize. The coverage area of the detector to the non-self space rapidly increases in the early stage of iteration and gradually increases as the iteration progresses, and finally becomes stable. This indicates that, at the initial stage of iteration, the optimization effect of the simulated annealing algorithm is significant, the value of the objective function corresponding to the optimal solution decreases rapidly, but the simulated annealing algorithm cannot find a better solution at the middle and later stages of iteration.
The detector distributions of the existing clone selection algorithm and the optimized clone selection algorithm of the present invention are shown in fig. 6 and 7, respectively. Simulation results show that the simulated annealing algorithm has a good effect on the optimization of the detector. The algorithm can reduce the overlapping among detectors to the maximum extent, and cover the non-self-space to the maximum extent, thereby greatly improving the detection rate.
Fourthly, detecting abnormal energy consumption
In order to verify the feasibility of the energy consumption abnormality detection method provided by the invention, a simulation experiment is carried out, and the result is shown in fig. 8-11. The test set data used is shown in table 2. The test set data is first preprocessed and then matched to the optimized best detector set. If a detector in the best set of detectors is activated, the data is determined to be anomalous and is marked as 1. If all detectors in the best set of detectors are not activated, the data is determined to be normal and is marked as 0.
Fifth, evaluation index of abnormality detection
Two misjudgments exist in the abnormal detection process of the energy consumption data: (1) false detection: misjudging normal data as abnormal data; (2) omission detection: and misjudging the abnormal data as normal data. The sum of the false detection rate and the missed detection rate is called the error rate. In order to evaluate the effectiveness of the detection method proposed by the present invention, in this embodiment 2, a detection rate, a false detection rate, a missing detection rate, and an error rate are used as evaluation indexes.
The detection rate is as follows:
Figure BDA0002275528560000111
the false detection rate is as follows:
Figure BDA0002275528560000112
the omission factor is:
Figure BDA0002275528560000113
the error rate is:
ER=FDR+MDR
wherein AA is the number of abnormal data determined to be abnormal; AN is the number of abnormal data judged to be normal; NA is the number of normal data judged to be abnormal; NN is the number of normal data determined to be normal.
Sixth, comparative test
In order to verify the performance of the energy consumption anomaly detection method (hereinafter referred to as SA-CSA) based on the simulated annealing improved clone selection algorithm, simulation experiments are carried out by adopting test set data shown in Table 2. In addition, the SA-CSA method, CSA-based method, BP neural network and RBF neural network methods proposed herein were used for comparative experiments, and the results are shown in Table 5. The research result shows that the detection rate of the SA-CSA method is 95.43%, and the false detection rate is 3.5%. The detection performance of the method is far higher than that of the traditional intelligent algorithm, and the method is more suitable for detecting the energy consumption abnormity in the production process. In addition, the BP neural network is an intelligent algorithm simulating a biological neural network, and is suitable for pattern anomaly detection under the condition of sufficient training samples.
Figure BDA0002275528560000121
TABLE 5 comparison of Performance of anomaly detection
The terms describing positional relationships in the drawings are for illustrative purposes only and are not to be construed as limiting the patent;
it should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. This need not be, nor should it be exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (6)

1. The energy consumption anomaly detection method based on the simulated annealing improved clone selection algorithm is characterized by comprising the following steps of:
s1, collecting historical energy consumption data of a hydraulic press, and preprocessing the data to be used as training set data;
s2, randomly generating a detector based on a detector generation stage of a clonal selection algorithm;
s3, optimizing the detector by utilizing simulated annealing to generate an optimal detector set;
s4, collecting real-time energy consumption data of the hydraulic press, and preprocessing the data to obtain test set data; performing energy consumption abnormity detection on the test set data by using the optimal detector set;
the specific steps of step S2 include:
s21, marking the abnormal mode data in the training set data as 1 class, and marking the normal mode data as 0 class;
s22, randomly generating a self set S based on the marked training set data;
s23, randomly generating a detector;
s24, matching the detector with the self set S, deleting the detector if the matching is successful, and returning to the step S23; if the matching is unsuccessful, the detector is used as a new detector for acceptance;
s25, checking whether a preset number of detectors are generated or not, if so, finishing, and outputting a detector set C which covers the non-self space as { C ═ C1,C2,...,Cn}; if not, returning to the step S24;
wherein self-assembling element s ═ (c)s,rs) (ii) a Detector set element c ═ cc,rc);cs∈Rn,cc∈RnIs taken as the center; r iss∈Rn,rc∈RnIs the radius; the dimension n is determined by the window width of the energy consumption data windowing process;
the objective function used in step S3 to optimize the detector by simulated annealing is:
setting an initial objective function:
Figure FDA0003600856980000011
the constraint conditions are as follows:
Figure FDA0003600856980000012
where V (D) is the volume covered by the detector and D is the volume under examinationSet of detectors, x being detected energy consumption data, diIs the detector element, n is the number of detectors, riIs the detector radius, U is the non-self set, S is the self set;
adding the constraint condition to the initial objective function to obtain a new objective function:
C(D)=Overlapping(D)+γ·Nonself Covering(D)
where overlaying (d) is the overlapping space of the detector sets, γ is the coefficient of the coverage space between the detector set and the non-self space, and noselfcovering (d) is the coverage space between the detector set and the non-self space;
two detectors diAnd djOverlapping space therebetween Overlapping (d)i,dj) The calculation expression of (a) is as follows:
Figure FDA0003600856980000021
wherein
Figure FDA0003600856980000022
Are respectively a detector diAnd djThe center of (a);
Figure FDA0003600856980000023
are respectively detectors diAnd djThe radius of (a);
the computational expression for the overlapping space overlapping (d) of the detector sets is as follows:
Figure FDA0003600856980000024
detector diAnd non-me space element ujCoverage space of (d) Nonselfcovering (d)i,uj) The calculation expression of (a) is as follows:
Figure FDA0003600856980000025
wherein,
Figure FDA0003600856980000026
respectively representing non-self spatial elements ujThe center and radius of (a);
the computational expression of the coverage space between the detector set and the non-me space, nosselfcovering (d), is as follows:
Figure FDA0003600856980000027
and substituting all the calculation expressions into the new objective function to obtain a final objective function for simulating annealing and optimizing the detector.
2. The method for detecting energy consumption abnormality according to claim 1, wherein the specific steps of data preprocessing in step S1 and step S4 include:
windowing the time sequence of the energy consumption data according to a time axis, moving a window to extract real-valued eigenvectors as sample data, standardizing the sample data line by line, and standardizing the sample data of each line to an interval [0,1] respectively so as to finish data preprocessing.
3. The method according to claim 2, wherein the step S1 of normalizing the sample data of each row to an interval [0,1] specifically comprises:
performing translation-standard deviation transformation:
Figure FDA0003600856980000031
wherein x isijJ < th > energy consumption data x 'representing i < th > sample data'ijRepresents xijAfter translation-standard deviation transformationThe result obtained is that the number of the first and second,
Figure FDA0003600856980000032
n is the number of sample data, and m is the number of variables;
if it still exists after the translation-standard deviation transformation
Figure FDA0003600856980000033
A further translation-range transformation is performed, namely:
Figure FDA0003600856980000034
wherein, x ″)ijRepresents x'ijAnd (5) obtaining a result after translation-range transformation, wherein n is the number of sample data, and m is the number of variables.
4. The method for detecting the energy consumption abnormality according to claim 1, wherein the specific step of the step S3 includes:
s31, initializing control parameters, including: proximity radius r of the detectornearAttenuation coefficient beta adjacent to radius, optimization algebraic nummaxInitial temperature T0Termination temperature TendA temperature attenuation coefficient alpha, a randomly generated detector set C, and iteration times M at each temperature T;
s32. for the iteration number k 1,2,.. M, the following steps are performed to optimize the detector C in the detector set C, respectivelyi1,2, …, NR, where NR is the number of randomly generated detectors;
s321, updating initial solution c of detectoriI.e. randomly generating a new detector c 'within the neighbourhood'i(ii) a Radius of the neighborhood is rnear
S322, calculating a target function increment delta C ═ C (C'i)-C(ci) (ii) a Wherein C (C)i) Optimizing an objective function employed by the detector for simulated annealing;
s323. based on Metropolis acceptance criteria, accept C ' if Δ C ' < 0 'iAs a new current solution; otherwise according to probability
Figure FDA0003600856980000035
C 'is received'iAs a new current solution, and let ci=c′i
S324, cooling: the adopted cooling mode is T (num +1) ═ alpha T (num); wherein, the temperature attenuation coefficient alpha is a normal number smaller than 1, and num is the number of cooling times;
s325, if num reaches preset optimization times nummaxIf so, ending the simulated annealing algorithm; otherwise, the step S321 is executed again until T is less than Tend(ii) a Wherein the adjacent radii of the detector are attenuated in a manner rnear *=β*rnear
S33, completing optimization of all detectors through step S32 to obtain an optimized optimal detector set Dnew
5. The method according to claim 4, wherein the step of detecting the energy consumption abnormality of the test set data by using the optimal detector set in step S4 is specifically as follows: matching the test set data with the optimal detector set, and when the detectors in the optimal detector set are activated, considering the test set data as abnormal and marking the data as 1; if all detectors in the best set of detectors are not activated, the test set data is considered normal and is marked as 0.
6. The method of claim 5, wherein the step S24 is performed by matching the detector with the self-assembly S, and the step S4 is performed by matching the test set data with the optimal detector assembly according to the following matching rules:
if two real vectors in the n-dimensional space are x ═ x (x)1,x2,...,xn),y=(y1,y2,...,yn) D between x and yThe distance is as follows:
Figure FDA0003600856980000041
in the matching process, if the Euclidean distance between the detector and data in a certain self set S or test set is smaller than a given threshold value, the detector is matched with the data.
CN201911121268.XA 2019-11-15 2019-11-15 Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm Active CN111027593B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911121268.XA CN111027593B (en) 2019-11-15 2019-11-15 Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911121268.XA CN111027593B (en) 2019-11-15 2019-11-15 Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm

Publications (2)

Publication Number Publication Date
CN111027593A CN111027593A (en) 2020-04-17
CN111027593B true CN111027593B (en) 2022-06-14

Family

ID=70200334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911121268.XA Active CN111027593B (en) 2019-11-15 2019-11-15 Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm

Country Status (1)

Country Link
CN (1) CN111027593B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2051468A1 (en) * 2007-06-25 2009-04-22 Deutsche Telekom AG Method, data processing device and computer network for anomaly detection
CN102510388A (en) * 2012-01-02 2012-06-20 西安电子科技大学 Negative selection intrusion detection method based on variable self-body radius
WO2015101805A1 (en) * 2013-12-31 2015-07-09 Turkcell Teknoloji Arastirma Ve Gelistirme A.S. A system and method for detecting clone sim cards
CN107590384A (en) * 2017-09-05 2018-01-16 天津工业大学 A kind of Negative Selection method for abnormality detection
CN108337268A (en) * 2018-03-16 2018-07-27 太原理工大学 SQL injection attack detection based on Dynamic Clonal Selection Algorithm
CN108435819A (en) * 2018-05-29 2018-08-24 广东工业大学 A kind of aluminum section extruder energy consumption method for detecting abnormality

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10896378B2 (en) * 2018-01-02 2021-01-19 International Business Machines Corporation Fast detection of energy consumption anomalies in buildings
US11037033B2 (en) * 2018-03-26 2021-06-15 Ca, Inc. Multivariate clustering-based anomaly detection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2051468A1 (en) * 2007-06-25 2009-04-22 Deutsche Telekom AG Method, data processing device and computer network for anomaly detection
CN102510388A (en) * 2012-01-02 2012-06-20 西安电子科技大学 Negative selection intrusion detection method based on variable self-body radius
WO2015101805A1 (en) * 2013-12-31 2015-07-09 Turkcell Teknoloji Arastirma Ve Gelistirme A.S. A system and method for detecting clone sim cards
CN107590384A (en) * 2017-09-05 2018-01-16 天津工业大学 A kind of Negative Selection method for abnormality detection
CN108337268A (en) * 2018-03-16 2018-07-27 太原理工大学 SQL injection attack detection based on Dynamic Clonal Selection Algorithm
CN108435819A (en) * 2018-05-29 2018-08-24 广东工业大学 A kind of aluminum section extruder energy consumption method for detecting abnormality

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于拟随机序列与克隆选择的进化V-detector算法;金章赞等;《控制与决策》;20130815(第08期);第12-19页 *
基于改进负选择算法的异常检测;汪慧敏等;《计算机仿真》;20080515(第05期);第339-343页 *
移动自组网络入侵检测中主动学习算法的应用;杨春等;《计算机工程与应用》;20071101(第31期);第20-22页 *

Also Published As

Publication number Publication date
CN111027593A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN110084610B (en) Network transaction fraud detection system based on twin neural network
CN111199016A (en) DTW-based improved K-means daily load curve clustering method
CN112100745B (en) Automobile girder steel mechanical property prediction method based on LDA theory
CN106779384B (en) Iron and steel industry blast furnace gas long-term interval prediction method based on optimal information granularity distribution
CN107944594B (en) Short-term load prediction method based on spearman grade and RKELM microgrid
GB2600213A (en) Plate performance prediction method and apparatus
CN111343650B (en) Urban scale wireless service flow prediction method based on cross-domain data and loss resistance
CN110702966B (en) Fault arc detection method, device and system based on probabilistic neural network
CN110598929B (en) Wind power nonparametric probability interval ultrashort term prediction method
CN111539657B (en) Typical power industry load characteristic classification and synthesis method combined with user daily electricity quantity curve
CN111582472A (en) Water spray attemperator water spray adjusting method and device based on neural network model
Chen et al. An effective feature selection scheme for healthcare data classification using binary particle swarm optimization
Li et al. Deep learning for predictive mechanical properties of hot-rolled strip in complex manufacturing systems
CN113964884A (en) Power grid active frequency regulation and control method based on deep reinforcement learning
CN115275990A (en) Evaluation method and system for broadband oscillation risk of regional power grid
CN111027593B (en) Energy consumption abnormity detection method based on simulated annealing improved clonal selection algorithm
CN109543914B (en) Method for predicting RBF building operation energy consumption based on AP clustering algorithm
CN113988358A (en) Carbon emission index prediction and treatment method based on transfer reinforcement learning
CN112418522A (en) Industrial heating furnace steel temperature prediction method based on three-branch integrated prediction model
CN116383630A (en) Probabilistic neural network arc fault detection method based on improved wolf algorithm
CN113872524B (en) Method and device for positioning low-efficiency group strings and computer storage medium
CN112149052A (en) Daily load curve clustering method based on PLR-DTW
CN116203365A (en) GIS equipment partial discharge detection method based on field Ma Suanfa optimizing PNN
CN113595242B (en) Non-invasive load identification method based on depth CNN-HMM
CN115169740A (en) Sequence prediction method and system of pooled echo state network based on compressed sensing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant