Next Article in Journal
Photocatalytic Degradation of Neonicotinoids—A Comparative Study of the Efficacy of Hybrid Photocatalysts
Next Article in Special Issue
Research on the Process of Laser Cladding Ni60 Coating on High-Nickel Cast Iron Surfaces
Previous Article in Journal
Extraction Kinetics of Pyridine, Quinoline, and Indole from the Organic Phase with Natural Deep Eutectic Solvents and Separation Study Using a Centrifugal Extractor
Previous Article in Special Issue
Coating Composites Based on Polyurea Elastomers with Increased Fire Resistance and Their Use as Roofing Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Maximizing Corrosion Resistance of HA+Ce Coated Mg Implants Using Random Forest and Whale Optimization Algorithm

by
Zeinab Rajabi
1,
Faramarz Afshar Taromi
2,*,
Saeed Pourmahdian
2 and
Hossein Eivaz Mohammadloo
3
1
Department of Polymer Engineering and Color Technology, Amirkabir University of Technology (Tehran Polytechnic), Mahshahr Campus, Mahshahr P.O. Box 63517-13178, Iran
2
Department of Polymer Engineering and Color Technology, Amirkabir University of Technology (Tehran Polytechnic), Tehran P.O. Box 15875-4413, Iran
3
Iran Polymer and Petrochemical Institute, Tehran P.O. Box 14965-115, Iran
*
Author to whom correspondence should be addressed.
Processes 2024, 12(3), 490; https://doi.org/10.3390/pr12030490
Submission received: 27 January 2024 / Revised: 13 February 2024 / Accepted: 19 February 2024 / Published: 28 February 2024
(This article belongs to the Special Issue Microstructure, Processing and Numerical Simulation of Coatings)

Abstract

:
In this paper, a hybrid three-stage methodology based on in vitro experiments, simulations, and metaheuristic optimization is presented to enhance the corrosion resistance of hydroxyapatite (HA)-coated magnesium implants in biomedical applications. In the first stage, we add cerium (Ce) to HA and present a new coating (named HA+Ce) to improve the resistance of the coating to corrosion. Then, various HA+Ce compounds with different factors (e.g., concentration, pH, immersion time, and temperature) are generated and their propensity for corrosion is examined in a physiological environment using EIS and DC polarization tests in a simulated body fluid solution. Eventually, a comprehensive dataset comprising 1024 HA+Ce coating samples is collected. In the second stage, machine learning using random forest (RF) is used to learn the relation between the input factors of the coating and its corrosion resistance. In the third stage, a metaheuristic algorithm based on the whale optimization algorithm (WOA) is utilized to find the best HA+Ce compound with the maximum corrosion resistance, while the objective function of WOA for a new unseen coating solution is estimated using the trained RF model. Finally, the morphology and composition of the best coating solution are inspected using FE-SEM. According to the obtained results, the HA+Ce coating with an immersion time of 60 min, concentrations of 0.9 for Ce and 1.2 for HA, pH of 4.1 for solution, and temperature of 70 °C demonstrated the highest level of corrosion resistance among all experiments and simulations. The final optimized HA+Ce coating solution has obtained a corrosion resistance of 14,050 Ω·cm2, which resulted in a gain of 14.9% compared to the HA-coated Mg implants.

1. Introduction

Magnesium (Mg) and its alloys are widely used in various industries, like automotive, aerospace, and defense, due to their lightweight nature and impressive mechanical strength relative to their weight [1,2]. Mg boasts a Young’s modulus of 44 Gigapascals and a density of 1740 kg/m2, which makes it a sought after alternative to aluminum, aiding in fuel consumption reduction. Its biocompatibility, biodegradability, density, and modulus akin to natural bone, have spurred interest in its use for medical implants, potentially replacing biodegradable polymeric ones [3]. Furthermore, its ability to dissolve in body fluid eliminates the need for secondary surgery to remove the implant [4]. Mg implants present a host of advantages in the realm of medical applications [5,6,7,8]. Their exceptional biocompatibility ensures seamless integration with the body’s biological systems, minimizing the risk of adverse reactions or rejection. Moreover, Mg implants degrade gradually within the body, eliminating the need for additional removal surgeries and reducing patient discomfort and healthcare expenses. With mechanical properties closely resembling natural bone, Mg and its alloys offer improved load-bearing capabilities and diminished stress shielding effects, potentially leading to enhanced patient outcomes [9]. Additionally, Mg’s low density contributes to the lightweight nature of implants, alleviating stress on surrounding tissues and enhancing patient comfort, particularly in orthopedic applications. Overall, Mg implants offer a compelling combination of biocompatibility, biodegradability, mechanical properties, and corrosion resistance, making them an attractive choice for various medical applications.
However, despite the advantages of Mg, it faces some limitations due to its weak corrosion resistance. Its susceptibility to corrosion with a standard potential of −2.34 V vs. NHE in corrosive environments impedes its wider utilization, leading to rapid degradation when exposed to such conditions [10]. Therefore, it is crucial to address this challenge to maximize its potential in various applications. In recent years, several strategies have emerged to control the corrosion of Mg and its alloys [11]. These techniques include altering alloy composition or microstructure to create high-purity alloys, surface modifications, designing structures to prevent galvanic pair formation, and the use of protective coatings like chemical conversion and polymer coatings [12,13,14,15,16,17].
Hydroxyapatite (HA), a biocompatible and biodegradable chemical coating from the calcium phosphate family (Ca5(PO4)3OH), has gained attention as a new chemical coating generation in medical applications [18]. The main advantage of HA is its bone-like composition, aiding in bone bonding. Studies on HA-coated Mg alloys prove its interesting compatibility with bodily conditions [19]. However, HA coatings have some limitations, such as their insufficient density and purity to offer long-term corrosion protection. They tend to be brittle and susceptible to breakage from hydrogen gases produced during the corrosion process [20]. Therefore, recent research has focused on enhancing HA coatings by modifying factors and experimenting with different polymers to improve density, purity, uniformity, and adhesion to the Mg substrate, to ultimately increase corrosion resistance. Proper pretreatment of the Mg surface plays a crucial role, either by facilitating the creation of a dense and uniform HA coating or by blocking corrosive elements, thereby shielding the magnesium surface from corrosion.
The emergence of Industry 4.0 has led to an increased utilization of machine learning techniques in the fields of industrial chemistry and the development of chemical products [21]. Supervised learning methods are the most commonly employed techniques in the chemical industry, constituting approximately 70% of the total methods utilized, while hybrid, unsupervised learning, and combinatorial methods are less frequently employed compared to supervised learning [22]. In recent years, supervised machine learning and deep learning methods have been successfully applied to address various chemical design problems, including modeling, optimization, control and monitoring, design and discovery, support for sensory analysis, and reaction prediction [23,24,25,26].
Recently, researchers have been advancing the use of rare metal conversion coatings, such as cerium (Ce) coatings, known for their eco-friendliness, on metals like aluminum and Mg alloys [27,28,29]. This study explores leveraging Ce to enhance the HA coatings, leading to a novel coating called HA+Ce. Our motivation is to enhance the corrosion resistance of Mg implants by introducing a novel coating, termed HA+Ce, which combines HA nanoparticles with Ce coatings. This innovative approach represents the first instance of incorporating Ce into HA-coated Mg implants, leveraging Ce’s known eco-friendliness and corrosion-resistant properties. To optimize the HA+Ce compound solution, a hybrid artificial intelligence technique is employed, merging machine learning models with metaheuristic-driven optimization algorithms. This integrated approach, utilizing a combination of random forest (RF) and whale optimization algorithm (WOA), facilitates the search for the most effective HA+Ce compound. Through extensive experimentation and evaluation, involving the generation and in vitro assessment of over a thousand HA+Ce compounds, comprehensive data is collected to train the RF model and guide the optimization process. The corrosion resistance of the final optimized HA+Ce coating solution is thoroughly evaluated using electrochemical impedance tests, while the surface quality is scrutinized via FE-SEM tests, ultimately providing insights into the efficacy and performance of the innovative coating formulation. We have specifically selected the WOA algorithm as the metaheuristic component of our solution method. This algorithm possesses numerous advantages, such as rapid convergence, a well-balanced approach to both exploring and exploiting the problem space, simplicity, flexibility, and robustness. These favorable characteristics make the WOA algorithm a highly promising approach for optimizing problems with continuous parameters [30].
Overall, our key contributions can be mentioned as follows:
  • Introducing a new HA-based coating through adding Ce to the solution containing HA nanoparticles (called HA+Ce), to improve its performance against corrosion. This is the first time that Ce has been added to HA-coated Mg implants.
  • Presenting a combined machine learning–metaheuristic solution method based on RF and WOA to search for the best HA+Ce compound. To the best of our knowledge, this is the first study to utilize a hybrid technique based on machine learning and metaheuristic algorithms for coating optimization.
  • Collecting a comprehensive dataset through generating and in vitro evaluating 1024 HA-Ce compounds with different coating factors (e.g., concentration, pH, immersion time, and temperature) using EIS and DC polarization tests.
  • Training an RF model on the collected dataset and utilizing WOA to optimize the HA+Ce coating solution utilizing the RF model as the objective function. The WOA calls RF to estimate the corrosion resistance of new unseen coating solutions.
  • Evaluating the corrosion resistance of the final optimized HA+Ce coating solution found by WOA-RF model using electrochemical impedance tests. Also, FE-SEM tests are used to investigate the quality of the surface of the final HA+Ce coating solution.
