Previous Article in Journal
Rethinking Blockchain Governance with AI: The VOPPA Framework
Previous Article in Special Issue
A Review of Multi-Microgrids Operation and Control from a Cyber-Physical Systems Perspective
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hardware–Software System for Biomass Slow Pyrolysis: Characterization of Solid Yield via Optimization Algorithms

by
Ismael Urbina-Salas
1,2,
David Granados-Lieberman
3,
Juan Pablo Amezquita-Sanchez
4,
Martin Valtierra-Rodriguez
4,* and
David Aaron Rodriguez-Alejandro
1,*
1
Departamento de Ingeniería Mecánica, Universidad de Guanajuato, Carr. Salamanca-Valle de Santiago km 3.5 + 1.8, Salamanca 36885, Guanajuato, Mexico
2
ENAP-Research Group, Departamento de Ingeniería Mecatrónica, Tecnológico Nacional de México, ITS Guanajuato (ITESG), Carr. Guanajuato a Puentecillas km 10.5, Guanajuato 36262, Guanajuato, Mexico
3
ENAP-Research Group, Departamento de Ingeniería Electromecánica, Tecnológico Nacional de México, ITS Irapuato (ITESI), Carr. Irapuato-Silao km 12.5, El Copal, Irapuato 36821, Guanajuato, Mexico
4
ENAP-Research Group, CA-Sistemas Dinámicos y Control, Facultad de Ingeniería, Universidad Autónoma de Querétaro (UAQ), Campus San Juan del Río, Río Moctezuma 249, Col. San Cayetano, San Juan del Río 76807, Querétaro, Mexico
*
Authors to whom correspondence should be addressed.
Computers 2025, 14(10), 426; https://doi.org/10.3390/computers14100426 (registering DOI)
Submission received: 27 August 2025 / Revised: 23 September 2025 / Accepted: 1 October 2025 / Published: 5 October 2025

Abstract

Biofuels represent a sustainable alternative that supports global energy development without compromising environmental balance. This work introduces a novel hardware–software platform for the experimental characterization of biomass solid yield during the slow pyrolysis process, integrating physical experimentation with advanced computational modeling. The hardware consists of a custom-designed pyrolizer equipped with temperature and weight sensors, a dedicated control unit, and a user-friendly interface. On the software side, a two-step kinetic model was implemented and coupled with three optimization algorithms, i.e., Particle Swarm Optimization (PSO), Genetic Algorithm (GA), and Nelder–Mead (N-M), to estimate the Arrhenius kinetic parameters governing biomass degradation. Slow pyrolysis experiments were performed on wheat straw (WS), pruning waste (PW), and biosolids (BS) at a heating rate of 20 °C/min within 250–500 °C, with a 120 min residence time favoring biochar production. The comparative analysis shows that the N-M method achieved the highest accuracy (100% fit in estimating solid yield), with a convergence time of 4.282 min, while GA converged faster (1.675 min), with a fit of 99.972%, and PSO had the slowest convergence time at 6.409 min and a fit of 99.943%. These results highlight both the versatility of the system and the potential of optimization techniques to provide accurate predictive models of biomass decomposition as a function of time and temperature. Overall, the main contributions of this work are the development of a low-cost, custom MATLAB-based experimental platform and the tailored implementation of optimization algorithms for kinetic parameter estimation across different biomasses, together providing a robust framework for biomass pyrolysis characterization.

1. Introduction

Due to the growing need to transition to a sustainable energy system, solid biofuels such as biochar have been positioned as promising alternatives to partially replace fossil fuels [1]. Where accurate prediction of biomass yields through data synthesis is critical to ensuring efficient supply chains [2]. Lignocellulosic biomass, including agricultural residues (with yields predictable via machine learning [3]), forestry waste, and sewage sludge (convertible via advanced thermochemical pathways [4]), constitutes an abundant renewable resource for biofuel production. Biomass currently supplies around 14% of global energy [5], and recent policies are promoting its use within the framework of the circular economy. According to the International Energy Agency (IEA), bioenergy could meet 20% of global energy demand by 2050, playing a strategic role in the decarbonization of industry and transportation [6]. In agricultural regions such as Guanajuato, Mexico, the utilization of wheat straw, pruning residues, and biosolids represents a strategic opportunity to produce biochar while improving local waste management.
Among the thermochemical processes employed for biomass conversion under controlled (inert or oxygen-free) atmospheres, torrefaction and pyrolysis are effective techniques for optimizing the energy yield and physicochemical properties of the resulting solid products [7]. These technologies enable biomass decomposition over different temperature ranges (200–800 °C). Depending on temperature, each process yields specific products: torrefaction (200–300 °C) produces low-temperature biochar [8,9], while pyrolysis (300–800 °C) produces biochar along with liquid and gaseous fractions [10,11,12]. These processes allow tailoring of biochar composition and quality by adjusting temperature, heating rate, and residence time [13,14]. Pyrolysis is further classified into two types: slow pyrolysis (300–650 °C), with residence times of up to 12 h and heating rates of 10–30 °C/min, yields biochar at 30–40% [14,15]; and fast pyrolysis (>500 °C), with residence times of up to 2 s and heating rates up to 1000 °C/min, yields 10–30% solids and 15–20% liquids [16,17]. In both cases, the resulting biochar exhibits high chemical stability, can be used as a soil amendment, contributes to carbon sequestration, and improves soil fertility [18,19,20,21].
To investigate biomass-to-biochar degradation behavior, kinetic analysis is typically employed using thermal treatments at elevated temperatures to accelerate reaction rates [22]. Several thermal analysis techniques are available, including thermogravimetry (TG) [23], differential scanning calorimetry (DSC) [24], differential thermal analysis (DTA) [25], and Fourier-transform infrared spectroscopy (FTIR) [26]. The most common of these is thermogravimetric analysis (TGA), which measures weight loss characteristics and allows quantification of the solid yield fraction during biochar production via biomass dehydration and decomposition [27,28]. Accurate characterization of solid yield during slow pyrolysis requires advanced kinetic models capable of capturing the complex nature of thermal decomposition [29]. In this regard, several techniques are applied to study biomass decomposition, including single-step, multi-step, and reaction mechanism-based approaches, as reviewed by Skrzyniarz et al. [22], which also details the biomass types used in each study. The two-step kinetic model proposed by Di Blasi and Lanzetta [30] separates the decomposition stages of cellulose and lignin [31]. This scheme, based on first-order kinetics and Arrhenius laws, simplifies the complex evolution observed in TGA data from lignocellulosic samples [32]. While this model has been widely applied to torrefaction studies, its implementation in slow pyrolysis remains relatively unexplored.
Recent studies have enriched this approach with advanced optimization tools. Table 1 shows the different optimization algorithms used alongside the two-step kinetic model, such as Nelder–Mead (N-M) [33,34,35,36,37,38,39], Particle Swarm Optimization (PSO) [40,41,42], Levenberg–Marquardt (L-M) [43], Sum of Squared Errors (SSE) [44], and Least Squares Regression (LSR) [45], each delivering promising results for different biomasses and temperature profiles in torrefaction processes. Controlling variable heating rates (0.1–50 °C/min), treatment temperatures (200–800 °C) and adjustable residence times (minutes to hours) enables identification of optimal torrefaction/pyrolysis conditions that maximize solid yield and biochar quality, as demonstrated by Chen et al. [41] for wood (118% energy density increase compared to fixed conditions).
Although TGA is widely used to characterize thermal decomposition kinetics of milligram-scale samples, it presents critical limitations in predicting solid yields for torrefaction and slow pyrolysis when extrapolated to industrial reactors. First, scale and heat/mass transfer effects (≈10 mg) do not replicate real reactor conditions, underestimating mass loss by up to 15% in fibrous biomasses (e.g., wood residues) due to the absence of internal thermal gradients [33,35,37]. Second, the lack of vapor–solid interactions and insufficient residence times in TGA oversimplifies secondary recombination mechanisms, causing deviations in solid yields of over 12% compared to pilot-scale systems [34,36,44]. These factors demand validation using larger-scale reactors for reliable industrial applications [40,43]. Given that various algorithms have been reported with different biomasses and temperature profiles, implementing an autonomous system that integrates thermal profile control (heating rates, temperatures, and residence times) with optimization algorithms into a single platform would be highly valuable. Such a system could meet different needs depending on the application or biomass type and extend the process to slow pyrolysis. Moreover, it would complement commercial equipment such as TGA.
The quality of biochar that has undergone a thermal process is expressed in terms of its higher heating value (HHV) and a lower atomic ratio of H/C and O/C [40], which are determined through elemental analysis and calorimetry. These studies are conducted using specialized equipment outside the slow pyrolysis thermal process.
This work presents a comprehensive hardware–software system for slow pyrolysis of biomass, incorporating automated control and optimization algorithms (PSO, Genetic Algorithms–GA, and N-M) for the kinetic characterization of biochar yield, representing a significant extension of our previous approach [40]. Three biomass species abundant in the region were selected as case studies, and their degradation kinetics were modeled using three optimization algorithms. The software, developed in MATLAB 2023b, includes advanced thermokinetic characterization capabilities, while the hardware integrates a control and monitoring platform, a pyrolyzer with predictive control to compensate for process delays [46,47,48], as well as real-time temperature and weight sensors. The software module accurately estimates the global kinetic parameters of two steps (including biochar yield) using particle swarm optimization (PSO), genetic algorithms (GA), and the Nelder–Mead (N-M) method. These algorithms serve as optimization tools (N-M) and computational intelligence (PSO and GA) that transform experimental data into predictive models for thermochemical conversion. These algorithms estimate the parameters required for the two-step kinetic model based on experimental data. While methodological comparisons of this type have been reported in isolated cases in the literature, as summarized in Table 1, the integration of these techniques with a predictive control system represents a significant advancement. Unlike previous isolated studies, this system combines predictive control strategies with evolutionary and deterministic optimization methods, establishing a methodological framework that demonstrates the potential of optimization and computational intelligence tools in renewable energy processes. By considering three types of locally available residual biomass (wheat straw—WS, pruning waste—PW, and sewage biosolids—BS), the study provides both experimental validation and modeling in the context of Guanajuato, Mexico, supporting its applicability to agro-industrial energy systems. Overall, this hybrid approach (advanced control + optimization and computational intelligence tools-based multi-method kinetic fitting) offers an innovative platform for optimizing biochar and bioenergy production, directly contributing to the digitization, efficiency, and resilience of biomass-based renewable energy systems.

2. Materials and Methods

This section describes the three types of biomass used in this study, selected for their relevance to the Guanajuato region in Mexico. It then presents the fundamentals of the Smith predictive controller, which is essential for compensating time delays in temperature control systems, as well as the two-step kinetic model that characterizes biomass degradation kinetics. Finally, the section introduces the optimization algorithms employed, i.e., PSO, GA, and the N-M method, for predicting solid yield.

2.1. Use of Biomass for Sustainability

In recent years, Guanajuato, Mexico, has become the third-largest national producer of wheat, with average yields of 6.4 tons/ha and more than 400,000 tons annually, generating a significant volume of wheat straw (WS), of which less than 30% is used for animal feed [49]. In addition to this residual biomass, urban pruning residues (PW) and biosolids (BS) from wastewater treatment plants, whose management is regulated by NOM-004-SEMARNAT-2002 [50,51], represent additional resources. These biomass types offer a strategic opportunity for valorization through slow pyrolysis, a process that produces biochar with applications in soil improvement, greenhouse gas mitigation, and environmental remediation [52,53] by reducing carbon emissions [54].
In this study, as shown in Figure 1, WS samples were collected in the municipality of Penjamo (cropland located at 20°25′52″ N, 101°43′20″ W), PW in Irapuato and Celaya (20°40′27″ N, 101°20′51″ W, and 20°31′44″ N, 100°48′54″ W, respectively), and BS in León (21°07′22″ N, 101°41′00″ W). This collection strategy aligns with state-level circular economy policies and the National Program for the Sustainable Use of Bioenergy [55,56].

