Professional Documents
Culture Documents
Coach:
Ing. Horacio de Rosa
Supervisors:
Prof.dr.ing. Fernando Audebert
Prof.dr.ir. Maarten Steinbuch
1 Introduction 1
2 Dilatometer 3
2.1 Measuring unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Control principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Vacuum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.1 Working principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Upgrading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Modelling 9
3.1 Radiation theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 Control Concepts 15
4.1 LED control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Direct control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 Concept choice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5 Data acquisition 17
6 Power supply 19
6.1 Characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8 Control 29
8.1 Qbasic programming file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.1.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.1.2 Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Bibliography 41
E Thermocouple amplifier 55
F Thermocouple 57
F.1 Conversion table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
F.2 m-file using least squares fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
G PWM-to-voltage interface 61
Introduction
Dilatometers are widely used for measuring thermal expansion coefficients and examining
phase transitions in different materials, which occur at high temperatures. For correct mea-
surement of these coefficients and the characterization of the phase transitions at different
temperatures it is important to accurately control the temperature inside the furnace and
acquire the measurement data for analysis.
The current temperature control unit comprises of electromechanical components. This type
of control has some disadvantages, such as heat generation inside the control unit and noise
sources. A digital control system would be less expensive in maintenance and far more effec-
tive. For example because of the fast response and increased accuracy. For that reason it is
desired to replace the electromechanical system by a digital closed-loop temperature control.
Also a digital system will increase the possibilities in the temperature profile to be followed.
In the first chapter the working principle of the complete dilatometer setup will be explained,
together with an elaboration on the required upgrading of this setup. Next, in chapter 3 a
model of the furnace is made to be able to compensate for the difference between the temper-
ature of the sample and the temperature used for control. This theoretical model can then
be compared to the actual situation obtained by experiments. After that chapter 4 discusses
two possible control concepts, than one concept is chosen and worked out in the following
chapters. First the required data acquisition is performed, after which a characterization of
the power supply is performed (chapter 6). Next an explanation of the technique used for
the control, Pulse Width Modulation, is given. Finally, the total closed-loop control system
is implemented and tested according to a number of experiments in chapter 8.
Chapter 2
Dilatometer
The development of new ceramic and powder metallurgical high-tech materials requires the
exact knowledge of the thermal expansion behavior and of the reactions and phase transitions
which occur in high temperature ranges. The importance of the thermal expansion coefficient
can be seen in the calculations of thermal stress. The variation in length is quite temperature
dependent and comprises of both reversible and irreversible changes in the sample material,
for example the formation of melting phases and crystallization. For this purpose the pushrod
dilatometer is an ideal tool to determine the variation in length during a controlled temper-
ature profile, because of the good reproducibility and high accuracy. Next to measuring the
variation in length, an analysis can be done regarding for example the composition of the
material and the trailing of chemical reactions.
Dilatometer
Control unit
Power supply
micrometer water
screw thermostat pushrod thermocouple sample cooling optics
gas vacuum
glass fibre
to pyrometer
gas
The maximum output voltage is 50 mV and represents an expansion equal to the value of the
measuring range that is set on the measuring unit. Furthermore the expansion is linear to the
output voltage. However, the output voltage represents the difference between the expansion
of the sample holder and the sample itself. Therefore, in order to obtain the correct value of
the variation in length, D, the expansion value of the sample holder, Dh , needs to be added
to the measured value, D0 (2.1).
2.2 Control principle 5
D = D0 + Dh (2.1)
With:
D = variation in length
D0 = measured value
Dh = expansion of the sample holder.
The expansion value of the sample holder, Dh , can be obtained through calibration. Also
a table with absolute reference values of the linear expansion of different materials and the
expansion of the sample holder is given in appendix A. [8]
control thermocouple
The photocell in the control unit is photoconductive, meaning that it becomes more conductive
due to the absorption of light. Thus, when light falls upon the photocell, the voltage in the
circuit increases by an amount proportional to the intensity of the light. The output voltage
that is given by this photocell is 0 6 V. Using this cell the intensity of incident light con-
trols the heating element by increasing or decreasing the input voltage for the power supply. [6]
6 Dilatometer
2.3 Vacuum
Around the sample tube a protection tube can be placed to ensure homogenous heating, but
also to obtain a high vacuum for the sample. This vacuum is required when measuring metals,
because otherwise the metal will oxidize and therefore, undesired, transform the structure of
the sample that is being analyzed. Since mostly metals are used to observe phase transitions,
the vacuum should be obtained correctly. To prevent oxidation from happening, a vacuum of
10e4 mbar (= 75e6 torr) is required. When analyzing materials such as ceramics, obtaining
a vacuum will not be necessary since oxidation is out of the question. [1], [10], [9]
The vacuum inside the protection tube is affected by a rotary and a diffusion pump. The
specifications of both pumps can be found in appendix B. Next the working principle of the
vacuum system and its measurement are explained.
Rotation pump
Diffusion pump
gauge
head
vacuum
port
filament
The Pirani gauge measures the pressure according to a change in thermal conductivity. This
change is affected by a rise or fall in the number of gas molecules when pressure changes
in a vacuum system. A variation in thermal conductivity induces a change in the heat loss
of an electrically heated filament (see figure 2.6). A lower pressure means less collisions of
gas molecules and therefore less heat loss, which means that the filament heats up. As the
electrical resistance of the wire is proportional to its temperature, this resistance will increase.
The filament that is present inside the Pirani gauge head has a high resistance temperature
coefficient, so that slight changes in the system pressure will result in useful changes in the
filament resistance. Now this filament forms one arm of a Wheatstone bridge and the changing
resistance results in an out-of-balance current. This current can be read as a pressure on a
meter. In the current setup the Pirani gauges have a measuring range of 1 - 103 torr. [1], [10]
After reaching a vacuum of 103 torr and turning on the water cooling, the diffusion pump
can be engaged. It is important to have reached this vacuum, since otherwise hot oil could
combust in the presence of oxygen. A reservoir at the bottom of the pump containing low
vapor pressure oil is heated and the vapor oil is directed through a jet assembly. The outside
of the diffusion pump is water-cooled and the impact of the vapor jet onto the cooled shell
condenses the fluid, after which it is redirected to the reservoir. During this process molecules
are taken out of the chamber and discarded through an outlet, resulting in a high vacuum
(up to 105 torr). Since the range of diffusion pumps is less than 103 torr, the pressure is
measured by a Penning gauge. [9]
The Penning gauge is a type of ionization gauge, which are the most sensitive gauges for
very low pressures (high vacuums), and is based on the magnetic Penning effect. This effect
describes the increase of the ionization probability of gas in a low pressure electrical discharge,
which results from the helical movement of electrons in a magnetic field (B-field) placed normal
to an anode-cathode electrical field (E-field). These fields constrain electrons in helical paths.
This gives them long free paths and therefore a high probability to ionize the residual gas.
The combination of electron and ion movement induces a current, which is used to measure
the pressure. A schematic view of a Penning gauge is shown in figure 2.7. The Penning gauge
used in this setup has two measuring ranges, 1: 102 - 104 and 2: 104 - 105 . [1], [9]
8 Dilatometer
ceramic disc
cathode
magnet
anode
gas to be ionized
B-field
E-field
Since it is quite an old system and it had not been used for a while, it was necessary to check
whether the system and measurement were still working properly. This was done by adding a
high precision Penning gauge as the reference value and noting what the pressure readings of
the Pirani and Penning gauges were showing. Conclusions from these measurements are that
the Pirani gauge after the diffusion pump is not working properly due to a bad connection in
the cable. The second Pirani gauge does measure the vacuum quite well. Also the Penning
gauge is working well enough for this purpose, meaning that the measurement is not exact,
but it will indicate whether the vacuum is high enough to prevent oxidation.
2.4 Upgrading
The upgrading of the dilatometer equipment consists of two main parts.
First the data acquisition system needs to be upgraded. In the current setup the signals
of the thermocouples and the expansion are recorded by analogical gauges. To be able to
analyze the data from the sample thermocouple and the expansion, these should be recorded
digitally. Furthermore, to control the temperature it is important to know the exact tem-
perature inside the furnace, therefore the signal of the control thermocouple should also be
digitalized.
Next the temperature control is upgraded by replacing the current electromechanical system
by a digital closed-loop control system. This replacement will greatly improve the workability
of the equipment. For example, it will make it easier to define a specific temperature profile
with different heating rates and the accuracy of the measurement is highly improved. Next,
the accuracy of the control is significantly improved since the electromechanical components
are subject to varies noise sources, such as vibrations and heat generation, which introduces
non-linearities in the electrical components. The new control system should be able to control
thermal cycles in the range of 5 to 20 o C/min, with an accuracy of 10 o C.
Chapter 3
Modelling
A good understanding of heat transfers inside the electrical furnace is desirable when trying
to control the temperature of a sample inside this furnace.
The main part of the furnace is the heating element. Around the heating element a thick
insulation is placed to prevent great heat losses to the environment. A water cooling instal-
lation is present around the insulation to improve its function. Inside the furnace the control
thermocouple (Tc ) nearly touches the furnace wall. The temperature measured by this ther-
mocouple is a good equivalent for the input power and therefore this is the thermocouple on
which the controller will react. A ceramic protection tube is placed around the sample tube
such that homogeneous heating of the sample is assured. This protection tube is also used
when operating under vacuum. The vacuum then exists inside this protection tube. The
sample thermocouple (Ts ) is located right above the sample. This thermocouple is solely used
for the analysis of an experiment. 1
Tc
Ts
1
In current dilatometers the temperature is measured by an optical pyrometer, which measures, without
contact, the temperature at the end of the sample holder by means of a lens system placed in the furnace axis.
In this way the measured material always has very similar radiation behaviour to that of a black body. [2]
10 Modelling
dQ
dt = mc dT
dt
(3.1)
dQ Ts4 Tc4
dt = 11 1 1
1 A1
+ A1 F12
+ A2
2 2
Since the problem consists of an enclosure formed by two concentric cylinders, F12 = 1 and
the second equation of (3.1) results in (3.2).
dQ 1 A1
= (Ts4 Tc4 ) (3.2)
dt 1 + 2 A
1 1
A2 (1 2 )
dQ
= 1 A1 (Ts4 Tc4 ) (3.3)
dt
Adjusting these general radiation equations to the situation inside the furnace and adding the
input power and a power loss factor, this results in equations (3.4) and (3.5).
dTc
mc cc = Pin Ploss Prad (3.4)
dt
dTs
ms cs = Ac (Ts4 Tc4 ) = Prad (3.5)
dt
With the subscript c for the protection tube, which is assumed to be equal to the control
thermocouple, and the subscript s for the sample.
With these equations it will be possible to describe the tracking behaviour of the heating
of the sample compared to the direct heating of the protection tube. This will be done
through simulations in Matlab Simulink.
3.2 Simulations 11
3.2 Simulations
Next this model is implemented as a closed-loop temperature control in Matlab Simulink (fig-
ure 3.2). In the model the power output of the heating element is controlled by a variable
voltage which is determined by the error between control and reference temperature. The
relation between the voltage input and power output is determined by experiments (chapter
6) and information given by the manufacturer. This information states that a voltage of 6 V
will result in the maximum output of 3.5 kW.
The radiation equations of chapter 3.1 are implemented in the model using files that are
programmed in the C language (appendix C). The main advantage of using C-files is that
they improve the overview of the model.
The power loss factor is defined in (3.6) and estimated to be 0.1. This is based on the fact that
there are only few connections that can induce convection and the isolation of the furnace is
quite good.
The tracking behaviour of both the sample and control temperature is shown in figure 3.3 for
different profiles and in figure 3.4 for equal profiles, but with different initial temperatures.
12 Modelling
temperature [ C]
o
o
time [s] time [s]
o
(a) Profile with heating rate: 5 C/min (b) Profile with heating rate: 20o C/min
Error during simulation Error during simulation
error Tc error Tc
error Ts error Ts
temperature [ C]
temperature [ C]
o
temperature [ C]
o
(e) Difference Tsample - Tcontrol, 5o C/min (f) Difference Tsample - Tcontrol, 20o C/min
temperature [ C]
temperature [ C]
o
o
temperature [ C]
o
temperature [ C]
o
3.3 Experiments
In order to verify the model a number of experiments should be done. This includes measuring
both the control and sample thermocouple for a specified reference signal. These reference
signals are also used in the simulations. After obtaining the measurements, the results can
be compared with the simulations from where some conclusions can be drawn concerning the
correctness of the model.
Unfortunately the sample thermocouple is not functioning properly and a new thermocou-
ple will not be available on time. Therefore it will not be possible to actually perform the
measurements to verify the model.
Chapter 4
Control Concepts
control thermocouple
By changing the intensity of the LED, the output voltage given to the power supply can be
controlled and therefore also the temperature inside the furnace. The intensity of the LED can
be controlled using Pulse Width Modulation (PWM). Using this technique, analog outputs
can be controlled digitally without using digital-to-analog conversion. The advantage of not
having to use analog circuits is that they tend to drift over time, since the analog output
signal is updated at uniform sampling intervals. Meaning that an output voltage is held in
time at the current value until the next input number is given.
This results in a piecewise constant output, equivalent to a zero-order hold operation (figure
4.2), making it difficult to tune the output. [3]
Finally analog circuits have an infinite resolution, which makes them sensitive to any pertur-
bation or noise because this necessarily changes the current value.
controller
potentiometer + temperature
C DAC PS HE
-
control thermocouple
LED control
The main advantage of LED control is that there is no need for digital-to-analog conversion,
which is responsible for a zero-order hold output. Thus the output can be controlled like an
ideally sampled signal. As said before, this makes it easier to tune the output. However, a
disadvantage of LED control compared to direct control is that it involves more components,
which usually means less accuracy because of more possible noise sources.
Direct control
A big advantage of direct control is that it consists of little components and therefore noise
effects are minimized. Also, the control will be easier to implement because there is no need to
characterize the photocell. On the other hand, the main disadvantage is that it is not possible
to control the temperature without a digital-to-analog conversion, of which the disadvantages
have been mentioned earlier. However, since the system is not high precision, these disadvan-
tages are less important then noise effects.
In effect, the choice of control concept is dictated by the noise that is created by the system
and therefore the direct control is chosen as the method to control the temperature.
Chapter 5
Data acquisition
To be able to control the furnace according to the input signal it is essential to acquire the
data from the control thermocouple. For this purpose an acquisition card ADQ12-B man-
ufactured by MicroAxial is used. The specifications of this card can be found in appendix
D. Unfortunately this type of card is quite antique and it is therefore not possible to use
Matlab for the acquisition and control. For this reason the acquisition of the data and the
temperature control are designed in the language Qbasic.
The control of the temperature is affected by comparing the reference signal to the actual
temperature inside the furnace. This temperature is measured by the control thermocouple
(see figure 3.1, T2). The output of the thermocouple is given in millivolts which can be con-
verted to the actual temperature. However, first the signal of the thermocouple is amplified
to improve the resolution of the reading and therefore the accuracy of the measurement. The
amplifier that has been created for this purpose is shown in appendix E. The amplification
factor is determined using the table shown in appendix F.2, from this table it is concluded
that the temperature increases proportional to the voltage. The original output of the ther-
mocouple was determined at 6.4 V/o C. This signal is amplified by a factor 781, resulting
in an output of 5 mV/o C. Since the sample thermocouple is of the same type as the control
thermocouple, two equal amplifiers are made.
Amplifier 1 is calibrated at a temperature of 22 o C. This means that if for example the output
of the amplifier reads 120 mV, the measured temperature equals 22 + 120/5 = 46 o C.
Amplifier 2 has an offset of 0.110 V. Meaning that it is calibrated at a temperature of 0 o C.
In this case a voltage reading of 120 mV will result in a temperature of 120/5 = 24 o C.
A disadvantage of amplifying the thermocouple signals is that also the noise on these thermo-
couples is amplified.
Next the expansion of the sample is acquired in the same way as explained in chapter 2.1. The
output voltage is digitalized using MicroAxials acquisition card and converted to the correct
expansion value according to the measurement range set on the dilatometer.
Figure 5.1 shows the connection scheme to correctly acquire the necessary signals.
18
15.00 V 15.00 V
6 Volt 6 Volt
+ - + - - GND + - GND +
sample
thermocouple control expansion
thermocouple signal
Data acquisition
Chapter 6
Power supply
To be able to send the correct voltage to the power supply for a certain heating rate, it is
required to understand the characteristics of this power supply. Unfortunately the manufac-
turer cannot supply these characteristics, therefore it is necessary to perform experiments to
acquire them. What is known about the power supply is that essentially it is controlled by an
input voltage between 0 6 V. Next this input voltage is amplified, with a maximum output
voltage of 50 V. The control characteristic line is S-shaped, because a phase angle modulated
power is used.
6.1 Characterization
The input for the power supply is currently delivered by the control unit (chapter 2.2) and
consists of a variable voltage between 0 6 Volts. To understand the relation between the
input voltage and the output power it is possible to set a specific input voltage to the power
supply and measure the thermocouple output.
First the thermocouple is read while the input voltage is set between 0 and 6 Volts with a
stepsize of 0.5 V. From these measurements it was clear that it was not necessary to measure
the heating rate with an input voltage of over 3.0 V. Since 3.0 V results in a heating rate of
approximately 47 o C/min and the relevant range was determined to be 5 - 20 o C/min. The
results of the measurements can be found in figure 6.1.
Next a relation between input voltage and heating rate is determined by measuring the tem-
perature of the control thermocouple for 10 minutes in a range from 0.5 - 3 Volt, with a
stepsize of 0.2 V. From these measurements a fit can be obtained to determine the average
heating rate during these 10 minutes. The variation in measured heating rates appeared to
be quite large, enlarging the measuring time did not make any difference. Therefore a num-
ber of measurements have been done per input voltage to determine an average heating rate.
From these average heating rates the range of interesting voltages has been determined to be
between 1.9 and 2.6 V.
20 Power supply
Although the control characteristic of the power supply is S-shaped, a linear least squares fit
can be used to obtain an exact relation between voltage and heating rate. This because the
range of interest is quite small and lies somewhat in the middle of the total range. Thus, a
least squares fit is performed for the range between 1.9 and 2.6 V (figure 6.2). From this fit
equation (6.1) is obtained to convert a desired heating rate to the required input voltage. This
equation is used in the control programme (appendix I).
With:
1.075695753723490e 005
4.766040929428955e 004
y=
5.235493579648845e 002
1.768217459242615e + 000
Now it is possible to convert a desired heating rate to a required voltage. This required input
voltage can be created using pulse width modulation.
6.1 Characterization 21
Pulse Width Modulation is essentially a method to digitally encode analog signal levels. This
is done by modulating the duty cycle of a square wave to acquire a specific analog signal level.
The modulation consists of switching between discrete on and off states which control the
voltage through the load. The on-time is the time during which a voltage is applied to the
load and the off-time is the period during which there is no voltage supply. The duty cycle
is defined as the amount of on-time during one time period and is equivalent to the actual
voltage output.
T
10%
1
0
50%
1
0
90%
1
Figure 7.1 shows a PWM output for different duty cycles, respectively 10%, 50% and 90%.
These three PWM outputs encode three different analog signal values, being different percent-
ages of the full strength. If, for example, the supply voltages should be 6V, then an analog
signal of 0.6V results when using a duty cycle of 10%, while a duty cycle of 50% results in
an analog signal of 3V. A major advantage of this technique is that the switches are either
off and not conducting current, or they are fully on and have, ideally, no voltage drop across
them. Since the dissipated power is calculated by multiplying the voltage and current, this
means that ideally no power is dissipated. [11]
24 Pulse Width Modulation
One of the most important parameters in PWM is the modulating frequency, defined as the
number of times a cycle is repeated within 1 second. In order for the output to actually return
a percentage of the maximal voltage proportional to the duty cycle, the time period should
be very short. For example, when using a light source at a modulating frequency of 1 Hz and
a duty cycle of 50%. This would mean that the light would be lit for 0.5 seconds and next
off for 0.5 seconds. In order for the light to see 50% of the output voltage, the cycle period
should be short relative to the loads response time to change in the switch state.
However, in this project a furnace is used that cannot be turned on and off at such high
frequencies. Therefore the pwm signal needs to be converted to a variable voltage which can
be used as the input for the power supply.
Intersective method
1
source signals
1
PWM signal
Time
Unfortunately programming in Qbasic brings some disadvantages with it. For example, the
modulating frequency is dependent on the processing time of the program and computer.
The maximal modulating frequency possible using Qbasic is 170 Hz. This is determined by
implementing a loop that will change from high to low state every cycle and measuring the
output signal with an oscilloscope. 170 Hz seems like a low modulating frequency, but it will
be enough to control the furnace correctly, since the response time of the furnace is quite high.
7.2 PWM to voltage 25
47 mF
Vin VC
Vin VC dVC
=C (7.1)
R dt
VR = Vin VC (7.2)
In this circuit it is important to set the time constant ( = RC) of the RC-circuit higher than
the minimal pulse width (PWmin ), which has earlier been determined to be 5 ms. The time
constant is defined as the time it takes the systems step response (charging the capacitor
through the resistor) to reach approximately 63% of full charge or to discharge it to 37% of its
initial value. These percentages are determined by solving equation (7.1) using an integrating
factor, with implementation of equation (7.2). This results in equations (7.3) and (7.4).
t
VC (t) = V (1 e( RC ) ) (7.3)
t
VR (t) = V e( RC ) (7.4)
With these equations it is possible to determine the exact voltage across the capacitor and
resistor during charging, for discharging the equations are vice-versa. Also, the rate of change
is shown to be a fractional 1 1e per , which leads to a fully charged capacitor after 5 . The
equations also show that as time passes the voltage across the capacitor goes to V, while the
voltage across the resistor tends to 0.
The choice for the time constant is dependant on the minimal pulse width. Choosing the time
constant higher than PWmin will result in a more constant output voltage, since the slope of
charging the capacitor is less. This effect is shown in figure 7.4.
26 Pulse Width Modulation
PW min PW max
t = PW min
Vout
time
t = 5 PW min
Vout
time
t = 10 PWmin
Vout
time
With the duty cycle of the pwm signal not at 100%, the capacitor has insufficient time to charge
up, resulting in a small voltage (this can also be seen in figure 7.4) and a high frequency output
1
across the capacitor ( >> RC ). With the expression for I given in (7.5) and Ohms Law, the
voltage across the capacitor can be described by (7.6). This expression shows an integrator
across the capacitor, meaning that the input signal of the capacitor is integrated and given as
an output (respectively the solid and dashed line in figure 7.4). [5]
Vin
I= (7.5)
R + 1/jC
Z t
1
VC = Vin dt (7.6)
RC 0
Finally the interface is tested to confirm correct conversion and determine the amount of
variation present in the output voltage. Herefore a Qbasic programming file (appendix H) is
written in which the desired input voltage for the power supply is the input parameter and the
actual voltage given is measured with a multimeter and compared with that desired voltage.
The setup of this measurement is shown in figure 7.5.
7.2 PWM to voltage 27
desired input
variable
for power supply Qbasic pwm pwm- voltage 2.421
file voltage
multimeter
From these measurements it can be concluded that conversion from pwm to voltage works
properly. With the current circuit an output voltage with a maximum of 2.6 Volt can be
created. Meaning that a pwm signal with a duty cycle of 100% will result in an input voltage for
the power supply of 2.6 V. According to figure 6.2 this will be sufficient to reach a heating rate
of 20 o C/min. There did exist a variation in the voltage of about 5 mV. This variation can
be decreased by placing the interface in a decent box, with decent connections. Furthermore,
this variation will be acceptable.
Chapter 8
Control
The final control is performed following the control scheme shown in figure 8.1. The controller
creates a PWM signal from the error between the reference and actual temperature, which is
then converted to a variable voltage using a PWM-to-voltage interface (appendix G). This is
the feedback part of the control.
Next, a feedforward can be implemented by analyzing the characteristics of the furnace ac-
cording to the input voltage of the power supply. During characterization of the power supply,
the required input voltages for specific heating rates are determined. In this way the error is
minimized beforehand.
Finally both voltages are added, resulting in a total voltage that is send to the power supply.
pwm pwm- voltage
FF
voltage
control thermocouple
Now this control scheme is implemented in a Qbasic programming file that will acquire the
necessary data from the system and from there determines the required control voltage. The
control voltage is defined as the voltage that is created according to the pwm signal from
the error. Also the required feedforward voltage is determined in this programming file. The
feedforward voltage is defined as the voltage required to obtain the desired heating rate and
is also created using a pwm signal.
The creation of a general pwm signal has already been explained in chapter 7.1. For the
control pwm signal, the error signal is compared to the sawtooth and when the error is greater
than the sawtooth, the pwm signal will be in a high state. When the error is smaller than the
sawtooth, the signal will be in low state. This results in a pwm signal with varying duty-cycle.
Now the biggest challenge is to find a relation between the value of the error and the necessary
increase in the input voltage, this is done through a number of experiments.
The pwm signal for the feedforward voltage is created by a preset duty-cycle proportional to
the desired input voltage, related to the desired heating rate according to equation (6.1).
Finally, after conversion from pwm to voltage, the feedforward voltage and control voltage are
summarized and led to the input of the power supply (figure 8.1).
30 Control
8.1.1 Functions
INP: Command to read the bit pattern of a port.
8.1.2 Design
Definition of global variables and directions: Here the global variables are defined together
with the directions that are specified by the acquisition card.
Reference signal: the reference signal is created by entering the desired heating rate, final
temperature and the desired time to keep the temperature constant. The initial temperature
is obtained through a measurement at the beginning of the programme. Herefore a number of
measurements are averaged to eliminate the noise effects that are present in the acquired signal.
Control: This part of the file actually implements the control. First the required files are
opened to save data and a number of time-dependent variables are introduced. Next the con-
trol loop starts.
8.1 Qbasic programming file 31
In the control loop first the single ramp part of the signal is controlled, starting with acquiring
the control temperature, sample temperature and expansion value. After that the sample tem-
perature and expansion value are written to the analysis-file to be used for further analysis
of the behaviour of the sample. Also the time, reference signal and control temperature are
written to the data-file to be able to analyze the control system.
Next the pulse width modulation is implemented by creating a sawtooth and comparing this
with the existing error. This results in a required control voltage at output pin 17. As can
be seen in the file, a voltage will only be applied when the error is greater than 0. However,
the range of the sawtooth can be adjusted in order to create a specific treshold for the error,
meaning that a certain error is allowed and that value can be set by the lower bound of the
sawtooth (if the error is smaller than the lower bound there will be no control voltage). The
amount of heating at certain errors is determined by both the lower and upper bound of the
sawtooth. For example, when a sawtooth is applied between 1 and 6, an error of 5 o C will
result in a pwm signal with a duty-cyle of 80%, equation (8.1). The optimal bounds for the
sawtooth can be determined by experiments.
At almost the same time the feedforward signal is implemented. Therefore, first the voltage
necessary to obtain the required heating rate is determined through equation (6.1), which is
obtained by a least squares fit through measurement data (chapter 6). This voltage is then
converted to a desired duty-cycle by equation (8.2), with Vmax = 4.8 V. Finally pin 15 will
output the pwm signal created for this feedforward signal.
YU B YLB
(8.1)
error YLB
Vdesired
duty-cycle = (YU B YLB ) + YLB (8.2)
Vmax
With:
YU B = upper bound of the sawtooth
YLB = lower bound of the sawtooth
Vmax = 4.8 V
The second part if the control consists of keeping the temperature constant. For this purpose
the control voltage will be used and the feedforward signal will be stopped. Thus the control
relies solely on feedback.
32 Control
8.2 Experiments
First the control is tested without using the feedforward determined in chapter 6. This can be
done by giving a desired heating rate and final temperature as the input and acquire the data
necessary to analyze the experiment (time, reference signal, measured temperature). The data
is analyzed using the Matlab m-file given in appendix J. This m-file will plot a figure that
shows the tracking behaviour of the actual temperature. For a standard sawtooth of 0 1
this leads to the tracking behaviour shown in figure 8.2, in which the blue line represents the
reference signal and the red line the tracking behaviour.
o o
Saw: 0 - 1, heating rate 5 C/min Saw: 0 - 1, heating rate 15 C/min
temperature [ C]
temperature [ C]
o
Figure 8.2: Tracking behaviour without feedforward, heating rates: 5 o C/min and 15 o C/min
This tracking behaviour can be optimized by determining the desired input voltage according
to the size of the error. This can be done by varying the range of the sawtooth, as explained
earlier. To give an idea about the difference these boundaries can make, some simulations have
been done showing the output voltage given with a fixed error signal and varying boundaries.
The results are shown in figure 8.3. Optimization can than be performed by changing these
parameters according to a positive change in the tracking behaviour. Experiments have shown
that a sawtooth of 0 1.5 will give the best results in tracking behaviour.
As mentioned in chapter 7 the principle of control has proved to be working. Without any
feedforward there might be some delay present in the tracking. This delay is not a big prob-
lem, since the sample thermocouple will acquire the actual temperature to analyze the phase
transitions and point them at the right temperature. Most important is that the desired heat-
ing rate is followed.
8.2 Experiments 33
Sawtooth: 0 - 4 Sawtooth: 0 - 8
sawtooth sawtooth
error signal error signal
error [ C]
error [ C]
o
o
time [s] time [s]
Output voltage Output voltage
pwm signal pwm signal
output voltage output voltage
pwm state
pwm state
Next the feedforward determined from the characterization in chapter 6.1 is implemented in
the control. Again the tracking behaviour can be analyzed using the earlier mentioned m-
file. This feedforward is optimized by adjusting the prescribed input voltage according to the
actual measured heating rates. Also the effect of the feedforward is improved by changing
the range and location of the sawtooth. Because changes in the sawtooth will also affect
the error control, a separate sawtooth is used for the feedforward. From experiments it was
concluded that a sawtooth of 1 5 for the feedforward signal gives the best results (figure 8.4).
With the separate sawtooths designed for the error control and the feedforward signal, the
control file for the closed-loop temperature control is finished. Figure 8.5 shows the tracking
behaviour of the control for different heating rates. As can be seen from table 8.1 the mean
error during operation increases with increasing heating rate. Also the standard deviation, ,
increases. Another conclusion that can be drawn is that the control is more accurate during
the constant temperature part of the profile. However, there does exist quite a difference in
the mean errors. This can be explained by the fact that a higher heating rate implies more
delay and therefore the mean error increases. Comparing these errors to the required accuracy
of 10 o C, these results are quite good.
34 Control
Saw 0 - 3 Saw 0 - 5
temperature [ C]
temperature [ C]
o
o
time [s] time [s]
temperature [ C]
o
temperature [ C]
o
o
time [s] time [s]
o
(a) Heating rate 5 C/min (b) Error
Tracking behaviour Error
temperature [ C]
temperature [ C]
o
temperature [ C]
o
temperature [ C]
o
Additional points of interest are examining the effect when the heating rate exceeds the max-
imal possible heating rate due to limitations of the power supply and determine the maximal
cooling rate when requiring a negative temperature slope is interesting.
Therefore, heating rates of 100 o C/min, 75 o C/min and 50 o C/min are applied to the furnace.
This leads to the tracking behaviour shown in figure 8.6. From this it can be concluded that
a heating rate up till approximately 75 o C/min is possible, however, the settling time in that
case is about 30 seconds. Again, for the current application this is acceptable. The overshoot
present in these measurements can be explained by the enormous amount of heat applied and
the cooling rate when the power supply is turned off.
temperature [ C]
temperature [ C]
o
o
time [s]
The cooling rate is determined from different starting points, the results are shown in figure
8.7. This figure shows that the cooling rates are approximately equal while starting at different
temperatures. When a negative temperature slope is desired in the profile, this information
can be used to determine for example the maximum cooling rate.
Cooling curves
temperature [ C]
o
time [s]
Finally, a second feedforward could be applied to the control system. This would be the
feedforward acquired through the model and verified by measurements (chapter 3). This feed-
forward would compensate for the difference in temperature between the control thermocouple
and the actual sample temperature. This known error can than be added to the actual error
and from there the necessary control voltage can be adjusted. Unfortunately it was not pos-
sible to implement this feedforward, since the model could not be verified.
Chapter 9
9.1 Conclusion
A digital closed loop temperature control has been designed for the dilatometer that is present
at the University of Buenos Aires. The design of this control is based on pulse width modu-
lation. The PWM signal is constructed from the error signal obtained by the thermocouple.
From there the signal is converted to a variable voltage and send directly to the power supply.
This direct control is a replacement for the current electromechanical control. This will elim-
inate a number of noise sources that were present in the electromechanical control, resulting
in a more accurate control. Next to the feedback control, a feedforward is applied to decrease
the error.
Finally, the replacement makes it easier to adjust the desired temperature profile and to obtain
and analyze the required data.
9.2 Recommendations
Although the new control is working properly, there are a number of recommendations to
improve the control. Also, to perform actual measurements for which the dilatometer was
built, some future work needs to be done.
optimization
First of all, the implemented control has not yet been fully optimized. Ideas to optimize
the control are to determine the ideal range for the sawtooth, how many increments
(to go from LB to UB) are necessary to obtain a smooth sawtooth but not influence
the calculation time too much (accuracy versus calculation time). Also the model made
in chapter 3.2 should be verified, after which a second feedforward can be constructed
using this information.
characterization
For the current feedforward, the characterization of the power supply has been done
by changing the input voltage which is created by the old electromechanical control.
A more accurate feedforward can be created by using a PWM signal constructed in
Qbasic as the input voltage, in this way confirming the actual dynamics between what
the computer sends out and the power supply receives. Also measuring more samples
at at smaller intervals will increase the accuracy of the feedforward control.
40 Conclusion and Recommendations
Electronics
The two amplifiers and the pwm-to-voltage interface are currently placed in open air
with weak connections. Therefore they should be soldered properly and then be put in
a decent housing with decent connections. This will significantly decrease the noise on
the signal of the thermocouple.
Power supply
The power supply that is currently used in the setup is very old. Therefore there is no
information available about the exact working of the supply and there are no specifica-
tions available. This makes it hard to tune the pwm-to-voltage interface. Therefore it
is recommended to acquire a new power supply. This will make it easier to implement
the pwm-to-voltage interface and it will last longer.
Thermocouple
To be able to verify the model and know the exact temperature of the sample for analysis,
a new thermocouple is required. This thermocouple should be placed next to the sample.
When replaced, it will be best to also replace the control thermocouple, such that the
two thermocouples used are identical.
Measurement unit
The output signal of the measurement unit is not yet digitalized. To do this the amplifier
that is present in the measurement part of the control unit needs to be connected and
the output signal can be obtained by the data acquisition card.
Bibliography
[1] http://en.wikipedia.org/wiki/Pressure-measurement.
[2] http://www.netzsch-thermal-analysis.com.
[3] http://en.wikipedia.org/wiki/Digital-to-analog-converter.
[4] http://en.wikipedia.org/wiki/Pulse-width-modulation.
[5] http://en.wikipedia.org/wiki/RC-circuit.
[6] Control unit for dilatometer type 402/3E. NETZSCH-Gertebau GmbH, 1966.
[7] Measurement unit for dilatometer type 402/3E. NETZSCH-Gertebau GmbH, 1966.
[8] Recording unit for dilatometer type 402/3E. NETZSCH-Gertebau GmbH, 1966.
[9] Manual EDWARDS 3-stage Speedivac diffusion pump. EDWARDS high vacuum, 1971.
[10] Manual EDWARDS Speedivac rotary pump. EDWARDS high vacuum, 1971.
[11] Michael Barr. Introduction to Pulse Width Modulation. Embedded Systems Design,
2001.
Appendix A
Speed:
unbaffled: .... .... 70 80 L/s
at baffle-valve inlet: .... .... 50 55 L/s
at complementary baffles (einbau-baffles): 30 40 L/s
Ultimate vacuum with gas ballast: .... .... > 5x103 torr (McLeod)
(air is a suitable ballast for most applications)
Safe water vapour pumping rate: .... .... .... +/- 0.18 kg/hr
Grade of pump oil for maximum protection against corrosion: "Speedivac" No.18 oil
Grade of pump oil for highest ultimate vacuum: .... .... "Speedivac" No.16 oil
#define S_FUNCTION_NAME T1
#define S_FUNCTION_LEVEL 2
#include "simstruc.h"
#include <math.h>
#define NSTATES 0
#define NINPUTS 2
#define NOUTPUTS 1
#define NPARAMS 0
/* definition of constants */
#define A 5.67e-8 /* Stefan-Boltzmann constant */
#define B 0.8 /* emissivity coefficient of the tube */
#define C 0.0490 /* Area of the tube [m2]*/
#define mc1 1.9580 /* m*c of the sample */
#define mc2 101.2449 /* m*c of the tube */
ssSetNumSFcnParams(S, NPARAMS);
if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) {
return; /* Parameter mismatch will be reported by Simulink */
}
ssSetNumContStates(S,NSTATES);
ssSetNumDiscStates(S,0);
/* ============== */
/* Define outputs */
/* ============== */
/* ========= */
/* Terminate */
/* ========= */
static void mdlTerminate(SimStruct *S)
{
#define S_FUNCTION_NAME T2
#define S_FUNCTION_LEVEL 2
#include "simstruc.h"
#include <math.h>
#define NSTATES 0
#define NINPUTS 3
#define NOUTPUTS 1
#define NPARAMS 0
/* definition of constants */
#define A 5.67e-8 /* Stefan-Boltzmann constant */
#define B 0.8 /* emissivity coefficient of the tube */
#define C 0.0490 /* Area of the tube [m2] */
#define mc1 1.9580 /* m*c of the sample */
#define mc2 101.2449 /* m*c of the tube */
50 C-files implemented in Simulink model
ssSetNumContStates(S,NSTATES);
ssSetNumDiscStates(S,0);
/* ============== */
/* Define outputs */
/* ============== */
/* ========= */
/* Terminate */
/* ========= */
static void mdlTerminate(SimStruct *S)
{
Digital input-output
8 bit output port, bit by bit programmable
5 bit input port
Inputs: VIL = 0.8V, VIH = 2.0V, VH = 0.4V, IIL = 200A, IIH = 20A
Outputs: VOL = 0.35V, VOH = 2.7V, IOL = 8A, IOH = 400A
Min. writing time, CTREG, OUTBR: 650 ns
Min. reading time, STINR: 650ns
Timer
16 bit counter, internal or external clock
32 bit pacer, clock 16 s for 2h and 23m
54 Specifications Microaxials ADQ12-B
Thermocouple amplifier
680K
10K
LM335
R1 R2
10K LM336-5
10K
68W 100K 5K
R7 R6
-15 V R3
5K
+15 V
7
2 OP17
- 6
3
R4
+ Vout
4
Vin = a*(Tm-Tr)
Vout / Vin = 780 -15 V
Vin R5
V2=(V1*R5) / (R4+R5) Tm
Tr V1 V2
Thermocouple
clear all
close all
clc
mV = [0.000 0.055 0.113 0.173 0.235 0.299 0.365 0.432 0.502 0.573 ...
0.645 0.719 0.795 0.872 0.950 1.109 1.273 1.440 1.654 1.873 ...
2.096 2.323 2.786 3.260 3.743 4.234 4.732 5.237 5.751 6.274 ...
6.805 7.345 7.892 8.448 9.012 9.585 10.165 10.754 11.348 ...
11.947 12.550 13.155 13.761 14.368 14.973 15.576 16.176 ...
16.771 17.360 17.942];
Digit = [0 61 126 193 262 333 407 482 560 639 719 801 886 972 ...
1059 1236 1419 1605 1844 2088 1336 2589 3106 3634 4172 ...
4720 5275 5838 6411 6994 7586 8187 8797 9417 10046 10684 ...
11331 11988 12650 13317 13990 14664 15339 16016 16690 ...
17363 18031 18695 19351 20000];
B = [Th];
Y = A\B;
Y10 = A8\B;
figure(1)
subplot(211)
plot(mV,Th,bo)
hold on
plot(mV,mV.^3*Y(1)+mV.^2*Y(2)+mV.*Y(3) + Y(4),r)
F.2 m-file using least squares fit 59
plot(mV,mV.^9*Y10(1)+mV.^8*Y10(2)+mV.^7*Y10(3)+mV.^6*Y10(4)+mV.^5*Y10(5)+ ...
mV.^4*Y10(6)+mV.^3*Y10(7)+mV.^2*Y10(8)+mV.*Y10(9)+Y10(10),g)
grid
legend(data,4th order fit,10th order fit)
ylabel(Temperature [C])
xlabel(Voltage [mV])
title(Characteristics Thermocouple)
subplot(212)
ylabel(residual Temperature [C])
xlabel(Voltage [mV])
plot(mV,Th-(mV.^3*a+mV.^2*b+mV.*c + d),ro-)
hold on
plot(mV,Th-(mV.^9*Y10(1)+mV.^8*Y10(2)+mV.^7*Y10(3)+mV.^6*Y10(4)+mV.^5*Y10(5)+ ...
mV.^4*Y10(6)+mV.^3*Y10(7)+mV.^2*Y10(8)+mV*Y10(9)+Y10(10)),go-)
legend(4th order,10th order)
grid
1600
1400
1200
temperature [oC]
1000
800
600
400
200 data
10th order fit
0
0 2 4 6 8 10 12 14 16 18
voltage [mV]
PWM-to-voltage interface
+6 V
27K
+6 V
BC337
2.2KW 100nF
V1 LN4005
100nF
1W
7
2
- 6
2.2KW Vout
3
V2 +
4
47mF 1W
LN4005
100nF
BC327
27K
*****************************************************************
* Definition of global variables and directions *
*****************************************************************
DEFINT A-Z * All variables in 16 bits
DirBas = &H300 * Base direction of the card: 300h
******************************************************************
* Reference Signal *
******************************************************************
TIMER ON
******************************************************************
* PWM implementation, for testing the pwm-to-voltage interface *
******************************************************************
OUT CTREG, 1 * select channel 1, FE: +5V
e = INP(ADLOW) * Dispara el conversor AD.
t0! = TIMER
t01! = TIMER
time! = t0!
n! = 2
Vmax! = 4.8 * maximum output voltage of the acquistion card
DO
e = INP(STINR) AND &H20 * Wait till end of conversion
LOOP WHILE e = 0
* single ramp
WHILE t01! < (t0! + tf!)
IF n! MOD x = 0 THEN
OUT OUTBR, &HA * set max voltage
y! = 1
ts! = TIMER - t0!
WRITE #2, ts!, y! * write sawtooth to pwmsaw.mat
ELSE
OUT OUTBR, &H2 * set voltage to 0
y! = 0
ts! = TIMER - t0!
WRITE #2, ts!, y! * write sawtooth to pwmsaw.mat
END IF
n! = n! + 1
t01! = TIMER
WEND
WEND
TIMER OFF
CLOSE #1
CLOSE #2
Appendix I
************************************************************************
* ADQ12-B AD convertor: balanced, unipolar connection *
************************************************************************
************************************************************************
* Definition of global variables and directions *
************************************************************************
DEFINT A-Z * all 16 bits variables
DirBas = &H300 * Base direction of the card: 300h
************************************************************************
* Programming of port OUTBR *
************************************************************************
OUT OUTBR, &H9 * Put OUTBIT1 at 1.
OUT OUTBR, &HF * Put OUTBIT7 at 1
OUT OUTBR, &H7 * Put OUTBIT7 at 0
************************************************************************
* Constants *
************************************************************************
v0! = 23 * offset in amplifier 1: OUT1 = 23
v1! = 0 * offset in amplifier 2: OUT2 = 0
************************************************************************
* Reference Signal *
************************************************************************
TIMER ON
WEND
********************************************************************
* Control *
********************************************************************
OPEN "TOTAL5.mat" FOR OUTPUT AS #1
OPEN "ANA5.mat" FOR OUTPUT AS #2
OPEN "PWMFF5.mat" FOR OUTPUT AS #3
OPEN "PWMERR5.mat" FOR OUTPUT AS #4
DO
e = INP(STINR) AND &H20 * Wait for end of conversion (EOC)
LOOP WHILE e = 0
* single ramp
WHILE t01! < (t0! + tf!)
y! = 1.05
END IF
.
..
etc
..
.
IF n! MOD 199 = 0 THEN
y! = 4.95
END IF
IF n! MOD 200 = 0 THEN
y! = 5
n! = 139
END IF
ELSE
OUT OUTBR, &H2 * send 0 V to outport 2 (0010): OUTB2 =pin17
WRITE #4, 0
END IF
i! = i! + 1
n! = n! + 1 * counter for designing sawtooth and averaging data
t01! = TIMER * reset current time
WEND
* constant temperature
WHILE t01! < (t0! + tf2!)
i! = i! + 1
n! = n! + 1 * counter for sawtooth and avg data
t01! = TIMER * reset current time
WEND
TIMER OFF
CLOSE #1
CLOSE #2
CLOSE #3
CLOSE #4
Appendix J