Sensor node hardware design for monitoring water quality
This section gives a simple overview of the building blocks of a sensor node for monitoring water quality parameters. The water quality sensors are portable, but powerful tools used for monitoring the microbial and the chemical parameters of water quality at water stations. An integral component of a water quality sensor is the communication technology. Communication technologies can be classified into two categories, namely local communication technology and remote communication technology. The local communication technology is used to connect a sensor to another sensor, as well as a BS. The remote communication technology is responsible for delivering water quality information to a remote center. The remote communication technology acts as an internet gateway in the network. An internet gateway simply means an internet access point via which the system is connected to the internet.
The water quality sensors are made up of four essential modules, namely sensor, micro-controller, power supply, and communication. The sensor module is used for measuring the desired parameter of water quality in the form of analog information, and converting the measured information into a digital form through an analog-to-digital converter (ADC).
The micro-controller module is responsible for the coordination of the processes that integrates the sensor module with other modules in a way to execute instructions that relates to the measurements of the sensor module. Other key functions carried out by the micro-controller involves the collection of the information measured by the sensor unit, storing of the gathered measurements in its storage chip, and transferring of the information collected using the communication technology of the communication module to a BS.
The communication module is important in the water quality sensor node architecture as it provides a suitable platform for water quality information transmission, and reception of important control signals. The communication module is usually implemented as an RF transceiver. The RF transceiver is equipped with an antenna, and has the capabilities for both information transmission and reception. The CC2420 ZigBee radio is an example of a communication technology for local information transmission, and is defined in the IEEE 802.14.4 specification [43]. The ZigBee radio is considered suitable to be employed in this work because of its low-cost and low-power features. Each of the ZigBee-based water quality sensors communicates directly with a local BS over the license-free ISM bands (such as 2.4 GHz and 915 MHz). Through a remote communication technology employed at the BS, which acts as a gateway to the internet (such as 2G, 3G, or LTE networks), the water quality information received from the sensors is delivered to the remote monitoring stations [2].
The power supply section is a crucial unit in water quality sensor node architecture as it provides energy within the node for powering different modules. The power supply unit may be composed of key devices like an energy harvester and a battery. In this work, an RF-based energy harvester from Powercaster® (for example the P2110 device) [44] is considered, and incorporated in the power supply unit for harvesting RF energy from an IPS to recharge the water quality sensor in-built batteries. The RF energy harvester works by converting the RF energy received from an IPS into electrical energy through an RF-to-DC converter. The energy is suitable for powering the sensor node. A typical structure of a WSN system that employs water quality sensors devoted to the monitoring a body of water and its quality is presented in Fig. 1.
System architecture design
In the system architecture, a WPSN system powered by intended RF power sources (IPS) is considered. The system contains two classes of heterogeneous networks. Let the water quality sensors a in class A be denoted by a ∈ {a1, a2, .., A} , while the water quality sensors b in class B is denoted by b ∈ {b1, b2, .., B}. Also, a set of IPS represented by c ∈ {c1, c2, .., C} are distributed in the system at specified positions. To provide sufficient energy for powering the water quality sensor nodes, more IPS devices are deployed. The sensor nodes a in class A are distributed in a determined fashion to target some strategic locations, while the sensors in class B are deployed in a random manner, as presented in Fig. 2. The main essence of the two classes of network considered in this study is to cater for several needs, for example the enhancement of effective monitoring of different parameters of water quality such as pH and E. coli.
The multi-class approach employed in this work helps to properly classify the sensor nodes based on their distance specifications and deployment strategy, as depicted in Fig. 2. The IPSes are employed to achieve wireless transmission of energy to the sensors contained in the two classes of network during the DL phase, while only c1 has the capability for both wireless energy transmission and wireless information reception in the DL and UL phases. In addition, it is equipped with an internet access capability for remote delivery of water quality information to water control centers. A controller is employed to connect the IPSes, controlling their operation based on the newly proposed TDMA protocol, which circumvents any occurrence of interference in energy transmissions. The new TDMA protocol is given in Fig. 3. The controller switches the available IPSes on and off at a calculated time, in a sequential manner. To create a suitable platform for the sensors deployment, a section for monitoring the quality of water, which allows constant water flow, is designed as in [2, 45, 46]. The water body that is scheduled for monitoring is pumped to the designed water section in an enclosed location.
In the system architecture, the sensor nodes a in class A are provided with equal optimal EH time, because of their nearness to the IPS. Unlike the sensor nodes in class A, there are different distances within the sensor nodes in class B because of the random approach employed for their deployment. Therefore, there may be some significant variations in the energy a sensor node in class B is able to harvest in a DL-EH block. This situation is an inherent issue in WPSNs that is typically referred to as the doubly-near-far problem. When this problem is encountered in a network, the energy that a particular sensor node which is not far from a BS is able to harvest is significant compared to the energy that another sensor node which is far from the BS is able to harvest. This can be attributed to the condition of the wireless channels. To tackle the doubly-near-far issue in this paper, unlike the same optimal EH time that is allotted to class A sensors, different optimal EH time is provided to the individual sensors in class B. In addition, in the UL stage, an optimal information communication period is provided to class A sensors, as well as class B sensors, based on their distances to the BS, to ensure completeness in the transmission of their individual information to the BS. To achieve this, in each information transfer block, the distances to the BS of the sensor nodes a and b in classes A and B, respectively, are considered, and based on this distance, an optimal time is allotted to an individual sensor to transfer its individual information. The new TDMA protocol described here is summarized in Fig. 3.
Wireless channel model
The environment of the application is assumed to be a static environment. As a result, the wireless channels between the sensor nodes and the IPS c are modeled using a quasi-static fading model. The channels that connect the sensor nodes a and b to the BS are denoted with complex variables \( {\overset{\sim }{m}}_{c,a} \)and \( {\overset{\sim }{g}}_{c,b} \) in the UL phase, for classes A and B, respectively. While the reversed channels that go from an IPS to the sensor nodes a and b are denoted with \( {\overset{\sim }{n}}_{c,a} \)and \( {\overset{\sim }{u}}_{c,b} \) in the DL phase, for classes A and B. Consequently, the channel power gains for the two classes are derived as \( {m}_{c,a}={\left|\ {\overset{\sim }{m}}_{c,a}\ \right|}^2 \) and nc, a= \( {\left|\ {\overset{\sim }{n}}_{c,a}\ \right|}^2 \)for class A, and \( {g}_{c,b}={\left|\ {\overset{\sim }{g}}_{c,b}\ \right|}^2 \) and \( {u}_{c,b}={\left|\ {\overset{\sim }{u}}_{c,b}\ \right|}^2 \) for class B.
In addition, each IPS is assumed to have knowledge of the channel state information (CSI), and as a result employs the CSI knowledge to ensure the transmission of optimal energy to individual sensors in the two classes in an adaptive fashion.
The proposed MCMIS WPSN system is further described as follows:
Class A
In a particular jc period, with the application of the TDMA protocol in Fig. 3, an EH time of 0 ≤ jc ≤ 1, jc ≥ 0, c = 1, …, C is allotted to an IPS c to send energy via the DL channels to sensors a, while the scheduled time for sensor nodes a for transferring their signals over channel m1, a, to BS/c1 in the UL phase is represented with time period ζa, a = 1, 2, …,A, with a length of 0 ≤ ζa ≤ 1. Therefore, the time allocated to an IPS c for energy transmission to the sensor nodes in class A, and the scheduled time for the sensor nodes to communicate their separate signals in the UL phase is given in (1) as follows:
$$ {\sum}_{\mathrm{c}=1}^{\mathrm{C}}{\mathrm{j}}_{\mathrm{c}}+{\sum}_{\mathrm{a}=1}^{\mathrm{A}}{\upzeta}_{\mathrm{a}}\le 1 $$
(1)
In (2), the amount of power that a sensor node receives from an IPS is formulated as follows:
$$ {x}_{c,a}=\sqrt{n_{c,a}}{x}_c+{z}_a,\forall a=1,2,\dots, A $$
(2)
where xc, a means the power signal received by senor a, and za indicates the background noise at a as a result of the energy received from an IPS c. xcdenotes the arbitrary complex random signal of an IPS c that satisfies E[|xc|2] = Pc, where Pc means the IPS c transmission power, and is assumed large enough that the background noise at a is insignificant as a consequence.
In the DL phase, the energy a sensor node a harvests from an IPS c, in a given time-slot, is formulated in (3) as follows:
$$ {E}_{c,a}={\varepsilon}_a{P}_c{n}_{c,a}{j}_c,\forall c=1,2,\dots, C,\forall a=1,2,..,A $$
(3)
Moreover, the overall energy received by sensor node a from the IPS c is modeled in (4) as follows:
$$ {E}_a={\varepsilon}_a{\sum}_{c=1}^C{P}_c{n}_{c,a}{j}_c,\forall a=1,2,\dots, A $$
(4)
where εa denotes the efficiency of the RF-to-DC converter module of sensor node a and is defined as 0 ≤ εa ≤ 1, for a = 1, 2, …, A. The assumption is made that ε1 = … = εA = ε, for simplicity sake.
To optimize the energy consumption of each sensor node a, only a fraction of the energy obtained by each of them in (4) is allowed to be consumed for information transmission. Consequently, an average transmission power is defined for the sensor nodes as modeled in (5) as follows:
$$ {P}_a=\frac{\varPsi_a{E}_a}{\upzeta_a},\forall a=1,\dots, A $$
(5)
In (5), Pais the average transmission power defined for a sensor node a., while Ψa indicates the fixed value allowable part of the energy available to a to transfer information to the BS. Ψa is defined as Ψa = … = ΨA = Ψ, for convenience. It is important to mention that 1 − Ψ, which is the remaining fraction of the harvested energy, is utilized for operating the internal modules of a sensor node a.
The received signal at the BS c1 from individual sensors a in each UL time-slot is given by:
$$ {x}_{c_1,a}=\sqrt{m_{1,a}}{x}_a+{\mathrm{z}}_{c_1},\forall a=1,\dots, A $$
(6)
where \( {x}_{c_1,a} \)means the signal received by the BS c1, xadenotes an arbitrary random signal of a sensor node a that satisfies E[|xa|2] = Pa, and \( {z}_{c_1} \) is used to denote the background noise at c1 as a result of the signal received from a sensor node a. For the transmission of information in the UL by sensor a to c1, the capacity of the channel is defined as (7), based on Shannon’s law [47]:
$$ {D}_a={\upzeta}_a{\mathit{\log}}_2\left(1+\frac{P_a{m}_{1,a}}{\Gamma {\sigma}^2}\right) $$
(7)
In (7), the signal transfer time (related to the channel bandwidth of the system) is denoted with ζa, the SNR gap is represented with Γ, and the noise power is represented with σ2. The maximum throughput that sensor a can achieve in b/s/Hz is represented with Ra and is defined in (8) as follows:
$$ {R}_a\le {\upzeta}_a{\mathit{\log}}_2\left(1+\frac{P_a{m}_{1,a}}{\Gamma {\sigma}^2}\right) $$
(8)
By substituting (5) and (4) into (8), the throughput rate can be derived in the form of
$$ {R}_a\left(j,\upzeta \right)={\upzeta}_a{\mathit{\log}}_2\left(1+{\alpha}_a\frac{\sum_{c=1}^C{j}_c}{\upzeta_a}\right),\forall a=1,2,\dots, A $$
(9)
where j = [j1, j2, j3, …, jC], ζ = [ζ0, ζ1, …, ζa], and αa represents the SNR at c1 and is defined in (10) as follows:
$$ {\alpha}_a=\frac{\Psi_a\ {\varepsilon}_a{m}_{1,a}{\sum}_{c=1}^C\ {P}_c{n}_{c,a}{j}_c}{\Gamma {\sigma}^2},\forall a=1,.,A $$
(10)
Consequently, for all the of sensors a, the sum-throughput is defined in (11) as follows:
$$ {R}_{\mathrm{sum}}\left(j,\upzeta \right)={\sum}_{a=1}^A{R}_a\left(j,\upzeta \right),\forall a=1,2,..,A $$
(11)
Class B
In class B, an optimal EH time with a length of 0 ≤ t1ξ0 ≤ 1 is calculated and allotted to an IPS c to transmit energy to each individual sensor b over the DL communication channels, while an optimal period of time ξb is apportioned to a sensor b to communicate its signal through the UL links to c1 over a channel g1, b. The apportioned time ξb, b = 1, 2, …, B, has a length of 0 ≤ ξb ≤ 1. Therefore, the time period apportioned to an IPS c for the transmission of energy, as well as the time period apportioned to sensor nodes b for communicating their different signals to the BS, is formulated in (12) as follows:
$$ {\sum}_{c=1}^C{t}_c{\upxi}_0+{\sum}_{b=1}^B{\upxi}_b\le 1 $$
(12)
The amount of power that a sensor node receives from an IPS is formulated as follows:
$$ {x}_{c,b}=\sqrt{u_{c,b}}{x}_c+{z}_b,\forall b=1,2,\dots, B $$
(13)
In the DL phase, the energy a sensor node b harvests from an IPS c, in a given time-slot, is formulated in (14) as follows:
$$ {E}_{c,b}={\varepsilon}_b{P}_c{u}_{c,b}{t}_c{\upxi}_0,\forall c=1,2,\dots, C,\forall b=1,2,..,B $$
(14)
The total energy received by sensor node b from the IPS c is modeled in (15) as follows:
$$ {E}_b={\varepsilon}_b{\sum}_{c=1}^C{P}_c{u}_{c,b}{t}_c{\upxi}_0,\forall b=1,2,\dots, B $$
(15)
Once again, it is assumed for convenience that ε1 = … = εB = ε.
From (15), a part of the energy obtained by each sensor b is consumed for information communication in the UL phase and is formulated in (16) as follows:
$$ {P}_b=\frac{\varPsi_b{E}_b}{\upxi_b},\forall b=1,2,\dots, B $$
(16)
where Pbis the average transmission power defined for a sensor node b, while Ψb indicates the allowable part of the energy contained in b for information communication to the BS, which is fixed. Ψb is defined as Ψb = … = ΨB = Ψ, for convenience. The rest of 1 − Ψ is utilized for operating the modules of a sensor node b.
The received signal at c1 from individual sensors b in each UL time block is:
$$ {x}_{c_1,b}=\sqrt{g_{1,b}}{x}_b+{z}_{c_1},b=1,\dots, B $$
(17)
The attainable throughput rate in b/s/Hz of sensor node b is defined as follows:
$$ {R}_b\left(t,\upxi \right)={\upxi}_b{\mathit{\log}}_2\left(1+{\gamma}_b\frac{\sum_{c=1}^C{t}_c{\upxi}_0}{\upxi_b}\right),\forall b=1,2,..,B $$
(18)
where t = [t1, t2, t3, …, tC], ξ = [ξ0, ξ1, …, ξb]. γb is the SNR received at c1, which is caused by the transferred information from sensor node b. It is defined in (19) as follows:
$$ {\gamma}_b=\frac{\Psi_b\ {\varepsilon}_b{g}_{1,b}{\sum}_{c=1}^C\ {P}_c{u}_{c,b}{t}_c}{\Gamma {\sigma}^2},\forall b=1,..,B $$
(19)
Hence, for all of the sensors b, the sum-throughput is defined in (20) as follows:
$$ {R}_{\mathrm{sum}}\left(t,\upxi \right)={\sum}_{b=1}^B{R}_b\left(t,\upxi \right),\forall b=1,2,..,B $$
(20)
Maximization of attainable throughput
The maximization of the WPSN system attainable throughput is described in this segment. To achieve this, a sum-throughput optimization strategy is employed. Based on the optimization technique, the timing schedules for the harvesting of energy and transmission of information by sensor nodes a and b were optimized in joint fashion. With this, an improved fairness in the allocation of harvesting timing, as well as fairness in the rates of the sensor nodes information transmission, is achieved. Consequently, an enhanced system overall throughput rate is achieved with minimal energy consumption. The general representation of the system attainable throughput is formulated as a maximization problem in (P1). From (1), we have:
(P1):
$$ {}_{j,\upzeta, \mathrm{t},\upxi\ }{}^{\max}\max\ {R}_{\mathrm{sum}}\left(j,\upzeta \right)+{R}_{\mathrm{sum}}\left(t,\upxi \right)+\dots +{R}_{\mathrm{sum}}\left(s,\upsilon \right) $$
(21)
subject to:
$$ {\sum}_{c=1}^C{j}_c+{\sum}_{c=1}^C{t}_c{\upxi}_0+{\sum}_{a=1}^A{\upzeta}_a+{\sum}_{b=1}^B{\upxi}_b\le 1 $$
(21a)
$$ {j}_c\ge 0,\forall c=1,2,..,C $$
(21b)
$$ {t}_c\ge 0,\forall c=1,2,..,C $$
(21c)
$$ {\upzeta}_a\ge 0,\forall a=1,2,..,A $$
(21d)
$$ {\upxi}_b\ge 0,\forall b=1,2,..,B $$
(21e)
The objective function of the optimization problem is given in (21), while the constraints of the optimization problem are (21a) to (21e). Constraint (21a) is the timing schedules for energy harvesting and information transmission. The non-negative constraints (21b), (21c), (21d), and (21e) are defined for the decision variables, while variables j, t, ζ, ξ are unknown in (P1). The maximization problem in (P1) is a non-convex problem since (9) and (18) contain a log function. By exploiting the structure of the problem, variable tcξ0 is changed to ξ0, c, and the natural log form of the log function is obtained. They are substituted in (9) and (18) respectively. Based on this development, the optimization problem in (P1) is transformed to a convex problem. The newly generated problem from the original problem is defined as (P2). The proof for the new problem is provided in Appendix 1. Consequently, the newly transformed problem is solvable by employing any standard convex approach [2, 48].
Moreover, in order to provide a solution to unfairness in energy harvesting as a result of the transformation, we formulated a new problem as (P3) to guarantee the optimality of j and t, which is indicated as j* and t*. Consequently, these values (j* and t*) are employed in (P1). The formulation of the minimization problem for addressing the unfairness in energy harvesting among the sensors is expressed in (22) as follows:
(P3):
$$ \underset{j^{\ast },{t}^{\ast }}{\min }E\left[{\left({E}_a-{\overline{E}}_a\right)}^2+{\left({E}_b-{\overline{E}}_b\right)}^2\right] $$
(22)
s.t:
$$ {\sum}_{c=1}^C{j}_c+{\sum}_{c=1}^C{t}_c=1 $$
(22a)
$$ {j}_c\ge 0,\forall c=1,2,..,\mathrm{C} $$
(22b)
$$ {t}_c\ge 0,\forall c=1,2,..,\mathrm{C} $$
(22c)
In (22), the minimum energy received by a and b is defined by \( {\overline{E}}_a \) and \( {\overline{E}}_b \), and is calculated based on (23) and (24).
$$ {E}_a=E\left({E}_a\right)=\frac{\sum_{a=1}^A{E}_a}{A} $$
(23)
$$ {E}_b=E\left({E}_b\right)=\frac{\sum_{b=1}^B{E}_b}{B} $$
(24)
(P2) is contingent to variables j, t, ξ0, which are unknown. To determine the intermediate harvested energy for Ea, a = 1, 2…, A, as well as Eb, b = 1, 2…, B, arbitrary values could be used for jc and ξ0. The proof for determining optimal j* and t* is provided in Appendix 2.
In addition, to handle multiple IPS allocation in an efficient manner to ensure fairness in harvesting and signal transmission rates among class A and class B sensors, an efficient algorithm is developed. Moreover, to determine the rates of fairness in resource allocation and signal transmission in the system, the concept of Jain’s fairness index [38, 49] is employed, as expressed in (25).
$$ JF=\frac{{\left({\sum}_{k=1}^v{R}_v\left(\beta \right)\right)}^2}{v.{\sum}_{k=1}^v{\left({R}_v\left(\beta \right)\right)}^2\ } $$
(25)
In (25), v = a + b , which represents the complete network of sensors in classes A and B. β = (j + ζ) + (ξ) is the combined time length for classes A and B sensor nodes. While, the overall aggregate of the sum-throughput of class A and class B is defined by Rv(β) = Ra(j, ζ) + Rb(ξ). For the sake of performance measurement, the best case, as well as the worst case, of the overall sensor nodes in class A and class B, is expressed by (26) as follows:
$$ \frac{1}{V}\le JF\le 1 $$
(26)
According to (26), 1 indicates a maximum fairness ratio, while \( \frac{1}{V} \)means a minimum fairness ratio.
Efficient allocation algorithm for energy and information transmission scheduling
In this section, an efficient resource allocation algorithm is presented and is defined as Algorithm 1. The essence of the proposed algorithm is to ensure fairness in EH-DL timing schedules among the system sensor nodes. In addition, it is aimed to achieve an enhanced rate of information transfer among the network sensor nodes in the UL. To achieve this, the proposed algorithm optimizes the energy and information transfer timing schedules in a joint fashion, according to the mathematical models presented in Section 3 such that optimal time periods are allocated for both EH and information transmission to classes A and B in the network. As a consequence, Algorithm 1 optimally allots an IPS c to individual sensor nodes at a calculated optimal time period. In a similar vein, to make sure that the sensors in the network are provided with sufficient time for communications in the UL phase, an optimal information transmission time period is calculated and allotted. The implementation of the algorithm is done on the system controller to achieve the optimal control of the switching of the IPS and optimally allocating them to the sensors for enhancing the attainable throughput of the WPSN system.
To analyze the complexity or performance of the OAERA algorithm, two key parameters used for characterizing the complexity of an algorithm are employed in this study. The parameters are the time complexity and space complexity. Note that the analysis of the time complexity of an algorithm involves the required time to execute an algorithm of a particular size n, while the analysis of the space complexity is concerned with the required system resources (such as memory) to execute an algorithm of a particular size n. To achieve the characterization of the complexities of the OAERA algorithm, Big-O (O) notation is applied. The time complexity of the OAERA algorithm is O(A(C + 1) + 2B). Consequently, the computational time complexity of the algorithm is linear in sensor nodes in A and B, and directly proportional to the IPS C. The space complexity of the OAERA algorithm is O(A + B + C), which reveals a linear complexity. These indications show that the OAERA algorithm has efficient complexities in the context of time and space. An algorithm with a linear complexity is better than an algorithm with an exponential complexity as in [36] since the efficiency of n > 2n. Also note that algorithms with exponential complexities are solvable, but not tractable. As a result, they may explode. An exponential-time complexity consumes more time and space resources compared to algorithms with linear complexities, and polynomial time complexities defined by nq where q ≥ 2, such as quadratic complexity and cubic complexity. It is important to underline that system resources can efficiently take care of linear-time and polynomial-time algorithms as they are solvable and tractable.