1 Introduction

MoO3 has a large energy gap [1, 2], which allows it to possess several uses in many fields. MoO3 thin films have been used in solid catalysts, battery electrodes, transparent and conductive surface coatings, gas sensing devices, organic light-emitting diodes (OLEDs), and organic photovoltaic (OPVs), such as buffer layers [3, 4]. Furthermore, it has good electrochromic properties and a faster response time than other minerals such as tungsten trioxide (WO3) and titanium dioxide (TiO2). Additionally, the MoO3 thin film becomes gray when it senses an electrical input, enabling it to be used in many applications. Within the visible spectrum, its absorption curve is spherical, where its absorption peak is close to 550 nm, which is in the sensitive range for human eye. Numerous electrical and optical studies on electrochromic materials were conducted over the past 10 years. The MoO3 thin film causes the formation of various colored centers when it is exposed to UV light [2, 5].

It resembles the several uses of n-type semiconductors, including gas detection. However, metal oxide gas detectors are quicker and easier to use than other detectors since they "transfer" gas into electricity [6, 7].

The goal of this work is to investigate the optical–physical properties of the MoO3 thin film, which was prepared by thermally evaporation technique onto glass and quartz substrates as shown in ref. [8]. Also, a modeling of the obtained experimental data of MoO3 thin film was performed using the artificial neural network (ANN) model.

A single oscillator model has investigated the optical dispersion parameters. The single oscillator energy (E0), dispersion energy (Ed), lattice dielectric constant (εL), and indirect optical transitions with corresponding energy gaps (Eg) and nonlinear optical parameters were determined experimentally and compared to the results of the ANN model simulations for the MoO3 thin film over quartz and glass.

The ANN model was incorporated in the latest version of MATLAB software and used to simulate the optical properties of MoO3 thin film. ANNs are highly performance computer programs depending on the training of the human brain. These programs are primarily employed in pattern mapping and pattern classification, such as visual images and speech recognition, and they solve a variety of difficulties that would otherwise be encountered with other techniques. Recently, there has been much focus on using such intriguing networks to solve the challenges that physicists face due to the lack of equipment. The advancement of ANNs and their utilization of physics has made it possible to represent a large variety of relationships. Therefore, the ANN model is considered a high-performance and speed technique [9,10,11,12].

After successful training, neural networks can generalize and combine statistics. A neural community can gift solutions for comparable troubles of the same class, which is valuable for sample recognition systems. Additionally, ANN deals with nonlinear problems, and it has an advanced degree of fault tolerance against noisy input data.

The ANNs and Levenberg–Marquardt algorithm are combined to estimate the optical–physical characteristics of the MoO3 film, such as the measurement of transmittance T(λ), reflectance R(λ), refractive index n(λ), and the absorption index k(λ) at normal incidence in the wide range of wavelength.

2 Techniques

2.1 Experimental techniques

In the present work, thin film of MoO3 with purity 99.999% (5 N) was purchased from Leybold–Heraeus GmbH and used without additional purification. A thin film of MoO3 has been thermally evaporated under vacuum onto glass and quartz substrates. The pressure of vacuum was 1.8 × 10−5 Pa during deposition. The film was deposited from a quartz crucible source heated by a tungsten coil onto a clean optical flat fused quartz substrate for optical measurements and onto clean glass substrate for structural investigations [13]. The distance of substrate coat surrounding is equal to be 25 cm. The conventional thermal evaporation procedure, type Edwards Co. model E 306A, England, has been used to produce thin films of MoO3 on various types of substrates depending on the aim of measurements. For structural characterization, fused amorphous glass substrates were used, whereas fused quartz substrates and glass substrates were selected for optical measurements. The film thickness measurements were performed using a quartz crystal monitor and the ‘‘Tolansky’s’’ interferometry method [14]. The rate of deposition was controlled at 1 nms−1 using a quartz crystal thickness monitor type (FTM6, Edwards) [14]. In the wavelength range 300–1400 nm, the spectral behavior of transmittance and reflectance for as-deposited films at the thickness 310 nm are exmined.

