1 Introduction

Dragon fruit is a highly nutritious tropical fruit of the Cactaceae family. Nowadays, it is widely cultivated in the Southeast Asia region, which includes Malaysia, Thailand, Vietnam, Taiwan and Philippine [1]. The dragon fruit peels/rind, which constitutes approximately 30–45% of the fruit’s total mass, are normally discarded as a waste of the agricultural industry [2]. Disposal of bio-wastes, such as dragon fruit peels, contributes to environmental pollution through the production of greenhouse gases and microbial contamination during decomposition in bulk amounts [3]. Moreover, the substantial amount of commercially valuable compounds like pectin in the peels is also lost in the process. The reutilisation and conversion of dragon fruit’s peel into a value-added by-product (like pectin) could serve to monetise this waste and provide a sustainable solution to the environmental issue. Thus, the recovery of pectin from one of the major wastes of the agricultural industry, dragon fruit peels, is investigated in current research.

Pectin is a heterogeneous complex polysaccharide generally found in the primary cell walls of fruits and vegetables. Due to its unique gelling ability, pectin is largely applied as the thickening, emulsifying, stabilising and texturising and agent in the food industry [4]. Besides that, its application also extends to the pharmaceutical, biotechnologies and packaging industries [5, 6]. Pectin is commercially produced from citrus fruit’s peel and apple pomace as both of these fruit juice by-products contain more than 10–20% of pectin on a dry matter basis [6]. The prices of pectin and pectin products have risen significantly in the past few decades, but the supply fails to meet the world market demand. Thus, the identification of an alternative source among natural wastes has been a major focus of many research institutes and laboratories around the globe [7].

Commercial pectin is produced using the solvent extraction, enzymatic extraction and acid extraction technique, although the latter is the most preferred at industrial scale [8]. Acids are highly effective in solubilising and stabilising the pectin that is tightly bound in the cell wall, making them the most effective extracting agents. Typically, industrial pectin production is implemented using acidified water with hydrochloric, nitric, sulphuric acid or organic acids at pH 1.0–3.0, high temperature (70–90 °C) and extraction times of 1–12 h, depending on the desired properties of the pectin [7, 8]. However, the use of mineral acids can contribute to disposal and environmental issues due to their corrosive and toxic nature. Enzymatic extraction is a more environmentally safer option, but the enzymes used during the extraction tend to degrade and modify the physiological properties of pectin [9, 10]. Pectin has also been recovered from a diverse range of natural sources using microwave-assisted technology [11, 12]. However, contradictory results have been reported. Some claimed high-quality pectin was produced using the microwave at a high power level and short extraction duration, while others reported degradation of pectin at similar conditions, resulting in poor quality. It is imperative to apply the appropriate process and conditions since the properties of the extracted pectin are known to vary based on the plant source and extraction method [7].

The use of ultrasound for the extraction of valuable compounds from natural sources was demonstrated to be quite effective in the past. Ultrasound-assisted extraction (UAE) relies on the unique mechanism of acoustic cavitation and mechanical effects for enhanced mass transfer and extraction of compounds [13, 14]. Its biggest advantage lies in its ability to extract compounds at low temperatures. With additional benefits of reduced energy consumption and solvent usage, researchers are more reliant in UAE in comparison to other extraction techniques [15, 16]. The use of ultrasonication for the extraction of pectin from several fruit sources has provided better yields in the past [17, 18]. According to our knowledge, UAE has never been utilised to recover pectin from dragon fruit peels, although it was applied to other natural sources [17, 19]. Concerning this, the present study aims to incorporate UAE to extract pectin from this valuable by-product in an effective and efficient manner. Before proceeding with extraction, the peels must be pretreated to preserve the pectin and its consequent properties.

Pretreatment or drying is a crucial and unavoidable step when dealing with fruit sources. The high amount of moisture present makes the peels highly susceptible to microbial contamination and enzymatic degradation [20]. Reducing the moisture content to a minimal will preserve the peels as well as the quality of the extracted pectin. Temperature is a parameter that is important during both extraction and pretreatment. The high drying temperature is known to reduce pectin yield and quality as a result of degradation [21, 22]. Until date, there has been no systematic study on the effects of drying temperature on pectin. Taking this opportunity, the current study aims to thoroughly investigate the impact of pretreatment (drying) temperature on pectin in dragon fruit peels.

