BP neural network mechanical model of COA-based magneto-rheological damper and application method thereof
By improving the crayfish algorithm and the spider bee optimization algorithm to optimize the weights and thresholds of the BP neural network, and combining the regularized enhanced fitness function and vectorized boundary constraints, a BP neural network mechanical model of the magnetorheological damper is constructed. This solves the problems of slow convergence speed and insufficient generalization ability in the existing technology for damping force prediction, and realizes high-precision and stable damping force prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-10
- Publication Date
- 2026-05-01
AI Technical Summary
Existing BP neural networks suffer from slow convergence speed, susceptibility to local minima, sensitivity to initial weights and thresholds, and insufficient generalization ability in predicting damping forces in magnetorheological dampers. They are unable to meet the engineering requirements for high-precision damping force prediction, especially under complex conditions such as wideband excitation and variable current input.
A dynamic elite-guided strategy combining the improved crayfish algorithm and the spider-bee optimization algorithm is adopted to optimize the weights and thresholds of the BP neural network. Combined with the regularized enhanced fitness function and vectorized boundary constraints, a BP neural network mechanical model of the magnetorheological vibration damper is constructed. The hysteresis characteristics are captured by 7-dimensional time-series input, and an intelligent early stopping mechanism is introduced to improve the convergence stability and adaptability of the model.
The accuracy and convergence stability of damping force prediction have been significantly optimized, the adaptability of the model under complex working conditions has been improved, and the high-performance control requirements of magnetorheological suspension systems have been met.
Smart Images

