You are on page 1of 33

Presented:

1. Alaa Mohammed Azeem


2 . Amna Khalafalla Mohammed
3. Amera Jubara Mohammed
4. Maha Alshiekh Ahmed
ABSTRACT
Performance evaluation of PID controllers

implemented with a clear objective to control the

temperature of a ventilation system, Mathematical

models of plant (chamber) and actuator were developed,

Controller design based on the models was also

developed using Simulink. The models were validated

through simulation using Matlab (Simulink).


A schematic model of the system was also captured using

proteus and the animated simulation was carried out to

validate the system performance to varying temperature

conditions within the chamber.

After several assumptions and simulations, a set of optimal

parameters was obtained that exhibited a commendable

improvement in the overshoot, rise time, peak time and

settling time thus improving the robustness and stability of

the system.
1. INTRODUCTION
Heating and ventilation systems play a vital role in

providing a comfortable, practical and healthy

environment in our workplaces and homes. The

provision of adequate heating and ventilation is becoming

increasingly important in industry, particularly in office

buildings with high employee densities. This is not only a

key issue in providing work conditions that ensure

employee satisfaction and hence increased work output,

it is now a health and safety


issue that has, in recent times, led to industrial relations
problems related to air quality and smoking.

Subsequently, fire, health and safety regulations have begun to


put tighter limits on the acceptable number of air changes
per hour in a building, and acceptable room temperature
range. The design, testing, operation and management of
ventilation systems rely increasingly on simulation
techniques. Such techniques together with model based
analysis of ventilation systems and validation methodologies
provide an important tool helping the users to carry out
thorough tests of the systems by emulating their
performance on a computer
Air ventilation systems are equipment usually implemented for
maintaining satisfactory comfort conditions by keeping the
temperature of the chamber within a certain range.

The energy consumption as well as indoor comfort aspects of


performance ventilated systems is highly dependent on the
design,

performance and control of the system and equipment.

A mandatory demand to implement the project is the model


acquirement which describes the complex behavior of the
system The project implies both acquisition and modeling
techniques and control strategies based on the microcontroller.
II. SYSTEM DESIGN PROCESS
The temperature control system was built around several
mathematical models needed for the analysis of the system

dynamics to design and evaluation of the control system.

Figure (1) shows the closed loop structure of a temperature

controlled system. In this structure, the models of the system


dynamics; sensors, actuators and computational effects are
the basic elements which often can not be altered
Finally, a driver (L293D) output from controller is used to drive
The fan..
Figure (1)(Shows a block diagram of the close loop of

temperature control system) .A simplified mathematical

model of the overall system will be derived in this section.

The system will be validated by simulating the controller

model with the plant model, sensor and actuators or any

combination of these components. The system should

regulate the desired chamber temperature with minimum

settling time and overshoot.peak time, rise time,


Figure 1: Block diagram of the closed loop temperature control system
A. Mathematical Model of the Chamber:
Consider a mass M (kg) at temperature θ1, The mass is placed in
an environment (chamber) at temperature θ2 and heat 𝑞 is

transferred into the mass causing its temperature to rise. The


system is a ventilation system. LM35 sensor is used as the

sensing device to take the temperature reading of the system


and we want to know how long it takes for the sensor to
warm up to the same temperature as the air in the room.

From the law of heat transfers which states:

Temperature rise α Heat added


(2.1)

c = specific heat capacity

Divide both sides by dt


(2.2)

The rate of heat transfer into the mass is

and the rate is governed by the thermal resistance between


and the mass.the air
This obeys a law similar to ohm s law so:

Where, R is the thermal resistance in Kelvin per watt.


Equating for ∅, we have

In all system, the product of the resistance and capacitance is


the time constant τ so we have:
In all system, the product of the resistance and capacitance is the
time constant τ so we have:

Changing from a function of time into a function of “S‟ we have:

(2.3)

Where τ = 120secs
Figure2: Modeled block diagram of the chamber

B. Mathematical model of the Actuator:


The relationship between the applied voltage and the
energy generated by an electrical cooling element is non-
linear.
In this Project this relationship is linearised by driving the fan
from a pulse width modulated (PWM) signal. A pulse width
modulated signal is generated from the microcontroller as
shown in Fig. 5 where M and S are the mark and the space of
the waveform, and T is the period, i.e. T = M + S.
The r.m.s. value of the current through the fan can be
calculated as:

(2.4)

Figure 3: PWM fan waveform.


C. Mathematical model of the temperature
(LM35):sensor

(2.5)

Where, 𝑉0 is the sensor output voltage in volts and T is


the temperature in °C.
D. Mathematical model of the Controller:

𝑡
𝑑𝑒𝑅
= 𝐾𝑃 𝑒𝑅 (t) + 𝐾𝐼 𝑒𝑅 𝜏 𝑑𝜏 + 𝐾𝐷 𝑉𝑃𝐼𝐷
𝑡0 𝑑𝑡
 𝐿 𝑉𝑃𝐼𝐷 𝑡 = 𝑉𝑃𝐼𝐷 𝑠 1
𝐾𝐼
 𝑉𝑃𝐼𝐷 (s) = 𝐾𝑃 𝑒𝑅 + 𝑒 + 𝐾𝐷 𝑆 𝑒𝑅
𝑠 𝑅 2

𝐾𝐼
H(S)=𝐾𝑃 + +𝐾𝐷 𝑆
𝑠
Model system without PID:

1
In1 Out1
120 s+1 Scope
Step chamber
actuator

Figure: 4
Simulation model:
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 50 100 150 200 250 300 350 400 450 500

Fig:5 Scope of the unit step response of the system without PID
model in matlab using PID :

Figure :6
IV. SIMULATION AND RESULTS

The system was modeled and simulated using


Matlab/Simulink. The simulated results of the system
analyzed. Figure (6). shows control with PID tuning were
temperature control .the Simulink block diagram of the
system
A.Test 1:

Consider the following assumed values of the parameters of


the PID controller and the response of the system to these
Values.

TABLE 1:

The first assumed values of the parameters of the PID


controller

parameters Kp Ki Kd

Value 0.23 0.117 0.35


1.6

1.4

1.2

0.8

0.6

0.4

0.2

0
0 50 100 150 200 250 300 350 400 450 500

Fig. 7. Scope of the unit step response of the system for test 1
B.Test 2:
TABLE 2 :
The second assumed values of the parameters of the PID
controller
parameter Kp Ki Kd
value 1.968 .05 0.63
1.4

1.2

0.8

0.6

0.4

0.2

0
0 50 100 150 200 250 300 350 400 450 500
Fig. 8 Scope of the unit step response of the system for test 2
C.Test 3:
TABLE 3
The third assumed values of the parameters of the PID controller:

parameter Kp Ki Kd
value 55 0.0324 3.3278
1.4

1.2

0.8

0.6

0.4

0.2

0
0 50 100 150 200 250 300 350 400 450 500

Fig. 9 Scope of the unit step response of the system for test 3
RESULT

informa Test(1) Test(2) Test(3)


tion
Rise time 37 62 15

Selting time 830 248 29

Over shoot 62 15.3 0


D. Result Analysis

Using Matlab/Simulink toolbox, various parameters were


tested and the best parameters were used for PID
implementation on the microcontroller. The results
showed the system responses to a step input with
varying PID controller parameters It can be inferred
from the results that the optimal set of parameters that
give a more desirable transient response in terms of short
rise time, low overshoot, short settling time are got from
the results of test 3 .
III. SYSTEM DESIGN USING
MICROCONTROLLER
The operation of the circuit is based on a PID
Controller implemented on a microcontroller and a
temperature sensor (LM35). The temperature sensor
converts change in temperature to change in electrical
signal which is then compared by the PID controller
control algorithm to activate the fan for the cooling of the
system. The microcontroller accepts inputs from a
temperatures Sensor. Figure9 shows the schematic
representation of the system design on proteus.
model in protues :

1 U3
U1
9 22
30.0 RESET PC0/SCL
23
PC1/SDA
13 24
XTAL1 PC2/TCK
2 12 25
VOUT XTAL2 PC3/TMS
26
PC4/TDO
40 27
PA0/ADC0 PC5/TDI
39 28
PA1/ADC1 PC6/TOSC1 U2
3 LM35 38 29 16 8
PA2/ADC2 PC7/TOSC2
37
LCD1 36
PA3/ADC3
14 2 3
PA4/ADC4 PD0/RXD IN1 VSS VS OUT1
LM016L 35 15 7 6
PA5/ADC5 PD1/TXD IN2 OUT2
34 16 1
PA6/ADC6 PD2/INT0 EN1
33 17
PA7/ADC7 PD3/INT1
18 +88.8
PD4/OC1B
1 19 9
PB0/T0/XCK PD5/OC1A EN2 kRPM
2 20 10 11
PB1/T1 PD6/ICP1 IN3 OUT3
3 21 15 14
PB2/AIN0/INT2 PD7/OC2 IN4 GND GND OUT4
4
PB3/AIN1/OC0
VDD
VSS

VEE

RW

5
RS

D0
D1
D2
D3
D4
D5
D6
D7

PB4/SS
E

6 L293D
PB5/MOSI
7 32
U4
PB6/MISO AREF
1
2
3

4
5
6

7
8
9
10
11
12
13
14

8 30
PB7/SCK AVCC
ATMEGA16

7815
TR1
BR1 1 3
VI VO

C1 GND
2

220u

G2SB20

Figure 9
TRAN-2P2S
For simplicity in analyzing the system, the block diagram of
the system design is shown in figure 2

Power supply

LCD

LM35 MICROCONT
L293 FAN
ROLLER

Figure 10
THE PROGRAM CODE BY
USING BASKOM:
$regfile "m16def.dat”
$crystal = 1000000
Config Adc = Single , Prescaler = Auto , Reference = Avcc
Config Portd = Output
Dim W As Word , Channel As Byte
Dim X As Single
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 =
Portb.6 , Db7 = Portb.7 , E = Portb.1 , Rs = Portb.0
Channel = 0
Do
Lcd " TEMP. SYSTEM"
Wait 2
Cls
Start Adc
W = Getadc(channel)
Lcd W
Wait 2
CLS
X =W * 5
X = X / 1024
X = 100 * X
Lcd X
If X > 27 Then
Portd.0 = 1
Portd.1 = 0
If X < 27 Then
Portd.0 = 0
Portd.1 = 0
Wait 2
End If
End If
Loop

You might also like