An extensive review of the literature has revealed the lack of studies on pectin in dragon fruit peels. Therefore, the first objective of the current study was to study the oven-drying kinetics of pectin via mathematical modelling. The second objective of the current study was to develop and optimise the ultrasound-assisted extraction of pectin from dragon fruit peels in an effective and efficient manner by implementing the statistical approach of response surface methodology (RSM). RSM is one of the most prominent statistical tools to dominate the industry in terms of process optimisation in the last few decades, therefore, justifying its implementation in the current study. Lastly, the present study also aims to intensely analyse and characterise the quality and purity of extracted pectin via the degree of esterification, ash content and Fourier transform infrared spectroscopy (FTIR) analysis.

2 Materials and methods

2.1 Pretreatment of dragon fruit peels

Dragon fruit (500 g) was collected from Soon Seng Ever Fresh Fruit Store, Subang Jaya, Selangor, Malaysia. The peels were washed and cleaned with distilled water to remove the surface impurities and dirt. The peels were subsequently cut into smaller uniform pieces (1 cm wide and 3 cm long) before the drying treatment.

2.2 Drying of dragon fruit peels

Current research aims to investigate the impact of oven drying on pectin in dragon fruit peels. The cleaned uniform dragon fruit peels were dried in a convective oven (Model UN75, Memmert, Germany) at 45 °C, 55 °C and 65 °C separately until a constant weight was achieved. The peels were spread out evenly on the tray to ensure that there was no overlapping of peels. The initial moisture content before the drying process was measured using the moisture analyser (Model XM50, Precisa Gravimetrics AG, Switzerland) to estimate the bone dry weight of the samples [23]. The dried peels were ground, sieved and stored in sealed polyethene bags inside a desiccator at room temperature for further analysis.

2.3 Drying temperature and drying kinetics modelling

The sample that resulted in the highest pectin yield and lowest ash content at optimum drying temperature was subjected to drying kinetics modelling. The sample’s weight was measured every 5 min at the optimum pretreatment temperature until a constant weight was recorded. The moisture content and moisture ratio were calculated using Eqs. (1) and (2) [24].

$${\text{MC}} \left( {\text{dry basis}} \right) = \frac{{w_{i} - w_{\text{db}} }}{{w_{i} }},$$
(1)

where MC is the moisture content (kg water/kg dry matter), \(w_{i}\) is the initial weight of the sample (g) and \(w_{\text{db}}\) is the bone dry weight (g).

$${\text{MR}} = \frac{{M - M_{\text{e}} }}{{M_{\text{o}} - M_{\text{e}} }},$$
(2)

where MR is the moisture ratio, M is the moisture content at any given time (kg water/kg dry matter) and \(M_{\text{o}}\) and \(M_{\text{e}}\) are the initial and equilibrium moisture contents (kg water/kg dry matter), respectively.

The experimental data of MR were fitted into four different thin-layer drying models (Page, Two term, Logarithmic and Peleg’s models) [25]. According to the literature, the selected thin-layer drying models were commonly used and accurate in describing the drying kinetics of natural sources. The models are given in Eqs. (3)–(6). The kinetics variables were solved using a curve fitting toolbox in MATLAB 2018a (The MathWorks Inc., USA). The goodness of fit for each respective kinetics model was evaluated based on the statistical criteria of the coefficient of determination (R2) and root-mean-square error (RMSE).

$${\text{MR}} = e^{{ - k_{o} t^{n} }} ,$$
(3)
$${\text{MR}} = ae^{{k_{1} t}} + be^{{k_{2} t}} ,$$
(4)
$${\text{MR}} = ae^{{ - k_{3} t}} + b,$$
(5)
$${\text{MR}} = 1 - \frac{t}{{k_{4} + k_{5} t}},$$
(6)

where ko, k1, k4, k3, k4, and k5 are the drying rate constants with a, b and n are the dimensionless model constants of Page, Two term, Logarithmic and Peleg’s models, respectively.

2.4 Ultrasound-assisted extraction of pectin

