You are on page 1of 22

24h access-to-vote extension

Virtual Lab 3: Cooling a Cylinder


Rachel Williams, Jay Huber, Aliya Kusumo, Matthew Nelson
Dept. of Mechanical Engineering, University of California at Berkeley
(Date: November 8, 2020)

Abstract
In this lab, cooling of a cylinder is analyzed theoretically and experimentally to examine the validity
of the simplifying assumptions made and understand how our experimental results compare with those
that were expected. We utilized a thermocouple and IR camera to track heat transfer out from a resistor,
which was mounted in a test chamber. A variable-RPM fan and flow concentrator was below the test
chamber, so that both natural and forced convection scenarios could be compared. We found that the
measured and simulated steady state temperatures for forced convection have some differences, which led
to the conclusion that neglecting conduction and radiation is not an appropriate approximation to make.
We analyzed the measured data to identify reasonable transition points that indicate a change in
temperature behavior. We analyzed the corresponding data from these graphs and manipulated them to
showcase the distinctions between simulated and measured temperature data. From the time constants
measured, it was determined that variation in time constants was due to its dependence on voltage and fan
speed.

Keywords: electronics cooling, forced convection, free convection, thermocouple

1. Introduction
Temperature control of electronic equipment is critical to numerous applications from datacenters,
home electronics to spacecraft. Here we consider the heating and cooling of a cylinder by natural
convection and in a cross flow. Our goals are to derive an analytical model for the experiment and
compare measured data to theory. We explore the assumption about what terms are negligible.
(1a) In this lab, the resistor in a cylinder is cooled with a fan that is setup to generate uniform air flow
across the resistor. The controlled parameters include the fan rpm (air flow), resistor geometry and
dimensions, and current through the resistor. A thermocouple and IR camera were used to measure the
temperature of the resistor throughout the cooling process for the experiments.
(1b) The model for the resistor cooling was derived from the heat transfer equation where the steady
state temperature of the resistor occurs when convection, conduction, and radiation balance the Joule
heating power. Lumped capacitance was found to be valid to use as the Biot number was found to be
small. Furthemore, conduction and radiation terms were ignored for the model as it is assumed that they
are small compared to the Joule heating.The temperature measurements taken from the thermocouple and
IR camera were analyzed to determine the time constants and steady state temperatures of the
experiments. These measurements were then used to verify the validity of the analytical model predicted
for the cooling of a cylinder and the assumptions that conduction and radiation could be ignored.

1
2. Theory
We begin by deriving the theoretical model for the temperature of a heated cylinder (in our case a
resistor) in a uniform cross flow of air flowing at velocity U. We assume the physical properties of the air
are constant and we use those at 20°C. The resistor is powered such that we have Joule heating. The
current and voltage, I and V, through the resistor are constant and known. It is assumed that the
thermocouple begins the experiment in thermal equilibrium with its surroundings; therefore, that Tinitial
will be used as the surrounding Tair (or T∞), and be considered constant and known throughout the
experiment. The resistor is ceramic and has thermal conductivity kres. It has diameter D, length L (>> D),
and will be treated as solid for simplicity (although it is hollow in reality). The assumed and measured
properties of the resistor and atmosphere are listed in Table 1.

Table 1: Assumed/measured properties of the resistor and atmosphere.


Resistor geometry Resistor properties Atmosphere properties

Diameter 7.95 [mm] Resistance 50 [Ω] Thermal Conductivity 25.87 [mW/(m•K)]


of Air (kair)

Length 44.45 [mm] Thermal conductivity of 2750 Ambient Temperature 20 [°C]


Resistor (kres) [mW/(m•K)]

Thermal Conductivity 202


of Pure Aluminum (kAl) [W/(m•K)]

(2a) The model we are studying here first is a heated cylinder in a uniform cross flow of air, where the
metal leads at two ends that support the cylinder in the air are not considered (see Figure 1). To know

which heat transfer method is appropriate for analysis, the dimensionless Biot number (Bi =𝐿 𝑘 ) is
calculated. In cases in which Bi < 0.1, the lumped-capacitance assumption can be made. This assumption
enables us to regard the cylinder temperature as constant in any location of the cylinder. Therefore, the
lumped-capacitance model (as described above) can be used to determine a function of the temperature T,
varying in time.

Figure 1. Diagram of heated cylinder in crossflow.

2
(2b) The lumped capacitance model can be described mathematically with the following derivation:

Starting with an energy balance, − Ė𝑜𝑢𝑡 = Ė𝑠𝑡𝑜𝑟𝑒𝑑 (1)

Then substituting the equations for convection − ℎ𝐴𝑠(𝑇 − 𝑇∞) = ρ𝑉𝑐


𝑑𝑇 (2)
𝑑𝑡
and energy stored into the energy balance,

Then in a situation with a temperature θ ≡ 𝑇 − 𝑇𝑖 (3)


difference,

With the previous assumption that 𝑇∞is constant 𝑑θ


=
𝑑𝑇 (4)
𝑑𝑡 𝑑𝑡
then we know,

Then putting this into the Eq (2), we get ρ𝑉𝑐 𝑑θ


=− θ (5)
ℎ𝐴𝑠 𝑑𝑡

When variables are separated, we get ρ𝑉𝑐 𝑑θ


=− 𝑑𝑡 (6)
ℎ𝐴𝑠 θ

Set up integrals on both sides, 𝑇−𝑇𝑖 𝑡 (7)


ρ𝑉𝑐 𝑑θ
ℎ𝐴𝑠
∫ θ
= − ∫ 𝑑𝑡
𝑇0−𝑇𝑖 0

Performing these integrals gives, ρ𝑉𝑐


ℎ𝐴𝑠
𝑙𝑛 ( )
𝑇0−𝑇𝑖
𝑇−𝑇𝑖
=𝑡
(8)

Rearranging this to remove the ln() gives, 𝑇−𝑇𝑖


𝑇0−𝑇𝑖
= 𝑒𝑥𝑝 − ( ℎ𝐴𝑠
ρ𝑉𝑐
𝑡 ) (9)

2
Because the resistor experiences volumetric heat 𝑉
𝑅
(10)
generation, it creates a ∆𝑇 ∆𝑇 = ℎ·𝐴𝑠

( )
2 2
Defining 𝑇𝑖with 𝑇∞and∆𝑇then rearranging to 𝑉 𝑉
(11)
solve for T(t) gives,
𝑇 = 𝑇∞ + 𝑅
ℎ·𝐴𝑠
+ 𝑇0 − 𝑇∞ − 𝑅
ℎ·𝐴𝑠 (
𝑒𝑥𝑝 −
ℎ𝐴𝑠
ρ𝑉𝑐 )
𝑡

2
If the limit is taken as t → ∞ we get, 𝑉
𝑅
(12)
𝑇 → 𝑇∞ + ℎ·𝐴𝑠

3
Focusing on a steady state solution, where dT/dt = 0 (or T = Tss = constant in time) as t → ∞, we can take
into account more terms without too many assumptions. As shown in Figure 2, now consider the pure
aluminum leads, connected to the mounting point at constant temperature Tm, with the diameter of d,
length of l, and thermal conductivity of kAl. In steady state, the full energy balance equation with
consideration of all 3 heat transfer modes (conduction, convection and radiation) becomes as follows,
below.

Figure 2. Diagram of heated resistor in crossflow (with leads).

An energy balance model for all modes of heat transfer is as follows (for natural and forced convection)

We will consider radiation and convection from the leads to be negligible (heat generation is not in the
leads and the surface area of the leads is much lower than the ceramic).

(2c) Starting with an 0 = 𝑃 − 𝑄˙𝑐𝑜𝑛𝑑𝑢𝑐𝑡𝑖𝑜𝑛 − 𝑄˙𝑐𝑜𝑛𝑣𝑒𝑐𝑡𝑖𝑜𝑛 − 𝑄˙𝑟𝑎𝑑𝑖𝑎𝑡𝑖𝑜𝑛 (13)


energy balance,

Expressions for 2
(14)
𝑄˙𝑐𝑜𝑛𝑑𝑢𝑐𝑡𝑖𝑜𝑛 = 𝑘
𝐴 ⎡ 𝑊 · 𝑚 · 𝐾⎤
𝐿
(𝑇 − 𝑇∞) ⎢ 𝑚·𝐾 𝑚 ⎥
conduction, convection, ⎣ ⎦
(15)
𝑄˙𝑐𝑜𝑛𝑣𝑒𝑐𝑡𝑖𝑜𝑛 = ℎ𝐴𝑠(𝑇 − 𝑇∞)
and radiation, ⎡ 𝑊 2 ⎤
⎢ 𝑚2·𝐾 · 𝑚 · 𝐾⎥
⎣ ⎦
(16)
𝑄˙𝑟𝑎𝑑𝑖𝑎𝑡𝑖𝑜𝑛 = εσπ𝐷𝐿(𝑇 − 𝑇∞)
4 4 ⎡ 𝑊 · 𝑚2 · 𝐾4⎤
⎢ 𝑚2·𝐾4 ⎥
⎣ ⎦