In the rest of this paper, Section 2 reviews the existing literature on HA-coated Mg implants. Our experimental design for the HA+Ce coating is illustrated in Section 3. The proposed hybrid three-stage methodology to optimize the proposed HA+Ce solution is described in Section 4. Experimental results and simulations are provided in Section 5. Finally, the concluding remarks and possible future research directions are discussed in Section 6.

2. Literature Review

Numerous studies have been conducted on the modification methods of Mg surface to improve the performance of coatings such as HA. For instance, Kazemi et al. [31] utilized a zirconium-based conversion coating for this purpose and demonstrated that the corrosion resistance in simulated body fluid (SBF) environment significantly improves in the presence of this conversion coating. In another study, AhadiParsa et al. [32] used silane compounds to modify the Mg surface and showed that these silane compounds alter the chemistry and physics of the surface and lead to better performance of the HA coating.
Over the past years, the application of conversion coatings made from rare metals by researchers has been progressing. Among them, Ce conversion coating has emerged as an environmentally friendly solution, which has been used on various metals including aluminum and Mg alloys [27]. A main positive feature of the Ce oxide layer deposited on the surface of an oxidizable metal is its self-healing ability after damage. Ce conversion coatings apparently work similarly to old conversion coatings (such as chromate), although their efficiency is not as high as chromate conversion coatings [27,28,29].
Lee et al. [33] investigated the formation mechanism and corrosion protection properties of stannate and Ce conversion coatings on AZ91D magnesium alloys. They prepared the alloy samples and applied the coatings using specific chemical solutions after surface treatments. Various analytical techniques were used to examine the coated samples, revealing that the stannate coating formed a dense and uniform layer of tin oxide compounds, providing corrosion resistance through a physical barrier. The Ce-based coating formed an irregular structure of Ce oxide compounds, offering corrosion protection through barrier properties and self-healing mechanisms. They discussed the influence of coating parameters and highlighted the improved corrosion resistance of the coated samples compared to uncoated AZ91D alloy.
In this paper, we introduce a new improved HA+Ce coating solution through the addition of Ce to HA coating, aiming at increasing its resistance to corrosion. Furthermore, to obtain the best achievable HA+Ce compound, we present the use of a hybrid technique utilizing machine learning empowered metaheuristic optimization algorithms to optimize the HA+Ce coating solution.

3. Experimental Design

In our experiments, a 10 wt.% suspension of HA in water were sourced from Padideh Zisti Nano in Tehran, Iran. The selection of a 10 wt.% suspension of HA was based on practical considerations aimed at optimizing the performance of the coating. This concentration was chosen as it strikes a balance between ensuring adequate HA incorporation for corrosion resistance enhancement and maintaining the mechanical integrity of the coating [34]. Higher concentrations of HA may lead to increased brittleness or reduced adhesion strength of the coating, compromising its effectiveness and longevity. Conversely, lower concentrations may not provide sufficient corrosion protection. Therefore, the 10 wt.% suspension was deemed optimal to achieve the desired corrosion resistance while preserving the coating’s mechanical properties, ensuring the practical viability and effectiveness of the HA+Ce Mg implant coating solution.
Other materials include nitric acid (HNO3) in a 65 vol.% solution, potassium hydroxide (KOH) with a molecular weight of 74.55 g·mol−1, sodium hydroxide (NaOH) with a molecular weight of 40 g·mol−1, acetic acid (CH3COOH) with a molecular weight of 60.05 g·mol−1, and Ce nitrate purchased from Merck Company, Rahway, NJ, USA.

3.1. Surface Preparation

Initially, AZ31 Mg alloy samples, comprising 2.5–3.5 wt.% Al, 0.2–1 wt.% Mn, 0.7–1.3 wt.% Zn, and the remaining portion being Mg, were cut into 20 × 20 × 5 mm3 pieces. These pieces underwent polishing using silicon carbide sandpapers of 400, 800, and 1200 grit, followed by cleaning with acetone. Then, the samples underwent specific chemical treatments: immersion in a 1 wt.% HNO3 solution for 20 s to remove oxides, soaking in a 10 wt.% KOH solution for 5 min to eliminate grease, and immersion in a 1 M CH3COOH solution for 10 s to activate the Mg AZ31 surface. All treatments were conducted at room temperature (23 ± 2 °C), with the samples being rinsed with deionized water after each step.

3.2. Coatings Preparation