The extraction of pectin was conducted based on the conditions reported in the literature with minor modifications [26]. At the industrial scale, acid extraction is the most preferred pectin isolation method. Acidic extraction agents such as strongly mineral acids could easily penetrate the insoluble layer of the plant’s cell wall and thus facilitate the extraction of pectin [8]. However, special treatments are required for the extracted product to be considered GRAS (generally recognised as safe) [26]. Hence, the citric acid, an organic acid with lower hydrolysing capabilities, was employed in this study as the UAE solvent to resolve this issue [27]. The dragon fruit peel powder (3 g) was mixed with 0.1 M citric acid at pH 2.0 and a solid-to-liquid ratio of 1:20 g/mL. For the ultrasound-assisted extraction of pectin, the sample mixture was placed in an ultrasonic bath (Elmasonic P120H, Elma, Germany) at 65 °C for 25 min. Constant power and frequency of 330 W and 37 kHz were maintained throughout the extraction process. The sample mixture was cooled and filtered using Whatman No 1 filter paper. The filtrate was precipitated using 95% ethanol at an ethanol-to-filtrate ratio of 2:1 (v/v). The pectin was separated from the supernatant by centrifugation (Scanspeed 1236MG, LaboGene, Denmark) at 7500 rpm for 20 min. The resulting wet pectin was rinsed with 95% ethanol thrice to remove impurities and subsequently dried in the oven at 50 °C overnight. The pectin yield was calculated using Eq. (7). The dried pectin was stored in sealed glass bottles and used in all of the subsequent analysis.

$${\text{Pectin}}\;{\text{yield}} \left( \% \right) = \frac{{{\text{weight}}\;{\text{of}}\,{\text{dried}}\,{\text{pectin}}\, \left( {\text{g}} \right)}}{{{\text{weight}}\;{\text{of}}\;{\text{powdered}}\;{\text{dried}}\;{\text{peels}} \left( {\text{g}} \right)}} \times 100\% .$$
(7)

2.5 Response surface methodology (RSM) experimental design

Single-factor experiments were conducted to screen and identify the range of each extraction parameter to be optimised by evaluating the pectin yield and degree of esterification. The three parameters selected in this study were time (X1: 15–35 min), temperature (X2: 45–85 °C) and solid-to-liquid ratio (X3: 1:10–1:30 g/mL). A three-factor, three-level Box–Behnken experimental design (BBD) with 17 experimental runs in triplicates was implemented to optimise the ultrasound-assisted extraction of pectin from dragon fruit peels via Design Expert Software Ver. 11.0 (Stat-Ease Inc, Minneapolis, USA) [28]. The predicted and actual experimental data (response) were collected to generate a second-order polynomial model based on the pectin yield as follows:

$$Y = \beta_{o} + \mathop \sum \limits_{i = 1}^{k} \beta_{i} x_{i} + \mathop \sum \limits_{i = 1}^{k} \beta_{ii} x_{i}^{2} + \mathop \sum \limits_{j} \mathop \sum \limits_{i = 2}^{k} \beta_{ij} x_{i} x_{j} ,$$
(8)

where Y is the response variable, \(x_{i}\) and \(x_{j}\) are the independent variables (i and j range from 1 to k), \(\beta_{o}\) is a constant, \(\beta_{i, }\) \(\beta_{ii}\) and \(\beta_{ij}\) are the regression coefficients of linear, quadratic and interactive terms, respectively, and k is the number of parameters.

2.6 Statistical analysis and validation of RSM optimisation

The statistical analysis of regression and the analysis of variance (ANOVA) were performed using the Design Expert Software Ver. 11.0 (Stat-Ease Inc, Minneapolis, USA). In all instances, significance was considered when ρ was less than 0.05. The F test was used to evaluate the significance of the regression coefficients. The coefficient of determination (R2) and the adjusted coefficient of determination (R 2a ) was used to evaluate the accuracy of the developed model [29]. Response plots were generated based on the developed model. The validity of the model was verified by conducting the experiments under the optimised conditions in triplicates [24].

2.7 Modelling of extraction kinetics

The experimental result of the pectin yield obtained under the optimised extraction condition was fitted to six extraction kinetics models (First order, Second order, Power law, Peleg’s model, logarithmic model and Page’s model). The models are given in Eqs. (9)–(16). The unknown coefficients of each model were solved using a curve fitting toolbox in MATLAB 2018a (The MathWorks Inc., USA). The statistical criteria of R2 and RMSE were employed to evaluate the goodness of the respective kinetics models.

