1 Introduction

AISI 316L stainless steel finds extensive application across diverse industries owing to its exceptional corrosion resistance, weldability, conformability, and mechanical characteristics. [1]. Nevertheless, notwithstanding these advantageous characteristics, there remains space for enhancing the material’s performance by employing surface treatment systems [2]. SP is applied not only in conventional production methods but also in emerging manufacturing techniques like the 3D printing process, contributing to the improvement of AISI 316L stainless steel [3]. SP is a method that bombards a surface with small particles, like metal or ceramic, using compressed air or a centrifugal wheel. This creates small deformations on the treated surface and slightly below, depending on initial factors and the material used [4]. The collision of the particles induces compressive residual stresses on the metal surface, enhancing the material’s endurance, resistance to wear, and overall strength [5]. SP also initiates work hardening, leading to heightened surface microhardness and an additional improvement in its localized mechanical properties. Furthermore, SP can enhance both the mechanical characteristics and corrosion resistance of AISI 316L stainless steel [6]. The effectiveness of SP relies heavily on the chosen process parameters. These factors, like particle size, velocity, peening coverage, and duration, significantly influence the outcomes of the SP treatment. Careful adjustment and optimization of these parameters are essential for achieving desired improvements in mechanical properties and surface characteristics, particularly in materials such as AISI 316L stainless steel [7, 8]. Determining the ideal parameters for SP in AISI 316L stainless steel is vital to reach the optimized mechanical properties for espesefic applications so that to be in a acceptable range. Nevertheless, established optimization methodologies are based on trial-and-error, single-factor adjustments, meanwhile full factorial designs may not be efficient to cover all spectrum of variations and incur high costs and fail to yield the most optimal solution [9]. To confront this specific challenge, academicians have employed analytical and mathematical models as a strategic approach [10]. These models serve as systematic tools to better understand and address the complexities inherent in the optimization process. By leveraging mathematical frameworks and analytical techniques, scientists aim to provide a more nuanced and data-driven perspective, enhancing the precision and effectiveness of the optimization strategies applied to the given problem. Bisen et al. have examined how ultrasonic shot-peening (USP) impacts 316L stainless steel through experiments and analysis. Varied peening parameters were tested for optimal coverage. Tests showed improved hardness and residual compressive stress after peening. An analytical model predicting impact frequency was introduced and validated, proving its efficiency in optimizing process parameters [11]. In addressing these challenges, some researchers employ analytical models. To overcome these challenges, the scientific community has turned to RSM, a statistical tool for experimental aspects. RSM encompasses the design of experiments, response modeling, and parameter optimization to achieve desired outcomes. By fitting a polynomial equation to experimental data from selected runs, RSM effectively reduces the number of necessary experimental iterations while providing an accurate and robust process model. Additionally, RSM enables the exploration of interactions among multiple variables, a capability not feasible with traditional optimization methods. This method has found diverse applications in mechanical and materials science. For instance, Saravanan Ravichandran and colleagues applied RSM for the multi-response optimization of tool and formability, aiming to enhance the ultimate strength and ductility of AA8011 under axial compression [12]. Farasati and colleagues applied this approach to enhance the laser micromachining of Ti–6Al–4V [13]. Similarly, it found application in incremental forming to achieve reduced spring back and increased formability of aluminum 5083 [14]. Furthermore, it was utilized in the friction stir welding of aluminum 6061-T6, incorporating water cooling to attain the optimal microstructural and mechanical properties, as illustrated by the research conducted by Fathi, Jalal, and their colleagues [15]. Additionally, Bideskan and collaborators utilized RSM in the production of bi-layer PMMA and aluminum 6061-T6 laminates through laser transmission, aiming to identify the optimal adhesive conditions for this bimaterial [16]. RSM also played a crucial role in the assessment of friction stir additive manufacturing, particularly in enhancing ABS by incorporating nano-silica, as demonstrated by Shirkharkolaei et al. [17]. Although RSM has been increasingly employed to optimize the SP process for various materials in recent years [18], the majority of studies have concentrated on optimizing individual responses, such as residual stress or fatigue strength. Few investigations have delved into the impact of SP on multiple mechanical properties, and even fewer have considered the surface morphology of the shot-peened material [19]. Consequently, there exists a need for a more comprehensive examination of the SP approach applied to AISI 316L stainless steel to optimize the process for multiple mechanical properties and surface morphology. The efficacy of SP on AISI 316L can be enhanced by meticulous control of parameters, encompassing the size, shape, and velocity of shot particles, as well as the coverage and duration of the peening process. This optimization should also consider the initial state of the steel, including its hardness and grain size (GS). Unal and Okan employed RSM to explore surface roughness and hardness as output factors, incorporating input factors like air pressure, shot diameter, and peening duration [20]. The refined parameters derived from this optimization can be applied to enhance the performance of AISI 316L stainless steel across various industrial applications, including aerospace, automotive, biomedical, and oil and gas industries [21]. Some investigations have employed the RSM method to fine-tune SP parameters for Steel 316L, aiming to achieve desired mechanical properties and microstructural conditions. Because of the high costs and time demands associated with experimental tests focused on mapping residual stress throughout a material’s depth from the surface, investigators are increasingly turning to finite element methods. This shift allows for a more streamlined and efficient process, utilizing computational simulations to gain insights into the distribution of residual stress within the material. By adopting this approach, analysts aim to overcome the limitations of traditional experimental testing while optimizing both time and resources in the study of residual stress [22]. However, while these numerical methods have their advantages, they also come with limitations in accurately capturing specific inherent material characteristics, such as phase transformations resulting from heat treatments or mechanical processes. To address this gap, researchers turned to SP with tailored characteristics aimed at enhancing the mechanical properties of materials. Scholars in SP have various input factors such as velocity, ball properties, distance, angle, and duration. Although it is feasible to employ all parameters for extensive optimization, practical limitations frequently prompt scientists to opt for two to three factors or specific factors instead of utilizing all in real-world applications. This limitation is more pronounced in practical laboratories compared to numerical methods, which are not as restricted. For example, Li et al. optimized SP parameters for AA7B50-T7751, focusing on fatigue life by adjusting velocity, nozzle distance, and coverage through the finite element method (FEM) [23], and Hassanzadeh’s team used a statistical model for multi-objective optimization of SP’s parameters, considering shot velocity, diameter, coverage, and sample thickness. Residual compressive stress and roughness were response variables [24]. In this context, pressure (correlated with velocity) and coverage percentage (correlated with time) have been chosen as variable factors. Experts often avoid varying all factors due to the intricate relationship between input and output factors, particularly with novel responses (CCRS and CFWHM) that involve time-consuming and costly processes. As these new parameters are still in the early stages of introduction for subsequent evaluations, the authors chose to employ only two primary parameters as input factors for this study (pressure and coverage), constrained by the existing laboratory equipment and limitations. Here are introduced novel metrics, including cumulative compression residual stress (CCRS) and cumulative full-width at half-maximum (FWHM). These metrics offer deep insights into the build-up of residual energy and crystalline hardening throughout the material depth due to SP. CCRS finds practical applications in both science and industry: fatigue life improvement and wear resistance enhancement, stress corrosion cracking (SCC) mitigation, aerospace structural integrity, residual stress measurement, manufacturing process optimization, metal forming, and joining. Overall, CCRS is versatile in improving material properties and durability across different applications. By leveraging these innovative metrics, it becomes possible to quantitatively measure the extent of these elements following rigorous SP processes. In a related study, Neto et al. explored the cumulative strain effects on fatigue life. Their findings revealed that crack propagation within the compressive residual stress field resulted in a notable decrease in the fatigue crack growth (FCG) rate. This emphasizes the importance of understanding and optimizing SP parameters to achieve enhanced material performance, particularly in terms of fatigue resistance [25].

