Magnetorheological Damper Force Prediction using Particle Swarm Optimization and Long Short-Term Memory Model

Smart materials, like magnetorheological (MR) fluid, are gaining attention for their ability to rapidly change properties under magnetic influence, making them useful in vibration control systems for vehicles, medical devices, and civil engineering structures. Common parametric models, such as Bouc-Wen and Bingham, are traditionally employed to model MR damper dynamics behavior. However, the manual tuning of numerous parameters in these models increases complexity and hinders the identification of inverse models, potentially leading to unpredictable optimum target forces. In response to these challenges, this study suggested a non-parametric approach using Long Short-Term Memory (LSTM) models to predict the optimum target force of MR dampers. Unlike parametric models, LSTM models capture dynamic behavior without the need for extensive manual tuning. To optimize the LSTM model, Particle Swarm Optimization (PSO) is employed to fine-tune hyperparameter values, ensuring robust performance. The proposed non-parametric method, specifically the PSO-LSTM model, demonstrates faster processing times compared to traditional parametric approaches. The proposed model produced an accurate damping force prediction with a root mean square error of less than 5%, This novel approach simplifies the modeling process and offers an efficient and precise alternative to traditional parametric methods.


Introduction
A magnetorheological fluid (MR) is an advanced smart fluid material made up of soft magnetic particles and stabilizers suspended in a carrying fluid [1].Due to its unique MR effect, the MR fluid has been extensively utilized across a wide range of vibration control applications, from automobiles to medical equipment and civil structures [2].Magnetorheological (MR) damper is similar in construction to fluid viscous damper by utilizing MR fluids instead of hydraulic oil.This MR damper has been recently implemented in the semi-active suspension system of vehicles to improve the ride comfort and stability of vehicle performance especially when the vehicle takes a corner, hit a hole or bumps.Semiactive suspensions contain a variable damping mechanism that is equivalent to the performance of active In terms of MR damper modeling, many methods have been proposed for hysteresis behavior tracking, such as Bingham model [8], Bingmax model [9] Bouc-Wen model [10] and Spencer model [11].The shortcoming of these models is the requirement on the equations' parameters that need to be determined based on experimental data.In this method, the parameters are tuned until the numerical results fit the experimental data closely.However, this method requires too many parameters, which increases model complexity and makes finding the inverse model much more difficult.According to the literature the parameters of these models can be more than 14 parameters.
To tackle this problem, a non-parametric based on long short-term memory is proposed in this research.MR damper dynamics are often nonlinear and can be influenced by a variety of factors.LSTMs, as deep learning models, can learn complex nonlinear relationships in the data, allowing them to capture the behavior of MR dampers damping force [12].LSTMs can automatically learn and extract relevant features from the input data.This is advantageous when dealing with MR damper prediction, as manually crafting features might be challenging due to the nonlinearity of the signal.However, the LSTM network suffers from hyperparameter selection [13].This value should be set before the training process starts.LSTMs have a large number of hyperparameters, including the number of hidden units, learning rate, dropout rates, batch size, and more.The high dimensionality of the hyperparameter space increases the search space, making it more challenging to find the optimal combination.Hyperparameters in LSTM networks are often interconnected, meaning changing one hyperparameter may influence the performance of others.This interdependence complicates the optimization process, as the effects of altering one hyperparameter need to be considered in the context of the entire set.
Addressing these challenges may involve leveraging optimization techniques such as heuristic and metaheuristic optimization algorithms.Additionally, the use of automated hyperparameter tuning tools can help streamline the optimization process.Despite the difficulties, successful hyperparameter optimization is crucial to unlock the full potential of LSTM models.Hyperparameter optimization is a crucial step in training machine learning models, and both heuristics and metaheuristics can be employed to efficiently search and find optimal or near optimal hyperparameter configurations [14].Choosing between heuristics and metaheuristics for hyperparameter optimization depends on factors such as the size of the search space, available computational resources, and the specific characteristics of the optimization problem.Metaheuristics are often favored for their ability to efficiently explore large and complex spaces, while heuristics may be more suitable for simpler problems or scenarios with limited resources.Hence, the metaheuristics model is based on particle swarm optimization (PSO) for LSTM hyperparameter optimization.
The rest of this paper is organized as follows.Section 2 describes the proposed model.Section 3 discusses the experimental setup.The analysis and comparative study results are discussed in Section 4, and Section 5 concludes the paper.

The proposed model
Long Short-Term Memory (LSTM) stands as a form of recurrent neural network (RNN) architecture, renowned for its efficacy in recognizing and understanding patterns within sequential data.The fundamental structure of LSTM is depicted in Figure 1.When applied to the modeling of Magnetorheological (MR) dampers, LSTMs become valuable for tasks like time-series prediction and control.The behavior of MR dampers is often characterized by dynamics that evolve over time.Expressing the damper's response to diverse inputs, such as alterations in magnetic field strength or velocity, can be done as a time series.LSTMs excel in handling sequential data, leveraging their capability to grasp prolonged dependencies and retain information over extended durations.In the context of MR damper modeling, the LSTM model takes velocity and displacement as input features, producing damping force as the output.Nonetheless, the challenge lies in the selection of hyperparameters, and an automated approach for hyperparameter selection is required.This study proposes the use of the Particle Swarm Optimization (PSO) model to optimize these hyperparameters.The process of the proposed model is illustrated in Figure 2 and the architecture of LSTM model used for the analysis is shown in Table 1.