2.1.1 Structure determination of MoO3 thin film

A highly effective method for identifying crystalline materials and their structural particulars, such as phase composition and crystal orientation, is xRD. A Philips (model x, pert) diffractometer operating at 40 kV and 25 mA was used with a wavelength (λ) of 1.54 Å of CuKα radiation. The diffraction patterns were automatically recorded at a scanning rate of 0.05°/min [16].

2.1.2 Optical–physical properties of MoO3 thin film

The transmittance and reflectance of the MoO3 thin film were measured using a spectrophotometer (JASCO model V-570 UV–VIS-NIR) at a normal incidence in a range of spectral regions of 300–1400 nm [15]. The absorption coefficient (α) and the optical constants (refractive index n and absorption index k) were estimated for MoO3 thin-film 310-nm thickness based on the following equations implemented on computer software, where the measured absolute values of T and R are used as inputs [17, 18],

$$\alpha = \frac{1}{d}\ln \left[ {\left( {\frac{{(1 - R)^{2} }}{2T}} \right) + \left( {\left( {\frac{{(1 - R)^{4} }}{{4T^{2} }}} \right) + R^{2} } \right)^{\frac{1}{2}} } \right].$$
(1)
$$k \, = \alpha \lambda \, /4\pi .$$
(2)
$$n \, = \left( {\frac{4R}{{(1 - R)^{2} }} - K^{2} } \right)^{\frac{1}{2}} \, + \left( {\frac{1 + R}{{1 - R}}} \right).$$
(3)

where d is the thickness of the film.

The experimental error in determining T and R is ± 1%, and the calculated values of n and k with the computation procedure based on Murmann’s precise equation is 2.5% [16]. A single oscillator model was used to estimate the optical dispersion parameters, such as oscillator energy (E0), dispersion energy (Ed), lattice dielectric constant (εL), and indirect optical gap with (Eg) for the used thin film onto two different substrates [16]. The optical dispersion parameters are estimated using the ANN model and compared to the corresponding experimental obtained values.

2.2 Simulation ANN model

ANN is a mathematics-based model that is approximately supported by the human brain, and it is represented by a simple processing unit of a connected network (artificial neurons) that learns from practice by adjusting its weights [19].

The building block of ANN consists of multiple layers (input, output, and hidden layers) and numerous nodes (neurons), as shown in Figs. 1 and 2. Weights are linkages that connect these nodes at different levels. According to Fig. 3, the ANN's processing units are the artificial neurons. Mostly, training is viewed as the major working phase of the ANN [20].

Fig. 1
figure 1

Operation at a node of the used neuron of ANN model

Fig. 2
figure 2

Representative architecture of a feed-forward the suggested ANN model

Fig. 3
figure 3

a Backpropagation network block diagram and b schematic diagram of the obtained ANN networks

Weight and bias changes are made during network training until the ANNs' performance is optimized. The suggested ANN model depends on the Levenberg–Marquardt algorithm, specifically designed to minimize MSE values, proving the success of the model. Among all backpropagation algorithms, the Levenberg–Marquardt algorithm is the most successful one for predicting both measured and unmeasured experimental data.

In Fig. 1, each input \({x}_{m} \mathrm{is weighted by an element}\) \({W}_{m}\), and the whole range of data sources is identified \({\sum }_{\mathrm{all inputs}}({W}_{m} {x}_{m})\) and added to bias b for each ANN neuron to get the output Ym as in Eq. 4 [20].

$${\text{Output}} = \mathop \sum \limits_{{{\text{all }}\;{\text{inputs}}}} \left( {W_{m} x_{m} } \right) + b = Y_{m} .$$
(4)

Figure 3a and b depicts a block and schematic diagram of the backpropagation network. Training works to minimize the error that indicates a difference between the simulation results and the experimental data in order to produce the best possible result thus minimizing the subsequent mean square error (MSE) [20].

$${\text{MSE}} = \frac{1}{m}\mathop \sum \limits_{i = 1}^{m} (t_{i} - y_{i} )^{2} .$$
(5)

