1 Introduction

Shape memory alloys possess two distinct properties, namely the superelastic effect (SE) and the shape memory effect (SME). SE refers to their ability to undergo large, reversible strains at a constant temperature due to stress-induced phase transformation, while SME is their ability to return to the original shape after deformation when heated above the transformation temperature. These characteristics make them excellent candidates for engineering and medical applications [1]. When used in applications, such as actuators and stents, SMAs are often required to be cycled between their transformation temperatures [2]. There are three types of cycling that they undergo, depending on their functional properties (SME or SE), temperature (thermal/thermomechanical), and loading conditions (SE cycling) [3]. It is known as functional fatigue when SMA-based devices undergo repeated use, such as thermal or thermomechanical cycling, which results in the degradation of the SMA’s shape memory properties [4].

The number of dislocations during cycling is usually higher in the early stages due to rapid dislocation generation [5]. Nevertheless, SMAs show stable functional behaviour when exposed to prolonged cyclic use. This is because the material becomes work-hardened due to the interaction between dislocations, which prevents the generation of additional dislocations. Achieving stable behaviour of SMAs is of prime importance from an application perspective [6]. It can be done by various means, including addition of ternary or quaternary alloying elements [7], or thermomechanical treatments [8], or partial cycling [3].

It has been demonstrated that partial cycling, i.e., cycling between austenite finish (Af) and martensite finish (Mf) temperature, of SMAs with lesser strain amplitude, increases fatigue life by tenfold [3, 9]. Therefore, partial cycling of SMAs is considered to be an effective strategy for improving their functional performance. Partial cycling is generally defined by phase transition temperatures relative to the operating temperature range. Partial cycling occurs when at least one operating temperature falls between Mf and Ms, or Af and As, respectively.

An artificial neural network, or ANN, is an effective computing technique that is derived from biological neural networks [10]. ANNs are made up of a network of nodes connected in such a way that mimics the activity of neurons in a normal brain [11]. In ANN, signals are received, processed, and then transmitted to neurons that are connected to it. In neurons, the output is determined by their inputs, and the signal is a real number. Neurons are normally organised in layers, and these linkages are referred to as edges [12]. Neurons and edges modify their weights as learning progresses and weights are generally used to boost or weaken the signal strength at a link. Neurons can only send signals if the total signal level is higher than a specific level. Different levels may modify neuron inputs in different ways, and signals are sent from the first to the last layer (the output layer), sometimes after many traversals of all layers [13].

Using the ANN technique, researchers have explored several aspects of shape memory behaviour. These include the hysteresis behaviour of thin SMA wire [14], prediction of online displacement control [15] and tracking control of SMA actuator [16]. Other studies have focused on control for SMA-based manipulators [17, 18], prediction of characteristic transformation temperatures [19, 20], hot deformation behaviour of Fe-based SMAs [21] as well as prediction of machinability of SMAs [22]. However, the ANN-based prediction of functional fatigue behaviour has not been studied or reported till date. Thus, this study aims at predicting the functional fatigue characteristics of NiTi alloy on partial thermal cycling under a constant load.

2 Experimental methodology

Near-equiatomic NiTi SMA sheets of 0.5 mm thickness were used in this study. The sheets were solutionized at 900 °C for one hour (3.6 ks) and then quenched in water at room temperature. Test specimens were machined into a dog-bone geometry using wire-cut electrical discharge machining (EDM). The functional fatigue experiments were conducted using a custom-built thermomechanical cycling test setup. A constant uniaxial tensile stress of 100 MPa was applied to the specimens by suspending a calibrated deadweight at one end. Heating was performed by passing direct electrical current through the specimen, while cooling was achieved using forced air under ambient conditions. Under constant 100 MPa stress, a series of studies were conducted by changing the maximum cycle temperature between 40 °C (just above As) and 80 °C (just below Af). These temperature range was chosen based on the transformation temperatures (Mf=31℃; Ms=37℃; As=35℃; Af=83℃) of the SMA under the constant load of 100 MPa.

