A gear two-dimensional stress distribution prediction method and device based on deep learning
By employing a deep learning-based method for predicting two-dimensional stress distribution in gears, and utilizing conditional generative adversarial networks and a channel-space redistribution module, the problem of high-stress concentration during gear meshing is addressed. This method achieves smaller prediction errors and lower computational resource consumption, thereby improving the accuracy and efficiency of gear stress field prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH BEIJING
- Filing Date
- 2025-11-17
- Publication Date
- 2026-06-19
Smart Images

Figure CN121706534B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of stress field prediction technology, and in particular to a method and apparatus for predicting two-dimensional stress distribution of gears based on deep learning. Background Technology
[0002] Stress analysis is crucial for the design and evaluation of gear transmission systems. Traditionally, the evaluation of gear transmission systems has primarily relied on finite element analysis (FEM). This method, by constructing refined geometric models and defining complex boundary conditions, can simulate the stress evolution during meshing, thereby generating highly accurate stress calculation results. However, high-precision FEM analysis typically requires substantial computational resources and is often time-consuming.
[0003] Existing technologies do not document methods for stress prediction of gears using images. Some studies employ deep learning models for stress prediction of other structures, directly mapping boundary conditions to stress images. However, these deep learning models utilize transposed convolution to perform feature upsampling. Transposed convolution applies the same kernel size to all locations in the dataset, failing to capture local variations. Particularly during gear meshing, high-stress areas are concentrated, making it difficult to adapt to transitions when using the same kernel size for both high and low-stress regions. Furthermore, in practical applications, transposed convolution struggles to avoid checkerboard artifacts. This results in inherent limitations of transposed convolution in stress field prediction tasks, particularly in its insufficient detail reproduction of high-stress areas. Summary of the Invention
[0004] To address the problem of high-stress concentration in the stress field during gear meshing, which existing transposed convolution methods struggle to adapt to, this invention provides a deep learning-based method and apparatus for predicting two-dimensional stress distribution in gears. The technical solution is as follows:
[0005] On the one hand, a deep learning-based method for predicting two-dimensional stress distribution in gears is provided. This method is implemented by a two-dimensional stress distribution prediction device for gears and includes:
[0006] S1. Obtain the relative position and torque of the gear and rack to be predicted for stress distribution, and perform image mapping to obtain the gear-rack meshing image.
[0007] S2. Input the gear-rack meshing image into a deep learning framework based on conditional generative adversarial networks; wherein, the decoder in the generator of the deep learning framework based on conditional generative adversarial networks includes a channel-space reallocation module for feature upsampling operations.
[0008] S3. The channel number of the features of the gear-rack meshing image is compressed by the channel compressor of the channel-space redistribution module to obtain the compressed features.
[0009] S4. Generate a unique dynamic weight for each spatial location of the compressed feature using the spatial weight generator of the channel-space redistribution module.
[0010] S5. The generated dynamic weights are reshaped and normalized using the spatial weight normalizer of the channel-space redistribution module. Then, through feature allocation and pixel rearrangement operations, the features at each spatial location are allocated to the corresponding channels based on the reshaped and normalized dynamic weights. This allows for the conversion from channel features to spatial features at specific spatial locations, and further, the conversion from low-resolution feature maps to high-resolution feature maps, thus restoring the details of the stress field in the gear-rack meshing region. This represents the upsampling scaling factor.
[0011] Optionally, the channel compressor in S3 performs channel number compression on the features of the gear-rack meshing image through the channel-space reallocation module to obtain compressed features, including:
[0012] The channel compressor of the channel-space redistribution module uses a 1×1 convolutional layer to compress the number of channels of the features of the gear-rack meshing image, and then processes them through an instance normalization layer and a linear unit layer with correction to obtain the features with compressed channel number. The channel compressor is used to reduce the parameter scale and computational load, and enhance the nonlinear expressive capability of the channel-space redistribution module.
[0013] Optionally, the spatial weight generator in S4, via the channel-spatial reallocation module, generates specific dynamic weights for each spatial location of the compressed feature, including:
[0014] The spatial weight generator of the channel-spatial reallocation module generates channel-specific weights for each spatial location of the compressed features. One dynamic weight; among which... Indicates the upsampling scaling factor, the A dynamic weight is used to assign the compressed features to the upsampled features. In each spatial location.
[0015] Optionally, the spatial weight generator includes a first two-dimensional convolutional layer, a batch normalization layer, a modified linear unit layer, and a second two-dimensional convolutional layer.
[0016] The first two-dimensional convolutional layer uses a 3×3 convolutional kernel to capture local spatial information around each pixel while keeping the number of channels unchanged after compression.
[0017] The second two-dimensional convolutional layer uses a 1×1 convolutional kernel to increase the number of channels. times.
[0018] Optionally, the spatial weight normalizer in S5, through the channel-space reallocation module, performs dimensionality reshaping and normalization on the generated dynamic weights, including:
[0019] The spatial weight normalizer of the channel-space reallocation module reshapes the dimensions of the generated dynamic weights to... and along The dimensions are normalized; among them, Indicates batch size, This indicates the number of channels after compression. This represents the upsampling scaling factor. Represents the spatial height of the feature map. The spatial width of the feature map is represented by the spatial weight normalizer, which is used to ensure that the total amount of features in each channel is conserved, thereby avoiding feature dilution.
[0020] On the other hand, a deep learning-based gear two-dimensional stress distribution prediction device is provided. This device is applied to a deep learning-based gear two-dimensional stress distribution prediction method, and the device includes:
[0021] The image acquisition module is used to acquire the relative position and torque of the gear and rack to be subjected to stress distribution prediction, and to perform image mapping to obtain a gear-rack meshing image.
[0022] The input module is used to input the gear-rack meshing image into the conditional generative adversarial network-based deep learning framework; wherein, the decoder in the generator of the conditional generative adversarial network-based deep learning framework includes a channel-space reallocation module for feature upsampling operations.
[0023] The channel compression module is used to compress the number of channels of the features in the gear-rack meshing image through the channel compressor of the channel-space redistribution module, so as to obtain the compressed features.
[0024] The spatial weight generation module is used to generate unique dynamic weights for each spatial location of the compressed features through the spatial weight generator of the channel-spatial redistribution module.
[0025] The spatial weight normalization module is used to reshape and normalize the generated dynamic weights through the spatial weight normalizer of the channel-spatial redistribution module, and then distribute the features of each spatial location according to the reshaped and normalized dynamic weights through feature allocation and pixel rearrangement operations. This allows for the conversion from channel features to spatial features at specific spatial locations, and further, the conversion from low-resolution feature maps to high-resolution feature maps, thus restoring the details of the stress field in the gear-rack meshing region. This represents the upsampling scaling factor.
[0026] Optionally, the channel compression module is further used for:
[0027] The channel compressor of the channel-space redistribution module uses a 1×1 convolutional layer to compress the number of channels of the features of the gear-rack meshing image, and then processes them through an instance normalization layer and a linear unit layer with correction to obtain the features with compressed channel number. The channel compressor is used to reduce the parameter scale and computational load, and enhance the nonlinear expressive capability of the channel-space redistribution module.
[0028] Optionally, the space mapping module is further used for:
[0029] The spatial weight generator of the channel-spatial reallocation module generates channel-specific weights for each spatial location of the compressed features. One dynamic weight; among which... This represents the upsampling scaling factor. A dynamic weight is used to assign the compressed features to the upsampled features. In each spatial location.
[0030] Optionally, the spatial weight generator includes a first two-dimensional convolutional layer, a batch normalization layer, a modified linear unit layer, and a second two-dimensional convolutional layer.
[0031] The first two-dimensional convolutional layer uses a 3×3 convolutional kernel to capture local spatial information around each pixel while keeping the number of channels unchanged after compression.
[0032] The second two-dimensional convolutional layer uses a 1×1 convolutional kernel to increase the number of channels. times.
[0033] Optionally, the spatial weight normalization module is further used for:
[0034] The spatial weight normalizer of the channel-space reallocation module reshapes the dimensions of the generated dynamic weights to... and along The dimensions are normalized; among them, Indicates batch size, This indicates the number of channels after compression. This represents the upsampling scaling factor. Represents the spatial height of the feature map. The spatial width of the feature map is represented by the spatial weight normalizer, which is used to ensure that the total amount of features in each channel is conserved, thereby avoiding feature dilution.
[0035] On the other hand, a gear two-dimensional stress distribution prediction device is provided, the gear two-dimensional stress distribution prediction device comprising: a processor; a memory, the memory storing computer-readable instructions, which, when executed by the processor, implement any of the methods described above for gear two-dimensional stress distribution prediction based on deep learning.
[0036] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement any of the above-described deep learning-based methods for predicting two-dimensional stress distribution of gears.
[0037] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0038] In this invention, the prediction error of the high-stress region of the gear stress field is smaller: the prediction error of the high-stress region is reduced from 1.54% of the transposed convolution to 1.37%.
[0039] Compared to transposed convolution, the number of parameters and floating-point operations is smaller: the number of parameters in the entire conditional generative adversarial network model is reduced from 24,024,253 for transposed convolution to 23,766,653, and the number of floating-point operations is reduced from 77.46G for transposed convolution to 65.97G.
[0040] Compared to deep learning models that use transposed convolutions, it has a more stable training process and a more ideal loss descent curve. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart of a deep learning-based method for predicting two-dimensional stress distribution in gears, provided by an embodiment of the present invention.
[0043] Figure 2 This is the input image provided in the embodiments of the present invention;
[0044] Figure 3 This is a schematic diagram of the structure of the conditional generative adversarial network generator provided in an embodiment of the present invention;
[0045] Figure 4 This is the output image provided in the embodiments of the present invention;
[0046] Figure 5 This is a schematic diagram of the channel-space reallocation module provided in an embodiment of the present invention;
[0047] Figure 6 This is a schematic diagram of the transposed convolution structure provided in an embodiment of the present invention;
[0048] Figure 7 This is a schematic diagram of the improved high-efficiency sub-pixel convolutional neural network structure provided in the embodiments of the present invention;
[0049] Figure 8 This is a box plot analysis of the mean absolute error of stress prediction using different upsampling methods provided in this embodiment of the invention;
[0050] Figure 9 This is a box plot analysis of the mean square error of stress prediction using different upsampling methods provided in this embodiment of the invention;
[0051] Figure 10 This is a box plot analysis of the Top-k average peak absolute error of stress prediction using different upsampling methods, provided in an embodiment of the present invention.
[0052] Figure 11 This is a box plot analysis of the absolute percentage error of the Top-k average peak value in stress prediction using different upsampling methods, provided in an embodiment of the present invention.
[0053] Figure 12 These are the stress map prediction results under different upsampling methods provided in the embodiments of the present invention;
[0054] Figure 13 This is a block diagram of a gear two-dimensional stress distribution prediction device based on deep learning provided in an embodiment of the present invention;
[0055] Figure 14 This is a schematic diagram of the structure of a gear two-dimensional stress distribution prediction device provided in an embodiment of the present invention. Detailed Implementation
[0056] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0057] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0058] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0059] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0060] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0061] This invention provides a deep learning-based method for predicting the two-dimensional stress distribution of gears. This method can be implemented using a gear two-dimensional stress distribution prediction device, which can be a terminal or a server. Figure 1 The flowchart shown is for a deep learning-based method for predicting two-dimensional stress distribution in gears. The processing flow of this method may include the following steps:
[0062] S1. Obtain the relative position and torque of the gear and rack to be predicted for stress distribution, and perform image mapping to obtain the gear-rack meshing image.
[0063] In one feasible implementation, the input image of the present invention needs to include torque features and relative position features of gears and racks. The position features can be directly observed, and the torque features are achieved by modifying the color value of the gear area.
[0064] S2. Input the gear-rack meshing image into a deep learning framework based on conditional generative adversarial networks; wherein, the decoder in the generator of the deep learning framework based on conditional generative adversarial networks includes a channel-space reallocation module for feature upsampling operations.
[0065] In one possible implementation, the present invention inputs an image (such as...) Figure 2 As shown), including the position and boundary conditions of gear meshing, and the generator of the cGAN (Conditional Generative Adversarial Networks) model (such as...). Figure 3 Output an image (as shown) Figure 4 As shown in the figure, this is the stress field distribution of the input image, with specific information distributed in different RGB channels of the image.
[0066] Furthermore, this invention proposes a novel upsampling operator for the upsampling stage of a cGAN generator, which has three upsampling stages, such as... Figure 5 As shown, this is called the Channel-Spatial Reassignment Module (CSRM). This operator consists of three sub-modules: a channel compressor, a spatial weight generator, and a spatial weight normalizer. Its core objective is to achieve accurate adaptive reassignment of features from the channel domain to the spatial domain through dynamic weight modeling. This design expands the spatial size of features (by a scaling factor). While controlling the data, the number of feature channels is reduced accordingly, thereby alleviating the texture blurring problem that easily occurs during upsampling.
[0067] S3. The channel number of the features of the gear-rack meshing image is compressed by the channel compressor of the channel-space redistribution module to obtain the compressed features.
[0068] Specifically, the channel compressor of the channel-space redistribution module uses a 1×1 convolutional layer to compress the number of channels in the feature map of gear-rack meshing, and then processes it through an instance normalization layer and a LeakyReLU layer to obtain the features with compressed channel numbers. The channel compressor is used to reduce the parameter scale and computational load, and enhance the nonlinear expressive power of the channel-space redistribution module.
[0069] In one feasible implementation, the channel compressor uses a 1×1 convolutional layer to reduce the number of channels of the input features from... Compress to Reducing the number of channels in the input feature map helps to reduce the parameter size and computational load of subsequent steps. Then, the use of instance normalization layers and LeakyReLU layers stabilizes the training process and enhances the model's non-linear expressive power.
[0070] S4. Generate a unique dynamic weight for each spatial location of the compressed feature using the spatial weight generator of the channel-space redistribution module.
[0071] Optionally, the spatial weight generator in S4, via the channel-spatial reallocation module, generates specific dynamic weights for each spatial location of the compressed feature, including:
[0072] The spatial weight generator of the channel-spatial reallocation module generates channel-specific weights for each spatial location of the compressed features. One dynamic weight; among which... Indicates the upsampling scaling factor, the A dynamic weight is used to assign the compressed features to the upsampled features. In each spatial location.
[0073] Optionally, the spatial mapper includes a first two-dimensional convolutional layer, a batch normalization layer, a LeakyReLU layer, and a second two-dimensional convolutional layer.
[0074] The first two-dimensional convolutional layer uses a 3×3 convolutional kernel to capture local spatial information around each pixel while keeping the number of channels unchanged after compression.
[0075] The second two-dimensional convolutional layer uses a 1×1 convolutional kernel to increase the number of channels. times.
[0076] In one feasible implementation, a spatial weight generator generates channel-specific dynamic weights for each spatial location of the input features. Each spatial location corresponds to... weights (of which) (representing the upsampling scaling factor), these weights are used to assign features to the upsampled scaled area. In each spatial location. This submodule adopts a "convolution-batch normalization (BNORM)-LeakyReLU-convolution" structure, with the two convolutional layers configured as follows: First convolution: using a 3×3 convolution kernel to capture local spatial information around each pixel while maintaining the number of compressed channels unchanged; Second convolution: using a 1×1 convolution kernel to increase the number of channels. This layer generates adaptive weights for each spatial location, ensuring they match the dimensions of subsequent calculations.
[0077] Both CARAFE (Content-Aware ReAssembly of Features) and DLU (Dynamic Lightweight Upsampling) upsampling methods map each position in the output feature map back to the input feature map and extract the position centered on that position. The region is multiplied by the upsampled kernel of the predicted point to obtain the output value, where... This is the upsampling scaling factor. The difference between the two lies in the different upsampling kernel prediction methods of CARAFE and DLU. The disadvantage of CARAFE and DLU is that different channels at the same location share the same upsampling kernel, and the upsampling operation is performed while keeping the number of channels constant. This leads to poor performance in the field of image-based stress field prediction, as shown in Table 1.
[0078] Table 1 shows the errors in stress prediction using the CAREFE and DLU upsampling methods.
[0079]
[0080] Compared with the channel-space reallocation module of the present invention, although it has a reduced number of parameters, its complex design architecture makes the amount of floating-point operations required for a single inference significantly higher than that of the present invention.
[0081] The spatial weight generator of the channel-spatial reallocation module in this invention directly generates weights for each position of the compressed input features. The feature is assigned a weight by multiplying the feature element-wise with the weight. Then, through pixel recombination, the channel dimension information is recombined into the spatial dimension, completing the feature upsampling operation. Based on this, the present invention can better adapt to situations with large gear stress field gradients.
[0082] S5. The generated dynamic weights are reshaped and normalized using the spatial weight normalizer of the channel-space redistribution module. Then, through feature allocation and pixel rearrangement operations, the features at each spatial location are allocated to the corresponding channels based on the reshaped and normalized dynamic weights. This allows for the conversion from channel features to spatial features at specific spatial locations, and further, the conversion from low-resolution feature maps to high-resolution feature maps, thus restoring the details of the stress field in the gear-rack meshing region. This represents the upsampling scaling factor.
[0083] Optionally, the spatial weight normalizer in S5, through the channel-space reallocation module, performs dimensionality reshaping and normalization on the generated dynamic weights, including:
[0084] The spatial weight normalizer of the channel-space reallocation module reshapes the dimensions of the generated dynamic weights to... and along The dimensions are normalized; among them, Indicates batch size, This indicates the number of channels after compression. This represents the upsampling scaling factor. Represents the spatial height of the feature map. The spatial width of the feature map is represented by the spatial weight normalizer, which is used to ensure that the total amount of features in each channel is conserved, thereby avoiding feature dilution.
[0085] In one feasible implementation, the Spatial Weight Normalizer reshapes the weight dimensions as follows: and along The dimension (dim=2) is normalized. This operation ensures that the total number of features in each channel is conserved (i.e., allocated to...). The sum of the weights at each position is 1, thus avoiding the feature dilution problem.
[0086] In one feasible implementation, feature allocation and pixel rearrangement operations are used to distribute the features of each channel according to their weights. A spatial location is used to achieve the transformation from channel features to spatial features, where, This represents the upsampling scaling factor.
[0087] This invention employs a serial structure of "channel compression module - spatial weight generation module - spatial weight normalization module," and through a progressive processing of "channel dimensionality reduction → dynamic weight generation → feature conservation allocation," specifically: the spatial weight generation module uses "3×3 convolution (local spatial information capture) + 1×1 convolution (… The double convolutional structure (with double channel expansion) generates a unique value for each spatial location. The system uses dynamic weights to achieve "pixel-level adaptive allocation." This avoids the problem of fixed kernel size in transposed convolution and achieves "precise transfer of channel domain features to the spatial domain," solving the pain points of "texture blurring" and "feature dilution" in traditional upsampling.
[0088] In response to the characteristics of gear stress fields, such as "large stress gradient and sensitivity to details in key parts of the meshing area", this invention uses CSRM to achieve dynamic weight generation and adaptive feature allocation, so that the upsampled stress field still maintains clear texture in high gradient regions (better than transposed convolution).
[0089] This invention achieves a balance between computational efficiency and prediction accuracy.
[0090] To evaluate the performance of CSRM, this invention integrates different upsampling operations into the cGAN framework and compares the performance of transposed convolution, the improved ESPCN (Efficient Sub-Pixel Convolutional Neural Network), and the proposed CSRM. Specifically, the transposed convolution is implemented using PyTorch's ConvTranspose2d, and its structure is as follows: Figure 6 As shown; for ESPCN, this invention improves upon it by inserting an instance normalization layer between the convolutional layer and the Tanh activation layer to stabilize the training gradient. The improved structure is as follows. Figure 7 As shown.
[0091] Table 2 shows the number of trainable parameters and the number of floating-point operations per inference for the three models. The cGAN generator model integrating the CSRM upsampling algorithm has the fewest number of parameters and the fewest floating-point operations. This result is mainly due to the following design: the application of a channel compressor, the use of 1×1 convolutional blocks, and the moderate architectural complexity of CSRM itself.
[0092] Table 2 Comparison of trainable parameters among models
[0093]
[0094] The training data for the model comes from finite element analysis; therefore, the evaluation of the model's stress field prediction results can directly reflect its applicability and reliability in the specific task of gear stress field prediction. In the stress field evaluation stage, this invention constructs a multi-dimensional quantitative index system covering MAE (Mean Absolute Deviation), MSE (Mean Squared Error), RMSE (Root Mean Squared Error), MAPE (Mean Absolute Percentage Error), Top-k MPAE (Top-k Mean Peak Absolute Error), and Top-k MPAPE (Top-k Mean Peak Absolute Percentage Error). RMSE and MAPE performed poorly and therefore their specific values are not given in Table 3. These indicators quantify the deviation between the model's predicted stress field and the actual stress field from different dimensions. To ensure the fairness of the comparative analysis, all three models were trained and tested using the exact same dataset and training parameters.
[0095] Table 3 Comparison of stress prediction errors using different upsampling methods
[0096]
[0097] The evaluation results of the three upsampling algorithms in Table 3 clearly show that the CSRM algorithm exhibits a significant performance advantage: CSRM maintains a leading position in all four core evaluation metrics—MAE, MSE, Top-k MPAE, and Top-k MPAPE—with varying degrees of advantage. Notably, its Top-k MPAE and Top-k MPAPE values reach 1.044844 MPa and 1.365279%, respectively. This result confirms that compared to the transposed convolution and efficient sub-pixel convolutional neural network upsampling algorithms, CSRM achieves more accurate prediction results in high-stress regions—a characteristic that is crucial for gear stress assessment.
[0098] Although the CSRM algorithm demonstrates leading performance on most average metrics, it is still necessary to analyze the distribution characteristics of its evaluation metrics on the test set. This step helps verify the consistency of its performance on individual samples, rather than simply relying on aggregated averages. To this end, this invention analyzes the prediction results of 116 randomly selected validation samples and visualizes the metric distribution using box plots (results are shown below). Figures 8-11 As shown in the figure, the distribution trends of each evaluation indicator are consistent with the trend of the average value; this consistency further confirms that CSRM has a real effect in reducing prediction errors and improving the overall prediction accuracy of the model.
[0099] To more intuitively verify the accuracy of the conditional generative adversarial network model and compare the performance of the three upsampling methods, this invention performs a visualization analysis of three types of maps: (1) the real von Mises stress map generated by finite element simulation; (2) the predicted stress maps of the three models; and (3) a schematic diagram of the absolute stress error. For ease of comparison, this invention uses the maximum absolute stress error among the three models as the normalization benchmark to generate an error stress contour map. All visualization results are as follows: Figure 12 As shown.
[0100] To meet the demand for fast and accurate stress prediction, this invention proposes a deep learning framework based on conditional generative adversarial networks (GANs) and introduces a novel upsampling method called Channel-Spatial Reassignment Module (CSRM). This framework can efficiently extract stress distribution information directly from gear-rack meshing images. To verify the performance advantages of the proposed CSRM upsampling method, comparative experiments were designed for the upsampling stage of the generator decoder. Specifically, the stress prediction performance of CSRM was compared with two mainstream upsampling methods—transposed convolution and an improved efficient sub-pixel convolutional neural network. Experimental results show that the CSRM upsampling method has the best performance: in the gear stress field prediction task, CSRM achieves leading performance in all four evaluation metrics, verifying its superior prediction accuracy and stability. Furthermore, among the three upsampling methods, CSRM has the fewest parameters and the lowest number of floating-point operations.
[0101] In this embodiment of the invention, the prediction error of the high-stress region of the gear stress field is smaller: the prediction error of the high-stress region is reduced from 1.54% of the transposed convolution to 1.37%.
[0102] Compared to transposed convolution, it has fewer parameters and fewer floating-point operations: the number of parameters in the entire cGAN network is reduced from 24,024,253 for transposed convolution to 23,766,653, and the number of floating-point operations is reduced from 77.46G for transposed convolution to 65.97G.
[0103] Compared to deep learning models that use transposed convolutions, it has a more stable training process and a more ideal loss descent curve.
[0104] Figure 13 This is a block diagram illustrating a deep learning-based gear two-dimensional stress distribution prediction device according to an exemplary embodiment. The device is used in a deep learning-based gear two-dimensional stress distribution prediction method. (Refer to...) Figure 13 The device includes an image acquisition module 310, an input module 320, a channel compression module 330, a spatial weight generation module 340, and a spatial weight normalization module 350. Wherein:
[0105] The image acquisition module 310 is used to acquire the relative position and torque of the gear-rack to be stress distribution predicted, and to perform image mapping to obtain a gear-rack meshing image.
[0106] The input module 320 is used to input the gear-rack meshing image into a deep learning framework based on conditional generative adversarial networks; wherein the decoder in the generator of the deep learning framework based on conditional generative adversarial networks includes a channel-space reallocation module for feature upsampling operations.
[0107] The channel compression module 330 is used to compress the number of channels of the features of the gear-rack meshing image through the channel compressor of the channel-space redistribution module to obtain the compressed features.
[0108] The spatial weight generation module 340 is used to generate a unique dynamic weight for each spatial location of the compressed feature through the spatial weight generator of the channel-space redistribution module.
[0109] The spatial weight normalization module 350 is used to reshape and normalize the generated dynamic weights through the spatial weight normalizer of the channel-spatial redistribution module, and then distribute the features of each spatial location according to the reshaped and normalized dynamic weights through feature allocation and pixel rearrangement operations. This allows for the conversion from channel features to spatial features at specific spatial locations, and further, the conversion from low-resolution feature maps to high-resolution feature maps, thus restoring the details of the stress field in the gear-rack meshing region. This represents the upsampling scaling factor.
[0110] In this embodiment of the invention, the prediction error of the high-stress region of the gear stress field is smaller: the prediction error of the high-stress region is reduced from 1.54% of the transposed convolution to 1.37%.
[0111] Compared to transposed convolution, the number of parameters and floating-point operations is smaller: the number of parameters in the entire conditional generative adversarial network model is reduced from 24,024,253 for transposed convolution to 23,766,653, and the number of floating-point operations is reduced from 77.46G for transposed convolution to 65.97G.
[0112] Compared to deep learning models that use transposed convolutions, it has a more stable training process and a more ideal loss descent curve.
[0113] Figure 14 This is a schematic diagram of the structure of a two-dimensional stress distribution prediction device for gears provided in an embodiment of the present invention, as shown below. Figure 14 As shown, the gear two-dimensional stress distribution prediction device may include the above-mentioned Figure 13 The illustrated device is a deep learning-based gear two-dimensional stress distribution prediction device. Optionally, the gear two-dimensional stress distribution prediction device 410 may include a first processor 2001.
[0114] Optionally, the gear two-dimensional stress distribution prediction device 410 may also include a memory 2002 and a transceiver 2003.
[0115] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.
[0116] The following is combined Figure 14 A detailed description of each component of the gear two-dimensional stress distribution prediction device 410 is provided below:
[0117] The first processor 2001 is the control center of the gear two-dimensional stress distribution prediction device 410. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0118] Optionally, the first processor 2001 can perform various functions of the gear two-dimensional stress distribution prediction device 410 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.
[0119] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 14 CPU0 and CPU1 are shown in the diagram.
[0120] In a specific implementation, as one example, the gear two-dimensional stress distribution prediction device 410 may also include multiple processors, for example... Figure 14 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0121] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0122] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently, and may be connected via the interface circuit of the gear two-dimensional stress distribution prediction device 410. Figure 14 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0123] The transceiver 2003 is used to communicate with network devices or with terminal devices.
[0124] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 14 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0125] Optionally, the transceiver 2003 can be integrated with the first processor 2001, or it can exist independently, and its interface circuit can be used with the gear two-dimensional stress distribution prediction device 410. Figure 14 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0126] It should be noted that, Figure 14 The structure of the gear two-dimensional stress distribution prediction device 410 shown does not constitute a limitation on the router. Actual knowledge structure identification devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0127] Furthermore, the technical effect of the gear two-dimensional stress distribution prediction device 410 can be referred to the technical effect of the gear two-dimensional stress distribution prediction method based on deep learning described in the above method embodiments, and will not be repeated here.
[0128] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0129] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0130] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0131] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0132] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0133] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0134] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0135] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0136] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0137] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0138] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0139] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting two-dimensional stress distribution in gears based on deep learning, characterized in that, The method includes: S1. Obtain the relative position and torque of the gear-rack to be stress distribution predicted, and perform image mapping to obtain the gear-rack meshing image; S2. Input the gear-rack meshing image into a deep learning framework based on conditional generative adversarial networks; wherein, the decoder in the generator of the deep learning framework based on conditional generative adversarial networks includes a channel-space reallocation module for feature upsampling operations. S3. The channel number of the features of the gear-rack meshing image is compressed by the channel compressor of the channel-space redistribution module to obtain the compressed features; S4. Generate a unique dynamic weight for each spatial location of the compressed feature using the spatial weight generator of the channel-space reallocation module. S5. The generated dynamic weights are reshaped and normalized using the spatial weight normalizer of the channel-space redistribution module. Then, through feature allocation and pixel rearrangement operations, the features at each spatial location are allocated to the corresponding channels based on the reshaped and normalized dynamic weights. This allows for the conversion from channel features to spatial features at specific spatial locations, and further, the conversion from low-resolution feature maps to high-resolution feature maps, thus restoring the details of the stress field in the gear-rack meshing region. This represents the upsampling scaling factor. 2.The deep learning-based gear two-dimensional stress distribution prediction method of claim 1, wherein, In step S3, the channel compressor of the channel-space reallocation module compresses the features of the gear-rack meshing image to obtain compressed features, including: The channel compressor of the channel-space redistribution module uses a 1×1 convolutional layer to compress the number of channels of the features of the gear-rack meshing image, and then processes them through an instance normalization layer and a linear unit layer with correction to obtain the features with compressed channel number. The channel compressor is used to reduce the parameter scale and computational load, and enhance the nonlinear expressive capability of the channel-space redistribution module. 3.The deep learning-based gear two-dimensional stress distribution prediction method of claim 1, wherein, The spatial weight generator in S4, through the channel-spatial reallocation module, generates a unique dynamic weight for each spatial location of the compressed feature, including: The spatial weight generator of the channel-spatial reallocation module generates channel-specific weights for each spatial location of the compressed features. One dynamic weight; among which... Indicates the upsampling scaling factor, the A dynamic weight is used to assign the compressed features to the upsampled features. In each spatial location. 4.The deep learning-based gear two-dimensional stress distribution prediction method of claim 3, wherein, The spatial weight generator includes a first two-dimensional convolutional layer, a batch normalization layer, a linear unit layer with correction, and a second two-dimensional convolutional layer. The first two-dimensional convolutional layer uses a 3×3 convolutional kernel to capture local spatial information around each pixel while keeping the number of channels unchanged after compression. The second two-dimensional convolutional layer uses a 1×1 convolutional kernel to increase the number of channels. times.
5. The deep learning-based method for predicting two-dimensional stress distribution in gears according to claim 1, characterized in that, The S5 step involves using a spatial weight normalizer in the channel-space redistribution module to reshape and normalize the generated dynamic weights, including: The spatial weight normalizer of the channel-space reallocation module reshapes the dimensions of the generated dynamic weights to... and along The dimensions are normalized; among them, Indicates batch size, This indicates the number of channels after compression. This represents the upsampling scaling factor. Represents the spatial height of the feature map. The spatial width of the feature map is represented by the spatial weight normalizer, which is used to ensure that the total amount of features in each channel is conserved, thereby avoiding feature dilution.
6. A deep learning-based gear two-dimensional stress distribution prediction device, wherein the deep learning-based gear two-dimensional stress distribution prediction device is used to implement the deep learning-based gear two-dimensional stress distribution prediction method as described in any one of claims 1-5, characterized in that, The device includes: The image acquisition module is used to acquire the relative position and torque of the gear and rack to be subjected to stress distribution prediction, and to perform image mapping to obtain a gear-rack meshing image; An input module is used to input a gear-rack meshing image into a deep learning framework based on a conditional generative adversarial network; wherein, the decoder in the generator of the deep learning framework based on the conditional generative adversarial network includes a channel-space reallocation module for feature upsampling operations. The channel compression module is used to compress the number of channels of the features of the gear-rack meshing image through the channel compressor of the channel-space redistribution module, so as to obtain the compressed features. The spatial weight generation module is used to generate unique dynamic weights for each spatial location of the compressed features through the spatial weight generator of the channel-spatial redistribution module. The spatial weight normalization module is used to reshape and normalize the generated dynamic weights through the spatial weight normalizer of the channel-spatial redistribution module, and then distribute the features of each spatial location according to the reshaped and normalized dynamic weights through feature allocation and pixel rearrangement operations. This allows for the conversion from channel features to spatial features at specific spatial locations, and further, the conversion from low-resolution feature maps to high-resolution feature maps, thus restoring the details of the stress field in the gear-rack meshing region. This represents the upsampling scaling factor.
7. The deep learning-based gear two-dimensional stress distribution prediction apparatus of claim 6, wherein, The spatial weight generator of the channel-spatial reallocation module generates a unique dynamic weight for each spatial location of the compressed feature, including: The spatial weight generator of the channel-spatial reallocation module generates channel-specific weights for each spatial location of the compressed features. One dynamic weight; among which... Indicates the upsampling scaling factor, the A dynamic weight is used to assign the compressed features to the upsampled features. In each spatial location.
8. The gear two-dimensional stress distribution prediction device based on deep learning according to claim 7, characterized in that, The spatial weight generator includes a first two-dimensional convolutional layer, a batch normalization layer, a linear unit layer with correction, and a second two-dimensional convolutional layer. The first two-dimensional convolutional layer uses a 3×3 convolutional kernel to capture local spatial information around each pixel while keeping the number of channels unchanged after compression. The second two-dimensional convolution layer adopts a 1x1 convolution kernel to expand the number of channels by 8 times. times.
9. A gear two-dimensional stress distribution prediction device characterized by comprising: The gear two-dimensional stress distribution prediction device includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 5.
10. A computer readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1 to 5.