where n represents the amount of trained data points.

3 Results and discussion

In this research, the optical properties, such as (T, R, n, k, (n2–1)−1, n2, (αE\({)}^{1/2}\),\({\varepsilon }_{1}\),\({\varepsilon }_{2}\), VELF, and SELF) of a well-prepared MoO3 thin film were estimated both experimentally and theoretically (ANN model). The prepared sample showed good structural characteristics that are valid for different applications using the thermal evaporation method under a high vacuum on various substrates, such as glass and quartz.

3.1 Structural properties

The xRD pattern of MoO3 with step size [°2Th.] equal to be 0.05 is shown in Fig. 4. The pattern contains several diffraction peaks with different intensities, displaying the orthorhombic structure of the MoO3 powder, in accordance with the orthorhombic design as explained in ref. [23]. The unit cell of the prepared MoO3 was examined using the Fullprof Suite tool (version 2020), which is based on the Rietveld technique, considering a pseudo-Voigt [22]. Indexing was carried out for the patterns, and their peaks were identified as orthorhombic crystal system with lattice constants of orthorhombic structure with lattice parameters of a = 13.8560 Å, b = 3.6980 Å, c = 3.9620 Å, and α = β = ϒ 90.0000 Å was discovered using xRD investigation [23].

Fig. 4
figure 4

x-ray diffraction pattern of MoO3 powder

The size–strain formula that appears in Eq. 6 was utilized to get the average crystallite size [25].

$$(d_{{{\text{hkl}}}} \beta \cos \theta )^{2} = \frac{k}{D}(d^{2}_{{{\text{hkl}}}} \cos \theta ) + \left( {\frac{\varepsilon }{2}} \right)^{2} .$$
(6)

where dhkl, K, ε, Ɵ, and β are the interplanar spacing, Scherrer’s constant, Bragg’s angle, microstrain, and full width at half maximum, respectively. The size–strain plot, expressed by the plot of (dhkl βcosƟ)2 versus \((\)d2hklcosƟ) for all MoO3 preferred orientations, is shown in Fig. 5.

Fig. 5
figure 5

Plot of (dhkl βcosƟ)2 versus \((\)d2hklcosƟ) for MoO3 powder

From the figure, the average crystallite size, D, is calculated to be equal to 132.84 nm, and microstrain, ε, is extracted from the plot to be equal to 1.2×10−4 as in ref. [21, 24]. Additionally, the dislocation density, or length of dislocation lines per volume unit, is computed as in [21, 24, 25],

$$\delta = \frac{1}{{D^{2} }}$$
(7)

According to this work, the average dislocation density, , is 5.7 × 10–4 nm−2. The xRD pattern of MoO3 thin film onto the glass substrate is shown in Fig. 6. The number of crystallites per unit area N can be calculated from the given formula [24]:

$$N = \frac{t}{{D^{3} }}$$
Fig. 6
figure 6

x-ray diffraction pattern of MoO3 film onto the glass substrate

Where N is the number of crystallites per unit area which calculated to be equal to 1.3  × 1014 crystallite/m2, and t is the thickness of concerned film. The data were smoothed, and the xRD exhibits a broad feature that indicates a partially crystalline structure of MoO3 thin film. This result is supported by leaving only one discernible peak with one broad characteristic orientation (1 1 1) in the diffractogram. The absence of an orthorhombic nature in the MoO3 films indicates that the sample was insufficient for extended atom arrangements in the deposited film.

3.2 Mathematical modeling by ANN model

The measured optical properties were simulated by the ANN model using 22 individual neural networks trained separately of the MoO3 thin film. The structure of ANN networks is as follows: the No. of hidden layers (No. of HLs), No. of nodes (No. of Ns), inputs, no. of epochs, and MSE and R values, and outputs of simulation of the optical behavior of the MoO3 thin film are summarized in Table1.

Table 1 Overview of ANN model parameters of optical parameters of the used thin film of MoO3

