The invention content is as follows:
aiming at the problems of long testing time, unclear evaluation standard, high sorting cost and the like faced by the echelon utilization and sorting of large-batch retired power batteries, on the premise of meeting the sorting precision and speed requirements, a sorting primary screening standard is established, and a sorting detection method, a parameter set and an evaluation method which can be used for rapid sorting are provided by using methods such as parameter sensitivity analysis, state space estimation, multi-objective optimization and historical data characteristic analysis. High-compatibility accurate detection technology and expert database online learning are fused, a battery module rapid sorting device is utilized in a research and development manner, an application production line is established, and the problem of large-scale rapid sorting of retired power batteries is solved. The invention integrates the concept of a genetic optimization algorithm into the clustering analysis process of the retired power battery by using the idea of the genetic optimization algorithm, realizes directional clustering optimization of the retired power battery monomers, and is a tamping foundation for automatically, accurately and reliably completing the screening of the retired power battery and deep and high-level echelon utilization. The specific technical scheme is as follows:
a clustering sorting method for retired power batteries comprises the following steps:
step 1: measuring voltage data of n disassembled retired power battery unit samples, extracting m characteristic variables, per unit, calculating the distance d between characteristic vectors of the samples, and forming a similarity matrix A;
step 2: defining the coding length and coding bit value for sorting according to the number n of samples and the number K of clustering clusters, selecting high-quality sorting codes according to the energy of clustering cluster groups, and forming K clustering cluster groups of a large number of retired battery monomers by using genetic evolution operations such as crossing, variation, reinsertion and the like;
and step 3: calculating the center of each cluster group and the maximum deviation of the samples in the cluster group to form a confidence domain;
and 4, step 4: and finishing sorting and sorting reliability judgment based on the relation between the characteristic vector of the single power battery to be detected for retirement and the central distance and confidence domain of each cluster group.
The preferred scheme is as follows: a clustering sorting method for retired power batteries comprises the following steps:
step 1: measuring voltage data of a plurality of retired power battery monomers, extracting key characteristic variables of the retired power battery monomers, per-unit calculating the key characteristic variables, and calculating the Euclidean distance between samples to form a similar matrix; the method specifically comprises the following steps:
step 1.1: measuring voltage data of a large number of disassembled power battery single body samples in the charging and discharging process;
step 1.2: defining key characteristic variables of the voltage data obtained in the step 1.1, and obtaining characteristic vectors by per unit of each characteristic value;
step 1.3: calculating the Euclidean distance between the samples based on the feature vectors after the per unit in the step 1.2 to form a similar matrix;
step 2: forming a clustering process of retired power battery monomers under genetic evolution; the method specifically comprises the following steps:
step 2.1: initializing selection rate, cross rate, variation rate and maximum iteration number parameters, setting the number of the retired power battery monomer quasi-cluster clusters, and defining the form and number of coding strings, wherein the value of each coding bit is any integer from zero to the number K-1 of the cluster clusters;
step 2.2: selecting corresponding sample clusters according to the coding bit values in the step 2.1, and calculating energy values of clustering results under each coding string;
step 2.3: sequencing the energy value sequences under the obtained coding strings, and selecting a plurality of maximum values and corresponding coding strings;
step 2.4: combining the coding strings selected in the step 2.3 in pairs randomly, and performing cross operation to form new coding strings with the same quantity;
step 2.5: carrying out mutation operation on the crossed new coding string obtained in the step 2.4, and updating the coding string;
step 2.6: combining the new coding string obtained by crossing and mutation in the step 2.4 with the remaining coding strings with the minimum energy values which are not crossed and mutated and are remained in the step 2.3 to form a child coding string;
step 2.7: selecting corresponding sample clusters according to the coding bit values on the filial generation coding strings obtained in the step 2.6, and calculating the energy values of the clustering results under the coding strings;
step 2.8: calculating the minimum value of the energy value sequence under the filial generation coding string obtained in the step 2.7, recording the coding string corresponding to the minimum value energy value, judging whether to continue evolution optimization, and if so, returning to the step 2.3; if not, entering step 3;
and step 3: sorting the retired power battery monomers into clusters according to the optimal coding strings, and calculating cluster centers and confidence domains; the method specifically comprises the following steps:
step 3.1: traversing and inquiring each coding bit value in the coding string with the maximum iteration times according to the coding string corresponding to the minimum energy value recorded in the second step, counting retired power battery monomers corresponding to the same value, recording the retired power battery monomers as the same cluster, completing sorting and clustering of the existing retired power battery monomers, and sorting the retired power battery monomers into a type which can be used for subsequent matching and forming;
step 3.2: calculating the feature centers of all cluster groups, wherein the feature direction center after the retired power battery monomer in each cluster group is per unit is the average value of the retired power battery monomers in the same cluster under the same feature value;
step 3.3: calculating confidence domains of judging reliability of feature centers of all cluster groups, wherein the maximum deviation amount of each feature value in each cluster group is the maximum value of the absolute difference value between the feature value and the center of each retired power battery single body sample of the cluster group under the feature;
and 4, step 4: identifying the category of the new retired power battery monomer to be tested and calculating the confidence of identification; the method specifically comprises the following steps:
step 4.1: measuring voltage data of the newly added retired power battery monomer to be tested in the charging and discharging process, and extracting corresponding characteristic vectors based on the step 1.2;
step 4.2: calculating the Euclidean distance between the feature vector of the newly increased retired power battery monomer to be tested and the feature centers of all cluster groups, and judging that the newly increased retired power battery monomer to be tested belongs to the cluster group with the minimum Euclidean distance;
step 4.3: calculating the deviation of each feature vector of the newly added retired power battery monomer to be tested and the feature center of the cluster family judged in the step 4.2, and defining the ratio of the deviation to the cluster family confidence domain obtained in the step 3.3, wherein the specific gravity of each feature is less than 1, and if the category judgment of the newly added retired power battery monomer to be tested is effective and reliable, otherwise, the judgment is unreliable.
Compared with the prior art, the invention has the beneficial effects that: in the technical scheme of the invention, the global optimization process is combined with the clustering problem by using coding, selecting, crossing and variation ideas in the genetic evolution process for reference. The external description of the multi-class aggregation can be realized through n-system coding (n is equivalent to the number of the cluster families to be clustered in the patent), and the aim of optimizing the clustering form is realized through the iterative process of selection, intersection and variation. And finally, by defining the cluster center and the confidence domain, the effective and reliable judgment on the type of the newly added retired power battery to be tested can be realized. Compared with the existing clustering method, the clustering method has the advantages that the genetic optimization idea is integrated into the clustering process, the optimization direction of the aggregation process is ensured, the intra-class distance is minimized, the inter-class distance is maximized, the optimization level of the sorting and clustering process of the retired power batteries is improved, and the consistency of the subsequent retired power batteries after grouping is favorably ensured.
The specific implementation mode is as follows:
example (b):
the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The invention provides a clustering sorting method for retired power batteries, and FIG. 1 shows the implementation process of the method in the embodiment; the method comprises the following steps:
step 1: measuring voltage data of n retired power battery cells, wherein the voltage data comprises the following steps: extracting m key characteristic variables, per unit, calculating the Euclidean distance between samples to form a similar matrix A;
step 1.1: measuring voltage data of a large number of disassembled n retired power battery single body samples in the charging and discharging process, wherein Ui(t) represents the voltage value of the ith sample at the time t, i is 1,2, …, n;
step 1.2: defining key characteristic variable x of voltage data obtained in step 1.1jJ is 1,2, …, m, and the component eigenvector X is X1 x2…xm]And calculating the characteristic value of the ith sample:
X(i)=[x1(i) x2(i)…xm(i)]and obtaining a characteristic vector Y ═ Y by each characteristic value per unit1 y2…ym]And the s characteristic value of the i sample is per unit as follows:
step 1.3: calculating the Euclidean distance between the samples based on the feature vector Y after the per unit in the step 1.2, wherein the Euclidean distance between the ith sample and the jth sample
Forming a similarity matrix
Wherein
Step 2: defining links such as a coding form, cluster family energy and coding variation for clustering and sorting retired power battery monomers to form a clustering process of retired power battery monomers under genetic evolution, wherein a specific flow is shown in fig. 2, a coding process is shown in fig. 3, a cross process is shown in fig. 4, and a variation process is shown in fig. 5;
step 2.1: defining the selection ratio P
sCross over ratio P
cThe rate of variation P
mAnd the maximum iteration number is G, the iteration number G is made to be 0, the number K of all the retired power battery monomer quasi-cluster clusters obtained in the
step 1 is set, coding strings with the same length as the number of the samples are defined, and in the G-th iteration, the coding strings are
The length of the code string being equal to the number n of code bits, each code bit
Values of any integer from zero to the number of cluster groups K-1, i.e.
Is an integer and
and randomly generating N code strings
Step 2.2: selecting corresponding sample clusters according to the coding bit values in the step 2.1, and calculating energy values of clustering results under each coding string;
step 2.2.1: let i equal to 1, k equal to 0, and energy value e (i) equal to 0;
step 2.2.2: traversing and inquiring elements with each coding bit equal to k in the ith coding string, and recording the serial numbers of the coding bits to form a set INDEX
k(i)={Index
1,k(i),Index
2,k(i),…,Index
r,k(i) If INDEX
k(i) If the element is empty or single element set, then E is equal to E, otherwise, the order is given
Step 2.2.3: judging whether K is larger than or equal to the number K-1 of the cluster groups to be clustered or not; if yes, making k equal to 0, and entering step 2.2.4; if not, k is equal to k +1, and the step 2.2.2 is returned;
step 2.2.4: judging whether i is more than or equal to the number N of the coding strings; if yes, entering step 2.3; if not, i is equal to i +1, and the step 2.2.2 is returned;
step 2.3 obtaining the energy value sequence [ E (1), E (2), …, E (N) under N coding strings]Sorting, selecting the largest
An E (si) value and a corresponding code string
Represents a rounded-down symbol;
step 2.4: randomly pairwise combined selected in step 2.3
A code string
Performing a crossover operation to form
New code string
Step 2.4.1: if it is
If the number is even, the number selected in step 2.3 is randomly selected
A code string
Composition of
For the coding string; if it is
If the number of the codes is odd, a code string is randomly selected
Do not carry out pairing, the rest
A code string is composed of
For the coding string, making h equal to 1;
step 2.4.2: produce a [0,1 ]]If p is the random number of>PcThen go to step 2.4.3; if p is<PcIf so, cross-coding at the random coding bit of the h-th pair of coding strings;
step 2.4.3: judging whether H is smaller than H, if so, returning to the step 2.4.2 if H is H + 1; if not, obtaining
New code string
Step 2.5 is entered
Step 2.5: for the crossed one obtained in step 2.4
A code string
Is subjected to a mutation operation, and the mutation operation,
updating
A code string
Step 2.5.1: let si be 1 and bj be 1;
step 2.5.2: produce a [0,1 ]]If p is the random number of>P
mThen go to step 2.5.3; if p is<P
mThen, for the si-th encoding string
Bj th coded bit of
Performing a mutation operation to change to one in [0, K-1 ]]Integers within the range that are not themselves,
step 2.5.3: judging whether bj is smaller than n, if so, determining bj as bj +1 and returning to the step 2.5.2; if not, the si-th coding string is mutated and updated
Entering step 2.5.4;
step 2.5.4: judging whether si is less than
If so, si is si +1, bj is 1 and the step 2.5.2 is returned; if not, the mutation is completely updated
Entering a step 2.6 by each coding string;
step 2.6: let g be g +1, the result of the crossover and 2.5 mutation in step 2.4
Individual code string and stepStep 2.3 Retention
Encoding strings of minimum energy values to form new N encoding strings
Step 2.7: new N code strings obtained according to step 2.6
Coding bit values, selecting corresponding sample clusters, and calculating the energy value of the clustering result under each coding string;
step 2.7.1: let i equal to 1, k equal to 0, and energy value e (i) equal to 0;
step 2.7.2: traversing and inquiring elements with each coding bit equal to k in the ith coding string, and recording the serial numbers of the coding bits to form a set INDEX
k(i)={Index
1,k(i),Index
2,k(i),…,Index
r,k(i) }; if INDEX
k(i) If the element is empty or single element set, then E is equal to E, otherwise, the order is given
Step 2.7.3: judging whether K is larger than or equal to the number K-1 of the cluster groups to be clustered or not; if yes, let k equal to 0, and go to step 2.7.4; if not, k is equal to k +1, and the step 2.7.2 is returned;
step 2.7.4: judging whether i is more than or equal to the number N of the coding strings; if yes, entering step 2.8; if not, i is equal to i +1, and the step 2.7.2 is returned;
step 2.8: calculating the energy value sequences [ E (1), E (2), …, E (N) ] under the N coding strings obtained in the step 2.7]Record the code string corresponding to the minimum energy value, and record as mCH(g)(ii) a Judging whether G is smaller than G, if so, returning to the step 2.3; if not, entering step 3;
and step 3: sorting the retired power battery single cells into clusters according to the optimal coding strings, and calculating cluster group centers and confidence domains, wherein the k-th cluster group center and confidence domain, taking two characteristics as examples, are schematically shown in FIG. 6;
step 3.1: according to the encoding string mCH corresponding to the minimum energy value recorded in the step 2(g)Traversing and querying coding string mCH with maximum iteration number(G)Recording a set of encoded bit sequence numbers INDEX for elements in which each encoded bit is equal to kk={Index1,k,Index2,k,…,Indexr,kThe sequence numbers belong to INDEXkMarking the retired power battery monomer of the medium element as a kth cluster group, and sorting the retired power battery monomer into a type which can be used for subsequent assembly of a package;
step 3.2: calculating the feature centers of all K cluster groups, wherein the central point of Y after X is marked as per unit in the K cluster group
Wherein the ith feature is centered on
Step 3.3: calculating confidence domains of judging reliability of all K cluster group feature centers, wherein the ith feature maximum deviation value of all retired power battery single body samples in the kth cluster group is
The confidence domain of the reliability of the characteristic center judgment of the kth cluster family is epsilon
k=[ε
1,k,ε
2,k,...,ε
m,k];
And 4, step 4: identifying the category of the new retired power battery monomer to be tested and calculating the confidence of identification;
step 4.1: voltage data U for measuring charge-discharge process of newly-added retired power battery monomer to be tested
testExtracting corresponding feature vectors based on step 1.2
Step 4.2: computing a feature vector Y
testEuclidean distance from feature centers of all K cluster families, wherein the distance from the center of the kth cluster family is
Judging that the newly-added retired power battery monomer to be tested belongs to the Lth cluster group, wherein L is arg (min (D)
k,testI K ═ 0,1,. K-1)) ∈ {0,1,. K-1}, where arg (min (·)) represents the index that the minimum represents;
step 4.3: computing a feature vector Y
testWith center of features of cluster L
Ratio of deviation of (a) to confidence domain
Definition of all in m-dimensional features
Judging the category of the new retired power battery monomer to be tested to be effective and reliable, otherwise, judging to be unreliable.
Finally, it should be noted that: the described embodiments are only some embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.