$$C_{t} = C_{e} \left( {1 - e^{{ - k_{1} t}} } \right),$$
(9)
$$C_{t} = \frac{t}{{\left( {\frac{1}{h}} \right) + \left( {\frac{t}{{C_{e} }}} \right)}},$$
(10)
$$k_{2} = \frac{h}{{C_{e}^{2} }},$$
(11)
$$C_{t} = Bt^{n} ,$$
(12)
$$C_{t} = C_{0} - \frac{t}{{k_{3} + k_{4} t}},$$
(13)
$$B_{0 } = \frac{1}{{k_{3} }},$$
(14)
$$C_{t} = ae^{{ - k_{5} t}} + b,$$
(15)
$$C_{t} = e^{{ - k_{6} t^{n} }} ,$$
(16)

where Co, Ct and Cα are the initial, given and equilibrium pectin yield, respectively. k1, h, k2, B, Bo, k3, k4, and k5 are the extraction rate constants of first order, second order, power law, Peleg’s model and logarithmic model, respectively. n, a, b and k6 are the dimensionless model constants of power law, logarithmic model and Page’s model, respectively.

2.8 Degree of esterification (DE)

The titrimetric method was implemented to determine the degree of esterification of the samples with minor modifications [17]. The dried pectin (0.1 g) was wetted with 1 mL of ethanol and dissolved in 10 mL of distilled water. The mixture was stirred continuously to ensure complete dissolution of pectin. After complete dissolution, the phenolphthalein indicator (3 drops) was added into the resulting mixture. The mixture was titrated with 0.1 M sodium hydroxide solution and the titration volume (V1) required for the mixture turned into pale pink colour was recorded. Next, 5 mL of 0.1 M sodium hydroxide was added to the mixture and stirred for 1 h at room temperature. Then, 5 mL of hydrochloric acid was added, and the mixture was shaken until the pink colour disappeared. The mixture was added with three drops of phenolphthalein and titrated with 0.1 M of sodium hydroxide until the solution turned into pale pink colour. The titration volume (V2) was recorded. The experiment was repeated three times to obtain average titration volumes. The DE was calculated using Eq. (17).

$${\text{DE}}\left( {\text{\%}} \right)\,=\,\frac{{V_{2} }}{{V_{1} + V_{2} }} \times 100,$$
(17)

where V1 = initial titration volume (mL), V2 = final titration volume (mL).

2.9 Ash content

The ash content of the pectin samples was measured using a thermogravimetric analyser (Model TGA8000, Perkin Elmer, UK) [30]. The dried pectin (5 mg) was heated from room temperature to 550 °C at a heating rate of 50 °C/min under purified air for 40 min with an isothermal hold up time of 30 min. The final residue was allowed to cool in a desiccator before the weight was recorded.

2.10 FTIR spectroscopy

An FTIR Spectrometer Spectrum 100 was used to investigate the structural characteristic of the dragon fruit peel’s pectin extracted under the optimised condition. The FTIR spectra were recorded using a universal ATR accessory at the frequency range of 4000–400 cm−1, measuring the resolution of 4 cm−1 (mid-infrared region) with a total of 128 scans. The FTIR spectra were analysed for surface functional groups and compared with that of the commercial-grade pectin.

3 Results and discussion

3.1 The effect of drying temperature and drying kinetics study

Drying stabilises and prolongs the shelf life of pectin by reducing the water activity, microbial growth, enzymatic and other deteriorative reactions [31]. Harsh processing conditions may cause irreversible modifications to the cell wall’s polysaccharides, thereby affecting its structure and quality [32]. Hence, in this study, the dragon fruit peels were dried at three varied oven-drying temperatures (i.e. 45 °C, 55 °C and 65 °C) to investigate the effect of drying temperature on the yield and ash content of the extracted pectin (Table 1). As shown in Table 1, there was an approximate threefold decrease in pectin yield from 6.27 to 2.23% when the drying temperature was increased from 45 °C to 65 °C.

Table 1 Pectin yield and ash content obtained under different drying temperatures