Finding the value of ℎ 0.62·𝑅𝑒 2 𝑃𝑟 3


1 1
5
4
5 (17)
⎡ ⎤
(for forced convection), 𝑁𝑢 = 0. 3 + 1 ⎢1 + ( 𝑅𝑒
282,000 ) 8

( )
2

⎢1+
0.4 3 ⎤

4
⎣ ⎦
𝑃𝑟
⎣ ⎦
𝑈𝐷
where 𝑃𝑟𝑎𝑖𝑟 ≈ 0. 731 and 𝑅𝑒 = ν
4
1 1
5 (18)
( )
𝑈𝐷 2
(0.71) 3 ⎡
5

( )
0.62· 𝑈𝐷

( )𝑘𝑎𝑖𝑟 ν 8
𝑘 ⎛0. 3 +
ℎ= 𝑁𝑢 = 1
⎢1 + ν
⎥ ⎞
𝐷 𝐷 ⎢ 282,000 ⎥
( )
2 4
⎡ 0.4 3 ⎤
⎢1+ 0.71 ⎥ ⎣ ⎦
⎝ ⎣ ⎦ ⎠

4
1
2
5
(6 ⎡ ⎤)(0.00795 [𝑚])
0.62·⎛ ⎣ ⎦
𝑚
𝑠
1

⎞ (0.71) 3 ⎡ (6 ⎡⎣ ⎤⎦)(0.00795 [𝑚]) 8 ⎤


𝑚
𝑠
⎛ 0.00001511⎡⎢ 𝑠 ⎤⎥
𝑚
2

( )
𝑊 2
0.00001511⎡⎢ ⎤⎥
𝑚
0.02587 ⎡ 𝑚·𝐾 ⎤ ⎝ ⎣ ⎦ ⎠
≈ ⎣ ⎦ ⎜0. 3 + 1
⎢1 + ⎛ 𝑠
⎣ ⎦ ⎞
0.00795[𝑚] ⎢ 282,000

( )
2 4
⎡ 0.4 3 ⎤
⎢1+

0.71 ⎥

⎢ ⎝ ⎠
⎣ ⎦

≈ 86. 21 ⎡⎢ 2 ⎤⎥
𝑊
⎣ 𝑚 ·𝐾 ⎦

Energy balance with 𝑉


2
𝐴 4 4 (19)
0= 𝑅
− ⎡⎢𝑘 𝐿
(𝑇 − 𝑇∞) ⎤⎥ − ⎡⎢ℎ𝐴𝑠(𝑇𝑠𝑠 − 𝑇∞) ⎤⎥ − ⎡⎢εσπ𝐷𝐿(𝑇 − 𝑇∞)⎤⎥
specific expressions for𝑄˙ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦
values,

This gives: 2
4 4 (20)
*note that ℎis defined above
𝑉
𝑅 [ ⎣ ⎦ ⎣ ]
= 𝑘𝐴𝑙𝑑(𝑇 − 𝑇𝑚) + ⎡⎢ℎ𝐴𝑠(𝑇𝑠𝑠 − 𝑇∞) ⎤⎥ + ⎡⎢εσ𝐴𝑠(𝑇 − 𝑇∞)⎤⎥

(2d) For cases where (i) conductive and radiative heat transfer modes are neglected:
(radiation and convection from the leads considered negligible)

Using Eq (3c), 2
4 4 (21)
𝑉
𝑅 [ ⎣ ]
= 𝑘𝐴𝑙𝑑(𝑇 − 𝑇𝑚) + ⎡⎢ℎ𝐴𝑠(𝑇𝑠𝑠 − 𝑇∞) ⎤⎥ + ⎡⎢εσ𝐴𝑠(𝑇 − 𝑇∞)⎤⎥
⎦ ⎣ ⎦

Substituting given values into 2[𝑊] = (22)


this equation,
(86. 21 ⎡⎢⎣ ⎤⎥⎦)π(0. 00795[𝑚])(0. 04445[𝑚])(𝑇
𝑊
𝑚 ·𝐾
2
𝑠𝑠
− 293. 2[𝐾])

For forced convection, this 𝑇𝑠𝑠 ≈ 314.1 [𝐾]


