Top Banner
CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balanc 1. Sap flow theory and sensors 1. Visit sap flow tree to see installation 2. Lucas downloads sap flow data wirelessly 2. Henry presents R Survey 3. More energy balance equations! 4. Modeling sub-surface soil temperatures: 1. Analytical model 2. Damping depth 3. Fourier Transforms for periodic data
89

CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Further Investigations of Energy Balance

1. Sap flow theory and sensors

1. Visit sap flow tree to see installation

2. Lucas downloads sap flow data wirelessly

2. Henry presents R Survey

3. More energy balance equations!

4. Modeling sub-surface soil temperatures:

1. Analytical model

2. Damping depth

3. Fourier Transforms for periodic data

Page 2: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Science Motivation

1. CO2 fluxes that are observed in forest soil environments are spatially and temporally heterogeneous and are difficult to predict, influencing estimates of total carbon fluxes of forests (Davidson et al. 1998; Trumbore 2006).

2. Thermal environments in soils along costal areas influence the composition of algae, plant, and animal communities (Whitecraft and Levin 2007; Bortolus et al., 2002)

Being able to model and predict sub-surface soil temperatures will allow us to better understand the interactions of temperature with the biological components of the soil. For instance:

Page 3: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Science Motivation

Surface measurements are much more easy to conduct than sub-surface measurements with buried probes.

Because the soil surface temperature depends on periodic energy inputs, we should be able to measure a few parameters, then calculate the soil temperatures at depth using a Fourier series and an analytical model.

A Fourier series decomposes a periodic function or periodic signal into a sum of simple sines and cosines.

“Fourier series were introduced by Joseph Fourier (1768–1830) for the purpose of solving the heat equation in a metal plate. It led to a revolution in mathematics…”

Page 4: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Soil Energy Balance

Net radiation − Stored heat flux − Sensible heat flux = Latent heat flux

(Rn) (G) (H) (L)

(solar) (change in temp) (air/water) (evaporation)

Page 5: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Soil Temperature

Soil temperatures decrease in amplitude and shift in time with depth.

Different locations with different solar input (shading) will have different water content and soil characteristics. These differences will result in different “damping depths”, the parameter that describes the attenuation and delay of the daily temperature peak.

Page 6: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

First Approximation – a sine wave

Page 7: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

Page 8: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

• z is the depth at which we want to model temperature.• is the average temperature at the surface• is the amplitude of the temperature fluctuation• d is the damping depth• t is the time• p is the period• tmax is the time at which the surface temperature wave

is at its maximum.

surfTsurfT

Page 9: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

• z is the depth at which we want to model temperature.• is the average temperature at the surface• is the amplitude of the temperature fluctuation• d is the damping depth• t is the time• p is the period• tmax is the time at which the surface temperature wave

is at its maximum.

surfTsurfT

Page 10: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Calculating damping depth based on decrease in amplitude and phase shifts

JR soil Avg. T (°C)

T max(°C)

Amplitude (°C)

e-1 damp(37%)

time for max (d)

Surface 27.18 72.60 30.95 26.71 1.58428

8 cm depth 23.52 33.13 8.44 12.19 1.65270

Modeling Sub-surface Temperatures

dzeTT /surfcm8 Decrease in amplitude (damping)

d

z

p

t

2

Phase shift (delay)

Page 11: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