The uniqueness of this investigation lies in its focus on exploring the impacts of cumulative compression residual stress (CCRS) rather than cumulative strain effects, despite the limited data available in the literature for cumulative observations such as strain and stress. During the optimization phase, the objective of the study is to attain maximum CCRS and cumulative full-width at half-maximum (CFWHM), elevated micro-hardness, reduced surface roughness, and precise control over the austenite-to-martensite phase transformation for steel AISI 316L. The research encompasses a meticulously designed series of experiments to scrutinize how the mentioned shot-peening (SP) parameters influence the mechanical and microstructural attributes of the steel. A visual representation of the study’s progression is illustrated in Fig. 1 through a comprehensive flowchart.

Fig. 1
figure 1

Outline of the methodology employed in this study

2 Experimental approach

2.1 Material and specimens

The experimentation was performed on an AISI 316L stainless steel. This steel is broadly used in many industrial applications due to its excellent corrosion resistance [26], fairly high-temperature resistance, and good mechanical properties. On the other hand, its biocompatibility and weldability [27] make it an ideal material in multiple applications. Table 1 shows the chemical composition of the AISI 316 steel grade.

Table 1 Chemical composition of AISI 316 stainless steel in weight percentage (%wt)

Cylindrical samples of hot rolled AISI 316L steel bars with a diameter of 30 mm and length of 400 mm were employed. Figure 2a displays the steel microstructure. It is a non-homogeneous microstructure, with many slip bands, deformation twins, and segregation zones [28]. The samples were submitted to a solution annealing treatment at 1050 °C for 60 min and quenched in water [29]. A stress-relieved heat treatment was finally applied to remove residual stresses. Figure 2b shows the steel microstructure after the abovementioned heat treatments. It corresponds to a fully recrystallized austenitic microstructure.

Fig. 2
figure 2

AISI 316L stainless steel bar: a hot rolled and b annealed and stress relieved

2.2 Shot-peening treatments

Small samples were cut from the recrystallized AISI316L cylindrical bars with dimensions of 30 mm in diameter and 8 mm in height. The surfaces of the samples were ground with 120 grit size abrasive paper before been submitted to the SP process. The specifications for the shot balls (beads) are presented in Table 2.

Table 2 Characteristics of the peening medium

All samples underwent SP treatments at ambient temperature using an air blast SP apparatus (Guyson Euroblast 4 PF laboratory machine). The conditions of the particular SP elements employed in the current study to attain the targeted SP process refer to Table 3. Coverage (C) and air pressure (P) were the criteria modified in the applied treatments.