Property Characterization

The WS, PW, and BS were ground to a uniform powder and sieved with a No. 20 mesh sieve. The proximate analysis was based on the standard procedure of the American Society for Testing and Materials. The results of the analysis of the feedstocks wheat straw (WS), pruning waste (PW), and biosolids (BS) are detailed in Table 2.

2.2. Theoretical Background

2.2.1. Smith Predictive Control

In pyrolysis thermal systems, a key variable to control is the set point temperature to optimize biochar yields. However, regulating the heating rate (<5 °C/min) poses a complex challenge due to dynamic delays (>45 s) [57], thermal nonlinearities, and disturbances in biomass feed flow. The Smith predictive controller addresses these limitations by integrating a 30% improvement in dead-time compensation compared to conventional controllers [46], achieving a 40% reduction in the Integral of Absolute Error (IAE) during ramp profiles [47], and providing better disturbance rejection in industrial plants [48]. One of the main features of the Smith predictor is its capability to compensate for dead time [47], which makes it an ideal control strategy for thermal systems [46,48].
The structure of the Smith predictor is shown in Figure 2. It can be divided into two parts: the controller C(s) and the predictor structure, which consists of a transfer function Gm(s) and a dead-time model given by e−Ls. The model error (ep) is defined as the difference between the process output (y) and the model output (ypm). The variable ym(t + L) represents the predicted process output in open-loop. Gm(s) is used for open-loop prediction, and the model is expressed in
P m ( s ) = G m e L s
The closed-loop dynamics of the system are given by Equation (2), where τ is a design parameter representing the desired system response time.
G d s = e L s τ s + 1

2.2.2. Two-Step Kinetic Model

To describe the biomass degradation kinetics up to the formation of biochar, expressed as the instantaneous solid yield at each study temperature SY(T)(t), the instantaneous weight measurement wi(t), and the initial weight w0 are used as defined in
S Y ( T ) t = w i t w 0
where t (min) represents the time and T (°C) is the treatment temperature.
Based on the model proposed by Di Blasi and Lanzetta [30], the two-step kinetic model given in Equation (4) is employed, which simplifies the thermal decomposition of biomass into two parallel and independent reactions. The first stage corresponds to the rapid decomposition of cellulose and hemicellulose, while the second stage represents the slower degradation of lignin. This is modeled through the decomposition of solid pseudo-components A, B, and C, and volatile fractions V1 and V2. Solid A corresponds to raw biomass, B is the intermediate solid, and C is the generated biochar, with each reaction releasing volatiles V1 and V2. The initial conditions for the kinetic rates were obtained following the same criteria as in [40], where (−20 < ki < 0 dB) defines the search range for the optimization algorithms.
1 s t   s t e p : A k 1 B A k V 1 V 1                               2 n d   s t e p : B k 2 C B k V 2 V 2
where ki (min−1, i = 1, 2, V1, V2) are the kinetic rate constants, defined by the Arrhenius law in Equation (5). Here, A0,i (min−1) is the pre-exponential factor, Ea,i (J·mol−1) is the activation energy, T (K) is the isothermal temperature, and R (J·mol−1·K−1) is the universal gas constant [32].
k i = A 0 , i exp E a , i R T
The sum of the solid pseudo-components A, B, and C represents the evolution of SY(T)(t), as described in Equation (6), while the evolution of the volatile yields V1 and V2 is given by Equation (7). At the beginning of the slow pyrolysis process (t = 0), the raw material described by pseudo-component A corresponds to the fraction 1.0 (mA = 1.0) of SY(T)(t = 0).
S Y T t = Y A T t + Y B T t + Y B T t
Y V T t = Y V 1 T t + Y V 2 T t
Equations (8)–(12) are used to model the time evolution of pseudo-components A, B, C, V1, and V2.
Y A T t = d m A t d t = k 1 + k V 1 × m A t
Y B T t = d m B t d t = k 1 × m A t k 2 + k V 1 × m B t
Y C T t = d m C t d t = k 2 × m B t
Y V 1 T t = d m V 1 t d t = k V 1 × m A t
Y V 2 T t = d m V 2 t d t = k V 2 × m B t
To minimize, min, the error between experimental data and the predicted thermodegradation curves, the Least Squares Method (LSM) [40] is applied as the Objective Function (OF), as defined in
min :         O F T = j = 1 n S Y exp , j T t S Y s i m , j T t 2        
where S Y exp , t T t is the j-th experimental datapoint of solid yield, S Y sim , t T t is the calculated solid yield, T is the isothermal temperature, and n is the number of experimental points. The fit quality is calculated using [41,42]:
f i t % = 1 O F n S Y exp , j T t max × 100 %
The calculation of the kinetic parameters A0,i and Ea,i of the Arrhenius Equation (5) in a thermal degradation process using the two-step kinetic model described in Equations (8)–(12) represents a complex problem that involves integral equations. Therefore, optimization algorithms are well-suited for solving nonlinear problems with high-dimensional search spaces. In this work, three optimization algorithms: PSO, GA, and N-M, are applied to solve this parameter estimation problem.

2.2.3. Particle Swarm Optimization (PSO) Algorithm

PSO is known as a metaheuristic algorithm, which is inspired by social behaviors observed in natural systems. It is particularly effective for identifying kinetic parameters in nonlinear models due to its simplicity and convergence properties [58]. The procedure, as illustrated in Figure 3a, begins with the initialization of a swarm of particles. The search space is defined in a range from −20 to 0 dB regardless of the selected biomass [40]. Each particle i is defined by its position x i 0 and velocity v i 0 , randomly generated within the predefined parameter bounds.
At each iteration t, the following five steps are performed:
  • Evaluation of the objective function: Each particle’s position corresponds to a candidate set of kinetic parameters of the two-step model, and the quality of the solution is evaluated by employing the Objective Function (OF), Equation (13), between the experimental data S Y exp , j T t and model predictions S Y sim , j T t . It ensures that the OF reflects the average discrepancy between experimental and simulated values, regardless of the dataset size.
  • Update of personal and global bests: After the evaluation, each particle updates its personal best position p i b e s t , and the swarm updates the global best position g b e s t if the current solution yields better performance.
  • Velocity update: The velocity of each particle is updated according to
    v i t + 1 = ω × v i t + c 1 · r 1 · r a n d ( ) · p i b e s t x t + c 2 · r 2 · g b e s t x i ( t )
    where ω is the inertia weight, c1 and c2 are acceleration coefficients (cognitive and social, respectively), and r1, r2 are random numbers in the range [0, 1].
  • Position update: Once the velocity is updated, the new position of the particle is calculated as follows:
    x i t + 1 = x i t + v i t + 1
  • Stopping criterion: The algorithm ends when a stopping condition is met, i.e., a maximum number of iterations Tmax, or when the OF drops below a predefined threshold ε:
    f   t T max     o r     O F T ε ,     t h e n   s t o p

2.2.4. Genetic Algorithm (GA)

GAs are evolutionary computation techniques inspired by the principles of natural selection and genetics, initially proposed by [59]. In particular, a GA mimics the evolutionary process by iteratively improving a population of candidate solutions through mechanisms analogous to biological evolution. As illustrated in Figure 3b, the basic operations of a GA follow a sequential flow consisting of initialization, fitness evaluation, selection, crossover, mutation, and a stopping criterion. Each of these steps is described below.
  • Initialization: The initial population of N individuals is defined as
    P 0 = x 1 0 , x 2 0 , , x N 0
    Each individual, denoted as xi(0), is a candidate solution encoded as a real-valued vector (Arrhenius kinetic parameters). It is worth noting that these vectors are initialized randomly within specified bounds for each parameter, the search space is defined in a range from −20 to 0 dB regardless of the selected biomass.
  • Fitness evaluation: Later, each individual is evaluated using a fitness function designed to quantify the degree of agreement between the model and experimental data. In kinetic parameter estimation, OF(T) Equation (13) is used for this task.
  • Selection: Following fitness evaluation, individuals are selected to form a mating pool. The probability of selection is typically biased toward individuals with superior fitness. One common method is roulette wheel selection, where the selection probability of the i-th individual is calculated as
    p i = f x i k = 1 N f x k
    when solving minimization problems, a scaling or transformation of the fitness function is applied to ensure proper selection dynamics.
  • Crossover: Selected individuals are paired and recombined to produce new offspring. For real-coded chromosomes, arithmetic crossover can be utilized:
    O f f s p r i n g 1 = α · x i + 1 α · x j O f f s p r i n g 2 = 1 α · x i + α · x j
    where α ∈ [0, 1] is a crossover coefficient randomly selected for each pair.
  • Mutation: In order to introduce variability and prevent premature convergence, mutation is applied by perturbing individual genes as follows:
    x i , k m u t a t e d = x i , k + δ
    where xi,k is the k-th gene of chromosome xi, and δ is a small random noise sampled from a predefined distribution (e.g., Gaussian).
  • Replacement and termination: The new generation, composed of the offspring, replaces the current population. This iterative cycle is repeated until a termination condition is satisfied, such as reaching a maximum number of generations Gmax or achieving a minimum fitness threshold ε:
    i f     g G max       o r       min f x ε ,     t h e n s     s t o p
    The best-performing individual at the final generation is considered the optimal solution.

2.2.5. Nelder–Mead Algorithm (N-M)

N-M algorithm, introduced by [60], is a direct search optimization method commonly used for unconstrained minimization of nonlinear objective functions. Unlike gradient-based methods, N-M does not require the calculation of derivatives, making it particularly useful for tasks that are noisy, discontinuous, or not differentiable. It operates on a geometrical figure called a simplex, which in an n-dimensional space consists of n + 1 vertices. Each vertex corresponds to a candidate solution. The algorithm iteratively moves and reshapes this simplex in the search space to find a local minimum of the objective function.
The typical flow of the N-M algorithm, as outlined in Figure 3c, includes the following operations:
  • Simplex initialization and ordering: An initial simplex S = {x1 + x2 + … + xm+1} is formed using n + 1 points in the parameter space, and the objective function f(xi) is evaluated at each vertex. The points are then sorted such that
    f x 1 f x 2 f x n + 1
    where x1 denotes the best solution and xn+1 the worst within the current simplex.
  • Centroid and transformation: The centroid xc of all points except the worst one is computed as
    x c = 1 n i = 1 n x i
    Using xc, the algorithm attempts reflection, and if necessary, expansion or contraction, which are estimated as follows:
    Reflection: a reflection point xr is generated by reflecting the worst point through the centroid:
    x r = x c + α x c x n + 1
    Expansion: it is applied if xr is better than the best as follows:
    x e = x c + γ x r x c
    Contraction: it is employed if xr is worse as follows:
    x c = x c + β x w o r s t x c
    It is worth noting that the parameter values α = 1, γ = 2, and β = 0.5 are commonly used, as they have been shown to yield suitable results in optimization problems [61].
  • Shrinkage: If no transformation improves the simplex, it is contracted around the best point:
    x i = x 1 + δ x i x 1   for   i = 2 , , n + 1
    with δ = 0.5.
  • Convergence check: The iteration continues until the spread of function values or vertex distances falls below a threshold ε:
    max i x i x 1 < ε   or   max i f x i f x 1 < ε
Once the stop and end conditions of each algorithm are met, a set of Arrhenius kinetic parameters (A0,i and Ea,i) is established by the two-step kinetic model, as shown in the orange boxes in Figure 3.

3. Methodology

The methodology developed in this proposal integrates a hybrid hardware–software system designed for control, data acquisition, and kinetic modeling of the slow pyrolysis process of lignocellulosic biomass aimed at biomass-to-biochar conversion, as shown in Figure 4. The proposed approach consists of two main components: (i) Hardware System, comprising the design and implementation of a physical thermal control system for a pyrolyzer, and monitoring of weight loss with a scale, and (ii) Software System, consisting of a computational module for temperature control in the pyrolyzer, biomass weight-loss monitoring, and kinetic parameter fitting and prediction using the two-step kinetic model and optimization algorithms based on PSO, GA, and N–M. The details of the physical elements are provided in Section 4.1.

