Modeling Vehicle Indoor Air Quality Usin

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Journal of Reliable Intelligent Environments (2022) 8:105–115

https://doi.org/10.1007/s40860-021-00137-2

ORIGINAL ARTICLE

Modeling vehicle indoor air quality using sensor data analytics


Divya Lohani1 · Anurag Barthwal1 · Debopam Acharya2

Received: 4 June 2020 / Accepted: 13 January 2021 / Published online: 2 February 2021
© The Author(s), under exclusive licence to Springer Nature Switzerland AG part of Springer Nature 2021

Abstract
A working person on an average spends 1.5–2 h every day traveling either to their places of work or for other daily activi-
ties, using metros, trams, buses, and cars, as common modes of travel. Most of such commuters regularly suffer from health
conditions like headache, breathless condition, drowsiness, etc. Numerous accidents have been reported due to drowsiness
while driving, which may occur due to the build-up of carbon-dioxide (CO2) build in the vehicle chamber. This paper attempts
to monitor, analyze, and predict air quality inside the vehicle. This work proposes a sensing system using an off-the-shelf
sensor Sensordrone which is connected to an Android Smartphone using Bluetooth Low Energy. The data obtained from the
proposed sensing system are then utilized to perform predictive analysis of CO2 build-up inside the vehicular chamber using
Auto Regressive Integrated Moving Average (ARIMA) and Support Vector Regression (SVR). Root-Mean-Square Error
for SVR and ARIMA models is 47.91 ppm and 55.32 ppm CO2, respectively, indicating that SVR outperformed ARIMA in
predicting the CO2 build-up inside the vehicle.

Keywords ARIMA · Carbon dioxide · Mobile sensing · Sensordrone · Support vector regression · Vehicle indoor air quality

1 Introduction American Driving Survey, 2017, average Americans spends


about 51 min driving approximately 31.5 miles each day [1].
In the past few years, air quality inside the vehicles has col- Most of the vehicles, old or new, only have recirculation
lected substantial amount of interest both in scientific and technique to manage VIAQ. However, increased air recir-
environmental spheres. Vehicle indoor air quality or VIAQ culation results in an increase of CO2 (byproduct of respira-
denotes the air inside any vehicular chamber, and is a com- tion) levels in the vehicular chamber [3].
posite measure of its quality, i.e., how clean, healthy, and For small vehicles with less inside volume, if such vehi-
fresh the air in our indoor space remains. It refers to the cles are filled with occupants, CO2 (byproduct of respiration)
nature of conditioned air that circulates throughout space/ levels can increase more rapidly, which ultimately effects
area, where we spend a considerable amount of time. VIAQ VIAQ. Air quality inside a vehicular chamber has a major
is indicative of significant influence on human health and influence on occupants’ health and comfort level—higher
comfort. According to the Environmental Protection Agency concentrations of CO2 may result in short term health symp-
(EPA), air in indoor chambers is two-to-five times more pol- toms like fatigue, eye irritation, sore throat, sleepiness, and
luted than the outdoor air [29]. As per a report by WHO even loss of reasoning. Long-term exposue of poor VIAQ
[32], we humans spend around ninety percent of our time may cause several types of chronic illness. Satish et al. [24]
in indoor environments which are typically air-conditioned. testified that elevated CO2 concentrations can impact reason-
In thickly populated metropolitan cities, individuals spend ing abilities. Loss of decision-making and reasoning abilities
between 45 and 150 min inside vehicles each day, com- may prove to be very fatal for drivers, and may lead to accei-
muting to their workplaces or homes. According to the dents. The situation worsens more in parked vehicles—there
are numerous case studies focusing on how leaving children
and pets inside a parked car can be dangerous, may even lead
* Divya Lohani
divya.lohani@ieee.org
to death in extreme cases. Parked vehicles can become hot
even on cold days, due to CO2 build-up, ultimately leading
1
Department of Computer Science and Engineering, Shiv to greenhouse effect [8]. In the year 2016, Hyundai Genesis
Nadar University, Greater Noida, India devised a ventilation system using CO2 sensors, i.e., as soon
2
School of Computing, DIT University, Dehradun, India

13
Vol.:(0123456789)
106 Journal of Reliable Intelligent Environments (2022) 8:105–115

