Parameter Optimization of a Temperature and Relative Humidity Based Transmission Power Control Scheme for Wireless Sensor Networks

We present refinements of a novel transmission power control (TPC) algorithm based on temperature and relative humidity (TRH). Previously, we deployed a prototype TRH TPC algorithm on wireless sensor nodes operating in real harsh environmental conditions and reported promising results. Since then, we have made enhancements of the TRH TPC model, which we will show here. Furthermore, in order to develop an understanding of the nonlinear behavior that we observed from this TRH TPC scheme, we developed a simulation platform that uses real radio frequency (RF) signal and interference samples and actual T and RH sensor data acquired simultaneously. Afterwards, we logged results of repeated experiments and determined the algorithms operating ranges and behaviors, varying its main parameters, such as (1) its gain factor, (2) the average time period to recalculate power level updates, and (3) proper received signal threshold selection. We then summarize optimal parameter ranges from the analytical results that reflect where this TRH TPC technique works best. And finally, we report results of the TRH TPC algorithm running on long range WSN systems deployed in harsh environmental conditions, corroborating behaviors observed through simulation.


Introduction
There are many proposed transmission power control algorithms for wireless communications [1][2][3]; they vary according to what performance indicator they use to do power compensation; it depends on the selected wireless technology. The most commonly used wireless performance metric is the received signal strength indicator (RSSI), which is available on most commercial radios. Others use a metric called the link quality indicator (LQI) that comes with radios that deploy a type of modulation that breaks apart data bits in so-called "chips" and scatters them within the operating frequency band with the aim of mitigating interference [4,5]. At the destination, the receiver tries to determine one data bit at a time by putting together the corresponding "chips. " The easier is the demodulation process for the receiver, the higher is the LQI it reports. In a sense, the LQI is a measure of the "chip error rate. " Another metric is called packet reception rate (PRR); it is stochastic in nature based on medium to long term averages and takes some time to be reliable. 2 International Journal of Distributed Sensor Networks Different TPC schemes operate at different layers. Some TPC proposals work at the medium access control (MAC) layer using the bit error rate (BER) metric [6]; others run in a cross layer manner involving routing tables [7]. The most studied approaches are adaptive techniques. They take into account the received signal power least mean squared (LMS) error, which needs a training phase that may take extended periods of time until actual compensation starts [8].
In a more recent article, authors of [9] deal with TPC using an active fade margin, which takes advantage of the well known path loss and power budget wireless link analysis; this scheme has the drawback that it needs to always have knowledge of the current channel noise floor level. Other publications show that the increase in temperature affects negatively the RSSI values. Bannister et al. in [10] measured the effect of temperature on the resulting RSSI levels, using two directly connected wireless nodes, via a coaxial cable with an attenuator between them to emulate distance. The nodes were exposed to infrared lamps to generate heat over them. From the results, they inferred a linear approximation within the 25 ∘ C to 65 ∘ C range. Nevertheless, these experiments were not done in a wireless manner because they used a coaxial cable; they only focused on loss due to temperature, ignoring other factors such as air humidity and RF interference, which may play a role in signal fading. Moreover, Lee and Chung in [11] accepted this claim and deployed an open loop temperature dependent TPC, using the linear expression proposed by Bannister. Boano et al. in [12] also confirm Bannister's claims, but they go further by proposing an expression that describes a temperature dependent signal to noise ratio formula. Boano et al. in [13], through a set of experiments in an Italian wheat field, exposed wireless sensor network (WSN) nodes to different weather conditions, measuring the effects of temperature and weather conditions (such as fog, rain, and snow) over the resulting RSSI values; they stated that the RSSI levels are affected adversely due to the rise in temperature but went further by saying that other factors under study have a negligible impact. After an analysis of findings published in both papers, the first assessment of the negative impact of temperature on RSSI levels was done based on a dBm scale within −60 dBm to −90 dBm range, the usual small scale for WSN, while in the second Boano et al. paper, the reported RSSI was in the order of −45 dB (equal to −15 dBm, which constitutes very strong received signals for a WSN). At such power levels, these signals are not hindered by typical noise floors, which are in the order of −120 dB (equal to −90 dBm) or lower. In contrast, others have confirmed that humidity (in its various forms) does impact negatively on very weak reception, especially at higher frequencies and high daytime noise floors. Tamošiunaite et al. in [14] have surveyed other atmospheric physicists findings and through experimental results corroborate that moisture and different weather conditions do cause EM signal fading.
The organization of this paper is as follows: in Section 2 we present the background of the observed RSSI behavior against changes in temperature and relative humidity, where we also show the related TRH gradient and the proposed nonlinear transmission power gain factor. Then we explain the experimental setup configuration and the long-range test bed radio characteristics, followed by relevant power budget analysis equations, which describe the wireless channel gainloss model. Section 2 continues by describing the way we took samples of real RF noise and weather variables that will be used later during the TRH TPC simulation scenario. Section 2 finishes explaining the detrimental effect that dry weather has on the power gain factor, which we correct by including an RH bias for calculating the relative TRH gradient. In Section 3, we show our updated TRH TPC model and algorithm, which compares the averaged RSSI values against two thresholds. In Section 4, we describe the simulation code that models the wireless channel, according to the gain-loss equations, as well as the main TRH TPC algorithm simulation deployment. It uses the radios nonlinear transmission power levels to do the actual control system emulation. In Section 5, we present our simulation results with real input data varying the main parameter values to determine the TRH TPC behavior under different conditions. This last section includes a summary that lists the observed optimal ranges; and it ends presenting the behavior of TRH TPC algorithm, operating with optimal parameters in real harsh conditions.