3.1. Hardware System

The pyrolyzer is designed to process raw biomass and obtain a solid product (biochar) after slow pyrolysis. The system includes a commercial scale connected to a computer via RS232, enabling real-time weight-loss recording, which is essential for kinetic analysis. The core of the physical subsystem consists of a microcontroller acting as an interface between process sensors, control elements, and the computer, as shown in Figure 4a. The microcontroller receives temperature data from a thermocouple connected to an amplifier, ensuring accurate digital readings of the pyrolyzer’s thermal profiles. This thermal signal is used by a power driver that regulates voltage to a medium-power band heater (220 VAC, 3000 W). This resistive heating element is responsible for reaching the required temperatures to induce the thermochemical decomposition of biomass. Sensor data are transmitted to the software for visualization, storage, and subsequent processing.

3.2. Software System

Figure 5 presents a flow diagram of the graphical user interface (GUI), developed as part of a computational system that integrates thermal control of the biomass slow pyrolysis reactor with the implementation of optimization algorithms for kinetic fitting of experimental data based on the two-step kinetic model. The interface supports two main processes: (a) Pyrolyzer Control, (b) Optimization Algorithms for modeling the thermochemical processes associated with lignocellulosic biomass degradation. In both cases, it is important to establish: (c) Selection of the thermal profile according to the heating rate (°C/min): (i) linear and (ii) double, a target temperature (°C), and residence time (min).
Figure 5a corresponds to the Pyrolyzer Control Module, where the user defines the temperature profile applied to the reactor. The system allows the manipulation of temperature profiles data: heating rate (m), and treatment temperature (T). The user also specifies the residence time (Rt) of the process. Once configured, the system starts the experiment, activating real-time monitoring of key variables: temperature (°C) and weight loss (g). In addition, the user can select the Preview button to view the temperature profile before starting a control test. These variables are displayed in dynamic plots and stored using the Save Data function for later analysis. If an error occurs during operation, the process can be stopped via the STOP button.
In parallel, the interface supports a manual analysis stage, where the user selects experimental datasets containing temperature (°C), solid yield (%), and acquisition time (min). For the last two variables, at least four points are required for each studied temperature. Solid yield is normalized according to the weight-loss relationship (m/m0) from Equation (3). This step is necessary for preprocessing adjustments before running the optimization algorithms.
Figure 5b describes the Optimization Algorithm Process Flow, where experimental thermal profiles are imported, and the biomass type is selected. Once completed, the interface automatically generates experimental plots used as input for the fitting algorithms.
Figure 5c shows the thermal profiles that can be programmed into the proposed hardware–software system: heating rate m (°C/min) and operating temperature T (°C). Tamb (°C) is the ambient temperature, and residence time (Rt (min)) corresponds to the duration of each slow pyrolysis run.
The system supports the execution of three optimization algorithms, i.e., PSO, GA, and N–M, aimed at optimizing the kinetic parameters of the two-step model using experimental solid yield (SY(T)) data, which describe biomass thermal conversion as the combination of two parallel reactions with their respective rate constants. The objective function minimizes the error (Equation (13)) between experimental data and model predictions in terms of conversion and weight loss. Upon confirmation (RUN Algorithms), the system calculates the optimal kinetic parameters and displays them in the interface. Otherwise, the user may clear plots and data via the Clear Plots & Data button. Final results can be exported using the Save Data function.
The GUIs were developed to facilitate the visualization of temperature curves (°C) and weight loss (g), as well as the selection of the type of biomass to be analyzed. This integration allows for closing the cycle between data acquisition, processing, and analysis within a single platform. The graphical interfaces were implemented in MATLAB 2023b. Figure 6 shows the main interface where the user can choose between the pyrolyzer control process and the optimization algorithms.
Figure 7 presents the design of the GUI corresponding to the pyrolyzer control process, which includes: (a) defining temperature profiles (also shown in Figure 5c), (b) temperature graph, (c) weight loss graph, (d) current temperature monitoring display, (e) STOP button, (f) temperature profile Preview button, (g) Process Start button, (h) button to Save Data (temperature profiles and weight loss), and (i) an Exit button from the control process screen.
Figure 8 shows the GUI for the Optimization Algorithms process. This interface is divided into Experimental Data and Optimization Algorithms. For the first section: (a) loading data of temperature profiles as case studies, (b) solid yield data to be fitted to the two-step kinetic model, (c) instantaneous solid yield time data, (d) biomass type selector, (e) temperature profile graphs, (f) solid yield data graphs, and (g) a button to generate experimental graphs. In the second section, the graphs and results of the kinetic parameters obtained from the fitting by PSO, GA, and N-M with the two-step kinetic model are shown, as well as the values of the objective functions and fits calculated according to Equations (13) and (14). The subsections include: (h) graphs of the model and experimental data obtained by PSO, (i) Arrhenius curves by PSO, (j) values of kinetic parameters obtained by PSO from Equations (5) and (8)–(12), as well as the fit and OF values; (k) graphs of the model and experimental data obtained by GA, (l) Arrhenius curves by GA, (m) values of kinetic parameters obtained by GA from Equations (5) and (8)–(12), as well as the fit and OF values; (n) graphs of the model and experimental data obtained by N-M, (o) Arrhenius curves by N-M, (p) values of kinetic parameters obtained by N-M from Equations (5) and (8)–(12), as well as the fit and OF values. This section also includes the (q) RUN algorithms button, (r) the Clear Plots and Data button for when the adjustments are not as expected by the user, (s) the Save Data button, and (t) the Exit button from the Optimization window.

4. Experimentation and Results

4.1. Experimental Setup and Test Design

In Figure 9, a physical experimental setup is shown. Figure 9a shows a hardware–software system consisting of a pyrolysis-type reactor made of AISI 304 stainless steel with dimensions of 10.16 cm × 25.0 cm × 0.602 cm and a capacity of 0–2 kg of biomass, equipped with a 220 VAC, 3000 W clamp-type electric heater. Both the pyrolyzer and the heater were custom-made, designed to operate under slow pyrolysis conditions. Thermal control is achieved through a type-K temperature sensor [62], whose signal is conditioned by a MAX6675 amplifier with a resolution of 0.25 °C [63]. This signal is digitally interpreted by an ATmega328P microcontroller [64] and then modulated to regulate the heater power via an Autonics SPC1-50 power driver, 220 VAC~50/60 Hz [65]. Temperature data are sent to an external computer via a USB port. A Smith predictive control system with a delay of L = 225 s, Equations (1) and (2), was implemented in MATLAB 2023b software, enabling the pyrolyzer temperature to be controlled within a range from ambient temperature (Tamb) to 700 °C, heating rates between 5 and 50 °C/min, and residence times set by the user according to the test requirements. The plant transfer function, Gm(s), is shown in Equation (30), and the controller transfer function, C(s), is shown in Equation (31). For continuous monitoring of weight loss during the slow pyrolysis process, a commercial digital scale, Rhino Baco-30, with a capacity of 0–30 kg and ±1 g resolution [66], was used, communicating with the computer via RS232 protocol. The software system was implemented on an HP OMEN Intel® Core™ i7-9750H CPU @ 2.60 GHz, 8.0 GB RAM, 2 TB storage, and 4 GB graphics card. During each slow pyrolysis test, the system records temperature (°C) and weight loss (g) data at a sampling frequency of 1 Samples/s, generating an experimental data base. To standardize the experiments, the initial weights (w0 = 50 g) were established for each of the biomass samples under study. Figure 9b shows the schematic diagram of the reaction system consisting of: A: hardware–software system; B: interfaces (temperature, power driver, RS232); C: scale; D: thermocouple; E: clamp resistor; F: reactor; G: exhaust gas pipe; H: condenser; I: tars; J: thermal insulator; K: biomass; and L: N2 tank.
G m s = 1082.1 767.24 s + 1
C s = 0 . 036652 s + 0 . 000290173884 s
Figure 10 shows the evolution of the three biomass types used in this research: wheat straw (WS), pruning waste (PW), and biosolids (BS) during the slow pyrolysis process at different temperatures, starting from a raw state (w0 = 50 g) to the formation of biochar.
Nitrogen (N2) is injected at a flow rate of 50 mL/min before starting the experiment for 5 min to eliminate any trace of air (oxidizing agent) into the reactor when the sample has been previously placed.
All samples were processed with a heating rate of 20 °C/min and a residence time of 120 min. Figure 10a depicts WS treated at 250, 275, 300, and 325 °C, where a color change from light to deep black can be observed, indicating an initial torrefaction stage followed by advanced carbonization. Figure 10b corresponds to PW treated at 300, 400, and 500 °C, showing a more gradual change from brown to black biochar with a more compact structure. In the case of BS, as shown in Figure 10c, treated at 300, 400, and 500 °C, the transformation progresses from gray to dark, dense biochar.
For each biomass under study, solid yield data (%) were obtained from weight-loss curves (with a minimum of four data points per temperature). These points were normalized (m/mo) according to Equation (3), and the corresponding time instants were recorded. To validate the methodology, Table 3 summarizes the experimental design applied to the three biomass types (WS, PW, and BS), subjected to slow pyrolysis under controlled conditions of 20 °C/min heating rate, 120 min residence time, temperatures between 250 °C and 500 °C, along with the solid yield (%) and instantaneous conversion times (min) obtained from the thermal treatment. Biomass weight loss was monitored in real-time via the integrated system’s scale, with initial and final weighings performed to validate measurement consistency.

4.2. Analysis of Biomass Data from the Optimization Process

The collected information is captured in the software, as shown in Section 3.2, Figure 8, within the Experimental Data section, where it is displayed and used as input for kinetic model fitting and optimization algorithms. For the PSO algorithm configuration, the initial parameters were set to 500 particles, 500 iterations, and social and cognitive parameters c1 = 2 and c2 = 2. For the GA case, the configuration parameters used included the crossover function defined by MATLAB’s @crossoverheuristic with a scaling factor of 8 to avoid local optima, a population size per generation of 100, a maximum number of iterations of 1000, and a tolerance function of 1 × 10−12. Finally, for the N-M case, the configuration parameters used were MATLAB’s fminsearch function with a maximum of 2000 iterations, a maximum of 3000 function evaluations, and a tolerance function of 1 × 10−6. The search space varies depending on the biomass type and optimization algorithm, although the limits were always set to satisfy the condition −20 < ki < 0 dB, relating the natural logarithm on both sides of Equation (5), and the maximum and minimum temperatures established for each practical case study, as shown in [40]. For WS: the search space ranged from 1 × 101 to 1 × 1020 for A0, while the range for Ea was from 1 × 104 to 9 × 106. For PW: the search space for A0 ranged from 1 × 10−1 to 1 × 1020, while the search range for Ea ranged from 1 × 104 to 9 × 105. Finally, for BS: the search range for A0 was from 1 × 10−1 to 9 × 1020, and for Ea the search range was from 1 × 100 to 9 × 106. For each biomass, the search ranges for A0 and Ea remain independent of the optimization algorithm used. To obtain the Arrhenius kinetic parameters, namely the A0 and Ea, according to Equation (5), for the different biomasses under study, the following presents the fitting of experimental data to the two-step kinetic model (which relates the rate constants k1, kV1, k2, and kV2, Equations (8)–(12)) using the optimization algorithms.

4.2.1. Wheat Straw (WS)