Table 3 Shot-peening parameters. *Peening flux rate is controlled by means of the peening valve opening in the aforementioned Guyson Euroblast 4PF laboratory machine

2.3 Optical microscope (OM) observations

First at all, it was essential to determine the duration required to achieve the complete coverage (98%) under all specific air pressures. Each sample underwent a one-second SP at a designated pressure, and the resulting surface coverage percentage was measured using an optical microscope. The images were subsequently analyzed using image processing to determine the achievable coverage percentage. The shot-peened surface of the sample after a one-second treatment at a pressure of 1.5 bar displays in Fig. 3. For microstructural observation the specimens were subjected to an etching process using Kalling’s No.2 solution (2 gr CuCl2 + 40 ml HCl + 50 ml ethanol) for a period of 125 s [6]. Coverage (C) was evaluated by the Avrami equation (Eq. 1) [30]. Time corresponding to attain 100% coverage was determined and results obtained at different air pressures are presented in Table 4.

Fig. 3
figure 3

Estimating the coverage factor on AISI 316L stainless steel for 1.5 bar pressure. a Surface appearance after a one-second shot-peening treatment (100x). b Image processed picture (100x). c Extent of surface coverage, in percentage (%)

Table 4 Time needed to get 100% coverage for each air pressure
$$C(\%)=100[1-exp(-Ar\cdot t)]$$
(1)

Figure 4 shows the affected area due to SP for 1.5 bar air pressure under 2300% coverage. Severe plastic deformation is appreciated in a depth of approximately 100 \(\mu\)m.

Fig. 4
figure 4

a Optical microscope surface image at 200 × after achieving 2300% coverage at 1.5 bar. b SEM image at 500 × under the same conditions

2.4 Response surface method (RSM)

Response surface method (RSM) is popularly used in engineering, chemistry, physics, and other fields to optimize features s and develop predictive models. Central composite design (CCD) is a popular RSM used for designing experiments, modeling the response surface, and finding the optimal combination of parameters. CCD is a useful RSM that allows for the efficient and effective optimization of parameters and the development of predictive models. Its ability to detect curvature and interactions makes it a valuable tool for engineers and scientists in a wide range of fields [31]. Within this investigation, the controlled SP technique was employed to study the SP process. To establish practical equations for aforementioned indicators using RSM, a set of experiments was conducted based on CCD. In order to ensure the effectiveness of SP, certain limitations were imposed on the design area. Three levels of pressure were selected along with three levels of coverage. Table 5 presents these variations.

Table 5 Process factors and corresponding levels

Design Expert 13, a commercial statistical package, was employed for model development. Table 6 presents the design matrix and the corresponding measured values on the different treated surfaces.

Table 6 Matrix of in-put and out-put values

2.5 Roughness measurement

Surface roughness evaluations were conducted on all specimens utilizing a Diavite DH-6 roughness tester. For each sample, measurements were conducted at five randomly selected positions and directions, spanning a length of 4.8 mm. The measurements were performed with a cut-off length of 0.8 mm, according to the DIN 4786 standard [32].

2.6 X-ray diffraction analysis

2.6.1 Measurement of residual stresses and full-width at half-maximum (FWHM)

The residual stress field induced by the applied SP treatments was assessed using XRD analysis performed with a Stresstech 3000-G3R X-ray diffractometer. The {220} gamma lattice plane was examined under a 2θ angle of 128.8º, utilizing the Kα chromium wavelength (0.2291 nm). The sin2ψ technique was employed to determine residual stresses [33], following the equation (Eq. 2):

$${\sigma }_{\mathrm{\varnothing }}={\left(\frac{{\text{E}}}{1+\upnu }\right)}_{\left({\text{hkl}}\right)}\left(\frac{1}{{{\text{d}}}_{\mathrm{\varnothing }0{\text{hkl}}}}\right)\left(\frac{\partial {{\text{d}}}_{\mathrm{\varnothing \psi hkl}}}{\partial {{\text{sin}}}^{2}\uppsi }\right)$$
(2)

Here, 'E' and 'ν' represent the elastic modulus and Poisson coefficient of AISI316L steel in the measured crystallographic plane, respectively, with values of 211,000 MPa and 0.3. 'd' denotes the interplanar distance of the selected diffraction plane (hkl), 'ψ' is the tilt angle, and 'Ø' represents the angle in the sample plane. The diffraction peak was detected at five positions of the tilt angle, ranging from − 45º to + 45º, with an exposure time of 40 s for each position. The working parameters utilized for measuring residual stresses after the conventional and severe SP treatments are outlined in Table 7. Furthermore, to enable in-depth measurements of residual stresses (residual stress evolution along sample depth), material from the top surface of the shot-peened samples was removed prior to each measurement. To delineate comprehensive residual stress profiles, successive layers of material were selectively removed through electropolishing using a Buehler PoliMat machine. The electropolishing process employed a solution comprising 94% acetic acid and 6% perchloric acid, with an applied voltage of 4 V. The width of each removed layer was gauged using a Mitutoyo micrometer, and this process iterated until the residual stress was completely eliminated. These measurements also provided the full-width at half-maximum (FWHM) parameter, which gives insights into grain distortion, dislocation density, and residual micro-stress state. It is usually considered as an indicator of work hardening [34].