Background
In previous work published in [15], of a deployable marine environment WSN, we observed that changes in T and RH follow variations of weak RSSI levels. We called this behavior the TRH gradient and fashioned a normalized expression for it, given by (1), which was presented in [16] where we also proposed a novel closed loop TPC algorithm based on T and RH. It avoids broad power compensation swings by using (2) to produce a dampened normalized TRH gain (Δ ). The function that determines this factor is nonlinear; this is more evident if we analyze the Δ behaviour visually by plotting it with different alpha values, and separate T and RH axis, as shown in Figure 1. As T and RH vary, the proposed scheme will have a nonlinear output, which means that it cannot be analyzed with traditional linear control techniques. Here, we extend and refine this TRH-TPC algorithm, which uses RSSI feedback to compensate Tx power against signal fading:  In this project, the TRH TPC algorithm is meant to operate at the upper tier, between CLH and BS radios. The CLH systems are Arduino open hardware platforms [17], and the upper tier radio used in our test bed is the AC4490 digital transceiver [18,19]. We choose the AC4490LR-1000 because it can transmit with any of 81 different power levels, with typical nonlinear power increments which range from 5 mW to 1000 mW, as shown in Figure 2. The AC4490 also comes with a set of on-the-fly configuration commands and instructions for acquiring its status.
Likewise, when the AC4490 is receiving, it has a nonlinear Rx power reading as well. It can report valid RSSI levels in two ways: as an analog signal set at one of its output pins or as an 8-bit code word stored in an internal register called the "validated" RSSI (or VRSSI). This RSSI is also reported within the header of so-called Enhanced Receive Application Program Interface (API) frames. Equation (3) represents the formula for converting this raw RSSI value into a dBm interpretation: The minimum RSSI value the AC4490 can report is −53.9 dBm, as (3) shows when VRSSI is equal to 0. The discrete RSSI values that appear in a table that the manufacturer publishes in its users manual confirm this; from this table we generated the RSSI curve shown in Figure 3.

Power Budget Analysis and Distance Emulation.
Distance is an important issue because the CLH nodes at the upper tier create long range WSN. An RF power budget analysis is needed to determine the adequate Tx power to be able to reach various distances. The well-known path loss formula, expressed by (4), is typically used to determine the overall power attenuation an RF signal suffers due to operational frequency and distance traveled [20]:   Another relevant equation is the effective irradiated power, ERP, expressed by where Tx (dB) is the transmission power in dB, Tx (dB) is the transmitters antenna gain, and (dB) is line feed loss (if any). Knowledge of and ERP can yield the received power, RSSI, by using If the AC4490 transmitter is configured with its minimum power of 5 mW (or 7 dBm), using a simple 2 dBi antenna with negligible line feed loss, the minimum distance that the AC4490 receiver can be from the transmitter is 30.5 m. The latter also considers that the receiver's maximum RSSI power is equal to −53.9 dBm. This kind of radio has to be even farther apart if it uses higher Tx power levels.  A method of emulating wireless distances between nodes for experimentation purposes is by attaching attenuators to their antennas and RF interface.

RF Noise, Data Acquisition, and Message Transfer.
After many TRH-TPC deployment experiments, testing different parameter values, it became evident that to test the full range of TRH TPC parameter combinations it would take several weeks or months to finish. We decided to develop a simulation, described in the next subsection, using power budget equations and real data. With this aim, we reconfigured a CLH system modifying its code to do RF noise power sampling of its transceiver antenna interface along with simultaneous T and RH measurements. The AC4490 has two analog to digital converter (ADC) inputs, one of which is internally connected to the analog received signal strength output. To issue the AC4490 read RSSI command, the following hexadecimal values have to be put on its serial interface: 0xCC, 0x21, 0x02.
The AC4490 responds with a 10-bit raw value at its serial output representing the instantaneous measured RF signal power. The actual power in mW is calculated with the following expression: noise = 53.9 − 0.22 * (1023 − raw RSSI ). Figure 4 shows the experimental RF signal acquisition setup, where ( ) is the transceiver discrete power level, ranging from 1 to = 81. PRR( ) is the calculated packet received rate. Sd( ) are the sensor data samples (T, RH, etc.). And Tx is the actual transmission power in mW, from 5 mW to 1000 mW, which directly depends on the configured ( ) level. The CLH does data acquisition every sampling period, Ts, afterwards it constructs a message that sends to the BS. As soon as the BS receives this CLH message, it responds with an acknowledgement message containing the received message sequence number and the last RSSI value measured by its AC4490 sink node. Figures 5 and 6 show examples of CLH acquired T and RH data, and Figure 7 illustrates the resulting TRH gradient and its inverse. Moreover, Figure 8 represents an example of the measured RF signals acquired at the same time as T and RH, showing for the most part that the RF power levels follow the TRH gradient behavior.  It is worth mentioning that the measured CLH data sent to the BS was relayed through an Internet connection towards a custom server, in charge of storing it in a database and within comma separated value (CSV) files. The system was left running exposed to real conditions for several days. Figure 9 shows that, during this time, humidity measurements fell towards extreme dry conditions. And Figure 10 illustrates that the air temperature was 10 ∘ C higher during the day when RH dropped below 20% ( Figure 9). Figure 11 shows the resulting TRH gradient and Figure 12 illustrates the RF background noise. After comparing both figures with Figure 9, it is apparent that when RH is below 50% the TRH curve does not follow the RF background noise trend. Note that the TRH gradient, (1), can be useful as a TPC gain factor only if it follows the RF noise variations. The TRH distortion is remedied by adding an RH bias value to the TRH equation. After experimentation we found that the gradients' useful behavior is guaranteed by adding 100% RH bias; the updated formula is expressed by  Figure 13 illustrates the biased TRH. Its values rise and fall in a similar manner as the noise behavior ( Figure 12). Now this TRH gradient is more useful in the TPC gain factor equation expressed by (2).

The Updated TRH-TPC Model
We made modifications to the original TRH-TPC scheme; it compared short average RSSI feedback against a single target set point, considered as the minimum RSSI threshold, min . Figure 14 shows our TRH TPC updated version that includes a maximum RSSI threshold, max . In Figure 14, ( ) represents the transmission power controller; Tx is the transmitter, ( ) is the wireless channel, Rx is the receiver, and ( ) is a short average RSSI value, measured at the receiver and fed back to the controller. Furthermore, ( ) is the discrete power level established by ( ) that sets the transmitters actual power, Tx PmW( ) . Meanwhile, Rx PmW( ) is the instantaneous RSSI measured by the receiver that is later sent to the CLH with a delay, ( − 1), which is compared to two thresholds, min and max , yielding two feedback errors min ( ) and − max ( ) expressed by The range between maximum and minimum thresholds is called a hysteresis zone in classical control system applications [21]. In this scheme, the hysteresis approach is used to avoid continual Tx power compensation around the minimum RSSI set point. Within the ( ) controller, the decision is made on which error to take into account for Tx power compensation. Algorithm 1 shows the corresponding pseudocode that describes actions that should be taken by the controller, where ( ) is the discrete power level output by ( ), and the ( + 1) is the updated power level that the transmitter will use during the next data transmission.
There are two possible power adjustments because there are two error comparisons. Equation (9) is the updated power value if the delayed ( ) is below the minimum threshold, and (10) is the next power value if the delayed ( ) value is over the maximum threshold. Algorithm 1 shows the entire TPC process:  Figure 13: Biased TRH, which follows RF noise changes on a six-day experiment.

TRH TPC Simulation Using Real Data and Actual Nonlinear Tx Power Levels
We developed a simulation environment that uses the RF power budget equations described earlier; it also considers the AC4490 radio nonlinear Tx power levels. And to simulate a more realistic response, we loaded from CSV files real T, RH, and RF noise data. Algorithm 2 shows the simulation constant declarations and parameter initialization, along with real data vectors loaded from files. In this simulated environment, the TRH gradient and TPC gain factor calculation can be done a priori because we have T and RH beforehand. In Algorithm 3, the simulation does RSSI power calculations without TPC for future comparison purposes, with and  Figure 14: TRH TPC system with RSSI hysteresis, bound by min and max .
Constants: RH bias , TRHscale, N avg , a0 Input: T avg (k), RH avg (k), r min , r max , r(k), r avg (k), P L (k) Ouput: P L (k + 1), P Tmax (k + 1) Initialization: k = 0, jj = 0 (1) loop: TRH(k) = (T avg (k). * (RH avg (k) + RH bias )/TRHscale (2) Gain: TRH delta(k) = 1 − exp(−a0. * TRH(k)) (3) Average RSSI: r avg (k) = mean(r(k), N AVG ) (4) Compensation: jj++ == N AVG ? (5) r avg (k) < r min ? (6) P L (k + 1) = P L (k) + abs(TRH delta(k). * (r min − r avg (k))) (7) r avg (k) > r max ? (8) P L (k + 1) = P L (k) + abs(TRH delta(k). * (r avg (k) − r max )) (9) else: P L (k + 1) = P L (k) (10) jj = 0 (11) k++ // next loop without TPC, followed by RSSI short average estimations that will be used later during the actual compensation at the end of every averaging period. Moreover, in Algorithm 3, nonlinear AC4490 Tx power values in dB are loaded from a CSV file and converted to the dBm scale by subtracting 30 dB. And the power level vector ( ) (set to the same RSSI vector dimension) is initialized with the preconfigured user selected mW power level converted to dBm. Algorithm 4 shows our TRH TPC simulations main loop. It determines RSSI short average estimations every avg sample, followed by its comparison with the minimum and maximum RSSI thresholds. If the RSSI average is below the min threshold then the compensation is positive, increasing power. Else, if the RSSI average is over the maximum max threshold, then the power compensation is negative, decreasing the radios power level. Else the Tx power is unchanged because the RSSI level is within the hysteresis zone. Figure 15(a) shows the simulation environment input dialog, where the user chooses the key TRH TPC parameters, and Figure 15(b) shows plots of a two-day simulation example that uses previously acquired RF noise, T and RH data loaded from CSV files. The resulting RSSI levels without TPC, in dBm, are calculated adding the negative path loss and subtracting noise power from the constant transmission power.
After power compensation, the controlled RSSI (shown in green and averaged in red at the left hand lower corner of Figure 15) tends to stay within the minimum RSSI and maximum RSSI thresholds. In order to determine the algorithm performance, the minimum RSSI error is determined by counting the RSSI values that fall beneath the minimum RSSI threshold and dividing the result by the vectors total RSSI. Other useful plots in Figure 15 are the TRH biased gradient (upper right), the AC4490 discrete power levels (at the middle), and the radiated transmission power levels in mW (at the lower right corner).

TRH Parameter Optimization and Results
The TRH TPC algorithm operates using key parameters such as the alpha TRH gain coefficient, 0 , the controllers hysteresis zone, which ranges from min to max , and the selected time to do RSSI averaging, avg . Here we did several experiments using our simulation environment changing these parameters to determine which values offered the best TPC results.

Alpha Coefficient Selection.
The 0 argument affects the power gain step size; for example, Figure 16(a) illustrates a close-up view of the resulting RSSI of a TRH TPC simulation experiment with a low 0 = 0.5 and Figure 16 respectively; it shows that compensation is faster with a high alpha because the RSSI level tends to go near the minimum RSSI threshold instead of staying mostly at the top near the maximum RSSI limit. Originally we proposed 0 as a compressed gain factor to avoid unstable RSSI compensation. Also, it was previously found that, below 0.5, this alpha coefficient yields unitary power steps that cause a very slow convergence. At the upper limit, it was suggested that alpha should be equal to or less than 2 to avoid larger Tx power step sizes. Here we reevaluated the upper power limit because the RSSI variable changes faster in harsh sunlight interference than first observed. Figures 18(a) and 18(b) show plots of the resulting transmission power with 0 = 0.5 and 0 = 8, respectively. Figure 18(b) illustrates that with 0 = 8 the initial compensation increases Tx power to more than 800 mW. In contrast, in Figure 18(a) with 0 = 0.5 the transmission power increase is less than 300 mW. The question remains on what 0 value can be considered an optimum limit. We decided to do several experiments with different 0 values, and through trial and error, good results were obtained with 0 less than or equal to 6.
The TRH controllers' aim is to regulate transmission power, so the RSSI levels rise or fall within the preestablished hysteresis zone. During this process, the received power may overshoot the max threshold, which represents an error that we call the maximum RSSI threshold error, max . Or on the contrary, the RSSI levels may go below the min causing a minimum RSSI threshold error, min . The latter is the least desirable error state for TPC because packet loss increases due to poor signal reception.
To determine the TRH algorithms performance with different 0 values, we included a variable that counts the RSSI short averages that go below the minimum RSSI threshold to obtain an estimate of the min metric. Likewise, to determine max a maximum RSSI error counter was included in the model and incremented when the RSSI short averages go over In Table 1 the estimated min and max values of an eightday experiment are shown, along with the Tx power metrics corresponding to different alpha values.
In Table 2 twelve-day simulation results are presented, where estimated min and max values are shown, with corresponding transmission power characteristics. In Tables 1 and 2, after 0 = 4 the minimum errors did not change much. After several simulations using samples from different days, the Tx power behavior and RSSI values reflected similar results. Figures 19 and 20 illustrate plots of the RSSI threshold errors versus discrete alpha values of Tables 1 and 2, respectively. Figures 21 and 22 represent transmission power plots of eight-and twelve-day trials versus different alphas, respectively. In both plots, the average and minimum transmission power metrics are very similar for different 0 values.
After evaluating the TRH TPC performance with different 0 values, it is apparent that 0 can be much higher than previously assumed. Our updated 0 limit can be as high as 6 because the average transmitted power stays the same,   and error performance does not improve much afterward. Moreover, after 0 = 6 the maximum transmission power increases unnecessarily.

RSSI Hysteresis Selection.
Other relevant TRH TPC parameters are the minimum and maximum RSSI thresholds; the gap between them establishes an RSSI hysteresis zone, where the controllers power level output remains in a steady state response even when very small input variations occur [20]. Without this so-called hysteresis zone the controller would continually compensate the Tx power level with any slight RSSI change, which might make the scheme unstable by over stressing the radios reconfiguration process. Originally, the TRH controller set point was established to be exclusively the desired RSSI minimum value, min . Afterward, a maximum RSSI limit, max , was proposed and implemented in our deployments. Both set points determine the controllers RSSI hysteresis zone, or RSSI Hys . Various simulation experiments were done changing the RSSI hysteresis width to determine the influence that threshold selection has on the RSSI behavior. Figures 23 and 24 show initial results with 0 = 6 using eight days' worth of data testing two different hysteresis zones.  (1) The average RSSI tends to stay near the maximum RSSI threshold.
(2) The RSSI error metric is lower when the RSSI hysteresis is wider.
(3) The transmission power behavior stops following the TRH gradient when the hysteresis gap is too wide.
(4) As the hysteresis gap widens the average transmission power increases.
We did several experiments with different hysteresis gaps; all their results were very similar. We found that with a minimum RSSI of −80 dBm the controller operates well up until a maximum threshold RSSI of −72 dBm, which represents 3.28% of the entire RSSI span (this is considering a radio sensitivity of −100 dBm). Another way of stating the main observation is that the transmission power behavior mostly follows the maximum TRH values if a wide hysteresis zone is used (RSSI Hys > 4%), which is an undesirable condition because the radio involved invests more transmission power than necessary to satisfy the minimum RSSI requirement.

Short Average Window Size and Compensation Cycle
Issues. For the purpose of maintaining stability against sudden climate changes and deep fading, we proposed that the TRH TPC algorithm operates with short averaged values to be able to react accordingly. These are simple mean averages, which add values of a particular variable (be it T, RH, or RSSI) and divide them by the number of averaged samples. After every averaging operation, done every avg samples, the TRH controller determines if power compensation is needed, according to previous Algorithm 4. By default, in our initial deployments, we did averaging every ten samples, avg = 10. We found that if we change the amount of averaged samples, widening the avg window, the transmission power behavior also changes. Figure 25 shows two TRH controlled RSSI plots, with 0 = 6. Figure 25(a)   using avg = 10 sample window, and Figure 25(b) is the RSSI behavior averaging avg = 40 samples. The RSSI curve of Figure 25(b) is much smoother than that of Figure 25(a). Nevertheless, in Figure 25(b) both RSSI threshold errors increased with more averaged samples. On the other hand, Figures 26(a) and 26(b) show the transmitted power plots in mW compensated every avg = 10 and avg = 40 samples, respectively. When we extended the averaging window from 10 samples to 40, the minimum transmitted power increased (from 185 mW to 248 mW), and the peak transmitted power decreased (from 850 mW to 624 mW). The overall effect of extending the averaging window caused an increase of the average power from 288 mW to 316 mW.
These simulations use data samples that are acquired every Ts = 10 seconds, with an averaging window of avg = 10 samples, and the time between adjustments is avg = 100 seconds (or 1.66 minutes). Likewise, with avg = 40 samples power adjustments are made every 400 seconds (or 6.6 min.). The sensor sampling period depends on the application, but the time required to do TRH compensations depends on weather changes, which takes several minutes. Table 3 shows threshold error assessments and transmission power metrics obtained with different averaging windows. When widening the averaging window, two undesirable effects appear: (1) there is an unnecessary increase of the average transmitted power, representing useless power consumption, and (2) the amount of RSSI threshold errors increases notably. Figure 27 shows the plot corresponding to the RSSI errors listed in Table 3 against the averaging time window avg . It is apparent that short averaging at less than 10 minutes yields better TPC results than otherwise. Also, it is notable that the most affected performance metric when increasing the time window is the maximum RSSI error: after 10 minutes it climbs over 25%. Figure 28 illustrates the transmission power invested with different avg windows.
Although in Figure 28 it might seem beneficial that with a wider avg window less transmission power is consumed, the RSSI errors of Figure 27 discourage this idea.

Parameter Optimization Summary.
In this research effort most of the general properties of the TRH TPC proposal from previous work are corroborated; one such statement is that the range of the alpha coefficient is the key of this scheme. With the development and use of our TRH simulation environment, we have new information that suggests that the upper alpha bound can be higher, and the separation between maximum and minimum RSSI threshold impacts  on the average power consumption. Likewise, other issues for fine tuning the TRH TPC algorithm are now apparent, such as the need for an appropriate averaging window size, which in consequence sets the compensation cycle period for the TRH TPC operation. Table 4 lists a brief summary of the updated criteria for the key TRH TPC parameters. Although some observations are tied to the particular test bed radio, the RSSI averaging period selection depends on how fast the wireless channel conditions change in real weather and not on the transceivers characteristics.
By combining the criteria for all parameters, an optimum TRH TPC deployment can now be done. In order to finally corroborate these statements, we prepared and did a real experimental deployment, which is explained in the next final section.

Updated TRH TPC Real Deployment and Its Results
As explained in Section 2.1, in our initial WSN experimentation we worked with Arduino based systems with long range AC4490 radios, which we used again here to test the updated TRH TPC with the optimal parameters. The experimental setup consists of three ArduinoMega based CLH systems exposed to beach front weather conditions, as shown in the illustration of Figure 29. One CLH was set up to transmit at a fixed power level, and the other two were programmed with the real time TRH TPC algorithm. Software was developed using the controllers native C++ for embedded systems. Messages sent by the CLH towards the BS were answered by  an acknowledgement message, ACK. During this feedback process, relevant metrics were communicated back to the CLH for its TRH TPC operations.
All CLH systems were programmed to gather T and RH data and to maintain a counter of the ACK messages received back from the BS against the total sent after each transmission. It is worth noting that CLH-1 served as the reference system, it was not programmed with TPC, its radio was configured to transmit at a fixed 200 mW transmission power level, according to the minimum power needed to reach a 2.5 Km distance. Using wireless power budget calculations, the estimated RSSI level should be −73 dBm by excluding a fade margin. Meanwhile, CLH-2 and CLH-3 were programmed with the updated TRH TPC approach operating with 0 = 4 and 0 = 3, respectively. Their radios were also configured at the same 200 mW, as the initial Tx power level.
In the case of CLH-1, Figure 30 shows its resulting RSSI levels; also Figure 31(a) is its temperature plot and Figure 31(b) is its RH measurements plot. Notice that the curves are reciprocal when comparing the RSSI with temperature, and the curves are proportional when comparing the RSSI with relative humidity. Also, Figure 32 shows the simultaneously measured RF signals at CLH-1 receiver input; notice that   Figure 36 shows CLH-2 transmission power adjustments, which follow the TRH gradient and noise floor changes.
The resulting two-day CLH-2 RSSI readings, measured at the BS and fed back to cluster-head, are plotted in Figure 37. The average CLH-2 RSSI (curve plotted in blue) was maintained within the maximum and minimum RSSI thresholds or hysteresis zone. And in Figure 38 a two-day CLH-2 PRR performance is illustrated obtaining a 96.94% average, which is 19% better than CLH-1 performance operating with no TPC.
On the other hand, Figures 39(a) and 39(b) show the temperature and relative humidity measured by the third CLH system. Also, Figures 40(a) and 40(b) illustrate the temperature TRH gradient calculated by CLH-3 and the measured RF noise floor at the same time. And Figure 41 represents CLH-3 plotted transmission power adjustments; notice that it follows the TRH gradient and RF noise floor changes.
The overall RSSI performance of CLH-3 to BS communications is shown in Figure 42, and its PRR performance is illustrated in Figure 43, which achieved a 95% PRR. Table 5 presents a performance comparison summary between the different CLH system operations. Although CLH-1 reached the RSSI target a few times, transmitting at a fixed 200 mW level, only during the night it performed nearly as expected with an RSSI average 2 dB under the minimum threshold. Nevertheless, CLH-1 achieved a poor −88 dBm RSSI daytime average, which adversely affected its PRR reaching only a 77% packet delivery rate. In contrast, most of the time CLH-2 and CLH-3 maintained their RSSI averages within the minimum and maximum RSSI thresholds. This was reflected on their overall PRR performance, by delivering to BS over 95% of their transmitted packets.
For a medium term operational view, a seven-day CLH-2 experiment was done. Figure 44 shows the TRH gradient result and Figure 45 shows the measured RF noise floor during the time, which has a similar shape to the TRH gradient. Also, Figure 46 illustrates the Tx power adjustments done by the updated TRH TPC. From these results, CLH-2 consumed an overall 263 mW Tx power average and its level went down as low as 140 mW, which is better than the       The overall RSSI and PRR performances of the sevenday CLH-2 experiment are shown in Figures 47 and 48, respectively. The measured RSSI levels were kept within the TRH TPC hysteresis zone. Likewise, the PRR performance was over 95%, which is a very good result considering that the radios had their Tx retry feature disabled. These results corroborate our initial TRH TPC experimental results previously mentioned to have been published in [15] and the optimal criterion results summarized in Section 5.4.
These final real deployment results reflect the effectiveness of the simulation platform by obtaining similar real RSSI averages using the optimal parameter values, with a very good overall PRR of well over 90% without transmission retries.

Conclusions
In general, there is always a tradeoff between power consumption and best performance in wireless communications. It is also a fact that the rise in temperature negatively affects the resulting RSSI levels due to thermal noise at the receiver. Nevertheless, the discussion on the issue of air moisture and RF power attenuation is still ongoing. To be able to develop a practical model, atmospheric physicists have to do comprehensive studies with a well thought out methodology that            takes into account a wireless engineering perspective. The published experimental approximations are often equations that are impractical for real-time TPC systems. Here, we did not pretend to model the exact way temperature and humidity hinder communications. We only observed the relative day-night RSSI power loss behavior and compared it to changes in T and RH, which yielded the TRH gradient. We then proposed a TRH TPC scheme with a minimum RSSI objective and a maximum RSSI threshold, which represents a nonlinear approach with RSSI feedback that depends on T and RH for Tx power compensation with a stabilizing power level hysteresis zone.
In particular, this paper presents experimental results that reflect the conditions under which this novel T and RH based TPC technique works best. The main contributions are that (1) we determined an updated the practical range for the proposed alpha gain coefficient, which should be between 2 and 6; (2) we updated the control model by including a Tx power level hysteresis zone, where the power level output variable maintains a steady state even when channel conditions change slightly, and determined a maximum hysteresis width of 4% of the total Tx power range; and (3) we found that the optimal power averaging time window should be equal to or less than 10 minutes for outdoor applications. Through this body of work, we have corroborated the usefulness of the TRH TPC proposal, and we established the basis for fine tuning the parameters involved in the power compensation process for long range communications. The development and extensive use of our TRH TPC simulation environment that uses real input values (RF noise, T and RH), accelerated our research effort. We then put to the test the TPC TRH algorithm running on real wireless systems operating in harsh conditions, and its result followed the expected behavior observed during simulations. Future work involves experimentation with real wireless sensor platforms so as to consolidate our TRH TPC concept for a marine habitat monitoring design space. not least, the authors acknowledge that the prototype wireless sensor network testing, at the desired site, would not have been possible without the help of Oceanographer Eduardo Gil-Silva, of the Instituto de Investigación de Oceonografía (IIO) of the UABC, at Ensenada, Baja California, México. His authorization as well as assistance was indispensable for installing the wireless sensor equipment near the sea shore, in a secure place for long term weather data acquisition and power level assessments, information used in the initial TRH TPC simulations.