Table 4 summarizes the kinetic parameters of the two-step model applied to WS, fitted using three optimization algorithms: PSO, GA, and N-M. The N-M algorithm achieved the best fit at 100% accuracy in 4.053 min, while PSO reached 99.999% accuracy but required more computational time (6.280 min). GA was the fastest algorithm (1.870 min), with slightly lower accuracy (99.996%). According to Table 4, the performance hierarchy in relation to fit (N-M > PSO > GA) observed in this biomass suggests that its pyrolysis kinetics are governed by relatively well-behaved reactions in a predominantly convex parameter space. The homogeneous lignocellulosic structure of WS, with balanced proportions of cellulose, hemicellulose, and lignin, generates an optimization landscape with a well-defined global minimum. This feature allows efficient local search algorithms such as N-M to converge rapidly to the optimal solution with high accuracy, while population-based algorithms (PSO and GA), although competent, are slightly less efficient in this moderately complex scenario.
The set of kinetic constants obtained using the PSO and N-M algorithms shows very similar activation energy values (with a difference of less than 10%). The highest value in the equation is related to the decomposition of solid matter, while the lower values correspond to the cracking of volatile compounds and the second stage of the model. Regarding the pre-exponential factor, high values indicate a strong molecular structure and the potential for a reaction to occur more frequently, resulting from effective molecular collisions based on the arrangement of molecules. Therefore, the obtained value using GA suggests a solution not valid for physical interpretation.
Figure 11 shows the curves of the two-step kinetic model (solid lines) alongside the experimental solid yield data (points) for WS, highlighting some nuances depending on the optimization algorithm used. In Figure 11a(i,ii), the PSO algorithm provides a close match to the experimental data, exhibiting minor errors during intermediate stages (275–300 °C), as well as increased dispersion in the Arrhenius plot, suggesting sensitivity to the swarm parameter selection. Figure 11b(i,ii) show GA producing smoother fitting curves. Finally, Figure 11c(i,ii) demonstrate that N-M achieves the best Arrhenius linearity, although its performance heavily depends on initial conditions, which could lead to convergence to local minima that do not accurately represent the true kinetics. For all three algorithms, the fits show a consistent relationship in the Arrhenius plots, where k1 > kV1 > k2 > kV2, indicating that the first stage of slow pyrolysis proceeds faster than the second, and that volatile release processes are slower than solid conversion.
Figure 12 shows the correlation between the experimental values of biochar yield and the values predicted by the optimization models (PSO, GA, and N-M) for wheat straw. The data were obtained under a constant heating rate of 20 °C/min, a residence time of 120 min, and a slow pyrolysis temperature range of 250, 275, 300, and 325 °C. Each data point represents an individual experimental condition, allowing for direct visual evaluation of model performance. For each item, the solid orange line (y) represents the ideal perfect correlation, where the predicted values would match the experimental values exactly. The proximity of the data cloud to this ideal line demonstrates the high accuracy of the optimization algorithm developed to predict solid yield. In all cases, a strong correlation between the hardware system data and the software predictions validates the overall effectiveness of the proposed system. However, the degree of accuracy varies between algorithms, as evident in the three sections analyzed. Figure 12a illustrates the correlations with PSO, demonstrating a good fit with an R-squared value of 0.990. Figure 12b corresponds to the correlations with GA with R2 = 0.994. Finally, Figure 12c shows the correlations with the N-M method with R2 = 0.996. In all three cases, the value of R2 suggests high efficiency in the search for the global optimum for the kinetic parameters of the model. For the temperature of 275 °C, there is a slight dispersion of data for PSO and GA; however, N-M achieves a better fit.

4.2.2. Pruning Waste (PW)

Table 5 presents the kinetic parameters obtained for PW through fitting the two-step model using PSO, GA, and N-M algorithms. The activation energies (Ea) and frequency factors (A0) for the Arrhenius constants are included, along with the percentage of fit and computational time. The N-M algorithm showed the best performance with a 100% fit achieved in 2.345 min, followed by GA (99.999%, 1.805 min) and PSO (99.830%, 6.426 min). Table 5 showed a performance hierarchy in relation to fit (N-M > GA > PSO) for this biomass, with a more robust overall fit. It is attributed to the greater presence of structural components such as lignin, which confers a more predictable but slightly more complex decomposition kinetics than WS. The consistently lignocellulosic nature of PW generates a sufficiently regular search space where local search methods maintain their advantage, while population methods show a slight excess of computational capacity for this specific application.
For the case of PW, the N-M and GA methods offer the best fit parameters, such as activation energy and the pre-exponential factor, as they yield high values, which support the interpretation of their physical significance. In contrast, the PSO method is discarded, firstly due to its lower accuracy in the fitting process, and secondly because it yields parameter values that are too small (physically not valid).
Figure 13 displays the fitting curves of the two-step kinetic model (solid lines) alongside the experimental solid yield data (points) for PW according to the different optimization algorithms. In Figure 13a(i,ii), corresponding to PSO, there is a close match with the experimental data at 400 °C, with minor errors at 300 °C and 500 °C. The Arrhenius plots indicate that the first stage of slow pyrolysis is slightly faster than the second. On the other hand, Figure 13b(i,ii), show that GA produces smooth fits at 300 °C and 400 °C, while the fit at 500 °C appears forced; however, the Arrhenius curves demonstrate that the volatile decomposition stages are slower than the solid conversion, which is a characteristic of slow pyrolysis. Finally, Figure 13.c, i, and ii, show that N-M achieves a very good fit at 300 °C and 400 °C, exhibiting rapid decomposition during minutes 15–22. This is reflected in the Arrhenius plots, where the first stage of solid decomposition occurs much faster than the second stage.
The models were evaluated under slow pyrolysis conditions with a heating ramp of 20 °C/min, a residence time of 120 min, and target temperatures of 300, 400, and 500 °C, and four experimental data points per temperature. Figure 14 shows the correlation between the experimental data and the predicted data. The solid orange line represents the ideal correlation (y). Figure 14 compares the performance of three optimization algorithms for predicting biochar yield from pruning waste. Unlike the results obtained for wheat straw, the three algorithms demonstrated higher and very similar performance for this biomass, as confirmed by the coefficients of determination (R2) very close to 1. The N-M algorithm, Figure 14c, presented the highest statistical correlation, with an R2 of 0.998, indicating that its predictions explain 99.8% of the variance in the experimental data. It was closely followed by GA, Figure 14b, with an R2 of 0.994, and finally PSO, Figure 14a, with an equally excellent value of 0.986. The close clustering of all data points around the orange line in the three graphs strongly validates the accuracy and robustness of the hardware–software system developed to characterize the pyrolysis of pruning waste. The fact that even the simplest algorithm (N-M) achieved the most accurate prediction suggests that the response surface of the model for this specific type of biomass is well-behaved and allows for robust optimization even with direct methods.

4.2.3. Biosolids (BS)

For the case of BS, Table 6 presents the kinetic parameters obtained by fitting the two-step model using PSO, GA, and N-M algorithms. Activation energies (Ea) and frequency factors (A0) for the Arrhenius constants are included, along with the percentage of fit and computational time. In this case, the PSO and N-M algorithms showed the best performance with 100% fit achieved in 6.520 and 6.449 min, respectively, while GA reached 99.921% in 1.351 min. For BS, the performance hierarchy of the fit (PSO = N-M > GA) reflects the unique chemical complexity of this biomass. Its high inorganic content (ash), presence of metals, and extreme heterogeneity of its organic composition generate a non-convex search space with multiple local minima. In this scenario, the PSO algorithm proved to be the most robust, leveraging its population-based and stochastic nature to effectively explore the parameter space and avoid local optima. The surprising performance of N-M, outperforming GA, suggests that in certain initial configurations, this local search method can find competitive solutions in complex spaces, albeit with less consistency than PSO. The relatively inferior performance of GA could be attributed to a less efficient exploration of the search space compared to PSO, possibly due to premature convergence or a suboptimal selection of operating parameters for this specific biomass.
The PSO and N-M methods offer the best fit parameters. However, high values for the activation energy and the pre-exponential factor support the interpretation of their physical significance, making N-M stand out compared to PSO and GA.
Figure 15 shows the fitting curves of the two-step kinetic model (solid lines) to the experimental solid yield data (points) of BS using the different optimization algorithms presented, reflecting the thermal complexities of this biomass. In Figure 15a(i,ii), the PSO algorithm produces a noticeable accuracy in the solid yield profile, although in the 20–35 min range there is a fitting error, possibly due to the coexistence of organic and mineral fractions with different reactivities. The Arrhenius plots maintain good linearity with slight deviations in the second stage (k2), which may reflect the influence of inorganic compounds on the kinetics. In Figure 15b(i,ii), the GA fit is acceptable but shows notable errors around minute 26; however, the Arrhenius plots indicate rapid decomposition in the first stage compared to the second. In contrast, Figure 15c(i,ii) show that N–M achieves a smooth fit but has less ability to capture the experimental inflections around minute 26, evidencing less stability in the kinetic slopes in the Arrhenius curves.
Figure 16 compares the effectiveness of three optimization algorithms for predicting biochar yield from biosolids, with five experimental data points per temperature. The analysis reveals a clear gradient in predictive performance among the methods evaluated. The PSO algorithm, Figure 16a, proved to be the most robust and accurate for this specific biomass and conditions, achieving a coefficient of determination (R2) of 0.980. This indicates that the model explains 98.0% of the variance in the experimental data, with the data points clustered closely around the ideal orange line (y). GA in Figure 16b performed well, although with slightly lower accuracy (R2 = 0.955). Moderate dispersion of the points is observed, suggesting that the algorithm was able to capture the general trend but with some more significant prediction errors at specific points. The N-M algorithm, Figure 16c, presented the least accurate fit (R2 = 0.860). The greater dispersion of the data indicates a difficulty in consistently converging towards the global optimal solution for this particular problem, possibly becoming stuck in local optima or being more susceptible to the influence of the initial parameter configuration. This performance hierarchy (PSO > GA > N-M) validates the selection of robust metaheuristics such as PSO for the optimization of kinetic parameters in complex pyrolysis models, where the search space can be nonlinear and multimodal.

4.3. Quantitative Comparison of Biochar Yield

For a quantitative comparison of biochar yield among biomasses, Table 7 presents the experimental and predicted values at the maximum pyrolysis temperature for each material. WS exhibited the highest solid yield (45.0% at 325 °C), followed by BS (42.9% at 500 °C) and PW (33.1% at 500 °C). This hierarchy can be attributed to the higher proportion of structural components (e.g., lignin) in WS, which promotes biochar formation.

5. Discussion

