*2.4. Calculations*

Solid yields based on dry matter (DM) were calculated according to Equation (1) with respect to the mass of DSS put into the reactor and the mass of HC after the reaction:

$$\text{Solid yield} \left( \%\_{\text{dB}} \right) = \frac{\text{m}\_{\text{char}} \times \text{DM}\_{\text{char}}}{\text{m}\_{\text{input}} \times \text{DM}\_{\text{input}}} \times 100\% \tag{1}$$

For the calculation of carbon yields, Equation (1) was supplemented by the carbon contents of DSS and HC and calculated as follows:

$$\text{Carbon yield} \left(\%\_{\text{db}}\right) = \frac{\text{m}\_{\text{char}} \times \text{DM}\_{\text{char}} \times \text{C}\_{\text{char}}}{\text{m}\_{\text{input}} \times \text{DM}\_{\text{input}} \times \text{C}\_{\text{input}}} \times 100\% \tag{2}$$

Higher heating value (HHV) was calculated from the elemental analysis according to Channiwala and Parikh [30]:

$$\begin{aligned} \text{HHV} \begin{pmatrix} \text{M} \text{kg}\_{\text{dB}} \end{pmatrix}^{-1} &= \\ 0.3491 \times \text{C} + 1.1783 \times \text{H} - 0.1005 \times \text{S} - 0.1034 \times \text{O} - 0.0051 \times \text{N} - 0.0211 \times \text{Ash} \end{aligned} \tag{3}$$

The calculated HHV from Equation (3) can be then used to determine the energy yield:

$$\text{Energy yield} \left( \%\_{\text{dB}} \right) = \frac{\text{m}\_{\text{char}} \times \text{DM}\_{\text{char}} \times \text{HHV}\_{\text{char}}}{\text{m}\_{\text{input}} \times \text{DM}\_{\text{input}} \times \text{HHV}\_{\text{input}}} \times 100\% \tag{4}$$

To determine the share of phosphorus in the liquid phase (Pliquid), the concentrations of phosphorus (cP) in the DSS and HC are put into relation as follows:

$$\text{P}\_{\text{liquid}}(\%) = \frac{\text{m}\_{\text{liquid}} \times \text{c}\_{\text{P,liquid}}}{\text{m}\_{\text{input}} \times \text{DM}\_{\text{input}} \times \text{c}\_{\text{P,input}}} \times 100\% \tag{5}$$

#### *2.5. Regression Modeling*

Because the relationship between certain output variables from HTC reaction conditions was to be determined, a DoE/RSM approach was chosen to obtain the most information out of a limited number of experiments. Regression modelling was performed as described by Montgomery [31]. The FCCD was chosen to aim at fitting a second order model through the following equation:

$$\begin{array}{rcl} \mathbf{y} = & \beta\_0 + \beta\_\mathbf{T} \mathbf{x}\_\mathbf{T} + \beta\_\mathbf{t} \mathbf{x}\_\mathbf{t} + \beta\_\mathbf{pH} \mathbf{x}\_\mathbf{pH} + \beta\_\mathbf{Tt} \mathbf{x}\_\mathbf{T} \mathbf{x}\_\mathbf{t} + \beta\_\mathbf{TpH} \mathbf{x}\_\mathbf{T} \mathbf{x}\_\mathbf{pH} + \beta\_\mathbf{tpH} \mathbf{x}\_\mathbf{t} \mathbf{x}\_\mathbf{pH} + \beta\_\mathbf{T} \mathbf{x}^2 \\ & + \beta\_\mathbf{t} \mathbf{x}\_\mathbf{t}^2 + \beta\_\mathbf{pH} \mathbf{x}\_\mathbf{pH}^2 + \varepsilon \end{array} \tag{6}$$

in which T denotes the reaction temperature, t the holding time after the reaction temperature was reached and pH the initial pH.

Equation (6) can also be expressed as:

$$
\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\varepsilon} \tag{7}
$$