In this study, the data are divided into three parts: the training set (80%), the test set (10%), and the validation set (10%). The primary objective of this classification is to establish the validation of the used ANN model after training by testing it to predict random values of the used data. The training algorithm is e×plained in detail in Appendi× A.

In all studied cases, the R values are close to one. The ANN's results and the obtained e×perimental data are in good agreement, as indicated by the MSE and regression values. Tansig for networks and purelin for the output layer are the transfer functions utilized in the hidden layer. Table 1 displays every optical properties of MoO3 utilized in the ANN model.

The parameters of training of simulated results by ANN model of the optical–physical properties of the used sample are discussed as follows (Figs. 7, 8, and 9).

Fig. 7
figure 7

The error histograms of the suggested ANN model for MoO3 film a T versus λ onto glass, b T versus λ onto quartz, c R versus λ onto glass, and d T versus λ onto quartz

Fig. 8
figure 8

Best training, validation, and test performance (MSE) for MoO3 film a T versus λ onto glass, b T versus λ onto quartz, c R versus λ onto glass, and d T versus λ onto quartz

Fig. 9
figure 9

Regression values ® for the training, validation, and test sets for MoO3 film a T versus λ onto glass, b T versus λ onto quartz, c R versus λ onto glass, and d T versus λ onto quartz at the utilized epoch

3.2.1 Transmittance and reflectance spectra

In Fig. 10a and b, the spectral behavior of transmittance (T) and reflectance (R) for MoO3 film prepared by thermal evaporation onto quartz and glass with a thickness of 310 nm in λ = 300–1400 nm range is discussed, as well as that obtained from ANN simulation model, it is evident at wavelength >900 nm, T+R = 1 which implies that no light is scattered or absorbed. The optical constants (real and imaginary parts of the complex refractive index) were determined from the absolute values of the transmittance of films by exact formulas. The transmittance of thin films exhibited a sharp rise in the near infrared (NIR) region. In the visible region, MoO3 film onto different substrates displays an average transmittance of around 0.9.

Fig. 10
figure 10

Comparison between the simulation ANN model and the obtained experimental data of T and R for MoO3 film onto a glass and b quartz substrates versus λ at a thickness of 310 nm

Proving the high performance of the ANN model through low MSE value encouraged us to estimate the transmittance and reflectance of MoO3 film onto glass and quartz substrate. Figures 8 and 9 display the generated MSE and R values for the training, test, and validation sets for transmittance and reflectance of MoO3 film onto glass and quartz substrates as presented in Table 1, where epochs mean the number of training. The obtained performance values confirm that ANN has been learned. As a result, a theoretical equation was obtained that successfully produced all optical properties and is presented in Eq. A in Appendix A. The reproduction of the measured values successfully led to good prediction of both measured and unmeasured experimental data.

Figure 10a and b represents a comparison between the measured experimental data and the corresponding simulated results for the transmittance and reflectance versus λ for MoO3 thin film onto glass and quartz substrates with a thickness of 310 nm, respectively. The results obtained from the ANN simulation model obviously coincide with the measured experimental data.

3.2.2 Refractive index and the absorption index spectra

For the MoO3 thin film prepared by thermal evaporation onto two various substrates with a thickness of 310 nm, the spectral behavior of the refractive index, n, and the absorption index, k, versus (Vs) λ is compared to the simulated results obtained by ANN model. For the most effective design of optical devices, a thorough examination of the behavior of refractive indices at the range of desired spectral wavelengths is required (Fig. 11).

Fig. 11
figure 11

Best training, validation, and test performance (MSE) MoO3 film a n versus λ onto glass, b n versus λ onto quartz, c k versus λ onto glass, and d k versus λ onto quartz

As can be noticed in Fig. 12a and b, the dispersion displays two distinct spectral regions. The anomalous dispersion behavior of n at λ < 900 nm is exposed in the first region. The anomalous dispersion of n may be due to resonant oscillations of polarized electrons [21]. The single oscillator model may be utilized to analyze normal dispersion and derive the dispersion characteristics. At a wavelength of λ < 900 nm, the second region exhibits normal dispersion behavior of n, in which the value of n drops as the wavelength increases until it reaches a virtually constant value as represented in ref. [21].