Although barely any literature exists regarding the impact of drying temperature/methods on pectin, one study reported pectin yield to increase when the drying temperature was raised from 40 to 70 °C, while others reported no change in pectin’s structural and functional properties for different drying methods [21, 33]. However, the current study observed contradicting trends as the drying temperature was found to have a significant impact on the efficiency of the subsequent pectin extraction step. The findings of the current study were also supported by observations of another study that reported that elevated air temperatures promoted pectin solubilisation [34]. As a result, the water-soluble pectin content increased while the propectin fraction decreased. It can be speculated that the presence of sugar in the peels could have increased the degradation rate of water-soluble pectin at elevated temperatures [6]. Thus, such a drastic decrease in pectin yield was noted.

The ash content of pectin was not significantly affected by the drying temperature. The ash content of all samples remained relatively constant below 10%, in which 10% is the established maximum limit of ash content in pectin and exceeding this limit will affect the gelling properties of pectin [35]. From these results, it was evident that 45 °C was the optimum drying temperature that could give high extraction yield and preserve the gelling characteristic of pectin. This temperature was thus selected for further kinetics and extraction studies; however, further study with a broader range of temperature is recommended in the future as lower temperatures than 45 °C may produce better yields.

Figure 1 shows the moisture ratio curve with respect to drying time for the dragon fruit peels undergoing the drying process at 45 °C. Three distinct drying periods were exhibited in Fig. 1. The initial sharp decrease in the MR is due to the evaporation of moisture from the surface of the peels. A second slower falling period, which was the rate-controlling step, was observed [33]. During this exponential decreasing stage, a complex mass transfer process occurs that involves diffusion of internal moisture from the innermost parts of the peels to the surface followed by its evaporation. Lastly, the zero MR indicates that the mass transfer of moisture between the peels and surrounding had reached equilibrium.

Fig. 1
figure 1

Structural formula of pectin

The experimental data were fitted to four different thin-layer models (Table 2) to describe the drying kinetics of dragon fruit peels. The results showed that the Page’s model with the highest R2 (0.99685) and lowest RMSE (0.0002) was the best kinetics model. These findings were consistent with the works of other researchers who also reported Page to be the best model during the drying kinetics study of banana [36] and kiwi [37]. Page’s model also referred to as the modified Lewis model is an empirical modification of Newton’s model. Due to its high accuracy, it has been adopted as an American standard for modelling of agricultural and biological products [38]. Thus, in alignment with the current study and the literature, Page’s model can be used for future prediction of pectin yield for the range of drying parameters investigated.

Table 2 Respective kinetics variables for the thin-layer drying models

3.2 Response surface methodology optimisation of pectin from dragon fruit peels

3.2.1 Single-factor experiments

A single-factor experiment was conducted to identify the feasible range of each extraction parameter to be optimised, to study the effect of extraction parameters on the pectin yield and DE. The results are presented in Table 3 and discussed in Sect. 3.2.23.2.4. Subsequently, the identified parameters were optimised using RSM to examine the interactive influence of the parameters and to develop a sustainable method for optimum extraction of pectin from the dragon fruit peels.

Table 3 Single-factor experiments for different extraction parameters

3.2.2 Effect of sonication time on pectin yield and DE

During UAE, the ultrasonic waves generate a cavitation effect that could induce the swelling, enlargement of pores and structure disruption of the plant cell wall [13]. This cavitation effect improves the contact between the extraction solvent and the constituents in the plant cell, facilitates the mass transfer and enhances the extraction efficiency of pectin. From the single-factor experiments, pectin yield was observed to increase by 5% with the sonication time up to 30 min, though it seems that the change is not too significant. Increasing the sonication time provides more contact time between the solvent and the plant cell to ensure effective extraction is achieved [39]. Moreover, the result suggested that an equilibrium between the solute concentration in the plant matrix and solvent could have been reached at 30 min. Beyond 30 min, prolonged exposure to ultrasonic waves could have caused structural decomposition and thus decreased the extraction yield [14, 29].

The sonication time, however, exhibited a negative effect on the DE. The DE was reduced from 37.84 to 31.48% when the sonication time was increased from 15 min to 35 min. This decrease in DE could be attributed to the increase in de-esterification of polygalacturonic chains under prolonged exposure to the sonication effect [40]. This observation was consistent with the previous finding which revealed that time and pH are among the most significant factors that affect DE [41, 42]. Therefore, the sonication time between 25–35 min with a central level at 30 min was selected as the range for RSM optimisation.