In formulating the HA+Ce coating, initially, AZ31 samples were coated with HA following optimal conditions from [35]: a solution concentration of 1 g·L−1, pH of 4.3, temperature at 75 ± 5 °C, for 60 min, stirring at 400 rpm. Subsequently, Ce was introduced into the HA+Ce solution to alter the electrochemical properties of the HA coating. This involved adding Ce nitrate (at 1 g·L−1 concentration) to the HA solution, adjusting the pH to 4.3 using HNO3 and NaOH, and maintaining the solution temperature at 75 ± 5 °C. The AZ31 Mg substrates were then immersed for 15, 30, and 60 min at a stirrer speed of 400 rpm in the solution containing both Ce and HA. To create a dataset for training a machine learning model (outlined in Section 4.1), various HA+Ce coating solutions with different input parameters were prepared in the subsequent step.
For the examination of the conversion coatings’ microstructure, field emission scanning electron microscopy (FE-SEM) was employed, utilizing the TESCAN Mira III Model. This instrument is also equipped with energy dispersive X-ray spectrum (EDAX) capabilities, allowing for the determination of the elemental composition of various samples coated with Ce and HA.

3.3. Anticorrosion Performance Evaluation

To understand the impacts of adding HA and Ce coatings, an uncoated AZ31 Mg piece served as a reference sample. Comprehensive studies on the corrosion behavior of the coated samples were conducted via DC polarization and electrochemical impedance spectroscopy (EIS) using the Autolab PGSTAT 302 N. EIS investigations employed a 10 mV amplitude and a frequency range of 100 kHz to 10 mHz. During EIS testing, each sample was immersed for 3 min, while DC polarization involved a 10 min immersion. Each sample underwent three tests for consistency. Zsimp (Ver. 3.5) software was employed to analyze the collected data. To ensure test consistency, a specific area of the AZ31 Mg alloy’s treated surface was sealed with a hot melt mixture of beeswax and colophony resin for electrochemical tests. These tests were performed in a three-electrode cell using SBF solution (50 ± 2 mL), where the specimen acted as the working electrode (1 cm2), while Ag/AgCl and platinum served as the reference and counter electrodes, respectively. Accordingly, Table 1 provides the composition of the SBF used in the experiment, which is based on [35].
To explore how coated samples interact in physiological environments, they were submerged in SBF media for three weeks. Electrochemical impedance spectroscopy (EIS) was conducted at different exposure durations (1 h, 1 day, 7 days, 21 days) at a temperature of 37 ± 1 °C. The SBF solution used closely mimicked the pH levels and ion concentrations found in human blood plasma. Alongside, visual documentation of the samples immersed in the SBF solution was carried out. The Field Emission Scanning Electron Microscope—FE-SEM (TESCAN Vega II and Mira III Models, TESCAN, Brno, Czech Republic) captured images of gold-coated samples before and after a one-week immersion in the SBF solution. Additionally, the RONTEC QuanTax 200 Software-driven Energy-dispersive X-ray spectrum analysis was employed to further scrutinize sample composition. To monitor hydrogen evolution, substrates were placed in the SBF solution at 37 °C under an inverted funnel connected to a graduated burette. The water level in the burette was periodically checked for 180 h while ensuring full surface exposure of the samples.

4. Optimization Methodology Using WOA-RF

As mentioned above, our strategy for maximizing the resistance of the proposed HA+Ce coating solution against corrosion is a three-stage method based on in vitro experiments, simulations, and metaheuristic optimization. In the first stage (Section 4.1), various HA+Ce compounds with different input factors are examined to collect a comprehensive dataset comprising 1024 coating samples. In the second stage (Section 4.2), this dataset is used to train the RF-based machine learning model, in order to estimate the corrosion resistance based on the input coating factors. In the third stage (Section 4.3), the WOA-based metaheuristic algorithm is used to find the best HA+Ce compound that maximizes the corrosion resistance of the coating. The operation of the proposed WOA-RF methodology is illustrated in Algorithm 1. In the following, these processes are described in detail.
Algorithm 1. Combined WOA-RF model for optimizing the HA+Ce coating solution
Inputs:
   Collected dataset comprising 1024 HA+Ce coating samples
   Parameters of WOA (decision variables and ranges, population size, max iterations, and b)
   Parameters of RF (No. DTs, aggregation rule, percentages of train and test data samples)
Data Collection:
1.  fors = 1: number of HA+Ce coating samples
2.    Generate the corresponding HA+Ce coating solution
3.    Evaluate the generated coating solution
4.              Save the data sample: inputs (coating factors) and output (corrosion resistance)
5.    Save the input features and output resistance
6.  end for
7.  Dividing the whole dataset (1024 data samples) into train (70%) and test (30%) datasets
Training Phase:
8.  for  t = 1 : number of DTs
9.    Train DT t using 50% of training samples (bagging method)
10.   end for
11.  Save the trained RF model
Test Phase:
12.  for  d = 1 : No. test samples
13.    for  t = 1 : number of DTs
14.      Calculate the output of DT t for sample d
15.    end for
16.    Estimate the final output of sample d through aggregating the outputs of all DTs for sample d
17.  end for
18.  Generalizability evaluation of the RF model on test samples
Optimization Phase:
19.  Utilizing RF to estimate the corrosion resistance of HA+Ce coating solutions
20.  Applying WOA to find the best HA+Ce coating solution
Output: Optimized HA+Ce coating solution

4.1. Data Collection

To collect the corresponding HA+Ce data samples for training the RF model, we considered 1024 experiments by changing the values of the Ce/HA concentration, Ce/HA pH, Ce/HA temperature, and Ce/HA/HA+Ce immersion time, as summarized in Table 2. For generating a data sample, each input factor has been considered with a value within its specified range as provided in Table 2. After some experiments, we have collected a set of 1024 different HA+Ce coating samples, which are used to learn the behavioral pattern of the HA+Ce coating using a machine learning model.

4.2. Machine Learning Model

After collecting HA+Ce data samples, the full dataset comprising 1024 samples was divided into 717 training samples (70%) and 307 test samples (30%). To learn the relation between the coating factors and corrosion resistance, we performed an RF model, which builds multiple decision trees (DTs) in parallel [36]. In general, DTs can be viewed in two different ways depending on the characteristics of the input variables (features) and the output variable (target). When the target variable is numerical and continuous, the problem is referred to as regression. On the other hand, if the target variable is categorical, it is considered a classification problem [37]. While there are various types of DT algorithms described in the literature such as ID3, C4.5, and classification and regression trees (CART), we specifically employ CART for solving our regression problem, as it is one of the most commonly referenced algorithms [38]. CART is capable of handling both categorical and continuous features, and it can generate regression trees that not only predict the class but also the exact value of the target variable [39]. In the case of regression trees involving continuous features, each feature is divided at different points using thresholds, which can be tuned based on the error between the actual value of the target variable and the predicted value of the output variable [40].
The RF technique, first introduced by Breiman in 2021 [41], is a supervised machine learning approach that utilizes the CART decision tree algorithm and ensemble methods to address both classification and regression problems. Instead of constructing a single DT (i.e., CART in our model), the RF method typically generates multiple DTs and combines their outputs using an aggregation technique. The commonly employed approach for growing trees in RF is called bagging, which involves sampling rows with replacement to create different bootstrap samples. The idea behind bagging is to build CART trees from diverse bootstrap samples, adjust the predictions, and thereby create a diverse set of predictors. The aggregation step then allows for obtaining a robust and more efficient predictor [40]. The bagging technique within RF effectively minimizes variance and guards against overfitting by reinforcing the model through random sample selection for training individual DTs [42]. After training a collection of DTs, the ultimate prediction for each test sample is calculated by combining the predictions from all DTs using a simple averaging approach. This ensures a more robust and reliable outcome by considering the collective insights of multiple decision trees [43].
As depicted in Figure 1, every coating sample is characterized by a feature vector of length 9, along with a target output defining its corrosion resistance. Within the RF model, each DT is trained using the bagging technique under 50% of the training samples. Following the training phase, the test data samples are employed to assess the model’s adaptability to new samples. This involves comparing the resistance estimates provided by the RF model with the actual resistances measured through experimentation. The final output of the RF model for a test sample “d” can be computed as followsFormu:
O u t p u t d = 1 T t = 1 T o u t t , d
where o u t t , d is the estimated resistance by DT t for the data sample d and T is the number of DTs within the RF model.
Following the assessment of corrosion resistance in all test data samples via the RF model, the estimated resistances are juxtaposed against the actual values (measured experimentally). This comparison relies on metrics including mean absolute error (MAE), root-mean-square error (RMSE), mean percent error (MPE), and correlation (R), evaluated in the subsequent manner:
MAE = 1 D T e s t d = 1 D T e s t O u t p u t d A c t u a l d
RMSE = 1 D T e s t d = 1 D T e s t O u t p u t d A c t u a l d 2
MPE = 1 D T e s t d = 1 D T e s t O u t p u t d A c t u a l d A c t u a l d
R = 1 D T e s t d = 1 D T e s t O u t p u t d O u t p u t d ¯ × A c t u a l d A c t u a l d ¯ 1 D T e s t d = 1 D T e s t O u t p u t d O u t p u t d ¯ 2 × 1 D T e s t d = 1 D T e s t A c t u a l d A c t u a l d ¯ 2
where A c t u a l d is the actual corrosion resistance experimentally measured for the test data sample d.