where y is a vector of the measured responses (e.g., dry matter content), X is a matrix containing information about the levels of the variables at which the responses were obtained, β is the vector of regression coefficients, and ε is a vector of random errors. With the aim to find the values of the β's that minimize the sum of squares of ε, the least squares estimates are calculated by:

$$
\hat{\boldsymbol{\beta}} \cdot = \left(\boldsymbol{\chi}^{\prime}\boldsymbol{\chi}\right)^{-1} \boldsymbol{\chi}^{\prime} \mathbf{y} \tag{8}
$$

The regression model can now be estimated as:

$$
\mathfrak{F} = \mathfrak{X} \hat{\mathfrak{F}}\tag{9}
$$

and the difference between measured responses (y) and fitted values (y) is given in the vector of ˆ residuals:

$$\mathbf{e} = \mathbf{y} - \mathbf{\hat{y}}\tag{10}$$

Analysis of variance was used to refine the regression model by testing the significance of each of the terms in Equation (6) by conducting an *F*-test. The *F*-value of a term (e.g., temperature) was calculated by comparing the mean squares of the evaluated term (MSTerm) and the remaining residuals (MSResidual):

$$\mathbf{F}\_0 = \frac{\text{MS}\_{\text{Term}}}{\text{MS}\_{\text{Residual}}} = \frac{\text{SS}\_{\text{Term}}/\text{df}\_{\text{Term}}}{\text{SS}\_{\text{Residual}}/\text{df}\_{\text{Residual}}} \tag{11}$$

with SS denoting the sum of squares and df the degrees of freedom. F0 was tested against FStat(α, dfTerm, dfResidual) on a significance level of α = 0.1 and if F0 > Fstat, it was concluded that there are significant effects caused by the evaluated term. After the model was refined to include only statistically relevant terms, it was further improved by testing to exclude outliers (results from one or more experiments) from the model. For each term, a *t*-value was calculated for each run, according to Weisberg [32]:

$$\mathbf{t}\_{\mathbf{i}} = \frac{\hat{\mathbf{e}}\_{\mathbf{i}}}{\mathbf{M} \mathbf{S}\_{\text{Residual,i}} \sqrt{1 + \mathbf{x}\_{\mathbf{i}}' (\mathbf{X}\_{\mathbf{i}}' \mathbf{X}\_{\mathbf{i}})^{-1} \mathbf{x}\_{\mathbf{i}}}} \tag{12}$$

The designation i denotes that data from the ith run was excluded during the calculation and x is essentially a vector containing the first row of X. The *t*-value was compared with tStat(α/2, n – p − 1), where *n* denotes the total number of runs and *p* the number of parameters in the model. If |ti| < tStat, the run was excluded from regression modelling.

To give the reader an impression of the regression model quality, the metrics predictive and adjusted R<sup>2</sup> are provided. R2, the coefficient of determination, expresses how much variation around the mean is explained by the model and is calculated as follows:

$$\text{R}^2 = 1 - \frac{\text{SS}\_{\text{Residual}}}{\text{SS}\_{\text{Model}} + \text{SS}\_{\text{Residual}}} \tag{13}$$

where SSModel denotes the sum of squares of the model, which is calculated by adding up all SSTerm of the terms included in the model. If the model captures all variation around the mean, R2 equals one, and if the model cannot account for any variation, R2 equals zero. R2 is closest to one when all terms are still in the model and can thus mislead to include terms in the model that do not contribute a statistically significant effect. An adjusted R2 (R2 adj) accounts for this and, therefore, decreases as the number of model terms increases if the additional terms do not improve the model. Additionally, predictive R2 (R2 pred) expresses the predictive ability of the model. It takes into account the variation that arises when excluding one run from the model and using it to predict this value [31].

Regression modeling and data plotting were performed with the software packages Design Expert 12 (Stat-Ease, Inc., Minneapolis, MN, USA) and Origin 2020 (OriginLab Corp., Northampton, MA, USA).

#### **3. Results and Discussion**
