CN114936607B - Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm - Google Patents

Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm Download PDF

Info

Publication number
CN114936607B
CN114936607B CN202210668127.5A CN202210668127A CN114936607B CN 114936607 B CN114936607 B CN 114936607B CN 202210668127 A CN202210668127 A CN 202210668127A CN 114936607 B CN114936607 B CN 114936607B
Authority
CN
China
Prior art keywords
wolf
load spectrum
clustering
algorithm
sample data
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
CN202210668127.5A
Other languages
Chinese (zh)
Other versions
CN114936607A (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.)
Shandong University
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CN202210668127.5A priority Critical patent/CN114936607B/en
Publication of CN114936607A publication Critical patent/CN114936607A/en
Application granted granted Critical
Publication of CN114936607B publication Critical patent/CN114936607B/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/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Abstract

The invention relates to the technical field of load spectrum synthesis, and provides a load spectrum synthesis method and a load spectrum synthesis system based on a mixed particle swarm and a wolf algorithm, wherein the load spectrum synthesis method comprises the following steps: acquiring load spectrum data; carrying out load spectrum fragment division on load spectrum data to obtain sample data; clustering all sample data by adopting a clustering algorithm; synthesizing a load spectrum based on the clustering result; the optimal hunting position in the Grey wolf algorithm is updated by the clustering algorithm by introducing the speed and position updating mode of the particle swarm algorithm so as to optimize a clustering center, so that clustering is more accurate, and the synthesized load spectrum is more in line with actual operation conditions under different soil hardness.

