Bearing signal expansion method and system based on chaotic particle swarm optimization and generative adversarial network
By combining the chaotic particle swarm optimization algorithm and the generative adversarial network and optimizing the alternating training of the generator and the discriminator, the problem of insufficient data in bearing fault diagnosis is solved, and efficient, diverse and accurate signal generation is achieved, which is suitable for bearing diagnosis with small samples and class imbalanced data.
Patent Information
- Application Number
- CN202510752039.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-16
AI Technical Summary
Existing technologies in bearing fault diagnosis are unable to effectively utilize generative models for data augmentation due to insufficient data, especially small samples and class imbalanced data problems, resulting in unstable training and slow convergence.
Combining chaotic particle swarm optimization and generative adversarial network, the generator and discriminator are constructed by optimizing random vectors and deep convolutional neural network, and alternating training is performed to generate high-quality bearing signals. Discrete wavelet denoising and structural similarity function are used to improve the signal quality.
It accelerates the convergence of the generative adversarial network, improves the quality and efficiency of the generated graph, reduces the impact of noise, provides diversity and accuracy, and provides a reliable data basis for small sample bearing fault diagnosis.
Smart Images

Figure CN120654728A_ABST
Abstract
Description
Technical Field
[0001] The present invention proposes a bearing signal expansion method and system based on a chaotic particle swarm optimization algorithm and a generative adversarial network, belonging to the field of rotating machinery fault diagnosis and artificial intelligence technology, and specifically relates to the application of a chaotic particle swarm optimization algorithm and a generative adversarial network to the expansion of one-dimensional acceleration signals of rolling bearings. Background Art
[0002] Rolling mill bearings are the parts with the highest failure rate in steel forming process lines. However, due to factors such as site, working conditions, sensor equipment, and the fact that the bearings themselves are in a healthy state for most of their usage time, bearing datasets often cannot obtain sufficient fault signals, which places higher demands on data-driven fault diagnosis. Current research methods for small sample sizes and class imbalanced data are mainly divided into three categories: (1) optimized feature extraction engineering; (2) data enhancement based on generative models; and (3) using transfer learning to transfer source domain knowledge to the target domain, reducing the target domain's dependence on data.
[0003] Generative models are one of the methods to solve data limitations and have been widely used in bearing fault diagnosis. Common generative models include diffusion models, variational autoencoders (VAE), generative adversarial networks (GANs), etc. Generative adversarial networks introduce generators and discriminators, which are trained adversarially to achieve Nash equilibrium. They have the advantages of high generation quality, no need to explicitly define data distribution, and unsupervised learning. However, traditional GAN algorithms are prone to mode collapse, unstable training, slow convergence, etc. On this basis, many researchers have proposed variants of GAN networks, such as infogan, wgan, cyclegan, cgan, acgan, isgan and other network architectures. The present invention combines the chaotic particle swarm optimization algorithm and the generative adversarial network to expand bearing data, providing a new idea for small sample bearing fault diagnosis. Summary of the Invention
[0004] In view of this, in order to make up for the gaps and deficiencies in the prior art, the present invention proposes a bearing signal expansion method and system based on chaotic particle swarm optimization and generative adversarial network.
[0005] The present invention proposes a bearing signal expansion method and system based on chaotic particle swarm optimization and generative adversarial network, which includes the following contents:
[0006] A bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network includes the following steps:
[0007] Step S1: Dataset creation and import, including using discrete wavelet denoising, selecting the length of signal slices, converting the one-dimensional vibration signal into a two-dimensional grayscale image, determining the data set data type, and loading it into the data loader;
[0008] Step S2: Optimize the random vector z based on the chaotic particle swarm optimization algorithm, select the solution space dimension, boundary and particle swarm parameters, design the fitness function, and obtain the optimized random vector z* through particle swarm iteration;
[0009] Step S3: Use a deep convolutional neural network to construct the generator G and the discriminator D, and add random perturbations to the optimized random vector z* as the input of the generator G. The generator G and the discriminator D are trained alternately until the set number of rounds is reached;
[0010] The alternating training process of the generator G and the discriminator D includes: fixing the generator G, training the discriminator D using real samples and generated samples, and updating the parameters of the discriminator D; then, fixing the discriminator D, using the discrimination results of the generated images and the real labels to calculate the loss of the generator, and updating the parameters of the generator G.
[0011] Step S4: Input the generated graph into the MaSA-ResNet18 model, and start the test mode of the MaSA-ResNet18 model to evaluate the quality of the generated graph.
[0012] Furthermore, step S1 includes the following contents:
[0013] Step S11: The discrete wavelet denoising process includes the following:
[0014] In the discrete wavelet transform, the Daubechies series wavelet transform is used to continuously recursively decompose and downsample the low-frequency part through the filter to reconstruct the multi-scale representation of the signal; the low-pass filter and high-pass filter are expressed as:
[0015] cA[n]=∑ m x[m]·h[2n-m]
[0016] cD[n]=∑ m x[m]·g[2n-m]
[0017] Where h[m] and g[m] are the coefficients of the low-pass filter and high-pass filter, respectively; cA[n] is the approximate coefficient of the low-frequency part, representing the main components of the signal, and cD[n] is the detail coefficient of the high-frequency part, representing the noise and detail information of the signal; m represents the index value of the Daubechies series wavelet transform traversing the initial signal; n is the index value of the wavelet decomposition layer;
[0018] Step S12: The BayesShrink soft threshold is used in discrete wavelet transform. The soft threshold is determined by the following formula:
[0019]
[0020] Where σ is the standard deviation of the noise, σ x is the standard deviation of the multiscale wavelet coefficients.
[0021] Furthermore, step S1 also includes the following:
[0022] Step S13: The length of the selected signal slice includes the following:
[0023] The signal slice length is determined according to the Quenest sampling theorem. The slice length l s The following relationship is satisfied:
[0024]
[0025] Among them, f s is the sensor sampling frequency, n is the rotating machine speed (here, the rolling mill speed), and C is an integer; further, after determining the sampling frequency, a random sliding window is used for slicing.
[0026] Step S14: Converting the one-dimensional vibration signal into a two-dimensional grayscale image includes the following:
[0027] The one-dimensional vibration signal is converted into a two-dimensional grayscale image by normalization and reshaping operation; the normalization formula is as follows:
[0028]
[0029] where {x max} represents the maximum value of the signal data: {x min} represents the minimum value of the signal data;
[0030] The reshape operation converts the vector into an array.
[0031] Furthermore, step S2 includes the following contents:
[0032] Step S21: constructing a chaotic order SPM mapping based on the chaotic particle swarm optimization algorithm, the formula is as follows:
[0033]
[0034] Among them, the parameter μ represents the segmentation threshold, η represents the chaotic perturbation factor for controlling nonlinearity, and r is a random number between 0 and 1. in Indicates taking no more than The largest integer;
[0035] Step S22: Select the solution space dimension, boundary, and particle swarm parameters; wherein the solution space includes a 32*32 two-dimensional matrix, wherein the boundary includes the interval [0,1]; wherein the number of chaotic sequence particle swarms is 50-55, and the number of iterations is 100-110. Furthermore, the expression of the weight parameter w(t) is as follows:
[0036]
[0037] Where T represents the maximum number of iterations, t represents the current number of iterations, and t takes the value [1, T]. w1 represents the initial inertia weight, and w2 represents the inertia weight when the iteration reaches the maximum number.
[0038] Furthermore, step S2 also includes the following:
[0039] Step S23: adopting a fitness function, wherein the fitness function includes a structural similarity function SSIM; its formula is as follows:
[0040]
[0041] Among them, μ x represents the pixel average value of image x; μ y Represents the pixel average of image y; C1 represents the stability constant; C2 represents the stability constant: σ x Represents the variance of image x: σ y Represents the variance of image y: σ xy represents the covariance.
[0042] Furthermore, step S3 includes the following contents:
[0043] Step S31: Construct a generator G using a deep convolutional neural network, where the generator includes an encoder and a decoder. The encoder performs downsampling through two convolutions, and the decoder consists of two layers of deconvolution and one layer of convolution.
[0044] The discriminator D is constructed using a deep convolutional neural network, where the discriminator consists of three convolutional layers and one linear layer, and its output is the probability of whether the image is real or fake;
[0045] Step S32: The random vector z is a priori noise variable in the generative adversarial network, and the random vector z conforms to the distribution P z (z); The generator passes through the differentiable mapping function G(z; θ g ) establishes the connection between the random vector z and the source image x, θ g is the weight parameter, and the x generated by the generator satisfies the distribution P g (x); Assume that the source image x satisfies the distribution Pdata (x), then the task of the generator G is to convert P g (x) approaches P data (x), and the minimization function ln(1-D(G(z))) is obtained; and the discriminator D is mapped by D(x; θ d ) outputs a probability scalar, whose task is to distinguish the probability that the input x is a true sample or a false sample, that is, to minimize the function lnD(G(z)); so the loss function is expressed as:
[0046]
[0047] V(G, D) is the loss function.
[0048] Furthermore, step S3 also includes the following contents:
[0049] Step S33: The generator G and the discriminator D both use the Adam optimizer to accelerate convergence during gradient update. The gradient update of the discriminator D includes the following formula:
[0050]
[0051] The gradient update of the generator G includes the following formula:
[0052]
[0053] Where N represents the number of training set samples;
[0054] Step S34: Assuming that the generator G is fixed, the optimal discriminator D is the one that maximizes the loss function V(G, D); integrating the formula, we get the following formula:
[0055] V(G, D)=∫[P data (x)ln D(x)+P g (x)ln(1-D(x))]dx
[0056] The extreme position of the above equation is the extreme position of the function inside the integral sign, and the optimal discriminator D is obtained by differentiating it. * (x);
[0057]
[0058] Among them, when P g =P data When D * Substituting this back into the loss function V(G,D) yields the discriminator loss d_loss = 0.693, and the generator loss g_loss = 0.693.
[0059] Furthermore, step S4 includes the following contents:
[0060] Step S41: Input the generated graph into the MaSA-ResNet18 model and start the test mode of the MaSA-ResNet18 model to evaluate the quality of the generated graph;
[0061] The model MaSA-ResNet18 described herein includes a residual network integrated with the Manhattan self-attention mechanism, with the basic framework being the ResNet18 architecture. The activation function leaky ReLu is used to enable the model MaSA-ResNet18 to maintain gradient updates in negative slope areas and avoid neuron death.
[0062] According to the second aspect of the present invention, a bearing signal expansion system based on a chaotic particle swarm algorithm and a generative adversarial network includes an electronic device, wherein the electronic device includes a memory, a processor, and a computer program stored in the memory and runnable on the processor, and is characterized in that when the processor executes the computer program, it implements a bearing signal expansion method based on a chaotic particle swarm algorithm and a generative adversarial network as described in any one of the present invention.
[0063] According to the third aspect of the present invention, a bearing signal expansion system based on a chaotic particle swarm algorithm and a generative adversarial network includes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements a bearing signal expansion method based on a chaotic particle swarm algorithm and a generative adversarial network as described in any one of the present inventions.
[0064] The present invention has the following advantages:
[0065] 1) This paper introduces random vectors of chaotic particle swarm optimization to accelerate the convergence of the generative adversarial network, improve the quality and efficiency of the network's generated graphs, and increase the diversity of the generated graphs by adding random perturbations.
[0066] 2) The present invention introduces discrete wavelet (db6) for data preprocessing, which can effectively reduce the impact of data noise and make the algorithm adaptable to actual industrial environments with strong background noise.
[0067] 3) The present invention introduces a chaotic particle swarm optimization algorithm, which measures the similarity between random vectors (matrix form) and real samples through the structural similarity function SSIM. Compared with methods such as mean square error (MSE), cosine similarity, KL divergence, and sample entropy, the proposed method has higher accuracy.
[0068] 4) This invention uses deep convolutional layers to construct the generator and discriminator. Grayscale images reconstructed from one-dimensional signals have a certain texture, but in traditional GAN networks, the generator built with multi-layer perceptrons cannot learn these abstract features. The deep convolutional generative adversarial network (DCGAN) used in this invention has the ability to learn more complex spatial features, and its actual generation effect is better than that of GAN networks.
[0069] 5) The present invention provides a feasible solution to the small sample and class imbalance problems, and provides a reliable and diverse data basis for subsequent bearing diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 The present invention provides a bearing signal expansion method based on chaotic particle swarm algorithm and generative adversarial network and the overall flow chart of the system.
[0071] Figure 2 This is a schematic diagram of the multi-scale discrete wavelet (db6) transform used in the present invention.
[0072] Figure 3 This is a diagram of the implementation steps of the chaotic particle swarm optimization (CPSO) optimization algorithm proposed in this invention.
[0073] Figure 4 Schematic diagram of the improved generative adversarial network model (CPSO-GAN) of the present invention.
[0074] Figure 5 The invention implements the iteration diagram of the chaotic particle swarm algorithm to optimize the random vector.
[0075] Figure 6 This is an iterative graph of the loss curve of the DCGAN network implemented in the present invention.
[0076] Figure 7 This is a network model architecture diagram of the model MaSA-ResNet18 provided by the present invention. DETAILED DESCRIPTION
[0077] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0078] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.
[0079] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form, and it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.
[0080] The present invention proposes a bearing signal expansion method and system based on chaotic particle swarm optimization and generative adversarial network, which includes the following contents:
[0081] A bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network includes the following steps:
[0082] Step S1: Dataset creation and import, including using discrete wavelet denoising, selecting the length of signal slices, converting the one-dimensional vibration signal into a two-dimensional grayscale image, determining the data set data type, and loading it into the data loader;
[0083] Step S2: Optimize the random vector z based on the chaotic particle swarm optimization algorithm, select the solution space dimension, boundary and particle swarm parameters, design the fitness function, and obtain the optimized random vector z* through particle swarm iteration;
[0084] Step S3: Use a deep convolutional neural network to construct a generator G and a discriminator D. Use the dataset as the input of the generator G and train the generator G and the discriminator D alternately until the set number of rounds is reached.
[0085] The alternating training process of the generator G and the discriminator D includes: fixing the generator G, training the discriminator D using real samples and generated samples, and updating the parameters of the discriminator D; then, fixing the discriminator D, using the discrimination results of the generated images and the real labels to calculate the loss of the generator, and updating the parameters of the generator G;
[0086] Step S4: Input the generated graph into the MaSA-ResNet18 model, and start the test mode of the MaSA-ResNet18 model to evaluate the quality of the generated graph.
[0087] Furthermore, step S1 includes the following contents:
[0088] Step S11: The discrete wavelet denoising process includes the following:
[0089] In the discrete wavelet transform, the Daubechies series wavelet transform is used to continuously recursively decompose and downsample the low-frequency part through the filter to reconstruct the multi-scale representation of the signal; the low-pass filter and high-pass filter are expressed as:
[0090] cA[n]=∑ m x[m]·h[2n-m]
[0091] cD[n]=∑ m x[m]·g[2n-n]
[0092] Where h[m] and g[m] are the coefficients of the low-pass filter and high-pass filter, respectively; cA[n] is the approximate coefficient of the low-frequency part, representing the main components of the signal, and cD[n] is the detail coefficient of the high-frequency part, representing the noise and detail information of the signal; m represents the index value of the Daubechies series wavelet transform traversing the initial signal; n is the index value of the wavelet decomposition layer;
[0093] Step S12: The BayesShrink soft threshold is used in discrete wavelet transform. The soft threshold is determined by the following formula:
[0094]
[0095] Where σ is the standard deviation of the noise, σ x is the standard deviation of the multiscale wavelet coefficients.
[0096] Furthermore, step S1 also includes the following:
[0097] Step S13: The length of the selected signal slice includes the following:
[0098] The signal slice length is determined according to the Quenest sampling theorem. The slice length l s The following relationship is satisfied:
[0099]
[0100] Among them, f s is the sensor sampling frequency, n is the rotating machine speed (here, the rolling mill speed), and C is an integer; further, after determining the sampling frequency, a random sliding window is used for slicing.
[0101] Step S14: Converting the one-dimensional vibration signal into a two-dimensional grayscale image includes the following:
[0102] The one-dimensional vibration signal is converted into a two-dimensional grayscale image by normalization and reshaping operation; the normalization formula is as follows:
[0103]
[0104] where {x max} represents the maximum value of the signal data: {x min} represents the minimum value of the signal data;
[0105] The reshape operation converts the 1024-dimensional vector into a [32,32] array.
[0106] Furthermore, step S2 includes the following contents:
[0107] Step S21: constructing a chaotic order SPM mapping based on the chaotic particle swarm optimization algorithm, the formula is as follows:
[0108]
[0109] Among them, the parameter μ represents the segmentation threshold, η represents the chaotic perturbation factor for controlling nonlinearity, and r is a random number between 0 and 1. in Indicates taking no more than The largest integer;
[0110] Step S22: Select the solution space dimension, boundary, and particle swarm parameters; wherein the solution space includes a 32*32 two-dimensional matrix, wherein the boundary includes the interval [0,1]; wherein the number of chaotic sequence particle swarms is 50-55, and the number of iterations is 100-110. Furthermore, the expression of the weight parameter w(t) is as follows:
[0111]
[0112] Where T represents the number of iterations, t represents the current number of iterations, and t takes the value [1, T]. w1 represents the initial inertia weight, and w2 represents the inertia weight when the iteration reaches the maximum number.
[0113] Furthermore, step S2 also includes the following:
[0114] Step S23: adopting a fitness function, wherein the fitness function includes a structural similarity function SSIM; its formula is as follows:
[0115]
[0116] Among them, μ x represents the pixel average value of image x; μ y Represents the pixel average of image y; C1 represents the stability constant; C2 represents the stability constant: σ x Represents the variance of image x: σ y Represents the variance of image y: σ xy represents the covariance.
[0117] Furthermore, step S3 includes the following contents:
[0118] Step S31: Construct a generator G using a deep convolutional neural network, where the generator includes an encoder and a decoder. The encoder performs downsampling through two convolutions, and the decoder consists of two layers of deconvolution and one layer of convolution.
[0119] The discriminator D is constructed using a deep convolutional neural network, where the discriminator consists of three convolutional layers and one linear layer, and its output is the probability of whether the image is real or fake;
[0120] Step S32: The random vector z is a priori noise variable in the generative adversarial network, and the random vector z conforms to the distribution P z (z); The generator passes through the differentiable mapping function G(z; θ g ) establishes the connection between the random vector z and the source image x, θ g is the weight parameter, and the x generated by the generator satisfies the distribution P g (x); Assume that the source image x satisfies the distribution P data (x), then the task of the generator G is to convert P g (x) approaches P data (x), and the minimization function ln(1-D(G(z))) is obtained; and the discriminator D is mapped by D(x; θ d ) outputs a probability scalar, whose task is to distinguish the probability that the input x is a true sample or a false sample, that is, to minimize the function lnD(G(z)); so the loss function is expressed as:
[0121]
[0122] V(G, D) is the loss function expression.
[0123] Furthermore, step S3 also includes the following contents:
[0124] Step S33: The generator G and the discriminator D both use the Adam optimizer to accelerate convergence during gradient update. The gradient update of the discriminator D includes the following formula:
[0125]
[0126] The gradient update of the generator G includes the following formula:
[0127]
[0128] Where N represents the number of training set samples;
[0129] Step S34: Assuming that the generator G is fixed, the optimal discriminator D is the one that maximizes the loss function V(G, D); integrating the formula, we get the following formula:
[0130] V(G, D)=∫[P data(x)ln D(x)+P g (x)ln(1-D(x))]dx
[0131] The extreme position of the above equation is the extreme position of the function inside the integral sign, and the optimal discriminator D is obtained by differentiating it. * (x);
[0132]
[0133] Among them, when P g =P data When D * Substituting this back into the loss function V(G,D) yields the discriminator loss d_loss = 0.693, and the generator loss g_loss = 0.693.
[0134] Furthermore, step S4 includes the following contents:
[0135] Step S41: Input the generated graph into the MaSA-ResNet18 model and start the test mode of the MaSA-ResNet18 model to evaluate the quality of the generated graph;
[0136] The model MaSA-ResNet18 described herein includes a residual network integrated with the Manhattan self-attention mechanism, with the basic framework being the ResNet18 architecture. The activation function leaky ReLu is used to enable the model MaSA-ResNet18 to maintain gradient updates in negative slope areas and avoid neuron death.
[0137] According to the second aspect of the present invention, a bearing signal expansion system based on a chaotic particle swarm algorithm and a generative adversarial network includes an electronic device, wherein the electronic device includes a memory, a processor, and a computer program stored in the memory and runnable on the processor, and is characterized in that when the processor executes the computer program, it implements a bearing signal expansion method based on a chaotic particle swarm algorithm and a generative adversarial network as described in any one of the present invention.
[0138] According to the third aspect of the present invention, a bearing signal expansion system based on a chaotic particle swarm algorithm and a generative adversarial network includes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements a bearing signal expansion method based on a chaotic particle swarm algorithm and a generative adversarial network as described in any one of the present inventions.
[0139] In one embodiment of the present invention, the present invention proposes a bearing signal expansion method and system based on a chaotic particle swarm algorithm and a generative adversarial network, which operates using the pytorch deep learning framework.
[0140] The discrete wavelet transform described in step S1 uses the Daubechies series wavelet (db6) to recursively decompose and downsample the low-frequency part through the filter to reconstruct a multi-scale representation of the signal. The low-pass filter and high-pass filter are expressed as:
[0141] cA[n]=∑ m h[m]·x[2n-m]
[0142] cD[n]=∑ m g[m]·x[2n-m]
[0143] Where h[m] and g[m] are the coefficients of the low-pass filter and high-pass filter, respectively (see Table 1 for details); cA[n] is the approximate coefficient of the low-frequency part, which represents the main components of the signal; cD[n] is the detail coefficient of the high-frequency part, which represents the noise and detail information of the signal; m represents the index value of the Daubechies series wavelet transform traversing the initial signal; n is the index value of the wavelet decomposition layer.
[0144]
[0145]
[0146] Table 1 Orthogonal Daubechies-6 wavelet coefficients
[0147] In one embodiment of the present invention,
[0148] The scaling function φ(t) and wavelet function ψ(t) of the Daubechies series wavelet (db6) satisfy the following recursive formula:
[0149]
[0150] Among them, L=12, which is the number of coefficients of the db6 wavelet filter.
[0151] The BayesShrink soft threshold is used in discrete wavelet transform, and the soft threshold is determined by the following formula:
[0152]
[0153] Where σ is the standard deviation of the noise, σ x is the standard deviation of the wavelet coefficients cD[n] at a certain scale.
[0154] Assuming that the background noise conforms to Gaussian white noise, σ is estimated using the wavelet coefficients at the finest scale, which is obtained by the following formula:
[0155]
[0156] Before wavelet reconstruction, the detail coefficients are processed using soft thresholding using the following formula:
[0157]
[0158] Among them, λ represents, Indicates D n The first derivative of .
[0159] The specific process of discrete wavelet transform is as follows Figure 2 shown.
[0160] In one embodiment of the present invention, the reshape operation in step S14 converts the 1024-dimensional vector into a [32, 32] array.
[0161] In one embodiment of the present invention, the chaotic particle swarm algorithm described in step S2 is as follows: Figure 3 shown.
[0162] In one embodiment of the present invention, step S21 includes the following contents:
[0163]
[0164] Among them, the parameter μ represents the segmentation threshold, η represents the chaotic perturbation factor that controls nonlinearity,
[0165] in in Indicates taking no more than The largest integer;
[0166] When the parameters μ=0.3 and η=0.4, r is a random number between 0 and 1.
[0167] In one embodiment of the present invention, the deep convolutional generative adversarial network structure described in step S3 is as follows: Figure 4 shown.
[0168] Among them, the initial value z of step S3 is set to add a random perturbation to the feature vector generated by the chaotic particle swarm, and the predicted probability of the generated graph and the true label of the initial discriminator are input into the loss function, and a gradient update is performed; after each k rounds of generator training is completed, the discriminator is trained (that is, k = 5 in this algorithm), and the specific value is adjusted according to the loss values of the generator and discriminator. If the discriminator is too strong, k can take a larger value; the loss function of the discriminator includes the loss of real data and the loss of generated data, and reverse gradient update is also performed on them; in the generative adversarial network, the discriminator and generator are trained alternately until the set number of rounds (epoch) is reached.
[0169] In one embodiment of the present invention, step S31 in step S3 uses an integrated command module in the pytorch code to merge the sigmoid and binary cross entropy loss functions into the objective function of the generator G;
[0170] In one embodiment of the present invention, the model MaSA-ResNet18 in step S4 is a residual network that integrates the Manhattan self-attention mechanism, wherein the basic framework is the ResNet18 architecture; and the activation function is replaced with leaky ReLu so that the model still has weak gradient updates in the negative slope area to avoid neuron death; the deep network is adapted to the input of one-dimensional signal data by adding pseudo dimensions; at the same time, the Manhattan self-attention mechanism is added before the convolution layer layer1, and the specific method is to map the input to different feature spaces (Q, V) through two linear layers, and then use the Manhattan distance to measure the difference between the two, and input the difference value as the weight parameter to the original output; the parameters of the linear layer are trained by the neural network as learnable parameters. The structure of the model MaSA-ResNet18 is Figure 7 Build.
[0171] In one embodiment of the present invention, a university-provided SKF6205 bearing dataset was used as a validation step. This dataset uses accelerometers to collect bearing vibration signals, including impact fault signals and health status signals from the inner race, outer race, and rolling elements. Table 2 shows the bearing dataset and labels. The specific implementation steps of this algorithm are as follows:
[0172] Step 1: If Figure 2As shown in the figure, the preprocessing process of the data set removes high-frequency components from the input one-dimensional signal to achieve denoising. This paper uses the Daubechies-6 wavelet as the basis function. The input signal passes through the first layer of high-pass and low-pass filters to obtain wavelet coefficients (approximate coefficients and detail coefficients). After filtering and downsampling in the first layer, the approximate coefficients and detail coefficients are approximately half the length of the original signal. Next, only the approximate coefficients of the first layer are decomposed to the next layer, and the wavelet coefficients are obtained by filtering in the second layer. This process is repeated until the set number of decomposition layers is reached or no decomposition is possible. After decomposition is completed, the detail coefficients are processed using Bayesian soft thresholding, and the coefficients below the soft threshold are set to 0, completing the denoising process of the high-frequency portion. Finally, the signal is reconstructed using the inverse discrete wavelet transform.
[0173]
[0174] Table 2 Dataset file names and labels
[0175] Step 2: The motor speed is 1797 rpm. According to the formula of Quenest sampling theorem, the denoised data set is sliced with a slice length of 1024 and converted into a (32, 32) tensor.
[0176] Step 3: If Figure 3 As shown. 50 chaotic sequences are generated by SPM mapping as the position parameters of the initial particle swarm, and the initial speed, number of iterations, fitness function, boundary range, group experience weight, individual experience weight and inertia weight are set (the inertia weight represents the random global search ability, the individual experience represents the impact of the individual optimal position on the particle update, and the group experience is the current optimal position). At the beginning of the iteration, all particles calculate the fitness value of their respective positions, and obtain the individual optimal and group optimal positions. Then, the particle swarm position is updated through the speed and position formula, and it is iterated continuously until the set number of iterations is reached. The chaotic particle swarm algorithm is essentially a search-based optimization algorithm. The optimization process is detailed in Figure 4 .
[0177] Step 4: Figure 5As shown in the figure, the training process of a GAN involves alternating optimization of the generator G and the discriminator D. In each training cycle, labels for real samples and generated samples are first created for the discriminator. Then, the generator is updated first. Random perturbations are added to the optimized feature vector and fed into the generator to generate fake samples. Next, the generator's ability to deceive the discriminator is measured by calculating the loss between the generated samples and the real labels, and backpropagation is used to optimize the generator's parameters. Subsequently, training of the discriminator begins, which needs to distinguish between real and generated samples. The loss for real samples is calculated first, followed by the loss for generated samples, and the average of the two is used as the total loss for the discriminator. Finally, backpropagation is used to optimize the discriminator, enabling it to more accurately distinguish between real and fake samples. Throughout the training process, the generator continuously improves its ability to deceive the discriminator, while the discriminator continuously improves its ability to distinguish between real and fake samples, thereby driving the adversarial learning of the GAN network.
[0178] Step 5: Input the generated samples into the evaluation mode of the MaSA-ResNet18 network to determine the accuracy of the generated samples and select the available pseudo samples. Figure 6 As shown, the DCGAN network converged after approximately 600 epochs. Samples generated after 600 epochs were used for validation. The pseudo samples were subjected to the same data preprocessing as the MaSA-ResNet18, and the trained weights (best_weight.pth) were loaded into the model to obtain the classification results of the pseudo samples. Pseudo samples with consistent labels can be used as subsequent vibration data.
[0179] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions and effects do not exceed the scope of the technical solution of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. A bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network, characterized in that: The following steps are involved: Step S1: Dataset creation and import, including using discrete wavelet denoising, selecting the length of signal slices, converting the one-dimensional vibration signal into a two-dimensional grayscale image, determining the data set data type, and loading it into the data loader; Step S2: Optimize the random vector z based on the chaotic particle swarm optimization algorithm, select the solution space dimension, boundary and particle swarm parameters, design the fitness function, and obtain the optimized random vector z* through particle swarm iteration; Step S3: Construct the generator G and discriminator D using a deep convolutional neural network, and add random perturbations to the optimized random vector z* as the input of the generator G; The generator G and the discriminator D are trained alternately until the set number of rounds is reached; The alternating training process of the generator G and the discriminator D includes: for a fixed generator G, using real samples and generated samples to train the discriminator D, and updating the parameters of the discriminator D; for a fixed discriminator D, using the discrimination results of the generated images and the real labels to calculate the loss of the generator, and updating the parameters of the generator G; Step S4: Input the generated graph into the MaSA-ResNet18 model, and start the test mode of the MaSA-ResNet18 model to evaluate the quality of the generated graph.
2. The bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network according to claim 1 is characterized in that: Step S1 includes the following contents: Step S11: using discrete wavelet denoising includes the following: In the discrete wavelet transform, the Daubechies series wavelet transform is used to continuously recursively decompose and downsample the low-frequency part through the filter to reconstruct the multi-scale representation of the signal; the low-pass filter and high-pass filter are expressed as: cA[n]=∑ m x[m]·h[2n-m] cD[n]=∑ m x[m]·g[2n-m] Where h[m] and g[m] are the coefficients of the low-pass filter and high-pass filter, respectively; cA[n] is the approximate coefficient of the low-frequency part, representing the main components of the signal, and cD[n] is the detail coefficient of the high-frequency part, representing the noise and detail information of the signal; m represents the index value of the Daubechies series wavelet transform traversing the initial signal; n is the index value of the wavelet decomposition layer; Step S12: The BayesShrink soft threshold is used in discrete wavelet transform. The soft threshold is determined by the following formula: Where σ is the standard deviation of the noise, σ x is the standard deviation of the multiscale wavelet coefficients.
3. The bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network according to claim 2 is characterized in that: Step S1 also includes the following: Step S13: The length of the selected signal slice includes the following: The signal slice length is determined according to the Quenest sampling theorem. The slice length l s The following relationship is satisfied: Among them, f s is the sensor sampling frequency, n is the rotating machine speed (here, the rolling mill speed), and C is an integer; further, after determining the sampling frequency, a random sliding window is used for slicing; Step S14: Converting the one-dimensional vibration signal into a two-dimensional grayscale image includes the following: The one-dimensional vibration signal is converted into a two-dimensional grayscale image by normalization and reshaping operation; the normalization formula is as follows: where {x max } represents the maximum value of the signal data: {x min } represents the minimum value of the signal data; The reshape operation converts the vector into an array.
4. The bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network according to claim 1 is characterized in that: Step S2 includes the following contents: Step S21: constructing a chaotic order SPM mapping based on the chaotic particle swarm optimization algorithm, the formula is as follows: Among them, the parameter μ represents the segmentation threshold, η represents the chaotic perturbation factor for controlling nonlinearity, and r is a random number between 0 and 1. in Indicates taking no more than The largest integer; Step S22: Select the solution space dimension, boundary, and particle swarm parameters; wherein the solution space includes a 32*32 two-dimensional matrix, wherein the boundary includes the interval [0,1]; wherein the number of chaotic sequence particle swarms is 50-55, and the number of iterations is 100-110. Furthermore, the expression of the weight parameter w(t) is as follows: Where T represents the maximum number of iterations, t represents the current number of iterations, and t takes the value [1, T]. w1 represents the initial inertia weight, and w2 represents the inertia weight when the iteration reaches the maximum number.
5. The bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network according to claim 4 is characterized in that: Step S2 also includes the following: Step S23: adopting a fitness function, wherein the fitness function includes a structural similarity function SSIM; The formula is as follows: Among them, μ x represents the pixel average value of image x; μ y Represents the pixel average of image y; C1 represents the stability constant; C2 represents the stability constant: σ x Represents the variance of image x: σ y Represents the variance of image y: σ xy represents the covariance.
6. The bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network according to claim 1 is characterized in that: Step S3 includes the following contents: Step S31: Construct a generator G using a deep convolutional neural network, where the generator includes an encoder and a decoder. The encoder performs downsampling through two convolutions, and the decoder consists of two layers of deconvolution and one layer of convolution. The discriminator D is constructed using a deep convolutional neural network, where the discriminator consists of three convolutional layers and one linear layer, and its output is the probability of whether the image is real or fake; Step S32: The random vector z is a priori noise variable in the generative adversarial network, and the random vector z conforms to the distribution P z (z); The generator passes through the differentiable mapping function G(z; θ g ) establish the relationship between variable z and source image x, θ g is the weight parameter, and the x generated by the generator satisfies the distribution P g (x); Assume that the source image x satisfies the distribution P data (x), then the task of the generator G is to convert P g (x) approaches P data (x), and the minimization function ln(1-D(G(z))) is obtained; and the discriminator D is mapped by D(x; θ d ) outputs a probability scalar, whose task is to distinguish the probability that the input x is a true sample or a false sample, that is, to minimize the function ln D(G(z)); the result is: Where V(G, D) is the loss function expression.
7. The bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network according to claim 6 is characterized in that: Step S3 also includes the following: Step S33: The generator G and the discriminator D both use the Adam optimizer to accelerate convergence during gradient update. The gradient update of the discriminator D includes the following formula: The gradient update of the generator G includes the following formula: Where N represents the number of training set samples; Step S34: Assuming that the generator G is fixed, the optimal discriminator D is the one that maximizes the loss function V(G, D); integrating the formula, we get the following formula: V(G,D)=∫[P data (x)ln D(x)+P g (x)ln(1-D(x))]dx The extreme position of the above equation is the extreme position of the function inside the integral sign, and the optimal discriminator D is obtained by differentiating it. * (x); Among them, when P g =P data When D * (x) = 0.5; substituting it back into the loss function V(G,D) yields the discriminator loss d_loss = 0.693, and similarly the generator loss g_loss = 0.
693.
8. The bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network according to claim 1 is characterized in that: Step S4 includes the following contents: Step S41: Input the generated graph into the MaSA-ResNet18 model and start the test mode of the MaSA-ResNet18 model to evaluate the quality of the generated graph; The model MaSA-ResNet18 described herein includes a residual network integrated with the Manhattan self-attention mechanism, with the basic framework being the ResNet18 architecture. The activation function leaky ReLu is used to enable the model MaSA-ResNet18 to maintain gradient updates in negative slope areas and avoid neuron death.
9. A bearing signal expansion system based on a chaotic particle swarm algorithm and a generative adversarial network, comprising an electronic device, wherein the electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network as described in any one of claims 1 to 8 is implemented.
10. A bearing signal expansion system based on a chaotic particle swarm algorithm and a generative adversarial network, comprising a computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the bearing signal expansion method based on chaotic particle swarm optimization and generative adversarial network as described in any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Information processing method, device and equipment for fish hemorrhagic disease detection and medium
CN120876481A
Near infrared spectrum rapid detection method for active ingredients of compound fertilizer
CN121740789A