3.2.3 Effect of extraction temperature on pectin yield and DE

With increase in extraction temperature from 45 to 75 °C, the pectin yield was improved to 16.36%. This result indicated that the extraction temperature has a great effect on the pectin yield. The swelling and loosening effect caused by the elevated temperature could explain the increase in pectin yield. The former effect increased the diffusivity of solvent into the plant matrix and cavitation, while the latter effect disrupts the hydrogen bonds and ester linkages, thereby facilitating the desorption and solubility of the solute from the plant matrix into the extraction solvent [15, 26]. On further increment of extraction temperature, the decrease in surface tension and viscosity of the solvent altered the characteristic of ultrasonic cavitation and the rate of mass transfer [29]. Pectin degradation is also common at high temperatures, which could also explain the decrease in pectin yield beyond 75 °C [18]. Similarly, the DE began to subside after 75 °C as the polygalacturonic chains suffered from de-esterification under the harsh condition [39]. Therefore, the range for extraction temperature to be further optimised was 65 to 85 °C with the central level at 75 °C.

3.2.4 Effect of solid–liquid on pectin yield and DE

A large amount of solvent is often required to ensure the effective extraction of targeted solute. Intensive research has shown that the pectin yield has a strong dependency on the solid-to-liquid ratio effect [4, 43, 44]. Hence, the single-factor study was performed at a different solid-to-liquid ratio ranging from 1:10 g/mL to 1:30 g/mL to examine the effect of solid-to-liquid ratio on the pectin yield and DE. It was found that the pectin yield increased by fivefold, attaining a maximum pectin yield of 19.8% when the solid-to-liquid ratio was increased up to 1:30 g/mL. The Fick’s first law of diffusion, which stated that a higher concentration gradient (i.e. a higher solid-to-liquid ratio) would induce a larger driving force that increases the mass transfer rate of the solute (i.e. the transfer pectin from the plant matrix to the solvent), can explain this phenomenon [16]. Furthermore, increasing the solid-to-liquid ratio could improve the contact area between the dragon fruit peel and the solvent. Thus, the dissolution of pectin in the solvent and pectin yield was enhanced [17]. A range of 1:30 to 1:40 g/mL was chosen for further optimisation studies as 1:30 g/mL was found to produce the highest pectin yield and DE at the same time.

3.3 RSM optimisation, regression analysis and model validation

A three-factor, three-level Box–Behnken design (BBD) was employed to optimise the ultrasound-assisted acid extraction of pectin from dragon fruit’s peels for the parameters of time, temperature and solid-to-liquid ratio. The predicted and experimental results of the pectin yield for all 17 runs are shown in Table 4. The response plots showing the effect of the parameters on pectin yield are presented in Fig. 2. It was noticed that the pectin yield extracted for the different combinations of parameters ranged from 16.50 to 23.30%. The regression data together with ANOVA analysis is presented in Table 5. The model reduction was employed to simplify and improve the developed model. The final developed model with all the significant (ρ < 0.05) terms is presented in Eq. (17).

Table 4 Experimental and predicted pectin yield for Box–Behnken experimental design
Fig. 2
figure 2

Moisture ratio curve of dragon fruit peels with respect to time

Table 5 Analysis of variance of the second-order polynomial model
$$Y \left( \% \right) =\; 48.56132 - 1.47187X_{2} - 1.41100X_{3} + 0.033800X_{1} X_{2} + 0.016350X_{2} X_{3} - 0.094678X_{1}^{2}$$
(17)

The final developed model for pectin yield was found to be valid for an F value of 8.24. All three extraction variables had a significant linear effect on pectin yield with temperature and ratio showing a negative impact. A positive interaction on the response was observed for time with temperature and time with the ratio. Furthermore, extraction time was the only parameter that imposed a negative quadratic effect on pectin yield. The high coefficient of determination (R2 = 0.8317) and adjusted coefficient of determination (R 2a  = 0.7307) confirms the model’s adequacy to predict pectin yield. The coefficient of variance was low (5.49) and adequate precision (5.89) was greater than 4 which indicates that the conducted experiments were reliable and had a high degree of precision. Additionally, the lack of fit was insignificant, thus, further verifying the validity of the deduced quadratic model.

