Resource Allocation Optimization in IoT-Enabled Water Quality Monitoring Systems

Water quality monitoring systems that are enabled by the Internet of Things (IoT) and used in water applications to collect and transmit water data to data processing centers are often resource-constrained in terms of power, bandwidth, and computation resources. These limitations typically impact their performance in practice and often result in forwarding their data to remote stations where the collected water data are processed to predict the status of water quality, because of their limited computation resources. This often negates the goal of effectively monitoring the changes in water quality in a real-time manner. Consequently, this study proposes a new resource allocation method to optimize the available power and time resources as well as dynamically allocate hybrid access points (HAPs) to water quality sensors to improve the energy efficiency and data throughput of the system. The proposed system is also integrated with edge computing to enable data processing at the water site to guarantee real-time monitoring of any changes in water quality and ensure timely access to clean water by the public. The proposed method is compared with a related method to validate the system performance. The proposed system outperforms the existing system and performs well in different simulation experiments. The proposed method improved the baseline method by approximately 12.65% and 16.49% for two different configurations, demonstrating its effectiveness in improving the energy efficiency of a water quality monitoring system.

To increase access to clean water, water quality monitoring is an active area of research in academia and industry [5,[11][12][13].Water quality monitoring research involves the use of traditional laboratory-based technology as well as modern distributed Internet of Things (IoT) technology.Among these technologies, the use of IoT technology is more popular because of its advantages over laboratory-based technology in terms of cost, real-time water quality monitoring, and prompt water data collection [14][15][16][17] Despite the promise of IoT systems in water quality monitoring applications, they are still at an infant stage and are resource-constrained in terms of power, bandwidth, and computational resources [18].Because of these constraints, the IoT systems in water quality monitoring applications are currently limited in performance in the context of energy efficiency, throughput, and network lifetime [19].
For IoT systems to perform better in the water quality monitoring domain, it is important to address the resource constraint issues.Hence, it is important to investigate the design of new resource management strategies that can be incorporated into IoT systems for water quality monitoring.This study focuses on the design of efficient resource allocation strategies for resource management in a non-orthogonal multiple access (NOMA) IoT network for water quality monitoring; the main contributions of this work are highlighted as follows: • We propose the design of a NOMA-enabled protocol for IoT-enabled water quality monitoring systems; • We propose the integration of edge computing with water quality monitoring systems; • We propose resource allocation optimization methods, including a Dinkelbach algorithm-based optimization method for optimizing wireless energy transfer and wireless information transfer, as well as a dynamic resource allocation method for hybrid access point (HAP) resource allocation for data collection; • We provide a comparison of the proposed method with a comparable baseline method.
The content of this article is organized as follows.In Section 2, we provide a review of the related studies.Section 3 presents the proposed method.Section 4 presents the process of mathematical modeling and optimization of resource allocation.In Section 5, we provide experimental results to illustrate the energy efficiency performance of the proposed NOMA-enabled IoT system for water quality monitoring based on the proposed efficient resource allocation strategies.Section 6 concludes this work.

Related Work
The successful deployment of IoT systems in water quality monitoring applications require efficient resource allocation solutions that can increase the system energy efficiency and network lifetime, support the transmission of a large amount of water data, and reduce the computational resources required by the system.As a consequence of this, researchers have intensified efforts to propose various resource allocation solutions.A review of the examples of the related studies are presented as follows.
Ji and Guo [20] considered the problem of resource allocation optimization in a wirelesspowered mobile edge computing-based IoT network.In their work, the mobile edge computing approach was employed to offload intensive computation tasks from the network devices to the edge nodes because of the resource-constrained nature of IoT devices.However, the use of mobile edge computing in IoT systems often results in increased resource utilization cost (e.g., power) and computational complexity.This may be due to the extra computational overhead and energy consumption introduced by edge computing for sensor devices because they must perform complex tasks in the context of data collection, processing, analysis, and decision making.In addition, the mobile edge computing approach is still a developing technology associated with various resource-allocation problems.Similar to the work of Ji and Guo [20], Ahmed et al. [21], and Sun et al. [22] also considered the problem of resource allocation in wireless-powered mobile edge computing networks.However, these works also suffer from the inherent resource wastage issue associated with edge computing due to the extra computational overhead and energy consumption introduced by edge computing for sensor devices.To address these issues, we introduced a heterogeneous multiclass communication system that consists of ordinary water quality sensor devices and two edge computing-enabled HAP devices that can perform edge computing tasks [23,24].Additionally, we introduced the concept of a sequential multi-class WPCN to optimally and sequentially schedule the operation of network devices for data transmission with a low-complexity dynamic resource allocation method.
Zeng [25] formulated the system energy efficiency problem as a game theory problem.In their work, the sensor devices are modeled to collectively work together to maximize their overall objective function value.However, because of the need to cooperatively make decisions on how to allocate resources, the system suffered from a computational complexity issue.This resulted in a low energy efficiency performance of the system.To address the problem in the work of Zeng [25], we propose a dynamic resource allocation method and an optimization-based method to jointly optimize the allocation of the system resources and improve the overall system energy efficiency in a sequential multi-class WPCN setting.Olatinwo and Joubert [26] studied the energy efficiency optimization problem in a wireless-powered sensor network where all the sensor devices in the network only have the opportunity to send their data to only one hybrid access point (HAP).In this case, more energy is spent by the IoT devices that are far from the HAP while less energy is used to send data by the IoT devices that are close to the HAP.This situation is due to the inherent doubly near-far problem in wireless-powered communication networks (WPCNs).To deal with this problem, a WPCN was proposed with two HAPs and a dynamic resource allocation method to efficiently allocate the HAPs to the network IoT devices for their data collection.In addition, unlike the work of Olatinwo and Joubert [26], where a metaheuristic method was used to compute resource allocation to the network IoT devices with a near-optimal best effort solution, this study considered the application of the Dinkelbach algorithm to compute an optimal solution for the IoT devices in the proposed system.
Ansere et al. [27] studied the problem of resource allocation in a cooperative IoT network for energy efficiency performance optimization of the network.In the network in the work of Ansere et al. [27], a cooperative relaying communication approach is employed to enable the network devices to collectively agree to select a channel (i.e., a relaying link) to send their data to a base station device at the destination.The cooperative communication process between the devices in the study of Ansere et al. [27] for decision making regarding channel selection will technically increase the computational complexity of the network in the context of power and time.This often leads to an increased energy consumption and low data throughput.The concept of cooperative communication in IoT networks is useful for reducing energy consumption due to data communication and increases the amount of data that the network can transmit.However, cooperative communication networks often experience an increased energy consumption and a reduced data throughput under an imperfect channel state.To address the limitations in the study of Ansere et al. [27] and also cater for limited power resources in a cooperative IoT network, this study introduced the use of a wireless power transfer technique to increase the availability of power resources in the network.Furthermore, the two HAPs are used to reduce the energy consumption due to data communication in a quasi-static environment.In addition, the concept of a sequential multi-class WPCN is proposed to optimally and sequentially schedule the operation of the network devices in the uplink using a low complexity dynamic resource allocation method.
Ji et al. [28] studied the problem of resource allocation in wireless-powered IoT networks.In their work, a dual-hop communication approach was employed.In this case, relay node was used as an intermediate node between a power source and the IoT devices.The relay node used the energy received from the power source to power the IoT devices as well as collect data from the IoT devices.This can lead to network congestion and reduced throughput.Furthermore, in a wireless-powered network with one power source, the IoT devices experience unfairness in energy harvesting and data transmission.To address the problems associated with the use of relay nodes in networks powered by a single transmitter, we considered multiple transmitters in this work to improve the energy harvesting.In addition, we introduced two HAPs and a dynamic resource allocation method to optimally allocate the HAPs to the IoT devices for their data collection.
We present a summary of the comparison of the proposed work and the existing works in Table 1.
It is important to emphasize that energy efficiency is still a major concern in IoT systems for several reasons, including the limited power resources of sensor devices and energy consumption due to data communication.Therefore, more research is needed to investigate the design of new resource allocation solutions for IoT systems in practical applications.Based on this, in contrast to the previous studies discussed above, we propose the development of a Dinkelbach algorithm-based method and a dynamic resource allocation method to achieve optimal energy efficiency in the proposed NOMA-enabled IoT system for water quality monitoring.

Reference Contribution of Related Works
Contribution of the Proposed Work [20] The authors designed a resource allocation algorithm to manage edge computation resource allocation in a network where all IoT devices participate in data transmission in the same cycle.
Unlike [20], we introduced a dynamic resource allocation method and an optimization-based method to jointly optimize energy harvesting and data transmission in a sequential multi-class WPCN, where each class of sensors operates sequentially to improve the overall system energy efficiency. [21] The authors designed a wirelesspowered network where IoT devices perform complex tasks.Additionally, IoT devices can only send their data to a single base station.
Contrary to [21], we shifted complex tasks from IoT devices to reduce energy consumption.Additionally, we contributed a dynamic resource allocation method to optimally allocate multiple hybrid access points to improve system energy efficiency. [ The authors designed a resource management scheme to offload computations in the network IoT devices concurrently.
Unlike [22], we introduced a sequential multi-class WPCN strategy for offloading computations in a sequential manner.Additionally, we contributed a dynamic resource allocation method to improve the overall system energy efficiency. [25] The authors designed a game theory-based resource allocation method to improve energy efficiency in cooperative network settings.
Unlike [25], we proposed a dynamic resource allocation method and an optimization-based method to jointly optimize the allocation of system resources to improve the overall system energy efficiency in sequential multi-class WPCN settings. [26] The authors designed a wirelesspowered communication network with only one hybrid access point.
Different from [26], we contributed a sequential multi-class WPCN with dynamically allocated hybrid access points to improve energy efficiency. [27] The authors designed a wirelesspowered cooperative IoT network where devices transmit data in the same cycle.
Different from [27], we contributed a sequential multi-class WPCN where devices transmit data in different cycles to improve energy efficiency. [28] The authors designed a wirelesspowered communication network where IoT devices uses a multi-hop communication strategy to communicate with a single base station.
Contrary to [28], we contributed a sequential multi-class WPCN where IoT devices uses single-hop communication to communicate with dynamically allocated hybrid access points to improve energy efficiency.

System Architecture
The proposed architecture of the water quality monitoring system is illustrated in Figure 1.It consists of a set of water quality sensors, HAPs, and an edge computing node.To provide readers with more insights into the project, Table 2 shows a list of requirements for the system architecture.The water quality sensors are deployed at a water site to capture the water quality parameters of the relevant water body.Some of the important parameters for drinking water include pH, E. coli, and dissolved oxygen [29][30][31][32].Due to the power-constrained nature of water quality sensors in IoT systems, HAPs are employed to power sensor devices and collect water data from sensor devices.The edge computing node is introduced to increase the computational capacity of the system for local water data processing.This is motivated by the limited computational resources of sensor devices and the gap in conventional water quality monitoring systems.For example, in most water quality monitoring systems, water data are often forwarded to remote stations where data processing, analysis, and prediction take place.By sending water data to distant remote water stations, real-time monitoring of any possible changes in water parameters may be impractical.To address this gap, we combined edge computing with the proposed water quality monitoring system to enable real-time water quality monitoring.

System Model
This study considers a multi-class communication system that classifies the system sensor devices into two different classes, A and B, according to the channel gains among the sensor devices and the data collecting HAPs.To minimize the transmission power used by the sensor devices to transfer their individual data to the available HAPs, the proposed system exploits the channel gain differences among the sensor devices and the available HAPs in the system to classify them into K sensor devices ∈ m = {m 1 , m 2 , . . ., m K } and L sensor devices ∈ n = {n 1 , n 2 , . . ., n L }.
In the system, there are I dedicated power sources, represented as s = {s 1 , s 2 , . . ., s I }.These power sources are used to transfer power to K sensor devices in class A as well as the L sensor devices in class B. Among the I power sources, two of them (s 1 and s 2 ) serve as the HAPs.Hence, both s 1 and s 2 ∈ s can transfer power to the sensor devices and can also collect data from the sensor devices.Each class of the network transfers its data to two HAPs to achieve a good channel gain among the sensor devices and the HAPs.We assume that the proposed multi-class communication system is a heterogeneous system such that the sensor devices are ordinary water quality sensor devices and HAPs s 1 and s 2 are edge computing-enabled and can perform edge computing tasks [23,24].This circumvents the potential extra computational overhead and energy consumption that edge computing may introduce for sensor devices owing to complex tasks relating to data collection, processing, analysis, and decision making.
The proposed multi-class communication system works as a wireless-powered communication network (WPCN).Hence, the wireless energy harvesting (WEH) phase and the wireless information transmission (WIT) phase of the system operates within a timeslot defined by τ(s) based on the proposed communication protocol presented in Figure 2. Consequently, the durations of the WEH and WIT phases are defined as τ WEH (s) and τ W IT (s), respectively.Hence, the system operates within the duration of τ = τ WEH (s) + τ W IT (s).In each timeslot, both classes A and B harvest power from all the available I power sources within the duration of τ WEH (s), whereas only one of the classes is enabled to perform data transmission to the allocated set of HAPs within the duration of τ W IT (s).For example, if class A is enabled for data transmission to the HAPs in timeslot τ then class B is sequentially enabled for data transmission to the HAPs in the next timeslot, τ + 1.Since it is not a must for all the sensor devices to perform data transmission in the WIT phase concurrently in each timeslot, the concept of sequential data transmission scheduling is considered in this work to optimize the use of power resources by the overall system.
The K and L sensor devices are strategically deployed across the water body in a random manner to optimally capture the key water parameters, as shown in Figure 1.In addition, dedicated I power sources, including the HAPs {s i } 2 i=1 , are connected to a controller with global knowledge of the resources in the proposed system.It is aware of a scheduler designed to enable either class A or B in a sequential manner for data transmission to HAPs s 1 and s 2 in each timeslot, τ.It is important to emphasize that, at each timeslot, the controller update its information about the K sensor devices in class A, L sensor devices in class B, and I power sources for the purpose of synchronization.The sensor devices draw energy from separate batteries for updating their energy status information with the controller.
Table 3 contains some of key acronyms used in this work.

Mathematical Model
The communication channel gains among the K sensor devices and the HAPs, s 1 and s 2 , as well as the L sensor devices and the HAPs, follow a quasi-static fading model.Therefore, the communication channel gain from the I power sources to the K sensor devices and the L sensor devices in the WEH phase are c i,k and c i,l .In addition, the reversed communication channel gain from the K sensor devices to the HAPs is d k,i , while the communication channel gain from the L sensor devices to the HAPs is d l,i .
As a result of the reciprocity of DL and UL communication channel gains for the class Furthermore, the reciprocity of the downlink (DL) and uplink (UL) communication channel gains for the class B network is c i,l = d l,i = 10 −1 × d −α l,i .In both cases, α is the pathloss exponent.During the WEH phase, using the proposed NOMA protocol, the K sensor devices and the L sensor devices harvest energy within the duration of 0 ≤ τ WEH ≤ 1.The energy harvested by the K sensor devices and the L sensor devices are e τ k•harvest (J) and e τ l•harvest (J), respectively, where: where P i (W) is the transmission power used by the I power sources to charge the K sensor devices, while e τ k•harvest and e τ l•harvest are the available energy in the K and L sensor devices' in-built batteries from the previous timeslot.
Each k sensor device and l sensor device used the energy e τ k•transmit (J) and e τ l•transmit (J) to transfer their respective data to HAPs s 1 and s 2 , respectively, in the WIT phase.Consequently, the available energy, e τ k•available and e τ l•available , for the next timeslot, τ + 1, is computed based on (3) and ( 4): The transmission power used by each k sensor device to transfer its data to HAPs s 1 and s 2 is defined as P k,i (W), while P l,i (W) is the transmission power used by each l sensor device to transmit its data to the HAPs.During the WIT phase, using the NOMA protocol, the K sensor devices and L sensor devices transmit their individual data at a scheduled timeslot, τ, to their dynamically allocated HAPs, {s i } 2 i=1 , within the duration of 0 ≤ τ W IT ≤ 1.
Because of the simultaneous data transmission of the K sensor devices and the L sensor devices at a scheduled timeslot to the HAPs, a successive interference cancellation (SIC) technique is applied at the HAPs to enable a sequential decoding of the concurrently transmitted data of the K sensor devices as well as the L sensor devices in each timeslot by first decoding the signal of the highest channel gain sensor device at the corresponding HAP i [26 ,33].
By applying the Shannon theory, the amount of data that each k sensor device can transmit per second to a HAP i in the WIT phase is computed in (5) as: where B denotes the system's bandwidth in Hz, d k,i denotes the UL communication channel from the K sensor devices to the HAPs, P k,i (W) represents the transmission power consumed by each k sensor device to send its data to a HAP i, and σ 2 is the additive white Gaussian noise (AWGN) power.The resource allocation vectors for the time resources and the transmission power resources for the K sensor devices are formulated as τ = [τ WEH , τ W IT ] T and P A = [P 1,1 , P 2,1 , P 3,1 , . . ., P K,1 , P 1,2 , P 2,2 , P 3,2 , . . ., P K,2 ] T , respectively.
A minimum quality of service (QoS) constraint is set for each sensor device k in (6) to satisfy the minimum amount of data of the K sensor devices in order to achieve a reliable data transmission.
R k,i (τ, P k,i ) ≥ r k,i , ∀k The total amount of data that all the K sensor devices can transmit is computed in (7) from (5) as: Furthermore, the amount of data that each l device can transmit per second to a HAP i during the WIT phase is formulated in (8) as: The resource allocation vectors for the time resources and the transmission power resources for the L sensor devices are τ = [τ WEH , τ W IT ] T and P B = [P 1,1 , P 2,1 , P 3,1 , . . ., P L,1 , P 1,2 , P 2,2 , P 3,2 , . . . ,P L,2 ] T , respectively.Additionally, the minimum QoS rate constraint for the L sensor devices is formulated in (9) as: R l,i (τ, P l,i ) ≥ r l,i , ∀i The total amount of data that all the L sensor devices can transmit is calculated in (10) as: During the WEH phase, the energy consumed by the K devices and L devices are computed in (11) and (12) [26] as: where P c is the circuit power consumption for the transmission power and hardware.
e L,WEH (τ WEH , P i ) = By combining ( 11) and ( 12), the total energy consumed by both K devices and L devices during the WEH phase is formulated in (13) as: During the WIT phase, the energy consumed by the K devices and L devices to transmit their individual data to an allocated HAP i at a scheduled period is formulated in ( 14) and (15) as: where P k,c is the circuit power consumption for the k device.
where P l,c is the circuit power consumption for the l device.
Based on the derived equations, the total energy consumed by the class A devices at a timeslot, τ, and the total energy consumed by the class B devices at the next time timeslot, τ + 1, can now be formulated in ( 16)- (19).
e L•total = e K,L WEH (τ WEH , P i ) + e L•W IT (τ W IT , P l,i ) e L•total (τ WEH , P i , τ W IT , P l,i ) = According to [34], the system energy efficiency (EE) is the ratio of the received sumdata and the total power consumption.Due to the scheduling of the K devices in class A and the L devices in class B during the WIT phase, problems (17) and ( 19) are solved independently at timeslot τ and the next timeslot, τ + 1.Therefore, the system EE configured with K sequential devices in class A at timeslot τ is formulated as an optimization problem in (20), and the time allocation, τ, the power source power allocation, P 1 , as well as each k device power allocation, P k,i , are jointly optimized.The system EE optimization problem is: s.t.: C4 : C5 : τ WEH ≥ 0, ∀i ∪ ∀k (25) where C1 is the time resource allocation constraint, C2 is the transmission power constraint for the power sources, C3 represents the limit on the sensor device k transmission power, the C4 constraint ensures that the power cost for sensor device k data transmission should not exceed its total power, and C5 and C6 are non-negative constraints for the decision variables.
In (20), τ WEH and τ W IT are replaced with τ in subsequent problems involving τ WEH and τ W IT since τ = τ WEH + τ W IT .
The system EE configured with L sequential devices in class B at the next timeslot, τ + 1, is formulated in (27), and the time allocation, τ, the power source power allocation, P i , as well as the power allocation, P l,i , of each l device are jointly optimized.The system EE optimization problem is written as: C8 : (P l,i C9 : τ WEH ≥ 0, ∀i ∪ ∀l (30)

Transformation of the Objective Function
The optimization problems in (20) and ( 27) are non-linear fractional optimization problems.Such optimization problems cannot be easily solved directly and it is difficult to obtain optimal solutions to such problems.To deal with this problem, we applied the Dinkelbach method [35] to transform the non-linear fractional optimization problems into a subtraction form that can be easily solved.
To apply the Dinkelbach method, we introduced parameters q and r to compute the optimal solution for the system EE in (20) and (27).Let q * represents the system EE for the optimization problem in (20), which is formulated in (32) as: From ( 32), the maximum system EE q * can now be easily obtained [36] when max By applying the parameter q to the system EE optimization problem in (20), problem P1 was transformed as a new objective function in (33) as: s.t.: C1, C2, C3, C4, C5, and C6 Let r * represents the system EE for problem P2 in (27), which is formulated in (34) as: From ( 34), the maximum system EE r * can now be easily obtained when max Following this, the parameter r can now be applied to optimization problem P2 in (28) to transform it to a new objective function in (35) as: s.t.: C1, C2, C7, C8, C9, and C10 The convergence of the transformed subtraction function has been proved in [36], and this can be easily applied to problems (P3) and (P4).Hence, the proof is omitted in this paper.To achieve an optimal EE for the proposed WPCN system, we solved problems (33) and (35) in each iteration using an iteration algorithm.

Optimal Solution
The objective functions in problems (33) and ( 35) are convex optimizations with respect to variables τ, P i , P k,i and variables τ, P i , P l,i , respectively.Hence, we proposed and applied a Lagrangian method and a Dinkelbach iterative algorithm.The Lagrangian function of the optimization problem in (33) is given in (36) as: k.available ) (36) where τ = (τ WEH , τW IT) defines the duration for the WEH phase and the duration for the WIT phase and µ = (µ 1 , µ 2 , µ 3 , µ 4 ) represents the Lagrangian multipliers for the constraints.
For each iteration, the dual optimization problem in ( 37) is solved using the Karush-Kuhn-Tucker (KKT) conditions [37] based on the initial variables µ 1 , µ 2 , µ 3 , µ 4 , and by equating the Lagrangian partial derivative to zero to obtain optimal resource allocation solutions for τ, P i , P k,i .
The iteration process is provided as follows: The initial Lagrangian multipliers are updated iteratively by µ (t+1) = (µ (t) + β (t) ∆µ) to obtain a new set of multipliers.This process is repeated until the optimal multipliers are obtained when the proposed iteration algorithm saturates to convergence.Note that ∆µ = (∆µ 1 , ∆µ 2 , ∆µ 3 , ∆µ 4 ), β (t) is used to denote the step size of the iteration and T is used to denote the number of iterations.
For a given µ, the process of computing optimal energy transfer time allocation; data transfer time allocation; and k device transmit power allocation, i.e., τ * , P * i , and P * k,i , is obtained through the KKT conditions by equating the Lagrangian partial derivative to derivatives to zero as follows: By to zero, the following optimal solutions can be obtained.

∂L ∂τ
The resource allocation algorithm for solving the optimization problem in ( 33) is provided in Algorithm 1.In addition, to obtain optimal resource allocations, a Dinkelbachbased iteration algorithm is proposed and presented in Algorithm 2.
In each iteration, the formulated dual optimization problem in (47) is solved by applying the KKT conditions [37] according to the given initial multipliers λ 1 , λ 2 , λ 3 , λ 4 , and by equating the Lagrangian partial derivative to zero to obtain optimal resource allocation solutions for τ, P i , P l,i .
The iteration process is provided in as follows: The initial Lagrangian multipliers are updated iteratively by λ (t+1) = (λ (t) + γ (t) ∆λ) to obtain a new set of multipliers.This process is repeated until the optimal multipliers are realized when the proposed iteration algorithm reaches a point of saturation.Note that ∆λ = (∆λ 1 , ∆λ 2 , ∆λ 3 , ∆λ 4 ), and γ (t) is used to denote the step size of the iteration.
The process of computing optimal energy transfer time allocation; data transfer time allocation; and l device transmit power allocation, i.e., τ to zero, the following optimal solutions can be determined: ∂L ∂λ 4 = ((P l,i The resource allocation algorithm for solving the optimization problems in (33) and ( 35) is presented in Algorithm 1.
To obtain optimal power and time resource allocations in each cycle of the proposed system, a Dinkelbach-based iteration algorithm is proposed and presented in Algorithm 2.

Dynamic HAP Resource Allocation Algorithm
This section presents the resource allocation algorithm (i.e., Algorithm 3) employed by the proposed system for allocating HAP resources.During the WIT phase, the HAPs are dynamically allocated to the K and L devices for data collection during a scheduled period to manage the energy consumption of the devices.This is achieved by exploiting the channel gain differences between the devices and the HAPs.This concept helps improve the communication channel quality of devices with a power channel gain to reduce the power used by the devices to report their individual data to the HAPs.

Results and Discussions
In this section, the performance of the proposed system is evaluated based on the baseline method in [26].Consequently, the same simulation parameters as in [26] were also assumed in this study for comparison and validation purposes.The simulation parameters used in the experiments are presented in Table 4.
The proposed system comprises two sequential groups of class A and B networks.The class A network is configured with a set of K water quality sensor devices, whereas the B network is configured with L water quality sensor devices.These devices are deployed within the communication coverage of the power sources and data collection devices, as shown in Figure 3.

Performance Comparison of Different Methods
In this section, the proposed method is simulated and compared with a baseline method [26] to evaluate its performance.Similar to the baseline method [26], we consider a WPCN system with five sensor devices, six sensor devices, and three power sources.Consequently, two configurations were considered in the experiments.The first configuration included K = 3, L = 2, and I = 3.The second configuration included K = 4, L = 2, and I = 3.Two I devices were enabled to transfer power and collect water data from the devices.In both configurations 1 and 2, the K and L devices were enabled to concurrently perform energy harvesting within the period of τ WEH using the proposed NOMA protocol.Using the proposed sequential strategy, only the class A network with A devices was enabled to perform water data transmission to the allocated HAPs within the period of τ W IT since the water data of the K devices are more critical than those of the L devices.The proposed algorithm was enabled to simulate the proposed method, and it was disabled for the baseline method.The proposed method was simulated over a different number of runs (or iterations).In each run, the performance of the proposed method was compared with the baseline method, and the outcome of each iteration is presented in Figure 4. From Figure 4, it can be deduced that both the proposed method and the existing method converged well to an optimal saturation point at approximately 80 runs.However, the performance of the proposed system for the two configurations considered validates that the proposed system is more energy-efficient than the baseline method.The proposed method outperformed the baseline method by approximately 12.65% and 16.49% for configurations 1 and 2, respectively.The efficiency of the proposed method can be attributed to the computation of the optimal resource allocation for network devices using the proposed resource allocation algorithm.

Impact of Noise Power on Energy Efficiency
In this section, we investigate the effect of noise power on the performance of the proposed method.For this experiment, we considered a WPCN system with K = 3 devices in the class A network, L = 2 devices in the class B network, and I = 3.The two classes of networks perform energy harvesting during the τ WEH period.The class A devices are first enabled to perform data transmission in the current cycle and the B devices are scheduled to perform data transmission in the next cycle.The value of the system noise power was varied from −90 dBm to −110 dBm over a different number of iterations, and the energy efficiency performance of the system is presented in Figures 5 and 6 for the two classes.During the first cycle of the system, where the A devices transferred their data to the two HAPs in the system, as the noise power was varied from −90 dBm to −110 dBm, the energy efficiency of the system increased for a small value of noise power, while the energy efficiency decreased for a large value of noise power, as shown in Figure 5.During the next cycle of the system, where the B devices performed data transmission at the UL, the same effect during the first cycle of the system was also observed.The increase in the energy efficiency effect caused by a small value of noise power can be attributed to the increased data rate with low power consumption and low noise power.

Effect of the Number of Power Sources on Energy Efficiency
In this section, different numbers of power sources were used in the experiments to investigate the effect of the number of power sources on the energy efficiency of the proposed system.The proposed system was configured with K = 3, L = 2, σ 2 = −90 dBm, σ 2 = −100 dBm, and σ 2 = −110 dBm, and the number of power sources was varied from one to five.From the results in Figure 7, it was observed that increasing the number of power sources resulted in increased energy efficiency of the system for both class A and class B devices.However, the class B devices achieved a higher energy efficiency than the class A devices.The class B devices achieved an increased energy efficiency because they had less data to transmit compared to the A devices.Hence, the class B devices spent less power on data transmission and were able to increase energy efficiency.

Impact of Sensor Device Transmit Power on Energy Efficiency
In this section, we study the impact of different values of the sensor device transmission power on the energy of the proposed system.We consider K = 3, L = 2, I = 3, σ 2 = −90 dBm, σ 2 = −100 dBm, and σ 2 = −110 dBm for P k,i = P l,i = 0.1 W, 0.2 W, 0.3 W, 0.4 W. The experimental results are shown in Figure 8.As shown in Figure 8, as the transmission power of the sensor devices in class A and class B was varied from 0.1 W to 0.4 W, there was a slight decrease in the energy efficiency of the system.This was a result of the trade-off effect between the total energy consumption and total throughput.When the transmission power of the sensor devices was increased, more data were supported by the system, and the energy consumption of the sensor devices increased.Consequently, the system energy efficiency decreased slightly.

Conclusions
IoT-enabled water quality monitoring systems are becoming increasingly popular due to their benefits over laboratory-based systems.However, these systems are resourceconstrained, with limited power, computational, and bandwidth resources.As a result, they have drawn the attention of academics and practitioners to improve their performance.In this study, we introduced a multi-class communication strategy to classify the water quality sensor devices in the system.We designed a NOMA-based communication protocol to schedule and optimize the operation of the water quality sensor devices for energy harvesting and information transfer.We proposed a new resource allocation method to compute optimal power and time resource allocation for the devices.We also introduced a dynamic resource allocation method for hybrid access point (HAP) resource allocation for efficient data collection.Furthermore, we introduced edge computing into the water quality monitoring system proposed in this work to extend the traditional architecture based on cloud computing.This helps to improve the computational capacity of the system and enables local processing of water data at the water site to guarantee real-time water quality monitoring.Our proposed method outperformed an existing comparable baseline method by approximately 12.65% and 16.49% for two different configurations, demonstrating its effectiveness in improving the energy efficiency of a water quality monitoring system.In future studies, more research is required to explore ways to improve the energy efficiency of the wireless-powered water quality sensor devices used in water quality monitoring systems.

Figure 4 .
Figure 4. Performance comparison of the proposed method.

Figure 5 .
Figure 5. Impact of noise power on energy efficiency for class A device during the first phase of UL data transmission.

Figure 6 .
Figure 6.Impact of noise power on energy efficiency for class B device during the next phase of UL data transmission.

Figure 7 .
Figure 7. Impact of number of power sources on energy efficiency.

Figure 8 .
Figure 8. Impact of sensor device transmit power on energy efficiency.

5. 5 .
Impact of QoS Data Requirements on the System EE In this section, different values of the minimum QoS throughput requirements are investigated for the performance of the proposed system.In this experiment, two configurations were considered.The first system configuration included K = 3, L = 2, I = 3, σ 2 = −90 dBm, σ 2 = −100 dBm, and σ 2 = −110 dBm.The second system configuration contains K = 3, L = 2, I = 4, σ 2 = −90 dBm, σ 2 = −100 dBm, and σ 2 = −110 dBm The minimum QoS throughput requirement of the devices varied from 1000 bits to 5000 bits for the two system configurations.The experimental results for the two configurations are shown in Figures 9 and 10 .

Figure 9 .
Figure 9. Impact of minimum QoS throughput on energy efficiency for the first configuration.

Figure 10 .
Figure 10.Impact of minimum QoS throughput on energy efficiency for the second configuration.

Table 1 .
Comparison of the existing works with the proposed work.

Table 3 .
List of acronyms.
Energy used by each sensor device l for UL data transfer Until R total (τ, P k,i ) − r.e K.total (τ, P i , P k,i ) ≤ e max is true 10: end for 11: for each l in Class B do