Abstract
The Industry 4.0 and smart city solutions are impossible to be implemented without using IoT devices. There can be several problems in acquiring data from these IoT devices, problems that can lead to missing values. Without a complete set of data, the automation of processes is not possible or is not satisfying enough. The aim of this paper is to introduce a new algorithm that can be used to fill in the missing values of signals sent by IoT devices. In order to do that, we introduce Shepard local approximation operators in Riesz MV-algebras for one variable function and we structure the set of possible values of the IoT devices signals as Riesz MV-algebra. Based on these local approximation operators we define a new algorithm and we test it to prove that it can be used to fill in the missing values of signals sent by IoT devices.
1 Introduction
As part of the new industry revolution, the so-called Industry 4.0 www (
2016), the automation of processes takes a more and more crucial role (Wollschlaeger
et al.,
2017). The process automation is based on near real time data collected by IoT devices. There are several challenges in developing applications to automate processes based on IoT devices (Heinis
et al.,
2017; Kamienski
et al.,
2017), one of them is to ensure sets of complete and validated data. Missing data can be caused by many things, but most of the times it is due to a malfunction of an IoT device or a communication problem between the IoT device and the processing applications. There is a continuous focus on finding new methods to fill in the missing data using various mathematical methods (Zhao and Zheng,
2017; Ruan
et al.,
2017; Leturiondo
et al.,
2017; Xu
et al.,
2017), methods that can be used to develop software modules that act as input validators for industrial automated control systems. In reality, the signal collected by IoT devices creates a discrete-time signal from a continuous process, called sample (Rajeshwari and Rao,
2008). The method we propose in this paper can be applied on both signals and samples. If signals are considered, in order to fill in some missing data, a sample can be considered in the temporal vicinity of the missing value and the proposed method can be applied on it. Considering this, further in the paper we will refer to signals.
In this paper, new Shepard local approximation operators are introduced in Riesz MV-algebras (Bede and Di Nola,
2004; Di Nola
et al.,
2003), and based on the Riesz MV-algebra structure of IoT devices signals, a new algorithm that can fill in the missing data is defined and tested to prove that it is suitable for the role it was designed. Since several kernels can be used by the Shepard local approximation operators, the most known ones will be used in numerical experiments, considering several parametrizations, in order to determine which are suitable for real applications. In order to have a comprehensive view about the performance of the proposed method, in the numerical experiments the signal-to-noise ratio (SNR) was also determined.
In Noje
et al. (
2003) it was proved that RGB model has the structure of vectorial MV-algebras. The same algebraic structure is used in this paper to model IoT devices signals. This leads us to the idea of further applications of the new proposed method in image processing, like image zooming or reconstruction of missing parts of images.
2 Materials and Methods
In 1958, multivalued algebras, shortly named MV-algebras, were introduced by Chang (
1958;
1959) as the algebraic structures corresponding to the
∞-valued Lukasiewicz logic.
Definition 1.
An MV-algebra is a structure
$
\mathcal{A}=\left(A,\oplus ,\lnot ,{0_{A}}\right)$ if and only if the following axioms are fulfilled:
In a MV-algebra
$
\mathcal{A}$, the constant
$
{1_{A}}$ and the binary operations ⊙ and ⊖ can be defined as follows:
Also we can define a distance function
$
d:A\times A\to A$ as follows:
This distance, as it is defined, is a metric and plays a very important role in image and signal processing.
By introducing an additional external operation, in 2003, the concept of Vectorial MV-algebras (Noje and Bede,
2003), shortly named VMV-algebras, was defined. It is an algebraic structure that is used in image processing (Noje and Bede,
2001; Noje
et al.,
2003; Noje,
2002). Let consider an MV-algebra
$
\mathcal{A}$ and an external operation defined as follows:
Definition 2.
The MV algebra
$
\mathcal{A}$ is an VMV-algebra if and only if the following axioms are fulfilled:
VMV-algebras inspired new algebraic structures, MV-modules and Riesz MV-algebras, structures that were introduced and studied in Bede and Di Nola (
2004), Di Nola
et al. (
2003).
Definition 3.
An MV-algebra
$
\mathcal{A}$ is a truncated MV-module over the unital latticeal ring
$
(R,v)$ if an external operation
$
\bullet :{\mathbb{R}_{+}}\times A\to A$ is defined, such that the following properties are fulfilled for
$
\forall \alpha ,\beta \in {\mathbb{R}_{+}}$ and
$
\forall x,y\in A$.
If property
is also fulfilled, then
$
\mathcal{A}$ is an unital MV-module over unital ring
$
(\mathbb{R},v)$.
Definition 4.
If an MV-algebra is a truncated unital module over
$
(\mathbb{R},1)$, it is a Riesz MV-algebra.
In Di Nola
et al. (
2003), it was proved that in any Riesz MV-algebra the following properties are fulfilled:
for any
$
x,y\in A$ and
$
\alpha ,\beta \in {\mathbb{R}_{+}}$.
It was also proved that any Riesz MV-algebra is an VMV-algebra, but the reciprocal statement is not true.
Example 1.
If we consider a Boolean algebra
$
\mathcal{A}$ and we define
$
\alpha \bullet x=x,\forall x\in A$ and
$
\alpha \in {\mathbb{R}_{+}}$, it is easy to prove that all axioms of VMV-algebras are fulfilled, but since
$
0\bullet x=x$ the third axiom of Riesz MV-algebras is not fulfilled, thus
$
\mathcal{A}$ is not a Riesz MV-algebra. There are examples of VMV algebras that are also Riezs MV-algebras, like the RGB model (Noje and Bede,
2001; Noje
et al.,
2003; Noje,
2002) and the fuzzy sets.
Local approximation operators (Bittner,
2002; Lazzaro and Montefusco,
2002; Renka,
1988a; Zuppa,
2004) are used in data processing (Renka,
1988b,
1988c). Two variable Shepard local approximation operators, operators with application in image processing and similar structure data, were introduced (Shepard,
1968).
In Bede and Di Nola (
2004) it was proved that Riesz MV-algebras are algebraic and topological structures for data processing, because any method developed in the classical numerical analysis is applicable in Riesz MV-algebras if the Riesz MV-algebras operations are used.
Based on this statement, we introduce Shepard local approximation operators on Riesz MV-algebras. Let us consider a Riesz MV-algebra
$
\mathcal{A}$, and a function
$
f:[0,n]\to A$ and a Shepard kernel (Shepard,
1968), which is a strictly decreasing function
$
K:[0,1]\to {\mathbb{R}_{+}}$. Also, we consider the set
Definition 5.
A Shepard local approximation operator is a function
$
S:[0,n]\to A$ defined as follows:
where ⊕ and ∙ are the Riesz MV-algebra operations.
Considering the statement that any method developed in the classical numerical analysis is applicable in Riesz MV-algebras if the Riesz MV-algebras operations are used, it is easy to see that all properties of local Shepard approximation operators hold.
3 Results
For industrial applications, the signals received from IoT devices are processed using computers. If we consider the numerical data types used to store information in computer memory, if they are stored using t bits, it means that the possible values for data are in the interval
$
[0,{2^{t}}-1]$. Some of the operations are partial operations, for instance + is a partial operation. This leads us to consider that a suitable algebraic structure for these data types is Riesz MV-algebra.
3.1 Shepard Local Approximation Operators for IoT Device Signal Processing
It was proved that the structure
$
([0,{2^{t}}-1],\oplus ,\lnot ,0)$ is an MV-algebra (Noje and Bede,
2001), if the following definitions are used:
$
\forall x,y\in [0,{2^{t}}-1]$.
We consider the external operation
$
\bullet :{\mathbb{R}_{+}}\times [0,{2^{t}}-1]\to [0,{2^{t}}-1]$, defined as follows:
$
\forall a\in {\mathbb{R}_{+}}$ and
$
\forall x\in [0,{2^{t}}-1]$.
It was proved that the structure
$
([0,{2^{t}}-1],\oplus ,\lnot ,0,\bullet )$ is a vectorial MV-algebra and it is easy to see that it is also a Riesz MV-algebra (Noje,
2002).
If we use the above definition of ⊕ and ∙ operations and the formula of the Shepard local approximation operator from Definition
5, we can define an algorithm that can be used to fill in the missing data of signals received from IoT devices.
In this paper we consider the most known kernels:
where
λ is a parameter that can influence the performance of obtained results, and
q is the degree of the Shepard–Jackson kernel. Several other types of kernels can be considered (Jun-Bao
et al.,
2014; Xiuyuan
et al.,
2016; Xiaodan and Bohu,
2001), but testing the method using these three is enough to prove its efficiency.
3.2 The Missing Data Fill-in Algorithm and Testing Results
We consider that the data sent by an IoT device on regular time intervals is a time-based function
We also consider that 0 is the moment when the first signal was sent, and that 1 is the length of the time interval when a new signal is transmitted by an IoT device. In the formula of Definition
5,
$
{x_{i}}$ are the time intervals when new data was received and
x are the time intervals when no data was received and that has to be approximated.
The fill-in algorithm has the following steps:
-
1. A kernel has to be selected;
-
2. The parameter λ is set;
-
3. If Shepard–Jackson kernel if used, the degree q of the kernel is set;
-
4. The radius r, that influence how many received values are considered in the approximation of missing values, is set;
-
5. All missing values are approximated.
In order to be able to determine the dependency of the algorithm accuracy depending on the kernel used and on parametrization, several experiments were performed. In each experiment all kernels and several random parametrizations were considered. We selected
$
f(x)=x\sin (\frac{\pi x}{20})$ as test function and a set of 30 signals that should be received. Several values were supposed to be missing and were approximated. To reduce the code complexity, we considered a situation where each z number of values is missing. A continuous function was considered, since one of the purposes of this algorithm is to be used to approximate missing values collected by IoT sensor system designed to monitor the ethanol fermentation during the bioethanol and wine production.
The aim of this paper is to determine which kernel of the three considered is producing better results. The performance comparison of the new method introduced in this paper using the three considered kernels and several parametrizations has been done using the formula
because we are interested in the overall cumulated error.
We can raise the question: what results does this new method produce compared to other existing methods? For this reason we decided to also calculate the Signal-to-noise ratio (SNR) (Johnson,
2019; González and Woods,
2008), but we will not go deeper in its analysis, this being the target of a later work.
3.3 Numerical Results
In this experiment we consider two situations: one is when each second value is missing, and the other is when each third value is received. Also, several parametrizations are considered. After running the tests, we get the approximation errors listed as follows (Tables
1,
2,
3,
4).
Table 1
Approximation errors when each second value is missing using formula (P).
Parametrization |
Shepard kernel |
Exponential kernel |
Shepard–Jackson kernel |
$
r=5$,
$
\lambda =2$,
$
q=15$
|
4.33074 |
17.7671 |
90.8879 |
$
r=3$,
$
\lambda =10$,
$
q=15$
|
3.94205 |
3.9453 |
33.3609 |
$
r=5$,
$
\lambda =10$,
$
q=15$
|
3.94205 |
4.87258 |
90.8879 |
$
r=10$,
$
\lambda =10$,
$
q=15$
|
3.94205 |
15.685 |
93.3031 |
$
r=10$,
$
\lambda =10$,
$
q=60$
|
3.94205 |
15.685 |
233.883 |
Table 2
Approximation errors when each third value is received using using formula (P).
Parametrization |
Shepard kernel |
Exponential kernel |
Shepard–Jackson kernel |
$
r=5$,
$
\lambda =2$,
$
q=15$
|
33.5505 |
26.5892 |
181.714 |
$
r=3$,
$
\lambda =10$,
$
q=15$
|
38.5835 |
35.4093 |
69.8386 |
$
r=5$,
$
\lambda =10$,
$
q=15$
|
38.5835 |
17.8535 |
182.038 |
$
r=10$,
$
\lambda =10$,
$
q=15$
|
38.5835 |
23.5176 |
227.683 |
$
r=10$,
$
\lambda =10$,
$
q=60$
|
38.5835 |
23.5176 |
296.172 |
Table 3
Approximation errors when each second value is missing using formula (SNR).
Parametrization |
Shepard kernel |
Exponential kernel |
Shepard–Jackson kernel |
$
r=5$,
$
\lambda =2$,
$
q=15$
|
861.081277 |
89.34913291 |
2.630481509 |
$
r=3$,
$
\lambda =10$,
$
q=15$
|
958.1572323 |
957.2236846 |
18.79983289 |
$
r=5$,
$
\lambda =10$,
$
q=15$
|
958.1572323 |
739.1964225 |
2.630481509 |
$
r=10$,
$
\lambda =10$,
$
q=15$
|
958.1572323 |
113.0449305 |
3.490112323 |
$
r=10$,
$
\lambda =10$,
$
q=60$
|
958.1572323 |
113.0449305 |
0.683421307 |
Table 4
Approximation errors when each third value is received using using formula (SNR).
Parametrization |
Shepard kernel |
Exponential kernel |
Shepard–Jackson kernel |
$
r=5$,
$
\lambda =2$,
$
q=15$
|
47.08291553 |
43.50653079 |
1.39908321 |
$
r=3$,
$
\lambda =10$,
$
q=15$
|
37.82563498 |
43.90402941 |
11.7046936 |
$
r=5$,
$
\lambda =10$,
$
q=15$
|
37.82563498 |
106.9724316 |
1.393220187 |
$
r=10$,
$
\lambda =10$,
$
q=15$
|
37.82563498 |
53.8759769 |
0.769694034 |
$
r=10$,
$
\lambda =10$,
$
q=60$
|
37.82563498 |
53.8759769 |
0.574528505 |
As we can see, by using Shepard and exponential kernels we get the best results. This result leads us to further consider only the usage of Shepard and exponential kernels as suitable for applications. In what follows, we present the pattern of approximated values printed over the original function for two different situations.
3.3.1 The Pattern of Approximated Values in the Case when Each Second Value is Missing. Parametrization:
$
r=3$,
$
\lambda =10$ (Fig. 1)
In the considered example, the approximated values generated using the Shepard and exponential kernels deliver very similar results considering both the error of approximation and shapes of the original and the approximated functions. It has to be mentioned that we get a very small advantage by using the exponential kernel.
Fig. 1.
The pattern of approximated values in the case when each second value is missing. For
$
r=3$,
$
\lambda =10$ using Shepard/exponential kernel.
3.3.2 The Pattern of Approximated Values in the Case when Each Third Value is Received. Parametrization:
$
r=5$,
$
\lambda =10$ (Fig. 2)
In this second example, the approximated values generated using the Shepard and exponential kernels deliver very different results both considering the error of approximation and the shapes of the original and the approximated functions. The shape of the function obtained using the exponential kernel fits much better to the shape of the original function than the shape of the function obtained using the Shepard kernel. Considering this, we can state that by using the exponential kernel we get a very clear advantage, especially when a large amount of data is missing.
Fig. 2.
The pattern of approximated values in the case when each third value is received. For
$
r=5$,
$
\lambda =10$ using Shepard/exponential kernel.
4 Conclusion
As mentioned above, we further consider only the usage of Shepard and exponential kernels for industrial applications. The results are influenced the most by value of λ when Shepard kernel is used, but there does not exist a clear dependence of approximation error on parametrization when exponential kernel is used. Thus, methods should be further developed to determine the proper set of parameters for each of the kernels. This parametrization may depend also on the shape of the function that has to be approximated and on the volume of missing data. In this optimization process, other error measuring methods can be considered, depending on the real industrial process that is to be modelled.
Another research direction is to introduce Shepard local approximation operators to approximate two-dimension functions, and a more general case for multi-dimension functions, since in most of the cases, a value of a production system is influenced by several parameters, not only by one (Noje
et al.,
2019).
The structure
$
([0,{2^{t}}-1],\oplus ,\lnot ,0,\bullet )$ that models the model of IoT devices signals is also the structure that models the RGB model (Noje
et al.,
2003). This leads us to the idea of further applications of the new proposed method in image processing, like image zooming or reconstruction of missing parts of images.