calculation yields,

For cases where (ii) all heat transfer modes are considered:
(radiation and convection from the leads considered negligible)

2
4 4 (23)
𝑉
𝑅 [ ⎣]
= 𝑘𝐴𝑙𝑑(𝑇𝑠𝑠 − 𝑇𝑚) + ⎡⎢ℎ𝐴𝑠(𝑇𝑠𝑠 − 𝑇∞) ⎤⎥ + ⎡⎢εσ𝐴𝑠(𝑇𝑠𝑠 − 𝑇∞)⎤⎥
⎦ ⎣ ⎦

( 𝑊
)
2[𝑊] = ⎡⎢ 𝑘𝐴𝑙⎡ 𝑚·𝐾 ⎤ (𝑑[𝑚])(𝑇𝑠𝑠 − 𝑇𝑚[°𝐶]) ⎤⎥ +
⎣ ⎣ ⎦ ⎦
(24)

... + ⎢ℎ ⎢ 2 ⎥(π · 𝐷[𝑚] · 𝐿[𝑚𝑚])(𝑇𝑠𝑠 − 𝑇𝑚[°𝐶]) ⎤⎥ +


⎡ ⎡ 𝑊 ⎤
⎣ ⎣ 𝑚 ·𝐾 ⎦ ⎦

( 4
)4
... + ⎢ε σ⎢ 2 4 ⎥ (π · 𝐷[𝑚] · 𝐿[𝑚𝑚])(𝑇𝑠𝑠 − 𝑇∞[°𝐶] )⎤⎥
⎡ ⎡ 𝑊 ⎤
⎣ ⎣𝑚𝐾 ⎦ ⎦
( )

5
(25)
⎣ ( ⎣
𝑊
⎦ )
2[𝑊] = ⎡⎢ 202⎡ 𝑚·𝐾 ⎤ (0. 0005[𝑚])(𝑇𝑠𝑠 − 303. 2[𝐾]) ⎤⎥...

... + ⎡⎢86. 21⎡⎢ 2 ⎤⎥(π · 0. 00795[𝑚] · 0. 0445[𝑚])(𝑇𝑠𝑠 − 303. 2[𝐾]) ⎤⎥...
𝑊
⎣ ⎣ ·𝐾 ⎦
𝑚 ⎦

( −8⎡ 𝑊 ⎤
) 4 4
... + ⎢0. 7 5. 6 × 10 ⎢ 2 4 ⎥ (π · 0. 00795[𝑚] · 0. 0445[𝑚])(𝑇𝑠𝑠 − (293. 2[𝐾]) )
⎣ ⎣𝑚𝐾 ⎦

For forced convection, this calculation yields, 𝑇𝑠𝑠 ≈ 308. 1 [𝐾]

3. Methods
To compare theory to experiment, a simplified experiment with a cylinder (resistor in this case) under
Joule heating was placed in a rectangular channel and cooled either by natural or forced convection. We
utilize a Type K (ANSI Code) thermocouple in standard tolerance limits and an infrared (IR) camera
(model name: FLIR A65 f=13 mm with SC kit) to measure the cylinder’s temperature. According to their
specification sheets, uncertainties for the thermocouple and IR camera measurements are reported as (3a)
2.2 °C (or 0.75% of reading, whichever is greater) and (3b) ±5°C (or ±5% of reading, whichever is
greater), respectively. The resistor (model name: Vishay AVT010) is rated as R = 50 Ω with the tolerance
of (3c) ±5% by the manufacturer. Figure 3 shows the layout including the lab setup and all sensors.

Figure 3. Experimental setup, showing sensor locations.

6
The testing system was composed of a hollow rectangular chamber, with a fan at the bottom and a
funnel at the top. This top section (the test chamber section), has a resistor and thermocouple across the
hollow section (see Figure 3). There is a variable-RPM fan at the bottom of the chamber in order to
provide for both free and forced convection testing procedures. Positioned directly above the test chamber
section is an IR camera. Testing was performed for (a) forced convection scenarios, where data was
collected while the fan ran, causing a concentrated flow around the resistor (at 5[V] and 0 [m/s], at 10[V]
and 0 [m/s], and at 10[V] and 6 [m/s]), and (b) free convection scenarios, where the fan was off and the
air around the resistor was static as data was collected.
The resistor temperature T was measured in time with (i) V = 5VDC (nominal) without air flow, (ii)
V = 5VDC (nominal) with air flow at 6 m/s, and (iii) V = 10VDC (nominal) with air flow U at 6 m/s. The
air flow speed had a tolerance of ± 2 m/s. For each case, the resistor temperature was measured in a
sufficiently long time in order to make sure that the resistor temperature T reaches the steady state
temperature Tss while affected by Joule heating, and returns to the ambient temperature T∞ after the DC
voltage is no longer fed to the resistor. As a result, the transient behavior of the resistor’s temperature
when it is powered on and off and the steady state temperature values of the resistor were able to be
captured.

4. Results and Discussion


(4a) Beginning from the steady state with no Joule heating, we recorded the resistor’s temperature in
each of the experiments and calculated the resulting mean averages of each with its associated uncertainty
within a 95% confidence interval. The values are shown in Table 2.

Table 2: The Assumed/measured properties of the resistor and atmosphere


Initial Temperature, Tss (Steady State)
Given Data Mean Values Associated 95% Confidence
Values [°C] Uncertainty [°C] Interval [°C]
5[V], 0[m/s] 18.77 ±0.02 (18.75, 18.79)
10[V], 0[m/s] 19.18 ±0.01 (19.17, 19.19)
10[V], 6[m/s] 18.38 ±0.01 (18.37, 18.39)

Once a voltage across the cylinder was applied, mimicking heat dissipation from an electronic device,
the time history of the cylinder temperature was recorded for 5V, 10V, and 10V with fan and is shown in
Figures (4), (5) and (6). (4b)Within each figure, the graph is partitioned into 5 sections, indicating a
change in temperature that fluctuates between constant steady-state values, increasing and decreasing
transient temperature gradients. The partitions were chosen using both qualitative and quantitative
reasoning. Using the given experimental data files for each of the 3 cases (5v, 10v & 10vFAN), we
analyzed the behavior of the graphs and picked points where the temperature and voltage values began to
increase, plateau and decrease in relation to one another. After locating reasonable points on the graph, we
pulled corresponding temperature data from the excel spreadsheets of each experiment. Once arbitrary

7
points were chosen, we manipulated the data via averaging and confidence intervals, then used the
resulting values as a reliable approximation for where the graphs change.

Figure 4. Time history of the measured and theoretically predicted cylinder temperature for 5V, no fan

Figure 5. Time history of the measured and theoretically predicted cylinder temperature for 10V, no fan

8
Figure 6. Time history of the measured and theoretically predicted cylinder temperature for 10V, with fan

Based on the theory from Eq. (11), in a transient state, the temperature varies exponentially as T(t) =
Tss,2 + (Tss,1 - Tss,2)·exp(-t/𝜏) where 𝜏 is called the time constant. As we measured 2 transient temperature
data sets per case, six 𝜏 values were able to be measured and are shown in Table (3).

(4c) Table 3. Time constants for the 2 transient temperatures data sets for each case
𝜏 (T∞ → Tss) [s] 𝜏 (Tss → T∞) [s]

V=5VDC without U 157.26


+0.67
170.88
+0.85
−0.64 −0.84

V=10VDC without U 118.09


+0.49
147.23
+0.61
−0.49 −0.63

V=10VDC with U 26.45


+0.15
27.53
+0.18
−0.15 −0.17

It is found that some 𝜏’s are identical while others are different. Besides the random noise effect in
thermocouple measurement, this is due to variation in h. (4c, cont’d) From Eq. (9) we see that 𝜏 can be
ℎ𝐴𝑠
deduced from the inverse reciprocal of the term ρ𝑉𝑐
where the only variable we are assuming to be
non-constant is h. This value is based on the Nusselt number which varies depending on U or V.
In natural convection where there is no air flow, we measured 3 different steady state temperatures of
the resistor at V=0, V=5VDC and V=10VDC using the thermocouple as well as the IR camera. The
temperature values measured by the thermocouple and IR camera with the simulated values based on the
theory from Eq. (12) are plotted in Figure (7).

9
(4d) Figure 7. Plot of steady state temperature Tss with respect to the applied voltage V

Comparing the steady state temperature measurement results, we find (4d, cont’d) that the simulated
results were noticeably greater than the measured values with a gap that seemed to widen as the voltage
increased. An overall trend can be observed across all data sets that Tss increases as V increases.
Differences between the measured and simulated values at the same corresponding voltage values can be
explained by the fact that the model used for the simulated data neglects heat conduction and radiation.
Uncertainties are also omitted in some measurements such as bias error in the voltage measuring tool,
resistor uncertainty, and Tinf uncertainty.
In the case of convective cooling where a flow of (6 ± 2) m/s with 95% confidence flowed over the
cylinder, the nominal DC voltage of 10V was loaded to make the resistor reach the steady state
temperature Tss > T∞. The Tss measured from the thermocouple is shown and compared to the simulated
one from the theory in Table (4).