The cycling protocol included four current levels, i.e., 10 A, 12.5 A, 15 A, and 17.5 A, to vary the upper cycle temperature. These current levels approximately correspond to maximum cycle temperatures of ~ 40 °C (just above As), ~ 56 °C, ~ 71 °C, and > 83 °C (just below Af), respectively. Each thermomechanical cycle consisted of a 40-second heating phase followed by a 200 s cooling phase, maintaining a heating-to-cooling time ratio of 1:5. The specimen temperature was measured at the centre of the gauge section using a calibrated optical pyrometer, and data were recorded continuously at 10 µs intervals using a high-speed data acquisition system.

The functional fatigue behaviour of the NiTi alloy was examined using a feed-forward back-propagation approach in this study. Weights and biases in the feed-forward back-propagation algorithm are modified to lower the target error and correlate the input with the output. The ANN model utilized two input parameters, such as current and number of cycles, and four output parameters, such as recovery strain, permanent strain, permanent strain accumulation, and upper cycle temperature. The term recovery strain refers to the strain recovered during the reverse transformation from martensite to austenite, while permanent strain denotes the residual strain retained after a full thermal cycle due to plastic deformation. The upper cycle temperature is defined as the maximum temperature reached in each thermal cycle, which is determined by the magnitude of the applied current.

The architecture of the ANN in this work is 2-10-4, where 2 denotes the input values, 10 the number of hidden layer neurons, and 4 the output values. The range of 0–1 was adopted to normalise the input and output variables. A total of 154 data sets were selected from the total experimental values. An ANN model was trained using 140 random values (91%) and tested using the remaining 14 (9%) values. The study was carried out with the help of the MATLAB R2018a software’s neural network toolbox. The neural network’s training variables are given in Table 1. Figure 1 depicts the ANN design as well as the parameters used to forecast the functional fatigue behaviour.

Table 1 Training variables for the neural network
Fig. 1
figure 1

ANN parameters for training of the functional fatigue characteristics of NiTi SMA

3 Results and discussions

During partial cycling, the recovery strain increases with an increase in maximum cycle temperature, as depicted in Fig. 2. The sample heated (17.5 A) nearer to the austenite finish (Af) temperature exhibits the highest strain recovery of ~ 3%. The lower recovery strain, on the other hand, corresponds to a sample, whose temperature is closer to that of the austenite start (As) on heating (10 A). This is due to the fact that the maximum cycle temperature is interrupted in the middle of the transformation and that the strain associated with this temperature is only restored during the reverse transformation. As predicted by the ANN model, the experiment results were similar to the predictions of the model.

Fig. 2
figure 2

Comparison of recovery strain of the ANN model with experimental results at different current levels: (a) full cycle range; (b) magnified view of the first 50 cycles showing the initial strain recovery behaviour

Fig. 3
figure 3

Comparison of the ANN model’s upper cycle temperature with experimental results at different current levels: (a) full cycle range; (b) magnified view of the first 50 cycles to illustrate the initial temperature evolution

During the first ~ 25 cycles, the maximum cycle temperature increases by approximately 20% from its initial value before reaching a steady state (saturation) for most current levels. For the highest current level of 17.5 A, this saturation was not observed within the 1000 tested cycles. When the current is above 12.5 A, the variations in Tmax tend to increase more noticeably before stabilising. At lower current levels, Tmax rises quickly within the first 12 cycles, regardless of the current amplitude, and then approaches saturation after about 25 cycles. The ANN model predicted a similar pattern, as illustrated in Fig. 3.

Fig. 4
figure 4

Comparison of the ANN model’s permanent strain with experimental data at different current levels: (a) full cycle range; (b) zoomed view of the first 50 cycles showing the initial behaviour

During the early stages of cycling, irreversible strain develops quickly in the SMAs, which then tends to saturate [4, 23]. The generation of dislocations during cycling is indicated by the permanent strain. For current levels of 10–15 A, the permanent strain saturated, indicating strain hardening that hinders the formation of new dislocations. At 17.5 A, however, the permanent strain continued to increase without clear saturation due to excessive deformation, leading to necking and eventual failure. The similarity in trends between the maximum cycle temperature profile and permanent strain suggests that microstructural changes associated with plastic deformation, such as dislocation accumulation, also influence heat generation during cycling, thereby affecting the maximum cycle temperature. The ANN-based model is able to predict the permanent strain (Fig. 4) and permanent strain accumulation (Fig. 5) in each cycle more accurately.

Fig. 5
figure 5

