Machine Learning-Based Indoor Relative Humidity and CO2 Identification Using a Piecewise Autoregressive Exogenous Model: A Cob Prototype Study

: The population of developed nations spends a significant amount of time indoors, and the implications of poor indoor air quality (IAQ) on human health are substantial. Many premature deaths attributed to exposure to indoor air pollutants result from diseases exacerbated by poor indoor air. CO 2 , one of these pollutants, is the most prevalent and often serves as an indicator of IAQ. Indoor CO 2 concentrations can be significantly higher than outdoor levels due to human respiration and activity. The primary objective of this research was to numerically investigate the indoor relative humidity and CO 2 in cob buildings through the CobBauge prototype, particularly during the first months following the building delivery. Both in situ experimental studies and numerical predictions using an artificial neural network were conducted for this purpose. The study presented the use of a piecewise autoregressive exogenous model (PWARX) for indoor relative humidity (RH) and CO 2 content in a building constructed with a double walling system consisting of cob and light earth. The model was validated using experimental data collected over a 27-day period, during which indoor RH and CO 2 levels were measured alongside external conditions. The results indicate that the PWARX model accurately predicted RH levels and categorized them into distinct states based on moisture content within materials and external conditions. However, while the model accurately predicted indoor CO 2 levels, it faced challenges in finely classifying them due to the complex interplay of factors influencing CO 2 levels in indoor environments.


Introduction
Indoor air quality (IAQ) is crucial for the well-being of individuals in enclosed spaces like homes, workplaces, schools, and hospitals [1,2].Contaminants such as microbial agents, gaseous pollutants (e.g., carbon monoxide, carbon dioxide, or organic compounds), and behaviors like smoking can adversely affect IAQ, potentially leading to health issues.To mitigate these risks, implementing an air quality monitoring system is essential.Monitoring systems, like the developed sensor solution representing environmental parameters through the air quality index, play a vital role in ensuring an indoor environment suitable for habitation [3].Machine learning models have been employed to analyze data from various sensors and model occupancy patterns [4,5].
Machine learning models, including artificial neural networks (ANNs), support vector machines (SVMs), decision trees (DTs), and random forests (RFs), have been used to study hygroscopic behavior and IAQ in buildings [6].ANNs, for instance, have been applied to model indoor air quality and predict moisture migration in building materials [7,8].SVMs classify data to identify indoor air pollution sources and predict material performance in different climates [9,10].DTs and RFs have been employed to make decisions based on input conditions and improve prediction accuracy, respectively [6,11].
While research on hygrothermal behavior using neural network modeling has been conducted on various building materials, studies specifically focusing on bio-based materials at a wall scale are limited [10].Previous studies have demonstrated the potential of data-driven models to predict building material behavior, contributing to more sustainable and energy-efficient designs [12,13].However, no study has been conducted on the hygrothermal behavior of a real cob building.
Traditionally, studies on building performance have separately examined hygroscopic behavior and IAQ, leaving a significant knowledge gap in understanding their interplay.Recent advancements in numerical tools, including machine learning, deep learning, and computational fluid dynamics (CFD), have facilitated the development of methods for evaluating IAQ.CFD simulations provide insights into airflow patterns and pollutant dispersion, while machine learning models predict IAQ parameters [14].For instance, a fully convolutional network (FCN)-based deep learning regression model has been proposed for IAQ monitoring, outperforming traditional models in terms of prediction accuracy [15].Additionally, a technique combining wavelet neural networks and rough sets has been utilized for assessing indoor air quality in large malls [14].
A hybrid deep learning framework, hybrid CNN-LSTM-DNN, has been suggested for predicting IAQ and controlling ventilation systems predictively [16].This framework combines multiple deep learning models to extract temporal patterns from indoor and outdoor air quality measurements, showcasing its effectiveness in forecasting pollutant levels.
Despite these advancements, there is a lack of research on data-driven modeling for both hygroscopic behavior and IAQ for earthen materials at the building scale.The piecewise ARX model (PWARX), a statistical model not previously used for simulating the hygroscopic behavior and IAQ of earthen buildings, is introduced in this paper.PWARX utilizes time-series analysis and probabilistic modeling to predict moisture movement through earthen materials, offering advantages over traditional artificial neural network models, especially in data classification [10,17].
This study focuses on applying the PWARX model to a prototype cob building, extensively instrumented to measure hygroscopic behavior and indoor air quality.The objective is to demonstrate the effectiveness of PWARX in predicting the behavior of earthen buildings at a building scale, paving the way for more sustainable, healthy, and energy-efficient designs.