(4e) Table 4. Steady State temperature for forced convection cooling at 95% confidence
Steady State Temperature (TSS) [℃]

Measurement 32.56 ± 2.21

Simulation 39.18
+4.46
−2.68

Comparing the measurement to simulation, we can see (4e, cont’d) that the simulation TSS value is
slightly larger than the measured TSS value at 95% confidence and are therefore not entirely in agreement.
This indicates that the assumption used in the theoretical model that conduction and radiation can be
ignored is invalid. They might differ from each other because the simulation was calculated neglecting
conduction and radiation.

10
Acknowledgements
We wish to acknowledge the ME103 Fall 2020 teaching team for providing the sample template and
contents which could be reproduced with permission.

Teammate contributions to the lab


Name Contributions

Huber, Jay Theory, Methods, Abstract

Kusumo, Aliya Introduction, Results and Discussion

Nelson, Matthew Results and Discussion

Williams, Rachel Results and Discussion

References
[1] Engineering ToolBox, (2001). “Air - Density, Specific Weight and Thermal Expansion Coefficient at
Varying Temperature and Constant Pressures.” [online] Available at:
www.engineeringtoolbox.com/air-density-specific-weight-d_600.html
[2] Engineering ToolBox, (2001). “Air - Thermal Diffusivity.” [online] Available at:
www.engineeringtoolbox.com/air-thermal-diffusivity-d_2011.html.
[3] Engineers Edge, LLC (2018). Engineers Edge - Engineering, Design and Manufacturing Solutions
“Viscosity of Air, Dynamic and Kinematic.” [online] Available at:
www.engineersedge.com/physics/viscosity_of_air_dynamic_and_kinematic_14483.htm.
[4]Paul Evans, et al. (2020) The Engineering Mindset. “Properties of Air at Atmospheric Pressure.”
[online] Available at: theengineeringmindset.com/properties-of-air-at-atmospheric-pressure/.

11
Appendix
Appendix A: Plots and Figures
Appendix B: MATLAB codes

12
13
14
15
16
17
18
Q4c
run Read_in_VL3_demo_data

% Initializing cells for time and temp data


t = cell(1,6);
T = cell(1,6);

% 5V, no U
% inf to ss
t{1,1} = D5v(90:2840,1);

19
T{1,1} = D5v(90:2840,2);
% ss to inf
t{1,2} = D5v(8460:11250,1);
T{1,2} = D5v(8460:11250,2);

% 10V, no U
% inf to ss
t{1,3} = D10v(320:2280,1);
T{1,3} = D10v(320:2280,2);
% ss to inf
t{1,4} = D10v(5360:8230,1);
T{1,4} = D10v(5360:8230,2);

%10 V, with U
% inf to ss
t{1,5} = D10vFAN(492:900,1);
T{1,5} = D10vFAN(492:900,2);
% ss to inf
t{1,6} = D10vFAN(1810:2225,1);
T{1,6} = D10vFAN(1810:2225,2);

% Offsetting data sets


for i = 1:6
t{1,i} = t{1,i} - t{1,i}(1);
T{1,i} = T{1,i} - T{1,i}(end);
end

% Finding coefficients for exponential fit


f = cell(1,6);
for i = 1:6
f{1,i} = fit(t{1,i}, T{1,i}, 'exp1');
end

% Coefficient to convert to time constant from f


b = [-0.006359, -0.005852, -0.008468, -0.006792, -0.03781, -0.03632];
% Upper bound of coefficient @ 95% confidence
b_ub = [-0.006332, -0.005823, -0.008433, -0.006764, -0.03759, -0.03609];
% Lower bound of coefficient @ 95% confidence
b_lb = [-0.006385, -0.005881, -0.008503, -0.006821, -0.03802, -0.03655];

% Initializing arrays for time constants and bounds


avg = zeros(1,6);
ub = zeros(1,6);
lb = zeros(1,6);
% Converting coefficient to time constant
for i = 1:6
avg(i) = -1/b(i);
ub(i) = -1/b_ub(i) - avg(i);
lb(i) = -1/b_lb(i) - avg(i);
end

20
21
22

You might also like