4.3. Optimization Procedure Using WOA

We utilize a metaheuristic-driven optimization algorithm based on WOA to optimize the HA+Ce coating solution. The objective is to find the best input factors of the HA+Ce coating solution that leads to obtaining the maximum corrosion resistance. WOA is a metaheuristic approach introduced by Mirjalili and Lewis [30]. The core process of WOA begins with an initial population chosen randomly. In each iteration, the algorithm evaluates the fitness of each whale based on the given objective function. Subsequently, the WOA population undergoes updates through activities like hunting for prey, encircling prey, and employing bubble-net attacks [44]. These steps are repeated iteratively until reaching a predetermined maximum number of iteration counts.

4.3.1. Solution Representation

As seen in Figure 2, a feasible solution (whale) to optimize the HA+Ce coating is encoded by a vector of length 9. The decision variables include Ce concentration (Ce Con), HA concentration (HA Con), Ce pH (Ce pH), HA pH (HA pH), Ce temperature (Ce Tem), HA temperature (HA Tem), Ce immersion time (Ce ImT), HA immersion time (HA ImT), and HA+Ce immersion time (HACe ImT).

4.3.2. Objective Function Evaluation

The fitness of each coating solution is considered to maximize the corrosion resistance of the corresponding HA+Ce solution. For each existing HA+Ce sample, the experimentally measured resistance is considered as the fitness value. However, for the new unseen HA+Ce samples, the RF model is called to estimate the corrosion resistance of the corresponding solution.

4.3.3. Population Updating

For the updating process of each whale, a random value p within the range of [0, 1] and a randomly generated vector A are employed. When p is greater than or equal to 1, the solution is updated through bubble-net attacking [45]. If p is less than 0.5 and the magnitude of vector A is greater than or equal to 1, the whale undergoes an update via prey search. Alternatively, if the magnitude of A is less than 1, the whale is updated using the encircling prey method [46].
  • Search for prey: Each whale X may move toward other randomly selected whale, to emphasize more exploration. This action can be described as moving the whale in the direction of a randomly chosen whale Xtrand, as follows:
    X t + 1 = X t rand a ( 2 r 1 ) 2 r X t rand X t
  • Encircling prey: In each iteration, every whale has the ability to pinpoint the position of the prey, which represents the best solution found until that point (denoted as X*). The other whales then attempt to encircle this best solution by employing the encircling prey operator, as defined in Equation (7). Here, a represents a parameter that linearly decreases from 2 to 0, r is a randomly generated vector within the range of [0, 1], and t indicates the current iteration number.
    X t + 1 = X * a ( 2 r 1 ) 2 r X * X t
  • Bubble-net attacking: The movement pattern of whales, resembling a helix (known as bubble-net attacking behavior), can be represented using a spiral equation outlined in Equation (8). Here, l stands for a parameter chosen uniformly at random from the range of [−1, 1], while b is a constant typically set between 0 and 1.
    X t + 1 = X * S t e b l cos ( 2 π l ) + X *

5. Results and Discussion

5.1. Parameter Setting

To set the adjustable parameters of the proposed WOA-RF model, various values were tested for each parameter. Accordingly, the best values were selected based on their impact on both convergence speed and the final fitness value, which in this context refers to the corrosion resistance. These chosen parameter settings were utilized for the final simulations, delineated in Table 3, outlining the parameter configurations across different phases of both WOA and RF. In the conducted in vitro experiments, a total of 1024 samples were collected over a period of 14 days, encompassing the data collection process. The complete dataset consisting of 1024 samples was partitioned into a training dataset (70%—717 samples) and a test dataset (30%—307 samples), as previously mentioned.

5.2. Results of HA+Ce Coating

After adding the Ce nitrate in the coating solution to modify HA to HA+Ce coating, the immersion time, as a highly influential parameter in the formation of the coating, was examined through EIS and SEM tests. Based on cross-section SEM images, the thickness of the hydroxyapatite coating is about 2 to 30 microns. This change in thickness depends on the conditions of coating and surface preparation. Figure 3 shows the Nyquist plot for HA+Ce coatings at different immersion times and film formation of 15, 30, and 60 min. The EIS curves were fitted by single and double time-constant equivalent circuits shown in Figure 3, wherein Rc and CPEc represent the coating resistance and coating capacitance, respectively. Furthermore, the obtained parameters are reported in Table 4. According to Table 4, it is observed that the lowest polarization resistance Rp and absolute impedance at the frequency of 0.01 Hz (|Z| 0.01 Hz) belong to the coating at the shortest time. The low resistance of this sample (Rp = 5020 ohm·cm2) is likely due to insufficient immersion time. Consequently, it did not have adequate time to interact with the coating solution, resulting in the inability to form a uniform and complete coverage.

5.3. Results of RF