Slow pyrolysis emerges as a key technology for the circular economy, transforming residual biomass into biochar, bio-oils, and high-energy gases while promoting carbon sequestration. In this context, the proposed integrated hardware–software system allowed the kinetic evaluation of three representative biomasses from Guanajuato, Mexico, i.e., WS, PW, and BS, applying the two-step kinetic model that distinguishes consecutive reactions of solid and volatile formation. The selection of these three biomasses responds to strategic criteria of regional abundance (>400,000 tons/year of WS alone in Guanajuato [49], 18% of municipal urban PW [67], 120 ktons/year (equivalent to 1.2 × 108 kg per year) of BS generated in local treatment plants [50]), compositional diversity (lignin 12% WS, 28% PW, 18% BS; cellulose: 42.5% WS, 31.3% PW, 22.66% BS; and ash: 5.1% WS, 8.9% PW, 18.4%), and potential for industrial scalability. This triad allows extrapolation of results to more than 15 additional Mexican biomasses (corn, agave, sorghum, etc.) through pre-loaded composition libraries. The hardware–software platform thus establishes an extrapolable framework for designing slow pyrolysis biorefineries, where the composition determines the optimal operating parameters through optimization algorithms such as PSO, GA, and N-M, comparing their accuracy and computational efficiency [68].
Figure 17 shows bar charts depicting the three different biomasses with the three optimization algorithms implemented. From Figure 17a, results demonstrated that for wheat straw, N-M achieved the best fit at 100%, while GA showed the lowest fit at 99.996%. For pruning residues, N-M provided the best fit at 100%, and the lowest was PSO with 99.830%. For biosolids, PSO and N-M yielded similar results at 100%, and GA gave 99.921% fit. Visually, GA exhibited smoother behavior in terms of fitting on the solid yield curves as seen in Figure 11, Figure 13 and Figure 15. Among the studied biomasses, wheat straw showed higher efficiency in biochar generation, associated with its high lignin content. Regarding the adjustment of optimization algorithms, Figure 17b shows that it is independent of the type of biomass, with PSO being consistently the most accurate for complex biomasses such as BS (R2 = 0.980), N-M is the most accurate for WS (R2 = 0.996), while for PW, all three algorithms showed excellent correlation with a slight advantage for N-M (R2 = 0.998). These results validate that the selection of the optimal algorithm must consider the specific nature of the biomass, highlighting the robustness of the hardware and software system developed to efficiently characterize the performance of biochar in slow pyrolysis. Finally, Figure 17c displays the processing times (tp) obtained for the three biomasses with the different algorithms. In all cases, GA showed the fastest processing times (1.351 < tp < 1.870 min) compared to PSO and N-M, while PSO required the longest processing times in all cases (6.280 < tp < 6.520 min).
Table 8 shows the performance hierarchy for R2, fit, and processing time (tp) for the different biomasses and optimization algorithms, demonstrating that in terms of R2 and fit for biomasses such as WS and PW, the N-M algorithm is the best, while for more complex biomasses such as BS, the best algorithm is PSO.
Among the advantages of the proposed system are its reconfigurability, since the model and algorithms can adapt to different biomasses and operational conditions without requiring structural modifications. The use of efficient algorithms reduces simulation time, resulting in. Additionally, the methodology is scalable to other thermochemical processes with low computational cost [69], such as gasification or combustion. The system can be adapted to study co-pyrolysis, where the feedstock consists of biomass and plastic mixtures, which could help generate biofuels with higher calorific value and industrial applications. Technically, the proposed hardware–software system allows configuration of different heating rates (5–50 °C/min), residence times, and temperature ranges (Tamb to 700 °C), as well as handling larger biomass quantities (0–2 kg), while other systems sometimes handle very small amounts (on the order of mg). It includes three different optimization algorithms (PSO, GA, and N-M) to compare the best fit curves and kinetic parameters obtained. However, other optimization algorithms and kinetic models can also be incorporated.
Despite these advantages, the hardware–software system presents some limitations such as a limited temperature range (<700 °C), which could be improved by installing a higher power heating element to reach a wider pyrolysis temperature range. The precision of the weight loss monitoring system is ±1 g, which could be enhanced with a higher-resolution system. The system lacks a cooling mechanism, so the time between tests can be prolonged (up to twice the residence time). Installing pressure valves and nitrogen flow controls would help maintain a regulated inert atmosphere. Also, although biomass weight loss was monitored in real time using the scale integrated into the hardware–software system, and each sample was weighed independently at the beginning and end of each test to verify measurement consistency, this study lacks experimental replicates. Therefore, future research will incorporate systematic replicates to enhance statistical robustness through uncertainty quantification.
Beyond solid yield, the integrated hardware–software system is uniquely positioned to optimize biochar quality. Future iterations will incorporate post-process analysis of elemental composition (C, H, O). O/C and H/C ratios are key indicators of biochar stability and carbon sequestration potential. By correlating these parameters with the optimized kinetic conditions found by the algorithms (PSO, GA, N-M), the system can generate a comprehensive dataset. This high-quality data is ideal for developing machine learning models that predict not only yield but also biochar quality based on biomass feedstock and pyrolysis conditions, ultimately enabling multi-objective optimization for tailored biochar production.
Although this work lays a solid foundation for optimizing slow pyrolysis of biomass within an integrated hardware–software system, several lines warrant further investigation:
(a)
Integration of Real-Time Product Characterization: Future system iterations could incorporate online analytical techniques (e.g., FTIR, GC-MS) for simultaneous monitoring of bio-oil and syngas composition, enabling comprehensive mass balance closure and product valorization assessment.
(b)
Machine Learning Enhancement: Expanding beyond traditional optimization algorithms to incorporate machine learning approaches (e.g., neural networks, random forests) could improve prediction accuracy across diverse biomass types and mixed feedstocks.
(c)
Economic and Environmental Impact Assessment: Subsequent research should integrate techno-economic analysis (TEA) and life cycle assessment (LCA) to evaluate the economic viability and environmental benefits of implementing the optimized parameters identified by the system.
(d)
Expansion to Co-Pyrolysis and Catalytic Pyrolysis: The platform’s adaptability provides opportunities to explore synergistic effects in co-pyrolysis of biomass-plastic mixtures and catalytic pyrolysis for enhanced bio-oil quality.

5.1. Unique Value of Integrated Hardware–Software Platform for Slow Biomass Pyrolysis Research

The hardware–software platform offers unique value by addressing research questions that commercial systems cannot efficiently solve. While standard equipment is limited to generic characterization under predefined conditions, the integrated system allows:
  • Automated optimization for biomass: Determines optimal kinetic parameters (A, Ea) under operating conditions (m, T, Rt) to maximize yield and quality of biochar in biomass (WS, PW, BS), using computational intelligence algorithms (PSO, GA) and optimization (N-M) that explore multimodal search spaces.
  • Advanced validation of kinetic models: Evaluates the behavior of complex kinetic models (e.g., two-step) under customized conditions and unconventional or region-specific biomasses, through full integration between hardware (data generation) and software (real-time adjustment).
  • Rational selection of algorithms: Establishes practical guidelines for choosing the optimal algorithm (PSO, GA, N-M) according to the type of biomass, balancing accuracy, speed, and computational cost.
  • Accessibility and generalization of advanced research: The platform promotes cutting-edge pyrolysis research for institutions with limited budgets by offering an accessible solution specialized in the study of local biomass, overcoming the limitations of traditional commercial systems.
The platform transcends conventional characterization by integrating characterization, optimization, and validation into a single workflow, laying the foundation for the design of decentralized biorefineries tailored to specific feedstocks—a critical capability for the circular economy that commercial systems do not offer.

5.2. Selection of Optimization Algorithms for Slow Pyrolysis Kinetics

Based on the hardware–software system and the evaluation of three optimization algorithms (PSO, GA, N-M) targeting three different types of biomasses (WS, PW, BS), a practical guide is provided here for researchers who need to select an algorithm for the characterization of slow pyrolysis kinetics:
  • Selection according to biomass type:
    • For homogeneous lignocellulosic biomass (e.g., wheat straw—WS, pruning waste—PW): The N-M algorithm is recommended, as it achieved good accuracy (R2 = 0.996 and 0.998), making it the optimal choice for these systems with convex search spaces.
    • For complex and heterogeneous biomass (e.g., biosolids—BS), PSO and N-M show a similar fit. However, the kinetic parameters obtained with N-M exhibit greater physical consistency with actual thermal decomposition mechanisms, offering not only optimization but also a relevant thermochemical interpretation.
  • Selection based on objective (Accuracy vs. Speed):
    • For maximum accuracy (especially in complex biomasses): PSO is the preferred option, despite its higher computational cost.
    • For maximum speed and efficiency (in homogeneous biomasses): N-M offers the best performance, providing exceptional accuracy with minimal resource consumption.
    • For a balance between accuracy and speed: GA is a robust option, although in this work, it was consistently outperformed by PSO or N-M in one of the two aspects.
  • Selection based on computational resources:
    • For limited resources: N-M is the most efficient alternative.
    • For sufficient resources: PSO justifies its computational investment in complex systems.

6. Conclusions

The proposed hardware–software system enabled the evaluation of slow pyrolysis kinetics of three residual biomasses through a two-step kinetic model optimized with three algorithms. The average results showed that the N-M method achieved the highest accuracy (100% fit in estimating solid yield) with a convergence time of 4.282 min, while GA converged faster (1.675 min) with a fit of 99.972%, and PSO had the slowest convergence time at 6.409 min and a fit of 99.943%. Confirming the effectiveness of hybrid deterministic–evolutionary approaches for kinetic parameter prediction. Wheat straw exhibited the highest biochar yield, highlighting its potential role in carbon sequestration and soil enhancement. The hardware–software system is capable of accurately predicting biochar yield for different biomasses, with wheat straw (WS) being the material with the highest solid yield (45.0% at 325 °C), followed by biosolids (42.9% at 500 °C) and pruning waste (33.1% at 500 °C). This difference in yields is related to the distinctive structural composition of each biomass.
Beyond accurate parameter fitting, the system establishes an optimization and computational intelligence tools-driven methodological framework that integrates optimization algorithms into an automated and reproducible platform for thermochemical characterization. This approach provides not only precise process control but also adaptability to diverse biomasses and operating conditions, ensuring robust and scalable applications in energy systems. By leveraging optimization and computational intelligence tools, the system contributes to the resilience of energy infrastructures, offering digital tools that can support decision-making in the valorization of biomass waste under varying environmental conditions.
Key advantages include reconfigurability, low computational cost, and scalability, while limitations involve the need for broader validation across heterogeneous biomasses and composition variability.
Although this work successfully demonstrated the effectiveness of a hardware–software system coupled with optimization algorithms to characterize the performance of biochar in the slow pyrolysis of various biomasses, true predictive capability and physical relevance require external validation with temperatures withheld from the parameter estimation process. Therefore, future experiments will include independent validation points to forecast solid yield under out-of-calibration temperature data, thereby verifying predictive performance and enhancing parameter reliability under extended operating conditions.

Author Contributions

I.U.-S. conducted the investigation and formal analysis, D.G.-L. and M.V.-R. established the methodology for the analysis, optimization, and prediction; J.P.A.-S. contributed to writing the first draft of the paper; I.U.-S., D.A.R.-A. and M.V.-R. established the methodology for the analysis of the integrated system, supervised the project, and wrote the final version of the paper. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in the study are included in the article; further inquiries can be directed to the corresponding author.

Acknowledgments