cm16.6)ln()ln(

-

s8

d

TT

zd

cm61.18)58428.16527.1(2

81

2

dt

zpd

Modeling Sub-surface Temperatures

Calculating damping depth based on decrease in amplitude and phase shifts

JR soil Avg. T (°C)

T max(°C)

Amplitude (°C)

e-1 damp(37%)

time for max (d)

Surface 27.18 72.60 30.95 26.71 1.58428

8 cm depth 23.52 33.13 8.44 12.19 1.65270

Page 12: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

22 Cd

Damping depth can also be calculated from soil physical properties.

Example here is dry soil from a temperate forest.

Damping depth is related to frequency of the temperature pulse ( = 2π/period) and:

= thermal conductivityC = volumetric heat capacity = thermal diffusivity

Thus, for a 86400 s period and damping depth of 15 cm, = 8 × 10-7 m2 s-1.

Page 13: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

22 Cd

Damping depth can also be calculated from soil physical properties.

Example here is dry soil from a temperate forest.

Damping depth is related to frequency of the temperature pulse ( = 2π/period) and:

= thermal conductivity (W m-1 °C)C = volumetric heat capacity (MJ m-3 °C-1 ) = thermal diffusivity (10-7 m2 s-1 )

soil C

Sand 1.11 2.41 4.61

Clay loam 0.57 2.61 2.18

Clarion soil

(fine-loamy) 1.77 3.19 5.54

Thus, for sand, d = 3.56 cm

Page 14: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

2

111 2

)( z

TTT

t

TT nj

nj

nj

nj

nj

Damping depth can also be calculated from a finite difference equation, provided enough data:

Example sine waves (time interval is 0.5 minutes between temperature readings). n is the sequential measurement and j is the depth of that measurement.

Use R to fit the data to the model (we will fit data to a model a little later).

Parameters: Estimate Std. Error t value Pr(>|t|)

= 7.796e-06 7.939e-09 982 <2e-16 *** d = 14.64 cm

Page 15: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms

Fourier frequency decomposition.

A Fourier transform will take a signal and decompose it into a series of superimposed sine waves, each with a shorter period (higher frequency) and each with a magnitude that determines the sine wave’s influence on the original signal.

Page 16: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms

tnbtnaFtf nn

n 01

00 sin)2(cos)2()(

Page 17: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms

tnbtnaFtf nn

n 01

00 sin)2(cos)2()(

Page 18: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms

Page 19: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

PASI Soil Temperature Exercise #1

• Look at some built-in R time series functions.• Explore some visualizations in R.• Fourier Transform the data near the surface and reconstruct

the temperature signal for a check of the method.• Estimate damping depth using a few methods.• Apply the analytical equation with damping depth to a Fourier

series to predict sub-surface temperatures.• Calculate the heat stored and lost in a daily and annual cycle.

Practice with one year of soil temperature data from Puerto Cuatreros, provided by Cintia.

Exercise: Explore the data that Cintia provided on Tuesday, estimating damping depths and calculating heat lost and stored and soil heat flux.

Page 20: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

R – an Integrated Statistical Package

R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.

www.r-project.org

Program installation should be on the server for both Mac OS X and for Windows

Page 21: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

R – Install and change working directory

After R is installed, copy the files included in the subdirectory “R” on the CD to your hard drive.

Next, start R and then change the working directory to the subdirectory you just copied onto your hard drive.

We are now ready to start playing in R!

R-sig-ecology list serve:https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Page 22: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Puerto Cuatreros Soil Temperature DataCommands in black

Comments in green

Output in blue

R Cursor in red

Page 23: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Puerto Cuatreros Soil Temperature Data

> temps = read.table(file=file.choose(), header=TRUE, sep=",")

## navigate to the file, composite_data_set_interpolated.csv and click OK

> temps[1:10,]

Fecha, Hora, running_time, T_sed_25cm, T_sed_5cm , T_sed_15cm, T_aire_agua_5cm

1 37622.00 37622.00 1.000000 21.26 21.22 21.76 17.942 37622.01 37622.01 1.006944 21.26 21.10 21.74 17.863 37622.01 37622.01 1.013889 21.26 21.00 21.70 17.944 37622.02 37622.02 1.020833 21.28 20.92 21.68 17.865 37622.03 37622.03 1.027778 21.26 20.82 21.66 17.906 37622.03 37622.03 1.034722 21.26 20.78 21.64 17.927 37622.04 37622.04 1.041667 21.26 20.70 21.64 17.628 37622.05 37622.05 1.048611 21.26 20.64 21.62 17.649 37622.06 37622.06 1.055556 21.26 20.56 21.56 17.7410 37622.06 37622.06 1.062500 21.26 20.48 21.56 17.48

## display first 10 rows; data in the array are [rows, columns]

Page 24: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> attach(temps)> summary(temps)

Fecha Hora running_time T_sed_25cm T_sed_5cm… Min. :37622 Min. :37622 Min. : 1.00 Min. : 4.86 Min. :-0.800 1st Qu.:37713 1st Qu.:37713 1st Qu.: 92.25 1st Qu.: 9.70 1st Qu.: 9.168 Median :37804 Median :37804 Median :183.50 Median : 15.54 Median :15.020 Mean :37804 Mean :37804 Mean :183.50 Mean : 14.66 Mean :14.432 3rd Qu.:37896 3rd Qu.:37896 3rd Qu.:274.74 3rd Qu.: 19.60 3rd Qu.:19.610 Max. :37987 Max. :37987 Max. :365.99 Max. :1081.83 Max. :31.920

> T_aire_agua_5cm[1:10] ## use column names to explore the data

> plot(running_time, T_sed_5cm)

## plot the first column (day) vs. surface temperature

Puerto Cuatreros Soil Temperature Data

## get summary statistics for each column## “attach” the data so we can use column names

Page 25: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Puerto Cuatreros Soil Temperature Data

Page 26: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Puerto Cuatreros Soil Temperature Data

> plot(running_time, T_sed_5cm,”l”)

Page 27: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Puerto Cuatreros Soil Temperature Data

> lines(running_time, T_sed_15cm, col="red")

Page 28: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Puerto Cuatreros Soil Temperature Data

> plot(running_time, T_sed_5cm, xlim=c(190,197), ylim=c(-2,10),"l")

Page 29: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Puerto Cuatreros Soil Temperature Data

> lines(running_time, T_sed_15cm, xlim=c(190,197), ylim=c(-2,10),"l",col="red")

Page 30: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

“Traditional” Seasonal-Trend Decomposition (STL)Seasonal effects tend to obscure the trends and short term variation present in a time series. A time series can be considered to comprise three components: a trend component T (m), a seasonal component S(m) and a remainder R(m), sometimes referred to as the irregular component:

Y (m) = T (m) + S(m) + R(m)

Where Y (m) is the time series of interest. This is often used in predicting trends in stock markets or housing prices.

The locally weighted regression smoothing technique (Loess) developed by Cleveland (1979) has been widely used in data analysis. The STL method consists of a series of applications of a Loess smoother with different moving window widths chosen to extract different frequencies within a time series.

Time-series Data in R - decomposition

Cleveland, W. S.: Robust Locally Weighted Regression And Smoothing Scatterplots, JournalOf The American Statistical Association, 74(368), 829–836, 1979.

Page 31: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Measurements were recorded once every 10 min, so we will consider these data on a daily-cycle.

Turn a week of data into an R time series object:

> data_week = ts(T_sed_5cm[which(running_time ==190):+ which(running_time == 197)], freq=144) ## “seasonal” window of 1 day

> data_year = ts(T_sed_5cm,freq=144) ## turn a year of data into a time series

> plot(stl(data_week, s.window=144)) > x11()> plot(stl(data_year, s.window=144))

Time-series Data in R - decomposition

Page 32: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Time-series Data in R - decomposition

Decomposition of a week of data Decomposition of a year of data

Page 33: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transform of the Data

> fft_5cm = fft(T_sed_5cm)> fft_5cm[1:9]

[1] 758571.610 +0.000i 197561.578 -35009.833i -30579.716 +13401.850i[4] -11910.682 -4921.751i -2239.368 -6697.865i 18918.054 +7773.016i [7] -3051.685 +6746.495i -18117.349 +5790.106i -2304.731 -8429.100i

Complex numbers representing magnitudes of frequency components of the FFT.

Real + Imaginary in the form of x + yi

Real Imaginary

-2304.731 - 8429.100i

## Fast Fourier transform of the 5 cm depth ## temperature data, show first 9 values

Page 34: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

## Mod() Returns the absolute value (modulus) of a complex number of x + yi:

> val_fft_5cm = Mod(fft_5cm) ## then divide by total number to get back values> val_fft_5cm = val_fft_5cm / length(val_fft_5cm)> val_fft_5cm[1:9]

[1] 14.4324888 3.8173448 0.6352274 [4] 0.2451962 0.1343666 0.3891303[7] 0.1408788 0.3618738 0.1662577

> barplot(val_fft_5cm, xlim = c(1,20))

First term is the Constant, the second is the 365-day period, the third is the 182.5-day period, the fourth is 365/3, the fifth is…?

## bar plot with only first 20 rows

Page 35: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

Note: Results of the transform are symmetric… > barplot(val_fft_5cm[2:length(val_fft_5cm)])

Also note: how to save graphical images to disk:

> png(file="wholebar.png", width=600, height=600)> barplot(val_fft_5cm)> dev.off()

Page 36: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

To get the period values:

> period = 365 / seq(0,length(val_fft_5cm))> period [1:10]

[1] Inf 365.00000 182.50000 121.66667[5] 91.25000 73.00000 60.83333[8] 52.14286 45.62500 40.55556

The first period (Infinity) is really just theconstant offset (14.4 °C)

The second period is 365 days and is the largest component visible, which meansit is contributing to the overall signal themost.

## divide number of days by a series: 1, 2, 3, 4…

Page 37: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

How many components do we really need?

> which(val_fft_5cm >0.5)

> which(val_fft_5cm >0.1)

[1] 1 2 3 366 52196 52559 52560...

[1] 1 2 3 4 5 6 7 8 9 10 [11] 11 14 15 16 17 19 20 23 24 [20] 25 26 27 28 29 30 33 35 37 [29] 40 41 42 45 50 62 63 84 340 [38] 341 359 364 365 366 367 368 381 [46] 392 731 1071 51491 51831 52170...

So, what are these points – what do they correspond to?

> period[1]> period[2]> period[3]> period[366]

[1] Inf[1] 365[1] 182.5[1] 1

## which() identifies the indexof a value – its location in thematrix.

?

Page 38: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

> barplot(val_fft_5cm[1:400])

Page 39: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

> x11()> barplot(val_fft_5cm[360:370])

## x11() opens up a new graphical window

Page 40: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Reconstruction, to take some of the components and estimate the signal

> omega = 2*pi / 365

> t = running_time> F0 = Re(fft_5cm[1]) / length(fft_5cm)

> transform_365d = ((2 * Re(fft_5cm[2]) * cos(omega * 1 * t)) - (2 * + Im(fft_5cm[2]) * sin(omega * 1 * t)))/length(fft_5cm)

Fourier Transforms – R

tnbtnaFtf nn

n 01

00 sin)2(cos)2()(

Real Imaginary

0 = π / period

## easier notation

## Constant offset is the first Real component divided by length

## 365 day sine wave reconstruction

Page 41: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> transform_182d = ((2 * Re(fft_5cm[3]) * cos(omega * 2 * t)) - (2 * + Im(fft_5cm[3]) * sin(omega * 2 * t)))/length(fft_5cm)

> transform_1d = ((2 * Re(fft_5cm[366]) * cos(omega * 365 * t)) - (2 * + Im(fft_5cm[366]) * sin(omega * 365 * t)))/length(fft_5cm)

> summation = F0 + transform_365d + transform_182d + transform_1d

> plot(running_time,T_sed_5cm, ylim = c(0,30),'l')> lines(running_time,summation,col="red")

Fourier Transforms – R

## half-year sine wave reconstruction, above

## one day sine wave reconstruction, above

## add them up and plot original plus new estimate

Page 42: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

Page 43: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> plot(running_time,T_sed_5cm, xlim=c(190,197), ylim=c(-2,10),'l')> lines(running_time,summation, col="red")

Fourier Transforms – R

Page 44: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Use more components, using a For loop:

> F0 = Re(fft_5cm[1]) / length(fft_5cm) ## the constant term

> summation = F0

> for(n in 1:366) { ## a loop that repeats 366 times, using n as a counter

+ transform = ((2 * Re(fft_5cm[n+1]) * cos(omega * n * t)) - (2 * + Im(fft_5cm[n+1]) * sin(omega * n * t))) / length(fft_5cm)

+ summation = summation + transform

+ }

> plot(running_time,T_sed_5cm, ylim = c(0,30),'l')> lines(running_time,summation,col="red")

Fourier Transforms – R

## sum each new estimation into one variable

Page 45: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

Page 46: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Look at a smaller section and the major components:

> t1 = which(running_time == 190)> t2 = which(running_time == 197)> T_5_7d = T_sed_5cm[t1:t2]

> week_time = running_time[t1:t2] > week_time = week_time - 190

> T_5_7d_fft = fft(T_5_7d)

> val_ T_5_7d_fft = Mod(T_5_7d_fft ) / + length(T_5_7d_fft )

> barplot(val_T_5_7d_fft , xlim = c(1,50))

> period = 7 / seq(0,length(val_T_5_7d_fft ))> period[1:15]

Fourier Transforms – R

## start from zero[1] Inf 7.00 3.50 2.33 1.75[6] 1.40 1.17 1.00 0.88 0.78[11] 0.70 0.64 0.58 0.54[15] 0.500

Page 47: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Sum the first 25 elements (up to a ¼ day cycle):

> F0 = Re(T_5_7d_fft[1]) / length(T_5_7d_fft)> omega = 2*pi / 7> summation = F0

> for(n in 1:25) {

+ transform = ((2 * Re(T_5_7d_fft[n+1]) * cos(omega * n * week_time)) – + (2 * Im(T_5_7d_fft[n+1]) * sin(omega * n * week_time))) / + length(T_5_7d_fft)

+ summation = summation + transform

+ }

> plot(week_time, T_5_7d ,"l")> lines(week_time,summation,col="red")

Fourier Transforms – R

Page 48: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Fourier Transforms – R

Page 49: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

• z is the depth at which we want to model temperature.• is the average temperature at the surface• is the amplitude of the temperature fluctuation• d is the damping depth for a specific period• t is the time• p is the Fourier period• tmax is the time at which the surface temperature wave

is at its maximum.

surfTsurfT

Page 50: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

ωκ2

ωλ2 Cd

What is the damping depth?

Example here is tidal flat soil (Beigt et al. 2003) with of about 3.78 × 10-7 .

Damping depth is related to frequency of the temperature pulse ( = 2π/period) and:

= thermal conductivityC = volumetric heat capacity = thermal diffusivity

> w = 2 * pi / 86400> sqrt(2 * 3.78e-7 / w)

[1] 0.1019595

Thus, for a period of 86400 s, a damping depth for tidal flat soil is 10.2 cm.

Page 51: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

2

111 2

)( z

TTT

t

TT nj

nj

nj

nj

nj

Damping depth can also be calculated from thermal diffusivity using a finite difference equation.

Let’s use the week’s worth of data for calculating the , using the 5, 15, and 25 cm data. Tj is the temperature at 15 cm:

> T_15_7d = T_sed_15cm[t1:t2] ## subset the 15 cm data

> T_25_7d = T_sed_25cm[t1:t2]

> dT = diff(T_15_7d) ## takes difference between rows (n is now n-1)

Page 52: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

2

111 2

)( z

TTT

t

TT nj

nj

nj

nj

nj

Create a model and fit the data to the model using Nonlinear Least Squares (nls).

We know t and z, so we re-arrange the equation and provide a starting ‘guess’

for the value of .

> bigT = T_25_7d - 2 * T_15_7d + T_5_7d> bigT = bigT[1:length(bigT)-1] ## make the same length as dT

> model <- nls(dT ~ I(k * bigT / (0.15)^2 * 600), start=list(k=0.000001))> summary(model)

Estimate Std. Error t value Pr(>|t|) k 1.253e-06 2.476e-08 50.61 <2e-16 ***

2)(

bigTdT

zt

Page 53: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

22 Cd

Damping depth from the finite difference model and the relationship between damping depth and thermal diffusivity (and thermal conductivity and volumetric heat capacity):

> k = as.numeric(coef(model))> sqrt(2 * k / (2 * pi / 86400))

[1] 0.1856545

Which equals 18.5 cm for a 24 h damping depth

Page 54: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

Damping depth can also be calculated using a period of the Fourier decomposition for two different depths. Let’s use the week’s worth of data from before:

> T_5_7d_fft = fft(T_5_7d) ## get the Fourier transform for the 5 cm depth> T_15_7d_fft = fft(T_15_7d)

## get the single day component> n = 8> T_5_7d_trans = ((2 * Re(T_5_7d_fft[n+1]) * cos(omega * n * week_time)) -+ (2 * Im(T_5_7d_fft[n+1]) * sin(omega * n * week_time))) / length(T_5_7d_fft)

> T_15_7d_trans = ((2 * Re(T_15_7d_fft[n+1]) * cos(omega * n * week_time)) -+ (2 * Im(T_15_7d_fft[n+1]) * sin(omega * n * week_time))) / length(T_15_7d_fft)

Page 55: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

Each Fourier transform starts at time = 0, so if there is a delay or shift in time between different Fourier transforms, then we need to add that back in.

> plot(week_time,T_5_7d_trans,"l")> lines(week_time,T_15_7d_trans,col="red")

Page 56: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

> which(T_5_7d == max(T_5_7d))[1] 954> which(T_15_7d == max(T_15_7d))[1] 962 963> time_shift = week_time[962] - week_time[954]> time_shift[1] 0.0555555> time_shifted = week_time - time_shift

> T_15_7d_trans = ((2 * Re(T_15_7d_fft[n+1]) * cos(omega * n * time_shifted)) -+ (2 * Im(T_15_7d_fft[n+1]) * sin(omega * n * time_shifted))) / length(T_15_7d_fft)

We want the deeper layer to be delayed, so time for the transform should “appear” earlier relative to the shallower layer

Page 57: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

Page 58: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

So, since we have nice , clean, “artificial” data, a nls will not work. We need to solve for d using plain old algebra:

Damping:> z = 10 ## centimeters> dT = max(T_5_7d_trans)> Tz = max(T_15_7d_trans)

log(Tz) = log(dT * e-z/d) = log(dT) + log(e-z/d)

> d = -z / (log(Tz) - log(dT))> d

[1] 6.19422

Page 59: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

d

z

p

t

p

teTTT dzsurfsurf

zmax/ 22

cos

Delay: z / d = (2 * pi * time shift) / p

> d = z / (2*pi*time_shift )> d

[1] 28.64792

Lots of different estimates of damping depth… which one to use??

Page 60: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

22 Cd

Let’s start with the soil properties-based estimate:

> k = 1.253e-06> damping=seq(1:25)> damping=sqrt(2 * k / (2 * pi / (86400 * 7 / damping)))> damping

[1] 0.49114134 0.34728937 0.28356058 0.24557067 0.21964508 [6] 0.20050761 0.18563398

## estimated soil thermal diffusivity## create sequence from 1 to 25

Page 61: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

Let’s use two day’s worth of data at 5 cm to estimate the temperature at 15 cm depth:

> t1 = which(running_time == 194)> t2 = which(running_time == 196)> T_5_2d = T_sed_5cm[t1:t2]

> T_5_2d_fft = fft(T_5_2d)

> val_T_5_2d_fft = Mod(T_5_2d_fft ) / + length(T_5_2d_fft )

> barplot(val_T_5_2d_fft , xlim = c(1,50))

Page 62: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

> period = 2 / seq(0,length(val_T_5_2d_fft ))> period [1:10]

[1] Inf 2.0000000 1.0000000 0.6666667 [5] 0.5000000 0.4000000 0.3333333[8] 0.2857143 0.2500000 0.2222222

> d2_time = running_time[t1:t2]> d2_time = d2_time - 194

Page 63: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

22 Cd

Let’s start with the soil properties-based estimate of damping depth and estimate the different damping depths for the two-day sequence:

> k = 1.253e-06> damping=seq(1:10)> damping=sqrt(2 * k / (2 * pi / (86400 * 2 / damping)))> damping

[1] 0.26252609 0.18563398 0.15156951 0.13126304 0.11740524 [6] 0.10717583 0.09922553 0.09281699 0.08750870 0.08301804

## estimated soil thermal diffusivity## create sequence from 1 to 10

Page 64: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

This is how we did it last time:

> F0 = Re(T_5_2d_fft[1]) / length(T_5_2d_fft)> omega = 2*pi / 2> summation = F0

Modeling Sub-surface Temperatures

> for(n in 1:10) {

+ transform = ((2 * Re(T_5_2d_fft[n+1]) * cos(omega * n * d2_time)) – + (2 * Im(T_5_2d_fft[n+1]) * sin(omega * n * d2_time))) / + length(T_5_2d_fft)

+ summation = summation + transform

+ }

Page 65: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

+ dT = max(transform)+ exponent = exp(-.10/damping[n])+ tmax=d2_time[which(transform==+ max(transform[1:(length(transform)/(n+1))]))]

+ depth_estimate = dT * exponent * cos(omega * n * d2_time -+ 2*pi*tmax[1]-z/damping[n]) ++ summation = depth_estimate + summation+ }