Table 7 Experimental parameters for residual stress and FWHM measurements

The assessment of residual stress in the conducted tests within this exploration employed the CCRS methodology. To determine these value, compressive residual stress curves were generated, spanning from the shot-peened surface to a specific depth, where an stress near zero was measured. However, due to the discrete availability of test data points, achieving a smooth and accurate curve, as well as calculating the area through conventional mathematical methods, posed challenges. To overcome these obstacles, curve fitting was performed using polynomial equations to boost the smoothness of the measured curves. Figure 5 shows examples of the residual stress evolution measured in the non-peened sample (reference material) and in some of the shot-peened samples. Curve fitting was accomplished using the “MATLAB R2023a” software, enabling the derivation of pertinent equations for each dataset. The polynomial equations extracted by MATLAB were determined based on the values of R-squared and other statistical elements to minimize errors due to fitting process. Through MATLAB coding and programming, the area between the fitted curve and the x-axis (representing depth, in mm) and y-axis (representing stress, in MPa) was also calculated for each specific curve. For example, the results of three tests and their orders and specifications of the optimal error are listed in Table 8. Similarly, the same procedure was conducted for the remaining tests, and a specific polynomial curve was fitted for each test. Subsequently, the area below the residual stress-depth curves was calculated using MATLAB programming. The CCRS are shown in Table 6.

Fig. 5
figure 5

Experimental residual stress values versus sample depth in the non-peened sample (reference value) and after some shot-peening processes

Table 8 Fitted equations in MATLAB for tests numbered 12, 13, and 15 to demonstrate different conditions for each equation

Figure 6 displays a collection of randomly two chosen curves corresponding to test cases specified in Table 8, which have been incorporated to facilitate a comprehensive understanding of the unsmoothed characteristics of the extracted compressive residual stress curve along the vertical axis of the sample. The inclusion of these curves aims to improve the comprehension of the uneven distribution of compressive residual stress throughout the depth of the sample. Table 6 presents all the resultant CCRS final values obtained after curve fitting and area calculation. CCRS is a unique quantitative measure of the residual stress state produced by SP and denotes the intensity of the SP treatment.

Fig. 6
figure 6

Two selected fitted graphs obtained using MATLAB software for tests numbered 17 and 22. Additionally, the area inside these polynomial curves is calculated, representing the cumulative residual stress characteristic for each test condition

The evolution of the FWHM with depth provides valuable insights into specific material properties associated with crystalline hardening and structural refinement [35]. A FWHM profile was conducted on a cross-sectioned sample in Fig. 6, accompanied by SEM observations (Fig. 7). In this figure, two distinct areas are evident: the upper layer exhibits a finer microstructure attributed to grain refinement and the formation of sub-grains induced by the SSP. However, the inner area retains the coarser original microstructure. The determination of GS following the SSP treatment may involve using Scherrer’s equation [36] (Eq. 3), especially when anticipating a nanocrystalline GS [37, 38]. Previous studies [39] employed similar SP parameters to achieve a nanocrystalline GS.

$$GS =\frac{0.9 . \lambda }{FWHM \cdot cos\theta }$$
(3)

where ‘λ’ is the radiation wavelength (λ chromium = 0.2291 nm) and ‘FHHM’ is the full width at half maximum. The most intensive first-order peak {211}2θ = 156.4° of the XRD patterns was taken. ‘θ’ represents the diffraction angle (θ = 1.36 rad in {211} 2θ = 156.4°). Based on these values, a nanocrystalline GS can be obtained mainly in different FWHM the GS should be changed, for higher FWHM (shot-peened face) the GS would be smaller than core of sample (Inner part far from treated face). The GS corresponding to the original microstructure (inner part) was analyzed by SEM analysis (Figs. 7 and 8).

Fig. 7
figure 7

SEM analysis of a cross-sectioned sample following an SSP treatment (refer to Case No. 22 in Table 6)

Fig. 8
figure 8

FWHM scatter points from experimental tests corresponding to various conditions. Note that only a subset of the data is presented here

The GS, calculated using Eq. 3, is presented in Table 9. For case No. 12 (taken from Table 6 and illustrated in Fig. 8 with the yellow curve), measurements were taken from both the SP surface and the depth to 0.25 mm, utilizing the respective CFWHM curve.

Table 9 GS estimation for sample No.12 taken from Table 6 and Fig. 8 (θ = 1.36 rad in {211} 2θ = 156.4°)

Figure 8 illustrates the FWHM graphs evaluated along the depth of the samples, starting from the shot-peened face and progressing towards the sample interior, under the different shot-peening conditions. Employing the same analysis procedure as mentioned earlier for the cumulative residual stress determination, it becomes possible to quantify the degree of crystalline hardening and refinement occurring within the material during the shot-peening technique under the applied conditions.

To quantitatively evaluate these material changes, the cumulative FWHM values were measured in (degree*mm) units, integrating the area below the FWHM curves. Larger area values indicate a more pronounced level of refinement and hardening achieved through shot-peening. The obtained cumulative FWHM values were also presented in Table 6.