Description

Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm
Technical Field
The invention belongs to the technical field of load spectrum synthesis, and particularly relates to a load spectrum synthesis method and system based on a mixed particle swarm and a wolf algorithm.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
The difference of the construction working conditions of the machinery is large under different soil hardness, so that the difference of the performance such as movement, load and the like of the machinery such as a tractor, a bulldozer and the like is large when the machinery works under different soil hardness, and how to synthesize a load spectrum which meets various types of soil becomes an urgent demand for the development of the field of engineering machinery and agricultural machinery.
At present, a typical load spectrum is generally constructed by adopting a clustering method, but the adopted clustering method is mostly a K-means algorithm, the algorithm needs to randomly generate an initial clustering center, if the clustering center is improperly selected, the algorithm falls into local optimum, global optimum cannot be achieved, the clustering effect is poor, and an efficient and accurate load spectrum cannot be obtained.
Disclosure of Invention
In order to solve the technical problems in the background art, the invention provides a load spectrum synthesis method and system based on a mixed particle swarm and a wolf algorithm, wherein the optimal hunting position in the wolf algorithm is updated by introducing a speed and position updating mode of the particle swarm algorithm so as to optimize a clustering center, so that clustering is more accurate, and the synthesized load spectrum better conforms to actual operation conditions under different soil hardnesses.
In order to achieve the purpose, the invention adopts the following technical scheme:
the first aspect of the present invention provides a load spectrum synthesis method based on a mixed particle swarm and a wolf algorithm, which comprises the following steps:
acquiring load spectrum data;
carrying out load spectrum fragment division on load spectrum data to obtain sample data;
clustering all sample data by adopting a clustering algorithm;
synthesizing a load spectrum based on the clustering result;
the optimal hunting position in the Grey wolf algorithm is updated by the clustering algorithm by introducing the speed and position updating mode of the particle swarm algorithm so as to optimize the clustering center.
Further, before the load spectrum data is subjected to load spectrum fragment division, abnormal value elimination is performed on the load spectrum data.
Further, prior to the clustering, the payload spectral segments are normalized and dimensionality reduced.
Further, the clustering algorithm comprises the following specific steps:
step 301, initialization: iteration times and a plurality of clustering centers;
step 302, calculating the distance from each sample data to the clustering center for each clustering center, and assigning each sample data to the class of the clustering center closest to the sample data to form a cluster;
step 303, for each cluster, randomly selecting a plurality of sample data from the cluster, calculating the fitness value of each selected sample data, selecting alpha wolf, beta wolf, delta wolf and omega wolf based on the fitness values, updating the optimal hunting position of each omega wolf based on the selected alpha wolf, beta wolf and delta wolf, and calculating the fitness values of all updated grey wolfs again to update the alpha wolf and use the updated grey wolf as a new clustering center;
step 304, if the iteration converges or meets the stop condition, one clustering center with the optimal fitness value is reserved, and a cluster corresponding to the clustering center is output; otherwise, add 1 to the iteration number and return to step 302.
Further, the expression for updating each best hunting position is as follows:
Figure BDA0003693739090000021
Figure BDA0003693739090000031
where λ is the inertial weight, c 1 、c 2 And c 3 Is a learning factor, r 1 、r 2 And r 3 Is [0,1 ]]An arbitrary vector between the two vectors,
Figure BDA0003693739090000032
indicates the kth best hunting position, <' > in the tth generation>
Figure BDA0003693739090000033
Representing the kth velocity in the t-th generation determined according to a particle swarm algorithm,
Figure BDA0003693739090000034
and &>
Figure BDA0003693739090000035
Indicating the location of the potential prey relative to the alpha, beta and delta wolves.
Further, the position of the potential prey is calculated by the following method:
Figure BDA0003693739090000036
then:
Figure BDA0003693739090000037
wherein the content of the first and second substances,
Figure BDA0003693739090000038
and &>
Figure BDA0003693739090000039
The current positions of alpha wolf, beta wolf, delta wolf and omega wolf,
Figure BDA00036937390900000310
and &>
Figure BDA00036937390900000311
The distances between the current omega wolf and alpha wolf, beta wolf and delta wolf, respectively>
Figure BDA00036937390900000312
And &>
Figure BDA00036937390900000313
Is a coefficient vector.
Further, the specific method for load spectrum synthesis comprises the following steps:
calculating the total time length of each type of load spectrum fragments, and determining the time length proportion of each type of load spectrum fragments appearing in the finally synthesized load spectrum;
and for each class, selecting the load spectrum segment closest to the clustering center to synthesize the load spectrum until the time length proportion of the class is reached and the error of the synthesized load spectrum compared with the characteristic parameter value of the obtained load spectrum data meets the requirement.
A second aspect of the present invention provides a load spectrum synthesis system based on a hybrid particle swarm and a grayish wolf algorithm, comprising:
a data acquisition module configured to: acquiring load spectrum data;
a fragmentation module configured to: carrying out load spectrum fragment division on load spectrum data to obtain sample data;
a clustering module configured to: clustering all sample data by adopting a clustering algorithm;
a load spectrum synthesis module configured to: synthesizing a load spectrum based on the clustering result;
the optimal hunting position in the Grouver wolf algorithm is updated by introducing the speed and position updating mode of the particle swarm algorithm to optimize the clustering center.
A third aspect of the present invention provides a computer readable storage medium, on which a computer program is stored, which program, when being executed by a processor, realizes the steps in the load spectrum synthesis method based on a hybrid particle swarm and a graywolf algorithm as described above.
A fourth aspect of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the hybrid particle swarm and graying algorithm-based load spectrum synthesis method as described above when executing the program.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a load spectrum synthesis method based on a mixed particle swarm and a wolf algorithm, which updates the optimal hunting position in the wolf algorithm by introducing the speed and position updating mode of the particle swarm algorithm so as to optimize a clustering center, so that the clustering is more accurate, and the synthesized load spectrum is more consistent with the actual operation conditions under different soil hardness, thereby providing a basis for researching and developing the control strategies of the load spectrum and having important significance.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
Fig. 1 is a flowchart of a load spectrum synthesis method of a hybrid particle swarm and grayish wolf algorithm according to a first embodiment of the present invention.
Detailed Description
The invention is further described with reference to the following figures and examples.
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, 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 invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
Example one
The embodiment provides a load spectrum synthesis method based on a mixed particle swarm and a wolf algorithm, as shown in fig. 1, the method specifically includes the following steps:
step 1, load spectrum data are obtained.
The load spectrum data comprises a load spectrum and working condition parameters corresponding to each working load in the load spectrum.
Specifically, a torque sensor is additionally arranged between the power machine and the operation device to acquire working load; according to the difference of soil hardness, the operating mode and the load of corresponding power machinery are different, and the operating mode parameters include: ploughing or cutting depth, ploughing or cutting speed, running time, working torque, engine output power and power output shaft output power. The power machine is an agricultural machine or a construction machine, such as a tractor and a bulldozer.
And 2, carrying out pretreatment operations such as load spectrum segment division on the load spectrum data to obtain sample data.
Specifically, the preprocessing operation includes:
(1) Before load spectrum segments of the load spectrum data are divided, abnormal values of the load spectrum data need to be removed;
(2) Dividing load spectrum segments, wherein each load spectrum segment is a sample, determining characteristic parameters of each sample (the characteristic parameters of one sample are all the working loads in the load spectrum segment and the working condition parameters corresponding to the working loads), and obtaining a characteristic parameter matrix;
(3) Prior to clustering, the payload spectral fragments were normalized and dimensionality reduced: standardizing the characteristic parameter matrix to obtain a standardized characteristic parameter matrix; based on the normalized characteristic parameter matrix, calculating a correlation coefficient matrix, and a characteristic value and a characteristic vector thereof, thereby determining principal components in the characteristic parameter matrix and obtaining a principal component load matrix; and performing point multiplication on the normalized characteristic parameter matrix and the principal component load matrix to realize dimension reduction of the sample data and obtain the sample data.
And 3, clustering all sample data by adopting a clustering algorithm.
In the embodiment, the clustering algorithm is a K-means algorithm improved by adopting a mixed particle swarm and a gray wolf algorithm. The clustering algorithm in this embodiment updates the optimal hunting position in the sirius algorithm by introducing the speed and position updating manner of the particle swarm algorithm, so as to optimize the clustering center. Therefore, the clustering algorithm comprises the following specific steps:
step 301, initialization: let the number of iterations be 0, i.e. t =0; randomly selecting k sample points as initial clustering centers m (0) To obtain k cluster centers m (0) (ii) a Initializing the speed of the wolf based on particle swarm optimization
Figure BDA0003693739090000061
Step 302, clustering samples: for each cluster center m (t) Calculating the distance from each sample data to the cluster center, assigning each sample data to the closest cluster center, and forming a cluster (class) C (t)
Step 303, updating the clustering center: for each cluster C (t) Randomly selecting n sample data from the sample data, calculating the sum of squared Euclidean distances from each sample data to all other sample points of the class to which the sample data belongs, and taking the sum as the sum of the squared Euclidean distances selected by evaluationA fitness value for each sample data; based on the fitness value, selecting alpha wolf, beta wolf and delta wolf from the selected sample data: three sample data with the optimal (minimum) fitness value are respectively reserved as an alpha wolf, a beta wolf and a delta wolf, and the rest are omega wolfs; updating the optimal hunting positions of all omega wolfs by adopting a gray wolf position updating formula in a mixed particle swarm and gray wolf algorithm; calculating all updated grey wolf fitness values, and taking the fitness value with the highest fitness as a new alpha wolf, namely a new clustering center m (t+1) . Wherein, the expression for updating the position of each ω wolf, i.e. the best hunting position, is:
Figure BDA0003693739090000071
Figure BDA0003693739090000072
wherein λ is inertia weight λ =0.5 · (1 + rand), c 1 、c 2 And c 3 In order to learn the factors, the learning device is provided with a plurality of learning units,
Figure BDA0003693739090000073
represents the position of the kth omega wolf in the t-th generation (best hunting position), -or-the-house wolf>
Figure BDA0003693739090000074
Represents the speed, < > or < > of the kth omega wolf in the tth generation determined according to the particle swarm algorithm>
Figure BDA0003693739090000075
And &>
Figure BDA0003693739090000076
Representing the position of the potential prey relative to the alpha, beta and delta wolves, the position of the potential prey is calculated as follows:
Figure BDA0003693739090000077
/>
then:
Figure BDA0003693739090000078
wherein the content of the first and second substances,
Figure BDA0003693739090000079
and &>
Figure BDA00036937390900000710
The positions of alpha wolf, beta wolf, delta wolf and omega wolf in the t generation,
Figure BDA00036937390900000711
and &>
Figure BDA00036937390900000712
The distances between the omega wolf and the alpha wolf, the beta wolf and the delta wolf, respectively>
Figure BDA00036937390900000713
And &>
Figure BDA00036937390900000714
The calculation formula is as follows:
Figure BDA0003693739090000081
wherein the content of the first and second substances,
Figure BDA0003693739090000082
is [0,1 ]]Any vector in between, the scaling factor>
Figure BDA0003693739090000083
Linearly decreasing from 2 to 0 over time during the iteration, the expression is as follows:
Figure BDA0003693739090000084
wherein, T max Is the maximum number of iterations. Coefficient vector
Figure BDA0003693739090000085
And &>
Figure BDA0003693739090000086
Is taken along with>
Figure BDA0003693739090000087
Is gradually decreased, i.e., as the iterative process proceeds @>
Figure BDA0003693739090000088
Decreases linearly from 2 to 0, the coefficient vector ≥>
Figure BDA0003693739090000089
And &>
Figure BDA00036937390900000810
Are all the interval [ -2a,2a]A random value that varies continuously within a range; i.e. when the coefficient vector<1, the α wolf, β wolf and δ wolf attack toward the direction of the prey, and this process is called development process; when coefficient vector>1, the alpha wolf, the beta wolf and the delta wolf move away from the prey, and the process is called exploration process; the stronger the development process, the stronger the local search capability, the stronger the exploration process, the stronger the global search capability.
Step 304, if the iteration converges (i.e. the number of iterations reaches the maximum number of iterations T) max ) Or the clustering result meets the stopping condition (namely the clustering result does not change), the clustering center with the optimal fitness value is reserved, and the cluster C corresponding to the clustering center is output * =C (t) Further obtaining clusters corresponding to all the clustering centers, namely the final clustering result; otherwise, add 1 to the iteration number, i.e., t = t +1, and return to step 302.
And 4, carrying out load spectrum synthesis based on the clustering result. Calculating the total time length of each type of load spectrum fragment, and determining the time length proportion of each type of load spectrum fragment appearing in the finally synthesized load spectrum; and for each class, selecting the load spectrum segment closest to the clustering center to synthesize the load spectrum until the time length proportion of the class is reached and the error of the synthesized load spectrum compared with the characteristic parameter value of the obtained load spectrum data meets the requirement.
Specifically, the typical load spectrum is constructed by clustering sample data by using the K-means algorithm of the mixed particle swarm and the gray wolf algorithm, setting four clustering center points according to the difference of soil hardness to obtain four types of different clusters, dividing the working condition and the load spectrum of the tractor into four types, determining the time length proportion of the type of load spectrum fragment to be present in the finally constructed load spectrum by calculating the total time length of the four types of load spectrum fragments, and respectively selecting the load spectrum fragments closer to the clustering centers in various fragment libraries according to the time length proportion by taking the distance from the clustering centers of various fragment libraries as a selection principle until the time length proportion is reached or exceeded and the error of the characteristic parameter value of the constructed load spectrum is met with the requirement compared with the original data.
The K-means algorithm is a clustering algorithm based on sample set division, and the clustering target is to divide a plurality of samples into K different clusters. And combining the mixed particle swarm and gray wolf algorithm with a K-means algorithm, calculating the sum of squared Euclidean distances from all selected sample data to the class center to which the sample data belongs, taking the sum as a fitness function for evaluating the cluster center, wherein the smaller the fitness value is, the better the clustering effect of the cluster algorithm of the mixed particle swarm and gray wolf algorithm is, and finally optimizing to obtain the optimal cluster center to obtain the K-means algorithm of the mixed particle swarm and gray wolf algorithm. As described above, there are k classes, n sample data are randomly selected from each class, and each sample data is calculated
Figure BDA0003693739090000091
The sum of squared euclidean distances to all the remaining sample points of the class to which it belongs, where squared euclidean distances are as follows:
Figure BDA0003693739090000092
in the formula (I), the compound is shown in the specification,
Figure BDA0003693739090000093
is->
Figure BDA0003693739090000094
The b-th sample data in the data set of the belonging class, device for selecting or keeping>
Figure BDA0003693739090000095
For the target data for which fitness values are to be calculated, d =1,2 \8230, n, m being the dimension of the sample eigenvector, and/or>
Figure BDA0003693739090000096
And expressing the squared Euclidean distance between the sample data and the target data, defining the sum of the distances from all the sample data to the target data as a fitness function, and finding the optimal clustering center by the K-means clustering strategy through the minimum selection of the fitness value.
The mixed particle swarm and the gray wolf algorithm are constructed according to the following idea:
the grey wolf algorithm is an algorithm which is provided by being inspired by the leader level and the hunting mechanism of the grey wolf in nature. The wolf group is divided into four grades of alpha, beta, delta and omega according to the habits of the wolfs, and each grade of wolf has different division of labor. The alpha wolf is a sole sanctity in wolf groups and is responsible for all decisions of the groups, including hunting; the beta wolf is used as the best candidate when the alpha wolf is ill or died, assists the decision of the alpha and feeds back the wolf group information of other grades to the alpha wolf; the delta wolf obeys the commands of the alpha wolf and the beta wolf, and can also command the action of the omega wolf at the same time, and is mainly responsible for reconnaissance and guard in the population; the ω wolf obeys the α wolf and the β wolf by listening to the direction of the δ wolf.
During hunting, the grey wolf colony will surround the game, and the grey wolf can update its location to any random point around the game within the defined space:
Figure BDA0003693739090000101
Figure BDA0003693739090000102
wherein, t is the current iteration number,
Figure BDA0003693739090000103
and &>
Figure BDA0003693739090000104
Is a coefficient vector, is->
Figure BDA0003693739090000105
Is the position vector of the prey, is>
Figure BDA0003693739090000106
Is a location vector of a wolf, is present in the interior of the vessel>
Figure BDA0003693739090000107
Is the distance between the gray wolf and the prey; coefficient vector->
Figure BDA0003693739090000108
And &>
Figure BDA0003693739090000109
Respectively, as follows:
Figure BDA00036937390900001010
Figure BDA00036937390900001011
wherein the content of the first and second substances,
Figure BDA00036937390900001012
and &>
Figure BDA00036937390900001013
Is [0,1 ]]Any vector in between, the scaling factor>
Figure BDA00036937390900001014
Linearly decreasing from 2 to 0 over time during the iteration, the expression is as follows:
Figure BDA00036937390900001015
wherein, T max Is the maximum number of iterations.
Coefficient vector
Figure BDA00036937390900001016
Is taken along with>
Figure BDA00036937390900001017
Is gradually decreased, i.e., as the iterative process proceeds @>
Figure BDA00036937390900001018
Linearly decreasing from 2 to 0, and->
Figure BDA00036937390900001019
Is the interval [ -2a,2a]A random value that varies continuously within the range. I.e. when | A |<1, the gray wolf group attacks toward the prey, and this process is called the development process. When | A |>1, the wolf pack moves away from the prey, a process known as the exploration process. The stronger the development process, the stronger the local search capability of the grayish wolf algorithm, the stronger the exploration process, and the stronger the global search capability of the grayish wolf algorithm.
In the traditional gray wolf algorithm, α wolf is the best solution with the best effect, followed by β wolf and δ wolf, ω wolf being candidate solutions for the optimization problem. Hunting by the bracketing of the alpha wolf leader prey, the beta wolf and the delta wolf assist the actions, these three resulting optimal solutions, and guide the candidate solution omega wolf to track the target and update its position. The distances between the positions of the three values of the optimum fitness, i.e., the positions of the α wolf, the β wolf, and the δ wolf, and the position of the ω wolf can be calculated by the following equations, respectively:
Figure BDA0003693739090000111
wherein the content of the first and second substances,
Figure BDA0003693739090000112
and &>
Figure BDA0003693739090000113
The current positions of alpha wolf, beta wolf, delta wolf and omega wolf,
Figure BDA0003693739090000114
and &>
Figure BDA0003693739090000115
For a coefficient vector +>
Figure BDA0003693739090000116
And &>
Figure BDA0003693739090000117
The distances between the current omega and alpha, beta and delta wolves, respectively.
The optimal hunting position (optimal solution) is represented by the following equation:
Figure BDA0003693739090000118
Figure BDA0003693739090000119
wherein the content of the first and second substances,
Figure BDA00036937390900001110
and &>
Figure BDA00036937390900001111
Is a coefficient vector->
Figure BDA00036937390900001112
The optimal hunting position at time t +1 is shown.
In the standard particle swarm algorithm, the particle updating position is mainly determined by three parts, namely the current particle motion speed, particle swarm 'individual cognition', namely particle individual experience (individual extremum), and particle swarm 'swarm cognition', namely swarm experience (swarm extremum). The velocity and position updating formula of the standard particle swarm algorithm is as follows:
Figure BDA00036937390900001113
Figure BDA00036937390900001114
wherein the content of the first and second substances,
Figure BDA00036937390900001115
indicates the speed of the particle k at time t>
Figure BDA00036937390900001116
Denotes the position of the particle k at time t, λ is the inertial weight, b 1 And b 2 For a learning factor, in>
Figure BDA00036937390900001117
Indicates a local optimum at time t, is asserted>
Figure BDA00036937390900001118
Represents the global optimum at time t, and rand is a random number.
The particle swarm algorithm searches the optimal position of the particle according to knowledge obtained by an individual extreme value and a group extreme value, the gray wolf algorithm obtains the optimal position of a prey by utilizing the knowledge obtained by the alpha wolf, the beta wolf and the delta wolf, the position updating modes of the two algorithms have certain similarity, the speed and the position updating mode of the particle swarm algorithm are introduced to replace the position updating formula of the original gray wolf algorithm, and the new speed and position updating formula is as follows:
Figure BDA0003693739090000121
Figure BDA0003693739090000122
wherein λ is inertia weight λ =0.5 · (1 + rand), c 1 、c 2 And c 3 As a learning factor, c 1 =c 2 =c 3 =0.5,r 1 、r 2 And r 3 Is [0,1 ]]An arbitrary vector between the two vectors,
Figure BDA0003693739090000123
represents the kth best hunting position (i.e., the kth wolf position) in the tth generation, and/or the number of cells in the tth generation>
Figure BDA0003693739090000124
Represents the speed of the kth gray wolf in the tth generation determined according to the particle swarm algorithm, and->
Figure BDA0003693739090000125
And &>
Figure BDA0003693739090000126
Indicating the location of the potential prey relative to the alpha, beta and delta wolves.
The inertial weight in the particle swarm algorithm influences the global searching capability of the particle swarm algorithm, and controls the exploration and utilization of the wolf in the searching space through the inertial weight in the particle swarm algorithm:
Figure BDA0003693739090000127
Figure BDA0003693739090000128
according to the method, the cluster center is selected by selecting a mixed particle swarm and a gray wolf algorithm, so that the clustering is more accurate; and a cluster algorithm improved by a mixed particle swarm and a gray wolf algorithm is selected to perform cluster analysis on the collected load spectrum data, so that the synthesized typical load spectrum better conforms to the actual operation conditions of agricultural machinery and engineering machinery, provides a basis for researching and developing control strategies of the agricultural machinery and the engineering machinery, and has important significance.
Example two
The embodiment provides a load spectrum synthesis system based on a mixed particle swarm and a wolf algorithm, which specifically comprises the following modules:
a data acquisition module configured to: load spectrum data is acquired.
The load spectrum data comprise a load spectrum and working condition parameters corresponding to each working load in the load spectrum.
Specifically, a torque sensor is additionally arranged between the power machine and the operation device to acquire working load; according to the difference of soil hardness, the operating mode and the load of corresponding power machinery are different, and the operating mode parameters include: ploughing or cutting depth, ploughing or cutting speed, running time, working torque, engine output power and power output shaft output power. The power machine is an agricultural machine or a construction machine, such as a tractor and a bulldozer.
A fragmentation module configured to: and carrying out load spectrum fragment division on the load spectrum data to obtain sample data.
And before the load spectrum data is subjected to load spectrum fragment division, removing abnormal values from the load spectrum data.
And normalizing and dimensionality reducing the load spectrum segments before clustering. Specifically, the characteristic parameter matrix is standardized to obtain a standardized characteristic parameter matrix; based on the normalized characteristic parameter matrix, calculating a correlation coefficient matrix, and a characteristic value and a characteristic vector thereof, thereby determining principal components in the characteristic parameter matrix and obtaining a principal component load matrix; and performing point multiplication on the normalized characteristic parameter matrix and the principal component load matrix to realize dimension reduction of the sample data and obtain the sample data.
A clustering module configured to: and clustering all sample data by adopting a clustering algorithm.
The optimal hunting position in the Grouver wolf algorithm is updated by introducing the speed and position updating mode of the particle swarm algorithm to optimize the clustering center.
The clustering algorithm comprises the following specific steps:
step 301, initialization: let the number of iterations be 0, i.e. t =0; randomly selecting k sample points as initial clustering centers m (0) Obtaining a plurality of clustering centers; initializing speed of gray wolf
Figure BDA0003693739090000141
Step 302, clustering samples: for each cluster center m (t) Calculating the distance from each sample data to the cluster center, assigning each sample data to the closest cluster center, and forming a cluster C (t)
Step 303, updating the clustering center: for each cluster C (t) Randomly selecting n sample data from the sample data, calculating the sum of squared Euclidean distances from each sample data to all other sample points of the class to which the sample data belongs, and taking the sum as an evaluated fitness value; based on the fitness value, selecting alpha wolf, beta wolf and delta wolf: three sample data with the optimal (minimum) fitness value are respectively reserved as an alpha wolf, a beta wolf and a delta wolf, and the rest are omega wolfs; updating the optimal hunting positions of all omega wolfs by adopting a grey wolf position updating formula in a mixed particle swarm and a grey wolf algorithm; calculating all updated grey wolf fitness values, and taking the fitness value with the highest fitness as a new alpha wolf, namely a new clustering center m (t+1) . Wherein, the expression for updating each omega wolf best hunting position is:
Figure BDA0003693739090000142
Figure BDA0003693739090000143
wherein λ is inertia weight λ =0.5 · (1 + rand), c 1 、c 2 And c 3 In order to learn the factors, the learning device is provided with a plurality of learning units,
Figure BDA0003693739090000144
represents the kth best hunting position (i.e., the kth wolf position) in the tth generation, and/or the number of cells in the tth generation>
Figure BDA0003693739090000145
Representing the speed of the k-th wolf in the t-th generation determined according to the particle swarm algorithm, based on the determined reference value>
Figure BDA0003693739090000146
And &>
Figure BDA0003693739090000147
Representing the position of the potential prey relative to the alpha, beta and delta wolves, is calculated as follows:
Figure BDA0003693739090000148
Figure BDA0003693739090000151
wherein the content of the first and second substances,
Figure BDA0003693739090000152
and &>
Figure BDA0003693739090000153
The positions of alpha wolf, beta wolf, delta wolf and omega wolf in the t generation,
Figure BDA0003693739090000154
and &>
Figure BDA0003693739090000155
Omega wolf and alpha wolf, beta wolf anddistance between delta wolfs->
Figure BDA0003693739090000156
And &>
Figure BDA0003693739090000157
The calculation formula is as follows:
Figure BDA0003693739090000158
/>
wherein the content of the first and second substances,
Figure BDA0003693739090000159
is [0,1 ]]Any vector in between, the scaling factor>
Figure BDA00036937390900001510
Linearly decreasing from 2 to 0 over time during the iteration, the expression is as follows:
Figure BDA00036937390900001511
wherein, T max Is the maximum number of iterations. Coefficient vector
Figure BDA00036937390900001512
And &>
Figure BDA00036937390900001513
Is taken along with>
Figure BDA00036937390900001514
Is gradually decreased, i.e., as the iterative process proceeds>
Figure BDA00036937390900001515
Decreases linearly from 2 to 0, the coefficient vector ≥>
Figure BDA00036937390900001516
And &>
Figure BDA00036937390900001517
Are all within the interval [ -2a,2a]A random value that varies continuously within a range; i.e. when the coefficient vector<1, the alpha wolf, the beta wolf and the delta wolf attack towards the direction of a prey, and the process is called a development process; when coefficient vector>1, the alpha wolf, the beta wolf and the delta wolf move away from the prey, and the process is called exploration process; the stronger the development process, the stronger the local search capability, the stronger the exploration process, the stronger the global search capability.
Step 304, if the iteration converges (i.e. the number of iterations reaches the maximum number of iterations T) max ) Or the cluster C meets the stopping condition (namely the clustering result is not changed), one clustering center with the optimal fitness value is reserved, and the cluster C corresponding to the clustering center is output * =C (t) (ii) a Otherwise, add 1 to the iteration number, i.e., t = t +1, and return to step 302.
A load spectrum synthesis module configured to: and carrying out load spectrum synthesis based on the clustering result.
The specific method for synthesizing the load spectrum comprises the following steps: calculating the total time length of each type of load spectrum fragment, and determining the time length proportion of each type of load spectrum fragment appearing in the finally synthesized load spectrum; and for each class, selecting the load spectrum segment closest to the clustering center to carry out load spectrum synthesis until the time length proportion of the class is reached and the error of the synthesized load spectrum compared with the characteristic parameter value of the obtained load spectrum data meets the requirement.
Specifically, the typical load spectrum is constructed by clustering sample data by using the K-means algorithm of the mixed particle swarm and the gray wolf algorithm, setting four clustering center points according to the difference of soil hardness to obtain four types of different clusters, dividing the working condition and the load spectrum of the tractor into four types, determining the time length proportion of the type of load spectrum fragment to be present in the finally constructed load spectrum by calculating the total time length of the four types of load spectrum fragments, and respectively selecting the load spectrum fragments closer to the clustering centers in various fragment libraries according to the time length proportion by taking the distance from the clustering centers of various fragment libraries as a selection principle until the time length proportion is reached or exceeded and the error of the characteristic parameter value of the constructed load spectrum is met with the requirement compared with the original data.
In the embodiment, the optimal hunting position in the sirius algorithm is updated by introducing the speed and position updating mode of the particle swarm algorithm to optimize the clustering center, so that the clustering is more accurate, the synthesized load spectrum better meets the actual operation conditions under different soil hardness, a basis is provided for researching and developing control strategies of the load spectrum, and the method has important significance
It should be noted that, each module in the present embodiment corresponds to each step in the first embodiment one to one, and the specific implementation process is the same, which is not described herein again.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps in the load spectrum synthesis method based on mixed particle swarm and graywolf algorithm as described in the first embodiment above.
Example four
The present embodiment provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the processor implements the steps in the load spectrum synthesis method based on the hybrid particle swarm and the graying wolf algorithm as described in the first embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. The load spectrum synthesis method based on the mixed particle swarm and the wolf algorithm is characterized by comprising the following steps of:
acquiring load spectrum data;
carrying out load spectrum fragment division on load spectrum data to obtain sample data;
clustering all sample data by adopting a clustering algorithm;
synthesizing a load spectrum based on the clustering result;
the optimal hunting position in the Grouver wolf algorithm is updated by the clustering algorithm by introducing the speed and position updating mode of the particle swarm algorithm so as to optimize the clustering center;
the specific method for synthesizing the load spectrum comprises the following steps: calculating the total time length of each type of load spectrum fragments, and determining the time length proportion of each type of load spectrum fragments appearing in the finally synthesized load spectrum; for each class, selecting the load spectrum segment closest to the clustering center to carry out load spectrum synthesis until the time length proportion of the class is reached and the error of the synthesized load spectrum compared with the characteristic parameter value of the obtained load spectrum data meets the requirement;
the clustering algorithm comprises the following specific steps:
step 301, initialization: iteration times and a plurality of clustering centers;
step 302, calculating the distance from each sample data to the clustering center for each clustering center, and assigning each sample data to the class of the clustering center closest to the sample data to form a cluster;
step 303, for each cluster, randomly selecting a plurality of sample data from the cluster, calculating the fitness value of each selected sample data, selecting alpha wolf, beta wolf, delta wolf and omega wolf based on the fitness values, updating the optimal hunting position of each omega wolf based on the selected alpha wolf, beta wolf and delta wolf, and calculating the fitness values of all updated grey wolfs again to update the alpha wolf and use the updated grey wolf as a new clustering center;
step 304, if the iteration converges or meets the stop condition, one clustering center with the optimal fitness value is reserved, and a cluster corresponding to the clustering center is output; otherwise, add 1 to the iteration number and return to step 302.
2. The method for load spectrum synthesis based on hybrid particle swarm and grayish wolf algorithm as claimed in claim 1, wherein the outlier elimination is performed on the load spectrum data before the load spectrum segment division is performed on the load spectrum data.
3. The method of claim 1, wherein prior to the clustering, the payload spectrum segments are normalized and dimensionality reduced.
4. The hybrid particle swarm and gray wolf algorithm based load spectrum synthesis method of claim 1, wherein the expression for updating the optimal hunting position of each ω wolf is:
Figure FDA0003998189000000021
Figure FDA0003998189000000022
where λ is the inertial weight, c 1 、c 2 And c 3 Is a learning factor, r 1 、r 2 And r 3 Is [0,1 ]]An arbitrary vector between the two vectors,
Figure FDA0003998189000000023
indicates the kth best hunting position, <' > in the tth generation>
Figure FDA0003998189000000024
Representing the kth velocity in the t-th generation determined according to a particle swarm algorithm,
Figure FDA0003998189000000025
and &>
Figure FDA0003998189000000026
Indicating the location of the potential prey relative to the alpha, beta and delta wolves.
5. The method for load spectrum synthesis based on mixed particle swarm and grayish wolf algorithm according to claim 4, wherein the position of the potential prey is calculated by the following method:
Figure FDA0003998189000000027
then:
Figure FDA0003998189000000028
wherein the content of the first and second substances,
Figure FDA0003998189000000029
and &>
Figure FDA00039981890000000210
Positions of alpha wolf, beta wolf, delta wolf and omega wolf respectively>
Figure FDA00039981890000000211
Figure FDA00039981890000000212
And
Figure FDA00039981890000000213
the distances between the omega wolf and the alpha wolf, the beta wolf and the delta wolf, respectively>
Figure FDA00039981890000000214
And &>
Figure FDA00039981890000000215
Is a coefficient vector.
6. Load spectrum synthesis system based on mixed particle swarm and wolf algorithm is characterized by comprising:
a data acquisition module configured to: acquiring load spectrum data;
a fragmentation module configured to: carrying out load spectrum fragment division on load spectrum data to obtain sample data;
a clustering module configured to: clustering all sample data by adopting a clustering algorithm;
a load spectrum synthesis module configured to: synthesizing a load spectrum based on the clustering result;
the optimal hunting position in the Grey wolf algorithm is updated by the clustering algorithm by introducing the speed and position updating mode of the particle swarm algorithm so as to optimize a clustering center;
the specific method for synthesizing the load spectrum comprises the following steps: calculating the total time length of each type of load spectrum fragment, and determining the time length proportion of each type of load spectrum fragment appearing in the finally synthesized load spectrum; for each class, selecting the load spectrum segment closest to the clustering center to carry out load spectrum synthesis until the time length proportion of the class is reached and the error of the synthesized load spectrum compared with the characteristic parameter value of the obtained load spectrum data meets the requirement;
the clustering algorithm comprises the following specific steps:
step 301, initialization: iteration times and a plurality of clustering centers;
step 302, calculating the distance from each sample data to the clustering center for each clustering center, and assigning each sample data to the class of the clustering center closest to the sample data to form a cluster;
303, randomly selecting a plurality of sample data from each cluster, calculating the adaptability value of each selected sample data, selecting alpha wolf, beta wolf, delta wolf and omega wolf based on the adaptability values, updating the optimal hunting position of each omega wolf based on the selected alpha wolf, beta wolf and delta wolf, and calculating the adaptability values of all updated grey wolfs again to update the alpha wolf and take the updated grey wolf as a new clustering center;
step 304, if the iteration converges or meets the stop condition, one clustering center with the optimal fitness value is reserved, and a cluster corresponding to the clustering center is output; otherwise, add 1 to the number of iterations and return to step 302.
7. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps in the method for load spectrum synthesis based on a hybrid particle swarm and grayish wolf algorithm according to any one of claims 1 to 5.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps in the hybrid particle swarm and graying algorithm based load spectrum synthesis method according to any of claims 1-5 when executing the program.
CN202210668127.5A 2022-06-14 2022-06-14 Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm Active CN114936607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210668127.5A CN114936607B (en) 2022-06-14 2022-06-14 Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210668127.5A CN114936607B (en) 2022-06-14 2022-06-14 Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm

Publications (2)

Publication Number Publication Date
CN114936607A CN114936607A (en) 2022-08-23
CN114936607B true CN114936607B (en) 2023-04-07

Family

ID=82866615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210668127.5A Active CN114936607B (en) 2022-06-14 2022-06-14 Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm

Country Status (1)

Country Link
CN (1) CN114936607B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414584A (en) * 2019-07-22 2019-11-05 山东大学 The motor road spectral clustering synthetic method and system of hybrid particle swarm and artificial fish-swarm algorithm
CN113392471A (en) * 2021-06-30 2021-09-14 华南农业大学 Hybrid electric vehicle reducer load spectrum compiling method, medium and equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10322506B2 (en) * 2016-05-06 2019-06-18 Kindred Systems Inc. Systems, devices, articles, and methods for using trained robots
US20180284758A1 (en) * 2016-05-09 2018-10-04 StrongForce IoT Portfolio 2016, LLC Methods and systems for industrial internet of things data collection for equipment analysis in an upstream oil and gas environment
CN111368077B (en) * 2020-02-28 2023-07-07 大连大学 K-Means text classification method based on particle swarm position updating thought wolf optimization algorithm
CN112395940A (en) * 2020-09-15 2021-02-23 海南大学 Road load spectrum making method based on density peak value machine learning algorithm
CN113343487B (en) * 2021-06-29 2023-08-22 山推工程机械股份有限公司 Method for generating battery test scheme for electric bulldozer based on big data analysis
CN114093055A (en) * 2021-11-26 2022-02-25 海南小鲨鱼智能科技有限公司 Road spectrum generation method and device, electronic equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414584A (en) * 2019-07-22 2019-11-05 山东大学 The motor road spectral clustering synthetic method and system of hybrid particle swarm and artificial fish-swarm algorithm
CN113392471A (en) * 2021-06-30 2021-09-14 华南农业大学 Hybrid electric vehicle reducer load spectrum compiling method, medium and equipment