I. Urbina-Salas, D. A. Rodriguez-Alejandro, D. Granados-Lieberman, M. Valtierra-Rodriguez, and J. P. Amézquita-Sánchez gratefully acknowledge the financial support of the Secretariat of Science, Humanities, Technology and Innovation (SECIHTI), Mexico, under its SNII program. I. Urbina-Salas also acknowledges the financial support of SECIHTI, under its national scholarship program under Grant No. 843043 (CVU-331945).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Misbahuddin, M.; Cokrowati, N.; Iqbal, M.S.; Farobie, O.; Amrullah, A.; Ernawati, L. Kalman Filter-Enhanced Data Aggregation in LoRaWAN-Based IoT Framework for Aquaculture Monitoring in Sargassum sp. Cultivation. Computers 2025, 14, 151. [Google Scholar] [CrossRef]
  2. Vance, J.; Rasheed, K.; Missaoui, A.; Maier, F.W. Data Synthesis for Alfalfa Biomass Yield Estimation. AI 2022, 4, 1–15. [Google Scholar] [CrossRef]
  3. Whitmire, C.D.; Vance, J.M.; Rasheed, H.K.; Missaoui, A.; Rasheed, K.M.; Maier, F.W. Using machine learning and feature selection for alfalfa yield prediction. AI 2021, 2, 71–88. [Google Scholar] [CrossRef]
  4. Rathnayake, N.; Patel, S.; Hakeem, I.G.; Veluswamy, G.; Al-Waili, I.; Agnihotri, S.; Shah, K. The pyrolysis of biosolids in a novel closed coupled pyrolysis and gasification technology: Pilot plant trials, Aspen plus modelling, and a techno-economic analysis. Water 2024, 16, 3399. [Google Scholar] [CrossRef]
  5. Navarrete, C.G.; Galione, K.P.; Curto, R.P. Two-Stage Global Biomass Pyrolysis Model for Combustion Applications: Predicting Product Composition with a Focus on Kinetics, Energy, and Mass Balances Consistency. Energies 2024, 17, 4982. [Google Scholar] [CrossRef]
  6. Lau, H.C.; Tsai, S.C. Net zero by 2050: A tale of three economies. Energy Fuels 2024, 38, 21079–21094. [Google Scholar] [CrossRef]
  7. Li, C.; Hayashi, J.I.; Sun, Y.; Zhang, L.; Zhang, S.; Wang, S.; Hu, X. Impact of heating rates on the evolution of function groups of the biochar from lignin pyrolysis. J. Anal. Appl. Pyrolysis 2021, 155, 105031. [Google Scholar] [CrossRef]
  8. Silveira, E.A.; Luz, S.; Candelier, K.; Macedo, L.A.; Rousset, P. An assessment of biomass torrefaction severity indexes. Fuel 2021, 288, 119631. [Google Scholar] [CrossRef]
  9. Thengane, S.K.; Kung, K.S.; Gomez, B.A.; Ghoniem, A.F. Advances in biomass torrefaction: Parameters, models, reactors, applications, deployment, and market. Prog. Energy Combust. Sci. 2022, 93, 101040. [Google Scholar] [CrossRef]
  10. Ayaz, M.; Feizienė, D.; Tilvikienė, V.; Akhtar, K.; Stulpinaitė, U.; Iqbal, R. Biochar role in the sustainability of agriculture and environment. Sustainability 2021, 13, 1330. [Google Scholar] [CrossRef]
  11. Muravyev, N.V.; Vyazovkin, S. The status of pyrolysis kinetics studies by thermal analysis: Quality is not as good as it should and can readily be. Thermo 2022, 2, 435–452. [Google Scholar] [CrossRef]
  12. Santos, D.C.; Evaristo, R.B.; Dutra, R.C.; Suarez, P.A.; Silveira, E.A.; Ghesti, G.F. Advancing biochar applications: A review of production processes, analytical methods, decision criteria, and pathways for scalability and certification. Sustainability 2025, 17, 2685. [Google Scholar] [CrossRef]
  13. Khairy, M.; Amer, M.; Ibrahim, M.; Ookawara, S.; Sekiguchi, H.; Elwardany, A. The influence of torrefaction on the biochar characteristics produced from sesame stalks and bean husk. Biomass Convers. Biorefinery 2024, 14, 17127–17148. [Google Scholar] [CrossRef]
  14. Talwar, P.; Agudelo, M.A.; Nanda, S. Pyrolysis Process, Reactors, Products, and Applications: A Review. Energies 2025, 18, 2979. [Google Scholar] [CrossRef]
  15. Babu, K.K.B.S.; Nataraj, M.; Tayappa, M.; Vyas, Y.; Mishra, R.K.; Acharya, B. Production of biochar from waste biomass using slow pyrolysis: Studies of the effect of pyrolysis temperature and holding time on biochar yield and properties. Mater. Sci. Energy Technol. 2024, 7, 318–334. [Google Scholar] [CrossRef]
  16. Adelawon, B.O.; Latinwo, G.K.; Eboibi, B.E.; Agbede, O.O.; Agarry, S.E. Comparison of the slow, fast, and flash pyrolysis of recycled maize-cob biomass waste, box-benhken process optimization and characterization studies for the thermal fast pyrolysis production of bio-energy. Chem. Eng. Commun. 2022, 209, 1246–1276. [Google Scholar] [CrossRef]
  17. Abdullah, N.; Taib, R.M.; Aziz, N.S.M.; Omar, M.R.; Disa, N.M. Banana pseudo-stem biochar derived from slow and fast pyrolysis process. Heliyon 2023, 9, e12940. [Google Scholar] [CrossRef] [PubMed]
  18. Wang, P.; Wang, S.; Chen, F.; Zhang, T.; Kong, W. Preparation of two types plant biochars and application in soil quality improvement. Sci. Total Environ. 2024, 906, 167334. [Google Scholar] [CrossRef]
  19. Zhang, K.; Khan, Z.; Khan, M.N.; Luo, T.; Luo, L.; Bi, J.; Hu, L. The application of biochar improves the nutrient supply efficiency of organic fertilizer, sustains soil quality and promotes sustainable crop production. Food Energy Secur. 2024, 13, e520. [Google Scholar] [CrossRef]
  20. Wang, S.; Dai, G.; Yang, H.; Luo, Z. Lignocellulosic biomass pyrolysis mechanism: A state-of-the-art review. Prog. Energy Combust. Sci. 2017, 62, 33–86. [Google Scholar] [CrossRef]
  21. Deng, L.; Ngo, H.H.; Guo, W.; Chang, S.W.; Nguyen, D.D.; Pandey, A.; Hoang, N.B. Recent advances in circular bioeconomy based clean technologies for sustainable environment. J. Water Process Eng. 2022, 46, 102534. [Google Scholar] [CrossRef]
  22. Skrzyniarz, M.; Sajdak, M.; Biniek-Poskart, A.; Skibiński, A.; Krakowiak, M.; Piotrowski, A.; Zajemska, M. Methods and validation techniques of chemical kinetics models in waste thermal conversion processes. Energies 2024, 17, 3067. [Google Scholar] [CrossRef]
  23. Piazza, V.; da Silva Junior, R.B.; Frassoldati, A.; Lietti, L.; Chiaberge, S.; Gambaro, C.; Beretta, A. Detailed speciation of biomass pyrolysis products with a novel TGA-based methodology: The case-study of cellulose. J. Anal. Appl. Pyrolysis 2024, 178, 106413. [Google Scholar] [CrossRef]
  24. Suratman, A.; Astuti, D.N.; Kusumastuti, P.P.; Sudiono, S.; Wijaya, H.W.; Wibowo, A.H. Comprehensive study of thermochemical conversion of biomass okara into biochar. J. Anal. Appl. Pyrolysis 2024, 181, 106594. [Google Scholar] [CrossRef]
  25. El-Sayed, S.A.; Khass, T.M.; Mostafa, M.E. Thermal degradation behaviour and chemical kinetic characteristics of biomass pyrolysis using TG/DTG/DTA techniques. Biomass Convers. Biorefinery 2024, 14, 17779–17803. [Google Scholar] [CrossRef]
  26. Volli, V.; Gollakota, A.R.K.; Shu, C.M. Comparative studies on thermochemical behavior and kinetics of lignocellulosic biomass residues using TG-FTIR and Py-GC/MS. Sci. Total Environ. 2021, 792, 148392. [Google Scholar] [CrossRef] [PubMed]
  27. Călin, C.; Sîrbu, E.E.; Tănase, M.; Győrgy, R.; Popovici, D.R.; Banu, I. A thermogravimetric analysis of biomass conversion to biochar: Experimental and kinetic modeling. Appl. Sci. 2024, 14, 9856. [Google Scholar] [CrossRef]
  28. Fischer, O.; Lemaire, R.; Bensakhria, A. Thermogravimetric analysis and kinetic modeling of the pyrolysis of different biomass types by means of model-fitting, model-free and network modeling approaches. J. Therm. Anal. Calorim. 2024, 149, 10941–10963. [Google Scholar] [CrossRef]
  29. Liu, J.; Guo, X. ReaxFF molecular dynamics simulation of pyrolysis and combustion of pyridine. Fuel Process. Technol. 2017, 161, 107–115. [Google Scholar] [CrossRef]
  30. Di Blasi, C.; Lanzetta, M. Intrinsic kinetics of isothermal xylan degradation in inert atmosphere. J. Anal. Appl. Pyrolysis 1997, 40, 287–303. [Google Scholar] [CrossRef]
  31. Wibowo, W.A.; Waluyo, J.; Cahyono, R.B.; Rochmadi, R.; Budiman, A. Modified Koufopanos’ Mechanism in the Kinetics of In-Situ Catalytic Pyrolysis of Co-Pelletized Rice Husks and Ash. Period. Polytech. Chem. Eng. 2024, 68, 491–506. [Google Scholar] [CrossRef]
  32. Horsfall, I.T.; Ndukwu, M.C.; Abam, F.I.; Olatunji, O.M.; Ojong, O.E.; Osa-Aria, K. Validation of MATLAB algorithm to implement a two-step parallel pyrolysis model for the prediction of maximum% char yield. Discov. Chem. Eng. 2021, 1, 3. [Google Scholar] [CrossRef]
  33. Silveira, E.A.; Lamas, G.C.; Rodrigues, P.P.D.O.; Souto, N.P.; Chaves, B.S.A.; Galvao, L.G.O.; de Paula Protásio, T. Effect of torrefaction severity on the energy recovery from amazonian wood residues for decentralized energy conversion systems. Biomass Bioenergy 2025, 193, 107515. [Google Scholar] [CrossRef]
  34. Barbosa, T.; Chaves, B.S.A.; Galvão, L.G.O.; Lamas, G.C.; de Oliveira, R.P.P.; Moreira, M.G.; Silveira, E.A. Waste-to-energy in the civil-construction sector toward the valuation of wood construction residues: Integration of torrefaction process. Fuel 2024, 371, 132029. [Google Scholar] [CrossRef]
  35. Rodríguez, D.A.; Nam, H.; Granados, D.; Wang, S.; Hwang, S.C.; Nam, H.; Capareda, S.C. Experimental and numerical investigation on a solar-driven torrefaction reactor using woody waste (Ashe Juniper). Energy Convers. Manag. 2023, 288, 117114. [Google Scholar] [CrossRef]
  36. Silveira, E.A.; Luz, S.M.; Leão, R.M.; Rousset, P.; Caldeira, A. Numerical modeling and experimental assessment of sustainable woody biomass torrefaction via coupled TG-FTIR. Biomass Bioenergy 2021, 146, 105981. [Google Scholar] [CrossRef]
  37. Lin, B.J.; Silveira, E.A.; Colin, B.; Chen, W.H.; Lin, Y.Y.; Leconte, F.; Petrissans, M. Modeling and prediction of devolatilization and elemental composition of wood during mild pyrolysis in a pilot-scale reactor. Ind. Crops Prod. 2019, 131, 357–370. [Google Scholar] [CrossRef]
  38. Silveira, E.A.; Lin, B.J.; Colin, B.; Chaouch, M.; Pétrissans, A.; Rousset, P.; Pétrissans, M. Heat treatment kinetics using three-stage approach for sustainable wood material production. Ind. Crops Prod. 2018, 124, 563–571. [Google Scholar] [CrossRef]
  39. Shang, L.; Ahrenfeldt, J.; Holm, J.K.; Barsberg, S.; Zhang, R.Z.; Luo, Y.H.; Henriksen, U.B. Intrinsic kinetics and devolatilization of wheat straw during torrefaction. J. Anal. Appl. Pyrolysis 2013, 100, 145–152. [Google Scholar] [CrossRef]
  40. Urbina, I.; Granados, D.; Valtierra, M.; Ramírez, C.A.; Rodríguez, D.A. Modeling of Global and Individual Kinetic Parameters in Wheat Straw Torrefaction: Particle Swarm Optimization and Its Impact on Elemental Composition Prediction. Algorithms 2025, 18, 283. [Google Scholar] [CrossRef]
  41. Chen, W.H.; Eng, C.F.; Lin, Y.Y.; Bach, Q.V.; Ashokkumar, V.; Show, P.L. Two-step thermodegradation kinetics of cellulose, hemicelluloses, and lignin under isothermal torrefaction analyzed by particle swarm optimization. Energy Convers. Manag. 2021, 238, 114116. [Google Scholar] [CrossRef]
  42. Yen, S.W.; Chen, W.H.; Chang, J.S.; Eng, C.F.; Raza Naqvi, S.; Show, P.L. Torrefaction thermogravimetric analysis and kinetics of sorghum distilled residue for sustainable fuel production. Sustainability 2021, 13, 4246. [Google Scholar] [CrossRef]
  43. de Oliveira, P.P.; Lamas, G.C.; Ghesti, G.F.; Macedo, L.A.; Luz, S.M.; Alves, J.L.F.; Silveira, E.A. Effect of extractive removal and heating rates on pequi seed torrefaction: A detailed kinetic and predictive study for biofuel production. Energy 2025, 321, 135521. [Google Scholar] [CrossRef]
  44. Bach, Q.V.; Chen, W.H.; Chu, Y.S.; Skreiberg, Ø. Predictions of biochar yield and elemental composition during torrefaction of forest residues. Bioresour. Technol. 2016, 215, 239–246. [Google Scholar] [CrossRef] [PubMed]
  45. Gul, S.; Ramzan, N.; Hanif, M.A.; Bano, S. Kinetic, volatile release modeling and optimization of torrefaction. J. Anal. Appl. Pyrolysis 2017, 128, 44–53. [Google Scholar] [CrossRef]
  46. Moraes, T.A.; da Silva, M.T.; Euzébio, T.A. Delay Compensation in a Feeder–Conveyor System Using the Smith Predictor: A Case Study in an Iron Ore Processing Plant. Sensors 2024, 24, 3870. [Google Scholar] [CrossRef]
  47. Mejía, C.; Salazar, E.; Camacho, O. A comparative experimental evaluation of various Smith predictor approaches for a thermal process with large dead time. Alex. Eng. J. 2022, 61, 9377–9394. [Google Scholar] [CrossRef]
  48. Feliu, V.; Rivas, R. Control of the temperature in a petroleum refinery heating furnace based on a robust modified Smith predictor. ISA Trans. 2021, 112, 251–270. [Google Scholar] [CrossRef] [PubMed]
  49. SIAP. Avance de Siembras y Cosechas por Estado y Ciclo, Serv. Inf. Agroaliment. y Pesq. Ciudad México, México. 2024. Available online: https://www.gob.mx/siap (accessed on 2 March 2025).
  50. CONAGUA. Comisión Nacional del Agua: Ciudad de México, México. 2023. Available online: https://www.gob.mx/conagua (accessed on 2 March 2025).
  51. SEMARNAT. NOM-004-SEMARNAT-2002. Límite Máximo Permisible de Contaminantes en Los Biosólidos y Especificaciones para su Manejo y Disposición Final. D. Of. la Fed. 2003. Available online: https://www.dof.gob.mx/nota_detalle.php?codigo=695604 (accessed on 2 March 2025).
  52. Li, B.; Guo, Y.; Liang, F.; Liu, W.; Wang, Y.; Cao, W.; Guo, J. Global integrative meta-analysis of the responses in soil organic carbon stock to biochar amendment. J. Environ. Manag. 2024, 351, 119745. [Google Scholar] [CrossRef]
  53. Sun, Z.; Hu, Y.; Shi, L.; Li, G.; Pang, Z.H.E.; Liu, S.; Jia, B. Effects of biochar on soil chemical properties: A global meta-analysis of agricultural soil. Plant Soil Environ. 2022, 68, 272–289. [Google Scholar] [CrossRef]
  54. Khan, Y.A.; Kateb, F.; Rehman, A.U.; Khan, A.S.; Khan, F.Q.; Jan, S.; Alkhathlan, A.N. Enhancing Smart Home Efficiency with Heuristic-Based Energy Optimization. Computers 2025, 14, 149. [Google Scholar] [CrossRef]
  55. SMAOT. Informe de Avances en la Estrategia de Economía Circular del Estado de Guanajuato; Secretaría de Medio Ambiente y Ordenamiento Territorial: Guanajuato, México, 2023; Available online: https://smaot.guanajuato.gob.mx (accessed on 13 April 2025).
  56. SENER. Programa Nacional para el Aprovechamiento Sustentable de la Bioenergía; Secretaría de Energía: Ciudad de México, México, 2021; Available online: https://www.gob.mx/sener/articulos/proyecto-de-evaluacion-del-programa-nacional-para-el-aprovechamiento-sustentable-de-la-energia-2021-2024-370969 (accessed on 13 April 2025).
  57. Korupu, V.L.; Muthukumarasamy, M. A comparative study of various Smith predictor configurations for industrial delay processes. Chem. Prod. Process Model. 2022, 17, 701–732. [Google Scholar] [CrossRef]
  58. Mezura, E.; Coello, C.A.C. Constraint-handling in nature-inspired numerical optimization: Past, present and future. Swarm Evol. Comput. 2011, 1, 173–194. [Google Scholar] [CrossRef]
  59. Holland, J.H. Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence; MIT Press: Cambridge, MA, USA, 1992. [Google Scholar]
  60. Nelder, J.A.; Mead, R. A simplex method for function minimization. Comput. J. 1965, 7, 308–313. [Google Scholar] [CrossRef]
  61. Lagarias, J.C.; Reeds, J.A.; Wright, M.H.; Wright, P.E. Convergence properties of the Nelder--Mead simplex method in low dimensions. SIAM J. Optim. 1998, 9, 112–147. [Google Scholar] [CrossRef]
  62. Type-K Thermocouple. Available online: https://www.tc-inc.com/thermocouples/thermocouple_pot_seal.html (accessed on 6 May 2025).
  63. MAX6675. Available online: https://www.analog.com/en/products/max6675.html (accessed on 6 May 2025).
  64. Arduino UNO Board. Available online: https://store.arduino.cc/products/arduino-uno-rev3?srsltid=AfmBOoo7nAXHL0zC-snKQd0wCNXdRgoQh5-4cDSXIej-CYC_L1AaLja6 (accessed on 6 May 2025).
  65. AUTONICS SPC1-50. Available online: https://www.autonics.com/mx/model/SPC1-50 (accessed on 1 September 2025).
  66. Scale Rhino Baco 30. Available online: https://www.rhino.mx/producto/bascula-electronica-contadora-30-kg/ (accessed on 6 May 2025).
  67. SEMARNAT. Diagnóstico Básico para la Gestión Integral de Residuos. Gob. México. 2023. Available online: https://www.gob.mx/inecc/acciones-y-programas/diagnostico-basico-para-la-gestion-integral-de-los-residuos-2020 (accessed on 8 May 2025).
  68. Mian, R.U.H.; Shintani, M.; Inoue, M. Hardware–software co-design for decimal multiplication. Computers 2021, 10, 17. [Google Scholar] [CrossRef]
  69. Saleh, K.; Darweesh, D.; Darwish, O.; Hammad, E.; Amsaad, F. Hardware and Software Methods for Secure Obfuscation and Deobfuscation: An In-Depth Analysis. Computers 2025, 14, 251. [Google Scholar] [CrossRef]