Modeling Sub-surface Temperatures

> for(n in 1:10) {

+ transform = ((2 * Re(T_5_2d_fft[n+1]) * cos(omega * n * d2_time)) - (2 * + Im(T_5_2d_fft[n+1]) * sin(omega * n * d2_time))) / length(T_5_2d_fft)

Page 66: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> T_15_2d = T_sed_15cm[t1:t2]> plot(d2_time,T_15_2d,ylim=c(3,8))> lines(d2_time,summation,col="red")

We used d = 18.56 cm, which istoo big. Plus an absolute value shift.

Use d = 12 as a next guess,(k = 0.5e-6), and move up by 1°Cbecause of multi-day trends that arenot represented:

> summation = summation + 1

Modeling Sub-surface Temperatures

Page 67: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

Page 68: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Exercise: Explore the data that Cintia provided on Tuesday, estimating damping depths and calculating heat lost and stored and soil heat flux. Data has been put into one file and missing data have been interpolated: St_all_data.csv

Let’s determine:

1. Damping depth using…?

2. Model sub-surface temperatures from surface measurements (using 5 cm estimate 15 cm and using 25 cm estimate 50 cm).1. Fourier transform the shallow depth.2. Apply the analytical model for the first n frequencies.3. Plot against the actual values.

3. Calculate heat stored in the soil down to 25 cm and 50 cm.

4. Calculate the heat flux at 5 cm using 50 cm estimated temperatures.

11 CmW

soilp

soilsurface K

t

TZC

z

TKG

Page 69: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

Page 70: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

We modeled the 5 cm depth using Fourier transformed data and then reconstructed (in the red).

We will now take each component sine wave of the reconstruction and apply the sub-surface prediction model to it. Then we will sum them up and see how well the model did at predicting temperature at 15 cm.

Modeling Sub-surface Temperatures

Page 71: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

This is how we reconstructed it last time:Sum the first 25 elements (up to a ¼ day cycle):

> F0 = Re(T_sed_5cm_7d_fft[1]) / length(T_sed_5cm_7d_fft)> omega = 2*pi / 7> summation = F0

Modeling Sub-surface Temperatures

> for(n in 1:25) {

+ transform = ((2 * Re(T_5_7d_fft[n+1]) * cos(omega * n * week_time)) – + (2 * Im(T_5_7d_fft[n+1]) * sin(omega * n * week_time))) / + length(T_5_7d_fft)

+ summation = summation + transform

+ }

Page 72: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> for(n in 1:25) {

+ transform = ((2 * Re(T_5_7d_fft[n+1]) * cos(omega * n * week_time)) - (2 * + Im(T_5_7d_fft[n+1]) * sin(omega * n * week_time))) / length(T_5_7d_fft)

Modeling Sub-surface Temperatures

+ dT = max(transform)+ exponent = exp(-.10/damping[n])+ tmax=week_time[which(transform==+ max(transform[1:(length(transform)/(n+1))]))]

+ depth_estimate = dT * exponent * cos(omega * n * week_time-+ 2*pi*tmax[1]-z/damping[n]) ++ summation = depth_estimate + summation+ }

Page 73: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> plot(week_time, T_15_7d, ylim = c(-1,11) ,"l")> lines(week_time, summation, col="red")

Modeling Sub-surface Temperatures

The estimated temperature and the actual sub-sufrace temperature have similar magnitudes (good) but the predicted values are delayed too much (bad).

Also, multi-day patterns influence the signals and the structure is not as matched as desirable.

What else is causing temperature fluctuations on the mud flats?

Page 74: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Modeling Sub-surface Temperatures

22 Cd

Let’s use a different delay depth of 28.64 cm, as calculated before:

> k = 1.041668e-05> delay=seq(1:25)> delay=sqrt(2 * k / (2 * pi / (86400 * 7 / delay)))

Page 75: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> for(n in 1:25) {

+ transform = ((2 * Re(T_5_7d_fft[n+1]) * cos(omega * n * week_time)) - (2 * + Im(T_5_7d_fft[n+1]) * sin(omega * n * week_time))) / length(T_5_7d_fft)

Modeling Sub-surface Temperatures

+ dT = max(transform)+ exponent = exp(-.10/damping[n])+ tmax=week_time[which(transform==+ max(transform[1:(length(transform)/(n+1))]))]

+ depth_estimate = dT * exponent * cos(omega * n * week_time-+ 2*pi*tmax[1]-z/delay[n]) ++ summation = depth_estimate + summation+ }

Re-write the loop with delay in place for the second damping depth

Page 76: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

> plot(week_time, T_15_7d, ylim = c(-1,11) ,"l")> lines(week_time, summation, col="red")

Modeling Sub-surface Temperatures

Now the estimated temperature and the actual sub-sufrace temperature have similar magnitudes (good) and the predicted values are delayed at a more reasonable value.

For such a short time period, multi-day patterns influence the signals and the structure is not as matched as desirable... but it’s not horrible….

Page 77: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Light (PAR) sensing

Page 78: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

$6000

$15 $320

Light (PAR) sensing

Page 79: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Soil Temperature Sensing

Page 80: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Soil surface energy example

Page 81: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Soil surface energy example

Data for 24 h on July 16, 2007 along a 10.75 m transect in a temperate forest:

(A) measured soil surface temperatures every 0.25 m.

(B) measured (indicated with arrows) and calculated soil temperatures at 8 cm depth using the soil model and Fourier transforms.

(C) calculated soil heat flux at the surface.

(D) calculated heat storage between the surface and 8 cm depth.

Page 82: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Soil surface energy example

Data for 24 h on March 3, 2008 along the same 10.75 m transect:

(A) measured soil surface temperatures every 0.25 m.

(B) measured (indicated with arrows) and calculated soil temperatures at 8 cm depth using the soil model and Fourier transforms.

(C) calculated soil heat flux at the surface.

(D) calculated heat storage between the surface and 8 cm depth.

Page 83: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Thermistors:

• Accurate over a wide temperature range.• Good stability over a long life.• Excellent price/performance ratio (they’re cheap).• Low heat conductivity through small diameter leads (depends on application).

Calibration:

• Steinhart-Hart equation• Polynomial

Temperature sensing

Page 84: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Temperature sensing

fixedthermistor

thermistorinout RR

RVV

Vout

Vin

Page 85: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Temperature sensing

Page 86: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Temperature sensing

Page 87: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Temperature sensing

Page 88: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

Soil Heat Flux

Soil heat flux at the surface can be based upon:

• The heat flux at some depth (measured with a heat flux plate) and the volumetric heat capacity of soil, or

• A temperature difference in the soil and the thermal conductivity and volumetric heat capacity of the soil.

13 CmMJ

ppzsurface Ct

TZCGG

11 CmW

soilp

soilsurface K

t

TZC

z

TKG

Page 89: CENTER FOR EMBEDDED NETWORKED SENSING Further Investigations of Energy Balance 1.Sap flow theory and sensors 1.Visit sap flow tree to see installation.

CENTER FOR EMBEDDED NETWORKED SENSING

SensorKit and Prep for Data Collection

SensorKit and Prep for Data Collection