Methodology
The study approach is structured into several steps, as illustrated in Figure 1, following a comprehensive review of recent research.Each step is elaborated upon in the subsequent sections.The conceptual study plan can be summarized as follows: 1.
Building Construction and Instrumentation: Initiating the study with the construction of the building and the installation of instrumentation.

2.
Data Gathering: Employing sensors placed on the building walls and in indoor/outdoor environments to collect information on air quality and hygroscopic behavior.

3.
Data Preprocessing: Engaging in data cleaning, anomaly elimination, and data aggregation to hourly intervals as part of the preprocessing step.

4.
Model Estimation: Defining all parameters essential for the algorithm's execution, including the initial number of operating modes, system orders, and convergence rate.

5.
Classification of Operating Modes: Training a classification algorithm to discern the relationship between input variables and operating modes.These steps collectively form the conceptual framework for the study, providing a systematic and organized approach to investigating indoor air quality and hygroscopic behavior in cob buildings.

Switching Linear Model
The algorithm proposed in this section for identifying piecewise affine systems comprises two distinct phases.In the initial stage, the algorithm classifies the data into groups, estimates the global vector of parameters, and associates each data point with the best-fitting sub-model.The second stage utilizes the support vector machine (SVM) technique to predict the areas of the polyhedral partition.
The clusters of linear/affine models are interconnected by switches, which are themselves indexed by an additional discrete variable referred to as the discrete state.This characteristic gives rise to the term "switched affine model."In piecewise affine models, the discrete state is defined by a polyhedral partition of the state-input domain.
Consider the data shown in Algorithm 1 as the input for our system.We apply the support vector machine (SVM) method to classify these data.The SVM method is capable of finding an optimal separation hyperplane when the data are linearly separable.In cases where the data are not linearly separable, the optimal separating hyperplane is utilized to classify the data into multiple groups.
In an identification procedure, it is essential to plot the data in a state-space domain to identify different clusters that automatically define the connection between the input and the output.The support vector machine (SVM) technique is employed for this purpose.Depending on the nature of the data, this method can recognize two or more classifications, enhancing the system's understanding and allowing for a more nuanced analysis.These steps collectively form the conceptual framework for the study, providing a systematic and organized approach to investigating indoor air quality and hygroscopic behavior in cob buildings.

Numerical Models Switching Linear Model
The algorithm proposed in this section for identifying piecewise affine systems comprises two distinct phases.In the initial stage, the algorithm classifies the data into groups, estimates the global vector of parameters, and associates each data point with the bestfitting sub-model.The second stage utilizes the support vector machine (SVM) technique to predict the areas of the polyhedral partition.
The clusters of linear/affine models are interconnected by switches, which are themselves indexed by an additional discrete variable referred to as the discrete state.This characteristic gives rise to the term "switched affine model."In piecewise affine models, the discrete state is defined by a polyhedral partition of the state-input domain.
Consider the data shown in Algorithm 1 as the input for our system.We apply the support vector machine (SVM) method to classify these data.The SVM method is capable of finding an optimal separation hyperplane when the data are linearly separable.In cases where the data are not linearly separable, the optimal separating hyperplane is utilized to classify the data into multiple groups.
In an identification procedure, it is essential to plot the data in a state-space domain to identify different clusters that automatically define the connection between the input and the output.The support vector machine (SVM) technique is employed for this purpose.Depending on the nature of the data, this method can recognize two or more classifications, enhancing the system's understanding and allowing for a more nuanced analysis.
The identification method facilitates the association of each sub-model with an operating mode, as depicted in Figure 2. The algorithm gathers all the data that characterize each operational mode and utilizes the least squares method to determine the configurations of each sub-model.This approach helps in precisely defining the characteristics of each operating mode, enhancing the accuracy and reliability of the identified sub-models within the system.
The identification method facilitates the association of each sub-model with an operating mode, as depicted in Figure 2. The algorithm gathers all the data that characterize each operational mode and utilizes the least squares method to determine the configurations of each sub-model.This approach helps in precisely defining the characteristics of each operating mode, enhancing the accuracy and reliability of the identified sub-models within the system.We consider a piecewise affine discrete SISO system described by a PWARX model in input-output form as follows: where f is expressed as follows: 1. {θ1;…θq} are the parameter vectors of the sub-models to be identified.2. yk ∈ IR is the output of the system.3. ek ∈ IR is the noise term.4. ϕk is the regression vector of dimension: n = na +nb +1, assumed to belong to some bounded polyhedron X ∈ IRd, given by: • uk ∈ IR is the input of the system.• na and nb are the orders of the system.• R is the extended regression vector given by φ = [φ 1] .