Figure 1. A map of Mexico highlighting Guanajuato state as a producer of wheat (WS), pruning (PW), and biosolids (BS).
Figure 1. A map of Mexico highlighting Guanajuato state as a producer of wheat (WS), pruning (PW), and biosolids (BS).
Computers 14 00426 g001
Figure 2. Structure of Smith Predictor, the dotted line represents the controller C(s), and the section with a yellow background is the predictor structure.
Figure 2. Structure of Smith Predictor, the dotted line represents the controller C(s), and the section with a yellow background is the predictor structure.
Computers 14 00426 g002
Figure 3. Flowcharts for the optimization algorithms: (a) PSO, (b) GA, and (c) N-M.
Figure 3. Flowcharts for the optimization algorithms: (a) PSO, (b) GA, and (c) N-M.
Computers 14 00426 g003
Figure 4. Block diagram of the proposed methodology: (a) Hardware and (b) Software system.
Figure 4. Block diagram of the proposed methodology: (a) Hardware and (b) Software system.
Computers 14 00426 g004
Figure 5. Software system flowchart: (a) Pyrolyzer control process, (b) optimization algorithm process, and (c) Temperature profiles.
Figure 5. Software system flowchart: (a) Pyrolyzer control process, (b) optimization algorithm process, and (c) Temperature profiles.
Computers 14 00426 g005
Figure 6. Process selector interface.
Figure 6. Process selector interface.
Computers 14 00426 g006
Figure 7. Graphical User Interface for the Pyrolyzer Control Process (a: temperature profiles; b: temperature graph; c: weight loss graph; d: current temperature monitoring display; e: STOP button; f: temperature profile Preview button; g: Process Start button; h: button to Save Data; i: Exit button).
Figure 7. Graphical User Interface for the Pyrolyzer Control Process (a: temperature profiles; b: temperature graph; c: weight loss graph; d: current temperature monitoring display; e: STOP button; f: temperature profile Preview button; g: Process Start button; h: button to Save Data; i: Exit button).
Computers 14 00426 g007
Figure 8. Graphical User Interface for the Optimization Algorithms Process (a: data of temperature profiles; b: solid yield data; c: instantaneous solid yield time data; d: biomass type; e: temperature profile graphs; f: solid yield data graphs; g: a button to generate experimental graphs; h: graphs by PSO; i: Arrhenius curves by PSO; j: values of kinetic parameters obtained by PSO; k: graphs by GA; l: graphs of the model and experimental data obtained by GA; m: values of kinetic parameters obtained by GA; n: graphs by N-M; o: Arrhenius curves by N-M; p: values of kinetic parameters obtained by N-M; q: RUN algorithms button; r: Clear Plots and Data button; s: Save Data button; t: Exit button).
Figure 8. Graphical User Interface for the Optimization Algorithms Process (a: data of temperature profiles; b: solid yield data; c: instantaneous solid yield time data; d: biomass type; e: temperature profile graphs; f: solid yield data graphs; g: a button to generate experimental graphs; h: graphs by PSO; i: Arrhenius curves by PSO; j: values of kinetic parameters obtained by PSO; k: graphs by GA; l: graphs of the model and experimental data obtained by GA; m: values of kinetic parameters obtained by GA; n: graphs by N-M; o: Arrhenius curves by N-M; p: values of kinetic parameters obtained by N-M; q: RUN algorithms button; r: Clear Plots and Data button; s: Save Data button; t: Exit button).
Computers 14 00426 g008
Figure 9. Experimental setup: (a) Hardware–software system, and (b) a schematic of the reaction system (A: hardware−software system; B: instrumentation interfaces; C: scale; D: thermocouple; E: clamp resistor; F: reactor; G: exhaust gas pipe; H: condenser; I: tars; J: thermal insulator; K: biomass; N2 tank).
Figure 9. Experimental setup: (a) Hardware–software system, and (b) a schematic of the reaction system (A: hardware−software system; B: instrumentation interfaces; C: scale; D: thermocouple; E: clamp resistor; F: reactor; G: exhaust gas pipe; H: condenser; I: tars; J: thermal insulator; K: biomass; N2 tank).
Computers 14 00426 g009
Figure 10. Evolution of biomasses at different temperatures of slow pyrolysis: (a) wheat straw (WS), (b) pruning waste (PW), and (c) biosolids (BS).
Figure 10. Evolution of biomasses at different temperatures of slow pyrolysis: (a) wheat straw (WS), (b) pruning waste (PW), and (c) biosolids (BS).
Computers 14 00426 g010
Figure 11. The two-step kinetic model fits the experimental solid yield of Wheat Straw (WS) using (a) PSO ((i) experimental data and prediction curves; (ii) Arrhenius curves), (b) GA ((i) experimental data and prediction curves; (ii) Arrhenius curves), and (c) N-M algorithms ((i) experimental data and prediction curves; (ii) Arrhenius curves).
Figure 11. The two-step kinetic model fits the experimental solid yield of Wheat Straw (WS) using (a) PSO ((i) experimental data and prediction curves; (ii) Arrhenius curves), (b) GA ((i) experimental data and prediction curves; (ii) Arrhenius curves), and (c) N-M algorithms ((i) experimental data and prediction curves; (ii) Arrhenius curves).
Computers 14 00426 g011
Figure 12. Correlation between experimental and predicted biochar yields for wheat straw (WS) using different algorithms: (a) PSO, (b) GA, and (c) N-M.
Figure 12. Correlation between experimental and predicted biochar yields for wheat straw (WS) using different algorithms: (a) PSO, (b) GA, and (c) N-M.
Computers 14 00426 g012
Figure 13. The two-step kinetic model fits the experimental solid yield of Pruning Waste (PW) using (a) PSO ((i) experimental data and prediction curves; (ii) Arrhenius curves), (b) GA ((i) experimental data and prediction curves; (ii) Arrhenius curves), and (c) N-M algorithms ((i) experimental data and prediction curves; (ii) Arrhenius curves).
Figure 13. The two-step kinetic model fits the experimental solid yield of Pruning Waste (PW) using (a) PSO ((i) experimental data and prediction curves; (ii) Arrhenius curves), (b) GA ((i) experimental data and prediction curves; (ii) Arrhenius curves), and (c) N-M algorithms ((i) experimental data and prediction curves; (ii) Arrhenius curves).
Computers 14 00426 g013
Figure 14. Correlation between experimental and predicted biochar yields for pruning waste (PW) using different algorithms: (a) PSO, (b) GA, and (c) N-M.
Figure 14. Correlation between experimental and predicted biochar yields for pruning waste (PW) using different algorithms: (a) PSO, (b) GA, and (c) N-M.
Computers 14 00426 g014
Figure 15. The two-step kinetic model fits the experimental solid yield of biosolids (BS) using (a) PSO ((i) experimental data and prediction curves; (ii) Arrhenius curves), (b) GA ((i) experimental data and prediction curves; (ii) Arrhenius curves), and (c) N-M algorithms ((i) experimental data and prediction curves; (ii) Arrhenius curves).
Figure 15. The two-step kinetic model fits the experimental solid yield of biosolids (BS) using (a) PSO ((i) experimental data and prediction curves; (ii) Arrhenius curves), (b) GA ((i) experimental data and prediction curves; (ii) Arrhenius curves), and (c) N-M algorithms ((i) experimental data and prediction curves; (ii) Arrhenius curves).
Computers 14 00426 g015
Figure 16. Correlation between experimental and predicted biochar yields for biosolids (BS) using different algorithms: (a) PSO, (b) GA, and (c) N-M.
Figure 16. Correlation between experimental and predicted biochar yields for biosolids (BS) using different algorithms: (a) PSO, (b) GA, and (c) N-M.
Computers 14 00426 g016
Figure 17. Comparative bar charts of biomasses and optimization algorithms: (a) fit percentages, (b) R2 values, and (c) Processing times (tp).
Figure 17. Comparative bar charts of biomasses and optimization algorithms: (a) fit percentages, (b) R2 values, and (c) Processing times (tp).
Computers 14 00426 g017
Table 1. Summary of studies on two-step kinetic model fitting with optimization algorithms for solid yield prediction.
Table 1. Summary of studies on two-step kinetic model fitting with optimization algorithms for solid yield prediction.
BiomassTemperature Profiles Optimization AlgorithmFit (%)Ref.
Temperature
(°C)
Heating Rate (°C/min)Residence
Time (min)
Wood Waste225–375 5, 10, 20, 30, and 4060N-M0.9996[33]
Wood Waste200–300 20600.99[34]
Ashe Juniper210–380 6 and 7160>0.98[35]
Eucalyptus Grandis210–290580--[36]
Poplar and Fir200–230 0.217400.9997[37]
Poplar and Xylan200–2401600>0.97[38]
Wheat Straw250–30010 and 50100--[39]
Wheat Straw250–32520100PSO>0.98[40]
Xylan200–30020120>0.98[41]
Sorghum residue200–3002060>0.8469[42]
Pequi Seed (PS) and oil-PS 200–3007–1580L-M0.97[43]
Spruce and Birch220–300--120SSE>0.971[44]
Beech, Pine, Wheat, and
Willow
200–300--100LSR--[45]
Table 2. Characteristics of the feedstocks.
Table 2. Characteristics of the feedstocks.
Biomass
Characteristics
WSPWBSMethod
Proximate analysis (wt.%) (dry basis)
VCM 76.51 ± 0.25685.75 ± 0.20063.16 ± 0.332ASTM E871-82
Ash 3.52 ± 0.3515.15 ± 0.10027.70 ± 0.235E1775
FC 19.97 ± 1.6709.06 ± 0.1599.14 ± 0.398E871-82
Ultimate Analysis (wt.%)
C 46.20542.16734.178Thermo Scientific iCAP 74000 ICP-OES analyzer, CA-USA
H 6.2755.2754.966
N 3.6122.1796.304
S 0.0000.0000.452
O* 43.90850.37954.100
O:C0.7140.8961.187
H:C1.6291.5011.743
Table 3. Experimental design based on 50 g of initial weight for each biomass: wheat straw (WS), pruning waste (PW), and biosolids (BS).
Table 3. Experimental design based on 50 g of initial weight for each biomass: wheat straw (WS), pruning waste (PW), and biosolids (BS).
BiomassHeating Rate (°C/min)Residence Time
(min)
Set of Temperatures
(°C)
Solid Yield
(%), Equation (3)
Instantaneous Solid Yield Time (min)Heat Treatment
WS201202501, 0.834, 0.746, and 0.6381, 33, 53, and 83Torrefaction and Slow Pyrolysis
2751, 0.748, 0.645, and 0.5431, 40, 60, and 80
3001, 0.604, 0.504, and 0.4691, 48, 68, and 88
3251, 0.478, 0.471, and 0.4501, 57, 77, and 97
PW3001, 0.614, 0.552, and 0.5521, 51, 76, and 101Slow Pyrolysis
4001, 0.436, 0.413, and 0.4081, 51, 76, and 101
5001, 0.384, 0.368, and 0.3311, 51, 76, and 101
BS3001, 0.958, 0.719, 0.645, and 0.620 1, 26, 51, 76, and 101Slow Pyrolysis
4001, 0.810, 0.551, 0.530, and 0.5111, 26, 51, 76, and 101
5001, 0.782, 0.437, 0.431, and 0.4291, 26, 51, 76, and 101
Table 4. Arrhenius kinetic parameters of wheat straw obtained using PSO, GA, and N-M algorithms, along with fitting accuracy and processing times.
Table 4. Arrhenius kinetic parameters of wheat straw obtained using PSO, GA, and N-M algorithms, along with fitting accuracy and processing times.
AlgorithmsTemperatures
(°C)
Arrhenius
Constants (s−1)
Arrhenius ParametersFit (%)Processing Time (min)
A0 (s−1)Ea (J·mol−1)
PSO250, 275,
300, and 325
k11.141 × 10111.310 × 10599.9996.280
kV19.789 × 1058.087 × 104
k29.724 × 1069.762 × 104
kV26.763 × 1058.557 × 104
GAk15.321 × 1011.994 × 10499.9961.870
kV12.455 × 1023.764 × 104
k21.852 × 1035.453 × 104
kV22.307 × 1035.492 × 104
N-Mk16.090 × 1081.080 × 105100.0004.053
kV13.660 × 1035.710 × 104
k27.450 × 1036.280 × 104
kV22.980 × 1035.900 × 104
Table 5. Arrhenius kinetic parameters of Pruning Waste obtained using PSO, GA, and N-M algorithms, along with fitting accuracy and processing times.
Table 5. Arrhenius kinetic parameters of Pruning Waste obtained using PSO, GA, and N-M algorithms, along with fitting accuracy and processing times.
AlgorithmsTemperatures
(°C)
Arrhenius
Constants (s−1)
Arrhenius ParametersFit (%)Processing Time (min)
A0 (s−1)Ea (J·mol−1)
PSO300, 400,
and 500
k14.280 × 1013.290 × 10499.8306.426
kV17.990 × 1026.020 × 104
k24.000 × 10−11.170 × 104
kV27.380 × 1002.670 × 104
GAk11.861 × 1035.526 × 10499.9991.805
kV18.839 × 1047.408 × 104
k21.090 × 1051.454 × 105
kV23.546 × 1051.214 × 105
N-Mk13.438 × 1035.630 × 104100.0002.345
kV11.810 × 1057.597 × 104
k25.062 × 1051.058 × 105
kV28.553 × 1041.021 × 105
Table 6. Arrhenius kinetic parameters of Biosolids obtained using PSO, GA, and N-M algorithms, along with fitting accuracy and processing times.
Table 6. Arrhenius kinetic parameters of Biosolids obtained using PSO, GA, and N-M algorithms, along with fitting accuracy and processing times.
AlgorithmsTemperatures
(°C)
Arrhenius
Constants (s−1)
Arrhenius ParametersFit (%)Processing Time (min)
A0 (s−1)Ea (J·mol−1)
PSO300, 400,
and 500
k12.865 × 1025.017 × 104100.0006.520
kV13.637 × 1002.968 × 104
k27.620 × 10−11.857 × 100
kV28.298 × 1024.584 × 104
GAk16.721 × 1013.566 × 10499.9211.351
kV14.174 × 1013.760 × 104
k25.273 × 10−11.675 × 104
kV28.609 × 1003.737 × 104
N-Mk14.145 × 1035.677 × 104100.0006.449
kV12.471 × 1035.707 × 104
k24.501 × 1024.967 × 104
kV28.244 × 1048.648 × 104
Table 7. Experimental and predicted biochar yields at the maximum slow pyrolysis temperature.
Table 7. Experimental and predicted biochar yields at the maximum slow pyrolysis temperature.
BiomassTmax (°C)Final Solid Yields (%)
Exp.Algorithms/Predictions
PSOGAN-M
WS3250.4500.4490.4490.455
PW5000.3310.3350.3320.332
BS5000.4290.4290.4310.429
Table 8. Performance hierarchy for R2, fit, and processing time (tp) for different biomasses and optimization algorithms.
Table 8. Performance hierarchy for R2, fit, and processing time (tp) for different biomasses and optimization algorithms.
BiomassStandard MetricsAlgorithmsPerformance
Hierarchy
PSOGAN-M
WSR20.9900.9940.996N-M > GA > PSO
fit (%)99.99999.996100N-M > PSO > GA
tp (min)6.2801.8704.053GA < N-M < PSO
PWR20.9860.9940.998N-M > GA > PSO
fit (%)99.83099.999100N-M > GA > PSO
tp (min)6.4261.8052.435GA < N-M < PSO
R20.9800.9550.860PSO > GA > N-M
BSfit (%)10099.921100PSO = N-M > GA
tp (min)6.5201.3516.449GA < N-M < PSO
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Urbina-Salas, I.; Granados-Lieberman, D.; Amezquita-Sanchez, J.P.; Valtierra-Rodriguez, M.; Rodriguez-Alejandro, D.A. Hardware–Software System for Biomass Slow Pyrolysis: Characterization of Solid Yield via Optimization Algorithms. Computers 2025, 14, 426. https://doi.org/10.3390/computers14100426

AMA Style

Urbina-Salas I, Granados-Lieberman D, Amezquita-Sanchez JP, Valtierra-Rodriguez M, Rodriguez-Alejandro DA. Hardware–Software System for Biomass Slow Pyrolysis: Characterization of Solid Yield via Optimization Algorithms. Computers. 2025; 14(10):426. https://doi.org/10.3390/computers14100426

Chicago/Turabian Style

Urbina-Salas, Ismael, David Granados-Lieberman, Juan Pablo Amezquita-Sanchez, Martin Valtierra-Rodriguez, and David Aaron Rodriguez-Alejandro. 2025. "Hardware–Software System for Biomass Slow Pyrolysis: Characterization of Solid Yield via Optimization Algorithms" Computers 14, no. 10: 426. https://doi.org/10.3390/computers14100426

APA Style

Urbina-Salas, I., Granados-Lieberman, D., Amezquita-Sanchez, J. P., Valtierra-Rodriguez, M., & Rodriguez-Alejandro, D. A. (2025). Hardware–Software System for Biomass Slow Pyrolysis: Characterization of Solid Yield via Optimization Algorithms. Computers, 14(10), 426. https://doi.org/10.3390/computers14100426

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop