1 Introduction

Response surface method (RSM) is one of the powerful statistical experimental design techniques that is applied to build models and investigate individual and interaction effects of the selected operating condition on the given response in a given experiment [1]. It is a very effective approach for optimization of complex processes in a more convenient way resulting in saving time, labor, and cost [2, 3]. Box–Behnken design (BBD) is one kind of RSM, which helps to design a second-order response model [4]. BBD can provide a maximum amount of complex information with minimum experimental time [5]. Furthermore, in comparison with other statistical methods, such as full factorial design, it requires a few number of runs [6]. Most importantly, it avoids the analyses at their extreme combinations (such as at highest and lowest levels) for which unsatisfactory results might occur [7].

Titanium dioxide (TiO2) is one of the most promising semiconductor materials that has attracted a lot of attention because of its successful application in different areas as a heterogeneous photocatalyst. Some of the main application areas include degradation of organic pollutants [8], inactivation of pathogenic microorganisms from water and air [9], and degradation of dyes [10, 11]. Relative inexpensiveness, high efficiency, environmentally friendliness, chemical and biological stabilities are its unique advantages [12, 13]. Most importantly, it can be used repeatedly with its catalytic capability for a long period of time [14]. However, its main drawback is that it is only activated by ultraviolet (UV) light, which accounts for 4–5% of the solar energy that reaches the earth’s surface due to its wide band-gap energy (3.2 eV) [15].

So far, considerable efforts have been done in order to reduce its band-gap energy and utilize the visible-light which is the larger portion of the solar spectrum. One of the major approaches in this regard is doping, a modification of TiO2 by influencing the electron structure with metal and non-metal ions [9, 16]. In comparison with the metal dopants, non-metals such as C, S, F, and N are effectively applied in the synthesis of visible-light active TiO2 catalyst via band gap narrowing [17, 18]. After Asahi et al. [19], who first introduced successful doping of nitrogen and prepared a visible-light active TiO2 in the wavelength range of less than 500 nm, nitrogen atom has been widely investigated [16, 18]. This is because nitrogen can be easily introduced into the titanium structure, as it has comparable atomic size and ionization energy [20]. There exist different physical and chemical synthesis routes that include implantation, sputtering, ball mill, solvothermal, and sol–gel methods for synthesis of nitrogen-doped titanium dioxide (N-doped TiO2) [21, 22]. However, the sol–gel method seems to be by far advantageous over the other approaches. It is cheap, simple, and a low-temperature process. It requires no special equipment and offers relative ease to control the amount of dopant and crystal size [2326]. Doping of non-metals with the sol–gel method depends on a number of synthesis parameters. These include amount and type of dopant, solvent type, solution pH, calcination temperature, and time. The proper incorporation of the dopant and properties of the final nanoparticles are highly influenced by these factors.

In most previous studies, it has been tried to investigate the effects of sol–gel synthesis parameters on the preparation of N-doped TiO2 using the conventional “one-parameter-at-a-time approach”. Although this approach is widely acceptable, it has a limitation in estimating the interaction effects between the factors and lacks a predictive capability [27].

In this paper, optimization of some of the significant sol–gel synthesis parameters by using BBD is reported. Nitrogen to titanium molar ratio (N/Ti), calcination temperature and calcination time to the response on anatase weight fraction (W A), Brunauer–Emmett–Teller (BET)-specific surface area (S BET), and photoactivity (methylene blue (MB) decolorization efficiency (R)) under visible-light sources on the prepared N-doped TiO2 nanoparticles were investigated. Accordingly, the optimum BBD-based experimental values were found to be 100% (W A), 87.12 m2 g−1 (S BET), and 72.7% (R) for the conditions N/Ti molar ratio of 6, calcination temperature of 400 °C and calcination time of 3 h. Finally, doped and undoped TiO2 samples were prepared at the optimum conditions and their chemical and physical properties were compared.

2 Experimental

2.1 Catalyst preparation

The BBD method was adopted to synthesize N-doped TiO2 through sol–gel methods using ammonium hydroxide solution (28%) as a nitrogen source. Typically, 20 ml of a precursor solution titanium (IV) isopropoxide was slowly added to 100 ml of absolute ethanol, and the solution was adjusted to pH = 1 with nitric acid (60%). After 10 min of vigorous stirring on an ice bath, a different amount of ammonia solution was added to the prepared nano colloid solution to facilitate incorporation of nitrogen into TiO2 crystal. The amounts of ammonia solution were adjusted to give N/Ti molar ratios of 2, 4, and 6 with vigorous stirring for 2 h. Subsequently, the mixtures were aged at room temperature for 24 h to allow further hydrolysis and then oven dried at 90 °C for 16 h to remove the solvent. The produced powder was then ground and calcined in a muffle furnace at a heating rate of 5 °C per minute under air. Three calcination temperatures (400, 500, and 600 °C), and three calcination times (3, 4, and 5 h) were used. Based on BBD, a total of 15 experimental runs were performed. After optimization the doped and undoped samples (with and without addition of ammonia as nitrogen source) were prepared using the optimum synthesis parameters. The N-doped TiO2, and the undoped TiO2 were designated as xNTyz, where x, y, and z, respectively, denote the N/Ti molar ratio, the calcination temperature, and time.

2.2 Photocatalytic activity

The photoactivity of N-doped TiO2 nanoparticles was investigated using MB as a model chemical in batch photoreactor under visible-light irradiation. A 300-ml beaker was used as photoreactor for all experiments in which visible light was provided by Osram lamp (50 PARA30) with a wavelength of 400–700 nm. During this process, 1.0 g L−1 of the prepared powders were suspended in 100 ml of 10 ppm MB solution. The solution was continuously stirred with a magnetic stirrer to ensure homogenous mixing during 3-h irradiation period. Prior to proceeding to photoactivity test, the solution was stirred further for additional 30 min in dark environment to create adsorption-desorption equilibrium. After which, 10 ml of aliquots were taken from the reactor and filtered using 45-μm syringe filter. The MB concentration of supernatant was then analyzed with a portable spectrometer (DR 2700, Hach) at 664 nm wavelength absorbance. The MB decolorization efficiency (R) was calculated using the following equation:

$${\it{R}}\left( {\rm{\% }} \right) = \frac{{{{\it{C}}_{\rm{o}}} - {{\it{C}}_{\rm{f}}}}}{{{{\it{C}}_{\rm{o}}}}}{\rm{*}}\left( {{\rm{100}}} \right),$$
(1)

where C o and C f are the concentrations of MB before and after visible-light irradiation.

2.3 Box–Behnken experimental design

The experiments were designed according to the Box–Behnken method with the selected three important sol–gel synthesis parameters as mentioned earlier. The required responses were optimized after studying the influences of these independent parameters and their interaction effects. The factors and levels are given in Table 1. The factors, i.e., N/Ti molar ratio, calcination temperature, and calcination time were designated as A, B, and C, respectively. According to BBD the total number of experiment can be calculated as:

$$N = {k^2} + {k} + {C_p},$$
(2)

where k is a number of factors, and C p is a central replication point [5]. Table 2 shows the 15 experimental runs that are arranged according to BBD.

Table 1 Experimental levels of selected variables for BBD
Table 2 BBD with actual and predicted values of anatase weight fraction (W A), BET-specific area (S BET), and MB decolorization efficiency (R)

A second-order polynomial equation was used to find the relationship between the independent variables and the response. For the three chosen factors, the equation can be written as:

$$Y = {\beta _0} + {\beta _1}A + {\beta _2}B + {\beta _3}C + {\beta _{12}}AB + {\beta _{13}}AC + {\beta _{23}}BC \\ \quad + \, {\beta _{11}}{A^2} + {\beta _{22}}{B^2} + {\beta _{33}}{C^2} + \varepsilon ,$$
(3)

where \({\beta _0}\) is a constant, A, B, and C are the independent variables, \({\beta _i}s\) are the coefficients for linear interaction effect, \({\beta _{ii}}s\) are the coefficients for cross-product interaction effect, \({\beta _{ij}}s\) are the coefficients for quadratic interaction effect, and \(\varepsilon\) is the random error. The regression analysis and estimation of these coefficients were performed with a statistical software package Design-Expert® version 7.0.0 (Stat-Ease, Inc.). The adequacy of the model equations was evaluated using analysis of variance (ANOVA). Quality of fit of the model equations and their statistical significance were expressed using F-test, coefficient of determination (R 2), prediction coefficients of determination (Pred R 2), adjusted coefficients of determination (adj-R 2), and coefficients of variation (CV).

2.4 Catalyst characterization

The crystal phase compositions were obtained from the X-ray diffraction (XRD) measurement on PANalytical X’Pert PRO-MPD diffractometer with Cu-Kα radiation (λ = 0.15406), accelerating voltage (40 kV), and current (25 mA) at scan rate of 0.017 degree per minute in the range of 2θ = 20o to 85o. The average crystallite sizes of anatase and rutile phases were determined with the Scherrer equation .The weight fractions of the two phases were calculated using Spurr and Myers equation [28]. The specific surface area and pore volume and pore diameter were obtained from N2 adsorption-desorption isotherm by using BET and Barett–Joyner–Halenda methods with Micromertics, Tristar II 3020. The structural properties were investigated by Raman spectrometer (Horiba/Jobin-Yvon, LabRAM HR800) with spectra resolution of 0.54 cm−1 in the range of 0–1000 cm−1 Raman shift. Analysis of functional groups was performed using Fourier Transformed Infrared (Varian 640-IR) FT–IR spectrometer, from 4000–400 cm−1 wavenumber. The binding energy and nitrogen content were estimated with X-ray photoelectron spectroscopy (XPS) (VG Microtech ESCA 2000) with Mg-Kα X-ray source (hv = 1253.6). The binding energy of carbon (C 1s: 284.8 eV) was used as an internal standard for the correction of charging shift, and the spectra was analyzed using CasaXPS software (version 2.3.17PR1.1). UV–Vis spectra of the samples was scanned using UV/Vis/NIR Spectrophotometer (Hitachi, U-4100) in the range of 200–800 nm. High-resolution transmission electron microscopy (HR-TEM) (TECHNAI G2 F30 S-TWIN) operating at 300 kV was also used to investigate the average crystals size, morphology, and structure of the prepared nanoparticles. The surface morphologies and chemical composition of the syntheses samples were examined using field emission scanning electron microscope (FE-SEM) (JEOL JSM-7610F).

3 Results and discussion

3.1 Optimization of sol–gel synthesis parameters

Based on BBD and using the relationships in Table 1, a total of 15 experimental runs were performed including the central point that measures process stability and inherent variability. Figures 1 and 2 show XRD patterns and nitrogen adsorption-desorption isotherm of the as prepared N-doped TiO2 samples according to BBD. The results from these two characterizations, W A and S BET, were used as experimental response together with R (Table 2).

Fig. 1
figure 1

Selected XRD patterns of N-doped TiO2 prepares at N/Ti molar ratio of 2

Fig. 2
figure 2

Selected nitrogen adsorption-desorption isotherms of N-doped TiO2 prepares at N/Ti molar ratio of 2

The analysis of the models indicates that they are highly significant with F-values of 77.57 for (W A), 94.95 for (S BET), and 92.23 for (R) with their corresponding P-value < 0.0001. The ANOVA for the three selected responses is shown in Supplementary Information Tables S1, S2, and S3. The mutual interaction between the test variables can be revealed using P-values [29].

The model adequacy was further investigated using R 2 for the three responses (W A, S BET, and R), which were found to be 0.9929, 0.9942, and 0.994, respectively. These imply that the models are adequate enough to predict the response in the experimental range with 99.29, 99.42, and 99.40% variability. The experimentally found and the predicted values were in a good agreement as depicted in Table 2. The Pred R 2 show that the model equations for W A, S BET, and R give good predictions with 88.62, 91.30, and 91.63% variability, respectively. In addition, the adj-R 2 of W A (98.01%), S BET (98.37%), and R (98.32%) were in a reasonable agreement with Pred R 2 values. The degree of precision and reliability can be explained by the low values of CV, which were 0.46 for W A, 4.73 for S BET, and 3.01 for R. Furthermore, adequacy precision for each response (W A, S BET, and R) was found to be 22.76, 28.961, and 28.701. All the above values can be changed when only the significant terms are considered (see Supplementary Information Table S4). The values of “Prob > F” less than 0.05 indicate model terms are significant.