Figure 1. Basic architecture of LSTM
The core of an LSTM unit involves several gates and memory cells to control the flow of information.The equations governing the LSTM is shown as follows: where  represents the weight, ℎ the hidden state,  denotes bias,  denotes activation function, and tanh is the hyperbolic tangent activation function.Hence, the incorporation of Particle Swarm Optimization (PSO) was introduced to fine-tune the hyperparameters of the LSTM in the modeling of Magnetorheological (MR) dampers.PSO, drawing inspiration from the collective behavior observed in birds, is a metaheuristic optimization algorithm commonly employed to determine optimal hyperparameter values in machine learning models.Wahab et al. (2015) conducted a comprehensive analysis of the swarm optimization algorithm and the authors proved that the PSO can be used to optimize thirty well-known benchmark functions [15].Specifically, when applied to optimize hyperparameters for a Long Short-Term Memory (LSTM) network, the primary aim is to enhance the overall performance of the LSTM model by adjusting its hyperparameters.The versatility of PSO makes it applicable to tune of the LSTM model based on the objective function shown in equation 8.

Experimental Setup
The MR damper utilized in this investigation is the RD-8040-1, manufactured by Lord Corporation in the United States.It has an extension length of approximately 208 mm and a compression length of about 153 mm.Positioned between the unsprung mass and sprung mass, and aligned parallel to the suspension spring during experimental trials, the MR damper's experimental rig design is depicted in Figure 3.To examine the damper's response under sinusoidal excitation with a frequency of 2.6 Hz and an amplitude of 3.5 mm, tests were conducted across the current range of 0 to 0.5 amperes.Due to experimental setup limitations, the frequency can only be set at 2.6 Hz with a 3.5 mm amplitude.Data collection was performed with a 2k sampling rate over a 5-second duration, and the sensor positions are illustrated in Figure 3.

Result and discussion
The initial phase of the analysis involved the careful selection of Long Short-Term Memory (LSTM) hyperparameters that aim to identify those with a substantial impact on LSTM predictions.The main objective of this analysis is to obtain an accurate prediction of the damping force and the result will be compared with the actual damping force measured during the experiment.Given the timeintensive nature of training the LSTM model, the focus was narrowed down to optimizing two key hyperparameters.The proposed model underwent training using input currents of 0, 0.2, 0.3, 0.4, and 0.5 amperes, followed by testing with a 0.1-ampere input.The proposed model will be trained until it reaches almost 0 percent RMSE.The result in Table 2 demonstrates the deviation between predicted and actual damping forces.The outcomes presented in Table 2 indicated that the number of hidden layers and gradient thresholds significantly influenced LSTM predictions, with the proposed model demonstrating the lowest testing root mean square error (RMSE) both during training and testing.Subsequently, the predicted damping force was graphically depicted against velocity and displacement.The hysteresis behavior of the damping force can be observed from the damping force plotted against velocity.In this subsequent phase of analysis, the suggested model underwent testing across a range of input currents, specifically 0, 0.2, 0.3, 0.4, and 0.5 amperes.The corresponding outcomes are detailed in Table 3.In the context of this analysis, only the number of hidden layers and gradient thresholds will be optimized.The obtained results showed the capability of the proposed model to accurately predict the damping force generated by the Magnetorheological (MR) damper, as evidenced by a root mean square error of less than 5% for all datasets.It's noteworthy that the testing scenarios involved different current inputs, with 0 amperes indicating testing after training with currents ranging from 0.1 to 0.

Validation analysis using previous research datasets with LSTM-PSO
The proposed model was evaluated with the previous research dataset.The dataset and the details can be found in the following ref [16].With the available dataset, the proposed model was evaluated, and the result is shown in Table 4.The authors collected the data with different frequencies of sinusoidal excitation.Hence, the proposed model was evaluated with a different frequency as the input and damping force as the output.According to the results in Table 4, the proposed model demonstrated a root mean square error ranging from approximately 2% to 5% for all input frequencies.The graphical representation illustrates the deviation between predicted and actual damping forces.For instance, in the case of a 0.2 Hz input frequency, the model was trained using input frequencies ranging from 0.4 Hz to 1 Hz and then tested specifically with a 0.2 Hz input.Notably, the test dataset was distinct from the training data, ensuring a robust evaluation of the model's predictive capabilities.

The impact of the study
In automotive and civil engineering applications, MR dampers are often used for vibration control.Predicting their dynamic behavior helps in designing systems that effectively reduce vibrations, leading to improved comfort for occupants and enhanced stability for vehicles or structures.Traditional parametric models for MR dampers often require manual tuning of numerous parameters, which can be time-consuming and challenging.The proposed PSO-LSTM model demonstrates quicker processing times compared to traditional parametric approaches.This improvement in processing time contributes to the efficiency of the analysis, making it a viable alternative for predicting optimum target forces.

Conclusion
In conclusion, the application of Particle Swarm Optimization (PSO) in tuning the hyperparameters of the Long Short-Term Memory (LSTM) network has demonstrated remarkable success in predicting the damping force of Magnetorheological (MR) dampers.Furthermore, the PSO-LSTM framework has proven advantageous in mitigating challenges associated with hyperparameter tuning.By automating the process of finding optimal hyperparameter values, PSO has alleviated the burden of manual finetuning, allowing for a more efficient and effective exploration of the hyperparameter space.The proposed model produced less than 5% testing RMSE on the experiment and previous research dataset.

Figure 2 .
Figure 2. The flowchart of the proposed model

Table 1 .
The architecture of LSTM used in the analysis.

Table 4 .
The performance of the LSTM-GWO on previous research datasets.