Surface austenite phase transformation

Comparing the diffracted austenite peak intensity to the ferrite peak allows to determine the austenite transformation into martensite produced in the surface of the treated samples [40]. An X3000 diffractometer with the CrKα radiation was used.

The fundamental equation for calculating the martensite fraction, Vm, based on measured diffracted intensity data is as follows (Eq. 4)

$${\text{Vm}}=1-{\text{Vc}}-\mathrm{V\gamma }=1-{\text{Vc}}-\left(1/{\text{q}}\sum_{j=1}^{q}(\frac{\mathrm{I\gamma j}}{\mathrm{R\gamma j}})\right)/[(1/{\text{p}}\sum_{i=1}^{p}\mathrm{I\alpha j}/\mathrm{R\alpha j})+\left(1/q\sum_{j=1}^{q}\mathrm{I\gamma j}\right)]$$
(4)

In Eq. (3), the following variables are used: Vγ: volume fraction of austenite phase, Vc: volume fraction of carbides, q: number of austenite peaks (hkl), Iγj: Integrated intensity of specific (hkl) austenite peak, Rγj: parameter relative to the theoretical integrated intensity, influenced by factors like interplanar spacing, Bragg angle, crystal structure, and phase composition, p: number of ferrite peaks (hkl), Iαj: integrated intensity of ferrite phase, and Rαj: parameter for integrated intensity of ferrite phase. No carbides have been considered (Vc = 0). Table 10 gives the diffraction planes, Bragg angles, and corresponding R values used in the determination of martensite content. Following shot-peening under a range of boundary conditions, a certain fraction of austenite undergo a transformation into martensite in varying degrees, depending on the intensity of the treatment [41]. Applying Eq. (3), the martensite percentage was calculated and recorded in Table 6.

Table 10 The calculated theoretical R parameters obtained using CrKα radiation [40]

2.7 Micro-hardness measurement

To determine intensity of the hardening caused by the plastic deformation induced by shot-peening treatments, Vickers microhardness was measured on the top face of the samples. The microhardness testing was conducted using a “Buehler Micromet 2100” microhardness tester, applying a force of 300 gf for 15 s, following the method outlined in reference [42]. Table 6 presents the microhardness results corresponding to each test condition.

3 Development of mathematical model

3.1 Mathematical model

The main objective of this study is to fit the SP parameters to a mathematical model using the RSM to predict key results, including cumulative residual stress and FWHM, martensite percentage, micro-hardness, and surface roughness. To assess the influence of shot-peening (SP) variables on critical quality factors, including the minimization of “roughness” and “martensite percentage conversion,” as well as to maximize “cumulative residual stress,” “full-width at half-maximum (FWHM),” and “micro-hardness,” predictive models were established. The parametric effect of SP variables was analyzed using plots derived from these models. RSM was employed to create mathematical models to predict output parameters corresponding to the applied input parameters (air pressure and coverage percentage). The construction of these models was facilitated using the statistical software package mentioned earlier. The validity of full models was assessed through analysis of variances and coefficient of determination (R2). For the martensite percentage prediction, linear regression (without any transformation function) was used, and the best-fitting model was found to be quadratic, as indicated by (Eq. 5).

$$\mathbf{M}\mathbf{a}\mathbf{r}\mathbf{t}\mathbf{e}\mathbf{n}\mathbf{s}\mathbf{i}\mathbf{t}\mathbf{e} \, \mathbf{P}\mathbf{e}\mathbf{r}\mathbf{c}\mathbf{e}\mathbf{n}\mathbf{t}\mathbf{a}\mathbf{g}\mathbf{e} \, \%=-2.95592+7.81434 P+0.0210861 C+0.000555556 PC-0.864198\times {P}^{2}-3.02169e-06 {C}^{2}$$
(5)

To assess the validity of the model, the analysis of variance (ANOVA) was conducted, and the results are provided in Table 11. The model F-value of 228.37 implies the effect of in-put values is significant. There is only a 0.01% chance that an F-value as large as this one could occur due to noise. p-values less than 0.05 indicate model terms are significant. In this case, P, C, P2, and C2 are significant model terms. The lack of fit F-value of 2.33 implies the lack of fit is not significant relative to the pure error. There is a 12.25% chance that a lack of fit F-value as large as this one could occur due to noise. Non-significant lack of fit is good—wanted the model to fit. Meanwhile, the predicted R2 of 0.9742 is in reasonable agreement with the adjusted R2 of 0.9819, i.e., the difference is less than 0.2.

Table 11 ANOVA results of martensite transformation percentage

To validate the accuracy of the model, Fig. 9a clearly demonstrates the capability of the developed mathematical model to precisely predict the percentage of martensite transformation. The combined effect of air pressure and coverage on the austenite transformation is seen in graph (b), enabling a comprehensive assessment of their joint impact on the final surface martensite content. Upon analyzing these graphs, it becomes evident that when both factors (P and C) reach their highest values, the conversion to martensite attains maximum levels (more than 60%). However, it is important to note that the coverage factor (C) holds greater significance in this conversion compared to the pressure factor (P).

Fig. 9
figure 9

