You are on page 1of 23

Hakan AYKULU

20083263
Department of Computer Engineering

DEVELOPMENT OF A TEMPERATURE CONTROL SYSTEM
This project is about the development of a

microcontroller based educational

temperature control system



Laboratories are very important part of every engineering course.
Students learn the theory in classes and apply their knowledge into
practise by using real equipments in laboratory sessions.

For example, electronic engineering students learn the complex
theory of transistor amplifiers in the classroom. In order to support
theoretical concepts explained in classroom, laboratory sessions
must be provided to reinforce this knowledge.

Students retain 25% of what they hear, 45% of what they hear and
see, and 70% if they use the learning-by-doing method.

INTRODUCTION




The aim of this project was to develop a microcontroller based

temperature control system that can be used for teaching the

principles and the practise of control engineering to

undergraduate students.
.

An EasyPIC6 type development board is used in the design. This
board is developed and manufactured by mikroElektronika. It has
many switches, LEDs, jumpers, ICD, and many I/O ports.

The output of the temperature sensor is connected to analog input
AN0 (RA0) of the microcontroller. The output PORT C of the
microcontroller is connected to a D/A connector. The D/A connector
drives a high power operational amplifier. The output of the
operational amplifier is connected to the fan.

There are many types of control algorithms that can be used
in temperature control applications. Some of the commonly
used control algorithms are:

ON/OFF control
Proportional+Integral+Derivative (PID) control
Fuzzy control
Neural network based control

In this project we will be using the ON/OFF based control
and the PID based control

Temperature control is very important in process control
applications. Accurate control of the temperature is important
in many industrial and chemical plants.

Temperature control is professionally performed using a
closed loop control system. In such a system a temperature
sensor is used to sense the temperature. A digital controller or
a computer reads the sensor temperature and provides control
actions to obtain the required temperature.
The block diagram of a typical temperature control system is
shown below. R is the input, Y is the output.


digital
controller Heater
Y
R
error
sensor
D/A Power
Amp
The successful implementation of a temperature control system requires
a temperature sensor. There are many types of temperature sensors
available in the market place. Although there are some digital
temperatures available, most sensors give analog outputs.

The outputs of temperature sensors are usually voltages or currents
proportional to the temperature being sensed by the sensor. A brief
summary of the popular temperature sensing devices is fiven in this
section.

A list of the available temperature sensor devices is given below:

Thermocouples
Resistance Temperature Devices (RTD)
Thermistors
Semiconductor temperature sensors

Temperature Sensors


Perhaps the easiest form of control is known as the ON/OFF control, or
Bang-bang control. In this type of control the plant output is compared
with the desired value. If the plant output is lower than the desired value
then the actuator is operated. If on the other hand the plant output is
higher than the desired output then the actuator is simply turned OFF.

The ON/OFF type control is used in most simple low-cost temperature
control applications. If the plant temperature is lower than the desired
temperature then the heater is operated to increase the plant
temperature. If on the other hand the plant temperature is higher than
the desired temperature then the heater is turned off


Perhaps the most commonly used control algorithm in
industry is the PID or the Proportional+Integral+Derivative
algorithm or one of its variants, e.g. just proportional (P), or
Proportional+Integral (PI).

The PID algorithm gives a smooth and very accurate
controlo of the temperature. The theory of the PID algorithm
is described below.

The PID algorithm is often referred to as a three term
controller. t is currently one of the most frrequently used
controller in the process industry. On a PID controller the
control variable to the plant is generated from a term
proportional to the error, a term which is the integral of the
error, and a term which is the derivative of the error.

Proportional: the error is multiplied by a gain Kp. A very high gain may
cause instability, and a very low gain may cause the system to drift away.

Integral: the integral of the error is taken and multiplied by a gain Ti. The
gain can be adjusted to drive the error to zero in the required time. A too high
integral gain may cause oscillations and a too low gain may result in a
sluggish response.

Derivative: The derivative of the error is multiplied by a gain Td. Again, if the
derivative gain is too high the system may oscillate and if the gain is too low
the response may be sluggish.

Figure shows the block diagram of the classical continuous-time PID
controller [8]. Tuning the controller involves adjusting the parameters
Kp, Td, and Ti in order to obtain a satisfactory response. The
characteristics of PID controlelrs are well known and well established,
and most modern controllers are based on some form of PID.









Continuous-time system PID controller

(

+ + =
}
dt
t de
Td dt t e
Ti
t e K t u
p
) (
) (
1
) ( ) ( (1)

(

+

+ =

=
n
k
i
d p
kT e
T
T
T
T kT e kT e
T kT e K kT u
1
) (
) ( ) (
) ( ) ( (7)
The discrete form of the PID is:




Development
Kit
D/A
Converter

Heater
Power
Amp.
Sensor Fan



The algorithm of the ON-OFF Controller is:




BEGIN
DO FOREVER
Read plant temperature from A/D converter channel 0
IF Plant temperature > Set point temperature THEN
Turn ON fan
ELSE
Turn OFF fan
ENDIF
ENDDO
END

ON-OFF CONTROL
ON-OFF CONTROL
PID CONTROL

The controller parameters were obtained by
forcing the system to oscillate and then the
frequency of oscillation and the amplitude of
oscillation were recorded and the PID
parameters were estimated.

PID Control

The response of the system was as
follows:


The developed kit has been successful and the temperature
inside the thermal plant has been controlled using both an
ON/OFF type control and a PID relay based auto-tuning
control.

The results show that with both methods the temperature
inside the thermal plant has stabilized at the desired set-
point. The PID based design offered a better response as
the output was not oscillatory.

The kit developed by the author can be used in teaching the
practical aspects of automatic control where students can
develop programs on the microcontroller and then control
the temperature by implementing various controller
algorithms.

You might also like