Figure CN121683557B_ABST
Abstract
Description
A BP neural network mechanical model and application method for magnetorheological vibration dampers based on COA Technical Field
[0001] This application relates to the field of mechanical modeling technology for rheological dampers, and in particular to a BP neural network mechanical model and application method for magnetorheological dampers based on COA. Background Technology
[0002] Magnetorheological suspension systems, with their advantages of rapid response, high controllable damping force, and low energy consumption, have become a research hotspot and core development direction in the field of automotive suspension technology. Their dynamic performance directly depends on the core component—the magnetorheological damper. The mechanical characteristics of the magnetorheological damper are crucial to suspension performance. The working mechanism of the magnetorheological damper involves the nonlinear rheological effects of the magnetorheological fluid and the hysteretic dissipation behavior of the mechanical structure, exhibiting complex characteristics such as strong time-varying nonlinearity, multi-physics coupling, and wideband response dependence. Therefore, constructing a high-precision mechanical model that can accurately capture these characteristics is a key prerequisite for achieving high-performance control of the magnetorheological suspension system.
[0003] Existing mechanical modeling methods for magnetorheological dampers mainly fall into two major technical paths: parametric and non-parametric.
[0004] Parametric models (such as the Bingham model and the Bouc-Wen model) construct mathematical expressions based on physical constitutive relations and describe the dynamic behavior of vibration dampers through explicit physical parameters. However, the modeling accuracy of such models needs to comprehensively consider the accuracy of parameters, the reliability of experimental data, and the complexity of the model structure. Non-parametric models (such as neural networks and fuzzy logic models) directly fit the input-output mapping relationship using a data-driven approach, without relying on complex physical mechanism derivations. They exhibit unique advantages in dealing with strongly nonlinear and time-varying systems, effectively breaking through the mathematical representation bottleneck of traditional physical modeling and possessing stronger adaptability to operating conditions and modeling flexibility.
[0005] In existing research on neural network mechanical models of magnetorheological dampers, backpropagation (BP) neural networks have become one of the mainstream techniques for mechanical modeling of magnetorheological dampers due to their excellent nonlinear approximation ability, structural adaptive characteristics, and ability to represent complex hysteresis relationships. However, the original BP neural network still has significant technical shortcomings in practical applications:
[0006] First, the convergence speed of the gradient descent method for parameter updates is slow, which makes it difficult to meet the efficiency requirements of real-time control scenarios.
[0007] Secondly, the network training process is prone to getting trapped in local minima, leading to unstable prediction accuracy;
[0008] Third, it is highly sensitive to initial weights and thresholds, and the model has insufficient generalization ability;
[0009] These shortcomings severely limit the effectiveness of BP neural networks in predicting damping forces of magnetorheological dampers when applied directly, especially under complex conditions such as wideband excitation and variable current input.
[0010] To address the inherent limitations of the original BP neural network, the academic community has proposed using intelligent optimization algorithms to optimize its initial weights and thresholds. Typical solutions include genetic algorithms and evolutionary algorithms. These algorithms alleviate the sensitivity of BP neural networks to initial parameters and the problem of local optima traps through global search mechanisms, and improve the convergence performance and generalization ability of the model to a certain extent. However, they still have obvious technical limitations: the complex algorithm structure leads to high computational overhead, the parameter tuning process is cumbersome, and it is difficult to adapt to the stringent requirements of real-time performance and dynamic adaptability for predicting the damping force of magnetorheological dampers, thus failing to fully meet the actual needs of engineering application scenarios.
[0011] In summary, the existing BP neural network-based mechanical modeling models for magnetorheological vibration dampers are still difficult to adapt well to the engineering application scenarios of magnetorheological vibration dampers. Summary of the Invention
[0012] This application provides a BP neural network mechanical model and application method for magnetorheological dampers based on COA. The improved crayfish algorithm, which incorporates a dynamic elite guidance strategy and the elite mating stage of the spider-bee optimization algorithm, is used to optimize the BP neural network, which greatly improves the predictive performance of the BP neural network mechanical model of the magnetorheological damper.
[0013] In a first aspect, embodiments of this application provide a method for constructing a BP neural network mechanical model of a magnetorheological damper based on COA, comprising the following steps:
[0014] Multiple sets of 7-dimensional time-series characteristic data of magnetorheological vibration dampers obtained from experiments under different frequency conditions were used as training data.
[0015] A basic mechanical model is constructed based on a BP neural network and training data. An improved crayfish algorithm and training data are used to iteratively update the weights and thresholds of the basic mechanical model until the update conditions are met, thus obtaining the BP neural network mechanical model of the magnetorheological damper.
[0016] The algorithm includes setting parameters for improving the crayfish population and initializing the crayfish population. During each iteration, the algorithm executes the crayfish's summer heat-avoidance or foraging behavior and updates the individual crayfish positions. When the number of iterations exceeds a set threshold, an elite mating operation is triggered to update the individual positions of crayfish in the population. Once the individual positions of the crayfish are updated, the individual fitness of the crayfish is calculated based on the fitness function to update the optimal individual position of each crayfish and the optimal population position. Different locations of heat-avoidance burrows are used at different stages of the iteration update of the crayfish's summer heat-avoidance behavior. When the crayfish are foraging, the food size is determined by individual fitness and the global optimal fitness.
[0017] Secondly, embodiments of this application provide an application method for a BP neural network mechanical model of a magnetorheological damper based on COA, namely a method for predicting the drag force of a magnetorheological damper, including the following steps:
[0018] The current, displacement, velocity, and damping force of the magnetorheological damper at the previous moment, as well as the current, displacement, and velocity at the current moment, are obtained as test data.
[0019] The test data is input into the COA-based magnetorheological damper BP neural network mechanical model, which outputs the damping force at the current moment. The COA-based magnetorheological damper BP neural network mechanical model is constructed using the above-mentioned COA-based magnetorheological damper BP neural network mechanical model construction method.
[0020] Compared with the prior art, the present invention has the following characteristics and beneficial effects:
[0021] This scheme constructs a 7-dimensional time-series input containing features from the previous and current moments to accurately capture the hysteresis characteristics of magnetorheological dampers. A basic mechanical model is built based on a BP neural network. Then, an improved crayfish algorithm, incorporating a dynamic elite guidance strategy, a spider-bee algorithm elite mating stage, and an intelligent early-stop mechanism, is used to optimize the weights and thresholds of the BP network. Combined with a regularized enhanced fitness function and vectorized boundary constraints, the scheme effectively balances global exploration and local development, improves search accuracy and convergence efficiency, reduces computational consumption, and controls model complexity. The final mechanical model is superior in terms of damping force prediction accuracy (significantly improved MAE, RMSE, and MAPE indicators), convergence stability, and adaptability to operating conditions, and can better meet the engineering requirements for high-performance control of magnetorheological suspension systems.
[0022] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0024] Figure 1 is a logic diagram of the method for constructing a BP neural network mechanical model of a magnetorheological damper based on COA according to an embodiment of this application;
[0025] Figure 2 shows the topology of the BP neural network;
[0026] Figure 3 is a technical logic diagram of optimizing the weights and thresholds of the basic mechanical model using the improved crayfish algorithm;
[0027] Figure 4 is a comparison of the damping force tracking performance of each model;
[0028] Figure 5 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0030] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0031] Example 1
[0032] This solution provides a BP neural network mechanical model for magnetorheological dampers based on COA. This model still uses a BP neural network as the basic network, with 7-dimensional temporal features as input and the damping force at the current moment as the output. It leverages the excellent nonlinear approximation capability and structural adaptive characteristics of the BP neural network to accurately characterize the complex hysteresis characteristics of the magnetorheological damper. However, based on the traditional BP neural network, an improved crayfish algorithm is used to optimize the weights and thresholds of the BP neural network. The improved crayfish algorithm integrates a dynamic elite guidance strategy and the elite mating stage of the spider-bee optimization algorithm into the original crayfish algorithm framework, achieving an adaptive balance between global exploration and local development, and improving the local search accuracy of the algorithm. Furthermore, the BP neural network mechanical model of the magnetorheological damper incorporates a regularized enhanced fitness function and vectorized boundary constraints during training, and introduces an intelligent early stopping mechanism to terminate invalid iterations in a timely manner. This effectively overcomes the shortcomings of slow convergence speed and insufficient stability, improves the search efficiency of the algorithm, and ultimately constructs a two-stage optimization framework with the synergistic effect of temperature-driven and elite mating as the BP neural network mechanical model of the magnetorheological damper, which greatly improves the prediction performance of the BP neural network for the damping force of the magnetorheological damper.
[0033] It is particularly important to emphasize that this scheme uses an improved crayfish algorithm to optimize the BP neural network. The traditional crayfish algorithm, through its unique temperature-driven position update mechanism, effectively alleviates the problems of the original BP neural network, such as strong dependence on initial weights and susceptibility to local convergence. Compared with other optimization algorithms, the unique advantage of the crayfish algorithm lies in its temperature regulation mechanism, which can significantly enhance population diversity, thereby effectively avoiding premature convergence and enabling efficient global search in complex problems. However, the traditional crayfish algorithm has shortcomings such as insufficient local search accuracy, poor balance between global exploration and local exploitation, low computational efficiency in the optimization process, and unstable generalization performance. These shortcomings result in the BP neural network optimized by the traditional crayfish algorithm still exhibiting problems such as insufficient prediction accuracy, poor convergence stability, and weak generalization ability when applied to predict the damping force of magnetorheological dampers. The Spider-Bee Optimization Algorithm is a metaheuristic algorithm with an efficient elite mating and competitive replacement mechanism. Its core advantage lies in its ability to fully utilize elite individual information and significantly enhance local search capabilities. Inspired by this, our team introduced the elite mating stage of the Spider-Bee Optimization Algorithm into the temperature-driven position update stage of the traditional Crayfish Optimization Algorithm. Through adaptive crossover of elite individuals and competitive replacement of inferior individuals, we fully utilize high-quality solutions in the population to accelerate the convergence process, effectively compensating for the shortcomings of the traditional Crayfish Optimization Algorithm in local search accuracy. Furthermore, our team introduced a dynamic elite guidance strategy to replace the original single elite guidance strategy in the temperature-driven stage of the traditional Crayfish Optimization Algorithm. This allows the balance between global exploration and local development to adaptively transition with the iteration process. This strategy significantly accelerates the overall optimization process by providing a clearer search direction and adaptively adjusted search step size. Furthermore, to optimize the use of computing resources, the inventors' team introduced an intelligent early stopping mechanism. This mechanism automatically determines the convergence state of the algorithm and terminates invalid iterations in a timely manner, effectively reducing the consumption of computing resources, improving the optimization efficiency of the algorithm and the adaptability of the model to complex dynamic working conditions, and improving the instability of the traditional crayfish algorithm in terms of generalization performance. The above improvements together construct an improved crayfish algorithm BP neural network mechanical model for magnetorheological dampers, so as to more accurately and efficiently address the problem of predicting the damping force of magnetorheological dampers.
[0034] Specifically, this solution provides a method for constructing a BP neural network mechanical model of a magnetorheological vibration damper based on COA, including the following steps:
[0035] Multiple sets of 7-dimensional time-series characteristic data of magnetorheological vibration dampers obtained from experiments under different frequency conditions were used as training data.
[0036] A basic mechanical model is constructed based on a BP neural network and training data. An improved crayfish algorithm and training data are used to iteratively update the weights and thresholds of the basic mechanical model until the update conditions are met, thus obtaining the BP neural network mechanical model of the magnetorheological damper.
[0037] The algorithm sets parameters for improving the crayfish population and initializes the crayfish population. During each iteration, it executes the crayfish's summer heat avoidance or foraging behavior and updates the individual positions of the crayfish. When the number of iterations exceeds the set iteration threshold, it triggers an elite mating operation to update the individual positions of the crayfish in the population. When the individual positions of the crayfish are updated, the individual fitness of the crayfish is calculated based on the fitness function to update the optimal individual position of each crayfish and the optimal population position of the population.
[0038] Different locations of summer burrows were used at different stages of the iterative update of crayfish's summer heat-avoidance behavior, and the size of food was determined by individual fitness and global optimal fitness when the crayfish were foraging.
[0039] Regarding the training data:
[0040] This scheme provides 7-dimensional time-series feature data for each frequency condition, including current, displacement, velocity, and damping force at the previous moment, and current, displacement, velocity, and damping force at the current moment. The damping force at the current moment from the training data is used as the output value. Correspondingly, this scheme uses multiple sets of bench test data on frequency, current, displacement, velocity, and damping force of the magnetorheological vibration damper obtained from experiments at different frequency conditions, and processes the bench test data to obtain multiple sets of 7-dimensional time-series feature data.
[0041] Specifically, due to the nonlinear and hysteretic characteristics of magnetorheological dampers, the bench test data for displacement, velocity, and damping force obtained through bench tests exhibit multi-valued correspondences and force-displacement hysteresis loops. Therefore, wavelet denoising and Savitzky-Golay filtering are required to effectively eliminate measurement noise and smooth the hysteresis curves while preserving important mechanical characteristics. The processed current I, frequency f, displacement s, velocity v, and damping force F are then used to... d The training data is constructed from relational data.
[0042] In some embodiments, multiple sets of 7-dimensional time-series feature data of the magnetorheological damper obtained from experiments at 1Hz, 3Hz, 4Hz, 5Hz, 10Hz, 15Hz, and 20Hz are used as training data, and multiple sets of 7-dimensional time-series feature data of the magnetorheological damper obtained from experiments at 2Hz are used as test data. The training data is then used to train the BP neural network mechanical model of the magnetorheological damper, and the test data is used to test the BP neural network mechanical model of the magnetorheological damper. Of course, the selection of training and test data corresponding to specific frequency conditions can be adjusted according to actual circumstances; this is merely an illustrative example. The BP neural network mechanical model of the magnetorheological damper ultimately trained by this scheme can predict the damping force of the magnetorheological damper under different frequency conditions.
[0043] In some embodiments, for each set of 7-dimensional time-series feature data in the training data, the previous moment's current, displacement, velocity, and damping force, along with the current moment's current, displacement, and velocity, are used as input data, and the current moment's damping force is used as output data. It should be noted that the final trained magnetorheological damper BP neural network mechanical model, in actual testing, also uses the previous moment's current, displacement, velocity, and damping force, along with the current moment's current, displacement, and velocity, as input data to predict the current moment's damping force.
[0044] The reason this scheme incorporates the current, displacement, velocity, and damping force from the previous moment as input data is that the magnetorheological damper has a "hysteresis characteristic." This means that the damping force at the current moment depends not only on the current, displacement, and velocity at the current moment but also on the historical state. Therefore, this scheme, by incorporating the current, displacement, velocity, and damping force from the previous moment as input data, can accurately capture the nonlinear relationship between the same instantaneous input and different damping forces caused by the hysteresis characteristic, thus avoiding the prediction errors caused by traditional models that only consider the current input data and ignore historical information.
[0045] Regarding the construction of the basic mechanical model:
[0046] In the step of "constructing a basic mechanical model based on BP neural network and training data", the dimension of the input data is used as the number of input layer nodes of the BP neural network, the dimension of the output data is used as the number of output layer nodes of the BP neural network, and the number of neurons in the hidden layer is used as the number of hidden layer nodes of the BP neural network to construct the basic mechanical model. The number of neurons in the hidden layer is determined based on the input and output data according to empirical formulas, or according to grid search.
[0047] That is, the current, displacement, velocity, and damping force of the previous moment and the current, displacement, and velocity of the training data are used as input data for the BP neural network, and the damping force of the current moment is used as the output of the BP neural network. The number of neurons in the hidden layer of the BP neural network is determined by empirical formulas and grid search. A basic mechanical model is established based on the input data, output data, and the number of neurons in the hidden layer.
[0048] Figure 2 shows the topology of a BP neural network. A BP neural network includes an input layer, hidden layers, and an output layer. The input layer takes in data and passes it to the hidden layers. The hidden layers transform the input data using a nonlinear transfer function and extract complex features from the data by combining weights and thresholds. The output layer linearly weights the outputs of the hidden layers and generates the final prediction result as the output data through the transfer function. The BP neural network uses an error backpropagation algorithm, adjusting the weights and thresholds layer by layer based on the output error, thereby achieving the approximation and learning of complex nonlinear mapping relationships. Once the number of nodes in the input layer, output layer, and hidden layer is determined, the structural framework of the BP neural network is fully defined. At this point, the basic mechanical model determined based on the BP neural network is a BP neural network with a "fixed structure but unoptimized parameters."
[0049] The mathematical expression for a BP neural network is as follows:
[0050] ;
[0051] in Let be the predicted value of the damping force at the current moment, 'a' be the output vector of the hidden layer, 'p' be the input vector of the input layer, 'w1' be the connection weight matrix from the input layer to the hidden layer, 'w2' be the connection weight matrix from the hidden layer to the output layer, 'b1' be the bias vector of the hidden layer, 'b2' be the bias vector of the output layer, 'f()' be the transfer function of the hidden layer neurons, using the sigmoid function tansig; and 'g()' be the transfer function of the output layer neurons, using the linear function purelin.
[0052] The error function of this BP neural network is:
[0053] ;
[0054] in F is the predicted value of the damping force at the current moment. d This represents the actual value of the damping force at the current moment.
[0055] The BP neural network minimizes the total error by calculating the output and updating the weights w1 and w2 and biases b1 and b2 through backpropagation error. To further improve the accuracy and generalization ability of the BP neural network-based fundamental mechanical model for the time-series prediction of the damping force of magnetorheological dampers, this scheme employs an improved "crayfish algorithm" and iteratively updates the weights and thresholds of the fundamental mechanical model using training data.
[0056] Specifically, Figure 3 is a technical logic diagram of the improved crayfish algorithm for optimizing the weights and thresholds of the basic mechanical model. As shown in Figure 3, firstly, the parameters of the improved crayfish algorithm are set and the crayfish population is initialized. Then, the fitness of each crayfish is calculated based on the mean square error of the training data and the weight regularization and bias regularization terms of the BP neural network as fitness functions. In each iteration update process, the crayfish's position is updated based on the temperature to determine whether it is entering the summer retreat stage or the foraging stage. During the summer retreat stage, the crayfish's summer retreat behavior is executed, and during the foraging stage, the crayfish's foraging behavior is executed. When the number of iterations exceeds the set iteration threshold, the elite mating operation is triggered to update the crayfish's position. The update stops when the set conditions are met, and the final optimized position of each crayfish is used as the weights and thresholds of the basic mechanical model.
[0057] The logical relationship between the temperature-driven behavior judgment stage and the elite mating stage of the crayfish improvement algorithm in this scheme is a collaborative mechanism of sequential execution and condition triggering. In each iteration, the temperature-driven behavior judgment stage is executed first to update the individual positions of all crayfish. When the iteration condition is met, the elite mating operation is triggered to perform cross-optimization on elite individuals and replace inferior individuals. Finally, unified boundary constraint processing and fitness evaluation are performed. This design ensures that the algorithm fully explores the search space in the early stage and accelerates convergence to a high-quality solution region in the middle and late stages through elite mating.
[0058] Specifically, in the step of "setting the parameters of the improved crayfish algorithm and initializing the crayfish population", the population size, maximum number of iterations, search space, upper bound of the search space, and lower bound of the search space are set for the improved crayfish algorithm.
[0059] It should be noted that, in order to map the weights and thresholds of the basic mechanics model to the location information of each individual crayfish, the dimension of the search space is set to be the total dimension of the weights and thresholds of the basic mechanics model. The dimension of the search space is calculated based on the number of input layer nodes, output layer nodes, and hidden layer nodes of the basic mechanics model.
[0060] Specifically, the formula for calculating the search space dimension is as follows:
[0061] S=innum×hidnum+hidnum+hidnum×outnum+outnum;
[0062] Where innum is the number of input layer nodes of the basic mechanics model; hidnum is the number of hidden layer nodes of the basic mechanics model; and outnum is the number of output layer nodes of the basic mechanics model.
[0063] This scheme uses the position of each individual crayfish as the weights and thresholds of the basic mechanical model, and the mean squared error of the training data and the weight regularization and bias regularization terms of the BP neural network as the fitness function. Furthermore, to effectively control model complexity and improve generalization ability while optimizing the weights and thresholds of the basic mechanical model, this scheme uses the mean squared error of the training data and the weight regularization and bias regularization terms of the BP neural network as the fitness function. The corresponding formula for calculating the fitness function is as follows:
[0064]
[0065] ;
[0066] Where λ1 is the weight regularization coefficient, λ2 is the bias regularization coefficient, m is the number of samples of damping force of the magnetorheological damper, w is the weight regularization term, b is the bias regularization term, and F dj Let be the actual damping force at the current moment for the j-th training data sample. Let be the predicted damping force for the j-th training data sample at the current moment.
[0067] In some embodiments, the weight regularization coefficient is 0.002 and the bias regularization coefficient is 0.001.
[0068] After setting the parameters of the improved crayfish algorithm and initializing the crayfish population, the crayfish population iteratively searches for the optimal position within the search space. The position of each individual crayfish is used as the weight and threshold of the basic mechanical model. Within the dimensional range of the search space, the position information of the i-th individual crayfish is represented as a vector X. i =[x i1 ,x i2 ,...,x iS ], where i=1,2,...,N, and simultaneously records the historical best position p of the i-th crayfish individual currently searched. i The optimal position p in the current iteration b And the global optimal position p of the population g, During the algorithm initialization phase, the individual best historical position p of each crayfish is determined. i Initialize to a random initial position, and the population's globally optimal position p. g Initialize to the position of the best-fitting individual in the crayfish population.
[0069] The improved crayfish algorithm in this scheme adopts a dual mechanism of temperature-driven behavior judgment stage combined with elite mating optimization stage. It dynamically adjusts the search strategy through temperature changes and introduces elite mating in the later stage of iteration to enhance the local development capability of the algorithm.
[0070] Specifically, this scheme triggers different behavioral patterns of crayfish by simulating temperature changes. That is, it uses the behavior of crayfish exhibiting summer heat-avoidance behavior when the temperature is high and foraging behavior when the temperature is low to trigger the improved crayfish algorithm to execute the crayfish's summer heat-avoidance behavior or foraging behavior in each iteration.
[0071] Correspondingly, in the step of "executing the crayfish's summer heat avoidance behavior or foraging behavior during each iteration update", the current iteration temperature is calculated at each iteration. If the current iteration temperature is greater than the set temperature threshold, the crayfish's summer heat avoidance behavior is executed; if the current iteration temperature is not greater than the set temperature threshold, the crayfish's foraging behavior is executed.
[0072] It should be noted that the current iteration temperature needs to be recalculated during each iteration update to ensure the dynamic nature of the environmental simulation during the iteration process. This simulates the random fluctuations in temperature in the natural environment and avoids the improved crayfish algorithm from getting stuck in a single search mode due to a fixed temperature.
[0073] The formula for calculating the iteration temperature is as follows:
[0074] ;
[0075] Where temp is the iteration temperature of the current iteration, and rand is a uniformly distributed random number in the range [0,1].
[0076] At this point, the temperature threshold is set to a value greater than 23. In the embodiment of the solution, the temperature threshold is set to 28.
[0077] When the crayfish exhibits summer heat-avoidance behavior during the iterative update process, it tends to search for locations to seek refuge in burrows. However, traditional crayfish algorithms suffer from premature convergence due to the limitation of using a single elite to guide the definition of burrow locations. Therefore, this solution considers the different needs for exploration and development at different stages of the algorithm and introduces a dynamic elite guidance strategy. This involves using different burrow locations at different stages of the iterative update to balance the algorithm's global exploration and local development capabilities.
[0078] Furthermore, when crayfish exhibit summer heat-avoidance behavior, they use competition mechanisms or exploration techniques to explore the location of heat-avoidance burrows to update their individual location, and they use different heat-avoidance burrow locations at different stages of iterative updates.
[0079] In the step of “using different locations for summer retreat caves at different stages of iterative updates”, when the number of iterations is greater than the set cave adjustment threshold, the average of the locations of the top three crayfish individuals with the highest individual fitness is used as the location of the summer retreat cave; when the number of iterations is not greater than the set cave adjustment threshold, the average of the optimal location of the current iteration and the optimal location of the crayfish population is used as the location of the summer retreat cave.
[0080] The advantage of using different cave locations at different stages of iterative updates in this scheme is that it allows the improved crayfish algorithm to dynamically balance global exploration capability and local development efficiency throughout the entire iteration cycle. This avoids premature convergence due to excessive focus on local solutions in the early stages, while ensuring accurate aggregation towards high-quality solution regions in later stages, ultimately improving the optimization quality of the weight threshold of the basic mechanics model. Specifically, when the number of iterations is no more than the set cave adjustment threshold, the core objective is to allow the algorithm to traverse the search space as much as possible to discover more potential high-quality solutions, avoiding premature locking into local optima. When the number of iterations exceeds the set cave adjustment threshold, the core objective is to accurately lock into the global optimum (i.e., the optimal weight threshold of the BP neural network), improving optimization accuracy and convergence speed.
[0081] In some embodiments, the cave adjustment threshold is set to a product of 0.2 to 0.4 of the maximum number of iterations.
[0082] In a specific embodiment of this solution, the formula for calculating the location of the summer retreat cave is as follows:
[0083]
[0084] Where, p b For the optimal position of p in the current iteration g X is the optimal location for the crayfish population. 01 X 02 and X 03 T represents the positions of the top three crayfish individuals in terms of individual fitness. max X is the maximum number of iterations. cave It was the location of a cave used for escaping the summer heat.
[0085] Furthermore, to enhance the diversity of the crayfish population and improve convergence efficiency, this scheme employs either a competition mechanism or an exploration technique to locate summer burrows. Specifically, crayfish with a set probability explore the burrows using the exploration mechanism, while the remaining crayfish compete for the burrows. This dual-mode update mechanism of exploration and competition effectively improves the algorithm's search capability within the global search range and lays a foundation of population diversity for subsequent fine-grained local searches during the foraging phase.
[0086] In some embodiments, crayfish are set to have a 60% probability of using exploration technology to explore the location of the summer retreat caves, and a 40% probability of using a competition mechanism to explore the location of the summer retreat caves.
[0087] When crayfish use an exploration mechanism to find the location of the summer burrow, their goal is to get closer to the burrow, thus bringing their position closer to the optimal solution and accelerating the convergence speed. The corresponding formula for updating the individual position of the crayfish is:
[0088] ;
[0089] C = 1.5 - t / T max
[0090] Where X i t+1 Let X be the position of the crayfish in the (t+1)th iteration. i t Let e be the position of the crayfish in the t-th iteration. f C is the adaptive exploration factor, T is the contraction factor, and T is the shrinkage factor. max X is the maximum number of iterations, t is the number of iterations, rand(1,S) is any random number selected from 1 and the search space, and X is the maximum number of iterations. cave It was the location of a cave used for escaping the summer heat.
[0091] When crayfish use a competitive phase mechanism to explore locations for seeking refuge from the summer heat, they compete for these burrows to enter a competitive phase. This makes location updates more directional and competitive, promoting population diversity and accelerating convergence to desirable areas through inter-individual competition. The corresponding individual location update formula for crayfish is:
[0092] ;
[0093] Where X i t+1 Let X be the position of the crayfish in the (t+1)th iteration. i t Let X be the position of the crayfish in the t-th iteration. cave It was the location of a cave used for escaping the summer heat.
[0094] When the crayfish's foraging behavior is executed during the iterative update process, the crayfish will adopt different strategies for foraging based on the size of the food, that is, it will switch positions and update strategies by changing the size of the food.
[0095] Furthermore, when crayfish engage in foraging behavior, they employ either a large-scale food processing strategy or a direct feeding strategy based on food size to update their individual location. This solution achieves an effective balance between global exploration and local exploitation by dynamically adjusting the crayfish's search strategy according to the food resources corresponding to food size.
[0096] In this scheme, the food size represents the ratio of the current individual's fitness to the global optimal fitness, reflecting the resource abundance of the crayfish's location. The food size is expressed as:
[0097] ;
[0098] Where C1 is the food factor, set as a constant of 2; f i f represents the individual fitness at the position of the i-th crayfish individual; food Food location X food fitness value, X food =p b ;10 -10 This is a numerically stable term to prevent division by zero errors.
[0099] When the food size exceeds a set food threshold, crayfish employ a large-scale food processing strategy for foraging. When the food size is within the set threshold, they adopt a direct feeding strategy. In other words, crayfish adjust their foraging strategy based on the abundance of food resources to avoid the algorithm getting trapped in local optima.
[0100] In some embodiments, the food threshold is set in relation to food factors.
[0101] Specifically, the food threshold is set to (C1+1) / 2. At this time, when the food size is greater than (C1+1) / 2, the crayfish adopts a large food processing strategy to forage; while when the food size is no greater than (C1+1) / 2, the crayfish adopts a direct feeding strategy to forage.
[0102] When crayfish employ a large-scale food processing strategy for foraging, the food's location needs to be updated due to its large size. Based on this updated food location, the individual crayfish position is then updated. The specific update formula is as follows:
[0103] ;
[0104] ;
[0105] ;
[0106] ;
[0107] Where X food_new For the new food location, X food X represents the location of the food. i t+1 Let X be the position of the crayfish in the (t+1)th iteration. i tLet t be the position of the crayfish in the t-th iteration, temp be the iteration temperature, rand be a random number, Q be the feeding constant of the crayfish, C2 and δ be constants that control the amount of food consumed by the crayfish, which can be 0.5 and 1.5 respectively; μ be the temperature constant that is most suitable for the crayfish to feed, which is 26.
[0108] When crayfish adopt a direct-feeding strategy, they can move directly to the food and eat it. The formula for updating the individual position of the crayfish in this case is as follows:
[0109] ;
[0110] ;
[0111] Where X i t+1 Let X be the position of the crayfish in the (t+1)th iteration. i t Let X be the position of the crayfish in the t-th iteration. food Let Q be the location of the food source, Q be the feeding constant of the crayfish, C2 and δ be constants that control the amount of food consumed by the crayfish, which can be 0.5 and 1.5 respectively; μ be the temperature constant that is most suitable for the crayfish to feed, which is 26; rand(1,S) is 1 and any number in the search space; ub is the upper bound of the search space; and lb is the lower bound of the search space.
[0112] It should be noted that, to further enhance the refined search capability of the improved crayfish algorithm near local optima, this scheme triggers an elite mating operation when the number of iterations exceeds a set threshold. This update updates the individual positions of crayfish in the population. In other words, this scheme additionally introduces an elite mating operation to improve the crayfish population update mechanism. This operation is triggered in the later stages of iteration, specifically through crossover between elite individuals to generate superior offspring, replacing inferior individuals in the population, thereby enhancing the algorithm's local exploitation capability. This scheme utilizes the high-quality genetic information carried by elite individuals to directionally enhance the influence of superior solutions in the crayfish population, improving the local exploitation accuracy and convergence speed of the improved crayfish algorithm in the later stages of iteration. This complements the aforementioned temperature-driven stage, jointly ensuring the comprehensiveness and efficiency of the optimization process.
[0113] In some embodiments, the iteration threshold is set to the product of 0.5 to 0.8 and the maximum number of iterations. In the embodiment of this scheme, the iteration threshold is the product of 0.5 and the maximum number of iterations.
[0114] Specifically, the elite mating operation is triggered as follows: select the K crayfish individuals with the best individual fitness to form an elite set, randomly select two different crayfish individuals from the elite set as parents to perform an adaptive crossover operation to generate offspring individuals, and replace the crayfish individual with the worst individual fitness in the crayfish population after boundary constraint processing of the offspring individuals.
[0115] In some embodiments, boundary constraint processing on offspring individuals is performed to ensure that the algorithm's search process remains within a feasible range. This involves expanding the boundary to a format consistent with the search dimension and completing the boundary processing for the entire population in one step through matrix operations. Specifically, each individual's position is subject to element-wise boundary constraints, and out-of-bounds values are automatically corrected to boundary values. This approach ensures computational stability while significantly improving the efficiency of boundary processing.
[0116] Furthermore, the optimal individual fitness of crayfish individuals in the crayfish population is ranked, and the K crayfish individuals with the best individual fitness are selected to form an elite set, where the value of K satisfies:
[0117] ;
[0118] in, This is for rounding down; β is the elite ratio coefficient, set to 0.2; max() is for taking the maximum value.
[0119] Two different crayfish individuals are randomly selected from the elite set as parents, and an adaptive crossover operation is performed to generate offspring individuals:
[0120] ;
[0121] Where X fi The position of the generated offspring individuals is represented by α, which is an adaptive crossover weight that varies randomly within the range of [0.4, 0.6]. p1 and X p2 The positions of two crayfish individuals randomly selected from the elite set as parents.
[0122] It is particularly important to note that, as mentioned earlier, in each iteration of the improved crayfish algorithm, when the individual crayfish's position p... i Immediately after being updated, the individual fitness of the crayfish is calculated according to the fitness function, ensuring that the crayfish always retains the optimal solution from its search process, and the optimal position of the current iteration changes with the individual crayfish position p. i The update is synchronized and adjusted, recording the best result in this generation of the population, and the optimal population position p. gThe algorithm updates at the end of each iteration, continuously maintaining the historical best solution throughout the optimization process, and uses it as the final output of the algorithm. This multi-level update structure ensures an effective balance between global exploration and local development.
[0123] Furthermore, to improve the efficiency of the improved crayfish algorithm and avoid unnecessary computation, this scheme introduces an intelligent early stopping mechanism based on the degree of fitness improvement. Specifically, if the optimization magnitude of the fitness in multiple consecutive iterations is lower than a set optimization threshold, the algorithm is considered to have converged sufficiently, and the search is terminated early. This method effectively saves computational resources while ensuring the quality of the solution, and is particularly suitable for large-scale optimization problems.
[0124] Correspondingly, in the step of "iteratively updating the weights and thresholds of the basic mechanical model using the improved crayfish algorithm and training data until the update conditions are met to obtain the BP neural network mechanical model of the magnetorheological vibration damper", the update conditions are to stop iterative updating when the maximum number of iterations is reached or the optimization amplitude of fitness for multiple consecutive generations is lower than the set optimization threshold. The weights and thresholds of the basic mechanical model are updated with the optimal position of the crayfish population to obtain the BP neural network mechanical model of the magnetorheological vibration damper.
[0125] In some embodiments, the update condition is set as the fitness optimization magnitude fi_10 being less than 0.005% for 10 consecutive generations.
[0126] Further fundamental mechanical models are used to adjust the neural network in reverse based on the optimized weights and thresholds of the algorithm, and finally, the predicted value of the damping force of the magnetorheological damper is obtained by inverse normalization.
[0127] Example 2
[0128] Based on the same concept as in Embodiment 1, this solution provides a COA-based BP neural network mechanical model for a magnetorheological damper, which is constructed according to the construction method of the COA-based BP neural network mechanical model for a magnetorheological damper shown in Embodiment 1.
[0129] Correspondingly, this solution provides a method for predicting the damping force of a magnetorheological damper, including the following steps:
[0130] The current, displacement, velocity, and damping force of the magnetorheological damper at the previous moment, as well as the current, displacement, and velocity at the current moment, are obtained as test data.
[0131] The test data is input into the trained COA-based magnetorheological damper BP neural network mechanical model, which outputs the damping force at the current moment.
[0132] To verify the damping force prediction effect of the improved crayfish algorithm-based BP neural network mechanical model of the magnetorheological damper constructed in this scheme, this scheme compares the improved crayfish algorithm-based BP neural network mechanical model of the magnetorheological damper (improved COA-BP) with the original BP neural network (original BP), the original BP neural network optimized by the traditional crayfish algorithm (original COA-BP), and the BP neural network optimized by the thinking evolution algorithm (MEA-BP). The same test data was used and the tests were conducted under the same conditions. The comparison chart of the damping force tracking effect of each model is shown in Figure 4. The prediction accuracy of the damping force of the magnetorheological damper was evaluated using three evaluation indicators: mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). The error parameter results of the four models are shown in Table 1.
[0133] Table 1. Error parameters of the four models
[0134]
[0135] As shown in Table 1, the improved COA-BP has a MAE index that is 10.91% and 20.16% higher than the original COA-BP and MEA-BP, respectively. The improved COA-BP has an RMSE index that is 8.68% and 22.72% higher than the original COA-BP and MEA-BP, respectively. The improved COA-BP has an MAPE index that is 11.52% and 45.10% higher than the original COA-BP and MEA-BP, respectively.
[0136] As can be seen from the comparison of various error parameters in Table 1, the improved COA-BP neural network has significantly improved prediction accuracy and performs better in predicting the damping force of magnetorheological dampers.
[0137] Example 3
[0138] This embodiment also provides an electronic device, referring to FIG5, including a memory 404 and a processor 402. The memory 404 stores a computer program, and the processor 402 is configured to run the computer program to perform the steps in any of the embodiments of the method for constructing a BP neural network mechanical model of a magnetorheological damper based on COA described above.
[0139] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0140] The memory 404 may include a large-capacity memory 404 for data or instructions. For example, and not to limit, the memory 404 may be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0141] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any of the methods for constructing the BP neural network mechanical model of the magnetorheological damper based on COA in the above embodiments.
[0142] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0143] Transmission device 406 can be used to receive or send data via a network. Input / output device 408 is used to input or output information. In this embodiment, the input information may be the current, displacement, velocity, and damping force of the magnetorheological damper at the previous moment, and the current, displacement, and velocity at the current moment; the output information may be the damping force at the current moment, etc.
[0144] Optionally, in this embodiment, the processor 402 can be configured to perform the following steps via a computer program:
[0145] Multiple sets of 7-dimensional time-series feature data of magnetorheological vibration dampers obtained under different frequency operating conditions are used as training data. Each set of 7-dimensional time-series feature data under each frequency operating condition includes the current, displacement, velocity, and damping force at the previous moment, as well as the current, displacement, velocity, and damping force at the current moment. The damping force at the current moment in the training data is used as the output value.
[0146] A basic mechanical model is constructed based on a BP neural network and training data. An improved crayfish algorithm and training data are used to iteratively update the weights and thresholds of the basic mechanical model until the update conditions are met, thus obtaining the BP neural network mechanical model of the magnetorheological damper.
[0147] The algorithm sets parameters for improving the crayfish population and initializes the crayfish population. The position of each individual crayfish is used as the weight and threshold of the basic mechanical model. The mean square error of the training data and the weight regularization and bias regularization terms of the BP neural network are used as the fitness function. During each iteration, the crayfish's summer heat avoidance behavior or foraging behavior is executed and the individual position of the crayfish is updated. When the number of iterations exceeds the set iteration threshold, the elite mating operation is triggered to update the individual position of the crayfish in the population. When the individual position of the crayfish is updated, the individual fitness of the crayfish is calculated according to the fitness function to update the optimal individual position of each crayfish and the optimal population position of the population.
[0148] Different locations of summer burrows were used at different stages of the iterative update of crayfish's summer heat-avoidance behavior, and the size of food was determined by individual fitness and global optimal fitness when the crayfish were foraging.
[0149] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here. Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered to be within the scope of this specification.
Claims
1. A method for constructing a BP neural network mechanical model of a magnetorheological vibration damper based on COA, characterized in that, Includes the following steps: Multiple sets of 7-dimensional time-series characteristic data of magnetorheological vibration dampers obtained from experiments under different frequency conditions were used as training data. A basic mechanical model is constructed based on a BP neural network and training data. An improved crayfish algorithm and training data are used to iteratively update the weights and thresholds of the basic mechanical model until the update conditions are met, thus obtaining the BP neural network mechanical model of the magnetorheological damper. The algorithm includes setting parameters for improving the crayfish algorithm and initializing the crayfish population. During each iteration, the algorithm executes the crayfish's summer heat-avoidance or foraging behavior and updates the individual crayfish positions. When the number of iterations exceeds a set threshold, an elite mating operation is triggered to update the individual positions of crayfish in the population. Once the individual positions of the crayfish are updated, the individual fitness of the crayfish is calculated based on the fitness function to update the optimal individual position of each crayfish and the optimal population position. Different locations of heat-avoidance burrows are used at different stages of the iteration update of the crayfish's summer heat-avoidance behavior. When the crayfish are foraging, the food size is determined by individual fitness and the global optimal fitness. The elite mating operation is triggered as follows: select the K crayfish individuals with the best individual fitness to form an elite set, randomly select two different crayfish individuals from the elite set as parents to perform an adaptive crossover operation to generate offspring individuals, and replace the crayfish individual with the worst individual fitness in the crayfish population after boundary constraint processing of the offspring individuals.
2. The method for constructing the BP neural network mechanical model of the magnetorheological vibration damper based on COA according to claim 1, characterized in that, Each set of 7-dimensional time-series feature data under each frequency condition includes the current, displacement, velocity, and damping force at the previous moment, as well as the current, displacement, velocity, and damping force at the current moment, with the damping force at the current moment in the training data serving as the output value.
3. The method for constructing the BP neural network mechanical model of the magnetorheological vibration damper based on COA according to claim 1, characterized in that, The improved crayfish algorithm is defined by setting the population size, maximum number of iterations, search space, upper bound of the search space, and lower bound of the search space. The dimension of the search space is the total dimension of the weights and thresholds of the basic mechanics model. The position of each individual crayfish is used as the weights and thresholds of the basic mechanics model, and the mean square error of the training data and the weight regularization and bias regularization terms of the BP neural network are used as the fitness function.
4. The method for constructing the BP neural network mechanical model of the magnetorheological vibration damper based on COA according to claim 1, characterized in that, At each iteration, the current iteration temperature is calculated. If the current iteration temperature is greater than the set temperature threshold, the crayfish's summer heat avoidance behavior is executed. If the current iteration temperature is not greater than the set temperature threshold, the crayfish's foraging behavior is executed.
5. The method for constructing the BP neural network mechanical model of the magnetorheological vibration damper based on COA according to claim 1, characterized in that, When the number of iterations exceeds the set cave adjustment threshold, the average of the positions of the top three crayfish individuals in terms of individual fitness is used as the location of the summer retreat cave; when the number of iterations does not exceed the set cave adjustment threshold, the average of the optimal position of the current iteration and the optimal position of the crayfish population is used as the location of the summer retreat cave; food size represents the relative ratio between the current individual fitness and the global optimal fitness.
6. The method for constructing the BP neural network mechanical model of the magnetorheological vibration damper based on COA according to claim 1, characterized in that, When crayfish exhibit summer heat-avoidance behavior, they use competition or exploration techniques to locate heat-avoidance burrows to update their individual location, and they use different heat-avoidance burrow locations at different stages of the iteration update; when crayfish exhibit foraging behavior, they use large food processing strategies or direct feeding strategies to forage based on the size of the food to update their individual location.
7. The method for constructing the BP neural network mechanical model of the magnetorheological vibration damper based on COA according to claim 6, characterized in that, When crayfish use an exploration mechanism to discover the location of summer burrows, the corresponding individual crayfish position update formula is: C = 1.5 - t / T max When crayfish use a competitive mechanism to explore locations of summer burrows, the corresponding individual crayfish position update formula is: ;where X i t+1 Let X be the position of the crayfish in the (t+1)th iteration. i t Let X be the position of the crayfish in the t-th iteration. cave The location of the summer cave, e f C is the adaptive exploration factor, T is the contraction factor, and T is the shrinkage factor. max is the maximum number of iterations, t is the number of iterations, and rand(1,S) is any random number selected from 1 and the search space; when crayfish adopt a large-scale food processing strategy for foraging, the update formula for the individual position of crayfish is: ; ; ; ; When crayfish use a direct-feeding feeding strategy, the formula for updating the individual crayfish's position is: ; ;where X food_new For the new food location, X food X represents the location of the food. i t+1 Let X be the position of the crayfish in the (t+1)th iteration. i t Let X be the position of the crayfish in the t-th iteration. food Let P be the food location, temp be the iteration temperature, rand be a random number, P be the food size, Q be the crayfish feeding constant, C2 and δ be constants controlling the amount of food consumed by the crayfish, μ be the optimal temperature constant for crayfish feeding, rand(1,S) be 1 and any number in the search space, ub be the upper bound of the search space, lb be the lower bound of the search space, P be the food size, C1 be the food factor, and f be the food location. i Let be the individual fitness of the position of the i-th crayfish individual; f food Food location X food fitness value, X food =p b ;10 -10 It is a numerically stable term.
8. The method for constructing the BP neural network mechanical model of the magnetorheological vibration damper based on COA according to claim 1, characterized in that, The update condition is to stop iterative updates when the maximum number of iterations is reached or the optimization range of fitness for multiple consecutive generations is lower than the set optimization threshold. The weights and thresholds of the basic mechanical model are updated with the optimal position of the crayfish population to obtain the BP neural network mechanical model of the magnetorheological vibration damper.
9. A method for predicting the damping force of a magnetorheological vibration damper, characterized in that, Includes the following steps: The current, displacement, velocity, and damping force of the magnetorheological damper at the previous moment, as well as the current, displacement, and velocity at the current moment, are obtained as test data. The test data is input into the COA-based magnetorheological damper BP neural network mechanical model, which outputs the damping force at the current moment. The COA-based magnetorheological damper BP neural network mechanical model is constructed according to the construction method of the COA-based magnetorheological damper BP neural network mechanical model according to any one of claims 1 to 8.
Citation Information
Patent Citations
Magnetorheological damper modeling method based on Gaussian process regression model
CN119167786A
Method for improving prediction accuracy of finish rolling temperature based on deep learning algorithm
CN119720113A