Fig. 12
figure 12

ANN simulation and the obtained experimental data of MoO3 film n and k versus λ onto a glass and b quartz

The no. of neurons in the HLs and the resulting MSE and R values for the training, test, and validation sets are as displayed. Table 1 describes a simplified illustration of the suggested ANN networks of n and k versus λ in λ= 300–1400 nm.

Also, the high performance of the ANN model through low MSE value encourages us to estimate k versus λ for the MoO3 thin film as described in Fig. 11a–d.

We estimate the optical constants of MoO3 film onto glass and quartz substrates with a thickness of 310 nm as well as that obtained from the ANN simulation model as shown in Fig. 12a and b for the spectral behavior of refractive index, n, and the absorption index, k, versus (Vs) λ, respectively. The agreement between simulation results and experimental data is observed.

The resulting curve indicates that, in contrast with other traditional theoretical approaches, the simulated n and k results-based ANN model demonstrated nearly accuracy corresponding to the experimental data.

3.2.3 Dispersion parameters

The MoO3 film's refractive index dispersion over quartz and glass substrate was estimated using the Wemple and DiDomenico relationship, as presented in Eq. 8, a model consisting of a single oscillator [19].

$$n^{2} - 1 = E_{{\text{d}}} E_{{\text{o}}} /[E_{{\text{o}}}^{2} - E^{2} ]$$
(8)

where Eo is the energy of the oscillator, Ed is the dispersion's energy, and E = h \(\nu\) is the photon's energy. The parameter Ed is unaffected by the bandgap, which evaluates the intensity of the inter-band optical transition.

These energies provide sufficient information about the overall band structure of the material, which is needed for a number of optoelectronic applications. The \({{\varvec{E}}}_{{\varvec{o}}}\) and \({{\varvec{E}}}_{\mathbf{d}}\) values were deterimend from the slope \(\frac{1}{{{\varvec{E}}}_{\mathbf{o}}{{\varvec{E}}}_{\mathbf{d}}}\) and intercept \(\frac{{{\varvec{E}}}_{\mathbf{o}}}{{{\varvec{E}}}_{\mathbf{d}}}\) values of the plot between (n2 − 1)−1 and E2 as in ref. [26, 28, 29]], which presented in Table 3, and these experimental data were compared with the simulation results by ANN model. The static refractive index (no) of the MoO3 thin film was calculated using the equation in Table 3 as in ref. [21]:

$$n_{o} = \sqrt {1 + \frac{{E_{{\text{d}}} }}{{E_{{\text{o}}} }}}$$
(9)

One of the material's dynamic parameters, the dielectric constant has several practical applications [26]. From the variation of n2 versus λ2, the intercept of the vertical axis at λ2 = 0 is related to εL (lattice dielectric constant) and can be calculated by using the following Eq. 10 as demonstrated in Table (4) [27].

$$\varepsilon_{1} = n^{2} = \varepsilon_{{\text{L}}} {-\!\!-}\frac{{e^{2} N}}{{4\pi^{2} \varepsilon_{o} m^{*} C^{2} }}\lambda^{2}$$
(10)

where N/m* indicates the carrier concentration to effective mass ratio, e is the electron charge, εo is the dielectric constant, and c is the speed of light.

The ninth, tenth, eleventh, and twelfth of the suggested ANN networks have the no. of neurons in the HLs and the generated MSE and R values for the training, test, and validation sets of MoO3 films onto different substrates for (\({n}^{2}\)–1\({)}^{-1}\) versus E2 and n2 versus λ2 in the range of 300–1400 nm as described in Table 1 (Fig. 13).

Fig. 13
figure 13

ANN model's training parameters that were obtained for MoO3 film a (\({n}^{2}\)–1\({)}^{-1}\) versus λ2 onto glass, b (\({n}^{2}\)–1\({)}^{-1}\) Vs λ2onto quartz, c n2 versus λ2 onto glass,and d n2 versus λ2 onto quartz