as the CO2 levels inside the vehicle rised beyong 2500 ppm, human health and energy savings [36]. Based on the cor-
the windows are rolled down to let in the fresh air [9]. In rect usage of air-circulation mode, vehicle indoor air quality
2019, Kia Seltos came up with in-car air quality monitor and can be significantly optimized [30]. Various studies have
smart air purifier with high-efficiency particulate air (HEPA) proven that recirculation of air inside the vehicle chamber
filter [25]. can reduce the level of pollutants. Even though, around 85%
of the particulate polluants are trapped by car filters, still a
1.1 Contribution of this paper small percentage still manges to penetrate through the filters
[35]. A similar study also highlighted the improvement in
In this paper, the authors have tried to address the prob- the quality of air inside the vehicle while driving on a high-
lem of bad air quality inside the vehicles by exploiting the way with recircuatop mode on [22]. To study the effect of
mobile sensing technology by developing a versatile sens- CO2 levels on recircualtion mode, a mathematical model was
ing system using an off-the-shelf sensor Sensordrone. The proposed by Jung [11]. Extending the proposed model, one
system can be retrofitted in any vehicle, irrespective of its more enhancement was made which focused on controlling
size, type, and model. The main motivation behind this work the amount of recirculation [7]. Fruin et al. [4] emphasized
is to be able to measure the CO2 levels inside a vehicle in on the importance on in-vehicle environment and how keep-
real time, and corrective measures, to avoid any fatalities. ing the vehicle in recirculation mode can significantly lower
Also, real-time measurements can allow us to forecast the the amount of ultra-fine particles entering the vehicle cabin.
CO2 concentrations in near future and share the informa- In this direction, a model to qualitfy air exahange rate was
tion with people. This predicted information can help the developed—this model used CO2 released by vehicle occu-
people understand the rate of CO2 build-up in their vehicles pants and studied it under different conditons like speed of
and can alert them against leaving their children or pets in vehicle, AC settings, etc. The study was concluded by testi-
the parked cars/vehicles. Mobile sensing provides us a way fying that was the rise and fall of CO2 inside a vehicle follow
to use low-cost sensors connected to a mobile phone or a the mass balance model [13, 20].
system-on-chip device to collect real-time environmental Jain [10] conducted a study in passenger vehicles under
data with acceptable accuracy. different ventilation modes to find out the impact of in-vehi-
cle particulate matter concentrations on passengers’ health.
1.2 This paper is organized as follows It was concluded that particulate matters concentrations
were higher in winter season and for non-AC vehicles. Fu
Section II discusses previous research related to air qual- [5] studied the impact of in-cabin air quality on humans—for
ity inside the vehicles and its effect on occupants’ health. this study, the author considered an airway traffic. A similar
Section III discusses our mobile participatory system, Sec- study [6] was conducted to model the relative humidity lev-
tion IV discusses the process of data collection, Section els in passenger cars using mass balance equations. Micucci
V presents the predictive models for CO2 growth inside a and Corno [18] emphasized on the suitability of pervasive
vehicular chamber, the performance evaluation of the pre- systems and ubiquitous communication for monitoring the
dictive models is discussed in Section VI, and Section VII health of the users. Since the user data collected go to a
concludes the paper. cloud, reliability also becomes as important factor here.
Many studies have also laid emphasis on efficient data col-
lection for different sensor-based applications—these studies
2 Related work primarily focus on accuracy of data, response time, and user
privacy [21, 27].
In today’s fast paced life, people tend to spend long periods
of time in enclosed cars chambers. Hence, maintaining good
in-cabin vehicle air quality is important and it has started 3 Mobile sensing system
attracting more attention. Any car usually has two modes
for managing the inside ventilation—(a) recirculation, in The sensing system consists of an off-the-shelf sensor
which the car’s air conditioning system recirculates the air Sensordrone (Fig. 1) [26] with an additional module for
inside the vehicle, and (b) non-recirculation, in which the sensing CO2 levels, and an Android smartphone. Sensor-
car air ducts are opened to bring in the fresh air from out- drone consists of 11 in-built sensors; for this work, we have
side. Even though using a car in recirculation mode does used: Ambient Temperature sensor with a sensing range
not allow the outside air to enter the car, still, this mode of − 20 °C to 60 °C with an accuracy of 0.5 °C, Rela-
increases the level of CO2 inside the vehicle, causing the tive Humidity sensor with a sensing range of 0–100%, RH
risk of passengers feeling drowsy [2, 11]. Recirculating the and an accuracy of 2% in the range of 20–80% RH (an
vehicular cabin air had numerous advantages in terms on accuracy of 4% outside this range). Additionally, COZIR

13
Journal of Reliable Intelligent Environments (2022) 8:105–115 107

Fig. 1 Sensordrone and android


application

GC-0010 module is connected to Sensordrone to measure 4.2 Data collection setup


the change in CO2 levels. This module has a sensing range
of 0–2000 ppm with an accuracy of 50 ppm or 3% of sensed This consisted of the Samsung galaxy S4 phone with our
reading. Sensordrone is connected to Android phone via AQM application hosted and the Sensordrone. To calibrate
Bluetooth Low Energy. Android smartphone hosts a data and stabilize the Sensordrone, we sensed data for 10 days
collection and visualization application. The application and observed that the device took approximately 2.6 min to
stores all sensed data and displays the last known read- get a stabilized reading. To get accurate readings, we placed
ings of CO, CO2 on the phone’s screen in 3 groups: (a) the Sensordrone approximately 2 feet (0.61 m) away from
Good (CO2: 0–1000 ppm and CO: 0–5 ppm, (b) moder- the front and side air vents of the vehicle and more than 3
ate (CO2:1000–1500 ppm and CO: 5–10 ppm), and (c) bad feet above the vehicle’s foot vents. Sensordrone sensor was
(CO2: 1500 ppm and CO: 10 ppm). placed in the vehicle, so that it did not get directly exposed
to sunlight coming in the vehicle, heat, or breathing by the
occupants. The sampling rate was one reading per minute.
4 Experimental setup and testbed For this experiment, four humans occupied the vehicle.
These occupants aged between 25 and 50 years and their
4.1 Chamber exposure setup heights were between 158 and 180 m with body weights
between 55 and 80 kg. Two occupants were at the front and
For our experiment, we used a sedan car with indoor the rest two were at the back seat. To fine tune our exper-
dimensions as 2.60 m × 1.55 m × 1.32 m and an in-cabin imental setup, data were collected for 10 days, and read-
volume of 5319.6 L. The car is equipped with a 2 L petrol ings were observed. After this period, we began our actual
engine. To prevent any air exchange, recirculation mode data collection for city driving conditions. A road stretch
was kept on and all the windows were closed. Prior to col- of 19 km with 6 roundabouts and moderate traffic condi-
lection of data in each experiment, the air in the vehicle tions was identified. To simulate close to ideal city driving
chamber was recirculated to 400 ppm, i.e., the normal CO2 conditions, we maintained the average speed of the vehicle
levels [14]. between 30 and 40 km/h. We observed that, for this entire

13
108 Journal of Reliable Intelligent Environments (2022) 8:105–115

process, the mean speed was 36 km/h [14]. We collected where RQ = respiratory quotient, VO2 = volumetric rate of
around 1100 data points over a period of time. We used 80% oxygen consumed, and Ad = dubois area, which is defined
of the data of training our ARIMA and SVR models, and the as the average surface area of an adult (1.83 m2), and Btu is
remaining 20% data were used to testing the models. British Thermal Unit.
Figure 2 shows the variation of CO2 levels inside the For our experiment, the activity involves sitting inside
vehicle when the ignition is switched off; doors and windows a vehicle and driving a vehicle, and therefore, we took the
are closed, with all occupants inside. It can be observed that MET rate as 1.5 [12]. Hence, the CO2 generation rate turns
with no air recirculation and no exchange of air, there was a out to be 0.40 L/min per person.
sharp increase in CO2 levels. CO2 concentration in the vehi- We considered our vehicle cabin to be a single compart-
cle chamber crossed 500 ppm, 1000 ppm, and 1500 ppm, ment chamber, and used mass balance equation [16, 23] as:
eventually reaching 2001 ppm (maximum range of the Sen-
dC
sordrone device) at times t = 1 min, t = 4 min, t = 7 min, V = Q(Co(t) − C(t)) + G(t), (2)
dV
and t = 11 min, respectively. This experiment leads to an
important observation that sitting in an idle car with multiple where V = Vehicle chamber volume, C(t) = CO2 concentra-
occupants leads to high levels of CO2 within a small duration tion within the vehicle chamber at time t, G(t) = CO2 genera-
of time, as there is no air recirculation or ventilation [14]. tion rate, Co(t) = Supply concentration of CO2, Q = Airflow
rate from/to the vehicle chamber, where,
4.3 Science of rise in CO2 levels inside a vehicular
chamber G
Q=
Ceq − Co
, (3)

CO2 is released during the human respiration process. For cal- Ceq = CO2 concentration in equilibrium.
culting the CO2 produced by a human body, we consider the Taking standard assumption of Q and Co(t) as constant
molar ratio of the volume of CO2 exhaled with the volume of and G equal to zero, value of C(t) simplifies to:
O2 consumed. This ratio is known as the respiratory quotient.
A person’s metabolic rate (MET) is related to his/her oxygen C(t) = Co + (C(0) − Co)e−𝜆(t) , (4)
consumption, CO2 production, and RQ as follows [12, 19]:
MET = 1200 × (0.23 × RQ + 0.77) × VO2 ∕Ad (Btu∕h sqft), where 𝜆 = Q∕V. (5)
(1)

Fig. 2 CO2 levels when ignition is off

13
Journal of Reliable Intelligent Environments (2022) 8:105–115 109

This computed value of CO2 at time t with rate of ventila- of CO2 concentration observed previously. Our MA model,
tion λ is used to suggest corrective measures because of rise when Pt that depends on ‘m’ previously observed error term
in CO2 levels. values is described as:
Pt = 𝛃0 + 𝛃1 𝜙t−1 + 𝛃2 𝜙t−2 + 𝛃3 𝜙t−3 + … + 𝛃m 𝜙t−m , (9)
5 Predictive modeling of in‑vehicle CO2 where β0, β1, β2, β3, …, βm are the coefficients of the white
concentrations noise terms to be resolved. The time-series shown in Fig. 2 is
perceived to be a combination of AR and MA components,
To determine the CO2 concentration at an instant in future, referred to as ARMA(k, m). Our ARMA model, which is
several forecasting models could be used, important ones composed of ‘k’ previously observed CO2 concentration
being statistical, stochastic, machine learning, and hybrid values and ‘m’ prior white noise terms, is represented by
models [33]. Linear, multiple linear, quantile, and kernel the equation:
ridge regression techniques are examples of statistical meth-
ods [28]. Stochastic models may include auto-regressive Pt = 𝛼0 + 𝛼1 Pt−1 + 𝛼2 Pt−2 + 𝛼3 Pt−3 + … + 𝛼k Pt−k + 𝛃0
moving average (ARMA), auto-regressive integrated mov- + 𝛃1 𝜙t−1 + 𝛃2 𝜙t−2 + 𝛃3 𝜙t−3 + … + 𝛃m 𝜙t−m.
ing average (ARIMA), Kalman filtering and exponential (10)
smoothing, etc. [31]. Statistical models such as linear and Prediction using ARMA/ARIMA involves figuring out
quantile regression models have a limitation of not taking whether or not our CO2 concentration time-series can be
into account the past values of AQI while forecasting the made stationary. A time-series is termed as stationary if its
future values. In this work, we have developed forecast mean and variance are consistent with time:
model using SVR and have further evaluated its performance
with ARIMA model [15].
[ ] [ ] [ ] [ ]
E 𝐏1 = E 𝐏2 = E 𝐏3 = . . . = E 𝐏k = Constant,
(11)
5.1 Prediction using ARMA/ARIMA [ ] [ ] [ ]
Var 𝐏𝟏 = Var 𝐏2 = . . . = Var 𝐏k = Constant, (12)
The time-series shown in Fig. 2 does not maintain a linear where ‘E’ denotes mean, ‘Var’ denotes variance, P1, …, Pk
relationship over time. The statistical properties of the time- are prior CO2 values, and ‘k’ is the number of CO2 concen-
series such as variance and correlations are not consistent tration values under consideration.
over time. Such non-stationary time-series is best evaluated Forecast using ARIMA requires the time-series under
with the help of auto-regressive moving average (ARMA) observation to be stationary. The statistical properties such
model. The ARMA model is derived by combining the auto- as mean, variance, and autocorrelation of a stationary time-
regressive (AR) and the moving average (MA) processes. In series are all constant over time. However, if a time-series
AR model, the present CO2 concentration (Pt) is dependent is not stationary, the correlations between the lagged values
upon the prior CO2 values. It is defined as: are not constant over time.
( ) Stationarity test was performed on the CO2 concentration
Pt = f Pt−1 , Pt−2 , Pt−3 , Pt−4 , … , Pt−k , 𝜙t , (6)
time-series (Fig. 2) in the first step, and it was found that
where Pt is the predicted CO2 concentration, Pt−1, Pt−2, Pt−3, the time-series was not stationary. Therefore, the time-series
Pt−4, …, Pt−k are the ‘k’ earlier observed values of CO2 con- was differenced with respect to time to make it stationary,
centrations, and ϕt is the error term. Our AR model, when one with constant mean and variance. The time sequence
Pt depends on ‘k’ previous CO2 observations, is described became stationary after single differencing, with the vari-
with the help of the equation: ance and mean becoming constant with respect to time. The
CO2 concentration–time sequence after single differencing
Pt = 𝛼0 + 𝛼1 Pt−1 + 𝛼2 Pt−2 + 𝛼3 Pt−3 + … + 𝛼k Pt−k + 𝜙t , is shown in Fig. 3.
(7) The stationary CO2 series obtained after single differenc-
where α0, α1, α2, α3, …,αk are the coefficients of the prior ing is termed as Integrated of the order 1 and is indicated
CO2 values to be resolved and ϕt is the error term. Our mov- as I(1). If the series has to be differenced ‘n’ times until it
ing averages model uses the random error or white noise becomes stationary, it is represented as I(n). The next step
terms of the CO2 time-series to forecast Pt: in prediction using ARIMA is to determine the autocorrela-
( ) tion function (ACF) and the partial autocorrelation function
Pt = f 𝜙t−1 , 𝜙t−2 , 𝜙t−3 , 𝜙t−4 , … , 𝜙t−m , (8) (PACF). The ACF explains the way the data points in the
CO2 time-series are associated with each other. It is com-
where Pt is the predicted CO2 concentration value and ϕt−1,
puted by determining the correlation between the current
ϕt−2, ϕt−3, ϕt−4, …, ϕt−m are the ‘m’ random error terms

13
110 Journal of Reliable Intelligent Environments (2022) 8:105–115

Fig. 3 CO2 concentration time-series after single differencing

CO2 concentration (Pt) and the concentration ‘k’ lags prior and BIC values and is hence used in the prediction of the
to the current value, (Pt−k): CO2 time-series. The actual and forecasted CO2 concentra-
( ) tion values are shown in Fig. 5.
( ) cov Pt, Pt−k The goodness of fit of the proposed ARIMA (0,1,0)
𝜌 = Cor Pt, Pt−k = √ ( ) √ ( ), (13) model is evaluated by plotting the autocorrelation function
var Pt, × var Pt−k
of the fitted model residuals. The plots of the ACF coef-
ficients of the residuals of the fitted ARIMA model are
where ρ is the correlation between Pt and Pt−k, var(Pt) and
shown in Fig. 6. It is observed that the majority of the ACF
var(Pt−k) are the variances of Pt and Pt−k, and cov(Pt, Pt−k) is
coefficients of the fitted ARIMA model fall well within the
the covariance between Pt and Pt−k, respectively. ACF is use-
limits (− 1.96/√K, + 1.96/√K), K being the total number of
ful in determining the degree to which the present CO2 value
samples observed (the limits are indicated by the dotted blue
is related to the prior values, and the number of previous
line in the residual ACF plot of Fig. 6). As seen in Fig. 6,
observations to be taken into account to obtain the present
there is little correlation between model residuals, with their
and future CO2 concentrations. The ACF and PACF plots
distribution being nearly Gaussian. This confirms that the
against lags for the CO2 time-series (Fig. 4) are used in the
model fit is optimal.
selection of the optimum ARIMA (k, n, m) model. As seen
in Fig. 4, peaks are observed for ACF at lag values of 0 and
12, and for PACF at lag values of 12 and 18, respectively.
5.2 Prediction using support vector regression
In the third step, the values for the orders ‘k’ and ‘m’ of
We constructed the time-series ARIMA model from past
the AR and MA processes are determined. The lags at which
values of CO2 concentration The auto-regressive model is a
significant ACF and PACF values are observed are selected
function of past CO2 values except for the deviations intro-
as the initial order values for the AR and MA processes (0
duced by the error term. The moving average procedure is
and 12 for AR and 12 and 18 for MA respectively). Bayesian
used to eliminate any inter-correlations of the error term to
Information Criterion (BIC) and Akaike Information Crite-
its own past or future values.
rion (AIC) are utilized to determine the most appropriate
However, ARIMA is a general univariate model and it
ARIMA model. ARIMA (0,1,0) is found to have lowest AIC
has been developed on the assumption that our time-series
is linear and stationary. However, there are underlying

13
Journal of Reliable Intelligent Environments (2022) 8:105–115 111

Fig. 4 Autocorrelation function (ACF) and partial autocorrelation function (PACF) values for the CO2 time-series against lags

Fig. 5 Actual and forecasted


values of the time-series of CO2
concentrations using ARIMA
(0,1,0) model. The blue line
illustrates the actual CO2 con-
centration values plotted against
time and the red line shows the
predicted CO2 values for the
same duration

relationships among variables in the time-series that are which is able to predict new cases. This is achieved by train-
very complex and the mathematical form of dependencies ing the SVR model on a training set. This process involves
unknown. Support Vector Machine (SVM) implements a the sequential optimization of an error function. It realizes
learning algorithm useful for recognizing subtle patterns in non-linear mapping of three-dimensional space by kernel
complex data sets. SVM projects the data into high-dimen- function. Support vector regression works on the same prin-
sional space, and maximizes the margins between classes ciple as SVM. The basic idea is to map the input variables
or minimizes the error margin for regression. There are two into high-dimensional feature space via non-linear map-
main categories of SVM: support vector classification (SVC) ping function. After that, the risk minimization principle is
and support vector regression (SVR). used to create the optimal decision function in the feature
SVR is a machine learning technique based on statistics space. This optimal function approximates the relationships
learning. SVR attempts to find a function f (y = f(x) + noise) between the input and output. Let TS be training samples:

13
112 Journal of Reliable Intelligent Environments (2022) 8:105–115

Fig. 6 Plot of autocorrelation and partial autocorrelation coefficients of the residuals using ARIMA (0,1,0) model

TS = {(xi, yi), i = 1, 2, … , l}, (14) ⎧ l � �


⎪ ∑
min 21 ����𝜔2 ���� + C 𝜉i + 𝜉i∗
where, xi 𝜀Rd is input vector of the ith training sample, yi ∈ R ⎪ 𝜔,b i=1
⎪ ⎧
is the corresponding output value, and l is the number of ⎨ ⎪ i y − 𝜔𝜙(x) − b ≤ 𝜀 + 𝜉i , i = 1, 2, .., l (18)
samples in the training set: ⎪ s.t.⎨ −yi + 𝜔𝜙(x) + b ≤ 𝜀 + 𝜉i∗
⎪ ⎪
⎪ ⎩ 𝜉i ≥ 0, 𝜉i∗ ≥ 0
f (x) = 𝜔T 𝜙(x) + b, (15) ⎩
where ω and b are the regression factors, and ϕ(x) is a non- where, ε is the error requirement of regression function to
linear mapping function that maps the input space X into the determine the number of support vectors and guarantee the
high-dimensional feature space f. f(x) can be estimated by sparseness of the solution. ξ and 𝜉 ∗ are the variables that are
minimizing the structure risk function, as described below: used to control the upper and lower bounds of the output, as
∑l shown in Fig. 7.
1 || 2 || ( )
R(f ) = ||𝜔 || + C L𝜀 yi , f (X) (16) The quadratic problem of Eq. 18 is solved using the
2 || || i=1 Lagrange function and the kernel function. The dual form
of optimization problem is described below:
where 12 ||||𝜔2 |||| is used as a measure of function smoothness,
and C is a constant determining the trade-off between model ⎧ l l �
∑ ∑ � � �
complexity and predictive ability. ⎪ max [− 1 𝛼i − 𝛼i∗ K xi xj −
The loss function L𝜀 is described as follows: ⎪ 𝛼,𝛼 ∗ ,b 2
i=1 j=1
⎪∑ l � � ∑ l � �� �
{ ⎪ 𝛼i + 𝛼i∗ 𝜀 − 𝛼i − 𝛼i∗ yi
0 |y − f (x)| ≤ 𝜀 ⎪ i=1
L𝜀 (f (x), y) = (17) i=1
|y − f (x)| − 𝜀 |y − f (x)| ≥ 𝜀 ⎪ ⎧∑ l � �
⎨ ∗
𝛼i + 𝛼i = 0 , (19)
where f(x) is the forecast and y are the corresponding obser- ⎪ s.t.⎪ i=1
⎪ ⎨ 0 ≤ 𝛼i ≤ C
vation. To find ω and b, the convex quadratic problem can ⎪ ⎪ ⎩ 0 ≤i 𝛼i∗ ≤ C
be described as follows: ⎪


13
Journal of Reliable Intelligent Environments (2022) 8:105–115 113

Fig. 7 Support vector regression


where ε is the error requirement
of regression function. ξ and
𝜉 ∗ are used to control the upper
and lower bounds of the output

where αi and αi* are Lagrange’s multipliers, and K(xi xj ) is a for ε and for C, it is performed over the range: (1–100).
Kernel function. The kernel function is a symmetric posi- The SVR model with cost C = 1, ε = 0.1, number of support
tive real number function which satisfies the Mercer condi- vectors = 17, and radial basis kernel function is found to be
tion. Solving the above equations, the regression equation optimum. As shown in Fig. 8, the tuned SVR model is used
is obtained as: to forecast CO2 concentration values.
l
The prediction performance of the two models is depicted
∑ with the help of a graph in Fig. 9. ARIMA predicts that the
f (x) = 𝜔∗ 𝜙(x) + b∗ = 𝛼i − 𝛼i∗ K xi x + b∗ . (20)
( ) ( )
i=1
CO2 concentration reaches the threshold of 2500 in 13 min
and 10 s, and support vector regression model predicts that
The regularization penalty parameter (C) and the allow- it occurs in 12 min and 22 s.
able error (ε) must be tuned before using SVR for predic-
tion. These parameters are tuned using the R function tune.
svm. Grid search is performed over the range: (0.10–0.90)

Fig. 8 Actual and forecasted


CO2 concentration values using
the tuned SVR model with 17
support vectors and radial basis
kernel function. The blue line
shows the actual CO2 concen-
tration values plotted against
time and the green line depicts
the predicted CO2 concentration
values for the same duration

13
114 Journal of Reliable Intelligent Environments (2022) 8:105–115

Fig. 9 Prediction performance


of ARIMA (0,1,0) and the tuned
SVR models are compared and
the time at which they cross the
threshold of CO2 concentration
of 2500 ppm is recorded

6 Performance evaluation Table 1 Performance analysis Model ARIMA SVR


of ARIMA and SVR models
In this section, prediction performance of the two models RMSE 55.32 ppm 47.91 ppm
SVR and ARIMA is evaluated using Root-Mean-Square MAPE 3.79% 2.18%
Error (RMSE) and Mean Absolute Percentage Error
(MAPE).
7 Conclusion
1. Root-Mean-Square Error (RMSE) is useful when large
errors are particularly undesirable: In this paper, we have developed a versatile sensing system
√ using Sensordrone and an Android phone, to measure the
N
change in CO2 values which ultimately affects the air quality

√1 ∑
(21)
( ( ))
RMSE = √ yi − f xi , inside a vehicular chamber. Our sensing system can be ret-
N i=1
rofitted in any vehicle. Using this sensing setup, controlled
where, N is the number of observations, yi is the actual experiments were conducted to collect CO2 data inside a car
CO2 concentration value at time instant i, xi is the input chamber, both in idle condition and city driving condition.
vector (time), and f is the forecast model. The collected data are then used to predict the CO2 concen-
The RMSE for SVR and ARIMA models is 47.91 ppm trations using ARIMA and SVR models. Both these models
and 55.32 ppm, respectively, which indicates that SVR are evaluated using MAPE and RMSE. It is evident that
performs fewer or lesser large errors. SVR model outperformed ARIMA model in predicting CO2
2. Mean Absolute Percentage Error (MAPE) is calculated concentrations. The RMSE for SVR and ARIMA models
by averaging the absolute percentage error terms: is 47.91 ppm and 55.32 ppm, respectively, indicating that
( ) SVR outperformed ARIMA in predicting the CO2 build-up
N
1 ∑ || yi − f xi || inside the vehicle.
MAPE = | | × 100, (22)
N i=0 || yi |
|
where N is the number of observations, yi is the actual car- References
bon-dioxide conc. value at time instant i, xi is the input vec-
tor (time), and f is the forecast model. 1. Aaafoundation (2019) American driving survey, 2014–2017.
https://aaafoundation.org/american-driving-survey-2014-2017/.
MAPE for ARIMA and support vector regression models Accessed 10 Jan 2021
is found to be 3.79% and 2.18%, respectively. This analysis 2. Arndt M, Sauer M (2005) Infrared carbon dioxide sensor and
shows that the forecasting accuracy of SVR is better than its applications in automotive air-conditioning systems. In: Vall-
ARIMA model (Table 1). dorf J, Gessner W (eds) Advanced microsystems for automo-
tive applications 2005. Advanced microsystems for automotive

13
Journal of Reliable Intelligent Environments (2022) 8:105–115 115

applications. Springer, Berlin. https ://doi.org/10.1007/3-540- Intell Environ 3(3):139–157. https ://doi.org/10.1007/s4086
27463-4_24 0-017-0042-1
3. Atkinson WJ, Hill WR, Mathur GD (2017) The impact of 22. Qi C, Stanley N, Pui DYH, Kuehn TH (2008) Laboratory and on-
increased air recirculation on interior cabin air quality. SAE Tech road evaluations of cabin air filters using number and surface area
Pap Ser. https://doi.org/10.4271/2017-01-0169 concentration monitors. Environ Sci Technol 42(11):4128–4132.
4. Fruin SA, Hudda N, Sioutas C, Delfino RJ (2011) Predictive https://doi.org/10.1021/es703216c
model for vehicle air exchange rates based on a large representa- 23. Rastogi K, Lohani D (2020) An internet of things framework to
tive sample. Environ Sci Technol 45(8):3569–3575. https://doi. forecast indoor air quality using machine learning. Commun Com-
org/10.1021/es103897u put Inf Sci. https://doi.org/10.1007/978-981-15-4301-2_8
5. Fu X (2019) In-vehicle exposures at transportation and the health 24. Satish U, Mendell MJ, Shekhar K, Hotchi T, Sullivan D, Streufert
concerns. Indoor Environ Qual Health Risk Healthier Environ . S, Fisk WJ (2012) Is CO2 an indoor pollutant? Direct effects of
https://doi.org/10.1007/978-981-32-9182-9_6 low-to-moderate CO2 concentrations on human decision-making
6. Gładyszewska-Fiedoruk K, Teleszewski TJ (2020) Modeling of performance. Environ Health Perspect 120(12):1671–1677. https
humidity in passenger cars equipped with mechanical ventilation. ://doi.org/10.1289/ehp.1104789
Energies 13(11):2987. https://doi.org/10.3390/en13112987 25. SELTOS | Inspired by the Badass in You (2019) https://www.kia.
7. Grady ML, Jung H, Kim Y, Park JK, Lee BC (2013) Vehicle cabin com/in/our-vehicles/seltos/showroom.html. Accessed 10 Jan 2021
air quality with fractional air recirculation. SAE Tech Pap Ser. 26. Sensordrone: The 6th Sense of Your Smartphone...& Beyond!
https://doi.org/10.4271/2013-01-1494 (2013) https://www.kickstarter.com/projects/453951341/senso
8. Huber J, Weber C, Eberhardt A, Wöllenstein J (2016) Photoacous- rdron e-the-6th-sense -of-your-smart phone and-be. Accessed 10
tic CO2-sensor for automotive applications. Proc Eng 168:3–6. Jan 2021
https://doi.org/10.1016/j.proeng.2016.11.111 27. Siris VA, Fotiou N, Mertzianis A, Polyzos GC (2019) Smart
9. Hyundai controls CO2 level inside Genesis cabin (2018) https application-aware IoT data collection. J Reliab Intell Environ
://www.sae.org/news/2014/11/hyundai-controls-co2-level-insid 5(1):17–28. https://doi.org/10.1007/s40860-019-00077-y
e-genesis-cabin. Accessed 10 Jan 2021 28. Taneja K, Ahmad S, Ahmad K, Attri SD (2016) Time series analy-
10. Jain S (2017) Exposure to in-vehicle respirable particulate mat- sis of aerosol optical depth over New Delhi using Box-Jenkins
ter in passenger vehicles under different ventilation conditions ARIMA modeling approach. Atmos Pollut Res 7(4):585–596.
and seasons. Sustain Environ Res 27(2):87–94. https ://doi. https://doi.org/10.1016/j.apr.2016.02.004
org/10.1016/j.serj.2016.08.006 29. United States Environmental Protection Agency (US EPA) (1991)
11. Jung H (2013) Modeling CO2 concentrations in vehicle cabin. Introduction to indoor air quality. A reference manual
SAE Tech Pap Ser. https://doi.org/10.4271/2013-01-1497 30. Vande JD, Sonderfeld H, Jeanjean APR, Panchal R, Leigh RJ,
12. Laussmann D, Helm D (2011) air change measurements using Allen MA, Monks PS (2018) Experimental and modeling assess-
tracer gases methods and results. Significance of air change for ment of a novel automotive cabin PM removal system. Aerosol
indoor air quality. Chem Emiss Control Radioact Pollut Indoor Sci Technol 52(11):1249–1265. https://doi.org/10.1080/02786
Air Qual. https://doi.org/10.5772/18600 826.2018.1490694
13. Lee ES, Zhu Y (2014) Application of a high-efficiency cabin air 31. Wang H, Li C (2018) Distributed quantile regression over sen-
filter for simultaneous mitigation of ultrafine particle and carbon sor networks. IEEE Trans Signal Inf Process Netw 4(2):338–348.
dioxide exposures inside passenger vehicles. Environ Sci Technol. https://doi.org/10.1109/tsipn.2017.2699923
https://doi.org/10.1021/es404952q 32. World Health Organization (2010) Regional Office for Europe.
14. Lohani D, Acharya D (2016) Real time in-vehicle air quality mon- WHO guidelines for indoor air quality: selected pollutants. World
itoring using mobile sensing. IEEE Ann India Conf INDICON. Health Organization. Regional Office for Europe. https://apps.
https://doi.org/10.1109/indicon.2016.7839099 who.int/iris/handle/10665/260127. Accessed 10 Jan 2021
15. Lohani D, Barthwal A, Acharya D (2018) Predictive modelling 33. Xu X, Duan L (2017) Predicting crash rate using logistic quantile
of in-vehicle CO2 concentration using sensor data analytics. IEEE regression with bounded outcomes. IEEE Access 5:27036–27042.
Sens 2018:1–4. https://doi.org/10.1109/icsens.2018.8589883 https://doi.org/10.1109/access.2017.2773612
16. Lu X, Lu T, Viljane M (2011) Estimation of space air change rates 34. Zhu JY, Sun C, Li VOK (2017) An extended spatio-temporal
and CO2 generation rates for mechanically-ventilated buildings. granger causality model for air quality estimation with heteroge-
Adv Comput Sci Eng. https://doi.org/10.5772/16062 neous urban big data. IEEE Trans Big Data 3(3):307–319. https
17. Luo A, Li X, Li Y, Li J (2018) Application of accurate online ://doi.org/10.1109/tbdata.2017.2651898
support vector regression in atmospheric SO2 concentration pre- 35. Zhu Y, Eiguren-Fernandez A, Hinds WC, Miguel AH (2007) In-
diction. Chin Control Decis (CCDC). https ://doi.org/10.1109/ cabin commuter exposure to ultrafine particles on Los Angeles
ccdc.2018.8408231 freeways. Environ Sci Technol 41(7):2138–2145. https ://doi.
18. Micucci D, Corno F (2019) Reliability on pervasive well-being: org/10.1021/es0618797
will it soon become a reality? J Reliab Intell Environ 5(3):129– 36. Zulauf N, Dröge J, Klingelhöfer D, Braun M, Oremek GM,
130. https://doi.org/10.1007/s40860-019-00087-w Groneberg DA (2019) Indoor air pollution in cars: an update on
19. Nishi Y (1981) Chapter 2 measurement of thermal balance of man. novel insights. Int J Environ Res Public Health 16(13):2441. https
Stud Environ Sci. https://doi.org/10.1016/s0166-1116(08)71079-3 ://doi.org/10.3390/ijerph1613244
20. Ott W, Klepeis N, Switzer P (2007) Air change rates of motor
vehicles and in-vehicle pollutant concentrations from secondhand Publisher’s Note Springer Nature remains neutral with regard to
smoke. J Eposure Sci Environ Epidemiol 18(3):312–325. https:// jurisdictional claims in published maps and institutional affiliations.
doi.org/10.1038/sj.jes.7500601
21. Palumbo F, La Rosa D, Ferro E, Bacciu D, Gallicchio C,
Micheli A, Chessa S, Vozzi F, Parodi O (2017) Reliability and
human factors in ambient assisted living environments. J Reliab

13

You might also like