Visual representation of martensite transformation, including a actual response values and their corresponding predictions, b combined effect of air pressure and coverage on martensite transformation, c individual effect of both inputs on final surface martensite content, and d 3D plot illustrating the effect of air pressure a coverage on martensite transformation

Regarding now the roughness, an inverse function was employed, and through careful analysis, it was determined that the most suitable model is a modified quadratic function, which corresponds to (Eq. (6)).

$$\left(\frac{1}{{\varvec{R}}{\varvec{o}}{\varvec{u}}{\varvec{g}}{\varvec{h}}{\varvec{n}}{\varvec{e}}{\varvec{s}}{\varvec{s}}-0.5}\right)=+ 0.086225+0.0525335\times {\text{P}}+0.000122635\times {\text{C}}-3.55127{\text{e}}-05\times \mathrm{PC }-0.00764876 \times {P}^{2}-4.87957{\text{e}}-09\times {C}^{2}+3.83909{\text{e}}-06\times {P}^{2}{\text{C}}-5.15467{\text{e}}-09\times {\text{P}}{C}^{2}+ 8.92381{\text{e}}-10\times {P}^{2}{C}^{2}$$
(6)

ANOVA was also performed to assess model reliability Table 12. The model F-value of 151.04 indicates significance, with a mere 0.01% chance of noise-induced occurrence. P-values below 0.05 suggest significance of P, C, P2, C2, P2C, PC2, and P2C2 model terms.

Table 12 ANOVA results of Roughness

Figure 10a validates the refined model by visually comparing actual response values with model predictions, now regarding final roughness. In the same way already mentioned, the effect of air pressure and coverage on roughness results is appreciated in graphs (b), (c), and (d). It is seen that an increase in pressure leads to a proportional increase in roughness, while an increase in coverage results in an inverse effect. Interestingly, the graphs highlight that the minimum roughness value corresponds to maximum coverage degrees and minimum air pressure.

Fig. 10
figure 10

Visual representation of roughness evolution, including a actual response values and their corresponding predictions, b combined effect of air pressure and coverage on roughness, c individual effect of both inputs on final roughness, and d 3D plot illustrating the effect of air pressure a coverage on roughness

In relation to the CCRS, a power function was utilized. Upon thorough examination, it was concluded that the linear model, represented by (Eq. 7), best fits the process.

$$\left(\left|\boldsymbol C\boldsymbol u\boldsymbol m\boldsymbol u\boldsymbol l\boldsymbol a\boldsymbol t\boldsymbol i\boldsymbol v\boldsymbol e\boldsymbol\;\boldsymbol R\boldsymbol e\boldsymbol s\boldsymbol i\boldsymbol d\boldsymbol u\boldsymbol a\boldsymbol l\boldsymbol\;\boldsymbol S\boldsymbol t\boldsymbol r\boldsymbol e\boldsymbol s\boldsymbol s\right|\right)^{1.5}=-176.761+532.265\times\text{P}+0.112433\times\text{C}$$
(7)

ANOVA was conducted to evaluate model dependability (Table 13). The model F-value of 531.93 is highly significant. p-values much below 0.05 confirm significance of air pressure and coverage model terms. The lack of fit F-value of 2.65 indicates a 6.65% chance of noise-induced occurrence, indicating model fit.

Table 13 ANOVA results of CCRS

Figure 11a shows the model’s precise prediction of cumulative residual stress variations and its effectiveness in analyzing the shot-peening (SP) process. Similar graphs than in the precedent figures were also provided in this case. Both, air pressure and coverage, exhibit a proportional linear increase in cumulative residual stress as they grow. Nevertheless, it is evident that pressure has a greater impact on this variation.

Fig. 11
figure 11

Visual representation of CCRS evolution, including a actual response values and their corresponding predictions, b combined effect of air pressure and coverage on CCRS, c individual effect of both inputs on CCRS, and d 3D plot illustrating the effect of air pressure a coverage on CCRS

For the CFWHM, a power function was chosen and, after thorough analysis, a modified quadratic, denoted by (Eq. 8) was seen to be the most suitable.

$$\left(\boldsymbol C\boldsymbol u\boldsymbol m\boldsymbol u\boldsymbol l\boldsymbol a\boldsymbol t\boldsymbol i\boldsymbol v\boldsymbol e\boldsymbol\;\boldsymbol F\boldsymbol W\boldsymbol H\boldsymbol M-0.4\right)^2=0.0605372-0.0388363\times P-4.94174e-05\times C+2.91682e-05\times PC+0.00673312\times P^2+4.68314e-09\times C^2-3.05556e-06\times P^2\text{C}-1.5578e-09\times PC^2$$
(8)

An ANOVA analysis was performed to assess the reliability of the model Table 14. The model F-value of 688.15 indicates significant model importance. p-values below 0.05 suggest significance of P, C, PC, C2, P2C, and PC2 model terms. The lack of fit F-value of 1.31 suggests a 27.33% chance of noise-induced occurrence.

Table 14 ANOVA results of CFWHM

Figure 12 presents similar representations used with previous outputs. Proportional increases in cumulative FWHM with the increase of air pressure and coverage is appreciated. Interestingly, maximum values occur at maximum coverage degrees and air pressure. The increase is slightly higher for pressure compared to coverage.

Fig. 12
figure 12

Visual representation of cumulative FWHM, including a actual response values and their corresponding predictions, b combined effect of air pressure and coverage on cumulative FWHM, c individual effect of both inputs on cumulative FWHM, and d 3D plot illustrating the effect of air pressure a coverage on cumulative FWHM

In the case of micro-hardness, a power-law function was selected and, upon comprehensive analysis, a modified quadratic function, represented by (Eq. 9), was established as the most appropriate.

$${(\mathbf{M}\mathbf{i}\mathbf{c}\mathbf{r}\mathbf{o}\mathbf{h}\mathbf{a}\mathbf{r}\mathbf{d}\mathbf{n}\mathbf{e}\mathbf{s}\mathbf{s})}^{2}=\mathrm{370,587}\times \mathrm{120,863}\times P+63.94\times C+1.54083\times PC+\mathrm{13,851.2}\times {P}^{2}-0.0192915\times {C}^{2}-1.95539\times {P}^{2}C+0.00351777\times P{C}^{2}$$
(9)

An ANOVA analysis was performed to assess the reliability of the model Table 15. The high model F-value (1075.73) means this model is accurate. In this case, P, C, PC, P2, C2, P2C, and PC2 have very low values, meaning they are important factors. The small lack of fit F-value (0.29) means the lack of fit is not important compared to random errors (59.78% chance).

Table 15 ANOVA results related to microhardness

Figure 13 represents microhardness prediction and the effects of air pressure and coverage in surface microhardness. It is seen that pressure inversely affects microhardness, while coverage has a proportional effect. These graphs also highlight maximum microhardness values correspond to the minimum air pressure and maximum coverage degrees.

Fig. 13
figure 13

Visual representation of surface microhardness, including a actual response values and their corresponding predictions, b combined effect of air pressure and coverage on microhardness, c individual effect of both inputs on microhardness, and d 3D plot illustrating the effect of air pressure an coverage on microhardness

The accuracy of the developed modified models, assessed through Eqs. 5, 6, 7, 8, and 9, is clearly depicted in a graphical representation provided in Fig. 14. This visual comparison between the real values of responses and the models’ predictions, accompanied by the noticeable scatter band for each run, is emphasized. Figure 14 unequivocally illustrates the models’ effectiveness in predicting parameters like “CCRS,” “CFWHM,” “austenite percentage transformation to martensite,” “micro-hardness,” and surface “roughness” with an impressive degree of precision. The robust agreement between the actual and predicted values underscores the reliability and effectiveness of the developed mathematical models. The high level of accuracy establishes these models as valuable tools for conducting a thorough analysis of the SP process, providing with reliable insights and optimization capabilities.

Fig. 14
figure 14

Comparison of actual and predicted values of a martensite (%), b roughness, c CCRS, d CFWHM, and e micro-hardness

3.2 Optimization

The optimal parameter combination that maximizes the cumulative residual stress, cumulative FWHM, and microhardness, while minimizing martensite transformation and roughness was finally looked for. This technique involves combining multiple responses into a dimensionless measure of performance called the overall desirability function [43]. The desirability functions for minimum and maximum goals, along with the overall objective functions, were calculated using (Eqs. 10, 11, and 12), respectively.

$${d}_{i} =\{\begin{array}{cc}0& {Y}_{i}<Lo{w}_{i}\\ {(\frac{{Y}_{i}-Lo{w}_{i}}{Hig{h}_{i}-Lo{w}_{i}})}^{w}& Lo{w}_{i}<{Y}_{i}<Hig{h}_{i}\\ 1& {Y}_{i}>Hig{h}_{i}\end{array}$$
(10)
$${d}_{i} =\{\begin{array}{cc}1& {Y}_{i}<Lo{w}_{i}\\ {(\frac{{Y}_{i}-Lo{w}_{i}}{Hig{h}_{i}-Lo{w}_{i}})}^{w}& Lo{w}_{i}<{Y}_{i}<Hig{h}_{i}\\ 0& {Y}_{i}>Hig{h}_{i}\end{array}$$
(11)
$$D={(\prod_{i=1}^{n}{d}_{i}^{{r}_{i}})}^{\frac{1}{\sum {r}_{1}}}$$
(12)

In the provided equation, "Y" represents the given response, and “Low” and “High” refer to the minimum and maximum values of the response, respectively. The variable “r” denotes the number of responses, and “w” is the weight factor, which varies within the range of 0.1 to 10. To conduct multi-characteristic optimization using the desirability approach, the optimization criteria were initially identified. Table 16 outlines the defined criteria for optimization. The optimization way was performed using Design Expert statistical software. The significance assessment for each result outlined in Table 16 follows the criteria laid out in this table, with a rating of 3 out of 5 assigned to all items except for CCRS, which receives a maximum rating of 5 out of 5. The solution that simultaneously maximizes the cumulative residual stress, cumulative FWHM, micro-hardness, and minimizes austenite transformation and roughness was achieved using a pressure value of 6 bar and 1860% coverage.

Table 16 Constraint table

Figure 15 illustrates the factor ramps, providing a graphical representation related to the optimal solution. Figure 15 depicts the plotted limitations for each item, with precise post-optimization points representing the targeted outcomes. This figure displays the optimal values, as well as the lower and upper ranges, for each factor. It is crucial to emphasize that these values were chosen from the solutions extracted by the software using (Eqs. 9, 10, and 11).

Fig. 15
figure 15

The ramps shape for all factors. The red points indicate the optimal factor settings, while the blue points represent the corresponding predicted response values

To validate the obtained optimal results and demonstrate the applicability of the proposed methodology, a confirmatory experiment was conducted under the aforementioned optimized conditions. Experimental measurements for the CCRS, cumulative FWHM, micro-hardness (maximized parameters), and martensite percentage and roughness (minimized parameters) were made and compared with the predicted values in Table 17. It is worth noting that the relative error values for the different aspects are between 4 and 12%.

Table 17 Comparison between results obtained by design expert based on the identified criterion and the experimental test performed using an air pressure of 6 bar and a coverage degree of 1860%

These error values confirm the accuracy of the proposed methodology in identifying the optimal solution. In contrast, the larger error observed for CCRS and CFWHM may be attributed to limited measurement accuracy, characterized by a relatively small number of recorded tests, alongside potential artifacts introduced during data smoothing using MATLAB software. Nevertheless, it is worth noting that within this range, the optimization criteria for all parameters, achieved by altering two input factors, remains within an acceptable range.

3.3 Discussion

The primary purpose of calculating CCRS and CFWHM in this context is to quantify the residual stress and estimate the microstructure of the metal following the SP operation. In real-world applications, samples are subjected to various conditions post-SP operation, including static and dynamic loading or a combination of both. In industrial settings, for samples experiencing dynamic conditions, surface smoothness is a crucial factor, as rougher surfaces tend to have lower durability against fatigue and dynamic forces. While SP enhances fatigue conditions by inducing residual stress on the surface and slightly beneath, it also results in a rougher surface due to the formation of micro-cracks, which can diminish the effectiveness of SP and lead to worsened fatigue conditions for shot-peened specimens, particularly in certain types of shot particles with more acute shapes [44, 45]. To address this, industries may employ post-processing techniques such as lapping, polishing, or electrochemical polishing after SP [46]. However, understanding the depth and volume of residual stress is vital to ensure the effective retention of residual stress during secondary operations. The aim is to optimize the output parameters to maximize CCRS while minimizing surface roughness, thereby enhancing the component’s fatigue performance. In general, stainless steel with a finer grain size tends to have better fatigue resistance compared to stainless steel with larger grain sizes [47, 48]. Finer grain sizes result in a more uniform microstructure with fewer grain boundaries, which helps to distribute stresses more evenly throughout the material. This leads to improved fatigue strength and resistance to crack initiation and propagation. Additionally, finer grain sizes typically exhibit higher hardness and tensile strength, contributing further to enhanced fatigue performance. Therefore, stainless steel with a fine grain size is often preferred in applications where fatigue resistance is critical. In this regard, the CFWHM value serves as a distinctive indicator ensuring the preservation of grain refinement post any previously mentioned post-processing procedures. Moreover, in applications involving corrosion, minimizing surface roughness is crucial for achieving optimal performance. However, the discussion regarding grain refinement and its impact in the context of corrosion remains controversial according to existing literature is not only impacted by roughness and grain size but other factors should be investigated, specifically for steel AISI 316L [49, 50].

4 Conclusions

In this empirical investigation, a specialized protocol was utilized to achieve specific surface mechanical characteristics using shot-peening (SP). Two key variables, namely, air pressure (linked to shot velocity) and shot-peening time (represented as coverage percentage), were adjusted. The study aimed to predict five output variables, aiming to maximize cumulative compressive residual stress, cumulative full-width at half-maximum (CFWHM), and microhardness, while minimizing martensite transformation and surface roughness. CCRS and CFWHM values were computed using smoothing techniques, specifically polynomial functions, indicating distance per millimeter alongside CRS per megapascal and degree of crystalline hardening, respectively. These parameters are crucial for evaluating sample durability during fatigue testing and subsequent post-processing steps. Higher CCRS and CFWHM values suggest better performance under real-world mechanical conditions. Mathematical models were developed to analyze each element independently and explore interactions among input variables. In the optimization phase, a pressure of 6 bar and 1860% coverage were identified as the optimal combination for minimizing roughness and martensite transformation while maximizing CCRS, CFWHM, and microhardness. Acceptable error tolerances were achieved. Increasing the number of factors in the response surface methodology (RSM) model beyond the 22 tests conducted in this study would lead to a more refined testing process and reduced errors. By grasping the concept of multi-response optimization, a more accurate estimation of material behavior across different practical applications can be achieved compared to the previous single-response approach. In this context, five key factors have been identified, each potentially exerting a significant influence on specific scenarios. For instance, the quantity of martensite following cold-working (in this case, SP) is expected to affect the fatigue and corrosion characteristics of AISI 316L. This approach facilitated the identification of trends among observed factors and enabled the attainment of desired target values through the optimization process.

5 Code availability (software application or custom code)

In this investigation, the corresponding author will be able to present provided codes or data around the reasonable request.