Also Published As

Publication number Publication date
CN114936607A (en) 2022-08-23

Similar Documents

Publication Publication Date Title
Neggaz et al. Boosting salp swarm algorithm by sine cosine algorithm and disrupt operator for feature selection
Hannan et al. SOC estimation of li-ion batteries with learning rate-optimized deep fully convolutional network
Takeno et al. Multi-fidelity Bayesian optimization with max-value entropy search and its parallelization
Xue et al. Particle swarm optimisation for feature selection in classification: Novel initialisation and updating mechanisms
CN108985065B (en) Method and system for detecting firmware bugs by applying improved Mahalanobis distance calculation method
CN112394642B (en) Robot milling chatter identification method based on super-parameter optimization
CN112379589B (en) Worm wheel machining shape controllable process
Xavier et al. A Distributed Tree-based Ensemble Learning Approach for Efficient Structure Prediction of Protein.
CN115688040A (en) Mechanical equipment fault diagnosis method, device, equipment and readable storage medium
CN114936607B (en) Load spectrum synthesis method and system based on mixed particle swarm and wolf algorithm
Xue et al. An archive based particle swarm optimisation for feature selection in classification
CN111260041A (en) Discretization of values with adaptive precision
CN113378998A (en) Stratum lithology while-drilling identification method based on machine learning
CN116258252A (en) Aircraft track prediction method, storage medium and equipment based on attention mechanism
Yang et al. A data stream ensemble assisted multifactorial evolutionary algorithm for offline data-driven dynamic optimization
EP3881242A1 (en) Apparatus and method for creating and training artificial neural networks
Zhang et al. Learning uncertainty using clustering and local gaussian process regression
Cateni et al. Improving the stability of sequential forward variables selection
Rochayani et al. Finding biomarkers from a high-dimensional imbalanced dataset using the hybrid method of random undersampling and lasso
CN112039496B (en) Rapid Gaussian particle filter data fusion method based on artificial fish swarm optimization
US20220284302A1 (en) Apparatus and method with neural architecture searching
EP4124887A1 (en) Methods and systems for predicting trajectory data of an object and methods and systems for training a machine learning method for predicting trajectory data of an object
US20230045222A1 (en) Learning device, learning method, recording medium having recorded thereon learning program, and control device
CN113671832B (en) Magnetic bearing control method and device and electronic equipment
US20240086769A1 (en) Computer-implemented method and device for determining a prediction for a variable of a technical system, using a machine learning model

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