In Fig. 14 a and b, \({(n}^{2}\)–1\({)}^{-1}\) was estimated for MoO3 film onto glass and quartz substrate with a thickness of 310 nm using the ANN model. The obtained experimental data of n2 versus λ2 at a thickness of 310 nm with the acquired simulation results by ANN model are shown in Fig. 14c and d. The coincidence between experimental data and simulation results of the model of ANN is clearly observed.

Fig. 14
figure 14

The simulated ANN model and the obtained experimental data of MoO3 film of a (\({n}^{2}\)–1\({)}^{-1}\) versus λ2 onto glass and (\({n}^{2}\)–1\({)}^{-1}\) versus λ2 onto quartz, c n2 versus λ2 onto glass, and d n2 versus λ2 onto quartz, the green line refers to the experimental data tangent, and (the black line) refers to the tangent of simulation results of the ANN model

The low MSE value of the ANN model suggests that it performs successfully, which stimulates (\({n}^{2}\)–1\({)}^{-1}\), and n2 versus λ2 for MoO3 film onto glass and quartz substrates, as displayed in Fig. 13 and Table 1.

3.2.4 Energy gap by ANN model

In the high semiconductor absorption region, where r = 1/2 for indirect transitions, the optical bandgap, Eg, of MoO3 films was calculated using Tauc's equation in line with the relationship between the energy of the photon, E, the coefficient of absorption, A, is the Tauc parameter which gives insight for the disorder in the film [26, 30], and α at the absorption edge, as exhibited in Eq. 11 [16],

$$(\alpha E)^{r} = \, A(E - \, Eg)$$
(11)

The indirect energy gap can be identified by plotting (αE)1/2 with photon energy (E). This method can be applied to measuring the indirect energy gap for molecular oxygen thin layers on two various substrates. The optical indirect bandgap may be calculated by projecting the linear area of this curve to intercept the axis E (E = 0). The indirect energy gap values obtained through experimentation are demonstrated in Table 2 and are compared with published data for similar structures and ANN-modeled simulation results [31,32,33,34,35,36,37,38].

Table 2 The energy gap of a thin film of MoO3 with those published in the literature

The number of neurons in the HLs and the generated MSE and R values for the training, test, and validation sets of (αE)1/2 versus E in the range of 300–1400 nm of the MoO3 thin film at a thickness of 310 nm onto various substrates are presented in Table 1 for the thirteenth and fourteenth networks of the suggested ANN networks.

The main objective of the ANN model’s strong performance and low MSE value is to simulate (αE)1/2 with E, as shown in Fig. 15 and Table 1.

Fig. 15
figure 15

The training parameters of the suggested model of ANN for (αE)1/2 versus E of MoO3 film onto a glass and b quartz

The results of simulation (αE)1/2 versus E for MoO3 film onto glass and quartz substrate with a thickness of 310 nm with the acquired experimental data are illustrated in Fig. 16a and b, respectively. Simulating (αE)1/2 with E, as presented in Fig. 16 and Table 1, is a powerful factor of the ANN model's excellent performance through low MSE value.

Fig. 16
figure 16

A relation of the (αE)1/2 versus E simulation and experiment data displays that the black line represents the tangent of the ANN model's simulation results, and the green line represents the tangent of the data of experimental for MoO3 film onto a glass and b quartz substrate

As indicated in Table 3, these experimental data were contrasted with those from the results of simulation employing an ANN model.

Table 3 Estimation between the ANN model simulation results and the dispersion parameters and energy gap of MoO3 thin film onto glass and quartz substrate

3.2.5 Dielectric characterization

The comple× dielectric function has e×pressions for light transmission, reflection, and loss across the medium. Additionally, \({\varepsilon }^{*}\) is an important sum for the manufacturer, and a term used to display a high-efficiency optical–electronic system. A key factor in characterizing a material's optical and optoelectronic qualities are its refractive index and optical bandgap. Materials with a reduced bandgap and a higher refractive index may find use in detectors, solar cells, and waveguides among other device [39].