This section showcases the outcomes of the RF model applied to 717 training and 307 test samples of HA+Ce. To assess the model’s adaptability to new samples, diverse performance metrics as formulated in Equations (2)–(5) were computed for both the training and test datasets, as detailed in Table 5. The slight variance observed in the performance metrics between the training and test datasets signifies the RF model’s strong capability to generalize well to new samples. Furthermore, the correlation between estimated and actual corrosion resistances and the error between the estimated and measured (actual) values for the test HA+Ce data samples are provided in Figure 4a,b, respectively. A good match between the estimated corrosion resistances obtained by the RF model and those measured experimentally indicates that the RF model can be applied for estimating the corrosion resistance in new unseen (unmeasured experimentally) HA+Ce samples with new compounds.
To justify the effectiveness of the RF model, we compare it against four machine learning models: K-nearest neighbors (KNN), naïve Bayes (NB), decision trees (DT), and support vector regression (SVR). To configure the KNN and SVM models, we conducted an evaluation of various parameter settings. For the KNN model, we explored different values of K, specifically K ∈ {1, 2, 3, 4, 5, 6, 7}. As for the SVM model, we considered different kernel functions, namely linear, polynomial, and Gaussian (RBF). Through a process of trial and error, we determined that setting K = 5 yielded the optimal performance for the KNN model, while employing the RBF kernel function resulted in the highest performance for the SVM model, both in terms of the correlation factor, i.e., R.
Table 6 summarizes the obtained results on test HA+Ce samples. Moreover, Figure 5 graphically provides a comparison of the different techniques in terms of error measures (MAE and RMSE) and correlation factors (R and R2). According to the obtained results, the RF (which is an ensemble of multiple DTs) has the best results, and then, DT, and SVM, are in the second and third orders. As a result, we have considered the trained RF model as the best machine-learning model for the objective function core embedded in the WOA algorithm.

5.4. Results of WOA

By applying WOA to search among the whole search space, the convergence curve of the algorithm has been achieved as seen in Figure 6. It can be seen that the WOA algorithm starts from the best corrosion resistance of 7263 in the initial population. Then, the WOA algorithm gradually tries to improve the best corrosion resistance, resulting in the global best solution with the final optimized HA+Ce coating compound with a corrosion resistance of 9221 (estimated by RF). The corresponding input factors of the optimized HA+Ce solution have been obtained as summarized in Table 7. In Section 5.5, this coating solution is experimentally evaluated to verify its effectiveness, and then, it is compared with bare Mg, Ce, and HA coating solutions in terms of different performance measures.

5.5. Results of Optimized HA+Ce Coating Solution

After performing WOA-RF methodology, the values of the input factors of the HA+Ce coating solution have been obtained as mentioned in Table 7. In the following, detailed simulations on the final optimized HA+Ce coating solution and comparison with bare Mg, Ce, and HA coatings are provided.
To investigate the anti-corrosion performance of samples, EIS tests were performed on different samples at specific times. Figure 7 provides the Nyquist plot of the uncoated Mg, HA, and HA+Ce at different immersion times in SBF solution. The Nyquist plots in this figure are fitted by an equivalent circuit with two time constants. The results obtained from the EIS test after fitting are listed in Table 8. It should be noted that the fitting error of the results is less than 8%. After three weeks of immersion in SBF, the resistance of all samples has significantly decreased. The decrease in polarization resistance in the HA+Ce coating is less compared to other coatings, and its value is approximately two times the polarization resistance of the HA sample with similar immersion times.
Figure 8 presents the FE-SEM images of the uncoated Mg alloy, HA, and HA+Ce samples after being immersed in a SBF for one week. As per Figure 8a, after one week of immersion, corrosion products appear on the surface of the uncoated Mg alloy, and corrosion cracks become visible on its surface. It should be mentioned that the hydroxyapatite coating undergoes chemical interactions after being exposed to the SBF environment. Parts of the coating are destroyed in the presence of the electrolyte and also new phases are formed in contact with the SBF. As a result, the surface roughness of the sample has changed. As shown in Figure 8b, the surface morphology of the HA coating has changed, and its cluster-like structures have degraded, which could affect the long-term protection of this coating. However, for the HA+Ce coatings (Figure 8c), after one week of immersion the coating surface has undergone minor changes and a series of white deposits have formed on the coating surface; the coatings have managed to maintain their protective performance according to the EIS test results.
According to the DC polarization measurements, as expected, the Mg sample has the weakest performance and shows the least resistance to corrosion. The direct current polarization test shows that the corrosion current density for the bare Mg, HA, and HA+Ce are 14.01 µA/cm2, 4 µA/cm2, and 1.05 µA/cm2, respectively. The results show a significant reduction of the current density of the proposed HA+Ce coating solution with a gain of 92.5% and 73.7% against the bare Mg and the HA-coated Mg implant, respectively. It indicates a better resistance of the proposed HA+Ce coating solution compared to the bare Mg and HA-coated implants in the corrosive environment.

6. Conclusions

In this study, the role of Ce as a modifier for HA coating has been examined in terms of corrosion resistance and performance in a SBF environment, resulting in a new improved HA+Ce coating solution. Initially, the performance of the coatings was evaluated via EIS and DC polarization and the results indicated the effective performance of Ce as a coating modifier, which led to an increase in polarization resistance. Then, we presented a hybrid experimental/simulation/optimization technique to enhance the corrosion resistance of HA+Ce coated Mg implants. To achieve this goal, we experimentally collected a dataset of various HA+Ce coating samples. Then, an artificial intelligence approach based on machine learning (i.e., random forest) and metaheuristic algorithms (i.e., whale optimization algorithm) has been utilized to maximize the corrosion resistance of the HA+Ce solution. According to the obtained results, it can be said that when the Ce conversion coating is placed as an intermediate layer between HA and the Mg surface, it causes better adhesion of the coating to the surface, and when used alongside HA within the coating, by controlling film formation and changing surface morphology, it can improve the corrosion resistance performance of the proposed HA+Ce coated Mg implants. The proposed HA+Ce coating solution can be used to enhance the corrosion resistance in various applications such as biomedical implants, marine equipment, aerospace structures, automotive parts, electronic devices, oil and gas infrastructure, infrastructure rehabilitation, and renewable energy systems.
In this paper, for the first time, we have introduced the use of artificial intelligence and optimization techniques to find the best coating compound. As a future research direction, other artificial intelligence techniques such as various machine learning models, deep learning networks, and fuzzy sets and systems, could be applied to optimize the coating solutions. As a potential avenue for future research, it would be beneficial to explore and assess newer metaheuristic algorithms like fuzzy heuristic ant colony optimization (FH-ACO) [47], artificial hummingbird algorithm (AHA) [48], fire hawk optimizer (FHO) [49], and puma optimizer (PO) [50] to enhance the optimization of coating solutions. Furthermore, other performance measures of the coating solutions can be investigated and integrated into multi-objective Pareto-based metaheuristic optimization techniques.

Author Contributions

Writing—original draft, Z.R., F.A.T., S.P. and H.E.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The raw/processed data required to reproduce these findings cannot be shared at this time as the data also forms part of an ongoing study.

Conflicts of Interest

The authors declare that they have no known competing financial interests or personal relationships that could have influenced the work reported in this paper.

References

  1. Jayasathyakawin, S.; Ravichandran, M.; Baskar, N.; Chairman, C.A.; Balasundaram, R. Mechanical properties and applications of Magnesium alloy—Review. Mater. Today Proc. 2020, 27, 909–913. [Google Scholar] [CrossRef]
  2. Ahangari, M.; Johar, M.H.; Saremi, M. Hydroxyapatite-carboxymethyl cellulose-graphene composite coating development on AZ31 magnesium alloy: Corrosion behavior and mechanical properties. Ceram. Int. 2021, 47, 3529–3539. [Google Scholar] [CrossRef]
  3. Li, Q.; Ye, W.; Gao, H.; Gao, L. Improving the corrosion resistance of ZEK100 magnesium alloy by combining high-pressure torsion technology with hydroxyapatite coating. Mater. Des. 2019, 181, 107933. [Google Scholar] [CrossRef]
  4. Ho, Y.H.; Man, K.; Joshi, S.S.; Pantawane, M.V.; Wu, T.C.; Yang, Y.; Dahotre, N.B. In-vitro biomineralization and biocompatibility of friction stir additively manufactured AZ31B magnesium alloy-hydroxyapatite composites. Bioact. Mater. 2020, 5, 891–901. [Google Scholar] [CrossRef]
  5. Zhu, Y.; Liu, W.; Ngai, T. Polymer coatings on magnesium-based implants for orthopedic applications. J. Polym. Sci. 2022, 60, 32–51. [Google Scholar] [CrossRef]
  6. Mohanasundaram, S.; Bhong, M.; Vatsa, G.; Verma, R.P.; Srivastava, M.; Kumar, G.; Gupta, L.R. Mg-based metal matrix composite in biomedical applications: A review. Mater. Today Proc. 2023. [Google Scholar] [CrossRef]
  7. Xing, F.; Li, S.; Yin, D.; Xie, J.; Rommens, P.M.; Xiang, Z.; Ritz, U. Recent progress in Mg-based alloys as a novel bioabsorbable biomaterials for orthopedic applications. J. Magnes. Alloys 2022, 10, 1428–1456. [Google Scholar] [CrossRef]
  8. Badkoobeh, F.; Mostaan, H.; Rafiei, M.; Bakhsheshi-Rad, H.R.; RamaKrishna, S.; Chen, X. Additive manufacturing of biodegradable magnesium-based materials: Design strategies, properties, and biomedical applications. J. Magnes. Alloys 2023, 11, 801–839. [Google Scholar] [CrossRef]
  9. Kumar, R.; Agrawal, A. Micro-hydroxyapatite reinforced Ti-based composite with tailored characteristics to minimize stress-shielding impact in bio-implant applications. J. Mech. Behav. Biomed. Mater. 2023, 142, 105852. [Google Scholar] [CrossRef]
  10. Yue, J.; Lou, G.; Zhou, G.; Leng, J.; Feng, Y.; Teng, X. Corrosion resistance of zinc phosphate conversion coatings on az91d surface. Mater. Sci. Forum 2020, 993, 1110–1117. [Google Scholar] [CrossRef]
  11. Cui, L.Y.; Cheng, S.C.; Liang, L.X.; Zhang, J.C.; Li, S.Q.; Wang, Z.L.; Zeng, R.C. In vitro corrosion resistance of layer-by-layer assembled polyacrylic acid multilayers induced Ca–P coating on magnesium alloy AZ31. Bioact. Mater. 2020, 5, 153–163. [Google Scholar] [CrossRef]
  12. Yadav, V.S.; Kumar, A.; Das, A.; Pamu, D.; Pandey, L.M.; Sankar, M.R. Degradation kinetics and surface properties of bioceramic hydroxyapatite coated AZ31 magnesium alloys for biomedical applications. Mater. Lett. 2020, 270, 127732. [Google Scholar] [CrossRef]
  13. Zhu, W.; Chen, F.; Yi, A.; Liao, Z.; Li, W.; Li, K.; Chen, K.; Liang, G.; Guo, J.T.; Wu, Q. Titanium, zirconium and vanadium conversion coatings (TZVCCs) on AZ91D magnesium alloy sheets. Mater. Res. Express 2020, 7, 86402. [Google Scholar] [CrossRef]
  14. Guo, Y.; Su, Y.; Gu, R.; Zhang, Z.; Li, G.; Lian, J.; Ren, L. Enhanced corrosion resistance and biocompatibility of biodegradable magnesium alloy modified by calcium phosphate/collagen coating. Surf. Coat. Technol. 2020, 401, 127322. [Google Scholar] [CrossRef]
  15. Rahimi, M.; Aghdam, R.M.; Sohi, M.H.; Rezayan, A.H.; Ettelaei, M. Improving biocompatibility and corrosion resistance of anodized AZ31 Mg alloy by electrospun chitosan/mineralized bone allograft (MBA) nanocoatings. Surf. Coat. Technol. 2021, 405, 126627. [Google Scholar] [CrossRef]
  16. Singh, N.; Batra, U.; Kumar, K.; Ahuja, N.; Mahapatro, A. Progress in bioactive surface coatings on biodegradable Mg alloys: A critical review towards clinical translation. Bioact. Mater. 2023, 19, 717–757. [Google Scholar] [CrossRef]
  17. Chen, J.; Liu, X.; Hong, Q.; Meng, L.; Ji, Y.; Wang, L.; Pan, C. Synthesizing a multifunctional polymer to construct the catalytically NO-generating coating for improving corrosion resistance and biocompatibility of the magnesium alloy stent materials. Prog. Org. Coat. 2024, 186, 108058. [Google Scholar] [CrossRef]
  18. Zomorodian, A.; Garcia, M.P.; Silva, T.M.E.; Fernandes, J.C.S.; Fernandes, M.H.; Montemor, M.F. Biofunctional composite coating architectures based on polycaprolactone and nanohydroxyapatite for controlled corrosion activity and enhanced biocompatibility of magnesium AZ31 alloy. Mater. Sci. Eng. C 2015, 48, 434–443. [Google Scholar] [CrossRef]
  19. Dorozhkin, S.V. Calcium orthophosphate coatings on magnesium and its biodegradable alloys. Acta Biomater. 2014, 10, 2919–2934. [Google Scholar] [CrossRef] [PubMed]
  20. Zhou, Z.; Zheng, B.; Gu, Y.; Shen, C.; Wen, J.; Meng, Z.; Chen, S.; Ou, J.; Qin, A. New approach for improving anticorrosion and biocompatibility of magnesium alloys via polydopamine intermediate layer-induced hydroxyapatite coating. Surf. Interfaces 2020, 19, 100501. [Google Scholar] [CrossRef]
  21. He, C.; Zhang, C.; Bian, T.; Jiao, K.; Su, W.; Wu, K.J.; Su, A. A Review on Artificial Intelligence Enabled Design, Synthesis, and Process Optimization of Chemical Products for Industry 4.0. Processes 2023, 11, 330. [Google Scholar] [CrossRef]
  22. Trinh, C.; Meimaroglou, D.; Hoppe, S. Machine learning in chemical product engineering: The state of the art and a guide for newcomers. Processes 2021, 9, 1456. [Google Scholar] [CrossRef]
  23. Petchimuthu, P.; Sumanth, G.B.; Kunjiappan, S.; Kannan, S.; Pandian, S.R.K.; Sundar, K. Green extraction and optimization of bioactive compounds from Solanum torvum Swartz. using ultrasound-aided solvent extraction method through RSM, ANFIS and machine learning algorithm. Sustain. Chem. Pharm. 2023, 36, 101323. [Google Scholar] [CrossRef]
  24. Yin, Y.; Jin, J.X.; Ren, G.P.; Wu, K.J.; He, C.H. Accelerated room temperature synthesis of desired cesium lead halide perovskite nanocrystals via automated microfluidic meta learner. Chem. Eng. Sci. 2023, 282, 119318. [Google Scholar] [CrossRef]
  25. Chen, X.; Shafizadeh, A.; Shahbeik, H.; Rafiee, S.; Golvirdizadeh, M.; Moradi, A.; Aghbashlo, M. Machine learning-based optimization of catalytic hydrodeoxygenation of biomass pyrolysis oil. J. Clean. Prod. 2024, 437, 140738. [Google Scholar] [CrossRef]
  26. Qikun, M.A. Machine learning-based optimization for catalytic sulfur removal: Computational modeling and analysis of fuel purification for reduction of environmental impacts. Case Stud. Therm. Eng. 2024, 53, 103835. [Google Scholar] [CrossRef]
  27. Jian, S.Y.; Yang, C.Y.; Chang, J.K. Robust corrosion resistance and self-healing characteristics of a novel Ce/Mn conversion coatings on EV31 magnesium alloys. Appl. Surf. Sci. 2020, 510, 145385. [Google Scholar] [CrossRef]
  28. Khast, F.; Saybani, M.; Dariani, A.A.S. Effects of copper and manganese cations on cerium-based conversion coating on galvanized steel: Corrosion resistance and microstructure characterizations. J. Rare Earths 2022, 40, 1002–1006. [Google Scholar] [CrossRef]
  29. Hsieh, C.Y.; Huang, S.Y.; Chu, Y.R.; Yen, H.W.; Lin, H.C.; Shih, D.S.; Kawamura, Y.; Lee, Y.L. Role of second phases in the corrosion resistance and cerium conversion coating treatment of as-extruded Mg–8Al–4Ca magnesium alloy. J. Mater. Res. Technol. 2023, 22, 2343–2359. [Google Scholar] [CrossRef]
  30. Mirjalili, S.; Lewis, A. The whale optimization algorithm. Adv. Eng. Softw. 2016, 95, 51–67. [Google Scholar] [CrossRef]
  31. Kazemi, S.; Ghamsarizade, R.; Yazdani, S.; Mohammadloo, H.E.; Yeganeh, H. The combined effect of hydroxyapatite and zirconia coatings on magnesium-based-implant to improve corrosion resistance and induce antibacterial activity. J. Alloys Compd. 2024, 971, 172790. [Google Scholar] [CrossRef]
  32. AhadiParsa, M.; Mohammadloo, H.E.; Mirabedini, S.M.; Roshan, S. Bio-corrosion assessment and surface study of hydroxyapatite-coated AZ31 Mg alloy pre-treated with vinyl tri-ethoxy silane. Mater. Chem. Phys. 2022, 287, 126147. [Google Scholar] [CrossRef]
  33. Lee, Y.L.; Chu, Y.R.; Chen, F.J.; Lin, C.S. Mechanism of the formation of stannate and cerium conversion coatings on AZ91D magnesium alloys. Appl. Surf. Sci. 2013, 276, 578–585. [Google Scholar] [CrossRef]
  34. Tang, M.; Xu, K.; Shang, H.; Li, X.; He, X.; Ke, L.; Xu, H. Biomineralization of bone-like hydroxyapatite to upgrade the mechanical and osteoblastic performances of poly (lactic acid) scaffolds. Int. J. Biol. Macromol. 2023, 226, 1273–1283. [Google Scholar] [CrossRef]
  35. Afshari, M.; Mohammadloo, H.E.; Sarabi, A.A.; Roshan, S. Modification of hydroxyapatite-based coating in the presence of polyvinylalcohol (PVA) for implant application: Corrosion. Corros. Sci. 2021, 192, 109859. [Google Scholar] [CrossRef]
  36. Esmaeili, H.; Hakami, V.; Bidgoli, B.M.; Shokouhifar, M. Application-specific clustering in wireless sensor networks using combined fuzzy firefly algorithm and random forest. Expert Syst. Appl. 2022, 210, 118365. [Google Scholar] [CrossRef]
  37. Ozcan, M.; Peker, S. A classification and regression tree algorithm for heart disease modeling and prediction. Healthc. Anal. 2023, 3, 100130. [Google Scholar] [CrossRef]
  38. Breiman, L.; Friedman, J. Classification and Regression Trees, 1st ed.; Routledge: London, UK, 2017. [Google Scholar] [CrossRef]
  39. Kumar, A.; Sinha, S.; Saurav, S. Random forest, CART, and MLR-based predictive model for unconfined compressive strength of cement reinforced clayey soil: A comparative analysis. Asian J. Civ. Eng. 2024, 25, 2307–2323. [Google Scholar] [CrossRef]
  40. Bhagat, N.K.; Mishra, A.K.; Singh, R.K.; Sawmliana, C.; Singh, P.K. Application of logistic regression, CART and random forest techniques in prediction of blast-induced slope failure during reconstruction of railway rock-cut slopes. Eng. Fail. Anal. 2022, 137, 106230. [Google Scholar] [CrossRef]
  41. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  42. Handa, K.; Wright, P.; Yoshimura, S.; Kageyama, M.; Iijima, T.; Bender, A. Prediction of Compound Plasma Concentration–Time Profiles in Mice Using Random Forest. Mol. Pharm. 2023, 20, 3060–3072. [Google Scholar] [CrossRef] [PubMed]
  43. Asadi, B.; Hajj, R. Prediction of asphalt binder elastic recovery using tree-based ensemble bagging and boosting models. Constr. Build. Mater. 2024, 410, 134154. [Google Scholar] [CrossRef]
  44. Aryai, P.; Khademzadeh, A.; Jassbi, S.J.; Hosseinzadeh, M.; Hashemzadeh, O.; Shokouhifar, M. Real-time health monitoring in WBANs using hybrid Metaheuristic-Driven Machine Learning Routing Protocol (MDML-RP). Int. J. Electron. Commun. 2023, 168, 154723. [Google Scholar] [CrossRef]
  45. Xu, Z.; Su, Y.; Yang, F.; Zhang, M. A Whale Optimization Algorithm with Distributed Collaboration and Reverse Learning Ability. Comput. Mater. Contin. 2023, 75, 5965–5986. [Google Scholar] [CrossRef]
  46. Ali, M.U.; Kim, K.S.; Kallu, K.D.; Zafar, A.; Lee, S.W. OptEF-BCI: An Optimization-Based Hybrid EEG and fNIRS–Brain Computer Interface. Bioengineering 2023, 10, 608. [Google Scholar] [CrossRef]
  47. Shokouhifar, M. FH-ACO: Fuzzy heuristic-based ant colony optimization for joint virtual network function placement and routing. Appl. Soft Comput. 2021, 107, 107401. [Google Scholar] [CrossRef]
  48. Zhao, W.; Wang, L.; Mirjalili, S. Artificial hummingbird algorithm: A new bio-inspired optimizer with its engineering applications. Comput. Methods Appl. Mech. Eng. 2022, 388, 114194. [Google Scholar] [CrossRef]
  49. Azizi, M.; Talatahari, S.; Gandomi, A.H. Fire Hawk Optimizer: A novel metaheuristic algorithm. Artif. Intell. Rev. 2023, 56, 1–77. [Google Scholar] [CrossRef]
  50. Abdollahzadeh, B.; Khodadadi, N.; Barshandeh, S.; Trojovský, P.; Gharehchopogh, F.S.; El-kenawy, E.S.M.; Mirjalili, S. Puma optimizer (PO): A novel metaheuristic optimization algorithm and its application in machine learning. Clust. Comput. 2024, 1–49. [Google Scholar] [CrossRef]
Figure 1. Estimating the corrosion resistance for a new unseen HA+Ce coating solution using RF model.
Figure 1. Estimating the corrosion resistance for a new unseen HA+Ce coating solution using RF model.
Processes 12 00490 g001
Figure 2. Encoding of a feasible solution for optimizing HA+Ce coating solution.
Figure 2. Encoding of a feasible solution for optimizing HA+Ce coating solution.
Processes 12 00490 g002
Figure 3. Obtained Nyquist plot for HA+Ce coatings at different immersion times.
Figure 3. Obtained Nyquist plot for HA+Ce coatings at different immersion times.
Processes 12 00490 g003
Figure 4. Comparison of estimated and measured corrosion resistances: (a) correlation and (b) error.
Figure 4. Comparison of estimated and measured corrosion resistances: (a) correlation and (b) error.
Processes 12 00490 g004
Figure 5. Comparison of the different machine learning models on the test HA+Ce samples in terms of error measures of MAE and RMSE (left) and correlation factors of R and R2 (right).
Figure 5. Comparison of the different machine learning models on the test HA+Ce samples in terms of error measures of MAE and RMSE (left) and correlation factors of R and R2 (right).
Processes 12 00490 g005
Figure 6. Convergence of WOA: best corrosion resistance vs. iterations.
Figure 6. Convergence of WOA: best corrosion resistance vs. iterations.
Processes 12 00490 g006
Figure 7. Nyquist plot of the different samples for (a) bare Mg, (b) HA, and (c) HA+Ce (30 min).
Figure 7. Nyquist plot of the different samples for (a) bare Mg, (b) HA, and (c) HA+Ce (30 min).
Processes 12 00490 g007
Figure 8. FE-SEM micrographs after 1 week immersion time for (a) bare Mg, (b) HA, and (c) HA+Ce (30 min).
Figure 8. FE-SEM micrographs after 1 week immersion time for (a) bare Mg, (b) HA, and (c) HA+Ce (30 min).
Processes 12 00490 g008
Table 1. Composition of SBF used in our experiments [35].
Table 1. Composition of SBF used in our experiments [35].
S. No.ReagentsAmount in 1000 mL
1NaCl8.035 g
2(HOCH2)3CNH26.118 g
3NaHCO30.355 g
4MgCl2·6H2O0.311 g
5CaCl20.292 g
6KCl0.225 g
7K2HPO4·3H2O0.231 g
8Na2SO40.072 g
91.0 M HCl39.0 mL
101.0 M HClpH ~ 7.4
Table 2. Range of the variable parameters to generate 1024 HA+Ce coating samples.
Table 2. Range of the variable parameters to generate 1024 HA+Ce coating samples.
SampleParameterRange
Ce CoatingCe pH2–6
Ce Concentration (mol/L)0.01–2
Ce Temperature (Celsius)5–50
Ce Immersion time (seconds)5–180
HA CoatingHA pH2–6
HA Concentration (gr/L)0.1–10
HA Temperature (Celsius)50–90
HA Immersion time (minutes)5–120
HA+Ce CoatingHA+Ce pH2–6
HA+Ce Temperature (Celsius)50–90
HA+Ce Immersion time (minutes)5–120
Ce Concentration (mol/L)0.01–2
HA Concentration (gr/L)0.1–10
Table 3. Parameters of the proposed algorithm in RF and WOA phases.
Table 3. Parameters of the proposed algorithm in RF and WOA phases.
PhaseParameterDefinitionValue
RFDNumber of collected HA+Ce data samples1024
DTrainNumber of train data samples717 (70%)
DTestNumber of test data samples307 (30%)
TNumber of DTs within RF model10
WOAPopSizePopulation of WOA50
MaxIterIterations of WOA100
NumVarNumber of decision variables9
Table 4. Results of EIS for the HA+Ce coatings at various immersion times.
Table 4. Results of EIS for the HA+Ce coatings at various immersion times.
SampleRS
(Ω·cm2)
Rc
(Ω·cm2)
Rct
(Ω·cm2)
Rp
(Ω·cm2)
n1Y0 (1)
(sn/Ω/cm2)
n2Y0 (2)
(sn/Ω/cm2)
Ce+HA 15 min18.51498352250200.788.050.8311.43
Ce+HA 30 min25.773472568091520.8912.770.814.72
Ce+HA 60 min26.123145466578100.915.20.857.86
Table 5. Performance metrics on training and test HA+Ce samples using RF.
Table 5. Performance metrics on training and test HA+Ce samples using RF.
MetricTraining SamplesTest Samples
MAE221.7210.9
RMSE308.5296.1
MPE (%)4.34.2
R0.9940.994
R20.9860.987
Table 6. Comparison of the different machine learning models on test HA+Ce samples.
Table 6. Comparison of the different machine learning models on test HA+Ce samples.
MetricKNNNBDTSVMRF
MAE388.2330.3265.7288.6210.9
RMSE536.1468.0383.4405.5296.1
MPE (%)7.97.05.66.14.2
R0.9840.9870.9910.9900.994
R20.9680.9740.9820.9790.987
Table 7. Input factors of the optimized coating solution.
Table 7. Input factors of the optimized coating solution.
ParameterOptimized Value
Ce Concentration (mol/L)0.9
HA Concentration (gr/L)1.2
Ce pH4.7
HA pH4.1
Ce Temperature (Celsius)35
HA Temperature (Celsius)70
Ce Immersion time (seconds)50
HA Immersion time (minutes)75
HA+Ce Immersion time (minutes)60
Table 8. Obtained Rp (Ω·cm2) by SBF for Bare Mg, HA, and HA+Ce samples after different immersion times.
Table 8. Obtained Rp (Ω·cm2) by SBF for Bare Mg, HA, and HA+Ce samples after different immersion times.
Immersion TimeBare MgHAHA+Ce
1 h37012,22914,050
1 day506426512,620
1 week72741009432
2 weeks51032157830
3 weeks31225375190
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rajabi, Z.; Afshar Taromi, F.; Pourmahdian, S.; Eivaz Mohammadloo, H. Maximizing Corrosion Resistance of HA+Ce Coated Mg Implants Using Random Forest and Whale Optimization Algorithm. Processes 2024, 12, 490. https://doi.org/10.3390/pr12030490

AMA Style

Rajabi Z, Afshar Taromi F, Pourmahdian S, Eivaz Mohammadloo H. Maximizing Corrosion Resistance of HA+Ce Coated Mg Implants Using Random Forest and Whale Optimization Algorithm. Processes. 2024; 12(3):490. https://doi.org/10.3390/pr12030490

Chicago/Turabian Style

Rajabi, Zeinab, Faramarz Afshar Taromi, Saeed Pourmahdian, and Hossein Eivaz Mohammadloo. 2024. "Maximizing Corrosion Resistance of HA+Ce Coated Mg Implants Using Random Forest and Whale Optimization Algorithm" Processes 12, no. 3: 490. https://doi.org/10.3390/pr12030490

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop