Citation
Current sensorless maximum power point tracking and energy harvesting for thermoelectric generators

Material Information

Title:
Current sensorless maximum power point tracking and energy harvesting for thermoelectric generators
Creator:
Bond, Matthew Lanford ( author )
Place of Publication:
Denver, CO
Publisher:
University of Colorado Denver
Publication Date:
Language:
English
Physical Description:
1 electronid file (46 pages). : ;

Subjects

Subjects / Keywords:
Thermoelectric generators ( lcsh )
Genre:
bibliography ( marcgt )
theses ( marcgt )
non-fiction ( marcgt )

Notes

Review:
Presented is a duty-cycle-based maximum power point tracking (MPPT) scheme with estimated power dependent on duty cycle and output voltage. Conventional MPPT methods suffer from power and fiscal needs involving direct current measurement, or disconnection of source and load for open circuit voltage measurement. The proposed scheme avoids these disadvantages, while retaining capability with all generators. The implementation via microcontroller allows for easy tuning of the algorithm to suit the response time of the generator with respect to environmental conditions. This power converter controller maintains the TEG output voltage at a reference level set by the microcontroller, extracting maximum power for the given temperature condition. This microcontroller based MPPT algorithm is inexpensive, has a low power consumption, and can be used with any generator. The proposed system has been validated analytically and experimentally, and shows a maximum power tracking error of 0.15 percent.
Thesis:
Thesis (M.S.)--University of Colorado Denver. Electrical engineering
Bibliography:
Includes bibliographic references.
General Note:
Department of Electrical Engineering
Statement of Responsibility:
by Matthew Lanford Bond.

Record Information

Source Institution:
University of Colorado Denver
Holding Location:
|Auraria Library
Rights Management:
All applicable rights reserved by the source institution and holding location.
Resource Identifier:
903402191 ( OCLC )
ocn903402191

Downloads

This item has the following downloads:


Full Text
CURRENT SENSORLESS MAXIMUM POWER POINT TRACKING AND
ENERGY HARVESTING FOR THERMOELECTRIC GENERATORS
by
MATTHEW LANFORD BOND
Bachelor of Arts, Carleton College, 2006
A thesis submitted to the
Faculty of the Graduate School of the
University of Colorado in partial fulfillment
of the requirements for the degree of
Master of Science
Electrical Engineering
2014


This thesis for the Master of Science degree by
Matthew Lanford Bond
has been approved for the
Department of Electrical Engineering
by
Jaedo Park, Chair
Yiming Deng
Brian Brady


Bond, Matthew Lanford (M.S., Electrical Engineering)
Current Sensorless Maximum Power Point Tracking and Energy Harvesting for Ther-
moelectric Generators
Thesis directed by Assistant Professor Jaedo Park
ABSTRACT
Presented is a duty-cycle-based maximum power point tracking (MPPT) scheme
with estimated power dependent on duty cycle and output voltage. Conventional
MPPT methods suffer from power and fiscal needs involving direct current mea-
surement, or disconnection of source and load for open circuit voltage measurement.
The proposed scheme avoids these disadvantages, while retaining capability with all
generators. The implementation via microcontroller allows for easy tuning of the
algorithm to suit the response time of the generator with respect to environmental
conditions. The power converter controller maintains the TEG output voltage at a
reference level set by the microcontroller, extracting maximum power for the given
temperature condition. This microcontroller based MPPT algorithm is inexpensive,
has a low power consumption, and can be used with any generator. The proposed
system has been validated analytically and experimentally, and shows a maximum
power tracking error of 0.15%.
The form and content of this abstract are approved. I recommend its publication.
Approved: Jaedo Park
m


DEDICATION
This thesis is dedicated to my family and pets, who combined to keep me sane.
IV


ACKNOWLEDGMENT
This thesis would not have been completed if not for the support and guidence of
Dr. Jae-Do Park in the Department of Electrical Engineering at the University of
Colorado Denver. For giving me the chance to prove myself, I will be forever grateful.


TABLE OF CONTENTS
Tables....................................................................... vii
Figures ................................................................... viii
Chapter
1. Introduction............................................................... 1
2. TEG energy harvesting...................................................... 3
2.1 Operational Principles of Thermoelectric Generation................. 3
2.2 Electrical Model and Maximum Power Point............................ 3
3. Current MPPT Techniques.................................................... 7
4. Hysteresis Control......................................................... 9
5. Boost Converter........................................................... 11
6. Continuous Conduction Mode................................................ 13
7. MSP430 Microcontroller.................................................... 19
7.1 Microcontroller Advantages......................................... 19
7.2 Coding and Desired Results......................................... 20
8. Experimental Implementation............................................... 22
9. Results................................................................... 25
10. Discussion............................................................... 28
11. Conclusion............................................................... 29
References.................................................................... 30
Appendix
A. MSP430 Code................................................................ 33
vi


TABLES
Table
9.1 Experimental result: (1) V I characterizations. (2) Operating point
comparisons. Vreg and P: calculated output voltage and power at MIT
from VI characteristics. VL, PL, VH, and PH: upper and lower bounds of
actual TEG output voltage and power controlled by the proposed system.
(3) Performance. Vrerr, Plerr, Vherr and Prerr denote the error
between MIT and the upper and lower bounds of actual TEG output . 27
Vll


FIGURES
Figure
2.1 Two TEG modules connected in series....................................... 4
2.2 Ideal Electrical Equivalent Circuit of a TEG.............................. 4
2.3 MPP changes with varying temperature...................................... 5
2.4 Output Curves of a TEG AT = 72F.......................................... 6
4.1 TEG and MSP430 outputs with varying hysteresis ........................... 9
4.2 Comparator with Hysteresis............................................... 10
4.3 Thresholds VH,VL and output VG of hysteresis controller.................. 10
5.1 Schematic of a Boost Converter........................................... 11
5.2 Electrical Equivalent Topology of a Boost Converter for MOSFET states 11
5.3 Electrical Equivalent Average Topology of Boost Converter................ 12
6.1 CCM Voltage and Gate Signal.............................................. 13
6.2 Energy in Power Converter over time...................................... 16
6.3 Output Power [%] as a function of D...................................... 18
6.4 Square Root of Output Power [%] as a function of D....................... 18
7.1 MSP430 Command Flowchart................................................. 21
8.1 Schematic of Energy Harvesting System with TEG Generator................. 22
8.2 MPPT Circuit ............................................................ 23
8.3 Experimental Setup ...................................................... 23
8.4 Boost Converter ......................................................... 24
9.1 TEG and MSP430 outputs................................................... 25
TEG Output Curves, Calculated MPPs and High and Low OPPs
viii
9.2
26


1. Introduction
Over the past century both worldwide population, as well as energy consumption
per capita have also been on the rise [4,18]. Despite the potential converging of energy
use per capita [18], energy generation from all sources is still a necessity [6,8]. Due
to the Laws of Entropy, there is a finite amount of energy available for harvesting
within our universe. Therefore production from existing sources must be optimized,
as well energy generation from small scale, green and waste energy sources must be
advanced.
Many renewable sources have been developed and can contribute to the 31 states
in the United States of America who have passed Renewable Energy Portfolios. Many
of these proposed sources are in large scale, contributing power on the Megawatt
level [2], Even with the large scale generation as the primary sources of funding,
small scale optimization is necessary for added reduction in greenhouse gasses To
this end, optimization of energy generation plays an important role. Currently solar
photovoltaic (PV) and wind farms make up the largest sector of development and
installation [8,19]. While these improving technologies aid the energy portfolios,
they do not impact the efficiency of the existing fossil fuel generators such as coal,
nuclear, and natural gas. While these large-scale projects help with grid oriented
power generation, the energy optimization must be scaled for personal and off the
grid as well. Correct scaling will allow for expanded harvesting techniques such as
vibrational, thermal and wave energy. Since most funding is directed towards PV and
wind energy, a void is opened surrounding energy harvesting from other sources.
To optimize the generation capacities of these smaller sources, Maximum Power
Point Tracking (MPPT) techniques must be designed specifically for the characteris-
tics of the source. For best performance MPPT techniques should be tailored to the
generators capabilities and responses to environment. Choosing an MPPT scheme
that does not fit the generators characteristics will lead to increased losses. Most
1


MITT techniques in commercial use are derivatives of MITT techniques developed
for wind and PV applications. By tailoring the MITT technique towards the small
scale needs and individual characteristics of harvesting generators, we can further
improve efficiency, power output, and thereby increase the penetration of these gen-
erators into the wider power system.
An adaptation to the existing Perturb and Observe (P&O) technique is proposed.
In this adaptation the current will be indirectly and proportionally estimated, and
relative change in output power will be calculated based on the duty cycle of a hys-
teresis based Schmitt trigger. Through this technique, MITT can occur within a
microcontroller controlled power converter that has a lower cost with the same ef-
ficiency. The advantage comes from the ability to estimate output power without
direct current measurement. Due to this lower cost and smaller energy consumption,
this microcontroller-based MITT harvesting circuit can be used with a wider array
of generators, as well as smaller scale systems where cost is the limiting factor for
implement at ion.
2


2. TEG energy harvesting
2.1 Operational Principles of Thermoelectric Generation
Utilizing the Seebeck and Peltier effects, a full relationship between heat energy
travelling across a junction of differing conductive materials and the potential voltage
across that same junction can be modeled [5]. Modeling the junction as a P-type and
an N-type conductors, a potential differential in the form of excess charges builds along
the interface of the junction. Electrons freed by heat energy move to the opposite
end of the semiconducting material, combining with holes. The combination releases
energy in the form of heat, dissipated to the cold side of the junction. Through this
repeated action, the P-N junction will normalize to a common temperature. In order
to extract power from this system, a temperature differential must be maintained
across the junction. Bridging the electrically connected semiconductors in series with
a load will induce current to flow and transfer the power. These individual modules
can be connected in series for greater total voltage output, or can be connected in
parallel for greater total current output. Fig. 2.1 shows a typical schematic of TEG
module
2.2 Electrical Model and Maximum Power Point
For given environmental conditions, a TEG is a constant power source with an
internal resistance. In the process of electrical modeling of a TEG, the Thevinin
equivalent circuit is expressed in Figure 2.2. The TEG is modeled as a constant
voltage source (Voc) with an internal series resistance (Rint) The load (Rext) can be
fixed or variable.
Without a converter, the generator will naturally operate on a point on the PV
curve associated with the load resistance as seen by the TEG. This causes the TEG
to operate on a level defined by the load, not the optimal operating point of the TEG,
i.e. MPP. Using a power converter, the resistance of the load as seen by the TEG
can be controlled such that the TEG will operate at MPP in any condition. Figure
3


Heat Source
Electrical
Conductor
Semiconductors
-CL -Q -CL TL


P-type N-type P-typc N-type


Heat Sink
Load Resistance
Ceramic
Plate
Figure 2.1: Two TEG modules
connected in series
Figure 2.2: Ideal Electrical Equivalent
Circuit of a TEG
2.3 showrs the changing path of the MPP as temperature differential across the TEG
changes.
Calculating the powrer dissipated through the load:
i-TEG
Voc
F^int I
ext
(2.1)
Pout ^TEG^e-xt
(2.2)
4


250
Figure 2.3: MPP changes with varying temperature
P
out
(
Vr
oc
Pint + R ext
v2
voc
) 2 Rext
R2
1\nt
Rext
(2.3)
2 Rint I Rext
To maximize the output power, the denominator is minimized. This occurs when
the derivative is zero.
0
d
QRext
e>2
^ int
Rext
+ 2 Rint + Rext)
(2.4)
0
p2
Rl
ext
+1
(2.5)
Therefore maximum power occurs when Rint = Rext- Calculating the voltage across
the external resistance:
Vteg
R
ext
R.
int
R
-Voc
ext
(2,6)
5


Maximum power occurs when:
Vteg 7V0C (2.7)
Figure 2.4 shows the output of the TEG at the condition AT = 72F. This data
was experimentally collected by directly connecting generic 0 IMG variable resistor
to the output of the TEG. The resistor was then varied, and the current, voltage and
power was recorded. As shown the current and voltage have a linear relationship at a
set temperature differential. The power and voltage have a defined maximum peak,
occurring at VTeg = \Yoc as derived.
Figure 2.4: Output Curves of a TEG
AT = 72 F
6


3. Current MPPT Techniques
Perturb and Observe (P&O) is widely used in applications for power produced
by solar arrays [24], A simple P&O system, at discrete intervals, samples the power
production of the generator on either side of the current operational point, and moves
the current operational point towards that of higher power. P&O responses poorly to
a fast changing power output [23]. It is inefficient at steady state due to the constant
sampling and moving of the operational point [31] and creates a harmonic around
the Maximum Power Point (MPP). A progressive algorithm reduces these losses, and
the cost of the additional processing can be balanced by the power optimization [13].
P&O is widely used due to ease of use. Since P&O performs all actions based on the
generators output, minimal knowledge of the generator responses to different stimuli
is needed.
Incremental Conductance (IC) is a method that can avoid oscillations that occur
at the MPP in P&O [5]. IC compares the slope of the IV curve of the generator
against the negative value of the current vs. the voltage [16]. For a general IV curve
for power generation:
Gd
dl
dV
(3.1)
Gs
I
V
(3.2)
Gd is the ratio of the derivative of the current and the derivative of the voltage,
while Gs is the negative ratio of the current and voltage. At any point on the IV
slope before the MPP, Gd > Gs and the operational point is moved towards higher
voltage. At the point after the MPP, Gs > Gd and the operational point is moved
towards a lower voltage. Once the point where Gd = Gs, MPP has been reached. For
generators in changing environmental conditions, sampling will still occur to ensure
that operation is constantly at MPP.
7


The fractional open circuit voltage (OCV) method uses the relationship between
MIT voltage and OCV [20, 28]. The OCV is sampled periodically to determine
the MIT voltage for the given condition. To sample the OCV, the power source is
electrically disconnected by a relay or by shutting off the power converter for the
OCV measurement. This causes, temporary power loss and complex implementation
are drawbacks.
Neural Network is a more advanced algorithm than P&O for MITT [24], Neural
Network relies on various measurements which are fed through a series of If Then
controls. The operational point is then moved and the controls are repeated. Neural
Network allows for a faster isolation of the MIT. as well as less harmonic oscillation
once MIT is reached [14], Neural Network depends on knowledge of the characteris-
tics of the generator, and as such cannot be generalized for all generators. Addition-
ally Neural Network is dependent on multiple measurements, leading to an increased
power consumption. [11],
Due to the abilities of all algorithms to closely track and maintain power produc-
tion at or near MIT. efficiency can be more markedly improved by limiting losses and
power consumption associated with measurement. Continuous current measurement
can be economically costly as well as power intensive. Therefore focus on current-
sensorless power measurement can affect a greater change in efficiency, and can be
used with more efficient tracking algorithms.
8


4. Hysteresis Control
In this work, a comparator with hysteresis was used to generate the gate signal
for the power converter. Hysteresis has been successfully used for control of energy
harvesting devices [21,22], The comparator function is simple in nature; the TEG
voltage is compared to a reference signal. If the voltage is higher than the reference,
the comparator output is high. If the voltage is lower than the reference the com-
parator output is low. If the comparator is used without any additional hysteresis,
the output signal can suffer from noise. Figure 4.1a shows the output of the TEG
and comparator when there is insufficient hysteresis. As shown on channel 1, the gate
signal switches wildly.
Ch. 3 MSP430 PWM Output
Tek SL Stop MPos: 0.000s TRIGGER
Type
Source
am
Slope
mm
Mode
Coupling
CH3 2.OOV0W CH4 I.OOVB* 30-Jun-14 1653
Tek SL D Trig'd MPos: 0.000s
Ch. 1 TEG Voltage Output
MEASURE
CH3
Mean
3.10 V
Ch. 2 C omparator Reference Input
2+ Mean
Ch. 3 Comparator Output 3
,.-ll y y \
Ch. 4 MSP430 PWM Output 683nW
.lYirnTfTnTrfnnnrr
543.5kHz
CH2 2.00V M 10.0jus CH3 f 3.74V
CH3 5.00V CH4 5.00V 10-JuM4 13:53 325.005Hz
(a) TEG Output with
(b) TEG Output with
Insufficient Hysteresis
Hysteresis
Figure 4.1: TEG and MSP430 outputs with varying hysteresis
To avoid this chattering of the gate signal, resistance was added to the comparator
of the MSP430. Figure 4.2 shows the orientation of the resistances and inputs. The
hysteresis has a high (Vh) and low (Vr) threshold. The thresholds are defined as
follows:
VH
i?3 + i?4
i?4
Vref
R3
i?4

(4,1)
9


O V(j
R4
_R3 + R4 Ra
VL ----5----VREF-----E~VH
-T14 114
(4.2)
Where V0r and V0r are the high and low values of the comparators output. In
this experiment V0r = 5V and Vqh = OV. To minimize the ripple, R4 was chosen to
be 150012 and R3 was chosen to be 3012. This results in ~ 1. The equations
can be rewritten as:
Vh Vref
(4.3)
Vl Vref ~ 0.1F
(4.4)
Figure 4.3 shows how the gate signal relates to the TEG voltage for a dual supply
comparator. In this experiment Vsat is 5 V on the high side and 0 V on the low side.
v GATE Vs*
VL 1 VH
1 v REF VKC

Figure 4.3: Thresholds Vr,Vl and output Vg
of hysteresis controller
10


5. Boost Converter
For this experiment a boost converter was used to control the power flow between
the generator and load. The boost converter uses the inherent properties of energy
storage within capacitors and inductors to step up the input voltage level while main-
taining the same power across the power converter. Figure 5.1 shows the schematic
of a typical boost converter.
/vrn
/ -/ / 1 + z: vc 1 h|
/ VGa* 1 Y
Figure 5.1: Schematic of a Boost Converter
Figure 5.2 shows the 2 states of the power converter, 5.2a shows the topology
when the MOSFET is on, and 5.2b shows the topology when the MOSFET is off. By
switching the MOSFETs state at a very high frequency, the output of the TEG can
be controlled with limited ripple, at a designated level.
(a) MOSFET on (b) MOSFET off
Figure 5.2: Electrical Equivalent Topology of a
Boost Converter for MOSFET states
The basic principle that inductor current can not change instantaneously causes a
ripple in output current of the TEG. This in turn causes a ripple in the output voltage
of the TEG. Figure 6.1 shows the voltage ripple as a function of the MOSFET state.
Adjusting the duty cycle of the MOSFET controls the ripple and the average voltage
output of the TEG.
11


Conventionally the boost converter is modeled by the average operation. Figure
5.3 shows the averaged boost converter. D refers to the duty cycle of the MOSFET
on state. If the switching frequency of the MOSFET is fast enough, the averaged
boost converter is a good representation of the operation of the switch-mode boost
converter.
Figure 5.3: Electrical Equivalent Average Topology
of Boost Converter
Using this averaged model, it is clear that the TEG output current is easily
controlled by the duty cycle. In this experiment, the capacitor used is a 2.5V 3F
supercapacitor. As such, the throw voltage can be assumed to be stiff, and therefore
Vc can be assumed to be constant.
Additionally a 450inductor was used in this experiment. This choice reduced
the TEG output current ripple.
12


6. Continuous Conduction Mode
For operation of switch mode conducting, two modes of operation can be possible,
continuous conducting mode (CCM) and discontinuous conducting mode (DCM).
CCM occurs when the switching of the power converter allows the instantaneous
voltage or current to exceed or fall under the average output. This ripple can be
controlled by a variety of factors. CCM has two states. During the off state of the
MOSFET, the power from the generator is used to charge the internal capacitance of
the power converter. This results in a rise of the output voltage of the generator. Once
the output voltage of the generator crosses a predetermined threshold, the MOSFET
changes to the on state, and power from the capacitance of the power converter is
transferred to the load, while the instantaneous voltage output of the power converter
drops. Figure 6.1 shows the generator voltage and the gate signal as a function of
time during CCM operation.
Figure 6.1: CCM Voltage and Gate Signal
Using these two states, the energy and power output of the generator over time
can be calculated. If one assumes no losses within the power converter, the calculation
of the input power is equivalent to the output power. We will therefore calculate the
13


output energy over time of the power converter, rather than the energy produced by
the generator over time. The voltage waveform of the power converter is completely
described by the MOSFET on and off states. In the off state of the MOSFET, we
can define the voltage as a function of time.
v2(t) = VH- VH^L (6-1)
Where v2(t) is the instantaneous output voltage of the power converter during
the on state of the MOSFET, VL and VH are the high and low voltage thresholds of
the hysteresis band respectively, and AT2 is the time that the MOSFET is in the on
state.
Using an ideal representation of a power converter, we can calculate the output
current across the inductor. The current through an inductor is related to the voltage
across the inductor:
vL(t) = L^iL(t) (6.2)
where v^t) is the voltage across the inductor and ii,(t) is the current through the
inductor. Solving 6.2 for the current through the inductor:
hit) = -jr jvL(t)dt (6.3)
During the on state of the MOSFET, iL(t) = i2(t) and vL(t) = v2(t). i2(t) and v2(t)
are the current and voltage outputs of the power converter during the on state of the
MOSFET.
i2(t) = -jr Jv2(t) dt (6.4)
During the MOSFET on state, the output voltage of the power converter starts at
the high voltage threshold, Vh, and decreases linearly at a rate of . Setting
14


Vh-Vl.
A T2 '
k2 =
i2{t) = ^ j(VH ht) dt + /0
= ^(Vffi 2^^ (6.5)
Multiplying the instantaneous current and voltage, we can obtain the instantaneous
power, P2(t), of the power converter during the MOSFET on state.
P2(t) = (VH ~ k2t)(^VHt ~t2 + Jo)
= - \\k2VHt2 + - k2I0)t + VHI0 (6.6)
The integration of power over time yields the total energy expended over the same
time period.
Reinserting k2
E2(t)
,at2
P2(t) dt
(6.7)
^, we can begin to cancel terms and simplify the equation.
E2{t) = ^-AT2(2Vh -Vh + Vl)2 + AT2I0\{Vh + VL)
oL 1
atHVh + Vl'2
2 L 2V
)2 + /0AT2
(Vh + VL)
(6.8)
2 2
The voltage output varies linearly between Vh and Vi over time. Therefore the
average voltage can be defined as Vavg = Vh+Vl .
E2(t) = Ta7Jv£s + I,AT2V, (6.9)
During the MOSFETs off state, energy is transferred from the generator to the
power converter. This energy is the equal to the energy transfered from the power
converter to the load. Figure 6.2 shows the energy in the power converter over time.
15


Figure 6.2: Energy in Power Converter over time
The usage of hysteresis control results in the presence of base energy during
the switching period. The base energy must be calculated for the off state of the
MOSFET.
Ei(t) ATiI0Vavg (6.10)
Where Exit) is the energy over the MOSFET off time, AY',. The total energy is
described by equation 6.11
Etotal.it) = + ioAT^VAg + IoATiVavg (6.11)
Etotal it) is the total energy output of the power converter over the switching
period. The power output, Pout, of the power converter is the total energy output-
divided by the total switching time, T'sw-
ift


Pout(t)
^TjValg + IoV^jAT, + A T2)
Tsw
1 AT|yo2fl I0Vavg(AT1 + AT2)
2L T<
sw
T<
sw
(6.12)
Using the definition of duty cycle, the duty cycle of the on state of the MOSFET is
defined as D = The total switching time is defined as TSw = ATi + AT2
Pout{t) ~^jTswD2V2vg + IoVavg (6.13)
For the use in this experiment, the P&O algorithm measures the change in power
over a change in operating conditions. Therefore the maximum power point can be
found by simply testing the power level of one set of operating conditions relative
to another, rather than having to measure the actual power. Equation 6.13 can be
simplified to:
Prelativeit) ~^jPswD2V^vg (6.14)
Where Preiative{t) is the amount of power output of the TEG above the lower
threshold of the comparator. In this way, measuring duty cycle and the voltage, and
maintaining a constant switching time, relative change in power can be estimated
without direct current measurement. Through this derivation we find that the average
output power is related to the square of the voltage and the square of the Duty Cycle
of the MOSFET on stateZU Since D by definition is a positive value between 0 and
1, plotting the dependence of Power on D shows the relationship between power and
Duty Cycle. This relationship is shown in figure 6.3.
As shown in figure 6.3, the relationship between the power and the duty cycle is
non-linear. Since the power output is relative to the square of the voltage and the
square of the duty cycle, the power can be shown to be relative to the square root
17


Power as a function of Duty Cycle
Figure 6.3: Output Power \%\ as a function of D
of the duty cycle. Figure 6.4 shows the relationship between the square root of the
power and the duty cycle.
Square Root of Power as a function of Duty Cycle
Figure 6.4: Square Root of Output Power [%] as a function of D
Figure 6.4 shows that the duty cycle affects the power output of the generator in
a similar fashion as the current. Therefore to calculate relative power, the duty cycle
can be used with the voltage instead of direct current measurement.
18


7. MSP430 Microcontroller
7.1 Microcontroller Advantages
The MSP430 Microcontroller is a basic but versatile microcontroller from Texas
Instruments (TI). The advantages of the MSP430 are the low power draw, flexibility
and low cost. In this application, the MSP430 will act as a comparator, as well as
reading the voltage input, the duty cycle of the comparator, and it will run the P&O
algorithm to vary a Pulse Width Modulation (PWM) signal for use as a reference
signal for the comparator. Using the comparator output as a gate signal, the MSP430
will control the switching functionality of a boost converter to operate the generator
at optimal power level.
The MSP430 can be easily programmed for the uses of the user. A faster or
slower response can be accommodated with minimal modification. The MSP430 is
run in low power mode 0 during the background processes in order to draw minimal
power.
The hysteresis of the MSP430s comparator is extremely small. Therefore exter-
nal resistance has been soldered to the relevant terminals in order to increase the
hysteresis point of the comparator. Additionally the comparator output is filtered by
the MSP430. This allows for a clean square wave output, that is used as the gate
signal of a power converter.
With the P&O algorithm used in this experiment, The MSP430s response speed
when subjected to a varying power output is inversely related to the steady state
error. This is due to a constant step size being used for the MPPT algorithm. A
larger step size would allow the algorithm to quickly move the operating point to the
MPP. Once the MPP is reached, the step size is not changed. This results in a large
harmonic around the MPP. By decreasing the step size, the steady state harmonic
error will be reduced at the expense of number of steps needed to reach MPP. Due to
the characteristics of a TEG, namely a slow output response relative to environmental
changes, the P&O algorithm has attempted to minimize steady state error.
19


The steady state error can be minimized if the P&O algorithm is set up to change
the perturbation step size depending on the relative power change. This can bridge
the divide between response speed and steady state error.
7.2 Coding and Desired Results
A flowchart of a basic P&O technique can be seen in figure 7.1. The flowchart
shows a simple, infinite loop that will work with any generator. The plug-and-play
simplicity of the algorithm, combined with the low cost of production, makes this
MPPT technique ideal for small scale and remote generation. At the steady state
output of the generator, the power converter will oscillate around the MPP. This
oscillation can be limited if progressive algorithms are applied, changing the time
between samples as well as the step size of the duty cycle. A small step size is ideal
for generators with slow response times such as TEGs. For generators with fast
response times, or whos environmental conditions quickly affect the output (such
as Solar PVs or vibrational generators), the harmonic oscillations must be balanced
with the response time of the generator. Using the MSP430, these alterations to the
code can be implemented quickly, and without deep knowledge of the inner-workings
of the specific generator. This ease of use extends the number of generators with
which the MPPT scheme can be implemented.
20


Figure 7.1: MSP430 Command Flowchart
21


8. Experimental Implementation
Figure 8.1 shows the overall system for harvesting energy from a TEG. The
MSP430 performs the comparator functionality, as well as the PWM generation, the
duty cycle measurement and the MPPT algorithm. The comparator functionality has
external resistances to increase the hysteresis of the system.
Low Pass Filter MSP430
Figure 8.1: Schematic of Energy Harvesting
System with TEG Generator
The output of the PWM was connected to a voltage divider comprised of generic
0-500k variable resistors. The output of the voltage divider is connected to a low
pass filter. The low pass filter is comprised of a 0-500k variable resistor and a 10 fi F
capacitor. Figure 8.2 shows the MSP430, low pass filter, and connected elements.
The TEG used for experimentation is a Bi-Te based TEG module (G2-30- 0313,
Tellurex, MI). The heat source used was an aluminum block on a temperature-
22


MSP430
Figure 8.2: MITT Circuit
controlled hotplate (HP131225Q, Thermo Scientific, MA). The heat sink used was
a generic CPU cooling fan/heat sink assembly. A hre brick was inserted between
the hotplate and the heat sink to minimize the effect of convection heat. Thermal
compound (RG-ICFN-200G-B1, Cooler Master, CA) was used for the TEG. The
experimental setup is shown in Fig. 8.3.
Figure 8.3: Experimental Setup
23


Any type of power converter can be connected to the energy harvesting system.
For this experiment, a diode-based boost converter is selected due to its simplicity.
The boost converter is comprised of a 450fiH inductor (EC-7, Triad Magnetics, CA),
an N-channel MOSFET (NTD4906N-35G, ON Semiconductor, AZ), a Schottky diode
(BAT46, STMicroelectronics, Switzerland), and a 3F, 2.5 V supercapacitor (M1020-
2R5305-R, Cooper Bussmann, MO) were used. A generic potentiometer (1MQ) was
used to control the load current. The implemented MPPT control circuit and power
converter can be seen in Fig. 8.4.
Figure 8.4: Boost Converter
24


9. Results
Implementation of the MPPT algorithm on the MSP430 allows for optimal output
of the generator with no interruption of generation or measurement. Due to the
constant sampling over time, at steady state there exists an oscillation around the
MPP. For this experiment, the MPPT algorithm was tuned to have a small steady
state error. This causes a slow settling time for the algorithm. This is compatible
with the slow changing output of a TEG relative to environmental changes. For this
experiment, each time the hot side temperative was changed, 30-45 minutes of settling
time was given, allowing the TEG to settle to a constant output, and allowing the
MPPT algorithm to settle around the MPP.
In order to test the performance of the MPPT algorithm, the TEG was connected
to a generic boost converter. The voltage output of the TEG was also connected to
the MSP430. The MSP430 measured the voltage output of the TEG, and generated
a PWM signal to be used as a reference for the MSP430s internal comparator. Fig-
ure 9.1 shows the output waveforms of the TEG and MSP430, captured during the
experiment.
Tek JL DWd MPos: 0.000s
4-
Ch. 1 TEG Output Voltage
MEASURE
CH3
Mean
3.37V
rf 11 *'fr<
Ch. 2 Comparator Reference Input
3~t m i ( m
Ch. 3 MSP430 Comparator Output
CH4
Mean
3.12 V
CH2
Mean
Ch. 4 MSP430 PWM Output
CH3 5,00V
CH2
CH4
2.00V
5.00V
M 25.0jus
10-Jul-H 15:25
468mV
CH4
Freq
192.3kHz?
CH3 f 2.16V
37.1506kHz
Figure 9.1: TEG and MSP430 outputs
25


As shown, the MSP430 generates a PWM signal that is passed through a low
pass filter. The output of the filter is shown on channel 2. This is used as a reference
input to the comparator, whos output (channel 3) is used as the gate signal for the
boost converter.
Due to the added hysteresis in the circuitry, the TEG output has a very small
ripple, on the order of 10 mV. Additionally due to the comparator output filtering
of the MSP430, the gate signal shows a fast response with clear on and off switching
states.
Figure 9.2 shows various Power and Voltage outputs of the TEG for given temper-
ature differentials. Also plotted are the calculated MPPs for the same temperatures.
The performance of the MPPT controller is listed in 9.1.
P-V Curves
TEG Output Voltage [V]
Figure 9.2: TEG Output Curves, Calculated
MPPs and High and Low OPPs
Table 9.1 shows the system characteristics, the calculated MPP, the high and
low OPs. As shown, the errors at the high and low operating points do not exceed
0.15%. This small error is due to the tuning of the MPPT algorithm for a laboratory
setting. In a practical application, the settling time of the MPPT algorithm can be
significantly decreased while only raising the steady state error slightly.
26


Table 9.1: Experimental result: (1) V I characterizations. (2) Operating point
comparisons. Vteg and P: calculated output voltage and power at MPP from
V I characteristics. 4+, Pl, Vh, and Ph: upper and lower bounds of actual TEG
output voltage and power controlled by the proposed system. (3) Performance.
Vlerr, Plerr, Vherr and Pherr denote the error between MPP and the upper
and lower bounds of actual TEG output
AT(C) System characterization Calculated MPP Low OP High OP
Performance
Curve (mW.V) Vteg (mV) P{mW) VL{mV) PL(mW) VH(mV) PH(mW) VLERR (%) Plerr(%) Vherr(%) Pherr(%)
23 V = 350.93^ + 143.25 204.1 14.619 198 14.606 212 14.597 -6.604 0.089 -3.87 0.1498
54 V = -351.51V+ 365.99 520.58 95.264 515 95.253 524 95.26 -1.718 0.0114 0.657 0.011
8-5 P = -362.8v + 574.02 791.089 227.054 777 226.982 811 226.91 -4.192 0.0317 -2,517 0.06
99 V = -362.47v+ 689.56 951.183 327.95 920 327.601 960 327.926 -4.167 0.107 0.927 0.009
126 V = -342.64v+ 819.25 1195.497 489.705 1170 489,483 1230 489.5 -4.878 0.0455 2.886 0.042
27


10. Discussion
The proposed energy harvesting technique allows for easy implementation regard-
less of generator type. The choice to use a microcontroller in implementation results
in a larger power draw for calculations than simple circuit based approaches. This
energy loss is mitigated by the type of controller used, and the choice in programming
to maintain the microcontroller in low power mode.
These losses due to powering the microcontroller are offset, not only by the per-
formance of the system relative to not using MPPT during generation, but also by
the ease of use. The system as outlined can be directly connected to the output of
any generator. This versatility in generators used allows for expanded use of small
scale generators for uses such as waste heat recovery, powering of remote sensors, or
energy generation for off the grid systems.
In the experiments performed, the MPPT algorithm was tuned to work with the
response characteristics of a TEG. The algorithm as compiled can be easily tuned
for the characteristics of other generators, or can be set to balance the speed and
accuracy demands of a generic generator.
Additionally, using the duty cycle of the gate signal to estimate the output current
of the generator, any MPPT algorithm based on output power can be implemented.
This can allow for systems with direct current measurement to be replaced with an
equally effective system that has a lower power draw, resulting in a more optimal
performance.
28


11. Conclusion
A perturb and observe MPPT technique based on power estimate without direct
current measurement is shown. This technique has been shown on a TEG energy
harvesting system. The proposed system operates by measuring the duty cycle of
a hysteresis based schmitt trigger. The power variation is a function of duty cycle.
This MPPT technique is simple, direct, and due to the measurement of output volt-
age, requires no knowledge of the generator prior to use. This allows quick and easy
implementation with a variety of generators without modification to the micro con-
troller or the generator. This technique can readily be used in conjunction with any
type of power converter. The proposed scheme has been validated analytically and
experimentally, and demonstrated successful performance.
29


REFERENCES
[1] Pallavee Bhatnagar and E.K. Nema. Maximum power point tracking control
techniques: State-of-the-art in photovoltaic applications. Renewable and Sus-
tainable Energy Reviews, 23(0):224 241, 2013.
[2] Geoffrey Black, Donald Holley, David Solan, and Michael Bergloff. Fiscal and
economic impacts of state incentives for wind energy development in the western
united states. Renewable and Sustainable Energy Reviews, 34(0): 136 144, 2014.
[3] S. Bolognani, E. Carli, G. Cavraro, and S. Zampieri. A distributed control
strategy for optimal reactive power flow with power and voltage constraints.
In Smart Grid Communications (SmartGridComm), 2013 IEEE International
Conference on, pages 115-120, Oct 2013.
[4] Halvard Buhaug and Henrik Urdal. An urbanization bomb? population growth
and social disorder in cities. Global Environmental Change, 23(1): 1 10, 2013.
[5] Min Chen, L.A Eosendahl, T.J. Condra, and J.K. Pedersen. Numerical mod-
eling of thermoelectric generators with varing material properties in a circuit
simulator. Energy Conversion, IEEE Transactions on, 24(1):112124, March
2009.
[6] Jeffrey Chow, Eaymond J. Kopp, and Paul E. Portney. Energy resources and
global development. Science, 302(5650):1528-1531, 2003.
[7] P. Das, M. Pahlevaninezhad, and G. Moschopoulos. Analysis and design of
a new ac x2013;dc single-stage full-bridge pwm converter with two controllers.
Industrial Electronics, IEEE Transactions on, 60(ll):4930-4946, Nov 2013.
[8] Vijay Devabhaktuni, Mansoor Alain, Soma Shekara Sreenadh Eeddy Depuru,
Eobert C. Green II, Douglas Nims, and Craig Near. Solar energy: Trends and
enabling technologies. Renewable and Sustainable Energy Reviews, 19(0):555 -
564, 2013.
[9] S. Gill, I. Kockar, and G.W. Ault. Dynamic optimal power flow for active dis-
tribution networks. Power Systems, IEEE Transactions on, 29(1) :121 131, Jan
2014.
[10] Issarn Houssamo, Fabrice Locment, and Manuela Sechilariu. Experimental anal-
ysis of impact of {MPPT} methods on energy efficiency for photovoltaic power
systems. International Journal of Electrical Power Energy Systems, 46(0):98 -
107, 2013.
30


[11] HEA Ibrahim and Mahmoud Ibrahim. Comparison between fuzzy and p&o con-
trol for mppt for photovoltaic system using boost converter. Journal of Energy
Technologies & Policy, 2(6), 2012.
[12] D.S. Karanjkar, S. Chatterji, S.L. Shimi, and A Kumar. Real time simulation and
analysis of maximum power point tracking (mppt) techniques for solar photo-
voltaic system. In Engineering and Computational Sciences (RAECS), 2014
Recent Advances in, pages 1-6, March 2014.
[13] Jungmoon Kim and Chulwoo Kim. A dc x2013;dc boost converter with variation-
tolerant mppt technique and efficient zcs circuit for thermoelectric energy har-
vesting applications. Power Electronics, IEEE Transactions on, 28(8):3827-
3833, Aug 2013.
[14] Shiho Kim, Sungkyu Cho, Namjae Kim, and Jungyong Park. A maximum power
point tracking circuit of thermoelectric generators without digital controllers.
IEICE Electronics Express, 7(20): 1539-1545, 2010.
[15] S.B. Kjaer, J.K. Pedersen, and F. Blaabjerg. A review of single-phase grid-
connected inverters for photovoltaic modules. Industry Applications, IEEE
Transactions on, 41 (5): 1292-1306, Sept 2005.
[16] K. Kalyan Kumar, R. Bhaskar, and Hemanth Koti. Implementation of {MPPT}
algorithm for solar photovoltaic cell by comparing short-circuit method and in-
cremental conductance method. Procedia Technology, 12(0):705 715, 2014. The
7th International Conference Interdisciplinarity in Engineering, INTER-ENG
2013, 10-11 October 2013, Petru Maior University of Tirgu Mures, Romania.
[17] Shin-Yeu Lin and Jyun-Fu Chen. Distributed optimal power flow for smart grid
transmission system with renewable energy sources. Energy, 56(0): 184 192,
2013.
[18] Ming Meng, James E. Payne, and Junsoo Lee. Convergence in per capita energy
use among {OECD} countries. Energy Economics, 36(0):536 545, 2013.
[19] Fredric C. Menz. Green electricity policies in the united states: case study.
Energy Policy, 33(18):2398 2410, 2005.
[20] Andrea Montecucco, Jonathan Siviter, and Andrew R Knox. Simple, fast and
accurate maximum power point tracking converter for thermoelectric generators.
In Energy Conversion Congress and Exposition (ECCE), 2012 IEEE, pages 2777-
2783. IEEE, 2012.
[21] Muhan nad Alaraj, Zhiyong Jason Ren, and Jae-Do Park. Microbial fuel cell en-
ergy harvesting using synchronous flyback converter. Journal of Power Sources,
247(0):636 642, 2014.
31


[22] Jae-Do Park and Zhiyong Een. Hysteresis-controller-based energy harvesting
scheme for microbial fuel cells with parallel operation capability. Energy Con-
version, IEEE Transactions on, 27(3):7I5 721. Sept 2012.
[23] Navneesh Phillip, Othman Maganga, KeithJ. Burnham, Mark A. Ellis, Simon
Robinson, Julian Dunn, and Cedric Eouaud. Investigation of maximum power
point tracking for thermoelectric generators. Journal of Electronic Materials,
42(7):1900 1906, 2013.
[24] Y.K. Ramadass and A.P. Chandrakasan. A battery-less thermoelectric energy
harvesting interface circuit with 35 mv startup voltage. Solid-State Circuits,
IEEE Journal of, 46(1):333-341, Jan 2011.
[25] R.S. Rao, K. Ravindra, K. Satish, and S.V.L. Narasimham. Power loss mini-
mization in distribution system using network reconfiguration in the presence of
distributed generation. Power Systems, IEEE Transactions on, 28(l):317-325,
Feb 2013.
[26] Ali Reza Reisi, Mohammad Hassan Moradi, and Shahriar Jarnasb. Classification
and comparison of maximum power point tracking techniques for photovoltaic
system: A review. Renewable and Sustainable Energy Reviews, 19(0):433 443,
2013.
[27] Y. Riffonneau, S. Bacha, F. Barruel, and S. Ploix. Optimal power flow manage-
ment for grid connected pv systems with batteries. Sustainable Energy, IEEE
Transactions on, 2(3):309-320, July 2011.
[28] David Eric Schwartz. A maximum-power-point-tracking control system for ther-
moelectric generators. In Power Electronics for Distributed Generation Systems
(PEDG), 2012 3rd IEEE International Symposium on, pages 78-81. IEEE, 2012.
[29] Can Sener and Vasilis Fthenakis. Energy policy and financing options to achieve
solar energy grid penetration targets: Accounting for external costs. Renewable
and Sustainable Energy Reviews, 32(0):854 868, 2014.
[30] Yaosuo Xue, Liuchen Chang, Sren Baekhj Kjaer, J. Bordonau, and T. Shimizu.
Topologies of single-phase inverters for small distributed power generators: an
overview. Power Electronics, IEEE Transactions on, 19(5):13051314, Sept
2004.
[31] Rae young Kim and Jih-Sheng Lai. A seamless mode transfer maximum power
point tracking controller for thermoelectric generator applications. Power Elec-
tronics, IEEE Transactions on, 23(5):2310-2318, Sept 2008.
32


APPENDIX A. MSP430 Code
#include "msp430g2452.h"
typedef unsigned char BYTE;
#define abs_unsigned_long(frog) (frog)
#define multiply_int .c
#define LED1 BIT7
#define LED2 BIT2 // LED2 is on PI.6
#define PWMTop 100 // Set PWM Frequency: DCO/PWMTop
#define Period 1000-9 // Set PWM Frequency: DCO/PWMTop
#define TAIE (0x0002) /* Timer A counter interrupt enable */
#define CCIE (0x0010) /* Capture/compare interrupt enable */
#define ADC_CHANNELS 2
unsigned int samples[ADC_CHANNELS]={0,0};
unsigned int value=0;
int count;
int v_2;
int D_2;
int Power_middle;
int Power_low;
int Power_high;
int duty_low;
int duty_middle;
int duty_high;
int duty;
int down_count_on;
int down_count_off;
int off_count;
33


int up_count_on;
int up_count_off;
int on_count;
int duty;
int x;
int T_on;
int T_on_old;
int T_off;
int T_off_old;
int D_num;
int D;
int T_sw;
int dirl=l, dirO=l;
int voltage;
long unsigned int result;
char flash = 0;
void TA_init(void);
void ConfigADC(void);
void CA_init(void);
void main (voidM
WDTCTL = WDTPW | WDTHOLD; // Disable watchdog
DCOCTL = 10000; // Run at 16 MHz
BCSCTL1 = Period;
DCOCTL = Period;
PIOUT = BIT2;
P1DIR |= BIT7 I BIT2 | BIT5; // PI.7 = output
P1SEL |= BIT7 I BIT2 | BIT5; // PI.7 = TA1 output
P1SEL2 &= ~BIT7 | ~BIT2;
PIOUT = 0;
34


TA_init(); // Configure Timer_A for PWM, using up-mode
CA_init();
ConfigADCO ;
count = 0;
duty = 50;
flash = LED2;
CACTL1 |= CAON;
__enable_interrupt();
for (;;) {
while (!(CCIFG & TACCTLO));
T_sw = T_on + T_off;
D_num = T_on 100;
D = D_num / T_sw;
ADC10CTL0 &= ~ENC;
while (ADC10CTL1 & BUSY); // Wait if ADC10 core is active
ADC10SA = 0x100; // Data buffer start
ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start
voltage = ADC10MEM;
count += 1;
if(count == 1){
v_2 = voltage 0.1;
Power_middle = v_2 D;
duty_middle = duty;
duty += 1;
>
if (count == 2){
v_2 = voltage 0.1;
Power_high = v_2 D;
duty_high = duty;
35


duty -= 1;
duty -= 1;
>
if (count == 3){
count = 0;
v_2 = voltage 0.1;
Power_low = v_2 D;
duty_low = duty;
>
if (Power_low > Power_middle){
duty = duty_low;
}
else{
duty = duty_middle;
>
if(Power_high > Power_middle){
duty = duty_high;
>
else{
duty = duty_middle;
>
if(duty < 0){
duty = 5;
>
if(duty > 100){
duty = 95;
>
TACCR1 = duty;
__bis_SR_register(LPMO_bits + GIE);
36


>
>
#pragma vector = C0MPARAT0RA_VECT0R
__interrupt void COMPA_ISR(void) {
if ((CACTL2 & CA0UT)==0x01) {
CACTL1 |= CAIES; // value high, so watch for falling edge
up_count_on = TAR;
down_count_off = TAR; // Read TA count
T_off = down_count_off down_count_on;
if(abs(T_off_old T_off) > 5){
T_off = T_off_old;
}
if (T_off < 0){
T_off = PWMTop + down_count_off down_count_on;
>
T_off_old = T_off;
CACTL1 |= (CAON +CAIE + CAIFG);
__bic_SR_register_on_exit(LPMO_bits + GIE);
}
else {
CACTL1 &= ~CAIES; // value low, so watch for rising edge
down_count_on = TAR; //read TA count
up_count_off = TAR; //read TA count
T_on = up_count_off up_count_on;
if(abs(T_on_old T_on) > 5){
T_on = T_on_old;
>
if (T_on < 0){
T_on = PWMTop + up_count_off up_count_on;
37


>
T_on_old = T_on;
CACTL1 |= (CAON +CAIE + CAIFG);
__bic_SR_register_on_exit(LPMO_bits + GIE);
}
>
void CA_init(void) {
CACTL1 = CAON + CAIE; //CA+ on, interrupts enabled
CACTL2 = P2CA0 I P2CA1; // P1.1/CA1 = reference P1.0/CA0 = input
signal
CAPD = CAPD1 + CAPDO;
}
void TA_init(void) {
TACCRO = PWMTop; // TACCRO controls the PWM frequency
TACCR1 =90; // LED2 starts at 90% duty cycle
TACTL = TASSEL_2 + ID_0 + MC_1 + TACLR; // SMCLK, div 1, Up Mode
TACCTL1 = 0UTM0D_7; // Reset/Set: Sets at TACCRO, resets at TACCR1
>
void ConfigADC(void) {
ADC10CTL1 = BIT5 + CONSEQ.l;
ADC10CTL0 = ADC10SHT_2 + MSC + ADC100N + ADC10IE;
ADC10DTC1 = 0x01; // 1 conversions
ADC10AE0 |= BIT5; // PI.5 ADC10 option select
>
38


Full Text

PAGE 1

CURRENTSENSORLESSMAXIMUMPOWERPOINTTRACKINGAND ENERGYHARVESTINGFORTHERMOELECTRICGENERATORS by MATTHEWLANFORDBOND BachelorofArts,CarletonCollege,2006 Athesissubmittedtothe FacultyoftheGraduateSchoolofthe UniversityofColoradoinpartialfulllment oftherequirementsforthedegreeof MasterofScience ElectricalEngineering 2014

PAGE 2

ThisthesisfortheMasterofSciencedegreeby MatthewLanfordBond hasbeenapprovedforthe DepartmentofElectricalEngineering by JaedoPark,Chair YimingDeng BrianBrady July25,2014 ii

PAGE 3

Bond,MatthewLanfordM.S.,ElectricalEngineering CurrentSensorlessMaximumPowerPointTrackingandEnergyHarvestingforThermoelectricGenerators ThesisdirectedbyAssistantProfessorJaedoPark ABSTRACT Presentedisaduty-cycle-basedmaximumpowerpointtrackingMPPTscheme withestimatedpowerdependentondutycycleandoutputvoltage.Conventional MPPTmethodssuerfrompowerandscalneedsinvolvingdirectcurrentmeasurement,ordisconnectionofsourceandloadforopencircuitvoltagemeasurement. Theproposedschemeavoidsthesedisadvantages,whileretainingcapabilitywithall generators.Theimplementationviamicrocontrollerallowsforeasytuningofthe algorithmtosuittheresponsetimeofthegeneratorwithrespecttoenvironmental conditions.ThepowerconvertercontrollermaintainstheTEGoutputvoltageata referencelevelsetbythemicrocontroller,extractingmaximumpowerforthegiven temperaturecondition.ThismicrocontrollerbasedMPPTalgorithmisinexpensive, hasalowpowerconsumption,andcanbeusedwithanygenerator.Theproposed systemhasbeenvalidatedanalyticallyandexperimentally,andshowsamaximum powertrackingerrorof0.15%. Theformandcontentofthisabstractareapproved.Irecommenditspublication. Approved:JaedoPark iii

PAGE 4

DEDICATION Thisthesisisdedicatedtomyfamilyandpets,whocombinedtokeepmesane. iv

PAGE 5

ACKNOWLEDGMENT Thisthesiswouldnothavebeencompletedifnotforthesupportandguidenceof Dr.Jae-DoParkintheDepartmentofElectricalEngineeringattheUniversityof ColoradoDenver.Forgivingmethechancetoprovemyself,Iwillbeforevergrateful. v

PAGE 6

TABLEOFCONTENTS Tables........................................vii Figures.......................................viii Chapter 1.Introduction...................................1 2.TEGenergyharvesting.............................3 2.1OperationalPrinciplesofThermoelectricGeneration.........3 2.2ElectricalModelandMaximumPowerPoint.............3 3.CurrentMPPTTechniques...........................7 4.HysteresisControl................................9 5.BoostConverter.................................11 6.ContinuousConductionMode.........................13 7.MSP430Microcontroller............................19 7.1MicrocontrollerAdvantages.......................19 7.2CodingandDesiredResults.......................20 8.ExperimentalImplementation.........................22 9.Results......................................25 10.Discussion....................................28 11.Conclusion....................................29 References ......................................30 Appendix A.MSP430Code..................................33 vi

PAGE 7

TABLES Table 9.1Experimentalresult: V )]TJ/F20 11.9552 Tf 12.892 0 Td [(I characterizations.Operatingpoint comparisons. ^ V TEG and ^ P :calculatedoutputvoltageandpoweratMPP from V )]TJ/F20 11.9552 Tf 9.72 0 Td [(I characteristics. V L P L V H ,and P H :upperandlowerboundsof actualTEGoutputvoltageandpowercontrolledbytheproposedsystem. Performance. V LERR P LERR V HERR and P HERR denotetheerror betweenMPPandtheupperandlowerboundsofactualTEGoutput..27 vii

PAGE 8

FIGURES Figure 2.1TwoTEGmodulesconnectedinseries...................4 2.2IdealElectricalEquivalentCircuitofaTEG................4 2.3MPPchangeswithvaryingtemperature..................5 2.4OutputCurvesofaTEG T =72 o F ....................6 4.1TEGandMSP430outputswithvaryinghysteresis............9 4.2ComparatorwithHysteresis.........................10 4.3Thresholds V H ;V L andoutput V G ofhysteresiscontroller.........10 5.1SchematicofaBoostConverter.......................11 5.2ElectricalEquivalentTopologyofaBoostConverterforMOSFETstates11 5.3ElectricalEquivalentAverageTopologyofBoostConverter........12 6.1CCMVoltageandGateSignal........................13 6.2EnergyinPowerConverterovertime....................16 6.3OutputPower[%]asafunctionofD....................18 6.4SquareRootofOutputPower[%]asafunctionofD...........18 7.1MSP430CommandFlowchart........................21 8.1SchematicofEnergyHarvestingSystemwithTEGGenerator......22 8.2MPPTCircuit................................23 8.3ExperimentalSetup.............................23 8.4BoostConverter...............................24 9.1TEGandMSP430outputs..........................25 9.2TEGOutputCurves,CalculatedMPP'sandHighandLowOPP's...26 viii

PAGE 9

1.Introduction Overthepastcenturybothworldwidepopulation,aswellasenergyconsumption percapitahavealsobeenontherise[4,18].Despitethepotentialconvergingofenergy usepercapita[18],energygenerationfromallsourcesisstillanecessity[6,8].Due totheLawsofEntropy,thereisaniteamountofenergyavailableforharvesting withinouruniverse.Thereforeproductionfromexistingsourcesmustbeoptimized, aswellenergygenerationfromsmallscale,greenandwasteenergysourcesmustbe advanced. Manyrenewablesourceshavebeendevelopedandcancontributetothe31states intheUnitedStatesofAmericawhohavepassedRenewableEnergyPortfolios.Many oftheseproposedsourcesareinlargescale,contributingpowerontheMegawatt level[2].Evenwiththelargescalegenerationastheprimarysourcesoffunding, smallscaleoptimizationisnecessaryforaddedreductioningreenhousegasses.To thisend,optimizationofenergygenerationplaysanimportantrole.Currentlysolar photovoltaicPVandwindfarmsmakeupthelargestsectorofdevelopmentand installation[8,19].Whiletheseimprovingtechnologiesaidtheenergyportfolios, theydonotimpacttheeciencyoftheexistingfossilfuelgeneratorssuchascoal, nuclear,andnaturalgas.Whiletheselarge-scaleprojectshelpwithgridoriented powergeneration,theenergyoptimizationmustbescaledforpersonalandothe gridaswell.Correctscalingwillallowforexpandedharvestingtechniquessuchas vibrational,thermalandwaveenergy.SincemostfundingisdirectedtowardsPVand windenergy,avoidisopenedsurroundingenergyharvestingfromothersources. Tooptimizethegenerationcapacitiesofthesesmallersources,MaximumPower PointTrackingMPPTtechniquesmustbedesignedspecicallyforthecharacteristicsofthesource.ForbestperformanceMPPTtechniquesshouldbetailoredtothe generator'scapabilitiesandresponsestoenvironment.ChoosinganMPPTscheme thatdoesnottthegenerator'scharacteristicswillleadtoincreasedlosses.Most 1

PAGE 10

MPPTtechniquesincommercialusearederivativesofMPPTtechniquesdeveloped forwindandPVapplications.BytailoringtheMPPTtechniquetowardsthesmall scaleneedsandindividualcharacteristicsofharvestinggenerators,wecanfurther improveeciency,poweroutput,andtherebyincreasethepenetrationofthesegeneratorsintothewiderpowersystem. AnadaptationtotheexistingPerturbandObserveP&Otechniqueisproposed. Inthisadaptationthecurrentwillbeindirectlyandproportionallyestimated,and relativechangeinoutputpowerwillbecalculatedbasedonthedutycycleofahysteresisbasedSchmitttrigger.Throughthistechnique,MPPTcanoccurwithina microcontrollercontrolledpowerconverterthathasalowercostwiththesameefciency.Theadvantagecomesfromtheabilitytoestimateoutputpowerwithout directcurrentmeasurement.Duetothislowercostandsmallerenergyconsumption, thismicrocontroller-basedMPPTharvestingcircuitcanbeusedwithawiderarray ofgenerators,aswellassmallerscalesystemswherecostisthelimitingfactorfor implementation. 2

PAGE 11

2.TEGenergyharvesting 2.1OperationalPrinciplesofThermoelectricGeneration UtilizingtheSeebeckandPeltiereects,afullrelationshipbetweenheatenergy travellingacrossajunctionofdieringconductivematerialsandthepotentialvoltage acrossthatsamejunctioncanbemodeled[5].ModelingthejunctionasaP-typeand anN-typeconductors,apotentialdierentialintheformofexcesschargesbuildsalong theinterfaceofthejunction.Electronsfreedbyheatenergymovetotheopposite endofthesemiconductingmaterial,combiningwithholes.Thecombinationreleases energyintheformofheat,dissipatedtothecoldsideofthejunction.Throughthis repeatedaction,theP-Njunctionwillnormalizetoacommontemperature.Inorder toextractpowerfromthissystem,atemperaturedierentialmustbemaintained acrossthejunction.Bridgingtheelectricallyconnectedsemiconductorsinserieswith aloadwillinducecurrenttoowandtransferthepower.Theseindividualmodules canbeconnectedinseriesforgreatertotalvoltageoutput,orcanbeconnectedin parallelforgreatertotalcurrentoutput.Fig.2.1showsatypicalschematicofTEG module 2.2ElectricalModelandMaximumPowerPoint Forgivenenvironmentalconditions,aTEGisaconstantpowersourcewithan internalresistance.IntheprocessofelectricalmodelingofaTEG,theThevinin equivalentcircuitisexpressedinFigure2.2.TheTEGismodeledasaconstant voltagesource V OC withaninternalseriesresistance R int .Theload R ext canbe xedorvariable. Withoutaconverter,thegeneratorwillnaturallyoperateonapointonthePV curveassociatedwiththeloadresistanceasseenbytheTEG.ThiscausestheTEG tooperateonaleveldenedbytheload,nottheoptimaloperatingpointoftheTEG, i.e.MPP.Usingapowerconverter,theresistanceoftheloadasseenbytheTEG canbecontrolledsuchthattheTEGwilloperateatMPPinanycondition.Figure 3

PAGE 12

Figure2.1:TwoTEGmodules connectedinseries Figure2.2:IdealElectricalEquivalent CircuitofaTEG 2.3showsthechangingpathoftheMPPastemperaturedierentialacrosstheTEG changes. Calculatingthepowerdissipatedthroughtheload: i TEG = V OC R int + R ext .1 P out = i 2 TEG R ext .2 4

PAGE 13

Figure2.3:MPPchangeswithvaryingtemperature P out = V OC R int + R ext 2 R ext = V 2 OC R 2 int R ext +2 R int + R ext .3 Tomaximizetheoutputpower,thedenominatorisminimized.Thisoccurswhen thederivativeiszero. 0= @ @R ext R 2 int R ext +2 R int + R ext .4 0= )]TJ/F20 11.9552 Tf 10.831 8.088 Td [(R 2 int R 2 ext +1 .5 Thereforemaximumpoweroccurswhen R int = R ext .Calculatingthevoltageacross theexternalresistance: V TEG = R ext R int + R ext V OC .6 5

PAGE 14

Maximumpoweroccurswhen: V TEG = 1 2 V OC .7 Figure2.4showstheoutputoftheTEGatthecondition T =72 o F .Thisdata wasexperimentallycollectedbydirectlyconnectinggeneric 0 )]TJ/F15 11.9552 Tf 10.819 0 Td [(1 M variableresistor totheoutputoftheTEG.Theresistorwasthenvaried,andthecurrent,voltageand powerwasrecorded.Asshownthecurrentandvoltagehavealinearrelationshipata settemperaturedierential.Thepowerandvoltagehaveadenedmaximumpeak, occurringat V TEG = 1 2 V OC asderived. Figure2.4:OutputCurvesofaTEG T =72 o F 6

PAGE 15

3.CurrentMPPTTechniques PerturbandObserveP&Oiswidelyusedinapplicationsforpowerproduced bysolararrays[24].AsimpleP&Osystem,atdiscreteintervals,samplesthepower productionofthegeneratoroneithersideofthecurrentoperationalpoint,andmoves thecurrentoperationalpointtowardsthatofhigherpower.P&Oresponsespoorlyto afastchangingpoweroutput[23].Itisinecientatsteadystateduetotheconstant samplingandmovingoftheoperationalpoint[31]andcreatesaharmonicaround theMaximumPowerPointMPP.Aprogressivealgorithmreducestheselosses,and thecostoftheadditionalprocessingcanbebalancedbythepoweroptimization[13]. P&Oiswidelyusedduetoeaseofuse.SinceP&Operformsallactionsbasedonthe generator'soutput,minimalknowledgeofthegeneratorresponsestodierentstimuli isneeded. IncrementalConductanceICisamethodthatcanavoidoscillationsthatoccur attheMPPinP&O[5].ICcomparestheslopeoftheIVcurveofthegenerator againstthenegativevalueofthecurrentvs.thevoltage[16].ForageneralIVcurve forpowergeneration: G d = dI dV .1 G s = )]TJ/F20 11.9552 Tf 12.156 8.087 Td [(I V .2 G d istheratioofthederivativeofthecurrentandthederivativeofthevoltage, while G s isthenegativeratioofthecurrentandvoltage.AtanypointontheIV slopebeforetheMPP, G d >G s andtheoperationalpointismovedtowardshigher voltage.AtthepointaftertheMPP, G s >G d andtheoperationalpointismoved towardsalowervoltage.Oncethepointwhere G d = G s ,MPPhasbeenreached.For generatorsinchangingenvironmentalconditions,samplingwillstilloccurtoensure thatoperationisconstantlyatMPP. 7

PAGE 16

ThefractionalopencircuitvoltageOCVmethodusestherelationshipbetween MPPvoltageandOCV[20,28].TheOCVissampledperiodicallytodetermine theMPPvoltageforthegivencondition.TosampletheOCV,thepowersourceis electricallydisconnectedbyarelayorbyshuttingothepowerconverterforthe OCVmeasurement.Thiscauses,temporarypowerlossandcompleximplementation aredrawbacks. NeuralNetworkisamoreadvancedalgorithmthanP&OforMPPT[24].Neural NetworkreliesonvariousmeasurementswhicharefedthroughaseriesofIf/Then controls.Theoperationalpointisthenmovedandthecontrolsarerepeated.Neural NetworkallowsforafasterisolationoftheMPP,aswellaslessharmonicoscillation onceMPPisreached[14].NeuralNetworkdependsonknowledgeofthecharacteristicsofthegenerator,andassuchcannotbegeneralizedforallgenerators.AdditionallyNeuralNetworkisdependentonmultiplemeasurements,leadingtoanincreased powerconsumption.[11]. DuetotheabilitiesofallalgorithmstocloselytrackandmaintainpowerproductionatornearMPP,eciencycanbemoremarkedlyimprovedbylimitinglossesand powerconsumptionassociatedwithmeasurement.Continuouscurrentmeasurement canbeeconomicallycostlyaswellaspowerintensive.Thereforefocusoncurrentsensorlesspowermeasurementcanaectagreaterchangeineciency,andcanbe usedwithmoreecienttrackingalgorithms. 8

PAGE 17

4.HysteresisControl Inthiswork,acomparatorwithhysteresiswasusedtogeneratethegatesignal forthepowerconverter.Hysteresishasbeensuccessfullyusedforcontrolofenergy harvestingdevices[21,22].Thecomparatorfunctionissimpleinnature;theTEG voltageiscomparedtoareferencesignal.Ifthevoltageishigherthanthereference, thecomparatoroutputishigh.Ifthevoltageislowerthanthereferencethecomparatoroutputislow.Ifthecomparatorisusedwithoutanyadditionalhysteresis, theoutputsignalcansuerfromnoise.Figure4.1ashowstheoutputoftheTEG andcomparatorwhenthereisinsucienthysteresis.Asshownonchannel1,thegate signalswitcheswildly. aTEGOutputwith InsucientHysteresis bTEGOutputwith Hysteresis Figure4.1:TEGandMSP430outputswithvaryinghysteresis Toavoidthischatteringofthegatesignal,resistancewasaddedtothecomparator oftheMSP430.Figure4.2showstheorientationoftheresistancesandinputs.The hysteresishasahigh V H andlow V L threshold.Thethresholdsaredenedas follows: V H = R 3 + R 4 R 4 V REF )]TJ/F20 11.9552 Tf 13.151 8.087 Td [(R 3 R 4 V oL .1 9

PAGE 18

Figure4.2:ComparatorwithHysteresis V L = R 3 + R 4 R 4 V REF )]TJ/F20 11.9552 Tf 13.151 8.088 Td [(R 3 R 4 V oH .2 Where V oH and V oL arethehighandlowvaluesofthecomparator'soutput.In thisexperiment V oH =5 V and V oH =0 V .Tominimizetheripple, R 4 waschosento be 1500 and R 3 waschosentobe 30 .Thisresultsin R 3 + R 4 R 4 1 .Theequations canberewrittenas: V H = V REF .3 V L = V REF )]TJ/F15 11.9552 Tf 11.955 0 Td [(0 : 1 V .4 Figure4.3showshowthegatesignalrelatestotheTEGvoltageforadualsupply comparator.Inthisexperiment V sat is5Vonthehighsideand0Vonthelowside. Figure4.3:Thresholds V H ;V L andoutput V G ofhysteresiscontroller 10

PAGE 19

5.BoostConverter Forthisexperimentaboostconverterwasusedtocontrolthepowerowbetween thegeneratorandload.Theboostconverterusestheinherentpropertiesofenergy storagewithincapacitorsandinductorstostepuptheinputvoltagelevelwhilemaintainingthesamepoweracrossthepowerconverter.Figure5.1showstheschematic ofatypicalboostconverter. Figure5.1:SchematicofaBoostConverter Figure5.2showsthe2statesofthepowerconverter,5.2ashowsthetopology whentheMOSFETison,and5.2bshowsthetopologywhentheMOSFETiso.By switchingtheMOSFET'sstateataveryhighfrequency,theoutputoftheTEGcan becontrolledwithlimitedripple,atadesignatedlevel. aMOSFETon bMOSFETo Figure5.2:ElectricalEquivalentTopologyofa BoostConverterforMOSFETstates Thebasicprinciplethatinductorcurrentcannotchangeinstantaneouslycausesa rippleinoutputcurrentoftheTEG.Thisinturncausesarippleintheoutputvoltage oftheTEG.Figure6.1showsthevoltagerippleasafunctionoftheMOSFETstate. AdjustingthedutycycleoftheMOSFETcontrolstherippleandtheaveragevoltage outputoftheTEG. 11

PAGE 20

Conventionallytheboostconverterismodeledbytheaverageoperation.Figure 5.3showstheaveragedboostconverter. D referstothedutycycleoftheMOSFET onstate.IftheswitchingfrequencyoftheMOSFETisfastenough,theaveraged boostconverterisagoodrepresentationoftheoperationoftheswitch-modeboost converter. Figure5.3:ElectricalEquivalentAverageTopology ofBoostConverter Usingthisaveragedmodel,itisclearthattheTEGoutputcurrentiseasily controlledbythedutycycle.Inthisexperiment,thecapacitorusedisa2.5V3F supercapacitor.Assuch,thethrowvoltagecanbeassumedtobesti,andtherefore V C canbeassumedtobeconstant. Additionallya 450 H inductorwasusedinthisexperiment.Thischoicereduced theTEGoutputcurrentripple. 12

PAGE 21

6.ContinuousConductionMode Foroperationofswitchmodeconducting,twomodesofoperationcanbepossible, continuousconductingmodeCCManddiscontinuousconductingmodeDCM. CCMoccurswhentheswitchingofthepowerconverterallowstheinstantaneous voltageorcurrenttoexceedorfallundertheaverageoutput.Thisripplecanbe controlledbyavarietyoffactors.CCMhastwostates.Duringtheostateofthe MOSFET,thepowerfromthegeneratorisusedtochargetheinternalcapacitanceof thepowerconverter.Thisresultsinariseoftheoutputvoltageofthegenerator.Once theoutputvoltageofthegeneratorcrossesapredeterminedthreshold,theMOSFET changestotheonstate,andpowerfromthecapacitanceofthepowerconverteris transferredtotheload,whiletheinstantaneousvoltageoutputofthepowerconverter drops.Figure6.1showsthegeneratorvoltageandthegatesignalasafunctionof timeduringCCMoperation. Figure6.1:CCMVoltageandGateSignal Usingthesetwostates,theenergyandpoweroutputofthegeneratorovertime canbecalculated.Ifoneassumesnolosseswithinthepowerconverter,thecalculation oftheinputpowerisequivalenttotheoutputpower.Wewillthereforecalculatethe 13

PAGE 22

outputenergyovertimeofthepowerconverter,ratherthantheenergyproducedby thegeneratorovertime.Thevoltagewaveformofthepowerconverteriscompletely describedbytheMOSFETonandostates.IntheostateoftheMOSFET,we candenethevoltageasafunctionoftime. v 2 t = V H )]TJ/F20 11.9552 Tf 13.151 8.088 Td [(V H )]TJ/F20 11.9552 Tf 11.955 0 Td [(V L T 2 .1 Where v 2 t istheinstantaneousoutputvoltageofthepowerconverterduring theonstateoftheMOSFET, V L and V H arethehighandlowvoltagethresholdsof thehysteresisbandrespectively,and T 2 isthetimethattheMOSFETisintheon state. Usinganidealrepresentationofapowerconverter,wecancalculatetheoutput currentacrosstheinductor.Thecurrentthroughaninductorisrelatedtothevoltage acrosstheinductor: v L t = L d d t i L t .2 where v L t isthevoltageacrosstheinductorand i L t isthecurrentthroughthe inductor.Solving6.2forthecurrentthroughtheinductor: i L t = 1 L Z v L t d t .3 DuringtheonstateoftheMOSFET, i L t = i 2 t and v L t = v 2 t i 2 t and v 2 t arethecurrentandvoltageoutputsofthepowerconverterduringtheonstateofthe MOSFET. i 2 t = 1 L Z v 2 t d t .4 DuringtheMOSFETonstate,theoutputvoltageofthepowerconverterstartsat thehighvoltagethreshold, V H ,anddecreaseslinearlyatarateof V H )]TJ/F21 7.9701 Tf 6.587 0 Td [(V L T 2 .Setting 14

PAGE 23

k 2 = V H )]TJ/F21 7.9701 Tf 6.586 0 Td [(V L T 2 : i 2 t = 1 L Z V H )]TJ/F20 11.9552 Tf 11.956 0 Td [(k 2 t d t + I 0 = 1 L V H t )]TJ/F20 11.9552 Tf 13.151 8.088 Td [(k 2 2 t 2 + I 0 .5 Multiplyingtheinstantaneouscurrentandvoltage,wecanobtaintheinstantaneous power, P 2 t ,ofthepowerconverterduringtheMOSFETonstate. P 2 t = V H )]TJ/F20 11.9552 Tf 11.955 0 Td [(k 2 t 1 L V H t )]TJ/F15 11.9552 Tf 14.207 8.088 Td [(1 L k 2 2 t 2 + I 0 = 1 L k 2 2 2 t 3 )]TJ/F15 11.9552 Tf 13.151 8.088 Td [(3 2 1 L k 2 V H t 2 + 1 L V 2 H )]TJ/F20 11.9552 Tf 11.955 0 Td [(k 2 I 0 t + V H I 0 .6 Theintegrationofpowerovertimeyieldsthetotalenergyexpendedoverthesame timeperiod. E 2 t = Z T 2 0 P 2 t d t .7 Reinserting k 2 = V H )]TJ/F21 7.9701 Tf 6.587 0 Td [(V L T 2 ,wecanbegintocanceltermsandsimplifytheequation. E 2 t = 1 8 L T 2 2 V H )]TJ/F20 11.9552 Tf 11.955 0 Td [(V H + V L 2 + T 2 I 0 1 2 V H + V L = 1 2 L T 2 2 V H + V L 2 2 + I 0 T 2 V H + V L 2 .8 Thevoltageoutputvarieslinearlybetween V H and V L overtime.Thereforethe averagevoltagecanbedenedas V avg = V H + V L 2 E 2 t = 1 2 L T 2 2 V 2 avg + I 0 T 2 V avg .9 DuringtheMOSFET'sostate,energyistransferredfromthegeneratortothe powerconverter.Thisenergyistheequaltotheenergytransferedfromthepower convertertotheload.Figure6.2showstheenergyinthepowerconverterovertime. 15

PAGE 24

Figure6.2:EnergyinPowerConverterovertime Theusageofhysteresiscontrolresultsinthepresenceof'baseenergy'during theswitchingperiod.Thebaseenergymustbecalculatedfortheostateofthe MOSFET. E 1 t = T 1 I 0 V avg .10 Where E 1 t istheenergyovertheMOSFETotime, T 1 .Thetotalenergyis describedbyequation6.11 E total t = 1 2 L T 2 2 V 2 avg + I 0 T 2 V avg + I 0 T 1 V avg .11 E total t isthetotalenergyoutputofthepowerconverterovertheswitching period.Thepoweroutput, P out ,ofthepowerconverteristhetotalenergyoutput dividedbythetotalswitchingtime, T SW 16

PAGE 25

P out t = 1 2 L T 2 2 V 2 avg + I 0 V avg T 1 + T 2 T SW = 1 2 L T 2 2 V 2 avg T SW + I 0 V avg T 1 + T 2 T SW .12 Usingthedenitionofdutycycle,thedutycycleoftheonstateoftheMOSFETis denedas D = T 2 T SW .Thetotalswitchingtimeisdenedas T SW = T 1 + T 2 P out t = 1 2 L T SW D 2 V 2 avg + I 0 V avg .13 Fortheuseinthisexperiment,theP&Oalgorithmmeasuresthechangeinpower overachangeinoperatingconditions.Thereforethemaximumpowerpointcanbe foundbysimplytestingthepowerlevelofonesetofoperatingconditionsrelative toanother,ratherthanhavingtomeasuretheactualpower.Equation6.13canbe simpliedto: P relative t = 1 2 L T SW D 2 V 2 avg .14 Where P relative t istheamountofpoweroutputoftheTEGabovethelower thresholdofthecomparator.Inthisway,measuringdutycycleandthevoltage,and maintainingaconstantswitchingtime,relativechangeinpowercanbeestimated withoutdirectcurrentmeasurement.Throughthisderivationwendthattheaverage outputpowerisrelatedtothesquareofthevoltageandthesquareoftheDutyCycle oftheMOSFETonstate D .Since D bydenitionisapositivevaluebetween0and 1,plottingthedependenceofPoweron D showstherelationshipbetweenpowerand DutyCycle.Thisrelationshipisshowningure6.3. Asshowningure6.3,therelationshipbetweenthepowerandthedutycycleis non-linear.Sincethepoweroutputisrelativetothesquareofthevoltageandthe squareofthedutycycle,thepowercanbeshowntoberelativetothesquareroot 17

PAGE 26

Figure6.3:OutputPower[%]asafunctionofD ofthedutycycle.Figure6.4showstherelationshipbetweenthesquarerootofthe powerandthedutycycle. Figure6.4:SquareRootofOutputPower[%]asafunctionofD Figure6.4showsthatthedutycycleaectsthepoweroutputofthegeneratorin asimilarfashionasthecurrent.Thereforetocalculaterelativepower,thedutycycle canbeusedwiththevoltageinsteadofdirectcurrentmeasurement. 18

PAGE 27

7.MSP430Microcontroller 7.1MicrocontrollerAdvantages TheMSP430MicrocontrollerisabasicbutversatilemicrocontrollerfromTexas InstrumentsTI.TheadvantagesoftheMSP430arethelowpowerdraw,exibility andlowcost.Inthisapplication,theMSP430willactasacomparator,aswellas readingthevoltageinput,thedutycycleofthecomparator,anditwillruntheP&O algorithmtovaryaPulseWidthModulationPWMsignalforuseasareference signalforthecomparator.Usingthecomparatoroutputasagatesignal,theMSP430 willcontroltheswitchingfunctionalityofaboostconvertertooperatethegenerator atoptimalpowerlevel. TheMSP430canbeeasilyprogrammedfortheusesoftheuser.Afasteror slowerresponsecanbeaccommodatedwithminimalmodication.TheMSP430is runinlowpowermode0duringthebackgroundprocessesinordertodrawminimal power. ThehysteresisoftheMSP430'scomparatorisextremelysmall.Thereforeexternalresistancehasbeensolderedtotherelevantterminalsinordertoincreasethe hysteresispointofthecomparator.Additionallythecomparatoroutputislteredby theMSP430.Thisallowsforacleansquarewaveoutput,thatisusedasthegate signalofapowerconverter. WiththeP&Oalgorithmusedinthisexperiment,TheMSP430'sresponsespeed whensubjectedtoavaryingpoweroutputisinverselyrelatedtothesteadystate error.ThisisduetoaconstantstepsizebeingusedfortheMPPTalgorithm.A largerstepsizewouldallowthealgorithmtoquicklymovetheoperatingpointtothe MPP.OncetheMPPisreached,thestepsizeisnotchanged.Thisresultsinalarge harmonicaroundtheMPP.Bydecreasingthestepsize,thesteadystateharmonic errorwillbereducedattheexpenseofnumberofstepsneededtoreachMPP.Dueto thecharacteristicsofaTEG,namelyaslowoutputresponserelativetoenvironmental changes,theP&Oalgorithmhasattemptedtominimizesteadystateerror. 19

PAGE 28

ThesteadystateerrorcanbeminimizediftheP&Oalgorithmissetuptochange theperturbationstepsizedependingontherelativepowerchange.Thiscanbridge thedividebetweenresponsespeedandsteadystateerror. 7.2CodingandDesiredResults AowchartofabasicP&Otechniquecanbeseeningure7.1.Theowchart showsasimple,inniteloopthatwillworkwithanygenerator.Theplug-and-play simplicityofthealgorithm,combinedwiththelowcostofproduction,makesthis MPPTtechniqueidealforsmallscaleandremotegeneration.Atthesteadystate outputofthegenerator,thepowerconverterwilloscillatearoundtheMPP.This oscillationcanbelimitedifprogressivealgorithmsareapplied,changingthetime betweensamplesaswellasthestepsizeofthedutycycle.Asmallstepsizeisideal forgeneratorswithslowresponsetimessuchasTEG's.Forgeneratorswithfast responsetimes,orwho'senvironmentalconditionsquicklyaecttheoutputsuch asSolarPV'sorvibrationalgenerators,theharmonicoscillationsmustbebalanced withtheresponsetimeofthegenerator.UsingtheMSP430,thesealterationstothe codecanbeimplementedquickly,andwithoutdeepknowledgeoftheinner-workings ofthespecicgenerator.Thiseaseofuseextendsthenumberofgeneratorswith whichtheMPPTschemecanbeimplemented. 20

PAGE 29

Figure7.1:MSP430CommandFlowchart 21

PAGE 30

8.ExperimentalImplementation Figure8.1showstheoverallsystemforharvestingenergyfromaTEG.The MSP430performsthecomparatorfunctionality,aswellasthePWMgeneration,the dutycyclemeasurementandtheMPPTalgorithm.Thecomparatorfunctionalityhas externalresistancestoincreasethehysteresisofthesystem. Figure8.1:SchematicofEnergyHarvesting SystemwithTEGGenerator TheoutputofthePWMwasconnectedtoavoltagedividercomprisedofgeneric 0-500kvariableresistors.Theoutputofthevoltagedividerisconnectedtoalow passlter.Thelowpasslteriscomprisedofa0-500kvariableresistoranda10 F capacitor.Figure8.2showstheMSP430,lowpasslter,andconnectedelements. TheTEGusedforexperimentationisaBi-TebasedTEGmoduleG2-30-0313, Tellurex,MI.Theheatsourceusedwasanaluminumblockonatemperature22

PAGE 31

Figure8.2:MPPTCircuit controlledhotplateHP131225Q,ThermoScientic,MA.Theheatsinkusedwas agenericCPUcoolingfan/heatsinkassembly.Arebrickwasinsertedbetween thehotplateandtheheatsinktominimizetheeectofconvectionheat.Thermal compoundRG-ICFN-200G-B1,CoolerMaster,CAwasusedfortheTEG.The experimentalsetupisshowninFig.8.3. Figure8.3:ExperimentalSetup 23

PAGE 32

Anytypeofpowerconvertercanbeconnectedtotheenergyharvestingsystem. Forthisexperiment,adiode-basedboostconverterisselectedduetoitssimplicity. Theboostconverteriscomprisedofa 450 H inductorRC-7,TriadMagnetics,CA, anN-channelMOSFETNTD4906N-35G,ONSemiconductor,AZ,aSchottkydiode BAT46,STMicroelectronics,Switzerland,anda3F,2.5VsupercapacitorM10202R5305-R,CooperBussmann,MOwereused.Agenericpotentiometer 1 M was usedtocontroltheloadcurrent.TheimplementedMPPTcontrolcircuitandpower convertercanbeseeninFig.8.4. Figure8.4:BoostConverter 24

PAGE 33

9.Results ImplementationoftheMPPTalgorithmontheMSP430allowsforoptimaloutput ofthegeneratorwithnointerruptionofgenerationormeasurement.Duetothe constantsamplingovertime,atsteadystatethereexistsanoscillationaroundthe MPP.Forthisexperiment,theMPPTalgorithmwastunedtohaveasmallsteady stateerror.Thiscausesaslowsettlingtimeforthealgorithm.Thisiscompatible withtheslowchangingoutputofaTEGrelativetoenvironmentalchanges.Forthis experiment,eachtimethehotsidetemperativewaschanged,30-45minutesofsettling timewasgiven,allowingtheTEGtosettletoaconstantoutput,andallowingthe MPPTalgorithmtosettlearoundtheMPP. InordertotesttheperformanceoftheMPPTalgorithm,theTEGwasconnected toagenericboostconverter.ThevoltageoutputoftheTEGwasalsoconnectedto theMSP430.TheMSP430measuredthevoltageoutputoftheTEG,andgenerated aPWMsignaltobeusedasareferencefortheMSP430'sinternalcomparator.Figure9.1showstheoutputwaveformsoftheTEGandMSP430,capturedduringthe experiment. Figure9.1:TEGandMSP430outputs 25

PAGE 34

Asshown,theMSP430generatesaPWMsignalthatispassedthroughalow passlter.Theoutputofthelterisshownonchannel2.Thisisusedasareference inputtothecomparator,who'soutputchannel3isusedasthegatesignalforthe boostconverter. Duetotheaddedhysteresisinthecircuitry,theTEGoutputhasaverysmall ripple,ontheorderof10mV.Additionallyduetothecomparatoroutputltering oftheMSP430,thegatesignalshowsafastresponsewithclearonandoswitching states. Figure9.2showsvariousPowerandVoltageoutputsoftheTEGforgiventemperaturedierentials.AlsoplottedarethecalculatedMPP'sforthesametemperatures. TheperformanceoftheMPPTcontrollerislistedin9.1. Figure9.2:TEGOutputCurves,Calculated MPP'sandHighandLowOPP's Table9.1showsthesystemcharacteristics,thecalculatedMPP,thehighand lowOP's.Asshown,theerrorsatthehighandlowoperatingpointsdonotexceed 0.15%.ThissmallerrorisduetothetuningoftheMPPTalgorithmforalaboratory setting.Inapracticalapplication,thesettlingtimeoftheMPPTalgorithmcanbe signicantlydecreasedwhileonlyraisingthesteadystateerrorslightly. 26

PAGE 35

Table9.1:Experimentalresult: V )]TJ/F20 11.9552 Tf 11.955 0 Td [(I characterizations.Operatingpoint comparisons. ^ V TEG and ^ P :calculatedoutputvoltageandpoweratMPPfrom V )]TJ/F20 11.9552 Tf 11.955 0 Td [(I characteristics. V L P L V H ,and P H :upperandlowerboundsofactualTEG outputvoltageandpowercontrolledbytheproposedsystem.Performance. V LERR P LERR V HERR and P HERR denotetheerrorbetweenMPPandtheupper andlowerboundsofactualTEGoutput T o C SystemcharacterizationCalculatedMPPLowOPHighOPPerformance CurvemW,V ^ V TEG mV ^ P mW V L mV P L mW V H mV P H mW V LERR % P LERR % V HERR % P HERR % 23 p = )]TJ/F15 11.9552 Tf 9.299 0 Td [(350 : 93 v +143 : 25 204.114.61919814.60621214.597-6.6040.089-3.870.1498 54 p = )]TJ/F15 11.9552 Tf 9.299 0 Td [(351 : 51 v +365 : 99 520.5895.26451595.25352495.26-1.7180.01140.6570.011 85 p = )]TJ/F15 11.9552 Tf 9.298 0 Td [(362 : 8 v +574 : 02 791.089227.054777226.982811226.91-4.1920.0317-2.5170.06 99 p = )]TJ/F15 11.9552 Tf 9.299 0 Td [(362 : 47 v +689 : 56 951.183327.95920327.601960327.926-4.1670.1070.9270.009 126 p = )]TJ/F15 11.9552 Tf 9.299 0 Td [(342 : 64 v +819 : 25 1195.497489.7051170489.4831230489.5-4.8780.04552.8860.042 27

PAGE 36

10.Discussion Theproposedenergyharvestingtechniqueallowsforeasyimplementationregardlessofgeneratortype.Thechoicetouseamicrocontrollerinimplementationresults inalargerpowerdrawforcalculationsthansimplecircuitbasedapproaches.This energylossismitigatedbythetypeofcontrollerused,andthechoiceinprogramming tomaintainthemicrocontrollerinlowpowermode. Theselossesduetopoweringthemicrocontrollerareoset,notonlybytheperformanceofthesystemrelativetonotusingMPPTduringgeneration,butalsoby theeaseofuse.Thesystemasoutlinedcanbedirectlyconnectedtotheoutputof anygenerator.Thisversatilityingeneratorsusedallowsforexpandeduseofsmall scalegeneratorsforusessuchaswasteheatrecovery,poweringofremotesensors,or energygenerationforothegridsystems. Intheexperimentsperformed,theMPPTalgorithmwastunedtoworkwiththe responsecharacteristicsofaTEG.Thealgorithmascompiledcanbeeasilytuned forthecharacteristicsofothergenerators,orcanbesettobalancethespeedand accuracydemandsofagenericgenerator. Additionally,usingthedutycycleofthegatesignaltoestimatetheoutputcurrent ofthegenerator,anyMPPTalgorithmbasedonoutputpowercanbeimplemented. Thiscanallowforsystemswithdirectcurrentmeasurementtobereplacedwithan equallyeectivesystemthathasalowerpowerdraw,resultinginamoreoptimal performance. 28

PAGE 37

11.Conclusion AperturbandobserveMPPTtechniquebasedonpowerestimatewithoutdirect currentmeasurementisshown.ThistechniquehasbeenshownonaTEGenergy harvestingsystem.Theproposedsystemoperatesbymeasuringthedutycycleof ahysteresisbasedschmitttrigger.Thepowervariationisafunctionofdutycycle. ThisMPPTtechniqueissimple,direct,andduetothemeasurementofoutputvoltage,requiresnoknowledgeofthegeneratorpriortouse.Thisallowsquickandeasy implementationwithavarietyofgeneratorswithoutmodicationtothemicrocontrollerorthegenerator.Thistechniquecanreadilybeusedinconjunctionwithany typeofpowerconverter.Theproposedschemehasbeenvalidatedanalyticallyand experimentally,anddemonstratedsuccessfulperformance. 29

PAGE 38

REFERENCES [1]PallaveeBhatnagarandR.K.Nema.Maximumpowerpointtrackingcontrol techniques:State-of-the-artinphotovoltaicapplications. RenewableandSustainableEnergyReviews ,23:224241,2013. [2]GeoreyBlack,DonaldHolley,DavidSolan,andMichaelBerglo.Fiscaland economicimpactsofstateincentivesforwindenergydevelopmentinthewestern unitedstates. RenewableandSustainableEnergyReviews ,34:136144,2014. [3]S.Bolognani,R.Carli,G.Cavraro,andS.Zampieri.Adistributedcontrol strategyforoptimalreactivepowerowwithpowerandvoltageconstraints. In SmartGridCommunicationsSmartGridComm,2013IEEEInternational Conferenceon ,pages115,Oct2013. [4]HalvardBuhaugandHenrikUrdal.Anurbanizationbomb?populationgrowth andsocialdisorderincities. GlobalEnvironmentalChange ,23:110,2013. [5]MinChen,L.ARosendahl,T.J.Condra,andJ.K.Pedersen.Numericalmodelingofthermoelectricgeneratorswithvaringmaterialpropertiesinacircuit simulator. EnergyConversion,IEEETransactionson ,24:112,March 2009. [6]JereyChow,RaymondJ.Kopp,andPaulR.Portney.Energyresourcesand globaldevelopment. Science ,302:15281531,2003. [7]P.Das,M.Pahlevaninezhad,andG.Moschopoulos.Analysisanddesignof anewacx2013;dcsingle-stagefull-bridgepwmconverterwithtwocontrollers. IndustrialElectronics,IEEETransactionson ,60:4930,Nov2013. [8]VijayDevabhaktuni,MansoorAlam,SomaShekaraSreenadhReddyDepuru, RobertC.GreenII,DouglasNims,andCraigNear.Solarenergy:Trendsand enablingtechnologies. RenewableandSustainableEnergyReviews ,19:555 564,2013. [9]S.Gill,I.Kockar,andG.W.Ault.Dynamicoptimalpowerowforactivedistributionnetworks. PowerSystems,IEEETransactionson ,29:121,Jan 2014. [10]IssamHoussamo,FabriceLocment,andManuelaSechilariu.Experimentalanalysisofimpactof{MPPT}methodsonenergyeciencyforphotovoltaicpower systems. InternationalJournalofElectricalPowerEnergySystems ,46:98 107,2013. 30

PAGE 39

[11]HEAIbrahimandMahmoudIbrahim.Comparisonbetweenfuzzyandp&ocontrolformpptforphotovoltaicsystemusingboostconverter. JournalofEnergy Technologies&Policy ,2,2012. [12]D.S.Karanjkar,S.Chatterji,S.L.Shimi,andAKumar.Realtimesimulationand analysisofmaximumpowerpointtrackingmppttechniquesforsolarphotovoltaicsystem.In EngineeringandComputationalSciencesRAECS,2014 RecentAdvancesin ,pages1,March2014. [13]JungmoonKimandChulwooKim.Adcx2013;dcboostconverterwithvariationtolerantmppttechniqueandecientzcscircuitforthermoelectricenergyharvestingapplications. PowerElectronics,IEEETransactionson ,28:3827 3833,Aug2013. [14]ShihoKim,SungkyuCho,NamjaeKim,andJungyongPark.Amaximumpower pointtrackingcircuitofthermoelectricgeneratorswithoutdigitalcontrollers. IEICEElectronicsExpress ,7:1539,2010. [15]S.B.Kjaer,J.K.Pedersen,andF.Blaabjerg.Areviewofsingle-phasegridconnectedinvertersforphotovoltaicmodules. IndustryApplications,IEEE Transactionson ,41:12926,Sept2005. [16]K.KalyanKumar,R.Bhaskar,andHemanthKoti.Implementationof{MPPT} algorithmforsolarphotovoltaiccellbycomparingshort-circuitmethodandincrementalconductancemethod. ProcediaTechnology ,12:705715,2014.The 7thInternationalConferenceInterdisciplinarityinEngineering,INTER-ENG 2013,10-11October2013,PetruMaiorUniversityofTirguMures,Romania. [17]Shin-YeuLinandJyun-FuChen.Distributedoptimalpowerowforsmartgrid transmissionsystemwithrenewableenergysources. Energy ,56:184192, 2013. [18]MingMeng,JamesE.Payne,andJunsooLee.Convergenceinpercapitaenergy useamong{OECD}countries. EnergyEconomics ,36:536545,2013. [19]FredricC.Menz.Greenelectricitypoliciesintheunitedstates:casestudy. EnergyPolicy ,33:23982410,2005. [20]AndreaMontecucco,JonathanSiviter,andAndrewRKnox.Simple,fastand accuratemaximumpowerpointtrackingconverterforthermoelectricgenerators. In EnergyConversionCongressandExpositionECCE,2012IEEE ,pages2777 2783.IEEE,2012. [21]MuhannadAlaraj,ZhiyongJasonRen,andJae-DoPark.Microbialfuelcellenergyharvestingusingsynchronousybackconverter. JournalofPowerSources 247:636642,2014. 31

PAGE 40

[22]Jae-DoParkandZhiyongRen.Hysteresis-controller-basedenergyharvesting schemeformicrobialfuelcellswithparalleloperationcapability. EnergyConversion,IEEETransactionson ,27:715,Sept2012. [23]NavneeshPhillip,OthmanMaganga,KeithJ.Burnham,MarkA.Ellis,Simon Robinson,JulianDunn,andCedricRouaud.Investigationofmaximumpower pointtrackingforthermoelectricgenerators. JournalofElectronicMaterials 42:1900,2013. [24]Y.K.RamadassandA.P.Chandrakasan.Abattery-lessthermoelectricenergy harvestinginterfacecircuitwith35mvstartupvoltage. Solid-StateCircuits, IEEEJournalof ,46:333,Jan2011. [25]R.S.Rao,K.Ravindra,K.Satish,andS.V.L.Narasimham.Powerlossminimizationindistributionsystemusingnetworkrecongurationinthepresenceof distributedgeneration. PowerSystems,IEEETransactionson ,28:317, Feb2013. [26]AliRezaReisi,MohammadHassanMoradi,andShahriarJamasb.Classication andcomparisonofmaximumpowerpointtrackingtechniquesforphotovoltaic system:Areview. RenewableandSustainableEnergyReviews ,19:433443, 2013. [27]Y.Rionneau,S.Bacha,F.Barruel,andS.Ploix.Optimalpowerowmanagementforgridconnectedpvsystemswithbatteries. SustainableEnergy,IEEE Transactionson ,2:309,July2011. [28]DavidEricSchwartz.Amaximum-power-point-trackingcontrolsystemforthermoelectricgenerators.In PowerElectronicsforDistributedGenerationSystems PEDG,20123rdIEEEInternationalSymposiumon ,pages78.IEEE,2012. [29]CanSenerandVasilisFthenakis.Energypolicyandnancingoptionstoachieve solarenergygridpenetrationtargets:Accountingforexternalcosts. Renewable andSustainableEnergyReviews ,32:854868,2014. [30]YaosuoXue,LiuchenChang,SrenBaekhjKjaer,J.Bordonau,andT.Shimizu. Topologiesofsingle-phaseinvertersforsmalldistributedpowergenerators:an overview. PowerElectronics,IEEETransactionson ,19:13054,Sept 2004. [31]RaeyoungKimandJih-ShengLai.Aseamlessmodetransfermaximumpower pointtrackingcontrollerforthermoelectricgeneratorapplications. PowerElectronics,IEEETransactionson ,23:2310,Sept2008. 32

PAGE 41

APPENDIXA.MSP430Code #include"msp430g2452.h" typedefunsignedcharBYTE; #defineabs_unsigned_longfrogfrog #definemultiply_int.c #defineLED1BIT7 #defineLED2BIT2//LED2isonP1.6 #definePWMTop100//SetPWMFrequency:DCO/PWMTop #definePeriod1000-9//SetPWMFrequency:DCO/PWMTop #defineTAIEx0002/*TimerAcounterinterruptenable*/ #defineCCIEx0010/*Capture/compareinterruptenable*/ #defineADC_CHANNELS2 unsignedintsamples[ADC_CHANNELS]={0,0}; unsignedintvalue=0; intcount; intv_2; intD_2; intPower_middle; intPower_low; intPower_high; intduty_low; intduty_middle; intduty_high; intduty; intdown_count_on; intdown_count_off; intoff_count; 33

PAGE 42

intup_count_on; intup_count_off; inton_count; intduty; intx; intT_on; intT_on_old; intT_off; intT_off_old; intD_num; intD; intT_sw; intdir1=1,dir0=1; intvoltage; longunsignedintresult; charflash=0; voidTA_initvoid; voidConfigADCvoid; voidCA_initvoid; voidmainvoid{ WDTCTL=WDTPW|WDTHOLD;//Disablewatchdog DCOCTL=10000;//Runat16MHz BCSCTL1=Period; DCOCTL=Period; P1OUT=BIT2; P1DIR|=BIT7|BIT2|BIT5;//P1.7=output P1SEL|=BIT7|BIT2|BIT5;//P1.7=TA1output P1SEL2&=~BIT7|~BIT2; P1OUT=0; 34

PAGE 43

TA_init;//ConfigureTimer_AforPWM,usingup-mode CA_init; ConfigADC; count=0; duty=50; flash=LED2; CACTL1|=CAON; __enable_interrupt; for;;{ while!CCIFG&TACCTL0; T_sw=T_on+T_off; D_num=T_on*100; D=D_num/T_sw; ADC10CTL0&=~ENC; whileADC10CTL1&BUSY;//WaitifADC10coreisactive ADC10SA=0x100;//Databufferstart ADC10CTL0|=ENC+ADC10SC;//Samplingandconversionstart voltage=ADC10MEM; count+=1; ifcount==1{ v_2=voltage*0.1; Power_middle=v_2*D; duty_middle=duty; duty+=1; } ifcount==2{ v_2=voltage*0.1; Power_high=v_2*D; duty_high=duty; 35

PAGE 44

duty-=1; duty-=1; } ifcount==3{ count=0; v_2=voltage*0.1; Power_low=v_2*D; duty_low=duty; } ifPower_low>Power_middle{ duty=duty_low; } else{ duty=duty_middle; } ifPower_high>Power_middle{ duty=duty_high; } else{ duty=duty_middle; } ifduty<0{ duty=5; } ifduty>100{ duty=95; } TACCR1=duty; __bis_SR_registerLPM0_bits+GIE; 36

PAGE 45

} } #pragmavector=COMPARATORA_VECTOR __interruptvoidCOMPA_ISRvoid{ ifCACTL2&CAOUT==0x01{ CACTL1|=CAIES;//valuehigh,sowatchforfallingedge up_count_on=TAR; down_count_off=TAR;//ReadTAcount T_off=down_count_off-down_count_on; ifabsT_off_old-T_off>5{ T_off=T_off_old; } ifT_off<0{ T_off=PWMTop+down_count_off-down_count_on; } T_off_old=T_off; CACTL1|=CAON+CAIE+CAIFG; __bic_SR_register_on_exitLPM0_bits+GIE; } else{ CACTL1&=~CAIES;//valuelow,sowatchforrisingedge down_count_on=TAR;//readTAcount up_count_off=TAR;//readTAcount T_on=up_count_off-up_count_on; ifabsT_on_old-T_on>5{ T_on=T_on_old; } ifT_on<0{ T_on=PWMTop+up_count_off-up_count_on; 37

PAGE 46

} T_on_old=T_on; CACTL1|=CAON+CAIE+CAIFG; __bic_SR_register_on_exitLPM0_bits+GIE; } } voidCA_initvoid{ CACTL1=CAON+CAIE;//CA+on,interruptsenabled CACTL2=P2CA0|P2CA1;//P1.1/CA1=referenceP1.0/CA0=input signal CAPD=CAPD1+CAPD0; } voidTA_initvoid{ TACCR0=PWMTop;//TACCR0controlsthePWMfrequency TACCR1=90;//LED2startsat90%dutycycle TACTL=TASSEL_2+ID_0+MC_1+TACLR;//SMCLK,div1,UpMode TACCTL1=OUTMOD_7;//Reset/Set:SetsatTACCR0,resetsatTACCR1 } voidConfigADCvoid{ ADC10CTL1=BIT5+CONSEQ_1; ADC10CTL0=ADC10SHT_2+MSC+ADC10ON+ADC10IE; ADC10DTC1=0x01;//1conversions ADC10AE0|=BIT5;//P1.5ADC10optionselect } 38