Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control...

Post on 09-Nov-2018

270 views 5 download

Transcript of Implementation of a Temperature Control System using ARDUINO · Phase control TCA 785 Control...

Fuzzy Logic Systems G. Oltean

Implementation of a Temperature Control

System using

ARDUINO

Fuzzy Logic Systems G. Oltean

Close control loop

Fuzzy controller

Fuzzy logic system: 9 rules

Temperature Sensor

One Wire Digital Temperature Sensor - DS18B20

Heating element

Heating resistor 2Ω, supplied in ac (12V peak value)

Heating power control

Phase control of a SCR (thyristor) – TCA 785

System structure

Fuzzy Logic Systems G. Oltean

Arduino development board

• “Brain” of the entire system

• Read current temperature

• Compute error and change-of-error

• Run fuzzy logic system

• Determine digital value of control signal

DAC - MCP4725, I2C interface

Provide analog value of control signal

Phase control board

Analog amplifier for control voltage – AD820

TCA 785 – phase control IC

System implementation

Fuzzy Logic Systems G. Oltean

Block diagram

Fuzzy Logic Systems G. Oltean

5

Functional diagram u(k) = u(k-1) - duc(k)

Fuzzy Logic Systems G. Oltean

6

ARDUINO UNO development board

Fuzzy Logic Systems G. Oltean

7

Programmable Resolution 1-Wire Digital Temperature Sensor

9-bit to 12-bit Celsius temperature measurements

Unique 1-Wire® Interface Requires Only One Port Pin for

Communication

Allows multiple DS18B20s to function on the same 1-Wire bus

Fuzzy Logic Systems G. Oltean

8

12-Bit Resolution

On-Board Non-Volatile Memory (EEPROM)

External Voltage Reference (VDD)

Rail-to-Rail Output

Single-Supply Operation: 2.7V to 5.5V

I2C Interface

Eight Available Addresses

DAC MCP4725

Fuzzy Logic Systems G. Oltean

9

Phase control TCA 785

Control thyristors, triacs, and transistors.

The trigger pulses can be shifted within a

phase angle between 0 ˚ and 180 ˚

Fuzzy Logic Systems G. Oltean

10

TCA 785

Fuzzy Logic Systems G. Oltean

11

Thermal enclosure Phase control board

Fuzzy Logic Systems G. Oltean

12

16 x 2 LCD

Fuzzy Logic Systems G. Oltean

13

Experimental setup

Fuzzy Logic Systems G. Oltean

14

Experimental setup

Fuzzy Logic Systems G. Oltean

15

Fuzzy logic system

Fuzzy Logic Systems G. Oltean

16

-1 -0.5 0 0.5 10

0.2

0.4

0.6

0.8

1

err; cerr

Neg

Zero

Pos

-1 -0.5 0 0.5 10

0.2

0.4

0.6

0.8

1

du

N

Z

P

Input fuzzy sets

Output fuzzy sets

Fuzzy Logic Systems G. Oltean

Control surface

errFls

cerrFlsNeg Zero Pos

Neg N N Z

Zero N Z P

Pos Z P P

Rule base

1

2

3

4

5

6

7

8

9

Fuzzy Logic Systems G. Oltean

Waveforms

for the

phase

control

circuit

CH3 - the analog control voltage applied at pin 11 of the TCA785 IC, 4.8V

CH2 - the ramp voltage, generated by the TCA785 IC, at pin 10

CH1 - the positive voltage pulse generated by the TCA785 at pin 15, to be applied in the gate of the

SCR to set it on (ch1, yellow); the voltage pulse is generated when the ramp voltage exceeds the

analog control voltage

CH4 - the almost sinusoidal supply voltage, in the secondary of the line transformer; the moment

when the SCR switches on (when the positive pulse appears in its gate) is obvious on the waveform –

the voltage decreases due to the large current ensured through the 2Ω heating resistor

Fuzzy Logic Systems G. Oltean

1

9 Waveforms

for the

power

circuit

CH1 - the supply voltage, in the secondary of the line transformer

CH2 - the voltage drop across the SCR

MATH - the voltage drop across the heating resistor

Fuzzy Logic Systems G. Oltean

20

0 500 1000 1500 2000 250025

30

35

40

45

50

time [s]

tem

pera

ture

[C

]

Tref

T

Experimental results, Tref = 45oC

process perturbation:

opening the thermal enclosure

Fuzzy Logic Systems G. Oltean

21

0 500 1000 1500 2000 250020

40

60

tem

p

0 500 1000 1500 2000 2500-20

0

20

err

0 500 1000 1500 2000 2500-20

0

20

cerr

0 500 1000 1500 2000 2500-1000

0

1000

du

0 500 1000 1500 2000 25000

2000

4000

u

Experimental results, Tref = 45oC

Fuzzy Logic Systems G. Oltean

0 500 1000 1500 2000 250020

40

60te

mp

0 500 1000 1500 2000 2500-1000

0

1000

du

0 500 1000 1500 2000 25000

2000

4000

u

0 500 1000 1500 2000 25000

2

4

con

tr.

vo

ltag

e

Experimental results, Tref = 45oC

Fuzzy Logic Systems G. Oltean

Experimental results, Tref = 37oC

0 100 200 300 400 500 600 700 800 90026

28

30

32

34

36

38

time [s]

tem

pera

ture

[C

]

Tref

T

Fuzzy Logic Systems G. Oltean

Experimental results, Tref = 34oC from 37oC

0 200 400 600 800 1000 120033.5

34

34.5

35

35.5

36

36.5

37

time [s]

tem

pera

ture

[C

]

Tref

T

Fuzzy Logic Systems G. Oltean

0 200 400 600 800 1000 120030

35

40te

mp

0 200 400 600 800 1000 1200-1000

0

1000

du

0 200 400 600 800 1000 12002000

4000

6000

u

0 200 400 600 800 1000 12002

3

4

con

tr.

vo

ltag

e

Experimental results, Tref = 34oC from 37oC