•
The regions R define a polyhedral partition of the closed and bounded domain.
Regions are represented by a convex polyhedron: • H is the matrix that defines regions.
As represented on Algorithm 1 [17], the approach reported in present study includes three major steps: a step of initialization, a step of data reallocation, and finally a test of convergence.We consider a piecewise affine discrete SISO system described by a PWARX model in input-output form as follows: where f is expressed as follows: 1. {θ 1 ;. ..θ q } are the parameter vectors of the sub-models to be identified.

2.
y k ∈ IR is the output of the system.

3.
e k ∈ IR is the noise term.

4.
ϕ k is the regression vector of dimension: n = n a +n b +1, assumed to belong to some bounded polyhedron X ∈ IRd, given by: • u k ∈ IR is the input of the system.• n a and n b are the orders of the system.
is the extended regression vector given by φ = [φ T 1 T .
• The regions { R i } q i=1 define a polyhedral partition of the closed and bounded domain.
Regions are represented by a convex polyhedron: • H i is the matrix that defines regions.
As represented on Algorithm 1 [17], the approach reported in present study includes three major steps: a step of initialization, a step of data reallocation, and finally a test of convergence.
Thus, the data regarding input-results and number c describing the nearest neighbors' number are introduced to the PWARX model's identification process.Consequently, the outputs are s, Ci, and θi with i = {1,. ..,s}, representing, respectively, the autoregressiveexogenous (ARX) sub-models number, clusters, and finally the vector's parameter.
During initialization, the data are employed in constructing N clusters.The data reassignment method continues until the stop criterion is satisfied through successive iterations.To achieve this, multiple iterations are performed, and the minimization of the obtained iteration prediction errors is utilized as a metric to test algorithm convergence.
Performance indices such as FIT (fit index test), RMSE (root mean square error), R 2 (R-squared), and MAPE (mean absolute percentage error) are utilized to validate each model.It is important to note that if the listed operating modes are inappropriate for the system under consideration, incorrect parameters will be systematically obtained for each sub-model.Consequently, an iteration is conducted for each sub-model to select the optimal settings based on the most appropriate data.This iterative process ensures that the model is refined and tuned to accurately represent the underlying system dynamics.
Algorithm 1 PWARX model identification [17] Input: Initialization n a and n b : the system orders; α: control weighting; β: optimal convergence rate; N: the convergence horizon; y: the output target and φ: the regression vector.k Class samples number.

7:
Step 3: Convergence test The division of the data into training and testing sets followed a standard practice in machine learning model evaluation.We assigned 80% of the dataset to the training set, which was used to train and optimize the PWARX model.The remaining 20% of the data constituted the testing set, serving as an independent dataset that the model had not seen during training (Figure 3).This approach allowed us to assess the model's performance on unseen data, providing a robust evaluation of its generalization capabilities.By incorporating this data splitting strategy, we aimed to ensure the reliability and credibility of the model's predictive performance.

Description of the Prototype Building
A prototype building was constructed on the property of the Cotentin and Bessin Marshes Regional Natural Park.The internal surface area of this prototype is 13 m 2 , and the total area is approximately 20 m 2 (see Figure 4).The construction of this cob building involves a double-walling method, where cob and light earth are naturally adhered to create each wall.In this constructive mode, typical wall thicknesses range from 50 to 70 cm.For this specific prototype, the walls are 50 cm thick on the south and west sides and 70 cm thick on the east and north sides.The walls were constructed using multiple lifts, with each lift approximately 70 cm in height.

Description of the Prototype Building
A prototype building was constructed on the property of the Cotentin and Bessin Marshes Regional Natural Park.The internal surface area of this prototype is 13 m 2 , and the total area is approximately 20 m 2 (see Figure 4).The construction of this cob building involves a double-walling method, where cob and light earth are naturally adhered to create each wall.In this constructive mode, typical wall thicknesses range from 50 to 70 cm.For this specific prototype, the walls are 50 cm thick on the south and west sides and 70 cm thick on the east and north sides.The walls were constructed using multiple lifts, with each lift approximately 70 cm in height.
Various sensors have been installed in this building, including the following: • A WS-GP1 weather sensor that collects outside temperature and relative humidity data every 15 min.

•
A Campbell Scientific CR1000X data-logger used to gather data recorded by CS655 sensors, monitoring the moisture content in the cob and light earth layers.

•
Two NEMo XT air quality stations (from Ethera-labs), with one installed indoors and the second one outdoors.These stations enable the collection of indoor variables, including temperature, CO2 levels, and relative humidity, with data recorded every 10 min.For the detection of carbon dioxide, the approach involved utilizes a non-dispersive infrared absorption spectroscopy across a measurement span from 0 to 5000 ppm.This method provides a resolution of 1 ppm and introduces an uncertainty factor of ±30 ppm or ±3% of the recorded value.Relative humidity can be effectively gauged within the 5 to 95% range, demonstrating a precision level of ±3% between 11 and 89% of RH and ±7% beyond this interval.The monitoring system accommodates a temperature spectrum ranging from −55 to 125 °C, with a precision rate of ±2 °C.Data were recovered during 27 days from 16 September to 13 October 2022.The period of interest of the present study was the one following the building delivery in which the building walls were not completely dry [18].

Experimental Results
This section presents the results of a 27-day measurement campaign conducted from 16 September to 13 October 2022, to assess the hygroscopic behavior and indoor air quality of the cob building.The experimental results, including the walls' hygroscopic behavior, outdoor conditions, and indoor CO2 and relative humidity, were utilized as input for the PWARX model, as shown in Figures 5 and 6. Figure 5 illustrates the hygroscopic behavior of the building along with external conditions, including outdoor temperature ranging between 1 °C and 22 °C and solar radiation varying between 0 and 350 W/m 2 .Indoor relative humidity levels evolved from approximately 60% to 80%, while outdoor levels oscillated from about 60% to 100%.Notably, the hygroscopic behavior of the light earth differed from that of the cob layer.The water content in the light earth layer (in contact with outdoor air) oscillated quasi-periodically around an average value, as shown in Figure 7.In contrast, the evolution of the cob layer's water content (in contact with indoor air) is less evident.The water content in cob oscillated and continued to decrease slowly from 0.062 m 3 /m 3 to 0.060 m 3 /m 3 .This suggests that the cob layer has not yet reached its practical water content since its implementation.Inversely, the light earth has completely dried and reached its practical water content.Thus, the evolution of the latter is influenced by outdoor environmental conditions such as rainfall, relative humidity, solar radiation, and temperature fluctuations.Essentially, light earth exhibits a strong hygroscopic behavior.Additionally, with its larger Various sensors have been installed in this building, including the following: • A WS-GP1 weather sensor that collects outside temperature and relative humidity data every 15 min.• A Campbell Scientific CR1000X data-logger used to gather data recorded by CS655 sensors, monitoring the moisture content in the cob and light earth layers.• Two NEMo XT air quality stations (from Ethera-labs), with one installed indoors and the second one outdoors.These stations enable the collection of indoor variables, including temperature, CO 2 levels, and relative humidity, with data recorded every 10 min.For the detection of carbon dioxide, the approach involved utilizes a nondispersive infrared absorption spectroscopy across a measurement span from 0 to 5000 ppm.This method provides a resolution of 1 ppm and introduces an uncertainty factor of ±30 ppm or ±3% of the recorded value.Relative humidity can be effectively gauged within the 5 to 95% range, demonstrating a precision level of ±3% between 11 and 89% of RH and ±7% beyond this interval.The monitoring system accommodates a temperature spectrum ranging from −55 to 125 • C, with a precision rate of ±2 • C. Data were recovered during 27 days from 16 September to 13 October 2022.The period of interest of the present study was the one following the building delivery in which the building walls were not completely dry [18].

Experimental Results
This section presents the results of a 27-day measurement campaign conducted from 16 September to 13 October 2022, to assess the hygroscopic behavior and indoor air quality of the cob building.The experimental results, including the walls' hygroscopic behavior, outdoor conditions, and indoor CO 2 and relative humidity, were utilized as input for the PWARX model, as shown in Figures 5 and 6. Figure 5 illustrates the hygroscopic behavior of the building along with external conditions, including outdoor temperature ranging between 1 • C and 22 • C and solar radiation varying between 0 and 350 W/m 2 .Indoor relative humidity levels evolved from approximately 60% to 80%, while outdoor levels oscillated from about 60% to 100%.Notably, the hygroscopic behavior of the light earth differed from that of the cob layer.The water content in the light earth layer (in contact with outdoor air) oscillated quasi-periodically around an average value, as shown in Figure 7.In contrast, the evolution of the cob layer's water content (in contact with indoor air) is less evident.The water content in cob oscillated and continued to decrease slowly from 0.062 m 3 /m 3 to 0.060 m 3 /m 3 .This suggests that the cob layer has not yet reached its practical water content since its implementation.Inversely, the light earth has completely dried and reached its practical water content.Thus, the evolution of the latter is influenced by outdoor environmental conditions such as rainfall, relative humidity, solar radiation, and temperature fluctuations.Essentially, light earth exhibits a strong hygroscopic behavior.Additionally, with its larger vegetal fiber content, the used soil is composed of kaolinite and illite with a high interfoliar space.These compounds can contain water molecules between their layers, resulting in high inter-crystalline swelling when submerged in water [19].Figure 6 depicts the concentration of carbon dioxide (CO2) inside and outside the prototype building, along with external conditions.The outdoor CO2 levels exhibited a wide range, varying between 400 and 5000 ppm.This broad variation could be attributed to various factors such as photosynthesis, traffic, or industrial activity.It is crucial to approach these reported absolute values with caution due to the potential impact of high relative humidities on the measuring instrumentation.The external pressure also fluctuated between 1017 and 1027 mbar, influenced by weather conditions.
Within the building, the CO2 levels consistently remained lower than those outside, fluctuating between 400 and 700 ppm throughout the testing period.This range aligns with

Numerical Results
In this study, the PWARX model was validated for indoor relative humidity using inputs such as light-earth moisture content, cob moisture content, and external conditions (Figure 7).The results demonstrated that the model accurately predicted humidity levels, as indicated by the good agreement between the predicted and measured curves.
Moreover, the PWARX model successfully classified indoor humidity into three distinct states (Figure 8): state 1, state 2, and state 3. State 2 coincided with the peak of solar radiation during the day, while states 1 and 3 corresponded to nighttime conditions.Notably, the model could differentiate between these two nighttime states based on the lightearth moisture content, with state 1 occurring when the moisture content was at its minimum level (0.012 m 3 /m 3 ) and state 3 occurring at a slightly higher moisture content level (0.014 m 3 /m 3 ).

Numerical Results
In this study, the PWARX model was validated for indoor relative humidity using inputs such as light-earth moisture content, cob moisture content, and external conditions (Figure 7).The results demonstrated that the model accurately predicted humidity levels, as indicated by the good agreement between the predicted and measured curves.
Moreover, the PWARX model successfully classified indoor humidity into three distinct states (Figure 8): state 1, state 2, and state 3. State 2 coincided with the peak of solar radiation during the day, while states 1 and 3 corresponded to nighttime conditions.Notably, the model could differentiate between these two nighttime states based on the lightearth moisture content, with state 1 occurring when the moisture content was at its minimum level (0.012 m 3 /m 3 ) and state 3 occurring at a slightly higher moisture content level (0.014 m 3 /m 3 ).Figure 6 depicts the concentration of carbon dioxide (CO 2 ) inside and outside the prototype building, along with external conditions.The outdoor CO 2 levels exhibited a wide range, varying between 400 and 5000 ppm.This broad variation could be attributed to various factors such as photosynthesis, traffic, or industrial activity.It is crucial to approach these reported absolute values with caution due to the potential impact of high relative humidities on the measuring instrumentation.The external pressure also fluctuated between 1017 and 1027 mbar, influenced by weather conditions.
Within the building, the CO 2 levels consistently remained lower than those outside, fluctuating between 400 and 700 ppm throughout the testing period.This range aligns with the recommendations of ASHRAE [20], except for one spike primarily attributed to human presence in the building.This temporary spike occurred when four individuals were present in the prototype building for approximately four hours.The CO 2 level rapidly decreased as soon as the occupation ceased.Such events highlight the need for a ventilation system tailored to these occupancy patterns to prevent such peaks [21].Elevated indoor CO 2 levels can have adverse effects on occupants, including fatigue, headaches, and other Energies 2024, 17, 243 9 of 12 health problems.Addressing ventilation strategies becomes essential to maintaining indoor air quality within acceptable limits.

Numerical Results
In this study, the PWARX model was validated for indoor relative humidity using inputs such as light-earth moisture content, cob moisture content, and external conditions (Figure 7).The results demonstrated that the model accurately predicted humidity levels, as indicated by the good agreement between the predicted and measured curves.
Moreover, the PWARX model successfully classified indoor humidity into three distinct states (Figure 8): state 1, state 2, and state 3. State 2 coincided with the peak of solar radiation during the day, while states 1 and 3 corresponded to nighttime conditions.Notably, the model could differentiate between these two nighttime states based on the light-earth moisture content, with state 1 occurring when the moisture content was at its minimum level (0.012 m 3 /m 3 ) and state 3 occurring at a slightly higher moisture content level (0.014 m 3 /m 3 ).
Energies 2024, 17, x FOR PEER REVIEW 10 of 13 These findings underscore the utility of the PWARX model in classifying different hygroscopic behaviors, particularly in indoor environments.The model's ability to accurately predict and classify indoor humidity holds practical implications for building design, maintenance, and optimizing energy efficiency.Overall, the results emphasize the potential of the PWARX model as a valuable tool for comprehending and managing indoor humidity.In the second part of our study, we validated the PWARX model for indoor air quality, specifically CO2 concentration (see Figure 9).The results demonstrated good agreement between the predicted and measured curves, indicating the model's ability to accurately forecast interior CO2 levels.However, unlike indoor humidity, the PWARX model faced challenges in finely classifying CO2 behavior.
Various factors, including occupancy, ventilation, outdoor air quality, and uncontrolled human movement within the building, contribute to the complexity of CO2 concentration in indoor environments.The difference in classification between indoor humidity and CO2 behavior can be attributed to the distinct underlying mechanisms governing each parameter.While humidity levels are primarily influenced by the moisture content of indoor materials and external conditions, CO2 levels are subject to a more intricate interplay of factors.
The cyclic nature of humidity behavior, linked to external conditions, contrasts with the non-cyclic nature of CO2 concentration.Consequently, accurately classifying the behavior of CO2 in indoor environments poses a more challenging task.
Despite this limitation, the PWARX model remains valuable in providing insights into indoor CO2 behavior, particularly in identifying trends.Understanding the influencing factors behind indoor CO2 levels allows building managers and engineers to implement measures for optimizing ventilation and air exchange rates, thereby ensuring a healthy and comfortable indoor environment.For instance, it is notable that the number of states increases with the rise in CO2 concentration (Figure 8-bottom).These findings underscore the utility of the PWARX model in classifying different hygroscopic behaviors, particularly in indoor environments.The model's ability to accurately predict and classify indoor humidity holds practical implications for building design, maintenance, and optimizing energy efficiency.Overall, the results emphasize the potential of the PWARX model as a valuable tool for comprehending and managing indoor humidity.
In the second part of our study, we validated the PWARX model for indoor air quality, specifically CO 2 concentration (see Figure 9).The results demonstrated good agreement between the predicted and measured curves, indicating the model's ability to accurately forecast interior CO 2 levels.However, unlike indoor humidity, the PWARX model faced challenges in finely classifying CO 2 behavior.
Various factors, including occupancy, ventilation, outdoor air quality, and uncontrolled human movement within the building, contribute to the complexity of CO 2 concentration in indoor environments.The difference in classification between indoor humidity and CO 2 behavior can be attributed to the distinct underlying mechanisms governing each parameter.While humidity levels are primarily influenced by the moisture content of indoor materials and external conditions, CO 2 levels are subject to a more intricate interplay of factors.
The cyclic nature of humidity behavior, linked to external conditions, contrasts with the non-cyclic nature of CO 2 concentration.Consequently, accurately classifying the behavior of CO 2 in indoor environments poses a more challenging task.

Conclusions
The present research fills a gap in the literature regarding the prediction of indoor CO2 concentration and relative humidity (RH) in cob buildings.The relationship between relative humidity (RH) and carbon dioxide (CO2) concentration is complex and multifaceted.Both RH and CO2 are key indicators of indoor environmental conditions, and their interaction can have significant implications for occupant comfort, health, and overall indoor air quality.Here are some key aspects of their relationship:

•
The relationship between RH and CO2 is often influenced by ventilation rates and occupant activities.Inadequate ventilation can lead to elevated CO2 levels due to the accumulation of exhaled breath, while high RH can result from poor ventilation and insufficient moisture removal.

•
High RH levels can create conditions favorable for mold growth, impacting IAQ.
The results show that cob buildings can provide good CO2 concentrations and high relative humidity.The high RH is assumed to be due to the humidity released by the cob which was not completely dry even months after its implementation.Thus, an appropriate ventilation system is required to avoid possible threats to health.The PWARX model presented in this study has demonstrated its potential as a valuable tool for understanding and managing indoor relative humidity (RH) and CO2 levels in natural buildings.Accurately predicting and classifying indoor RH levels holds practical implications for building design, maintenance, and optimizing energy efficiency.While the model faced challenges in finely classifying indoor CO2 behavior compared to RH, it still offers valuable insights into the factors influencing CO2 levels.This information can assist building managers and engineers in optimizing ventilation and air exchange rates.
Future work in this area could focus on expanding the model to incorporate more complex factors influencing indoor air quality.Exploring the applicability of the model in different building types and climates would further enhance its versatility and effectiveness.The continuous refinement and adaptation of the model based on real-world data and diverse environmental conditions would contribute to its robustness and practical utility in various natural building scenarios.
The decision to employ the PWARX model was driven by the specific characteristics of the data and the objectives of the present study.The PWARX model, a form of weighted autoregressive exogenous model, was chosen for its ability to capture both autoregressive dynamics and the influence of external factors on the indoor air parameters, such as relative humidity (RH) and carbon dioxide (CO2) concentration.In addition to examining the temporal dynamics of indoor air parameters, our objective with the PWARX model was to Despite this limitation, the PWARX model remains valuable in providing insights into indoor CO 2 behavior, particularly in identifying trends.Understanding the influencing factors behind indoor CO 2 levels allows building managers and engineers to implement measures for optimizing ventilation and air exchange rates, thereby ensuring a healthy and comfortable indoor environment.For instance, it is notable that the number of states increases with the rise in CO 2 concentration (Figure 8-bottom).

Conclusions
The present research fills a gap in the literature regarding the prediction of indoor CO 2 concentration and relative humidity (RH) in cob buildings.The relationship between relative humidity (RH) and carbon dioxide (CO 2 ) concentration is complex and multifaceted.Both RH and CO 2 are key indicators of indoor environmental conditions, and their interaction can have significant implications for occupant comfort, health, and overall indoor air quality.Here are some key aspects of their relationship: • The relationship between RH and CO 2 is often influenced by ventilation rates and occupant activities.Inadequate ventilation can lead to elevated CO 2 levels due to the accumulation of exhaled breath, while high RH can result from poor ventilation and insufficient moisture removal.

•
High RH levels can create conditions favorable for mold growth, impacting IAQ.
The results show that cob buildings can provide good CO 2 concentrations and high relative humidity.The high RH is assumed to be due to the humidity released by the cob which was not completely dry even months after its implementation.Thus, an appropriate ventilation system is required to avoid possible threats to health.The PWARX model presented in this study has demonstrated its potential as a valuable tool for understanding and managing indoor relative humidity (RH) and CO 2 levels in natural buildings.Accurately predicting and classifying indoor RH levels holds practical implications for building design, maintenance, and optimizing energy efficiency.While the model faced challenges in finely classifying indoor CO 2 behavior compared to RH, it still offers valuable insights into the factors influencing CO 2 levels.This information can assist building managers and engineers in optimizing ventilation and air exchange rates.
Future work in this area could focus on expanding the model to incorporate more complex factors influencing indoor air quality.Exploring the applicability of the model in different building types and climates would further enhance its versatility and effectiveness.The continuous refinement and adaptation of the model based on real-world data and diverse environmental conditions would contribute to its robustness and practical utility in various natural building scenarios.

6 .
Model Validation: Comparing the indoor humidity and indoor air quality (CO 2 ) predicted by the PWARX model with the measured data.This step validates the model's accuracy in predicting hygroscopic behavior and indoor air quality.4. Model Estimation: Defining all parameters essential for the algorithm's execution, including the initial number of operating modes, system orders, and convergence rate. 5. Classification of Operating Modes: Training a classification algorithm to discern the relationship between input variables and operating modes.6. Model Validation: Comparing the indoor humidity and indoor air quality (CO2) predicted by the PWARX model with the measured data.This step validates the model's accuracy in predicting hygroscopic behavior and indoor air quality.

Step 4 :
Model validation 10: Compute the output prediction, class number and the parameter vector 11: s ← ∁ i s i=1 12: s ← θi s i=1

Figure 3 .
Figure 3. Steps to run the PWARX model simulation.

Figure 3 .
Figure 3. Steps to run the PWARX model simulation.Energies 2024, 17, x FOR PEER REVIEW 7 of 13

Figure 4 .
Figure 4. Description of the prototype building.

Figure 4 .
Figure 4. Description of the prototype building.

Figure 5 .
Figure 5. Experimentally determined hygroscopic properties used as inputs in the PWARX modelling.

Figure 5 .
Figure 5. Experimentally determined hygroscopic properties used as inputs in the PWARX modelling.

Figure 6 .
Figure 6.Experimentally determined parameters used as inputs in the PWARX modelling.

Figure 7 .
Figure 7. Indoor air relative humidity validation and operating modes.

Figure 6 . 13 Figure 6 .
Figure 6.Experimentally determined parameters used as inputs in the PWARX modelling.

Figure 7 .
Figure 7. Indoor air relative humidity validation and operating modes.

Figure 7 .
Figure 7. Indoor air relative humidity validation and operating modes.

Figure 8 .
Figure 8. Explanation of the states (operating mode) identified as a function of the solar radiation and water content in the light earth.

Figure 8 .
Figure 8. Explanation of the states (operating mode) identified as a function of the solar radiation and water content in the light earth.

Figure 9 .
Figure 9. Indoor air CO2 concentration validation and operating modes.

Figure 9 .
Figure 9. Indoor air CO 2 concentration validation and operating modes.