1 Introduction

There is an urgent demand to address the issue of fuel consumption and CO2 emission (weight reduction) in aerospace and automotive sectors which requires significant research activities and improvement in the properties of Al alloys [1,2,3,4,5,6,7,8,9]. Aluminum matrix composites (AMCs) exhibit the ability to withstand high tensile and compressive stresses by transfering and distributing the applied load from the ductile matrix to the reinforcement phase [10,11,12,13,14]. Sizes of reinforcement particles can vary from micron to nano level depending on the properties of interest. AMCs reinforced with nano-particles have been extensively investigated in the last decade showing significant mechanical and tribological properties, which makes them suitable for various functional and structural applications [15, 16]. Theoretically speaking, in presence of the reinforcing particles, decreasing the size to nano-scale, results in the improvement of mechanical properties due to higher interaction of the nano particles with dislocations, provided the nano particles are well dispersed within the matrix [17, 18].

There are several processing routes to prepare nano particulate metal matrix composites such as powder metallurgy, casting, spray deposition, etc. [19, 20]. Among them, casting methods are more frequently used because of their low cost, simplicity and high production rate [21,22,23,24,25,26,27,28]. The main concern in manufacturing these composites through casting is the fact that small powder by nature tend to aggregate and form clusters [29, 30]. Additionally, the insufficient caution in controlling the process parameters may result in the formation of various defects including porosity, poor bonding between particles and matrix, and therefore poor mechanical properties [31, 32]. For this reason, several solutions have been proposed in order to overcome this problem such as semi-solid-metal (SSM) processing [33, 34]. Among different aluminum alloys, Al–Si–Mg alloys have been used more as the matrix alloy. Widespread interest on these alloys stem from their superior formability, mechanical properties, and strength to weight ratio [35].

Dry sliding wear occurs between contacting surfaces as a result of the transfer of material from one surface to another during relative motion [36]. This can be due to solid-phase welding or as a result of localised bonding [37]. Particles that are removed from one surface are either permanently or temporarily attached to the other surface [38, 39]. Extensive studies have been carried out on sliding wear behavior of aluminum alloy based AMCs [40, 41]. AMCs provide higher wear resistance as compared to the alloy irrespective of applied pressure and sliding speed [42, 43]. Increased wear resistance can be attributed to the role of hard dispersoid in making the matrix alloy plastically constrained and increasing the strength of the matrix alloy at elevated temperatures [44, 45]. In addition, presence of hard particles as protrusions on the surface of the composite protects the matrix from damaging contact with the counter surfaces and consequently lead to less wear, lower coefficient of friction and lower temperature rise in the composite than the alloy [46, 47].

The Particle Swarm Optimization (PSO) algorithm is a method that optimizes a problem. It improves a candidate solution with regard to a given measure of quality [48, 49]. This method is particularly suited for continuous variable problems. It has been successfully applied to large scale problems in several engineering disciplines including Metallurgical engineering [50]. It benefits from the advantage of fewer algorithm parameters compared to GA or SA algorithms. Furthermore, generic settings for these parameters work well on most problems [51].

Many researchers used ANNs to optimize the mechanical properties in casting process [52]. It has been observed that ANNs are not capable of explaining a particular decision to the user in comprehensible form and is not transparent [53]. Comparatively Fuzzy inference system (FIS) can be used in optimization of casting process [54]. It has the ability of modelling human knowledge in the form of if–then rule [52]. It also has the capability of transforming linguistic and heuristic terms into crisp numerical value for use in sophisticated machine computation, via fuzzy principles and membership functions (MFs). The if–then rules and the initial parameters of membership functions are normally prepared by an expert. Thus, inference system requires fine-tuning to obtain an acceptable rule base and optimal parameters for available data. Individual ANN and FIS problems can be solved by the integration of both methods [50, 52]. This approach was developed by Jangand and was named as the Adaptive Neuro-Fuzzy inference system (ANFIS) [54].

Study of literature shows scarce report on using an electromagnetic stirrer (EMS) device to obtain a uniform distribution of the particles. It is of interest to design an experiment, optimize process parameters and obtain a high wear resistant nano composite.

2 Experimental

An experiment was designed to manufacture, optimize and study properties of Aluminum matrix composites reinforced with the TiC nano particles. The chemical composition of the Al alloy was Si 9%, Mg 0. 6% and Al balance (mass%). The Fe impurity level of the alloy was controlled to remain lower than 0.1%. The reinforcing particles were primarily amalgamated and then pressed into the disk shape before being added into the melt. The mixture contained TiC nano particles (25%) and Al powder (75%). The diameter and height of each disk were 10 and 3 mm, respectively. The aluminum was heated and melted in a resistance furnace at 720 °C. The melt was degassed for 10 min with argon gas through a graphite lance. The disks were then added using an electromagnetic stirrer (EMS). EMS helped to disperse the particles more uniformly. The EMS current was ranged from 0 to 100 A while voltage was kept constant and equal to 220 V [50]. Figure 1 shows the distribution of electromagnetic field in EMS apparatus. Semi solid solidification combined with assistance of pressure were used to improve the quality of the casting. Temperature was lowered to convert the liquid into semisolid slurry. The slurry was subsequently added into the die cavity and underwent a pressure during phase transformation.

Fig. 1
figure 1

Distribution of electromagnetic field in EMS apparatus

ANFIS-PSO model was used to optimize the size, volume percentage of TiC nano particles and the casting temperature. For reference, sand cast parts were also poured at 720 °C without using electromagnetic stirrer. Following the casting process, samples underwent the T6 heat treatment process, where they were solution treated at 545 °C for 4 h with subsequent ageing at 155 °C for 6 h. The metallographic samples were cut off, ground, finely polished and etched by an aqueous solution of 0.5% HF. The microstructures were observed and analyzed with an optical microscope and SEM. The polished samples were used to measure the hardness values at a load of 100 g. Five hardness readings on randomly selected regions of each sample were taken in order to eliminate the possible segregation effects and get a value that represented the matrix material hardness. Through the hardness measurements, precaution was taken to make indentations at a distance of at least twice the diagonal length of the last indentions.

The pin-on-disc wear testing apparatus was used for sliding wear tests under varying applied loads against case hardened steel disc. Test specimens were cut and shaped in the form of pins having 6 mm diameter and 35 mm height. Before the abrasion tests, each specimen was polished to 1 μm. Figure 2 shows schematic diagram of the abrasion wear test. In every experimental condition, three samples were tested, and the average along with standard deviation for each set of all tests were measured. The weight loss tests were conducted up to the total sliding distance of 1600 m.

Fig. 2
figure 2

Schematic diagram of the abrasion wear test

2.1 Adaptive Neuro-Fuzzy Inference System (ANFIS)

Implementation of a TS system in neural-network architecture can be considered as an ANFIS system [52]. A Takagi–Sugeno (TS) fuzzy inference system (FIS), has been successfully applied for fuzzy modeling as shown in Fig. 3. Five layers have been used to construct the ANFIS model containing nodes described by anode function [37]. In this network, the circles represent nodes with no variable parameters. The squares are representatives of the nodes with adaptive parameters, which are determined by network during training. The nodes in the first layer represent fuzzy sets in fuzzy rules that control the shape and the location of the center of each fuzzy set which are called premise parameters. In the second layer, every node computes the product of its inputs. In Layer three [34], normalization of the firing strength of the rules occur by calculating the ratio of the ith rule’s firing strength to the sum of all rules firing strengths. In layer four nodes are adaptive, where each node function represents a first-order model with consequent parameters [52]. Layer 5 is called the output layer where each node is fixed. Optimizing the values of the adaptive parameters is the most important step for the performance of the adaptive system [34]. Specially, the parameters in Layer 1 and 4 need to be determined. Jang proposed a hybrid-learning algorithm for determining the parameters of an ANFIS model. A hybrid learning algorithm is used for optimizing the network parameters (gradient descent and least-square techniques). If the Layer 1 parameters are assumed as fixed, the least-squares estimation can be implemented to obtain the consequent parameters [50]. Subsequently, the Layer 4 parameters can be fixed, and a back propagation approach is used to fit the premise parameters in Layer 1. The optimal values for all the free parameters are computed through iteration between the Layer 1 and 4 parameters.

Fig. 3
figure 3

Architecture of ANFIS and Fuzzy-reasoning scheme of ANFIS

2.2 Particle Swarm Optimization (PSO)

The PSO algorithm, inspired by the natural flocking and swarming behavior of birds and insects, was first proposed by Kennedy and Eberhart [40, 41] and soon gained popularity due to its simplicity [55]. PSO is made up of multitude individuals who refine their knowledge in the given search space. The individuals in a PSO are denoted as particles and have a position and a velocity. The PSO has no mutation and particles are never substituted by other individuals during the run [56]. In PSO algorithm, particles search for space positions of high fitness. Each particle contains a memory function, and coordinates its trajectory based on two pieces of information, the best position that it has so far visited, and the global best position attained by the whole swarm. If the whole swarm is considered as a society, the particle’s memory of its past states can be seen as the first piece of information. The second piece of information can be achieved by the collective experience of all members of the society. Like other optimization methods, Particle swarm optimization has a fitness evaluation function and assigns a fitness value to each particle’s position. The global best is the term used to define the position of highest fitness value which the swarm visited [57]. Each particle remembers the position of highest fitness value that has been personally visited. Equations (1) and (2) are implemented to update the position and the velocity of the particles [48]:

$$V_{i,j}^{t + 1} = w \cdot V_{i,j}^{t} + c_{1} r_{1} \left( {P_{i,j} - X_{i,j} } \right) + c_{2} r_{2} \left( {P_{g,i} - X_{i,j} } \right)$$
(1)
$$X_{i,j}^{t + 1} = V_{i,j} + X_{i,j}^{t}$$
(2)

where by definition, j = 1,…,d and w, c1, c2 ≥ 0. w is the inertia weight, c1 and c2 the acceleration coefficients, and r1 and r2 are random numbers, generated uniformly in the range [0, 1], responsible for providing randomness to the flight of the swarm [34]. The term c1r1(Pi,j − Xi,j) in Eq. (1) is called cognition term whereas the term c2r2(Pg,j − Xi,j) is called the social term. The social term takes into account the interaction between the particles while the cognition term signifies only the particle’s individual experience. Using c1 and c2 values, the particle tune the social terms and cognition in the velocity update equation.

3 Method

Eight different types of membership functions are used by ANFIS editor such as Gaussian combination, P-shaped, Generalized bell, Triangular, Trapezoidal, Gaussian curve, difference between two sigmoid functions, and product of two sigmoid functions [50]. Defining fuzzy membership function and their corresponding values are the most significant step in the model. The most popular methods for specifying the fuzzy set are Gaussian and bell membership functions which benefit from smoothness and concise notation. The bell membership function has one more parameter than Gaussian membership function. So it can approach non-fuzzy set if free parameter is tuned. Therefore the Gaussian membership function has been considered.

Given the fact that ANFIS only operates on Sugeno-type systems, there are only two choices for the output membership function: constant and linear [34]. Due to the higher performance, the constant membership function has been chosen. Around 70% of the samples have been used for training purposes and the rest for testing and validation. The samples have been chosen randomly. After determining the number and type of membership functions, the ANFIS model is structured as illustrated in Fig. 4. The hybrid algorithm is used by membership function of each input. The hybrid method is advantageous since it uses back propagation and least square for parameters associated with input and output membership function estimation, respectively. Each input is normalized into a range of [0,1]. Despite all the advantages, there is also a noticeable downside of this hybrid model. Data driven learning triggers extensive requirements on the quality of training dataset. The trained model can behave erratically in unseen input conditions and become uninterpretable in case that the training dataset is not adequate. From this operation with ANFIS, objective function is calculated which is then minimized by PSO. The optimized condition is obtained in minimization of objective function.

Fig. 4
figure 4

Structure of the ANFIS in the present model

4 Results and Discussion

Microstructural study of the compocast Al reinforced with nano TiC reveals coarse dendritic α-Al and continuous eutectic network (Si particles and α-Al). Figure 5 displays the role of electromagnetic currents on the microstructure of the compocast Al reinforced with 2.3% nano TiC. As can be seen in Fig. 5a, b, when the electromagnetic current is not imposed, microstructure features a dendritic primary α-Al and coarse arms compared to spherical grain structure after using electromagnetic field (Fig. 5c–f). As can be seen in Fig. 5e, using I = 70 results in maximum sphericity and medium mean diameter of the globules. When the EMS current is 50 A, the morphology of primary α-Al particles turn out to be coarse, while the microstructure of Al alloy processed at 70 A consists of primary α-Al particles with globular shape and with fine grain size. With increasing electromagnetic current, the solid phases are ripened and therefore small eutectic areas are agglomerated which turns them into intergranular phase. This phenomenon causes an increase in the thickness of eutectic regions. Previous researchers reported that fragmentation mechanism, intensive stirring of melt and localized sudden cooling results in significant disturbances of temperature in the melt which leads to the melting of dendritic arms. Globalization of structure during stirring can be achieved if the dendrite arms are broken by using shear force or by melting them and subsequently let broken dendrites grow. With increasing shear intensity, globalization of structure occurs by altering the geometry of diffusion in the melt around the growing solid phase [52]. In comparison to conventional solidification, the actual nucleation rate may not be increased but total nuclei will survive, resulting in an increased effective nucleation rate.

Fig. 5
figure 5

The microstructure of nanocomposite a CO2 sand, b 0 A, c 30 A, d 50 A, e 70 A and f 100 A

SEM analysis reveals a uniform dispersion of the reinforcements. Figure 6 represents typical SEM images of this composite in EMS 0 and 70 A. It is noted that electromagnetic field improves the wetting kinetics in the liquid aluminium which results in uniform distribution of TiC particles. It is believed that strong mechanical bonding formed between Aluminum and reinforcing particles coupled with EMS process assist in dispersing them more uniformly in the liquid [34]. The highest value of hardness is obtained by addition of 2.3% TiC nano-particles and using electromagnetic current of I = 70 A which is attributed to finer dendritic microstructure and uniform distribution of TiC nano-particles (Fig. 7). Since this alloy has gone through T6 heat treatment, the hardness of this alloy is enhanced by precipitation of Mg2Si in the supersaturated Al solid solution [37].

Fig. 6
figure 6

SEM images of composite a 0 A and b stirred with 70 A

Fig. 7
figure 7

The hardness of the EMS Al matrix composite reinforced with 2.3% nanoTiC

It is noted that the wear rate in all the samples increases marginally with applied load (Fig. 8). The increase in the applied load leads to increase in the penetration of hard asperities, increase in micro cracking tendency of the subsurface and rise in the deformation and fracture of asperities of the softer surface. Figure 9 shows that the weight loss of the EMS composite is less than that of conventional cast composite. The weight loss increases with increase in sliding distance, and has a declining trend with increase in the electromagnetic field [50]. This result is in agreement with the concept that in general, materials with higher hardness have better wear and abrasive resistance. It is known that the wear loss is inversely proportional to the hardness of alloys. In case of conventional cast composite, the depth of penetration is governed by the hardness of the specimen surface and applied load. But, in case of EMS composite, the penetration depth of the harder asperities of hardened steel disk is primarily governed by the protruded hard and fine ceramic reinforcement that disperse in overall matrix and also fine dendrites. Thus, the major portion of the applied load is carried by particles [52]. The role of the reinforcement particles is to support the contact stresses preventing higher abrasion occurring between contact surfaces and thus decreasing the level of worn material.

Fig. 8
figure 8

The weight loss of the composites as a function of applied load (1600 m)

Fig. 9
figure 9

The weight loss as a function of sliding distance at (applied load: 15 N)

Based on wear surfaces, the composite with EMS = 0 A is much softer than the counter body material (Fig. 10). It is observed that counter body penetrates into the matrix alloy during the test producing deep grooves and causing extensive plastic deformation of the surface, which lead to extensive material loss and great wear rate. The worn surfaces also contain the evidence of adhesive wear in the form of adhesive pits. The flow of materials along the sliding direction, generation of cavities due to delamination of surface materials is also noted in this figure. Worn surface EMS = 70 A composite at an applied load of 15 N is shown in Fig. 10b. It indicates formation of continuous wear grooves, relatively smooth MML and some damaged regions. Nevertheless, the level of cracks which are formed on the wear surface is not significant. The wear surface is characterized by the formation of parallel lips along the continuous groove marking. It is noted that the pin material is the origin of the debris generated by the wear of the materials in contact (Fig. 11). Among the wear debris of the composite, at higher specific loads, prevail mainly sharp edged, plate-like particles. On the surface of these plate-like particles, presence of material plastic flow can be noted. Therefore, plate-like debris with sharp edges which are typical for adhesive wear are mainly noted at higher specific load. Rodlike particles are also representative of severe wear.

Fig. 10
figure 10

The wear surface of a 0 A and b stirred with 70 A

Fig. 11
figure 11

Morphology of wear debris a, b 0 A and c, d stirred with 70 A (15 N)

5 Conclusions

In this study, ANFIS-PSO was successfully used to optimize the process parameters. ANFIS was used to calculate the objective function. Subsequently, PSO was implemented to minimize the objective function. It was noted that the trained model could behave erratically in unseen input conditions and was not easy to interpret in case of inadequate training dataset since in this hybrid models, the learning was entirely data driven with stringent requirements on the quality of training dataset. The optimum parameters were used in manufacturing a wear resistant composite part. The TiC particulates increased the bulk hardness of the base Al alloy. It was concluded that pressure assisted EMS played an important role in the formation of non-dendritic primary α-Al particles in Al alloy slurry. It could be seen that the increase in EMS current caused smaller and rounder primary α-Al particles. The maximum sphericity and medium mean diameter of the globules were obtained by I = 70. It was noted that the EMS composite was more wear resistant than conventional cast composite. This could be attributed to higher hardness, since applying electromagnetic field in EMS composite had improved the wetting kinetics in the liquid aluminium leading to more uniform distribution of TiC particles within the aluminum matrix compared to conventional cast composite. Even though, formation of continuous wear grooves and some damaged regions were observed in EMS composites, the intensity of cracks proved to be insignificant.