Comparison of the ANN model’s permanent strain accumulation in each cycle with experimental data as a function of cycle number at different current levels: (a) full range of cycles; (b) magnified view of the first 50 cycles showing the initial behaviour

Fig. 6
figure 6

Mean square error vs. epochs for the trained, experimented and tested values of functional fatigue behaviour for the NiTi SMA

The accuracy of the prediction was evaluated by the relative errors between the experimental and predicted values. In ANN, an epoch is a measuring unit that specifies how many times the ANN algorithm has run through the whole training data set. Epochs are important in ANN models because they help discover the model that best describes the sample with the least amount of error. Several epochs can be utilised to train the model; under these circumstances, the data is supplied to the neural network many times. In this study, the best validation performance is 0.0067188 at the 6th epoch, as shown in Fig. 6. Initial results showed a higher error, which decreased as the number of epochs increased.

Figure 7 shows the regression plots for the ANN model outputs compared with experimental targets for the training, validation, testing, and overall dataset. In all cases, the data points lie close to the ideal Y = T line, indicating a strong correlation between predicted and actual values. The slopes range from 0.80 to 0.95 with small offsets, and the correlation coefficients (R) are consistently above 0.9, show that the model has learned the underlying relationship effectively. The low scatter in the training and validation sets indicates stable learning, while the testing set confirms the model’s predictive capability on unseen data. The overall dataset regression consolidates all points, showing that the ANN reliably predicts the functional fatigue behaviour across the full range of input conditions.

Fig. 7
figure 7

Correlation coefficient for the dataset of training, testing, validation and overall, of NiTi SMA from artificial neural network

Fig. 8
figure 8

Residual plots for (a) recovery strain; (b) permanent strain; (c) permanent strain accumulation in each cycle and (d) upper cycle temperature

Figure 8 shows the residual plots for the four predicted outputs, (a) recovery strain, (b) permanent strain, (c) permanent strain accumulation per cycle, and (d) upper cycle temperature, compared with the experimental values. The residuals for all parameters are mostly close to zero, indicating that the ANN model predictions agree well with the experimental results without significant bias. Recovery strain and upper cycle temperature show very small scatter, which confirms the high accuracy of the model for these outputs. In the case of permanent strain, the scatter is relatively higher, which can be linked to the continuous deformation of the SMA during thermal cycling, along with necking and eventual fracture in some cases.

For permanent strain accumulation per cycle, the scatter is moderate and slightly increases at higher cycle numbers, which may be due to cumulative experimental uncertainties over repeated cycles. In all the cases, the scatter is more prominent in the initial cycles. However, once the behaviour reaches saturation, the scattering reduces significantly. The residual plots confirm that the ANN model predictions are in close agreement with experimental data for all outputs, with most residuals near zero. Higher scatter in the initial cycles reduces as the behaviour saturates, indicating stable and reliable model performance over time.

4 Conclusion

In this study, a feed-forward backpropagation ANN model was developed to predict the functional fatigue behaviour of NiTi shape memory alloys under partial thermal cycling. Using two input variables, i.e., electrical current (10 A to 17.5 A) and number of cycles (up to 1000), the model predicted four key output parameters: recovery strain, permanent strain, upper cycle temperature, and accumulation of permanent strain. A total of 154 experimental data points were used for training and testing of the nural networks. The ANN achieved an overall prediction accuracy of 94.3%, with a best validation performance (mean square error) of 0.0067188 at the 6th epoch. This demonstrates the model’s ability to effectively capture the nonlinear, cyclic degradation behaviour of the NiTi alloy. To ensure reliability, a 5-fold cross-validation was also performed. The average prediction accuracy across the folds was ~ 93%, confirming the generalizability of the ANN model despite the limited dataset size.

Moreover, the model was able to reproduce key trends observed experimentally. For instance, recovery strain increased with higher current levels, while permanent strain accumulation showed early growth followed by saturation, consistent with dislocation hardening behaviour. The ANN predictions closely matched experimental trends across all measured outputs, confirming that such models can reliably estimate functional degradation without relying on complex constitutive formulations. This approach is especially valuable in applications where time-dependent performance must be estimated quickly and accurately. The results also suggest that the ANN model can be extended to other shape memory alloy systems or adapted for real-time condition monitoring in smart material applications.