Based on regression analysis the quadratic model equations for the three responses, W A, S BET, and R, in terms of actual values can be written by considering the significant terms as follows:

$${{{W}}_{{A}}}\left( {{\% }} \right) = \ 37{{.46}} - {{1}}{{.55250}}{{A}} + 0.2955{{B}} + 0.00345{{AB}} \\ - {{0}}{{.00034375}}{{{B}}^{{2}}}$$
(4)
$$ {{{S}}_{{{BET}}}}\left( {{{{m}}^{{2}}}{\kern 1pt} {{{g}}^{ - 1}}} \right) =\ {{477}}{{.34258}} - {{5}}{{.2024}}{{A}} - {{70}}{{.00342}}{{C}} \\ +\, 0.5758{{{A}}^{{2}}} + 0.000574{{{B}}^{{2}}} + 8016183{{{C}}^{{2}}} $$
(5)
$$ {{R}}\left( {{\% }} \right) = - 53.85143 + 10.35875{{A}} + 0.51929{{B}} \\ \qquad\quad\ -\, 0.975{{C}} - {{0}}{{.017525}}{{AB}} - {{0}}{{.00060394}}{{{B}}^{{2}}}.$$
(6)

3.2 Crystal phase composition

Figure 1 shows selected XRD patterns for the N-doped TiO2 samples prepared under different calcination temperatures, calcination times, and similar nitrogen to titanium molar ratios. The crystal phases were well much with (JCPDS) Card No 21-1272 and 21-1276 for anatase and rutile, respectively. It can be observed that no peak associated with nitrogen was revealed in all of the XRD patterns. This might due to the dopant is uniformly distributed either in the TiO2 crystal structure occupying interstitial or substitutional sites [3032]. However, Fig. 1 indicates that the two crystal phases (anatase and rutile) appear at different sol–gel operational parameters with the anatase phase being dominant at calcination temperatures below 600 °C. Similarly, as can be observed from Fig. 3a, at high calcination temperature (600 °C), the phase transformation process is seen to be slightly retarded with increasing nitrogen concentration from 2 to 6 N/Ti molar ratio. This result suggests that the thermal stability of the catalyst can be improved by the addition of nitrogen [33]. The effect of the presence of nitrogen on phase composition of TiO2 can be further evidenced from Fig. S1 (Supplementary Information), where the XRD pattern of the undoped TiO2 catalyst prepared at the optimum condition (400 °C, 3 h) is presented. As can be observed, the presence of rutile is quite evident and its amount is estimated to be about 12.87%. However, comparison with Fig. 1 shows that rutile phase was not detected in the N-doped TiO2 samples prepared below 600 °C. The presence of rutile at 400 °C in the undoped sample can be related to the lower pH of the solution as reported by Matthews [34].

Fig. 3
figure 3

Three-dimensional response plots showing interaction effects of N/Ti molar ratio, calcination temperature, and time on anatase wt. fraction (a) and (b), on BET surface area (c) and (d), on MB decolorization (e) and (f)

In addition, Fig. 1 depicts that as the calcination temperature increased from 400 to 600 °C, the anatase peak became sharper and more intense. The average crystal size of all samples increased with the calcination temperature, which is due to the formation of bigger crystallite aggregation of the catalyst at higher temperature [35]. As compared with the effect calcination temperature, the effect of nitrogen on crystal structure and particle size was minimum in all samples. The effect of calcination time was also found to be insignificant in this study (Fig. 3b). The crystallite size of each sample was calculated according to Scherrer formula and presented in Table S5 (Supplementary Information).

3.3 Specific surface area