Based on the experimental, predicted data and regression analysis, the optimised condition for pectin extraction was determined at extraction time of 32 min with temperature and ratio of 85 °C and 1:30 g/ml, respectively. Three experiments were conducted under the optimised condition to validate the reliability of the model. The difference between the experimental yield (23.09%) and predicted yield (22.84%) was merely 1.1%. Thus, the results confirm the validity and accuracy of the developed model’s ability to predict pectin’s extraction from dragon fruit’s peels (Fig. 3).

Fig. 3
figure 3

3D response plots of process variables on pectin yield. a Time versus temperature, b temperature versus solid-to-liquid ratio, c solid-to-liquid ratio versus time

3.4 Pectin extraction kinetics from dragon fruit peels

To take a step further, the experimental data of pectin yield were fitted to six different empirical models under the optimised conditions to study the kinetics of the process. The kinetics variables of each respective model are presented in Table 6. From the kinetics data, it was observed that extraction during the first 20 min was the fastest. It is quite possible that grinding the peels may have disrupted some of the plant cell wall’s structure allowing for a more efficient extraction of pectin to take place from the surface during the initial period.

Table 6 Respective kinetics variables for the solid-to-liquid extraction models

Additionally, it was also observed that the majority of pectin extraction took place in the first 30 min after which it started to reach an equilibrium state at 55 min. This result is quite interesting and a noteworthy find since this corroborates the optimum extraction time of 32 min determined from the previous RSM optimisation studies. Based on the highest R2 (0.9384) and lowest RMSE (0.821), the logarithmic law was the best-fitted model to represent the extraction kinetics of pectin from the dragon fruit peels. The logarithmic model is a modified version of the Handerson and Pabis models. Although it is not a common model, it is known to give high prediction accuracy for the extraction of compounds from natural sources [45, 46].

3.5 Characterisation of pectin

Typically, the degree of esterification is used to characterise pectin as it will determine its gelling capabilities in industrial applications. Pectin can be categorised into either low methoxyl pectin (DE < 50%) or high methoxyl pectin (DE > 50%) [47]. The major difference between low methoxyl pectin (LMP) and high methoxyl pectin (HMP) is their gel-forming mechanism which determines ittheir applicability in respective industries. HPM can form cross-links via hydrogen bonds and hydrophobic forces between methoxy groups with a narrow pH range of 3.0 and high sugar content [48]. LMP, on the other hand, can form cross-links without the presence of sugar or limitation of pH. However, they do require the presence of a certain amount of calcium or other divalent cations [6].

During the single-factor experiments, the extracted pectin was categorised to be LMP despite that the parameter varied during the extraction. Besides, a pre- and post-optimisation DE also revealed that the extracted pectin was LMP in both cases. Moreover, it was noticed that the DE of extracted pectin decreased from 36.36 to 33.27% after optimisation. It might due to that the use of high temperature and moderate extraction time resulted in the extraction of more strongly bound LMP from the cell wall [48].

One of the most distinguished usages of pectin in the industry is the preparation of jam and jellies with high sugar content [49]. Both HMP and LMP are favoured based on the type of desired application. LMP is more favoured to the food industry that caters to low sugar products as its gelling capabilities are independent of sugar content [42]. In addition, LMP is more chemically and thermally stable to moisture and heat and less affected by pH than HMP [5]. For this reason, LMP has become quite popular as gelling, thickening and stabilizing agents in the jams, jellies and other low-calorie confectionaries, especially in the baking industry.

3.6 Ash content of the extracted pectin

The maximum limit of ash content for high-quality pectin should be less than 10% from the viewpoint of gel formation [50]. It is one of the major quality indicators of good quality pectin at the fundamental stage. The pectin’s ash content before and after optimisation was 8.34 and 6.36%, respectively. The results showed that the pectin extracted under both conditions were of good quality. However, the quality of the extracted pectin post-optimisation was increased by 23.65%. The high amount of ash content prior to optimisation might be due to the presence of non-esterified methyl carboxyl groups that contains calcium salt [51]. Nonetheless, it can be said that the optimisation of the extraction conditions produced pectin of higher quality and purity.