The complex dielectric function is represented by the equation as \({\varepsilon }^{*}\) = \({\varepsilon }_{1}\)+\({i\varepsilon }_{2}\). The following Eq. 12 represented n and k are indicated to \({\varepsilon }_{1}\) and \({\varepsilon }_{2}\) [40].

$$\varepsilon_{1} = n^{2} - k^{2} \;{\text{and}}\;\varepsilon_{2} = 2{\text{nk}}$$
(12)

The simulation networks of the suggested ANN networks have the number of neurons in the HLs and the generated MSE and R values for the training, test, and validation sets of \({\varepsilon }_{1}\) and \({\varepsilon }_{2}\) versus E in the range of 300–1400 nm of the mentioned film at a thickness of 310 nm onto quartz and glass substrates, as displayed in Table 1 and Figs. 17 and 18.

Fig. 17
figure 17

The estimated ANN network's training performance for MoO3 film of a ε1 versus E onto glass, b ε1 versus E onto quartz, c ε2 versus E onto glass, and d ε2 versus E onto quartz

Fig. 18
figure 18

\({{\varvec{\varepsilon}}}_{1}\) and \({{\varvec{\varepsilon}}}_{2}\) versus photon energy (E) using the model of ANN and experimental data for MoO3 film onto a glass and b quartz

The modulation \({\varepsilon }_{1}\) and \({\varepsilon }_{2}\) of the MoO3 thin film versus photon energy, E, is identified in Fig. 18. Peaks in the dielectric spectra provide information about the material's electronic structure through interactions between emitted photons and electrons.

For the fifteenth, sixteenth, seventeenth, and eighteenth networks, we estimate \({\varepsilon }_{1}\) and ε2 for MoO3 film onto two various substrates versus E with a thickness of 310 nm using the ANN model, as shown in Fig. 18a and b. The resulting curve illustrates a good agreement between the matching experimental data, and the ε1 and ε2 indicated in ANN results. This result indicates that the trained network and the measured curves select optimal generalization performance.

The electron losses its energy when traveling in the material, which could be divided into two parts volume energy loss function (VELF) and surface energy loss function (SELF). Both parameters are calculated by given relations [41]

When incoming electromagnetic energy travels through a material's surface or bulk, it interacts with the electrons there [42]. The surface energy loss function (SELF) and the volume energy loss function (VELF) were used to calculate these interactions. The SELF and VELF are \({\varepsilon }_{1}\) and \({\varepsilon }_{2}\) as follows in Eqs. 13 and 14: [26, 43] (Fig. 19).

$${\text{VElF}} = - {\text{Im}} \left( {\frac{1}{{\varepsilon^{*} }}} \right) = \frac{{\varepsilon_{2 } }}{{\varepsilon_{1}^{2} + \varepsilon_{2}^{2} }}$$
(13)
$${\text{SElF}} = - {\text{Im}} \left( {\frac{1}{{\varepsilon^{*} + 1}}} \right) = \frac{{\varepsilon_{2 } }}{{(1 + \varepsilon_{1 } )^{2} + \varepsilon_{2}^{2} }}$$
(14)
Fig. 19
figure 19

The suggested ANN network’s training for MoO3 film a VELF versus E onto glass, b VELF versus E onto quartz, c SELF versus E onto glass, and d SELF versus E onto quartz

The SELF and VELF spectra exhibit high-intensity peak behavior with maximum loss energy at 1.4 eV at distinct peaks that characterize the MoO3 thin films, as shown in Fig. 20a. For the whole photon energy under consideration, the determined SELF for the mentioned film onto glass is 0.004, which is less than the VELF of 0.005.

Fig. 20
figure 20

VELF and SELF versus E using ANN and experimental data for MoO3 film a VELF and SELF versus E onto glass and b VELF and SELF versus E onto quartz

For the entire photon energy under consideration, the MoO3 layer over glass has a determined SELF lower than VELF, indicating that less energy is lost from the surface than when traveling through the bulk material, as revealed in Fig. 20b.