Selected N2 adsorption-desorption isotherms for different N-doped TiO2 are given in Fig. 2. The specific surface areas of the synthesized samples are found to be more dependent on calcination temperature than on calcination time and N/Ti molar ratio as shown in Table 2. Generally, all N-doped TiO2 samples prepared at lower and higher calcination temperature demonstrated smaller and larger mesopore structures, respectively. A plausible explanation can be at higher calcination temperature and extended calcination time, there is an expansion of mesopores and consequently the formation of bigger pores [36]. The specific surface areas also indicated a decreasing trend with increase in calcination temperature and time (Fig. 3c, d). Decreased specific surface area is due to catalyst aggregation at the higher temperature [37]. In addition, the specific surface area and crystal size of the undoped sample were found to be larger than those of the doped TiO2, although the total pore size of the N-doped TiO2 sample was higher as compared with that of the undoped TiO2 sample (Supplementary Information Fig. S2). It can be attributed to the three-dimensional network microstructure, which was formed between the N-doped TiO2 catalyst particles [18, 30, 38, 39].

3.4 Photoactivity test

The photocatalytic performance of all synthesized N-doped TiO2 samples was examined by decolorization of MB in the liquid solution with visible light (λ > 400 nm). The samples at higher calcination temperature exhibited the lowest percentage of decolorization of MB as shown in Fig. 3e and f. Significant specific surface area reduction and larger particle size at elevated calcination temperature and time might have led to lowest decolorization. It was also observed that the decolorization efficiency increased remarkably when the amount of N dopants increased from 2 to 6 N/Ti molar ratio and at lower calcination temperature (Fig. 3e). A possible explanation for this condition is that a higher concentration of N dopant facilitated proper incorporation of nitrogen into the TiO2 structure and consequently increased the visible-light activity of TiO2. All samples that were prepared at lower calcination temperatures and higher N concentrations have larger surface area, which provided better adsorption of reactive molecules as the most active sites are those on the surface [40]. Furthermore, these also helped to improve the light harvesting on the larger surface area but with fewer degrees [41]. Though, the nitrogen dopant amount and the higher specific surface area were the main factors for high photoactivity in the present study, particle size and crystallinity also played important role. Lower photoactivity can be caused by the charge recombination, which is associated with low crystallinity and larger particle size [42, 43]. As a matter of fact, the highest photocatalytic activity shown by the N-doped TiO2 sample prepared at N/Ti molar ratio of 6 and calcined at 400 °C for 4 h can be related to its high specific surface area, nitrogen content, and improved anatase crystallinity.

3.5 Model optimization and verification

Based on Derringer’s desirability function approach for multiple response processes, the desired set of sol–gel synthesis parameters were determined through optimization of the responses from the three quadratic models (Eqs 4, 5, and 6). Accordingly, N/Ti molar ratio of 6, calcination temperature of 400 °C, and calcination time of 3 h (6NT43) were selected with 0.987 desirability to predict anatase weight fraction of 100%, BET surface area of 90.99 m2 g−1, and MB decolorization efficiency of 74%. The predicted values were also validated on sample prepared under the optimum condition (Table 3). The results show that with the given Pred R 2 for each response, the model equations can be potentially used to predict sol–gel synthesis parameters in the same preparation routes.

Table 3 Model validation results of doped and undoped TiO2 prepared under optimized condition

3.6 Characterization of doped and undoped samples prepared under optimum conditions

3.6.1 XPS analysis

