How to Correctly Calculate the Average Relative Humidity

Find out why using multiple relative humidity calculations to determine the average relative humidity will not generate the correct value.

3 hygrometers with different readings

Have you considered, or possibly tried, using multiple relative humidity calculations to determine the average relative humidity? While this method might seem like it would work, it actually doesn’t and won’t give you the correct value you’re looking for. In this brief article, we’ll look at why this method doesn’t work and how you can correctly calculate the average relative humidity.

Background

To understand why averaging multiple relative humidity calculations doesn’t work correctly, you may find it helpful to familiarize yourself with the various parameters that are involved. The following are a few definitions to keep in mind:

  • Relative humidity (RH): the amount of water vapor present in air expressed as a percentage of the amount needed for saturation at the same temperature
  • Vapor pressure: the pressure exerted by a vapor in thermodynamic equilibrium with its condensed phases (solid or liquid) at a given temperature in a closed system
  • Dew point: a measure of atmospheric moisture. The dew point is the temperature to which air must be cooked to reach saturation (assuming air pressure and moisture content are constant). A higher dew point indicates more moisture present in the air.

Why averaging doesn’t work

The relationship between RH, vapor pressure, saturation vapor pressure, air temperature, and dew point temperature is non-linear. Because of this non-linear relationship, the average output of the instantaneous RH is not the same as the output generated by averaged inputs. In other words, the average relative humidity (RH_avg), found by averaging the instantaneous RH, is NOT equal to:

e_avg/e_sat_avg

Note: The magnitude of the error depends on the location on the vapor pressure curve (a graph of vapor pressure as a function of temperature). That is, how non-linear the curve is.

Correct method for determining average relative humidity

To correctly calculate the average relative humidity, you need a temperature and humidity probe. This is the method to follow:

  1. Measure the instantaneous air temperature and instantaneous relative humidity.
  2. Calculate the instantaneous vapor pressure and saturation vapor pressure.
  3. Average the air temperature, vapor pressure, and saturation vapor pressure.
  4. At the end of the output period, calculate the averages for air temperature, vapor pressure, and saturation vapor pressure.
  5. Calculate a true RH_avg with average vapor pressure and average saturation pressure.
  6. Save the data to a data table.

Example program

So, how do you incorporate this method in your datalogger program? The following programming example illustrates the method’s steps.

 'CR1000 Series Datalogger ' The following is an example of the proper technique required to calculate an average 'relative humidity output. The sensor used in the example is the HC-S3, but the program 'can be adjusted for use with other sensors. '** Beginning temperature & humidity probe constants, variables, & working data table. ** Const TMPR_RH_T_MULT = 0.1 'Unique multiplier for temperature; HCS3 = 0.1 Const TMPR_RH_T_OFFSET = -40 'Unique offset for temperature; HCS3 = -40 Public tmpr_rh(3) Alias tmpr_rh(1) = T_tmpr_rh 'Temperature/humidity probe temperature. Alias tmpr_rh(2) = RH_tmpr_rh 'Temperature/humidity probe relative humidity. Alias tmpr_rh(3) = e_tmpr_rh 'Temperature/humidity probe vapor pressure. Units T_tmpr_rh = Celsius Units RH_tmpr_rh = percent Units e_tmpr_rh = kPa Dim e_sat_tmpr_rh 'Temp./humidity probe saturation vapor pressure. Dim stats_out_tmpr_rh(4) 'Temp./humidity probe statistics. Alias stats_out_tmpr_rh(1) = T_tmpr_rh_mean 'Mean temp./humidity probe temperature. Alias stats_out_tmpr_rh(2) = e_tmpr_rh_mean 'Mean temp./humidity probe vapor pressure. Alias stats_out_tmpr_rh(3) = e_sat_tmpr_rh_mean 'Mean temp./humidity probe sat. vapor pressure. Alias stats_out_tmpr_rh(4) = RH_tmpr_rh_mean 'Mean temp./humidity probe relative humidity. Units T_tmpr_rh_mean = C Units e_tmpr_rh_mean = kPa Units e_sat_tmpr_rh_mean = kPa Units RH_tmpr_rh_mean = % DataTable (stats_tmpr_rh,TRUE,1) TableHide DataInterval (0,1,Hr,1) Average (1,T_tmpr_rh,IEEE4,FALSE) Average (1,e_tmpr_rh,IEEE4,FALSE) Average (1,e_sat_tmpr_rh,IEEE4,FALSE) EndTable '** End of temperature & humidity probe constants, variables, & working data table ** '*** Output data tables *** DataTable (stats,TRUE,-1) DataInterval (0,1,Hr,10) '*** Beginning of temperature and humidity probe output data *** Sample (4,T_tmpr_rh_mean,IEEE4) '*** End of temperature and humidity probe output data *** EndTable BeginProg Scan (5,Sec,0,0) '*** Beginning of temperature and humidity probe measurements *** VoltDiff (T_tmpr_rh,2,mV2500,1,TRUE,0,_60Hz,1,0) 'requires 2 sequential Diff channels T_tmpr_rh = T_tmpr_rh*TMPR_RH_T_MULT+TMPR_RH_T_OFFSET RH_tmpr_rh = RH_tmpr_rh*0.1 VaporPressure (e_tmpr_rh,T_tmpr_rh,RH_tmpr_rh) SatVP (e_sat_tmpr_rh,T_tmpr_rh) '*** End of temperature and humidity probe measurements *** '*** Beginning of temperature and humidity processing *** CallTable stats_tmpr_rh If ( stats_tmpr_rh.Output(1,1) ) Then GetRecord (T_tmpr_rh_mean,stats_tmpr_rh,1) RH_tmpr_rh_mean = 100*e_tmpr_rh_mean/e_sat_tmpr_rh_mean EndIf '*** End of temperature and humidity probe processing *** CallTable stats NextScan EndProg 

Conclusion

From this article, I hope you have gained an appreciation for the complexity of determining the average relative humidity. I also hope that you are able to apply what you’ve learned to your own programs to correctly calculate the average relative humidity. If you have any questions or comments, please post them below.

Air Temperature and Relative Humidity Sensors
17394battery chargingcampbell connectionscom220energy

Connect With Us

envelope icon
Phone Numbers
General: (435) 227-9000
location icon
Corporate Address
815 W 1800 N
Logan, UT 84321
send icon
Email Address
sales@campbellsci.com

As a trusted leader in measurement systems for more than 50 years, our top priority at Campbell Scientific has always been to provide the most accurate, reliable data for research and industry.