Professional Documents
Culture Documents
the system.
1. INTRODUCTION
Heating and ventilation systems play a vital role in
(2.3)
Where τ = 120secs
Figure2: Modeled block diagram of the chamber
(2.4)
(2.5)
𝑡
𝑑𝑒𝑅
= 𝐾𝑃 𝑒𝑅 (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
TABLE 1:
parameters Kp Ki Kd
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
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