The elemental analysis and chemical binding energy of the prepared sample were determined using XPS. Figure 4 shows the high-resolution spectra of N-doped TiO2 sample, which was prepared under the optimum condition. From the deconvolution of the N 1s peaks of high-resolution spectra, the atomic concentration of N was found to be around 2.79% for N-doped TiO2 (6NT43). The three peaks were detected at 397.06, 400.03, and 404.13 eV binding energies. The exact positions of N atoms are still unclear and under debates. Many previously done studies assigned the position at the various locations from 395–404 eV binding energy based on their preparation routes and nitrogen source. However, in some of the well-known articles, the binding energy of N at 396 eV was surely assigned for atomic β-N [19, 44, 45]. This binding energy can be further extended to around 397 eV [46, 47]. At this site, a substitutional replacement of oxygen by nitrogen takes place within TiO2 crystal lattice in the form of Ti–N–Ti entity and may act, for visible light, as active site [48]. On the other hand, for interstitial N-doped TiO2 such as Ti–N–O and/or Ti–O–N oxynitride, there is no common agreement. Generally, the peak approximate to 400 eV is assigned for interstitial N-doping [44, 49]. The binding energy around 397 eV has also as been assigned for interstitial N-doping by some authors [45, 50]. In the present study, the peaks at 397.07 and 400.07 eV are assigned for substitutional N-doping. Whereas, the other peak at 404.12 was assigned to nitrite (NO2 ). The peak for O 1s core level of the N-doped TiO2 is located at 529.44 eV (Fig. 4b) and the peak for the undoped TiO2 appears at 529.13 eV (Supplementary Information Fig. S3a). Comparison of the two figures shows that the peak for the undoped sample has decreased by 0.31 eV. Furthermore, Ti 2p3/2 and 2p1/2 core level peaks appear at 458.34 and 464.01 eV for the doped and at 457.99 and 463.66 eV for the undoped TiO2 samples (Fig. 4c and Supplementary Information Fig. S3b). These results indicate that the binding energy of undoped TiO2 shifts toward lower binding energy by 0.35 eV from doped TiO2. The binding energy shifts observed in both cases imply that the TiO2 crystal lattice was modified by the addition of nitrogen.

Fig. 4
figure 4

XPS spectra of N-doped TiO2 prepared under optimum condition

3.6.2 UV/Vis analysis

UV/Vis/NIR spectrophotometer was used to evaluate optical properties of both undoped and doped TiO2 samples. For comparison, the maximum optical absorption edge (\({\lambda _g}\)) of N-doped TiO2, which was prepared with optimized parameters (6NT43) and undoped sample (0NT43), is shown in Table 4. The band-gap energy (\({E_g}\)) of each sample was calculated using the formula:

$${E_g}\left( {{{eV}}} \right){{ = }}\frac{{{{1240}}}}{{{\lambda _g}}},$$
(7)
Table 4 Maximum adsorption edge and corresponding band-gap energy of N-doped and undoped TiO2

Many researchers pointed out that the preparation of N-doped TiO2 shows spectra shift toward the visible-light region [18, 41]. Asahi et al. claim that its visible-light photoactivity can be related to narrowed band gap by mixing of nitrogen 2p and oxygen 2p state in the valence band caused by substitutional doping [19]. In contrast, Burda and his coworker have stated that the extra electronic states just above the valence band edge were the main reasons behind this phenomenon [47]. On the other hand, other reports state that it is either the isolated N impurity energy level (N 2p localized states) forms above the O 2p valence band (0.14 eV) in the case of substitutional doping or the Л* character generated by NO bond slightly above the valence band (0.73) in the case of interstitial doping that caused a visible-light active N-doped TiO2 photocatalyst [5154]. Furthermore, the formation of oxygen vacancies between the valence and conduction bands during thermal treatment enhance the photocatalysis in the visible range above 500 nm [35, 52, 5557]. In this study, in contrast with undoped TiO2, the N-doped sample (6NT43) provides two absorption edges; one at 395 nm due to intrinsic band-gap absorption typical for anatase in UV region (<400 nm) and other additional edge at 475 nm, which can be attributed to extrinsic electronic levels due to interstitial nitrogen doping (Fig. 5). This result exhibited the successful doping of nitrogen in TiO2 lattice.

Fig. 5
figure 5

UV–Vis spectra of undoped and doped TiO2 prepared under optimum condition

3.6.3 FT–IR analysis

The FT–IR spectra of N-doped and undoped TiO2 samples is presented in Fig. 6. For N-doped TiO2 FT–IR characterization, the absorption peaks that are located at around 3100–3500 and 1630–1645 cm−1 assigned to stretching and bending vibrations of O–H bond in hydroxyls group and adsorbed water on the surface of TiO2 [58, 59]. In the present study, these peak intensities were presented at 3344 and 1637 cm−1 and were stronger than those of the undoped TiO2. The adsorbed OH groups are helpful to improve photocatalytic activity of N-doped TiO2 by serving as an oxidizer for degradation of organic pollutant and giving better charge transfer by interacting the photogenerated holes [21, 59]. Furthermore, on N-doped TiO2 sample, multi-peaks were shown on the spectra range from 1000 to 1600 cm−1 which could be ascribed to different nitrogen species [60]. Especially the strong peak at around 1110–1020 cm−1 may be due to the formation of hyponitrite species [51, 60]. The appearance of these peaks gives additional evidence and further confirmation for the successful doping of N into the TiO2 crystal. The other strong peaks in the region 480–700 cm−1 corresponded to Ti-O stretching vibration [59, 61, 62].