In the simulation networks of the suggested ANN networks, test and validation sets of VELF and SELF versus E in the range of 300–1400 nm of the MoO3 thin film at a thickness of 310 nm, which is prepared by thermal evaporation onto various substrates as presented in Table 1. The no. of neurons in the HLs and the produced MSE and R values for the training are displayed.

The simulation results, as presented in Table 1 and Fig. 19, demonstrate the ANN model's excellent performance because of its low MSE value. Attaining this level of proficiency validates the network's learning.

For the ninth, twenty, twenty-one, and twenty-two networks, we estimate (VELF and SELF) for MoO3 film onto glass and quartz substrate versus E with a thickness of 310 nm using the ANN model, as demonstrated in Fig. 20a and b. Then, the simulation of VELF and SELF Vs E matches experimental data.

The resulting curve displays that the VELF and SELF outcomes based on ANN are in excellent agreement with the acquired experimental data.

3.2.6 Nonlinear optical parameters

3.2.6.1 First (χ(1))- and third (χ(3))-order nonlinear susceptibility

The polarization no longer responds linearly to the related electric field when the material reacts with the nonlinear medium. When the electric field is changed, the nonlinearity behaves and plays differently. As the high-intense electric field hits the films, it alters the nonlinear characteristics. The nonlinear features in chalcogenide films are crucial for several material-dependent phenomena, including electronic polarizability, bond length, and nuclear interaction. Miller's formula was used to assess the first nonlinear susceptibility and third-order nonlinearity which calculated in Table 3 as in ref. [26, 44, 45]:

$$\chi^{\left( 1 \right)} = \frac{{({\text{no}}^{2} - 1)}}{4\pi }$$
(15)
$$\chi^{(3)} = A(\chi^{(1)} )^{4}$$
(16)

where A = 1.7 × 10−10 esu. The majority of transparent materials produce nonlinearity from anharmonic terms of the polarization of bound electrons. Nonlinear susceptibilities are mostly caused by the pure electrical effects of the material. The nonlinear susceptibility value of numerous chalcogenides is higher order than that of several oxide glasses. Chalcogenide materials are thought to be promising for optical switching and other related applications because of their non-resonant third-order susceptibilities [26, 48].

3.2.6.2 Nonlinear refractive index (n 2)

The nonlinear refractive index value plays an essential role since nonlinearity is a crucial parameter for numerous possible optical applications. It may be put to good use in the optoelectronics industry for things such as optical glass fibers and capacity communication systems, depending on its value [46]. Additionally, using the empirical relationship provided by the Miller rule [47], the nonlinear index of refraction (n2) was computed using the static refractive index (no) as a starting point as in ref. [26, 48].

$$n_{2} = \frac{{12\pi (\chi )^{3} }}{{n_{o} }}$$
(17)

The term "self-refraction" is denoted by the nonlinear refractive index. When the n2 value of glasses is higher than zero, they display a specific behavior in which the beams traveling through the material self-focus periodically instead of diffracting within the glass. An additional investigation into thermally MoO3 thin films shows enhanced patterns with thermal treatments and a greater value of the nonlinear refractive index of order 10−10 esu as in ref. [26, 48].

4 Conclusions

The powder of MoO3 has orthorhombic structure. The average crystallite size and dislocation density were 132.8 nm and 5.7 × 10−4 nm−2, respectively, based on the Williamson–Hall display. The study and ANN modeling for the optical properties were investigated for the MoO3 thin film onto glass and quartz substrates. The lattice dielectric constant (εL), indirect optical transitions with corresponding energy gaps (Eg), dispersion energy (Ed), and oscillator energy (E0) values and nonlinear optical parameters were estimated experimentally in comparison with the simulation results of the model of ANN. Using the MSE function, the ANN model to represent the obtained experimental data gives the best performance for all networks, with a value of less than 10−1, and the acquired theoretical equation for modeling to optical properties of the mentioned film onto glass and quartz, which presents higher approximation accuracy compared to other training methodologies. The ANN model's simulation results are compatible with the experimental data and display a good fit for the acquired experimental data. At last, the ANN model grows to be a significant branch in the solid state.