3.7 FTIR analysis of the extracted pectin

The FTIR spectrum of pectin extracted from dragon fruit peels under optimal condition is illustrated in Fig. 4. Analysis of FTIR was conducted to identify and confirm the major functional groups of pectin extracted from dragon fruit peels and its stance in comparison to commercial-grade pectin. The standard conformation bands of major chemical and functional groups in pectin usually range between 1000 and 200 cm−1 [21]. The peaks in the region of 1440 and 1750 cm−1 are due to the free and esterified carboxyl groups [30]. The peaks in a broader band stretching in between 3200–3500 cm−1 are due to the hydroxyl (O–H) groups from the moisture present in pectin [21]. The peaks falling in between 2800 and 3000 cm−1 can be attributed to the C-H groups [39]. The total peak area between 800–1200 cm−1 is referred to as the “Fingerprint” area that is characteristic to a compound, and therefore, it is hard to interpret [30].

Fig. 4
figure 4

FTIR spectrum of pectin under optimal extraction condition

The comparison between FTIR wavenumbers of the extracted and commercial pectin is shown in Table 7. According to the results, it can be concluded that the extracted pectin has similar functional groups in comparison to commercial-grade pectin and is rich in polygalacturonic acid. Similar FTIR peaks were also detected in the spectra before optimisation, confirming that the functional groups remained unchanged after optimisation. All of the results validate that the extracted pectin from dragon fruit’s peels has a high potential to be an alternative source of pectin in food applications.

Table 7 Comparison of FTIR spectra of dragon fruit peel’s pectin and commercial-grade pectin

4 Conclusion

In this work, the pretreatment and recovery of pectin from dragon fruit peels, one of the major wastes of the agricultural industry, were investigated. The optimum drying temperature was identified at 45 °C that produced the highest pectin yield (6.27%) and the lowest ash content (8.34%). Among the four thin-layer drying models, Page’s model was the best-suited model to describe the drying kinetics in terms of the highest R2 (0.99685) and lowest RSME (0.0002). Ultrasound-assisted pectin extraction was optimised for time, temperature and solid-to-liquid ratio via Box–Behnken design of response surface methodology after the preliminary range of parameters were confirmed through single-factor experiments. The maximum pectin yield (23.09%) was obtained under the optimal conditions of 32 min at 85 °C with a ratio of 1:30 g/ml. Variation of predicted (22.84%) and experimental (23.09%) was less than 5% which confirmed the validity of the optimised extraction condition. The second-order polynomial model for pectin yield was generated which was also validated using the statistical coefficients of R2 (0.8317) and R 2a (0.7307) derived from regression analysis via ANOVA. Logarithmic law was determined as the best-suited model to express the extraction kinetics of pectin from dragon fruit peels on the basis of the highest R2 (0.9384) and lowest RMSE (0.821). Characterisation of pectin pre- and post-optimisation revealed it to be low methoxyl pectin as the degree of esterification determined was 36.36% and 33.27%, respectively. The ash content was reduced by 23.65% revealing higher-purity pectin was extracted under the optimised conditions. FTIR spectra confirmed that the major chemical and functional groups of pectin remained unchanged before and after optimisation. Comparison of the FTIR spectra with commercial-grade pectin shows the extracted pectin from dragon fruit peels has a high potential of substituting commercial pectin in food applications.

The present study recommends dragon fruits peel’s as a viable alternative source for the production of high-quality pectin. However, some unexpected results were observed throughout the source of this research. One of them would be the influence of the parameters, extraction temperature and solid-to-liquid ratio, on pectin yield. The results seem to indicate that a better yield could be recovered outside the range conducted in the present study. Therefore, it is recommended to investigate a broader range for those parameters to truly identify the optimum conditions. Additionally, apart from the current parameters investigated, one crucial parameter that may influence the quality of the final product would the usage of an appropriate acid for extraction. Although the current study employed an organic (citric) acid, there is a diverse range of organic acids that may produce better yields at various concentrations. Lastly, the current study would also like to recommend an in-depth study of the recovery and reutilisation of the acid solvent in a multi-cycle system to provide a more sustainable option for the process industries.