Fig. 6
figure 6

FT–IR spectra of undoped and doped TiO2 prepared under optimum condition

3.6.4 Raman analysis

Raman spectra of N-doped and undoped TiO2 samples are shown in Fig. 7. Both samples show typical anatase crystalline phase with major bands at 144, 196, 397, 519, and 639 cm−1. Moreover, the doped sample did not indicate the presence of nitrogen, which may be because nitrogen is incorporated in the form of interstitial doping. In contrast to the XRD analysis, Raman analysis did not show the presence of rutile phase. This is because at the low rutile mass fraction, Raman spectroscopy can be used only to detect the presence of TiO2 but not for phase identification [33]. Moreover, the Raman shift can help to identify the particle size difference between doped and undoped TiO2. Noticeably, the peak at 144 cm−1 slightly shifts toward the lower band for doped TiO2, indicating slightly higher crystal size. This observation is in agreement with the results of XRD analysis, which showed that the addition of nitrogen can enhance the growth of crystals.

Fig. 7
figure 7

Raman spectra of undoped and doped TiO2 prepared under optimum condition

3.6.5 FE-SEM analysis

FE-SEM images of N-doped and undoped TiO2 are shown in Fig. 8. As it can be clearly observed from the figure, the nanoparticles in both samples appeared to be agglomerated. However, the N-doped TiO2 sample exhibited well-dispersed particles and a large number of pores. This may be a result of decomposition of ammonia into different gases during heating process. This result is consistent with the BET analysis, which revealed a mesoporous structure. Generally, with this structure, it is possible to achieve enhanced photocatalytic activity as it promotes diffusion and access to reactive sites on the surface of the catalyst [63]. Furthermore, the particles in N-doped TiO2 sample have also shown irregular spherical shape.

Fig. 8
figure 8

FE-SEM images of doped TiO2 (a), and undoped TiO2 (b), prepared under optimum condition

3.6.6 HR-TEM analysis

The morphology and crystal size of N-doped and undoped catalysts are shown in Fig. 9. The TiO2 particles are seen to be more dispersed in the N-doped sample, while more agglomerated in the undoped sample. The average crystallite size was estimated from HR-TEM analysis, and was found to be in the range of 10–21 and 8–16 nm for the N-doped and undoped TiO2 samples, respectively. The fact that larger crystal size was observed for N-doped TiO2 in both HR-TEM and XRD analysis suggests that the addition of nitrogen can improve the crystal size growth of TiO2 [33, 64, 65]. Furthermore, the interplanar distances d = 0.205 nm for rutile and d = 0.352 nm for anatase at (210) and (101) planes indicate good crystallinity. In the case of N-doped sample, there was no significant change in lattice space due to the addition of nitrogen.

Fig. 9
figure 9

HR-TEM images and corresponding interplanar space of doped TiO2 (a) and (c), undoped TiO2 (b) and (d)

4 Conclusions

In this study, the sol–gel synthesis parameters for the preparation of N-doped TiO2 were investigated and optimized using the BBD RSM. The study has shown that the experimental method can be used as an excellent tool to identify the interaction effect of the individual sol–gel synthesis parameters. It was also found possible to gather sufficient information about the synthesis method with a limited number of trials. Under optimized process condition, 100% anatase crystalline phase, BET surface area of 90.99 m2 g−1, and MB decolorization efficiency of 74% were predicted. It is worth to note that all characterization techniques used in the present study have confirmed the successful preparation of visible-light active N-doped TiO2 with higher specific surface area, larger pore size, smaller crystal size, good crystallinity, and anatase crystal phase.